src/ZF/ex/Ntree.thy
author clasohm
Sat, 09 Dec 1995 13:36:11 +0100
changeset 1401 0c439768f45c
parent 539 01906e4644e0
child 1478 2b8c2a7547ab
permissions -rw-r--r--
removed quotes from consts and syntax 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/Ntree.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
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))")
539
01906e4644e0 ZF/ex/Ntree: two new examples, maptree and maptree2
lcp
parents: 515
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)")
01906e4644e0 ZF/ex/Ntree: two new examples, maptree and maptree2
lcp
parents: 515
diff changeset
    26
  monos	      "[FiniteFun_mono1]"	(*Use monotonicity in BOTH args*)
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)")
01906e4644e0 ZF/ex/Ntree: two new examples, maptree and maptree2
lcp
parents: 515
diff changeset
    31
  monos	      "[subset_refl RS FiniteFun_mono]"
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