src/HOL/Lattices.thy
changeset 46884 154dc6ec0041
parent 46882 6242b4bc05bc
child 49769 c7c2152322f2
equal deleted inserted replaced
46883:eec472dae593 46884:154dc6ec0041
   660 lemma sup_apply [simp] (* CANDIDATE [code] *):
   660 lemma sup_apply [simp] (* CANDIDATE [code] *):
   661   "(f \<squnion> g) x = f x \<squnion> g x"
   661   "(f \<squnion> g) x = f x \<squnion> g x"
   662   by (simp add: sup_fun_def)
   662   by (simp add: sup_fun_def)
   663 
   663 
   664 instance proof
   664 instance proof
   665 qed (simp_all add: le_fun_def inf_apply sup_apply)
   665 qed (simp_all add: le_fun_def)
   666 
   666 
   667 end
   667 end
   668 
   668 
   669 instance "fun" :: (type, distrib_lattice) distrib_lattice proof
   669 instance "fun" :: (type, distrib_lattice) distrib_lattice proof
   670 qed (rule ext, simp add: sup_inf_distrib1 inf_apply sup_apply)
   670 qed (rule ext, simp add: sup_inf_distrib1)
   671 
   671 
   672 instance "fun" :: (type, bounded_lattice) bounded_lattice ..
   672 instance "fun" :: (type, bounded_lattice) bounded_lattice ..
   673 
   673 
   674 instantiation "fun" :: (type, uminus) uminus
   674 instantiation "fun" :: (type, uminus) uminus
   675 begin
   675 begin
   698 instance ..
   698 instance ..
   699 
   699 
   700 end
   700 end
   701 
   701 
   702 instance "fun" :: (type, boolean_algebra) boolean_algebra proof
   702 instance "fun" :: (type, boolean_algebra) boolean_algebra proof
   703 qed (rule ext, simp_all add: inf_apply sup_apply bot_apply top_apply uminus_apply minus_apply inf_compl_bot sup_compl_top diff_eq)+
   703 qed (rule ext, simp_all add: inf_compl_bot sup_compl_top diff_eq)+
   704 
   704 
   705 
   705 
   706 subsection {* Lattice on unary and binary predicates *}
   706 subsection {* Lattice on unary and binary predicates *}
   707 
   707 
   708 lemma inf1I: "A x \<Longrightarrow> B x \<Longrightarrow> (A \<sqinter> B) x"
   708 lemma inf1I: "A x \<Longrightarrow> B x \<Longrightarrow> (A \<sqinter> B) x"