src/HOL/UNITY/Follows.thy
changeset 62430 9527ff088c15
parent 61169 4de9ff3ea29a
child 63146 f1ecba0272f9
equal deleted inserted replaced
62429:25271ff79171 62430:9527ff088c15
    34 done
    34 done
    35 
    35 
    36 lemma Follows_constant [iff]: "F \<in> (%s. c) Fols (%s. c)"
    36 lemma Follows_constant [iff]: "F \<in> (%s. c) Fols (%s. c)"
    37 by (simp add: Follows_def)
    37 by (simp add: Follows_def)
    38 
    38 
    39 lemma mono_Follows_o: "mono h ==> f Fols g \<subseteq> (h o f) Fols (h o g)"
    39 lemma mono_Follows_o:
    40 by (auto simp add: Follows_def mono_Increasing_o [THEN [2] rev_subsetD]
    40   assumes "mono h"
    41                    mono_Always_o [THEN [2] rev_subsetD]
    41   shows "f Fols g \<subseteq> (h o f) Fols (h o g)"
    42                    mono_LeadsTo_o [THEN [2] rev_subsetD, THEN INT_D])
    42 proof
       
    43   fix x
       
    44   assume "x \<in> f Fols g"
       
    45   with assms show "x \<in> (h \<circ> f) Fols (h \<circ> g)"
       
    46   by (auto simp add: Follows_def mono_Increasing_o [THEN [2] rev_subsetD]
       
    47     mono_Always_o [THEN [2] rev_subsetD]
       
    48     mono_LeadsTo_o [THEN [2] rev_subsetD, THEN INT_D])
       
    49 qed
    43 
    50 
    44 lemma mono_Follows_apply:
    51 lemma mono_Follows_apply:
    45      "mono h ==> f Fols g \<subseteq> (%x. h (f x)) Fols (%x. h (g x))"
    52      "mono h ==> f Fols g \<subseteq> (%x. h (f x)) Fols (%x. h (g x))"
    46 apply (drule mono_Follows_o)
    53 apply (drule mono_Follows_o)
    47 apply (force simp add: o_def)
    54 apply (force simp add: o_def)
   171 (*TODO: remove when multiset is of sort ord again*)
   178 (*TODO: remove when multiset is of sort ord again*)
   172 instantiation multiset :: (order) ordered_ab_semigroup_add
   179 instantiation multiset :: (order) ordered_ab_semigroup_add
   173 begin
   180 begin
   174 
   181 
   175 definition less_multiset :: "'a::order multiset \<Rightarrow> 'a multiset \<Rightarrow> bool" where
   182 definition less_multiset :: "'a::order multiset \<Rightarrow> 'a multiset \<Rightarrow> bool" where
   176   "M' < M \<longleftrightarrow> M' #<# M"
   183   "M' < M \<longleftrightarrow> M' #\<subset># M"
   177 
   184 
   178 definition less_eq_multiset :: "'a multiset \<Rightarrow> 'a multiset \<Rightarrow> bool" where
   185 definition less_eq_multiset :: "'a multiset \<Rightarrow> 'a multiset \<Rightarrow> bool" where
   179    "(M'::'a multiset) \<le> M \<longleftrightarrow> M' #<=# M"
   186    "(M'::'a multiset) \<le> M \<longleftrightarrow> M' #\<subseteq># M"
   180 
   187 
   181 instance
   188 instance
   182   by standard (auto simp add: less_eq_multiset_def less_multiset_def multiset_order.less_le_not_le add.commute multiset_order.add_right_mono)
   189   by standard (auto simp add: less_eq_multiset_def less_multiset_def multiset_order.less_le_not_le add.commute multiset_order.add_right_mono)
   183 end
   190 end
   184 
   191