src/ZF/QPair.thy
author lcp
Tue Mar 07 13:18:48 1995 +0100 (1995-03-07)
changeset 929 137035296ad6
parent 753 ec86863e87c8
child 1097 01379c46ad2d
permissions -rw-r--r--
Moved declarations of @QSUM and <*> to a syntax section.
Changed print_translation because <*> is now an infix.
clasohm@0
     1
(*  Title: 	ZF/qpair.thy
clasohm@0
     2
    ID:         $Id$
clasohm@0
     3
    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
clasohm@0
     4
    Copyright   1993  University of Cambridge
clasohm@0
     5
clasohm@0
     6
Quine-inspired ordered pairs and disjoint sums, for non-well-founded data
clasohm@0
     7
structures in ZF.  Does not precisely follow Quine's construction.  Thanks
clasohm@0
     8
to Thomas Forster for suggesting this approach!
clasohm@0
     9
clasohm@0
    10
W. V. Quine, On Ordered Pairs and Relations, in Selected Logic Papers,
clasohm@0
    11
1966.
clasohm@0
    12
*)
clasohm@0
    13
clasohm@124
    14
QPair = Sum + "simpdata" +
clasohm@0
    15
consts
clasohm@0
    16
  QPair     :: "[i, i] => i"               	("<(_;/ _)>")
clasohm@0
    17
  qsplit    :: "[[i,i] => i, i] => i"
clasohm@0
    18
  qfsplit   :: "[[i,i] => o, i] => o"
clasohm@0
    19
  qconverse :: "i => i"
clasohm@0
    20
  QSigma    :: "[i, i => i] => i"
clasohm@0
    21
clasohm@0
    22
  "<+>"     :: "[i,i]=>i"      			(infixr 65)
clasohm@0
    23
  QInl,QInr :: "i=>i"
clasohm@0
    24
  qcase     :: "[i=>i, i=>i, i]=>i"
clasohm@0
    25
lcp@929
    26
syntax
lcp@929
    27
  "@QSUM"   :: "[idt, i, i] => i"               ("(3QSUM _:_./ _)" 10)
lcp@929
    28
  "<*>"     :: "[i, i] => i"         		(infixr 80)
lcp@929
    29
clasohm@0
    30
translations
clasohm@0
    31
  "QSUM x:A. B"  => "QSigma(A, %x. B)"
wenzelm@44
    32
  "A <*> B"      => "QSigma(A, _K(B))"
clasohm@0
    33
lcp@753
    34
defs
clasohm@0
    35
  QPair_def       "<a;b> == a+b"
lcp@120
    36
  qsplit_def      "qsplit(c,p)  == THE y. EX a b. p=<a;b> & y=c(a,b)"
clasohm@0
    37
  qfsplit_def     "qfsplit(R,z) == EX x y. z=<x;y> & R(x,y)"
clasohm@0
    38
  qconverse_def   "qconverse(r) == {z. w:r, EX x y. w=<x;y> & z=<y;x>}"
clasohm@0
    39
  QSigma_def      "QSigma(A,B)  ==  UN x:A. UN y:B(x). {<x;y>}"
clasohm@0
    40
lcp@120
    41
  qsum_def        "A <+> B      == ({0} <*> A) Un ({1} <*> B)"
clasohm@0
    42
  QInl_def        "QInl(a)      == <0;a>"
clasohm@0
    43
  QInr_def        "QInr(b)      == <1;b>"
clasohm@0
    44
  qcase_def       "qcase(c,d)   == qsplit(%y z. cond(y, d(z), c(z)))"
clasohm@0
    45
end
clasohm@0
    46
clasohm@0
    47
ML
clasohm@0
    48
clasohm@0
    49
val print_translation =
lcp@929
    50
  [("QSigma", dependent_tr' ("@QSUM", "op <*>"))];