src/HOLCF/cprod3.thy
author wenzelm
Thu Aug 27 20:46:36 1998 +0200 (1998-08-27)
changeset 5400 645f46a24c72
parent 243 c22b85994e17
permissions -rw-r--r--
made tutorial first;
nipkow@243
     1
(*  Title: 	HOLCF/cprod3.thy
nipkow@243
     2
    ID:         $Id$
nipkow@243
     3
    Author: 	Franz Regensburger
nipkow@243
     4
    Copyright   1993 Technische Universitaet Muenchen
nipkow@243
     5
nipkow@243
     6
nipkow@243
     7
Class instance of  * for class pcpo
nipkow@243
     8
nipkow@243
     9
*)
nipkow@243
    10
nipkow@243
    11
Cprod3 = Cprod2 +
nipkow@243
    12
nipkow@243
    13
arities "*" :: (pcpo,pcpo)pcpo			(* Witness cprod2.ML *)
nipkow@243
    14
nipkow@243
    15
consts  
nipkow@243
    16
	"@cpair"     :: "'a => 'b => ('a*'b)" ("_#_" [101,100] 100)
nipkow@243
    17
	"cop @cpair" :: "'a -> 'b -> ('a*'b)" ("cpair")
nipkow@243
    18
					(* continuous  pairing *)
nipkow@243
    19
	cfst         :: "('a*'b)->'a"
nipkow@243
    20
	csnd         :: "('a*'b)->'b"
nipkow@243
    21
	csplit       :: "('a->'b->'c)->('a*'b)->'c"
nipkow@243
    22
nipkow@243
    23
rules 
nipkow@243
    24
nipkow@243
    25
inst_cprod_pcpo	"UU::'a*'b = <UU,UU>"
nipkow@243
    26
nipkow@243
    27
cpair_def	"cpair  == (LAM x y.<x,y>)"
nipkow@243
    28
cfst_def	"cfst   == (LAM p.fst(p))"
nipkow@243
    29
csnd_def	"csnd   == (LAM p.snd(p))"	
nipkow@243
    30
csplit_def	"csplit == (LAM f p.f[cfst[p]][csnd[p]])"
nipkow@243
    31
nipkow@243
    32
end
nipkow@243
    33
nipkow@243
    34
ML
nipkow@243
    35
nipkow@243
    36
(* ----------------------------------------------------------------------*)
nipkow@243
    37
(* parse translations for the above mixfix                               *)
nipkow@243
    38
(* ----------------------------------------------------------------------*)
nipkow@243
    39
nipkow@243
    40
val parse_translation = [("@cpair",mk_cinfixtr "@cpair")];
nipkow@243
    41
nipkow@243
    42
nipkow@243
    43