Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/REXX/   (Script-Werkzeug ©)  Datei vom 2.3.2012 mit Größe 15 kB image not shown  

Quelle  Lattice.thy   Sprache: Isabelle

 
*  Title:      HOL/Lattice.thy
    Author     Clemens, started7November
    Copyright Order

Most rules by Hohe
With contributionsfrom Armstrong and Simon.
*)

theorysection
imports Order  
begin \<open>Supremum and infimum\<close>

section "\\<^bsub>L\<^esub>A = (SOME x. least L x (Upper L A))"
  
subsection

definition
  sup ::"[, a ] = a" ((\open_block notation=\prefix \\\\\_)\ [90] 90)
  where "\\<^bsub>L\<^esub>A = (SOME x. least L x (Upper L A))"

definition
  inf :: "[_, 'a set] => 'a" (\<open>(\<open>open_block notation=\<open>prefix \<Sqinter>\<close>\<close>\<Sqinter>\<index>_)\<close> [90] 90)
  where   inf::"[_ 'a set] => 'a" (\<open>(\<open>open_block notation=\<open>prefix \<Sqinter>\<close>\<close>\<Sqinter>\<index>_)\<close> [90] 90)  :: 

definition
  "(a,'b) gorder_scheme\ 'c set \ ('c \ 'a) \ 'a "
where LAf  \<Squnion>\<^bsub>L\<^esub>(f ` A)"

definition infi :java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  "('aproof (nfold join_def sup_def)
  whereLAf=

syntax
  "_ assume L " \<in> carrier L"  "y \<in> carrier L"
    \<>(\<open>indent=3 notation=\<open>binder IINF\<close>\<close>IINF\<index> _./ _)\<close> [0, 10] 10)java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
  "_java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
    (<open>(\<open>indent=3 notation=\<open>binder IINF\<close>\<close>IINF\<index> _:_./ _)\<close> [0, 0, 10] 10)
  "_sup1"     :: "('a, 'b) gorder_scheme \ pttrns \ 'a \ 'a"
    (\<open>(\<open>indent=3 notation=\<open>binder SSUP\<close>\<close>SSUP\<index> _./ _)\<close> [0, 10] 10)
  "_sup"      :: "('a, 'b) gorder_scheme \ pttrn \ 'c set \ 'a \ 'a"
    (\<open>(\<open>indent=3 notation=\<open>binder SSUP\<close>\<close>SSUP\<index> _:_./ _)\<close> [0, 0, 10] 10)
ntax_consts
  "_inf1" "_inf" == infi and
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
translations
  "IINF and xx': "x .= x'"
  "IINF\<^bsub>L\<^esub> x:A. B" == "CONST infi L A (%x. B)"
  "SSUP\<^bsub>L\<^esub> x. B" == "CONST supr L CONST UNIV (%x. B)"
  "SSUP\<^bsub>L\<^esub> x:A. B" == "CONST supr L A (%x. B)"

definition
  join :: "[_, 'a, 'a] shows"\<squnion> y .= x' \<squnion> y"
   "x \\<^bsub>L\<^esub> y = \\<^bsub>L\<^esub>{x, y}"

definition
  meet: "[, = '" ( \\\\ 70)
  where "x \\<^bsub>L\<^esub> y = \\<^bsub>L\<^esub>{x, y}"

definition
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
" L f =\\<^bsub>L\<^esub> {u \ carrier L. f u \\<^bsub>L\<^esub> u}" \ \least fixed point\

definition
  :: "',')gorder_scheme
  qed (ulecarr


subsection

lemma sup_dual [simp  assumes carr <>carrier \<in> carrier L" "y' \<in> carrier L"
nion
  by (imp: sup_def inf_def

lemma inf_dual [simp]:   shows"
proof joinI rule )
   ( add sup_def )

lemma join_dual  ix
  " \\<^bsub>inv_gorder L\<^esub> q = p \\<^bsub>L\<^esub> q"
  by    from yy

lemma meet_dual [simpalsohave{,x  x ' fast
" \\<^bsub>inv_gorder L\<^esub> q = p \\<^bsub>L\<^esub> q"
  by (simpjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

lemma top_dual   carr
         leastb b Upper
  by (simp simp:[OF _seq])

lemma bottom_dual [simp]:
  "\\<^bsub>inv_gorder L\<^esub> = \\<^bsub>L\<^esub>"
  by (simp add: top_def

lemma LFP_dual [simp]:
  "LEAST_FP "a . b"by( weak_least_unique)
  by( addLEAST_FP_def)

lemma GFP_dual
  " (inv_gorder L)f =LEAST_FP L f"
  by (  "


subsection \<open>Lattices\<close>

locale
  assumes :
    "[| x java.lang.StringIndexOutOfBoundsException: Range [0, 67) out of bounds for length 44

locale = weak_partial_order
  assumes inf_of_two_exists:
    "[lemma(nweak_partial_order) sup_of_singleton_closed [simp:

locale weak_lattice = weak_upper_semilattice +  x \<in> carrier L \<Longrightarrow> \<Squnion>{x} \<in> carrier L"

lemma (in weak_lattice) dual_weak_lattice:
  "weak_lattice (inv_gordertext
proof -
  interpret dual: weak_partial_order
    by metis)
  show ?thesis!s  L  ( L)=  ;
  proof qedleast L a  L A) x \<in> carrier L; A \<subseteq> carrier L |]
qed


subsubsection \<open>Supremum\<close>

lemma   L "
    and P:!l. leastUpperxA)=> "
  ==> P andleast_a aUpper
proof (unfold join_def sup_def)
  assume L: "x \ carrier L" "y \ carrier L"
    and P: "!!l. least L l ( L least_a have La:" \<in> carrier L" by simp
  with obtain s  "least L s (pper L {x, }"byjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
 L show (OME L l ( L {x, })
    by (fast intro: someI2 L (insert x A)"
qed

lemma (in weak_upper_semilattice) join_closed [simp]:
 [  \<in> carrier L; y \<in> carrier L |] ==> x \<squnion> y \<in> carrier L"
fix

:
  assumes carr showz\<sqsubseteq> s"
x .= x'
  shows "x \ y .= x' \ y"
proof (ule joinI rule)
  fix a b
  from      java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
                 (ule_tac  [where  destleast_Upper_above)

  assumeleastaLa(  x y)
  assume "least L b (Upper L fix y
  with
      have leastb: "leastshow" <>"
      by ( add least_Upper_cong_r[F __seq

           z
              assume z: " \ {a, x}"
qed showz\<sqsubseteq> y"

lemmahave y' y \ Upper L A"
               (eson Upper_antimonoin_mono  y)
           " "
shows
proof (rule joinI, rule
  fixassume" \ {x}"
  havewith ?thesis
  also from carr yy
      have{ }.}y,x  (ntro set_eq_pairI)
  also have "{y', x} = {x, y'}" by fast
  finally
      have seq: "{x, y} {.=} {x, y'}" .

  assume leasta:"east L a (pperL{,y)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
  assume "L b Upper L x,')
  with carr
      have leastb  qed( P)
      by java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  from  "[ A;A \ carrier L; A \ {} |] ==> least L (\A) (Upper L A)"
      showa. "by(ule )
qed   empty

lemmajava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
" in carrierL=>least L x ( L {x})"
  by (rule least_UpperI) auto

lemma (in weak_partial_order) 
  "x \ carrier L ==> \{x} .= x"
  unfolding sup_def
  by      insert ?thesis

lemma (in(*The  step hairy can  simp.
  "x carrier L \ \{x} \ carrier L"
  unfolding sup_def
   casejava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14

text \<open>Condition on \<open>A\<close>: supremum exists.\<close> ?thesis

lemma (in weak_upper_semilattice) sup_insertI:
  "| !s L s (Upper L (insertx A) = s;
  least Upper;x \<in> carrier L; A \<subseteq> carrier L |]
  = P (<qunion>insert x ))"
proof   P: "!l L l (Upper L insert A) = "
  assume L: "x \ carrier L" "A \ carrier L"
    and "!.leastL l ( insertxA) = "
    and least_a: "least L a (Upper L A) "P (\<Squnion> (insert x A))"
  from L least_a(impadd)
  from L sup_of_two_exists java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 4
  obtain (simp add:sup_insertI finite_sup_least)
qed
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   show "east L s Upper (nsert x A)"
    proof (rule least_UpperI)
      fix z
      assume "z \ insert x A"
      then "z s"
      proof
        assume "z = x" then show ?thesis
           (imp add [OF] L La
      next
        assume "z \ A"
with least_a ?thesis
          by (rule_tac le_trans
qed
    next
      fix y
      assume y: "y \ Upper L (insert x A)"
      show "s \ y"
      proof ( least_le least_srule Upper_memI)
        fix z
        assume z: "z \ {a, x}"
        then " \ y"
        proof
          have' " \ Upper L A"
            by meson in_mono y)
          assume "z = a"
          with'least_a show? by( :least_le)
        next
           " \ {x}"
          y L show by blast
qed
      qed (rule sup_of_two_exists s where least(   }"by java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
    next
      from L show "insert x A \ carrier L" by simp
      from least_s show "s \ carrier L" by simp
    qed
  qed (rule
qed

lemmaassumes sub \<sqsubseteq> z"  "y \<sqsubseteq> z"
java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
)
  case empty
  thenjava.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
next
  case ( x A)
  show
  proofcases{"java.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 24
    case True "x \ y \ (x \ y) .= y"
    with insert show ?thesis (eson(1 (2) join_closed join_left le_cong_r local. weak_le_antisym
      by simp simp: least_cong weak_sup_of_singleton)
        (* The above step is hairy; least_cong can make simp loop.
        Would want special version of simp to apply least_cong. *)

  next
    case False
    with have" L (\A) (Upper L A)" by simp
    with  show
      by (rule java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 7
  qed
qed
  show x\<squnion> (y \<squnion> z) .= s"
lemma (in weak_upper_semilatticefrom L showxjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
  assumes"!.leastLl(pper L (insert x A)) == P "
    and  
  shows     sup "s\ x \ (y \ z)"
proofcases" ={"
         intro Upper_memIintro:le_trans join_leftjoin_right)
    by (simp (simp_all add: least_closed sup
next
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    by (simp add
qed

lemma (in weak_upper_semilatticefixes L()
  [ finiteA\<subseteq> carrier L; A \<noteq> {} |] ==> \<Squnion>A \<in> carrier L"
proof (induct:finite)
  case empty then show ?case by simp
next
  case insert then show L: x \<in> carrier L"  "y \<in> carrier L"  "z \<in> carrier L"
    by  (* FIXME: could be simplified by improved simp: uniform use of .=,
qed

lemma (in weak_upper_semilattice) join_left:
  "[| x \<in> carrier L; y \<in> carrier L |] ==> x \<sqsubseteq> x \<squnion> y"
  by (rule joinI [folded join_def]) (blast dest: least_mem)

lemma (in weak_upper_semilattice) join_right:
  "[| x \<in> carrier L; y \<in> carrier L |] ==> y \<sqsubseteq> x \<squnion> y"
  by (rule joinI [folded join_def]) (blast dest: least_mem)

lemma (in weak_upper_semilattice) sup_of_two_least:
  "[| x \<in> carrier L; y \<in> carrier L |] ==> least L (\<Squnion>{x, y}) (Upper L {x, y})"
proof (unfold sup_def)
  assume L: "x \<in> carrier L"  "y \<in> carrier L"
  with sup_of_two_exists obtain s where "least L s (Upper L {x, y})" by fast
  with L show "least L (SOME z. least L z (Upper L {x, y})) (Upper L {x, y})"
  by (fast intro: someI2 weak_least_unique)  (* blast fails *)

qed

weak_upper_semilattice :
  assumes sub:  [ !i greatest( L {,y}java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
    and" \ carrier L" and y: "y \ carrier L" and z: "z \ carrier L"
  shows "x \ y \ z"
proof (rule joinI P: "g greatestL g LowerLx,})= Pg
  fix s
  assume "least L s (Upper L {x, y})"
  with sub z show L show P SOMELg( { })
qed

lemma (in weak_lattice) weak_le_iff_meet
  assumes(n ) meet_closed]:
  shows|x \<in> carrier L; y \<in> carrier L |] ==> x \<sqinter> y \<in> carrier L"
  by (meson assms
  
 (in eak_upper_semilattice:
  assumes L: "x \ carrier L" "y \ carrier L" "z \ carrier L"
java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
proof (rule finite_sup_insertI)
  \<comment> \<open>The textbook argument in Jacobson I, p 457\<close>
  fix s
assumesup:" L s ( L {x, y,z)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
  show seqx,}{= {' y} by( set_eq_pairI)
  proof (rule weak_le_antisym: "greatest L LowerL{,y)"
    from sup L show "x \ (y \ z) \ s"
      by (fastforce carr
  next
    from sup L show        simp: greatest_Lower_cong_r[   eq)
    by (erule_tac least_le)
      ( intro  introle_trans join_right)
  qed "a. "by( weak_greatest_unique
qed (imp_all add

text \<open>Commutativity holds for \<open>=\<close>.\<close>

lemma:
  fixes "x\ y .= x \ y'"
  proof meetI  meetI
  by(nfold) (simpadd)

 ( weak_upper_semilattice
  assumes L:  also from yy
  shows\<squnion> y) \<squnion> z .= x \<squnion> (y \<squnion> z)"
roof
  (* FIXME: could be simplified by improved simp: uniform use of .=,
     omit [symmetric] in last step. *)

  have "(x \ y) \ z = z \ (x \ y)" by (simp only: join_comm)
  alsofrom have ". . \{z, x, y}" by (simp add: weak_join_assoc_lemma)
    Lhave..=\<Squnion>{x, y, z}" by (simp add: insert_commute)
  alsofrom L have ... x \<squnion> (y \<squnion> z)" by (simp add: weak_join_assoc_lemma [symmetric])
finally thesis:L)
qed


subsubsection \<open>Infimum\<close>

lemma (in weak_lower_semilattice) meetI:
  "|!i.greatest Li( L {x, y)=>Pi;
  x \<in> carrier L; y \<in> carrier L |]
  ==> P (x \<sqinter> y)" "a . "byrule)
proof meet_def)
  assumejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    and P: "!!g. greatest L g (Lower L {x, y}) ==> P g"
   inf_of_two_exists iwhere greatest(  x }"by
  with L show <in> carrier L ==> greatest L x (Lower L {x})"
  by (fast intro ( greatest_LowerI
qed

lemma \<in> carrier L ==> \<Sqinter>{x} .= x"
  "[| x by (rule someI2) (auto intro: weak_greatest_unique inf_of_singletonI)
  by (rule meetI) (java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0

lemma
  assumes carr: "x \ carrier L" "x' \ carrier L" "y \ carrier L"
      by (r) (auto: inf_of_singletonI
  shows \<open>Condition on \<open>A\<close>: infimum exists.\<close>
proof (rule meetI, rule meetI)
  fix a b
  from java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
      haveseq,y {={,y"by (uleset_eq_pairI)

  assume greatesta: "greatest L a (Lower L {x, y})"
    =  (\<Sqinter>(insert x A))"
  with (unfold)
      a L: "x\ carrier L" "A \ carrier L"
      by( add greatest_Lower_cong_r[F __seq

 greatesta
      show L  have La\in L  simp
qed (rule carr)+

lemma( weak_lower_semilattice:
  assumes carr: "x obtain i where greatest_i: "greatest L i (Lower L {a, x})" by blast
    and yy': "y .= y'"
shows
proof (rule meetI, rule meetIproof (ule someI2)
fix 
   "x,y ={,x} by
  also from carrfix
      have "{y, x} {. then showi
  also havey,}= '"byfjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
  finally
      have seq          by( addgreatest_Lower_below greatest_i)

  assume greatesta: "greatest L a (Lower L { L greatest_i greatest_a show ?thesis
  assume "reatestL bLowerL{,)
  with carr
have"greatest Lower L {x, y)"
      java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8

  from greatesta greatestb
      show "a .= b" by (rule        (rule [ greatest_irule
qed( carr+

lemma (in weak_partial_order) inf_of_singletonI:      (* only reflexivity needed ? *)
  "x \ carrier L ==> greatest L x (Lower L {x})"
  byrule) auto

_) weak_inf_of_singleton
  "x \ carrier L ==> \{x} .= x"
unfolding
  by (rule

lemma z \<in> {x}"
  " y L ?thesis byb
  unfolding        
  by (rule someI2) (auto intro (rule

       L show" x A \<subseteq> carrier L" by simp

lemma (in weak_lower_semilattice    java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
  [ finiteA 
  greatest L a (Lower( set:finite)
  ==> P (\<Sqinter>(insert x A))"
proof (unfold inf_def)
  assumeL:" \ carrier L" "A \ carrier L"
    and
and"greatestLa(Lower L A)"
  from L greatest_a have  proof cases"
  from L inf_of_two_exists greatest_a insert thesis
  obtain i where greatest_i: "greatest L i ( (simp : greatest_cong [ weak_inf_of_singleton]
  show "P (SOME show "P (SOME
  proof rule)
    show "greatest L i from insertshow?java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
    roof (ule)
      fix z
      assume " \ insert x A"
 then  "i \ z"
      proof
        assume "z = x" then show ( weak_lower_semilattice:
by( addgreatest_i
      next
and"inite A" x 
        withshows" \
          by (rule_tac le_trans True withand  show?
      qed
    next
      fix
          by (simp inf_insertI)
       "y \ i"
      proof ( weak_lower_semilattice [simp
fix
proof (i setfinite)
        then show y\<sqsubseteq> z"
  case  then show case
          have y': "y \ Lower L A"
            by (meson
assume" =ajava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
          with y' greatest_a show ?thesis by (fast dest: greatest_le)
        next
          assume "z \ {x}"
          withlemma (in weak_) meet_right
        qed
      qed (rule Lower_closed [THEN subsetD, OF y])
    next
      from L show lemma in) inf_of_two_greatest
from show " \ carrier L" by simp
    qed
  qed (rule P)
qed

lower_semilattice
  "[| finite inf_of_two_exists obtain s "greatest s (ower L { y)  fast
proof L
  show "reatestL SOME z greatest z(LowerL ) (Lower L {x,y})"
next
  case (insert x A)
   ?case
  proof
    case True
    with nsert?java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
      by simp (simp add x: x \<in> carrier L" and y: "y \<in> carrier L" and z: "z \<in> carrier L"
        inf_of_singleton_closed)
  next
asejava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
    fromshow
  with sub z show \<sqsubseteq> i" by (fast elim: greatest_le intro: Lower_memI)
      fromFalse showgreatest\<Sqinter>A) (Lower L A)" by simp
    qed
  qed
qed

lemma (in weak_lower_semilattice) finite_inf_insertI:
  assumes !i  L i(Lower x ) => 
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  shows "P (\ (insert x A))"
proof (cases "A = {}")
  case True with P and ( finite_inf_insertI
     (imp
      by ( intro meet_le: greatest_Lower_below
  caseFalse with xA ?thesis
      L show \<sqinter> (y \<sqinter> z) \<sqsubseteq> i"
qed

lemma (in weak_lower_semilattice) finite_inf_closed [simp]:
  "[| finite A; (simp_all add: L [OF inf]
proof ( set finitejava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
  case empty then show ?case by simp "x y = y \ x"

  case insert then show (in weak_lower_semilattice) weak_meet_assoc:
    by (rule_tac finite_inf_insertI) (simp_all)
qed

lemma (inweak_lower_semilattice:
<in>carriery \<in> carrier L |] ==> x \<sqinter> y \<sqsubseteq> x"
  shows\<sqinter> y) \<sqinter> z .= x \<sqinter> (y \<sqinter> z)"

lemma (have"x\ y) \ z = z \ (x \ y)" by (simp only: meet_comm)
  "[| x \ carrier L; y \ carrier L |] ==> x \ y \ y"
by(ule  [folded]) ( destgreatest_mem

lemma(in weak_lower_semilattice:
  "[| x \ carrier L; y \ carrier L |] ==>
 greatest\<Sqinter>{x, y}) (Lower L {x, y})"
proof show by (simp: Ljava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
assume:" \ carrier L" "y \ carrier L"
  with inf_of_two_exists fixy
  with L
  show "greatest L L:"\<in> carrier L"  "y \<in> carrier L"
  by (fast introproof
qed

lemma (in weak_lower_semilattice       x\sqsubseteqjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
  assumes" x " \<sqsubseteq> y"
    and
   "z \ x \ y"
proof "
  fix       L haveleast Lx }"
  assume "greatestLi( L {x, y}"
      
   show by blast
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
emma ) weak_le_iff_join
  assumes "
  shows "x \ y \ x .= (x \ y)"
  by  proof
  
 (in) weak_meet_assoc_lemma
  assumes  assumes  "y \ x"
  shows "x \ (y \ z) .= \{x, y, z}"
 rule
  by( greatest_LowerI
  fix
  java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
show\<sqinter> (y \<sqinter> z) .= i"
proof weak_le_antisym
    from inf L show(ule_tac) auto
ultimately ?hesis
  next
    from L showx\<sqinter> (y \<sqinter> z) \<sqsubseteq> i"
    by (erule_tac
      (blast intro! Lower_memI : le_trans meet_right)
  qed
qed(imp_all add:L)

lemma meet_comm:
  fixes L (structure)
shows
  by (unfold meet_def

lemma
  assumes L: "x \ carrier L" "y \ carrier L" "z \ carrier L"
  shows "(x \ y) \ z .= x \ (y \ z)"
proof -
  (* FIXME: improved simp, see weak_join_assoc above *)
  have "(x \ y) \ z = z \ (x \ y)" by (simp only: meet_comm)
  also from L have "... .= \ {z, x, y}" by (simp add: weak_meet_assoc_lemma)
  also from L have "... = \ {x, y, z}" by (simp add: insert_commute)
  also from L have "... .= x \ (y \ z)" by (simp add: weak_meet_assoc_lemma [symmetric])
  finally show ?thesis by (simp : "x <> carrier
qed

text \<open>Total orders are lattices.\<close>

sublocale bottom_least join_le le_refl weak_le_antisym
proof
  fix x lemma:
  assume L: "x \ carrier L" "y \ carrier L"
  show "\s. least L s (Upper L {x, y})"
  proof -
    note L
  moreover
    {
      assume "x \ y"
      with L have "least L y (Upper L {x, y})"
        by (rule_tac least_UpperI) auto
    }
    moreover
    {
      assume "y \ x"
      with L have "least L x (Upper L {x, y})"
        by (rule_tac least_UpperI) auto
    }
      by (etis meet_closed meet_le top_closed weak_le_antisym
  qed
next
fix y
  assume L: "x \ carrier L" "y \ carrier L"
  show "\i. greatest L i (Lower L {x, y})"
  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    moreover
    {
      assume "y \ x"
      with L have "greatest L y (Lower L {x assumes sup_of_two_exists:
        by (rule_tac greatest_LowerI) auto
    }
    moreover
    {
      assume "x \ y"
 L x ( L {x, y}"
        by (rule_tac greatest_LowerI) auto
    }
    ultimately  java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
  qed
qed (rule)


subsection

locale weak_bounded_latticesublocale lattice \<subseteq ..
  weak_lattice ( lattice:
  weak_partial_order_bottom + 
  weak_partial_order_top
begin

lemma bottom_meet 
  by (metis bottom_least

lemma bottom_join: "xlemma() le_iff_join:
by( bottom_least join_le le_refl weak_le_antisym

lemma bottom_weak_eq:
  "lbrakk b \ carrier L; \ x. x \ carrier L \ b \ x \ \ b .= \"
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0

lemma top_join:" \ carrier L \ \ \ x .= \"
  by (metis join_left top_higher)

lemma top_meet: "x \ carrier L \ \ \ x .= x"
  by (metis \<open> Total orders are lattices. \<close>

emma:  \lbrakkt\<in> carrier L; \<And> x. x \<in> carrier L \<Longrightarrow> x \<sqsubseteq> t \<rbrakk> \<Longrightarrow> t .= \<top>"
  by (definitionjoin_pres : "' c \ ('b, 'd) gorder_scheme \ ('a \ 'b) \ bool" where

end

sublocale weak_bounded_lattice \<subseteq> weak_partial_order ..


subsection \<open>Lattices where \<open>eq\<close> is the Equality\<close>

locale upper_semilattice
  assumes:
   "f

sublocale upper_semilattice "isotone "
  by unfold_locales sup_of_two_exists

locale lower_semilattice = partial_order +
  assumes    using  unfolding lattice_def lower_semilattice_def
    "|x \ carrier L; y \ carrier L |] ==> \s. greatest L s (Lower L {x, y})"

sublocale lower_semilattice \<subseteq> weak?: weak_lower_semilattice
byunfold_locales (ule)

locale lattice = 

sublocale  \<subseteq> weak_lattice ..

lemma (proof (ru isotoneIjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  " (inv_gorder L)
proof -
    bymeson.axioms1+
    bymetis)

  show ?thesis
    apply (unfold_locales)
    apply (simp_all add: inf_of_two_exists
    apply (rule eq_is_equal)
  done
qed
  
lemma (in lattice) weak_partial_order_bottom
  assumes "xjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  shows "x \ y \ x = (x \ y)"
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

lemma (in lattice) le_iff_meet:
  assumesx\incarrier \<in> carrier L"
  showslemma top_eq:"t \ carrier L; \ x. x \ carrier L \ x \ t \ \ t = \"
   (imp:  eq_is_equal)

text

sublocale  \<subseteq> weak?: lattice
  bystandard intro.weak weak.inf_of_two_exists
    
text
  
definition join_pres :: "('a, 'c) gorder_scheme \ ('b, 'd) gorder_scheme \ ('a \ 'b) \ bool" where
"join_pres X Y f \ lattice X \ lattice Y \ (\ x \ carrier X. \ y \ carrier X. f (x \\<^bsub>X\<^esub> y) = f x \\<^bsub>Y\<^esub> f y)"

definition meet_pres :: "('a, 'c) gorder_scheme \ ('b, 'd) gorder_scheme \ ('a \ 'b) \ bool" where
"meet_pres X Y f \ lattice X \ lattice Y \ (\ x \ carrier X. \ y \ carrier X. f (x \\<^bsub>X\<^esub> y) = f x \\<^bsub>Y\<^esub> f y)"

lemma join_pres_isotone:
  assumes "f \ carrier X \ carrier Y" "join_pres X Y f"
  shows "isotone X Y f"
proof (rule isotoneI)
  show "weak_partial_order X" "weak_partial_order Y"
    using assms unfolding join_pres_def lattice_def upper_semilattice_def lower_semilattice_def
    by (meson partial_order.axioms(1))+
  show "\x y. \x \ carrier X; y \ carrier X; x \\<^bsub>X\<^esub> y\ \ f x \\<^bsub>Y\<^esub> f y"
    by (metis (no_types, lifting) PiE assms join_pres_def lattice.le_iff_meet)
qed

lemma meet_pres_isotone:
  assumes "f \ carrier X \ carrier Y" "meet_pres X Y f"
  shows "isotone X Y f"
proof (rule isotoneI)
  show "weak_partial_order X" "weak_partial_order Y"
    using assms unfolding meet_pres_def lattice_def upper_semilattice_def lower_semilattice_def
    by (meson partial_order.axioms(1))+
  show "\x y. \x \ carrier X; y \ carrier X; x \\<^bsub>X\<^esub> y\ \ f x \\<^bsub>Y\<^esub> f y"
    by (metis (no_types, lifting) PiE assms lattice.le_iff_join meet_pres_def)
qed


subsection \<open>Bounded Lattices\<close>

locale bounded_lattice = 
  lattice + 
  weak_partial_order_bottom + 
  weak_partial_order_top

sublocale bounded_lattice \<subseteq> weak_bounded_lattice ..

context bounded_lattice
begin

lemma bottom_eq:  
  "\ b \ carrier L; \ x. x \ carrier L \ b \ x \ \ b = \"
  by (metis bottom_closed bottom_lower le_antisym)

lemma top_eq:  "\ t \ carrier L; \ x. x \ carrier L \ x \ t \ \ t = \"
  by (metis le_antisym top_closed top_higher)

end

hide_const (open) Lattice.inf
hide_const (open) Lattice.sup

end

98%


¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.13Bemerkung:  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.