src/HOL/List.thy
changeset 55406 186076d100d3
parent 55405 0a155051bd9d
child 55415 05f5fdb8d093
     1.1 --- a/src/HOL/List.thy	Wed Feb 12 08:35:56 2014 +0100
     1.2 +++ b/src/HOL/List.thy	Wed Feb 12 08:35:56 2014 +0100
     1.3 @@ -14,6 +14,18 @@
     1.4  
     1.5  datatype_new_compat list
     1.6  
     1.7 +thm list.exhaust[no_vars]
     1.8 +
     1.9 +lemma [case_names Nil Cons, cases type: list]:
    1.10 +  -- {* for backward compatibility -- names of variables differ *}
    1.11 +  "(y = [] \<Longrightarrow> P) \<Longrightarrow> (\<And>a list. y = a # list \<Longrightarrow> P) \<Longrightarrow> P"
    1.12 +by (rule list.exhaust)
    1.13 +
    1.14 +lemma [case_names Nil Cons, induct type: list]:
    1.15 +  -- {* for backward compatibility -- names of variables differ *}
    1.16 +  "P [] \<Longrightarrow> (\<And>a list. P list \<Longrightarrow> P (a # list)) \<Longrightarrow> P list"
    1.17 +by (rule list.induct)
    1.18 +
    1.19  -- {* Compatibility *}
    1.20  setup {* Sign.mandatory_path "list" *}
    1.21