author | wenzelm |
Fri, 05 Oct 2001 21:49:59 +0200 | |
changeset 11699 | c7df55158574 |
parent 10834 | a7897aebbffc |
child 12030 | 46d57d0290a2 |
permissions | -rw-r--r-- |
2640 | 1 |
(* Title: HOLCF/Ssum0.thy |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
2 |
ID: $Id$ |
1479 | 3 |
Author: Franz Regensburger |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
4 |
Copyright 1993 Technische Universitaet Muenchen |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
5 |
|
2640 | 6 |
Strict sum with typedef |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
7 |
*) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
8 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
9 |
Ssum0 = Cfun3 + |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
10 |
|
2640 | 11 |
constdefs |
12 |
Sinl_Rep :: ['a,'a,'b,bool]=>bool |
|
13 |
"Sinl_Rep == (%a.%x y p. (a~=UU --> x=a & p))" |
|
14 |
Sinr_Rep :: ['b,'a,'b,bool]=>bool |
|
15 |
"Sinr_Rep == (%b.%x y p.(b~=UU --> y=b & ~p))" |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
16 |
|
2640 | 17 |
typedef (Ssum) ('a, 'b) "++" (infixr 10) = |
6382 | 18 |
"{f.(? a. f=Sinl_Rep(a::'a))|(? b. f=Sinr_Rep(b::'b))}" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
19 |
|
2394 | 20 |
syntax (symbols) |
2640 | 21 |
"++" :: [type, type] => type ("(_ \\<oplus>/ _)" [21, 20] 20) |
2394 | 22 |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
23 |
consts |
1479 | 24 |
Isinl :: "'a => ('a ++ 'b)" |
25 |
Isinr :: "'b => ('a ++ 'b)" |
|
26 |
Iwhen :: "('a->'c)=>('b->'c)=>('a ++ 'b)=> 'c" |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
27 |
|
1168
74be52691d62
The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents:
1150
diff
changeset
|
28 |
defs (*defining the abstract constants*) |
1479 | 29 |
Isinl_def "Isinl(a) == Abs_Ssum(Sinl_Rep(a))" |
30 |
Isinr_def "Isinr(b) == Abs_Ssum(Sinr_Rep(b))" |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
31 |
|
1479 | 32 |
Iwhen_def "Iwhen(f)(g)(s) == @z. |
33 |
(s=Isinl(UU) --> z=UU) |
|
10834 | 34 |
&(!a. a~=UU & s=Isinl(a) --> z=f$a) |
35 |
&(!b. b~=UU & s=Isinr(b) --> z=g$b)" |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
36 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
37 |
end |