src/HOL/Orderings.thy
changeset 24741 a53f5db5acbb
parent 24704 9a95634ab135
child 24748 ee0a0eb6b738
     1.1 --- a/src/HOL/Orderings.thy	Thu Sep 27 17:22:15 2007 +0200
     1.2 +++ b/src/HOL/Orderings.thy	Thu Sep 27 17:28:05 2007 +0200
     1.3 @@ -293,16 +293,17 @@
     1.4            in
     1.5  	    T = HOLogic.natT orelse T = HOLogic.intT orelse T = HOLogic.realT
     1.6            end;
     1.7 -	fun dec (Const (@{const_name Not}, _) $ t) = (case dec t
     1.8 -	      of NONE => NONE
     1.9 -	       | SOME (t1, rel, t2) => SOME (t1, "~" ^ rel, t2))
    1.10 -          | dec (bin_op $ t1 $ t2) =
    1.11 +	fun rel (bin_op $ t1 $ t2) =
    1.12                if excluded t1 then NONE
    1.13                else if Pattern.matches thy (eq, bin_op) then SOME (t1, "=", t2)
    1.14                else if Pattern.matches thy (le, bin_op) then SOME (t1, "<=", t2)
    1.15                else if Pattern.matches thy (less, bin_op) then SOME (t1, "<", t2)
    1.16                else NONE
    1.17 -	  | dec _ = NONE;
    1.18 +	  | rel _ = NONE;
    1.19 +	fun dec (Const (@{const_name Not}, _) $ t) = (case rel t
    1.20 +	      of NONE => NONE
    1.21 +	       | SOME (t1, rel, t2) => SOME (t1, "~" ^ rel, t2))
    1.22 +          | dec x = rel x;
    1.23        in dec t end;
    1.24    in
    1.25      case s of