adding lemma to List library for executable equation of the (refl) transitive closure
authorbulwahn
Mon Oct 03 14:43:12 2011 +0200 (2011-10-03)
changeset 4511593c1ac6727a3
parent 45114 fa3715b35370
child 45116 f947eeef6b6f
adding lemma to List library for executable equation of the (refl) transitive closure
src/HOL/List.thy
     1.1 --- a/src/HOL/List.thy	Thu Sep 29 21:42:03 2011 +0200
     1.2 +++ b/src/HOL/List.thy	Mon Oct 03 14:43:12 2011 +0200
     1.3 @@ -2870,6 +2870,9 @@
     1.4    qed
     1.5  qed
     1.6  
     1.7 +lemma distinct_length_filter: "distinct xs \<Longrightarrow> length (filter P xs) = card ({x. P x} Int set xs)"
     1.8 +by (induct xs) (auto)
     1.9 +
    1.10  lemma not_distinct_decomp: "~ distinct ws ==> EX xs ys zs y. ws = xs@[y]@ys@[y]@zs"
    1.11  apply (induct n == "length ws" arbitrary:ws) apply simp
    1.12  apply(case_tac ws) apply simp