src/ZF/Coind/Values.thy
author paulson
Fri, 16 Feb 1996 18:00:47 +0100
changeset 1512 ce37c64244c0
parent 1478 2b8c2a7547ab
child 3840 e0baea4d485a
permissions -rw-r--r--
Elimination of fully-functorial style. Type tactic changed to a type abbrevation (from a datatype). Constructor tactic and function apply deleted.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
     1
(*  Title:      ZF/Coind/Values.thy
916
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
     2
    ID:         $Id$
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
     3
    Author:     Jacob Frost, Cambridge University Computer Laboratory
916
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
     4
    Copyright   1995  University of Cambridge
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
     5
*)
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
     6
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
     7
Values = Language + Map +
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
     8
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
     9
(* Values, values environments and associated operators *)
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    10
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    11
consts
1401
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 1155
diff changeset
    12
  Val, ValEnv, Val_ValEnv  :: i
933
5836531d7b91 Replaced rules by defs
lcp
parents: 916
diff changeset
    13
codatatype <= "quniv(Const Un ExVar Un Exp)"
5836531d7b91 Replaced rules by defs
lcp
parents: 916
diff changeset
    14
    "Val" = v_const("c:Const")
5836531d7b91 Replaced rules by defs
lcp
parents: 916
diff changeset
    15
          | v_clos("x:ExVar","e:Exp","ve:ValEnv")
5836531d7b91 Replaced rules by defs
lcp
parents: 916
diff changeset
    16
  and
5836531d7b91 Replaced rules by defs
lcp
parents: 916
diff changeset
    17
    "ValEnv" = ve_mk("m:PMap(ExVar,Val)")
5836531d7b91 Replaced rules by defs
lcp
parents: 916
diff changeset
    18
  monos      "[map_mono]"
5836531d7b91 Replaced rules by defs
lcp
parents: 916
diff changeset
    19
  type_intrs "[A_into_univ, mapQU]"
916
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    20
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    21
consts
1401
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 1155
diff changeset
    22
  ve_emp :: i
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 1155
diff changeset
    23
  ve_owr :: [i,i,i] => i
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 1155
diff changeset
    24
  ve_dom :: i=>i
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 1155
diff changeset
    25
  ve_app :: [i,i] => i
933
5836531d7b91 Replaced rules by defs
lcp
parents: 916
diff changeset
    26
defs
916
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    27
  ve_emp_def "ve_emp == ve_mk(map_emp)"
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    28
  ve_owr_def
1155
928a16e02f9f removed \...\ inside strings
clasohm
parents: 933
diff changeset
    29
    "ve_owr(ve,x,v) ==   
928a16e02f9f removed \...\ inside strings
clasohm
parents: 933
diff changeset
    30
    ve_mk(Val_ValEnv_case(%x.0,%x y z.0,%m.map_owr(m,x,v),ve))"
916
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    31
  ve_dom_def
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    32
    "ve_dom(ve) == Val_ValEnv_case(%x.0,%x y z.0,%m.domain(m),ve)"
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    33
  ve_app_def
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    34
    "ve_app(ve,a) == Val_ValEnv_case(%x.0,%x y z.0,%m.map_app(m,a),ve)"
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    35
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    36
end
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    37
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    38
d03bb9f50b3b New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    39