src/HOLCF/IOA/ABP/Abschannel_finite.thy
author wenzelm
Tue, 10 Jul 2007 23:29:43 +0200
changeset 23719 ccd9cb15c062
parent 19738 1ac610922636
child 25135 4f8176c940cf
permissions -rw-r--r--
more markup for inner and outer syntax; added enclose;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
     1
(*  Title:      HOLCF/IOA/ABP/Abschannels.thy
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
     2
    ID:         $Id$
12218
wenzelm
parents: 6468
diff changeset
     3
    Author:     Olaf Müller
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
     4
*)
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
     5
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
     6
header {* The transmission channel -- finite version *}
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
     7
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
     8
theory Abschannel_finite
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
     9
imports Abschannel IOA Action Lemmas
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    10
begin
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    11
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    12
consts
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    13
6468
a7b1669f5365 put types into "" because of signature clash;
mueller
parents: 5192
diff changeset
    14
ch_fin_asig  :: "'a abs_action signature"
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    15
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    16
ch_fin_trans :: "('a abs_action, 'a list)transition set"
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    17
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    18
ch_fin_ioa   :: "('a abs_action, 'a list)ioa"
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    19
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    20
srch_fin_asig  :: "'m action signature"
6468
a7b1669f5365 put types into "" because of signature clash;
mueller
parents: 5192
diff changeset
    21
rsch_fin_asig  :: "'m action signature"
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    22
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    23
srch_fin_trans :: "('m action, 'm packet list)transition set"
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    24
rsch_fin_trans :: "('m action, bool list)transition set"
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    25
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    26
srch_fin_ioa   :: "('m action, 'm packet list)ioa"
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    27
rsch_fin_ioa   :: "('m action, bool list)ioa"
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    28
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    29
reverse        :: "'a list => 'a list"
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    30
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    31
primrec
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    32
  reverse_Nil:  "reverse([]) = []"
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    33
  reverse_Cons: "reverse(x#xs) =  reverse(xs)@[x]"
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    34
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    35
defs
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    36
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    37
srch_fin_asig_def: "srch_fin_asig == asig_of(srch_fin_ioa)"
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    38
rsch_fin_asig_def: "rsch_fin_asig == asig_of(rsch_fin_ioa)"
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    39
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    40
srch_fin_trans_def: "srch_fin_trans == trans_of(srch_fin_ioa)"
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    41
rsch_fin_trans_def: "rsch_fin_trans == trans_of(rsch_fin_ioa)"
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    42
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    43
srch_fin_ioa_def: "srch_fin_ioa == rename ch_fin_ioa  srch_actions"
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    44
rsch_fin_ioa_def: "rsch_fin_ioa == rename ch_fin_ioa  rsch_actions"
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    45
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    46
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    47
ch_fin_asig_def: "ch_fin_asig == ch_asig"
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    48
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    49
ch_fin_trans_def: "ch_fin_trans ==
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    50
 {tr. let s = fst(tr);
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    51
          t = snd(snd(tr))
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    52
      in
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    53
      case fst(snd(tr))
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    54
        of S(b) => ((t = s) |
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    55
                   (if (b=hd(reverse(s)) & s~=[]) then  t=s else  t=s@[b])) |
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    56
           R(b) => s ~= [] &
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    57
                    b = hd(s) &
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    58
                    ((t = s) | (t = tl(s)))    }"
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    59
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    60
ch_fin_ioa_def: "ch_fin_ioa == (ch_fin_asig, {[]}, ch_fin_trans,{},{})"
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    61
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    62
end