src/HOL/IMP/Abs_State.thy
author nipkow
Thu, 18 Apr 2013 20:18:37 +0200
changeset 51715 17b992f19b51
parent 51711 df3426139651
child 51720 cdc05fc4cd0d
permissions -rw-r--r--
avoided map_of in def of fun_rep (but still needed for efficient code)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
     1
(* Author: Tobias Nipkow *)
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
     2
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
     3
theory Abs_State
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
     4
imports Abs_Int0
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
     5
begin
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
     6
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
     7
type_synonym 'a st_rep = "(vname * 'a) list"
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
     8
51715
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
     9
fun fun_rep :: "('a::top) st_rep \<Rightarrow> vname \<Rightarrow> 'a" where
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
    10
"fun_rep [] = (\<lambda>x. \<top>)" |
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
    11
"fun_rep ((x,a)#ps) = (fun_rep ps) (x := a)"
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
    12
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
    13
lemma fun_rep_map_of[code]: --"original def is too slow"
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
    14
  "fun_rep ps = (%x. case map_of ps x of None \<Rightarrow> \<top> | Some a \<Rightarrow> a)"
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
    15
by(induction ps rule: fun_rep.induct) auto
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
    16
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    17
definition eq_st :: "('a::top) st_rep \<Rightarrow> 'a st_rep \<Rightarrow> bool" where
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    18
"eq_st S1 S2 = (fun_rep S1 = fun_rep S2)"
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
    19
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    20
quotient_type 'a st = "('a::top) st_rep" / eq_st
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    21
by (metis eq_st_def equivpI reflpI sympI transpI)
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
    22
51715
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
    23
lift_definition update :: "('a::top) st \<Rightarrow> vname \<Rightarrow> 'a \<Rightarrow> 'a st"
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
    24
  is "\<lambda>ps x a. (x,a)#ps"
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    25
by(auto simp: eq_st_def)
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
    26
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    27
lift_definition "fun" :: "('a::top) st \<Rightarrow> vname \<Rightarrow> 'a" is fun_rep
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    28
by(simp add: eq_st_def)
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    29
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    30
definition show_st :: "vname set \<Rightarrow> ('a::top) st \<Rightarrow> (vname * 'a)set" where
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    31
"show_st X S = (\<lambda>x. (x, fun S x)) ` X"
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
    32
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    33
definition "show_acom C = map_acom (Option.map (show_st (vars(strip C)))) C"
51036
e7b54119c436 tuned top
nipkow
parents: 50995
diff changeset
    34
definition "show_acom_opt = Option.map show_acom"
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
    35
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    36
lemma fun_update[simp]: "fun (update S x y) = (fun S)(x:=y)"
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    37
by transfer auto
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
    38
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    39
definition \<gamma>_st :: "(('a::top) \<Rightarrow> 'b set) \<Rightarrow> 'a st \<Rightarrow> (vname \<Rightarrow> 'b) set" where
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    40
"\<gamma>_st \<gamma> F = {f. \<forall>x. f x \<in> \<gamma>(fun F x)}"
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    41
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    42
instantiation st :: ("{order,top}") order
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    43
begin
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
    44
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    45
definition less_eq_st_rep :: "'a st_rep \<Rightarrow> 'a st_rep \<Rightarrow> bool" where
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    46
"less_eq_st_rep ps1 ps2 =
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    47
  ((\<forall>x \<in> set(map fst ps1) \<union> set(map fst ps2). fun_rep ps1 x \<le> fun_rep ps2 x))"
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    48
51715
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
    49
lemma less_eq_st_rep_iff:
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
    50
  "less_eq_st_rep r1 r2 = (\<forall>x. fun_rep r1 x \<le> fun_rep r2 x)"
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
    51
apply(auto simp: less_eq_st_rep_def fun_rep_map_of split: option.split)
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    52
apply (metis Un_iff map_of_eq_None_iff option.distinct(1))
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    53
apply (metis Un_iff map_of_eq_None_iff option.distinct(1))
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    54
done
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
    55
51715
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
    56
corollary less_eq_st_rep_iff_fun:
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
    57
  "less_eq_st_rep r1 r2 = (fun_rep r1 \<le> fun_rep r2)"
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    58
by (metis less_eq_st_rep_iff le_fun_def)
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
    59
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    60
lift_definition less_eq_st :: "'a st \<Rightarrow> 'a st \<Rightarrow> bool" is less_eq_st_rep
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    61
by(auto simp add: eq_st_def less_eq_st_rep_iff)
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    62
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    63
definition less_st where "F < (G::'a st) = (F \<le> G \<and> \<not> G \<le> F)"
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
    64
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
    65
instance
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
    66
proof
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    67
  case goal1 show ?case by(rule less_st_def)
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    68
next
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    69
  case goal2 show ?case by transfer (auto simp: less_eq_st_rep_def)
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    70
next
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    71
  case goal3 thus ?case
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    72
    by transfer (metis less_eq_st_rep_iff order_trans)
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    73
next
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    74
  case goal4 thus ?case
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    75
    by transfer (metis less_eq_st_rep_iff eq_st_def fun_eq_iff antisym)
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    76
qed
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
    77
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
    78
end
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
    79
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    80
lemma le_st_iff: "(F \<le> G) = (\<forall>x. fun F x \<le> fun G x)"
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    81
by transfer (rule less_eq_st_rep_iff)
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    82
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    83
fun map2_st_rep :: "('a::top \<Rightarrow> 'a \<Rightarrow> 'a) \<Rightarrow> 'a st_rep \<Rightarrow> 'a st_rep \<Rightarrow> 'a st_rep" where
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    84
"map2_st_rep f [] ps2 = map (%(x,y). (x, f \<top> y)) ps2" |
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    85
"map2_st_rep f ((x,y)#ps1) ps2 =
51715
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
    86
  (let y2 = fun_rep ps2 x
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    87
   in (x,f y y2) # map2_st_rep f ps1 ps2)"
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    88
51715
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
    89
lemma fun_rep_map2_rep[simp]: "f \<top> \<top> = \<top> \<Longrightarrow>
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
    90
  fun_rep (map2_st_rep f ps1 ps2) = (\<lambda>x. f (fun_rep ps1 x) (fun_rep ps2 x))"
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    91
apply(induction f ps1 ps2 rule: map2_st_rep.induct)
51715
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
    92
apply(simp add: fun_rep_map_of map_of_map fun_eq_iff split: option.split)
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
    93
apply(fastforce simp: fun_rep_map_of fun_eq_iff split:option.splits)
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    94
done
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    95
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    96
instantiation st :: (semilattice) semilattice
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
    97
begin
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
    98
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
    99
lift_definition sup_st :: "'a st \<Rightarrow> 'a st \<Rightarrow> 'a st" is "map2_st_rep (op \<squnion>)"
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   100
by (simp add: eq_st_def)
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   101
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   102
lift_definition top_st :: "'a st" is "[]"
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   103
by(simp add: eq_st_def)
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   104
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   105
instance
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   106
proof
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   107
  case goal1 show ?case by transfer (simp add:less_eq_st_rep_iff)
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   108
next
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   109
  case goal2 show ?case by transfer (simp add:less_eq_st_rep_iff)
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   110
next
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   111
  case goal3 thus ?case by transfer (simp add:less_eq_st_rep_iff)
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   112
next
51715
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
   113
  case goal4 show ?case
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
   114
    by transfer (simp add:less_eq_st_rep_iff fun_rep_map_of)
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   115
qed
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   116
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   117
end
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   118
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   119
lemma fun_top: "fun \<top> = (\<lambda>x. \<top>)"
51715
17b992f19b51 avoided map_of in def of fun_rep (but still needed for efficient code)
nipkow
parents: 51711
diff changeset
   120
by transfer simp
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   121
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   122
lemma mono_update[simp]:
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
   123
  "a1 \<le> a2 \<Longrightarrow> S1 \<le> S2 \<Longrightarrow> update S1 x a1 \<le> update S2 x a2"
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   124
by transfer (auto simp add: less_eq_st_rep_def)
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   125
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   126
lemma mono_fun: "S1 \<le> S2 \<Longrightarrow> fun S1 x \<le> fun S2 x"
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   127
by transfer (simp add: less_eq_st_rep_iff)
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   128
49396
73fb17ed2e08 converted wt into a set, tuned names
nipkow
parents: 49353
diff changeset
   129
locale Gamma = Val_abs where \<gamma>=\<gamma> for \<gamma> :: "'av::semilattice \<Rightarrow> val set"
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   130
begin
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   131
49497
860b7c6bd913 tuned names
nipkow
parents: 49399
diff changeset
   132
abbreviation \<gamma>\<^isub>s :: "'av st \<Rightarrow> state set"
860b7c6bd913 tuned names
nipkow
parents: 49399
diff changeset
   133
where "\<gamma>\<^isub>s == \<gamma>_st \<gamma>"
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   134
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   135
abbreviation \<gamma>\<^isub>o :: "'av st option \<Rightarrow> state set"
49497
860b7c6bd913 tuned names
nipkow
parents: 49399
diff changeset
   136
where "\<gamma>\<^isub>o == \<gamma>_option \<gamma>\<^isub>s"
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   137
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   138
abbreviation \<gamma>\<^isub>c :: "'av st option acom \<Rightarrow> state set acom"
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   139
where "\<gamma>\<^isub>c == map_acom \<gamma>\<^isub>o"
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   140
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   141
lemma gamma_s_top[simp]: "\<gamma>\<^isub>s \<top> = UNIV"
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   142
by(auto simp: \<gamma>_st_def fun_top)
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   143
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   144
lemma gamma_o_Top[simp]: "\<gamma>\<^isub>o \<top> = UNIV"
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   145
by (simp add: top_option_def)
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   146
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
   147
lemma mono_gamma_s: "f \<le> g \<Longrightarrow> \<gamma>\<^isub>s f \<subseteq> \<gamma>\<^isub>s g"
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51698
diff changeset
   148
by(simp add:\<gamma>_st_def le_st_iff subset_iff) (metis mono_gamma subsetD)
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   149
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   150
lemma mono_gamma_o:
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
   151
  "S1 \<le> S2 \<Longrightarrow> \<gamma>\<^isub>o S1 \<subseteq> \<gamma>\<^isub>o S2"
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
   152
by(induction S1 S2 rule: less_eq_option.induct)(simp_all add: mono_gamma_s)
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   153
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
   154
lemma mono_gamma_c: "C1 \<le> C2 \<Longrightarrow> \<gamma>\<^isub>c C1 \<le> \<gamma>\<^isub>c C2"
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
   155
by (induction C1 C2 rule: less_eq_acom.induct) (simp_all add:mono_gamma_o)
47619
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   156
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   157
lemma in_gamma_option_iff:
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   158
  "x : \<gamma>_option r u \<longleftrightarrow> (\<exists>u'. u = Some u' \<and> x : r u')"
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   159
by (cases u) auto
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   160
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   161
end
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   162
0d3e95375bb7 forgot to add file
nipkow
parents:
diff changeset
   163
end