]> matita.cs.unibo.it Git - helm.git/blob - matita/contribs/LAMBDA-TYPES/LambdaDelta-1/lift/defs.ma
tagged 0.5.0-rc1
[helm.git] / matita / contribs / LAMBDA-TYPES / LambdaDelta-1 / lift / defs.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 (* This file was automatically generated: do not edit *********************)
16
17 include "LambdaDelta-1/tlist/defs.ma".
18
19 include "LambdaDelta-1/s/defs.ma".
20
21 definition lref_map:
22  ((nat \to nat)) \to (nat \to (T \to T))
23 \def
24  let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t 
25 with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match 
26 (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u 
27 t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in 
28 lref_map.
29
30 definition lift:
31  nat \to (nat \to (T \to T))
32 \def
33  \lambda (h: nat).(\lambda (i: nat).(\lambda (t: T).(lref_map (\lambda (x: 
34 nat).(plus x h)) i t))).
35
36 definition lifts:
37  nat \to (nat \to (TList \to TList))
38 \def
39  let rec lifts (h: nat) (d: nat) (ts: TList) on ts: TList \def (match ts with 
40 [TNil \Rightarrow TNil | (TCons t ts0) \Rightarrow (TCons (lift h d t) (lifts 
41 h d ts0))]) in lifts.
42