From: Ferruccio Guidi Date: Tue, 19 Apr 2011 20:59:15 +0000 (+0000) Subject: - some bug fixes X-Git-Tag: make_still_working~2531 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=7b976a01aa6cedbfbef57ace183ce3fc0e2f22a9;hp=2af0a3e67ae1a9134102f6a6caf02680a4851312;p=helm.git - some bug fixes - we defined the thinning relation --- diff --git a/matita/matita/lib/lambda-delta/language/item.ma b/matita/matita/lib/lambda-delta/language/item.ma new file mode 100644 index 000000000..4d7f5c93e --- /dev/null +++ b/matita/matita/lib/lambda-delta/language/item.ma @@ -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 index 4d7f5c93e..000000000 --- a/matita/matita/lib/lambda-delta/language/item2.ma +++ /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. diff --git a/matita/matita/lib/lambda-delta/language/term.ma b/matita/matita/lib/lambda-delta/language/term.ma index 6a8a9eaf5..22dad92a5 100644 --- a/matita/matita/lib/lambda-delta/language/term.ma +++ b/matita/matita/lib/lambda-delta/language/term.ma @@ -9,7 +9,7 @@ \ / V_______________________________________________________________ *) -include "lambda-delta/language/item2.ma". +include "lambda-delta/language/item.ma". (* TERMS ********************************************************************) diff --git a/matita/matita/lib/lambda-delta/notation.ma b/matita/matita/lib/lambda-delta/notation.ma index 9d74ff3ba..9afd9ac79 100644 --- a/matita/matita/lib/lambda-delta/notation.ma +++ b/matita/matita/lib/lambda-delta/notation.ma @@ -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 }. diff --git a/matita/matita/lib/lambda-delta/substitution/subst.ma b/matita/matita/lib/lambda-delta/substitution/subst.ma index 2ba14fbc1..e09b37f35 100644 --- a/matita/matita/lib/lambda-delta/substitution/subst.ma +++ b/matita/matita/lib/lambda-delta/substitution/subst.ma @@ -12,14 +12,14 @@ 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 index 000000000..03cc81b06 --- /dev/null +++ b/matita/matita/lib/lambda-delta/substitution/thin.ma @@ -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).