src/HOL/IMP/Abs_Int1_parity.thy
author wenzelm
Sun, 17 Dec 2023 21:12:18 +0100
changeset 79270 90c5aadcc4b2
parent 69597 ff784d5a5bfb
permissions -rw-r--r--
more robust norm_proof: turn env into instantiation, based on visible statement;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
     1
(* Author: Tobias Nipkow *)
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
     2
68778
4566bac4517d improved sectioning
nipkow
parents: 67406
diff changeset
     3
subsection "Parity Analysis"
4566bac4517d improved sectioning
nipkow
parents: 67406
diff changeset
     4
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
     5
theory Abs_Int1_parity
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
     6
imports Abs_Int1
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
     7
begin
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
     8
58310
91ea607a34d8 updated news
blanchet
parents: 58249
diff changeset
     9
datatype parity = Even | Odd | Either
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    10
69597
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 69505
diff changeset
    11
text\<open>Instantiation of class \<^class>\<open>order\<close> with type \<^typ>\<open>parity\<close>:\<close>
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    12
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    13
instantiation parity :: order
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    14
begin
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    15
69505
cc2d676d5395 isabelle update_cartouches -t;
wenzelm
parents: 68778
diff changeset
    16
text\<open>First the definition of the interface function \<open>\<le>\<close>. Note that
69597
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 69505
diff changeset
    17
the header of the definition must refer to the ascii name \<^const>\<open>less_eq\<close> of the
69505
cc2d676d5395 isabelle update_cartouches -t;
wenzelm
parents: 68778
diff changeset
    18
constants as \<open>less_eq_parity\<close> and the definition is named \<open>less_eq_parity_def\<close>.  Inside the definition the symbolic names can be used.\<close>
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    19
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    20
definition less_eq_parity where
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    21
"x \<le> y = (y = Either \<or> x=y)"
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    22
69505
cc2d676d5395 isabelle update_cartouches -t;
wenzelm
parents: 68778
diff changeset
    23
text\<open>We also need \<open><\<close>, which is defined canonically:\<close>
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    24
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    25
definition less_parity where
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    26
"x < y = (x \<le> y \<and> \<not> y \<le> (x::parity))"
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    27
67406
23307fd33906 isabelle update_cartouches -c;
wenzelm
parents: 64593
diff changeset
    28
text\<open>\noindent(The type annotation is necessary to fix the type of the polymorphic predicates.)
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    29
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    30
Now the instance proof, i.e.\ the proof that the definition fulfills
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    31
the axioms (assumptions) of the class. The initial proof-step generates the
67406
23307fd33906 isabelle update_cartouches -c;
wenzelm
parents: 64593
diff changeset
    32
necessary proof obligations.\<close>
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    33
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    34
instance
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    35
proof
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    36
  fix x::parity show "x \<le> x" by(auto simp: less_eq_parity_def)
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    37
next
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    38
  fix x y z :: parity assume "x \<le> y" "y \<le> z" thus "x \<le> z"
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    39
    by(auto simp: less_eq_parity_def)
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    40
next
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    41
  fix x y :: parity assume "x \<le> y" "y \<le> x" thus "x = y"
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    42
    by(auto simp: less_eq_parity_def)
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    43
next
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    44
  fix x y :: parity show "(x < y) = (x \<le> y \<and> \<not> y \<le> x)" by(rule less_parity_def)
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    45
qed
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    46
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    47
end
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    48
69597
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 69505
diff changeset
    49
text\<open>Instantiation of class \<^class>\<open>semilattice_sup_top\<close> with type \<^typ>\<open>parity\<close>:\<close>
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    50
51826
054a40461449 canonical names of classes
nipkow
parents: 51711
diff changeset
    51
instantiation parity :: semilattice_sup_top
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    52
begin
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    53
51389
8a9f0503b1c0 factored out Step
nipkow
parents: 51372
diff changeset
    54
definition sup_parity where
51624
nipkow
parents: 51389
diff changeset
    55
"x \<squnion> y = (if x = y then x else Either)"
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    56
51359
00b45c7e831f major redesign: order instead of preorder, new definition of intervals as quotients
nipkow
parents: 51036
diff changeset
    57
definition top_parity where
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    58
"\<top> = Either"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    59
67406
23307fd33906 isabelle update_cartouches -c;
wenzelm
parents: 64593
diff changeset
    60
text\<open>Now the instance proof. This time we take a shortcut with the help of
69505
cc2d676d5395 isabelle update_cartouches -t;
wenzelm
parents: 68778
diff changeset
    61
proof method \<open>goal_cases\<close>: it creates cases 1 ... n for the subgoals
61179
16775cad1a5c goali -> i
nipkow
parents: 58310
diff changeset
    62
1 ... n; in case i, i is also the name of the assumptions of subgoal i and
69505
cc2d676d5395 isabelle update_cartouches -t;
wenzelm
parents: 68778
diff changeset
    63
\<open>case?\<close> refers to the conclusion of subgoal i.
67406
23307fd33906 isabelle update_cartouches -c;
wenzelm
parents: 64593
diff changeset
    64
The class axioms are presented in the same order as in the class definition.\<close>
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    65
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    66
instance
61179
16775cad1a5c goali -> i
nipkow
parents: 58310
diff changeset
    67
proof (standard, goal_cases)
16775cad1a5c goali -> i
nipkow
parents: 58310
diff changeset
    68
  case 1 (*sup1*) show ?case by(auto simp: less_eq_parity_def sup_parity_def)
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    69
next
61179
16775cad1a5c goali -> i
nipkow
parents: 58310
diff changeset
    70
  case 2 (*sup2*) show ?case by(auto simp: less_eq_parity_def sup_parity_def)
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    71
next
61179
16775cad1a5c goali -> i
nipkow
parents: 58310
diff changeset
    72
  case 3 (*sup least*) thus ?case by(auto simp: less_eq_parity_def sup_parity_def)
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    73
next
61179
16775cad1a5c goali -> i
nipkow
parents: 58310
diff changeset
    74
  case 4 (*top*) show ?case by(auto simp: less_eq_parity_def top_parity_def)
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    75
qed
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    76
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    77
end
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    78
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    79
67406
23307fd33906 isabelle update_cartouches -c;
wenzelm
parents: 64593
diff changeset
    80
text\<open>Now we define the functions used for instantiating the abstract
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    81
interpretation locales. Note that the Isabelle terminology is
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    82
\emph{interpretation}, not \emph{instantiation} of locales, but we use
67406
23307fd33906 isabelle update_cartouches -c;
wenzelm
parents: 64593
diff changeset
    83
instantiation to avoid confusion with abstract interpretation.\<close>
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    84
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    85
fun \<gamma>_parity :: "parity \<Rightarrow> val set" where
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    86
"\<gamma>_parity Even = {i. i mod 2 = 0}" |
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    87
"\<gamma>_parity Odd  = {i. i mod 2 = 1}" |
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    88
"\<gamma>_parity Either = UNIV"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    89
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    90
fun num_parity :: "val \<Rightarrow> parity" where
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    91
"num_parity i = (if i mod 2 = 0 then Even else Odd)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    92
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    93
fun plus_parity :: "parity \<Rightarrow> parity \<Rightarrow> parity" where
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    94
"plus_parity Even Even = Even" |
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    95
"plus_parity Odd  Odd  = Even" |
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    96
"plus_parity Even Odd  = Odd" |
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    97
"plus_parity Odd  Even = Odd" |
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    98
"plus_parity Either y  = Either" |
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
    99
"plus_parity x Either  = Either"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   100
67406
23307fd33906 isabelle update_cartouches -c;
wenzelm
parents: 64593
diff changeset
   101
text\<open>First we instantiate the abstract value interface and prove that the
69597
ff784d5a5bfb isabelle update -u control_cartouches;
wenzelm
parents: 69505
diff changeset
   102
functions on type \<^typ>\<open>parity\<close> have all the necessary properties:\<close>
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   103
61890
f6ded81f5690 abandoned attempt to unify sublocale and interpretation into global theories
haftmann
parents: 61671
diff changeset
   104
global_interpretation Val_semilattice
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   105
where \<gamma> = \<gamma>_parity and num' = num_parity and plus' = plus_parity
67406
23307fd33906 isabelle update_cartouches -c;
wenzelm
parents: 64593
diff changeset
   106
proof (standard, goal_cases) txt\<open>subgoals are the locale axioms\<close>
61179
16775cad1a5c goali -> i
nipkow
parents: 58310
diff changeset
   107
  case 1 thus ?case by(auto simp: less_eq_parity_def)
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   108
next
61179
16775cad1a5c goali -> i
nipkow
parents: 58310
diff changeset
   109
  case 2 show ?case by(auto simp: top_parity_def)
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   110
next
61179
16775cad1a5c goali -> i
nipkow
parents: 58310
diff changeset
   111
  case 3 show ?case by auto
16775cad1a5c goali -> i
nipkow
parents: 58310
diff changeset
   112
next
16775cad1a5c goali -> i
nipkow
parents: 58310
diff changeset
   113
  case (4 _ a1 _ a2) thus ?case
64593
50c715579715 reoriented congruence rules in non-explosive direction
haftmann
parents: 61890
diff changeset
   114
    by (induction a1 a2 rule: plus_parity.induct)
50c715579715 reoriented congruence rules in non-explosive direction
haftmann
parents: 61890
diff changeset
   115
      (auto simp add: mod_add_eq [symmetric])
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   116
qed
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   117
67406
23307fd33906 isabelle update_cartouches -c;
wenzelm
parents: 64593
diff changeset
   118
text\<open>In case 4 we needed to refer to particular variables.
61179
16775cad1a5c goali -> i
nipkow
parents: 58310
diff changeset
   119
Writing (i x y z) fixes the names of the variables in case i to be x, y and z
16775cad1a5c goali -> i
nipkow
parents: 58310
diff changeset
   120
in the left-to-right order in which the variables occur in the subgoal.
67406
23307fd33906 isabelle update_cartouches -c;
wenzelm
parents: 64593
diff changeset
   121
Underscores are anonymous placeholders for variable names we don't care to fix.\<close>
61179
16775cad1a5c goali -> i
nipkow
parents: 58310
diff changeset
   122
67406
23307fd33906 isabelle update_cartouches -c;
wenzelm
parents: 64593
diff changeset
   123
text\<open>Instantiating the abstract interpretation locale requires no more
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   124
proofs (they happened in the instatiation above) but delivers the
69505
cc2d676d5395 isabelle update_cartouches -t;
wenzelm
parents: 68778
diff changeset
   125
instantiated abstract interpreter which we call \<open>AI_parity\<close>:\<close>
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   126
61890
f6ded81f5690 abandoned attempt to unify sublocale and interpretation into global theories
haftmann
parents: 61671
diff changeset
   127
global_interpretation Abs_Int
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   128
where \<gamma> = \<gamma>_parity and num' = num_parity and plus' = plus_parity
61671
20d4cd2ceab2 prefer "rewrites" and "defines" to note rewrite morphisms
haftmann
parents: 61179
diff changeset
   129
defines aval_parity = aval' and step_parity = step' and AI_parity = AI
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   130
..
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   131
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   132
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   133
subsubsection "Tests"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   134
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   135
definition "test1_parity =
52046
bc01725d7918 replaced `;' by `;;' to disambiguate syntax; unexpected slight increase in build time
nipkow
parents: 51826
diff changeset
   136
  ''x'' ::= N 1;;
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   137
  WHILE Less (V ''x'') (N 100) DO ''x'' ::= Plus (V ''x'') (N 2)"
56927
4044a7d1720f hardcoded nbe and sml into value command
haftmann
parents: 55600
diff changeset
   138
value "show_acom (the(AI_parity test1_parity))"
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   139
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   140
definition "test2_parity =
52046
bc01725d7918 replaced `;' by `;;' to disambiguate syntax; unexpected slight increase in build time
nipkow
parents: 51826
diff changeset
   141
  ''x'' ::= N 1;;
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   142
  WHILE Less (V ''x'') (N 100) DO ''x'' ::= Plus (V ''x'') (N 3)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   143
51711
df3426139651 complete revision: finally got rid of annoying L-predicate
nipkow
parents: 51625
diff changeset
   144
definition "steps c i = ((step_parity \<top>) ^^ i) (bot c)"
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   145
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   146
value "show_acom (steps test2_parity 0)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   147
value "show_acom (steps test2_parity 1)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   148
value "show_acom (steps test2_parity 2)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   149
value "show_acom (steps test2_parity 3)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   150
value "show_acom (steps test2_parity 4)"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   151
value "show_acom (steps test2_parity 5)"
49188
22f7e7b68f50 adjusted examples
nipkow
parents: 47613
diff changeset
   152
value "show_acom (steps test2_parity 6)"
50995
nipkow
parents: 49433
diff changeset
   153
value "show_acom (the(AI_parity test2_parity))"
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   154
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   155
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   156
subsubsection "Termination"
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   157
61890
f6ded81f5690 abandoned attempt to unify sublocale and interpretation into global theories
haftmann
parents: 61671
diff changeset
   158
global_interpretation Abs_Int_mono
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   159
where \<gamma> = \<gamma>_parity and num' = num_parity and plus' = plus_parity
61179
16775cad1a5c goali -> i
nipkow
parents: 58310
diff changeset
   160
proof (standard, goal_cases)
16775cad1a5c goali -> i
nipkow
parents: 58310
diff changeset
   161
  case (1 _ a1 _ a2) thus ?case
52525
1e09c034d6c3 tund proofs
nipkow
parents: 52504
diff changeset
   162
    by(induction a1 a2 rule: plus_parity.induct)
1e09c034d6c3 tund proofs
nipkow
parents: 52504
diff changeset
   163
      (auto simp add:less_eq_parity_def)
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   164
qed
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   165
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   166
definition m_parity :: "parity \<Rightarrow> nat" where
51389
8a9f0503b1c0 factored out Step
nipkow
parents: 51372
diff changeset
   167
"m_parity x = (if x = Either then 0 else 1)"
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   168
61890
f6ded81f5690 abandoned attempt to unify sublocale and interpretation into global theories
haftmann
parents: 61671
diff changeset
   169
global_interpretation Abs_Int_measure
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   170
where \<gamma> = \<gamma>_parity and num' = num_parity and plus' = plus_parity
49433
nipkow
parents: 49399
diff changeset
   171
and m = m_parity and h = "1"
61179
16775cad1a5c goali -> i
nipkow
parents: 58310
diff changeset
   172
proof (standard, goal_cases)
16775cad1a5c goali -> i
nipkow
parents: 58310
diff changeset
   173
  case 1 thus ?case by(auto simp add: m_parity_def less_eq_parity_def)
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   174
next
61179
16775cad1a5c goali -> i
nipkow
parents: 58310
diff changeset
   175
  case 2 thus ?case by(auto simp add: m_parity_def less_eq_parity_def less_parity_def)
47613
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   176
qed
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   177
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   178
thm AI_Some_measure
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   179
e72e44cee6f2 added revised version of Abs_Int
nipkow
parents:
diff changeset
   180
end