src/HOL/MicroJava/BV/Semilat.thy
author kleing
Fri, 14 Jun 2002 23:25:36 +0200
changeset 13214 2aa33ed5f526
parent 13077 c2e4d9990162
child 13365 a2c4faad4d35
permissions -rw-r--r--
wt_method now checks bounded+types ==> wt_kildall <=> wt_method
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12516
d09d0f160888 exceptions
kleing
parents: 11175
diff changeset
     1
(*  Title:      HOL/MicroJava/BV/Semilat.thy
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
     2
    ID:         $Id$
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
     3
    Author:     Tobias Nipkow
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
     4
    Copyright   2000 TUM
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
     5
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
     6
Semilattices
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
     7
*)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
     8
12911
704713ca07ea new document
kleing
parents: 12773
diff changeset
     9
header {* 
704713ca07ea new document
kleing
parents: 12773
diff changeset
    10
  \chapter{Bytecode Verifier}\label{cha:bv}
704713ca07ea new document
kleing
parents: 12773
diff changeset
    11
  \isaheader{Semilattices} 
704713ca07ea new document
kleing
parents: 12773
diff changeset
    12
*}
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    13
12542
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
    14
theory Semilat = While_Combinator:
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    15
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    16
types 'a ord    = "'a \<Rightarrow> 'a \<Rightarrow> bool"
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    17
      'a binop  = "'a \<Rightarrow> 'a \<Rightarrow> 'a"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    18
      'a sl     = "'a set * 'a ord * 'a binop"
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    19
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    20
consts
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    21
 "@lesub"   :: "'a \<Rightarrow> 'a ord \<Rightarrow> 'a \<Rightarrow> bool" ("(_ /<='__ _)" [50, 1000, 51] 50)
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    22
 "@lesssub" :: "'a \<Rightarrow> 'a ord \<Rightarrow> 'a \<Rightarrow> bool" ("(_ /<'__ _)" [50, 1000, 51] 50)
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    23
defs
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    24
lesub_def:   "x <=_r y == r x y"
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    25
lesssub_def: "x <_r y  == x <=_r y & x ~= y"
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    26
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    27
consts
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    28
 "@plussub" :: "'a \<Rightarrow> ('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> 'b \<Rightarrow> 'c" ("(_ /+'__ _)" [65, 1000, 66] 65)
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    29
defs
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    30
plussub_def: "x +_f y == f x y"
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    31
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    32
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    33
constdefs
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    34
 ord :: "('a*'a)set \<Rightarrow> 'a ord"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    35
"ord r == %x y. (x,y):r"
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    36
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    37
 order :: "'a ord \<Rightarrow> bool"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    38
"order r == (!x. x <=_r x) &
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    39
            (!x y. x <=_r y & y <=_r x \<longrightarrow> x=y) &
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    40
            (!x y z. x <=_r y & y <=_r z \<longrightarrow> x <=_r z)"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    41
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    42
 acc :: "'a ord \<Rightarrow> bool"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    43
"acc r == wf{(y,x) . x <_r y}"
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    44
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    45
 top :: "'a ord \<Rightarrow> 'a \<Rightarrow> bool"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    46
"top r T == !x. x <=_r T"
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    47
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    48
 closed :: "'a set \<Rightarrow> 'a binop \<Rightarrow> bool"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    49
"closed A f == !x:A. !y:A. x +_f y : A"
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    50
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    51
 semilat :: "'a sl \<Rightarrow> bool"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    52
"semilat == %(A,r,f). order r & closed A f &
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    53
                (!x:A. !y:A. x <=_r x +_f y)  &
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    54
                (!x:A. !y:A. y <=_r x +_f y)  &
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    55
                (!x:A. !y:A. !z:A. x <=_r z & y <=_r z \<longrightarrow> x +_f y <=_r z)"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    56
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    57
 is_ub :: "('a*'a)set \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> bool"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    58
"is_ub r x y u == (x,u):r & (y,u):r"
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    59
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    60
 is_lub :: "('a*'a)set \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> bool"
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    61
"is_lub r x y u == is_ub r x y u & (!z. is_ub r x y z \<longrightarrow> (u,z):r)"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    62
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    63
 some_lub :: "('a*'a)set \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> 'a"
13074
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
    64
"some_lub r x y == SOME z. is_lub r x y z";
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    65
13074
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
    66
locale semilat =
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
    67
  fixes A :: "'a set"
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
    68
    and r :: "'a ord"
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
    69
    and f :: "'a binop"
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
    70
  assumes semilat: "semilat(A,r,f)"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    71
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    72
lemma order_refl [simp, intro]:
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    73
  "order r \<Longrightarrow> x <=_r x";
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    74
  by (simp add: order_def)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    75
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    76
lemma order_antisym:
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    77
  "\<lbrakk> order r; x <=_r y; y <=_r x \<rbrakk> \<Longrightarrow> x = y"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    78
apply (unfold order_def)
13074
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
    79
apply (simp (no_asm_simp))
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    80
done
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    81
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    82
lemma order_trans:
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    83
   "\<lbrakk> order r; x <=_r y; y <=_r z \<rbrakk> \<Longrightarrow> x <=_r z"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    84
apply (unfold order_def)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    85
apply blast
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    86
done 
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    87
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    88
lemma order_less_irrefl [intro, simp]:
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    89
   "order r \<Longrightarrow> ~ x <_r x"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    90
apply (unfold order_def lesssub_def)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    91
apply blast
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    92
done 
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    93
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    94
lemma order_less_trans:
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
    95
  "\<lbrakk> order r; x <_r y; y <_r z \<rbrakk> \<Longrightarrow> x <_r z"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    96
apply (unfold order_def lesssub_def)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    97
apply blast
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    98
done 
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
    99
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   100
lemma topD [simp, intro]:
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
   101
  "top r T \<Longrightarrow> x <=_r T"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   102
  by (simp add: top_def)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   103
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   104
lemma top_le_conv [simp]:
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
   105
  "\<lbrakk> order r; top r T \<rbrakk> \<Longrightarrow> (T <=_r x) = (x = T)"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   106
  by (blast intro: order_antisym)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   107
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   108
lemma semilat_Def:
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   109
"semilat(A,r,f) == order r & closed A f & 
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   110
                 (!x:A. !y:A. x <=_r x +_f y) & 
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   111
                 (!x:A. !y:A. y <=_r x +_f y) & 
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
   112
                 (!x:A. !y:A. !z:A. x <=_r z & y <=_r z \<longrightarrow> x +_f y <=_r z)"
10918
9679326489cd renamed Product_Type.split to split_conv;
wenzelm
parents: 10797
diff changeset
   113
apply (unfold semilat_def split_conv [THEN eq_reflection])
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   114
apply (rule refl [THEN eq_reflection])
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   115
done
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   116
13074
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   117
lemma (in semilat) orderI [simp, intro]:
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   118
  "order r"
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   119
  by (insert semilat) (simp add: semilat_Def)
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   120
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   121
lemma (in semilat) closedI [simp, intro]:
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   122
  "closed A f"
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   123
  by (insert semilat) (simp add: semilat_Def)
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   124
13077
kleing
parents: 13074
diff changeset
   125
lemma closedD:
kleing
parents: 13074
diff changeset
   126
  "\<lbrakk> closed A f; x:A; y:A \<rbrakk> \<Longrightarrow> x +_f y : A"
kleing
parents: 13074
diff changeset
   127
  by (unfold closed_def) blast
kleing
parents: 13074
diff changeset
   128
kleing
parents: 13074
diff changeset
   129
lemma closed_UNIV [simp]: "closed UNIV f"
kleing
parents: 13074
diff changeset
   130
  by (simp add: closed_def)
kleing
parents: 13074
diff changeset
   131
kleing
parents: 13074
diff changeset
   132
kleing
parents: 13074
diff changeset
   133
lemma (in semilat) closed_f [simp, intro]:
kleing
parents: 13074
diff changeset
   134
  "\<lbrakk>x:A; y:A\<rbrakk>  \<Longrightarrow> x +_f y : A"
kleing
parents: 13074
diff changeset
   135
  by (simp add: closedD [OF closedI])
kleing
parents: 13074
diff changeset
   136
kleing
parents: 13074
diff changeset
   137
lemma (in semilat) refl_r [intro, simp]:
kleing
parents: 13074
diff changeset
   138
  "x <=_r x"
kleing
parents: 13074
diff changeset
   139
  by simp
kleing
parents: 13074
diff changeset
   140
kleing
parents: 13074
diff changeset
   141
lemma (in semilat) antisym_r [intro?]:
kleing
parents: 13074
diff changeset
   142
  "\<lbrakk> x <=_r y; y <=_r x \<rbrakk> \<Longrightarrow> x = y"
kleing
parents: 13074
diff changeset
   143
  by (rule order_antisym) auto
kleing
parents: 13074
diff changeset
   144
  
kleing
parents: 13074
diff changeset
   145
lemma (in semilat) trans_r [trans, intro?]:
kleing
parents: 13074
diff changeset
   146
  "\<lbrakk>x <=_r y; y <=_r z\<rbrakk> \<Longrightarrow> x <=_r z"
kleing
parents: 13074
diff changeset
   147
  by (auto intro: order_trans)    
kleing
parents: 13074
diff changeset
   148
  
kleing
parents: 13074
diff changeset
   149
kleing
parents: 13074
diff changeset
   150
lemma (in semilat) ub1 [simp, intro?]:
13074
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   151
  "\<lbrakk> x:A; y:A \<rbrakk> \<Longrightarrow> x <=_r x +_f y"
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   152
  by (insert semilat) (unfold semilat_Def, simp)
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   153
13077
kleing
parents: 13074
diff changeset
   154
lemma (in semilat) ub2 [simp, intro?]:
13074
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   155
  "\<lbrakk> x:A; y:A \<rbrakk> \<Longrightarrow> y <=_r x +_f y"
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   156
  by (insert semilat) (unfold semilat_Def, simp)
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   157
13077
kleing
parents: 13074
diff changeset
   158
lemma (in semilat) lub [simp, intro?]:
13074
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   159
 "\<lbrakk> x <=_r z; y <=_r z; x:A; y:A; z:A \<rbrakk> \<Longrightarrow> x +_f y <=_r z";
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   160
  by (insert semilat) (unfold semilat_Def, simp)
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   161
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   162
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   163
lemma (in semilat) plus_le_conv [simp]:
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   164
  "\<lbrakk> x:A; y:A; z:A \<rbrakk> \<Longrightarrow> (x +_f y <=_r z) = (x <=_r z & y <=_r z)"
13077
kleing
parents: 13074
diff changeset
   165
  by (blast intro: ub1 ub2 lub order_trans)
13074
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   166
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   167
lemma (in semilat) le_iff_plus_unchanged:
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   168
  "\<lbrakk> x:A; y:A \<rbrakk> \<Longrightarrow> (x <=_r y) = (x +_f y = y)"
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   169
apply (rule iffI)
13077
kleing
parents: 13074
diff changeset
   170
 apply (blast intro: antisym_r refl_r lub ub2)
13074
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   171
apply (erule subst)
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   172
apply simp
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   173
done
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   174
13074
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   175
lemma (in semilat) le_iff_plus_unchanged2:
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   176
  "\<lbrakk> x:A; y:A \<rbrakk> \<Longrightarrow> (x <=_r y) = (y +_f x = y)"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   177
apply (rule iffI)
13074
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   178
 apply (blast intro: order_antisym lub order_refl ub1)
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   179
apply (erule subst)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   180
apply simp
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   181
done 
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   182
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   183
13074
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   184
lemma (in semilat) plus_assoc [simp]:
13068
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   185
  assumes a: "a \<in> A" and b: "b \<in> A" and c: "c \<in> A"
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   186
  shows "a +_f (b +_f c) = a +_f b +_f c"
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   187
proof -
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   188
  from a b have ab: "a +_f b \<in> A" ..
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   189
  from this c have abc: "(a +_f b) +_f c \<in> A" ..
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   190
  from b c have bc: "b +_f c \<in> A" ..
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   191
  from a this have abc': "a +_f (b +_f c) \<in> A" ..
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   192
13077
kleing
parents: 13074
diff changeset
   193
  show ?thesis
kleing
parents: 13074
diff changeset
   194
  proof    
13068
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   195
    show "a +_f (b +_f c) <=_r (a +_f b) +_f c"
13074
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   196
    proof -
13068
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   197
      from a b have "a <=_r a +_f b" .. 
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   198
      also from ab c have "\<dots> <=_r \<dots> +_f c" ..
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   199
      finally have "a<": "a <=_r (a +_f b) +_f c" .
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   200
      from a b have "b <=_r a +_f b" ..
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   201
      also from ab c have "\<dots> <=_r \<dots> +_f c" ..
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   202
      finally have "b<": "b <=_r (a +_f b) +_f c" .
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   203
      from ab c have "c<": "c <=_r (a +_f b) +_f c" ..    
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   204
      from "b<" "c<" b c abc have "b +_f c <=_r (a +_f b) +_f c" ..
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   205
      from "a<" this a bc abc show ?thesis ..
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   206
    qed
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   207
    show "(a +_f b) +_f c <=_r a +_f (b +_f c)" 
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   208
    proof -
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   209
      from b c have "b <=_r b +_f c" .. 
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   210
      also from a bc have "\<dots> <=_r a +_f \<dots>" ..
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   211
      finally have "b<": "b <=_r a +_f (b +_f c)" .
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   212
      from b c have "c <=_r b +_f c" ..
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   213
      also from a bc have "\<dots> <=_r a +_f \<dots>" ..
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   214
      finally have "c<": "c <=_r a +_f (b +_f c)" .
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   215
      from a bc have "a<": "a <=_r a +_f (b +_f c)" ..
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   216
      from "a<" "b<" a b abc' have "a +_f b <=_r a +_f (b +_f c)" ..
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   217
      from this "c<" ab c abc' show ?thesis ..
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   218
    qed
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   219
  qed
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   220
qed
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   221
13074
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   222
lemma (in semilat) plus_com_lemma:
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   223
  "\<lbrakk>a \<in> A; b \<in> A\<rbrakk> \<Longrightarrow> a +_f b <=_r b +_f a"
13068
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   224
proof -
13074
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   225
  assume a: "a \<in> A" and b: "b \<in> A"  
13077
kleing
parents: 13074
diff changeset
   226
  from b a have "a <=_r b +_f a" .. 
kleing
parents: 13074
diff changeset
   227
  moreover from b a have "b <=_r b +_f a" ..
kleing
parents: 13074
diff changeset
   228
  moreover note a b
kleing
parents: 13074
diff changeset
   229
  moreover from b a have "b +_f a \<in> A" ..
kleing
parents: 13074
diff changeset
   230
  ultimately show ?thesis ..
13068
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   231
qed
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   232
13074
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   233
lemma (in semilat) plus_commutative:
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   234
  "\<lbrakk>a \<in> A; b \<in> A\<rbrakk> \<Longrightarrow> a +_f b = b +_f a"
96bf406fd3e5 Started to convert to locales
nipkow
parents: 13068
diff changeset
   235
by(blast intro: order_antisym plus_com_lemma)
13068
472b1c91b09f +_f is associative and commutative
kleing
parents: 13006
diff changeset
   236
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   237
lemma is_lubD:
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
   238
  "is_lub r x y u \<Longrightarrow> is_ub r x y u & (!z. is_ub r x y z \<longrightarrow> (u,z):r)"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   239
  by (simp add: is_lub_def)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   240
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   241
lemma is_ubI:
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
   242
  "\<lbrakk> (x,u) : r; (y,u) : r \<rbrakk> \<Longrightarrow> is_ub r x y u"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   243
  by (simp add: is_ub_def)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   244
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   245
lemma is_ubD:
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
   246
  "is_ub r x y u \<Longrightarrow> (x,u) : r & (y,u) : r"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   247
  by (simp add: is_ub_def)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   248
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   249
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   250
lemma is_lub_bigger1 [iff]:  
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   251
  "is_lub (r^* ) x y y = ((x,y):r^* )"
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   252
apply (unfold is_lub_def is_ub_def)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   253
apply blast
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   254
done
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   255
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   256
lemma is_lub_bigger2 [iff]:
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   257
  "is_lub (r^* ) x y x = ((y,x):r^* )"
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   258
apply (unfold is_lub_def is_ub_def)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   259
apply blast 
12542
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   260
done
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   261
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   262
lemma extend_lub:
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
   263
  "\<lbrakk> single_valued r; is_lub (r^* ) x y u; (x',x) : r \<rbrakk> 
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
   264
  \<Longrightarrow> EX v. is_lub (r^* ) x' y v"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   265
apply (unfold is_lub_def is_ub_def)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   266
apply (case_tac "(y,x) : r^*")
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   267
 apply (case_tac "(y,x') : r^*")
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   268
  apply blast
11175
56ab6a5ba351 recoded function iter with the help of the while-combinator.
nipkow
parents: 11085
diff changeset
   269
 apply (blast elim: converse_rtranclE dest: single_valuedD)
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   270
apply (rule exI)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   271
apply (rule conjI)
12566
fe20540bcf93 renamed rtrancl_into_rtrancl2 to converse_rtrancl_into_rtrancl
nipkow
parents: 12542
diff changeset
   272
 apply (blast intro: converse_rtrancl_into_rtrancl dest: single_valuedD)
fe20540bcf93 renamed rtrancl_into_rtrancl2 to converse_rtrancl_into_rtrancl
nipkow
parents: 12542
diff changeset
   273
apply (blast intro: rtrancl_into_rtrancl converse_rtrancl_into_rtrancl 
10797
028d22926a41 ^^ -> ```
nipkow
parents: 10496
diff changeset
   274
             elim: converse_rtranclE dest: single_valuedD)
12542
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   275
done
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   276
10797
028d22926a41 ^^ -> ```
nipkow
parents: 10496
diff changeset
   277
lemma single_valued_has_lubs [rule_format]:
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
   278
  "\<lbrakk> single_valued r; (x,u) : r^* \<rbrakk> \<Longrightarrow> (!y. (y,u) : r^* \<longrightarrow> 
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   279
  (EX z. is_lub (r^* ) x y z))"
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   280
apply (erule converse_rtrancl_induct)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   281
 apply clarify
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   282
 apply (erule converse_rtrancl_induct)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   283
  apply blast
12566
fe20540bcf93 renamed rtrancl_into_rtrancl2 to converse_rtrancl_into_rtrancl
nipkow
parents: 12542
diff changeset
   284
 apply (blast intro: converse_rtrancl_into_rtrancl)
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   285
apply (blast intro: extend_lub)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   286
done
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   287
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   288
lemma some_lub_conv:
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
   289
  "\<lbrakk> acyclic r; is_lub (r^* ) x y u \<rbrakk> \<Longrightarrow> some_lub (r^* ) x y = u"
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   290
apply (unfold some_lub_def is_lub_def)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   291
apply (rule someI2)
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   292
 apply assumption
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   293
apply (blast intro: antisymD dest!: acyclic_impl_antisym_rtrancl)
12542
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   294
done
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   295
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   296
lemma is_lub_some_lub:
13006
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
   297
  "\<lbrakk> single_valued r; acyclic r; (x,u):r^*; (y,u):r^* \<rbrakk> 
51c5f3f11d16 symbolized
kleing
parents: 12911
diff changeset
   298
  \<Longrightarrow> is_lub (r^* ) x y (some_lub (r^* ) x y)";
10797
028d22926a41 ^^ -> ```
nipkow
parents: 10496
diff changeset
   299
  by (fastsimp dest: single_valued_has_lubs simp add: some_lub_conv)
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   300
12542
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   301
subsection{*An executable lub-finder*}
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   302
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   303
constdefs
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   304
 exec_lub :: "('a * 'a) set \<Rightarrow> ('a \<Rightarrow> 'a) \<Rightarrow> 'a binop"
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   305
"exec_lub r f x y == while (\<lambda>z. (x,z) \<notin> r\<^sup>*) f y"
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   306
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   307
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   308
lemma acyclic_single_valued_finite:
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   309
 "\<lbrakk>acyclic r; single_valued r; (x,y) \<in> r\<^sup>*\<rbrakk>
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   310
  \<Longrightarrow> finite (r \<inter> {a. (x, a) \<in> r\<^sup>*} \<times> {b. (b, y) \<in> r\<^sup>*})"
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   311
apply(erule converse_rtrancl_induct)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   312
 apply(rule_tac B = "{}" in finite_subset)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   313
  apply(simp only:acyclic_def)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   314
  apply(blast intro:rtrancl_into_trancl2 rtrancl_trancl_trancl)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   315
 apply simp
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   316
apply(rename_tac x x')
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   317
apply(subgoal_tac "r \<inter> {a. (x,a) \<in> r\<^sup>*} \<times> {b. (b,y) \<in> r\<^sup>*} =
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   318
                   insert (x,x') (r \<inter> {a. (x', a) \<in> r\<^sup>*} \<times> {b. (b, y) \<in> r\<^sup>*})")
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   319
 apply simp
12566
fe20540bcf93 renamed rtrancl_into_rtrancl2 to converse_rtrancl_into_rtrancl
nipkow
parents: 12542
diff changeset
   320
apply(blast intro:converse_rtrancl_into_rtrancl
12542
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   321
            elim:converse_rtranclE dest:single_valuedD)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   322
done
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   323
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   324
12773
a47f51daa6dc use exec_lub instead of some_lub
kleing
parents: 12566
diff changeset
   325
lemma exec_lub_conv:
a47f51daa6dc use exec_lub instead of some_lub
kleing
parents: 12566
diff changeset
   326
  "\<lbrakk> acyclic r; !x y. (x,y) \<in> r \<longrightarrow> f x = y; is_lub (r\<^sup>*) x y u \<rbrakk> \<Longrightarrow>
a47f51daa6dc use exec_lub instead of some_lub
kleing
parents: 12566
diff changeset
   327
  exec_lub r f x y = u";
12542
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   328
apply(unfold exec_lub_def)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   329
apply(rule_tac P = "\<lambda>z. (y,z) \<in> r\<^sup>* \<and> (z,u) \<in> r\<^sup>*" and
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   330
               r = "(r \<inter> {(a,b). (y,a) \<in> r\<^sup>* \<and> (b,u) \<in> r\<^sup>*})^-1" in while_rule)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   331
    apply(blast dest: is_lubD is_ubD)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   332
   apply(erule conjE)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   333
   apply(erule_tac z = u in converse_rtranclE)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   334
    apply(blast dest: is_lubD is_ubD)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   335
   apply(blast dest:rtrancl_into_rtrancl)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   336
  apply(rename_tac s)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   337
  apply(subgoal_tac "is_ub (r\<^sup>*) x y s")
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   338
   prefer 2; apply(simp add:is_ub_def)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   339
  apply(subgoal_tac "(u, s) \<in> r\<^sup>*")
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   340
   prefer 2; apply(blast dest:is_lubD)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   341
  apply(erule converse_rtranclE)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   342
   apply blast
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   343
  apply(simp only:acyclic_def)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   344
  apply(blast intro:rtrancl_into_trancl2 rtrancl_trancl_trancl)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   345
 apply(rule finite_acyclic_wf)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   346
  apply simp
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   347
  apply(erule acyclic_single_valued_finite)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   348
   apply(blast intro:single_valuedI)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   349
  apply(simp add:is_lub_def is_ub_def)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   350
 apply simp
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   351
 apply(erule acyclic_subset)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   352
 apply blast
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   353
apply simp
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   354
apply(erule conjE)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   355
apply(erule_tac z = u in converse_rtranclE)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   356
 apply(blast dest: is_lubD is_ubD)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   357
apply(blast dest:rtrancl_into_rtrancl)
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   358
done
ff5e3f11e1ef added exec_lub
nipkow
parents: 12516
diff changeset
   359
12773
a47f51daa6dc use exec_lub instead of some_lub
kleing
parents: 12566
diff changeset
   360
lemma is_lub_exec_lub:
a47f51daa6dc use exec_lub instead of some_lub
kleing
parents: 12566
diff changeset
   361
  "\<lbrakk> single_valued r; acyclic r; (x,u):r^*; (y,u):r^*; !x y. (x,y) \<in> r \<longrightarrow> f x = y \<rbrakk>
a47f51daa6dc use exec_lub instead of some_lub
kleing
parents: 12566
diff changeset
   362
  \<Longrightarrow> is_lub (r^* ) x y (exec_lub r f x y)"
a47f51daa6dc use exec_lub instead of some_lub
kleing
parents: 12566
diff changeset
   363
  by (fastsimp dest: single_valued_has_lubs simp add: exec_lub_conv)
a47f51daa6dc use exec_lub instead of some_lub
kleing
parents: 12566
diff changeset
   364
10496
f2d304bdf3cc BCV integration (first step)
kleing
parents:
diff changeset
   365
end