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