X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambda_delta%2Fbasic_2%2Fgrammar%2Fterm.ma;h=5ccb5e4accdf9482813b9fe5c8ecb203c46608b9;hb=4bea40e6589ce21c15ecf99bdd5bd2a1c62f6809;hp=44e30369126d63f72f0dfbc3597ca1037f3bab34;hpb=a8c166f1e1baeeae04553058bd179420ada8bbe7;p=helm.git diff --git a/matita/matita/contribs/lambda_delta/basic_2/grammar/term.ma b/matita/matita/contribs/lambda_delta/basic_2/grammar/term.ma index 44e303691..5ccb5e4ac 100644 --- a/matita/matita/contribs/lambda_delta/basic_2/grammar/term.ma +++ b/matita/matita/contribs/lambda_delta/basic_2/grammar/term.ma @@ -29,7 +29,13 @@ interpretation "term construction (binary)" 'SnItem2 I T1 T2 = (TPair I T1 T2). interpretation "term binding construction (binary)" - 'SnBind2 I T1 T2 = (TPair (Bind2 I) T1 T2). + 'SnBind2 a I T1 T2 = (TPair (Bind2 a I) T1 T2). + +interpretation "term positive binding construction (binary)" + 'SnBind2Pos I T1 T2 = (TPair (Bind2 true I) T1 T2). + +interpretation "term negative binding construction (binary)" + 'SnBind2Neg I T1 T2 = (TPair (Bind2 false I) T1 T2). interpretation "term flat construction (binary)" 'SnFlat2 I T1 T2 = (TPair (Flat2 I) T1 T2). @@ -44,10 +50,22 @@ interpretation "global reference (term)" 'GRef p = (TAtom (GRef p)). interpretation "abbreviation (term)" - 'SnAbbr T1 T2 = (TPair (Bind2 Abbr) T1 T2). + 'SnAbbr a T1 T2 = (TPair (Bind2 a Abbr) T1 T2). + +interpretation "positive abbreviation (term)" + 'SnAbbrPos T1 T2 = (TPair (Bind2 true Abbr) T1 T2). + +interpretation "negative abbreviation (term)" + 'SnAbbrNeg T1 T2 = (TPair (Bind2 false Abbr) T1 T2). interpretation "abstraction (term)" - 'SnAbst T1 T2 = (TPair (Bind2 Abst) T1 T2). + 'SnAbst a T1 T2 = (TPair (Bind2 a Abst) T1 T2). + +interpretation "positive abstraction (term)" + 'SnAbstPos T1 T2 = (TPair (Bind2 true Abst) T1 T2). + +interpretation "negative abstraction (term)" + 'SnAbstNeg T1 T2 = (TPair (Bind2 false Abst) T1 T2). interpretation "application (term)" 'SnAppl T1 T2 = (TPair (Flat2 Appl) T1 T2). @@ -62,7 +80,7 @@ axiom term_eq_dec: ∀T1,T2:term. Decidable (T1 = T2). (* Basic inversion lemmas ***************************************************) -lemma discr_tpair_xy_x: ∀I,T,V. ②{I} V. T = V → False. +lemma discr_tpair_xy_x: ∀I,T,V. ②{I} V. T = V → ⊥. #I #T #V elim V -V [ #J #H destruct | #J #W #U #IHW #_ #H destruct @@ -72,7 +90,7 @@ lemma discr_tpair_xy_x: ∀I,T,V. ②{I} V. T = V → False. qed-. (* Basic_1: was: thead_x_y_y *) -lemma discr_tpair_xy_y: ∀I,V,T. ②{I} V. T = T → False. +lemma discr_tpair_xy_y: ∀I,V,T. ②{I} V. T = T → ⊥. #I #V #T elim T -T [ #J #H destruct | #J #W #U #_ #IHU #H destruct @@ -82,26 +100,26 @@ lemma discr_tpair_xy_y: ∀I,V,T. ②{I} V. T = T → False. qed-. lemma eq_false_inv_tpair_sn: ∀I,V1,T1,V2,T2. - (②{I} V1. T1 = ②{I} V2. T2 → False) → - (V1 = V2 → False) ∨ (V1 = V2 ∧ (T1 = T2 → False)). + (②{I} V1. T1 = ②{I} V2. T2 → ⊥) → + (V1 = V2 → ⊥) ∨ (V1 = V2 ∧ (T1 = T2 → ⊥)). #I #V1 #T1 #V2 #T2 #H elim (term_eq_dec V1 V2) /3 width=1/ #HV12 destruct @or_intror @conj // #HT12 destruct /2 width=1/ qed-. lemma eq_false_inv_tpair_dx: ∀I,V1,T1,V2,T2. - (②{I} V1. T1 = ②{I} V2. T2 → False) → - (T1 = T2 → False) ∨ (T1 = T2 ∧ (V1 = V2 → False)). + (②{I} V1. T1 = ②{I} V2. T2 → ⊥) → + (T1 = T2 → ⊥) ∨ (T1 = T2 ∧ (V1 = V2 → ⊥)). #I #V1 #T1 #V2 #T2 #H elim (term_eq_dec T1 T2) /3 width=1/ #HT12 destruct @or_intror @conj // #HT12 destruct /2 width=1/ qed-. -lemma eq_false_inv_beta: ∀V1,V2,W1,W2,T1,T2. - (ⓐV1. ⓛW1. T1 = ⓐV2. ⓛW2 .T2 →False) → - (W1 = W2 → False) ∨ - (W1 = W2 ∧ (ⓓV1. T1 = ⓓV2. T2 → False)). -#V1 #V2 #W1 #W2 #T1 #T2 #H +lemma eq_false_inv_beta: ∀a,V1,V2,W1,W2,T1,T2. + (ⓐV1. ⓛ{a}W1. T1 = ⓐV2. ⓛ{a}W2 .T2 → ⊥) → + (W1 = W2 → ⊥) ∨ + (W1 = W2 ∧ (ⓓ{a}V1. T1 = ⓓ{a}V2. T2 → ⊥)). +#a #V1 #V2 #W1 #W2 #T1 #T2 #H elim (eq_false_inv_tpair_sn … H) -H [ #HV12 elim (term_eq_dec W1 W2) /3 width=1/ #H destruct @or_intror @conj // #H destruct /2 width=1/