src/HOL/Lattices.thy
changeset 46557 ae926869a311
parent 46553 50a7e97fe653
child 46631 2c5c003cee35
equal deleted inserted replaced
46556:2848e36e0348 46557:ae926869a311
   699 end
   699 end
   700 
   700 
   701 instance "fun" :: (type, boolean_algebra) boolean_algebra proof
   701 instance "fun" :: (type, boolean_algebra) boolean_algebra proof
   702 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)+
   702 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 
   703 
   704 
       
   705 subsection {* Unary and binary predicates as lattice *}
       
   706 
       
   707 lemma inf1I [intro!]: "A x \<Longrightarrow> B x \<Longrightarrow> (A \<sqinter> B) x"
       
   708   by (simp add: inf_fun_def)
       
   709 
       
   710 lemma inf2I [intro!]: "A x y \<Longrightarrow> B x y \<Longrightarrow> (A \<sqinter> B) x y"
       
   711   by (simp add: inf_fun_def)
       
   712 
       
   713 lemma inf1E [elim!]: "(A \<sqinter> B) x \<Longrightarrow> (A x \<Longrightarrow> B x \<Longrightarrow> P) \<Longrightarrow> P"
       
   714   by (simp add: inf_fun_def)
       
   715 
       
   716 lemma inf2E [elim!]: "(A \<sqinter> B) x y \<Longrightarrow> (A x y \<Longrightarrow> B x y \<Longrightarrow> P) \<Longrightarrow> P"
       
   717   by (simp add: inf_fun_def)
       
   718 
       
   719 lemma inf1D1: "(A \<sqinter> B) x \<Longrightarrow> A x"
       
   720   by (simp add: inf_fun_def)
       
   721 
       
   722 lemma inf2D1: "(A \<sqinter> B) x y \<Longrightarrow> A x y"
       
   723   by (simp add: inf_fun_def)
       
   724 
       
   725 lemma inf1D2: "(A \<sqinter> B) x \<Longrightarrow> B x"
       
   726   by (simp add: inf_fun_def)
       
   727 
       
   728 lemma inf2D2: "(A \<sqinter> B) x y \<Longrightarrow> B x y"
       
   729   by (simp add: inf_fun_def)
       
   730 
       
   731 lemma sup1I1 [intro?]: "A x \<Longrightarrow> (A \<squnion> B) x"
       
   732   by (simp add: sup_fun_def)
       
   733 
       
   734 lemma sup2I1 [intro?]: "A x y \<Longrightarrow> (A \<squnion> B) x y"
       
   735   by (simp add: sup_fun_def)
       
   736 
       
   737 lemma sup1I2 [intro?]: "B x \<Longrightarrow> (A \<squnion> B) x"
       
   738   by (simp add: sup_fun_def)
       
   739 
       
   740 lemma sup2I2 [intro?]: "B x y \<Longrightarrow> (A \<squnion> B) x y"
       
   741   by (simp add: sup_fun_def)
       
   742 
       
   743 lemma sup1E [elim!]: "(A \<squnion> B) x \<Longrightarrow> (A x \<Longrightarrow> P) \<Longrightarrow> (B x \<Longrightarrow> P) \<Longrightarrow> P"
       
   744   by (simp add: sup_fun_def) iprover
       
   745 
       
   746 lemma sup2E [elim!]: "(A \<squnion> B) x y \<Longrightarrow> (A x y \<Longrightarrow> P) \<Longrightarrow> (B x y \<Longrightarrow> P) \<Longrightarrow> P"
       
   747   by (simp add: sup_fun_def) iprover
       
   748 
       
   749 text {*
       
   750   \medskip Classical introduction rule: no commitment to @{text A} vs
       
   751   @{text B}.
       
   752 *}
       
   753 
       
   754 lemma sup1CI [intro!]: "(\<not> B x \<Longrightarrow> A x) \<Longrightarrow> (A \<squnion> B) x"
       
   755   by (auto simp add: sup_fun_def)
       
   756 
       
   757 lemma sup2CI [intro!]: "(\<not> B x y \<Longrightarrow> A x y) \<Longrightarrow> (A \<squnion> B) x y"
       
   758   by (auto simp add: sup_fun_def)
       
   759 
       
   760 
       
   761 no_notation
   704 no_notation
   762   less_eq  (infix "\<sqsubseteq>" 50) and
   705   less_eq  (infix "\<sqsubseteq>" 50) and
   763   less (infix "\<sqsubset>" 50) and
   706   less (infix "\<sqsubset>" 50) and
   764   inf  (infixl "\<sqinter>" 70) and
   707   inf  (infixl "\<sqinter>" 70) and
   765   sup  (infixl "\<squnion>" 65) and
   708   sup  (infixl "\<squnion>" 65) and
   766   top ("\<top>") and
   709   top ("\<top>") and
   767   bot ("\<bottom>")
   710   bot ("\<bottom>")
   768 
   711 
   769 end
   712 end
   770