src/ZF/qpair.thy
author clasohm
Tue, 16 Nov 1993 14:24:21 +0100
changeset 124 858ab9a9b047
parent 120 09287f26bfb8
permissions -rw-r--r--
made pseudo theories for all ML files; documented dependencies between all thy and ML files
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     1
(*  Title: 	ZF/qpair.thy
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
    ID:         $Id$
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     3
    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     4
    Copyright   1993  University of Cambridge
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     5
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     6
Quine-inspired ordered pairs and disjoint sums, for non-well-founded data
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     7
structures in ZF.  Does not precisely follow Quine's construction.  Thanks
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
to Thomas Forster for suggesting this approach!
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     9
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    10
W. V. Quine, On Ordered Pairs and Relations, in Selected Logic Papers,
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    11
1966.
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    12
*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    13
124
858ab9a9b047 made pseudo theories for all ML files;
clasohm
parents: 120
diff changeset
    14
QPair = Sum + "simpdata" +
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    15
consts
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    16
  QPair     :: "[i, i] => i"               	("<(_;/ _)>")
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    17
  qsplit    :: "[[i,i] => i, i] => i"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    18
  qfsplit   :: "[[i,i] => o, i] => o"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    19
  qconverse :: "i => i"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    20
  "@QSUM"   :: "[idt, i, i] => i"               ("(3QSUM _:_./ _)" 10)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    21
  " <*>"    :: "[i, i] => i"         		("(_ <*>/ _)" [81, 80] 80)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    22
  QSigma    :: "[i, i => i] => i"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    23
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    24
  "<+>"     :: "[i,i]=>i"      			(infixr 65)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    25
  QInl,QInr :: "i=>i"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    26
  qcase     :: "[i=>i, i=>i, i]=>i"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    27
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    28
translations
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    29
  "QSUM x:A. B"  => "QSigma(A, %x. B)"
44
00597b21a6a9 added parse rule for "<*>";
wenzelm
parents: 0
diff changeset
    30
  "A <*> B"      => "QSigma(A, _K(B))"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    31
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    32
rules
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    33
  QPair_def       "<a;b> == a+b"
120
09287f26bfb8 changed all co- and co_ to co
lcp
parents: 44
diff changeset
    34
  qsplit_def      "qsplit(c,p)  == THE y. EX a b. p=<a;b> & y=c(a,b)"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    35
  qfsplit_def     "qfsplit(R,z) == EX x y. z=<x;y> & R(x,y)"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    36
  qconverse_def   "qconverse(r) == {z. w:r, EX x y. w=<x;y> & z=<y;x>}"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    37
  QSigma_def      "QSigma(A,B)  ==  UN x:A. UN y:B(x). {<x;y>}"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    38
120
09287f26bfb8 changed all co- and co_ to co
lcp
parents: 44
diff changeset
    39
  qsum_def        "A <+> B      == ({0} <*> A) Un ({1} <*> B)"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    40
  QInl_def        "QInl(a)      == <0;a>"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    41
  QInr_def        "QInr(b)      == <1;b>"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    42
  qcase_def       "qcase(c,d)   == qsplit(%y z. cond(y, d(z), c(z)))"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    43
end
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    44
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    45
ML
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    46
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    47
val print_translation =
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    48
  [("QSigma", dependent_tr' ("@QSUM", " <*>"))];