src/ZF/ex/CoUnit.thy
author lcp
Fri, 12 Aug 1994 12:28:46 +0200
changeset 515 abcc438e7c27
child 810 91c68f74f458
permissions -rw-r--r--
installation of new inductive/datatype sections
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
515
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
     1
(*  Title: 	ZF/ex/CoUnit.ML
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
     2
    ID:         $Id$
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
     3
    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
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
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    13
CoUnit = QUniv + "Datatype" +
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
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    20
  counit :: "i"
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
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    30
  counit2 :: "i"
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