set b = (EmptyBag X) +* (S --> n);
A1: EmptyBag X = X --> 0 by PRE_POLY:def 13;
A2: dom (S --> n) = S by FUNCOP_1:19;
A3: now
let i be set ; :: thesis: ( not i in S implies ((EmptyBag X) +* (S --> n)) . i = 0 )
assume not i in S ; :: thesis: ((EmptyBag X) +* (S --> n)) . i = 0
hence ((EmptyBag X) +* (S --> n)) . i = (EmptyBag X) . i by A2, FUNCT_4:12
.= 0 by PRE_POLY:52 ;
:: thesis: verum
end;
A4: now
let i be set ; :: thesis: ( i in S implies ((EmptyBag X) +* (S --> n)) . i = n )
assume A5: i in S ; :: thesis: ((EmptyBag X) +* (S --> n)) . i = n
thus ((EmptyBag X) +* (S --> n)) . i = (S --> n) . i by A2, A5, FUNCT_4:14
.= n by A5, FUNCOP_1:13 ; :: thesis: verum
end;
A6: support ((EmptyBag X) +* (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 ((EmptyBag X) +* (S --> n)) is finite
now
assume not support ((EmptyBag X) +* (S --> n)) is empty ; :: thesis: contradiction
then consider x being set such that
A8: x in support ((EmptyBag X) +* (S --> n)) by XBOOLE_0:def 1;
((EmptyBag X) +* (S --> n)) . x <> 0 by A8, PRE_POLY:def 7;
hence contradiction by A3, A7; :: thesis: verum
end;
hence support ((EmptyBag X) +* (S --> n)) is finite ; :: thesis: verum
end;
suppose A9: ( not S is empty & n = 0 ) ; :: thesis: support ((EmptyBag X) +* (S --> n)) is finite
now
assume not support ((EmptyBag X) +* (S --> n)) is empty ; :: thesis: contradiction
then consider x being set such that
A10: x in support ((EmptyBag X) +* (S --> n)) by XBOOLE_0:def 1;
A11: ((EmptyBag X) +* (S --> n)) . x <> 0 by A10, PRE_POLY:def 7;
then ((EmptyBag X) +* (S --> n)) . x = (S --> n) . x by A2, A3, FUNCT_4:14
.= 0 by A3, A9, A11, FUNCOP_1:13 ;
hence contradiction by A10, PRE_POLY:def 7; :: thesis: verum
end;
hence support ((EmptyBag X) +* (S --> n)) is finite ; :: thesis: verum
end;
suppose ( not S is empty & n <> 0 ) ; :: thesis: support ((EmptyBag X) +* (S --> n)) is finite
then for x being set holds
( x in S iff ((EmptyBag X) +* (S --> n)) . x <> 0 ) by A3, A4;
hence support ((EmptyBag X) +* (S --> n)) is finite by PRE_POLY:def 7; :: thesis: verum
end;
end;
end;
dom ((EmptyBag X) +* (S --> n)) = (dom (EmptyBag X)) \/ (dom (S --> n)) by FUNCT_4:def 1
.= X \/ (dom (S --> n)) by A1, FUNCOP_1:19
.= X \/ S by FUNCOP_1:19
.= X by XBOOLE_1:12 ;
then (EmptyBag X) +* (S --> n) is bag of X by A6, PARTFUN1:def 4, PRE_POLY:def 8, RELAT_1:def 18;
hence (EmptyBag X) +* (S --> n) is Element of Bags X by PRE_POLY:def 12; :: thesis: verum