src/ZF/ex/CoUnit.thy
author wenzelm
Fri, 07 Mar 1997 11:48:46 +0100
changeset 2754 59bd96046ad6
parent 1478 2b8c2a7547ab
child 11316 b4e71bd751e4
permissions -rw-r--r--
moved settings comment to build;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
     1
(*  Title:      ZF/ex/CoUnit.ML
515
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
     2
    ID:         $Id$
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
515
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
     4
    Copyright   1994  University of Cambridge
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
     5
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
     6
Trivial codatatype definitions, one of which goes wrong!
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
     7
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
     8
See discussion in 
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
     9
  L C Paulson.  A Concrete Final Coalgebra Theorem for ZF Set Theory.
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    10
  Report 334,  Cambridge University Computer Laboratory.  1994.
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    11
*)
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    12
810
91c68f74f458 removed quotes around "Datatype",
lcp
parents: 515
diff changeset
    13
CoUnit = Datatype +
515
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    14
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    15
(*This degenerate definition does not work well because the one constructor's
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    16
  definition is trivial!  The same thing occurs with Aczel's Special Final
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    17
  Coalgebra Theorem
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    18
*)
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    19
consts
1401
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 810
diff changeset
    20
  counit :: i
515
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    21
codatatype
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    22
  "counit" = Con ("x: counit")
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    23
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    24
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    25
(*A similar example, but the constructor is non-degenerate and it works!
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    26
  The resulting set is a singleton.
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    27
*)
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    28
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    29
consts
1401
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 810
diff changeset
    30
  counit2 :: i
515
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    31
codatatype
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    32
  "counit2" = Con2 ("x: counit2", "y: counit2")
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    33
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    34
end