bagIterIntersection = xyi => {
  /** @type {[T,bigint][]} */
  const result = [];
  for (const [m, xc, yc] of xyi) {
    const mc = xc <= yc ? xc : yc;
    result.push([m, mc]);
  }
  return result;
}
@template T
@param {Iterable<[T,bigint,bigint]>} xyi
@returns {[T,bigint][]}