src/Provers/Arith/fast_lin_arith.ML
changeset 19618 9050a3b01e62
parent 19502 369cde91963d
child 20217 25b068a99d2b
equal deleted inserted replaced
19617:7cb4b67d4b97 19618:9050a3b01e62
   362          val sclist = sort (fn (x,y) => IntInf.compare(abs(x),abs(y)))
   362          val sclist = sort (fn (x,y) => IntInf.compare(abs(x),abs(y)))
   363                            (List.filter (fn i => i<>0) clist)
   363                            (List.filter (fn i => i<>0) clist)
   364          val c = hd sclist
   364          val c = hd sclist
   365          val (SOME(eq as Lineq(_,_,ceq,_)),othereqs) =
   365          val (SOME(eq as Lineq(_,_,ceq,_)),othereqs) =
   366                extract_first (fn Lineq(_,_,l,_) => c mem l) eqs
   366                extract_first (fn Lineq(_,_,l,_) => c mem l) eqs
   367          val v = find_index_eq c ceq
   367          val v = find_index (fn x => x = c) ceq
   368          val (ioth,roth) = List.partition (fn (Lineq(_,_,l,_)) => el v l = 0)
   368          val (ioth,roth) = List.partition (fn (Lineq(_,_,l,_)) => el v l = 0)
   369                                      (othereqs @ noneqs)
   369                                      (othereqs @ noneqs)
   370          val others = map (elim_var v eq) roth @ ioth
   370          val others = map (elim_var v eq) roth @ ioth
   371      in elim(others,(v,nontriv)::hist) end
   371      in elim(others,(v,nontriv)::hist) end
   372   else
   372   else