Theory Type
section ‹Java types›
theory Type imports JBasis begin
typedecl cnam
instantiation cnam :: equal
begin
definition "HOL.equal (cn :: cnam) cn' ⟷ cn = cn'"
instance by standard (simp add: equal_cnam_def)
end
text ‹These instantiations only ensure that the merge in theory ‹MicroJava› succeeds. FIXME›
instantiation cnam :: typerep
begin
definition "typerep_class.typerep ≡ λ_ :: cnam itself. Typerep.Typerep (STR ''Type.cnam'') []"
instance ..
end
instantiation cnam :: term_of
begin
definition "term_of_class.term_of (C :: cnam) ≡
Code_Evaluation.Const (STR ''dummy_cnam'') (Typerep.Typerep (STR ''Type.cnam'') [])"
instance ..
end
instantiation cnam :: partial_term_of
begin
definition "partial_term_of_class.partial_term_of (C :: cnam itself) n = undefined"
instance ..
end