tuned odd conditional expression;
authorwenzelm
Wed, 02 Feb 2011 22:48:24 +0100
changeset 41696 f69bb9077b02
parent 41695 afdbec23b92b
child 41697 19890332febc
child 41704 8c539202f854
tuned odd conditional expression;
src/Pure/global_theory.ML
--- a/src/Pure/global_theory.ML	Wed Feb 02 20:32:50 2011 +0100
+++ b/src/Pure/global_theory.ML	Wed Feb 02 22:48:24 2011 +0100
@@ -116,8 +116,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
-  |> not (Thm.derivation_name thm <> "" andalso pre orelse not official) ? Thm.name_derivation name
-  |> (if Thm.has_name_hint thm andalso pre orelse name = "" then I else Thm.put_name_hint name);
+  |> (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);
 
 fun name_thms pre official name xs =
   map (uncurry (name_thm pre official)) (name_multi name xs);