Nuprl Theory j_type

(only non hidden objects are presented)

DISPj_class_name_dfJClassName( < f:f:* > )== JClassName( < f > )
ABSj_class_nameJClassName(f) == {a:Atom| (f a)}
THMj_class_name_wff:Atom . JClassName(f)
DISPtype_dfType( < f:f:* > )== Type Type== Type
ABStypeType == rec(T.Unit + Unit + Unit + JClassName(f) + T)
THMtype_wff:Atom . Type
DISPbool_type_dfboolean== boolean
ABSbool_typeboolean == inl
THMbool_type_wff:Atom . boolean Type
DISPint_type_dfint== int
ABSint_typeint == inr (inl )
THMint_type_wff:Atom . int Type
DISPexc_type_dfException== Exception
ABSexc_typeException == inr inr (inl )
THMexc_type_wff:Atom . Exception Type
DISPclass_type_dfClass( < n:n:* > )== Class( < n > )
ABSclass_typeClass(n) == inr inr inr (inl n )
THMclass_type_wff:Atom . n:JClassName(f). Class(n) Type
THMcomb_for_class_type_wf(f,n,z.Class(n)) f:(Atom ) n:JClassName(f) True Type
DISParray_type_df < t:j_type:* > []== < t > []
ABSarray_typet[] == inr inr inr inr t
THMarray_type_wff:Atom . t:Type. t[] Type
THMcomb_for_array_type_wf(f,t,z.t[]) f:(Atom ) t:Type True Type
MLtype_hdlet TypeHD i = MoveDepHypsToConcl i THEN D i THEN Fold `type` i THEN D (-2) THEN D (-2) THENL [Fold `it` 0 THEN Fold `bool_type` 0 THEN Thin (-1) THEN Thin (-1); D (-2) THEN Fold `it` 0 THEN Fold `int_type` 0 T HEN Thin (-1) THEN Thin (-1); D (-2) THEN D (-2)] THENL [Id; Id; D (-2 ) THEN Fold `it` 0 THEN Fold `exc_type` 0 THEN Thin (-1) THEN Thin (-1 ); Fold `class_type` (-1) THEN Fold `class_type` 0 THEN RenameVarUsing Arg `x` `n' (-2); Fold `array_type` (-1) THEN Fold `array_type` 0 THEN RenameVarUsingArg `y` `t' (-2)];;
DISPtype_cases_df{[SOFT}{- > 0}case < x:j_type:* > {\\}of bool - > < b:term:* > {\\} | int - > < z:term:* > {\\} | Exception - > < e:term:* > {\\} | Class( < n:var > ) - > < c:term:* > {\\} | < t:var > [] - > < a:term:* > {\\}{ < -}{]} == case < x > of bool - > < b > | int - > < z > | Exception - > < e > | Class( < n > ) - > < c > | < t > [] - > < a >
ABStype_casescase x of bool - > b | int - > z | Exception - > e | Class(n) - > c[n] | t[] - > a[t] == case x of inl(x1) = > b | inr(x2) = > case x2 of inl(x3) = > z | inr(x4) = > case x4 of inl(x5) = > e | inr(x6) = > case x6 of inl(n) = > c[n] | inr(t) = > a[t]
MLtype_cases_evallet type_cases_boolC = SimpleMacroC `type_cases_bool` case boolean of bool - > b | int - > z | Exception - > e | Class(n) - > c[n] | t[] - > a[t] b ``type_cases bool_type`` ;; let type_cases_intC = SimpleMacroC `type_cases_int` case int of bool - > b | int - > z | Exception - > e | Class(n) - > c[n] | t[] - > a[t] z ``type_cases int_type`` ;; let type_cases_excC = SimpleMacroC `type_cases_exc` case Exception of bool - > b | int - > z | Exception - > e | Class(n) - > c[n] | t[] - > a[t] e ``type_cases exc_type`` ;; let type_cases_classC = SimpleMacroC `type_cases_class` case Class(k) of bool - > b | int - > z | Exception - > e | Class(n) - > c[n] | t[] - > a[t] c[k] ``type_cases class_type`` ;; let type_cases_arrayC = SimpleMacroC `type_cases_array` case s[] of bool - > b | int - > z | Exception - > e | Class(n) - > c[n] | t[] - > a[t] a[s] ``type_cases array_type`` ;; let type_casesC = FirstC [type_cases_boolC; type_cases_intC; type_cases_excC; type_cases_classC; type_cases_arrayC] ;; add_AbReduce_conv `type_cases` type_casesC ;;
THMtype_cases_wff:Atom . T:. x:Type. b,z,e:T. c:JClassName(f) T. a:Type T. case x of bool - > b | int - > z | Exception - > e | Class(n) - > c[n] | t[] - > a[t] T
MLtype_indlet TypeInd i = AbRecTypeInd i THENM (D (-1) THEN D (-1) THENL [Fold ` it` 0 THEN Fold `bool_type` 0 THEN Thin (-1) THEN Thin (-1) THEN Thin (-1); D (-1) THEN Fold `it` 0 THEN Fold `int_type` 0 THEN Thin (-1) TH EN Thin (-1) THEN Thin (-1); D (-1) THEN D (-1)] THENL [Id; Id; Fold ` it` 0 THEN Fold `exc_type` 0 THEN Thin (-1) THEN Thin (-1) THEN Thin ( -1) ; Fold `class_type` 0 THEN Thin (-2) THEN Thin (-2); Fold `array_ type` 0 THEN (\p. (With (mvt (var_of_hyp (-1) p)) (D (-2))) p) THENM D (-2) THENM Thin (-2) THENM Thin (-3)]);;
DISPeq_type_df( < x:j_type:* > =t < y:j_type:* > )== ( < x > =t < y > )
MLeq_type_ml(x =t y) ==r case x of bool - > case y of bool - > tt | int - > ff | Exception - > ff | Class(n) - > ff | t[] - > ff | int - > case y of bool - > ff | int - > tt | Exception - > ff | Class(n) - > ff | t[] - > ff | Exception - > case y of bool - > ff | int - > ff | Exception - > tt | Class(n) - > ff | t[] - > ff | Class(n) - > case y of bool - > ff | int - > ff | Exception - > ff | Class(m) - > n =a m | t[] - > ff | t[] - > case y of bool - > ff | int - > ff | Exception - > ff | Class(n) - > ff | s[] - > (t =t s)
THMeq_type_wff:Atom . x,y:Type. (x =t y)
MLeq_type_evallet eq_type_int_intC = MacroC `eq_type_int_intV` (RecUnfoldC `eq_type` ANDTHENC AbRedexC ANDTHENC AbRedexC) (int =t int) IdC tt ;; let eq_typeC = FirstC [eq_type_int_intC;] ;; add_AbReduce_conv `eq_type` eq_typeC ;;
THMcomb_for_eq_type_wf(f,x,y,z.(x =t y)) f:(Atom ) x:Type y:Type True
THMassert_of_eq_typef:Atom . x,y:Type. (x =t y) x = y
THMeq_type_reflf:Atom . x:Type. (x =t x)
THMeq_type_iff_eqf:Atom . x,y:Type. (x =t y) x = y
DISPspec_dfSpec( < f:f:* > )== Spec Spec== Spec
ABSspecSpec == JClassName(f) Atom ?Type
MLspec_softadd_soft_abs ``spec``;;

the other theories