src/HOL/Real/PNat.thy
author paulson
Thu, 25 Jun 1998 13:57:34 +0200
changeset 5078 7b5ea59c0275
child 7077 60b098bb8b8a
permissions -rw-r--r--
Installation of target HOL-Real
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
     1
(*  Title       : PNat.thy
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
     2
    Author      : Jacques D. Fleuriot
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
     3
    Copyright   : 1998  University of Cambridge
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
     4
    Description : The positive naturals
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
     5
*) 
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
     6
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
     7
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
     8
PNat = Arith +
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
     9
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    10
(** type pnat **)
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    11
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    12
(* type definition *)
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    13
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    14
typedef
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    15
  pnat = "lfp(%X. {1} Un (Suc``X))"   (lfp_def)
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    16
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    17
instance
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    18
   pnat :: {ord, plus, times}
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    19
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    20
consts
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    21
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    22
  pSuc       :: pnat => pnat
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    23
  "1p"       :: pnat                ("1p")
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    24
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    25
constdefs
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    26
  
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    27
  pnat_nat  :: nat => pnat                  ("*# _" [80] 80) 
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    28
  "*# n     == Abs_pnat(n + 1)"
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    29
 
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    30
defs
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    31
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    32
  pnat_one_def      "1p == Abs_pnat(1)"
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    33
  pnat_Suc_def      "pSuc == (%n. Abs_pnat(Suc(Rep_pnat(n))))"
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    34
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    35
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    36
  pnat_add_def
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    37
       "x + y == Abs_pnat(Rep_pnat(x) +  Rep_pnat(y))"
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    38
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    39
  pnat_mult_def
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    40
       "x * y == Abs_pnat(Rep_pnat(x) * Rep_pnat(y))"
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    41
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    42
 pnat_less_def
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    43
       "x < (y::pnat) == Rep_pnat(x) < Rep_pnat(y)"
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    44
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    45
 pnat_le_def
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    46
       "x <= (y::pnat) ==  ~(y < x)"
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    47
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    48
end
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    49
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    50
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    51
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    52
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    53
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    54
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    55
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    56
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    57
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    58
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    59
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    60
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    61
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    62
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    63
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    64
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    65
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    66
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    67
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    68
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    69
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    70
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    71
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    72
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    73