src/ZF/Resid/Residuals.thy
author paulson
Thu, 29 Jun 2000 12:16:43 +0200
changeset 9188 379b0c3f7c85
parent 3840 e0baea4d485a
child 11319 8b84ee2cc79c
permissions -rw-r--r--
tidied
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
     1
(*  Title:      Residuals.thy
1048
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
     2
    ID:         $Id$
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
     3
    Author:     Ole Rasmussen
1048
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
     4
    Copyright   1995  University of Cambridge
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
     5
    Logic Image: ZF
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
     6
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
     7
*)
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
     8
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
     9
Residuals = Substitution+
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    10
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    11
consts
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    12
  Sres          :: i
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    13
  residuals     :: [i,i,i]=>i
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    14
  "|>"          :: [i,i]=>i     (infixl 70)
1048
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    15
  
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    16
translations
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    17
  "residuals(u,v,w)"  == "<u,v,w>:Sres"
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    18
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    19
inductive
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    20
  domains       "Sres" <= "redexes*redexes*redexes"
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    21
  intrs
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    22
    Res_Var     "n:nat ==> residuals(Var(n),Var(n),Var(n))"
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    23
    Res_Fun     "[|residuals(u,v,w)|]==>   
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    24
                     residuals(Fun(u),Fun(v),Fun(w))"
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    25
    Res_App     "[|residuals(u1,v1,w1);   
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    26
                   residuals(u2,v2,w2); b:bool|]==>   
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    27
                 residuals(App(b,u1,u2),App(0,v1,v2),App(b,w1,w2))"
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    28
    Res_redex   "[|residuals(u1,v1,w1);   
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    29
                   residuals(u2,v2,w2); b:bool|]==>   
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    30
                 residuals(App(b,Fun(u1),u2),App(1,Fun(v1),v2),w2/w1)"
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
    31
  type_intrs    "[subst_type]@nat_typechecks@redexes.intrs@bool_typechecks"
1048
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    32
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    33
rules
3840
e0baea4d485a fixed dots;
wenzelm
parents: 1478
diff changeset
    34
  res_func_def  "u |> v == THE w. residuals(u,v,w)"
1048
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    35
end
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    36