set b = () +* (S --> n);
A1: EmptyBag X = X --> 0 by PBOOLE:def 3;
A2: dom (S --> n) = S by FUNCOP_1:13;
A3: now :: thesis: for i being object st not i in S holds
(() +* (S --> n)) . i = 0
let i be object ; :: thesis: ( not i in S implies (() +* (S --> n)) . i = 0 )
assume not i in S ; :: thesis: (() +* (S --> n)) . i = 0
hence (() +* (S --> n)) . i = () . i by
.= 0 by PBOOLE:5 ;
:: thesis: verum
end;
A4: now :: thesis: for i being set st i in S holds
(() +* (S --> n)) . i = n
let i be set ; :: thesis: ( i in S implies (() +* (S --> n)) . i = n )
assume A5: i in S ; :: thesis: (() +* (S --> n)) . i = n
thus (() +* (S --> n)) . i = (S --> n) . i by
.= n by ; :: thesis: verum
end;
A6: support (() +* (S --> n)) is finite
proof
per cases ( S is empty or ( not S is empty & n = 0 ) or ( not S is empty & n <> 0 ) ) ;
suppose A7: S is empty ; :: thesis: support (() +* (S --> n)) is finite
now :: thesis: support (() +* (S --> n)) is empty
assume not support (() +* (S --> n)) is empty ; :: thesis: contradiction
then consider x being object such that
A8: x in support (() +* (S --> n)) by XBOOLE_0:def 1;
((EmptyBag X) +* (S --> n)) . x <> 0 by ;
hence contradiction by A3, A7; :: thesis: verum
end;
hence support (() +* (S --> n)) is finite ; :: thesis: verum
end;
suppose A9: ( not S is empty & n = 0 ) ; :: thesis: support (() +* (S --> n)) is finite
now :: thesis: support (() +* (S --> n)) is empty
assume not support (() +* (S --> n)) is empty ; :: thesis: contradiction
then consider x being object such that
A10: x in support (() +* (S --> n)) by XBOOLE_0:def 1;
A11: ((EmptyBag X) +* (S --> n)) . x <> 0 by ;
then (() +* (S --> n)) . x = (S --> n) . x by
.= 0 by ;
hence contradiction by A10, PRE_POLY:def 7; :: thesis: verum
end;
hence support (() +* (S --> n)) is finite ; :: thesis: verum
end;
suppose ( not S is empty & n <> 0 ) ; :: thesis: support (() +* (S --> n)) is finite
then for x being object holds
( x in S iff (() +* (S --> n)) . x <> 0 ) by A3, A4;
hence support (() +* (S --> n)) is finite by PRE_POLY:def 7; :: thesis: verum
end;
end;
end;
dom (() +* (S --> n)) = (dom ()) \/ (dom (S --> n)) by FUNCT_4:def 1
.= X \/ (dom (S --> n)) by
.= X \/ S by FUNCOP_1:13
.= X by XBOOLE_1:12 ;
then (EmptyBag X) +* (S --> n) is bag of X by ;
hence (EmptyBag X) +* (S --> n) is Element of Bags X by PRE_POLY:def 12; :: thesis: verum