public BinaryMatrix difference(BinaryMatrix other) {
		BinaryMatrix res = empty();
		final int rowCount = Math.min(rows.size(), other.rows.size());
		int i = 0;
		for (; i < rowCount; i++) {
			IntSet s1 = rows.get(i);
			IntSet s2 = other.rows.get(i);
			if (s1 == null) {
				res.rows.add(null);
			} else {
				if (s2 == null)
					res.rows.add(s1.clone());
				else {
					IntSet r = s1.difference(s2);
					res.rows.add(r.isEmpty() ? null : r);
				}
			}
			assert res.rows.get(i) == null || !res.rows.get(i).isEmpty();
		}
		for (; i < rows.size(); i++) {
			IntSet s = rows.get(i);
			res.rows.add(s == null ? null : s.clone());
			assert res.rows.get(i) == null || !res.rows.get(i).isEmpty();
		}
		res.fixRows();
		return res;
	}