Myhill_2.thy
changeset 132 f77a7138f791
parent 128 6d2693c78c37
child 149 e122cb146ecc
equal deleted inserted replaced
131:6b4c20714b4f 132:f77a7138f791
   799 lemma Myhill_Nerode2:
   799 lemma Myhill_Nerode2:
   800   fixes r::"rexp"
   800   fixes r::"rexp"
   801   shows "finite (UNIV // \<approx>(L r))"
   801   shows "finite (UNIV // \<approx>(L r))"
   802 by (induct r) (auto)
   802 by (induct r) (auto)
   803 
   803 
       
   804 theorem Myhill_Nerode:
       
   805   shows "(\<exists>r::rexp. A = L r) \<longleftrightarrow> finite (UNIV // \<approx>A)"
       
   806 using Myhill_Nerode1 Myhill_Nerode2 by metis
   804 
   807 
   805 (*
   808 (*
   806 section {* Closure properties *}
   809 section {* Closure properties *}
   807 
   810 
   808 abbreviation
   811 abbreviation
   809   reg :: "lang \<Rightarrow> bool"
   812   reg :: "lang \<Rightarrow> bool"
   810 where
   813 where
   811   "reg A \<equiv> \<exists>r::rexp. A = L r"
   814   "reg A \<equiv> \<exists>r::rexp. A = L r"
   812 
   815 
   813 
   816 
   814 theorem Myhill_Nerode:
       
   815   shows "reg A \<longleftrightarrow> finite (UNIV // \<approx>A)"
       
   816 using Myhill_Nerode1 Myhill_Nerode2 by auto
       
   817 
   817 
   818 lemma closure_union[intro]:
   818 lemma closure_union[intro]:
   819   assumes "reg A" "reg B" 
   819   assumes "reg A" "reg B" 
   820   shows "reg (A \<union> B)"
   820   shows "reg (A \<union> B)"
   821 using assms
   821 using assms