reconsider D = dom F as finite set by A1;
set Ch1 = Choose D,k,0 ,1;
card (Choose D,k,0 ,1), Choose D,k,0 ,1 are_equipotent
by CARD_1:def 5;
then consider P1 being Function such that
A2:
( P1 is one-to-one & dom P1 = card (Choose D,k,0 ,1) & rng P1 = Choose D,k,0 ,1 )
by WELLORD2:def 4;
reconsider P1 = P1 as Function of card (Choose D,k,0 ,1), Choose D,k,0 ,1 by A2, FUNCT_2:3;
defpred S1[ set , set ] means for f being Function st f = P1 . $1 holds
$2 = card (Intersection F,f,0 );
A3:
for x being set st x in card (Choose D,k,0 ,1) holds
ex y being set st
( y in NAT & S1[x,y] )
proof
let x be
set ;
:: thesis: ( x in card (Choose D,k,0 ,1) implies ex y being set st
( y in NAT & S1[x,y] ) )
assume A4:
x in card (Choose D,k,0 ,1)
;
:: thesis: ex y being set st
( y in NAT & S1[x,y] )
x in dom P1
by A4, CARD_1:47, FUNCT_2:def 1;
then
P1 . x in rng P1
by FUNCT_1:def 5;
then consider f being
Function of
D,
{0 ,1} such that A5:
(
f = P1 . x &
card (f " {0 }) = k )
by Def1;
union (rng F) is
finite
by A1, Th41;
then reconsider I =
Intersection F,
f,
0 as
finite set ;
take
card I
;
:: thesis: ( card I in NAT & S1[x, card I] )
thus
(
card I in NAT &
S1[
x,
card I] )
by A5;
:: thesis: verum
end;
consider XFS1 being Function of card (Choose D,k,0 ,1), NAT such that
A6:
for x being set st x in card (Choose D,k,0 ,1) holds
S1[x,XFS1 . x]
from FUNCT_2:sch 1(A3);
A7:
( dom XFS1 = card (Choose D,k,0 ,1) & rng XFS1 c= NAT )
by FUNCT_2:def 1;
then reconsider XFS1 = XFS1 as XFinSequence by AFINSQ_1:7;
reconsider XFS1 = XFS1 as XFinSequence of NAT by A7, ORDINAL1:def 8;
take
Sum XFS1
; :: thesis: for x, y being set
for X being finite set
for P being Function of card (Choose X,k,x,y), Choose X,k,x,y st dom F = X & P is one-to-one & x <> y holds
ex XFS being XFinSequence of NAT st
( dom XFS = dom P & ( for z being set
for f being Function st z in dom XFS & f = P . z holds
XFS . z = card (Intersection F,f,x) ) & Sum XFS1 = Sum XFS )
let x, y be set ; :: thesis: for X being finite set
for P being Function of card (Choose X,k,x,y), Choose X,k,x,y st dom F = X & P is one-to-one & x <> y holds
ex XFS being XFinSequence of NAT st
( dom XFS = dom P & ( for z being set
for f being Function st z in dom XFS & f = P . z holds
XFS . z = card (Intersection F,f,x) ) & Sum XFS1 = Sum XFS )
let X be finite set ; :: thesis: for P being Function of card (Choose X,k,x,y), Choose X,k,x,y st dom F = X & P is one-to-one & x <> y holds
ex XFS being XFinSequence of NAT st
( dom XFS = dom P & ( for z being set
for f being Function st z in dom XFS & f = P . z holds
XFS . z = card (Intersection F,f,x) ) & Sum XFS1 = Sum XFS )
let P be Function of card (Choose X,k,x,y), Choose X,k,x,y; :: thesis: ( dom F = X & P is one-to-one & x <> y implies ex XFS being XFinSequence of NAT st
( dom XFS = dom P & ( for z being set
for f being Function st z in dom XFS & f = P . z holds
XFS . z = card (Intersection F,f,x) ) & Sum XFS1 = Sum XFS ) )
assume that
A8:
dom F = X
and
A9:
P is one-to-one
and
A10:
x <> y
; :: thesis: ex XFS being XFinSequence of NAT st
( dom XFS = dom P & ( for z being set
for f being Function st z in dom XFS & f = P . z holds
XFS . z = card (Intersection F,f,x) ) & Sum XFS1 = Sum XFS )
set Ch = Choose X,k,x,y;
defpred S2[ set , set ] means for f being Function st f = P . $1 holds
$2 = card (Intersection F,f,x);
A11:
for x1 being set st x1 in card (Choose X,k,x,y) holds
ex x2 being set st
( x2 in NAT & S2[x1,x2] )
proof
let x1 be
set ;
:: thesis: ( x1 in card (Choose X,k,x,y) implies ex x2 being set st
( x2 in NAT & S2[x1,x2] ) )
assume A12:
x1 in card (Choose X,k,x,y)
;
:: thesis: ex x2 being set st
( x2 in NAT & S2[x1,x2] )
x1 in dom P
by A12, CARD_1:47, FUNCT_2:def 1;
then
P . x1 in rng P
by FUNCT_1:def 5;
then consider f being
Function of
X,
{x,y} such that A13:
(
f = P . x1 &
card (f " {x}) = k )
by Def1;
union (rng F) is
finite
by A1, Th41;
then reconsider I =
Intersection F,
f,
x as
finite set ;
take
card I
;
:: thesis: ( card I in NAT & S2[x1, card I] )
thus
(
card I in NAT &
S2[
x1,
card I] )
by A13;
:: thesis: verum
end;
consider XFS being Function of card (Choose X,k,x,y), NAT such that
A14:
for x1 being set st x1 in card (Choose X,k,x,y) holds
S2[x1,XFS . x1]
from FUNCT_2:sch 1(A11);
A15:
( dom XFS = card (Choose X,k,x,y) & rng XFS c= NAT )
by FUNCT_2:def 1;
then reconsider XFS = XFS as XFinSequence by AFINSQ_1:7;
reconsider XFS = XFS as XFinSequence of NAT by A15, ORDINAL1:def 8;
take
XFS
; :: thesis: ( dom XFS = dom P & ( for z being set
for f being Function st z in dom XFS & f = P . z holds
XFS . z = card (Intersection F,f,x) ) & Sum XFS1 = Sum XFS )
( Choose X,k,x,y = {} implies card (Choose X,k,x,y) = {} )
;
then
dom P = card (Choose X,k,x,y)
by FUNCT_2:def 1;
hence A16:
dom XFS = dom P
by FUNCT_2:def 1; :: thesis: ( ( for z being set
for f being Function st z in dom XFS & f = P . z holds
XFS . z = card (Intersection F,f,x) ) & Sum XFS1 = Sum XFS )
hence
for z being set
for f being Function st z in dom XFS & f = P . z holds
XFS . z = card (Intersection F,f,x)
by A14; :: thesis: Sum XFS1 = Sum XFS
defpred S3[ set , set ] means for f1 being Function of D,{0 ,1}
for f being Function of X,{x,y} st f1 = P1 . $1 & f = P . $2 holds
( f1 " {0 } = f " {x} & ( for z being set st z in X holds
( ( f1 . z = 0 implies f . z = x ) & ( f . z = x implies f1 . z = 0 ) & ( f1 . z = 1 implies f . z = y ) & ( f . z = y implies f1 . z = 1 ) ) ) );
A17:
for x1 being set st x1 in card (Choose D,k,0 ,1) holds
ex x2 being set st
( x2 in card (Choose D,k,0 ,1) & S3[x1,x2] )
proof
let x1 be
set ;
:: thesis: ( x1 in card (Choose D,k,0 ,1) implies ex x2 being set st
( x2 in card (Choose D,k,0 ,1) & S3[x1,x2] ) )
assume A18:
x1 in card (Choose D,k,0 ,1)
;
:: thesis: ex x2 being set st
( x2 in card (Choose D,k,0 ,1) & S3[x1,x2] )
P1 . x1 in rng P1
by A2, A18, FUNCT_1:def 5;
then consider f1 being
Function of
D,
{0 ,1} such that A19:
(
f1 = P1 . x1 &
card (f1 " {0 }) = k )
by Def1;
defpred S4[
set ,
set ]
means ( (
f1 . $1
= 0 implies $2
= x ) & ( $2
= x implies
f1 . $1
= 0 ) & (
f1 . $1
= 1 implies $2
= y ) & ( $2
= y implies
f1 . $1
= 1 ) );
A20:
for
d being
set st
d in X holds
ex
fd being
set st
(
fd in {x,y} &
S4[
d,
fd] )
proof
let d be
set ;
:: thesis: ( d in X implies ex fd being set st
( fd in {x,y} & S4[d,fd] ) )
assume A21:
d in X
;
:: thesis: ex fd being set st
( fd in {x,y} & S4[d,fd] )
d in dom f1
by A8, A21, FUNCT_2:def 1;
then
f1 . d in rng f1
by FUNCT_1:def 5;
then
( (
f1 . d = 0 or
f1 . d = 1 ) &
x in {x,y} &
y in {x,y} )
by TARSKI:def 2;
hence
ex
fd being
set st
(
fd in {x,y} &
S4[
d,
fd] )
by A10;
:: thesis: verum
end;
consider f being
Function of
X,
{x,y} such that A22:
for
d being
set st
d in X holds
S4[
d,
f . d]
from FUNCT_2:sch 1(A20);
A23:
f " {x} = f1 " {0 }
card (card (Choose X,k,x,y)) = card (Choose X,k,x,y)
;
then
P is
onto
by A9, STIRL2_1:70;
then
(
f in Choose X,
k,
x,
y &
rng P = Choose X,
k,
x,
y )
by A19, A23, Def1, FUNCT_2:def 3;
then consider x2 being
set such that A25:
(
x2 in dom P &
P . x2 = f )
by FUNCT_1:def 5;
take
x2
;
:: thesis: ( x2 in card (Choose D,k,0 ,1) & S3[x1,x2] )
(
Choose X,
k,
x,
y = {} implies
card (Choose X,k,x,y) = {} )
;
then
(
dom P = card (Choose X,k,x,y) &
card (Choose X,k,x,y) = (card X) choose k &
card (Choose D,k,0 ,1) = (card D) choose k )
by A10, Th18, FUNCT_2:def 1;
hence
x2 in card (Choose D,k,0 ,1)
by A8, A25;
:: thesis: S3[x1,x2]
let f1' be
Function of
D,
{0 ,1};
:: thesis: for f being Function of X,{x,y} st f1' = P1 . x1 & f = P . x2 holds
( f1' " {0 } = f " {x} & ( for z being set st z in X holds
( ( f1' . z = 0 implies f . z = x ) & ( f . z = x implies f1' . z = 0 ) & ( f1' . z = 1 implies f . z = y ) & ( f . z = y implies f1' . z = 1 ) ) ) )let f' be
Function of
X,
{x,y};
:: thesis: ( f1' = P1 . x1 & f' = P . x2 implies ( f1' " {0 } = f' " {x} & ( for z being set st z in X holds
( ( f1' . z = 0 implies f' . z = x ) & ( f' . z = x implies f1' . z = 0 ) & ( f1' . z = 1 implies f' . z = y ) & ( f' . z = y implies f1' . z = 1 ) ) ) ) )
assume A26:
(
f1' = P1 . x1 &
f' = P . x2 )
;
:: thesis: ( f1' " {0 } = f' " {x} & ( for z being set st z in X holds
( ( f1' . z = 0 implies f' . z = x ) & ( f' . z = x implies f1' . z = 0 ) & ( f1' . z = 1 implies f' . z = y ) & ( f' . z = y implies f1' . z = 1 ) ) ) )
thus
f' " {x} = f1' " {0 }
by A19, A23, A25, A26;
:: thesis: for z being set st z in X holds
( ( f1' . z = 0 implies f' . z = x ) & ( f' . z = x implies f1' . z = 0 ) & ( f1' . z = 1 implies f' . z = y ) & ( f' . z = y implies f1' . z = 1 ) )
let z be
set ;
:: thesis: ( z in X implies ( ( f1' . z = 0 implies f' . z = x ) & ( f' . z = x implies f1' . z = 0 ) & ( f1' . z = 1 implies f' . z = y ) & ( f' . z = y implies f1' . z = 1 ) ) )
assume A27:
z in X
;
:: thesis: ( ( f1' . z = 0 implies f' . z = x ) & ( f' . z = x implies f1' . z = 0 ) & ( f1' . z = 1 implies f' . z = y ) & ( f' . z = y implies f1' . z = 1 ) )
thus
( (
f1' . z = 0 implies
f' . z = x ) & (
f' . z = x implies
f1' . z = 0 ) & (
f1' . z = 1 implies
f' . z = y ) & (
f' . z = y implies
f1' . z = 1 ) )
by A19, A22, A25, A26, A27;
:: thesis: verum
end;
consider Perm being Function of card (Choose D,k,0 ,1), card (Choose D,k,0 ,1) such that
A28:
for x1 being set st x1 in card (Choose D,k,0 ,1) holds
S3[x1,Perm . x1]
from FUNCT_2:sch 1(A17);
A29:
( card (Choose D,k,0 ,1) = (card D) choose k & card (Choose X,k,x,y) = (card X) choose k )
by A10, Th18;
then A30:
dom XFS = dom XFS1
by A8, A15, FUNCT_2:def 1;
now let z1,
z2 be
set ;
:: thesis: ( z1 in dom Perm & z2 in dom Perm & Perm . z1 = Perm . z2 implies z1 = z2 )assume A31:
(
z1 in dom Perm &
z2 in dom Perm &
Perm . z1 = Perm . z2 )
;
:: thesis: z1 = z2
P1 . z1 in rng P1
by A2, A31, FUNCT_1:def 5;
then consider P1z1 being
Function of
D,
{0 ,1} such that A32:
(
P1 . z1 = P1z1 &
card (P1z1 " {0 }) = k )
by Def1;
P1 . z2 in rng P1
by A2, A31, FUNCT_1:def 5;
then consider P1z2 being
Function of
D,
{0 ,1} such that A33:
(
P1 . z2 = P1z2 &
card (P1z2 " {0 }) = k )
by Def1;
(
Perm . z1 in rng Perm &
Perm . z2 in rng Perm &
card (Choose X,k,x,y) = (card X) choose k &
card (Choose D,k,0 ,1) = (card D) choose k )
by A10, A31, Th18, FUNCT_1:def 5;
then
(
Perm . z1 in card (Choose X,k,x,y) & (
Choose X,
k,
x,
y = {} implies
card (Choose X,k,x,y) = {} ) )
by A8;
then
Perm . z1 in dom P
by FUNCT_2:def 1;
then
P . (Perm . z1) in rng P
by FUNCT_1:def 5;
then consider PPermz1 being
Function of
X,
{x,y} such that A34:
(
PPermz1 = P . (Perm . z1) &
card (PPermz1 " {x}) = k )
by Def1;
P1z1 = P1z2
hence
z1 = z2
by A2, A31, A32, A33, FUNCT_1:def 8;
:: thesis: verum end;
then
( Perm is one-to-one & card (card (Choose D,k,0 ,1)) = card (card (Choose D,k,0 ,1)) )
by FUNCT_1:def 8;
then
( Perm is one-to-one & Perm is onto & card (Choose D,k,0 ,1) = dom XFS )
by A8, A29, FUNCT_2:def 1, STIRL2_1:70;
then reconsider Perm = Perm as Permutation of dom XFS ;
XFS1 = XFS * Perm
proof
A38:
for
z being
set st
z in dom XFS1 holds
XFS1 . z = (XFS * Perm) . z
proof
let z be
set ;
:: thesis: ( z in dom XFS1 implies XFS1 . z = (XFS * Perm) . z )
assume A39:
z in dom XFS1
;
:: thesis: XFS1 . z = (XFS * Perm) . z
z in dom Perm
by A30, A39, FUNCT_2:67;
then A40:
Perm . z in rng Perm
by FUNCT_1:def 5;
then
P . (Perm . z) in rng P
by A16, FUNCT_1:def 5;
then consider p being
Function of
X,
{x,y} such that A41:
(
p = P . (Perm . z) &
card (p " {x}) = k )
by Def1;
P1 . z in rng P1
by A2, A7, A39, FUNCT_1:def 5;
then consider p1 being
Function of
D,
{0 ,1} such that A42:
(
p1 = P1 . z &
card (p1 " {0 }) = k )
by Def1;
p1 " {0 } = p " {x}
by A7, A28, A39, A41, A42;
then
(
Intersection F,
p1,
0 = Intersection F,
p,
x &
XFS1 . z = card (Intersection F,p1,0 ) &
XFS . (Perm . z) = card (Intersection F,p,x) &
z in dom Perm )
by A6, A7, A14, A15, A39, A40, A41, A42, Th35, FUNCT_2:67;
hence
XFS1 . z = (XFS * Perm) . z
by FUNCT_1:23;
:: thesis: verum
end;
(
rng Perm c= dom XFS &
dom Perm = dom XFS )
by FUNCT_2:67;
then
dom XFS1 = dom (XFS * Perm)
by A30, RELAT_1:46;
hence
XFS1 = XFS * Perm
by A38, FUNCT_1:9;
:: thesis: verum
end;
then
( addnat "**" XFS = addnat "**" XFS1 & addnat "**" XFS1 = Sum XFS1 )
by Th48, STIRL2_1:def 4;
hence
Sum XFS1 = Sum XFS
by STIRL2_1:def 4; :: thesis: verum