src/HOL/Tools/Nitpick/nitpick_nut.ML
changeset 37483 4de0b0c38bdf
parent 37476 0681e46b4022
child 37678 0040bafffdef
equal deleted inserted replaced
37482:6849464ab10e 37483:4de0b0c38bdf
   872           let val R1 = Atom (spec_of_type scope (domain_type T)) in
   872           let val R1 = Atom (spec_of_type scope (domain_type T)) in
   873             Cst (NormFrac, T, Func (R1, Func (R1, Opt (Struct [R1, R1]))))
   873             Cst (NormFrac, T, Func (R1, Func (R1, Opt (Struct [R1, R1]))))
   874           end
   874           end
   875         | Cst (cst, T, _) =>
   875         | Cst (cst, T, _) =>
   876           if cst = Unknown orelse cst = Unrep then
   876           if cst = Unknown orelse cst = Unrep then
   877             case (is_boolean_type T, polar) of
   877             case (is_boolean_type T, polar |> unsound ? flip_polarity) of
   878               (true, Pos) => Cst (False, T, Formula Pos)
   878               (true, Pos) => Cst (False, T, Formula Pos)
   879             | (true, Neg) => Cst (True, T, Formula Neg)
   879             | (true, Neg) => Cst (True, T, Formula Neg)
   880             | _ => Cst (cst, T, best_opt_set_rep_for_type scope T)
   880             | _ => Cst (cst, T, best_opt_set_rep_for_type scope T)
   881           else if member (op =) [Add, Subtract, Multiply, Divide, Gcd, Lcm]
   881           else if member (op =) [Add, Subtract, Multiply, Divide, Gcd, Lcm]
   882                          cst then
   882                          cst then