src/HOL/IMP/Abs_Int1.thy
author nipkow
Sat, 28 Apr 2012 07:38:22 +0200
changeset 47818 151d137f1095
parent 47613 e72e44cee6f2
child 48759 ff570720ba1c
permissions -rw-r--r--
renamed Semi to Seq
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
     1
(* Author: Tobias Nipkow *)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
     2
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
     3
theory Abs_Int1
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
     4
imports Abs_State
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
     5
begin
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
     6
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
     7
lemma le_iff_le_annos_zip: "C1 \<sqsubseteq> C2 \<longleftrightarrow>
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
     8
 (\<forall> (a1,a2) \<in> set(zip (annos C1) (annos C2)). a1 \<sqsubseteq> a2) \<and> strip C1 = strip C2"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
     9
by(induct C1 C2 rule: le_acom.induct) (auto simp: size_annos_same2)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    10
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    11
lemma le_iff_le_annos: "C1 \<sqsubseteq> C2 \<longleftrightarrow>
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    12
  strip C1 = strip C2 \<and> (\<forall> i<size(annos C1). annos C1 ! i \<sqsubseteq> annos C2 ! i)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    13
by(auto simp add: le_iff_le_annos_zip set_zip) (metis size_annos_same2)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    14
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    15
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    16
lemma mono_fun_wt[simp]: "wt F X \<Longrightarrow> F \<sqsubseteq> G \<Longrightarrow> x : X \<Longrightarrow> fun F x \<sqsubseteq> fun G x"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    17
by(simp add: mono_fun wt_st_def)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    18
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    19
lemma wt_bot[simp]: "wt (bot c) (vars c)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    20
by(simp add: wt_acom_def bot_def)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    21
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    22
lemma wt_acom_simps[simp]: "wt (SKIP {P}) X \<longleftrightarrow> wt P X"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    23
  "wt (x ::= e {P}) X \<longleftrightarrow> x : X \<and> vars e \<subseteq> X \<and> wt P X"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    24
  "wt (C1;C2) X \<longleftrightarrow> wt C1 X \<and> wt C2 X"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    25
  "wt (IF b THEN C1 ELSE C2 {P}) X \<longleftrightarrow>
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    26
   vars b \<subseteq> X \<and> wt C1 X \<and> wt C2 X \<and> wt P X"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    27
  "wt ({I} WHILE b DO C {P}) X \<longleftrightarrow>
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    28
   wt I X \<and> vars b \<subseteq> X \<and> wt C X \<and> wt P X"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    29
by(auto simp add: wt_acom_def)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    30
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    31
lemma wt_post[simp]: "wt c  X \<Longrightarrow> wt (post c) X"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    32
by(induction c)(auto simp: wt_acom_def)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    33
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    34
lemma lpfp_inv:
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    35
assumes "lpfp f x0 = Some x" and "\<And>x. P x \<Longrightarrow> P(f x)" and "P(bot x0)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    36
shows "P x"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    37
using assms unfolding lpfp_def pfp_def
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    38
by (metis (lifting) while_option_rule)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    39
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    40
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    41
subsection "Computable Abstract Interpretation"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    42
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    43
text{* Abstract interpretation over type @{text st} instead of
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    44
functions. *}
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    45
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    46
context Gamma
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    47
begin
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    48
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    49
fun aval' :: "aexp \<Rightarrow> 'av st \<Rightarrow> 'av" where
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    50
"aval' (N n) S = num' n" |
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    51
"aval' (V x) S = fun S x" |
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    52
"aval' (Plus a1 a2) S = plus' (aval' a1 S) (aval' a2 S)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    53
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    54
lemma aval'_sound: "s : \<gamma>\<^isub>f S \<Longrightarrow> vars a \<subseteq> dom S \<Longrightarrow> aval a s : \<gamma>(aval' a S)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    55
by (induction a) (auto simp: gamma_num' gamma_plus' \<gamma>_st_def)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    56
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    57
end
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    58
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    59
text{* The for-clause (here and elsewhere) only serves the purpose of fixing
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    60
the name of the type parameter @{typ 'av} which would otherwise be renamed to
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    61
@{typ 'a}. *}
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    62
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    63
locale Abs_Int = Gamma where \<gamma>=\<gamma> for \<gamma> :: "'av::SL_top \<Rightarrow> val set"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    64
begin
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    65
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    66
fun step' :: "'av st option \<Rightarrow> 'av st option acom \<Rightarrow> 'av st option acom" where
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    67
"step' S (SKIP {P}) = (SKIP {S})" |
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    68
"step' S (x ::= e {P}) =
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    69
  x ::= e {case S of None \<Rightarrow> None | Some S \<Rightarrow> Some(update S x (aval' e S))}" |
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    70
"step' S (C1; C2) = step' S C1; step' (post C1) C2" |
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    71
"step' S (IF b THEN C1 ELSE C2 {P}) =
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    72
  (IF b THEN step' S C1 ELSE step' S C2 {post C1 \<squnion> post C2})" |
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    73
"step' S ({Inv} WHILE b DO C {P}) =
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    74
   {S \<squnion> post C} WHILE b DO step' Inv C {Inv}"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    75
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    76
definition AI :: "com \<Rightarrow> 'av st option acom option" where
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    77
"AI c = lpfp (step' (top c)) c"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    78
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    79
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    80
lemma strip_step'[simp]: "strip(step' S C) = strip C"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    81
by(induct C arbitrary: S) (simp_all add: Let_def)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    82
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    83
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    84
text{* Soundness: *}
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    85
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    86
lemma in_gamma_update:
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    87
  "\<lbrakk> s : \<gamma>\<^isub>f S; i : \<gamma> a \<rbrakk> \<Longrightarrow> s(x := i) : \<gamma>\<^isub>f(update S x a)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    88
by(simp add: \<gamma>_st_def)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    89
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    90
theorem step_preserves_le:
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    91
  "\<lbrakk> S \<subseteq> \<gamma>\<^isub>o S'; C \<le> \<gamma>\<^isub>c C';  wt C' X; wt S' X \<rbrakk> \<Longrightarrow> step S C \<le> \<gamma>\<^isub>c (step' S' C')"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    92
proof(induction C arbitrary: C' S S')
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    93
  case SKIP thus ?case by(auto simp:SKIP_le map_acom_SKIP)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    94
next
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    95
  case Assign thus ?case
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    96
    by(fastforce simp: Assign_le map_acom_Assign wt_st_def
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    97
        intro: aval'_sound in_gamma_update split: option.splits)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    98
next
47818
151d137f1095 renamed Semi to Seq
nipkow
parents: 47613
diff changeset
    99
  case Seq thus ?case apply (auto simp: Seq_le map_acom_Seq)
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   100
    by (metis le_post post_map_acom wt_post)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   101
next
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   102
  case (If b C1 C2 P)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   103
  then obtain C1' C2' P' where
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   104
      "C' = IF b THEN C1' ELSE C2' {P'}"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   105
      "P \<subseteq> \<gamma>\<^isub>o P'" "C1 \<le> \<gamma>\<^isub>c C1'" "C2 \<le> \<gamma>\<^isub>c C2'"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   106
    by (fastforce simp: If_le map_acom_If)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   107
  moreover from this(1) `wt C' X` have wt: "wt C1' X" "wt C2' X"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   108
    by simp_all
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   109
  moreover have "post C1 \<subseteq> \<gamma>\<^isub>o(post C1' \<squnion> post C2')"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   110
    by (metis (no_types) `C1 \<le> \<gamma>\<^isub>c C1'` join_ge1 le_post mono_gamma_o order_trans post_map_acom wt wt_post)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   111
  moreover have "post C2 \<subseteq> \<gamma>\<^isub>o(post C1' \<squnion> post C2')"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   112
    by (metis (no_types) `C2 \<le> \<gamma>\<^isub>c C2'` join_ge2 le_post mono_gamma_o order_trans post_map_acom wt wt_post)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   113
  ultimately show ?case using `S \<subseteq> \<gamma>\<^isub>o S'` `wt S' X`
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   114
    by (simp add: If.IH subset_iff)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   115
next
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   116
  case (While I b C1 P)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   117
  then obtain C1' I' P' where
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   118
    "C' = {I'} WHILE b DO C1' {P'}"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   119
    "I \<subseteq> \<gamma>\<^isub>o I'" "P \<subseteq> \<gamma>\<^isub>o P'" "C1 \<le> \<gamma>\<^isub>c C1'"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   120
    by (fastforce simp: map_acom_While While_le)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   121
  moreover from this(1) `wt C' X`
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   122
  have wt: "wt C1' X" "wt I' X" by simp_all
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   123
  moreover note compat = `wt S' X` wt_post[OF wt(1)]
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   124
  moreover have "S \<union> post C1 \<subseteq> \<gamma>\<^isub>o (S' \<squnion> post C1')"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   125
    using `S \<subseteq> \<gamma>\<^isub>o S'` le_post[OF `C1 \<le> \<gamma>\<^isub>c C1'`, simplified]
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   126
    by (metis (no_types) join_ge1[OF compat] join_ge2[OF compat] le_sup_iff mono_gamma_o order_trans)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   127
  ultimately show ?case by (simp add: While.IH subset_iff)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   128
qed
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   129
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   130
lemma wt_step'[simp]:
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   131
  "\<lbrakk> wt C X; wt S X \<rbrakk> \<Longrightarrow> wt (step' S C) X"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   132
proof(induction C arbitrary: S)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   133
  case Assign thus ?case
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   134
    by(auto simp: wt_st_def update_def split: option.splits)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   135
qed auto
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   136
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   137
theorem AI_sound: "AI c = Some C \<Longrightarrow> CS c \<le> \<gamma>\<^isub>c C"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   138
proof(simp add: CS_def AI_def)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   139
  assume 1: "lpfp (step' (top c)) c = Some C"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   140
  have "wt C (vars c)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   141
    by(rule lpfp_inv[where P = "%C. wt C (vars c)", OF 1 _ wt_bot])
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   142
      (erule wt_step'[OF _ wt_top])
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   143
  have 2: "step' (top c) C \<sqsubseteq> C" by(rule lpfpc_pfp[OF 1])
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   144
  have 3: "strip (\<gamma>\<^isub>c (step' (top c) C)) = c"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   145
    by(simp add: strip_lpfp[OF _ 1])
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   146
  have "lfp (step UNIV) c \<le> \<gamma>\<^isub>c (step' (top c) C)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   147
  proof(rule lfp_lowerbound[simplified,OF 3])
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   148
    show "step UNIV (\<gamma>\<^isub>c (step' (top c) C)) \<le> \<gamma>\<^isub>c (step' (top c) C)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   149
    proof(rule step_preserves_le[OF _ _ `wt C (vars c)` wt_top])
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   150
      show "UNIV \<subseteq> \<gamma>\<^isub>o (top c)" by simp
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   151
      show "\<gamma>\<^isub>c (step' (top c) C) \<le> \<gamma>\<^isub>c C" by(rule mono_gamma_c[OF 2])
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   152
    qed
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   153
  qed
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   154
  from this 2 show "lfp (step UNIV) c \<le> \<gamma>\<^isub>c C"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   155
    by (blast intro: mono_gamma_c order_trans)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   156
qed
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   157
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   158
end
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   159
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   160
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   161
subsubsection "Monotonicity"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   162
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   163
lemma le_join_disj: "wt y X \<Longrightarrow> wt (z::_::SL_top_wt) X \<Longrightarrow> x \<sqsubseteq> y \<or> x \<sqsubseteq> z \<Longrightarrow> x \<sqsubseteq> y \<squnion> z"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   164
by (metis join_ge1 join_ge2 preord_class.le_trans)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   165
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   166
locale Abs_Int_mono = Abs_Int +
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   167
assumes mono_plus': "a1 \<sqsubseteq> b1 \<Longrightarrow> a2 \<sqsubseteq> b2 \<Longrightarrow> plus' a1 a2 \<sqsubseteq> plus' b1 b2"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   168
begin
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   169
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   170
lemma mono_aval': "S1 \<sqsubseteq> S2 \<Longrightarrow> wt S1 X \<Longrightarrow> vars e \<subseteq> X \<Longrightarrow> aval' e S1 \<sqsubseteq> aval' e S2"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   171
by(induction e) (auto simp: le_st_def mono_plus' wt_st_def)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   172
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   173
theorem mono_step': "wt S1 X \<Longrightarrow> wt S2 X \<Longrightarrow> wt C1 X \<Longrightarrow> wt C2 X \<Longrightarrow>
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   174
  S1 \<sqsubseteq> S2 \<Longrightarrow> C1 \<sqsubseteq> C2 \<Longrightarrow> step' S1 C1 \<sqsubseteq> step' S2 C2"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   175
apply(induction C1 C2 arbitrary: S1 S2 rule: le_acom.induct)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   176
apply (auto simp: Let_def mono_aval' mono_post
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   177
  le_join_disj le_join_disj[OF  wt_post wt_post]
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   178
            split: option.split)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   179
done
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   180
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   181
lemma mono_step'_top: "wt c (vars c0) \<Longrightarrow> wt c' (vars c0) \<Longrightarrow> c \<sqsubseteq> c' \<Longrightarrow> step' (top c0) c \<sqsubseteq> step' (top c0) c'"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   182
by (metis wt_top mono_step' preord_class.le_refl)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   183
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   184
end
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   185
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   186
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   187
subsubsection "Termination"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   188
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   189
abbreviation sqless (infix "\<sqsubset>" 50) where
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   190
"x \<sqsubset> y == x \<sqsubseteq> y \<and> \<not> y \<sqsubseteq> x"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   191
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   192
lemma pfp_termination:
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   193
fixes x0 :: "'a::preord" and m :: "'a \<Rightarrow> nat"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   194
assumes mono: "\<And>x y. I x \<Longrightarrow> I y \<Longrightarrow> x \<sqsubseteq> y \<Longrightarrow> f x \<sqsubseteq> f y"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   195
and m: "\<And>x y. I x \<Longrightarrow> I y \<Longrightarrow> x \<sqsubset> y \<Longrightarrow> m x > m y"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   196
and I: "\<And>x y. I x \<Longrightarrow> I(f x)" and "I x0" and "x0 \<sqsubseteq> f x0"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   197
shows "EX x. pfp f x0 = Some x"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   198
proof(simp add: pfp_def, rule wf_while_option_Some[where P = "%x. I x & x \<sqsubseteq> f x"])
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   199
  show "wf {(y,x). ((I x \<and> x \<sqsubseteq> f x) \<and> \<not> f x \<sqsubseteq> x) \<and> y = f x}"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   200
    by(rule wf_subset[OF wf_measure[of m]]) (auto simp: m I)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   201
next
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   202
  show "I x0 \<and> x0 \<sqsubseteq> f x0" using `I x0` `x0 \<sqsubseteq> f x0` by blast
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   203
next
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   204
  fix x assume "I x \<and> x \<sqsubseteq> f x" thus "I(f x) \<and> f x \<sqsubseteq> f(f x)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   205
    by (blast intro: I mono)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   206
qed
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   207
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   208
lemma lpfp_termination:
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   209
fixes f :: "'a::preord option acom \<Rightarrow> 'a option acom"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   210
and m :: "'a option acom \<Rightarrow> nat" and I :: "'a option acom \<Rightarrow> bool"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   211
assumes "\<And>x y. I x \<Longrightarrow> I y \<Longrightarrow> x \<sqsubset> y \<Longrightarrow> m x > m y"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   212
and "\<And>x y. I x \<Longrightarrow> I y \<Longrightarrow> x \<sqsubseteq> y \<Longrightarrow> f x \<sqsubseteq> f y"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   213
and "\<And>x y. I x \<Longrightarrow> I(f x)" and "I(bot c)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   214
and "\<And>C. strip (f C) = strip C"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   215
shows "\<exists>c'. lpfp f c = Some c'"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   216
unfolding lpfp_def
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   217
by(fastforce intro: pfp_termination[where I=I and m=m] assms bot_least
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   218
   simp: assms(5))
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   219
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   220
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   221
locale Abs_Int_measure =
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   222
  Abs_Int_mono where \<gamma>=\<gamma> for \<gamma> :: "'av::SL_top \<Rightarrow> val set" +
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   223
fixes m :: "'av \<Rightarrow> nat"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   224
fixes h :: "nat"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   225
assumes m1: "x \<sqsubseteq> y \<Longrightarrow> m x \<ge> m y"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   226
assumes m2: "x \<sqsubset> y \<Longrightarrow> m x > m y"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   227
assumes h: "m x \<le> h"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   228
begin
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   229
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   230
definition "m_st S = (\<Sum> x \<in> dom S. m(fun S x))"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   231
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   232
lemma m_st1: "S1 \<sqsubseteq> S2 \<Longrightarrow> m_st S1 \<ge> m_st S2"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   233
proof(auto simp add: le_st_def m_st_def)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   234
  assume "\<forall>x\<in>dom S2. fun S1 x \<sqsubseteq> fun S2 x"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   235
  hence "\<forall>x\<in>dom S2. m(fun S1 x) \<ge> m(fun S2 x)" by (metis m1)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   236
  thus "(\<Sum>x\<in>dom S2. m (fun S2 x)) \<le> (\<Sum>x\<in>dom S2. m (fun S1 x))"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   237
    by (metis setsum_mono)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   238
qed
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   239
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   240
lemma m_st2: "finite(dom S1) \<Longrightarrow> S1 \<sqsubset> S2 \<Longrightarrow> m_st S1 > m_st S2"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   241
proof(auto simp add: le_st_def m_st_def)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   242
  assume "finite(dom S2)" and 0: "\<forall>x\<in>dom S2. fun S1 x \<sqsubseteq> fun S2 x"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   243
  hence 1: "\<forall>x\<in>dom S2. m(fun S1 x) \<ge> m(fun S2 x)" by (metis m1)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   244
  fix x assume "x \<in> dom S2" "\<not> fun S2 x \<sqsubseteq> fun S1 x"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   245
  hence 2: "\<exists>x\<in>dom S2. m(fun S1 x) > m(fun S2 x)" using 0 m2 by blast
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   246
  from setsum_strict_mono_ex1[OF `finite(dom S2)` 1 2]
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   247
  show "(\<Sum>x\<in>dom S2. m (fun S2 x)) < (\<Sum>x\<in>dom S2. m (fun S1 x))" .
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   248
qed
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   249
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   250
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   251
definition m_o :: "nat \<Rightarrow> 'av st option \<Rightarrow> nat" where
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   252
"m_o d opt = (case opt of None \<Rightarrow> h*d+1 | Some S \<Rightarrow> m_st S)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   253
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   254
definition m_c :: "'av st option acom \<Rightarrow> nat" where
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   255
"m_c c = (\<Sum>i<size(annos c). m_o (card(vars(strip c))) (annos c ! i))"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   256
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   257
lemma m_st_h: "wt x X \<Longrightarrow> finite X \<Longrightarrow> m_st x \<le> h * card X"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   258
by(simp add: wt_st_def m_st_def)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   259
  (metis nat_mult_commute of_nat_id setsum_bounded[OF h])
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   260
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   261
lemma m_o1: "finite X \<Longrightarrow> wt o1 X \<Longrightarrow> wt o2 X \<Longrightarrow>
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   262
  o1 \<sqsubseteq> o2 \<Longrightarrow> m_o (card X) o1 \<ge> m_o (card X) o2"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   263
proof(induction o1 o2 rule: le_option.induct)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   264
  case 1 thus ?case by (simp add: m_o_def)(metis m_st1)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   265
next
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   266
  case 2 thus ?case
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   267
    by(simp add: wt_option_def m_o_def le_SucI m_st_h split: option.splits)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   268
next
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   269
  case 3 thus ?case by simp
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   270
qed
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   271
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   272
lemma m_o2: "finite X \<Longrightarrow> wt o1 X \<Longrightarrow> wt o2 X \<Longrightarrow>
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   273
  o1 \<sqsubset> o2 \<Longrightarrow> m_o (card X) o1 > m_o (card X) o2"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   274
proof(induction o1 o2 rule: le_option.induct)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   275
  case 1 thus ?case by (simp add: m_o_def wt_st_def m_st2)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   276
next
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   277
  case 2 thus ?case
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   278
    by(auto simp add: m_o_def le_imp_less_Suc m_st_h)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   279
next
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   280
  case 3 thus ?case by simp
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   281
qed
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   282
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   283
lemma m_c2: "wt c1 (vars(strip c1)) \<Longrightarrow> wt c2 (vars(strip c2)) \<Longrightarrow>
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   284
  c1 \<sqsubset> c2 \<Longrightarrow> m_c c1 > m_c c2"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   285
proof(auto simp add: le_iff_le_annos m_c_def size_annos_same[of c1 c2] wt_acom_def)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   286
  let ?X = "vars(strip c2)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   287
  let ?n = "card ?X"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   288
  assume V1: "\<forall>a\<in>set(annos c1). wt a ?X"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   289
    and V2: "\<forall>a\<in>set(annos c2). wt a ?X"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   290
    and strip_eq: "strip c1 = strip c2"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   291
    and 0: "\<forall>i<size(annos c2). annos c1 ! i \<sqsubseteq> annos c2 ! i"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   292
  hence 1: "\<forall>i<size(annos c2). m_o ?n (annos c1 ! i) \<ge> m_o ?n (annos c2 ! i)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   293
    by (auto simp: all_set_conv_all_nth)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   294
       (metis finite_cvars m_o1 size_annos_same2)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   295
  fix i assume "i < size(annos c2)" "\<not> annos c2 ! i \<sqsubseteq> annos c1 ! i"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   296
  hence "m_o ?n (annos c1 ! i) > m_o ?n (annos c2 ! i)" (is "?P i")
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   297
    by(metis m_o2[OF finite_cvars] V1 V2 strip_eq nth_mem size_annos_same 0)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   298
  hence 2: "\<exists>i < size(annos c2). ?P i" using `i < size(annos c2)` by blast
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   299
  show "(\<Sum>i<size(annos c2). m_o ?n (annos c2 ! i))
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   300
         < (\<Sum>i<size(annos c2). m_o ?n (annos c1 ! i))"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   301
    apply(rule setsum_strict_mono_ex1) using 1 2 by (auto)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   302
qed
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   303
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   304
lemma AI_Some_measure: "\<exists>C. AI c = Some C"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   305
unfolding AI_def
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   306
apply(rule lpfp_termination[where I = "%C. strip C = c \<and> wt C (vars c)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   307
  and m="m_c"])
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   308
apply(simp_all add: m_c2 mono_step'_top)
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   309
done
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   310
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   311
end
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   312
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   313
end