--- /dev/null
+(*
+ ||M|| This file is part of HELM, an Hypertextual, Electronic
+ ||A|| Library of Mathematics, developed at the Computer Science
+ ||T|| Department of the University of Bologna, Italy.
+ ||I||
+ ||T||
+ ||A|| This file is distributed under the terms of the
+ \ / GNU General Public License Version 2
+ \ /
+ V_______________________________________________________________ *)
+
+(* THE FORMAL SYSTEM λδ - MATITA SOURCE SCRIPTS
+ * Specification started: 2011 April 17
+ * - Patience on me so that I gain peace and perfection! -
+ * [ suggested invocation to start formal specifications with ]
+ *)
+
+include "lambda-delta/ground.ma".
+
+(* BINARY ITEMS *************************************************************)
+
+(* binary items *)
+inductive item2: Type[0] ≝
+ | Abbr: item2 (* abbreviation *)
+ | Abst: item2 (* abstraction *)
+ | Appl: item2 (* application *)
+ | Cast: item2 (* explicit type annotation *)
+.
+
+(* reduction-related categorization *****************************************)
+
+(* binary items entitled for theta reduction *)
+definition thable2 ≝ λI. I = Abbr.
+
+(* binary items entitled for zeta reduction *)
+definition zable2 ≝ λI. I = Abbr ∨ I = Cast.
+++ /dev/null
-(*
- ||M|| This file is part of HELM, an Hypertextual, Electronic
- ||A|| Library of Mathematics, developed at the Computer Science
- ||T|| Department of the University of Bologna, Italy.
- ||I||
- ||T||
- ||A|| This file is distributed under the terms of the
- \ / GNU General Public License Version 2
- \ /
- V_______________________________________________________________ *)
-
-(* THE FORMAL SYSTEM λδ - MATITA SOURCE SCRIPTS
- * Specification started: 2011 April 17
- * - Patience on me so that I gain peace and perfection! -
- * [ suggested invocation to start formal specifications with ]
- *)
-
-include "lambda-delta/ground.ma".
-
-(* BINARY ITEMS *************************************************************)
-
-(* binary items *)
-inductive item2: Type[0] ≝
- | Abbr: item2 (* abbreviation *)
- | Abst: item2 (* abstraction *)
- | Appl: item2 (* application *)
- | Cast: item2 (* explicit type annotation *)
-.
-
-(* reduction-related categorization *****************************************)
-
-(* binary items entitled for theta reduction *)
-definition thable2 ≝ λI. I = Abbr.
-
-(* binary items entitled for zeta reduction *)
-definition zable2 ≝ λI. I = Abbr ∨ I = Cast.
\ /
V_______________________________________________________________ *)
-include "lambda-delta/language/item2.ma".
+include "lambda-delta/language/item.ma".
(* TERMS ********************************************************************)
non associative with precedence 90
for @{ 'Star $k }.
-notation "hvbox( ♭ (term 90 I) break T1 . break T )"
+notation "hvbox( ♭ (term 90 I) break (term 90 T1) . break T )"
non associative with precedence 90
for @{ 'SCon $I $T1 $T }.
-notation "hvbox( T . break ♭ (term 90 I) break T1 )"
- non associative with precedence 90
+notation "hvbox( T . break ♭ (term 90 I) break (term 90 T1) )"
+ non associative with precedence 89
for @{ 'DCon $T $I $T1 }.
notation "hvbox( # term 90 x )"
notation "hvbox( [ d , break e ] ← break (term 90 L) / break T1 ≡ break T2 )"
non associative with precedence 45
for @{ 'RSubst $L $T1 $d $e $T2 }.
+
+notation "hvbox( [ d , break e ] ↓ break L1 ≡ break L2 )"
+ non associative with precedence 45
+ for @{ 'RThin $L1 $d $e $L2 }.
+
+(* reduction ****************************************************************)
+
+notation "hvbox( L ⊢ break T1 ⇒ break T2 )"
+ non associative with precedence 45
+ for @{ 'PR $L $T1 $T2 }.
include "lambda-delta/language/lenv.ma".
include "lambda-delta/substitution/lift.ma".
-(* SUBSTITUTION *************************************************************)
+(* TELESCOPIC SUBSTITUTION **************************************************)
inductive subst: lenv → term → nat → nat → term → Prop ≝
| subst_sort : ∀L,k,d,e. subst L (⋆k) d e (⋆k)
| subst_lref_lt: ∀L,i,d,e. i < d → subst L (#i) d e (#i)
| subst_lref_O : ∀L,V,e. 0 < e → subst (L. ♭Abbr V) #0 0 e V
| subst_lref_S : ∀L,I,V,i,T1,T2,d,e.
- d ≤ i → i < d + e → subst L #i d e T1 → [1,d]↑ T1 ≡ T2 →
+ d ≤ i → i < d + e → subst L #i d e T1 → [d,1]↑ T1 ≡ T2 →
subst (L. ♭I V) #(i + 1) (d + 1) e T2
| subst_lref_ge: ∀L,i,d,e. d + e ≤ i → subst L (#i) d e (#(i - e))
| subst_con2 : ∀L,I,V1,V2,T1,T2,d,e.
lemma subst_lift_inv: ∀d,e,T1,T2. [d,e]↑ T1 ≡ T2 → ∀L. [d,e]← L / T2 ≡ T1.
#d #e #T1 #T2 #H elim H -H d e T1 T2 /2/
-#i #d #e #Hdi #L >(minus_plus_m_m i e) in ⊢ (? ? ? ? ? %) /3/
+#i #d #e #Hdi #L >(minus_plus_m_m i e) in ⊢ (? ? ? ? ? %) /3/ (**) (* use \ldots *)
qed.
-
--- /dev/null
+(*
+ ||M|| This file is part of HELM, an Hypertextual, Electronic
+ ||A|| Library of Mathematics, developed at the Computer Science
+ ||T|| Department of the University of Bologna, Italy.
+ ||I||
+ ||T||
+ ||A|| This file is distributed under the terms of the
+ \ / GNU General Public License Version 2
+ \ /
+ V_______________________________________________________________ *)
+
+include "lambda-delta/substitution/subst.ma".
+
+(* THINNING *****************************************************************)
+
+inductive thin: lenv → nat → nat → lenv → Prop ≝
+ | thin_refl: ∀L. thin L 0 0 L
+ | thin_thin: ∀L1,L2,I,V,e.
+ thin L1 0 e L2 → thin (L1. ♭I V) 0 (e + 1) L2
+ | thin_skip: ∀L1,L2,I,V1,V2,d,e.
+ thin L1 d e L2 → [d,e]← L1 / V1 ≡ V2 →
+ thin (L1. ♭I V1) (d + 1) e (L2. ♭I V2)
+.
+
+interpretation "thinning" 'RThin L1 d e L2 = (thin L1 d e L2).