src/HOL/IMPP/Misc.thy
author wenzelm
Thu, 22 Dec 2005 00:28:36 +0100
changeset 18457 356a9f711899
parent 17477 ceb42ea2f223
child 19803 aa2581752afb
permissions -rw-r--r--
structure ProjectRule; updated auxiliary facts for induct method; tuned proofs;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8177
e59e93ad85eb added IMPP to HOL
oheimb
parents:
diff changeset
     1
(*  Title:      HOL/IMPP/Misc.thy
e59e93ad85eb added IMPP to HOL
oheimb
parents:
diff changeset
     2
    ID:         $Id$
e59e93ad85eb added IMPP to HOL
oheimb
parents:
diff changeset
     3
    Author:     David von Oheimb
e59e93ad85eb added IMPP to HOL
oheimb
parents:
diff changeset
     4
    Copyright   1999 TUM
17477
ceb42ea2f223 converted to Isar theory format;
wenzelm
parents: 8177
diff changeset
     5
*)
8177
e59e93ad85eb added IMPP to HOL
oheimb
parents:
diff changeset
     6
17477
ceb42ea2f223 converted to Isar theory format;
wenzelm
parents: 8177
diff changeset
     7
header {* Several examples for Hoare logic *}
ceb42ea2f223 converted to Isar theory format;
wenzelm
parents: 8177
diff changeset
     8
ceb42ea2f223 converted to Isar theory format;
wenzelm
parents: 8177
diff changeset
     9
theory Misc
ceb42ea2f223 converted to Isar theory format;
wenzelm
parents: 8177
diff changeset
    10
imports Hoare
ceb42ea2f223 converted to Isar theory format;
wenzelm
parents: 8177
diff changeset
    11
begin
8177
e59e93ad85eb added IMPP to HOL
oheimb
parents:
diff changeset
    12
e59e93ad85eb added IMPP to HOL
oheimb
parents:
diff changeset
    13
defs
17477
ceb42ea2f223 converted to Isar theory format;
wenzelm
parents: 8177
diff changeset
    14
  newlocs_def: "newlocs       == %x. arbitrary"
ceb42ea2f223 converted to Isar theory format;
wenzelm
parents: 8177
diff changeset
    15
  setlocs_def: "setlocs s l'  == case s of st g l => st g l'"
ceb42ea2f223 converted to Isar theory format;
wenzelm
parents: 8177
diff changeset
    16
  getlocs_def: "getlocs s     == case s of st g l => l"
ceb42ea2f223 converted to Isar theory format;
wenzelm
parents: 8177
diff changeset
    17
   update_def: "update s vn v == case vn of
ceb42ea2f223 converted to Isar theory format;
wenzelm
parents: 8177
diff changeset
    18
                               Glb gn => (case s of st g l => st (g(gn:=v)) l)
ceb42ea2f223 converted to Isar theory format;
wenzelm
parents: 8177
diff changeset
    19
                             | Loc ln => (case s of st g l => st g (l(ln:=v)))"
ceb42ea2f223 converted to Isar theory format;
wenzelm
parents: 8177
diff changeset
    20
ceb42ea2f223 converted to Isar theory format;
wenzelm
parents: 8177
diff changeset
    21
ML {* use_legacy_bindings (the_context ()) *}
8177
e59e93ad85eb added IMPP to HOL
oheimb
parents:
diff changeset
    22
e59e93ad85eb added IMPP to HOL
oheimb
parents:
diff changeset
    23
end