reserve i,j,k,n,m for Nat,
        X for set,
        b,s for bag of X,
        x for object;

theorem Th15:
  for b be bag of X holds
    b = b +*(x,0) + (EmptyBag X) +* (x,b.x)
proof
  let b be bag of X;
  set E=EmptyBag X, bx = b +*(x,0), Ex = E +* (x,b.x);
A1:dom ( bx + Ex ) = X = dom b & X = dom E by PARTFUN1:def 2;
  for y be object st y in dom b holds b.y = ( bx + Ex ).y
  proof
    let y be object such that
A2: y in dom b;
A3: ( bx + Ex ).y = (bx.y) + (Ex.y) by A2,A1,VALUED_1:def 1;
    per cases;
    suppose x in X & x = y;
      then bx.y = 0 & Ex.y = b.y by A1,FUNCT_7:31;
      hence thesis by A3;
    end;
    suppose x in X & x <> y;
      then bx.y = b.y & Ex.y = E.y =0 by FUNCT_7:32;
      hence thesis by A3;
    end;
    suppose not x in X;
      then bx = b & Ex = E by A1,FUNCT_7:def 3;
      hence thesis by PRE_POLY:53;
    end;
  end;
  hence thesis by A1;
end;
