]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/basic_1/subst/defs.ma
update in basic_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_1 / subst / defs.ma
index 86a54c777a6a55c1f4185cc3c7891d3d113b2652..8d9ed5f07b58db23db35705495aac6f1d033a43c 100644 (file)
 
 include "basic_1/lift/defs.ma".
 
-let rec subst (d: nat) (v: T) (t: T) on t: T \def match t with [(TSort n) 
-\Rightarrow (TSort n) | (TLRef i) \Rightarrow (let TMP_4 \def (blt i d) in 
-(match TMP_4 with [true \Rightarrow (TLRef i) | false \Rightarrow (let TMP_5 
-\def (blt d i) in (match TMP_5 with [true \Rightarrow (let TMP_6 \def (pred 
-i) in (TLRef TMP_6)) | false \Rightarrow (lift d O v)]))])) | (THead k u t0) 
-\Rightarrow (let TMP_1 \def (subst d v u) in (let TMP_2 \def (s k d) in (let 
-TMP_3 \def (subst TMP_2 v t0) in (THead k TMP_1 TMP_3))))].
+rec definition subst (d: nat) (v: T) (t: T) on t: T \def match t with [(TSort 
+n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (match (blt i d) with [true 
+\Rightarrow (TLRef i) | false \Rightarrow (match (blt d i) with [true 
+\Rightarrow (TLRef (pred i)) | false \Rightarrow (lift d O v)])]) | (THead k 
+u t0) \Rightarrow (THead k (subst d v u) (subst (s k d) v t0))].