src/HOLCF/Porder.thy
changeset 40436 adb22dbb5242
parent 40433 3128c2a54785
child 40771 1c6f7d4b110e
equal deleted inserted replaced
40435:a26503ac7c87 40436:adb22dbb5242
    13 class below =
    13 class below =
    14   fixes below :: "'a \<Rightarrow> 'a \<Rightarrow> bool"
    14   fixes below :: "'a \<Rightarrow> 'a \<Rightarrow> bool"
    15 begin
    15 begin
    16 
    16 
    17 notation
    17 notation
    18   below (infixl "<<" 55)
    18   below (infix "<<" 50)
    19 
    19 
    20 notation (xsymbols)
    20 notation (xsymbols)
    21   below (infixl "\<sqsubseteq>" 55)
    21   below (infix "\<sqsubseteq>" 50)
    22 
    22 
    23 lemma below_eq_trans: "\<lbrakk>a \<sqsubseteq> b; b = c\<rbrakk> \<Longrightarrow> a \<sqsubseteq> c"
    23 lemma below_eq_trans: "\<lbrakk>a \<sqsubseteq> b; b = c\<rbrakk> \<Longrightarrow> a \<sqsubseteq> c"
    24   by (rule subst)
    24   by (rule subst)
    25 
    25 
    26 lemma eq_below_trans: "\<lbrakk>a = b; b \<sqsubseteq> c\<rbrakk> \<Longrightarrow> a \<sqsubseteq> c"
    26 lemma eq_below_trans: "\<lbrakk>a = b; b \<sqsubseteq> c\<rbrakk> \<Longrightarrow> a \<sqsubseteq> c"
    60 context po
    60 context po
    61 begin
    61 begin
    62 
    62 
    63 subsection {* Upper bounds *}
    63 subsection {* Upper bounds *}
    64 
    64 
    65 definition is_ub :: "'a set \<Rightarrow> 'a \<Rightarrow> bool" (infixl "<|" 55) where
    65 definition is_ub :: "'a set \<Rightarrow> 'a \<Rightarrow> bool" (infix "<|" 55) where
    66   "S <| x \<longleftrightarrow> (\<forall>y\<in>S. y \<sqsubseteq> x)"
    66   "S <| x \<longleftrightarrow> (\<forall>y\<in>S. y \<sqsubseteq> x)"
    67 
    67 
    68 lemma is_ubI: "(\<And>x. x \<in> S \<Longrightarrow> x \<sqsubseteq> u) \<Longrightarrow> S <| u"
    68 lemma is_ubI: "(\<And>x. x \<in> S \<Longrightarrow> x \<sqsubseteq> u) \<Longrightarrow> S <| u"
    69   by (simp add: is_ub_def)
    69   by (simp add: is_ub_def)
    70 
    70 
    92 lemma is_ub_upward: "\<lbrakk>S <| x; x \<sqsubseteq> y\<rbrakk> \<Longrightarrow> S <| y"
    92 lemma is_ub_upward: "\<lbrakk>S <| x; x \<sqsubseteq> y\<rbrakk> \<Longrightarrow> S <| y"
    93   unfolding is_ub_def by (fast intro: below_trans)
    93   unfolding is_ub_def by (fast intro: below_trans)
    94 
    94 
    95 subsection {* Least upper bounds *}
    95 subsection {* Least upper bounds *}
    96 
    96 
    97 definition is_lub :: "'a set \<Rightarrow> 'a \<Rightarrow> bool" (infixl "<<|" 55) where
    97 definition is_lub :: "'a set \<Rightarrow> 'a \<Rightarrow> bool" (infix "<<|" 55) where
    98   "S <<| x \<longleftrightarrow> S <| x \<and> (\<forall>u. S <| u \<longrightarrow> x \<sqsubseteq> u)"
    98   "S <<| x \<longleftrightarrow> S <| x \<and> (\<forall>u. S <| u \<longrightarrow> x \<sqsubseteq> u)"
    99 
    99 
   100 definition lub :: "'a set \<Rightarrow> 'a" where
   100 definition lub :: "'a set \<Rightarrow> 'a" where
   101   "lub S = (THE x. S <<| x)"
   101   "lub S = (THE x. S <<| x)"
   102 
   102