src/ZF/IMP/Denotation.thy
author clasohm
Sat, 09 Dec 1995 13:36:11 +0100
changeset 1401 0c439768f45c
parent 1155 928a16e02f9f
child 1478 2b8c2a7547ab
permissions -rw-r--r--
removed quotes from consts and syntax sections
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
     1
(*  Title: 	ZF/IMP/Denotation.thy
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
     2
    ID:         $Id$
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
     3
    Author: 	Heiko Loetzbeyer & Robert Sandner, TUM
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
     4
    Copyright   1994 TUM
511
b2be4790da7a re-organized using new theory sections
lcp
parents: 500
diff changeset
     5
b2be4790da7a re-organized using new theory sections
lcp
parents: 500
diff changeset
     6
Denotational semantics of expressions & commands
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
     7
*)
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
     8
511
b2be4790da7a re-organized using new theory sections
lcp
parents: 500
diff changeset
     9
Denotation = Com + 
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    10
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    11
consts
1401
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 1155
diff changeset
    12
  A     :: i => i => i
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 1155
diff changeset
    13
  B     :: i => i => i
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 1155
diff changeset
    14
  C     :: i => i
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 1155
diff changeset
    15
  Gamma :: [i,i,i] => i
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    16
753
ec86863e87c8 replaced "rules" by "defs"
lcp
parents: 511
diff changeset
    17
rules	(*NOT definitional*)
511
b2be4790da7a re-organized using new theory sections
lcp
parents: 500
diff changeset
    18
  A_nat_def	"A(N(n)) == (%sigma. n)"
b2be4790da7a re-organized using new theory sections
lcp
parents: 500
diff changeset
    19
  A_loc_def	"A(X(x)) == (%sigma. sigma`x)" 
b2be4790da7a re-organized using new theory sections
lcp
parents: 500
diff changeset
    20
  A_op1_def	"A(Op1(f,a)) == (%sigma. f`A(a,sigma))"
b2be4790da7a re-organized using new theory sections
lcp
parents: 500
diff changeset
    21
  A_op2_def	"A(Op2(f,a0,a1)) == (%sigma. f`<A(a0,sigma),A(a1,sigma)>)"
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    22
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    23
511
b2be4790da7a re-organized using new theory sections
lcp
parents: 500
diff changeset
    24
  B_true_def	"B(true) == (%sigma. 1)"
b2be4790da7a re-organized using new theory sections
lcp
parents: 500
diff changeset
    25
  B_false_def	"B(false) == (%sigma. 0)"
b2be4790da7a re-organized using new theory sections
lcp
parents: 500
diff changeset
    26
  B_op_def	"B(ROp(f,a0,a1)) == (%sigma. f`<A(a0,sigma),A(a1,sigma)>)" 
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    27
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    28
511
b2be4790da7a re-organized using new theory sections
lcp
parents: 500
diff changeset
    29
  B_not_def	"B(noti(b)) == (%sigma. not(B(b,sigma)))"
b2be4790da7a re-organized using new theory sections
lcp
parents: 500
diff changeset
    30
  B_and_def	"B(b0 andi b1) == (%sigma. B(b0,sigma) and B(b1,sigma))"
b2be4790da7a re-organized using new theory sections
lcp
parents: 500
diff changeset
    31
  B_or_def	"B(b0 ori b1) == (%sigma. B(b0,sigma) or B(b1,sigma))"
b2be4790da7a re-organized using new theory sections
lcp
parents: 500
diff changeset
    32
b2be4790da7a re-organized using new theory sections
lcp
parents: 500
diff changeset
    33
  C_skip_def	"C(skip) == id(loc->nat)"
1155
928a16e02f9f removed \...\ inside strings
clasohm
parents: 753
diff changeset
    34
  C_assign_def	"C(x := a) == {io:(loc->nat)*(loc->nat). 
928a16e02f9f removed \...\ inside strings
clasohm
parents: 753
diff changeset
    35
			       snd(io) = fst(io)[A(a,fst(io))/x]}"
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    36
511
b2be4790da7a re-organized using new theory sections
lcp
parents: 500
diff changeset
    37
  C_comp_def	"C(c0 ; c1) == C(c1) O C(c0)"
1155
928a16e02f9f removed \...\ inside strings
clasohm
parents: 753
diff changeset
    38
  C_if_def	"C(ifc b then c0 else c1) == {io:C(c0). B(b,fst(io))=1} Un 
928a16e02f9f removed \...\ inside strings
clasohm
parents: 753
diff changeset
    39
			 	             {io:C(c1). B(b,fst(io))=0}"
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    40
1155
928a16e02f9f removed \...\ inside strings
clasohm
parents: 753
diff changeset
    41
  Gamma_def	"Gamma(b,c) == (%phi.{io : (phi O C(c)). B(b,fst(io))=1} Un 
928a16e02f9f removed \...\ inside strings
clasohm
parents: 753
diff changeset
    42
			 	     {io : id(loc->nat). B(b,fst(io))=0})"
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    43
511
b2be4790da7a re-organized using new theory sections
lcp
parents: 500
diff changeset
    44
  C_while_def	"C(while b do c) == lfp((loc->nat)*(loc->nat), Gamma(b,c))"
482
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    45
3a4e092ba69c Initial revision
nipkow
parents:
diff changeset
    46
end