Nominal/nominal_library.ML
changeset 3045 d0ad264f8c4f
parent 2982 4a00077c008f
child 3053 324b148fc6b5
equal deleted inserted replaced
3044:a609eea06119 3045:d0ad264f8c4f
   152 fun to_set t = to_set_ty (fastype_of t) t
   152 fun to_set t = to_set_ty (fastype_of t) t
   153 
   153 
   154 
   154 
   155 (* testing for concrete atom types *)
   155 (* testing for concrete atom types *)
   156 fun is_atom ctxt ty =
   156 fun is_atom ctxt ty =
   157   Sign.of_sort (ProofContext.theory_of ctxt) (ty, @{sort at_base})
   157   Sign.of_sort (Proof_Context.theory_of ctxt) (ty, @{sort at_base})
   158 
   158 
   159 fun is_atom_set ctxt (Type ("fun", [ty, @{typ bool}])) = is_atom ctxt ty
   159 fun is_atom_set ctxt (Type ("fun", [ty, @{typ bool}])) = is_atom ctxt ty
   160   | is_atom_set _ _ = false;
   160   | is_atom_set _ _ = false;
   161 
   161 
   162 fun is_atom_fset ctxt (Type (@{type_name "fset"}, [ty])) = is_atom ctxt ty
   162 fun is_atom_fset ctxt (Type (@{type_name "fset"}, [ty])) = is_atom ctxt ty