let X be set ; for A, B, C being Subset of X ex F being Function of NAT,(bool X) st
( rng F = {A,B,C} & F . 0 = A & F . 1 = B & ( for n being Element of NAT st 1 < n holds
F . n = C ) )
let A, B, C be Subset of X; ex F being Function of NAT,(bool X) st
( rng F = {A,B,C} & F . 0 = A & F . 1 = B & ( for n being Element of NAT st 1 < n holds
F . n = C ) )
defpred S1[ Element of NAT , set ] means ( ( $1 = 0 implies $2 = A ) & ( $1 = 1 implies $2 = B ) & ( 1 < $1 implies $2 = C ) );
defpred S2[ set ] means ex n being Element of NAT ex X being set st
( $1 = [n,X] & S1[n,X] );
ex GRAF being set st
for x being set holds
( x in GRAF iff ( x in [:NAT,(bool X):] & S2[x] ) )
from XBOOLE_0:sch 1();
then consider GRAF being set such that
A1:
for x being set holds
( x in GRAF iff ( x in [:NAT,(bool X):] & S2[x] ) )
;
A2:
GRAF is Function-like
proof
let x,
y1,
y2 be
set ;
FUNCT_1:def 1 ( not [x,y1] in GRAF or not [x,y2] in GRAF or y1 = y2 )
assume that A3:
[x,y1] in GRAF
and A4:
[x,y2] in GRAF
;
y1 = y2
A5:
S2[
[x,y1]]
by A1, A3;
A6:
[x,y2] in [:NAT,(bool X):]
by A1, A4;
A7:
S2[
[x,y2]]
by A1, A4;
reconsider x =
x as
Element of
NAT by A6, ZFMISC_1:106;
end;
A11:
for x being set holds
( x in GRAF iff ( x = [0,A] or x = [1,B] or ex n being Element of NAT st
( x = [n,C] & 1 < n ) ) )
proof
let x be
set ;
( x in GRAF iff ( x = [0,A] or x = [1,B] or ex n being Element of NAT st
( x = [n,C] & 1 < n ) ) )
A12:
( (
x = [0,A] or
x = [1,B] or ex
n being
Element of
NAT st
(
x = [n,C] & 1
< n ) ) implies
x in GRAF )
( not
x in GRAF or
x = [0,A] or
x = [1,B] or ex
n being
Element of
NAT st
(
x = [n,C] & 1
< n ) )
hence
(
x in GRAF iff (
x = [0,A] or
x = [1,B] or ex
n being
Element of
NAT st
(
x = [n,C] & 1
< n ) ) )
by A12;
verum
end;
GRAF is Relation-like
then reconsider F = GRAF as Function by A2;
A20:
for x being set holds
( x in NAT iff ex y being set st [x,y] in F )
then A27:
dom F = NAT
by RELAT_1:def 4;
A28:
for y being set holds
( y in {A,B,C} iff ex x being set st
( x in dom F & y = F . x ) )
proof
let y be
set ;
( y in {A,B,C} iff ex x being set st
( x in dom F & y = F . x ) )
thus
(
y in {A,B,C} implies ex
x being
set st
(
x in dom F &
y = F . x ) )
( ex x being set st
( x in dom F & y = F . x ) implies y in {A,B,C} )
given x being
set such that A33:
x in dom F
and A34:
y = F . x
;
y in {A,B,C}
reconsider x =
x as
Element of
NAT by A20, A33, RELAT_1:def 4;
end;
then A37:
rng F = {A,B,C}
by FUNCT_1:def 5;
rng F c= bool X
then reconsider F = F as Function of NAT,(bool X) by A27, FUNCT_2:4;
A38:
for n being Element of NAT st 1 < n holds
F . n = C
take
F
; ( rng F = {A,B,C} & F . 0 = A & F . 1 = B & ( for n being Element of NAT st 1 < n holds
F . n = C ) )
( [0,A] in F & [1,B] in F )
by A11;
hence
( rng F = {A,B,C} & F . 0 = A & F . 1 = B & ( for n being Element of NAT st 1 < n holds
F . n = C ) )
by A28, A38, FUNCT_1:8, FUNCT_1:def 5; verum