]> matita.cs.unibo.it Git - helm.git/commitdiff
- some bug fixes
authorFerruccio Guidi <ferruccio.guidi@unibo.it>
Tue, 19 Apr 2011 20:59:15 +0000 (20:59 +0000)
committerFerruccio Guidi <ferruccio.guidi@unibo.it>
Tue, 19 Apr 2011 20:59:15 +0000 (20:59 +0000)
- we defined the thinning relation

matita/matita/lib/lambda-delta/language/item.ma [new file with mode: 0644]
matita/matita/lib/lambda-delta/language/item2.ma [deleted file]
matita/matita/lib/lambda-delta/language/term.ma
matita/matita/lib/lambda-delta/notation.ma
matita/matita/lib/lambda-delta/substitution/subst.ma
matita/matita/lib/lambda-delta/substitution/thin.ma [new file with mode: 0644]

diff --git a/matita/matita/lib/lambda-delta/language/item.ma b/matita/matita/lib/lambda-delta/language/item.ma
new file mode 100644 (file)
index 0000000..4d7f5c9
--- /dev/null
@@ -0,0 +1,36 @@
+(*
+    ||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.
diff --git a/matita/matita/lib/lambda-delta/language/item2.ma b/matita/matita/lib/lambda-delta/language/item2.ma
deleted file mode 100644 (file)
index 4d7f5c9..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-(*
-    ||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.
index 6a8a9eaf5197442642a41e44b6eef852b05b2736..22dad92a5855b50a4e284714124f4f4391bacff1 100644 (file)
@@ -9,7 +9,7 @@
      \ /
       V_______________________________________________________________ *)
 
-include "lambda-delta/language/item2.ma".
+include "lambda-delta/language/item.ma".
 
 (* TERMS ********************************************************************)
 
index 9d74ff3bac1a9b4d3111bbce223f1a649748e9d8..9afd9ac7913da00ebebccd0a1b7ae6baea22386c 100644 (file)
@@ -21,12 +21,12 @@ notation "hvbox( ⋆ k )"
  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 )"
@@ -46,3 +46,13 @@ notation "hvbox( [ d , break e ] ↑ break T1 ≡ break T2 )"
 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 }.
index 2ba14fbc1533b57cf62ccea7a22d6951ca7b6c44..e09b37f35b93246f177e27d8d47d9af4d947f2ad 100644 (file)
 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.
@@ -31,6 +31,5 @@ interpretation "telescopic substritution" 'RSubst L T1 d e T2 = (subst L T1 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.
-
diff --git a/matita/matita/lib/lambda-delta/substitution/thin.ma b/matita/matita/lib/lambda-delta/substitution/thin.ma
new file mode 100644 (file)
index 0000000..03cc81b
--- /dev/null
@@ -0,0 +1,25 @@
+(*
+    ||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).