src/HOLCF/Ssum0.thy
author huffman
Wed, 02 Mar 2005 22:57:08 +0100
changeset 15563 9e125b675253
parent 14981 e73f8140af78
child 15568 41bfe19eabe2
permissions -rw-r--r--
converted to new-style theory
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents: 2394
diff changeset
     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
21eb5e156d91 expanded tabs
clasohm
parents: 1274
diff changeset
     3
    Author:     Franz Regensburger
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
     4
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents: 2394
diff changeset
     5
Strict sum with typedef
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
     6
*)
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
Ssum0 = Cfun3 +
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
     9
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents: 2394
diff changeset
    10
constdefs
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents: 2394
diff changeset
    11
  Sinl_Rep      :: ['a,'a,'b,bool]=>bool
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents: 2394
diff changeset
    12
 "Sinl_Rep == (%a.%x y p. (a~=UU --> x=a & p))"
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents: 2394
diff changeset
    13
  Sinr_Rep      :: ['b,'a,'b,bool]=>bool
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents: 2394
diff changeset
    14
 "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
    15
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents: 2394
diff changeset
    16
typedef (Ssum)  ('a, 'b) "++" (infixr 10) = 
6382
8b0c9205da75 fixed typedef representing set;
wenzelm
parents: 3842
diff changeset
    17
	"{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
    18
12114
a8e860c86252 eliminated old "symbols" syntax, use "xsymbols" instead;
wenzelm
parents: 12030
diff changeset
    19
syntax (xsymbols)
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents: 2394
diff changeset
    20
  "++"		:: [type, type] => type	("(_ \\<oplus>/ _)" [21, 20] 20)
14565
c6dc17aab88a use more symbols in HTML output
kleing
parents: 12114
diff changeset
    21
syntax (HTML output)
c6dc17aab88a use more symbols in HTML output
kleing
parents: 12114
diff changeset
    22
  "++"		:: [type, type] => type	("(_ \\<oplus>/ _)" [21, 20] 20)
2394
91d8abf108be adaptions for symbol font
oheimb
parents: 2291
diff changeset
    23
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    24
consts
1479
21eb5e156d91 expanded tabs
clasohm
parents: 1274
diff changeset
    25
  Isinl         :: "'a => ('a ++ 'b)"
21eb5e156d91 expanded tabs
clasohm
parents: 1274
diff changeset
    26
  Isinr         :: "'b => ('a ++ 'b)"
21eb5e156d91 expanded tabs
clasohm
parents: 1274
diff changeset
    27
  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
    28
1168
74be52691d62 The curried version of HOLCF is now just called HOLCF. The old
regensbu
parents: 1150
diff changeset
    29
defs   (*defining the abstract constants*)
1479
21eb5e156d91 expanded tabs
clasohm
parents: 1274
diff changeset
    30
  Isinl_def     "Isinl(a) == Abs_Ssum(Sinl_Rep(a))"
21eb5e156d91 expanded tabs
clasohm
parents: 1274
diff changeset
    31
  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
    32
1479
21eb5e156d91 expanded tabs
clasohm
parents: 1274
diff changeset
    33
  Iwhen_def     "Iwhen(f)(g)(s) == @z.
21eb5e156d91 expanded tabs
clasohm
parents: 1274
diff changeset
    34
                                    (s=Isinl(UU) --> z=UU)
10834
a7897aebbffc *** empty log message ***
nipkow
parents: 6382
diff changeset
    35
                        &(!a. a~=UU & s=Isinl(a) --> z=f$a)  
a7897aebbffc *** empty log message ***
nipkow
parents: 6382
diff changeset
    36
                        &(!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
    37
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    38
end