:: FUNCT_7 semantic presentation begin theorem :: FUNCT_7:1 for f being Function for X being set st rng f c= X holds (id X) * f = f proof let f be Function; ::_thesis: for X being set st rng f c= X holds (id X) * f = f let X be set ; ::_thesis: ( rng f c= X implies (id X) * f = f ) assume rng f c= X ; ::_thesis: (id X) * f = f then reconsider g = f as Function of (dom f),X by FUNCT_2:2; (id X) * g = g by FUNCT_2:17; hence (id X) * f = f ; ::_thesis: verum end; theorem :: FUNCT_7:2 for X being set for Y being non empty set for f being Function of X,Y st f is one-to-one holds for B being Subset of X for C being Subset of Y st C c= f .: B holds f " C c= B proof let X be set ; ::_thesis: for Y being non empty set for f being Function of X,Y st f is one-to-one holds for B being Subset of X for C being Subset of Y st C c= f .: B holds f " C c= B let Y be non empty set ; ::_thesis: for f being Function of X,Y st f is one-to-one holds for B being Subset of X for C being Subset of Y st C c= f .: B holds f " C c= B let f be Function of X,Y; ::_thesis: ( f is one-to-one implies for B being Subset of X for C being Subset of Y st C c= f .: B holds f " C c= B ) assume A1: f is one-to-one ; ::_thesis: for B being Subset of X for C being Subset of Y st C c= f .: B holds f " C c= B let B be Subset of X; ::_thesis: for C being Subset of Y st C c= f .: B holds f " C c= B let C be Subset of Y; ::_thesis: ( C c= f .: B implies f " C c= B ) assume C c= f .: B ; ::_thesis: f " C c= B then A2: f " C c= f " (f .: B) by RELAT_1:143; f " (f .: B) c= B by A1, FUNCT_1:82; hence f " C c= B by A2, XBOOLE_1:1; ::_thesis: verum end; theorem Th3: :: FUNCT_7:3 for X, Y being non empty set for f being Function of X,Y st f is one-to-one holds for x being Element of X for A being Subset of X st f . x in f .: A holds x in A proof let X, Y be non empty set ; ::_thesis: for f being Function of X,Y st f is one-to-one holds for x being Element of X for A being Subset of X st f . x in f .: A holds x in A let f be Function of X,Y; ::_thesis: ( f is one-to-one implies for x being Element of X for A being Subset of X st f . x in f .: A holds x in A ) assume A1: f is one-to-one ; ::_thesis: for x being Element of X for A being Subset of X st f . x in f .: A holds x in A let x be Element of X; ::_thesis: for A being Subset of X st f . x in f .: A holds x in A let A be Subset of X; ::_thesis: ( f . x in f .: A implies x in A ) assume f . x in f .: A ; ::_thesis: x in A then ex y being Element of X st ( y in A & f . y = f . x ) by FUNCT_2:65; hence x in A by A1, FUNCT_2:19; ::_thesis: verum end; theorem Th4: :: FUNCT_7:4 for X, Y being non empty set for f being Function of X,Y st f is one-to-one holds for x being Element of X for A being Subset of X for B being Subset of Y st f . x in (f .: A) \ B holds x in A \ (f " B) proof let X, Y be non empty set ; ::_thesis: for f being Function of X,Y st f is one-to-one holds for x being Element of X for A being Subset of X for B being Subset of Y st f . x in (f .: A) \ B holds x in A \ (f " B) let f be Function of X,Y; ::_thesis: ( f is one-to-one implies for x being Element of X for A being Subset of X for B being Subset of Y st f . x in (f .: A) \ B holds x in A \ (f " B) ) assume A1: f is one-to-one ; ::_thesis: for x being Element of X for A being Subset of X for B being Subset of Y st f . x in (f .: A) \ B holds x in A \ (f " B) let x be Element of X; ::_thesis: for A being Subset of X for B being Subset of Y st f . x in (f .: A) \ B holds x in A \ (f " B) let A be Subset of X; ::_thesis: for B being Subset of Y st f . x in (f .: A) \ B holds x in A \ (f " B) let B be Subset of Y; ::_thesis: ( f . x in (f .: A) \ B implies x in A \ (f " B) ) assume A2: f . x in (f .: A) \ B ; ::_thesis: x in A \ (f " B) A3: now__::_thesis:_not_x_in_f_"_B assume x in f " B ; ::_thesis: contradiction then f . x in B by FUNCT_1:def_7; hence contradiction by A2, XBOOLE_0:def_5; ::_thesis: verum end; f . x in f .: A by A2, XBOOLE_0:def_5; then x in A by A1, Th3; hence x in A \ (f " B) by A3, XBOOLE_0:def_5; ::_thesis: verum end; theorem :: FUNCT_7:5 for X, Y being non empty set for f being Function of X,Y st f is one-to-one holds for y being Element of Y for A being Subset of X for B being Subset of Y st y in (f .: A) \ B holds (f ") . y in A \ (f " B) proof let X, Y be non empty set ; ::_thesis: for f being Function of X,Y st f is one-to-one holds for y being Element of Y for A being Subset of X for B being Subset of Y st y in (f .: A) \ B holds (f ") . y in A \ (f " B) let f be Function of X,Y; ::_thesis: ( f is one-to-one implies for y being Element of Y for A being Subset of X for B being Subset of Y st y in (f .: A) \ B holds (f ") . y in A \ (f " B) ) assume A1: f is one-to-one ; ::_thesis: for y being Element of Y for A being Subset of X for B being Subset of Y st y in (f .: A) \ B holds (f ") . y in A \ (f " B) let y be Element of Y; ::_thesis: for A being Subset of X for B being Subset of Y st y in (f .: A) \ B holds (f ") . y in A \ (f " B) let A be Subset of X; ::_thesis: for B being Subset of Y st y in (f .: A) \ B holds (f ") . y in A \ (f " B) let B be Subset of Y; ::_thesis: ( y in (f .: A) \ B implies (f ") . y in A \ (f " B) ) assume A2: y in (f .: A) \ B ; ::_thesis: (f ") . y in A \ (f " B) then A3: y in f .: A by XBOOLE_0:def_5; A4: f .: A c= rng f by RELAT_1:111; then (f ") . y in dom f by A1, A3, FUNCT_1:32; then reconsider x = (f ") . y as Element of X ; y = f . x by A1, A3, A4, FUNCT_1:35; hence (f ") . y in A \ (f " B) by A1, A2, Th4; ::_thesis: verum end; theorem Th6: :: FUNCT_7:6 for f being Function for a being set st a in dom f holds f | {a} = a .--> (f . a) proof let f be Function; ::_thesis: for a being set st a in dom f holds f | {a} = a .--> (f . a) let a be set ; ::_thesis: ( a in dom f implies f | {a} = a .--> (f . a) ) assume a in dom f ; ::_thesis: f | {a} = a .--> (f . a) hence f | {a} = {[a,(f . a)]} by GRFUNC_1:28 .= a .--> (f . a) by ZFMISC_1:29 ; ::_thesis: verum end; registration let x, y be set ; clusterx .--> y -> non empty ; coherence not x .--> y is empty ; end; registration let x, y, a, b be set ; cluster(x,y) --> (a,b) -> non empty ; coherence not (x,y) --> (a,b) is empty ; end; theorem Th7: :: FUNCT_7:7 for I being set for M being ManySortedSet of I for i being set st i in I holds i .--> (M . i) = M | {i} proof let I be set ; ::_thesis: for M being ManySortedSet of I for i being set st i in I holds i .--> (M . i) = M | {i} let M be ManySortedSet of I; ::_thesis: for i being set st i in I holds i .--> (M . i) = M | {i} let i be set ; ::_thesis: ( i in I implies i .--> (M . i) = M | {i} ) assume i in I ; ::_thesis: i .--> (M . i) = M | {i} then i in dom M by PARTFUN1:def_2; hence i .--> (M . i) = M | {i} by Th6; ::_thesis: verum end; theorem :: FUNCT_7:8 for I, J being set for M being ManySortedSet of [:I,J:] for i, j being set st i in I & j in J holds (i,j) :-> (M . (i,j)) = M | [:{i},{j}:] proof let I, J be set ; ::_thesis: for M being ManySortedSet of [:I,J:] for i, j being set st i in I & j in J holds (i,j) :-> (M . (i,j)) = M | [:{i},{j}:] let M be ManySortedSet of [:I,J:]; ::_thesis: for i, j being set st i in I & j in J holds (i,j) :-> (M . (i,j)) = M | [:{i},{j}:] let i, j be set ; ::_thesis: ( i in I & j in J implies (i,j) :-> (M . (i,j)) = M | [:{i},{j}:] ) assume ( i in I & j in J ) ; ::_thesis: (i,j) :-> (M . (i,j)) = M | [:{i},{j}:] then A1: [i,j] in [:I,J:] by ZFMISC_1:87; thus (i,j) :-> (M . (i,j)) = [i,j] .--> (M . [i,j]) .= M | {[i,j]} by A1, Th7 .= M | [:{i},{j}:] by ZFMISC_1:29 ; ::_thesis: verum end; theorem Th9: :: FUNCT_7:9 for f, g, h being Function st rng h c= dom f holds f * (g +* h) = (f * g) +* (f * h) proof let f, g, h be Function; ::_thesis: ( rng h c= dom f implies f * (g +* h) = (f * g) +* (f * h) ) assume A1: rng h c= dom f ; ::_thesis: f * (g +* h) = (f * g) +* (f * h) A2: dom h c= dom (g +* h) by FUNCT_4:10; A3: dom g c= dom (g +* h) by FUNCT_4:10; A4: dom (f * (g +* h)) = (dom (f * g)) \/ (dom (f * h)) proof thus dom (f * (g +* h)) c= (dom (f * g)) \/ (dom (f * h)) :: according to XBOOLE_0:def_10 ::_thesis: (dom (f * g)) \/ (dom (f * h)) c= dom (f * (g +* h)) proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in dom (f * (g +* h)) or x in (dom (f * g)) \/ (dom (f * h)) ) assume A5: x in dom (f * (g +* h)) ; ::_thesis: x in (dom (f * g)) \/ (dom (f * h)) then A6: (g +* h) . x in dom f by FUNCT_1:11; x in dom (g +* h) by A5, FUNCT_1:11; then A7: x in (dom g) \/ (dom h) by FUNCT_4:def_1; percases ( x in dom h or not x in dom h ) ; supposeA8: x in dom h ; ::_thesis: x in (dom (f * g)) \/ (dom (f * h)) then h . x in dom f by A6, FUNCT_4:13; then x in dom (f * h) by A8, FUNCT_1:11; hence x in (dom (f * g)) \/ (dom (f * h)) by XBOOLE_0:def_3; ::_thesis: verum end; suppose not x in dom h ; ::_thesis: x in (dom (f * g)) \/ (dom (f * h)) then ( g . x in dom f & x in dom g ) by A7, A6, FUNCT_4:11, XBOOLE_0:def_3; then x in dom (f * g) by FUNCT_1:11; hence x in (dom (f * g)) \/ (dom (f * h)) by XBOOLE_0:def_3; ::_thesis: verum end; end; end; let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in (dom (f * g)) \/ (dom (f * h)) or x in dom (f * (g +* h)) ) assume A9: x in (dom (f * g)) \/ (dom (f * h)) ; ::_thesis: x in dom (f * (g +* h)) percases ( x in dom (f * h) or not x in dom (f * h) ) ; supposeA10: x in dom (f * h) ; ::_thesis: x in dom (f * (g +* h)) then A11: h . x in dom f by FUNCT_1:11; A12: x in dom h by A10, FUNCT_1:11; then (g +* h) . x = h . x by FUNCT_4:13; hence x in dom (f * (g +* h)) by A2, A12, A11, FUNCT_1:11; ::_thesis: verum end; supposeA13: not x in dom (f * h) ; ::_thesis: x in dom (f * (g +* h)) ( x in dom h implies h . x in dom f ) proof assume x in dom h ; ::_thesis: h . x in dom f then h . x in rng h by FUNCT_1:3; hence h . x in dom f by A1; ::_thesis: verum end; then not x in dom h by A13, FUNCT_1:11; then A14: (g +* h) . x = g . x by FUNCT_4:11; x in dom (f * g) by A9, A13, XBOOLE_0:def_3; then ( g . x in dom f & x in dom g ) by FUNCT_1:11; hence x in dom (f * (g +* h)) by A3, A14, FUNCT_1:11; ::_thesis: verum end; end; end; now__::_thesis:_for_x_being_set_st_x_in_(dom_(f_*_g))_\/_(dom_(f_*_h))_holds_ (_(_x_in_dom_(f_*_h)_implies_(f_*_(g_+*_h))_._x_=_(f_*_h)_._x_)_&_(_not_x_in_dom_(f_*_h)_implies_(f_*_(g_+*_h))_._x_=_(f_*_g)_._x_)_) let x be set ; ::_thesis: ( x in (dom (f * g)) \/ (dom (f * h)) implies ( ( x in dom (f * h) implies (f * (g +* h)) . x = (f * h) . x ) & ( not x in dom (f * h) implies (f * (g +* h)) . x = (f * g) . x ) ) ) assume A15: x in (dom (f * g)) \/ (dom (f * h)) ; ::_thesis: ( ( x in dom (f * h) implies (f * (g +* h)) . x = (f * h) . x ) & ( not x in dom (f * h) implies (f * (g +* h)) . x = (f * g) . x ) ) thus ( x in dom (f * h) implies (f * (g +* h)) . x = (f * h) . x ) ::_thesis: ( not x in dom (f * h) implies (f * (g +* h)) . x = (f * g) . x ) proof assume x in dom (f * h) ; ::_thesis: (f * (g +* h)) . x = (f * h) . x then A16: x in dom h by FUNCT_1:11; hence (f * (g +* h)) . x = f . ((g +* h) . x) by A2, FUNCT_1:13 .= f . (h . x) by A16, FUNCT_4:13 .= (f * h) . x by A16, FUNCT_1:13 ; ::_thesis: verum end; assume A17: not x in dom (f * h) ; ::_thesis: (f * (g +* h)) . x = (f * g) . x ( x in dom h implies h . x in dom f ) proof assume x in dom h ; ::_thesis: h . x in dom f then h . x in rng h by FUNCT_1:3; hence h . x in dom f by A1; ::_thesis: verum end; then A18: not x in dom h by A17, FUNCT_1:11; x in dom (f * g) by A15, A17, XBOOLE_0:def_3; then A19: x in dom g by FUNCT_1:11; hence (f * (g +* h)) . x = f . ((g +* h) . x) by A3, FUNCT_1:13 .= f . (g . x) by A18, FUNCT_4:11 .= (f * g) . x by A19, FUNCT_1:13 ; ::_thesis: verum end; hence f * (g +* h) = (f * g) +* (f * h) by A4, FUNCT_4:def_1; ::_thesis: verum end; theorem Th10: :: FUNCT_7:10 for f, g, h being Function holds (g +* h) * f = (g * f) +* (h * f) proof let f, g, h be Function; ::_thesis: (g +* h) * f = (g * f) +* (h * f) A1: dom ((g +* h) * f) = (dom (g * f)) \/ (dom (h * f)) proof thus dom ((g +* h) * f) c= (dom (g * f)) \/ (dom (h * f)) :: according to XBOOLE_0:def_10 ::_thesis: (dom (g * f)) \/ (dom (h * f)) c= dom ((g +* h) * f) proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in dom ((g +* h) * f) or x in (dom (g * f)) \/ (dom (h * f)) ) assume A2: x in dom ((g +* h) * f) ; ::_thesis: x in (dom (g * f)) \/ (dom (h * f)) then f . x in dom (g +* h) by FUNCT_1:11; then f . x in (dom g) \/ (dom h) by FUNCT_4:def_1; then A3: ( f . x in dom g or f . x in dom h ) by XBOOLE_0:def_3; x in dom f by A2, FUNCT_1:11; then ( x in dom (g * f) or x in dom (h * f) ) by A3, FUNCT_1:11; hence x in (dom (g * f)) \/ (dom (h * f)) by XBOOLE_0:def_3; ::_thesis: verum end; let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in (dom (g * f)) \/ (dom (h * f)) or x in dom ((g +* h) * f) ) assume x in (dom (g * f)) \/ (dom (h * f)) ; ::_thesis: x in dom ((g +* h) * f) then A4: ( x in dom (g * f) or x in dom (h * f) ) by XBOOLE_0:def_3; then ( f . x in dom g or f . x in dom h ) by FUNCT_1:11; then f . x in (dom g) \/ (dom h) by XBOOLE_0:def_3; then A5: f . x in dom (g +* h) by FUNCT_4:def_1; x in dom f by A4, FUNCT_1:11; hence x in dom ((g +* h) * f) by A5, FUNCT_1:11; ::_thesis: verum end; now__::_thesis:_for_x_being_set_st_x_in_(dom_(g_*_f))_\/_(dom_(h_*_f))_holds_ (_(_x_in_dom_(h_*_f)_implies_((g_+*_h)_*_f)_._x_=_(h_*_f)_._x_)_&_(_not_x_in_dom_(h_*_f)_implies_((g_+*_h)_*_f)_._x_=_(g_*_f)_._x_)_) let x be set ; ::_thesis: ( x in (dom (g * f)) \/ (dom (h * f)) implies ( ( x in dom (h * f) implies ((g +* h) * f) . x = (h * f) . x ) & ( not x in dom (h * f) implies ((g +* h) * f) . x = (g * f) . x ) ) ) assume x in (dom (g * f)) \/ (dom (h * f)) ; ::_thesis: ( ( x in dom (h * f) implies ((g +* h) * f) . x = (h * f) . x ) & ( not x in dom (h * f) implies ((g +* h) * f) . x = (g * f) . x ) ) then ( x in dom (g * f) or x in dom (h * f) ) by XBOOLE_0:def_3; then A6: x in dom f by FUNCT_1:11; hereby ::_thesis: ( not x in dom (h * f) implies ((g +* h) * f) . x = (g * f) . x ) assume A7: x in dom (h * f) ; ::_thesis: ((g +* h) * f) . x = (h * f) . x then A8: f . x in dom h by FUNCT_1:11; thus ((g +* h) * f) . x = (g +* h) . (f . x) by A6, FUNCT_1:13 .= h . (f . x) by A8, FUNCT_4:13 .= (h * f) . x by A7, FUNCT_1:12 ; ::_thesis: verum end; assume not x in dom (h * f) ; ::_thesis: ((g +* h) * f) . x = (g * f) . x then A9: not f . x in dom h by A6, FUNCT_1:11; thus ((g +* h) * f) . x = (g +* h) . (f . x) by A6, FUNCT_1:13 .= g . (f . x) by A9, FUNCT_4:11 .= (g * f) . x by A6, FUNCT_1:13 ; ::_thesis: verum end; hence (g +* h) * f = (g * f) +* (h * f) by A1, FUNCT_4:def_1; ::_thesis: verum end; theorem :: FUNCT_7:11 for f, g, h being Function st rng f misses dom g holds (h +* g) * f = h * f proof let f, g, h be Function; ::_thesis: ( rng f misses dom g implies (h +* g) * f = h * f ) assume A1: rng f misses dom g ; ::_thesis: (h +* g) * f = h * f thus (h +* g) * f = (h * f) +* (g * f) by Th10 .= (h * f) +* {} by A1, RELAT_1:44 .= h * f ; ::_thesis: verum end; theorem Th12: :: FUNCT_7:12 for A, B, y being set st A meets rng ((id B) +* (A --> y)) holds y in A proof let A, B be set ; ::_thesis: for y being set st A meets rng ((id B) +* (A --> y)) holds y in A let y be set ; ::_thesis: ( A meets rng ((id B) +* (A --> y)) implies y in A ) assume A meets rng ((id B) +* (A --> y)) ; ::_thesis: y in A then consider x being set such that A1: x in A and A2: x in rng ((id B) +* (A --> y)) by XBOOLE_0:3; consider z being set such that A3: z in dom ((id B) +* (A --> y)) and A4: ((id B) +* (A --> y)) . z = x by A2, FUNCT_1:def_3; A5: z in (dom (id B)) \/ (dom (A --> y)) by A3, FUNCT_4:def_1; percases ( z in dom (A --> y) or not z in dom (A --> y) ) ; supposeA6: z in dom (A --> y) ; ::_thesis: y in A then y = (A --> y) . z by FUNCOP_1:7 .= x by A4, A6, FUNCT_4:13 ; hence y in A by A1; ::_thesis: verum end; supposeA7: not z in dom (A --> y) ; ::_thesis: y in A then A8: z in dom (id B) by A5, XBOOLE_0:def_3; x = (id B) . z by A4, A7, FUNCT_4:11 .= z by A8, FUNCT_1:18 ; hence y in A by A1, A7, FUNCOP_1:13; ::_thesis: verum end; end; end; theorem :: FUNCT_7:13 for x, y, A being set st x <> y holds not x in rng ((id A) +* (x .--> y)) proof let x, y be set ; ::_thesis: for A being set st x <> y holds not x in rng ((id A) +* (x .--> y)) let A be set ; ::_thesis: ( x <> y implies not x in rng ((id A) +* (x .--> y)) ) assume x <> y ; ::_thesis: not x in rng ((id A) +* (x .--> y)) then not y in {x} by TARSKI:def_1; then {x} misses rng ((id A) +* ({x} --> y)) by Th12; hence not x in rng ((id A) +* (x .--> y)) by ZFMISC_1:48; ::_thesis: verum end; theorem :: FUNCT_7:14 for X, a being set for f being Function st dom f = X \/ {a} holds f = (f | X) +* (a .--> (f . a)) proof let X, a be set ; ::_thesis: for f being Function st dom f = X \/ {a} holds f = (f | X) +* (a .--> (f . a)) let f be Function; ::_thesis: ( dom f = X \/ {a} implies f = (f | X) +* (a .--> (f . a)) ) assume A1: dom f = X \/ {a} ; ::_thesis: f = (f | X) +* (a .--> (f . a)) a in {a} by TARSKI:def_1; then A2: a in dom f by A1, XBOOLE_0:def_3; thus f = (f | X) +* (f | {a}) by A1, FUNCT_4:70 .= (f | X) +* (a .--> (f . a)) by A2, Th6 ; ::_thesis: verum end; theorem :: FUNCT_7:15 for f being Function for X, y, z being set holds (f +* (X --> y)) +* (X --> z) = f +* (X --> z) proof let f be Function; ::_thesis: for X, y, z being set holds (f +* (X --> y)) +* (X --> z) = f +* (X --> z) let X, y, z be set ; ::_thesis: (f +* (X --> y)) +* (X --> z) = f +* (X --> z) A1: dom (X --> z) = X by FUNCOP_1:13; A2: dom (X --> y) = X by FUNCOP_1:13; then dom (f +* (X --> y)) = (dom f) \/ X by FUNCT_4:def_1; then A3: dom ((f +* (X --> y)) +* (X --> z)) = ((dom f) \/ X) \/ X by A1, FUNCT_4:def_1 .= (dom f) \/ (X \/ X) by XBOOLE_1:4 .= (dom f) \/ X ; A4: now__::_thesis:_for_x_being_set_st_x_in_(dom_f)_\/_X_holds_ ((f_+*_(X_-->_y))_+*_(X_-->_z))_._x_=_(f_+*_(X_-->_z))_._x let x be set ; ::_thesis: ( x in (dom f) \/ X implies ((f +* (X --> y)) +* (X --> z)) . b1 = (f +* (X --> z)) . b1 ) assume x in (dom f) \/ X ; ::_thesis: ((f +* (X --> y)) +* (X --> z)) . b1 = (f +* (X --> z)) . b1 percases ( x in X or not x in X ) ; supposeA5: x in X ; ::_thesis: ((f +* (X --> y)) +* (X --> z)) . b1 = (f +* (X --> z)) . b1 then ((f +* (X --> y)) +* (X --> z)) . x = (X --> z) . x by A1, FUNCT_4:13; hence ((f +* (X --> y)) +* (X --> z)) . x = (f +* (X --> z)) . x by A1, A5, FUNCT_4:13; ::_thesis: verum end; supposeA6: not x in X ; ::_thesis: ((f +* (X --> y)) +* (X --> z)) . b1 = (f +* (X --> z)) . b1 then ((f +* (X --> y)) +* (X --> z)) . x = (f +* (X --> y)) . x by A1, FUNCT_4:11; then ((f +* (X --> y)) +* (X --> z)) . x = f . x by A2, A6, FUNCT_4:11; hence ((f +* (X --> y)) +* (X --> z)) . x = (f +* (X --> z)) . x by A1, A6, FUNCT_4:11; ::_thesis: verum end; end; end; dom (f +* (X --> z)) = (dom f) \/ X by A1, FUNCT_4:def_1; hence (f +* (X --> y)) +* (X --> z) = f +* (X --> z) by A3, A4, FUNCT_1:2; ::_thesis: verum end; theorem :: FUNCT_7:16 INT <> INT * proof now__::_thesis:_not_1_in_INT_* A1: {} in 1 by CARD_1:49, TARSKI:def_1; assume 1 in INT * ; ::_thesis: contradiction then ex x, y being set st {} = [x,y] by A1, RELAT_1:def_1; hence contradiction ; ::_thesis: verum end; hence INT <> INT * by INT_1:def_2; ::_thesis: verum end; theorem :: FUNCT_7:17 {} * = {{}} proof thus {} * c= {{}} :: according to XBOOLE_0:def_10 ::_thesis: {{}} c= {} * proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in {} * or x in {{}} ) assume x in {} * ; ::_thesis: x in {{}} then reconsider f = x as FinSequence of {} by FINSEQ_1:def_11; now__::_thesis:_not_x_<>_{} assume x <> {} ; ::_thesis: contradiction then ex x being set st x in dom f ; hence contradiction ; ::_thesis: verum end; hence x in {{}} by ZFMISC_1:31; ::_thesis: verum end; let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in {{}} or x in {} * ) assume x in {{}} ; ::_thesis: x in {} * then A1: x = {} by TARSKI:def_1; rng {} = {} ; then x is FinSequence of {} by A1, FINSEQ_1:def_4; hence x in {} * by FINSEQ_1:def_11; ::_thesis: verum end; theorem Th18: :: FUNCT_7:18 for x, A being set holds ( <*x*> in A * iff x in A ) proof let x, A be set ; ::_thesis: ( <*x*> in A * iff x in A ) rng <*x*> = {x} by FINSEQ_1:38; then ( {x} c= A iff <*x*> is FinSequence of A ) by FINSEQ_1:def_4; hence ( <*x*> in A * iff x in A ) by FINSEQ_1:def_11, ZFMISC_1:31; ::_thesis: verum end; theorem :: FUNCT_7:19 for A, B being set st A * c= B * holds A c= B proof let A, B be set ; ::_thesis: ( A * c= B * implies A c= B ) assume A1: A * c= B * ; ::_thesis: A c= B let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in A or x in B ) assume x in A ; ::_thesis: x in B then <*x*> in A * by Th18; hence x in B by A1, Th18; ::_thesis: verum end; theorem :: FUNCT_7:20 for A being Subset of NAT st ( for n, m being Element of NAT st n in A & m < n holds m in A ) holds A is Cardinal proof let A be Subset of NAT; ::_thesis: ( ( for n, m being Element of NAT st n in A & m < n holds m in A ) implies A is Cardinal ) assume A1: for n, m being Element of NAT st n in A & m < n holds m in A ; ::_thesis: A is Cardinal percases ( A = {} or ( A <> {} & ex m being Nat st for n being Nat st n in A holds n <= m ) or for m being Nat ex n being Nat st ( n in A & n > m ) ) ; suppose A = {} ; ::_thesis: A is Cardinal hence A is Cardinal ; ::_thesis: verum end; supposethat A2: A <> {} and A3: ex m being Nat st for n being Nat st n in A holds n <= m ; ::_thesis: A is Cardinal defpred S1[ set ] means \$1 in A; consider M being Nat such that A4: for n being Nat st S1[n] holds n <= M by A3; ex m being Element of NAT st S1[m] by A2, SUBSET_1:4; then A5: ex m being Nat st S1[m] ; consider m being Nat such that A6: S1[m] and A7: for n being Nat st S1[n] holds n <= m from NAT_1:sch_6(A4, A5); A = { l where l is Element of NAT : l < m + 1 } proof thus A c= { l where l is Element of NAT : l < m + 1 } :: according to XBOOLE_0:def_10 ::_thesis: { l where l is Element of NAT : l < m + 1 } c= A proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in A or x in { l where l is Element of NAT : l < m + 1 } ) assume A8: x in A ; ::_thesis: x in { l where l is Element of NAT : l < m + 1 } then reconsider l = x as Element of NAT ; l <= m by A7, A8; then l < m + 1 by NAT_1:13; hence x in { l where l is Element of NAT : l < m + 1 } ; ::_thesis: verum end; let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { l where l is Element of NAT : l < m + 1 } or x in A ) assume x in { l where l is Element of NAT : l < m + 1 } ; ::_thesis: x in A then consider l being Element of NAT such that A9: x = l and A10: l < m + 1 ; l <= m by A10, NAT_1:13; then ( l < m or l = m ) by XXREAL_0:1; hence x in A by A1, A6, A9; ::_thesis: verum end; hence A is Cardinal by AXIOMS:4; ::_thesis: verum end; supposeA11: for m being Nat ex n being Nat st ( n in A & n > m ) ; ::_thesis: A is Cardinal NAT c= A proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in NAT or x in A ) assume x in NAT ; ::_thesis: x in A then reconsider m = x as Element of NAT ; ex n being Nat st ( n in A & n > m ) by A11; hence x in A by A1; ::_thesis: verum end; hence A is Cardinal by XBOOLE_0:def_10; ::_thesis: verum end; end; end; theorem :: FUNCT_7:21 for A being finite set for X being non empty Subset-Family of A ex C being Element of X st for B being Element of X st B c= C holds B = C proof let A be finite set ; ::_thesis: for X being non empty Subset-Family of A ex C being Element of X st for B being Element of X st B c= C holds B = C let X be non empty Subset-Family of A; ::_thesis: ex C being Element of X st for B being Element of X st B c= C holds B = C reconsider D = COMPLEMENT X as non empty Subset-Family of A by SETFAM_1:32; consider x being set such that A1: x in D and A2: for B being set st B in D & x c= B holds B = x by FINSET_1:6; reconsider x = x as Subset of A by A1; reconsider C = x ` as Element of X by A1, SETFAM_1:def_7; take C ; ::_thesis: for B being Element of X st B c= C holds B = C let B be Element of X; ::_thesis: ( B c= C implies B = C ) assume A3: B c= C ; ::_thesis: B = C (B `) ` = B ; then B ` in D by SETFAM_1:def_7; then B ` = x by A2, A3, SUBSET_1:16; hence B = C ; ::_thesis: verum end; theorem Th22: :: FUNCT_7:22 for p, q being FinSequence st len p = (len q) + 1 holds for i being Element of NAT holds ( i in dom q iff ( i in dom p & i + 1 in dom p ) ) proof let p, q be FinSequence; ::_thesis: ( len p = (len q) + 1 implies for i being Element of NAT holds ( i in dom q iff ( i in dom p & i + 1 in dom p ) ) ) assume A1: len p = (len q) + 1 ; ::_thesis: for i being Element of NAT holds ( i in dom q iff ( i in dom p & i + 1 in dom p ) ) let i be Element of NAT ; ::_thesis: ( i in dom q iff ( i in dom p & i + 1 in dom p ) ) hereby ::_thesis: ( i in dom p & i + 1 in dom p implies i in dom q ) assume A2: i in dom q ; ::_thesis: ( i in dom p & i + 1 in dom p ) then A3: i >= 1 by FINSEQ_3:25; A4: i <= len q by A2, FINSEQ_3:25; len q <= len p by A1, NAT_1:11; then A5: ( i + 1 >= 1 & i <= len p ) by A4, NAT_1:11, XXREAL_0:2; i + 1 <= len p by A1, A4, XREAL_1:6; hence ( i in dom p & i + 1 in dom p ) by A3, A5, FINSEQ_3:25; ::_thesis: verum end; assume that A6: i in dom p and A7: i + 1 in dom p ; ::_thesis: i in dom q i + 1 <= len p by A7, FINSEQ_3:25; then A8: i <= len q by A1, XREAL_1:6; i >= 1 by A6, FINSEQ_3:25; hence i in dom q by A8, FINSEQ_3:25; ::_thesis: verum end; registration cluster non empty Relation-like non-empty NAT -defined Function-like Function-yielding finite FinSequence-like FinSubsequence-like for set ; existence ex b1 being FinSequence st ( b1 is Function-yielding & not b1 is empty & b1 is non-empty ) proof take p = <*<*0*>*>; ::_thesis: ( p is Function-yielding & not p is empty & p is non-empty ) A1: ( dom p = {1} & p . 1 = <*0*> ) by FINSEQ_1:2, FINSEQ_1:38, FINSEQ_1:40; thus p is Function-yielding ::_thesis: ( not p is empty & p is non-empty ) proof let x be set ; :: according to FUNCOP_1:def_6 ::_thesis: ( not x in proj1 p or p . x is set ) assume x in dom p ; ::_thesis: p . x is set hence p . x is set by A1, TARSKI:def_1; ::_thesis: verum end; thus not p is empty ; ::_thesis: p is non-empty let x be set ; :: according to FUNCT_1:def_9 ::_thesis: ( not x in proj1 p or not p . x is empty ) assume x in dom p ; ::_thesis: not p . x is empty hence not p . x is empty by A1, TARSKI:def_1; ::_thesis: verum end; end; registration cluster empty Relation-like Function-like -> Function-yielding for set ; coherence for b1 being Function st b1 is empty holds b1 is Function-yielding ; let f be Function; cluster<*f*> -> Function-yielding ; coherence <*f*> is Function-yielding proof let x be set ; :: according to FUNCOP_1:def_6 ::_thesis: ( not x in proj1 <*f*> or <*f*> . x is set ) assume x in dom <*f*> ; ::_thesis: <*f*> . x is set then x in {1} by FINSEQ_1:2, FINSEQ_1:38; then x = 1 by TARSKI:def_1; hence <*f*> . x is set by FINSEQ_1:40; ::_thesis: verum end; let g be Function; cluster<*f,g*> -> Function-yielding ; coherence <*f,g*> is Function-yielding proof let x be set ; :: according to FUNCOP_1:def_6 ::_thesis: ( not x in proj1 <*f,g*> or <*f,g*> . x is set ) assume x in dom <*f,g*> ; ::_thesis: <*f,g*> . x is set then x in {1,2} by FINSEQ_1:2, FINSEQ_1:89; then ( x = 1 or x = 2 ) by TARSKI:def_2; hence <*f,g*> . x is set by FINSEQ_1:44; ::_thesis: verum end; let h be Function; cluster<*f,g,h*> -> Function-yielding ; coherence <*f,g,h*> is Function-yielding proof let x be set ; :: according to FUNCOP_1:def_6 ::_thesis: ( not x in proj1 <*f,g,h*> or <*f,g,h*> . x is set ) assume x in dom <*f,g,h*> ; ::_thesis: <*f,g,h*> . x is set then x in {1,2,3} by FINSEQ_1:89, FINSEQ_3:1; then ( x = 1 or x = 2 or x = 3 ) by ENUMSET1:def_1; hence <*f,g,h*> . x is set by FINSEQ_1:45; ::_thesis: verum end; end; registration let n be Element of NAT ; let f be Function; clustern |-> f -> Function-yielding ; coherence n |-> f is Function-yielding ; end; registration let p, q be Function-yielding FinSequence; clusterp ^ q -> Function-yielding ; coherence p ^ q is Function-yielding proof let x be set ; :: according to FUNCOP_1:def_6 ::_thesis: ( not x in proj1 (p ^ q) or (p ^ q) . x is set ) assume A1: x in dom (p ^ q) ; ::_thesis: (p ^ q) . x is set then reconsider i = x as Element of NAT ; percases ( i in dom p or not i in dom p ) ; suppose i in dom p ; ::_thesis: (p ^ q) . x is set then p . i = (p ^ q) . i by FINSEQ_1:def_7; hence (p ^ q) . x is set ; ::_thesis: verum end; suppose not i in dom p ; ::_thesis: (p ^ q) . x is set then consider j being Nat such that A2: ( j in dom q & i = (len p) + j ) by A1, FINSEQ_1:25; q . j = (p ^ q) . i by A2, FINSEQ_1:def_7; hence (p ^ q) . x is set ; ::_thesis: verum end; end; end; end; theorem Th23: :: FUNCT_7:23 for p, q being FinSequence st p ^ q is Function-yielding holds ( p is Function-yielding & q is Function-yielding ) proof let p, q be FinSequence; ::_thesis: ( p ^ q is Function-yielding implies ( p is Function-yielding & q is Function-yielding ) ) assume A1: for x being set st x in dom (p ^ q) holds (p ^ q) . x is Function ; :: according to FUNCOP_1:def_6 ::_thesis: ( p is Function-yielding & q is Function-yielding ) hereby :: according to FUNCOP_1:def_6 ::_thesis: q is Function-yielding let x be set ; ::_thesis: ( x in dom p implies p . x is Function ) assume A2: x in dom p ; ::_thesis: p . x is Function then (p ^ q) . x = p . x by FINSEQ_1:def_7; hence p . x is Function by A1, A2, FINSEQ_3:22; ::_thesis: verum end; let x be set ; :: according to FUNCOP_1:def_6 ::_thesis: ( not x in proj1 q or q . x is set ) assume A3: x in dom q ; ::_thesis: q . x is set then reconsider i = x as Element of NAT ; (p ^ q) . ((len p) + i) = q . x by A3, FINSEQ_1:def_7; hence q . x is set by A1, A3, FINSEQ_1:28; ::_thesis: verum end; begin scheme :: FUNCT_7:sch 1 Kappa2D{ F1() -> non empty set , F2() -> non empty set , F3() -> non empty set , F4( Element of F1(), Element of F2()) -> set } : ex f being Function of [:F1(),F2():],F3() st for x being Element of F1() for y being Element of F2() holds f . (x,y) = F4(x,y) provided A1: for x being Element of F1() for y being Element of F2() holds F4(x,y) in F3() proof deffunc H1( Element of [:F1(),F2():]) -> set = F4((\$1 `1),(\$1 `2)); A2: for p being Element of [:F1(),F2():] holds H1(p) in F3() by A1; consider f being Function of [:F1(),F2():],F3() such that A3: for p being Element of [:F1(),F2():] holds f . p = H1(p) from FUNCT_2:sch_8(A2); take f ; ::_thesis: for x being Element of F1() for y being Element of F2() holds f . (x,y) = F4(x,y) let x be Element of F1(); ::_thesis: for y being Element of F2() holds f . (x,y) = F4(x,y) let y be Element of F2(); ::_thesis: f . (x,y) = F4(x,y) ( [x,y] `1 = x & [x,y] `2 = y ) ; hence f . (x,y) = F4(x,y) by A3; ::_thesis: verum end; scheme :: FUNCT_7:sch 2 FinMono{ F1() -> set , F2() -> non empty set , F3( set ) -> set , F4( set ) -> set } : { F3(d) where d is Element of F2() : F4(d) in F1() } is finite provided A1: F1() is finite and A2: for d1, d2 being Element of F2() st F4(d1) = F4(d2) holds d1 = d2 proof percases ( F1() = {} or F1() <> {} ) ; supposeA3: F1() = {} ; ::_thesis: { F3(d) where d is Element of F2() : F4(d) in F1() } is finite now__::_thesis:_not__{__F3(d)_where_d_is_Element_of_F2()_:_F4(d)_in_F1()__}__<>_{} set a = the Element of { F3(d) where d is Element of F2() : F4(d) in F1() } ; assume { F3(d) where d is Element of F2() : F4(d) in F1() } <> {} ; ::_thesis: contradiction then the Element of { F3(d) where d is Element of F2() : F4(d) in F1() } in { F3(d) where d is Element of F2() : F4(d) in F1() } ; then ex d being Element of F2() st ( the Element of { F3(d) where d is Element of F2() : F4(d) in F1() } = F3(d) & F4(d) in F1() ) ; hence contradiction by A3; ::_thesis: verum end; hence { F3(d) where d is Element of F2() : F4(d) in F1() } is finite ; ::_thesis: verum end; suppose F1() <> {} ; ::_thesis: { F3(d) where d is Element of F2() : F4(d) in F1() } is finite then reconsider D = F1() as non empty set ; defpred S1[ set ] means ex d being Element of F2() st \$1 = F4(d); set B = { d where d is Element of F2() : F4(d) in D } ; set C = { a where a is Element of D : S1[a] } ; A4: { F3(d) where d is Element of F2() : F4(d) in F1() } = { F3(d) where d is Element of F2() : d in { d where d is Element of F2() : F4(d) in D } } proof thus { F3(d) where d is Element of F2() : F4(d) in F1() } c= { F3(d) where d is Element of F2() : d in { d where d is Element of F2() : F4(d) in D } } :: according to XBOOLE_0:def_10 ::_thesis: { F3(d) where d is Element of F2() : d in { d where d is Element of F2() : F4(d) in D } } c= { F3(d) where d is Element of F2() : F4(d) in F1() } proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { F3(d) where d is Element of F2() : F4(d) in F1() } or x in { F3(d) where d is Element of F2() : d in { d where d is Element of F2() : F4(d) in D } } ) assume x in { F3(d) where d is Element of F2() : F4(d) in F1() } ; ::_thesis: x in { F3(d) where d is Element of F2() : d in { d where d is Element of F2() : F4(d) in D } } then consider d9 being Element of F2() such that A5: x = F3(d9) and A6: F4(d9) in F1() ; d9 in { d where d is Element of F2() : F4(d) in D } by A6; hence x in { F3(d) where d is Element of F2() : d in { d where d is Element of F2() : F4(d) in D } } by A5; ::_thesis: verum end; let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { F3(d) where d is Element of F2() : d in { d where d is Element of F2() : F4(d) in D } } or x in { F3(d) where d is Element of F2() : F4(d) in F1() } ) assume x in { F3(d) where d is Element of F2() : d in { d where d is Element of F2() : F4(d) in D } } ; ::_thesis: x in { F3(d) where d is Element of F2() : F4(d) in F1() } then consider d1 being Element of F2() such that A7: x = F3(d1) and A8: d1 in { d where d is Element of F2() : F4(d) in D } ; ex d3 being Element of F2() st ( d3 = d1 & F4(d3) in D ) by A8; hence x in { F3(d) where d is Element of F2() : F4(d) in F1() } by A7; ::_thesis: verum end; A9: { a where a is Element of D : S1[a] } , { d where d is Element of F2() : F4(d) in D } are_equipotent proof take Z = { [F4(d),d] where d is Element of F2() : verum } ; :: according to TARSKI:def_6 ::_thesis: ( ( for b1 being set holds ( not b1 in { a where a is Element of D : S1[a] } or ex b2 being set st ( b2 in { d where d is Element of F2() : F4(d) in D } & [b1,b2] in Z ) ) ) & ( for b1 being set holds ( not b1 in { d where d is Element of F2() : F4(d) in D } or ex b2 being set st ( b2 in { a where a is Element of D : S1[a] } & [b2,b1] in Z ) ) ) & ( for b1, b2, b3, b4 being set holds ( not [b1,b2] in Z or not [b3,b4] in Z or ( ( not b1 = b3 or b2 = b4 ) & ( not b2 = b4 or b1 = b3 ) ) ) ) ) hereby ::_thesis: ( ( for b1 being set holds ( not b1 in { d where d is Element of F2() : F4(d) in D } or ex b2 being set st ( b2 in { a where a is Element of D : S1[a] } & [b2,b1] in Z ) ) ) & ( for b1, b2, b3, b4 being set holds ( not [b1,b2] in Z or not [b3,b4] in Z or ( ( not b1 = b3 or b2 = b4 ) & ( not b2 = b4 or b1 = b3 ) ) ) ) ) let x be set ; ::_thesis: ( x in { a where a is Element of D : S1[a] } implies ex d being set st ( d in { d where d is Element of F2() : F4(d) in D } & [x,d] in Z ) ) assume x in { a where a is Element of D : S1[a] } ; ::_thesis: ex d being set st ( d in { d where d is Element of F2() : F4(d) in D } & [x,d] in Z ) then consider a being Element of D such that A10: a = x and A11: ex d being Element of F2() st a = F4(d) ; consider d being Element of F2() such that A12: a = F4(d) by A11; reconsider d = d as set ; take d = d; ::_thesis: ( d in { d where d is Element of F2() : F4(d) in D } & [x,d] in Z ) thus ( d in { d where d is Element of F2() : F4(d) in D } & [x,d] in Z ) by A10, A12; ::_thesis: verum end; hereby ::_thesis: for b1, b2, b3, b4 being set holds ( not [b1,b2] in Z or not [b3,b4] in Z or ( ( not b1 = b3 or b2 = b4 ) & ( not b2 = b4 or b1 = b3 ) ) ) let y be set ; ::_thesis: ( y in { d where d is Element of F2() : F4(d) in D } implies ex x being set st ( x in { a where a is Element of D : S1[a] } & [x,y] in Z ) ) assume y in { d where d is Element of F2() : F4(d) in D } ; ::_thesis: ex x being set st ( x in { a where a is Element of D : S1[a] } & [x,y] in Z ) then consider d being Element of F2() such that A13: ( d = y & F4(d) in D ) ; reconsider x = F4(d) as set ; take x = x; ::_thesis: ( x in { a where a is Element of D : S1[a] } & [x,y] in Z ) thus ( x in { a where a is Element of D : S1[a] } & [x,y] in Z ) by A13; ::_thesis: verum end; let x, y, z, u be set ; ::_thesis: ( not [x,y] in Z or not [z,u] in Z or ( ( not x = z or y = u ) & ( not y = u or x = z ) ) ) assume [x,y] in Z ; ::_thesis: ( not [z,u] in Z or ( ( not x = z or y = u ) & ( not y = u or x = z ) ) ) then consider d1 being Element of F2() such that A14: [x,y] = [F4(d1),d1] ; assume [z,u] in Z ; ::_thesis: ( ( not x = z or y = u ) & ( not y = u or x = z ) ) then consider d2 being Element of F2() such that A15: [z,u] = [F4(d2),d2] ; A16: ( z = F4(d2) & u = d2 ) by A15, XTUPLE_0:1; ( x = F4(d1) & y = d1 ) by A14, XTUPLE_0:1; hence ( ( not x = z or y = u ) & ( not y = u or x = z ) ) by A2, A16; ::_thesis: verum end; { a where a is Element of D : S1[a] } is Subset of D from DOMAIN_1:sch_7(); then { a where a is Element of D : S1[a] } is finite by A1, FINSET_1:1; then A17: { d where d is Element of F2() : F4(d) in D } is finite by A9, CARD_1:38; { F3(d) where d is Element of F2() : d in { d where d is Element of F2() : F4(d) in D } } is finite from FRAENKEL:sch_21(A17); hence { F3(d) where d is Element of F2() : F4(d) in F1() } is finite by A4; ::_thesis: verum end; end; end; scheme :: FUNCT_7:sch 3 CardMono{ F1() -> set , F2() -> non empty set , F3( set ) -> set } : F1(), { d where d is Element of F2() : F3(d) in F1() } are_equipotent provided A1: for x being set st x in F1() holds ex d being Element of F2() st x = F3(d) and A2: for d1, d2 being Element of F2() st F3(d1) = F3(d2) holds d1 = d2 proof set D = { d where d is Element of F2() : F3(d) in F1() } ; percases ( F1() = {} or F1() <> {} ) ; supposeA3: F1() = {} ; ::_thesis: F1(), { d where d is Element of F2() : F3(d) in F1() } are_equipotent now__::_thesis:_not__{__d_where_d_is_Element_of_F2()_:_F3(d)_in_F1()__}__<>_{} set a = the Element of { d where d is Element of F2() : F3(d) in F1() } ; assume { d where d is Element of F2() : F3(d) in F1() } <> {} ; ::_thesis: contradiction then the Element of { d where d is Element of F2() : F3(d) in F1() } in { d where d is Element of F2() : F3(d) in F1() } ; then ex d being Element of F2() st ( the Element of { d where d is Element of F2() : F3(d) in F1() } = d & F3(d) in F1() ) ; hence contradiction by A3; ::_thesis: verum end; hence F1(), { d where d is Element of F2() : F3(d) in F1() } are_equipotent by A3; ::_thesis: verum end; suppose F1() <> {} ; ::_thesis: F1(), { d where d is Element of F2() : F3(d) in F1() } are_equipotent then reconsider A = F1() as non empty set ; A, { d where d is Element of F2() : F3(d) in F1() } are_equipotent proof take Z = { [F3(d),d] where d is Element of F2() : verum } ; :: according to TARSKI:def_6 ::_thesis: ( ( for b1 being set holds ( not b1 in A or ex b2 being set st ( b2 in { d where d is Element of F2() : F3(d) in F1() } & [b1,b2] in Z ) ) ) & ( for b1 being set holds ( not b1 in { d where d is Element of F2() : F3(d) in F1() } or ex b2 being set st ( b2 in A & [b2,b1] in Z ) ) ) & ( for b1, b2, b3, b4 being set holds ( not [b1,b2] in Z or not [b3,b4] in Z or ( ( not b1 = b3 or b2 = b4 ) & ( not b2 = b4 or b1 = b3 ) ) ) ) ) hereby ::_thesis: ( ( for b1 being set holds ( not b1 in { d where d is Element of F2() : F3(d) in F1() } or ex b2 being set st ( b2 in A & [b2,b1] in Z ) ) ) & ( for b1, b2, b3, b4 being set holds ( not [b1,b2] in Z or not [b3,b4] in Z or ( ( not b1 = b3 or b2 = b4 ) & ( not b2 = b4 or b1 = b3 ) ) ) ) ) let x be set ; ::_thesis: ( x in A implies ex d being set st ( d in { d where d is Element of F2() : F3(d) in F1() } & [x,d] in Z ) ) assume A4: x in A ; ::_thesis: ex d being set st ( d in { d where d is Element of F2() : F3(d) in F1() } & [x,d] in Z ) then consider d being Element of F2() such that A5: x = F3(d) by A1; reconsider d = d as set ; take d = d; ::_thesis: ( d in { d where d is Element of F2() : F3(d) in F1() } & [x,d] in Z ) thus d in { d where d is Element of F2() : F3(d) in F1() } by A4, A5; ::_thesis: [x,d] in Z thus [x,d] in Z by A5; ::_thesis: verum end; hereby ::_thesis: for b1, b2, b3, b4 being set holds ( not [b1,b2] in Z or not [b3,b4] in Z or ( ( not b1 = b3 or b2 = b4 ) & ( not b2 = b4 or b1 = b3 ) ) ) let y be set ; ::_thesis: ( y in { d where d is Element of F2() : F3(d) in F1() } implies ex x being set st ( x in A & [x,y] in Z ) ) assume y in { d where d is Element of F2() : F3(d) in F1() } ; ::_thesis: ex x being set st ( x in A & [x,y] in Z ) then consider d being Element of F2() such that A6: ( d = y & F3(d) in A ) ; reconsider x = F3(d) as set ; take x = x; ::_thesis: ( x in A & [x,y] in Z ) thus ( x in A & [x,y] in Z ) by A6; ::_thesis: verum end; let x, y, z, u be set ; ::_thesis: ( not [x,y] in Z or not [z,u] in Z or ( ( not x = z or y = u ) & ( not y = u or x = z ) ) ) assume [x,y] in Z ; ::_thesis: ( not [z,u] in Z or ( ( not x = z or y = u ) & ( not y = u or x = z ) ) ) then consider d1 being Element of F2() such that A7: [x,y] = [F3(d1),d1] ; assume [z,u] in Z ; ::_thesis: ( ( not x = z or y = u ) & ( not y = u or x = z ) ) then consider d2 being Element of F2() such that A8: [z,u] = [F3(d2),d2] ; A9: ( z = F3(d2) & u = d2 ) by A8, XTUPLE_0:1; ( x = F3(d1) & y = d1 ) by A7, XTUPLE_0:1; hence ( ( not x = z or y = u ) & ( not y = u or x = z ) ) by A2, A9; ::_thesis: verum end; hence F1(), { d where d is Element of F2() : F3(d) in F1() } are_equipotent ; ::_thesis: verum end; end; end; scheme :: FUNCT_7:sch 4 CardMono9{ F1() -> set , F2() -> non empty set , F3( set ) -> set } : F1(), { F3(d) where d is Element of F2() : d in F1() } are_equipotent provided A1: F1() c= F2() and A2: for d1, d2 being Element of F2() st F3(d1) = F3(d2) holds d1 = d2 proof percases ( F1() = {} or F1() <> {} ) ; supposeA3: F1() = {} ; ::_thesis: F1(), { F3(d) where d is Element of F2() : d in F1() } are_equipotent now__::_thesis:_not__{__F3(d)_where_d_is_Element_of_F2()_:_d_in_F1()__}__<>_{} set a = the Element of { F3(d) where d is Element of F2() : d in F1() } ; assume { F3(d) where d is Element of F2() : d in F1() } <> {} ; ::_thesis: contradiction then the Element of { F3(d) where d is Element of F2() : d in F1() } in { F3(d) where d is Element of F2() : d in F1() } ; then ex d being Element of F2() st ( the Element of { F3(d) where d is Element of F2() : d in F1() } = F3(d) & d in F1() ) ; hence contradiction by A3; ::_thesis: verum end; hence F1(), { F3(d) where d is Element of F2() : d in F1() } are_equipotent by A3; ::_thesis: verum end; suppose F1() <> {} ; ::_thesis: F1(), { F3(d) where d is Element of F2() : d in F1() } are_equipotent then reconsider A = F1() as non empty set ; set D = { F3(d) where d is Element of F2() : d in A } ; A, { F3(d) where d is Element of F2() : d in A } are_equipotent proof take Z = { [d,F3(d)] where d is Element of F2() : verum } ; :: according to TARSKI:def_6 ::_thesis: ( ( for b1 being set holds ( not b1 in A or ex b2 being set st ( b2 in { F3(d) where d is Element of F2() : d in A } & [b1,b2] in Z ) ) ) & ( for b1 being set holds ( not b1 in { F3(d) where d is Element of F2() : d in A } or ex b2 being set st ( b2 in A & [b2,b1] in Z ) ) ) & ( for b1, b2, b3, b4 being set holds ( not [b1,b2] in Z or not [b3,b4] in Z or ( ( not b1 = b3 or b2 = b4 ) & ( not b2 = b4 or b1 = b3 ) ) ) ) ) hereby ::_thesis: ( ( for b1 being set holds ( not b1 in { F3(d) where d is Element of F2() : d in A } or ex b2 being set st ( b2 in A & [b2,b1] in Z ) ) ) & ( for b1, b2, b3, b4 being set holds ( not [b1,b2] in Z or not [b3,b4] in Z or ( ( not b1 = b3 or b2 = b4 ) & ( not b2 = b4 or b1 = b3 ) ) ) ) ) let x be set ; ::_thesis: ( x in A implies ex y being set st ( y in { F3(d) where d is Element of F2() : d in A } & [x,y] in Z ) ) assume A4: x in A ; ::_thesis: ex y being set st ( y in { F3(d) where d is Element of F2() : d in A } & [x,y] in Z ) then reconsider d = x as Element of F2() by A1; take y = F3(d); ::_thesis: ( y in { F3(d) where d is Element of F2() : d in A } & [x,y] in Z ) thus y in { F3(d) where d is Element of F2() : d in A } by A4; ::_thesis: [x,y] in Z thus [x,y] in Z ; ::_thesis: verum end; hereby ::_thesis: for b1, b2, b3, b4 being set holds ( not [b1,b2] in Z or not [b3,b4] in Z or ( ( not b1 = b3 or b2 = b4 ) & ( not b2 = b4 or b1 = b3 ) ) ) let y be set ; ::_thesis: ( y in { F3(d) where d is Element of F2() : d in A } implies ex d being set st ( d in A & [d,y] in Z ) ) assume y in { F3(d) where d is Element of F2() : d in A } ; ::_thesis: ex d being set st ( d in A & [d,y] in Z ) then consider d being Element of F2() such that A5: ( F3(d) = y & d in A ) ; reconsider d = d as set ; take d = d; ::_thesis: ( d in A & [d,y] in Z ) thus ( d in A & [d,y] in Z ) by A5; ::_thesis: verum end; let x, y, z, u be set ; ::_thesis: ( not [x,y] in Z or not [z,u] in Z or ( ( not x = z or y = u ) & ( not y = u or x = z ) ) ) assume [x,y] in Z ; ::_thesis: ( not [z,u] in Z or ( ( not x = z or y = u ) & ( not y = u or x = z ) ) ) then consider d1 being Element of F2() such that A6: [x,y] = [d1,F3(d1)] ; assume [z,u] in Z ; ::_thesis: ( ( not x = z or y = u ) & ( not y = u or x = z ) ) then consider d2 being Element of F2() such that A7: [z,u] = [d2,F3(d2)] ; A8: ( z = d2 & u = F3(d2) ) by A7, XTUPLE_0:1; ( x = d1 & y = F3(d1) ) by A6, XTUPLE_0:1; hence ( ( not x = z or y = u ) & ( not y = u or x = z ) ) by A2, A8; ::_thesis: verum end; hence F1(), { F3(d) where d is Element of F2() : d in F1() } are_equipotent ; ::_thesis: verum end; end; end; scheme :: FUNCT_7:sch 5 FuncSeqInd{ P1[ set ] } : for p being Function-yielding FinSequence holds P1[p] provided A1: P1[ {} ] and A2: for p being Function-yielding FinSequence st P1[p] holds for f being Function holds P1[p ^ <*f*>] proof defpred S1[ FinSequence] means ( \$1 is Function-yielding implies P1[\$1] ); A3: for p being FinSequence for x being set st S1[p] holds S1[p ^ <*x*>] proof let p be FinSequence; ::_thesis: for x being set st S1[p] holds S1[p ^ <*x*>] let x be set ; ::_thesis: ( S1[p] implies S1[p ^ <*x*>] ) assume that A4: ( p is Function-yielding implies P1[p] ) and A5: p ^ <*x*> is Function-yielding ; ::_thesis: P1[p ^ <*x*>] A6: <*x*> . 1 = x by FINSEQ_1:40; ( p is Function-yielding & <*x*> is Function-yielding ) by A5, Th23; hence P1[p ^ <*x*>] by A2, A4, A6; ::_thesis: verum end; A7: S1[ {} ] by A1; for p being FinSequence holds S1[p] from FINSEQ_1:sch_3(A7, A3); hence for p being Function-yielding FinSequence holds P1[p] ; ::_thesis: verum end; begin definition let x, y be set ; assume A1: x in y ; func In (x,y) -> Element of y equals :Def1: :: FUNCT_7:def 1 x; correctness coherence x is Element of y; by A1; end; :: deftheorem Def1 defines In FUNCT_7:def_1_:_ for x, y being set st x in y holds In (x,y) = x; theorem :: FUNCT_7:24 for x, A, B being set st x in A /\ B holds In (x,A) = In (x,B) proof let x, A, B be set ; ::_thesis: ( x in A /\ B implies In (x,A) = In (x,B) ) assume A1: x in A /\ B ; ::_thesis: In (x,A) = In (x,B) then A2: x in B by XBOOLE_0:def_4; x in A by A1, XBOOLE_0:def_4; hence In (x,A) = x by Def1 .= In (x,B) by A2, Def1 ; ::_thesis: verum end; definition let f, g be Function; let A be set ; predf,g equal_outside A means :Def2: :: FUNCT_7:def 2 f | ((dom f) \ A) = g | ((dom g) \ A); end; :: deftheorem Def2 defines equal_outside FUNCT_7:def_2_:_ for f, g being Function for A being set holds ( f,g equal_outside A iff f | ((dom f) \ A) = g | ((dom g) \ A) ); theorem Th25: :: FUNCT_7:25 for f being Function for A being set holds f,f equal_outside A proof let f be Function; ::_thesis: for A being set holds f,f equal_outside A let A be set ; ::_thesis: f,f equal_outside A thus f | ((dom f) \ A) = f | ((dom f) \ A) ; :: according to FUNCT_7:def_2 ::_thesis: verum end; theorem Th26: :: FUNCT_7:26 for f, g being Function for A being set st f,g equal_outside A holds g,f equal_outside A proof let f, g be Function; ::_thesis: for A being set st f,g equal_outside A holds g,f equal_outside A let A be set ; ::_thesis: ( f,g equal_outside A implies g,f equal_outside A ) assume f | ((dom f) \ A) = g | ((dom g) \ A) ; :: according to FUNCT_7:def_2 ::_thesis: g,f equal_outside A hence g | ((dom g) \ A) = f | ((dom f) \ A) ; :: according to FUNCT_7:def_2 ::_thesis: verum end; theorem Th27: :: FUNCT_7:27 for f, g, h being Function for A being set st f,g equal_outside A & g,h equal_outside A holds f,h equal_outside A proof let f, g, h be Function; ::_thesis: for A being set st f,g equal_outside A & g,h equal_outside A holds f,h equal_outside A let A be set ; ::_thesis: ( f,g equal_outside A & g,h equal_outside A implies f,h equal_outside A ) assume ( f | ((dom f) \ A) = g | ((dom g) \ A) & g | ((dom g) \ A) = h | ((dom h) \ A) ) ; :: according to FUNCT_7:def_2 ::_thesis: f,h equal_outside A hence f | ((dom f) \ A) = h | ((dom h) \ A) ; :: according to FUNCT_7:def_2 ::_thesis: verum end; theorem Th28: :: FUNCT_7:28 for f, g being Function for A being set st f,g equal_outside A holds (dom f) \ A = (dom g) \ A proof let f, g be Function; ::_thesis: for A being set st f,g equal_outside A holds (dom f) \ A = (dom g) \ A let A be set ; ::_thesis: ( f,g equal_outside A implies (dom f) \ A = (dom g) \ A ) assume A1: f | ((dom f) \ A) = g | ((dom g) \ A) ; :: according to FUNCT_7:def_2 ::_thesis: (dom f) \ A = (dom g) \ A thus (dom f) \ A = (dom f) /\ ((dom f) \ A) by XBOOLE_1:28 .= dom (f | ((dom f) \ A)) by RELAT_1:61 .= (dom g) /\ ((dom g) \ A) by A1, RELAT_1:61 .= (dom g) \ A by XBOOLE_1:28 ; ::_thesis: verum end; theorem Th29: :: FUNCT_7:29 for f, g being Function for A being set st dom g c= A holds f,f +* g equal_outside A proof let f, g be Function; ::_thesis: for A being set st dom g c= A holds f,f +* g equal_outside A let A be set ; ::_thesis: ( dom g c= A implies f,f +* g equal_outside A ) assume A1: dom g c= A ; ::_thesis: f,f +* g equal_outside A A2: (dom (f +* g)) \ A = ((dom f) \/ (dom g)) \ A by FUNCT_4:def_1 .= ((dom f) \ A) \/ ((dom g) \ A) by XBOOLE_1:42 .= ((dom f) \ A) \/ {} by A1, XBOOLE_1:37 .= (dom f) \ A ; (dom f) \ A misses A by XBOOLE_1:79; then (dom f) \ A misses dom g by A1, XBOOLE_1:63; hence f | ((dom f) \ A) = (f +* g) | ((dom (f +* g)) \ A) by A2, FUNCT_4:72; :: according to FUNCT_7:def_2 ::_thesis: verum end; definition let f be Function; let i, x be set ; funcf +* (i,x) -> Function equals :Def3: :: FUNCT_7:def 3 f +* (i .--> x) if i in dom f otherwise f; correctness coherence ( ( i in dom f implies f +* (i .--> x) is Function ) & ( not i in dom f implies f is Function ) ); consistency for b1 being Function holds verum; ; end; :: deftheorem Def3 defines +* FUNCT_7:def_3_:_ for f being Function for i, x being set holds ( ( i in dom f implies f +* (i,x) = f +* (i .--> x) ) & ( not i in dom f implies f +* (i,x) = f ) ); theorem Th30: :: FUNCT_7:30 for f being Function for d, i being set holds dom (f +* (i,d)) = dom f proof let f be Function; ::_thesis: for d, i being set holds dom (f +* (i,d)) = dom f let x, i be set ; ::_thesis: dom (f +* (i,x)) = dom f percases ( i in dom f or not i in dom f ) ; supposeA1: i in dom f ; ::_thesis: dom (f +* (i,x)) = dom f then A2: {i} c= dom f by ZFMISC_1:31; thus dom (f +* (i,x)) = dom (f +* (i .--> x)) by A1, Def3 .= (dom f) \/ (dom (i .--> x)) by FUNCT_4:def_1 .= (dom f) \/ {i} by FUNCOP_1:13 .= dom f by A2, XBOOLE_1:12 ; ::_thesis: verum end; suppose not i in dom f ; ::_thesis: dom (f +* (i,x)) = dom f hence dom (f +* (i,x)) = dom f by Def3; ::_thesis: verum end; end; end; theorem Th31: :: FUNCT_7:31 for f being Function for d, i being set st i in dom f holds (f +* (i,d)) . i = d proof let f be Function; ::_thesis: for d, i being set st i in dom f holds (f +* (i,d)) . i = d let d, i be set ; ::_thesis: ( i in dom f implies (f +* (i,d)) . i = d ) dom (i .--> d) = {i} by FUNCOP_1:13; then A1: i in dom (i .--> d) by TARSKI:def_1; assume i in dom f ; ::_thesis: (f +* (i,d)) . i = d hence (f +* (i,d)) . i = (f +* (i .--> d)) . i by Def3 .= (i .--> d) . i by A1, FUNCT_4:13 .= d by FUNCOP_1:72 ; ::_thesis: verum end; theorem Th32: :: FUNCT_7:32 for f being Function for d, i, j being set st i <> j holds (f +* (i,d)) . j = f . j proof let f be Function; ::_thesis: for d, i, j being set st i <> j holds (f +* (i,d)) . j = f . j let d, i, j be set ; ::_thesis: ( i <> j implies (f +* (i,d)) . j = f . j ) assume A1: i <> j ; ::_thesis: (f +* (i,d)) . j = f . j A2: not j in dom (i .--> d) by A1, TARSKI:def_1; percases ( i in dom f or not i in dom f ) ; suppose i in dom f ; ::_thesis: (f +* (i,d)) . j = f . j hence (f +* (i,d)) . j = (f +* (i .--> d)) . j by Def3 .= f . j by A2, FUNCT_4:11 ; ::_thesis: verum end; suppose not i in dom f ; ::_thesis: (f +* (i,d)) . j = f . j hence (f +* (i,d)) . j = f . j by Def3; ::_thesis: verum end; end; end; theorem :: FUNCT_7:33 for f being Function for d, e, i, j being set st i <> j holds (f +* (i,d)) +* (j,e) = (f +* (j,e)) +* (i,d) proof let f be Function; ::_thesis: for d, e, i, j being set st i <> j holds (f +* (i,d)) +* (j,e) = (f +* (j,e)) +* (i,d) let d, e, i, j be set ; ::_thesis: ( i <> j implies (f +* (i,d)) +* (j,e) = (f +* (j,e)) +* (i,d) ) assume A1: i <> j ; ::_thesis: (f +* (i,d)) +* (j,e) = (f +* (j,e)) +* (i,d) percases ( ( i in dom f & j in dom f ) or ( i in dom f & not j in dom f ) or ( not i in dom f & j in dom f ) or ( not i in dom f & not j in dom f ) ) ; supposethat A2: i in dom f and A3: j in dom f ; ::_thesis: (f +* (i,d)) +* (j,e) = (f +* (j,e)) +* (i,d) A4: i in dom (f +* (j,e)) by A2, Th30; A5: ( dom (i .--> d) = {i} & dom (j .--> e) = {j} ) by FUNCOP_1:13; j in dom (f +* (i,d)) by A3, Th30; hence (f +* (i,d)) +* (j,e) = (f +* (i,d)) +* (j .--> e) by Def3 .= (f +* (i .--> d)) +* (j .--> e) by A2, Def3 .= f +* ((i .--> d) +* (j .--> e)) by FUNCT_4:14 .= f +* ((j .--> e) +* (i .--> d)) by A1, A5, FUNCT_4:35, ZFMISC_1:11 .= (f +* (j .--> e)) +* (i .--> d) by FUNCT_4:14 .= (f +* (j,e)) +* (i .--> d) by A3, Def3 .= (f +* (j,e)) +* (i,d) by A4, Def3 ; ::_thesis: verum end; supposethat i in dom f and A6: not j in dom f ; ::_thesis: (f +* (i,d)) +* (j,e) = (f +* (j,e)) +* (i,d) not j in dom (f +* (i,d)) by A6, Th30; hence (f +* (i,d)) +* (j,e) = f +* (i,d) by Def3 .= (f +* (j,e)) +* (i,d) by A6, Def3 ; ::_thesis: verum end; supposethat A7: not i in dom f and j in dom f ; ::_thesis: (f +* (i,d)) +* (j,e) = (f +* (j,e)) +* (i,d) A8: not i in dom (f +* (j,e)) by A7, Th30; thus (f +* (i,d)) +* (j,e) = f +* (j,e) by A7, Def3 .= (f +* (j,e)) +* (i,d) by A8, Def3 ; ::_thesis: verum end; supposethat A9: not i in dom f and A10: not j in dom f ; ::_thesis: (f +* (i,d)) +* (j,e) = (f +* (j,e)) +* (i,d) A11: not i in dom (f +* (j,e)) by A9, Th30; not j in dom (f +* (i,d)) by A10, Th30; hence (f +* (i,d)) +* (j,e) = f +* (i,d) by Def3 .= f by A9, Def3 .= f +* (j,e) by A10, Def3 .= (f +* (j,e)) +* (i,d) by A11, Def3 ; ::_thesis: verum end; end; end; theorem :: FUNCT_7:34 for f being Function for d, e, i being set holds (f +* (i,d)) +* (i,e) = f +* (i,e) proof let f be Function; ::_thesis: for d, e, i being set holds (f +* (i,d)) +* (i,e) = f +* (i,e) let d, e, i be set ; ::_thesis: (f +* (i,d)) +* (i,e) = f +* (i,e) A1: dom (i .--> d) = {i} by FUNCOP_1:13 .= dom (i .--> e) by FUNCOP_1:13 ; percases ( i in dom f or not i in dom f ) ; supposeA2: i in dom f ; ::_thesis: (f +* (i,d)) +* (i,e) = f +* (i,e) then i in dom (f +* (i,d)) by Th30; hence (f +* (i,d)) +* (i,e) = (f +* (i,d)) +* (i .--> e) by Def3 .= (f +* (i .--> d)) +* (i .--> e) by A2, Def3 .= f +* ((i .--> d) +* (i .--> e)) by FUNCT_4:14 .= f +* (i .--> e) by A1, FUNCT_4:19 .= f +* (i,e) by A2, Def3 ; ::_thesis: verum end; suppose not i in dom f ; ::_thesis: (f +* (i,d)) +* (i,e) = f +* (i,e) hence (f +* (i,d)) +* (i,e) = f +* (i,e) by Def3; ::_thesis: verum end; end; end; theorem Th35: :: FUNCT_7:35 for f being Function for i being set holds f +* (i,(f . i)) = f proof let f be Function; ::_thesis: for i being set holds f +* (i,(f . i)) = f let i be set ; ::_thesis: f +* (i,(f . i)) = f percases ( i in dom f or not i in dom f ) ; supposeA1: i in dom f ; ::_thesis: f +* (i,(f . i)) = f then A2: i .--> (f . i) = f | {i} by Th6; thus f +* (i,(f . i)) = f +* (i .--> (f . i)) by A1, Def3 .= f by A2, FUNCT_4:75 ; ::_thesis: verum end; suppose not i in dom f ; ::_thesis: f +* (i,(f . i)) = f hence f +* (i,(f . i)) = f by Def3; ::_thesis: verum end; end; end; registration let f be FinSequence; let i, x be set ; clusterf +* (i,x) -> FinSequence-like ; coherence f +* (i,x) is FinSequence-like proof dom (f +* (i,x)) = dom f by Th30 .= Seg (len f) by FINSEQ_1:def_3 ; hence f +* (i,x) is FinSequence-like by FINSEQ_1:def_2; ::_thesis: verum end; end; definition let D be set ; let f be FinSequence of D; let i be Element of NAT ; let d be Element of D; :: original: +* redefine funcf +* (i,d) -> FinSequence of D; coherence f +* (i,d) is FinSequence of D proof percases ( i in dom f or not i in dom f ) ; supposeA1: i in dom f ; ::_thesis: f +* (i,d) is FinSequence of D then f . i in rng f by FUNCT_1:def_3; then {d} c= D by ZFMISC_1:31; then A2: ( (rng f) \/ (rng (i .--> d)) = (rng f) \/ {d} & (rng f) \/ {d} c= D ) by FUNCOP_1:8, XBOOLE_1:8; f +* (i,d) = f +* (i .--> d) by A1, Def3; then rng (f +* (i,d)) c= (rng f) \/ (rng (i .--> d)) by FUNCT_4:17; then rng (f +* (i,d)) c= D by A2, XBOOLE_1:1; hence f +* (i,d) is FinSequence of D by FINSEQ_1:def_4; ::_thesis: verum end; suppose not i in dom f ; ::_thesis: f +* (i,d) is FinSequence of D hence f +* (i,d) is FinSequence of D by Def3; ::_thesis: verum end; end; end; end; theorem :: FUNCT_7:36 for D being non empty set for f being FinSequence of D for d being Element of D for i being Element of NAT st i in dom f holds (f +* (i,d)) /. i = d proof let D be non empty set ; ::_thesis: for f being FinSequence of D for d being Element of D for i being Element of NAT st i in dom f holds (f +* (i,d)) /. i = d let f be FinSequence of D; ::_thesis: for d being Element of D for i being Element of NAT st i in dom f holds (f +* (i,d)) /. i = d let d be Element of D; ::_thesis: for i being Element of NAT st i in dom f holds (f +* (i,d)) /. i = d let i be Element of NAT ; ::_thesis: ( i in dom f implies (f +* (i,d)) /. i = d ) assume A1: i in dom f ; ::_thesis: (f +* (i,d)) /. i = d then i in dom (f +* (i,d)) by Th30; hence (f +* (i,d)) /. i = (f +* (i,d)) . i by PARTFUN1:def_6 .= d by A1, Th31 ; ::_thesis: verum end; theorem :: FUNCT_7:37 for D being non empty set for f being FinSequence of D for d being Element of D for i, j being Element of NAT st i <> j & j in dom f holds (f +* (i,d)) /. j = f /. j proof let D be non empty set ; ::_thesis: for f being FinSequence of D for d being Element of D for i, j being Element of NAT st i <> j & j in dom f holds (f +* (i,d)) /. j = f /. j let f be FinSequence of D; ::_thesis: for d being Element of D for i, j being Element of NAT st i <> j & j in dom f holds (f +* (i,d)) /. j = f /. j let d be Element of D; ::_thesis: for i, j being Element of NAT st i <> j & j in dom f holds (f +* (i,d)) /. j = f /. j let i, j be Element of NAT ; ::_thesis: ( i <> j & j in dom f implies (f +* (i,d)) /. j = f /. j ) assume that A1: i <> j and A2: j in dom f ; ::_thesis: (f +* (i,d)) /. j = f /. j j in dom (f +* (i,d)) by A2, Th30; hence (f +* (i,d)) /. j = (f +* (i,d)) . j by PARTFUN1:def_6 .= f . j by A1, Th32 .= f /. j by A2, PARTFUN1:def_6 ; ::_thesis: verum end; theorem :: FUNCT_7:38 for D being non empty set for f being FinSequence of D for d, e being Element of D for i being Element of NAT holds f +* (i,(f /. i)) = f proof let D be non empty set ; ::_thesis: for f being FinSequence of D for d, e being Element of D for i being Element of NAT holds f +* (i,(f /. i)) = f let f be FinSequence of D; ::_thesis: for d, e being Element of D for i being Element of NAT holds f +* (i,(f /. i)) = f let d, e be Element of D; ::_thesis: for i being Element of NAT holds f +* (i,(f /. i)) = f let i be Element of NAT ; ::_thesis: f +* (i,(f /. i)) = f percases ( i in dom f or not i in dom f ) ; suppose i in dom f ; ::_thesis: f +* (i,(f /. i)) = f hence f +* (i,(f /. i)) = f +* (i,(f . i)) by PARTFUN1:def_6 .= f by Th35 ; ::_thesis: verum end; suppose not i in dom f ; ::_thesis: f +* (i,(f /. i)) = f hence f +* (i,(f /. i)) = f by Def3; ::_thesis: verum end; end; end; begin definition let X be set ; let p be Function-yielding FinSequence; func compose (p,X) -> Function means :Def4: :: FUNCT_7:def 4 ex f being ManySortedFunction of NAT st ( it = f . (len p) & f . 0 = id X & ( for i being Element of NAT st i + 1 in dom p holds for g, h being Function st g = f . i & h = p . (i + 1) holds f . (i + 1) = h * g ) ); uniqueness for b1, b2 being Function st ex f being ManySortedFunction of NAT st ( b1 = f . (len p) & f . 0 = id X & ( for i being Element of NAT st i + 1 in dom p holds for g, h being Function st g = f . i & h = p . (i + 1) holds f . (i + 1) = h * g ) ) & ex f being ManySortedFunction of NAT st ( b2 = f . (len p) & f . 0 = id X & ( for i being Element of NAT st i + 1 in dom p holds for g, h being Function st g = f . i & h = p . (i + 1) holds f . (i + 1) = h * g ) ) holds b1 = b2 proof let g1, g2 be Function; ::_thesis: ( ex f being ManySortedFunction of NAT st ( g1 = f . (len p) & f . 0 = id X & ( for i being Element of NAT st i + 1 in dom p holds for g, h being Function st g = f . i & h = p . (i + 1) holds f . (i + 1) = h * g ) ) & ex f being ManySortedFunction of NAT st ( g2 = f . (len p) & f . 0 = id X & ( for i being Element of NAT st i + 1 in dom p holds for g, h being Function st g = f . i & h = p . (i + 1) holds f . (i + 1) = h * g ) ) implies g1 = g2 ) given f1 being ManySortedFunction of NAT such that A1: g1 = f1 . (len p) and A2: f1 . 0 = id X and A3: for i being Element of NAT st i + 1 in dom p holds for g, h being Function st g = f1 . i & h = p . (i + 1) holds f1 . (i + 1) = h * g ; ::_thesis: ( for f being ManySortedFunction of NAT holds ( not g2 = f . (len p) or not f . 0 = id X or ex i being Element of NAT st ( i + 1 in dom p & ex g, h being Function st ( g = f . i & h = p . (i + 1) & not f . (i + 1) = h * g ) ) ) or g1 = g2 ) given f2 being ManySortedFunction of NAT such that A4: g2 = f2 . (len p) and A5: f2 . 0 = id X and A6: for i being Element of NAT st i + 1 in dom p holds for g, h being Function st g = f2 . i & h = p . (i + 1) holds f2 . (i + 1) = h * g ; ::_thesis: g1 = g2 defpred S1[ Element of NAT ] means ( \$1 <= len p implies ( f1 . \$1 = f2 . \$1 & f1 . \$1 is Function ) ); A7: for i being Element of NAT st S1[i] holds S1[i + 1] proof let i be Element of NAT ; ::_thesis: ( S1[i] implies S1[i + 1] ) assume that A8: ( i <= len p implies ( f1 . i = f2 . i & f1 . i is Function ) ) and A9: i + 1 <= len p ; ::_thesis: ( f1 . (i + 1) = f2 . (i + 1) & f1 . (i + 1) is Function ) reconsider h = p . (i + 1) as Function ; reconsider g = f1 . i as Function ; i + 1 >= 1 by NAT_1:11; then A10: i + 1 in dom p by A9, FINSEQ_3:25; then f1 . (i + 1) = h * g by A3; hence ( f1 . (i + 1) = f2 . (i + 1) & f1 . (i + 1) is Function ) by A6, A8, A9, A10, NAT_1:13; ::_thesis: verum end; A11: S1[ 0 ] by A2, A5; for i being Element of NAT holds S1[i] from NAT_1:sch_1(A11, A7); hence g1 = g2 by A1, A4; ::_thesis: verum end; correctness existence ex b1 being Function ex f being ManySortedFunction of NAT st ( b1 = f . (len p) & f . 0 = id X & ( for i being Element of NAT st i + 1 in dom p holds for g, h being Function st g = f . i & h = p . (i + 1) holds f . (i + 1) = h * g ) ); proof reconsider e = 0 as Function ; defpred S1[ Element of NAT , set , set ] means ( ( \$2 is not Function & \$3 = e ) or ( \$2 is Function & ( for g, h being Function st g = \$2 & h = p . (\$1 + 1) holds \$3 = h * g ) ) ); A12: for n being Element of NAT for x being set ex y being set st S1[n,x,y] proof let n be Element of NAT ; ::_thesis: for x being set ex y being set st S1[n,x,y] let x be set ; ::_thesis: ex y being set st S1[n,x,y] reconsider h = p . (n + 1) as Function ; percases ( x is Function or not x is Function ) ; suppose x is Function ; ::_thesis: ex y being set st S1[n,x,y] then reconsider g = x as Function ; take h * g ; ::_thesis: S1[n,x,h * g] thus S1[n,x,h * g] ; ::_thesis: verum end; supposeA13: x is not Function ; ::_thesis: ex y being set st S1[n,x,y] take 0 ; ::_thesis: S1[n,x, 0 ] thus S1[n,x, 0 ] by A13; ::_thesis: verum end; end; end; consider f being Function such that A14: ( dom f = NAT & f . 0 = id X ) and A15: for n being Element of NAT holds S1[n,f . n,f . (n + 1)] from RECDEF_1:sch_1(A12); defpred S2[ Element of NAT ] means f . \$1 is Function; A16: for i being Element of NAT st S2[i] holds S2[i + 1] proof let i be Element of NAT ; ::_thesis: ( S2[i] implies S2[i + 1] ) reconsider h = p . (i + 1) as Function ; assume f . i is Function ; ::_thesis: S2[i + 1] then reconsider g = f . i as Function ; f . (i + 1) = h * g by A15; hence S2[i + 1] ; ::_thesis: verum end; A17: S2[ 0 ] by A14; A18: for i being Element of NAT holds S2[i] from NAT_1:sch_1(A17, A16); then reconsider F = f . (len p) as Function ; f is Function-yielding proof let x be set ; :: according to FUNCOP_1:def_6 ::_thesis: ( not x in proj1 f or f . x is set ) assume x in dom f ; ::_thesis: f . x is set hence f . x is set by A14, A18; ::_thesis: verum end; then reconsider f = f as ManySortedFunction of NAT by A14, PARTFUN1:def_2, RELAT_1:def_18; take F ; ::_thesis: ex f being ManySortedFunction of NAT st ( F = f . (len p) & f . 0 = id X & ( for i being Element of NAT st i + 1 in dom p holds for g, h being Function st g = f . i & h = p . (i + 1) holds f . (i + 1) = h * g ) ) take f ; ::_thesis: ( F = f . (len p) & f . 0 = id X & ( for i being Element of NAT st i + 1 in dom p holds for g, h being Function st g = f . i & h = p . (i + 1) holds f . (i + 1) = h * g ) ) thus ( F = f . (len p) & f . 0 = id X ) by A14; ::_thesis: for i being Element of NAT st i + 1 in dom p holds for g, h being Function st g = f . i & h = p . (i + 1) holds f . (i + 1) = h * g let i be Element of NAT ; ::_thesis: ( i + 1 in dom p implies for g, h being Function st g = f . i & h = p . (i + 1) holds f . (i + 1) = h * g ) thus ( i + 1 in dom p implies for g, h being Function st g = f . i & h = p . (i + 1) holds f . (i + 1) = h * g ) by A15; ::_thesis: verum end; end; :: deftheorem Def4 defines compose FUNCT_7:def_4_:_ for X being set for p being Function-yielding FinSequence for b3 being Function holds ( b3 = compose (p,X) iff ex f being ManySortedFunction of NAT st ( b3 = f . (len p) & f . 0 = id X & ( for i being Element of NAT st i + 1 in dom p holds for g, h being Function st g = f . i & h = p . (i + 1) holds f . (i + 1) = h * g ) ) ); definition let p be Function-yielding FinSequence; let x be set ; func apply (p,x) -> FinSequence means :Def5: :: FUNCT_7:def 5 ( len it = (len p) + 1 & it . 1 = x & ( for i being Element of NAT for f being Function st i in dom p & f = p . i holds it . (i + 1) = f . (it . i) ) ); existence ex b1 being FinSequence st ( len b1 = (len p) + 1 & b1 . 1 = x & ( for i being Element of NAT for f being Function st i in dom p & f = p . i holds b1 . (i + 1) = f . (b1 . i) ) ) proof defpred S1[ Element of NAT , set , set ] means ex f being Function st ( f = p . \$1 & \$3 = f . \$2 ); A1: for i being Element of NAT st 1 <= i & i < (len p) + 1 holds for x being set ex y being set st S1[i,x,y] proof let i be Element of NAT ; ::_thesis: ( 1 <= i & i < (len p) + 1 implies for x being set ex y being set st S1[i,x,y] ) assume 1 <= i ; ::_thesis: ( not i < (len p) + 1 or for x being set ex y being set st S1[i,x,y] ) assume i < (len p) + 1 ; ::_thesis: for x being set ex y being set st S1[i,x,y] reconsider f = p . i as Function ; let x be set ; ::_thesis: ex y being set st S1[i,x,y] take f . x ; ::_thesis: S1[i,x,f . x] take f ; ::_thesis: ( f = p . i & f . x = f . x ) thus ( f = p . i & f . x = f . x ) ; ::_thesis: verum end; consider q being FinSequence such that A2: ( len q = (len p) + 1 & ( q . 1 = x or (len p) + 1 = 0 ) ) and A3: for i being Element of NAT st 1 <= i & i < (len p) + 1 holds S1[i,q . i,q . (i + 1)] from RECDEF_1:sch_3(A1); take q ; ::_thesis: ( len q = (len p) + 1 & q . 1 = x & ( for i being Element of NAT for f being Function st i in dom p & f = p . i holds q . (i + 1) = f . (q . i) ) ) thus ( len q = (len p) + 1 & q . 1 = x ) by A2; ::_thesis: for i being Element of NAT for f being Function st i in dom p & f = p . i holds q . (i + 1) = f . (q . i) let i be Element of NAT ; ::_thesis: for f being Function st i in dom p & f = p . i holds q . (i + 1) = f . (q . i) let f be Function; ::_thesis: ( i in dom p & f = p . i implies q . (i + 1) = f . (q . i) ) assume A4: i in dom p ; ::_thesis: ( not f = p . i or q . (i + 1) = f . (q . i) ) then i <= len p by FINSEQ_3:25; then A5: i < (len p) + 1 by NAT_1:13; i >= 1 by A4, FINSEQ_3:25; then ex f being Function st ( f = p . i & q . (i + 1) = f . (q . i) ) by A3, A5; hence ( not f = p . i or q . (i + 1) = f . (q . i) ) ; ::_thesis: verum end; correctness uniqueness for b1, b2 being FinSequence st len b1 = (len p) + 1 & b1 . 1 = x & ( for i being Element of NAT for f being Function st i in dom p & f = p . i holds b1 . (i + 1) = f . (b1 . i) ) & len b2 = (len p) + 1 & b2 . 1 = x & ( for i being Element of NAT for f being Function st i in dom p & f = p . i holds b2 . (i + 1) = f . (b2 . i) ) holds b1 = b2; proof let q1, q2 be FinSequence; ::_thesis: ( len q1 = (len p) + 1 & q1 . 1 = x & ( for i being Element of NAT for f being Function st i in dom p & f = p . i holds q1 . (i + 1) = f . (q1 . i) ) & len q2 = (len p) + 1 & q2 . 1 = x & ( for i being Element of NAT for f being Function st i in dom p & f = p . i holds q2 . (i + 1) = f . (q2 . i) ) implies q1 = q2 ) assume that A6: len q1 = (len p) + 1 and A7: q1 . 1 = x and A8: for i being Element of NAT for f being Function st i in dom p & f = p . i holds q1 . (i + 1) = f . (q1 . i) and A9: len q2 = (len p) + 1 and A10: q2 . 1 = x and A11: for i being Element of NAT for f being Function st i in dom p & f = p . i holds q2 . (i + 1) = f . (q2 . i) ; ::_thesis: q1 = q2 defpred S1[ Nat] means ( \$1 in dom q1 implies q1 . \$1 = q2 . \$1 ); A12: for i being Nat st S1[i] holds S1[i + 1] proof let i be Nat; ::_thesis: ( S1[i] implies S1[i + 1] ) assume that A13: ( i in dom q1 implies q1 . i = q2 . i ) and A14: i + 1 in dom q1 ; ::_thesis: q1 . (i + 1) = q2 . (i + 1) i + 1 <= len q1 by A14, FINSEQ_3:25; then A15: i <= len p by A6, XREAL_1:6; percases ( i = 0 or i > 0 ) ; suppose i = 0 ; ::_thesis: q1 . (i + 1) = q2 . (i + 1) hence q1 . (i + 1) = q2 . (i + 1) by A7, A10; ::_thesis: verum end; supposeA16: i > 0 ; ::_thesis: q1 . (i + 1) = q2 . (i + 1) reconsider f = p . i as Function ; i >= 0 + 1 by A16, NAT_1:13; then A17: i in dom p by A15, FINSEQ_3:25; hence q1 . (i + 1) = f . (q2 . i) by A6, A8, A13, Th22 .= q2 . (i + 1) by A11, A17 ; ::_thesis: verum end; end; end; A18: S1[ 0 ] by FINSEQ_3:25; A19: for i being Nat holds S1[i] from NAT_1:sch_2(A18, A12); dom q1 = dom q2 by A6, A9, FINSEQ_3:29; hence q1 = q2 by A19, FINSEQ_1:13; ::_thesis: verum end; end; :: deftheorem Def5 defines apply FUNCT_7:def_5_:_ for p being Function-yielding FinSequence for x being set for b3 being FinSequence holds ( b3 = apply (p,x) iff ( len b3 = (len p) + 1 & b3 . 1 = x & ( for i being Element of NAT for f being Function st i in dom p & f = p . i holds b3 . (i + 1) = f . (b3 . i) ) ) ); theorem Th39: :: FUNCT_7:39 for X being set holds compose ({},X) = id X proof let X be set ; ::_thesis: compose ({},X) = id X ex f being ManySortedFunction of NAT st ( compose ({},X) = f . 0 & f . 0 = id X & ( for i being Element of NAT st i + 1 in dom {} holds for g, h being Function st g = f . i & h = {} . (i + 1) holds f . (i + 1) = h * g ) ) by Def4, CARD_1:27; hence compose ({},X) = id X ; ::_thesis: verum end; theorem Th40: :: FUNCT_7:40 for x being set holds apply ({},x) = <*x*> proof let x be set ; ::_thesis: apply ({},x) = <*x*> ( len (apply ({},x)) = 0 + 1 & (apply ({},x)) . 1 = x ) by Def5, CARD_1:27; hence apply ({},x) = <*x*> by FINSEQ_1:40; ::_thesis: verum end; theorem Th41: :: FUNCT_7:41 for X being set for p being Function-yielding FinSequence for f being Function holds compose ((p ^ <*f*>),X) = f * (compose (p,X)) proof let X be set ; ::_thesis: for p being Function-yielding FinSequence for f being Function holds compose ((p ^ <*f*>),X) = f * (compose (p,X)) let p be Function-yielding FinSequence; ::_thesis: for f being Function holds compose ((p ^ <*f*>),X) = f * (compose (p,X)) let f be Function; ::_thesis: compose ((p ^ <*f*>),X) = f * (compose (p,X)) A1: f = (p ^ <*f*>) . ((len p) + 1) by FINSEQ_1:42; len <*f*> = 1 by FINSEQ_1:40; then A2: len (p ^ <*f*>) = (len p) + 1 by FINSEQ_1:22; consider ff being ManySortedFunction of NAT such that A3: compose ((p ^ <*f*>),X) = ff . (len (p ^ <*f*>)) and A4: ff . 0 = id X and A5: for i being Element of NAT st i + 1 in dom (p ^ <*f*>) holds for g, h being Function st g = ff . i & h = (p ^ <*f*>) . (i + 1) holds ff . (i + 1) = h * g by Def4; reconsider g = ff . (len p) as Function ; A6: dom p c= dom (p ^ <*f*>) by FINSEQ_1:26; now__::_thesis:_for_i_being_Element_of_NAT_st_i_+_1_in_dom_p_holds_ for_g,_h_being_Function_st_g_=_ff_._i_&_h_=_p_._(i_+_1)_holds_ ff_._(i_+_1)_=_h_*_g let i be Element of NAT ; ::_thesis: ( i + 1 in dom p implies for g, h being Function st g = ff . i & h = p . (i + 1) holds ff . (i + 1) = h * g ) assume A7: i + 1 in dom p ; ::_thesis: for g, h being Function st g = ff . i & h = p . (i + 1) holds ff . (i + 1) = h * g let g, h be Function; ::_thesis: ( g = ff . i & h = p . (i + 1) implies ff . (i + 1) = h * g ) assume that A8: g = ff . i and A9: h = p . (i + 1) ; ::_thesis: ff . (i + 1) = h * g h = (p ^ <*f*>) . (i + 1) by A7, A9, FINSEQ_1:def_7; hence ff . (i + 1) = h * g by A5, A6, A7, A8; ::_thesis: verum end; then A10: g = compose (p,X) by A4, Def4; ( 1 in Seg 1 & dom <*f*> = Seg 1 ) by FINSEQ_1:2, FINSEQ_1:38, TARSKI:def_1; hence compose ((p ^ <*f*>),X) = f * (compose (p,X)) by A3, A5, A10, A2, A1, FINSEQ_1:28; ::_thesis: verum end; theorem Th42: :: FUNCT_7:42 for x being set for p being Function-yielding FinSequence for f being Function holds apply ((p ^ <*f*>),x) = (apply (p,x)) ^ <*(f . ((apply (p,x)) . ((len p) + 1)))*> proof let x be set ; ::_thesis: for p being Function-yielding FinSequence for f being Function holds apply ((p ^ <*f*>),x) = (apply (p,x)) ^ <*(f . ((apply (p,x)) . ((len p) + 1)))*> let p be Function-yielding FinSequence; ::_thesis: for f being Function holds apply ((p ^ <*f*>),x) = (apply (p,x)) ^ <*(f . ((apply (p,x)) . ((len p) + 1)))*> let f be Function; ::_thesis: apply ((p ^ <*f*>),x) = (apply (p,x)) ^ <*(f . ((apply (p,x)) . ((len p) + 1)))*> defpred S1[ Nat] means ( \$1 in dom (apply (p,x)) implies (apply ((p ^ <*f*>),x)) . \$1 = (apply (p,x)) . \$1 ); A1: len (apply (p,x)) = (len p) + 1 by Def5; A2: (apply (p,x)) . 1 = x by Def5; A3: for i being Nat st S1[i] holds S1[i + 1] proof let i be Nat; ::_thesis: ( S1[i] implies S1[i + 1] ) assume that A4: ( i in dom (apply (p,x)) implies (apply ((p ^ <*f*>),x)) . i = (apply (p,x)) . i ) and A5: i + 1 in dom (apply (p,x)) ; ::_thesis: (apply ((p ^ <*f*>),x)) . (i + 1) = (apply (p,x)) . (i + 1) A6: i + 1 <= len (apply (p,x)) by A5, FINSEQ_3:25; then A7: i <= len (apply (p,x)) by NAT_1:13; A8: i <= len p by A1, A6, XREAL_1:6; percases ( i = 0 or i > 0 ) ; suppose i = 0 ; ::_thesis: (apply ((p ^ <*f*>),x)) . (i + 1) = (apply (p,x)) . (i + 1) hence (apply ((p ^ <*f*>),x)) . (i + 1) = (apply (p,x)) . (i + 1) by A2, Def5; ::_thesis: verum end; supposeA9: i > 0 ; ::_thesis: (apply ((p ^ <*f*>),x)) . (i + 1) = (apply (p,x)) . (i + 1) reconsider g = p . i as Function ; A10: i >= 0 + 1 by A9, NAT_1:13; then A11: i in dom p by A8, FINSEQ_3:25; then ( dom p c= dom (p ^ <*f*>) & g = (p ^ <*f*>) . i ) by FINSEQ_1:26, FINSEQ_1:def_7; then (apply ((p ^ <*f*>),x)) . (i + 1) = g . ((apply ((p ^ <*f*>),x)) . i) by A11, Def5; hence (apply ((p ^ <*f*>),x)) . (i + 1) = (apply (p,x)) . (i + 1) by A4, A7, A10, A11, Def5, FINSEQ_3:25; ::_thesis: verum end; end; end; A12: S1[ 0 ] by FINSEQ_3:25; A13: for i being Nat holds S1[i] from NAT_1:sch_2(A12, A3); len <*f*> = 1 by FINSEQ_1:40; then A14: len (p ^ <*f*>) = (len p) + 1 by FINSEQ_1:22; A15: (len p) + 1 >= 1 by NAT_1:11; then A16: ( (p ^ <*f*>) . ((len p) + 1) = f & (len p) + 1 in dom (p ^ <*f*>) ) by A14, FINSEQ_1:42, FINSEQ_3:25; A17: (len p) + 1 in dom (apply (p,x)) by A1, A15, FINSEQ_3:25; A18: now__::_thesis:_for_i_being_Nat_st_i_in_dom_<*(f_._((apply_(p,x))_._((len_p)_+_1)))*>_holds_ (apply_((p_^_<*f*>),x))_._((len_(apply_(p,x)))_+_i)_=_<*(f_._((apply_(p,x))_._((len_p)_+_1)))*>_._i let i be Nat; ::_thesis: ( i in dom <*(f . ((apply (p,x)) . ((len p) + 1)))*> implies (apply ((p ^ <*f*>),x)) . ((len (apply (p,x))) + i) = <*(f . ((apply (p,x)) . ((len p) + 1)))*> . i ) assume i in dom <*(f . ((apply (p,x)) . ((len p) + 1)))*> ; ::_thesis: (apply ((p ^ <*f*>),x)) . ((len (apply (p,x))) + i) = <*(f . ((apply (p,x)) . ((len p) + 1)))*> . i then i in Seg 1 by FINSEQ_1:38; then A19: i = 1 by FINSEQ_1:2, TARSKI:def_1; then ( f . ((apply ((p ^ <*f*>),x)) . ((len p) + i)) = (apply ((p ^ <*f*>),x)) . ((len (apply (p,x))) + i) & (apply ((p ^ <*f*>),x)) . ((len p) + i) = (apply (p,x)) . ((len p) + i) ) by A1, A16, A17, A13, Def5; hence (apply ((p ^ <*f*>),x)) . ((len (apply (p,x))) + i) = <*(f . ((apply (p,x)) . ((len p) + 1)))*> . i by A19, FINSEQ_1:40; ::_thesis: verum end; len (apply ((p ^ <*f*>),x)) = (len (p ^ <*f*>)) + 1 by Def5; then ( len <*(f . ((apply (p,x)) . ((len p) + 1)))*> = 1 & dom (apply ((p ^ <*f*>),x)) = Seg ((len (apply (p,x))) + 1) ) by A1, A14, FINSEQ_1:40, FINSEQ_1:def_3; hence apply ((p ^ <*f*>),x) = (apply (p,x)) ^ <*(f . ((apply (p,x)) . ((len p) + 1)))*> by A13, A18, FINSEQ_1:def_7; ::_thesis: verum end; theorem :: FUNCT_7:43 for X being set for p being Function-yielding FinSequence for f being Function holds compose ((<*f*> ^ p),X) = (compose (p,(f .: X))) * (f | X) proof let X be set ; ::_thesis: for p being Function-yielding FinSequence for f being Function holds compose ((<*f*> ^ p),X) = (compose (p,(f .: X))) * (f | X) let p be Function-yielding FinSequence; ::_thesis: for f being Function holds compose ((<*f*> ^ p),X) = (compose (p,(f .: X))) * (f | X) let f be Function; ::_thesis: compose ((<*f*> ^ p),X) = (compose (p,(f .: X))) * (f | X) defpred S1[ Function-yielding FinSequence] means compose ((<*f*> ^ \$1),X) = (compose (\$1,(f .: X))) * (f | X); A1: for p being Function-yielding FinSequence st S1[p] holds for f being Function holds S1[p ^ <*f*>] proof let p be Function-yielding FinSequence; ::_thesis: ( S1[p] implies for f being Function holds S1[p ^ <*f*>] ) assume A2: compose ((<*f*> ^ p),X) = (compose (p,(f .: X))) * (f | X) ; ::_thesis: for f being Function holds S1[p ^ <*f*>] let g be Function; ::_thesis: S1[p ^ <*g*>] thus compose ((<*f*> ^ (p ^ <*g*>)),X) = compose (((<*f*> ^ p) ^ <*g*>),X) by FINSEQ_1:32 .= g * (compose ((<*f*> ^ p),X)) by Th41 .= (g * (compose (p,(f .: X)))) * (f | X) by A2, RELAT_1:36 .= (compose ((p ^ <*g*>),(f .: X))) * (f | X) by Th41 ; ::_thesis: verum end; ( <*f*> ^ {} = <*f*> & {} ^ <*f*> = <*f*> ) by FINSEQ_1:34; then compose ((<*f*> ^ {}),X) = f * (compose ({},X)) by Th41 .= f * (id X) by Th39 .= f | X by RELAT_1:65 .= (id (rng (f | X))) * (f | X) by RELAT_1:54 .= (id (f .: X)) * (f | X) by RELAT_1:115 .= (compose ({},(f .: X))) * (f | X) by Th39 ; then A3: S1[ {} ] ; for p being Function-yielding FinSequence holds S1[p] from FUNCT_7:sch_5(A3, A1); hence compose ((<*f*> ^ p),X) = (compose (p,(f .: X))) * (f | X) ; ::_thesis: verum end; theorem :: FUNCT_7:44 for x being set for p being Function-yielding FinSequence for f being Function holds apply ((<*f*> ^ p),x) = <*x*> ^ (apply (p,(f . x))) proof let x be set ; ::_thesis: for p being Function-yielding FinSequence for f being Function holds apply ((<*f*> ^ p),x) = <*x*> ^ (apply (p,(f . x))) let p be Function-yielding FinSequence; ::_thesis: for f being Function holds apply ((<*f*> ^ p),x) = <*x*> ^ (apply (p,(f . x))) let f be Function; ::_thesis: apply ((<*f*> ^ p),x) = <*x*> ^ (apply (p,(f . x))) defpred S1[ Function-yielding FinSequence] means apply ((<*f*> ^ \$1),x) = <*x*> ^ (apply (\$1,(f . x))); A1: len {} = 0 ; A2: for p being Function-yielding FinSequence st S1[p] holds for f being Function holds S1[p ^ <*f*>] proof let p be Function-yielding FinSequence; ::_thesis: ( S1[p] implies for f being Function holds S1[p ^ <*f*>] ) assume A3: apply ((<*f*> ^ p),x) = <*x*> ^ (apply (p,(f . x))) ; ::_thesis: for f being Function holds S1[p ^ <*f*>] let g be Function; ::_thesis: S1[p ^ <*g*>] set p9 = <*f*> ^ p; A4: len (apply (p,(f . x))) = (len p) + 1 by Def5; len <*f*> = 1 by FINSEQ_1:40; then A5: len (<*f*> ^ p) = (len p) + 1 by FINSEQ_1:22; then len (<*f*> ^ p) >= 1 by NAT_1:11; then ( len <*x*> = 1 & len (<*f*> ^ p) in dom (apply (p,(f . x))) ) by A4, A5, FINSEQ_1:40, FINSEQ_3:25; then A6: (apply ((<*f*> ^ p),x)) . (1 + (len (<*f*> ^ p))) = (apply (p,(f . x))) . ((len p) + 1) by A3, A5, FINSEQ_1:def_7; apply (((<*f*> ^ p) ^ <*g*>),x) = (apply ((<*f*> ^ p),x)) ^ <*(g . ((apply ((<*f*> ^ p),x)) . ((len (<*f*> ^ p)) + 1)))*> by Th42; hence apply ((<*f*> ^ (p ^ <*g*>)),x) = (<*x*> ^ (apply (p,(f . x)))) ^ <*(g . ((apply (p,(f . x))) . ((len p) + 1)))*> by A3, A6, FINSEQ_1:32 .= <*x*> ^ ((apply (p,(f . x))) ^ <*(g . ((apply (p,(f . x))) . ((len p) + 1)))*>) by FINSEQ_1:32 .= <*x*> ^ (apply ((p ^ <*g*>),(f . x))) by Th42 ; ::_thesis: verum end; ( <*f*> ^ {} = <*f*> & {} ^ <*f*> = <*f*> ) by FINSEQ_1:34; then apply ((<*f*> ^ {}),x) = (apply ({},x)) ^ <*(f . ((apply ({},x)) . (0 + 1)))*> by A1, Th42 .= <*x*> ^ <*(f . ((apply ({},x)) . 1))*> by Th40 .= <*x*> ^ <*(f . (<*x*> . 1))*> by Th40 .= <*x*> ^ <*(f . x)*> by FINSEQ_1:40 .= <*x*> ^ (apply ({},(f . x))) by Th40 ; then A7: S1[ {} ] ; for p being Function-yielding FinSequence holds S1[p] from FUNCT_7:sch_5(A7, A2); hence apply ((<*f*> ^ p),x) = <*x*> ^ (apply (p,(f . x))) ; ::_thesis: verum end; theorem Th45: :: FUNCT_7:45 for X being set for f being Function holds compose (<*f*>,X) = f * (id X) proof let X be set ; ::_thesis: for f being Function holds compose (<*f*>,X) = f * (id X) let f be Function; ::_thesis: compose (<*f*>,X) = f * (id X) <*f*> = {} ^ <*f*> by FINSEQ_1:34; hence compose (<*f*>,X) = f * (compose ({},X)) by Th41 .= f * (id X) by Th39 ; ::_thesis: verum end; theorem :: FUNCT_7:46 for X being set for f being Function st dom f c= X holds compose (<*f*>,X) = f proof let X be set ; ::_thesis: for f being Function st dom f c= X holds compose (<*f*>,X) = f let f be Function; ::_thesis: ( dom f c= X implies compose (<*f*>,X) = f ) compose (<*f*>,X) = f * (id X) by Th45; hence ( dom f c= X implies compose (<*f*>,X) = f ) by RELAT_1:51; ::_thesis: verum end; theorem Th47: :: FUNCT_7:47 for x being set for f being Function holds apply (<*f*>,x) = <*x,(f . x)*> proof let x be set ; ::_thesis: for f being Function holds apply (<*f*>,x) = <*x,(f . x)*> let f be Function; ::_thesis: apply (<*f*>,x) = <*x,(f . x)*> A1: <*x*> . (0 + 1) = x by FINSEQ_1:40; A2: ( apply ({},x) = <*x*> & len {} = 0 ) by Th40; thus apply (<*f*>,x) = apply (({} ^ <*f*>),x) by FINSEQ_1:34 .= <*x*> ^ <*(f . x)*> by A2, A1, Th42 .= <*x,(f . x)*> by FINSEQ_1:def_9 ; ::_thesis: verum end; theorem :: FUNCT_7:48 for X, Y being set for p, q being Function-yielding FinSequence st rng (compose (p,X)) c= Y holds compose ((p ^ q),X) = (compose (q,Y)) * (compose (p,X)) proof let X, Y be set ; ::_thesis: for p, q being Function-yielding FinSequence st rng (compose (p,X)) c= Y holds compose ((p ^ q),X) = (compose (q,Y)) * (compose (p,X)) let p, q be Function-yielding FinSequence; ::_thesis: ( rng (compose (p,X)) c= Y implies compose ((p ^ q),X) = (compose (q,Y)) * (compose (p,X)) ) assume A1: rng (compose (p,X)) c= Y ; ::_thesis: compose ((p ^ q),X) = (compose (q,Y)) * (compose (p,X)) defpred S1[ Function-yielding FinSequence] means compose ((p ^ \$1),X) = (compose (\$1,Y)) * (compose (p,X)); A2: for p being Function-yielding FinSequence st S1[p] holds for f being Function holds S1[p ^ <*f*>] proof let q be Function-yielding FinSequence; ::_thesis: ( S1[q] implies for f being Function holds S1[q ^ <*f*>] ) assume A3: compose ((p ^ q),X) = (compose (q,Y)) * (compose (p,X)) ; ::_thesis: for f being Function holds S1[q ^ <*f*>] let f be Function; ::_thesis: S1[q ^ <*f*>] thus compose ((p ^ (q ^ <*f*>)),X) = compose (((p ^ q) ^ <*f*>),X) by FINSEQ_1:32 .= f * (compose ((p ^ q),X)) by Th41 .= (f * (compose (q,Y))) * (compose (p,X)) by A3, RELAT_1:36 .= (compose ((q ^ <*f*>),Y)) * (compose (p,X)) by Th41 ; ::_thesis: verum end; compose ((p ^ {}),X) = compose (p,X) by FINSEQ_1:34 .= (id Y) * (compose (p,X)) by A1, RELAT_1:53 .= (compose ({},Y)) * (compose (p,X)) by Th39 ; then A4: S1[ {} ] ; for q being Function-yielding FinSequence holds S1[q] from FUNCT_7:sch_5(A4, A2); hence compose ((p ^ q),X) = (compose (q,Y)) * (compose (p,X)) ; ::_thesis: verum end; theorem Th49: :: FUNCT_7:49 for x being set for p, q being Function-yielding FinSequence holds (apply ((p ^ q),x)) . ((len (p ^ q)) + 1) = (apply (q,((apply (p,x)) . ((len p) + 1)))) . ((len q) + 1) proof let x be set ; ::_thesis: for p, q being Function-yielding FinSequence holds (apply ((p ^ q),x)) . ((len (p ^ q)) + 1) = (apply (q,((apply (p,x)) . ((len p) + 1)))) . ((len q) + 1) let p, q be Function-yielding FinSequence; ::_thesis: (apply ((p ^ q),x)) . ((len (p ^ q)) + 1) = (apply (q,((apply (p,x)) . ((len p) + 1)))) . ((len q) + 1) defpred S1[ Function-yielding FinSequence] means (apply ((p ^ \$1),x)) . ((len (p ^ \$1)) + 1) = (apply (\$1,((apply (p,x)) . ((len p) + 1)))) . ((len \$1) + 1); A1: for p being Function-yielding FinSequence st S1[p] holds for f being Function holds S1[p ^ <*f*>] proof set y = (apply (p,x)) . ((len p) + 1); let q be Function-yielding FinSequence; ::_thesis: ( S1[q] implies for f being Function holds S1[q ^ <*f*>] ) assume A2: (apply ((p ^ q),x)) . ((len (p ^ q)) + 1) = (apply (q,((apply (p,x)) . ((len p) + 1)))) . ((len q) + 1) ; ::_thesis: for f being Function holds S1[q ^ <*f*>] let f be Function; ::_thesis: S1[q ^ <*f*>] A3: len <*f*> = 1 by FINSEQ_1:40; then A4: len ((p ^ q) ^ <*f*>) = (len (p ^ q)) + 1 by FINSEQ_1:22; A5: len (q ^ <*f*>) = (len q) + 1 by A3, FINSEQ_1:22; A6: ( apply ((q ^ <*f*>),((apply (p,x)) . ((len p) + 1))) = (apply (q,((apply (p,x)) . ((len p) + 1)))) ^ <*(f . ((apply (q,((apply (p,x)) . ((len p) + 1)))) . ((len q) + 1)))*> & len (apply (q,((apply (p,x)) . ((len p) + 1)))) = (len q) + 1 ) by Def5, Th42; A7: len (apply ((p ^ q),x)) = (len (p ^ q)) + 1 by Def5; ( p ^ (q ^ <*f*>) = (p ^ q) ^ <*f*> & apply (((p ^ q) ^ <*f*>),x) = (apply ((p ^ q),x)) ^ <*(f . ((apply ((p ^ q),x)) . ((len (p ^ q)) + 1)))*> ) by Th42, FINSEQ_1:32; hence (apply ((p ^ (q ^ <*f*>)),x)) . ((len (p ^ (q ^ <*f*>))) + 1) = f . ((apply ((p ^ q),x)) . ((len (p ^ q)) + 1)) by A7, A4, FINSEQ_1:42 .= (apply ((q ^ <*f*>),((apply (p,x)) . ((len p) + 1)))) . ((len (q ^ <*f*>)) + 1) by A2, A6, A5, FINSEQ_1:42 ; ::_thesis: verum end; ( apply ({},((apply (p,x)) . ((len p) + 1))) = <*((apply (p,x)) . ((len p) + 1))*> & p ^ {} = p ) by Th40, FINSEQ_1:34; then A8: S1[ {} ] by FINSEQ_1:40; for q being Function-yielding FinSequence holds S1[q] from FUNCT_7:sch_5(A8, A1); hence (apply ((p ^ q),x)) . ((len (p ^ q)) + 1) = (apply (q,((apply (p,x)) . ((len p) + 1)))) . ((len q) + 1) ; ::_thesis: verum end; theorem :: FUNCT_7:50 for x being set for p, q being Function-yielding FinSequence holds apply ((p ^ q),x) = (apply (p,x)) \$^ (apply (q,((apply (p,x)) . ((len p) + 1)))) proof let x be set ; ::_thesis: for p, q being Function-yielding FinSequence holds apply ((p ^ q),x) = (apply (p,x)) \$^ (apply (q,((apply (p,x)) . ((len p) + 1)))) let p, q be Function-yielding FinSequence; ::_thesis: apply ((p ^ q),x) = (apply (p,x)) \$^ (apply (q,((apply (p,x)) . ((len p) + 1)))) defpred S1[ Function-yielding FinSequence] means apply ((p ^ \$1),x) = (apply (p,x)) \$^ (apply (\$1,((apply (p,x)) . ((len p) + 1)))); A1: len (apply (p,x)) = (len p) + 1 by Def5; then consider r being FinSequence, y being set such that A2: apply (p,x) = r ^ <*y*> by CARD_1:27, FINSEQ_1:46; A3: for p being Function-yielding FinSequence st S1[p] holds for f being Function holds S1[p ^ <*f*>] proof let q be Function-yielding FinSequence; ::_thesis: ( S1[q] implies for f being Function holds S1[q ^ <*f*>] ) assume A4: apply ((p ^ q),x) = (apply (p,x)) \$^ (apply (q,((apply (p,x)) . ((len p) + 1)))) ; ::_thesis: for f being Function holds S1[q ^ <*f*>] A5: (apply ((p ^ q),x)) . ((len (p ^ q)) + 1) = (apply (q,((apply (p,x)) . ((len p) + 1)))) . ((len q) + 1) by Th49; let f be Function; ::_thesis: S1[q ^ <*f*>] A6: len (apply (q,((apply (p,x)) . ((len p) + 1)))) = (len q) + 1 by Def5; A7: len (apply ((q ^ <*f*>),((apply (p,x)) . ((len p) + 1)))) = (len (q ^ <*f*>)) + 1 by Def5; thus apply ((p ^ (q ^ <*f*>)),x) = apply (((p ^ q) ^ <*f*>),x) by FINSEQ_1:32 .= (apply ((p ^ q),x)) ^ <*(f . ((apply ((p ^ q),x)) . ((len (p ^ q)) + 1)))*> by Th42 .= (r ^ (apply (q,((apply (p,x)) . ((len p) + 1))))) ^ <*(f . ((apply ((p ^ q),x)) . ((len (p ^ q)) + 1)))*> by A2, A4, A6, CARD_1:27, REWRITE1:2 .= r ^ ((apply (q,((apply (p,x)) . ((len p) + 1)))) ^ <*(f . ((apply ((p ^ q),x)) . ((len (p ^ q)) + 1)))*>) by FINSEQ_1:32 .= r ^ (apply ((q ^ <*f*>),((apply (p,x)) . ((len p) + 1)))) by A5, Th42 .= (apply (p,x)) \$^ (apply ((q ^ <*f*>),((apply (p,x)) . ((len p) + 1)))) by A2, A7, CARD_1:27, REWRITE1:2 ; ::_thesis: verum end; len <*y*> = 1 by FINSEQ_1:40; then (len p) + 1 = (len r) + 1 by A1, A2, FINSEQ_1:22; then A8: (apply (p,x)) . ((len p) + 1) = y by A2, FINSEQ_1:42; apply ((p ^ {}),x) = apply (p,x) by FINSEQ_1:34 .= (apply (p,x)) \$^ <*((apply (p,x)) . ((len p) + 1))*> by A2, A8, REWRITE1:2 .= (apply (p,x)) \$^ (apply ({},((apply (p,x)) . ((len p) + 1)))) by Th40 ; then A9: S1[ {} ] ; for q being Function-yielding FinSequence holds S1[q] from FUNCT_7:sch_5(A9, A3); hence apply ((p ^ q),x) = (apply (p,x)) \$^ (apply (q,((apply (p,x)) . ((len p) + 1)))) ; ::_thesis: verum end; theorem Th51: :: FUNCT_7:51 for X being set for f, g being Function holds compose (<*f,g*>,X) = (g * f) * (id X) proof let X be set ; ::_thesis: for f, g being Function holds compose (<*f,g*>,X) = (g * f) * (id X) let f, g be Function; ::_thesis: compose (<*f,g*>,X) = (g * f) * (id X) <*f,g*> = <*f*> ^ <*g*> by FINSEQ_1:def_9; hence compose (<*f,g*>,X) = g * (compose (<*f*>,X)) by Th41 .= g * (f * (id X)) by Th45 .= (g * f) * (id X) by RELAT_1:36 ; ::_thesis: verum end; theorem :: FUNCT_7:52 for X being set for f, g being Function st ( dom f c= X or dom (g * f) c= X ) holds compose (<*f,g*>,X) = g * f proof let X be set ; ::_thesis: for f, g being Function st ( dom f c= X or dom (g * f) c= X ) holds compose (<*f,g*>,X) = g * f let f, g be Function; ::_thesis: ( ( dom f c= X or dom (g * f) c= X ) implies compose (<*f,g*>,X) = g * f ) ( compose (<*f,g*>,X) = (g * f) * (id X) & (g * f) * (id X) = g * (f * (id X)) ) by Th51, RELAT_1:36; hence ( ( dom f c= X or dom (g * f) c= X ) implies compose (<*f,g*>,X) = g * f ) by RELAT_1:51; ::_thesis: verum end; theorem Th53: :: FUNCT_7:53 for x being set for f, g being Function holds apply (<*f,g*>,x) = <*x,(f . x),(g . (f . x))*> proof let x be set ; ::_thesis: for f, g being Function holds apply (<*f,g*>,x) = <*x,(f . x),(g . (f . x))*> let f, g be Function; ::_thesis: apply (<*f,g*>,x) = <*x,(f . x),(g . (f . x))*> A1: ( apply (<*f*>,x) = <*x,(f . x)*> & len <*f*> = 1 ) by Th47, FINSEQ_1:40; thus apply (<*f,g*>,x) = apply ((<*f*> ^ <*g*>),x) by FINSEQ_1:def_9 .= <*x,(f . x)*> ^ <*(g . (<*x,(f . x)*> . (1 + 1)))*> by A1, Th42 .= <*x,(f . x)*> ^ <*(g . (f . x))*> by FINSEQ_1:44 .= <*x,(f . x),(g . (f . x))*> by FINSEQ_1:43 ; ::_thesis: verum end; theorem Th54: :: FUNCT_7:54 for X being set for f, g, h being Function holds compose (<*f,g,h*>,X) = ((h * g) * f) * (id X) proof let X be set ; ::_thesis: for f, g, h being Function holds compose (<*f,g,h*>,X) = ((h * g) * f) * (id X) let f, g, h be Function; ::_thesis: compose (<*f,g,h*>,X) = ((h * g) * f) * (id X) <*f,g,h*> = <*f,g*> ^ <*h*> by FINSEQ_1:43; hence compose (<*f,g,h*>,X) = h * (compose (<*f,g*>,X)) by Th41 .= h * ((g * f) * (id X)) by Th51 .= (h * (g * f)) * (id X) by RELAT_1:36 .= ((h * g) * f) * (id X) by RELAT_1:36 ; ::_thesis: verum end; theorem :: FUNCT_7:55 for X being set for f, g, h being Function st ( dom f c= X or dom (g * f) c= X or dom ((h * g) * f) c= X ) holds compose (<*f,g,h*>,X) = (h * g) * f proof let X be set ; ::_thesis: for f, g, h being Function st ( dom f c= X or dom (g * f) c= X or dom ((h * g) * f) c= X ) holds compose (<*f,g,h*>,X) = (h * g) * f let f, g, h be Function; ::_thesis: ( ( dom f c= X or dom (g * f) c= X or dom ((h * g) * f) c= X ) implies compose (<*f,g,h*>,X) = (h * g) * f ) A1: ( (h * g) * (f * (id X)) = h * (g * (f * (id X))) & g * (f * (id X)) = (g * f) * (id X) ) by RELAT_1:36; A2: h * (g * f) = (h * g) * f by RELAT_1:36; ( compose (<*f,g,h*>,X) = ((h * g) * f) * (id X) & ((h * g) * f) * (id X) = (h * g) * (f * (id X)) ) by Th54, RELAT_1:36; hence ( ( dom f c= X or dom (g * f) c= X or dom ((h * g) * f) c= X ) implies compose (<*f,g,h*>,X) = (h * g) * f ) by A1, A2, RELAT_1:51; ::_thesis: verum end; theorem :: FUNCT_7:56 for x being set for f, g, h being Function holds apply (<*f,g,h*>,x) = <*x*> ^ <*(f . x),(g . (f . x)),(h . (g . (f . x)))*> proof let x be set ; ::_thesis: for f, g, h being Function holds apply (<*f,g,h*>,x) = <*x*> ^ <*(f . x),(g . (f . x)),(h . (g . (f . x)))*> let f, g, h be Function; ::_thesis: apply (<*f,g,h*>,x) = <*x*> ^ <*(f . x),(g . (f . x)),(h . (g . (f . x)))*> A1: ( apply (<*f,g*>,x) = <*x,(f . x),(g . (f . x))*> & len <*f,g*> = 2 ) by Th53, FINSEQ_1:44; thus apply (<*f,g,h*>,x) = apply ((<*f,g*> ^ <*h*>),x) by FINSEQ_1:43 .= <*x,(f . x),(g . (f . x))*> ^ <*(h . (<*x,(f . x),(g . (f . x))*> . (2 + 1)))*> by A1, Th42 .= <*x,(f . x),(g . (f . x))*> ^ <*(h . (g . (f . x)))*> by FINSEQ_1:45 .= (<*x*> ^ <*(f . x),(g . (f . x))*>) ^ <*(h . (g . (f . x)))*> by FINSEQ_1:43 .= <*x*> ^ (<*(f . x),(g . (f . x))*> ^ <*(h . (g . (f . x)))*>) by FINSEQ_1:32 .= <*x*> ^ <*(f . x),(g . (f . x)),(h . (g . (f . x)))*> by FINSEQ_1:43 ; ::_thesis: verum end; definition let F be FinSequence; func firstdom F -> set means :Def6: :: FUNCT_7:def 6 it is empty if F is empty otherwise it = proj1 (F . 1); correctness consistency for b1 being set holds verum; existence ( ( for b1 being set holds verum ) & ( F is empty implies ex b1 being set st b1 is empty ) & ( not F is empty implies ex b1 being set st b1 = proj1 (F . 1) ) ); uniqueness for b1, b2 being set holds ( ( F is empty & b1 is empty & b2 is empty implies b1 = b2 ) & ( not F is empty & b1 = proj1 (F . 1) & b2 = proj1 (F . 1) implies b1 = b2 ) ); ; func lastrng F -> set means :Def7: :: FUNCT_7:def 7 it is empty if F is empty otherwise it = proj2 (F . (len F)); correctness consistency for b1 being set holds verum; existence ( ( for b1 being set holds verum ) & ( F is empty implies ex b1 being set st b1 is empty ) & ( not F is empty implies ex b1 being set st b1 = proj2 (F . (len F)) ) ); uniqueness for b1, b2 being set holds ( ( F is empty & b1 is empty & b2 is empty implies b1 = b2 ) & ( not F is empty & b1 = proj2 (F . (len F)) & b2 = proj2 (F . (len F)) implies b1 = b2 ) ); ; end; :: deftheorem Def6 defines firstdom FUNCT_7:def_6_:_ for F being FinSequence for b2 being set holds ( ( F is empty implies ( b2 = firstdom F iff b2 is empty ) ) & ( not F is empty implies ( b2 = firstdom F iff b2 = proj1 (F . 1) ) ) ); :: deftheorem Def7 defines lastrng FUNCT_7:def_7_:_ for F being FinSequence for b2 being set holds ( ( F is empty implies ( b2 = lastrng F iff b2 is empty ) ) & ( not F is empty implies ( b2 = lastrng F iff b2 = proj2 (F . (len F)) ) ) ); theorem Th57: :: FUNCT_7:57 ( firstdom {} = {} & lastrng {} = {} ) by Def6, Def7; theorem Th58: :: FUNCT_7:58 for f being Function for p being FinSequence holds ( firstdom (<*f*> ^ p) = dom f & lastrng (p ^ <*f*>) = rng f ) proof let f be Function; ::_thesis: for p being FinSequence holds ( firstdom (<*f*> ^ p) = dom f & lastrng (p ^ <*f*>) = rng f ) let p be FinSequence; ::_thesis: ( firstdom (<*f*> ^ p) = dom f & lastrng (p ^ <*f*>) = rng f ) thus firstdom (<*f*> ^ p) = proj1 ((<*f*> ^ p) . 1) by Def6 .= dom f by FINSEQ_1:41 ; ::_thesis: lastrng (p ^ <*f*>) = rng f len <*f*> = 1 by FINSEQ_1:40; then len (p ^ <*f*>) = (len p) + 1 by FINSEQ_1:22; hence lastrng (p ^ <*f*>) = proj2 ((p ^ <*f*>) . ((len p) + 1)) by Def7 .= rng f by FINSEQ_1:42 ; ::_thesis: verum end; theorem Th59: :: FUNCT_7:59 for X being set for p being Function-yielding FinSequence st p <> {} holds rng (compose (p,X)) c= lastrng p proof let X be set ; ::_thesis: for p being Function-yielding FinSequence st p <> {} holds rng (compose (p,X)) c= lastrng p defpred S1[ Function-yielding FinSequence] means ( \$1 <> {} implies rng (compose (\$1,X)) c= lastrng \$1 ); A1: for p being Function-yielding FinSequence st S1[p] holds for f being Function holds S1[p ^ <*f*>] proof let q be Function-yielding FinSequence; ::_thesis: ( S1[q] implies for f being Function holds S1[q ^ <*f*>] ) assume ( q <> {} implies rng (compose (q,X)) c= lastrng q ) ; ::_thesis: for f being Function holds S1[q ^ <*f*>] let f be Function; ::_thesis: S1[q ^ <*f*>] assume q ^ <*f*> <> {} ; ::_thesis: rng (compose ((q ^ <*f*>),X)) c= lastrng (q ^ <*f*>) compose ((q ^ <*f*>),X) = f * (compose (q,X)) by Th41; then rng (compose ((q ^ <*f*>),X)) c= rng f by RELAT_1:26; hence rng (compose ((q ^ <*f*>),X)) c= lastrng (q ^ <*f*>) by Th58; ::_thesis: verum end; A2: S1[ {} ] ; thus for p being Function-yielding FinSequence holds S1[p] from FUNCT_7:sch_5(A2, A1); ::_thesis: verum end; definition let IT be FinSequence; attrIT is FuncSeq-like means :Def8: :: FUNCT_7:def 8 ex p being FinSequence st ( len p = (len IT) + 1 & ( for i being Element of NAT st i in dom IT holds IT . i in Funcs ((p . i),(p . (i + 1))) ) ); end; :: deftheorem Def8 defines FuncSeq-like FUNCT_7:def_8_:_ for IT being FinSequence holds ( IT is FuncSeq-like iff ex p being FinSequence st ( len p = (len IT) + 1 & ( for i being Element of NAT st i in dom IT holds IT . i in Funcs ((p . i),(p . (i + 1))) ) ) ); theorem Th60: :: FUNCT_7:60 for p, q being FinSequence st p ^ q is FuncSeq-like holds ( p is FuncSeq-like & q is FuncSeq-like ) proof let p, q be FinSequence; ::_thesis: ( p ^ q is FuncSeq-like implies ( p is FuncSeq-like & q is FuncSeq-like ) ) given pq being FinSequence such that A1: len pq = (len (p ^ q)) + 1 and A2: for i being Element of NAT st i in dom (p ^ q) holds (p ^ q) . i in Funcs ((pq . i),(pq . (i + 1))) ; :: according to FUNCT_7:def_8 ::_thesis: ( p is FuncSeq-like & q is FuncSeq-like ) reconsider p1 = pq | (Seg ((len p) + 1)), p2 = pq | (Seg (len p)) as FinSequence by FINSEQ_1:15; A3: len (p ^ q) = (len p) + (len q) by FINSEQ_1:22; then A4: len p <= len (p ^ q) by NAT_1:11; len (p ^ q) <= len pq by A1, NAT_1:11; then len p <= len pq by A4, XXREAL_0:2; then A5: len p2 = len p by FINSEQ_1:17; hereby :: according to FUNCT_7:def_8 ::_thesis: q is FuncSeq-like take p1 = p1; ::_thesis: ( len p1 = (len p) + 1 & ( for i being Element of NAT st i in dom p holds p . i in Funcs ((p1 . i),(p1 . (i + 1))) ) ) len p <= len (p ^ q) by A3, NAT_1:11; then (len p) + 1 <= len pq by A1, XREAL_1:6; hence A6: len p1 = (len p) + 1 by FINSEQ_1:17; ::_thesis: for i being Element of NAT st i in dom p holds p . i in Funcs ((p1 . i),(p1 . (i + 1))) let i be Element of NAT ; ::_thesis: ( i in dom p implies p . i in Funcs ((p1 . i),(p1 . (i + 1))) ) assume A7: i in dom p ; ::_thesis: p . i in Funcs ((p1 . i),(p1 . (i + 1))) then (p ^ q) . i = p . i by FINSEQ_1:def_7; then A8: p . i in Funcs ((pq . i),(pq . (i + 1))) by A2, A7, FINSEQ_3:22; i in dom p1 by A6, A7, Th22; then A9: pq . i = p1 . i by FUNCT_1:47; i + 1 in dom p1 by A6, A7, Th22; hence p . i in Funcs ((p1 . i),(p1 . (i + 1))) by A8, A9, FUNCT_1:47; ::_thesis: verum end; consider q2 being FinSequence such that A10: pq = p2 ^ q2 by FINSEQ_1:80; take q2 ; :: according to FUNCT_7:def_8 ::_thesis: ( len q2 = (len q) + 1 & ( for i being Element of NAT st i in dom q holds q . i in Funcs ((q2 . i),(q2 . (i + 1))) ) ) len pq = (len p2) + (len q2) by A10, FINSEQ_1:22; hence len q2 = (len q) + 1 by A1, A3, A5; ::_thesis: for i being Element of NAT st i in dom q holds q . i in Funcs ((q2 . i),(q2 . (i + 1))) let x be Element of NAT ; ::_thesis: ( x in dom q implies q . x in Funcs ((q2 . x),(q2 . (x + 1))) ) assume A11: x in dom q ; ::_thesis: q . x in Funcs ((q2 . x),(q2 . (x + 1))) then (p ^ q) . ((len p) + x) = q . x by FINSEQ_1:def_7; then A12: q . x in Funcs ((pq . ((len p) + x)),(pq . (((len p) + x) + 1))) by A2, A11, FINSEQ_1:28; A13: (len p) + ((len q) + 1) = (len p) + (len q2) by A1, A3, A10, A5, FINSEQ_1:22; then x + 1 in dom q2 by A11, Th22; then A14: q2 . (x + 1) = pq . ((len p) + (x + 1)) by A10, A5, FINSEQ_1:def_7; x in dom q2 by A13, A11, Th22; hence q . x in Funcs ((q2 . x),(q2 . (x + 1))) by A10, A5, A12, A14, FINSEQ_1:def_7; ::_thesis: verum end; registration cluster Relation-like Function-like FinSequence-like FuncSeq-like -> Function-yielding for set ; coherence for b1 being FinSequence st b1 is FuncSeq-like holds b1 is Function-yielding proof let q be FinSequence; ::_thesis: ( q is FuncSeq-like implies q is Function-yielding ) given p being FinSequence such that len p = (len q) + 1 and A1: for i being Element of NAT st i in dom q holds q . i in Funcs ((p . i),(p . (i + 1))) ; :: according to FUNCT_7:def_8 ::_thesis: q is Function-yielding let i be set ; :: according to FUNCOP_1:def_6 ::_thesis: ( not i in proj1 q or q . i is set ) assume A2: i in dom q ; ::_thesis: q . i is set then reconsider i = i as Element of NAT ; q . i in Funcs ((p . i),(p . (i + 1))) by A1, A2; hence q . i is set ; ::_thesis: verum end; end; registration cluster empty Relation-like Function-like FinSequence-like -> FuncSeq-like for set ; coherence for b1 being FinSequence st b1 is empty holds b1 is FuncSeq-like proof let p be FinSequence; ::_thesis: ( p is empty implies p is FuncSeq-like ) assume A1: p is empty ; ::_thesis: p is FuncSeq-like take q = <*{}*>; :: according to FUNCT_7:def_8 ::_thesis: ( len q = (len p) + 1 & ( for i being Element of NAT st i in dom p holds p . i in Funcs ((q . i),(q . (i + 1))) ) ) thus len q = (len p) + 1 by A1, CARD_1:27, FINSEQ_1:40; ::_thesis: for i being Element of NAT st i in dom p holds p . i in Funcs ((q . i),(q . (i + 1))) thus for i being Element of NAT st i in dom p holds p . i in Funcs ((q . i),(q . (i + 1))) by A1; ::_thesis: verum end; end; registration let f be Function; cluster<*f*> -> FuncSeq-like ; coherence <*f*> is FuncSeq-like proof take q = <*(dom f),(rng f)*>; :: according to FUNCT_7:def_8 ::_thesis: ( len q = (len <*f*>) + 1 & ( for i being Element of NAT st i in dom <*f*> holds <*f*> . i in Funcs ((q . i),(q . (i + 1))) ) ) set p = <*f*>; thus len q = 1 + 1 by FINSEQ_1:44 .= (len <*f*>) + 1 by FINSEQ_1:40 ; ::_thesis: for i being Element of NAT st i in dom <*f*> holds <*f*> . i in Funcs ((q . i),(q . (i + 1))) let i be Element of NAT ; ::_thesis: ( i in dom <*f*> implies <*f*> . i in Funcs ((q . i),(q . (i + 1))) ) assume i in dom <*f*> ; ::_thesis: <*f*> . i in Funcs ((q . i),(q . (i + 1))) then i in {1} by FINSEQ_1:2, FINSEQ_1:38; then A1: i = 1 by TARSKI:def_1; then A2: q . (i + 1) = rng f by FINSEQ_1:44; ( <*f*> . i = f & q . i = dom f ) by A1, FINSEQ_1:40, FINSEQ_1:44; hence <*f*> . i in Funcs ((q . i),(q . (i + 1))) by A2, FUNCT_2:def_2; ::_thesis: verum end; end; registration cluster non empty Relation-like non-empty NAT -defined Function-like finite FinSequence-like FinSubsequence-like FuncSeq-like for set ; existence ex b1 being FinSequence st ( b1 is FuncSeq-like & not b1 is empty & b1 is non-empty ) proof set f = the non empty Function; take p = <* the non empty Function*>; ::_thesis: ( p is FuncSeq-like & not p is empty & p is non-empty ) thus p is FuncSeq-like ; ::_thesis: ( not p is empty & p is non-empty ) thus not p is empty ; ::_thesis: p is non-empty let x be set ; :: according to FUNCT_1:def_9 ::_thesis: ( not x in proj1 p or not p . x is empty ) assume x in dom p ; ::_thesis: not p . x is empty then x in {1} by FINSEQ_1:2, FINSEQ_1:38; then x = 1 by TARSKI:def_1; hence not p . x is empty by FINSEQ_1:40; ::_thesis: verum end; end; definition mode FuncSequence is FuncSeq-like FinSequence; end; theorem Th61: :: FUNCT_7:61 for X being set for p being FuncSequence st p <> {} holds dom (compose (p,X)) = (firstdom p) /\ X proof let X be set ; ::_thesis: for p being FuncSequence st p <> {} holds dom (compose (p,X)) = (firstdom p) /\ X defpred S1[ Function-yielding FinSequence] means ( \$1 is FuncSequence & \$1 <> {} implies dom (compose (\$1,X)) = (firstdom \$1) /\ X ); A1: for p being Function-yielding FinSequence st S1[p] holds for f being Function holds S1[p ^ <*f*>] proof let q be Function-yielding FinSequence; ::_thesis: ( S1[q] implies for f being Function holds S1[q ^ <*f*>] ) assume A2: ( q is FuncSequence & q <> {} implies dom (compose (q,X)) = (firstdom q) /\ X ) ; ::_thesis: for f being Function holds S1[q ^ <*f*>] let f be Function; ::_thesis: S1[q ^ <*f*>] assume that A3: q ^ <*f*> is FuncSequence and q ^ <*f*> <> {} ; ::_thesis: dom (compose ((q ^ <*f*>),X)) = (firstdom (q ^ <*f*>)) /\ X A4: compose ((q ^ <*f*>),X) = f * (compose (q,X)) by Th41; percases ( q = {} or q <> {} ) ; suppose q = {} ; ::_thesis: dom (compose ((q ^ <*f*>),X)) = (firstdom (q ^ <*f*>)) /\ X then A5: q ^ <*f*> = <*f*> by FINSEQ_1:34; then A6: compose ((q ^ <*f*>),X) = f * (id X) by Th45; <*f*> ^ {} = <*f*> by FINSEQ_1:34; then firstdom (q ^ <*f*>) = dom f by A5, Th58; hence dom (compose ((q ^ <*f*>),X)) = (firstdom (q ^ <*f*>)) /\ X by A6, FUNCT_1:19; ::_thesis: verum end; supposeA7: q <> {} ; ::_thesis: dom (compose ((q ^ <*f*>),X)) = (firstdom (q ^ <*f*>)) /\ X then consider y being set , s being FinSequence such that A8: q = <*y*> ^ s and A9: len q = (len s) + 1 by REWRITE1:5; q . 1 = y by A8, FINSEQ_1:41; then A10: firstdom q = proj1 y by A8, Def6; A11: len q >= 1 by A9, NAT_1:11; then len q in dom q by FINSEQ_3:25; then A12: (q ^ <*f*>) . (len q) = q . (len q) by FINSEQ_1:def_7; A13: rng (compose (q,X)) c= lastrng q by A7, Th59; consider p being FinSequence such that len p = (len (q ^ <*f*>)) + 1 and A14: for i being Element of NAT st i in dom (q ^ <*f*>) holds (q ^ <*f*>) . i in Funcs ((p . i),(p . (i + 1))) by A3, Def8; consider r being FinSequence, x being set such that A15: q = r ^ <*x*> by A7, FINSEQ_1:46; len <*f*> = 1 by FINSEQ_1:40; then A16: len (q ^ <*f*>) = (len q) + 1 by FINSEQ_1:22; then len q <= len (q ^ <*f*>) by NAT_1:11; then len q in dom (q ^ <*f*>) by A11, FINSEQ_3:25; then A17: (q ^ <*f*>) . (len q) in Funcs ((p . (len q)),(p . ((len q) + 1))) by A14; len <*x*> = 1 by FINSEQ_1:40; then len q = (len r) + 1 by A15, FINSEQ_1:22; then q . (len q) = x by A15, FINSEQ_1:42; then consider g being Function such that A18: x = g and dom g = p . (len q) and A19: rng g c= p . ((len q) + 1) by A17, A12, FUNCT_2:def_2; A20: (<*y*> ^ (s ^ <*f*>)) . 1 = y by FINSEQ_1:41; (len q) + 1 >= 1 by NAT_1:11; then (len q) + 1 in dom (q ^ <*f*>) by A16, FINSEQ_3:25; then A21: (q ^ <*f*>) . ((len q) + 1) in Funcs ((p . ((len q) + 1)),(p . (((len q) + 1) + 1))) by A14; (q ^ <*f*>) . ((len q) + 1) = f by FINSEQ_1:42; then A22: ex g being Function st ( f = g & dom g = p . ((len q) + 1) & rng g c= p . (((len q) + 1) + 1) ) by A21, FUNCT_2:def_2; q ^ <*f*> = <*y*> ^ (s ^ <*f*>) by A8, FINSEQ_1:32; then A23: firstdom (q ^ <*f*>) = proj1 y by A20, Def6; lastrng q = rng g by A15, A18, Th58; hence dom (compose ((q ^ <*f*>),X)) = (firstdom (q ^ <*f*>)) /\ X by A2, A3, A4, A7, A23, A10, A19, A22, A13, Th60, RELAT_1:27, XBOOLE_1:1; ::_thesis: verum end; end; end; A24: S1[ {} ] ; for p being Function-yielding FinSequence holds S1[p] from FUNCT_7:sch_5(A24, A1); hence for p being FuncSequence st p <> {} holds dom (compose (p,X)) = (firstdom p) /\ X ; ::_thesis: verum end; theorem Th62: :: FUNCT_7:62 for p being FuncSequence holds dom (compose (p,(firstdom p))) = firstdom p proof let p be FuncSequence; ::_thesis: dom (compose (p,(firstdom p))) = firstdom p percases ( p = {} or p <> {} ) ; suppose p = {} ; ::_thesis: dom (compose (p,(firstdom p))) = firstdom p then compose (p,(firstdom p)) = id (firstdom p) by Th39; hence dom (compose (p,(firstdom p))) = firstdom p by RELAT_1:45; ::_thesis: verum end; suppose p <> {} ; ::_thesis: dom (compose (p,(firstdom p))) = firstdom p then dom (compose (p,(firstdom p))) = (firstdom p) /\ (firstdom p) by Th61; hence dom (compose (p,(firstdom p))) = firstdom p ; ::_thesis: verum end; end; end; theorem :: FUNCT_7:63 for p being FuncSequence for f being Function st rng f c= firstdom p holds <*f*> ^ p is FuncSequence proof let p be FuncSequence; ::_thesis: for f being Function st rng f c= firstdom p holds <*f*> ^ p is FuncSequence let f be Function; ::_thesis: ( rng f c= firstdom p implies <*f*> ^ p is FuncSequence ) assume A1: rng f c= firstdom p ; ::_thesis: <*f*> ^ p is FuncSequence consider q being FinSequence such that A2: len q = (len p) + 1 and A3: for i being Element of NAT st i in dom p holds p . i in Funcs ((q . i),(q . (i + 1))) by Def8; set r = <*(dom f)*> ^ q; A4: len <*(dom f)*> = 1 by FINSEQ_1:40; A5: len <*f*> = 1 by FINSEQ_1:40; then A6: len (<*f*> ^ p) = (len p) + 1 by FINSEQ_1:22; A7: now__::_thesis:_(_p_<>_{}_implies_rng_f_c=_q_._1_) assume A8: p <> {} ; ::_thesis: rng f c= q . 1 then len p >= 0 + 1 by NAT_1:13; then 1 in dom p by FINSEQ_3:25; then p . 1 in Funcs ((q . 1),(q . (1 + 1))) by A3; then ex g being Function st ( p . 1 = g & dom g = q . 1 & rng g c= q . 2 ) by FUNCT_2:def_2; hence rng f c= q . 1 by A1, A8, Def6; ::_thesis: verum end; <*f*> ^ p is FuncSeq-like proof take <*(dom f)*> ^ q ; :: according to FUNCT_7:def_8 ::_thesis: ( len (<*(dom f)*> ^ q) = (len (<*f*> ^ p)) + 1 & ( for i being Element of NAT st i in dom (<*f*> ^ p) holds (<*f*> ^ p) . i in Funcs (((<*(dom f)*> ^ q) . i),((<*(dom f)*> ^ q) . (i + 1))) ) ) 1 <= len q by A2, NAT_1:11; then A9: 1 in dom q by FINSEQ_3:25; thus len (<*(dom f)*> ^ q) = (len (<*f*> ^ p)) + 1 by A2, A4, A6, FINSEQ_1:22; ::_thesis: for i being Element of NAT st i in dom (<*f*> ^ p) holds (<*f*> ^ p) . i in Funcs (((<*(dom f)*> ^ q) . i),((<*(dom f)*> ^ q) . (i + 1))) let i be Element of NAT ; ::_thesis: ( i in dom (<*f*> ^ p) implies (<*f*> ^ p) . i in Funcs (((<*(dom f)*> ^ q) . i),((<*(dom f)*> ^ q) . (i + 1))) ) assume A10: i in dom (<*f*> ^ p) ; ::_thesis: (<*f*> ^ p) . i in Funcs (((<*(dom f)*> ^ q) . i),((<*(dom f)*> ^ q) . (i + 1))) then A11: i >= 1 by FINSEQ_3:25; {} c= q . 1 by XBOOLE_1:2; then A12: rng f c= q . 1 by A1, A7, Th57; A13: i <= (len p) + 1 by A6, A10, FINSEQ_3:25; percases ( i = 1 or i <> 1 ) ; supposeA14: i = 1 ; ::_thesis: (<*f*> ^ p) . i in Funcs (((<*(dom f)*> ^ q) . i),((<*(dom f)*> ^ q) . (i + 1))) then A15: ( (<*(dom f)*> ^ q) . i = dom f & (<*f*> ^ p) . i = f ) by FINSEQ_1:41; (<*(dom f)*> ^ q) . (i + 1) = q . 1 by A4, A9, A14, FINSEQ_1:def_7; hence (<*f*> ^ p) . i in Funcs (((<*(dom f)*> ^ q) . i),((<*(dom f)*> ^ q) . (i + 1))) by A12, A15, FUNCT_2:def_2; ::_thesis: verum end; suppose i <> 1 ; ::_thesis: (<*f*> ^ p) . i in Funcs (((<*(dom f)*> ^ q) . i),((<*(dom f)*> ^ q) . (i + 1))) then i > 1 by A11, XXREAL_0:1; then i >= 1 + 1 by NAT_1:13; then consider j being Nat such that A16: i = (1 + 1) + j by NAT_1:10; A17: i = (j + 1) + 1 by A16; then ( j + 1 >= 1 & j + 1 <= len p ) by A13, NAT_1:11, XREAL_1:6; then A18: j + 1 in dom p by FINSEQ_3:25; then A19: p . (j + 1) = (<*f*> ^ p) . i by A5, A17, FINSEQ_1:def_7; A20: (j + 1) + 1 in dom q by A2, A18, Th22; A21: p . (j + 1) in Funcs ((q . (j + 1)),(q . ((j + 1) + 1))) by A3, A18; j + 1 in dom q by A2, A18, Th22; then (<*(dom f)*> ^ q) . i = q . (j + 1) by A4, A16, A21, FINSEQ_1:def_7; hence (<*f*> ^ p) . i in Funcs (((<*(dom f)*> ^ q) . i),((<*(dom f)*> ^ q) . (i + 1))) by A4, A16, A21, A20, A19, FINSEQ_1:def_7; ::_thesis: verum end; end; end; hence <*f*> ^ p is FuncSequence ; ::_thesis: verum end; theorem :: FUNCT_7:64 for p being FuncSequence for f being Function st lastrng p c= dom f holds p ^ <*f*> is FuncSequence proof let p be FuncSequence; ::_thesis: for f being Function st lastrng p c= dom f holds p ^ <*f*> is FuncSequence let f be Function; ::_thesis: ( lastrng p c= dom f implies p ^ <*f*> is FuncSequence ) assume A1: lastrng p c= dom f ; ::_thesis: p ^ <*f*> is FuncSequence consider q being FinSequence such that A2: len q = (len p) + 1 and A3: for i being Element of NAT st i in dom p holds p . i in Funcs ((q . i),(q . (i + 1))) by Def8; consider q9 being FinSequence, x being set such that A4: q = q9 ^ <*x*> by A2, CARD_1:27, FINSEQ_1:46; A5: now__::_thesis:_(_len_p_in_dom_p_implies_p_._(len_p)_in_Funcs_((q_._(len_p)),(dom_f))_) assume A6: len p in dom p ; ::_thesis: p . (len p) in Funcs ((q . (len p)),(dom f)) then p . (len p) in Funcs ((q . (len p)),(q . ((len p) + 1))) by A3; then consider g being Function such that A7: p . (len p) = g and A8: dom g = q . (len p) and rng g c= q . ((len p) + 1) by FUNCT_2:def_2; lastrng p = rng g by A6, A7, Def7, RELAT_1:38; hence p . (len p) in Funcs ((q . (len p)),(dom f)) by A1, A7, A8, FUNCT_2:def_2; ::_thesis: verum end; A9: <*(dom f),(rng f)*> . 1 = dom f by FINSEQ_1:44; A10: <*(dom f),(rng f)*> . 2 = rng f by FINSEQ_1:44; len <*f*> = 1 by FINSEQ_1:40; then A11: len (p ^ <*f*>) = (len p) + 1 by FINSEQ_1:22; set r = q9 ^ <*(dom f),(rng f)*>; len <*(dom f),(rng f)*> = 2 by FINSEQ_1:44; then A12: len (q9 ^ <*(dom f),(rng f)*>) = (len q9) + (1 + 1) by FINSEQ_1:22; A13: dom <*(dom f),(rng f)*> = Seg 2 by FINSEQ_1:89; then A14: 1 in dom <*(dom f),(rng f)*> by FINSEQ_1:2, TARSKI:def_2; len <*x*> = 1 by FINSEQ_1:40; then A15: len q = (len q9) + 1 by A4, FINSEQ_1:22; A16: 2 in dom <*(dom f),(rng f)*> by A13, FINSEQ_1:2, TARSKI:def_2; p ^ <*f*> is FuncSeq-like proof take q9 ^ <*(dom f),(rng f)*> ; :: according to FUNCT_7:def_8 ::_thesis: ( len (q9 ^ <*(dom f),(rng f)*>) = (len (p ^ <*f*>)) + 1 & ( for i being Element of NAT st i in dom (p ^ <*f*>) holds (p ^ <*f*>) . i in Funcs (((q9 ^ <*(dom f),(rng f)*>) . i),((q9 ^ <*(dom f),(rng f)*>) . (i + 1))) ) ) thus len (q9 ^ <*(dom f),(rng f)*>) = (len (p ^ <*f*>)) + 1 by A2, A15, A11, A12; ::_thesis: for i being Element of NAT st i in dom (p ^ <*f*>) holds (p ^ <*f*>) . i in Funcs (((q9 ^ <*(dom f),(rng f)*>) . i),((q9 ^ <*(dom f),(rng f)*>) . (i + 1))) let i be Element of NAT ; ::_thesis: ( i in dom (p ^ <*f*>) implies (p ^ <*f*>) . i in Funcs (((q9 ^ <*(dom f),(rng f)*>) . i),((q9 ^ <*(dom f),(rng f)*>) . (i + 1))) ) assume A17: i in dom (p ^ <*f*>) ; ::_thesis: (p ^ <*f*>) . i in Funcs (((q9 ^ <*(dom f),(rng f)*>) . i),((q9 ^ <*(dom f),(rng f)*>) . (i + 1))) then A18: i >= 1 by FINSEQ_3:25; i <= (len p) + 1 by A11, A17, FINSEQ_3:25; then A19: ( i = (len p) + 1 or len p >= i ) by NAT_1:8; percases ( i = (len p) + 1 or i = len p or i < len p ) by A19, XXREAL_0:1; supposeA20: i = (len p) + 1 ; ::_thesis: (p ^ <*f*>) . i in Funcs (((q9 ^ <*(dom f),(rng f)*>) . i),((q9 ^ <*(dom f),(rng f)*>) . (i + 1))) then A21: ( (q9 ^ <*(dom f),(rng f)*>) . i = dom f & (p ^ <*f*>) . i = f ) by A2, A15, A14, A9, FINSEQ_1:42, FINSEQ_1:def_7; (q9 ^ <*(dom f),(rng f)*>) . (i + 1) = rng f by A2, A15, A12, A16, A10, A20, FINSEQ_1:def_7; hence (p ^ <*f*>) . i in Funcs (((q9 ^ <*(dom f),(rng f)*>) . i),((q9 ^ <*(dom f),(rng f)*>) . (i + 1))) by A21, FUNCT_2:def_2; ::_thesis: verum end; supposeA22: i = len p ; ::_thesis: (p ^ <*f*>) . i in Funcs (((q9 ^ <*(dom f),(rng f)*>) . i),((q9 ^ <*(dom f),(rng f)*>) . (i + 1))) then i in dom q9 by A2, A15, A18, FINSEQ_3:25; then A23: ( (q9 ^ <*(dom f),(rng f)*>) . i = q9 . i & q9 . i = q . i ) by A4, FINSEQ_1:def_7; ( len p in dom p & (q9 ^ <*(dom f),(rng f)*>) . (i + 1) = dom f ) by A2, A15, A14, A9, A18, A22, FINSEQ_1:def_7, FINSEQ_3:25; hence (p ^ <*f*>) . i in Funcs (((q9 ^ <*(dom f),(rng f)*>) . i),((q9 ^ <*(dom f),(rng f)*>) . (i + 1))) by A5, A22, A23, FINSEQ_1:def_7; ::_thesis: verum end; supposeA24: i < len p ; ::_thesis: (p ^ <*f*>) . i in Funcs (((q9 ^ <*(dom f),(rng f)*>) . i),((q9 ^ <*(dom f),(rng f)*>) . (i + 1))) then i in dom q9 by A2, A15, A18, FINSEQ_3:25; then A25: ( q . i = q9 . i & q9 . i = (q9 ^ <*(dom f),(rng f)*>) . i ) by A4, FINSEQ_1:def_7; A26: i + 1 >= 1 by NAT_1:11; i in dom p by A18, A24, FINSEQ_3:25; then A27: ( p . i in Funcs ((q . i),(q . (i + 1))) & p . i = (p ^ <*f*>) . i ) by A3, FINSEQ_1:def_7; i + 1 <= len p by A24, NAT_1:13; then A28: i + 1 in dom q9 by A2, A15, A26, FINSEQ_3:25; then q . (i + 1) = q9 . (i + 1) by A4, FINSEQ_1:def_7; hence (p ^ <*f*>) . i in Funcs (((q9 ^ <*(dom f),(rng f)*>) . i),((q9 ^ <*(dom f),(rng f)*>) . (i + 1))) by A28, A25, A27, FINSEQ_1:def_7; ::_thesis: verum end; end; end; hence p ^ <*f*> is FuncSequence ; ::_thesis: verum end; theorem :: FUNCT_7:65 for x, X being set for p being FuncSequence st x in firstdom p & x in X holds (apply (p,x)) . ((len p) + 1) = (compose (p,X)) . x proof let x, X be set ; ::_thesis: for p being FuncSequence st x in firstdom p & x in X holds (apply (p,x)) . ((len p) + 1) = (compose (p,X)) . x defpred S1[ Function-yielding FinSequence] means ( \$1 is FuncSequence & x in firstdom \$1 & x in X implies (apply (\$1,x)) . ((len \$1) + 1) = (compose (\$1,X)) . x ); A1: for p being Function-yielding FinSequence st S1[p] holds for f being Function holds S1[p ^ <*f*>] proof A2: dom (id X) = X ; let p be Function-yielding FinSequence; ::_thesis: ( S1[p] implies for f being Function holds S1[p ^ <*f*>] ) assume A3: ( p is FuncSequence & x in firstdom p & x in X implies (apply (p,x)) . ((len p) + 1) = (compose (p,X)) . x ) ; ::_thesis: for f being Function holds S1[p ^ <*f*>] let f be Function; ::_thesis: S1[p ^ <*f*>] assume that A4: p ^ <*f*> is FuncSequence and A5: x in firstdom (p ^ <*f*>) and A6: x in X ; ::_thesis: (apply ((p ^ <*f*>),x)) . ((len (p ^ <*f*>)) + 1) = (compose ((p ^ <*f*>),X)) . x A7: p is FuncSequence by A4, Th60; (id X) . x = x by A6, FUNCT_1:17; then A8: (f * (id X)) . x = f . x by A6, A2, FUNCT_1:13; A9: len <*f*> = 1 by FINSEQ_1:40; A10: compose ((p ^ <*f*>),X) = f * (compose (p,X)) by Th41; A11: ( apply (<*f*>,x) = <*x,(f . x)*> & compose (<*f*>,X) = f * (id X) ) by Th45, Th47; A12: apply ((p ^ <*f*>),x) = (apply (p,x)) ^ <*(f . ((apply (p,x)) . ((len p) + 1)))*> by Th42; percases ( p = {} or p <> {} ) ; suppose p = {} ; ::_thesis: (apply ((p ^ <*f*>),x)) . ((len (p ^ <*f*>)) + 1) = (compose ((p ^ <*f*>),X)) . x then p ^ <*f*> = <*f*> by FINSEQ_1:34; hence (apply ((p ^ <*f*>),x)) . ((len (p ^ <*f*>)) + 1) = (compose ((p ^ <*f*>),X)) . x by A9, A11, A8, FINSEQ_1:44; ::_thesis: verum end; supposeA13: p <> {} ; ::_thesis: (apply ((p ^ <*f*>),x)) . ((len (p ^ <*f*>)) + 1) = (compose ((p ^ <*f*>),X)) . x then A14: dom (compose (p,X)) = (firstdom p) /\ X by A7, Th61; A15: firstdom (p ^ <*f*>) = proj1 ((p ^ <*f*>) . 1) by Def6; A16: firstdom p = proj1 (p . 1) by A13, Def6; len p >= 0 + 1 by A13, NAT_1:13; then A17: 1 in dom p by FINSEQ_3:25; then p . 1 = (p ^ <*f*>) . 1 by FINSEQ_1:def_7; then A18: x in (firstdom p) /\ X by A5, A6, A16, A15, XBOOLE_0:def_4; ( len (apply (p,x)) = (len p) + 1 & len (p ^ <*f*>) = (len p) + 1 ) by A9, Def5, FINSEQ_1:22; hence (apply ((p ^ <*f*>),x)) . ((len (p ^ <*f*>)) + 1) = f . ((compose (p,X)) . x) by A3, A4, A5, A6, A12, A16, A15, A17, Th60, FINSEQ_1:42, FINSEQ_1:def_7 .= (compose ((p ^ <*f*>),X)) . x by A10, A14, A18, FUNCT_1:13 ; ::_thesis: verum end; end; end; A19: S1[ {} ] by Def6; for p being Function-yielding FinSequence holds S1[p] from FUNCT_7:sch_5(A19, A1); hence for p being FuncSequence st x in firstdom p & x in X holds (apply (p,x)) . ((len p) + 1) = (compose (p,X)) . x ; ::_thesis: verum end; definition let X, Y be set ; assume X1: ( Y is empty implies X is empty ) ; mode FuncSequence of X,Y -> FuncSequence means :Def9: :: FUNCT_7:def 9 ( firstdom it = X & lastrng it c= Y ); existence ex b1 being FuncSequence st ( firstdom b1 = X & lastrng b1 c= Y ) proof set f = the Function of X,Y; take p = <* the Function of X,Y*>; ::_thesis: ( firstdom p = X & lastrng p c= Y ) A1: ( p ^ {} = p & {} ^ p = p ) by FINSEQ_1:34; ( dom the Function of X,Y = X & rng the Function of X,Y c= Y ) by X1, FUNCT_2:def_1; hence ( firstdom p = X & lastrng p c= Y ) by A1, Th58; ::_thesis: verum end; end; :: deftheorem Def9 defines FuncSequence FUNCT_7:def_9_:_ for X, Y being set st ( Y is empty implies X is empty ) holds for b3 being FuncSequence holds ( b3 is FuncSequence of X,Y iff ( firstdom b3 = X & lastrng b3 c= Y ) ); definition let Y be non empty set ; let X be set ; let F be FuncSequence of X,Y; :: original: compose redefine func compose (F,X) -> Function of X,Y; coherence compose (F,X) is Function of X,Y proof A1: firstdom F = X by Def9; now__::_thesis:_(_F_=_{}_implies_rng_(compose_(F,X))_=_{}_) assume F = {} ; ::_thesis: rng (compose (F,X)) = {} then ( X = {} & compose (F,X) = id X ) by A1, Def6, Th39; hence rng (compose (F,X)) = {} ; ::_thesis: verum end; then A2: rng (compose (F,X)) c= lastrng F by Th59, XBOOLE_1:2; lastrng F c= Y by Def9; then A3: rng (compose (F,X)) c= Y by A2, XBOOLE_1:1; dom (compose (F,X)) = X by A1, Th62; hence compose (F,X) is Function of X,Y by A3, FUNCT_2:def_1, RELSET_1:4; ::_thesis: verum end; end; definition let q be non empty non-empty FinSequence; mode FuncSequence of q -> FinSequence means :Def10: :: FUNCT_7:def 10 ( (len it) + 1 = len q & ( for i being Element of NAT st i in dom it holds it . i in Funcs ((q . i),(q . (i + 1))) ) ); existence ex b1 being FinSequence st ( (len b1) + 1 = len q & ( for i being Element of NAT st i in dom b1 holds b1 . i in Funcs ((q . i),(q . (i + 1))) ) ) proof defpred S1[ set , set ] means ex i being Element of NAT st ( i = \$1 & \$2 in Funcs ((q . i),(q . (i + 1))) ); consider n being Nat such that A1: len q = n + 1 by NAT_1:6; reconsider n = n as Element of NAT by ORDINAL1:def_12; A2: for x being set st x in Seg n holds ex y being set st S1[x,y] proof let x be set ; ::_thesis: ( x in Seg n implies ex y being set st S1[x,y] ) assume A3: x in Seg n ; ::_thesis: ex y being set st S1[x,y] then reconsider i = x as Element of NAT ; A4: i <= n by A3, FINSEQ_1:1; then ( i + 1 >= 1 & i + 1 <= n + 1 ) by NAT_1:11, XREAL_1:6; then A5: i + 1 in dom q by A1, FINSEQ_3:25; n <= n + 1 by NAT_1:11; then A6: i <= n + 1 by A4, XXREAL_0:2; i >= 1 by A3, FINSEQ_1:1; then i in dom q by A1, A6, FINSEQ_3:25; then reconsider X = q . i, Y = q . (i + 1) as non empty set by A5; set y = the Function of X,Y; take the Function of X,Y ; ::_thesis: S1[x, the Function of X,Y] take i ; ::_thesis: ( i = x & the Function of X,Y in Funcs ((q . i),(q . (i + 1))) ) thus ( i = x & the Function of X,Y in Funcs ((q . i),(q . (i + 1))) ) by FUNCT_2:8; ::_thesis: verum end; consider f being Function such that A7: dom f = Seg n and A8: for x being set st x in Seg n holds S1[x,f . x] from CLASSES1:sch_1(A2); reconsider f = f as FinSequence by A7, FINSEQ_1:def_2; take f ; ::_thesis: ( (len f) + 1 = len q & ( for i being Element of NAT st i in dom f holds f . i in Funcs ((q . i),(q . (i + 1))) ) ) thus (len f) + 1 = len q by A1, A7, FINSEQ_1:def_3; ::_thesis: for i being Element of NAT st i in dom f holds f . i in Funcs ((q . i),(q . (i + 1))) let i be Element of NAT ; ::_thesis: ( i in dom f implies f . i in Funcs ((q . i),(q . (i + 1))) ) assume i in dom f ; ::_thesis: f . i in Funcs ((q . i),(q . (i + 1))) then ex j being Element of NAT st ( j = i & f . i in Funcs ((q . j),(q . (j + 1))) ) by A7, A8; hence f . i in Funcs ((q . i),(q . (i + 1))) ; ::_thesis: verum end; end; :: deftheorem Def10 defines FuncSequence FUNCT_7:def_10_:_ for q being non empty non-empty FinSequence for b2 being FinSequence holds ( b2 is FuncSequence of q iff ( (len b2) + 1 = len q & ( for i being Element of NAT st i in dom b2 holds b2 . i in Funcs ((q . i),(q . (i + 1))) ) ) ); registration let q be non empty non-empty FinSequence; cluster -> non-empty FuncSeq-like for FuncSequence of q; coherence for b1 being FuncSequence of q holds ( b1 is FuncSeq-like & b1 is non-empty ) proof let p be FuncSequence of q; ::_thesis: ( p is FuncSeq-like & p is non-empty ) thus p is FuncSeq-like ::_thesis: p is non-empty proof take q ; :: according to FUNCT_7:def_8 ::_thesis: ( len q = (len p) + 1 & ( for i being Element of NAT st i in dom p holds p . i in Funcs ((q . i),(q . (i + 1))) ) ) thus ( len q = (len p) + 1 & ( for i being Element of NAT st i in dom p holds p . i in Funcs ((q . i),(q . (i + 1))) ) ) by Def10; ::_thesis: verum end; let x be set ; :: according to FUNCT_1:def_9 ::_thesis: ( not x in proj1 p or not p . x is empty ) assume A1: x in dom p ; ::_thesis: not p . x is empty then reconsider i = x as Element of NAT ; len q = (len p) + 1 by Def10; then ( i in dom q & i + 1 in dom q ) by A1, Th22; then reconsider X = q . i, Y = q . (i + 1) as non empty set ; p . i in Funcs (X,Y) by A1, Def10; then ex f being Function st ( p . x = f & dom f = X & rng f c= Y ) by FUNCT_2:def_2; hence not p . x is empty ; ::_thesis: verum end; end; theorem Th66: :: FUNCT_7:66 for q being non empty non-empty FinSequence for p being FuncSequence of q st p <> {} holds ( firstdom p = q . 1 & lastrng p c= q . (len q) ) proof let q be non empty non-empty FinSequence; ::_thesis: for p being FuncSequence of q st p <> {} holds ( firstdom p = q . 1 & lastrng p c= q . (len q) ) let p be FuncSequence of q; ::_thesis: ( p <> {} implies ( firstdom p = q . 1 & lastrng p c= q . (len q) ) ) assume A1: p <> {} ; ::_thesis: ( firstdom p = q . 1 & lastrng p c= q . (len q) ) then 1 in dom p by FINSEQ_5:6; then p . 1 in Funcs ((q . 1),(q . (1 + 1))) by Def10; then ex f being Function st ( p . 1 = f & dom f = q . 1 & rng f c= q . 2 ) by FUNCT_2:def_2; hence firstdom p = q . 1 by A1, Def6; ::_thesis: lastrng p c= q . (len q) len p in dom p by A1, FINSEQ_5:6; then p . (len p) in Funcs ((q . (len p)),(q . ((len p) + 1))) by Def10; then A2: ex g being Function st ( p . (len p) = g & dom g = q . (len p) & rng g c= q . ((len p) + 1) ) by FUNCT_2:def_2; (len p) + 1 = len q by Def10; hence lastrng p c= q . (len q) by A1, A2, Def7; ::_thesis: verum end; theorem :: FUNCT_7:67 for q being non empty non-empty FinSequence for p being FuncSequence of q holds ( dom (compose (p,(q . 1))) = q . 1 & rng (compose (p,(q . 1))) c= q . (len q) ) proof let q be non empty non-empty FinSequence; ::_thesis: for p being FuncSequence of q holds ( dom (compose (p,(q . 1))) = q . 1 & rng (compose (p,(q . 1))) c= q . (len q) ) let p be FuncSequence of q; ::_thesis: ( dom (compose (p,(q . 1))) = q . 1 & rng (compose (p,(q . 1))) c= q . (len q) ) percases ( p = {} or p <> {} ) ; supposeA1: p = {} ; ::_thesis: ( dom (compose (p,(q . 1))) = q . 1 & rng (compose (p,(q . 1))) c= q . (len q) ) A2: len q = (len p) + 1 by Def10; ( compose (p,(q . 1)) = id (q . 1) & len p = 0 ) by A1, Th39; hence ( dom (compose (p,(q . 1))) = q . 1 & rng (compose (p,(q . 1))) c= q . (len q) ) by A2, RELAT_1:45; ::_thesis: verum end; supposeA3: p <> {} ; ::_thesis: ( dom (compose (p,(q . 1))) = q . 1 & rng (compose (p,(q . 1))) c= q . (len q) ) then A4: lastrng p c= q . (len q) by Th66; ( firstdom p = q . 1 & rng (compose (p,(q . 1))) c= lastrng p ) by A3, Th59, Th66; hence ( dom (compose (p,(q . 1))) = q . 1 & rng (compose (p,(q . 1))) c= q . (len q) ) by A4, Th62, XBOOLE_1:1; ::_thesis: verum end; end; end; registration let X be set ; let f be Function of NAT,(bool [:X,X:]); let n be Nat; clusterf . n -> Relation-like ; coherence f . n is Relation-like proof reconsider n = n as Element of NAT by ORDINAL1:def_12; f . n is Element of bool [:X,X:] ; hence f . n is Relation-like ; ::_thesis: verum end; end; Lm1: for X being set for f being Function of X,X holds rng f c= dom f proof let X be set ; ::_thesis: for f being Function of X,X holds rng f c= dom f let f be Function of X,X; ::_thesis: rng f c= dom f dom f = X by FUNCT_2:52; hence rng f c= dom f ; ::_thesis: verum end; Lm2: for f being Relation for n being Element of NAT for p1, p2 being Function of NAT,(bool [:(field f),(field f):]) st p1 . 0 = id (field f) & ( for k being Nat holds p1 . (k + 1) = f * (p1 . k) ) & p2 . 0 = id (field f) & ( for k being Nat holds p2 . (k + 1) = f * (p2 . k) ) holds p1 = p2 proof let f be Relation; ::_thesis: for n being Element of NAT for p1, p2 being Function of NAT,(bool [:(field f),(field f):]) st p1 . 0 = id (field f) & ( for k being Nat holds p1 . (k + 1) = f * (p1 . k) ) & p2 . 0 = id (field f) & ( for k being Nat holds p2 . (k + 1) = f * (p2 . k) ) holds p1 = p2 let n be Element of NAT ; ::_thesis: for p1, p2 being Function of NAT,(bool [:(field f),(field f):]) st p1 . 0 = id (field f) & ( for k being Nat holds p1 . (k + 1) = f * (p1 . k) ) & p2 . 0 = id (field f) & ( for k being Nat holds p2 . (k + 1) = f * (p2 . k) ) holds p1 = p2 let p1, p2 be Function of NAT,(bool [:(field f),(field f):]); ::_thesis: ( p1 . 0 = id (field f) & ( for k being Nat holds p1 . (k + 1) = f * (p1 . k) ) & p2 . 0 = id (field f) & ( for k being Nat holds p2 . (k + 1) = f * (p2 . k) ) implies p1 = p2 ) assume that A1: p1 . 0 = id (field f) and A2: for k being Nat holds p1 . (k + 1) = f * (p1 . k) and A3: p2 . 0 = id (field f) and A4: for k being Nat holds p2 . (k + 1) = f * (p2 . k) ; ::_thesis: p1 = p2 defpred S1[ Nat, Relation, set ] means \$3 = f * \$2; A5: for k being Nat holds S1[k,p1 . k,p1 . (k + 1)] by A2; set FX = bool [:(field f),(field f):]; reconsider ID = id (field f) as Element of bool [:(field f),(field f):] ; A6: p2 . 0 = ID by A3; A7: for k being Nat for x, y1, y2 being Element of bool [:(field f),(field f):] st S1[k,x,y1] & S1[k,x,y2] holds y1 = y2 ; A8: for k being Nat holds S1[k,p2 . k,p2 . (k + 1)] by A4; A9: p1 . 0 = ID by A1; p1 = p2 from NAT_1:sch_14(A9, A5, A6, A8, A7); hence p1 = p2 ; ::_thesis: verum end; definition let f be Relation; let n be Nat; func iter (f,n) -> Relation means :Def11: :: FUNCT_7:def 11 ex p being Function of NAT,(bool [:(field f),(field f):]) st ( it = p . n & p . 0 = id (field f) & ( for k being Nat holds p . (k + 1) = f * (p . k) ) ); existence ex b1 being Relation ex p being Function of NAT,(bool [:(field f),(field f):]) st ( b1 = p . n & p . 0 = id (field f) & ( for k being Nat holds p . (k + 1) = f * (p . k) ) ) proof reconsider n9 = n as Element of NAT by ORDINAL1:def_12; defpred S1[ Nat, Relation, set ] means \$3 = f * \$2; set FX = bool [:(field f),(field f):]; reconsider ID = id (field f) as Element of bool [:(field f),(field f):] ; A1: for n being Element of NAT for x being Element of bool [:(field f),(field f):] ex y being Element of bool [:(field f),(field f):] st S1[n,x,y] proof ( dom f c= field f & rng f c= field f ) by XBOOLE_1:7; then reconsider h = f as Relation of (field f),(field f) by RELSET_1:4; let n be Element of NAT ; ::_thesis: for x being Element of bool [:(field f),(field f):] ex y being Element of bool [:(field f),(field f):] st S1[n,x,y] let x be Element of bool [:(field f),(field f):]; ::_thesis: ex y being Element of bool [:(field f),(field f):] st S1[n,x,y] reconsider g = x as Relation of (field f),(field f) ; h * g is Element of bool [:(field f),(field f):] ; hence ex y being Element of bool [:(field f),(field f):] st S1[n,x,y] ; ::_thesis: verum end; consider p being Function of NAT,(bool [:(field f),(field f):]) such that A2: ( p . 0 = ID & ( for n being Element of NAT holds S1[n,p . n,p . (n + 1)] ) ) from RECDEF_1:sch_2(A1); A3: for n being Nat holds S1[n,p . n,p . (n + 1)] proof let n be Nat; ::_thesis: S1[n,p . n,p . (n + 1)] n in NAT by ORDINAL1:def_12; hence S1[n,p . n,p . (n + 1)] by A2; ::_thesis: verum end; p . n9 is Relation of (field f),(field f) ; hence ex b1 being Relation ex p being Function of NAT,(bool [:(field f),(field f):]) st ( b1 = p . n & p . 0 = id (field f) & ( for k being Nat holds p . (k + 1) = f * (p . k) ) ) by A2, A3; ::_thesis: verum end; uniqueness for b1, b2 being Relation st ex p being Function of NAT,(bool [:(field f),(field f):]) st ( b1 = p . n & p . 0 = id (field f) & ( for k being Nat holds p . (k + 1) = f * (p . k) ) ) & ex p being Function of NAT,(bool [:(field f),(field f):]) st ( b2 = p . n & p . 0 = id (field f) & ( for k being Nat holds p . (k + 1) = f * (p . k) ) ) holds b1 = b2 by Lm2; end; :: deftheorem Def11 defines iter FUNCT_7:def_11_:_ for f being Relation for n being Nat for b3 being Relation holds ( b3 = iter (f,n) iff ex p being Function of NAT,(bool [:(field f),(field f):]) st ( b3 = p . n & p . 0 = id (field f) & ( for k being Nat holds p . (k + 1) = f * (p . k) ) ) ); registration let f be Function; let n be Nat; cluster iter (f,n) -> Function-like ; coherence iter (f,n) is Function-like proof consider p being Function of NAT,(bool [:(field f),(field f):]) such that A1: ( p . n = iter (f,n) & p . 0 = id (field f) ) and A2: for k being Nat holds p . (k + 1) = f * (p . k) by Def11; defpred S1[ Nat] means p . f is Function; A3: S1[ 0 ] by A1; A4: for m being Nat st S1[m] holds S1[m + 1] proof let m be Nat; ::_thesis: ( S1[m] implies S1[m + 1] ) assume S1[m] ; ::_thesis: S1[m + 1] then reconsider g = p . m as Function ; p . (m + 1) = g * f by A2; hence S1[m + 1] ; ::_thesis: verum end; for m being Nat holds S1[m] from NAT_1:sch_2(A3, A4); hence iter (f,n) is Function-like by A1; ::_thesis: verum end; end; Lm3: for R being Relation holds ( (id (field R)) * R = R & R * (id (field R)) = R ) proof let R be Relation; ::_thesis: ( (id (field R)) * R = R & R * (id (field R)) = R ) ( dom R c= field R & rng R c= field R ) by XBOOLE_1:7; hence ( (id (field R)) * R = R & R * (id (field R)) = R ) by RELAT_1:51, RELAT_1:53; ::_thesis: verum end; theorem Th68: :: FUNCT_7:68 for R being Relation holds iter (R,0) = id (field R) proof let R be Relation; ::_thesis: iter (R,0) = id (field R) ex p being Function of NAT,(bool [:(field R),(field R):]) st ( iter (R,0) = p . 0 & p . 0 = id (field R) & ( for k being Nat holds p . (k + 1) = R * (p . k) ) ) by Def11; hence iter (R,0) = id (field R) ; ::_thesis: verum end; Lm4: for R being Relation st rng R c= dom R holds iter (R,0) = id (dom R) proof let R be Relation; ::_thesis: ( rng R c= dom R implies iter (R,0) = id (dom R) ) assume rng R c= dom R ; ::_thesis: iter (R,0) = id (dom R) then field R = dom R by XBOOLE_1:12; hence iter (R,0) = id (dom R) by Th68; ::_thesis: verum end; theorem Th69: :: FUNCT_7:69 for R being Relation for n being Nat holds iter (R,(n + 1)) = R * (iter (R,n)) proof let R be Relation; ::_thesis: for n being Nat holds iter (R,(n + 1)) = R * (iter (R,n)) let n be Nat; ::_thesis: iter (R,(n + 1)) = R * (iter (R,n)) consider p being Function of NAT,(bool [:(field R),(field R):]) such that A1: ( p . (n + 1) = iter (R,(n + 1)) & p . 0 = id (field R) ) and A2: for k being Nat holds p . (k + 1) = R * (p . k) by Def11; p . (n + 1) = R * (p . n) by A2; hence iter (R,(n + 1)) = R * (iter (R,n)) by A1, A2, Def11; ::_thesis: verum end; theorem Th70: :: FUNCT_7:70 for R being Relation holds iter (R,1) = R proof let R be Relation; ::_thesis: iter (R,1) = R thus iter (R,1) = iter (R,(0 + 1)) .= R * (iter (R,0)) by Th69 .= R * (id (field R)) by Th68 .= R by Lm3 ; ::_thesis: verum end; theorem Th71: :: FUNCT_7:71 for R being Relation for n being Nat holds iter (R,(n + 1)) = (iter (R,n)) * R proof let R be Relation; ::_thesis: for n being Nat holds iter (R,(n + 1)) = (iter (R,n)) * R let n be Nat; ::_thesis: iter (R,(n + 1)) = (iter (R,n)) * R defpred S1[ Nat] means iter (R,(\$1 + 1)) = (iter (R,\$1)) * R; A1: for k being Nat st S1[k] holds S1[k + 1] proof let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] ) assume A2: iter (R,(k + 1)) = (iter (R,k)) * R ; ::_thesis: S1[k + 1] thus (iter (R,(k + 1))) * R = (R * (iter (R,k))) * R by Th69 .= R * ((iter (R,k)) * R) by RELAT_1:36 .= iter (R,((k + 1) + 1)) by A2, Th69 ; ::_thesis: verum end; iter (R,(0 + 1)) = R by Th70 .= (id (field R)) * R by Lm3 .= (iter (R,0)) * R by Th68 ; then A3: S1[ 0 ] ; for k being Nat holds S1[k] from NAT_1:sch_2(A3, A1); hence iter (R,(n + 1)) = (iter (R,n)) * R ; ::_thesis: verum end; theorem Th72: :: FUNCT_7:72 for n being Element of NAT for R being Relation holds ( dom (iter (R,n)) c= field R & rng (iter (R,n)) c= field R ) proof let n be Element of NAT ; ::_thesis: for R being Relation holds ( dom (iter (R,n)) c= field R & rng (iter (R,n)) c= field R ) let R be Relation; ::_thesis: ( dom (iter (R,n)) c= field R & rng (iter (R,n)) c= field R ) defpred S1[ Element of NAT ] means ( dom (iter (R,\$1)) c= field R & rng (iter (R,\$1)) c= field R ); A1: for k being Element of NAT st S1[k] holds S1[k + 1] proof let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] ) iter (R,(k + 1)) = (iter (R,k)) * R by Th71; then A2: dom (iter (R,(k + 1))) c= dom (iter (R,k)) by RELAT_1:25; iter (R,(k + 1)) = R * (iter (R,k)) by Th69; then A3: rng (iter (R,(k + 1))) c= rng (iter (R,k)) by RELAT_1:26; assume ( dom (iter (R,k)) c= field R & rng (iter (R,k)) c= field R ) ; ::_thesis: S1[k + 1] hence S1[k + 1] by A2, A3, XBOOLE_1:1; ::_thesis: verum end; iter (R,0) = id (field R) by Th68; then A4: S1[ 0 ] by RELAT_1:45; for k being Element of NAT holds S1[k] from NAT_1:sch_1(A4, A1); hence ( dom (iter (R,n)) c= field R & rng (iter (R,n)) c= field R ) ; ::_thesis: verum end; theorem :: FUNCT_7:73 for n being Element of NAT for R being Relation st n <> 0 holds ( dom (iter (R,n)) c= dom R & rng (iter (R,n)) c= rng R ) proof let n be Element of NAT ; ::_thesis: for R being Relation st n <> 0 holds ( dom (iter (R,n)) c= dom R & rng (iter (R,n)) c= rng R ) let R be Relation; ::_thesis: ( n <> 0 implies ( dom (iter (R,n)) c= dom R & rng (iter (R,n)) c= rng R ) ) defpred S1[ Nat] means ( dom (iter (R,(\$1 + 1))) c= dom R & rng (iter (R,(\$1 + 1))) c= rng R ); assume n <> 0 ; ::_thesis: ( dom (iter (R,n)) c= dom R & rng (iter (R,n)) c= rng R ) then A1: ex k being Nat st n = k + 1 by NAT_1:6; A2: for k being Nat st S1[k] holds S1[k + 1] proof let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] ) assume that dom (iter (R,(k + 1))) c= dom R and rng (iter (R,(k + 1))) c= rng R ; ::_thesis: S1[k + 1] ( iter (R,((k + 1) + 1)) = R * (iter (R,(k + 1))) & iter (R,((k + 1) + 1)) = (iter (R,(k + 1))) * R ) by Th69, Th71; hence S1[k + 1] by RELAT_1:25, RELAT_1:26; ::_thesis: verum end; A3: S1[ 0 ] by Th70; for k being Nat holds S1[k] from NAT_1:sch_2(A3, A2); hence ( dom (iter (R,n)) c= dom R & rng (iter (R,n)) c= rng R ) by A1; ::_thesis: verum end; theorem Th74: :: FUNCT_7:74 for R being Relation for n being Nat st rng R c= dom R holds ( dom (iter (R,n)) = dom R & rng (iter (R,n)) c= dom R ) proof let R be Relation; ::_thesis: for n being Nat st rng R c= dom R holds ( dom (iter (R,n)) = dom R & rng (iter (R,n)) c= dom R ) let n be Nat; ::_thesis: ( rng R c= dom R implies ( dom (iter (R,n)) = dom R & rng (iter (R,n)) c= dom R ) ) defpred S1[ Nat] means ( dom (iter (R,\$1)) = dom R & rng (iter (R,\$1)) c= dom R ); A1: for k being Nat st S1[k] holds S1[k + 1] proof let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] ) assume A2: ( dom (iter (R,k)) = dom R & rng (iter (R,k)) c= dom R ) ; ::_thesis: S1[k + 1] iter (R,(k + 1)) = R * (iter (R,k)) by Th69; then A3: rng (iter (R,(k + 1))) c= rng (iter (R,k)) by RELAT_1:26; iter (R,(k + 1)) = (iter (R,k)) * R by Th71; hence S1[k + 1] by A2, A3, RELAT_1:27, XBOOLE_1:1; ::_thesis: verum end; assume rng R c= dom R ; ::_thesis: ( dom (iter (R,n)) = dom R & rng (iter (R,n)) c= dom R ) then iter (R,0) = id (dom R) by Lm4; then A4: S1[ 0 ] by RELAT_1:45; for k being Nat holds S1[k] from NAT_1:sch_2(A4, A1); hence ( dom (iter (R,n)) = dom R & rng (iter (R,n)) c= dom R ) ; ::_thesis: verum end; theorem Th75: :: FUNCT_7:75 for n being Element of NAT for R being Relation holds (id (field R)) * (iter (R,n)) = iter (R,n) proof let n be Element of NAT ; ::_thesis: for R being Relation holds (id (field R)) * (iter (R,n)) = iter (R,n) let R be Relation; ::_thesis: (id (field R)) * (iter (R,n)) = iter (R,n) dom (iter (R,n)) c= field R by Th72; hence (id (field R)) * (iter (R,n)) = iter (R,n) by RELAT_1:51; ::_thesis: verum end; theorem :: FUNCT_7:76 for n being Element of NAT for R being Relation holds (iter (R,n)) * (id (field R)) = iter (R,n) proof let n be Element of NAT ; ::_thesis: for R being Relation holds (iter (R,n)) * (id (field R)) = iter (R,n) let R be Relation; ::_thesis: (iter (R,n)) * (id (field R)) = iter (R,n) rng (iter (R,n)) c= field R by Th72; hence (iter (R,n)) * (id (field R)) = iter (R,n) by RELAT_1:53; ::_thesis: verum end; theorem Th77: :: FUNCT_7:77 for m, n being Element of NAT for R being Relation holds (iter (R,m)) * (iter (R,n)) = iter (R,(n + m)) proof let m, n be Element of NAT ; ::_thesis: for R being Relation holds (iter (R,m)) * (iter (R,n)) = iter (R,(n + m)) let R be Relation; ::_thesis: (iter (R,m)) * (iter (R,n)) = iter (R,(n + m)) defpred S1[ Element of NAT ] means (iter (R,\$1)) * (iter (R,n)) = iter (R,(n + \$1)); A1: for k being Element of NAT st S1[k] holds S1[k + 1] proof let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] ) assume A2: (iter (R,k)) * (iter (R,n)) = iter (R,(n + k)) ; ::_thesis: S1[k + 1] thus (iter (R,(k + 1))) * (iter (R,n)) = (R * (iter (R,k))) * (iter (R,n)) by Th69 .= R * ((iter (R,k)) * (iter (R,n))) by RELAT_1:36 .= iter (R,((n + k) + 1)) by A2, Th69 .= iter (R,(n + (k + 1))) ; ::_thesis: verum end; (iter (R,0)) * (iter (R,n)) = (id (field R)) * (iter (R,n)) by Th68 .= iter (R,(n + 0)) by Th75 ; then A3: S1[ 0 ] ; for k being Element of NAT holds S1[k] from NAT_1:sch_1(A3, A1); hence (iter (R,m)) * (iter (R,n)) = iter (R,(n + m)) ; ::_thesis: verum end; Lm5: for m, k being Element of NAT for R being Relation st iter ((iter (R,m)),k) = iter (R,(m * k)) holds iter ((iter (R,m)),(k + 1)) = iter (R,(m * (k + 1))) proof let m, k be Element of NAT ; ::_thesis: for R being Relation st iter ((iter (R,m)),k) = iter (R,(m * k)) holds iter ((iter (R,m)),(k + 1)) = iter (R,(m * (k + 1))) let R be Relation; ::_thesis: ( iter ((iter (R,m)),k) = iter (R,(m * k)) implies iter ((iter (R,m)),(k + 1)) = iter (R,(m * (k + 1))) ) assume A1: iter ((iter (R,m)),k) = iter (R,(m * k)) ; ::_thesis: iter ((iter (R,m)),(k + 1)) = iter (R,(m * (k + 1))) thus iter ((iter (R,m)),(k + 1)) = (iter (R,m)) * (iter ((iter (R,m)),k)) by Th69 .= iter (R,((m * k) + (m * 1))) by A1, Th77 .= iter (R,(m * (k + 1))) ; ::_thesis: verum end; theorem :: FUNCT_7:78 for n, m being Element of NAT for R being Relation st n <> 0 holds iter ((iter (R,m)),n) = iter (R,(m * n)) proof let n, m be Element of NAT ; ::_thesis: for R being Relation st n <> 0 holds iter ((iter (R,m)),n) = iter (R,(m * n)) let R be Relation; ::_thesis: ( n <> 0 implies iter ((iter (R,m)),n) = iter (R,(m * n)) ) defpred S1[ Element of NAT ] means iter ((iter (R,m)),(\$1 + 1)) = iter (R,(m * (\$1 + 1))); A1: for k being Element of NAT st S1[k] holds S1[k + 1] by Lm5; A2: S1[ 0 ] by Th70; A3: for k being Element of NAT holds S1[k] from NAT_1:sch_1(A2, A1); assume n <> 0 ; ::_thesis: iter ((iter (R,m)),n) = iter (R,(m * n)) then consider k being Nat such that A4: n = k + 1 by NAT_1:6; reconsider k = k as Element of NAT by ORDINAL1:def_12; n = k + 1 by A4; hence iter ((iter (R,m)),n) = iter (R,(m * n)) by A3; ::_thesis: verum end; theorem Th79: :: FUNCT_7:79 for m, n being Element of NAT for R being Relation st rng R c= dom R holds iter ((iter (R,m)),n) = iter (R,(m * n)) proof let m, n be Element of NAT ; ::_thesis: for R being Relation st rng R c= dom R holds iter ((iter (R,m)),n) = iter (R,(m * n)) let R be Relation; ::_thesis: ( rng R c= dom R implies iter ((iter (R,m)),n) = iter (R,(m * n)) ) defpred S1[ Element of NAT ] means iter ((iter (R,m)),\$1) = iter (R,(m * \$1)); assume A1: rng R c= dom R ; ::_thesis: iter ((iter (R,m)),n) = iter (R,(m * n)) then dom (iter (R,m)) = dom R by Th74; then field (iter (R,m)) = dom R by A1, Th74, XBOOLE_1:12; then iter ((iter (R,m)),0) = id (dom R) by Th68 .= id (field R) by A1, XBOOLE_1:12 .= iter (R,(m * 0)) by Th68 ; then A2: S1[ 0 ] ; A3: for k being Element of NAT st S1[k] holds S1[k + 1] by Lm5; for k being Element of NAT holds S1[k] from NAT_1:sch_1(A2, A3); hence iter ((iter (R,m)),n) = iter (R,(m * n)) ; ::_thesis: verum end; theorem :: FUNCT_7:80 for n being Element of NAT holds iter ({},n) = {} proof let n be Element of NAT ; ::_thesis: iter ({},n) = {} defpred S1[ Element of NAT ] means iter ({},\$1) = {} ; A1: for k being Element of NAT st S1[k] holds S1[k + 1] proof let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] ) assume iter ({},k) = {} ; ::_thesis: S1[k + 1] thus iter ({},(k + 1)) = (iter ({},k)) * {} by Th69 .= {} ; ::_thesis: verum end; iter ({},0) = id (field {}) by Th68 .= {} ; then A2: S1[ 0 ] ; for k being Element of NAT holds S1[k] from NAT_1:sch_1(A2, A1); hence iter ({},n) = {} ; ::_thesis: verum end; theorem :: FUNCT_7:81 for X being set for n being Element of NAT holds iter ((id X),n) = id X proof let X be set ; ::_thesis: for n being Element of NAT holds iter ((id X),n) = id X let n be Element of NAT ; ::_thesis: iter ((id X),n) = id X defpred S1[ Element of NAT ] means iter ((id X),\$1) = id X; A1: for k being Element of NAT st S1[k] holds S1[k + 1] proof let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] ) assume A2: S1[k] ; ::_thesis: S1[k + 1] thus iter ((id X),(k + 1)) = (iter ((id X),k)) * (id X) by Th69 .= id X by A2, FUNCT_2:17 ; ::_thesis: verum end; id (field (id X)) = id X ; then A3: S1[ 0 ] by Th68; for k being Element of NAT holds S1[k] from NAT_1:sch_1(A3, A1); hence iter ((id X),n) = id X ; ::_thesis: verum end; theorem :: FUNCT_7:82 for R being Relation st rng R misses dom R holds iter (R,2) = {} proof let R be Relation; ::_thesis: ( rng R misses dom R implies iter (R,2) = {} ) assume A1: rng R misses dom R ; ::_thesis: iter (R,2) = {} thus iter (R,2) = iter (R,(1 + 1)) .= (iter (R,1)) * R by Th71 .= R * R by Th70 .= {} by A1, RELAT_1:44 ; ::_thesis: verum end; theorem :: FUNCT_7:83 for X being set for n being Nat for f being Function of X,X holds iter (f,n) is Function of X,X proof let X be set ; ::_thesis: for n being Nat for f being Function of X,X holds iter (f,n) is Function of X,X let n be Nat; ::_thesis: for f being Function of X,X holds iter (f,n) is Function of X,X let f be Function of X,X; ::_thesis: iter (f,n) is Function of X,X A1: ( X = {} implies X = {} ) ; then A2: dom f = X by FUNCT_2:def_1; A3: rng f c= X ; then ( dom (iter (f,n)) = X & rng (iter (f,n)) c= X ) by A2, Th74; then reconsider R = iter (f,n) as Relation of X,X by RELSET_1:4; dom R = X by A2, A3, Th74; hence iter (f,n) is Function of X,X by A1, FUNCT_2:def_1; ::_thesis: verum end; theorem :: FUNCT_7:84 for X being set for f being Function of X,X holds iter (f,0) = id X proof let X be set ; ::_thesis: for f being Function of X,X holds iter (f,0) = id X let f be Function of X,X; ::_thesis: iter (f,0) = id X ( iter (f,0) = id (field f) & field f = dom f ) by Lm1, Th68, XBOOLE_1:12; hence iter (f,0) = id X by FUNCT_2:52; ::_thesis: verum end; theorem :: FUNCT_7:85 for X being set for m, n being Element of NAT for f being Function of X,X holds iter ((iter (f,m)),n) = iter (f,(m * n)) proof let X be set ; ::_thesis: for m, n being Element of NAT for f being Function of X,X holds iter ((iter (f,m)),n) = iter (f,(m * n)) let m, n be Element of NAT ; ::_thesis: for f being Function of X,X holds iter ((iter (f,m)),n) = iter (f,(m * n)) let f be Function of X,X; ::_thesis: iter ((iter (f,m)),n) = iter (f,(m * n)) rng f c= dom f by Lm1; hence iter ((iter (f,m)),n) = iter (f,(m * n)) by Th79; ::_thesis: verum end; theorem :: FUNCT_7:86 for X being set for n being Element of NAT for f being PartFunc of X,X holds iter (f,n) is PartFunc of X,X proof let X be set ; ::_thesis: for n being Element of NAT for f being PartFunc of X,X holds iter (f,n) is PartFunc of X,X let n be Element of NAT ; ::_thesis: for f being PartFunc of X,X holds iter (f,n) is PartFunc of X,X let f be PartFunc of X,X; ::_thesis: iter (f,n) is PartFunc of X,X A1: field f = (dom f) \/ (rng f) ; rng (iter (f,n)) c= field f by Th72; then A2: rng (iter (f,n)) c= X by A1, XBOOLE_1:1; dom (iter (f,n)) c= field f by Th72; then dom (iter (f,n)) c= X by A1, XBOOLE_1:1; hence iter (f,n) is PartFunc of X,X by A2, RELSET_1:4; ::_thesis: verum end; theorem :: FUNCT_7:87 for a, X being set for f being Function for n being Element of NAT st n <> 0 & a in X & f = X --> a holds iter (f,n) = f proof let a, X be set ; ::_thesis: for f being Function for n being Element of NAT st n <> 0 & a in X & f = X --> a holds iter (f,n) = f let f be Function; ::_thesis: for n being Element of NAT st n <> 0 & a in X & f = X --> a holds iter (f,n) = f let n be Element of NAT ; ::_thesis: ( n <> 0 & a in X & f = X --> a implies iter (f,n) = f ) assume that A1: n <> 0 and A2: a in X and A3: f = X --> a ; ::_thesis: iter (f,n) = f defpred S1[ Element of NAT ] means iter (f,(\$1 + 1)) = f; A4: now__::_thesis:_for_k_being_Element_of_NAT_st_S1[k]_holds_ S1[k_+_1] A5: dom f = X by A3, FUNCOP_1:13; let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] ) assume A6: S1[k] ; ::_thesis: S1[k + 1] A7: now__::_thesis:_for_x_being_set_st_x_in_dom_f_holds_ (iter_(f,((k_+_1)_+_1)))_._x_=_f_._x let x be set ; ::_thesis: ( x in dom f implies (iter (f,((k + 1) + 1))) . x = f . x ) assume A8: x in dom f ; ::_thesis: (iter (f,((k + 1) + 1))) . x = f . x then A9: f . x = a by A3, A5, FUNCOP_1:7; thus (iter (f,((k + 1) + 1))) . x = (f * f) . x by A6, Th71 .= f . (f . x) by A8, FUNCT_1:13 .= f . x by A2, A3, A9, FUNCOP_1:7 ; ::_thesis: verum end; rng f = {a} by A2, A3, FUNCOP_1:8; then rng f c= dom f by A2, A5, ZFMISC_1:31; then dom (iter (f,((k + 1) + 1))) = dom f by Th74; hence S1[k + 1] by A7, FUNCT_1:2; ::_thesis: verum end; A10: S1[ 0 ] by Th70; A11: for k being Element of NAT holds S1[k] from NAT_1:sch_1(A10, A4); consider k being Nat such that A12: n = k + 1 by A1, NAT_1:6; reconsider k = k as Element of NAT by ORDINAL1:def_12; n = k + 1 by A12; hence iter (f,n) = f by A11; ::_thesis: verum end; theorem :: FUNCT_7:88 for f being Function for n being Element of NAT holds iter (f,n) = compose ((n |-> f),(field f)) proof let f be Function; ::_thesis: for n being Element of NAT holds iter (f,n) = compose ((n |-> f),(field f)) defpred S1[ Element of NAT ] means iter (f,\$1) = compose ((\$1 |-> f),(field f)); A1: now__::_thesis:_for_n_being_Element_of_NAT_st_S1[n]_holds_ S1[n_+_1] let n be Element of NAT ; ::_thesis: ( S1[n] implies S1[n + 1] ) assume S1[n] ; ::_thesis: S1[n + 1] then iter (f,(n + 1)) = f * (compose ((n |-> f),(field f))) by Th71 .= compose (((n |-> f) ^ <*f*>),(field f)) by Th41 .= compose (((n + 1) |-> f),(field f)) by FINSEQ_2:60 ; hence S1[n + 1] ; ::_thesis: verum end; iter (f,0) = id (field f) by Th68 .= compose ({},(field f)) by Th39 .= compose ((0 |-> f),(field f)) ; then A2: S1[ 0 ] ; thus for n being Element of NAT holds S1[n] from NAT_1:sch_1(A2, A1); ::_thesis: verum end; begin theorem :: FUNCT_7:89 for f, g being Function for x, y being set st g c= f & not x in dom g holds g c= f +* (x,y) proof let f, g be Function; ::_thesis: for x, y being set st g c= f & not x in dom g holds g c= f +* (x,y) let x, y be set ; ::_thesis: ( g c= f & not x in dom g implies g c= f +* (x,y) ) assume that A1: g c= f and A2: not x in dom g ; ::_thesis: g c= f +* (x,y) A3: now__::_thesis:_for_z_being_set_st_z_in_dom_g_holds_ g_._z_=_(f_+*_(x,y))_._z let z be set ; ::_thesis: ( z in dom g implies g . z = (f +* (x,y)) . z ) assume A4: z in dom g ; ::_thesis: g . z = (f +* (x,y)) . z hence g . z = f . z by A1, GRFUNC_1:2 .= (f +* (x,y)) . z by A2, A4, Th32 ; ::_thesis: verum end; dom g c= dom f by A1, GRFUNC_1:2; then dom g c= dom (f +* (x,y)) by Th30; hence g c= f +* (x,y) by A3, GRFUNC_1:2; ::_thesis: verum end; theorem :: FUNCT_7:90 for f, g being Function for A being set st f | A = g | A & f,g equal_outside A holds f = g proof let f, g be Function; ::_thesis: for A being set st f | A = g | A & f,g equal_outside A holds f = g let A be set ; ::_thesis: ( f | A = g | A & f,g equal_outside A implies f = g ) assume A1: ( f | A = g | A & f,g equal_outside A ) ; ::_thesis: f = g thus f = f | ((dom f) \/ A) by RELAT_1:68, XBOOLE_1:7 .= f | (((dom f) \ A) \/ A) by XBOOLE_1:39 .= (f | ((dom f) \ A)) \/ (f | A) by RELAT_1:78 .= (g | ((dom g) \ A)) \/ (g | A) by A1, Def2 .= g | (((dom g) \ A) \/ A) by RELAT_1:78 .= g | ((dom g) \/ A) by XBOOLE_1:39 .= g by RELAT_1:68, XBOOLE_1:7 ; ::_thesis: verum end; theorem :: FUNCT_7:91 for f being Function for a, b, A being set st a in A holds f,f +* (a,b) equal_outside A proof let f be Function; ::_thesis: for a, b, A being set st a in A holds f,f +* (a,b) equal_outside A let a, b, A be set ; ::_thesis: ( a in A implies f,f +* (a,b) equal_outside A ) percases ( a in dom f or not a in dom f ) ; supposeA1: a in dom f ; ::_thesis: ( a in A implies f,f +* (a,b) equal_outside A ) assume a in A ; ::_thesis: f,f +* (a,b) equal_outside A then {a} c= A by ZFMISC_1:31; then A2: dom (a .--> b) c= A by FUNCOP_1:13; f +* (a,b) = f +* (a .--> b) by A1, Def3; hence f,f +* (a,b) equal_outside A by A2, Th29; ::_thesis: verum end; suppose not a in dom f ; ::_thesis: ( a in A implies f,f +* (a,b) equal_outside A ) then f +* (a,b) = f by Def3; hence ( a in A implies f,f +* (a,b) equal_outside A ) by Th25; ::_thesis: verum end; end; end; theorem Th92: :: FUNCT_7:92 for f being Function for a, b, A being set holds ( a in A or (f +* (a,b)) | A = f | A ) proof let f be Function; ::_thesis: for a, b, A being set holds ( a in A or (f +* (a,b)) | A = f | A ) let a, b, A be set ; ::_thesis: ( a in A or (f +* (a,b)) | A = f | A ) percases ( a in dom f or not a in dom f ) ; supposeA1: a in dom f ; ::_thesis: ( a in A or (f +* (a,b)) | A = f | A ) assume not a in A ; ::_thesis: (f +* (a,b)) | A = f | A then {a} misses A by ZFMISC_1:50; then A2: dom (a .--> b) misses A by FUNCOP_1:13; thus (f +* (a,b)) | A = (f +* (a .--> b)) | A by A1, Def3 .= f | A by A2, FUNCT_4:72 ; ::_thesis: verum end; suppose not a in dom f ; ::_thesis: ( a in A or (f +* (a,b)) | A = f | A ) hence ( a in A or (f +* (a,b)) | A = f | A ) by Def3; ::_thesis: verum end; end; end; theorem :: FUNCT_7:93 for f, g being Function for a, b, A being set st f | A = g | A holds (f +* (a,b)) | A = (g +* (a,b)) | A proof let f, g be Function; ::_thesis: for a, b, A being set st f | A = g | A holds (f +* (a,b)) | A = (g +* (a,b)) | A let a, b, A be set ; ::_thesis: ( f | A = g | A implies (f +* (a,b)) | A = (g +* (a,b)) | A ) assume A1: f | A = g | A ; ::_thesis: (f +* (a,b)) | A = (g +* (a,b)) | A percases ( ( a in A & a in dom g ) or ( a in A & not a in dom g ) or not a in A ) ; supposethat A2: a in A and A3: a in dom g ; ::_thesis: (f +* (a,b)) | A = (g +* (a,b)) | A now__::_thesis:_a_in_dom_f assume not a in dom f ; ::_thesis: contradiction then not a in (dom f) /\ A by XBOOLE_0:def_4; then not a in dom (g | A) by A1, RELAT_1:61; then not a in (dom g) /\ A by RELAT_1:61; hence contradiction by A2, A3, XBOOLE_0:def_4; ::_thesis: verum end; hence (f +* (a,b)) | A = (f +* (a .--> b)) | A by Def3 .= (g | A) +* ((a .--> b) | A) by A1, FUNCT_4:71 .= (g +* (a .--> b)) | A by FUNCT_4:71 .= (g +* (a,b)) | A by A3, Def3 ; ::_thesis: verum end; supposethat A4: a in A and A5: not a in dom g ; ::_thesis: (f +* (a,b)) | A = (g +* (a,b)) | A now__::_thesis:_not_a_in_dom_f assume a in dom f ; ::_thesis: contradiction then a in (dom f) /\ A by A4, XBOOLE_0:def_4; then a in dom (g | A) by A1, RELAT_1:61; then a in (dom g) /\ A by RELAT_1:61; hence contradiction by A5, XBOOLE_0:def_4; ::_thesis: verum end; hence (f +* (a,b)) | A = g | A by A1, Def3 .= (g +* (a,b)) | A by A5, Def3 ; ::_thesis: verum end; supposeA6: not a in A ; ::_thesis: (f +* (a,b)) | A = (g +* (a,b)) | A hence (f +* (a,b)) | A = f | A by Th92 .= (g +* (a,b)) | A by A1, A6, Th92 ; ::_thesis: verum end; end; end; theorem Th94: :: FUNCT_7:94 for f being Function for a, b being set holds (f +* (a .--> b)) . a = b proof let f be Function; ::_thesis: for a, b being set holds (f +* (a .--> b)) . a = b let a, b be set ; ::_thesis: (f +* (a .--> b)) . a = b dom (a .--> b) = {a} by FUNCOP_1:13; then a in dom (a .--> b) by TARSKI:def_1; hence (f +* (a .--> b)) . a = (a .--> b) . a by FUNCT_4:13 .= b by FUNCOP_1:72 ; ::_thesis: verum end; theorem :: FUNCT_7:95 for a, b being set holds <*a*> +* (1,b) = <*b*> proof let a, b be set ; ::_thesis: <*a*> +* (1,b) = <*b*> A1: dom <*b*> = {1} by FINSEQ_1:2, FINSEQ_1:def_8; A2: dom <*a*> = {1} by FINSEQ_1:2, FINSEQ_1:def_8; then 1 in dom <*a*> by TARSKI:def_1; then A3: <*a*> +* (1,b) = <*a*> +* (1 .--> b) by Def3; A4: for x being set st x in {1} holds (<*a*> +* (1,b)) . x = <*b*> . x proof let x be set ; ::_thesis: ( x in {1} implies (<*a*> +* (1,b)) . x = <*b*> . x ) assume x in {1} ; ::_thesis: (<*a*> +* (1,b)) . x = <*b*> . x then A5: x = 1 by TARSKI:def_1; hence (<*a*> +* (1,b)) . x = b by A3, Th94 .= <*b*> . x by A5, FINSEQ_1:def_8 ; ::_thesis: verum end; dom (<*a*> +* (1,b)) = (dom <*a*>) \/ (dom (1 .--> b)) by A3, FUNCT_4:def_1 .= {1} \/ {1} by A2, FUNCOP_1:13 .= {1} ; hence <*a*> +* (1,b) = <*b*> by A1, A4, FUNCT_1:2; ::_thesis: verum end; theorem :: FUNCT_7:96 for f being Function for x being set st x in dom f holds f +* (x .--> (f . x)) = f proof let f be Function; ::_thesis: for x being set st x in dom f holds f +* (x .--> (f . x)) = f let x be set ; ::_thesis: ( x in dom f implies f +* (x .--> (f . x)) = f ) assume x in dom f ; ::_thesis: f +* (x .--> (f . x)) = f hence f +* (x .--> (f . x)) = f +* (x,(f . x)) by Def3 .= f by Th35 ; ::_thesis: verum end; theorem Th97: :: FUNCT_7:97 for w being FinSequence for r being set for i being Nat holds len (w +* (i,r)) = len w proof let w be FinSequence; ::_thesis: for r being set for i being Nat holds len (w +* (i,r)) = len w let r be set ; ::_thesis: for i being Nat holds len (w +* (i,r)) = len w let i be Nat; ::_thesis: len (w +* (i,r)) = len w dom (w +* (i,r)) = dom w by Th30; then Seg (len (w +* (i,r))) = dom w by FINSEQ_1:def_3 .= Seg (len w) by FINSEQ_1:def_3 ; hence len (w +* (i,r)) = len w by FINSEQ_1:6; ::_thesis: verum end; theorem :: FUNCT_7:98 for i being Nat for D being non empty set for w being FinSequence of D for r being Element of D st i in dom w holds w +* (i,r) = ((w | (i -' 1)) ^ <*r*>) ^ (w /^ i) proof let i be Nat; ::_thesis: for D being non empty set for w being FinSequence of D for r being Element of D st i in dom w holds w +* (i,r) = ((w | (i -' 1)) ^ <*r*>) ^ (w /^ i) let D be non empty set ; ::_thesis: for w being FinSequence of D for r being Element of D st i in dom w holds w +* (i,r) = ((w | (i -' 1)) ^ <*r*>) ^ (w /^ i) let w be FinSequence of D; ::_thesis: for r being Element of D st i in dom w holds w +* (i,r) = ((w | (i -' 1)) ^ <*r*>) ^ (w /^ i) let r be Element of D; ::_thesis: ( i in dom w implies w +* (i,r) = ((w | (i -' 1)) ^ <*r*>) ^ (w /^ i) ) assume A1: i in dom w ; ::_thesis: w +* (i,r) = ((w | (i -' 1)) ^ <*r*>) ^ (w /^ i) then A2: 1 <= i by FINSEQ_3:25; A3: i <= len w by A1, FINSEQ_3:25; A4: len (((w | (i -' 1)) ^ <*r*>) ^ (w /^ i)) = (len ((w | (i -' 1)) ^ <*r*>)) + (len (w /^ i)) by FINSEQ_1:22 .= ((len (w | (i -' 1))) + (len <*r*>)) + (len (w /^ i)) by FINSEQ_1:22 .= ((len (w | (i -' 1))) + 1) + (len (w /^ i)) by FINSEQ_1:39 .= ((i -' 1) + 1) + (len (w /^ i)) by A3, FINSEQ_1:59, NAT_D:44 .= ((i -' 1) + 1) + ((len w) - i) by A3, RFINSEQ:def_1 .= ((i - 1) + 1) + ((len w) - i) by A2, XREAL_1:233 ; for j being Nat st 1 <= j & j <= len (w +* (i,r)) holds (w +* (i,r)) . j = (((w | (i -' 1)) ^ <*r*>) ^ (w /^ i)) . j proof A5: len (w | (i -' 1)) = i -' 1 by A3, FINSEQ_1:59, NAT_D:44 .= i - 1 by A2, XREAL_1:233 ; let j be Nat; ::_thesis: ( 1 <= j & j <= len (w +* (i,r)) implies (w +* (i,r)) . j = (((w | (i -' 1)) ^ <*r*>) ^ (w /^ i)) . j ) assume that A6: 1 <= j and A7: j <= len (w +* (i,r)) ; ::_thesis: (w +* (i,r)) . j = (((w | (i -' 1)) ^ <*r*>) ^ (w /^ i)) . j A8: len ((w | (i -' 1)) ^ <*r*>) = (len (w | (i -' 1))) + (len <*r*>) by FINSEQ_1:22 .= (len (w | (i -' 1))) + 1 by FINSEQ_1:39 .= (i -' 1) + 1 by A3, FINSEQ_1:59, NAT_D:44 .= (i - 1) + 1 by A2, XREAL_1:233 .= i ; A9: len (w +* (i,r)) = len w by Th97; now__::_thesis:_(_(_i_<_j_&_(w_+*_(i,r))_._j_=_(((w_|_(i_-'_1))_^_<*r*>)_^_(w_/^_i))_._j_)_or_(_j_=_i_&_(w_+*_(i,r))_._j_=_(((w_|_(i_-'_1))_^_<*r*>)_^_(w_/^_i))_._j_)_or_(_j_<_i_&_(w_+*_(i,r))_._j_=_(((w_|_(i_-'_1))_^_<*r*>)_^_(w_/^_i))_._j_)_) percases ( i < j or j = i or j < i ) by XXREAL_0:1; caseA10: i < j ; ::_thesis: (w +* (i,r)) . j = (((w | (i -' 1)) ^ <*r*>) ^ (w /^ i)) . j then i + 1 <= j by NAT_1:13; then A11: (i + 1) - i <= j - i by XREAL_1:9; then A12: 1 <= j -' i by NAT_D:39; A13: j - i <= (len w) - i by A7, A9, XREAL_1:9; A14: i <= len w by A1, FINSEQ_3:25; len (w /^ i) = (len w) -' i by RFINSEQ:29 .= (len w) - i by A14, XREAL_1:233 ; then j -' i <= len (w /^ i) by A11, A13, NAT_D:39; then A15: j -' i in dom (w /^ i) by A12, FINSEQ_3:25; j <= len (((w | (i -' 1)) ^ <*r*>) ^ (w /^ i)) by A4, A7, Th97; then (((w | (i -' 1)) ^ <*r*>) ^ (w /^ i)) . j = (w /^ i) . (j - (len ((w | (i -' 1)) ^ <*r*>))) by A8, A10, FINSEQ_1:24 .= (w /^ i) . (j -' i) by A8, A10, XREAL_1:233 .= w . ((j -' i) + i) by A14, A15, RFINSEQ:def_1 .= w . j by A10, XREAL_1:235 ; hence (w +* (i,r)) . j = (((w | (i -' 1)) ^ <*r*>) ^ (w /^ i)) . j by A10, Th32; ::_thesis: verum end; caseA16: j = i ; ::_thesis: (w +* (i,r)) . j = (((w | (i -' 1)) ^ <*r*>) ^ (w /^ i)) . j A17: i = (len (w | (i -' 1))) + 1 by A5; (((w | (i -' 1)) ^ <*r*>) ^ (w /^ i)) . j = ((w | (i -' 1)) ^ <*r*>) . i by A6, A8, A16, FINSEQ_1:64 .= r by A17, FINSEQ_1:42 ; hence (w +* (i,r)) . j = (((w | (i -' 1)) ^ <*r*>) ^ (w /^ i)) . j by A1, A16, Th31; ::_thesis: verum end; caseA18: j < i ; ::_thesis: (w +* (i,r)) . j = (((w | (i -' 1)) ^ <*r*>) ^ (w /^ i)) . j then j + 1 <= i by NAT_1:13; then A19: (j + 1) - 1 <= i - 1 by XREAL_1:9; then A20: j <= i -' 1 by A2, XREAL_1:233; (((w | (i -' 1)) ^ <*r*>) ^ (w /^ i)) . j = ((w | (i -' 1)) ^ <*r*>) . j by A6, A8, A18, FINSEQ_1:64 .= (w | (i -' 1)) . j by A6, A5, A19, FINSEQ_1:64 .= w . j by A20, FINSEQ_3:112 ; hence (w +* (i,r)) . j = (((w | (i -' 1)) ^ <*r*>) ^ (w /^ i)) . j by A18, Th32; ::_thesis: verum end; end; end; hence (w +* (i,r)) . j = (((w | (i -' 1)) ^ <*r*>) ^ (w /^ i)) . j ; ::_thesis: verum end; hence w +* (i,r) = ((w | (i -' 1)) ^ <*r*>) ^ (w /^ i) by A4, Th97, FINSEQ_1:14; ::_thesis: verum end; definition let F be Function; let x, y be set ; func Swap (F,x,y) -> set equals :Def12: :: FUNCT_7:def 12 (F +* (x,(F . y))) +* (y,(F . x)) if ( x in dom F & y in dom F ) otherwise F; correctness coherence ( ( x in dom F & y in dom F implies (F +* (x,(F . y))) +* (y,(F . x)) is set ) & ( ( not x in dom F or not y in dom F ) implies F is set ) ); consistency for b1 being set holds verum; ; end; :: deftheorem Def12 defines Swap FUNCT_7:def_12_:_ for F being Function for x, y being set holds ( ( x in dom F & y in dom F implies Swap (F,x,y) = (F +* (x,(F . y))) +* (y,(F . x)) ) & ( ( not x in dom F or not y in dom F ) implies Swap (F,x,y) = F ) ); registration let F be Function; let x, y be set ; cluster Swap (F,x,y) -> Relation-like Function-like ; coherence ( Swap (F,x,y) is Relation-like & Swap (F,x,y) is Function-like ) proof percases ( ( x in dom F & y in dom F ) or not x in dom F or not y in dom F ) ; suppose ( x in dom F & y in dom F ) ; ::_thesis: ( Swap (F,x,y) is Relation-like & Swap (F,x,y) is Function-like ) then Swap (F,x,y) = (F +* (x,(F . y))) +* (y,(F . x)) by Def12; hence ( Swap (F,x,y) is Relation-like & Swap (F,x,y) is Function-like ) ; ::_thesis: verum end; suppose ( not x in dom F or not y in dom F ) ; ::_thesis: ( Swap (F,x,y) is Relation-like & Swap (F,x,y) is Function-like ) hence ( Swap (F,x,y) is Relation-like & Swap (F,x,y) is Function-like ) by Def12; ::_thesis: verum end; end; end; end; theorem Th99: :: FUNCT_7:99 for F being Function for x, y being set holds dom (Swap (F,x,y)) = dom F proof let F be Function; ::_thesis: for x, y being set holds dom (Swap (F,x,y)) = dom F let x, y be set ; ::_thesis: dom (Swap (F,x,y)) = dom F percases ( ( x in dom F & y in dom F ) or not x in dom F or not y in dom F ) ; suppose ( x in dom F & y in dom F ) ; ::_thesis: dom (Swap (F,x,y)) = dom F hence dom (Swap (F,x,y)) = dom ((F +* (x,(F . y))) +* (y,(F . x))) by Def12 .= dom (F +* (x,(F . y))) by Th30 .= dom F by Th30 ; ::_thesis: verum end; suppose ( not x in dom F or not y in dom F ) ; ::_thesis: dom (Swap (F,x,y)) = dom F hence dom (Swap (F,x,y)) = dom F by Def12; ::_thesis: verum end; end; end; theorem Th100: :: FUNCT_7:100 for F being Function for x, y being set holds rng (F +* (x,y)) c= (rng F) \/ {y} proof let F be Function; ::_thesis: for x, y being set holds rng (F +* (x,y)) c= (rng F) \/ {y} let x, y be set ; ::_thesis: rng (F +* (x,y)) c= (rng F) \/ {y} A1: rng (x .--> y) = {y} by FUNCOP_1:8; percases ( x in dom F or not x in dom F ) ; suppose x in dom F ; ::_thesis: rng (F +* (x,y)) c= (rng F) \/ {y} then F +* (x,y) = F +* (x .--> y) by Def3; hence rng (F +* (x,y)) c= (rng F) \/ {y} by A1, FUNCT_4:17; ::_thesis: verum end; suppose not x in dom F ; ::_thesis: rng (F +* (x,y)) c= (rng F) \/ {y} then F +* (x,y) = F by Def3; hence rng (F +* (x,y)) c= (rng F) \/ {y} by XBOOLE_1:7; ::_thesis: verum end; end; end; theorem Th101: :: FUNCT_7:101 for F being Function for x, y being set holds rng F c= (rng (F +* (x,y))) \/ {(F . x)} proof let F be Function; ::_thesis: for x, y being set holds rng F c= (rng (F +* (x,y))) \/ {(F . x)} let x, y be set ; ::_thesis: rng F c= (rng (F +* (x,y))) \/ {(F . x)} let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in rng F or z in (rng (F +* (x,y))) \/ {(F . x)} ) assume z in rng F ; ::_thesis: z in (rng (F +* (x,y))) \/ {(F . x)} then consider e being set such that A1: e in dom F and A2: z = F . e by FUNCT_1:def_3; A3: dom F = dom (F +* (x,y)) by Th30; percases ( e = x or e <> x ) ; suppose e = x ; ::_thesis: z in (rng (F +* (x,y))) \/ {(F . x)} then z in {(F . x)} by A2, TARSKI:def_1; hence z in (rng (F +* (x,y))) \/ {(F . x)} by XBOOLE_0:def_3; ::_thesis: verum end; suppose e <> x ; ::_thesis: z in (rng (F +* (x,y))) \/ {(F . x)} then (F +* (x,y)) . e = F . e by Th32; then z in rng (F +* (x,y)) by A1, A2, A3, FUNCT_1:3; hence z in (rng (F +* (x,y))) \/ {(F . x)} by XBOOLE_0:def_3; ::_thesis: verum end; end; end; theorem Th102: :: FUNCT_7:102 for F being Function for x, y being set st x in dom F holds y in rng (F +* (x,y)) proof let F be Function; ::_thesis: for x, y being set st x in dom F holds y in rng (F +* (x,y)) let x, y be set ; ::_thesis: ( x in dom F implies y in rng (F +* (x,y)) ) assume x in dom F ; ::_thesis: y in rng (F +* (x,y)) then ( x in dom (F +* (x,y)) & (F +* (x,y)) . x = y ) by Th30, Th31; hence y in rng (F +* (x,y)) by FUNCT_1:3; ::_thesis: verum end; theorem :: FUNCT_7:103 for F being Function for x, y being set holds rng (Swap (F,x,y)) = rng F proof let F be Function; ::_thesis: for x, y being set holds rng (Swap (F,x,y)) = rng F let x, y be set ; ::_thesis: rng (Swap (F,x,y)) = rng F percases ( ( x in dom F & y in dom F ) or not x in dom F or not y in dom F ) ; supposethat A1: x in dom F and A2: y in dom F ; ::_thesis: rng (Swap (F,x,y)) = rng F F . x in rng F by A1, FUNCT_1:3; then F . x in (rng F) \/ {(F . y)} by XBOOLE_0:def_3; then ((rng F) \/ {(F . y)}) \/ {(F . x)} = (rng F) \/ {(F . y)} by ZFMISC_1:40 .= rng F by A2, FUNCT_1:3, ZFMISC_1:40 ; then A3: (rng (F +* (x,(F . y)))) \/ {(F . x)} c= rng F by Th100, XBOOLE_1:9; A4: (F +* (x,(F . y))) . y = F . y proof percases ( x <> y or x = y ) ; suppose x <> y ; ::_thesis: (F +* (x,(F . y))) . y = F . y hence (F +* (x,(F . y))) . y = F . y by Th32; ::_thesis: verum end; suppose x = y ; ::_thesis: (F +* (x,(F . y))) . y = F . y hence (F +* (x,(F . y))) . y = F . y by A1, Th31; ::_thesis: verum end; end; end; A5: rng F c= (rng (F +* (x,(F . y)))) \/ {(F . x)} by Th101; A6: Swap (F,x,y) = (F +* (x,(F . y))) +* (y,(F . x)) by A1, A2, Def12; then rng (Swap (F,x,y)) c= (rng (F +* (x,(F . y)))) \/ {(F . x)} by Th100; then A7: rng (Swap (F,x,y)) c= rng F by A3, XBOOLE_1:1; A8: y in dom (F +* (x,(F . y))) by A2, Th30; A9: F . y in rng (Swap (F,x,y)) proof percases ( F . x = F . y or F . x <> F . y ) ; suppose F . x = F . y ; ::_thesis: F . y in rng (Swap (F,x,y)) hence F . y in rng (Swap (F,x,y)) by A6, A8, Th102; ::_thesis: verum end; supposeA10: F . x <> F . y ; ::_thesis: F . y in rng (Swap (F,x,y)) A11: dom (Swap (F,x,y)) = dom F by Th99; (Swap (F,x,y)) . x = (F +* (x,(F . y))) . x by A6, A10, Th32 .= F . y by A1, Th31 ; hence F . y in rng (Swap (F,x,y)) by A1, A11, FUNCT_1:3; ::_thesis: verum end; end; end; F . x in rng (Swap (F,x,y)) by A6, A8, Th102; then F . x in (rng (Swap (F,x,y))) \/ {(F . y)} by XBOOLE_0:def_3; then ((rng (Swap (F,x,y))) \/ {(F . y)}) \/ {(F . x)} = (rng (Swap (F,x,y))) \/ {(F . y)} by ZFMISC_1:40 .= rng (Swap (F,x,y)) by A9, ZFMISC_1:40 ; then (rng (F +* (x,(F . y)))) \/ {(F . x)} c= rng (Swap (F,x,y)) by A6, A4, Th101, XBOOLE_1:9; then rng F c= rng (Swap (F,x,y)) by A5, XBOOLE_1:1; hence rng (Swap (F,x,y)) = rng F by A7, XBOOLE_0:def_10; ::_thesis: verum end; suppose ( not x in dom F or not y in dom F ) ; ::_thesis: rng (Swap (F,x,y)) = rng F hence rng (Swap (F,x,y)) = rng F by Def12; ::_thesis: verum end; end; end; scheme :: FUNCT_7:sch 6 Sch6{ F1() -> set , F2() -> non empty set , F3( set ) -> set } : F1(), { F3(d) where d is Element of F2() : d in F1() } are_equipotent provided A1: F1() c= F2() and A2: for d1, d2 being Element of F2() st d1 in F1() & d2 in F1() & F3(d1) = F3(d2) holds d1 = d2 proof percases ( F1() <> {} or F1() = {} ) ; suppose F1() <> {} ; ::_thesis: F1(), { F3(d) where d is Element of F2() : d in F1() } are_equipotent then reconsider D = F1() as non empty set ; set X = { F3(d) where d is Element of D : d in F1() } ; set Y = { F3(d) where d is Element of F2() : d in F1() } ; A3: now__::_thesis:_for_x_being_set_holds_ (_(_x_in__{__F3(d)_where_d_is_Element_of_D_:_d_in_F1()__}__implies_x_in__{__F3(d)_where_d_is_Element_of_F2()_:_d_in_F1()__}__)_&_(_x_in__{__F3(d)_where_d_is_Element_of_F2()_:_d_in_F1()__}__implies_x_in__{__F3(d)_where_d_is_Element_of_D_:_d_in_F1()__}__)_) let x be set ; ::_thesis: ( ( x in { F3(d) where d is Element of D : d in F1() } implies x in { F3(d) where d is Element of F2() : d in F1() } ) & ( x in { F3(d) where d is Element of F2() : d in F1() } implies x in { F3(d) where d is Element of D : d in F1() } ) ) hereby ::_thesis: ( x in { F3(d) where d is Element of F2() : d in F1() } implies x in { F3(d) where d is Element of D : d in F1() } ) assume x in { F3(d) where d is Element of D : d in F1() } ; ::_thesis: x in { F3(d) where d is Element of F2() : d in F1() } then ex d being Element of D st ( F3(d) = x & d in F1() ) ; hence x in { F3(d) where d is Element of F2() : d in F1() } by A1; ::_thesis: verum end; hereby ::_thesis: verum assume x in { F3(d) where d is Element of F2() : d in F1() } ; ::_thesis: x in { F3(d) where d is Element of D : d in F1() } then ex d being Element of F2() st ( F3(d) = x & d in F1() ) ; hence x in { F3(d) where d is Element of D : d in F1() } ; ::_thesis: verum end; end; A4: now__::_thesis:_for_d1,_d2_being_Element_of_D_st_F3(d1)_=_F3(d2)_holds_ d1_=_d2 let d1, d2 be Element of D; ::_thesis: ( F3(d1) = F3(d2) implies d1 = d2 ) ( d1 in F1() & d2 in F1() ) ; then reconsider d = d1, dd = d2 as Element of F2() by A1; assume F3(d1) = F3(d2) ; ::_thesis: d1 = d2 then d = dd by A2; hence d1 = d2 ; ::_thesis: verum end; A5: F1() c= D ; F1(), { F3(d) where d is Element of D : d in F1() } are_equipotent from FUNCT_7:sch_4(A5, A4); hence F1(), { F3(d) where d is Element of F2() : d in F1() } are_equipotent by A3, TARSKI:1; ::_thesis: verum end; supposeA6: F1() = {} ; ::_thesis: F1(), { F3(d) where d is Element of F2() : d in F1() } are_equipotent now__::_thesis:_not__{__F3(d)_where_d_is_Element_of_F2()_:_d_in_F1()__}__<>_{} set a = the Element of { F3(d) where d is Element of F2() : d in F1() } ; assume { F3(d) where d is Element of F2() : d in F1() } <> {} ; ::_thesis: contradiction then the Element of { F3(d) where d is Element of F2() : d in F1() } in { F3(d) where d is Element of F2() : d in F1() } ; then ex d being Element of F2() st ( the Element of { F3(d) where d is Element of F2() : d in F1() } = F3(d) & d in F1() ) ; hence contradiction by A6; ::_thesis: verum end; hence F1(), { F3(d) where d is Element of F2() : d in F1() } are_equipotent by A6; ::_thesis: verum end; end; end; theorem :: FUNCT_7:104 for f, g, h being Function for A being set st f,g equal_outside A holds f +* h,g +* h equal_outside A proof let f, g, h be Function; ::_thesis: for A being set st f,g equal_outside A holds f +* h,g +* h equal_outside A let A be set ; ::_thesis: ( f,g equal_outside A implies f +* h,g +* h equal_outside A ) A1: dom ((f +* h) | ((dom (f +* h)) \ A)) = (dom (f +* h)) \ A by RELAT_1:156 .= ((dom f) \/ (dom h)) \ A by FUNCT_4:def_1 .= ((dom f) \ A) \/ ((dom h) \ A) by XBOOLE_1:42 ; assume f,g equal_outside A ; ::_thesis: f +* h,g +* h equal_outside A then A2: f | ((dom f) \ A) = g | ((dom g) \ A) by Def2; then A3: (dom f) \ A = dom (g | ((dom g) \ A)) by RELAT_1:156 .= (dom g) \ A by RELAT_1:156 ; then A4: dom ((f +* h) | ((dom (f +* h)) \ A)) = ((dom g) \/ (dom h)) \ A by A1, XBOOLE_1:42 .= (dom (g +* h)) \ A by FUNCT_4:def_1 .= dom ((g +* h) | ((dom (g +* h)) \ A)) by RELAT_1:156 ; now__::_thesis:_for_x_being_set_st_x_in_dom_((f_+*_h)_|_((dom_(f_+*_h))_\_A))_holds_ ((f_+*_h)_|_((dom_(f_+*_h))_\_A))_._x_=_((g_+*_h)_|_((dom_(g_+*_h))_\_A))_._x let x be set ; ::_thesis: ( x in dom ((f +* h) | ((dom (f +* h)) \ A)) implies ((f +* h) | ((dom (f +* h)) \ A)) . b1 = ((g +* h) | ((dom (g +* h)) \ A)) . b1 ) assume A5: x in dom ((f +* h) | ((dom (f +* h)) \ A)) ; ::_thesis: ((f +* h) | ((dom (f +* h)) \ A)) . b1 = ((g +* h) | ((dom (g +* h)) \ A)) . b1 then A6: ( x in (dom f) \ A or x in (dom h) \ A ) by A1, XBOOLE_0:def_3; percases ( x in (dom h) \ A or not x in (dom h) \ A ) ; supposeA7: x in (dom h) \ A ; ::_thesis: ((f +* h) | ((dom (f +* h)) \ A)) . b1 = ((g +* h) | ((dom (g +* h)) \ A)) . b1 thus ((f +* h) | ((dom (f +* h)) \ A)) . x = (f +* h) . x by A5, FUNCT_1:47 .= h . x by A7, FUNCT_4:13 .= (g +* h) . x by A7, FUNCT_4:13 .= ((g +* h) | ((dom (g +* h)) \ A)) . x by A4, A5, FUNCT_1:47 ; ::_thesis: verum end; supposeA8: not x in (dom h) \ A ; ::_thesis: ((f +* h) | ((dom (f +* h)) \ A)) . b1 = ((g +* h) | ((dom (g +* h)) \ A)) . b1 not x in A by A6, XBOOLE_0:def_5; then A9: not x in dom h by A8, XBOOLE_0:def_5; A10: x in (dom f) \ A by A1, A5, A8, XBOOLE_0:def_3; thus ((f +* h) | ((dom (f +* h)) \ A)) . x = (f +* h) . x by A5, FUNCT_1:47 .= f . x by A9, FUNCT_4:11 .= (g | ((dom g) \ A)) . x by A2, A6, A8, FUNCT_1:49 .= g . x by A3, A10, FUNCT_1:49 .= (g +* h) . x by A9, FUNCT_4:11 .= ((g +* h) | ((dom (g +* h)) \ A)) . x by A4, A5, FUNCT_1:47 ; ::_thesis: verum end; end; end; then (f +* h) | ((dom (f +* h)) \ A) = (g +* h) | ((dom (g +* h)) \ A) by A4, FUNCT_1:2; hence f +* h,g +* h equal_outside A by Def2; ::_thesis: verum end; theorem :: FUNCT_7:105 for f, g, h being Function for A being set st f,g equal_outside A holds h +* f,h +* g equal_outside A proof let f, g, h be Function; ::_thesis: for A being set st f,g equal_outside A holds h +* f,h +* g equal_outside A let A be set ; ::_thesis: ( f,g equal_outside A implies h +* f,h +* g equal_outside A ) assume f,g equal_outside A ; ::_thesis: h +* f,h +* g equal_outside A then A1: f | ((dom f) \ A) = g | ((dom g) \ A) by Def2; then A2: (dom f) \ A = dom (g | ((dom g) \ A)) by RELAT_1:156 .= (dom g) \ A by RELAT_1:156 ; A3: dom ((h +* f) | ((dom (h +* f)) \ A)) = (dom (h +* f)) \ A by RELAT_1:156 .= ((dom h) \/ (dom f)) \ A by FUNCT_4:def_1 .= ((dom h) \ A) \/ ((dom f) \ A) by XBOOLE_1:42 ; then A4: dom ((h +* f) | ((dom (h +* f)) \ A)) = ((dom h) \/ (dom g)) \ A by A2, XBOOLE_1:42 .= (dom (h +* g)) \ A by FUNCT_4:def_1 .= dom ((h +* g) | ((dom (h +* g)) \ A)) by RELAT_1:156 ; now__::_thesis:_for_x_being_set_st_x_in_dom_((h_+*_f)_|_((dom_(h_+*_f))_\_A))_holds_ ((h_+*_f)_|_((dom_(h_+*_f))_\_A))_._x_=_((h_+*_g)_|_((dom_(h_+*_g))_\_A))_._x let x be set ; ::_thesis: ( x in dom ((h +* f) | ((dom (h +* f)) \ A)) implies ((h +* f) | ((dom (h +* f)) \ A)) . b1 = ((h +* g) | ((dom (h +* g)) \ A)) . b1 ) assume A5: x in dom ((h +* f) | ((dom (h +* f)) \ A)) ; ::_thesis: ((h +* f) | ((dom (h +* f)) \ A)) . b1 = ((h +* g) | ((dom (h +* g)) \ A)) . b1 then A6: ( x in (dom h) \ A or x in (dom f) \ A ) by A3, XBOOLE_0:def_3; percases ( x in (dom f) \ A or not x in (dom f) \ A ) ; supposeA7: x in (dom f) \ A ; ::_thesis: ((h +* f) | ((dom (h +* f)) \ A)) . b1 = ((h +* g) | ((dom (h +* g)) \ A)) . b1 thus ((h +* f) | ((dom (h +* f)) \ A)) . x = (h +* f) . x by A5, FUNCT_1:47 .= f . x by A7, FUNCT_4:13 .= (g | ((dom g) \ A)) . x by A1, A7, FUNCT_1:49 .= g . x by A2, A7, FUNCT_1:49 .= (h +* g) . x by A2, A7, FUNCT_4:13 .= ((h +* g) | ((dom (h +* g)) \ A)) . x by A4, A5, FUNCT_1:47 ; ::_thesis: verum end; supposeA8: not x in (dom f) \ A ; ::_thesis: ((h +* f) | ((dom (h +* f)) \ A)) . b1 = ((h +* g) | ((dom (h +* g)) \ A)) . b1 A9: not x in A by A6, XBOOLE_0:def_5; then A10: not x in dom f by A8, XBOOLE_0:def_5; A11: not x in dom g by A2, A8, A9, XBOOLE_0:def_5; thus ((h +* f) | ((dom (h +* f)) \ A)) . x = (h +* f) . x by A5, FUNCT_1:47 .= h . x by A10, FUNCT_4:11 .= (h +* g) . x by A11, FUNCT_4:11 .= ((h +* g) | ((dom (h +* g)) \ A)) . x by A4, A5, FUNCT_1:47 ; ::_thesis: verum end; end; end; then (h +* f) | ((dom (h +* f)) \ A) = (h +* g) | ((dom (h +* g)) \ A) by A4, FUNCT_1:2; hence h +* f,h +* g equal_outside A by Def2; ::_thesis: verum end; theorem :: FUNCT_7:106 for f, g, h being Function holds ( f +* h = g +* h iff f,g equal_outside dom h ) proof let f, g, h be Function; ::_thesis: ( f +* h = g +* h iff f,g equal_outside dom h ) thus ( f +* h = g +* h implies f,g equal_outside dom h ) ::_thesis: ( f,g equal_outside dom h implies f +* h = g +* h ) proof assume f +* h = g +* h ; ::_thesis: f,g equal_outside dom h then A1: f +* h,g equal_outside dom h by Th26, Th29; f,f +* h equal_outside dom h by Th29; hence f,g equal_outside dom h by A1, Th27; ::_thesis: verum end; assume A2: f,g equal_outside dom h ; ::_thesis: f +* h = g +* h then A3: (dom f) \ (dom h) = (dom g) \ (dom h) by Th28; A4: for x being set st x in dom (f +* h) holds (f +* h) . x = (g +* h) . x proof let x be set ; ::_thesis: ( x in dom (f +* h) implies (f +* h) . x = (g +* h) . x ) assume A5: x in dom (f +* h) ; ::_thesis: (f +* h) . x = (g +* h) . x percases ( x in dom h or not x in dom h ) ; supposeA6: x in dom h ; ::_thesis: (f +* h) . x = (g +* h) . x hence (f +* h) . x = h . x by FUNCT_4:13 .= (g +* h) . x by A6, FUNCT_4:13 ; ::_thesis: verum end; supposeA7: not x in dom h ; ::_thesis: (f +* h) . x = (g +* h) . x dom (f +* h) = (dom f) \/ (dom h) by FUNCT_4:def_1; then x in dom f by A5, A7, XBOOLE_0:def_3; then A8: x in (dom f) \ (dom h) by A7, XBOOLE_0:def_5; A9: f | ((dom f) \ (dom h)) = g | ((dom g) \ (dom h)) by A2, Def2; thus (f +* h) . x = f . x by A7, FUNCT_4:11 .= (g | ((dom g) \ (dom h))) . x by A9, A8, FUNCT_1:49 .= g . x by A3, A8, FUNCT_1:49 .= (g +* h) . x by A7, FUNCT_4:11 ; ::_thesis: verum end; end; end; dom (f +* h) = (dom f) \/ (dom h) by FUNCT_4:def_1 .= ((dom g) \ (dom h)) \/ (dom h) by A3, XBOOLE_1:39 .= (dom g) \/ (dom h) by XBOOLE_1:39 .= dom (g +* h) by FUNCT_4:def_1 ; hence f +* h = g +* h by A4, FUNCT_1:2; ::_thesis: verum end; theorem Th107: :: FUNCT_7:107 for x, y, a being set for f being Function st f . x = f . y holds f . a = (f * ((id (dom f)) +* (x,y))) . a proof let x, y, a be set ; ::_thesis: for f being Function st f . x = f . y holds f . a = (f * ((id (dom f)) +* (x,y))) . a let f be Function; ::_thesis: ( f . x = f . y implies f . a = (f * ((id (dom f)) +* (x,y))) . a ) assume A1: f . x = f . y ; ::_thesis: f . a = (f * ((id (dom f)) +* (x,y))) . a set g1 = (id (dom f)) +* (x,y); A2: dom (id (dom f)) = dom f ; percases ( not x in dom f or x in dom f ) ; suppose not x in dom f ; ::_thesis: f . a = (f * ((id (dom f)) +* (x,y))) . a then id (dom f) = (id (dom f)) +* (x,y) by A2, Def3; hence f . a = (f * ((id (dom f)) +* (x,y))) . a by RELAT_1:52; ::_thesis: verum end; supposeA3: x in dom f ; ::_thesis: f . a = (f * ((id (dom f)) +* (x,y))) . a A4: dom ((id (dom f)) +* (x,y)) = dom f by A2, Th30; A5: ((id (dom f)) +* (x,y)) . x = y by A2, A3, Th31; thus f . a = (f * ((id (dom f)) +* (x,y))) . a ::_thesis: verum proof percases ( a in dom f or not a in dom f ) ; supposeA6: a in dom f ; ::_thesis: f . a = (f * ((id (dom f)) +* (x,y))) . a now__::_thesis:_(_a_<>_x_implies_f_._a_=_(f_*_((id_(dom_f))_+*_(x,y)))_._a_) assume a <> x ; ::_thesis: f . a = (f * ((id (dom f)) +* (x,y))) . a then ((id (dom f)) +* (x,y)) . a = (id (dom f)) . a by Th32 .= a by A6, FUNCT_1:18 ; hence f . a = (f * ((id (dom f)) +* (x,y))) . a by A4, A6, FUNCT_1:13; ::_thesis: verum end; hence f . a = (f * ((id (dom f)) +* (x,y))) . a by A1, A3, A5, A4, FUNCT_1:13; ::_thesis: verum end; supposeA7: not a in dom f ; ::_thesis: f . a = (f * ((id (dom f)) +* (x,y))) . a dom (f * ((id (dom f)) +* (x,y))) c= dom ((id (dom f)) +* (x,y)) by RELAT_1:25; then not a in dom (f * ((id (dom f)) +* (x,y))) by A4, A7; then (f * ((id (dom f)) +* (x,y))) . a = {} by FUNCT_1:def_2; hence f . a = (f * ((id (dom f)) +* (x,y))) . a by A7, FUNCT_1:def_2; ::_thesis: verum end; end; end; end; end; end; theorem :: FUNCT_7:108 for x, y being set for f being Function st ( x in dom f implies ( y in dom f & f . x = f . y ) ) holds f = f * ((id (dom f)) +* (x,y)) proof let x, y be set ; ::_thesis: for f being Function st ( x in dom f implies ( y in dom f & f . x = f . y ) ) holds f = f * ((id (dom f)) +* (x,y)) let f be Function; ::_thesis: ( ( x in dom f implies ( y in dom f & f . x = f . y ) ) implies f = f * ((id (dom f)) +* (x,y)) ) assume A1: ( x in dom f implies ( y in dom f & f . x = f . y ) ) ; ::_thesis: f = f * ((id (dom f)) +* (x,y)) set g1 = (id (dom f)) +* (x,y); set g = f * ((id (dom f)) +* (x,y)); A2: dom (id (dom f)) = dom f ; percases ( not x in dom f or x in dom f ) ; suppose not x in dom f ; ::_thesis: f = f * ((id (dom f)) +* (x,y)) then id (dom f) = (id (dom f)) +* (x,y) by A2, Def3; hence f = f * ((id (dom f)) +* (x,y)) by RELAT_1:52; ::_thesis: verum end; supposeA3: x in dom f ; ::_thesis: f = f * ((id (dom f)) +* (x,y)) A4: dom ((id (dom f)) +* (x,y)) = dom f by A2, Th30; now__::_thesis:_(_dom_f_=_dom_(f_*_((id_(dom_f))_+*_(x,y)))_&_(_for_a_being_set_st_a_in_dom_f_holds_ f_._a_=_(f_*_((id_(dom_f))_+*_(x,y)))_._a_)_) rng ((id (dom f)) +* (x,y)) c= dom f proof let b be set ; :: according to TARSKI:def_3 ::_thesis: ( not b in rng ((id (dom f)) +* (x,y)) or b in dom f ) assume b in rng ((id (dom f)) +* (x,y)) ; ::_thesis: b in dom f then consider a being set such that A5: a in dom ((id (dom f)) +* (x,y)) and A6: b = ((id (dom f)) +* (x,y)) . a by FUNCT_1:def_3; percases ( a = x or a <> x ) ; suppose a = x ; ::_thesis: b in dom f hence b in dom f by A1, A2, A3, A6, Th31; ::_thesis: verum end; suppose a <> x ; ::_thesis: b in dom f then (id (dom f)) . a = ((id (dom f)) +* (x,y)) . a by Th32; hence b in dom f by A4, A5, A6, FUNCT_1:18; ::_thesis: verum end; end; end; hence dom f = dom (f * ((id (dom f)) +* (x,y))) by A4, RELAT_1:27; ::_thesis: for a being set st a in dom f holds f . a = (f * ((id (dom f)) +* (x,y))) . a let a be set ; ::_thesis: ( a in dom f implies f . a = (f * ((id (dom f)) +* (x,y))) . a ) assume a in dom f ; ::_thesis: f . a = (f * ((id (dom f)) +* (x,y))) . a thus f . a = (f * ((id (dom f)) +* (x,y))) . a by A1, A3, Th107; ::_thesis: verum end; hence f = f * ((id (dom f)) +* (x,y)) by FUNCT_1:2; ::_thesis: verum end; end; end; theorem :: FUNCT_7:109 for f being Function for x being set st x in dom f holds f +* (x .--> (f . x)) = f proof let f be Function; ::_thesis: for x being set st x in dom f holds f +* (x .--> (f . x)) = f let x be set ; ::_thesis: ( x in dom f implies f +* (x .--> (f . x)) = f ) assume x in dom f ; ::_thesis: f +* (x .--> (f . x)) = f hence f +* (x .--> (f . x)) = f +* (x,(f . x)) by Def3 .= f by Th35 ; ::_thesis: verum end; theorem Th110: :: FUNCT_7:110 for X being set for p being Permutation of X for x, y being Element of X holds (p +* (x,(p . y))) +* (y,(p . x)) is Permutation of X proof let X be set ; ::_thesis: for p being Permutation of X for x, y being Element of X holds (p +* (x,(p . y))) +* (y,(p . x)) is Permutation of X let p be Permutation of X; ::_thesis: for x, y being Element of X holds (p +* (x,(p . y))) +* (y,(p . x)) is Permutation of X let x, y be Element of X; ::_thesis: (p +* (x,(p . y))) +* (y,(p . x)) is Permutation of X set p1 = p +* (x,(p . y)); set p2 = (p +* (x,(p . y))) +* (y,(p . x)); A1: dom ((p +* (x,(p . y))) +* (y,(p . x))) = dom (p +* (x,(p . y))) by Th30; A2: dom (p +* (x,(p . y))) = dom p by Th30; A3: ( X = {} implies X = {} ) ; then A4: dom p = X by FUNCT_2:def_1; percases ( X is empty or not X is empty ) ; suppose X is empty ; ::_thesis: (p +* (x,(p . y))) +* (y,(p . x)) is Permutation of X then (p +* (x,(p . y))) +* (y,(p . x)) = {} by A1, A2; hence (p +* (x,(p . y))) +* (y,(p . x)) is Permutation of X by A1, A2, A3; ::_thesis: verum end; supposeA5: not X is empty ; ::_thesis: (p +* (x,(p . y))) +* (y,(p . x)) is Permutation of X A6: rng p = X by FUNCT_2:def_3; then A7: p . x in X by A4, A5, FUNCT_1:def_3; thus (p +* (x,(p . y))) +* (y,(p . x)) is Permutation of X ::_thesis: verum proof percases ( x = y or x <> y ) ; supposeA8: x = y ; ::_thesis: (p +* (x,(p . y))) +* (y,(p . x)) is Permutation of X then (p +* (x,(p . y))) +* (y,(p . x)) = p +* (x,(p . y)) by Th35 .= p by A8, Th35 ; hence (p +* (x,(p . y))) +* (y,(p . x)) is Permutation of X ; ::_thesis: verum end; supposeA9: x <> y ; ::_thesis: (p +* (x,(p . y))) +* (y,(p . x)) is Permutation of X then A10: ((p +* (x,(p . y))) +* (y,(p . x))) . x = (p +* (x,(p . y))) . x by Th32 .= p . y by A4, A5, Th31 ; A11: now__::_thesis:_for_z_being_set_st_z_in_X_&_z_<>_x_&_z_<>_y_holds_ ((p_+*_(x,(p_._y)))_+*_(y,(p_._x)))_._z_=_p_._z let z be set ; ::_thesis: ( z in X & z <> x & z <> y implies ((p +* (x,(p . y))) +* (y,(p . x))) . z = p . z ) assume that z in X and A12: z <> x and A13: z <> y ; ::_thesis: ((p +* (x,(p . y))) +* (y,(p . x))) . z = p . z thus ((p +* (x,(p . y))) +* (y,(p . x))) . z = (p +* (x,(p . y))) . z by A13, Th32 .= p . z by A12, Th32 ; ::_thesis: verum end; A14: ((p +* (x,(p . y))) +* (y,(p . x))) . y = p . x by A2, A4, A5, Th31; A15: now__::_thesis:_for_pz_being_set_holds_ (_(_pz_in_rng_((p_+*_(x,(p_._y)))_+*_(y,(p_._x)))_implies_pz_in_X_)_&_(_pz_in_X_implies_pz_in_rng_((p_+*_(x,(p_._y)))_+*_(y,(p_._x)))_)_) let pz be set ; ::_thesis: ( ( pz in rng ((p +* (x,(p . y))) +* (y,(p . x))) implies pz in X ) & ( pz in X implies b1 in rng ((p +* (x,(p . y))) +* (y,(p . x))) ) ) hereby ::_thesis: ( pz in X implies b1 in rng ((p +* (x,(p . y))) +* (y,(p . x))) ) assume pz in rng ((p +* (x,(p . y))) +* (y,(p . x))) ; ::_thesis: pz in X then consider z being set such that A16: z in dom ((p +* (x,(p . y))) +* (y,(p . x))) and A17: pz = ((p +* (x,(p . y))) +* (y,(p . x))) . z by FUNCT_1:def_3; A18: p . z in X by A1, A2, A6, A16, FUNCT_1:def_3; percases ( z = x or z = y or ( z <> x & z <> y ) ) ; suppose z = x ; ::_thesis: pz in X hence pz in X by A4, A5, A6, A10, A17, FUNCT_1:def_3; ::_thesis: verum end; suppose z = y ; ::_thesis: pz in X hence pz in X by A2, A4, A7, A17, Th31; ::_thesis: verum end; suppose ( z <> x & z <> y ) ; ::_thesis: pz in X hence pz in X by A1, A2, A11, A16, A17, A18; ::_thesis: verum end; end; end; assume pz in X ; ::_thesis: b1 in rng ((p +* (x,(p . y))) +* (y,(p . x))) then consider z being set such that A19: z in dom p and A20: pz = p . z by A6, FUNCT_1:def_3; percases ( z = x or z = y or ( z <> x & z <> y ) ) ; suppose z = x ; ::_thesis: b1 in rng ((p +* (x,(p . y))) +* (y,(p . x))) hence pz in rng ((p +* (x,(p . y))) +* (y,(p . x))) by A1, A2, A4, A14, A19, A20, FUNCT_1:def_3; ::_thesis: verum end; suppose z = y ; ::_thesis: b1 in rng ((p +* (x,(p . y))) +* (y,(p . x))) hence pz in rng ((p +* (x,(p . y))) +* (y,(p . x))) by A1, A2, A4, A10, A19, A20, FUNCT_1:def_3; ::_thesis: verum end; suppose ( z <> x & z <> y ) ; ::_thesis: b1 in rng ((p +* (x,(p . y))) +* (y,(p . x))) then ((p +* (x,(p . y))) +* (y,(p . x))) . z = p . z by A11, A19; hence pz in rng ((p +* (x,(p . y))) +* (y,(p . x))) by A1, A2, A19, A20, FUNCT_1:def_3; ::_thesis: verum end; end; end; then rng ((p +* (x,(p . y))) +* (y,(p . x))) = X by TARSKI:1; then reconsider p2 = (p +* (x,(p . y))) +* (y,(p . x)) as Function of X,X by A1, A2, A4, A5, FUNCT_2:def_1, RELSET_1:4; now__::_thesis:_for_z1,_z2_being_set_st_z1_in_X_&_z2_in_X_&_p2_._z1_=_p2_._z2_holds_ not_z1_<>_z2 let z1, z2 be set ; ::_thesis: ( z1 in X & z2 in X & p2 . z1 = p2 . z2 implies not z1 <> z2 ) assume that A21: z1 in X and A22: z2 in X and A23: p2 . z1 = p2 . z2 and A24: z1 <> z2 ; ::_thesis: contradiction percases ( ( z1 = x & z2 = y ) or ( z1 = y & z2 = x ) or ( z1 = x & z2 <> y ) or ( z1 <> x & z2 = y ) or ( z1 = y & z2 <> x ) or ( z1 <> y & z2 = x ) or ( z1 <> y & z2 <> x & z1 <> x & z2 <> y ) ) ; suppose ( z1 = x & z2 = y ) ; ::_thesis: contradiction hence contradiction by A5, A9, A10, A14, A23, FUNCT_2:19; ::_thesis: verum end; suppose ( z1 = y & z2 = x ) ; ::_thesis: contradiction hence contradiction by A5, A9, A10, A14, A23, FUNCT_2:19; ::_thesis: verum end; supposeA25: ( z1 = x & z2 <> y ) ; ::_thesis: contradiction then p2 . z2 = p . z2 by A11, A22, A24; hence contradiction by A10, A22, A23, A25, FUNCT_2:19; ::_thesis: verum end; supposeA26: ( z1 <> x & z2 = y ) ; ::_thesis: contradiction then p2 . z1 = p . z1 by A11, A21, A24; hence contradiction by A14, A21, A23, A26, FUNCT_2:19; ::_thesis: verum end; supposeA27: ( z1 = y & z2 <> x ) ; ::_thesis: contradiction then p2 . z2 = p . z2 by A11, A22, A24; hence contradiction by A14, A22, A23, A27, FUNCT_2:19; ::_thesis: verum end; supposeA28: ( z1 <> y & z2 = x ) ; ::_thesis: contradiction then p2 . z1 = p . z1 by A11, A21, A24; hence contradiction by A10, A21, A23, A28, FUNCT_2:19; ::_thesis: verum end; suppose ( z1 <> y & z2 <> x & z1 <> x & z2 <> y ) ; ::_thesis: contradiction then ( p2 . z1 = p . z1 & p2 . z2 = p . z2 ) by A11, A21, A22; hence contradiction by A21, A22, A23, A24, FUNCT_2:19; ::_thesis: verum end; end; end; then A29: p2 is one-to-one by A5, FUNCT_2:19; rng p2 = X by A15, TARSKI:1; then p2 is onto by FUNCT_2:def_3; hence (p +* (x,(p . y))) +* (y,(p . x)) is Permutation of X by A29; ::_thesis: verum end; end; end; end; end; end; theorem :: FUNCT_7:111 for f being Function for x, y being set st x in dom f & y in dom f holds ex p being Permutation of (dom f) st (f +* (x,(f . y))) +* (y,(f . x)) = f * p proof let f be Function; ::_thesis: for x, y being set st x in dom f & y in dom f holds ex p being Permutation of (dom f) st (f +* (x,(f . y))) +* (y,(f . x)) = f * p let x, y be set ; ::_thesis: ( x in dom f & y in dom f implies ex p being Permutation of (dom f) st (f +* (x,(f . y))) +* (y,(f . x)) = f * p ) assume that A1: x in dom f and A2: y in dom f ; ::_thesis: ex p being Permutation of (dom f) st (f +* (x,(f . y))) +* (y,(f . x)) = f * p set i = id (dom f); ( (id (dom f)) . x = x & (id (dom f)) . y = y ) by A1, A2, FUNCT_1:18; then reconsider p = ((id (dom f)) +* (x,y)) +* (y,x) as Permutation of (dom f) by A1, A2, Th110; set pk = (id (dom f)) +* (x,y); set fr = f * p; set fk = f +* (x,(f . y)); take p ; ::_thesis: (f +* (x,(f . y))) +* (y,(f . x)) = f * p set fl = (f +* (x,(f . y))) +* (y,(f . x)); A3: dom (id (dom f)) = dom f ; A4: dom (f +* (x,(f . y))) = dom ((f +* (x,(f . y))) +* (y,(f . x))) by Th30; A5: dom p = dom ((id (dom f)) +* (x,y)) by Th30; A6: dom ((id (dom f)) +* (x,y)) = dom (id (dom f)) by Th30; A7: dom f = dom (f +* (x,(f . y))) by Th30; now__::_thesis:_(_dom_f_=_dom_((f_+*_(x,(f_._y)))_+*_(y,(f_._x)))_&_dom_f_=_dom_(f_*_p)_&_(_for_z_being_set_st_z_in_dom_f_holds_ ((f_+*_(x,(f_._y)))_+*_(y,(f_._x)))_._z_=_(f_*_p)_._z_)_) thus dom f = dom ((f +* (x,(f . y))) +* (y,(f . x))) by A4, Th30; ::_thesis: ( dom f = dom (f * p) & ( for z being set st z in dom f holds ((f +* (x,(f . y))) +* (y,(f . x))) . b2 = (f * p) . b2 ) ) rng p = dom f by FUNCT_2:def_3; hence dom f = dom (f * p) by A5, A6, RELAT_1:27; ::_thesis: for z being set st z in dom f holds ((f +* (x,(f . y))) +* (y,(f . x))) . b2 = (f * p) . b2 let z be set ; ::_thesis: ( z in dom f implies ((f +* (x,(f . y))) +* (y,(f . x))) . b1 = (f * p) . b1 ) assume A8: z in dom f ; ::_thesis: ((f +* (x,(f . y))) +* (y,(f . x))) . b1 = (f * p) . b1 percases ( x <> y or x = y ) ; supposeA9: x <> y ; ::_thesis: ((f +* (x,(f . y))) +* (y,(f . x))) . b1 = (f * p) . b1 thus ((f +* (x,(f . y))) +* (y,(f . x))) . z = (f * p) . z ::_thesis: verum proof percases ( z = x or z = y or ( z <> x & z <> y ) ) ; supposeA10: z = x ; ::_thesis: ((f +* (x,(f . y))) +* (y,(f . x))) . z = (f * p) . z hence ((f +* (x,(f . y))) +* (y,(f . x))) . z = (f +* (x,(f . y))) . z by A9, Th32 .= f . y by A8, A10, Th31 .= f . (((id (dom f)) +* (x,y)) . x) by A1, A3, Th31 .= f . (p . x) by A9, Th32 .= (f * p) . z by A5, A6, A8, A10, FUNCT_1:13 ; ::_thesis: verum end; supposeA11: z = y ; ::_thesis: ((f +* (x,(f . y))) +* (y,(f . x))) . z = (f * p) . z hence ((f +* (x,(f . y))) +* (y,(f . x))) . z = f . x by A7, A8, Th31 .= f . (p . y) by A2, A6, Th31 .= (f * p) . z by A5, A6, A8, A11, FUNCT_1:13 ; ::_thesis: verum end; supposeA12: ( z <> x & z <> y ) ; ::_thesis: ((f +* (x,(f . y))) +* (y,(f . x))) . z = (f * p) . z then A13: p . z = ((id (dom f)) +* (x,y)) . z by Th32 .= (id (dom f)) . z by A12, Th32 .= z by A8, FUNCT_1:18 ; thus ((f +* (x,(f . y))) +* (y,(f . x))) . z = (f +* (x,(f . y))) . z by A12, Th32 .= f . (p . z) by A12, A13, Th32 .= (f * p) . z by A5, A6, A8, FUNCT_1:13 ; ::_thesis: verum end; end; end; end; supposeA14: x = y ; ::_thesis: ((f +* (x,(f . y))) +* (y,(f . x))) . b1 = (f * p) . b1 A15: x = (id (dom f)) . x by A1, FUNCT_1:17; ( f +* (x,(f . y)) = f & id (dom f) = (id (dom f)) +* (x,((id (dom f)) . y)) ) by A14, Th35; hence ((f +* (x,(f . y))) +* (y,(f . x))) . z = (f * p) . z by A14, A15, RELAT_1:52; ::_thesis: verum end; end; end; hence (f +* (x,(f . y))) +* (y,(f . x)) = f * p by FUNCT_1:2; ::_thesis: verum end; theorem :: FUNCT_7:112 for f being Function for d, r being set st d in dom f holds dom f = dom (f +* (d .--> r)) proof let f be Function; ::_thesis: for d, r being set st d in dom f holds dom f = dom (f +* (d .--> r)) let d, r be set ; ::_thesis: ( d in dom f implies dom f = dom (f +* (d .--> r)) ) assume A1: d in dom f ; ::_thesis: dom f = dom (f +* (d .--> r)) thus dom f = dom (f +* (d,r)) by Th30 .= dom (f +* (d .--> r)) by A1, Def3 ; ::_thesis: verum end; theorem :: FUNCT_7:113 for f, g being FinSequence of INT for m, n being Element of NAT st 1 <= n & n <= len f & 1 <= m & m <= len f & g = (f +* (m,(f /. n))) +* (n,(f /. m)) holds ( f . m = g . n & f . n = g . m & ( for k being set st k <> m & k <> n & k in dom f holds f . k = g . k ) & f,g are_fiberwise_equipotent ) proof let f, g be FinSequence of INT ; ::_thesis: for m, n being Element of NAT st 1 <= n & n <= len f & 1 <= m & m <= len f & g = (f +* (m,(f /. n))) +* (n,(f /. m)) holds ( f . m = g . n & f . n = g . m & ( for k being set st k <> m & k <> n & k in dom f holds f . k = g . k ) & f,g are_fiberwise_equipotent ) let m, n be Element of NAT ; ::_thesis: ( 1 <= n & n <= len f & 1 <= m & m <= len f & g = (f +* (m,(f /. n))) +* (n,(f /. m)) implies ( f . m = g . n & f . n = g . m & ( for k being set st k <> m & k <> n & k in dom f holds f . k = g . k ) & f,g are_fiberwise_equipotent ) ) assume that A1: ( 1 <= n & n <= len f ) and A2: ( 1 <= m & m <= len f ) and A3: g = (f +* (m,(f /. n))) +* (n,(f /. m)) ; ::_thesis: ( f . m = g . n & f . n = g . m & ( for k being set st k <> m & k <> n & k in dom f holds f . k = g . k ) & f,g are_fiberwise_equipotent ) A4: dom (f +* (m,(f /. n))) = dom f by Th30; A5: n in dom f by A1, FINSEQ_3:25; hence A6: g . n = f /. m by A3, A4, Th31 .= f . m by A2, FINSEQ_4:15 ; ::_thesis: ( f . n = g . m & ( for k being set st k <> m & k <> n & k in dom f holds f . k = g . k ) & f,g are_fiberwise_equipotent ) A7: m in dom f by A2, FINSEQ_3:25; hereby ::_thesis: ( ( for k being set st k <> m & k <> n & k in dom f holds f . k = g . k ) & f,g are_fiberwise_equipotent ) percases ( m = n or m <> n ) ; suppose m = n ; ::_thesis: g . m = f . n hence g . m = f . n by A6; ::_thesis: verum end; suppose m <> n ; ::_thesis: g . m = f . n hence g . m = (f +* (m,(f /. n))) . m by A3, Th32 .= f /. n by A7, Th31 .= f . n by A1, FINSEQ_4:15 ; ::_thesis: verum end; end; end; A9: now__::_thesis:_for_k_being_set_st_k_<>_m_&_k_<>_n_&_k_in_dom_f_holds_ g_._k_=_f_._k let k be set ; ::_thesis: ( k <> m & k <> n & k in dom f implies g . k = f . k ) assume that A10: k <> m and A11: k <> n and k in dom f ; ::_thesis: g . k = f . k thus g . k = (f +* (m,(f /. n))) . k by A3, A11, Th32 .= f . k by A10, Th32 ; ::_thesis: verum end; dom g = dom f by A3, A4, Th30; hence ( ( for k being set st k <> m & k <> n & k in dom f holds f . k = g . k ) & f,g are_fiberwise_equipotent ) by A5, A7, A6, A8, A9, RFINSEQ:28; ::_thesis: verum end; theorem :: FUNCT_7:114 for f being Function for a, A, b, B, c, C being set st a <> b & a <> c holds (((f +* (a .--> A)) +* (b .--> B)) +* (c .--> C)) . a = A proof let f be Function; ::_thesis: for a, A, b, B, c, C being set st a <> b & a <> c holds (((f +* (a .--> A)) +* (b .--> B)) +* (c .--> C)) . a = A let a, A, b, B, c, C be set ; ::_thesis: ( a <> b & a <> c implies (((f +* (a .--> A)) +* (b .--> B)) +* (c .--> C)) . a = A ) assume ( a <> b & a <> c ) ; ::_thesis: (((f +* (a .--> A)) +* (b .--> B)) +* (c .--> C)) . a = A hence (((f +* (a .--> A)) +* (b .--> B)) +* (c .--> C)) . a = (f +* (a .--> A)) . a by FUNCT_4:91 .= A by Th94 ; ::_thesis: verum end; theorem Th115: :: FUNCT_7:115 for A, B, a, b being set for f being Function of A,B st b in B holds f +* (a,b) is Function of A,B proof let A, B, a, b be set ; ::_thesis: for f being Function of A,B st b in B holds f +* (a,b) is Function of A,B let f be Function of A,B; ::_thesis: ( b in B implies f +* (a,b) is Function of A,B ) assume A1: b in B ; ::_thesis: f +* (a,b) is Function of A,B A2: dom f = A by A1, FUNCT_2:def_1; percases ( not a in A or a in A ) ; suppose not a in A ; ::_thesis: f +* (a,b) is Function of A,B hence f +* (a,b) is Function of A,B by A2, Def3; ::_thesis: verum end; supposeA3: a in A ; ::_thesis: f +* (a,b) is Function of A,B set g = a .--> b; set f1 = f +* (a .--> b); rng (a .--> b) = {b} by FUNCOP_1:8; then rng (a .--> b) c= B by A1, ZFMISC_1:31; then A4: ( rng (f +* (a .--> b)) c= (rng f) \/ (rng (a .--> b)) & (rng f) \/ (rng (a .--> b)) c= B \/ B ) by FUNCT_4:17, XBOOLE_1:13; A5: {a} c= A by A3, ZFMISC_1:31; dom (f +* (a .--> b)) = A \/ (dom (a .--> b)) by A2, FUNCT_4:def_1 .= A \/ {a} by FUNCOP_1:13 .= A by A5, XBOOLE_1:12 ; then A6: f +* (a .--> b) is Function of A,B by A4, FUNCT_2:2, XBOOLE_1:1; a in dom f by A1, A3, FUNCT_2:def_1; hence f +* (a,b) is Function of A,B by A6, Def3; ::_thesis: verum end; end; end; theorem Th116: :: FUNCT_7:116 for A being set for f being Function for x, y being set st rng f c= A holds f +~ (x,y) = ((id A) +* (x,y)) * f proof let A be set ; ::_thesis: for f being Function for x, y being set st rng f c= A holds f +~ (x,y) = ((id A) +* (x,y)) * f let f be Function; ::_thesis: for x, y being set st rng f c= A holds f +~ (x,y) = ((id A) +* (x,y)) * f let x, y be set ; ::_thesis: ( rng f c= A implies f +~ (x,y) = ((id A) +* (x,y)) * f ) assume A1: rng f c= A ; ::_thesis: f +~ (x,y) = ((id A) +* (x,y)) * f percases ( x in A or not x in A ) ; suppose x in A ; ::_thesis: f +~ (x,y) = ((id A) +* (x,y)) * f then A2: x in dom (id A) ; thus f +~ (x,y) = ((id A) * f) +* ((x .--> y) * f) by A1, RELAT_1:53 .= ((id A) +* (x .--> y)) * f by Th10 .= ((id A) +* (x,y)) * f by A2, Def3 ; ::_thesis: verum end; supposeA3: not x in A ; ::_thesis: f +~ (x,y) = ((id A) +* (x,y)) * f then A4: not x in dom (id A) ; not x in rng f by A1, A3; hence f +~ (x,y) = f by FUNCT_4:103 .= (id A) * f by A1, RELAT_1:53 .= ((id A) +* (x,y)) * f by A4, Def3 ; ::_thesis: verum end; end; end; theorem :: FUNCT_7:117 for f, g being Function for x, y being set holds (f +* g) +~ (x,y) = (f +~ (x,y)) +* (g +~ (x,y)) proof let f, g be Function; ::_thesis: for x, y being set holds (f +* g) +~ (x,y) = (f +~ (x,y)) +* (g +~ (x,y)) let x, y be set ; ::_thesis: (f +* g) +~ (x,y) = (f +~ (x,y)) +* (g +~ (x,y)) set A = (rng f) \/ (rng g); A1: g +~ (x,y) = ((id ((rng f) \/ (rng g))) +* (x,y)) * g by Th116, XBOOLE_1:7; A2: dom ((id ((rng f) \/ (rng g))) +* (x,y)) = dom (id ((rng f) \/ (rng g))) by Th30 .= (rng f) \/ (rng g) ; rng (f +* g) c= (rng f) \/ (rng g) by FUNCT_4:17; hence (f +* g) +~ (x,y) = ((id ((rng f) \/ (rng g))) +* (x,y)) * (f +* g) by Th116 .= (((id ((rng f) \/ (rng g))) +* (x,y)) * f) +* (((id ((rng f) \/ (rng g))) +* (x,y)) * g) by A2, Th9, XBOOLE_1:7 .= (f +~ (x,y)) +* (g +~ (x,y)) by A1, Th116, XBOOLE_1:7 ; ::_thesis: verum end; definition let a, b be set ; funca followed_by b -> set equals :: FUNCT_7:def 13 (NAT --> b) +* (0,a); coherence (NAT --> b) +* (0,a) is set ; end; :: deftheorem defines followed_by FUNCT_7:def_13_:_ for a, b being set holds a followed_by b = (NAT --> b) +* (0,a); registration let a, b be set ; clustera followed_by b -> Relation-like Function-like ; coherence ( a followed_by b is Function-like & a followed_by b is Relation-like ) ; end; theorem Th118: :: FUNCT_7:118 for a, b being set holds dom (a followed_by b) = NAT proof let a, b be set ; ::_thesis: dom (a followed_by b) = NAT thus dom (a followed_by b) = dom ((NAT --> b) +* (0,a)) .= dom (NAT --> b) by Th30 .= NAT by FUNCOP_1:13 ; ::_thesis: verum end; definition let X be non empty set ; let a, b be Element of X; :: original: followed_by redefine funca followed_by b -> sequence of X; coherence a followed_by b is sequence of X proof a followed_by b = (NAT --> b) +* (0,a) ; hence a followed_by b is sequence of X by Th115; ::_thesis: verum end; end; theorem Th119: :: FUNCT_7:119 for a, b being set holds (a followed_by b) . 0 = a proof let a, b be set ; ::_thesis: (a followed_by b) . 0 = a dom (NAT --> b) = NAT by FUNCOP_1:13; hence (a followed_by b) . 0 = a by Th31; ::_thesis: verum end; theorem Th120: :: FUNCT_7:120 for a, b being set for n being Nat st n > 0 holds (a followed_by b) . n = b proof let a, b be set ; ::_thesis: for n being Nat st n > 0 holds (a followed_by b) . n = b let n be Nat; ::_thesis: ( n > 0 implies (a followed_by b) . n = b ) A1: n in NAT by ORDINAL1:def_12; assume n > 0 ; ::_thesis: (a followed_by b) . n = b hence (a followed_by b) . n = (NAT --> b) . n by Th32 .= b by A1, FUNCOP_1:7 ; ::_thesis: verum end; definition let a, b, c be set ; func(a,b) followed_by c -> set equals :: FUNCT_7:def 14 (NAT --> c) +* ((0,1) --> (a,b)); coherence (NAT --> c) +* ((0,1) --> (a,b)) is set ; end; :: deftheorem defines followed_by FUNCT_7:def_14_:_ for a, b, c being set holds (a,b) followed_by c = (NAT --> c) +* ((0,1) --> (a,b)); registration let a, b, c be set ; cluster(a,b) followed_by c -> Relation-like Function-like ; coherence ( (a,b) followed_by c is Function-like & (a,b) followed_by c is Relation-like ) ; end; theorem Th121: :: FUNCT_7:121 for a, b, c being set holds dom ((a,b) followed_by c) = NAT proof let a, b, c be set ; ::_thesis: dom ((a,b) followed_by c) = NAT thus dom ((a,b) followed_by c) = (dom (NAT --> c)) \/ (dom ((0,1) --> (a,b))) by FUNCT_4:def_1 .= NAT \/ (dom ((0,1) --> (a,b))) by FUNCOP_1:13 .= NAT \/ {0,1} by FUNCT_4:62 .= NAT by XBOOLE_1:12 ; ::_thesis: verum end; theorem Th122: :: FUNCT_7:122 for a, b, c being set holds ((a,b) followed_by c) . 0 = a proof let a, b, c be set ; ::_thesis: ((a,b) followed_by c) . 0 = a dom ((0,1) --> (a,b)) = {0,1} by FUNCT_4:62; then A1: 0 in dom ((0,1) --> (a,b)) by TARSKI:def_2; thus ((a,b) followed_by c) . 0 = ((NAT --> c) +* ((0,1) --> (a,b))) . 0 .= ((0,1) --> (a,b)) . 0 by A1, FUNCT_4:13 .= a by FUNCT_4:63 ; ::_thesis: verum end; theorem Th123: :: FUNCT_7:123 for a, b, c being set holds ((a,b) followed_by c) . 1 = b proof let a, b, c be set ; ::_thesis: ((a,b) followed_by c) . 1 = b dom ((0,1) --> (a,b)) = {0,1} by FUNCT_4:62; then A1: 1 in dom ((0,1) --> (a,b)) by TARSKI:def_2; thus ((a,b) followed_by c) . 1 = ((NAT --> c) +* ((0,1) --> (a,b))) . 1 .= ((0,1) --> (a,b)) . 1 by A1, FUNCT_4:13 .= b by FUNCT_4:63 ; ::_thesis: verum end; theorem Th124: :: FUNCT_7:124 for a, b, c being set for n being Nat st n > 1 holds ((a,b) followed_by c) . n = c proof let a, b, c be set ; ::_thesis: for n being Nat st n > 1 holds ((a,b) followed_by c) . n = c let n be Nat; ::_thesis: ( n > 1 implies ((a,b) followed_by c) . n = c ) assume A1: n > 1 ; ::_thesis: ((a,b) followed_by c) . n = c dom ((0,1) --> (a,b)) = {0,1} by FUNCT_4:62; then A2: not n in dom ((0,1) --> (a,b)) by A1, TARSKI:def_2; A3: n in NAT by ORDINAL1:def_12; thus ((a,b) followed_by c) . n = ((NAT --> c) +* ((0,1) --> (a,b))) . n .= (NAT --> c) . n by A2, FUNCT_4:11 .= c by A3, FUNCOP_1:7 ; ::_thesis: verum end; theorem Th125: :: FUNCT_7:125 for a, b, c being set holds (a,b) followed_by c = (a followed_by c) +* (1,b) proof let a, b, c be set ; ::_thesis: (a,b) followed_by c = (a followed_by c) +* (1,b) set f = (a,b) followed_by c; set g = (a followed_by c) +* (1,b); A1: dom (a followed_by c) = NAT by Th118; A2: dom ((a,b) followed_by c) = NAT by Th121; hence dom ((a,b) followed_by c) = dom ((a followed_by c) +* (1,b)) by A1, Th30; :: according to FUNCT_1:def_11 ::_thesis: for b1 being set holds ( not b1 in proj1 ((a,b) followed_by c) or ((a,b) followed_by c) . b1 = ((a followed_by c) +* (1,b)) . b1 ) let x be set ; ::_thesis: ( not x in proj1 ((a,b) followed_by c) or ((a,b) followed_by c) . x = ((a followed_by c) +* (1,b)) . x ) assume x in dom ((a,b) followed_by c) ; ::_thesis: ((a,b) followed_by c) . x = ((a followed_by c) +* (1,b)) . x then reconsider n = x as Nat by A2; percases ( n = 0 or n = 1 or n > 1 ) by NAT_1:25; supposeA3: n = 0 ; ::_thesis: ((a,b) followed_by c) . x = ((a followed_by c) +* (1,b)) . x hence ((a,b) followed_by c) . x = a by Th122 .= (a followed_by c) . x by A3, Th119 .= ((a followed_by c) +* (1,b)) . x by A3, Th32 ; ::_thesis: verum end; supposeA4: n = 1 ; ::_thesis: ((a,b) followed_by c) . x = ((a followed_by c) +* (1,b)) . x hence ((a,b) followed_by c) . x = b by Th123 .= ((a followed_by c) +* (1,b)) . x by A1, A4, Th31 ; ::_thesis: verum end; supposeA5: n > 1 ; ::_thesis: ((a,b) followed_by c) . x = ((a followed_by c) +* (1,b)) . x hence ((a,b) followed_by c) . x = c by Th124 .= (a followed_by c) . x by A5, Th120 .= ((a followed_by c) +* (1,b)) . x by A5, Th32 ; ::_thesis: verum end; end; end; definition let X be non empty set ; let a, b, c be Element of X; :: original: followed_by redefine func(a,b) followed_by c -> sequence of X; coherence (a,b) followed_by c is sequence of X proof (a,b) followed_by c = (a followed_by c) +* (1,b) by Th125; hence (a,b) followed_by c is sequence of X by Th115; ::_thesis: verum end; end; theorem Th126: :: FUNCT_7:126 for a, b being set holds rng (a followed_by b) = {a,b} proof let a, b be set ; ::_thesis: rng (a followed_by b) = {a,b} rng (NAT --> b) = {b} by FUNCOP_1:8; then rng ((NAT --> b) +* (0,a)) c= {b} \/ {a} by Th100; hence rng (a followed_by b) c= {a,b} by ENUMSET1:1; :: according to XBOOLE_0:def_10 ::_thesis: {a,b} c= rng (a followed_by b) let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in {a,b} or x in rng (a followed_by b) ) assume A1: x in {a,b} ; ::_thesis: x in rng (a followed_by b) A2: dom (NAT --> b) = NAT by FUNCOP_1:13; then 1 in dom (NAT --> b) ; then A3: 1 in dom (a followed_by b) by Th30; (a followed_by b) . 1 = b by Th120; then A4: b in rng (a followed_by b) by A3, FUNCT_1:3; a in rng (a followed_by b) by A2, Th102; hence x in rng (a followed_by b) by A1, A4, TARSKI:def_2; ::_thesis: verum end; theorem :: FUNCT_7:127 for a, b, c being set holds rng ((a,b) followed_by c) = {a,b,c} proof let a, b, c be set ; ::_thesis: rng ((a,b) followed_by c) = {a,b,c} A1: (a,b) followed_by c = (a followed_by c) +* (1,b) by Th125; then A2: dom ((a,b) followed_by c) = dom (a followed_by c) by Th30 .= dom (NAT --> c) by Th30 .= NAT by FUNCOP_1:13 ; ((a,b) followed_by c) . 2 = c by Th124; then A3: c in rng ((a,b) followed_by c) by A2, FUNCT_1:3; ((a,b) followed_by c) . 1 = b by Th123; then A4: b in rng ((a,b) followed_by c) by A2, FUNCT_1:3; rng (a followed_by c) = {a,c} by Th126; then rng ((a followed_by c) +* (1,b)) c= {a,c} \/ {b} by Th100; then rng ((a followed_by c) +* (1,b)) c= {a,c,b} by ENUMSET1:3; hence rng ((a,b) followed_by c) c= {a,b,c} by A1, ENUMSET1:57; :: according to XBOOLE_0:def_10 ::_thesis: {a,b,c} c= rng ((a,b) followed_by c) let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in {a,b,c} or x in rng ((a,b) followed_by c) ) ((a,b) followed_by c) . 0 = a by Th122; then A5: a in rng ((a,b) followed_by c) by A2, FUNCT_1:3; assume x in {a,b,c} ; ::_thesis: x in rng ((a,b) followed_by c) hence x in rng ((a,b) followed_by c) by A5, A4, A3, ENUMSET1:def_1; ::_thesis: verum end; definition let A, B be set ; let f be Function of A,B; let x be set ; let y be Element of B; :: original: +* redefine funcf +* (x,y) -> Function of A,B; coherence f +* (x,y) is Function of A,B proof set F = f +* (x,y); A1: rng (f +* (x,y)) c= (rng f) \/ {y} by Th100; percases ( B is empty or not B is empty ) ; suppose B is empty ; ::_thesis: f +* (x,y) is Function of A,B then dom f is empty ; hence f +* (x,y) is Function of A,B by Def3; ::_thesis: verum end; supposeA2: not B is empty ; ::_thesis: f +* (x,y) is Function of A,B then {y} c= B by ZFMISC_1:31; then (rng f) \/ {y} c= B by XBOOLE_1:8; then A3: rng (f +* (x,y)) c= B by A1, XBOOLE_1:1; dom f = A by A2, FUNCT_2:def_1; then dom (f +* (x,y)) = A by Th30; hence f +* (x,y) is Function of A,B by A2, A3, FUNCT_2:def_1, RELSET_1:4; ::_thesis: verum end; end; end; end; theorem :: FUNCT_7:128 for A, B being non empty set for f being Function of A,B for x being Element of A for y being set holds (f +* (x,y)) . x = y proof let A, B be non empty set ; ::_thesis: for f being Function of A,B for x being Element of A for y being set holds (f +* (x,y)) . x = y let f be Function of A,B; ::_thesis: for x being Element of A for y being set holds (f +* (x,y)) . x = y let x be Element of A; ::_thesis: for y being set holds (f +* (x,y)) . x = y let y be set ; ::_thesis: (f +* (x,y)) . x = y x in A ; then x in dom f by FUNCT_2:def_1; hence (f +* (x,y)) . x = y by Th31; ::_thesis: verum end; theorem :: FUNCT_7:129 for A, B being non empty set for f, g being Function of A,B for x being Element of A st ( for y being Element of A st f . y <> g . y holds y = x ) holds f = g +* (x,(f . x)) proof let A, B be non empty set ; ::_thesis: for f, g being Function of A,B for x being Element of A st ( for y being Element of A st f . y <> g . y holds y = x ) holds f = g +* (x,(f . x)) let f, g be Function of A,B; ::_thesis: for x being Element of A st ( for y being Element of A st f . y <> g . y holds y = x ) holds f = g +* (x,(f . x)) let x be Element of A; ::_thesis: ( ( for y being Element of A st f . y <> g . y holds y = x ) implies f = g +* (x,(f . x)) ) assume A1: for y being Element of A st f . y <> g . y holds y = x ; ::_thesis: f = g +* (x,(f . x)) x in A ; then A2: x in dom g by FUNCT_2:def_1; A3: dom f = A by FUNCT_2:def_1 .= A \/ {x} by XBOOLE_1:12 .= (dom g) \/ {x} by FUNCT_2:def_1 .= (dom g) \/ (dom (x .--> (f . x))) by FUNCOP_1:13 ; for e being set st e in (dom g) \/ (dom (x .--> (f . x))) holds ( ( e in dom (x .--> (f . x)) implies f . e = (x .--> (f . x)) . e ) & ( not e in dom (x .--> (f . x)) implies f . e = g . e ) ) proof let e be set ; ::_thesis: ( e in (dom g) \/ (dom (x .--> (f . x))) implies ( ( e in dom (x .--> (f . x)) implies f . e = (x .--> (f . x)) . e ) & ( not e in dom (x .--> (f . x)) implies f . e = g . e ) ) ) assume A4: e in (dom g) \/ (dom (x .--> (f . x))) ; ::_thesis: ( ( e in dom (x .--> (f . x)) implies f . e = (x .--> (f . x)) . e ) & ( not e in dom (x .--> (f . x)) implies f . e = g . e ) ) thus ( e in dom (x .--> (f . x)) implies f . e = (x .--> (f . x)) . e ) ::_thesis: ( not e in dom (x .--> (f . x)) implies f . e = g . e ) proof assume e in dom (x .--> (f . x)) ; ::_thesis: f . e = (x .--> (f . x)) . e then e in {x} by FUNCOP_1:13; then e = x by TARSKI:def_1; hence f . e = (x .--> (f . x)) . e by FUNCOP_1:72; ::_thesis: verum end; assume not e in dom (x .--> (f . x)) ; ::_thesis: f . e = g . e then not e in {x} by FUNCOP_1:13; then e <> x by TARSKI:def_1; hence f . e = g . e by A1, A4; ::_thesis: verum end; hence f = g +* (x .--> (f . x)) by A3, FUNCT_4:def_1 .= g +* (x,(f . x)) by A2, Def3 ; ::_thesis: verum end; theorem Th130: :: FUNCT_7:130 for A being set for f being Function for g being b1 -defined Function holds f,f +* g equal_outside A proof let A be set ; ::_thesis: for f being Function for g being A -defined Function holds f,f +* g equal_outside A let f be Function; ::_thesis: for g being A -defined Function holds f,f +* g equal_outside A let g be A -defined Function; ::_thesis: f,f +* g equal_outside A dom g c= A ; hence f,f +* g equal_outside A by Th29; ::_thesis: verum end; theorem :: FUNCT_7:131 for A being set for f, g being b1 -defined Function holds f,g equal_outside A proof let A be set ; ::_thesis: for f, g being A -defined Function holds f,g equal_outside A let f, g be A -defined Function; ::_thesis: f,g equal_outside A A1: (dom g) \ A = {} by XBOOLE_1:37; (dom f) \ A = {} by XBOOLE_1:37; hence f | ((dom f) \ A) = {} .= g | ((dom g) \ A) by A1 ; :: according to FUNCT_7:def_2 ::_thesis: verum end; theorem :: FUNCT_7:132 for A being set for f, g being b1 -defined Function for h being Function holds h +* f,h +* g equal_outside A proof let A be set ; ::_thesis: for f, g being A -defined Function for h being Function holds h +* f,h +* g equal_outside A let f, g be A -defined Function; ::_thesis: for h being Function holds h +* f,h +* g equal_outside A let h be Function; ::_thesis: h +* f,h +* g equal_outside A h,h +* f equal_outside A by Th130; then A1: h +* f,h equal_outside A by Th26; h,h +* g equal_outside A by Th130; hence h +* f,h +* g equal_outside A by A1, Th27; ::_thesis: verum end; theorem :: FUNCT_7:133 for m being Element of NAT for I being NAT -defined Function holds card (Shift (I,m)) = card I proof let m be Element of NAT ; ::_thesis: for I being NAT -defined Function holds card (Shift (I,m)) = card I defpred S1[ set ] means verum; deffunc H1( Element of NAT ) -> Element of NAT = \$1; let I be NAT -defined Function; ::_thesis: card (Shift (I,m)) = card I A1: for x being set st x in dom I holds ex d being Element of NAT st x = H1(d) ; defpred S2[ Element of NAT ] means \$1 in dom I; deffunc H2( Element of NAT ) -> Element of NAT = \$1 + m; set B = { l where l is Element of NAT : H1(l) in dom I } ; set C = { H2(l) where l is Element of NAT : ( l in { n where n is Element of NAT : S2[n] } & S1[l] ) } ; set D = { H2(l) where l is Element of NAT : l in { l where l is Element of NAT : H1(l) in dom I } } ; set E = { (l + m) where l is Element of NAT : l in dom I } ; A2: for d1, d2 being Element of NAT st H1(d1) = H1(d2) holds d1 = d2 ; A3: dom I, { l where l is Element of NAT : H1(l) in dom I } are_equipotent from FUNCT_7:sch_3(A1, A2); A4: { H2(l) where l is Element of NAT : ( l in { n where n is Element of NAT : S2[n] } & S1[l] ) } c= { (l + m) where l is Element of NAT : l in dom I } proof let e be set ; :: according to TARSKI:def_3 ::_thesis: ( not e in { H2(l) where l is Element of NAT : ( l in { n where n is Element of NAT : S2[n] } & S1[l] ) } or e in { (l + m) where l is Element of NAT : l in dom I } ) assume e in { H2(l) where l is Element of NAT : ( l in { n where n is Element of NAT : S2[n] } & S1[l] ) } ; ::_thesis: e in { (l + m) where l is Element of NAT : l in dom I } then consider l being Element of NAT such that A5: e = H2(l) and A6: ( l in { n where n is Element of NAT : S2[n] } & S1[l] ) ; ex n being Element of NAT st ( n = l & S2[n] ) by A6; hence e in { (l + m) where l is Element of NAT : l in dom I } by A5; ::_thesis: verum end; set B = { l where l is Element of NAT : S2[l] } ; { l where l is Element of NAT : S2[l] } is Subset of NAT from DOMAIN_1:sch_7(); then A7: { l where l is Element of NAT : S2[l] } c= NAT ; set B = { l where l is Element of NAT : l in dom I } ; A8: for d1, d2 being Element of NAT st H2(d1) = H2(d2) holds d1 = d2 ; A9: { l where l is Element of NAT : l in dom I } , { H2(l) where l is Element of NAT : l in { l where l is Element of NAT : H1(l) in dom I } } are_equipotent from FUNCT_7:sch_4(A7, A8); A10: { (l + m) where l is Element of NAT : l in dom I } c= { H2(l) where l is Element of NAT : l in { l where l is Element of NAT : H1(l) in dom I } } proof let e be set ; :: according to TARSKI:def_3 ::_thesis: ( not e in { (l + m) where l is Element of NAT : l in dom I } or e in { H2(l) where l is Element of NAT : l in { l where l is Element of NAT : H1(l) in dom I } } ) assume e in { (l + m) where l is Element of NAT : l in dom I } ; ::_thesis: e in { H2(l) where l is Element of NAT : l in { l where l is Element of NAT : H1(l) in dom I } } then consider l being Element of NAT such that A11: e = l + m and A12: l in dom I ; l in { l where l is Element of NAT : l in dom I } by A12; hence e in { H2(l) where l is Element of NAT : l in { l where l is Element of NAT : H1(l) in dom I } } by A11; ::_thesis: verum end; A13: dom (Shift (I,m)) = { (l + m) where l is Element of NAT : l in dom I } by VALUED_1:def_12; A14: { H2(l) where l is Element of NAT : l in { l where l is Element of NAT : H1(l) in dom I } } c= { H2(l) where l is Element of NAT : ( l in { n where n is Element of NAT : S2[n] } & S1[l] ) } proof let e be set ; :: according to TARSKI:def_3 ::_thesis: ( not e in { H2(l) where l is Element of NAT : l in { l where l is Element of NAT : H1(l) in dom I } } or e in { H2(l) where l is Element of NAT : ( l in { n where n is Element of NAT : S2[n] } & S1[l] ) } ) assume e in { H2(l) where l is Element of NAT : l in { l where l is Element of NAT : H1(l) in dom I } } ; ::_thesis: e in { H2(l) where l is Element of NAT : ( l in { n where n is Element of NAT : S2[n] } & S1[l] ) } then ex l being Element of NAT st ( e = H2(l) & l in { l where l is Element of NAT : l in dom I } ) ; hence e in { H2(l) where l is Element of NAT : ( l in { n where n is Element of NAT : S2[n] } & S1[l] ) } ; ::_thesis: verum end; then { (l + m) where l is Element of NAT : l in dom I } c= { H2(l) where l is Element of NAT : ( l in { n where n is Element of NAT : S2[n] } & S1[l] ) } by A10, XBOOLE_1:1; then A15: { H2(l) where l is Element of NAT : ( l in { n where n is Element of NAT : S2[n] } & S1[l] ) } = { (l + m) where l is Element of NAT : l in dom I } by A4, XBOOLE_0:def_10; then { H2(l) where l is Element of NAT : ( l in { n where n is Element of NAT : S2[n] } & S1[l] ) } = { H2(l) where l is Element of NAT : l in { l where l is Element of NAT : H1(l) in dom I } } by A10, A14, XBOOLE_0:def_10; then A16: dom (Shift (I,m)), dom I are_equipotent by A3, A15, A9, A13, WELLORD2:15; thus card (Shift (I,m)) = card (dom (Shift (I,m))) by CARD_1:62 .= card (dom I) by A16, CARD_1:5 .= card I by CARD_1:62 ; ::_thesis: verum end; theorem Th134: :: FUNCT_7:134 for A, B being set for f, g being Function st dom f = dom g & dom f c= A \/ B & f | B = g | B holds f,g equal_outside A proof let A, B be set ; ::_thesis: for f, g being Function st dom f = dom g & dom f c= A \/ B & f | B = g | B holds f,g equal_outside A let f, g be Function; ::_thesis: ( dom f = dom g & dom f c= A \/ B & f | B = g | B implies f,g equal_outside A ) assume that A1: dom f = dom g and A2: dom f c= A \/ B ; ::_thesis: ( not f | B = g | B or f,g equal_outside A ) assume f | B = g | B ; ::_thesis: f,g equal_outside A hence f | ((dom f) \ A) = g | ((dom g) \ A) by A1, A2, RELAT_1:153, XBOOLE_1:43; :: according to FUNCT_7:def_2 ::_thesis: verum end; theorem Th135: :: FUNCT_7:135 for B, A being set for f, g being Function st dom f = dom g & B c= dom f & A misses B & f,g equal_outside A holds f | B = g | B proof let B, A be set ; ::_thesis: for f, g being Function st dom f = dom g & B c= dom f & A misses B & f,g equal_outside A holds f | B = g | B let f, g be Function; ::_thesis: ( dom f = dom g & B c= dom f & A misses B & f,g equal_outside A implies f | B = g | B ) assume that A1: dom f = dom g and A2: ( B c= dom f & A misses B ) ; ::_thesis: ( not f,g equal_outside A or f | B = g | B ) assume f | ((dom f) \ A) = g | ((dom g) \ A) ; :: according to FUNCT_7:def_2 ::_thesis: f | B = g | B hence f | B = g | B by A1, A2, RELAT_1:153, XBOOLE_1:86; ::_thesis: verum end; theorem :: FUNCT_7:136 for I, A, B being set for X, Y being ManySortedSet of I st I c= A \/ B & X | B = Y | B holds X,Y equal_outside A proof let I, A, B be set ; ::_thesis: for X, Y being ManySortedSet of I st I c= A \/ B & X | B = Y | B holds X,Y equal_outside A let X, Y be ManySortedSet of I; ::_thesis: ( I c= A \/ B & X | B = Y | B implies X,Y equal_outside A ) ( dom X = I & dom Y = I ) by PARTFUN1:def_2; hence ( I c= A \/ B & X | B = Y | B implies X,Y equal_outside A ) by Th134; ::_thesis: verum end; theorem :: FUNCT_7:137 for B, I, A being set for X, Y being ManySortedSet of I st B c= I & A misses B & X,Y equal_outside A holds X | B = Y | B proof let B, I, A be set ; ::_thesis: for X, Y being ManySortedSet of I st B c= I & A misses B & X,Y equal_outside A holds X | B = Y | B let X, Y be ManySortedSet of I; ::_thesis: ( B c= I & A misses B & X,Y equal_outside A implies X | B = Y | B ) ( dom X = I & dom Y = I ) by PARTFUN1:def_2; hence ( B c= I & A misses B & X,Y equal_outside A implies X | B = Y | B ) by Th135; ::_thesis: verum end; registration let V be non empty set ; let f be V -valued Function; let x be set ; let y be Element of V; clusterf +* (x,y) -> V -valued ; coherence f +* (x,y) is V -valued proof A1: rng (f +* (x,y)) c= (rng f) \/ {y} by Th100; thus rng (f +* (x,y)) c= V by A1, XBOOLE_1:1; :: according to RELAT_1:def_19 ::_thesis: verum end; end; theorem :: FUNCT_7:138 for f, g being Function for x, y being set st f c= g & not x in dom f holds f c= g +* (x,y) proof let f, g be Function; ::_thesis: for x, y being set st f c= g & not x in dom f holds f c= g +* (x,y) let x, y be set ; ::_thesis: ( f c= g & not x in dom f implies f c= g +* (x,y) ) assume A1: f c= g ; ::_thesis: ( x in dom f or f c= g +* (x,y) ) assume not x in dom f ; ::_thesis: f c= g +* (x,y) then A2: f c= f +* (x .--> y) by FUNCT_4:107; percases ( x in dom g or not x in dom g ) ; suppose x in dom g ; ::_thesis: f c= g +* (x,y) then g +* (x,y) = g +* (x .--> y) by Def3; then f +* (x .--> y) c= g +* (x,y) by A1, FUNCT_4:123; hence f c= g +* (x,y) by A2, XBOOLE_1:1; ::_thesis: verum end; suppose not x in dom g ; ::_thesis: f c= g +* (x,y) hence f c= g +* (x,y) by A1, Def3; ::_thesis: verum end; end; end; theorem :: FUNCT_7:139 for I being non empty set for X being ManySortedSet of I for l1, l2 being Element of I for i1, i2 being set holds X +* ((l1,l2) --> (i1,i2)) = (X +* (l1,i1)) +* (l2,i2) proof let I be non empty set ; ::_thesis: for X being ManySortedSet of I for l1, l2 being Element of I for i1, i2 being set holds X +* ((l1,l2) --> (i1,i2)) = (X +* (l1,i1)) +* (l2,i2) let X be ManySortedSet of I; ::_thesis: for l1, l2 being Element of I for i1, i2 being set holds X +* ((l1,l2) --> (i1,i2)) = (X +* (l1,i1)) +* (l2,i2) let l1, l2 be Element of I; ::_thesis: for i1, i2 being set holds X +* ((l1,l2) --> (i1,i2)) = (X +* (l1,i1)) +* (l2,i2) let i1, i2 be set ; ::_thesis: X +* ((l1,l2) --> (i1,i2)) = (X +* (l1,i1)) +* (l2,i2) A1: dom X = I by PARTFUN1:def_2; then A2: l1 in dom X ; dom (X +* (l1,i1)) = I by A1, Th30; then A3: l2 in dom (X +* (l1,i1)) ; thus X +* ((l1,l2) --> (i1,i2)) = X +* ((l1 .--> i1) +* (l2 .--> i2)) .= (X +* (l1 .--> i1)) +* (l2 .--> i2) by FUNCT_4:14 .= (X +* (l1,i1)) +* (l2 .--> i2) by A2, Def3 .= (X +* (l1,i1)) +* (l2,i2) by A3, Def3 ; ::_thesis: verum end;