src/HOL/Tools/Sledgehammer/sledgehammer_util.ML
changeset 36960 01594f816e3a
parent 36555 8ff45c2076da
child 37321 9d7cfae95b30
equal deleted inserted replaced
36959:f5417836dbea 36960:01594f816e3a
   100 val is_long_identifier = forall Syntax.is_identifier o space_explode "."
   100 val is_long_identifier = forall Syntax.is_identifier o space_explode "."
   101 fun maybe_quote y =
   101 fun maybe_quote y =
   102   let val s = unyxml y in
   102   let val s = unyxml y in
   103     y |> ((not (is_long_identifier (perhaps (try (unprefix "'")) s)) andalso
   103     y |> ((not (is_long_identifier (perhaps (try (unprefix "'")) s)) andalso
   104            not (is_long_identifier (perhaps (try (unprefix "?")) s))) orelse
   104            not (is_long_identifier (perhaps (try (unprefix "?")) s))) orelse
   105            OuterKeyword.is_keyword s) ? quote
   105            Keyword.is_keyword s) ? quote
   106   end
   106   end
   107 
   107 
   108 fun monomorphic_term subst t =
   108 fun monomorphic_term subst t =
   109   map_types (map_type_tvar (fn v =>
   109   map_types (map_type_tvar (fn v =>
   110       case Type.lookup subst v of
   110       case Type.lookup subst v of