src/ZF/Sum.thy
author paulson
Fri, 16 Feb 1996 18:00:47 +0100
changeset 1512 ce37c64244c0
parent 1478 2b8c2a7547ab
child 2469 b50b8c0eec01
permissions -rw-r--r--
Elimination of fully-functorial style. Type tactic changed to a type abbrevation (from a datatype). Constructor tactic and function apply deleted.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
     1
(*  Title:      ZF/sum.thy
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
    ID:         $Id$
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
0
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
Disjoint sums in Zermelo-Fraenkel Set Theory 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     7
"Part" primitive for simultaneous recursive type definitions
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     9
124
858ab9a9b047 made pseudo theories for all ML files;
clasohm
parents: 0
diff changeset
    10
Sum = Bool + "simpdata" +
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    11
consts
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    12
    "+"         :: [i,i]=>i                     (infixr 65)
1401
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 1108
diff changeset
    13
    Inl,Inr     :: i=>i
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 1108
diff changeset
    14
    case        :: [i=>i, i=>i, i]=>i
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 1108
diff changeset
    15
    Part        :: [i,i=>i] => i
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    16
753
ec86863e87c8 replaced "rules" by "defs"
lcp
parents: 124
diff changeset
    17
defs
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    18
    sum_def     "A+B == {0}*A Un {1}*B"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    19
    Inl_def     "Inl(a) == <0,a>"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    20
    Inr_def     "Inr(b) == <1,b>"
1108
22b256c8c9fb case is defined using pattern-matching
lcp
parents: 753
diff changeset
    21
    case_def    "case(c,d) == (%<y,z>. cond(y, d(z), c(z)))"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    22
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    23
  (*operator for selecting out the various summands*)
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    24
    Part_def    "Part(A,h) == {x: A. EX z. x = h(z)}"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    25
end