tuned;
authorwenzelm
Sun, 28 Jul 2019 11:53:51 +0200
changeset 70426 198be2de1efa
parent 70425 78514368ec63
child 70427 973bf3e42e54
tuned;
src/Pure/global_theory.ML
--- a/src/Pure/global_theory.ML	Sat Jul 27 21:47:43 2019 +0200
+++ b/src/Pure/global_theory.ML	Sun Jul 28 11:53:51 2019 +0200
@@ -112,10 +112,10 @@
   | name_multi name xs = map_index (fn (i, x) => (name ^ "_" ^ string_of_int (i + 1), x)) xs;
 
 fun name_thm pre official name thm = thm
-  |> (if not official orelse pre andalso Thm.derivation_name thm <> "" then I
-      else Thm.name_derivation name)
-  |> (if name = "" orelse pre andalso Thm.has_name_hint thm then I
-      else Thm.put_name_hint name);
+  |> (official andalso not (pre andalso Thm.derivation_name thm <> "")) ?
+      Thm.name_derivation name
+  |> (name <> "" andalso not (pre andalso Thm.has_name_hint thm)) ?
+      Thm.put_name_hint name;
 
 fun name_thms pre official name thms =
   map (uncurry (name_thm pre official)) (name_multi name thms);