src/HOL/IOA/ABP/Correctness.thy
author lcp
Tue, 25 Apr 1995 11:14:03 +0200
changeset 1072 0140ff702b23
parent 1050 0c36c6a52a1d
child 1138 82fd99d5a6ff
permissions -rw-r--r--
updated version
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1050
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
     1
(*  Title:      HOL/IOA/ABP/Correctness.thy
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
     2
    ID:         $Id$
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
     3
    Author:     Tobias Nipkow & Olaf Mueller
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
     4
    Copyright   1994  TU Muenchen
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
     5
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
     6
The main correctness proof: System_fin implements System
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
     7
*)
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
     8
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
     9
Correctness = Solve + Env + Impl + Impl_finite + 
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    10
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    11
consts
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    12
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    13
reduce :: "'a list => 'a list"
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    14
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    15
primrec
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    16
  reduce List.list  
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    17
  reduce_Nil  "reduce [] = []"
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    18
  reduce_Cons "reduce(x#xs) =   \
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    19
\	         (case xs of   \
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    20
\	             [] => [x]   \
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    21
\	       |   y#ys => (if (x=y)   \
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    22
\	                      then reduce xs   \
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    23
\	                      else (x#(reduce xs))))"
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    24
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    25
end
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    26
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    27
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    28