| 
4565
 | 
     1  | 
(*  Title:      HOLCF/IOA/meta_theory/SimCorrectness.thy
  | 
| 
 | 
     2  | 
    ID:         $Id$
  | 
| 
12218
 | 
     3  | 
    Author:     Olaf Müller
  | 
| 
4565
 | 
     4  | 
*)
  | 
| 
 | 
     5  | 
  | 
| 
17233
 | 
     6  | 
header {* Correctness of Simulations in HOLCF/IOA *}
 | 
| 
4565
 | 
     7  | 
  | 
| 
17233
 | 
     8  | 
theory SimCorrectness
  | 
| 
 | 
     9  | 
imports Simulations
  | 
| 
 | 
    10  | 
begin
  | 
| 
 | 
    11  | 
  | 
| 
4565
 | 
    12  | 
consts
  | 
| 
 | 
    13  | 
  | 
| 
17233
 | 
    14  | 
  corresp_ex_sim   ::"('a,'s2)ioa => (('s1 *'s2)set) =>
 | 
| 
4565
 | 
    15  | 
                      ('a,'s1)execution => ('a,'s2)execution"
 | 
| 
 | 
    16  | 
  (* Note: s2 instead of s1 in last argument type !! *)
  | 
| 
 | 
    17  | 
  corresp_ex_simC  ::"('a,'s2)ioa => (('s1 * 's2)set) => ('a,'s1)pairs
 | 
| 
 | 
    18  | 
                   -> ('s2 => ('a,'s2)pairs)"
 | 
| 
 | 
    19  | 
  | 
| 
 | 
    20  | 
  | 
| 
 | 
    21  | 
defs
  | 
| 
17233
 | 
    22  | 
  | 
| 
 | 
    23  | 
corresp_ex_sim_def:
  | 
| 
4565
 | 
    24  | 
  "corresp_ex_sim A R ex == let S'= (@s'.(fst ex,s'):R & s': starts_of A)
  | 
| 
17233
 | 
    25  | 
                            in
  | 
| 
10835
 | 
    26  | 
                               (S',(corresp_ex_simC A R$(snd ex)) S')"
  | 
| 
4565
 | 
    27  | 
  | 
| 
 | 
    28  | 
  | 
| 
17233
 | 
    29  | 
corresp_ex_simC_def:
  | 
| 
 | 
    30  | 
  "corresp_ex_simC A R  == (fix$(LAM h ex. (%s. case ex of
  | 
| 
4565
 | 
    31  | 
      nil =>  nil
  | 
| 
 | 
    32  | 
    | x##xs => (flift1 (%pr. let a = (fst pr); t = (snd pr);
  | 
| 
17233
 | 
    33  | 
                                 T' = @t'. ? ex1. (t,t'):R & move A ex1 s a t'
  | 
| 
4565
 | 
    34  | 
                             in
  | 
| 
 | 
    35  | 
                                (@cex. move A cex s a T')
  | 
| 
10835
 | 
    36  | 
                                 @@ ((h$xs) T'))
  | 
| 
 | 
    37  | 
                        $x) )))"
  | 
| 
17233
 | 
    38  | 
  | 
| 
 | 
    39  | 
ML {* use_legacy_bindings (the_context ()) *}
 | 
| 
 | 
    40  | 
  | 
| 
 | 
    41  | 
end
  |