src/HOLCF/IOA/meta_theory/Asig.thy
author huffman
Wed, 17 Feb 2010 10:00:22 -0800
changeset 35174 e15040ae75d7
parent 25135 4f8176c940cf
permissions -rw-r--r--
remove $ from all HOLCF files
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
     1
(*  Title:      HOL/IOA/meta_theory/Asig.thy
12218
wenzelm
parents: 7661
diff changeset
     2
    Author:     Olaf Müller, Tobias Nipkow & Konrad Slind
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
     3
*)
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
     4
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
     5
header {* Action signatures *}
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
     6
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
     7
theory Asig
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
     8
imports Main
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
     9
begin
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    10
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    11
types
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    12
  'a signature = "('a set * 'a set * 'a set)"
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    13
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    14
definition
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    15
  inputs :: "'action signature => 'action set" where
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    16
  asig_inputs_def: "inputs = fst"
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    17
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    18
definition
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    19
  outputs :: "'action signature => 'action set" where
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    20
  asig_outputs_def: "outputs = (fst o snd)"
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    21
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    22
definition
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    23
  internals :: "'action signature => 'action set" where
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    24
  asig_internals_def: "internals = (snd o snd)"
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    25
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    26
definition
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    27
  actions :: "'action signature => 'action set" where
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    28
  "actions(asig) = (inputs(asig) Un outputs(asig) Un internals(asig))"
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    29
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    30
definition
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    31
  externals :: "'action signature => 'action set" where
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    32
  "externals(asig) = (inputs(asig) Un outputs(asig))"
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    33
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    34
definition
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    35
  locals :: "'action signature => 'action set" where
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    36
  "locals asig = ((internals asig) Un (outputs asig))"
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    37
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    38
definition
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    39
  is_asig :: "'action signature => bool" where
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    40
  "is_asig(triple) =
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    41
     ((inputs(triple) Int outputs(triple) = {}) &
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
    42
      (outputs(triple) Int internals(triple) = {}) &
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    43
      (inputs(triple) Int internals(triple) = {}))"
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    44
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    45
definition
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    46
  mk_ext_asig :: "'action signature => 'action signature" where
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    47
  "mk_ext_asig(triple) = (inputs(triple), outputs(triple), {})"
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    48
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    49
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    50
lemmas asig_projections = asig_inputs_def asig_outputs_def asig_internals_def
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    51
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    52
lemma asig_triple_proj:
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    53
 "(outputs    (a,b,c) = b)   &
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    54
  (inputs     (a,b,c) = a) &
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    55
  (internals  (a,b,c) = c)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    56
  apply (simp add: asig_projections)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    57
  done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    58
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    59
lemma int_and_ext_is_act: "[| a~:internals(S) ;a~:externals(S)|] ==> a~:actions(S)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    60
apply (simp add: externals_def actions_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    61
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    62
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    63
lemma ext_is_act: "[|a:externals(S)|] ==> a:actions(S)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    64
apply (simp add: externals_def actions_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    65
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    66
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    67
lemma int_is_act: "[|a:internals S|] ==> a:actions S"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    68
apply (simp add: asig_internals_def actions_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    69
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    70
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    71
lemma inp_is_act: "[|a:inputs S|] ==> a:actions S"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    72
apply (simp add: asig_inputs_def actions_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    73
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    74
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    75
lemma out_is_act: "[|a:outputs S|] ==> a:actions S"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    76
apply (simp add: asig_outputs_def actions_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    77
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    78
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    79
lemma ext_and_act: "(x: actions S & x : externals S) = (x: externals S)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    80
apply (fast intro!: ext_is_act)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    81
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    82
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    83
lemma not_ext_is_int: "[|is_asig S;x: actions S|] ==> (x~:externals S) = (x: internals S)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    84
apply (simp add: actions_def is_asig_def externals_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    85
apply blast
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    86
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    87
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    88
lemma not_ext_is_int_or_not_act: "is_asig S ==> (x~:externals S) = (x: internals S | x~:actions S)"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    89
apply (simp add: actions_def is_asig_def externals_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    90
apply blast
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    91
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    92
25135
4f8176c940cf modernized specifications ('definition', 'axiomatization');
wenzelm
parents: 19741
diff changeset
    93
lemma int_is_not_ext:
19741
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    94
 "[| is_asig (S); x:internals S |] ==> x~:externals S"
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    95
apply (unfold externals_def actions_def is_asig_def)
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    96
apply simp
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    97
apply blast
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    98
done
f65265d71426 removed legacy ML scripts;
wenzelm
parents: 17233
diff changeset
    99
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   100
17233
41eee2e7b465 converted specifications to Isar theories;
wenzelm
parents: 14981
diff changeset
   101
end