src/LCF/LCF.thy
author oheimb
Fri Jun 02 20:38:28 2000 +0200 (2000-06-02)
changeset 9028 8a1ec8f05f14
parent 3837 d7f033c74b38
child 17248 81bf91654e73
permissions -rw-r--r--
added HOL/Prolog
clasohm@1474
     1
(*  Title:      LCF/lcf.thy
clasohm@0
     2
    ID:         $Id$
clasohm@1474
     3
    Author:     Tobias Nipkow
clasohm@0
     4
    Copyright   1992  University of Cambridge
clasohm@0
     5
clasohm@0
     6
Natural Deduction Rules for LCF
clasohm@0
     7
*)
clasohm@0
     8
clasohm@0
     9
LCF = FOL +
clasohm@0
    10
clasohm@0
    11
classes cpo < term
clasohm@0
    12
clasohm@0
    13
default cpo
clasohm@0
    14
lcp@283
    15
types
lcp@283
    16
 tr
lcp@283
    17
 void
clasohm@1474
    18
 ('a,'b) "*"            (infixl 6)
clasohm@1474
    19
 ('a,'b) "+"            (infixl 5)
clasohm@0
    20
lcp@283
    21
arities
lcp@283
    22
 fun, "*", "+" :: (cpo,cpo)cpo
lcp@283
    23
 tr,void       :: cpo
clasohm@0
    24
clasohm@0
    25
consts
clasohm@1474
    26
 UU     :: "'a"
clasohm@1474
    27
 TT,FF  :: "tr"
clasohm@1474
    28
 FIX    :: "('a => 'a) => 'a"
clasohm@1474
    29
 FST    :: "'a*'b => 'a"
clasohm@1474
    30
 SND    :: "'a*'b => 'b"
clasohm@0
    31
 INL    :: "'a => 'a+'b"
clasohm@0
    32
 INR    :: "'b => 'a+'b"
clasohm@0
    33
 WHEN   :: "['a=>'c, 'b=>'c, 'a+'b] => 'c"
clasohm@1474
    34
 adm    :: "('a => o) => o"
clasohm@1474
    35
 VOID   :: "void"               ("'(')")
clasohm@1474
    36
 PAIR   :: "['a,'b] => 'a*'b"   ("(1<_,/_>)" [0,0] 100)
clasohm@1474
    37
 COND   :: "[tr,'a,'a] => 'a"   ("(_ =>/ (_ |/ _))" [60,60,60] 60)
clasohm@1474
    38
 "<<"   :: "['a,'a] => o"       (infixl 50)
clasohm@0
    39
rules
clasohm@0
    40
  (** DOMAIN THEORY **)
clasohm@0
    41
clasohm@1474
    42
  eq_def        "x=y == x << y & y << x"
clasohm@0
    43
clasohm@1474
    44
  less_trans    "[| x << y; y << z |] ==> x << z"
clasohm@0
    45
clasohm@1474
    46
  less_ext      "(ALL x. f(x) << g(x)) ==> f << g"
clasohm@0
    47
clasohm@1474
    48
  mono          "[| f << g; x << y |] ==> f(x) << g(y)"
clasohm@0
    49
clasohm@1474
    50
  minimal       "UU << x"
clasohm@0
    51
clasohm@1474
    52
  FIX_eq        "f(FIX(f)) = FIX(f)"
clasohm@0
    53
clasohm@0
    54
  (** TR **)
clasohm@0
    55
clasohm@1474
    56
  tr_cases      "p=UU | p=TT | p=FF"
clasohm@0
    57
clasohm@0
    58
  not_TT_less_FF "~ TT << FF"
clasohm@0
    59
  not_FF_less_TT "~ FF << TT"
clasohm@0
    60
  not_TT_less_UU "~ TT << UU"
clasohm@0
    61
  not_FF_less_UU "~ FF << UU"
clasohm@0
    62
clasohm@1474
    63
  COND_UU       "UU => x | y  =  UU"
clasohm@1474
    64
  COND_TT       "TT => x | y  =  x"
clasohm@1474
    65
  COND_FF       "FF => x | y  =  y"
clasohm@0
    66
clasohm@0
    67
  (** PAIRS **)
clasohm@0
    68
clasohm@1474
    69
  surj_pairing  "<FST(z),SND(z)> = z"
clasohm@0
    70
clasohm@1474
    71
  FST   "FST(<x,y>) = x"
clasohm@1474
    72
  SND   "SND(<x,y>) = y"
clasohm@0
    73
clasohm@0
    74
  (*** STRICT SUM ***)
clasohm@0
    75
clasohm@0
    76
  INL_DEF "~x=UU ==> ~INL(x)=UU"
clasohm@0
    77
  INR_DEF "~x=UU ==> ~INR(x)=UU"
clasohm@0
    78
clasohm@0
    79
  INL_STRICT "INL(UU) = UU"
clasohm@0
    80
  INR_STRICT "INR(UU) = UU"
clasohm@0
    81
clasohm@0
    82
  WHEN_UU  "WHEN(f,g,UU) = UU"
clasohm@0
    83
  WHEN_INL "~x=UU ==> WHEN(f,g,INL(x)) = f(x)"
clasohm@0
    84
  WHEN_INR "~x=UU ==> WHEN(f,g,INR(x)) = g(x)"
clasohm@0
    85
clasohm@0
    86
  SUM_EXHAUSTION
clasohm@0
    87
    "z = UU | (EX x. ~x=UU & z = INL(x)) | (EX y. ~y=UU & z = INR(y))"
clasohm@0
    88
clasohm@0
    89
  (** VOID **)
clasohm@0
    90
clasohm@1474
    91
  void_cases    "(x::void) = UU"
clasohm@0
    92
clasohm@0
    93
  (** INDUCTION **)
clasohm@0
    94
clasohm@1474
    95
  induct        "[| adm(P); P(UU); ALL x. P(x) --> P(f(x)) |] ==> P(FIX(f))"
clasohm@0
    96
clasohm@0
    97
  (** Admissibility / Chain Completeness **)
clasohm@0
    98
  (* All rules can be found on pages 199--200 of Larry's LCF book.
clasohm@0
    99
     Note that "easiness" of types is not taken into account
clasohm@0
   100
     because it cannot be expressed schematically; flatness could be. *)
clasohm@0
   101
wenzelm@3837
   102
  adm_less      "adm(%x. t(x) << u(x))"
clasohm@1474
   103
  adm_not_less  "adm(%x.~ t(x) << u)"
wenzelm@3837
   104
  adm_not_free  "adm(%x. A)"
wenzelm@3837
   105
  adm_subst     "adm(P) ==> adm(%x. P(t(x)))"
wenzelm@3837
   106
  adm_conj      "[| adm(P); adm(Q) |] ==> adm(%x. P(x)&Q(x))"
wenzelm@3837
   107
  adm_disj      "[| adm(P); adm(Q) |] ==> adm(%x. P(x)|Q(x))"
wenzelm@3837
   108
  adm_imp       "[| adm(%x.~P(x)); adm(Q) |] ==> adm(%x. P(x)-->Q(x))"
wenzelm@3837
   109
  adm_all       "(!!y. adm(P(y))) ==> adm(%x. ALL y. P(y,x))"
clasohm@0
   110
end