src/HOL/IOA/meta_theory/Solve.ML
author clasohm
Mon, 20 Mar 1995 15:37:03 +0100
changeset 966 3fd66f245ad7
child 972 e61b058d58d2
permissions -rw-r--r--
converted IOA with curried function application
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
966
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
     1
(*  Title:      HOL/IOA/meta_theory/Solve.ML
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
     2
    ID:         $Id$
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
     3
    Author:     Tobias Nipkow & Konrad Slind
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
     4
    Copyright   1994  TU Muenchen
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
     5
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
     6
Weak possibilities mapping (abstraction)
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
     7
*)
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
     8
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
     9
open Solve;
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    10
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    11
val SS = SS addsimps [mk_behaviour_thm,trans_in_actions];
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    12
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    13
goalw Solve.thy [is_weak_pmap_def,behaviours_def]
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    14
  "!!f. [| IOA(C); IOA(A); externals(asig_of(C)) = externals(asig_of(A)); \
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    15
\          is_weak_pmap f C A |] ==> behaviours(C) <= behaviours(A)";
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    16
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    17
  by (simp_tac(SS addsimps [has_behaviour_def])1);
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    18
  by (safe_tac set_cs);
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    19
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    20
  (* give execution of abstract automata *)
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    21
  by (res_inst_tac[("x","<mk_behaviour A (fst ex),%i.f(snd ex i)>")] bexI 1);
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    22
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    23
  (* Behaviours coincide *)
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    24
  by (asm_simp_tac (SS addsimps [mk_behaviour_def,filter_oseq_idemp])1);
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    25
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    26
  (* Use lemma *)
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    27
  by (forward_tac [states_of_exec_reachable] 1);
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    28
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    29
  (* Now show that it's an execution *)
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    30
  by (asm_full_simp_tac(SS addsimps [executions_def]) 1);
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    31
  by (safe_tac set_cs);
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    32
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    33
  (* Start states map to start states *)
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    34
  by (dtac bspec 1);
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    35
  by (atac 1);
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    36
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    37
  (* Show that it's an execution fragment *)
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    38
  by (asm_full_simp_tac (SS addsimps [is_execution_fragment_def])1);
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    39
  by (safe_tac HOL_cs);
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    40
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    41
  by (eres_inst_tac [("x","snd ex n")] allE 1);
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    42
  by (eres_inst_tac [("x","snd ex (Suc n)")] allE 1);
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    43
  by (eres_inst_tac [("x","a")] allE 1);
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    44
  by (asm_full_simp_tac SS 1);
3fd66f245ad7 converted IOA with curried function application
clasohm
parents:
diff changeset
    45
qed "trace_inclusion";