src/ZF/ex/Ntree.thy
author clasohm
Tue, 06 Feb 1996 12:27:17 +0100
changeset 1478 2b8c2a7547ab
parent 1401 0c439768f45c
child 6117 f9aad8ccd590
permissions -rw-r--r--
expanded tabs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
     1
(*  Title:      ZF/ex/Ntree.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
Datatype definition n-ary branching trees
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
     7
Demonstrates a simple use of function space in a datatype definition
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
     8
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
     9
Based upon ex/Term.thy
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    10
*)
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    11
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    12
Ntree = InfDatatype +
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    13
consts
1401
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 539
diff changeset
    14
  ntree    :: i=>i
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 539
diff changeset
    15
  maptree  :: i=>i
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 539
diff changeset
    16
  maptree2 :: [i,i] => i
515
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    17
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    18
datatype
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    19
  "ntree(A)" = Branch ("a: A", "h: (UN n:nat. n -> ntree(A))")
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    20
  monos       "[[subset_refl, Pi_mono] MRS UN_mono]"    (*MUST have this form*)
515
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    21
  type_intrs  "[nat_fun_univ RS subsetD]"
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    22
  type_elims  "[UN_E]"
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    23
539
01906e4644e0 ZF/ex/Ntree: two new examples, maptree and maptree2
lcp
parents: 515
diff changeset
    24
datatype
01906e4644e0 ZF/ex/Ntree: two new examples, maptree and maptree2
lcp
parents: 515
diff changeset
    25
  "maptree(A)" = Sons ("a: A", "h: maptree(A) -||> maptree(A)")
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    26
  monos       "[FiniteFun_mono1]"       (*Use monotonicity in BOTH args*)
539
01906e4644e0 ZF/ex/Ntree: two new examples, maptree and maptree2
lcp
parents: 515
diff changeset
    27
  type_intrs  "[FiniteFun_univ1 RS subsetD]"
01906e4644e0 ZF/ex/Ntree: two new examples, maptree and maptree2
lcp
parents: 515
diff changeset
    28
01906e4644e0 ZF/ex/Ntree: two new examples, maptree and maptree2
lcp
parents: 515
diff changeset
    29
datatype
01906e4644e0 ZF/ex/Ntree: two new examples, maptree and maptree2
lcp
parents: 515
diff changeset
    30
  "maptree2(A,B)" = Sons2 ("a: A", "h: B -||> maptree2(A,B)")
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    31
  monos       "[subset_refl RS FiniteFun_mono]"
539
01906e4644e0 ZF/ex/Ntree: two new examples, maptree and maptree2
lcp
parents: 515
diff changeset
    32
  type_intrs  "[FiniteFun_in_univ']"
01906e4644e0 ZF/ex/Ntree: two new examples, maptree and maptree2
lcp
parents: 515
diff changeset
    33
515
abcc438e7c27 installation of new inductive/datatype sections
lcp
parents:
diff changeset
    34
end