src/LCF/lcf.thy
author paulson
Mon Dec 07 18:26:25 1998 +0100 (1998-12-07)
changeset 6019 0e55c2fb2ebb
parent 283 76caebd18756
permissions -rw-r--r--
tidying
clasohm@0
     1
(*  Title: 	LCF/lcf.thy
clasohm@0
     2
    ID:         $Id$
clasohm@0
     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
lcp@283
    18
 ('a,'b) "*"		(infixl 6)
lcp@283
    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@0
    26
 UU	:: "'a"
clasohm@0
    27
 TT,FF	:: "tr"
clasohm@0
    28
 FIX	:: "('a => 'a) => 'a"
clasohm@0
    29
 FST	:: "'a*'b => 'a"
clasohm@0
    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@0
    34
 adm	:: "('a => o) => o"
clasohm@0
    35
 VOID	:: "void"		("()")
clasohm@0
    36
 PAIR	:: "['a,'b] => 'a*'b"	("(1<_,/_>)" [0,0] 100)
clasohm@0
    37
 COND	:: "[tr,'a,'a] => 'a"	("(_ =>/ (_ |/ _))" [60,60,60] 60)
clasohm@0
    38
 "<<"	:: "['a,'a] => o"	(infixl 50)
clasohm@0
    39
rules
clasohm@0
    40
  (** DOMAIN THEORY **)
clasohm@0
    41
clasohm@0
    42
  eq_def	"x=y == x << y & y << x"
clasohm@0
    43
clasohm@0
    44
  less_trans	"[| x << y; y << z |] ==> x << z"
clasohm@0
    45
clasohm@0
    46
  less_ext	"(ALL x. f(x) << g(x)) ==> f << g"
clasohm@0
    47
clasohm@0
    48
  mono		"[| f << g; x << y |] ==> f(x) << g(y)"
clasohm@0
    49
clasohm@0
    50
  minimal	"UU << x"
clasohm@0
    51
clasohm@0
    52
  FIX_eq	"f(FIX(f)) = FIX(f)"
clasohm@0
    53
clasohm@0
    54
  (** TR **)
clasohm@0
    55
clasohm@0
    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@0
    63
  COND_UU	"UU => x | y  =  UU"
clasohm@0
    64
  COND_TT	"TT => x | y  =  x"
clasohm@0
    65
  COND_FF	"FF => x | y  =  y"
clasohm@0
    66
clasohm@0
    67
  (** PAIRS **)
clasohm@0
    68
clasohm@0
    69
  surj_pairing	"<FST(z),SND(z)> = z"
clasohm@0
    70
clasohm@0
    71
  FST	"FST(<x,y>) = x"
clasohm@0
    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@0
    91
  void_cases	"(x::void) = UU"
clasohm@0
    92
clasohm@0
    93
  (** INDUCTION **)
clasohm@0
    94
clasohm@0
    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
clasohm@0
   102
  adm_less	"adm(%x.t(x) << u(x))"
clasohm@0
   103
  adm_not_less	"adm(%x.~ t(x) << u)"
clasohm@0
   104
  adm_not_free  "adm(%x.A)"
clasohm@0
   105
  adm_subst	"adm(P) ==> adm(%x.P(t(x)))"
clasohm@0
   106
  adm_conj	"[| adm(P); adm(Q) |] ==> adm(%x.P(x)&Q(x))"
clasohm@0
   107
  adm_disj	"[| adm(P); adm(Q) |] ==> adm(%x.P(x)|Q(x))"
clasohm@0
   108
  adm_imp	"[| adm(%x.~P(x)); adm(Q) |] ==> adm(%x.P(x)-->Q(x))"
clasohm@0
   109
  adm_all	"(!!y.adm(P(y))) ==> adm(%x.ALL y.P(y,x))"
clasohm@0
   110
end