
theorem Th6:
  for n being Nat holds EmptyBag (n+1) = (EmptyBag n) bag_extend 0
proof
  let n being Nat;
A1: now
    let x be object;
    assume x in Segm(n+1);
    then
A2: x in Segm n \/ {n} by AFINSQ_1:2;
    per cases by A2,XBOOLE_0:def 3;
    suppose
A3:   x in n;
      thus (EmptyBag(n+1)).x = 0 by PBOOLE:5
        .= (EmptyBag n).x by PBOOLE:5
        .= (((EmptyBag n) bag_extend 0)|n).x by Def1
        .= ((EmptyBag n) bag_extend 0).x by A3,FUNCT_1:49;
    end;
    suppose
A4:   x in {n};
      thus (EmptyBag(n+1)).x = 0 by PBOOLE:5
        .= ((EmptyBag n) bag_extend 0).n by Def1
        .= ((EmptyBag n) bag_extend 0).x by A4,TARSKI:def 1;
    end;
  end;
  dom (EmptyBag (n+1)) = n+1 & dom ((EmptyBag n) bag_extend 0) = n+1 by
PARTFUN1:def 2;
  hence thesis by A1,FUNCT_1:2;
end;
