Origin Definitions Sections StandardLIB Doc
IF YOU CAN SEE THIS go to /sfa/Nuprl/Shared/Xindentation_hack_doc.html
prog_1
Nuprl Section: prog_1

Selected Objects
defswitch Switch(t) b == b(t)
defswitch_case Case v => case cont(x) == if x=v case else cont(x) fi
defswitch_default Default => body EndSwitch(x) == body
defswitch_done EndSwitch(x) == !undefined
defcase Case(value) body == body(value,value)
defcase_default Default => body(value,value) == body
defcase_pair <x,y> => body(x;y)(value,cont) == value/x,y. body(x;y)
defcase_inl inl(x) => body(x) cont(value,contvalue)
== InjCase(value; x. body(x); _. cont(contvalue,contvalue))
defcase_inr inr(x) => body(x) cont(value,contvalue)
== InjCase(value; _. cont(contvalue,contvalue); x. body(x))
defcase_cons x::y => body(x;y) cont(value,contvalue)
== Case of value; nil  cont(contvalue,contvalue) ; hd.tl  body(hd;tl)
defcase_nil [] => body cont(value,contvalue)
== Case of value; nil  body ; hd.tl  cont(contvalue,contvalue)
defcase_it  => body(value,contvalue) == body
defcase_bind x:body == body
defcase_pattern1 <<"a", b>, c, 1> => body(b;c) cont(x,z)
== x/x2,x1.
== x2/x2@0,x1@0.
== InjCase(if x2@0="a"Atominl(*); inr(*) fi
== InjCase; x1/x2@1,x1@1.
== InjCase; InjCase(if x1@1=1 inl(*) ; inr(*) fi ; body(x1@0;x2@1); cont(z,z))
== InjCase; cont(z,z))
defpattern1 <<"a", b>, c, 1> == <<"a",b>,c,1>
defcase_pattern2 <a, inl <<"a", b>, c, 1>> => body(a;b;c) cont(x,z)
== x/x2,x1.
== InjCase(x1
== InjCase; x1@0. x1@0/x2@0,x1@1.
== InjCase; x1@0. x2@0/x2@0,x1@2.
== InjCase; x1@0. InjCase(if x2@0="a"Atominl(*); inr(*) fi
== InjCase; x1@0. InjCase; x1@1/x2@1,x1@1.
== InjCase; x1@0. InjCase; InjCase(if x1@1=1 inl(*) ; inr(*) fi
== InjCase; x1@0. InjCase; InjCase; body(x2;x1@2;x2@1)
== InjCase; x1@0. InjCase; InjCase; cont(z))
== InjCase; x1@0. InjCase; cont(z))
== InjCase; _. cont(z))
defpattern2 <a, inl <<"a", b>, c, 1>> == <a,inl(<<"a", b>, c, 1>)>
defunion1 union1() == +Type+()
defcase_union1_term1 union1_term1(x) => body(x) cont(x1,z) == InjCase(x1; x2. body(x2); _. cont(z,z))
defunion1_term1 union1_term1(x) == inl(x)
defcase_union1_term2 union1_term2(x) => body(x) cont(x1,z)
== InjCase(x1; _. cont(z,z); x2. InjCase(x2; x2@0. body(x2@0); _. cont(z,z)))
defunion1_term2 union1_term2(x) == inr(inl(x))
defcase_union1_term3 union1_term3(x) => body(x) cont(x1,z)
== InjCase(x1; _. cont(z,z); x2. InjCase(x2; _. cont(z,z); x2@0. body(x2@0)))
defunion1_term3 union1_term3(x) == inr(inr(x))
defenum1 enum1() == 3
defenum1_switch enum1_switch(value;el1;el2;el3)
== Switch(value)
== Case enum1_el1 => el1
== Case enum1_el2 => el2
== Case enum1_el3 => el3
== EndSwitch
defcase_enum1_el1 enum1_el1 => body cont(x,z)
== InjCase(if x=0 inl(*) ; inr(*) fi ; body; cont(z,z))
defenum1_el1 enum1_el1 == 0
defcase_enum1_el2 enum1_el2 => body cont(x,z)
== InjCase(if x=1 inl(*) ; inr(*) fi ; body; cont(z,z))
defenum1_el2 enum1_el2 == 1
defcase_enum1_el3 enum1_el3 => body cont(x,z)
== InjCase(if x=2 inl(*) ; inr(*) fi ; body; cont(z,z))
defenum1_el3 enum1_el3 == 2
COMenum1_start ------ begin enum1 ------
THMenum1_sq SQType(enum1())
THMeq_enum1_eq_true_intro i,j:enum1(). i = j  ((i=j) ~ true)
THMeq_enum1_eq_false_intro i,j:enum1(). i = j  ((i=j) ~ false)
THMenum1_cases i:enum1(). i = enum1_el1  i = enum1_el2  i = enum1_el3
COMenum1_finish ------ end enum1 ------
defmodule1_type module1_type(prop) == tag:{i:| prop(i) }Unit+(module1_type(i.i = tag-1))
(recursive)
defmodule1_tag t.tag == 1of(t)
defmodule1_data t.data == 2of(t)
defcase_module1 module1(tag, data) => body(tag;data)(x,z) == x/x2,x1. body(x2;x1)
defmodule1 module1(tag, data) == <tag,data>
IF YOU CAN SEE THIS go to /sfa/Nuprl/Shared/Xindentation_hack_doc.html

Origin Definitions Sections StandardLIB Doc