let copy s = { ctxt = s.ctxt; p = Partition.copy s.p; eqs = Array.copy s.eqs; upper = s.upper; diseqs = s.diseqs }