X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fground%2Flib%2Flist_eq.ma;h=d0c607275445c71e0e1b5761c5c3d22d474b77c2;hb=8f1a123e61ff079b1f9ad63cc915470ec7e6abf3;hp=ffa06ab6d9960c2a0e5758d666be328e0c5efd06;hpb=6604a232815858a6c75dd25ac45abd68438077ff;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/ground/lib/list_eq.ma b/matita/matita/contribs/lambdadelta/ground/lib/list_eq.ma index ffa06ab6d..d0c607275 100644 --- a/matita/matita/contribs/lambdadelta/ground/lib/list_eq.ma +++ b/matita/matita/contribs/lambdadelta/ground/lib/list_eq.ma @@ -15,19 +15,19 @@ include "ground/notation/relations/ringeq_3.ma". include "ground/lib/list.ma". -(* EXTENSIONAL EQUIVALENCE OF LISTS *****************************************) +(* EXTENSIONAL EQUIVALENCE FOR LISTS ****************************************) rec definition list_eq A (l1,l2:list A) on l1 ≝ match l1 with -[ list_nil ⇒ +[ list_empty ⇒ match l2 with - [ list_nil ⇒ ⊤ - | list_cons _ _ ⇒ ⊥ + [ list_empty ⇒ ⊤ + | list_lcons _ _ ⇒ ⊥ ] -| list_cons a1 l1 ⇒ +| list_lcons a1 l1 ⇒ match l2 with - [ list_nil ⇒ ⊥ - | list_cons a2 l2 ⇒ a1 = a2 ∧ list_eq A l1 l2 + [ list_empty ⇒ ⊥ + | list_lcons a2 l2 ⇒ a1 = a2 ∧ list_eq A l1 l2 ] ]. @@ -37,18 +37,21 @@ interpretation (* Basic constructions ******************************************************) -lemma list_eq_refl (A): reflexive … (list_eq A). +lemma list_eq_refl (A): + reflexive … (list_eq A). #A #l elim l -l /2 width=1 by conj/ qed. (* Main constructions *******************************************************) -theorem eq_list_eq (A,l1,l2): l1 = l2 → l1 ≗{A} l2. +theorem eq_list_eq (A) (l1) (l2): + l1 = l2 → l1 ≗{A} l2. // qed. (* Main inversions **********************************************************) -theorem list_eq_inv_eq (A,l1,l2): l1 ≗{A} l2 → l1 = l2. +theorem list_eq_inv_eq (A) (l1) (l2): + l1 ≗{A} l2 → l1 = l2. #A #l1 elim l1 -l1 [| #a1 #l1 #IH ] * [ // | #a2 #l2 #H elim H