begin definition mode set; end; definition let x,y be set; pred x = y; reflexivity; symmetry; end; notation let x,y be set; antonym x <> y for x = y; end; definition let x,X be set; pred x in X; asymmetry; end; begin reserve x,y,z,u,N,M,X,Y,Z for set; theorem (for x holds x in X iff x in Y) implies X = Y; definition let y; func { y } -> set means x in it iff x = y; correctness; let z; func { y, z } -> set means x in it iff x = y or x = z; correctness; commutativity; end; definition let X,Y; pred X c= Y means x in X implies x in Y; reflexivity; end; definition let X; func union X -> set means x in it iff ex Y st x in Y & Y in X; correctness; end; theorem x in X implies ex Y st Y in X & not ex x st x in X & x in Y; scheme Fraenkel { A()-> set, P[set, set] }: ex X st for x holds x in X iff ex y st y in A() & P[y,x] provided for x,y,z st P[x,y] & P[x,z] holds y = z proof thus thesis; end; definition let x,y; func [x,y] equals { { x,y }, { x } }; correctness; end; definition let X,Y; pred X,Y are_equipotent means ex Z st (for x st x in X ex y st y in Y & [x,y] in Z) & (for y st y in Y ex x st x in X & [x,y] in Z) & for x,y,z,u st [x,y] in Z & [z,u] in Z holds x = z iff y = u; end; theorem ex M st N in M & (for X,Y holds X in M & Y c= X implies Y in M) & (for X st X in M ex Z st Z in M & for Y st Y c= X holds Y in Z) & (for X holds X c= M implies X,M are_equipotent or X in M); begin reserve X, Y, Z, x, y, z for set; scheme Separation { A()-> set, P[set] } : ex X being set st for x being set holds x in X iff x in A() & P[x] proof defpred Q[set,set] means $1 = $2 & P[$2]; A1: for x,y,z st Q[x,y] & Q[x,z] holds y = z; consider X such that A2: for x holds x in X iff ex y st y in A() & Q[y,x] from TARSKI:sch 1(A1); take X; let x; x in X iff ex y st y in A() & y = x & P[x] by A2; hence thesis; end; definition let X be set; attr X is empty means :Def1: not ex x being set st x in X; end; registration cluster empty for set; existence proof defpred P[set] means contradiction; consider Y such that A1: x in Y iff x in the set & P[x] from Separation; take Y; thus not ex x being set st x in Y by A1; end; end; definition func {} -> set equals the empty set; coherence; let X,Y be set; func X \/ Y -> set means :Def3: x in it iff x in X or x in Y; existence proof take union {X,Y}; let x; thus x in union {X,Y} implies x in X or x in Y proof assume x in union {X,Y}; then ex Z being set st x in Z & Z in {X,Y} by TARSKI:def 4; hence thesis by TARSKI:def 2; end; X in {X,Y} & Y in {X,Y} by TARSKI:def 2; hence thesis by TARSKI:def 4; end; uniqueness proof let A1, A2 be set such that A3: x in A1 iff x in X or x in Y and A4: x in A2 iff x in X or x in Y; now let x; x in A1 iff x in X or x in Y by A3; hence x in A1 iff x in A2 by A4; end; hence thesis by TARSKI:1; end; commutativity; idempotence; func X /\ Y -> set means :Def4: x in it iff x in X & x in Y; existence proof defpred P[set] means $1 in Y; thus ex Z being set st for x holds x in Z iff x in X & P[x] from Separation; end; uniqueness proof let A1, A2 be set such that A5: x in A1 iff x in X & x in Y and A6: x in A2 iff x in X & x in Y; now let x; x in A1 iff x in X & x in Y by A5; hence x in A1 iff x in A2 by A6; end; hence thesis by TARSKI:1; end; commutativity; idempotence; func X \ Y -> set means :Def5: x in it iff x in X & not x in Y; existence proof defpred P[set] means not $1 in Y; thus ex Z being set st for x holds x in Z iff x in X & P[x] from Separation; end; uniqueness proof let A1, A2 be set such that A7: x in A1 iff x in X & not x in Y and A8: x in A2 iff x in X & not x in Y; now let x; x in A1 iff x in X & not x in Y by A7; hence x in A1 iff x in A2 by A8; end; hence thesis by TARSKI:1; end; end; definition let X, Y be set; func X \+\ Y -> set equals (X \ Y) \/ (Y \ X); correctness; commutativity; pred X misses Y means :Def7: X /\ Y = {}; symmetry; pred X c< Y means :Def8: X c= Y & X <> Y; irreflexivity; asymmetry proof let X,Y; assume A1: X c= Y; assume X <> Y; assume Y c= X; then for x holds x in X iff x in Y by A1,TARSKI:def 3; hence thesis by TARSKI:1; end; pred X,Y are_c=-comparable means X c= Y or Y c= X; reflexivity; symmetry; redefine pred X = Y means X c= Y & Y c= X; compatibility proof thus X = Y implies X c= Y & Y c= X; assume X c= Y & Y c= X; then for x holds x in X iff x in Y by TARSKI:def 3; hence thesis by TARSKI:1; end; end; notation let X, Y be set; antonym X meets Y for X misses Y; end; theorem x in X \+\ Y iff not (x in X iff x in Y) proof x in X \+\ Y iff x in X \ Y or x in Y \ X by Def3; hence thesis by Def5; end; theorem (for x holds not x in X iff (x in Y iff x in Z)) implies X = Y \+\ Z proof assume A1: not x in X iff (x in Y iff x in Z); now let x; x in X iff x in Y & not x in Z or x in Z & not x in Y by A1; then x in X iff x in Y \ Z or x in Z \ Y by Def5; hence x in X iff x in Y \+\ Z by Def3; end; hence thesis by TARSKI:1; end; registration cluster {} -> empty; coherence; end; registration let x1 be set; cluster { x1 } -> non empty; coherence proof x1 in {x1} by TARSKI:def 1; hence ex x being set st x in {x1}; end; let x2 be set; cluster { x1, x2 } -> non empty; coherence proof x1 in {x1,x2} by TARSKI:def 2; hence ex x being set st x in {x1,x2}; end; end; registration cluster non empty for set; existence proof take { the set }; thus thesis; end; end; registration let D be non empty set, X be set; cluster D \/ X -> non empty; coherence proof consider x being set such that A1: x in D by Def1; x in D \/ X by A1,Def3; hence ex x being set st x in D \/ X; end; cluster X \/ D -> non empty; coherence; end; Lm1: X is empty implies X = {} proof assume not ex x st x in X; then x in {} iff x in X by Def1; hence thesis by TARSKI:1; end; theorem Th3: X meets Y iff ex x st x in X & x in Y proof hereby assume X meets Y; then X /\ Y <> {} by Def7; then X /\ Y is not empty by Lm1; then consider x such that A1: x in X /\ Y by Def1; take x; thus x in X & x in Y by A1,Def4; end; given x such that A2: x in X & x in Y; x in X /\ Y by A2,Def4; then X /\ Y <> {} by Def1; hence thesis by Def7; end; theorem X meets Y iff ex x st x in X /\ Y proof hereby assume X meets Y; then X /\ Y <> {} by Def7; then X /\ Y is not empty by Lm1; then consider x such that A1: x in X /\ Y by Def1; take x; thus x in X /\ Y by A1; end; assume ex x st x in X /\ Y; then X /\ Y <> {} by Def1; hence thesis by Def7; end; theorem X misses Y & x in X \/ Y implies x in X & not x in Y or x in Y & not x in X by Def3,Th3; scheme Extensionality { X,Y() -> set, P[set] } : X() = Y() provided A1: for x holds x in X() iff P[x] and A2: for x holds x in Y() iff P[x] proof A3: x in Y() implies x in X() proof assume x in Y(); then P[x] by A2; hence thesis by A1; end; x in X() implies x in Y() proof assume x in X(); then P[x] by A1; hence thesis by A2; end; hence thesis by A3,TARSKI:1; end; scheme SetEq { P[set] } : for X1,X2 being set st (for x being set holds x in X1 iff P[x]) & (for x being set holds x in X2 iff P[x]) holds X1 = X2 proof let X1,X2 be set such that A1: for x being set holds x in X1 iff P[x] and A2: for x being set holds x in X2 iff P[x]; thus thesis from Extensionality(A1,A2); end; begin theorem X c< Y implies ex x st x in Y & not x in X proof assume X c< Y; then (not for x holds x in X iff x in Y) & X c= Y by Def8,TARSKI:1; hence thesis by TARSKI:def 3; end; theorem X <> {} implies ex x st x in X proof assume A1: X <> {}; assume not ex x st x in X; then X is empty by Def1; hence thesis by A1,Lm1; end; begin theorem for X being set holds X \/ {} = X proof let X be set; thus X \/ {} c= X proof let x be set; assume x in X \/ {}; then x in X or x in {} by XBOOLE_0:def 3; hence thesis by XBOOLE_0:def 1; end; let x be set; assume x in X; hence thesis by XBOOLE_0:def 3; end; theorem for X being set holds X /\ {} = {} proof let X be set; thus X /\ {} c= {} proof let x be set; assume x in X /\ {}; hence thesis by XBOOLE_0:def 4; end; let x be set; assume x in {}; hence thesis by XBOOLE_0:def 1; end; theorem for X being set holds X \ {} = X proof let X be set; thus X \ {} c= X proof let x be set; assume x in X \ {}; hence thesis by XBOOLE_0:def 5; end; let x be set; A1: not x in {} by XBOOLE_0:def 1; assume x in X; hence thesis by A1,XBOOLE_0:def 5; end; theorem for X being set holds {} \ X = {} proof let X be set; thus {} \ X c= {} proof let x be set; assume x in {} \ X; hence thesis by XBOOLE_0:def 5; end; let x be set; assume x in {}; hence thesis by XBOOLE_0:def 1; end; theorem for X being set holds X \+\ {} = X proof let X be set; thus X \+\ {} c= X proof let x be set; assume x in X \+\ {}; then A1: x in X \ {} or x in {} \ X by XBOOLE_0:def 3; per cases by A1,XBOOLE_0:def 5; suppose x in X & not x in {}; hence thesis; end; suppose x in {} & not x in X; hence thesis by XBOOLE_0:def 1; end; end; let x be set; A2: not x in {} by XBOOLE_0:def 1; assume x in X; then x in X \ {} by A2,XBOOLE_0:def 5; hence thesis by XBOOLE_0:def 3; end; reserve x,X for set; Lm1: X is empty implies X = {} proof assume not ex x st x in X; then x in {} iff x in X by XBOOLE_0:def 1; hence thesis by TARSKI:1; end; theorem for X being set st X is empty holds X = {} by Lm1; theorem for x, X being set st x in X holds X is non empty by XBOOLE_0:def 1; theorem for X, Y being set st X is empty & X <> Y holds Y is non empty proof let X, Y be set; assume that A1: X is empty and A2: X <> Y; X = {} by A1,Lm1; hence thesis by A2,Lm1; end; begin reserve x,A,B,X,X9,Y,Y9,Z,V for set; theorem Th1: X c= Y & Y c= Z implies X c= Z proof assume that A1: X c= Y and A2: Y c= Z; let x; assume x in X; then x in Y by A1,TARSKI:def 3; hence thesis by A2,TARSKI:def 3; end; theorem Th2: {} c= X proof let x; thus thesis; end; theorem Th3: X c= {} implies X = {} proof assume X c= {}; hence X c= {} & {} c= X by Th2; end; theorem Th4: (X \/ Y) \/ Z = X \/ (Y \/ Z) proof thus (X \/ Y) \/ Z c= X \/ (Y \/ Z) proof let x; assume x in (X \/ Y) \/ Z; then x in X \/ Y or x in Z by XBOOLE_0:def 3; then x in X or x in Y or x in Z by XBOOLE_0:def 3; then x in X or x in Y \/ Z by XBOOLE_0:def 3; hence thesis by XBOOLE_0:def 3; end; let x; assume x in X \/ (Y \/ Z); then x in X or x in Y \/ Z by XBOOLE_0:def 3; then x in X or x in Y or x in Z by XBOOLE_0:def 3; then x in X \/ Y or x in Z by XBOOLE_0:def 3; hence thesis by XBOOLE_0:def 3; end; theorem (X \/ Y) \/ Z = (X \/ Z) \/ (Y \/ Z) proof (X \/ Y) \/ Z = X \/ ((Z \/ Z) \/ Y) by Th4 .= X \/ (Z \/ (Z \/ Y)) by Th4 .= (X \/ Z) \/ (Y \/ Z) by Th4; hence thesis; end; theorem X \/ (X \/ Y) = X \/ Y proof X \/ (X \/ Y) = (X \/ X) \/ Y by Th4 .= X \/ Y; hence thesis; end; theorem Th7: X c= X \/ Y proof let x; thus thesis by XBOOLE_0:def 3; end; theorem Th8: X c= Z & Y c= Z implies X \/ Y c= Z proof assume A1: X c= Z & Y c= Z; let x; assume x in X \/ Y; then x in X or x in Y by XBOOLE_0:def 3; hence thesis by A1,TARSKI:def 3; end; theorem X c= Y implies X \/ Z c= Y \/ Z proof assume A1: X c= Y; let x; assume x in X \/ Z; then x in X or x in Z by XBOOLE_0:def 3; then x in Y or x in Z by A1,TARSKI:def 3; hence thesis by XBOOLE_0:def 3; end; theorem X c= Y implies X c= Z \/ Y proof Y c= Z \/ Y by Th7; hence thesis by Th1; end; theorem X \/ Y c= Z implies X c= Z proof X c= X \/ Y by Th7; hence thesis by Th1; end; theorem Th12: X c= Y implies X \/ Y = Y proof assume A1: X c= Y; thus X \/ Y c= Y proof let x; assume x in X \/ Y; then x in X or x in Y by XBOOLE_0:def 3; hence thesis by A1,TARSKI:def 3; end; let x; thus thesis by XBOOLE_0:def 3; end; theorem X c= Y & Z c= V implies X \/ Z c= Y \/ V proof assume A1: X c= Y; assume A2: Z c= V; let x; assume x in X \/ Z; then x in X or x in Z by XBOOLE_0:def 3; then x in Y or x in V by A1,A2,TARSKI:def 3; hence thesis by XBOOLE_0:def 3; end; theorem (Y c= X & Z c= X & for V st Y c= V & Z c= V holds X c= V) implies X = Y \/ Z proof assume that A1: Y c= X & Z c= X and A2: Y c= V & Z c= V implies X c= V; Y c= Y \/ Z & Z c= Y \/ Z by Th7; hence X c= Y \/ Z by A2; thus thesis by A1,Th8; end; theorem X \/ Y = {} implies X = {}; theorem Th16: (X /\ Y) /\ Z = X /\ (Y /\ Z) proof thus (X /\ Y) /\ Z c= X /\ (Y /\ Z) proof let x; assume A1: x in (X /\ Y) /\ Z; then A2: x in Z by XBOOLE_0:def 4; A3: x in X /\ Y by A1,XBOOLE_0:def 4; then A4: x in X by XBOOLE_0:def 4; x in Y by A3,XBOOLE_0:def 4; then x in Y /\ Z by A2,XBOOLE_0:def 4; hence thesis by A4,XBOOLE_0:def 4; end; let x; assume A5: x in X /\ (Y /\ Z); then A6: x in Y /\ Z by XBOOLE_0:def 4; then A7: x in Y by XBOOLE_0:def 4; A8: x in Z by A6,XBOOLE_0:def 4; x in X by A5,XBOOLE_0:def 4; then x in X /\ Y by A7,XBOOLE_0:def 4; hence thesis by A8,XBOOLE_0:def 4; end; theorem Th17: X /\ Y c= X proof let x; thus thesis by XBOOLE_0:def 4; end; theorem X c= Y /\ Z implies X c= Y proof Y /\ Z c= Y by Th17; hence thesis by Th1; end; theorem Th19: Z c= X & Z c= Y implies Z c= X /\ Y proof assume A1: Z c= X & Z c= Y; let x; assume x in Z; then x in X & x in Y by A1,TARSKI:def 3; hence thesis by XBOOLE_0:def 4; end; theorem (X c= Y & X c= Z & for V st V c= Y & V c= Z holds V c= X) implies X = Y /\ Z proof assume that A1: X c= Y & X c= Z and A2: V c= Y & V c= Z implies V c= X; thus X c= Y /\ Z by A1,Th19; Y /\ Z c= Y & Y /\ Z c= Z implies Y /\ Z c= X by A2; hence thesis by Th17; end; theorem X /\ (X \/ Y) = X proof thus X /\ (X \/ Y) c= X proof let x; thus thesis by XBOOLE_0:def 4; end; let x; assume A1: x in X; then x in X \/ Y by XBOOLE_0:def 3; hence thesis by A1,XBOOLE_0:def 4; end; theorem Th22: X \/ (X /\ Y) = X proof thus X \/ (X /\ Y) c= X proof let x; assume x in X \/ (X /\ Y); then x in X or x in X /\ Y by XBOOLE_0:def 3; hence thesis by XBOOLE_0:def 4; end; let x; thus thesis by XBOOLE_0:def 3; end; theorem Th23: X /\ (Y \/ Z) = X /\ Y \/ X /\ Z proof thus X /\ (Y \/ Z) c= X /\ Y \/ X /\ Z proof let x; assume A1: x in X /\ (Y \/ Z); then x in Y \/ Z by XBOOLE_0:def 4; then A2: x in Y or x in Z by XBOOLE_0:def 3; x in X by A1,XBOOLE_0:def 4; then x in X /\ Y or x in X /\ Z by A2,XBOOLE_0:def 4; hence thesis by XBOOLE_0:def 3; end; let x; assume x in X /\ Y \/ X /\ Z; then x in X /\ Y or x in X /\ Z by XBOOLE_0:def 3; then A3: x in X & x in Y or x in X & x in Z by XBOOLE_0:def 4; then x in Y \/ Z by XBOOLE_0:def 3; hence thesis by A3,XBOOLE_0:def 4; end; theorem Th24: X \/ Y /\ Z = (X \/ Y) /\ (X \/ Z) proof thus X \/ Y /\ Z c= (X \/ Y) /\ (X \/ Z) proof let x; assume x in X \/ Y /\ Z; then x in X or x in Y /\ Z by XBOOLE_0:def 3; then x in X or x in Y & x in Z by XBOOLE_0:def 4; then x in X \/ Y & x in X \/ Z by XBOOLE_0:def 3; hence thesis by XBOOLE_0:def 4; end; let x; assume A1: x in (X \/ Y) /\ (X \/ Z); then x in X \/ Z by XBOOLE_0:def 4; then A2: x in X or x in Z by XBOOLE_0:def 3; x in X \/ Y by A1,XBOOLE_0:def 4; then x in X or x in Y by XBOOLE_0:def 3; then x in X or x in Y /\ Z by A2,XBOOLE_0:def 4; hence thesis by XBOOLE_0:def 3; end; theorem (X /\ Y) \/ (Y /\ Z) \/ (Z /\ X) = (X \/ Y) /\ (Y \/ Z) /\ (Z \/ X) proof thus X /\ Y \/ Y /\ Z \/ Z /\ X = (X /\ Y \/ Y /\ Z \/ Z) /\ (X /\ Y \/ Y /\ Z \/ X) by Th24 .= (X /\ Y \/ (Y /\ Z \/ Z)) /\ (X /\ Y \/ Y /\ Z \/ X) by Th4 .= (X /\ Y \/ Z) /\ (X /\ Y \/ Y /\ Z \/ X) by Th22 .= (X /\ Y \/ Z) /\ (X /\ Y \/ X \/ Y /\ Z) by Th4 .= (X /\ Y \/ Z) /\ (X \/ Y /\ Z) by Th22 .= (X \/ Z) /\ (Y \/ Z) /\ (X \/ Y /\ Z) by Th24 .= (X \/ Z) /\ (Y \/ Z) /\ ((X \/ Y) /\ (X \/ Z)) by Th24 .= (X \/ Y) /\ ((Y \/ Z) /\ (X \/ Z) /\ (X \/ Z)) by Th16 .= (X \/ Y) /\ ((Y \/ Z) /\ ((X \/ Z) /\ (X \/ Z))) by Th16 .= (X \/ Y) /\ (Y \/ Z) /\ (Z \/ X) by Th16; end; theorem Th26: X c= Y implies X /\ Z c= Y /\ Z proof assume A1: X c= Y; let x; assume A2: x in X /\ Z; then x in X by XBOOLE_0:def 4; then A3: x in Y by A1,TARSKI:def 3; x in Z by A2,XBOOLE_0:def 4; hence thesis by A3,XBOOLE_0:def 4; end; theorem X c= Y & Z c= V implies X /\ Z c= Y /\ V proof assume that A1: X c= Y and A2: Z c= V; let x; assume A3: x in X /\ Z; then x in Z by XBOOLE_0:def 4; then A4: x in V by A2,TARSKI:def 3; x in X by A3,XBOOLE_0:def 4; then x in Y by A1,TARSKI:def 3; hence thesis by A4,XBOOLE_0:def 4; end; theorem Th28: X c= Y implies X /\ Y = X proof assume A1: X c= Y; thus X /\ Y c= X by Th17; let x; assume A2: x in X; then x in Y by A1,TARSKI:def 3; hence thesis by A2,XBOOLE_0:def 4; end; theorem X /\ Y c= X \/ Z proof X /\ Y c= X & X c= X \/ Z by Th7,Th17; hence thesis by Th1; end; theorem X c= Z implies X \/ Y /\ Z = (X \/ Y) /\ Z proof assume A1: X c= Z; thus X \/ Y /\ Z c= (X \/ Y) /\ Z proof let x; assume x in X \/ Y /\ Z; then A2: x in X or x in Y /\ Z by XBOOLE_0:def 3; then x in X or x in Y & x in Z by XBOOLE_0:def 4; then A3: x in (X \/ Y) by XBOOLE_0:def 3; x in Z by A1,A2,TARSKI:def 3,XBOOLE_0:def 4; hence thesis by A3,XBOOLE_0:def 4; end; let x; assume A4: x in (X \/ Y) /\ Z; then x in X \/ Y by XBOOLE_0:def 4; then A5: x in X or x in Y by XBOOLE_0:def 3; x in Z by A4,XBOOLE_0:def 4; then x in X & x in Z or x in Y /\ Z by A5,XBOOLE_0:def 4; hence thesis by XBOOLE_0:def 3; end; theorem (X /\ Y) \/ (X /\ Z) c= Y \/ Z proof now let x; assume x in (X /\ Y) \/ (X /\ Z); then x in (X /\ Y) or x in (X /\ Z) by XBOOLE_0:def 3; then x in X & x in Y or x in X & x in Z by XBOOLE_0:def 4; hence x in Y \/ Z by XBOOLE_0:def 3; end; hence thesis by TARSKI:def 3; end; Lm1: X \ Y = {} iff X c= Y proof thus X \ Y = {} implies X c= Y proof assume A1: X \ Y = {}; let x; assume x in X & not x in Y; hence contradiction by A1,XBOOLE_0:def 5; end; assume A2: X c= Y; now let x; x in X & not x in Y iff contradiction by A2,TARSKI:def 3; hence x in X \ Y iff x in {} by XBOOLE_0:def 5; end; hence thesis by TARSKI:1; end; theorem X \ Y = Y \ X implies X = Y proof assume A1: X \ Y = Y \ X; now let x; x in X & not x in Y iff x in Y \ X by A1,XBOOLE_0:def 5; hence x in X iff x in Y by XBOOLE_0:def 5; end; hence thesis by TARSKI:1; end; theorem Th33: X c= Y implies X \ Z c= Y \ Z proof assume A1: X c= Y; let x; assume A2: x in X \ Z; then x in X by XBOOLE_0:def 5; then A3: x in Y by A1,TARSKI:def 3; not x in Z by A2,XBOOLE_0:def 5; hence thesis by A3,XBOOLE_0:def 5; end; theorem Th34: X c= Y implies Z \ Y c= Z \ X proof assume A1: X c= Y; let x; assume A2: x in Z \ Y; then not x in Y by XBOOLE_0:def 5; then A3: not x in X by A1,TARSKI:def 3; x in Z by A2,XBOOLE_0:def 5; hence thesis by A3,XBOOLE_0:def 5; end; Lm2: X \ (Y /\ Z) = (X \ Y) \/ (X \ Z) proof thus X \ (Y /\ Z) c= (X \ Y) \/ (X \ Z) proof let x; assume A1: x in X \ (Y /\ Z); then not x in (Y /\ Z) by XBOOLE_0:def 5; then A2: not x in Y or not x in Z by XBOOLE_0:def 4; x in X by A1,XBOOLE_0:def 5; then x in (X \ Y) or x in (X \ Z) by A2,XBOOLE_0:def 5; hence thesis by XBOOLE_0:def 3; end; (X \ Y) c= X \ (Y /\ Z) & X \ Z c= X \ (Y /\ Z) by Th17,Th34; hence thesis by Th8; end; theorem X c= Y & Z c= V implies X \ V c= Y \ Z proof assume X c= Y & Z c= V; then X \ V c= Y \ V & Y \ V c= Y \ Z by Th33,Th34; hence thesis by Th1; end; theorem Th36: X \ Y c= X proof let x; thus thesis by XBOOLE_0:def 5; end; theorem X \ Y = {} iff X c= Y by Lm1; theorem X c= Y \ X implies X = {} proof assume A1: X c= Y \ X; thus X c= {} proof let x; assume A2: x in X; then x in Y \ X by A1,TARSKI:def 3; hence thesis by A2,XBOOLE_0:def 5; end; thus thesis by Th2; end; theorem Th39: X \/ (Y \ X) = X \/ Y proof thus X \/ (Y \ X) c= X \/ Y proof let x; assume x in X \/ (Y \ X); then x in X or x in Y \ X by XBOOLE_0:def 3; then x in X or x in Y by XBOOLE_0:def 5; hence thesis by XBOOLE_0:def 3; end; let x; assume x in X \/ Y; then x in X or x in Y & not x in X by XBOOLE_0:def 3; then x in X or x in Y \ X by XBOOLE_0:def 5; hence thesis by XBOOLE_0:def 3; end; theorem (X \/ Y) \ Y = X \ Y proof thus x in (X \/ Y) \ Y implies x in X \ Y proof assume A1: x in (X \/ Y) \ Y; then x in (X \/ Y) by XBOOLE_0:def 5; then A2: x in X or x in Y by XBOOLE_0:def 3; not x in Y by A1,XBOOLE_0:def 5; hence thesis by A2,XBOOLE_0:def 5; end; thus x in X \ Y implies x in (X \/ Y) \ Y proof assume A3: x in X \ Y; then x in X or x in Y by XBOOLE_0:def 5; then A4: x in (X \/ Y) by XBOOLE_0:def 3; not x in Y by A3,XBOOLE_0:def 5; hence thesis by A4,XBOOLE_0:def 5; end; end; theorem Th41: (X \ Y) \ Z = X \ (Y \/ Z) proof thus x in (X \ Y) \ Z implies x in X \ (Y \/ Z) proof assume A1: x in (X \ Y) \ Z; then A2: not x in Z by XBOOLE_0:def 5; A3: x in (X \ Y) by A1,XBOOLE_0:def 5; then A4: x in X by XBOOLE_0:def 5; not x in Y by A3,XBOOLE_0:def 5; then not x in (Y \/ Z) by A2,XBOOLE_0:def 3; hence thesis by A4,XBOOLE_0:def 5; end; thus x in X \ (Y \/ Z) implies x in (X \ Y) \ Z proof assume A5: x in X \ (Y \/ Z); then A6: not x in (Y \/ Z) by XBOOLE_0:def 5; then A7: not x in Y by XBOOLE_0:def 3; A8: not x in Z by A6,XBOOLE_0:def 3; x in X by A5,XBOOLE_0:def 5; then x in (X \ Y) by A7,XBOOLE_0:def 5; hence thesis by A8,XBOOLE_0:def 5; end; end; theorem Th42: (X \/ Y) \ Z = (X \ Z) \/ (Y \ Z) proof thus (X \/ Y) \ Z c= (X \ Z) \/ (Y \ Z) proof let x; assume A1: x in (X \/ Y) \ Z; then x in (X \/ Y) by XBOOLE_0:def 5; then x in X & not x in Z or x in Y & not x in Z by A1,XBOOLE_0:def 3,def 5; then x in (X \ Z) or x in (Y \ Z) by XBOOLE_0:def 5; hence thesis by XBOOLE_0:def 3; end; let x; assume x in (( X \ Z) \/ (Y \ Z)); then x in (X \ Z) or x in (Y \ Z) by XBOOLE_0:def 3; then A2: x in X & not x in Z or x in Y & not x in Z by XBOOLE_0:def 5; then x in (X \/ Y) by XBOOLE_0:def 3; hence thesis by A2,XBOOLE_0:def 5; end; theorem X c= Y \/ Z implies X \ Y c= Z proof assume A1: X c= Y \/ Z; let x; assume A2: x in X \ Y; then x in X by XBOOLE_0:def 5; then A3: x in Y \/ Z by A1,TARSKI:def 3; not x in Y by A2,XBOOLE_0:def 5; hence thesis by A3,XBOOLE_0:def 3; end; theorem X \ Y c= Z implies X c= Y \/ Z proof assume A1: x in X \ Y implies x in Z; let x; assume x in X; then x in X \ Y or x in Y by XBOOLE_0:def 5; then x in Z or x in Y by A1; hence thesis by XBOOLE_0:def 3; end; theorem X c= Y implies Y = X \/ (Y \ X) proof assume A1: X c= Y; now let x; x in Y iff x in X or x in (Y \ X) by A1,TARSKI:def 3,XBOOLE_0:def 5; hence x in Y iff x in X \/ (Y \ X) by XBOOLE_0:def 3; end; hence thesis by TARSKI:1; end; theorem X \ (X \/ Y) = {} proof X c= X \/ Y by Th7; hence thesis by Lm1; end; theorem Th47: X \ X /\ Y = X \ Y proof now let x; x in X & not x in X /\ Y iff x in X & not x in Y by XBOOLE_0:def 4; hence x in X \ X /\ Y iff x in X \ Y by XBOOLE_0:def 5; end; hence thesis by TARSKI:1; end; theorem X \ (X \ Y) = X /\ Y proof thus x in X \ (X \ Y) implies x in X /\ Y proof assume A1: x in X \ (X \ Y); then not x in (X \ Y) by XBOOLE_0:def 5; then A2: not x in X or x in Y by XBOOLE_0:def 5; x in X by A1,XBOOLE_0:def 5; hence thesis by A2,XBOOLE_0:def 4; end; thus x in X /\ Y implies x in X \ (X \ Y) proof assume A3: x in X /\ Y; then not x in X or x in Y by XBOOLE_0:def 4; then A4: not x in (X \ Y) by XBOOLE_0:def 5; x in X by A3,XBOOLE_0:def 4; hence thesis by A4,XBOOLE_0:def 5; end; end; theorem Th49: X /\ (Y \ Z) = (X /\ Y) \ Z proof now let x; x in X & x in Y & not x in Z iff x in X & x in Y & not x in Z; then x in X & x in (Y \ Z) iff x in (X /\ Y) & not x in Z by XBOOLE_0:def 4 ,def 5; hence x in X /\ (Y \ Z) iff x in (X /\ Y) \ Z by XBOOLE_0:def 4,def 5; end; hence thesis by TARSKI:1; end; theorem Th50: X /\ (Y \ Z) = X /\ Y \ X /\ Z proof A1: X /\ Y c= X by Th17; X /\ Y \ X /\ Z = ((X /\ Y) \ X) \/ ((X /\ Y) \ Z) by Lm2 .= {} \/ ((X /\ Y) \ Z) by A1,Lm1 .= (X /\ Y) \ Z; hence thesis by Th49; end; theorem Th51: X /\ Y \/ (X \ Y) = X proof thus X /\ Y \/ (X \ Y) c= X proof let x; assume x in X /\ Y \/ (X \ Y); then x in X /\ Y or x in (X \ Y) by XBOOLE_0:def 3; hence thesis by XBOOLE_0:def 4,def 5; end; let x; assume x in X; then x in X & x in Y or x in (X\Y) by XBOOLE_0:def 5; then x in X /\ Y or x in (X \ Y) by XBOOLE_0:def 4; hence thesis by XBOOLE_0:def 3; end; theorem Th52: X \ (Y \ Z) = (X \ Y) \/ X /\ Z proof thus x in X \ (Y \ Z) implies x in (X \ Y) \/ X /\ Z proof assume A1: x in X \ (Y \ Z); then not x in (Y \ Z) by XBOOLE_0:def 5; then x in X & not x in Y or x in X & x in Z by A1,XBOOLE_0:def 5; then x in (X \ Y) or x in X /\ Z by XBOOLE_0:def 4,def 5; hence thesis by XBOOLE_0:def 3; end; thus x in (X \ Y) \/ X /\ Z implies x in X \ (Y \ Z) proof assume x in (X \ Y) \/ X /\ Z; then x in (X \ Y) or x in X /\ Z by XBOOLE_0:def 3; then A2: x in X & not x in Y or x in X & x in Z by XBOOLE_0:def 4,def 5; then not x in (Y \ Z) by XBOOLE_0:def 5; hence thesis by A2,XBOOLE_0:def 5; end; end; theorem X \ (Y \/ Z) = (X \ Y) /\ (X \ Z) proof X \(Y \/ Z) c= X \ Y & X \ (Y \/ Z) c= X \ Z by Th7,Th34; hence X \ (Y \/ Z) c= (X \ Y) /\ (X \ Z) by Th19; let x; assume A1: x in (X \ Y) /\ (X \ Z); then A2: x in (X \ Y) by XBOOLE_0:def 4; then A3: x in X by XBOOLE_0:def 5; x in (X \ Z) by A1,XBOOLE_0:def 4; then A4: not x in Z by XBOOLE_0:def 5; not x in Y by A2,XBOOLE_0:def 5; then not x in (Y \/ Z) by A4,XBOOLE_0:def 3; hence thesis by A3,XBOOLE_0:def 5; end; theorem X \ (Y /\ Z) = (X \ Y) \/ (X \ Z) by Lm2; theorem Th55: (X \/ Y) \ (X /\ Y) = (X \ Y) \/ (Y \ X) proof x in (X \/ Y) \ (X /\ Y) iff x in (X \ Y) \/ (Y \ X) proof thus x in (X \/ Y) \ (X /\ Y) implies x in (X \ Y) \/ (Y \ X) proof assume A1: x in (X \/ Y) \ (X /\ Y); then not x in (X /\ Y) by XBOOLE_0:def 5; then A2: not x in X or not x in Y by XBOOLE_0:def 4; x in (X \/ Y) by A1,XBOOLE_0:def 5; then x in X or x in Y by XBOOLE_0:def 3; then x in (X \ Y) or x in( Y \ X) by A2,XBOOLE_0:def 5; hence thesis by XBOOLE_0:def 3; end; assume x in (X \ Y) \/ (Y \ X); then x in (X \ Y) or x in (Y \ X) by XBOOLE_0:def 3; then x in X & not x in Y or x in Y & not x in X by XBOOLE_0:def 5; then ( not x in (X /\ Y))& x in (X \/ Y) by XBOOLE_0:def 3,def 4; hence thesis by XBOOLE_0:def 5; end; hence thesis by TARSKI:1; end; Lm3: X c= Y & Y c< Z implies X c< Z proof assume that A1: X c= Y and A2: Y c< Z; Y c= Z by A2,XBOOLE_0:def 8; hence X c= Z & X <> Z by A1,A2,Th1,XBOOLE_0:def 10; end; theorem X c< Y & Y c< Z implies X c< Z proof assume that A1: X c< Y and A2: Y c< Z; X c= Y by A1,XBOOLE_0:def 8; hence thesis by A2,Lm3; end; theorem not (X c< Y & Y c< X); theorem X c< Y & Y c= Z implies X c< Z proof assume that A1: X c< Y and A2: Y c= Z; X c= Y by A1,XBOOLE_0:def 8; hence X c= Z & X <> Z by A1,A2,Th1,XBOOLE_0:def 10; end; theorem X c= Y & Y c< Z implies X c< Z by Lm3; theorem Th60: X c= Y implies not Y c< X proof assume X c= Y & Y c= X & X <> Y; hence contradiction by XBOOLE_0:def 10; end; theorem X <> {} implies {} c< X proof assume A1: X <> {}; thus {} c= X by Th2; thus thesis by A1; end; theorem not X c< {} proof assume A1: X c< {}; then X c= {} by XBOOLE_0:def 8; hence contradiction by A1,Th3; end; theorem Th63: X c= Y & Y misses Z implies X misses Z proof assume X c= Y & Y /\ Z = {}; then X /\ Z = {} by Th3,Th26; hence thesis by XBOOLE_0:def 7; end; theorem A c= X & B c= Y & X misses Y implies A misses B proof assume that A1: A c= X and A2: B c= Y and A3: X misses Y; A misses Y by A1,A3,Th63; hence thesis by A2,Th63; end; theorem X misses {} proof assume X meets {}; then ex x st x in X & x in {} by XBOOLE_0:3; hence contradiction; end; theorem X meets X iff X <> {} proof hereby assume X meets X; then ex x st x in X & x in X by XBOOLE_0:3; hence X <> {}; end; assume X <> {}; then X /\ X <> {}; hence thesis by XBOOLE_0:def 7; end; theorem X c= Y & X c= Z & Y misses Z implies X = {} proof assume X c= Y & X c= Z & Y /\ Z = {}; hence thesis by Th3,Th19; end; theorem Th68: for A being non empty set st A c= Y & A c= Z holds Y meets Z proof let A be non empty set; consider x being set such that A1: x in A by XBOOLE_0:def 1; assume A c= Y & A c= Z; then x in Y & x in Z by A1,TARSKI:def 3; hence thesis by XBOOLE_0:3; end; theorem for A being non empty set st A c= Y holds A meets Y by Th68; theorem Th70: X meets Y \/ Z iff X meets Y or X meets Z proof thus X meets Y \/ Z implies X meets Y or X meets Z proof assume X meets Y \/ Z; then consider x such that A1: x in X & x in Y \/ Z by XBOOLE_0:3; x in X & x in Y or x in X & x in Z by A1,XBOOLE_0:def 3; hence thesis by XBOOLE_0:3; end; A2: X meets Z implies X meets Y \/ Z proof assume X meets Z; then consider x such that A3: x in X and A4: x in Z by XBOOLE_0:3; x in Y \/ Z by A4,XBOOLE_0:def 3; hence thesis by A3,XBOOLE_0:3; end; X meets Y implies X meets Y \/ Z proof assume X meets Y; then consider x such that A5: x in X and A6: x in Y by XBOOLE_0:3; x in Y \/ Z by A6,XBOOLE_0:def 3; hence thesis by A5,XBOOLE_0:3; end; hence thesis by A2; end; theorem X \/ Y = Z \/ Y & X misses Y & Z misses Y implies X = Z proof assume that A1: X \/ Y = Z \/ Y and A2: X /\ Y = {} and A3: Z /\ Y = {}; thus X c= Z proof let x be set such that A4: x in X; X c= Z \/ Y by A1,Th7; then A5: x in Z \/ Y by A4,TARSKI:def 3; not x in Y by A2,A4,XBOOLE_0:def 4; hence thesis by A5,XBOOLE_0:def 3; end; let x be set such that A6: x in Z; Z c= X \/ Y by A1,Th7; then A7: x in X \/ Y by A6,TARSKI:def 3; not x in Y by A3,A6,XBOOLE_0:def 4; hence thesis by A7,XBOOLE_0:def 3; end; theorem X9 \/ Y9 = X \/ Y & X misses X9 & Y misses Y9 implies X = Y9 proof assume A1: X9 \/ Y9 = X \/ Y; assume X misses X9 & Y misses Y9; then A2: X /\ X9 = {} & Y /\ Y9 = {} by XBOOLE_0:def 7; thus X = X /\ (X9 \/ Y9) by A1,Th7,Th28 .= X /\ X9 \/ X /\ Y9 by Th23 .= (X \/ Y) /\ Y9 by A2,Th23 .= Y9 by A1,Th7,Th28; end; theorem X c= Y \/ Z & X misses Z implies X c= Y proof assume that A1: X c= Y \/ Z and A2: X /\ Z = {}; X /\ (Y \/ Z)= X by A1,Th28; then Y /\ X \/ {} = X by A2,Th23; hence thesis by Th17; end; theorem Th74: X meets Y /\ Z implies X meets Y proof assume X meets Y /\ Z; then consider x such that A1: x in X and A2: x in Y /\ Z by XBOOLE_0:3; x in Y by A2,XBOOLE_0:def 4; hence thesis by A1,XBOOLE_0:3; end; theorem X meets Y implies X /\ Y meets Y proof assume X meets Y; then consider x being set such that A1: x in X and A2: x in Y by XBOOLE_0:3; x in X /\ Y by A1,A2,XBOOLE_0:def 4; hence thesis by A2,XBOOLE_0:3; end; theorem Y misses Z implies X /\ Y misses X /\ Z proof assume Y misses Z; then (X /\ Z) misses Y by Th74; hence thesis by Th74; end; theorem X meets Y & X c= Z implies X meets Y /\ Z proof assume that A1: X meets Y and A2: X c= Z; now assume A3: X /\ (Y /\ Z) = {}; X /\ Y = (X /\ Z) /\ Y by A2,Th28 .= {} by A3,Th16; hence contradiction by A1,XBOOLE_0:def 7; end; hence thesis by XBOOLE_0:def 7; end; theorem X misses Y implies X /\ (Y \/ Z) = X /\ Z proof assume X misses Y; then X /\ Y = {} by XBOOLE_0:def 7; hence X /\ (Y \/ Z) = {} \/ X /\ Z by Th23 .= X /\ Z; end; theorem Th79: X \ Y misses Y proof not ex x st x in (X \ Y) /\ Y proof given x such that A1: x in (X \ Y) /\ Y; x in X \ Y & x in Y by A1,XBOOLE_0:def 4; hence contradiction by XBOOLE_0:def 5; end; hence (X \ Y) /\ Y = {} by XBOOLE_0:def 1; end; theorem X misses Y implies X misses Y \ Z proof assume A1: X misses Y; assume X meets Y \ Z; then consider x such that A2: x in X and A3: x in Y \ Z by XBOOLE_0:3; x in Y by A3,XBOOLE_0:def 5; hence thesis by A1,A2,XBOOLE_0:3; end; theorem X misses Y \ Z implies Y misses X \ Z proof A1: X misses Y \ Z iff X /\ (Y \ Z) = {} by XBOOLE_0:def 7; X /\ (Y \ Z) = Y /\ X \ Z by Th49 .= Y /\ (X \ Z) by Th49; hence thesis by A1,XBOOLE_0:def 7; end; theorem X \ Y misses Y \ X proof assume X \ Y meets Y \ X; then consider x such that A1: x in X \ Y and A2: x in Y \ X by XBOOLE_0:3; x in X by A1,XBOOLE_0:def 5; hence thesis by A2,XBOOLE_0:def 5; end; theorem Th83: X misses Y iff X \ Y = X proof thus X misses Y implies X \ Y = X proof assume A1: X /\ Y = {}; thus for x holds x in X \ Y implies x in X by XBOOLE_0:def 5; let x; not x in X /\ Y implies not x in X or not x in Y by XBOOLE_0:def 4; hence thesis by A1,XBOOLE_0:def 5; end; assume A2: X \ Y = X; not ex x st x in X /\ Y proof given x such that A3: x in X /\ Y; x in X & x in Y by A3,XBOOLE_0:def 4; hence contradiction by A2,XBOOLE_0:def 5; end; hence thesis by XBOOLE_0:4; end; theorem X meets Y & X misses Z implies X meets Y \ Z proof assume that A1: X meets Y and A2: X misses Z; X /\ (Y \ Z) = X /\ Y \ X /\ Z by Th50 .= X /\ Y \ {} by A2,XBOOLE_0:def 7; hence X /\ (Y \ Z) <> {} by A1,XBOOLE_0:def 7; end; theorem X c= Y implies X misses Z \ Y proof assume A1: X c= Y; thus X /\ (Z \ Y) = Z /\ X \ Y by Th49 .= Z /\ (X \ Y) by Th49 .= Z /\ {} by A1,Lm1 .= {}; end; theorem Th86: X c= Y & X misses Z implies X c= Y \ Z proof assume A1: X c= Y & X /\ Z = {}; let x; assume x in X; then x in Y & not x in Z by A1,TARSKI:def 3,XBOOLE_0:def 4; hence thesis by XBOOLE_0:def 5; end; theorem Y misses Z implies (X \ Y) \/ Z = (X \/ Z) \ Y proof assume A1: Y misses Z; thus (X \/ Z) \ Y = (X \ Y) \/ (Z \ Y) by Th42 .= (X \ Y) \/ Z by A1,Th83; end; theorem Th88: X misses Y implies (X \/ Y) \ Y = X proof assume A1: X misses Y; thus (X \/ Y) \ Y = (X \ Y) \/ (Y \ Y) by Th42 .= (X \ Y) \/ {} by Lm1 .= X by A1,Th83; end; theorem Th89: X /\ Y misses X \ Y proof now let x; not (x in X & x in Y & not x in Y); hence not (x in X /\ Y & x in X \ Y) by XBOOLE_0:def 4,def 5; end; hence thesis by XBOOLE_0:3; end; theorem X \ (X /\ Y) misses Y proof X \ (X /\ Y) = X \ Y by Th47; hence thesis by Th79; end; theorem (X \+\ Y) \+\ Z = X \+\ (Y \+\ Z) proof set S1 = X \ (Y \/ Z), S2 = Y \ (X \/ Z), S3 = Z \ (X \/ Y), S4 = X /\ Y /\ Z; thus (X \+\ Y) \+\ Z = (((X \ Y) \ Z) \/ ((Y \ X) \ Z)) \/ (Z \ ((X \ Y) \/ (Y \ X))) by Th42 .= (S1 \/ ((Y \ X) \ Z)) \/ (Z \ ((X \ Y) \/ (Y \ X))) by Th41 .= (S1 \/ S2) \/ (Z \ ((X \ Y) \/ (Y \ X))) by Th41 .= (S1 \/ S2) \/ (Z \ ((X \/ Y) \ (X /\ Y))) by Th55 .= (S1 \/ S2) \/ (S4 \/ S3) by Th52 .= (S1 \/ S2 \/ S4) \/ S3 by Th4 .= (S1 \/ S4 \/ S2) \/ S3 by Th4 .= (S1 \/ S4) \/ (S2 \/ S3) by Th4 .= (S1 \/ X /\ (Y /\ Z)) \/ (S2 \/ S3) by Th16 .= X \ ((Y \/ Z) \ (Y /\ Z)) \/ (S2 \/ S3) by Th52 .= X \ ((Y \ Z) \/ (Z \ Y)) \/ (S2 \/ (Z \ (Y \/ X))) by Th55 .= X \ ((Y \ Z) \/ (Z \ Y)) \/ ((Y \ (Z \/ X)) \/ (Z \ Y \ X)) by Th41 .= X \ ((Y \ Z) \/ (Z \ Y)) \/ ((Y \ Z \ X) \/ (Z \ Y \ X)) by Th41 .= X \+\ (Y \+\ Z) by Th42; end; theorem X \+\ X = {} by Lm1; theorem Th93: X \/ Y = (X \+\ Y) \/ X /\ Y proof thus X \/ Y = ((X \ Y) \/ X /\ Y) \/ Y by Th51 .= (X \ Y) \/ (X /\ Y \/ Y) by Th4 .= (X \ Y) \/ Y by Th22 .= (X \ Y) \/ ((Y \ X) \/ (Y /\ X)) by Th51 .= (X \+\ Y) \/ X /\ Y by Th4; end; Lm4: X /\ Y misses X \+\ Y proof X /\ Y misses X \ Y & X /\ Y misses Y \ X by Th89; hence thesis by Th70; end; Lm5: X \+\ Y = (X \/ Y) \ X /\ Y proof thus X \+\ Y = (X \ X /\ Y) \/ (Y \ X) by Th47 .= (X \ X /\ Y) \/ (Y \ X /\ Y) by Th47 .= (X \/ Y) \ X /\ Y by Th42; end; theorem X \/ Y = X \+\ Y \+\ X /\ Y proof X /\ Y misses X \+\ Y by Lm4; then (X \+\ Y) \ X /\ Y = X \+\ Y & X /\ Y \ (X \+\ Y) = X /\ Y by Th83; hence thesis by Th93; end; theorem X /\ Y = X \+\ Y \+\ (X \/ Y) proof X \+\ Y = (X \/ Y) \ X /\ Y by Lm5; then X \+\ Y c= X \/ Y by Th36; then A1: (X \+\ Y) \ (X \/ Y) = {} by Lm1; X \/ Y = (X \+\ Y) \/ X /\ Y by Th93; hence thesis by A1,Lm4,Th88; end; theorem X \ Y c= X \+\ Y by Th7; theorem X \ Y c= Z & Y \ X c= Z implies X \+\ Y c= Z by Th8; theorem X \/ Y = X \+\ (Y \ X) proof A1: Y \ X \ X = Y \ (X \/ X) by Th41 .= Y \ X; X \ (Y \ X) = (X \ Y) \/ X /\ X by Th52 .= X by Th12,Th36; hence thesis by A1,Th39; end; theorem (X \+\ Y) \ Z = (X \ (Y \/ Z)) \/ (Y \ (X \/ Z)) proof thus (X \+\ Y) \ Z = (X \ Y \ Z) \/ (Y \ X \ Z) by Th42 .= (X \ (Y \/ Z)) \/ (Y \ X \ Z) by Th41 .= (X \ (Y \/ Z)) \/ (Y \ (X \/ Z)) by Th41; end; theorem X \ Y = X \+\ (X /\ Y) proof X /\ Y c= X by Th17; then X /\ Y \ X = {} by Lm1; hence thesis by Th47; end; theorem X \+\ Y = (X \/ Y) \ X /\ Y by Lm5; theorem X \ (Y \+\ Z) = X \ (Y \/ Z) \/ X /\ Y /\ Z proof thus X \ (Y \+\ Z) = X \ ((Y \/ Z) \ Y /\ Z) by Lm5 .= X \ (Y \/ Z) \/ X /\ (Y /\ Z) by Th52 .= X \ (Y \/ Z) \/ X /\ Y /\ Z by Th16; end; theorem X /\ Y misses X \+\ Y by Lm4; theorem X c< Y or X = Y or Y c< X iff X,Y are_c=-comparable proof thus X c< Y or X = Y or Y c< X implies X,Y are_c=-comparable proof assume X c< Y or X = Y or Y c< X; hence X c= Y or Y c= X by XBOOLE_0:def 8; end; assume X c= Y or Y c= X; hence thesis by XBOOLE_0:def 8; end; begin theorem for X, Y being set st X c< Y holds Y \ X <> {} proof let X, Y be set; assume A1: X c< Y; assume Y \ X = {}; then Y c= X by Lm1; hence thesis by A1,Th60; end; theorem Th106: X c= A \ B implies X c= A & X misses B proof assume A1: X c= A \ B; A \ B c= A by Th36; hence X c= A by A1,Th1; now let x; assume x in X; then x in A \ B by A1,TARSKI:def 3; hence not x in B by XBOOLE_0:def 5; end; hence thesis by XBOOLE_0:3; end; theorem X c= A \+\ B iff X c= A \/ B & X misses A /\ B proof A \+\ B = (A \/ B) \ A /\ B by Lm5; hence thesis by Th86,Th106; end; theorem X c= A implies X /\ Y c= A proof X /\ Y c= X by Th17; hence thesis by Th1; end; theorem Th109: X c= A implies X \ Y c= A proof X \ Y c= X by Th36; hence thesis by Th1; end; theorem X c= A & Y c= A implies X \+\ Y c= A proof assume X c= A & Y c= A; then X \ Y c= A & Y \ X c= A by Th109; hence thesis by Th8; end; theorem Th111: (X /\ Z) \ (Y /\ Z) = (X \ Y) /\ Z proof thus (X /\ Z) \ (Y /\ Z) = ((X /\ Z) \ Y) \/ ((X /\ Z) \ Z) by Lm2 .= ((X /\ Z) \ Y) \/ (X /\ (Z \ Z)) by Th49 .= ((X /\ Z) \ Y) \/ (X /\ {}) by Lm1 .= (X \ Y) /\ Z by Th49; end; theorem (X /\ Z) \+\ (Y /\ Z) = (X \+\ Y) /\ Z proof thus (X /\ Z) \+\ (Y /\ Z) = ((X \ Y) /\ Z) \/ ((Y /\ Z) \ (X /\ Z)) by Th111 .= ((X \ Y) /\ Z) \/ ((Y \ X) /\ Z) by Th111 .= (X \+\ Y) /\ Z by Th23; end; theorem X \/ Y \/ Z \/ V = X \/ (Y \/ Z \/ V) proof X \/ Y \/ Z \/ V = X \/ Y \/ (Z \/ V) by Th4 .= X \/ (Y \/ (Z \/ V)) by Th4 .= X \/ (Y \/ Z \/ V) by Th4; hence thesis; end; theorem for A,B,C,D being set st A misses D & B misses D & C misses D holds A \/ B \/ C misses D proof let A,B,C,D be set; assume A misses D & B misses D; then A1: A \/ B misses D by Th70; assume C misses D; hence thesis by A1,Th70; end; theorem not A c< {} proof assume A1: A c< {}; then A c= {} by XBOOLE_0:def 8; hence contradiction by A1,Th3; end; theorem X /\ (Y /\ Z) = (X /\ Y) /\ (X /\ Z) proof thus X /\ (Y /\ Z) = X /\ X /\ Y /\ Z by Th16 .= X /\ (X /\ Y) /\ Z by Th16 .= (X /\ Y) /\ (X /\ Z) by Th16; end; theorem for P,G,C being set st C c= G holds P \ C = (P \ G) \/ (P /\ (G \ C)) proof let P,G,C be set; assume C c= G; then A1: P \ G c= P \ C by Th34; thus P \ C c= (P \ G) \/ (P /\ (G \ C)) proof let x be set; assume x in P \ C; then x in P & not x in G or x in P & x in G & not x in C by XBOOLE_0:def 5; then x in P \ G or x in P & x in G \ C by XBOOLE_0:def 5; then x in P \ G or x in P /\ (G \ C) by XBOOLE_0:def 4; hence thesis by XBOOLE_0:def 3; end; P /\ (G \ C) = (P /\ G) \ C & (P /\ G) \ C c= P \ C by Th17,Th33,Th49; hence thesis by A1,Th8; end; begin reserve x,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,y,X,Z for set; Lm1: x in union({X,{y}}) iff x in X or x=y proof A1: x in union({X,{y}}) implies x in X or x in {y} proof assume x in union({X,{y}}); then ex Z st x in Z & Z in {X,{y}} by TARSKI:def 4; hence thesis by TARSKI:def 2; end; A2: x in {y} iff x=y by TARSKI:def 1; X in {X,{y}} & {y} in {X,{y}} by TARSKI:def 2; hence thesis by A1,A2,TARSKI:def 4; end; definition let x1,x2,x3; func { x1,x2,x3 } -> set means :Def1: x in it iff x=x1 or x=x2 or x=x3; existence proof take union({{x1,x2},{x3}}); let x; x in { x1,x2 } iff x = x1 or x = x2 by TARSKI:def 2; hence thesis by Lm1; end; uniqueness proof defpred P[set] means $1=x1 or $1=x2 or $1=x3; for X1,X2 being set st (for x being set holds x in X1 iff P[x]) & (for x being set holds x in X2 iff P[x]) holds X1 = X2 from XBOOLE_0:sch 3; hence thesis; end; end; definition let x1,x2,x3,x4; func { x1,x2,x3,x4 } -> set means :Def2: x in it iff x=x1 or x=x2 or x=x3 or x=x4; existence proof take union({{x1,x2,x3},{x4}}); let x; x in { x1,x2,x3 } iff x = x1 or x = x2 or x = x3 by Def1; hence thesis by Lm1; end; uniqueness proof defpred P[set] means $1=x1 or $1=x2 or $1=x3 or $1=x4; for X1,X2 being set st (for x being set holds x in X1 iff P[x]) & (for x being set holds x in X2 iff P[x]) holds X1 = X2 from XBOOLE_0:sch 3; hence thesis; end; end; definition let x1,x2,x3,x4,x5; func { x1,x2,x3,x4,x5 } -> set means :Def3: x in it iff x=x1 or x=x2 or x=x3 or x=x4 or x=x5; existence proof take union({{x1,x2,x3,x4},{x5}}); let x; x in { x1,x2,x3,x4 } iff x = x1 or x = x2 or x = x3 or x = x4 by Def2; hence thesis by Lm1; end; uniqueness proof defpred P[set] means $1=x1 or $1=x2 or $1=x3 or $1=x4 or $1=x5; for X1,X2 being set st (for x being set holds x in X1 iff P[x]) & (for x being set holds x in X2 iff P[x]) holds X1 = X2 from XBOOLE_0:sch 3; hence thesis; end; end; definition let x1,x2,x3,x4,x5,x6; func { x1,x2,x3,x4,x5,x6 } -> set means :Def4: x in it iff x=x1 or x=x2 or x =x3 or x=x4 or x=x5 or x=x6; existence proof take union({{x1,x2,x3,x4,x5},{x6}}); let x; x in {x1,x2,x3,x4,x5} iff x=x1 or x=x2 or x=x3 or x=x4 or x=x5 by Def3; hence thesis by Lm1; end; uniqueness proof defpred P[set] means $1=x1 or $1=x2 or $1=x3 or $1=x4 or $1=x5 or $1=x6; for X1,X2 being set st (for x being set holds x in X1 iff P[x]) & (for x being set holds x in X2 iff P[x]) holds X1 = X2 from XBOOLE_0:sch 3; hence thesis; end; end; definition let x1,x2,x3,x4,x5,x6,x7; func { x1,x2,x3,x4,x5,x6,x7 } -> set means :Def5: x in it iff x=x1 or x=x2 or x=x3 or x=x4 or x=x5 or x=x6 or x=x7; existence proof take union({{x1,x2,x3,x4,x5,x6},{x7}}); let x; x in { x1,x2,x3,x4,x5,x6 } iff x=x1 or x=x2 or x=x3 or x=x4 or x=x5 or x=x6 by Def4; hence thesis by Lm1; end; uniqueness proof defpred P[set] means $1=x1 or $1=x2 or $1=x3 or $1=x4 or $1=x5 or $1=x6 or $1=x7; for X1,X2 being set st (for x being set holds x in X1 iff P[x]) & (for x being set holds x in X2 iff P[x]) holds X1 = X2 from XBOOLE_0:sch 3; hence thesis; end; end; definition let x1,x2,x3,x4,x5,x6,x7,x8; func { x1,x2,x3,x4,x5,x6,x7,x8 } -> set means :Def6: x in it iff x=x1 or x= x2 or x=x3 or x=x4 or x=x5 or x=x6 or x=x7 or x=x8; existence proof take union({{x1,x2,x3,x4,x5,x6,x7},{x8}}); let x; x in { x1,x2,x3,x4,x5,x6,x7 } iff x=x1 or x=x2 or x=x3 or x=x4 or x=x5 or x = x6 or x=x7 by Def5; hence thesis by Lm1; end; uniqueness proof defpred P[set] means $1=x1 or $1=x2 or $1=x3 or $1=x4 or $1=x5 or $1=x6 or $1=x7 or $1=x8; for X1,X2 being set st (for x being set holds x in X1 iff P[x]) & (for x being set holds x in X2 iff P[x]) holds X1 = X2 from XBOOLE_0:sch 3; hence thesis; end; end; definition let x1,x2,x3,x4,x5,x6,x7,x8,x9; func { x1,x2,x3,x4,x5,x6,x7,x8,x9 } -> set means :Def7: x in it iff x=x1 or x=x2 or x=x3 or x=x4 or x=x5 or x=x6 or x=x7 or x=x8 or x=x9; existence proof take union({{x1,x2,x3,x4,x5,x6,x7,x8},{x9}}); let x; x in { x1,x2,x3,x4,x5,x6,x7,x8 } iff x=x1 or x=x2 or x=x3 or x=x4 or x =x5 or x = x6 or x=x7 or x=x8 by Def6; hence thesis by Lm1; end; uniqueness proof defpred P[set] means $1=x1 or $1=x2 or $1=x3 or $1=x4 or $1=x5 or $1=x6 or $1=x7 or $1=x8 or $1=x9; thus for X, Y being set st (for x being set holds x in X iff P[x]) & (for x being set holds x in Y iff P[x]) holds X = Y from XBOOLE_0:sch 3; end; end; definition let x1,x2,x3,x4,x5,x6,x7,x8,x9,x10; func { x1,x2,x3,x4,x5,x6,x7,x8,x9,x10 } -> set means :Def8: x in it iff x=x1 or x=x2 or x=x3 or x=x4 or x=x5 or x=x6 or x=x7 or x=x8 or x=x9 or x=x10; existence proof take union({{x1,x2,x3,x4,x5,x6,x7,x8,x9},{x10}}); let x; x in { x1,x2,x3,x4,x5,x6,x7,x8,x9 } iff x=x1 or x=x2 or x=x3 or x=x4 or x=x5 or x = x6 or x=x7 or x=x8 or x=x9 by Def7; hence thesis by Lm1; end; uniqueness proof defpred P[set] means $1=x1 or $1=x2 or $1=x3 or $1=x4 or $1=x5 or $1=x6 or $1=x7 or $1=x8 or $1=x9 or $1=x10; thus for X, Y being set st (for x being set holds x in X iff P[x]) & (for x being set holds x in Y iff P[x]) holds X = Y from XBOOLE_0:sch 3; end; end; theorem Th1: { x1,x2 } = { x1 } \/ { x2 } proof now let x; x in { x1,x2 } iff x=x1 or x=x2 by TARSKI:def 2; then x in { x1,x2 } iff x in { x1 } or x in { x2 } by TARSKI:def 1; hence x in { x1,x2 } iff x in { x1 } \/ { x2 } by XBOOLE_0:def 3; end; hence thesis by TARSKI:1; end; theorem Th2: { x1,x2,x3 } = { x1 } \/ { x2,x3 } proof now let x; x in { x1,x2,x3 } iff x=x1 or x=x2 or x=x3 by Def1; then x in { x1,x2,x3 } iff x in { x1 } or x in { x2,x3 } by TARSKI:def 1 ,def 2; hence x in { x1,x2,x3 } iff x in { x1 } \/ { x2,x3 } by XBOOLE_0:def 3; end; hence thesis by TARSKI:1; end; theorem Th3: { x1,x2,x3 } = { x1,x2 } \/ { x3 } proof thus { x1,x2,x3 } = { x1 } \/ { x2,x3 } by Th2 .= { x1 } \/ ({ x2 } \/ { x3 }) by Th1 .= { x1 } \/ { x2 } \/ { x3 } by XBOOLE_1:4 .= { x1,x2 } \/ { x3 } by Th1; end; Lm2: { x1,x2,x3,x4 } = { x1,x2 } \/ { x3,x4 } proof now let x; x in { x1,x2,x3,x4 } iff x=x1 or x=x2 or x=x3 or x=x4 by Def2; then x in { x1,x2,x3,x4 } iff x in { x1,x2 } or x in { x3,x4 } by TARSKI:def 2; hence x in { x1,x2,x3,x4 } iff x in { x1,x2 } \/ { x3,x4 } by XBOOLE_0:def 3; end; hence thesis by TARSKI:1; end; theorem Th4: { x1,x2,x3,x4 } = { x1 } \/ { x2,x3,x4 } proof thus { x1,x2,x3,x4 } = { x1,x2 } \/ { x3,x4 } by Lm2 .= { x1 } \/ { x2 } \/ { x3,x4 } by Th1 .= { x1 } \/ ({ x2 } \/ { x3,x4 }) by XBOOLE_1:4 .= { x1 } \/ { x2,x3,x4 } by Th2; end; theorem { x1,x2,x3,x4 } = { x1,x2 } \/ { x3,x4 } by Lm2; theorem Th6: { x1,x2,x3,x4 } = { x1,x2,x3 } \/ { x4 } proof thus { x1,x2,x3,x4 } = { x1,x2 } \/ { x3,x4 } by Lm2 .= { x1,x2 } \/ ({ x3 } \/ { x4 }) by Th1 .= { x1,x2 } \/ { x3 } \/ { x4 } by XBOOLE_1:4 .= { x1,x2,x3 } \/ { x4 } by Th3; end; Lm3: { x1,x2,x3,x4,x5 } = { x1,x2,x3 } \/ { x4,x5 } proof now let x; x in { x1,x2,x3,x4,x5 } iff x=x1 or x=x2 or x=x3 or x=x4 or x=x5 by Def3; then x in { x1,x2,x3,x4,x5 } iff x in { x1,x2,x3 } or x in { x4,x5 } by Def1,TARSKI:def 2; hence x in { x1,x2,x3,x4,x5 } iff x in { x1,x2,x3 } \/ { x4,x5 } by XBOOLE_0:def 3; end; hence thesis by TARSKI:1; end; theorem Th7: { x1,x2,x3,x4,x5 } = { x1 } \/ { x2,x3,x4,x5 } proof thus { x1,x2,x3,x4,x5 } = { x1,x2,x3 } \/ { x4,x5 } by Lm3 .= { x1 } \/ { x2,x3 } \/ { x4,x5 } by Th2 .= { x1 } \/ ({ x2,x3 } \/ { x4,x5 }) by XBOOLE_1:4 .= { x1 } \/ { x2,x3,x4,x5 } by Lm2; end; theorem Th8: { x1,x2,x3,x4,x5 } = { x1,x2 } \/ { x3,x4,x5 } proof thus { x1,x2,x3,x4,x5 } = { x1,x2,x3 } \/ { x4,x5 } by Lm3 .= { x1,x2 } \/ { x3 } \/ { x4,x5 } by Th3 .= { x1,x2 } \/ ({ x3 } \/ { x4,x5 }) by XBOOLE_1:4 .= { x1,x2 } \/ { x3,x4,x5 } by Th2; end; theorem { x1,x2,x3,x4,x5 } = { x1,x2,x3 } \/ { x4,x5 } by Lm3; theorem Th10: { x1,x2,x3,x4,x5 } = { x1,x2,x3,x4 } \/ { x5 } proof thus { x1,x2,x3,x4,x5 } = { x1,x2,x3 } \/ { x4,x5 } by Lm3 .= { x1,x2,x3 } \/ ({ x4 } \/ { x5 }) by Th1 .= { x1,x2,x3 } \/ { x4 } \/ { x5 } by XBOOLE_1:4 .= { x1,x2,x3,x4 } \/ { x5 } by Th6; end; Lm4: { x1,x2,x3,x4,x5,x6 } = { x1,x2,x3 } \/ { x4,x5,x6 } proof now let x; x in { x1,x2,x3,x4,x5,x6 } iff x=x1 or x=x2 or x=x3 or x=x4 or x=x5 or x=x6 by Def4; then x in { x1,x2,x3,x4,x5,x6 } iff x in { x1,x2,x3 } or x in { x4,x5,x6 } by Def1; hence x in { x1,x2,x3,x4,x5,x6 } iff x in { x1,x2,x3 } \/ { x4,x5,x6 } by XBOOLE_0:def 3; end; hence thesis by TARSKI:1; end; theorem Th11: { x1,x2,x3,x4,x5,x6 } = { x1 } \/ { x2,x3,x4,x5,x6 } proof thus { x1,x2,x3,x4,x5,x6 } = { x1,x2,x3 } \/ { x4,x5,x6 } by Lm4 .= { x1 } \/ { x2,x3 } \/ { x4,x5,x6 } by Th2 .= { x1 } \/ ({ x2,x3 } \/ { x4,x5,x6 }) by XBOOLE_1:4 .= { x1 } \/ { x2,x3,x4,x5,x6 } by Th8; end; theorem Th12: { x1,x2,x3,x4,x5,x6 } = { x1,x2 } \/ { x3,x4,x5,x6 } proof thus { x1,x2,x3,x4,x5,x6 } = { x1,x2,x3 } \/ { x4,x5,x6 } by Lm4 .= { x1,x2 } \/ { x3 } \/ { x4,x5,x6 } by Th3 .= { x1,x2 } \/ ({ x3 } \/ { x4,x5,x6 }) by XBOOLE_1:4 .= { x1,x2 } \/ { x3,x4,x5,x6 } by Th4; end; theorem { x1,x2,x3,x4,x5,x6 } = { x1,x2,x3 } \/ { x4,x5,x6 } by Lm4; theorem Th14: { x1,x2,x3,x4,x5,x6 } = { x1,x2,x3,x4 } \/ { x5,x6 } proof thus { x1,x2,x3,x4,x5,x6 } = { x1,x2,x3 } \/ { x4,x5,x6 } by Lm4 .= { x1,x2,x3 } \/ ({ x4 } \/ { x5,x6 }) by Th2 .= { x1,x2,x3 } \/ { x4 } \/ { x5,x6 } by XBOOLE_1:4 .= { x1,x2,x3,x4 } \/ { x5,x6 } by Th6; end; theorem { x1,x2,x3,x4,x5,x6 } = { x1,x2,x3,x4,x5 } \/ { x6 } proof thus { x1,x2,x3,x4,x5,x6 } = { x1,x2,x3 } \/ { x4,x5,x6 } by Lm4 .= { x1,x2,x3 } \/ ({ x4,x5 } \/ { x6 }) by Th3 .= { x1,x2,x3 } \/ { x4,x5 } \/ { x6 } by XBOOLE_1:4 .= { x1,x2,x3,x4,x5 } \/ { x6 } by Lm3; end; Lm5: { x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4 } \/ { x5,x6,x7 } proof now let x; A1: x in { x5,x6,x7 } iff x=x5 or x=x6 or x=x7 by Def1; x in { x1,x2,x3,x4 } iff x=x1 or x=x2 or x=x3 or x=x4 by Def2; hence x in { x1,x2,x3,x4,x5,x6,x7 } iff x in { x1,x2,x3,x4 } \/ { x5,x6,x7 } by A1,Def5,XBOOLE_0:def 3; end; hence thesis by TARSKI:1; end; theorem Th16: { x1,x2,x3,x4,x5,x6,x7 } = { x1 } \/ { x2,x3,x4,x5,x6,x7 } proof thus { x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4 } \/ { x5,x6,x7 } by Lm5 .= { x1 } \/ { x2,x3,x4 } \/ { x5,x6,x7 } by Th4 .= { x1 } \/ ({ x2,x3,x4 } \/ { x5,x6,x7 }) by XBOOLE_1:4 .= { x1 } \/ { x2,x3,x4,x5,x6,x7 } by Lm4; end; theorem Th17: { x1,x2,x3,x4,x5,x6,x7 } = { x1,x2 } \/ { x3,x4,x5,x6,x7 } proof thus { x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4 } \/ { x5,x6,x7 } by Lm5 .= { x1,x2 } \/ { x3,x4 } \/ { x5,x6,x7 } by Lm2 .= { x1,x2 } \/ ({ x3,x4 } \/ { x5,x6,x7 }) by XBOOLE_1:4 .= { x1,x2 } \/ { x3,x4,x5,x6,x7 } by Th8; end; theorem Th18: { x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3 } \/ { x4,x5,x6,x7 } proof thus { x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4 } \/ { x5,x6,x7 } by Lm5 .= { x1,x2,x3 } \/ { x4 } \/ { x5,x6,x7 } by Th6 .= { x1,x2,x3 } \/ ({ x4 } \/ { x5,x6,x7 }) by XBOOLE_1:4 .= { x1,x2,x3 } \/ { x4,x5,x6,x7 } by Th4; end; theorem { x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4 } \/ { x5,x6,x7 } by Lm5; theorem { x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4,x5 } \/ { x6,x7 } proof thus { x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4 } \/ { x5,x6,x7 } by Lm5 .= { x1,x2,x3,x4 } \/ ({ x5 } \/ { x6,x7 }) by Th2 .= { x1,x2,x3,x4 } \/ { x5 } \/ { x6,x7 } by XBOOLE_1:4 .= { x1,x2,x3,x4,x5 } \/ { x6,x7 } by Th10; end; theorem { x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4,x5,x6 } \/ { x7 } proof thus { x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4 } \/ { x5,x6,x7 } by Lm5 .= { x1,x2,x3,x4 } \/ ({ x5,x6 } \/ { x7 }) by Th3 .= { x1,x2,x3,x4 } \/ { x5,x6 } \/ { x7 } by XBOOLE_1:4 .= { x1,x2,x3,x4,x5,x6 } \/ { x7 } by Th14; end; Lm6: { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8 } proof now let x; A1: x in { x5,x6,x7,x8 } iff x=x5 or x=x6 or x=x7 or x=x8 by Def2; x in { x1,x2,x3,x4 } iff x=x1 or x=x2 or x=x3 or x=x4 by Def2; hence x in { x1,x2,x3,x4,x5,x6,x7,x8 } iff x in { x1,x2,x3,x4 } \/ { x5,x6, x7,x8 } by A1,Def6,XBOOLE_0:def 3; end; hence thesis by TARSKI:1; end; theorem { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1 } \/ { x2,x3,x4,x5,x6,x7,x8 } proof thus { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8 } by Lm6 .= { x1 } \/ { x2,x3,x4 } \/ { x5,x6,x7,x8 } by Th4 .= { x1 } \/ ({ x2,x3,x4 } \/ { x5,x6,x7,x8 }) by XBOOLE_1:4 .= { x1 } \/ { x2,x3,x4,x5,x6,x7,x8 } by Th18; end; theorem Th23: { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2 } \/ { x3,x4,x5,x6,x7,x8 } proof thus { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8 } by Lm6 .= { x1,x2 } \/ { x3,x4 } \/ { x5,x6,x7,x8 } by Lm2 .= { x1,x2 } \/ ({ x3,x4 } \/ { x5,x6,x7,x8 }) by XBOOLE_1:4 .= { x1,x2 } \/ { x3,x4,x5,x6,x7,x8 } by Th12; end; theorem Th24: { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3 } \/ { x4,x5,x6,x7,x8 } proof thus { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8 } by Lm6 .= { x1,x2,x3 } \/ { x4 } \/ { x5,x6,x7,x8 } by Th6 .= { x1,x2,x3 } \/ ({ x4 } \/ { x5,x6,x7,x8 }) by XBOOLE_1:4 .= { x1,x2,x3 } \/ { x4,x5,x6,x7,x8 } by Th7; end; theorem { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8 } by Lm6; theorem { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4,x5 } \/ { x6,x7,x8 } proof thus { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8 } by Lm6 .= { x1,x2,x3,x4 } \/ ({x5 } \/ { x6,x7,x8 }) by Th4 .= { x1,x2,x3,x4 } \/ {x5 } \/ { x6,x7,x8 } by XBOOLE_1:4 .= { x1,x2,x3,x4,x5 } \/ { x6,x7,x8 } by Th10; end; theorem { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4,x5,x6 } \/ { x7,x8 } proof thus { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8 } by Lm6 .= { x1,x2,x3,x4 } \/ ({ x5,x6 } \/ { x7,x8 }) by Lm2 .= { x1,x2,x3,x4 } \/ { x5,x6 } \/ { x7,x8 } by XBOOLE_1:4 .= { x1,x2,x3,x4,x5,x6 } \/ { x7,x8 } by Th14; end; theorem { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4,x5,x6,x7 } \/ { x8 } proof thus { x1,x2,x3,x4,x5,x6,x7,x8 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8 } by Lm6 .= { x1,x2,x3,x4 } \/ ({ x5,x6,x7 } \/ { x8 }) by Th6 .= { x1,x2,x3,x4 } \/ { x5,x6,x7 } \/ { x8 } by XBOOLE_1:4 .= { x1,x2,x3,x4,x5,x6,x7 } \/ { x8 } by Lm5; end; theorem Th29: { x1,x1 } = { x1 } proof now let x; x in { x1,x1 } iff x = x1 by TARSKI:def 2; hence x in { x1,x1 } iff x in { x1 } by TARSKI:def 1; end; hence thesis by TARSKI:1; end; theorem Th30: { x1,x1,x2 } = { x1,x2 } proof thus { x1,x1,x2 } = { x1,x1 } \/ { x2 } by Th3 .= { x1 } \/ { x2 } by Th29 .= { x1,x2 } by Th1; end; theorem Th31: { x1,x1,x2,x3 } = { x1,x2,x3 } proof thus { x1,x1,x2,x3 } = { x1,x1 } \/ { x2,x3 } by Lm2 .= { x1 } \/ { x2,x3 } by Th29 .= { x1,x2,x3 } by Th2; end; theorem Th32: { x1,x1,x2,x3,x4 } = { x1,x2,x3,x4 } proof thus { x1,x1,x2,x3,x4 } = { x1,x1 } \/ { x2,x3,x4 } by Th8 .= { x1 } \/ { x2,x3,x4 } by Th29 .= { x1,x2,x3,x4 } by Th4; end; theorem Th33: { x1,x1,x2,x3,x4,x5 } = { x1,x2,x3,x4,x5 } proof thus { x1,x1,x2,x3,x4,x5 } = { x1,x1 } \/ { x2,x3,x4,x5 } by Th12 .= { x1 } \/ { x2,x3,x4,x5 } by Th29 .= { x1,x2,x3,x4,x5 } by Th7; end; theorem Th34: { x1,x1,x2,x3,x4,x5,x6 } = { x1,x2,x3,x4,x5,x6 } proof thus { x1,x1,x2,x3,x4,x5,x6 } = { x1,x1 } \/ { x2,x3,x4,x5,x6 } by Th17 .= { x1 } \/ { x2,x3,x4,x5,x6 } by Th29 .= { x1,x2,x3,x4,x5,x6 } by Th11; end; theorem Th35: { x1,x1,x2,x3,x4,x5,x6,x7 } = { x1,x2,x3,x4,x5,x6,x7 } proof thus { x1,x1,x2,x3,x4,x5,x6,x7 } = { x1,x1 } \/ { x2,x3,x4,x5,x6,x7 } by Th23 .= { x1 } \/ { x2,x3,x4,x5,x6,x7 } by Th29 .= { x1,x2,x3,x4,x5,x6,x7 } by Th16; end; theorem { x1,x1,x1 } = { x1 } proof thus { x1,x1,x1 } = { x1,x1 } by Th30 .= { x1 } by Th29; end; theorem Th37: { x1,x1,x1,x2 } = { x1,x2 } proof thus { x1,x1,x1,x2 } = { x1,x1,x2 } by Th31 .= { x1,x2 } by Th30; end; theorem Th38: { x1,x1,x1,x2,x3 } = { x1,x2,x3 } proof thus { x1,x1,x1,x2,x3 } = { x1,x1,x2,x3 } by Th32 .= { x1,x2,x3 } by Th31; end; theorem Th39: { x1,x1,x1,x2,x3,x4 } = { x1,x2,x3,x4 } proof thus { x1,x1,x1,x2,x3,x4 } = { x1,x1,x2,x3,x4 } by Th33 .= { x1,x2,x3,x4 } by Th32; end; theorem Th40: { x1,x1,x1,x2,x3,x4,x5 } = { x1,x2,x3,x4,x5 } proof thus { x1,x1,x1,x2,x3,x4,x5 } = { x1,x1,x2,x3,x4,x5 } by Th34 .= { x1,x2,x3,x4,x5 } by Th33; end; theorem Th41: { x1,x1,x1,x2,x3,x4,x5,x6 } = { x1,x2,x3,x4,x5,x6 } proof thus { x1,x1,x1,x2,x3,x4,x5,x6 } = { x1,x1,x2,x3,x4,x5,x6 } by Th35 .= { x1,x2,x3,x4,x5,x6 } by Th34; end; theorem { x1,x1,x1,x1 } = { x1 } proof thus { x1,x1,x1,x1 } = { x1,x1 } by Th37 .= { x1 } by Th29; end; theorem Th43: { x1,x1,x1,x1,x2 } = { x1,x2 } proof thus { x1,x1,x1,x1,x2 } = { x1,x1,x2 } by Th38 .= { x1,x2 } by Th30; end; theorem Th44: { x1,x1,x1,x1,x2,x3 } = { x1,x2,x3 } proof thus { x1,x1,x1,x1,x2,x3 } = { x1,x1,x2,x3 } by Th39 .= { x1,x2,x3 } by Th31; end; theorem Th45: { x1,x1,x1,x1,x2,x3,x4 } = { x1,x2,x3,x4 } proof thus { x1,x1,x1,x1,x2,x3,x4 } = { x1,x1,x2,x3,x4 } by Th40 .= { x1,x2,x3,x4 } by Th32; end; theorem Th46: { x1,x1,x1,x1,x2,x3,x4,x5 } = { x1,x2,x3,x4,x5 } proof thus { x1,x1,x1,x1,x2,x3,x4,x5 } = { x1,x1,x2,x3,x4,x5 } by Th41 .= { x1,x2,x3,x4,x5 } by Th33; end; theorem { x1,x1,x1,x1,x1 } = { x1 } proof thus { x1,x1,x1,x1,x1 } = { x1,x1 } by Th43 .= { x1 } by Th29; end; theorem Th48: { x1,x1,x1,x1,x1,x2 } = { x1,x2 } proof thus { x1,x1,x1,x1,x1,x2 } = { x1,x1,x2 } by Th44 .= { x1,x2 } by Th30; end; theorem Th49: { x1,x1,x1,x1,x1,x2,x3 } = { x1,x2,x3 } proof thus { x1,x1,x1,x1,x1,x2,x3 } = { x1,x1,x2,x3 } by Th45 .= { x1,x2,x3 } by Th31; end; theorem Th50: { x1,x1,x1,x1,x1,x2,x3,x4 } = { x1,x2,x3,x4 } proof thus { x1,x1,x1,x1,x1,x2,x3,x4 } = { x1,x1,x2,x3,x4 } by Th46 .= { x1,x2,x3,x4 } by Th32; end; theorem { x1,x1,x1,x1,x1,x1 } = { x1 } proof thus { x1,x1,x1,x1,x1,x1 } = { x1,x1 } by Th48 .= { x1 } by Th29; end; theorem Th52: { x1,x1,x1,x1,x1,x1,x2 } = { x1,x2 } proof thus { x1,x1,x1,x1,x1,x1,x2 } = { x1,x1,x2 } by Th49 .= { x1,x2 } by Th30; end; theorem Th53: { x1,x1,x1,x1,x1,x1,x2,x3 } = { x1,x2,x3 } proof thus { x1,x1,x1,x1,x1,x1,x2,x3 } = { x1,x1,x2,x3 } by Th50 .= { x1,x2,x3 } by Th31; end; theorem { x1,x1,x1,x1,x1,x1,x1 } = { x1 } proof thus { x1,x1,x1,x1,x1,x1,x1 } = { x1,x1 } by Th52 .= { x1 } by Th29; end; theorem Th55: { x1,x1,x1,x1,x1,x1,x1,x2 } = { x1,x2 } proof thus { x1,x1,x1,x1,x1,x1,x1,x2 } = { x1,x1,x2 } by Th53 .= { x1,x2 } by Th30; end; theorem { x1,x1,x1,x1,x1,x1,x1,x1 } = { x1 } proof thus { x1,x1,x1,x1,x1,x1,x1,x1 } = { x1,x1 } by Th55 .= { x1 } by Th29; end; theorem Th57: { x1,x2,x3 } = { x1,x3,x2 } proof thus { x1,x2,x3 } = { x1 } \/ { x2,x3 } by Th2 .= { x1,x3,x2 } by Th2; end; theorem Th58: { x1,x2,x3 } = { x2,x1,x3 } proof thus { x1,x2,x3 } = { x1,x2 } \/ { x3 } by Th3 .= { x2,x1,x3 } by Th3; end; theorem Th59: { x1,x2,x3 } = { x2,x3,x1 } proof thus { x1,x2,x3 } = { x2,x3 } \/ { x1 } by Th2 .= { x2,x3,x1 } by Th3; end; theorem Th60: { x1,x2,x3 } = { x3,x2,x1 } proof thus { x1,x2,x3 } = { x3,x1,x2 } by Th59 .= { x3,x2,x1 } by Th57; end; theorem Th61: { x1,x2,x3,x4 } = { x1,x2,x4,x3 } proof thus { x1,x2,x3,x4 } = { x1 } \/ { x2,x3,x4 } by Th4 .= { x1 } \/ { x2,x4,x3 } by Th57 .= { x1,x2,x4,x3 } by Th4; end; theorem { x1,x2,x3,x4 } = { x1,x3,x2,x4 } proof thus { x1,x2,x3,x4 } = { x1 } \/ { x2,x3,x4 } by Th4 .= { x1 } \/ { x3,x2,x4 } by Th58 .= { x1,x3,x2,x4 } by Th4; end; theorem Th63: { x1,x2,x3,x4 } = { x1,x3,x4,x2 } proof thus { x1,x2,x3,x4 } = { x1 } \/ { x2,x3,x4 } by Th4 .= { x1 } \/ { x3,x4,x2 } by Th59 .= { x1,x3,x4,x2 } by Th4; end; theorem Th64: { x1,x2,x3,x4 } = { x1,x4,x3,x2 } proof thus { x1,x2,x3,x4 } = { x1 } \/ { x2,x3,x4 } by Th4 .= { x1 } \/ { x4,x3,x2 } by Th60 .= { x1,x4,x3,x2 } by Th4; end; theorem Th65: { x1,x2,x3,x4 } = { x2,x1,x3,x4 } proof thus { x1,x2,x3,x4 } = { x1,x2,x3 } \/ { x4 } by Th6 .= { x2,x1,x3 } \/ { x4 } by Th58 .= { x2,x1,x3,x4 } by Th6; end; Lm7: { x1,x2,x3,x4 } = { x2,x3,x1,x4 } proof thus { x1,x2,x3,x4 } = { x1,x2,x3 } \/ { x4 } by Th6 .= { x2,x3,x1 } \/ { x4 } by Th59 .= { x2,x3,x1,x4 } by Th6; end; theorem { x1,x2,x3,x4 } = { x2,x1,x4,x3 } proof thus { x1,x2,x3,x4 } = { x2,x3,x1,x4 } by Lm7 .= { x2,x1,x4,x3 } by Th63; end; theorem { x1,x2,x3,x4 } = { x2,x3,x1,x4 } by Lm7; theorem { x1,x2,x3,x4 } = { x2,x3,x4,x1 } proof thus { x1,x2,x3,x4 } = { x2,x3,x1,x4 } by Lm7 .= { x2,x3,x4,x1 } by Th61; end; theorem Th69: { x1,x2,x3,x4 } = { x2,x4,x1,x3 } proof thus { x1,x2,x3,x4 } = { x2,x3,x1,x4 } by Lm7 .= { x2,x4,x1,x3 } by Th64; end; theorem { x1,x2,x3,x4 } = { x2,x4,x3,x1 } proof thus { x1,x2,x3,x4 } = { x2,x3,x1,x4 } by Lm7 .= { x2,x4,x3,x1 } by Th63; end; Lm8: { x1,x2,x3,x4 } = { x3,x2,x1,x4 } proof thus { x1,x2,x3,x4 } = { x1,x2,x3 } \/ { x4 } by Th6 .= { x3,x2,x1 } \/ { x4 } by Th60 .= { x3,x2,x1,x4 } by Th6; end; theorem { x1,x2,x3,x4 } = { x3,x2,x1,x4 } by Lm8; theorem { x1,x2,x3,x4 } = { x3,x2,x4,x1 } proof thus { x1,x2,x3,x4 } = { x3,x2,x1,x4 } by Lm8 .= { x3,x2,x4,x1 } by Th61; end; theorem { x1,x2,x3,x4 } = { x3,x4,x1,x2 } proof thus { x1,x2,x3,x4 } = { x3,x2,x1,x4 } by Lm8 .= { x3,x4,x1,x2 } by Th64; end; theorem Th74: { x1,x2,x3,x4 } = { x3,x4,x2,x1 } proof thus { x1,x2,x3,x4 } = { x3,x2,x1,x4 } by Lm8 .= { x3,x4,x2,x1 } by Th63; end; theorem { x1,x2,x3,x4 } = { x4,x2,x3,x1 } proof thus { x1,x2,x3,x4 } = { x3,x4,x2,x1 } by Th74 .= { x4,x2,x3,x1 } by Lm7; end; theorem { x1,x2,x3,x4 } = { x4,x3,x2,x1 } proof thus { x1,x2,x3,x4 } = { x3,x4,x2,x1 } by Th74 .= { x4,x3,x2,x1 } by Th65; end; Lm9: { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8,x9 } proof now let x; A1: x in { x5,x6,x7,x8,x9 } iff x=x5 or x=x6 or x=x7 or x=x8 or x=x9 by Def3; x in { x1,x2,x3,x4 } iff x=x1 or x=x2 or x=x3 or x=x4 by Def2; hence x in { x1,x2,x3,x4,x5,x6,x7,x8,x9 } iff x in { x1,x2,x3,x4 } \/ { x5, x6,x7,x8,x9 } by A1,Def7,XBOOLE_0:def 3; end; hence thesis by TARSKI:1; end; theorem { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1 } \/ { x2,x3,x4,x5,x6,x7,x8,x9 } proof thus { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8,x9 } by Lm9 .= ({ x1 } \/ { x2,x3,x4 }) \/ { x5,x6,x7,x8,x9 } by Th4 .= { x1 } \/ ({ x2,x3,x4 } \/ { x5,x6,x7,x8,x9 }) by XBOOLE_1:4 .= { x1 } \/ { x2,x3,x4,x5,x6,x7,x8,x9 } by Th24; end; theorem { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2 } \/ { x3,x4,x5,x6,x7,x8,x9 } proof thus { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8,x9 } by Lm9 .= { x1,x2 } \/ { x3,x4 } \/ { x5,x6,x7,x8,x9 } by Lm2 .= { x1,x2 } \/ ({ x3,x4 } \/ { x5,x6,x7,x8,x9 }) by XBOOLE_1:4 .= { x1,x2 } \/ { x3,x4,x5,x6,x7,x8,x9 } by Th17; end; theorem { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3 } \/ { x4,x5,x6,x7,x8,x9 } proof thus { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8,x9 } by Lm9 .= { x1,x2,x3 } \/ { x4 } \/ { x5,x6,x7,x8,x9 } by Th6 .= { x1,x2,x3 } \/ ({ x4 } \/ { x5,x6,x7,x8,x9 }) by XBOOLE_1:4 .= { x1,x2,x3 } \/ { x4,x5,x6,x7,x8,x9 } by Th11; end; theorem { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8,x9 } by Lm9; theorem { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4,x5 } \/ { x6,x7,x8,x9 } proof thus { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8,x9 } by Lm9 .= { x1,x2,x3,x4 } \/ ({x5 } \/ { x6,x7,x8,x9 }) by Th7 .= { x1,x2,x3,x4 } \/ {x5 } \/ { x6,x7,x8,x9 } by XBOOLE_1:4 .= { x1,x2,x3,x4,x5 } \/ { x6,x7,x8,x9 } by Th10; end; theorem { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4,x5,x6 } \/ { x7,x8,x9 } proof thus { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8,x9 } by Lm9 .= { x1,x2,x3,x4 } \/ ({ x5,x6 } \/ { x7,x8,x9 }) by Th8 .= { x1,x2,x3,x4 } \/ { x5,x6 } \/ { x7,x8,x9 } by XBOOLE_1:4 .= { x1,x2,x3,x4,x5,x6 } \/ { x7,x8,x9 } by Th14; end; theorem { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4,x5,x6,x7 } \/ { x8,x9 } proof thus { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8,x9 } by Lm9 .= { x1,x2,x3,x4 } \/ ({ x5,x6,x7 } \/ { x8,x9 }) by Lm3 .= { x1,x2,x3,x4 } \/ { x5,x6,x7 } \/ { x8,x9 } by XBOOLE_1:4 .= { x1,x2,x3,x4,x5,x6,x7 } \/ { x8,x9 } by Lm5; end; theorem { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4,x5,x6,x7,x8 } \/ { x9 } proof thus { x1,x2,x3,x4,x5,x6,x7,x8,x9 } = { x1,x2,x3,x4 } \/ { x5,x6,x7,x8,x9 } by Lm9 .= { x1,x2,x3,x4 } \/ ({ x5,x6,x7,x8 } \/ { x9 }) by Th10 .= { x1,x2,x3,x4 } \/ { x5,x6,x7,x8 } \/ { x9 } by XBOOLE_1:4 .= { x1,x2,x3,x4,x5,x6,x7,x8 } \/ { x9 } by Lm6; end; theorem { x1,x2,x3,x4,x5,x6,x7,x8,x9,x10 } = { x1,x2,x3,x4,x5,x6,x7,x8,x9 } \/ { x10 } proof now let x; A1: x in {x10} iff x=x10 by TARSKI:def 1; x=x1 or x=x2 or x=x3 or x=x4 or x=x5 or x=x6 or x=x7 or x=x8 or x=x9 or x=x10 iff x in { x1,x2,x3,x4,x5,x6,x7,x8,x9 } or x = x10 by Def7; hence x in { x1,x2,x3,x4,x5,x6,x7,x8,x9,x10 } iff x in { x1,x2,x3,x4,x5,x6, x7,x8,x9 } \/ {x10} by A1,Def8,XBOOLE_0:def 3; end; hence thesis by TARSKI:1; end; begin theorem for x, y, z being set st x <> y & x <> z holds {x, y, z} \ {x} = {y, z } proof let x, y, z be set such that A1: x <> y & x <> z; hereby let a be set; assume A2: a in {x, y, z} \ {x}; then a in {x, y, z} by XBOOLE_0:def 5; then A3: a = x or a = y or a = z by Def1; not a in {x} by A2,XBOOLE_0:def 5; hence a in {y, z} by A3,TARSKI:def 1,def 2; end; let a be set; assume a in {y, z}; then A4: a = y or a = z by TARSKI:def 2; then A5: not a in {x} by A1,TARSKI:def 1; a in {x, y, z} by A4,Def1; hence thesis by A5,XBOOLE_0:def 5; end; theorem for x1,x2,x3 being set holds {x2,x1} \/ {x3,x1} = {x1,x2,x3} proof let x1,x2,x3 be set; thus {x2,x1} \/ {x3,x1} = {x2,x1,x3,x1} by Lm2 .= {x1,x1,x2,x3} by Th69 .= {x1,x2,x3} by Th31; end; begin reserve x,x1,x2,x3,x4,y,y1,y2,y3,y4,z,z1,z2,z2,z4 for set; definition let x; attr x is pair means :Dfx: ex x1,x2 st x = [x1,x2]; end; registration let x1,x2; cluster [x1,x2] -> pair; coherence by Dfx; end; reserve X,Y for set; Lx4: {x} = {y1,y2} implies x = y1 proof assume { x } = { y1,y2 }; then y1 in { x } by TARSKI:def 2; hence thesis by TARSKI:def 1; end; Lx5: {x} = {y1,y2} implies y1 = y2 proof assume A1: { x } = { y1,y2 }; then x = y1 by Lx4; hence thesis by A1,Lx4; end; Lx6: { x1,x2 } = { y1,y2 } implies x1 = y1 or x1 = y2 proof x1 in { x1,x2 } by TARSKI:def 2; hence thesis by TARSKI:def 2; end; theorem Th1: [x1,x2] = [y1,y2] implies x1 = y1 & x2 = y2 proof assume A1: [x1,x2] = [y1,y2]; per cases; suppose A3: y1 <> y2; then A4: {x1} <> {y1,y2} by Lx5; then {x1} = {y1} by A1,Lx6; then x1 in {y1} by TARSKI:def 1; hence A5: x1 = y1 by TARSKI:def 1; {y1,y2} = {x1,x2} by A1,A4,Lx6; hence thesis by A3,A5,Lx6; end; suppose A6: y1 = y2; then {{x1,x2},{x1}} = {{y1},{y1}} by A1,ENUMSET1:29 .= {{y1}} by ENUMSET1:29; then { y1 } = { x1,x2 } by Lx4; hence thesis by A6,Lx4; end; end; definition let x; assume x is pair; then consider x1,x2 such that A1: x = [x1,x2] by Dfx; func x`1 means :Def1: x = [y1,y2] implies it = y1; existence proof take x1; thus thesis by A1,Th1; end; uniqueness proof let z1,z2; assume that A2: x = [y1,y2] implies z1 = y1 and A3: x = [y1,y2] implies z2 = y1; thus z1 = x1 by A1,A2 .= z2 by A1,A3; end; func x`2 means :Def2: x = [y1,y2] implies it = y2; existence proof take x2; thus thesis by A1,Th1; end; uniqueness proof let z1,z2; assume that A4: x = [y1,y2] implies z1 = y2 and A5: x = [y1,y2] implies z2 = y2; thus z1 = x2 by A1,A4 .= z2 by A1,A5; end; end; registration let x1,x2; reduce [x1,x2]`1 to x1; reducibility by Def1; reduce [x1,x2]`2 to x2; reducibility by Def2; end; registration cluster pair for set; existence proof take [the set, the set], the set, the set; thus thesis; end; end; registration let x be pair set; reduce [x`1,x`2] to x; reducibility proof consider x1,x2 such that W: x = [x1,x2] by Dfx; thus [x`1,x`2] = [x1,x`2] by W,Def1 .= x by W,Def2; end; end; theorem for a,b being pair set st a`1 = b`1 & a`2 = b`2 holds a = b proof let a,b be pair set such that Z: a`1 = b`1 & a`2 = b`2; a = [a`1,a`2] & b = [b`1,b`2]; hence a = b by Z; end; begin definition let x1,x2,x3; func [x1,x2,x3] equals [[x1,x2],x3]; coherence; end; definition let x; attr x is triple means :Dfy: ex x1,x2,x3 st x = [x1,x2,x3]; end; registration let x1,x2,x3; cluster [x1,x2,x3] -> triple; coherence by Dfy; end; theorem Th3: [x1,x2,x3] = [y1,y2,y3] implies x1 = y1 & x2 = y2 & x3 = y3 proof assume A1: [x1,x2,x3] = [y1,y2,y3]; then [x1,x2] = [y1,y2] by Th1; hence thesis by A1,Th1; end; registration cluster triple for set; existence proof take [the set, the set, the set], the set, the set, the set; thus thesis; end; cluster triple -> pair for set; coherence proof let x be set; assume ex x1,x2,x3 st x = [x1,x2,x3]; hence thesis; end; end; definition let x be set; func x`1_3 equals x`1`1; coherence; func x`2_3 equals x`1`2; coherence; end; notation let x be set; synonym x`3_3 for x`2; end; registration let x1,x2,x3; reduce [x1,x2,x3]`1_3 to x1; reducibility proof thus [x1,x2,x3]`1_3 = [[x1,x2],x3]`1`1 .= x1; end; reduce [x1,x2,x3]`2_3 to x2; reducibility proof thus [x1,x2,x3]`2_3 = [[x1,x2],x3]`1`2 .= x2; end; reduce [x1,x2,x3]`3_3 to x3; reducibility proof thus [x1,x2,x3]`3_3 = [[x1,x2],x3]`2 .= x3; end; end; registration let x be triple set; reduce [x`1_3,x`2_3,x`3_3] to x; reducibility proof consider x1,x2,x3 such that W: x = [x1,x2,x3] by Dfy; [x1,x2,x3]`1_3 = x1 & [x1,x2,x3]`2_3 = x2 & [x1,x2,x3]`3_3 = x3; hence thesis by W; end; end; theorem for a,b being triple set st a`1_3 = b`1_3 & a`2_3 = b`2_3 & a`3_3 = b`3_3 holds a = b proof let a,b be triple set such that Z: a`1_3 = b`1_3 & a`2_3 = b`2_3 & a`3_3 = b`3_3; a = [a`1_3,a`2_3,a`3_3] & b = [b`1_3,b`2_3,b`3_3]; hence a = b by Z; end; begin definition let x1,x2,x3,x4; func [x1,x2,x3,x4] equals [[x1,x2,x3],x4]; coherence; end; definition let x; attr x is quadruple means :Dfz: ex x1,x2,x3,x4 st x = [x1,x2,x3,x4]; end; registration let x1,x2,x3,x4; cluster [x1,x2,x3,x4] -> quadruple; coherence by Dfz; end; theorem [x1,x2,x3,x4] = [y1,y2,y3,y4] implies x1 = y1 & x2 = y2 & x3 = y3 & x4 = y4 proof assume A1: [x1,x2,x3,x4] = [y1,y2,y3,y4]; then [x1,x2,x3] = [y1,y2,y3] by Th1; hence thesis by A1,Th3,Th1; end; registration cluster quadruple for set; existence proof take [the set, the set, the set, the set], the set, the set, the set, the set; thus thesis; end; cluster quadruple -> triple for set; coherence proof let x; given x1,x2,x3,x4 such that G: x = [x1,x2,x3,x4]; x = [[x1,x2],x3,x4] by G; hence thesis; end; end; definition let x be set; func x`1_4 equals x`1`1`1; coherence; func x`2_4 equals x`1`1`2; coherence; end; notation let x be set; synonym x`3_4 for x`2_3; synonym x`4_4 for x`2; end; registration let x1,x2,x3,x4; reduce [x1,x2,x3,x4]`1_4 to x1; reducibility proof thus [x1,x2,x3,x4]`1_4 = [[x1,x2,x3],x4]`1`1`1 .= [x1,x2,x3]`1_3 .= x1; end; reduce [x1,x2,x3,x4]`2_4 to x2; reducibility proof thus [x1,x2,x3,x4]`2_4 = [[x1,x2,x3],x4]`1`1`2 .= [x1,x2,x3]`2_3 .= x2; end; reduce [x1,x2,x3,x4]`3_4 to x3; reducibility proof thus [x1,x2,x3,x4]`3_4 = [[x1,x2,x3],x4]`1`2 .= x3; end; reduce [x1,x2,x3,x4]`4_4 to x4; reducibility proof thus [x1,x2,x3,x4]`4_4 = [[x1,x2,x3],x4]`2 .= x4; end; end; registration let x be quadruple set; reduce [x`1_4,x`2_4,x`3_4,x`4_4] to x; reducibility proof consider x1,x2,x3,x4 such that W: x = [x1,x2,x3,x4] by Dfz; [x1,x2,x3,x4]`1_4 = x1 & [x1,x2,x3,x4]`2_4 = x2 & [x1,x2,x3,x4]`3_4 = x3 & [x1,x2,x3,x4]`4_4 = x4; hence thesis by W; end; end; reserve X,X1,X2,X3,X4,Y for set; theorem Pre1: [x,y] in X implies x in union union X proof assume A1: [x,y] in X; {x} in [x,y] by TARSKI:def 2; then A2: {x} in union X by A1,TARSKI:def 4; x in {x} by TARSKI:def 1; hence x in union union X by A2,TARSKI:def 4; end; theorem Pre2: [x,y] in X implies y in union union X proof assume A1: [x,y] in X; {x,y} in [x,y] by TARSKI:def 2; then A2: {x,y} in union X by A1,TARSKI:def 4; y in {x,y} by TARSKI:def 2; hence y in union union X by A2,TARSKI:def 4; end; definition let X be set; func proj1 X -> set means :Def4: x in it iff ex y st [x,y] in X; existence proof defpred Q[set] means ex y st [$1,y] in X; consider Y such that A0: for x holds x in Y iff x in union union X & Q[x] from XBOOLE_0:sch 1; take Y; let x; thus x in Y implies ex y st [x,y] in X by A0; given y such that A1: [x,y] in X; x in union union X by A1,Pre1; hence thesis by A1,A0; end; uniqueness proof let X1,X2; assume that A2: for x holds x in X1 iff ex y st [x,y] in X and A3: for x holds x in X2 iff ex y st [x,y] in X; now let x; x in X1 iff ex y st [x,y] in X by A2; hence x in X1 iff x in X2 by A3; end; hence thesis by TARSKI:1; end; func proj2 X -> set means :Def5: x in it iff ex y st [y,x] in X; existence proof defpred Q[set] means ex y st [y,$1] in X; consider Y such that A0: for x holds x in Y iff x in union union X & Q[x] from XBOOLE_0:sch 1; take Y; let x; thus x in Y implies ex y st [y,x] in X by A0; given y such that A1: [y,x] in X; x in union union X by A1,Pre2; hence thesis by A1,A0; end; uniqueness proof let X1,X2; assume that A2: for x holds x in X1 iff ex y st [y,x] in X and A3: for x holds x in X2 iff ex y st [y,x] in X; now let x; x in X1 iff ex y st [y,x] in X by A2; hence x in X1 iff x in X2 by A3; end; hence thesis by TARSKI:1; end; end; theorem Th10: X c= Y implies proj1 X c= proj1 Y proof assume A1: X c= Y; let x; assume x in proj1 X; then consider y such that A2: [x,y] in X by Def4; [x,y] in Y by A1,A2,TARSKI:def 3; hence thesis by Def4; end; theorem Th11: X c= Y implies proj2 X c= proj2 Y proof assume A1: X c= Y; let x; assume x in proj2 X; then consider y such that A2: [y,x] in X by Def5; [y,x] in Y by A1,A2,TARSKI:def 3; hence thesis by Def5; end; definition let X be set; func proj1_3 X -> set equals proj1 proj1 X; coherence; func proj2_3 X -> set equals proj2 proj1 X; coherence; end; notation let X be set; synonym proj3_3 X for proj2 X; end; theorem Th12: X c= Y implies proj1_3 X c= proj1_3 Y proof assume X c= Y; then proj1 X c= proj1 Y by Th10; hence thesis by Th10; end; theorem Th13: X c= Y implies proj2_3 X c= proj2_3 Y proof assume X c= Y; then proj1 X c= proj1 Y by Th10; hence thesis by Th11; end; theorem Th14: x in proj1_3 X implies ex y,z st [x,y,z] in X proof assume x in proj1_3 X; then consider y such that W1: [x,y] in proj1 X by Def4; consider z such that W2: [[x,y],z] in X by W1,Def4; take y,z; thus thesis by W2; end; theorem Th14a: [x,y,z] in X implies x in proj1_3 X proof assume [x,y,z] in X; then [x,y] in proj1 X by Def4; hence thesis by Def4; end; theorem Th15: x in proj2_3 X implies ex y,z st [y,x,z] in X proof assume x in proj2_3 X; then consider y such that W1: [y,x] in proj1 X by Def5; consider z such that W2: [[y,x],z] in X by W1,Def4; take y,z; thus thesis by W2; end; theorem Th15a: [x,y,z] in X implies y in proj2_3 X proof assume [x,y,z] in X; then [x,y] in proj1 X by Def4; hence thesis by Def5; end; definition let X be set; func proj1_4 X -> set equals proj1 proj1_3 X; coherence; func proj2_4 X -> set equals proj2 proj1_3 X; coherence; end; notation let X be set; synonym proj3_4 X for proj2_3 X; synonym proj4_4 X for proj2 X; end; theorem Th17: X c= Y implies proj1_4 X c= proj1_4 Y proof assume X c= Y; then proj1_3 X c= proj1_3 Y by Th12; hence thesis by Th10; end; theorem Th18: X c= Y implies proj2_4 X c= proj2_4 Y proof assume X c= Y; then proj1_3 X c= proj1_3 Y by Th12; hence thesis by Th11; end; theorem Th19: x in proj1_4 X implies ex x1,x2,x3 st [x,x1,x2,x3] in X proof assume x in proj1_4 X; then consider x1 such that W1: [x,x1] in proj1_3 X by Def4; consider x2 such that W2: [[x,x1],x2] in proj1 X by W1,Def4; consider x3 such that W3: [[[x,x1],x2],x3] in X by W2,Def4; take x1,x2,x3; thus thesis by W3; end; theorem Th19a: [x,x1,x2,x3] in X implies x in proj1_4 X proof assume [x,x1,x2,x3] in X; then [[x,x1],x2,x3] in X; then [x,x1] in proj1_3 X by Th14a; hence thesis by Def4; end; theorem Th20: x in proj2_4 X implies ex x1,x2,x3 st [x1,x,x2,x3] in X proof assume x in proj2_4 X; then consider x1 such that W1: [x1,x] in proj1_3 X by Def5; consider x2 such that W2: [[x1,x],x2] in proj1 X by W1,Def4; consider x3 such that W3: [[[x1,x],x2],x3] in X by W2,Def4; take x1,x2,x3; thus thesis by W3; end; theorem Th20a: [x1,x,x2,x3] in X implies x in proj2_4 X proof assume [x1,x,x2,x3] in X; then [[x1,x],x2,x3] in X; then [x1,x] in proj1_3 X by Th14a; hence thesis by Def5; end; theorem for a,b being quadruple set st a`1_4 = b`1_4 & a`2_4 = b`2_4 & a`3_4 = b`3_4 & a`4_4 = b`4_4 holds a = b proof let a,b be quadruple set such that Z: a`1_4 = b`1_4 & a`2_4 = b`2_4 & a`3_4 = b`3_4 & a`4_4 = b`4_4; a = [a`1_4,a`2_4,a`3_4,a`4_4] & b = [b`1_4,b`2_4,b`3_4,b`4_4]; hence a = b by Z; end; begin registration let X be empty set; cluster proj1 X -> empty; coherence proof assume proj1 X is non empty; then consider x such that W: x in proj1 X by XBOOLE_0:def 1; ex y st [x,y] in X by W,Def4; hence contradiction; end; end; registration let X be empty set; cluster proj2 X -> empty; coherence proof assume proj2 X is non empty; then consider x such that W: x in proj2 X by XBOOLE_0:def 1; ex y st [y,x] in X by W,Def5; hence contradiction; end; end; registration let X be empty set; cluster proj1_3 X -> empty; coherence; end; registration let X be empty set; cluster proj2_3 X -> empty; coherence; end; registration let X be empty set; cluster proj1_4 X -> empty; coherence; end; registration let X be empty set; cluster proj2_4 X -> empty; coherence; end; theorem Th22: proj1(X \/ Y) = proj1 X \/ proj1 Y proof thus proj1(X \/ Y) c= proj1 X \/ proj1 Y proof let x; assume x in proj1(X \/ Y); then consider y such that A1: [x,y] in X \/ Y by Def4; [x,y] in X or [x,y] in Y by A1,XBOOLE_0:def 3; then x in proj1 X or x in proj1 Y by Def4; hence thesis by XBOOLE_0:def 3; end; A3: proj1 Y c= proj1(X \/ Y) by Th10,XBOOLE_1:7; proj1 X c= proj1(X \/ Y) by Th10,XBOOLE_1:7; hence proj1 X \/ proj1 Y c= proj1 (X \/ Y) by A3,XBOOLE_1:8; end; theorem proj1(X /\ Y) c= proj1 X /\ proj1 Y proof proj1(X /\ Y) c= proj1 X & proj1(X /\ Y) c= proj1 Y by Th10,XBOOLE_1:17; hence thesis by XBOOLE_1:19; end; theorem Th24: proj1 X \ proj1 Y c= proj1(X \ Y) proof let x; assume A1: x in proj1 X \ proj1 Y; then x in proj1 X by XBOOLE_0:def 5; then consider y such that A2: [x,y] in X by Def4; not x in proj1 Y by A1,XBOOLE_0:def 5; then not [x,y] in Y by Def4; then [x,y] in X \ Y by A2,XBOOLE_0:def 5; hence thesis by Def4; end; theorem proj1 X \+\ proj1 Y c= proj1(X \+\ Y) proof proj1 X \ proj1 Y c= proj1(X \ Y) & proj1 Y \ proj1 X c= proj1(Y \ X) by Th24; then proj1 X \+\ proj1 Y c= proj1(X\Y) \/ proj1(Y\X) by XBOOLE_1:13; hence thesis by Th22; end; theorem Th26: proj2(X \/ Y) = proj2 X \/ proj2 Y proof thus proj2(X \/ Y) c= proj2 X \/ proj2 Y proof let y; assume y in proj2(X \/ Y); then consider x such that A1: [x,y] in X \/ Y by Def5; [x,y] in X or [x,y] in Y by A1,XBOOLE_0:def 3; then y in proj2 X or y in proj2 Y by Def5; hence thesis by XBOOLE_0:def 3; end; A3: proj2 Y c= proj2(X \/ Y) by Th11,XBOOLE_1:7; proj2 X c= proj2(X \/ Y) by Th11,XBOOLE_1:7; hence proj2 X \/ proj2 Y c= proj2(X \/ Y) by A3,XBOOLE_1:8; end; theorem proj2(X /\ Y) c= proj2 X /\ proj2 Y proof let y; assume y in proj2(X /\ Y); then consider x such that A3: [x,y] in X /\ Y by Def5; [x,y] in Y by A3,XBOOLE_0:def 4; then A4: y in proj2 Y by Def5; [x,y] in X by A3,XBOOLE_0:def 4; then y in proj2 X by Def5; hence thesis by A4,XBOOLE_0:def 4; end; theorem Th28: proj2 X \ proj2 Y c= proj2(X \ Y) proof let y; assume A3: y in proj2 X \ proj2 Y; then y in proj2 X by XBOOLE_0:def 5; then consider x such that A4: [x,y] in X by Def5; not y in proj2 Y by A3,XBOOLE_0:def 5; then not [x,y] in Y by Def5; then [x,y] in X \ Y by A4,XBOOLE_0:def 5; hence thesis by Def5; end; theorem proj2 X \+\ proj2 Y c= proj2(X \+\ Y) proof proj2 X \ proj2 Y c= proj2(X \ Y) & proj2 Y \ proj2 X c= proj2(Y \ X) by Th28; then proj2 X \+\ proj2 Y c= proj2(X\Y) \/ proj2(Y\X) by XBOOLE_1:13; hence thesis by Th26; end; theorem Th30: proj1_3(X \/ Y) = proj1_3 X \/ proj1_3 Y proof thus proj1_3(X \/ Y) = proj1(proj1 X \/ proj1 Y) by Th22 .= proj1_3 X \/ proj1_3 Y by Th22; end; theorem proj1_3(X /\ Y) c= proj1_3 X /\ proj1_3 Y proof proj1_3(X /\ Y) c= proj1_3 X & proj1_3(X /\ Y) c= proj1_3 Y by Th12,XBOOLE_1:17; hence thesis by XBOOLE_1:19; end; theorem Th32: proj1_3 X \ proj1_3 Y c= proj1_3(X \ Y) proof let x; assume A1: x in proj1_3 X \ proj1_3 Y; then x in proj1_3 X by XBOOLE_0:def 5; then consider y,z such that A2: [x,y,z] in X by Th14; not x in proj1_3 Y by A1,XBOOLE_0:def 5; then not [x,y,z] in Y by Th14a; then [x,y,z] in X \ Y by A2,XBOOLE_0:def 5; hence thesis by Th14a; end; theorem proj1_3 X \+\ proj1_3 Y c= proj1_3(X \+\ Y) proof proj1_3 X \ proj1_3 Y c= proj1_3(X \ Y) & proj1_3 Y \ proj1_3 X c= proj1_3(Y \ X) by Th32; then proj1_3 X \+\ proj1_3 Y c= proj1_3(X\Y) \/ proj1_3(Y\X) by XBOOLE_1:13; hence thesis by Th30; end; theorem Th34: proj2_3(X \/ Y) = proj2_3 X \/ proj2_3 Y proof thus proj2_3(X \/ Y) = proj2(proj1 X \/ proj1 Y) by Th22 .= proj2_3 X \/ proj2_3 Y by Th26; end; theorem proj2_3(X /\ Y) c= proj2_3 X /\ proj2_3 Y proof proj2_3(X /\ Y) c= proj2_3 X & proj2_3(X /\ Y) c= proj2_3 Y by Th13,XBOOLE_1:17; hence thesis by XBOOLE_1:19; end; theorem Th36: proj2_3 X \ proj2_3 Y c= proj2_3(X \ Y) proof let x; assume A1: x in proj2_3 X \ proj2_3 Y; then x in proj2_3 X by XBOOLE_0:def 5; then consider y,z such that A2: [y,x,z] in X by Th15; not x in proj2_3 Y by A1,XBOOLE_0:def 5; then not [y,x,z] in Y by Th15a; then [y,x,z] in X \ Y by A2,XBOOLE_0:def 5; hence thesis by Th15a; end; theorem proj2_3 X \+\ proj2_3 Y c= proj2_3(X \+\ Y) proof proj2_3 X \ proj2_3 Y c= proj2_3(X \ Y) & proj2_3 Y \ proj2_3 X c= proj2_3(Y \ X) by Th36; then proj2_3 X \+\ proj2_3 Y c= proj2_3(X\Y) \/ proj2_3(Y\X) by XBOOLE_1:13; hence thesis by Th34; end; theorem Th38: proj1_4(X \/ Y) = proj1_4 X \/ proj1_4 Y proof thus proj1_4(X \/ Y) = proj1(proj1_3 X \/ proj1_3 Y) by Th30 .= proj1_4 X \/ proj1_4 Y by Th22; end; theorem proj1_4(X /\ Y) c= proj1_4 X /\ proj1_4 Y proof proj1_4(X /\ Y) c= proj1_4 X & proj1_4(X /\ Y) c= proj1_4 Y by Th17,XBOOLE_1:17; hence thesis by XBOOLE_1:19; end; theorem Th32: proj1_4 X \ proj1_4 Y c= proj1_4(X \ Y) proof let x; assume A1: x in proj1_4 X \ proj1_4 Y; then x in proj1_4 X by XBOOLE_0:def 5; then consider x1,x2,x3 such that A2: [x,x1,x2,x3] in X by Th19; not x in proj1_4 Y by A1,XBOOLE_0:def 5; then not [x,x1,x2,x3] in Y by Th19a; then [x,x1,x2,x3] in X \ Y by A2,XBOOLE_0:def 5; hence thesis by Th19a; end; theorem proj1_4 X \+\ proj1_4 Y c= proj1_4(X \+\ Y) proof proj1_4 X \ proj1_4 Y c= proj1_4(X \ Y) & proj1_4 Y \ proj1_4 X c= proj1_4(Y \ X) by Th32; then proj1_4 X \+\ proj1_4 Y c= proj1_4(X\Y) \/ proj1_4(Y\X) by XBOOLE_1:13; hence thesis by Th38; end; theorem Th34: proj2_4(X \/ Y) = proj2_4 X \/ proj2_4 Y proof thus proj2_4(X \/ Y) = proj2(proj1_3 X \/ proj1_3 Y) by Th30 .= proj2_4 X \/ proj2_4 Y by Th26; end; theorem proj2_4(X /\ Y) c= proj2_4 X /\ proj2_4 Y proof proj2_4(X /\ Y) c= proj2_4 X & proj2_4(X /\ Y) c= proj2_4 Y by Th18,XBOOLE_1:17; hence thesis by XBOOLE_1:19; end; theorem Th36: proj2_4 X \ proj2_4 Y c= proj2_4(X \ Y) proof let x; assume A1: x in proj2_4 X \ proj2_4 Y; then x in proj2_4 X by XBOOLE_0:def 5; then consider x1,x2,x3 such that A2: [x1,x,x2,x3] in X by Th20; not x in proj2_4 Y by A1,XBOOLE_0:def 5; then not [x1,x,x2,x3] in Y by Th20a; then [x1,x,x2,x3] in X \ Y by A2,XBOOLE_0:def 5; hence thesis by Th20a; end; theorem proj2_4 X \+\ proj2_4 Y c= proj2_4(X \+\ Y) proof proj2_4 X \ proj2_4 Y c= proj2_4(X \ Y) & proj2_4 Y \ proj2_4 X c= proj2_4(Y \ X) by Th36; then proj2_4 X \+\ proj2_4 Y c= proj2_4(X\Y) \/ proj2_4(Y\X) by XBOOLE_1:13; hence thesis by Th34; end; begin reserve x,y,X1,X2,X3,X4,X5,X6,Y,Y1,Y2,Y3,Y4,Y5,Z,Z1,Z2,Z3,Z4,Z5 for set; reserve X for non empty set; theorem Th1: ex Y st Y in X & Y misses X proof consider x such that W: x in X by XBOOLE_0:def 1; consider Y such that A1: Y in X & not ex x st x in X & x in Y by TARSKI:2,W; take Y; thus thesis by A1,XBOOLE_0:3; end; theorem ex Y st Y in X & for Y1 st Y1 in Y holds Y1 misses X proof defpred P[set] means $1 meets X; consider Z such that A1: for Y holds Y in Z iff Y in union X & P[Y] from XBOOLE_0:sch 1; consider Y such that A2: Y in X \/ Z and A3: Y misses X \/ Z by Th1; assume A4: not thesis; now assume A5: Y in X; then consider Y1 such that A6: Y1 in Y and A7: not Y1 misses X by A4; Y1 in union X by A5,A6,TARSKI:def 4; then Y1 in Z by A1,A7; then Y1 in X \/ Z by XBOOLE_0:def 3; hence contradiction by A3,A6,XBOOLE_0:3; end; then Y in Z by A2,XBOOLE_0:def 3; then Y meets X by A1; hence contradiction by A3,XBOOLE_1:70; end; theorem ex Y st Y in X & for Y1,Y2 st Y1 in Y2 & Y2 in Y holds Y1 misses X proof defpred P[set] means ex Y1 st Y1 in $1 & Y1 meets X; consider Z1 such that A1: for Y holds Y in Z1 iff Y in union X & P[Y] from XBOOLE_0:sch 1; defpred Q[set] means $1 meets X; consider Z2 such that A2: for Y holds Y in Z2 iff Y in union union X & Q[Y] from XBOOLE_0:sch 1; consider Y such that A3: Y in X \/ Z1 \/ Z2 and A4: Y misses X \/ Z1 \/ Z2 by Th1; A5: now assume A6: Y in Z1; then consider Y1 such that A7: Y1 in Y and A8: Y1 meets X by A1; Y in union X by A1,A6; then Y1 in union union X by A7,TARSKI:def 4; then Y1 in Z2 by A2,A8; then Y1 in X \/ Z1 \/ Z2 by XBOOLE_0:def 3; hence contradiction by A4,A7,XBOOLE_0:3; end; assume A9: not thesis; A10: now assume A11: Y in X; then consider Y1,Y2 such that A12: Y1 in Y2 and A13: Y2 in Y and A14: not Y1 misses X by A9; Y2 in union X by A11,A13,TARSKI:def 4; then Y2 in Z1 by A1,A12,A14; then Y2 in X \/ Z1 by XBOOLE_0:def 3; then Y2 in X \/ Z1 \/ Z2 by XBOOLE_0:def 3; hence contradiction by A4,A13,XBOOLE_0:3; end; Y in X \/ (Z1 \/ Z2) by A3,XBOOLE_1:4; then Y in Z1 \/ Z2 by A10,XBOOLE_0:def 3; then Y in Z2 by A5,XBOOLE_0:def 3; then Y meets X by A2; then Y meets X \/ Z1 by XBOOLE_1:70; hence contradiction by A4,XBOOLE_1:70; end; theorem ex Y st Y in X & for Y1,Y2,Y3 st Y1 in Y2 & Y2 in Y3 & Y3 in Y holds Y1 misses X proof defpred P[set] means ex Y1,Y2 st Y1 in Y2 & Y2 in $1 & Y1 meets X; consider Z1 such that A1: for Y holds Y in Z1 iff Y in union X & P[Y] from XBOOLE_0:sch 1; defpred R[set] means $1 meets X; defpred Q[set] means ex Y1 st Y1 in $1 & Y1 meets X; consider Z2 such that A2: for Y holds Y in Z2 iff Y in union union X & Q[Y] from XBOOLE_0:sch 1; consider Z3 such that A3: for Y holds Y in Z3 iff Y in union union union X & R[Y] from XBOOLE_0:sch 1; consider Y such that A4: Y in X \/ Z1 \/ Z2 \/ Z3 and A5: Y misses X \/ Z1 \/ Z2 \/ Z3 by Th1; A6: now assume A7: Y in Z2; then consider Y1 such that A8: Y1 in Y and A9: Y1 meets X by A2; Y in union union X by A2,A7; then Y1 in union union union X by A8,TARSKI:def 4; then Y1 in Z3 by A3,A9; then Y1 in X \/ Z1 \/ Z2 \/ Z3 by XBOOLE_0:def 3; hence contradiction by A5,A8,XBOOLE_0:3; end; A10: now assume A11: Y in Z1; then consider Y1,Y2 such that A12: Y1 in Y2 and A13: Y2 in Y and A14: Y1 meets X by A1; Y in union X by A1,A11; then Y2 in union union X by A13,TARSKI:def 4; then Y2 in Z2 by A2,A12,A14; then Y2 in X \/ Z1 \/ Z2 by XBOOLE_0:def 3; then Y meets X \/ Z1 \/ Z2 by A13,XBOOLE_0:3; hence contradiction by A5,XBOOLE_1:70; end; set V = X \/ Z1 \/ Z2 \/ Z3; A15: V = X \/ (Z1 \/ Z2) \/ Z3 by XBOOLE_1:4 .= X \/ (Z1 \/ Z2 \/ Z3) by XBOOLE_1:4; assume A16: not thesis; now assume A17: Y in X; then consider Y1,Y2,Y3 such that A18: Y1 in Y2 & Y2 in Y3 and A19: Y3 in Y and A20: not Y1 misses X by A16; Y3 in union X by A17,A19,TARSKI:def 4; then Y3 in Z1 by A1,A18,A20; then Y3 in X \/ Z1 by XBOOLE_0:def 3; then Y3 in X \/ Z1 \/ Z2 by XBOOLE_0:def 3; then Y3 in X \/ Z1 \/ Z2 \/ Z3 by XBOOLE_0:def 3; hence contradiction by A5,A19,XBOOLE_0:3; end; then Y in Z1 \/ Z2 \/ Z3 by A15,A4,XBOOLE_0:def 3; then Y in Z1 \/ (Z2 \/ Z3) by XBOOLE_1:4; then Y in Z2 \/ Z3 by A10,XBOOLE_0:def 3; then Y in Z3 by A6,XBOOLE_0:def 3; then Y meets X by A3; hence contradiction by A15,A5,XBOOLE_1:70; end; theorem ex Y st Y in X & for Y1,Y2,Y3,Y4 st Y1 in Y2 & Y2 in Y3 & Y3 in Y4 & Y4 in Y holds Y1 misses X proof defpred P[set] means ex Y1,Y2,Y3 st Y1 in Y2 & Y2 in Y3 & Y3 in $1 & Y1 meets X; consider Z1 such that A1: for Y holds Y in Z1 iff Y in union X & P[Y] from XBOOLE_0:sch 1; defpred S[set] means $1 meets X; defpred R[set] means ex Y1 st Y1 in $1 & Y1 meets X; defpred Q[set] means ex Y1,Y2 st Y1 in Y2 & Y2 in $1 & Y1 meets X; consider Z2 such that A2: for Y holds Y in Z2 iff Y in union union X & Q[Y] from XBOOLE_0:sch 1; consider Z4 such that A3: for Y holds Y in Z4 iff Y in union union union union X & S[Y] from XBOOLE_0:sch 1; consider Z3 such that A4: for Y holds Y in Z3 iff Y in union union union X & R[Y] from XBOOLE_0:sch 1; consider Y such that A5: Y in X \/ Z1 \/ Z2 \/ Z3 \/ Z4 and A6: Y misses X \/ Z1 \/ Z2 \/ Z3 \/ Z4 by Th1; A7: now assume A8: Y in Z3; then consider Y1 such that A9: Y1 in Y and A10: Y1 meets X by A4; Y in union union union X by A4,A8; then Y1 in union union union union X by A9,TARSKI:def 4; then Y1 in Z4 by A3,A10; then Y1 in X \/ Z1 \/ Z2 \/ Z3 \/ Z4 by XBOOLE_0:def 3; hence contradiction by A6,A9,XBOOLE_0:3; end; A11: now assume A12: Y in Z1; then consider Y1,Y2,Y3 such that A13: Y1 in Y2 & Y2 in Y3 and A14: Y3 in Y and A15: Y1 meets X by A1; Y in union X by A1,A12; then Y3 in union union X by A14,TARSKI:def 4; then Y3 in Z2 by A2,A13,A15; then Y3 in X \/ Z1 \/ Z2 by XBOOLE_0:def 3; then Y meets X \/ Z1 \/ Z2 by A14,XBOOLE_0:3; then Y meets X \/ Z1 \/ Z2 \/ Z3 by XBOOLE_1:70; hence contradiction by A6,XBOOLE_1:70; end; A16: X \/ Z1 \/ Z2 \/ Z3 \/ Z4 = X \/ (Z1 \/ Z2) \/ Z3 \/ Z4 by XBOOLE_1:4 .= X \/ (Z1 \/ Z2 \/ Z3) \/ Z4 by XBOOLE_1:4 .= X \/ (Z1 \/ Z2 \/ Z3 \/ Z4) by XBOOLE_1:4; A17: now assume A18: Y in Z2; then consider Y1,Y2 such that A19: Y1 in Y2 and A20: Y2 in Y and A21: Y1 meets X by A2; Y in union union X by A2,A18; then Y2 in union union union X by A20,TARSKI:def 4; then Y2 in Z3 by A4,A19,A21; then Y2 in X \/ Z1 \/ Z2 \/ Z3 by XBOOLE_0:def 3; then Y meets X \/ Z1 \/ Z2 \/ Z3 by A20,XBOOLE_0:3; hence contradiction by A6,XBOOLE_1:70; end; assume A22: not thesis; now assume A23: Y in X; then consider Y1,Y2,Y3,Y4 such that A24: Y1 in Y2 & Y2 in Y3 & Y3 in Y4 and A25: Y4 in Y and A26: not Y1 misses X by A22; Y4 in union X by A23,A25,TARSKI:def 4; then Y4 in Z1 by A1,A24,A26; then Y4 in X \/ Z1 by XBOOLE_0:def 3; then Y4 in X \/ Z1 \/ Z2 by XBOOLE_0:def 3; then Y4 in X \/ Z1 \/ Z2 \/ Z3 by XBOOLE_0:def 3; then Y4 in X \/ Z1 \/ Z2 \/ Z3 \/ Z4 by XBOOLE_0:def 3; hence contradiction by A6,A25,XBOOLE_0:3; end; then Y in Z1 \/ Z2 \/ Z3 \/ Z4 by A16,A5,XBOOLE_0:def 3; then Y in Z1 \/ (Z2 \/ Z3) \/ Z4 by XBOOLE_1:4; then Y in Z1 \/ (Z2 \/ Z3 \/ Z4) by XBOOLE_1:4; then Y in Z2 \/ Z3 \/ Z4 by A11,XBOOLE_0:def 3; then Y in Z2 \/ (Z3 \/ Z4) by XBOOLE_1:4; then Y in Z3 \/ Z4 by A17,XBOOLE_0:def 3; then Y in Z4 by A7,XBOOLE_0:def 3; then Y meets X by A3; hence contradiction by A16,A6,XBOOLE_1:70; end; theorem ex Y st Y in X & for Y1,Y2,Y3,Y4,Y5 st Y1 in Y2 & Y2 in Y3 & Y3 in Y4 & Y4 in Y5 & Y5 in Y holds Y1 misses X proof defpred P[set] means ex Y1,Y2,Y3,Y4 st Y1 in Y2 & Y2 in Y3 & Y3 in Y4 & Y4 in $1 & Y1 meets X; consider Z1 such that A1: for Y holds Y in Z1 iff Y in union X & P[Y] from XBOOLE_0:sch 1; defpred T[set] means $1 meets X; defpred S[set] means ex Y1 st Y1 in $1 & Y1 meets X; defpred R[set] means ex Y1,Y2 st Y1 in Y2 & Y2 in $1 & Y1 meets X; defpred Q[set] means ex Y1,Y2,Y3 st Y1 in Y2 & Y2 in Y3 & Y3 in $1 & Y1 meets X; consider Z2 such that A2: for Y holds Y in Z2 iff Y in union union X & Q[Y] from XBOOLE_0:sch 1; consider Z5 such that A3: for Y holds Y in Z5 iff Y in union union union union union X & T[Y] from XBOOLE_0:sch 1; consider Z3 such that A4: for Y holds Y in Z3 iff Y in union union union X & R[Y] from XBOOLE_0:sch 1; consider Z4 such that A5: for Y holds Y in Z4 iff Y in union union union union X & S[Y] from XBOOLE_0:sch 1; set V = X \/ Z1 \/ Z2 \/ Z3 \/ Z4 \/ Z5; consider Y such that A6: Y in V and A7: Y misses V by Th1; A8: V = X \/ (Z1 \/ Z2) \/ Z3 \/ Z4 \/ Z5 by XBOOLE_1:4 .= X \/ (Z1 \/ Z2 \/ Z3) \/ Z4 \/ Z5 by XBOOLE_1:4 .= X \/ (Z1 \/ Z2 \/ Z3 \/ Z4) \/ Z5 by XBOOLE_1:4 .= X \/ (Z1 \/ Z2 \/ Z3 \/ Z4 \/ Z5) by XBOOLE_1:4; A9: now assume A10: Y in Z1; then consider Y1,Y2,Y3,Y4 such that A11: Y1 in Y2 & Y2 in Y3 & Y3 in Y4 and A12: Y4 in Y and A13: Y1 meets X by A1; Y in union X by A1,A10; then Y4 in union union X by A12,TARSKI:def 4; then Y4 in Z2 by A2,A11,A13; then Y4 in X \/ Z1 \/ Z2 by XBOOLE_0:def 3; then Y meets X \/ Z1 \/ Z2 by A12,XBOOLE_0:3; then Y meets X \/ Z1 \/ Z2 \/ Z3 by XBOOLE_1:70; then Y meets X \/ Z1 \/ Z2 \/ Z3 \/ Z4 by XBOOLE_1:70; hence contradiction by A7,XBOOLE_1:70; end; A14: now assume A15: Y in Z2; then consider Y1,Y2,Y3 such that A16: Y1 in Y2 & Y2 in Y3 and A17: Y3 in Y and A18: Y1 meets X by A2; Y in union union X by A2,A15; then Y3 in union union union X by A17,TARSKI:def 4; then Y3 in Z3 by A4,A16,A18; then Y3 in X \/ Z1 \/ Z2 \/ Z3 by XBOOLE_0:def 3; then Y3 in X \/ Z1 \/ Z2 \/ Z3 \/ Z4 by XBOOLE_0:def 3; then Y3 in V by XBOOLE_0:def 3; hence contradiction by A7,A17,XBOOLE_0:3; end; A19: now assume A20: Y in Z3; then consider Y1,Y2 such that A21: Y1 in Y2 and A22: Y2 in Y and A23: Y1 meets X by A4; Y in union union union X by A4,A20; then Y2 in union union union union X by A22,TARSKI:def 4; then Y2 in Z4 by A5,A21,A23; then Y2 in X \/ Z1 \/ Z2 \/ Z3 \/ Z4 by XBOOLE_0:def 3; then Y2 in V by XBOOLE_0:def 3; hence contradiction by A7,A22,XBOOLE_0:3; end; A24: now assume A25: Y in Z4; then consider Y1 such that A26: Y1 in Y and A27: Y1 meets X by A5; Y in union union union union X by A5,A25; then Y1 in union union union union union X by A26,TARSKI:def 4; then Y1 in Z5 by A3,A27; then Y1 in V by XBOOLE_0:def 3; hence contradiction by A7,A26,XBOOLE_0:3; end; assume A28: not thesis; now assume A29: Y in X; then consider Y1,Y2,Y3,Y4,Y5 such that A30: Y1 in Y2 & Y2 in Y3 & Y3 in Y4 & Y4 in Y5 and A31: Y5 in Y and A32: not Y1 misses X by A28; Y5 in union X by A29,A31,TARSKI:def 4; then Y5 in Z1 by A1,A30,A32; then Y5 in X \/ Z1 by XBOOLE_0:def 3; then Y5 in X \/ Z1 \/ Z2 by XBOOLE_0:def 3; then Y5 in X \/ Z1 \/ Z2 \/ Z3 by XBOOLE_0:def 3; then Y meets X \/ Z1 \/ Z2 \/ Z3 by A31,XBOOLE_0:3; then Y meets X \/ Z1 \/ Z2 \/ Z3 \/ Z4 by XBOOLE_1:70; hence contradiction by A7,XBOOLE_1:70; end; then Y in Z1 \/ Z2 \/ Z3 \/ Z4 \/ Z5 by A8,A6,XBOOLE_0:def 3; then Y in Z1 \/ (Z2 \/ Z3) \/ Z4 \/ Z5 by XBOOLE_1:4; then Y in Z1 \/ (Z2 \/ Z3 \/ Z4) \/ Z5 by XBOOLE_1:4; then Y in Z1 \/ (Z2 \/ Z3 \/ Z4 \/ Z5) by XBOOLE_1:4; then Y in Z2 \/ Z3 \/ Z4 \/ Z5 by A9,XBOOLE_0:def 3; then Y in Z2 \/ (Z3 \/ Z4) \/ Z5 by XBOOLE_1:4; then Y in Z2 \/ (Z3 \/ Z4 \/ Z5) by XBOOLE_1:4; then Y in Z3 \/ Z4 \/ Z5 by A14,XBOOLE_0:def 3; then Y in Z3 \/ (Z4 \/ Z5) by XBOOLE_1:4; then Y in Z4 \/ Z5 by A19,XBOOLE_0:def 3; then Y in Z5 by A24,XBOOLE_0:def 3; then Y meets X by A3; hence contradiction by A8,A7,XBOOLE_1:70; end; theorem not ( X1 in X2 & X2 in X3 & X3 in X1) proof A1: X2 in { X1,X2,X3 } & X3 in { X1,X2,X3 } by ENUMSET1:def 1; A2: X1 in { X1,X2,X3 } by ENUMSET1:def 1; then consider T being set such that A3: T in { X1,X2,X3 } and A4: { X1,X2,X3 } misses T by Th1; T = X1 or T = X2 or T = X3 by A3,ENUMSET1:def 1; hence thesis by A2,A1,A4,XBOOLE_0:3; end; theorem not ( X1 in X2 & X2 in X3 & X3 in X4 & X4 in X1) proof A1: X2 in { X1,X2,X3,X4 } & X3 in { X1,X2,X3,X4 } by ENUMSET1:def 2; A2: X4 in { X1,X2,X3,X4 } by ENUMSET1:def 2; A3: X1 in { X1,X2,X3,X4 } by ENUMSET1:def 2; then consider T being set such that A4: T in { X1,X2,X3,X4 } and A5: { X1,X2,X3,X4 } misses T by Th1; T = X1 or T = X2 or T = X3 or T = X4 by A4,ENUMSET1:def 2; hence thesis by A3,A1,A2,A5,XBOOLE_0:3; end; theorem not ( X1 in X2 & X2 in X3 & X3 in X4 & X4 in X5 & X5 in X1) proof assume that A1: X1 in X2 and A2: X2 in X3 and A3: X3 in X4 and A4: X4 in X5 and A5: X5 in X1; set Z = { X1,X2,X3,X4,X5 }; A6: for Y st Y in Z holds Z meets Y proof let Y such that A7: Y in Z; now per cases by A7,ENUMSET1:def 3; suppose A8: Y = X1; take y = X5; thus y in Z & y in Y by A5,A8,ENUMSET1:def 3; end; suppose A9: Y = X2; take y = X1; thus y in Z & y in Y by A1,A9,ENUMSET1:def 3; end; suppose A10: Y = X3; take y = X2; thus y in Z & y in Y by A2,A10,ENUMSET1:def 3; end; suppose A11: Y = X4; take y = X3; thus y in Z & y in Y by A3,A11,ENUMSET1:def 3; end; suppose A12: Y = X5; take y = X4; thus y in Z & y in Y by A4,A12,ENUMSET1:def 3; end; end; hence thesis by XBOOLE_0:3; end; X1 in { X1,X2,X3,X4,X5 } by ENUMSET1:def 3; hence contradiction by A6,Th1; end; theorem not ( X1 in X2 & X2 in X3 & X3 in X4 & X4 in X5 & X5 in X6 & X6 in X1) proof assume that A1: X1 in X2 and A2: X2 in X3 and A3: X3 in X4 and A4: X4 in X5 and A5: X5 in X6 and A6: X6 in X1; set Z = { X1,X2,X3,X4,X5,X6 }; A7: for Y st Y in Z holds Z meets Y proof let Y such that A8: Y in Z; now per cases by A8,ENUMSET1:def 4; suppose A9: Y = X1; take y = X6; thus y in Z & y in Y by A6,A9,ENUMSET1:def 4; end; suppose A10: Y = X2; take y = X1; thus y in Z & y in Y by A1,A10,ENUMSET1:def 4; end; suppose A11: Y = X3; take y = X2; thus y in Z & y in Y by A2,A11,ENUMSET1:def 4; end; suppose A12: Y = X4; take y = X3; thus y in Z & y in Y by A3,A12,ENUMSET1:def 4; end; suppose A13: Y = X5; take y = X4; thus y in Z & y in Y by A4,A13,ENUMSET1:def 4; end; suppose A14: Y = X6; take y = X5; thus y in Z & y in Y by A5,A14,ENUMSET1:def 4; end; end; hence thesis by XBOOLE_0:3; end; X1 in { X1,X2,X3,X4,X5,X6 } by ENUMSET1:def 4; hence contradiction by A7,Th1; end; begin reserve v,x,x1,x2,y,y1,y2,z,A,B,X,X1,X2,X3,X4,Y,Y1,Y2,Z,N,M for set; registration let x, y be set; cluster [x,y] -> non empty; coherence; end; Lm1: {x} c= X iff x in X proof x in {x} by TARSKI:def 1; hence {x} c= X implies x in X by TARSKI:def 3; assume A1: x in X; let y; thus thesis by A1,TARSKI:def 1; end; Lm2: Y c= X & not x in Y implies Y c= X \ { x } proof assume A1: Y c= X & not x in Y; let y; assume y in Y; then y in X & not y in { x } by A1,TARSKI:def 1,def 3; hence thesis by XBOOLE_0:def 5; end; Lm3: Y c= { x } iff Y = {} or Y = { x } proof thus Y c= { x } implies Y = {} or Y = { x } proof assume A1: Y c= { x }; x in Y or not x in Y; then { x } c= Y or Y c= { x } \ { x } by A1,Lm1,Lm2; then { x } = Y or Y c= {} by A1,XBOOLE_0:def 10,XBOOLE_1:37; hence thesis by XBOOLE_1:3; end; thus thesis by XBOOLE_1:2; end; definition let X; defpred IT[set] means $1 c= X; func bool X means :Def1: Z in it iff Z c= X; existence proof consider M such that A1: X in M & for X,Y holds X in M & Y c= X implies Y in M and for X st X in M ex Z st Z in M & for Y st Y c= X holds Y in Z and for X holds X c= M implies X,M are_equipotent or X in M by TARSKI:3; consider IT being set such that A2: Y in IT iff Y in M & IT[Y] from XBOOLE_0:sch 1; take IT; thus thesis by A2,A1; end; uniqueness proof thus for X1,X2 being set st (for x being set holds x in X1 iff IT[x]) & ( for x being set holds x in X2 iff IT[x]) holds X1 = X2 from XBOOLE_0:sch 3; end; end; definition let X1,X2; defpred X[set] means ex x,y st x in X1 & y in X2 & $1 = [x,y]; func [: X1,X2 :] means :Def2: z in it iff ex x,y st x in X1 & y in X2 & z = [x,y]; existence proof A1: X1 c= X1 \/ X2 by XBOOLE_1:7; consider X such that A2: for z holds z in X iff z in bool(bool(X1 \/ X2)) & X[z] from XBOOLE_0:sch 1; take X; let z; thus z in X implies ex x,y st x in X1 & y in X2 & z = [x,y] by A2; given x,y such that A3: x in X1 and A4: y in X2 and A5: z = [x,y]; {x,y} c= X1 \/ X2 proof let z; assume z in {x,y}; then z = x or z = y by TARSKI:def 2; hence thesis by A3,A4,XBOOLE_0:def 3; end; then A6: {x,y} in bool(X1 \/ X2) by Def1; {x} c= X1 by A3,Lm1; then {x} c= X1 \/ X2 by A1,XBOOLE_1:1; then A7: {x} in bool(X1 \/ X2) by Def1; {{x,y},{x}} c= bool(X1 \/ X2) proof let z; assume z in {{x,y},{x}}; hence thesis by A7,A6,TARSKI:def 2; end; then {{x,y},{x}} in bool(bool(X1 \/ X2)) by Def1; hence thesis by A2,A3,A4,A5; end; uniqueness proof thus for X1,X2 being set st (for x being set holds x in X1 iff X[x]) & ( for x being set holds x in X2 iff X[x]) holds X1 = X2 from XBOOLE_0:sch 3; end; end; definition let X1,X2,X3; func [: X1,X2,X3 :] equals [:[:X1,X2:],X3:]; coherence; end; definition let X1,X2,X3,X4; func [: X1,X2,X3,X4 :] equals [:[:X1,X2,X3:],X4:]; coherence; end; begin theorem bool {} = { {} } proof now let x be set; x c= {} iff x = {} by XBOOLE_1:3; hence x in bool {} iff x in { {} } by Def1,TARSKI:def 1; end; hence thesis by TARSKI:1; end; theorem union {} = {} proof now given x such that A1: x in union {}; ex X being set st x in X & X in {} by A1,TARSKI:def 4; hence contradiction; end; hence thesis by XBOOLE_0:7; end; theorem Th3: {x} c= {y} implies x = y proof x in { x } by TARSKI:def 1; then {x} = {y} implies x = y by TARSKI:def 1; hence thesis by Lm3; end; theorem Th4: {x} = {y1,y2} implies x = y1 proof assume { x } = { y1,y2 }; then y1 in { x } by TARSKI:def 2; hence thesis by TARSKI:def 1; end; theorem {x} = {y1,y2} implies y1 = y2 proof assume A1: { x } = { y1,y2 }; then x = y1 by Th4; hence thesis by A1,Th4; end; theorem Th6: { x1,x2 } = { y1,y2 } implies x1 = y1 or x1 = y2 proof x1 in { x1,x2 } by TARSKI:def 2; hence thesis by TARSKI:def 2; end; theorem Th7: {x} c= {x,y} proof let z; assume z in {x}; then z=x by TARSKI:def 1; hence thesis by TARSKI:def 2; end; Lm4: {x} \/ X c= X implies x in X proof assume A1: {x} \/ X c= X; assume not x in X; then not x in {x} \/ X by A1,TARSKI:def 3; then not x in {x} by XBOOLE_0:def 3; hence thesis by TARSKI:def 1; end; theorem {x} \/ {y} = {x} implies x = y proof assume {x} \/ {y} = {x}; then y in {x} or x in {y} by Lm4; hence thesis by TARSKI:def 1; end; theorem {x} \/ {x,y} = {x,y} proof x in {x,y} by TARSKI:def 2; hence thesis by XBOOLE_1:12,Lm1; end; Lm6: {x} misses X implies not x in X proof A1: x in {x} by TARSKI:def 1; assume {x} /\ X = {} & x in X; hence contradiction by A1,XBOOLE_0:def 4; end; theorem {x} misses {y} implies x <> y proof assume {x} misses {y}; then not x in {y} by Lm6; hence thesis by TARSKI:def 1; end; Lm7: not x in X implies {x} misses X proof assume A1: not x in X; thus {x} /\ X c= {} proof let y; assume y in {x} /\ X; then y in {x} & y in X by XBOOLE_0:def 4; hence thesis by A1,TARSKI:def 1; end; thus thesis by XBOOLE_1:2; end; theorem Th11: x <> y implies {x} misses {y} proof assume x <> y; then not x in {y} by TARSKI:def 1; hence thesis by Lm7; end; Lm8: X /\ {x} = {x} implies x in X proof assume X /\ {x} = {x}; then x in X /\ {x} by TARSKI:def 1; hence thesis by XBOOLE_0:def 4; end; theorem {x} /\ {y} = {x} implies x = y proof assume {x} /\ {y} = {x}; then x in {y} or y in {x} by Lm8; hence thesis by TARSKI:def 1; end; Lm9: x in X implies X /\ {x} = {x} by XBOOLE_1:28,Lm1; theorem {x} /\ {x,y} = {x} proof x in {x,y} by TARSKI:def 2; hence thesis by XBOOLE_1:28,Lm1; end; Lm10: {x} \ X = {x} iff not x in X by Lm6,Lm7,XBOOLE_1:83; theorem {x} \ {y} = {x} iff x <> y proof {x} \ {y} = {x} iff not x in {y} by Lm6,Lm7,XBOOLE_1:83; hence thesis by TARSKI:def 1; end; Lm11: {x} \ X = {} iff x in X by Lm1,XBOOLE_1:37; theorem {x} \ {y} = {} implies x = y proof assume {x} \ {y} = {}; then x in {y} by Lm1,XBOOLE_1:37; hence thesis by TARSKI:def 1; end; theorem {x} \ {x,y} = {} proof x in {x,y} by TARSKI:def 2; hence thesis by Lm1,XBOOLE_1:37; end; Lm12: {x,y} \ X = {x} iff not x in X & (y in X or x = y) proof thus {x,y} \ X = {x} implies not x in X & (y in X or x = y) proof assume A1: {x,y} \ X = {x}; then x in {x,y} \ X by TARSKI:def 1; hence not x in X by XBOOLE_0:def 5; A2: y in {x,y} by TARSKI:def 2; assume not y in X; then y in {x} by A1,A2,XBOOLE_0:def 5; hence thesis by TARSKI:def 1; end; assume A3: ( not x in X)&( y in X or x=y); z in {x,y} \ X iff z=x proof z in {x,y} \ X iff z in {x,y} & not z in X by XBOOLE_0:def 5; hence thesis by A3,TARSKI:def 2; end; hence thesis by TARSKI:def 1; end; theorem x <> y implies { x,y } \ { y } = { x } proof assume x <> y; then A1: not x in {y} by TARSKI:def 1; y in {y} by TARSKI:def 1; hence thesis by A1,Lm12; end; theorem {x} c= {y} implies x = y by Th3; theorem {z} c= {x,y} implies z = x or z = y proof A1: z in {z} by TARSKI:def 1; assume {z} c= {x,y}; then z in {x,y} by A1,TARSKI:def 3; hence thesis by TARSKI:def 2; end; theorem Th20: {x,y} c= {z} implies x = z proof A1: x in {x,y} by TARSKI:def 2; assume {x,y} c= {z}; then x in {z} by A1,TARSKI:def 3; hence thesis by TARSKI:def 1; end; theorem {x,y} c= {z} implies {x,y} = {z} proof assume {x,y} c= {z}; then x=z & y=z by Th20; hence thesis by ENUMSET1:29; end; Lm13: X <> {x} & X <> {} implies ex y st y in X & y <> x proof assume that A1: X <> {x} and A2: X <> {}; per cases; suppose A3: not x in X; consider y being set such that A4: y in X by A2,XBOOLE_0:7; take y; thus thesis by A3,A4; end; suppose A5: x in X; consider y such that A6: y in X & not y in {x} or y in {x} & not y in X by A1,TARSKI:1; take y; thus thesis by A5,A6,TARSKI:def 1; end; end; Lm14: Z c= {x1,x2} iff Z = {} or Z = {x1} or Z = {x2} or Z = {x1,x2} proof thus Z c= {x1,x2} implies Z={} or Z={x1} or Z={x2} or Z={x1,x2} proof assume that A1: Z c= {x1,x2} and A2: Z <> {} and A3: Z <> {x1} and A4: Z <> {x2}; now let z; thus z in Z implies z in {x1,x2} by A1,TARSKI:def 3; A5: now assume A6: not x1 in Z; consider y such that A7: y in Z and A8: y<>x2 by A2,A4,Lm13; y in {x1,x2} by A1,A7,TARSKI:def 3; hence contradiction by A6,A7,A8,TARSKI:def 2; end; A9: now assume A10: not x2 in Z; consider y such that A11: y in Z and A12: y<>x1 by A2,A3,Lm13; y in {x1,x2} by A1,A11,TARSKI:def 3; hence contradiction by A10,A11,A12,TARSKI:def 2; end; assume z in {x1,x2}; hence z in Z by A5,A9,TARSKI:def 2; end; hence thesis by TARSKI:1; end; thus thesis by Th7,XBOOLE_1:2; end; theorem {x1,x2} c= {y1,y2} implies x1 = y1 or x1 = y2 proof assume {x1,x2} c= {y1,y2}; then {x1,x2}={} or {x1,x2}={y1} or {x1,x2}={y2} or {x1,x2}={y1,y2} by Lm14; hence thesis by Th4,Th6; end; theorem x <> y implies { x } \+\ { y } = { x,y } proof assume A1: x <> y; z in { x } \+\ { y } iff z=x or z=y proof A2: z in {y} iff z=y by TARSKI:def 1; z in {x} iff z=x by TARSKI:def 1; hence thesis by A1,A2,XBOOLE_0:1; end; hence thesis by TARSKI:def 2; end; theorem bool { x } = { {} , { x }} proof now let y; y c= { x } iff y = {} or y = { x } by Lm3; hence y in bool { x } iff y in { {}, { x }} by Def1,TARSKI:def 2; end; hence thesis by TARSKI:1; end; Lm15: X in A implies X c= union A proof assume A1: X in A; let x; thus thesis by A1,TARSKI:def 4; end; theorem union { x } = x proof A1: union { x } c= x proof let y; assume y in union { x }; then ex Y being set st y in Y & Y in { x } by TARSKI:def 4; hence thesis by TARSKI:def 1; end; x in { x } by TARSKI:def 1; then x c= union { x } by Lm15; hence thesis by A1,XBOOLE_0:def 10; end; Lm16: union { X,Y } = X \/ Y proof x in union {X,Y} iff x in X or x in Y proof thus x in union {X,Y} implies x in X or x in Y proof assume x in union {X,Y}; then ex Z st x in Z & Z in {X,Y} by TARSKI:def 4; hence thesis by TARSKI:def 2; end; X in {X,Y} & Y in {X,Y} by TARSKI:def 2; hence thesis by TARSKI:def 4; end; hence thesis by XBOOLE_0:def 3; end; theorem union {{x},{y}} = {x,y} proof thus union {{x},{y}} = {x} \/ {y} by Lm16 .= {x,y} by ENUMSET1:1; end; Lm17: [x,y] in [:X,Y:] iff x in X & y in Y proof thus [x,y] in [:X,Y:] implies x in X & y in Y proof assume [x,y] in [:X,Y:]; then ex x1,y1 st x1 in X & y1 in Y & [x,y]=[x1,y1] by Def2; hence thesis by XTUPLE_0:1; end; thus thesis by Def2; end; canceled; theorem [x,y] in [:{x1},{y1}:] iff x = x1 & y = y1 proof x=x1 & y=y1 iff x in {x1} & y in {y1} by TARSKI:def 1; hence thesis by Lm17; end; theorem [:{x},{y}:] = {[x,y]} proof now let z; thus z in [:{x},{y}:] implies z in {[x,y]} proof assume z in [:{x},{y}:]; then consider x1,y1 such that A1: x1 in {x} & y1 in {y} and A2: z=[x1,y1] by Def2; x1=x & y1=y by A1,TARSKI:def 1; hence thesis by A2,TARSKI:def 1; end; assume z in {[x,y]}; then A3: z=[x,y] by TARSKI:def 1; x in {x} & y in {y} by TARSKI:def 1; hence z in [:{x},{y}:] by A3,Lm17; end; hence thesis by TARSKI:1; end; theorem Th30: [:{x},{y,z}:] = {[x,y],[x,z]} & [:{x,y},{z}:] = {[x,z],[y,z]} proof now let v; A1: z in{y,z} by TARSKI:def 2; thus v in [:{x},{y,z}:] implies v in {[x,y],[x,z]} proof assume v in [:{x},{y,z}:]; then consider x1,y1 such that A2: x1 in {x} and A3: y1 in {y,z} and A4: v=[x1,y1] by Def2; A5: y1=y or y1=z by A3,TARSKI:def 2; x1=x by A2,TARSKI:def 1; hence thesis by A4,A5,TARSKI:def 2; end; assume v in {[x,y],[x,z]}; then A6: v=[x,y] or v=[x,z] by TARSKI:def 2; x in{x} & y in{y,z} by TARSKI:def 1,def 2; hence v in [:{x},{y,z}:] by A6,A1,Lm17; end; hence [:{x},{y,z}:] = {[x,y],[x,z]} by TARSKI:1; now let v; A7: z in{z} by TARSKI:def 1; thus v in [:{x,y},{z}:] implies v in {[x,z],[y,z]} proof assume v in [:{x,y},{z}:]; then consider x1,y1 such that A8: x1 in {x,y} and A9: y1 in {z} and A10: v=[x1,y1] by Def2; A11: x1=x or x1=y by A8,TARSKI:def 2; y1=z by A9,TARSKI:def 1; hence thesis by A10,A11,TARSKI:def 2; end; assume v in {[x,z],[y,z]}; then A12: v=[x,z] or v=[y,z] by TARSKI:def 2; x in{x,y} & y in{x,y} by TARSKI:def 2; hence v in [:{x,y},{z}:] by A12,A7,Lm17; end; hence thesis by TARSKI:1; end; theorem {x} c= X iff x in X by Lm1; theorem Th32: {x1,x2} c= Z iff x1 in Z & x2 in Z proof x1 in {x1,x2} & x2 in {x1,x2} by TARSKI:def 2; hence {x1,x2} c= Z implies x1 in Z & x2 in Z by TARSKI:def 3; assume A1: x1 in Z & x2 in Z; let z; assume z in {x1,x2}; hence thesis by A1,TARSKI:def 2; end; theorem Y c= { x } iff Y = {} or Y = { x } by Lm3; theorem Y c= X & not x in Y implies Y c= X \ { x } by Lm2; theorem X <> {x} & X <> {} implies ex y st y in X & y <> x by Lm13; theorem Z c= {x1,x2} iff Z = {} or Z = {x1} or Z = {x2} or Z = {x1,x2} by Lm14; theorem Th37: {z} = X \/ Y implies X = {z} & Y = {z} or X = {} & Y = {z} or X = {z} & Y = {} proof assume A1: {z} = X \/ Y; X <> {} or Y <> {} by A1; hence thesis by A1,Lm3,XBOOLE_1:7; end; theorem {z} = X \/ Y & X <> Y implies X = {} or Y = {} proof assume {z} = X \/ Y; then X={z} & Y={z} or X={} & Y={z} or X={z} & Y={} by Th37; hence thesis; end; theorem {x} \/ X c= X implies x in X by Lm4; theorem x in X implies {x} \/ X = X by XBOOLE_1:12,Lm1; theorem {x,y} \/ Z c= Z implies x in Z proof assume A1: {x,y} \/ Z c= Z; assume not x in Z; then not x in {x,y} \/ Z by A1,TARSKI:def 3; then not x in {x,y} by XBOOLE_0:def 3; hence thesis by TARSKI:def 2; end; theorem x in Z & y in Z implies {x,y} \/ Z = Z by XBOOLE_1:12,Th32; theorem {x} \/ X <> {}; theorem {x,y} \/ X <> {}; theorem X /\ {x} = {x} implies x in X by Lm8; theorem x in X implies X /\ {x} = {x} by XBOOLE_1:28,Lm1; theorem x in Z & y in Z implies {x,y} /\ Z = {x,y} by XBOOLE_1:28,Th32; theorem {x} misses X implies not x in X by Lm6; theorem Th49: {x,y} misses Z implies not x in Z proof A1: x in {x,y} by TARSKI:def 2; assume {x,y} /\ Z = {} & x in Z; hence contradiction by A1,XBOOLE_0:def 4; end; theorem not x in X implies {x} misses X by Lm7; theorem Th51: not x in Z & not y in Z implies {x,y} misses Z proof assume A1: ( not x in Z)& not y in Z; assume {x,y} meets Z; then consider z such that A2: z in {x,y} /\ Z by XBOOLE_0:4; z in {x,y} & z in Z by A2,XBOOLE_0:def 4; hence contradiction by A1,TARSKI:def 2; end; theorem {x} misses X or {x} /\ X = {x} by Lm7,Lm9; theorem {x,y} /\ X = {x} implies not y in X or x = y proof A1: y in {x,y} by TARSKI:def 2; assume {x,y} /\ X = {x} & y in X; then y in {x} by A1,XBOOLE_0:def 4; hence thesis by TARSKI:def 1; end; theorem x in X & (not y in X or x = y) implies {x,y} /\ X = {x} proof assume A1: x in X &( not y in X or x=y); z in {x,y} /\ X iff z=x proof z in {x,y} /\ X iff z in {x,y} & z in X by XBOOLE_0:def 4; hence thesis by A1,TARSKI:def 2; end; hence thesis by TARSKI:def 1; end; theorem {x,y} /\ X = {x,y} implies x in X proof assume {x,y} /\ X = {x,y}; then x in {x,y} /\ X & y in {x,y} /\ X or x in X /\ {x,y} & y in X /\ {x,y} by TARSKI:def 2; hence thesis by XBOOLE_0:def 4; end; theorem Th56: z in X \ {x} iff z in X & z <> x proof z in X \ {x} iff z in X & not z in {x} by XBOOLE_0:def 5; hence thesis by TARSKI:def 1; end; theorem Th57: X \ {x} = X iff not x in X proof X \ {x} = X iff X misses {x} by XBOOLE_1:83; hence thesis by Lm6,Lm7; end; theorem X \ {x} = {} implies X = {} or X = {x} proof assume X \ {x} = {}; then X c= {x} by XBOOLE_1:37; hence thesis by Lm3; end; theorem {x} \ X = {x} iff not x in X by Lm6,Lm7,XBOOLE_1:83; theorem {x} \ X = {} iff x in X by Lm1,XBOOLE_1:37; theorem {x} \ X = {} or {x} \ X = {x} by Lm10,Lm11; theorem {x,y} \ X = {x} iff not x in X & (y in X or x = y) by Lm12; theorem {x,y} \ X = {x,y} iff not x in X & not y in X by Th49,Th51,XBOOLE_1:83; theorem Th64: {x,y} \ X = {} iff x in X & y in X proof {x,y} \ X = {} iff {x,y} c= X by XBOOLE_1:37; hence thesis by Th32; end; theorem {x,y} \ X = {} or {x,y} \ X = {x} or {x,y} \ X = {y} or {x,y} \ X = {x ,y} proof assume that A1: {x,y} \ X <> {} and A2: {x,y} \ X <> {x} and A3: {x,y} \ X <> {y}; A4: not x in X & x<>y or y in X by A3,Lm12; x in X or not y in X & x<>y by A2,Lm12; hence thesis by A1,A4,Th51,XBOOLE_1:83,Th64; end; theorem X \ {x,y} = {} iff X = {} or X = {x} or X = {y} or X = {x,y} proof X \ {x,y} = {} iff X c= {x,y} by XBOOLE_1:37; hence thesis by Lm14; end; theorem A c= B implies bool A c= bool B proof assume A1: A c= B; let x; assume x in bool A; then x c= A by Def1; then x c= B by A1,XBOOLE_1:1; hence thesis by Def1; end; theorem { A } c= bool A proof A in bool A by Def1; hence thesis by Lm1; end; theorem bool A \/ bool B c= bool (A \/ B) proof let x; assume x in bool A \/ bool B; then x in bool A or x in bool B by XBOOLE_0:def 3; then A1: x c= A or x c= B by Def1; A c= A \/ B & B c= A \/ B by XBOOLE_1:7; then x c= A \/ B by A1,XBOOLE_1:1; hence thesis by Def1; end; theorem bool A \/ bool B = bool (A \/ B) implies A,B are_c=-comparable proof assume A1: bool A \/ bool B = bool (A \/ B); A \/ B in bool (A \/ B) by Def1; then A \/ B in bool A or A \/ B in bool B by A1,XBOOLE_0:def 3; then A2: A \/ B c= A or A \/ B c= B by Def1; A c= A \/ B & B c= A \/ B by XBOOLE_1:7; hence A c= B or B c= A by A2,XBOOLE_0:def 10; end; theorem bool (A /\ B) = bool A /\ bool B proof now let x; A /\ B c= A & A /\ B c= B by XBOOLE_1:17; then x c= A & x c= B iff x c= A /\ B by XBOOLE_1:1,19; then x in bool A & x in bool B iff x in bool (A /\ B) by Def1; hence x in bool (A /\ B) iff x in bool A /\ bool B by XBOOLE_0:def 4; end; hence thesis by TARSKI:1; end; theorem bool (A \ B) c= { {} } \/ (bool A \ bool B) proof let x; assume x in bool (A \ B); then A1: x c= A \ B by Def1; then x misses B by XBOOLE_1:63,79; then A \ B c= A & x /\ B = {} by XBOOLE_0:def 7,XBOOLE_1:36; then x = {} or x c= A & not x c= B by A1,XBOOLE_1:1,28; then x in { {} } or x in bool A & not x in bool B by Def1,TARSKI:def 1; then x in { {} } or x in bool A \ bool B by XBOOLE_0:def 5; hence thesis by XBOOLE_0:def 3; end; theorem bool (A \ B) \/ bool (B \ A) c= bool (A \+\ B) proof let x; assume x in bool (A \ B) \/ bool (B \ A); then x in bool (A \ B) or x in bool (B \ A) by XBOOLE_0:def 3; then A1: x c= A \ B or x c= B \ A by Def1; x c= (A \ B) \/ (B \ A) proof let z; assume z in x; then z in A \ B or z in B \ A by A1,TARSKI:def 3; hence thesis by XBOOLE_0:def 3; end; hence thesis by Def1; end; theorem X in A implies X c= union A by Lm15; theorem union { X,Y } = X \/ Y by Lm16; theorem (for X st X in A holds X c= Z) implies union A c= Z proof assume A1: for X st X in A holds X c= Z; let y; assume y in union A; then consider Y such that A2: y in Y and A3: Y in A by TARSKI:def 4; Y c= Z by A1,A3; hence thesis by A2,TARSKI:def 3; end; theorem Th77: A c= B implies union A c= union B proof assume A1: A c= B; let x; assume x in union A; then consider Y such that A2: x in Y and A3: Y in A by TARSKI:def 4; Y in B by A1,A3,TARSKI:def 3; hence thesis by A2,TARSKI:def 4; end; theorem union (A \/ B) = union A \/ union B proof A1: union (A \/ B) c= union A \/ union B proof let x; assume x in union (A \/ B); then consider Y such that A2: x in Y and A3: Y in A \/ B by TARSKI:def 4; Y in A or Y in B by A3,XBOOLE_0:def 3; then x in union A or x in union B by A2,TARSKI:def 4; hence thesis by XBOOLE_0:def 3; end; union A c= union (A \/ B) & union B c= union (A \/ B) by Th77,XBOOLE_1:7; then union A \/ union B c= union (A \/ B) by XBOOLE_1:8; hence thesis by A1,XBOOLE_0:def 10; end; theorem Th79: union (A /\ B) c= union A /\ union B proof let x; assume x in union (A /\ B); then consider Y such that A1: x in Y and A2: Y in A /\ B by TARSKI:def 4; Y in B by A2,XBOOLE_0:def 4; then A3: x in union B by A1,TARSKI:def 4; Y in A by A2,XBOOLE_0:def 4; then x in union A by A1,TARSKI:def 4; hence thesis by A3,XBOOLE_0:def 4; end; theorem Th80: (for X st X in A holds X misses B) implies union A misses B proof assume A1: for X st X in A holds X misses B; assume union(A) meets B; then consider z being set such that A2: z in union(A) /\ B by XBOOLE_0:4; z in union(A) by A2,XBOOLE_0:def 4; then consider X such that A3: z in X and A4: X in A by TARSKI:def 4; z in B by A2,XBOOLE_0:def 4; then z in X /\ B by A3,XBOOLE_0:def 4; hence contradiction by A1,A4,XBOOLE_0:4; end; theorem union bool A = A proof now let x; thus x in union bool A implies x in A proof assume x in union bool A; then consider X such that A1: x in X and A2: X in bool A by TARSKI:def 4; X c= A by A2,Def1; hence thesis by A1,TARSKI:def 3; end; assume x in A; then { x } c= A by Lm1; then A3: { x } in bool A by Def1; x in { x } by TARSKI:def 1; hence x in union bool A by A3,TARSKI:def 4; end; hence thesis by TARSKI:1; end; theorem A c= bool union A proof let x; assume x in A; then x c= union A by Lm15; hence thesis by Def1; end; theorem (for X,Y st X<>Y & X in A \/ B & Y in A \/ B holds X misses Y) implies union(A /\ B) = union A /\ union B proof assume A1: for X,Y st X<>Y & X in A \/ B & Y in A \/ B holds X misses Y; A2: union A /\ union B c= union (A /\ B) proof let x; assume A3: x in union A /\ union B; then x in union A by XBOOLE_0:def 4; then consider X such that A4: x in X and A5: X in A by TARSKI:def 4; x in union B by A3,XBOOLE_0:def 4; then consider Y such that A6: x in Y and A7: Y in B by TARSKI:def 4; now B8: x in X /\ Y by A4,A6,XBOOLE_0:def 4; assume A9: X<>Y; X in A \/ B & Y in A \/ B by A5,A7,XBOOLE_0:def 3; hence contradiction by A1,A9,B8,XBOOLE_0:4; end; then Y in A /\ B by A5,A7,XBOOLE_0:def 4; hence thesis by A6,TARSKI:def 4; end; union (A /\ B) c= union A /\ union B by Th79; hence thesis by A2,XBOOLE_0:def 10; end; theorem Th84: A c= [:X,Y:] & z in A implies ex x,y st x in X & y in Y & z = [ x,y] proof assume A c= [:X,Y:] & z in A; then z in [:X,Y:] by TARSKI:def 3; hence thesis by Def2; end; theorem Th85: z in [:X1, Y1:] /\ [:X2, Y2:] implies ex x,y st z = [x,y] & x in X1 /\ X2 & y in Y1 /\ Y2 proof assume A1: z in [:X1, Y1:] /\ [:X2, Y2:]; then z in [:X1, Y1:] by XBOOLE_0:def 4; then consider x1,y1 such that A2: x1 in X1 and A3: y1 in Y1 and A4: z=[x1,y1] by Def2; z in [:X2, Y2:] by A1,XBOOLE_0:def 4; then consider x2,y2 such that A5: x2 in X2 and A6: y2 in Y2 and A7: z=[x2,y2] by Def2; y1=y2 by A4,A7,XTUPLE_0:1; then A8: y1 in Y1 /\ Y2 by A3,A6,XBOOLE_0:def 4; x1=x2 by A4,A7,XTUPLE_0:1; then x1 in X1 /\ X2 by A2,A5,XBOOLE_0:def 4; hence thesis by A4,A8; end; theorem [:X,Y:] c= bool bool (X \/ Y) proof let z; assume z in [:X,Y:]; then consider x,y such that A1: x in X and A2: y in Y and A3: z = [x,y] by Def2; z c= bool (X \/ Y) proof let u be set; assume u in z; then A4: u = {x,y} or u = {x} by A3,TARSKI:def 2; X c= X \/ Y & {x} c= X by A1,Lm1,XBOOLE_1:7; then A5: {x} c= X \/ Y by XBOOLE_1:1; x in X \/ Y & y in X \/ Y by A1,A2,XBOOLE_0:def 3; then {x,y} c= X \/ Y by Th32; hence thesis by A5,A4,Def1; end; hence thesis by Def1; end; theorem [x,y] in [:X,Y:] iff x in X & y in Y by Lm17; theorem Th88: [x,y] in [:X,Y:] implies [y,x] in [:Y,X:] proof [x,y] in [:X,Y:] implies x in X & y in Y by Lm17; hence thesis by Lm17; end; theorem (for x,y holds [x,y] in [:X1,Y1:] iff [x,y] in [:X2,Y2:]) implies [:X1 ,Y1:]=[:X2,Y2:] proof assume A1: for x,y holds [x,y] in [:X1,Y1:] iff [x,y] in [:X2,Y2:]; now let z; thus z in [:X1,Y1:] implies z in [:X2,Y2:] proof assume A2: z in [:X1,Y1:]; then ex x,y st x in X1 & y in Y1 & [x,y]=z by Def2; hence thesis by A1,A2; end; assume A3: z in [:X2,Y2:]; then ex x,y st x in X2 & y in Y2 & [x,y]=z by Def2; hence z in [:X1,Y1:] by A1,A3; end; hence thesis by TARSKI:1; end; Lm18: A c= [:X1,Y1:] & B c= [:X2,Y2:] & (for x,y holds [x,y] in A iff [x,y] in B) implies A = B proof assume that A1: A c= [:X1,Y1:] and A2: B c= [:X2,Y2:] and A3: for x,y holds [x,y] in A iff [x,y] in B; now let z; A4: z in B implies ex x,y st x in X2 & y in Y2 & z=[x,y] by A2,Th84; z in A implies ex x,y st x in X1 & y in Y1 & z=[x,y] by A1,Th84; hence z in A iff z in B by A3,A4; end; hence thesis by TARSKI:1; end; Lm19: ( for z st z in A ex x,y st z = [x,y]) & (for z st z in B ex x,y st z=[x ,y]) & (for x,y holds [x,y] in A iff [x,y] in B) implies A = B proof assume that A1: for z st z in A ex x,y st z=[x,y] and A2: for z st z in B ex x,y st z=[x,y] and A3: for x,y holds [x,y] in A iff [x,y] in B; now let z; A4: z in B implies ex x,y st z=[x, y ] by A2; z in A implies ex x,y st z=[x,y] by A1; hence z in A iff z in B by A3,A4; end; hence thesis by TARSKI:1; end; theorem Th90: [:X,Y:] = {} iff X = {} or Y = {} proof thus [:X,Y:] = {} implies X={} or Y={} proof assume A1: [:X,Y:] = {}; assume X<>{}; then consider x being set such that A2: x in X by XBOOLE_0:7; assume Y<>{}; then consider y being set such that A3: y in Y by XBOOLE_0:7; [x,y] in [:X,Y:] by A2,A3,Def2; hence contradiction by A1; end; assume A4: not thesis; then consider z being set such that A5: z in [:X,Y:] by XBOOLE_0:7; A6: now assume A7: Y={}; ex x,y st x in X & y in Y & [x,y]=z by A5,Def2; hence contradiction by A7; end; now assume A8: X={}; ex x,y st x in X & y in Y & [x,y]=z by A5,Def2; hence contradiction by A8; end; hence contradiction by A4,A6; end; theorem X <> {} & Y <> {} & [:X,Y:] = [:Y,X:] implies X = Y proof assume X<>{}; then consider x being set such that A1: x in X by XBOOLE_0:7; assume Y<>{}; then consider y being set such that A2: y in Y by XBOOLE_0:7; assume A3: [:X,Y:]=[:Y,X:]; z in X iff z in Y proof thus z in X implies z in Y proof assume z in X; then [z,y] in [:Y,X:] by A2,A3,Lm17; hence thesis by Lm17; end; assume z in Y; then [z,x] in [:X,Y:] by A1,A3,Lm17; hence thesis by Lm17; end; hence thesis by TARSKI:1; end; theorem [:X,X:] = [:Y,Y:] implies X = Y proof assume A1: [:X,X:] = [:Y,Y:]; x in X iff x in Y proof x in X iff [x,x] in [:X,X:] by Lm17; hence thesis by A1,Lm17; end; hence thesis by TARSKI:1; end; Lm20: z in [:X,Y:] implies ex x,y st [x,y] = z proof assume z in [:X,Y:]; then ex x,y st x in X & y in Y & [x,y]=z by Def2; hence thesis; end; theorem X c= [:X,X:] implies X = {} proof assume A1: X c= [:X,X:]; assume X <> {}; then consider z being set such that A2: z in X by XBOOLE_0:7; consider Y such that A3: Y in X \/ union X and A4: X \/ union X misses Y by XREGULAR:1,A2; now assume A5: Y in X; then consider x,y such that A6: Y=[x,y] by Lm20,A1,TARSKI:def 3; A7: {x} in Y by A6,TARSKI:def 2; Y c= union X by A5,Lm15; then {x} in union X by A7,TARSKI:def 3; then {x} in X \/ union X by XBOOLE_0:def 3; hence contradiction by A4,A7,XBOOLE_0:3; end; then Y in union X by A3,XBOOLE_0:def 3; then consider Z such that A8: Y in Z and A9: Z in X by TARSKI:def 4; Z in [:X,X:] by A1,A9,TARSKI:def 3; then consider x,y such that A10: x in X and y in X and A11: Z=[x,y] by Def2; Y={x} or Y={x,y} by A8,A11,TARSKI:def 2; then A12: x in Y by TARSKI:def 1,def 2; x in X \/ union X by A10,XBOOLE_0:def 3; hence contradiction by A4,A12,XBOOLE_0:3; end; theorem Z <> {} & ([:X,Z:] c= [:Y,Z:] or [:Z,X:] c= [:Z,Y:]) implies X c= Y proof assume Z<>{}; then consider z being set such that A1: z in Z by XBOOLE_0:7; assume A2: [:X,Z:] c= [:Y,Z:] or [:Z,X:] c= [:Z,Y:]; let x; assume x in X; then [x,z] in [:X,Z:] & [z,x] in [:Z,X:] by A1,Def2; then [x,z] in [:Y,Z:] or [z,x] in [:Z,Y:] by A2,TARSKI:def 3; hence thesis by Lm17; end; theorem Th95: X c= Y implies [:X,Z:] c= [:Y,Z:] & [:Z,X:] c= [:Z,Y:] proof assume A1: X c= Y; thus [:X,Z:] c= [:Y,Z:] proof let z; assume z in [:X,Z:]; then consider x,y such that A2: x in X and A3: y in Z & z=[x,y] by Def2; x in Y by A1,A2,TARSKI:def 3; hence thesis by A3,Def2; end; let z; assume z in [:Z,X:]; then consider y,x such that A4: y in Z and A5: x in X and A6: z=[y,x] by Def2; x in Y by A1,A5,TARSKI:def 3; hence thesis by A4,A6,Def2; end; theorem Th96: X1 c= Y1 & X2 c= Y2 implies [:X1,X2:] c= [:Y1,Y2:] proof assume X1 c= Y1 & X2 c= Y2; then [:X1,X2:] c= [:Y1,X2:] & [:Y1,X2:] c= [:Y1,Y2:] by Th95; hence thesis by XBOOLE_1:1; end; theorem Th97: [:X \/ Y, Z:] = [:X, Z:] \/ [:Y, Z:] & [:Z, X \/ Y:] = [:Z, X:] \/ [:Z, Y:] proof A1: for z st z in [:X \/ Y, Z:] ex x,y st z=[x,y] by Lm20; A2: for x,y holds [x,y] in [:X \/ Y, Z:] iff [x,y] in [:X, Z:] \/ [:Y, Z:] proof let x,y; thus [x,y] in [:X \/ Y, Z:] implies [x,y] in [:X, Z:] \/ [:Y, Z:] proof assume A3: [x,y] in [:X \/ Y, Z:]; then x in X \/ Y by Lm17; then A4: x in X or x in Y by XBOOLE_0:def 3; y in Z by A3,Lm17; then [x,y] in [:X,Z:] or [x,y] in [:Y,Z:] by A4,Lm17; hence thesis by XBOOLE_0:def 3; end; assume [x,y] in [:X, Z:] \/ [:Y, Z:]; then [x,y] in [:X, Z:] or [x,y] in [:Y, Z:] by XBOOLE_0:def 3; then A5: x in X & y in Z or x in Y & y in Z by Lm17; then x in X \/ Y by XBOOLE_0:def 3; hence thesis by A5,Lm17; end; A6: z in [:X1,X2:] \/ [:Y1,Y2:] implies ex x,y st z=[x,y] proof assume z in [:X1,X2:] \/ [:Y1,Y2:]; then z in [:X1,X2:] or z in [:Y1,Y2:] by XBOOLE_0:def 3; hence thesis by Lm20; end; then for z st z in [:X,Z:] \/ [:Y,Z:] ex x,y st z=[x,y]; hence A7: [:X \/ Y, Z:] = [:X, Z:] \/ [:Y, Z:] by A1,A2,Lm19; A8: for y,x holds [y,x] in [:Z, X \/ Y:] iff [y,x] in [:Z, X:] \/ [:Z, Y:] proof let y,x; A9: [x,y]in[:X, Z:] or [x,y]in[:Y,Z:] iff [y,x]in[:Z,X:] or [y,x]in[:Z,Y :] by Th88; [y,x] in [:Z, X \/ Y:] iff [x,y] in [:X \/ Y, Z:] by Th88; hence thesis by A7,A9,XBOOLE_0:def 3; end; A10: for z st z in [:Z,X \/ Y:] ex x,y st z=[x,y] by Lm20; for z st z in [:Z,X:] \/ [:Z,Y:] ex x,y st z=[x,y] by A6; hence thesis by A10,A8,Lm19; end; theorem [:X1 \/ X2, Y1 \/ Y2:] = [:X1,Y1:] \/ [:X1,Y2:] \/ [:X2,Y1:] \/ [:X2, Y2:] proof thus [:X1 \/ X2, Y1 \/ Y2:] = [:X1, Y1 \/ Y2:] \/ [:X2, Y1 \/ Y2:] by Th97 .= [:X1,Y1:] \/ [:X1,Y2:] \/ [:X2,Y1 \/ Y2:] by Th97 .= [:X1,Y1:] \/ [:X1,Y2:] \/ ([:X2,Y1:] \/ [:X2,Y2:]) by Th97 .= [:X1,Y1:] \/ [:X1,Y2:] \/ [:X2,Y1:] \/ [:X2,Y2:] by XBOOLE_1:4; end; theorem [:X /\ Y, Z:] = [:X, Z:] /\ [:Y, Z:] & [:Z, X /\ Y:] = [:Z, X:] /\ [:Z , Y :] proof A1: for x,y holds [x,y] in [:X /\ Y, Z:] iff [x,y] in [:X, Z:] /\ [:Y, Z :] proof let x,y; thus [x,y] in [:X /\ Y, Z:] implies [x,y] in [:X, Z:] /\ [:Y, Z:] proof assume A2: [x,y] in [:X /\ Y, Z:]; then A3: x in X /\ Y by Lm17; A4: y in Z by A2,Lm17; x in Y by A3,XBOOLE_0:def 4; then A5: [x,y] in [:Y,Z:] by A4,Lm17; x in X by A3,XBOOLE_0:def 4; then [x,y] in [:X,Z:] by A4,Lm17; hence thesis by A5,XBOOLE_0:def 4; end; assume A6: [x,y] in [:X, Z:] /\ [:Y, Z:]; then [x,y] in [:Y, Z:] by XBOOLE_0:def 4; then A7: x in Y by Lm17; A8: [x,y] in [:X, Z:] by A6,XBOOLE_0:def 4; then x in X by Lm17; then A9: x in X /\ Y by A7,XBOOLE_0:def 4; y in Z by A8,Lm17; hence thesis by A9,Lm17; end; [:X, Z:] /\ [:Y, Z:] c= [:X, Z:] by XBOOLE_1:17; hence A10: [:X /\ Y, Z:] = [:X, Z:] /\ [:Y, Z:] by A1,Lm18; A11: for y,x holds [y,x] in [:Z, X /\ Y:] iff [y,x] in [:Z, X:] /\ [:Z, Y:] proof let y,x; A12: [x,y]in[:X, Z:] & [x,y]in[:Y,Z:] iff [y,x]in[:Z,X:] & [y,x]in[:Z,Y:] by Th88; [y,x] in [:Z, X /\ Y:] iff [x,y] in [:X /\ Y, Z:] by Th88; hence thesis by A10,A12,XBOOLE_0:def 4; end; [:Z, X:] /\ [:Z, Y:] c= [:Z, X:] by XBOOLE_1:17; hence thesis by A11,Lm18; end; theorem Th100: [:X1 /\ X2, Y1 /\ Y2:] = [:X1,Y1:] /\ [:X2, Y2:] proof Y1 /\ Y2 c= Y2 & X1 /\ X2 c= X2 by XBOOLE_1:17; then A1: [:X1 /\ X2, Y1 /\ Y2:] c= [:X2, Y2:] by Th96; A2: [:X1, Y1:] /\ [:X2, Y2:] c= [:X1 /\ X2, Y1 /\ Y2:] proof let z; assume z in [:X1, Y1:] /\ [:X2, Y2:]; then ex x,y st z=[x,y] & x in X1 /\ X2 & y in Y1 /\ Y2 by Th85; hence thesis by Def2; end; Y1 /\ Y2 c= Y1 & X1 /\ X2 c= X1 by XBOOLE_1:17; then [:X1 /\ X2, Y1 /\ Y2:] c= [:X1, Y1:] by Th96; then [:X1 /\ X2, Y1 /\ Y2:] c= [:X1, Y1:] /\ [:X2, Y2:] by A1,XBOOLE_1:19; hence thesis by A2,XBOOLE_0:def 10; end; theorem A c= X & B c= Y implies [:A,Y:] /\ [:X,B:] = [:A,B:] proof assume that A1: A c= X and A2: B c= Y; A3: [:A,Y:] /\ [:X,B:] = [:A /\ X, Y /\ B:] by Th100; A /\ X = A by A1,XBOOLE_1:28; hence thesis by A2,A3,XBOOLE_1:28; end; theorem Th102: [:X \ Y, Z:] = [:X, Z:] \ [:Y, Z:] & [:Z, X \ Y:] = [:Z, X:] \ [:Z, Y:] proof A1: for x,y holds [x,y] in [:X \ Y, Z:] iff [x,y] in [:X, Z:] \ [:Y, Z:] proof let x,y; thus [x,y] in [:X \ Y, Z:] implies [x,y] in [:X, Z:] \ [:Y, Z:] proof assume A2: [x,y] in [:X \ Y, Z:]; then A3: x in X \ Y by Lm17; then A4: x in X by XBOOLE_0:def 5; not x in Y by A3,XBOOLE_0:def 5; then A5: not [x,y] in [:Y,Z:] by Lm17; y in Z by A2,Lm17; then [x,y] in [:X,Z:] by A4,Lm17; hence thesis by A5,XBOOLE_0:def 5; end; assume A6: [x,y] in [:X, Z:] \ [:Y, Z:]; then A7: [x,y] in [:X, Z:] by XBOOLE_0:def 5; then A8: y in Z by Lm17; not [x,y] in [:Y, Z:] by A6,XBOOLE_0:def 5; then A9: not (x in Y & y in Z) by Lm17; x in X by A7,Lm17; then x in X \ Y by A7,A9,Lm17,XBOOLE_0:def 5; hence thesis by A8,Lm17; end; [:X, Z:] \ [:Y, Z:] c= [:X, Z:] by XBOOLE_1:36; hence A10: [:X \ Y, Z:] = [:X, Z:] \ [:Y, Z:] by A1,Lm18; A11: for y,x holds [y,x] in [:Z, X \ Y:] iff [y,x] in [:Z, X:] \ [:Z, Y:] proof let y,x; A12: [x,y]in[:X, Z:]& not[x,y]in[:Y,Z:] iff [y,x]in[:Z,X:]& not[y,x]in[:Z, Y :] by Th88; [y,x] in [:Z, X \ Y:] iff [x,y] in [:X \ Y, Z:] by Th88; hence thesis by A10,A12,XBOOLE_0:def 5; end; [:Z, X:] \ [:Z, Y:] c= [:Z, X:] by XBOOLE_1:36; hence thesis by A11,Lm18; end; theorem [:X1,X2:] \ [:Y1,Y2:] = [:X1\Y1,X2:] \/ [:X1,X2\Y2:] proof A1: [:Y1,X2:] /\ [:X1,Y2:] = [:Y1 /\ X1, X2 /\ Y2:] by Th100; Y1 /\ X1 c= Y1 & X2 /\ Y2 c= Y2 by XBOOLE_1:17; then A2: [:Y1 /\ X1, X2 /\ Y2:] c= [:Y1,Y2:] by Th96; A3: [:X1\Y1,X2:] \/ [:X1,X2\Y2:] c= [:X1,X2:] \ [:Y1, Y2:] proof let z; A4: now assume z in [:X1\Y1,X2:]; then consider x,y such that A5: x in X1\Y1 and A6: y in X2 and A7: z=[x,y] by Def2; not x in Y1 by A5,XBOOLE_0:def 5; then A8: not z in [:Y1,Y2:] by A7,Lm17; x in X1 by A5,XBOOLE_0:def 5; then z in [:X1,X2:] by A6,A7,Lm17; hence thesis by A8,XBOOLE_0:def 5; end; A9: now assume z in [:X1,X2\Y2:]; then consider x,y such that A10: x in X1 and A11: y in X2\Y2 and A12: z=[x,y] by Def2; not y in Y2 by A11,XBOOLE_0:def 5; then A13: not z in [:Y1,Y2:] by A12,Lm17; y in X2 by A11,XBOOLE_0:def 5; then z in [:X1,X2:] by A10,A12,Lm17; hence thesis by A13,XBOOLE_0:def 5; end; assume z in [:X1\Y1,X2:] \/ [:X1,X2\Y2:]; hence thesis by A4,A9,XBOOLE_0:def 3; end; [:X1\Y1,X2:] = [:X1,X2:] \ [:Y1,X2:] & [:X1,X2\Y2:] = [:X1,X2:] \ [:X1, Y2 :] by Th102; then [:X1\Y1,X2:] \/ [:X1,X2\Y2:] = [:X1,X2:] \ [:Y1 /\ X1, X2 /\ Y2:] by A1, XBOOLE_1:54; then [:X1,X2:] \ [:Y1,Y2:] c= [:X1\Y1,X2:] \/ [:X1,X2\Y2:] by A2,XBOOLE_1:34; hence thesis by A3,XBOOLE_0:def 10; end; theorem Th104: X1 misses X2 or Y1 misses Y2 implies [:X1,Y1:] misses [:X2,Y2:] proof assume A1: X1 misses X2 or Y1 misses Y2; assume not thesis; then consider z being set such that A2: z in [:X1,Y1:] /\ [:X2,Y2:] by XBOOLE_0:4; ex x,y st z=[x,y] & x in X1 /\ X2 & y in Y1 /\ Y2 by A2,Th85; hence contradiction by A1,XBOOLE_0:4; end; theorem [x,y] in [:{z},Y:] iff x = z & y in Y proof A1: x in {z} iff x=z by TARSKI:def 1; hence [x,y] in [:{z},Y:] implies x=z & y in Y by Lm17; thus thesis by A1,Lm17; end; theorem [x,y] in [:X,{z}:] iff x in X & y = z proof A1: y in {z} iff y=z by TARSKI:def 1; hence [x,y] in [:X,{z}:] implies x in X & y=z by Lm17; thus thesis by A1,Lm17; end; theorem X <> {} implies [:{x},X:] <> {} & [:X,{x}:] <> {} by Th90; theorem x <> y implies [:{x},X:] misses [:{y},Y:] & [:X,{x}:] misses [:Y,{y}:] proof assume x<>y; then {x} misses {y} by Th11; hence thesis by Th104; end; theorem [:{x,y},X:] = [:{x},X:] \/ [:{y},X:] & [:X,{x,y}:] = [:X,{x}:] \/ [:X, {y} :] proof {x,y}={x} \/ {y} by ENUMSET1:1; hence thesis by Th97; end; theorem Th110: X1 <> {} & Y1 <> {} & [:X1,Y1:] = [:X2,Y2:] implies X1 = X2 & Y1 = Y2 proof assume A1: X1<>{}; then consider x being set such that A2: x in X1 by XBOOLE_0:7; assume A3: Y1<>{}; then consider y being set such that A4: y in Y1 by XBOOLE_0:7; assume A5: [:X1,Y1:] = [:X2,Y2:]; then A6: [:X2,Y2:] <> {} by A1,A3,Th90; then A7: Y2 <> {} by Th90; z in X1 iff z in X2 proof consider y2 being set such that A8: y2 in Y2 by A7,XBOOLE_0:7; thus z in X1 implies z in X2 proof assume z in X1; then [z,y] in [:X2,Y2:] by A4,A5,Lm17; hence thesis by Lm17; end; assume z in X2; then [z,y2] in [:X2,Y2:] by A8,Lm17; hence thesis by A5,Lm17; end; hence X1 = X2 by TARSKI:1; A9: X2 <> {} by A6,Th90; z in Y1 iff z in Y2 proof consider x2 being set such that A10: x2 in X2 by A9,XBOOLE_0:7; thus z in Y1 implies z in Y2 proof assume z in Y1; then [x,z] in [:X2,Y2:] by A2,A5,Lm17; hence thesis by Lm17; end; assume z in Y2; then [x2,z] in [:X2,Y2:] by A10,Lm17; hence thesis by A5,Lm17; end; hence thesis by TARSKI:1; end; theorem X c= [:X,Y:] or X c= [:Y,X:] implies X = {} proof assume A1: X c= [:X,Y:] or X c= [:Y,X:]; assume A2: X <> {}; A3: now defpred P[set] means ex Y st $1=Y & ex z st z in Y & z in X; consider Z such that A4: for y holds y in Z iff y in union X & P[y] from XBOOLE_0:sch 1; consider Y2 such that A5: Y2 in X \/ Z and A6: X \/ Z misses Y2 by XREGULAR:1,A2; now assume A7: not ex Y2 st Y2 in X & for Y1 st Y1 in Y2 holds for z holds not z in Y1 or not z in X; now assume A8: Y2 in X; then consider Y1 such that A9: Y1 in Y2 and A10: ex z st z in Y1 & z in X by A7; Y1 in union X by A8,A9,TARSKI:def 4; then Y1 in Z by A4,A10; then Y1 in X \/ Z by XBOOLE_0:def 3; hence contradiction by A6,A9,XBOOLE_0:3; end; then Y2 in Z by A5,XBOOLE_0:def 3; then ex X2 st Y2=X2 & ex z st z in X2 & z in X by A4; then consider z such that A11: z in Y2 and A12: z in X; z in X \/ Z by A12,XBOOLE_0:def 3; hence contradiction by A6,A11,XBOOLE_0:3; end; then consider Y1 such that A13: Y1 in X and A14: not ex Y2 st Y2 in Y1 & ex z st z in Y2 & z in X; A15: now given y,x such that A16: x in X and A17: Y1 = [y,x]; A18: x in {y,x} by TARSKI:def 2; {y,x} in Y1 by A17,TARSKI:def 2; hence contradiction by A14,A16,A18; end; assume X c= [:Y,X:]; then Y1 in [:Y,X:] by A13,TARSKI:def 3; then ex y,x st y in Y & x in X & Y1 = [y,x] by Def2; hence contradiction by A15; end; now consider z being set such that A19: z in X by A2,XBOOLE_0:7; consider Y1 such that A20: Y1 in X \/ union X and A21: X \/ union X misses Y1 by XREGULAR:1,A19; assume A22: X c= [:X,Y:]; now assume A23: Y1 in X; then consider x,y such that A24: Y1 = [x,y] by Lm20,A22,TARSKI:def 3; A25: {x} in Y1 by A24,TARSKI:def 2; Y1 c= union X by A23,Lm15; then {x} in union X by A25,TARSKI:def 3; then {x} in X \/ union X by XBOOLE_0:def 3; hence contradiction by A21,A25,XBOOLE_0:3; end; then Y1 in union X by A20,XBOOLE_0:def 3; then consider Y2 such that A26: Y1 in Y2 and A27: Y2 in X by TARSKI:def 4; Y2 in [:X,Y:] by A22,A27,TARSKI:def 3; then consider x,y such that A28: x in X and y in Y and A29: Y2=[x,y] by Def2; Y1={x} or Y1={x,y} by A26,A29,TARSKI:def 2; then A30: x in Y1 by TARSKI:def 1,def 2; x in X \/ union X by A28,XBOOLE_0:def 3; hence contradiction by A21,A30,XBOOLE_0:3; end; hence thesis by A1,A3; end; theorem ex M st N in M & (for X,Y holds X in M & Y c= X implies Y in M) & (for X holds X in M implies bool X in M) & for X holds X c= M implies X,M are_equipotent or X in M proof consider M such that A1: N in M and A2: for X,Y holds X in M & Y c= X implies Y in M and A3: for X st X in M ex Z st Z in M & for Y st Y c= X holds Y in Z and A4: for X holds X c= M implies X,M are_equipotent or X in M by TARSKI:3; take M; thus N in M by A1; thus for X,Y holds X in M & Y c= X implies Y in M by A2; thus for X holds X in M implies bool X in M proof let X; assume X in M; then consider Z such that A5: Z in M and A6: for Y st Y c= X holds Y in Z by A3; now let Y; assume Y in bool X; then Y c= X by Def1; hence Y in Z by A6; end; hence thesis by A2,A5,TARSKI:def 3; end; thus thesis by A4; end; reserve e,X,X1,X2,Y1,Y2 for set; theorem e in [:X1,Y1:] & e in [:X2,Y2:] implies e in [:X1 /\ X2, Y1 /\ Y2:] proof assume e in [:X1,Y1:] & e in [:X2,Y2:]; then e in [:X1,Y1:] /\ [:X2,Y2:] by XBOOLE_0:def 4; hence thesis by Th100; end; begin theorem Th114: [:X1,X2:] c= [:Y1,Y2:] & [:X1,X2:] <> {} implies X1 c= Y1 & X2 c= Y2 proof assume that A1: [:X1,X2:] c= [:Y1,Y2:] and A2: [:X1,X2:] <> {}; A3: [:X1,X2:] = [:X1,X2:] /\ [:Y1,Y2:] by A1,XBOOLE_1:28 .= [:X1/\Y1,X2/\Y2:] by Th100; X1 <> {} & X2 <> {} by A2,Th90; then X1 = X1/\Y1 & X2 = X2/\Y2 by A3,Th110; hence thesis by XBOOLE_1:17; end; theorem for A being non empty set, B,C,D being set st [:A,B:] c= [:C,D:] or [: B,A:] c= [:D,C:] holds B c= D proof let A be non empty set, B,C,D be set such that A1: [:A,B:] c= [:C,D:] or [:B,A:] c= [:D,C:]; per cases; suppose B = {}; hence thesis by XBOOLE_1:2; end; suppose B <> {}; then [:A,B:] <> {} & [:B,A:] <> {} by Th90; hence thesis by A1,Th114; end; end; theorem x in X implies (X\{x})\/{x}=X proof assume A1: x in X; thus (X\{x})\/{x}c=X proof let y; assume y in (X\{x})\/{x}; then y in X\{x} or y in {x} by XBOOLE_0:def 3; hence thesis by A1,Th56,TARSKI:def 1; end; thus X c= (X\{x})\/{x} proof let y; assume y in X; then y in {x} or y in X\{x} by XBOOLE_0:def 5; hence thesis by XBOOLE_0:def 3; end; end; theorem not x in X implies (X\/{x})\{x}=X proof A1: (X \/ {x}) \ {x} = X \ {x} by XBOOLE_1:40; assume not x in X; hence thesis by A1,Th57; end; theorem for x,y,z,Z being set holds Z c= {x,y,z} iff Z = {} or Z = {x} or Z = {y} or Z = {z} or Z = {x,y} or Z = {y,z} or Z = {x,z} or Z = {x,y,z} proof let x,y,z,Z be set; hereby assume that A1: Z c= {x,y,z} and A2: Z <> {} and A3: Z <> {x} and A4: Z <> {y} and A5: Z <> {z} and A6: Z <> {x,y} and A7: Z <> {y,z} and A8: Z <> {x,z}; {x,y,z} c= Z proof let a be set; A9: now {x,y,z} \ {x} = ({x} \/ {y,z}) \ {x} by ENUMSET1:2 .= {y,z} \ {x} by XBOOLE_1:40; then A10: {x,y,z} \ {x} c= {y,z} by XBOOLE_1:36; assume not x in Z; then Z c= {x,y,z} \ {x} by A1,Lm2; hence contradiction by A2,A4,A5,A7,Lm14,A10,XBOOLE_1:1; end; A11: now {x,y,z} \ {y} = ({x,y} \/ {z}) \ {y} by ENUMSET1:3 .= ({x} \/ {y} \/ {z}) \ {y} by ENUMSET1:1 .= ({x} \/ {z} \/ {y}) \ {y} by XBOOLE_1:4 .= ({x,z} \/ {y}) \ {y} by ENUMSET1:1 .= {x,z} \ {y} by XBOOLE_1:40; then A12: {x,y,z} \ {y} c= {x,z} by XBOOLE_1:36; assume not y in Z; then Z c= {x,y,z} \ {y} by A1,Lm2; hence contradiction by A2,A3,A5,A8,Lm14,A12,XBOOLE_1:1; end; A13: now {x,y,z} \ {z} = ({x,y} \/ {z}) \ {z} by ENUMSET1:3 .= {x,y} \ {z} by XBOOLE_1:40; then A14: {x,y,z} \ {z} c= {x,y} by XBOOLE_1:36; assume not z in Z; then Z c= {x,y,z} \ {z} by A1,Lm2; hence contradiction by A2,A3,A4,A6,Lm14,A14,XBOOLE_1:1; end; assume a in {x,y,z}; hence thesis by A9,A11,A13,ENUMSET1:def 1; end; hence Z = {x,y,z} by A1,XBOOLE_0:def 10; end; assume A15: Z = {} or Z = {x} or Z = {y} or Z = {z} or Z = {x,y} or Z = {y,z} or Z = {x,z} or Z = {x,y,z}; per cases by A15; suppose Z = {}; hence thesis by XBOOLE_1:2; end; suppose Z = {x}; then Z c= {x} \/ {y,z} by XBOOLE_1:7; hence thesis by ENUMSET1:2; end; suppose A16: Z = {y}; {x,y} c= {x,y} \/ {z} by XBOOLE_1:7; then A17: {x,y} c= {x,y,z} by ENUMSET1:3; Z c= {x,y} by A16,Th7; hence thesis by A17,XBOOLE_1:1; end; suppose Z = {z}; then Z c= {x,y} \/ {z} by XBOOLE_1:7; hence thesis by ENUMSET1:3; end; suppose Z = {x,y}; then Z c= {x,y} \/ {z} by XBOOLE_1:7; hence thesis by ENUMSET1:3; end; suppose Z = {y,z}; then Z c= {x} \/ {y,z} by XBOOLE_1:7; hence thesis by ENUMSET1:2; end; suppose A18: Z = {x,z}; A19: {x,z} \/ {y} = {x} \/ {z} \/ {y} by ENUMSET1:1 .= {x} \/ ({y} \/ {z}) by XBOOLE_1:4 .= {x} \/ {y,z} by ENUMSET1:1; Z c= {x,z} \/ {y} by A18,XBOOLE_1:7; hence thesis by A19,ENUMSET1:2; end; suppose Z = {x,y,z}; hence thesis; end; end; theorem N c= [:X1,Y1:] & M c= [:X2,Y2:] implies N \/ M c= [:X1 \/ X2,Y1 \/ Y2 :] proof assume N c= [:X1,Y1:] & M c= [:X2,Y2:]; then A1: N \/ M c= [:X1,Y1:] \/ [:X2,Y2:] by XBOOLE_1:13; X1 c= X1 \/ X2 & Y1 c= Y1 \/ Y2 by XBOOLE_1:7; then A2: [:X1,Y1:] c= [:X1 \/ X2,Y1 \/ Y2:] by Th96; Y2 c= Y1 \/ Y2 & X2 c= X1 \/ X2 by XBOOLE_1:7; then [:X2,Y2:] c= [:X1 \/ X2,Y1 \/ Y2:] by Th96; then [:X1,Y1:] \/ [:X2,Y2:] c= [:X1 \/ X2,Y1 \/ Y2:] by A2,XBOOLE_1:8; hence thesis by A1,XBOOLE_1:1; end; Lm21: not x in X & not y in X implies {x,y} misses X proof assume A1: ( not x in X)& not y in X; thus {x,y} /\ X c= {} proof let z; assume z in {x,y} /\ X; then z in {x,y} & z in X by XBOOLE_0:def 4; hence thesis by A1,TARSKI:def 2; end; thus thesis by XBOOLE_1:2; end; theorem Th120: not x in X & not y in X implies X = X \ {x,y} proof X \ {x,y} = X iff X misses {x,y} by XBOOLE_1:83; hence thesis by Lm21; end; theorem not x in X & not y in X implies X = X \/ {x,y} \ {x,y} proof A1: (X \/ {x,y}) \ {x,y} = X \ {x,y} by XBOOLE_1:40; assume ( not x in X)& not y in X; hence thesis by A1,Th120; end; definition let x1, x2, x3 be set; pred x1, x2, x3 are_mutually_different means x1 <> x2 & x1 <> x3 & x2 <> x3; end; definition let x1, x2, x3, x4 be set; pred x1, x2, x3, x4 are_mutually_different means x1 <> x2 & x1 <> x3 & x1 <> x4 & x2 <> x3 & x2 <> x4 & x3 <> x4; end; definition let x1, x2, x3, x4, x5 be set; pred x1, x2, x3, x4, x5 are_mutually_different means x1 <> x2 & x1 <> x3 & x1 <> x4 & x1 <> x5 & x2 <> x3 & x2 <> x4 & x2 <> x5 & x3 <> x4 & x3 <> x5 & x4 <> x5; end; definition let x1, x2, x3, x4, x5, x6 be set; pred x1, x2, x3, x4, x5, x6 are_mutually_different means x1 <> x2 & x1 <> x3 & x1 <> x4 & x1 <> x5 & x1 <> x6 & x2 <> x3 & x2 <> x4 & x2 <> x5 & x2 <> x6 & x3 <> x4 & x3 <> x5 & x3 <> x6 & x4 <> x5 & x4 <> x6 & x5 <> x6; end; definition let x1, x2, x3, x4, x5, x6, x7 be set; pred x1, x2, x3, x4, x5, x6, x7 are_mutually_different means x1 <> x2 & x1 <> x3 & x1 <> x4 & x1 <> x5 & x1 <> x6 & x1 <> x7 & x2 <> x3 & x2 <> x4 & x2 <> x5 & x2 <> x6 & x2 <> x7 & x3 <> x4 & x3 <> x5 & x3 <> x6 & x3 <> x7 & x4 <> x5 & x4 <> x6 & x4 <> x7 & x5 <> x6 & x5 <> x7 & x6 <> x7; end; theorem [:{x1,x2},{y1,y2}:] = {[x1,y1],[x1,y2],[x2,y1],[x2,y2]} proof thus [:{x1,x2},{y1,y2}:] = [:{x1}\/{x2},{y1,y2}:] by ENUMSET1:1 .= [:{x1},{y1,y2}:] \/ [:{x2},{y1,y2}:] by Th97 .= {[x1,y1],[x1,y2]} \/ [:{x2},{y1,y2}:] by Th30 .= {[x1,y1],[x1,y2]} \/ {[x2,y1],[x2,y2]} by Th30 .= {[x1,y1],[x1,y2],[x2,y1],[x2,y2]} by ENUMSET1:5; end; theorem x <> y implies A \/ {x} \ {y} = A \ {y} \/ {x} by Th11,XBOOLE_1:87; definition let X; attr X is trivial means :Def10: x in X & y in X implies x = y; end; registration cluster empty -> trivial for set; coherence proof let X; assume A1: X is empty; let x,y; thus thesis by A1; end; end; registration cluster non trivial -> non empty for set; coherence; end; registration let x be set; cluster {x} -> trivial; coherence proof let y,z; assume that A1: y in {x} and A2: z in {x}; y =x by A1,TARSKI:def 1; hence thesis by A2,TARSKI:def 1; end; end; registration cluster trivial non empty for set; existence proof take {{}}; thus thesis; end; end; theorem for A,B,C,p being set st A c= B & B /\ C = {p} & p in A holds A /\ C = {p} proof let A,B,C,p be set such that A1: A c= B; assume A2: B /\ C = {p}; p in B /\ C by A2,TARSKI:def 1; then A4: p in C by XBOOLE_0:def 4; assume p in A; then p in A /\ C by A4,XBOOLE_0:def 4; hence thesis by A2,Lm3,A1,XBOOLE_1:26; end; theorem for A,B,C,p being set st A /\ B c= {p} & p in C & C misses B holds A \/ C misses B proof let A,B,C,p be set such that A1: A /\ B c= {p} and A2: p in C and A3: C misses B; {p} c= C by A2,Lm1; then A /\ B c= C by A1,XBOOLE_1:1; then A /\ B /\ B c= C /\ B by XBOOLE_1:27; then A4: A /\ (B /\ B) c= C /\ B by XBOOLE_1:16; (A \/ C) /\ B = A /\ B \/ C /\ B by XBOOLE_1:23 .= C /\ B by A4,XBOOLE_1:12 .= {} by A3,XBOOLE_0:def 7; hence thesis by XBOOLE_0:def 7; end; theorem for A,B being set st for x,y being set st x in A & y in B holds x misses y holds union A misses union B proof let A,B be set such that A1: for x,y being set st x in A & y in B holds x misses y; for y being set st y in B holds union A misses y proof let y be set; assume y in B; then for x being set st x in A holds x misses y by A1; hence thesis by Th80; end; hence thesis by Th80; end; registration let X be set, Y be empty set; cluster [:X, Y:] -> empty; coherence by Th90; end; registration let X be empty set, Y be set; cluster [:X, Y:] -> empty; coherence by Th90; end; theorem not A in [:A,B:] proof assume A in [:A,B:]; then consider x,y such that A1: x in A & y in B & A = [x,y] by Th84; x = {x} or x = {x,y} by A1,TARSKI:def 2; then x in x by TARSKI:def 1,def 2; hence contradiction; end; theorem [x,{x}] in [:{x},[x,{x}]:] proof [:{x},[x,{x}]:] = { [x,{x}], [x,{x,{x}}] } by Th30; hence thesis by TARSKI:def 2; end; theorem B in [:A,B:] implies ex x st x in A & B = [x,{x}] proof assume B in [:A,B:]; then consider x,y such that A1: x in A & y in B & B = [x,y] by Th84; take x; thus x in A by A1; per cases by A1,TARSKI:def 2; suppose y = {x}; hence thesis by A1; end; suppose y = {x,y}; then y in y by TARSKI:def 2; hence thesis; end; end; theorem B c= A & A is trivial implies B is trivial proof assume that A1: B c= A and A2: A is trivial; let x,y; assume x in B & y in B; then x in A & y in A by A1,TARSKI:def 3; hence thesis by A2,Def10; end; registration cluster non trivial for set; existence proof take {{},{{}}}, {},{{}}; thus {} in {{},{{}}} & {{}} in {{},{{}}} by TARSKI:def 2; thus {} <> {{}}; end; end; theorem Th131: X is non empty trivial implies ex x st X = {x} proof assume X is non empty; then consider x such that A1: x in X by XBOOLE_0:def 1; assume A2: X is trivial; take x; for y holds y in X iff x = y by A2,A1,Def10; hence thesis by TARSKI:def 1; end; theorem for x being set, X being trivial set st x in X holds X = {x} proof let x be set, X be trivial set; assume A1: x in X; then ex x being set st X = {x} by Th131; hence thesis by A1,TARSKI:def 1; end; theorem for a,b,c,X being set st a in X & b in X & c in X holds {a,b,c} c= X proof let a,b,c,X be set; assume a in X & b in X & c in X; then {a,b} c= X & {c} c= X by Lm1,Th32; then {a,b} \/ {c} c= X by XBOOLE_1:8; hence thesis by ENUMSET1:3; end; theorem [x,y] in X implies x in union union X & y in union union X proof assume A1: [x,y] in X; { x } in [x,y] by TARSKI:def 2; then A2: {x} in union X by A1,TARSKI:def 4; {x,y} in [x,y] by TARSKI:def 2; then A3: {x,y} in union X by A1,TARSKI:def 4; y in {x,y} & x in {x} by TARSKI:def 1,def 2; hence thesis by A3,A2,TARSKI:def 4; end; theorem Th135: X c= Y \/ {x} implies x in X or X c= Y proof assume that A1: X c= Y \/ {x} and A2: not x in X; X = X /\ (Y \/ {x}) by A1,XBOOLE_1:28 .= X /\ Y \/ X /\ {x} by XBOOLE_1:23 .= X /\ Y \/ {} by A2,Lm7,XBOOLE_0:def 7 .= X /\ Y; hence thesis by XBOOLE_1:17; end; theorem x in X \/ {y} iff x in X or x = y proof x in X \/ {y} iff x in X or x in {y} by XBOOLE_0:def 3; hence thesis by TARSKI:def 1; end; theorem X \/ {x} c= Y iff x in Y & X c= Y proof X c= Y & {x} c= Y implies X \/ {x} c= Y by XBOOLE_1:8; hence thesis by Lm1,XBOOLE_1:11; end; theorem for A, B, a being set st A c= B & B c= A \/ {a} holds A \/ {a} = B or A = B proof let A, B, a be set; assume that A1: A c= B and A2: B c= A \/ {a}; assume that A3: A \/ {a} <> B and A4: A <> B; A5: not A \/ {a} c= B by A2,A3,XBOOLE_0:def 10; A6: not a in B proof assume a in B; then {a} c= B by Lm1; hence thesis by A1,A5,XBOOLE_1:8; end; not B c= A by A1,A4,XBOOLE_0:def 10; hence thesis by A2,A6,Th135; end; begin reserve E,X,x,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10 for set; registration let X be set; cluster bool X -> non empty; coherence by ZFMISC_1:def 1; end; registration let x1, x2, x3; cluster { x1, x2, x3 } -> non empty; coherence by ENUMSET1:def 1; let x4; cluster { x1, x2, x3, x4 } -> non empty; coherence by ENUMSET1:def 2; let x5; cluster { x1, x2, x3, x4, x5 } -> non empty; coherence by ENUMSET1:def 3; let x6; cluster { x1, x2, x3, x4, x5, x6 } -> non empty; coherence by ENUMSET1:def 4; let x7; cluster { x1, x2, x3, x4, x5, x6, x7 } -> non empty; coherence by ENUMSET1:def 5; let x8; cluster { x1, x2, x3, x4, x5, x6, x7, x8 } -> non empty; coherence by ENUMSET1:def 6; let x9; cluster { x1, x2, x3, x4, x5, x6, x7, x8, x9 } -> non empty; coherence by ENUMSET1:def 7; let x10; cluster { x1, x2, x3, x4, x5, x6, x7, x8, x9, x10 } -> non empty; coherence by ENUMSET1:def 8; end; definition let X; mode Element of X means :Def1: it in X if X is non empty otherwise it is empty; existence by XBOOLE_0:def 1; consistency; sethood proof per cases; case X is non empty; take X; thus thesis; end; case X is empty; take {{}}; let y be set; thus thesis by TARSKI:def 1; end; end; end; definition let X; mode Subset of X is Element of bool X; end; registration let X be non empty set; cluster non empty for Subset of X; existence proof X in bool X by ZFMISC_1:def 1; then X is Subset of X by Def1; hence thesis; end; end; registration let X1,X2 be non empty set; cluster [: X1,X2 :] -> non empty; coherence proof consider x2 being set such that A1: x2 in X2 by XBOOLE_0:def 1; consider x1 being set such that A2: x1 in X1 by XBOOLE_0:def 1; [x1,x2] in [:X1,X2:] by A2,A1,ZFMISC_1:def 2; hence thesis; end; end; registration let X1,X2,X3 be non empty set; cluster [: X1,X2,X3 :] -> non empty; coherence; end; registration let X1,X2,X3,X4 be non empty set; cluster [: X1,X2,X3,X4 :] -> non empty; coherence; end; definition let D be non empty set, X be non empty Subset of D; redefine mode Element of X -> Element of D; coherence proof let x be Element of X; X in bool D by Def1; then A1: X c= D by ZFMISC_1:def 1; x in X by Def1; then x in D by A1,TARSKI:def 3; hence thesis by Def1; end; end; Lm1: for X being Subset of E, x being set st x in X holds x in E proof let X be Subset of E, x be set such that A1: x in X; X in bool E by Def1; then X c= E by ZFMISC_1:def 1; hence thesis by A1,TARSKI:def 3; end; registration let E; cluster empty for Subset of E; existence proof {} c= E by XBOOLE_1:2; then {} in bool E by ZFMISC_1:def 1; then {} is Subset of E by Def1; hence thesis; end; end; definition let E; func {}E -> Subset of E equals {}; coherence proof {} c= E by XBOOLE_1:2; then {} in bool E by ZFMISC_1:def 1; hence thesis by Def1; end; correctness; func [#] E -> Subset of E equals E; coherence proof E in bool E by ZFMISC_1:def 1; hence thesis by Def1; end; correctness; end; registration let E; cluster {}E -> empty; coherence; end; theorem {} is Subset of X proof {}X = {}; hence thesis; end; reserve A,B,C for Subset of E; theorem Th2: (for x being Element of E holds x in A implies x in B) implies A c= B proof assume A1: for x being Element of E holds x in A implies x in B; let x be set; assume A2: x in A; then x in E by Lm1; then x is Element of E by Def1; hence thesis by A1,A2; end; theorem Th3: (for x being Element of E holds x in A iff x in B) implies A = B proof assume for x being Element of E holds x in A iff x in B; hence A c= B & B c= A by Th2; end; theorem Th4: A <> {} implies ex x being Element of E st x in A proof assume A <> {}; then consider x being set such that A1: x in A by XBOOLE_0:def 1; x in E by A1,Lm1; then x is Element of E by Def1; hence thesis by A1; end; definition let E,A; func A` -> Subset of E equals E \ A; coherence proof E \ A c= E by XBOOLE_1:36; then E \ A in bool E by ZFMISC_1:def 1; hence thesis by Def1; end; correctness; involutiveness proof let S,T be Subset of E; assume A1: S = E \ T; T in bool E by Def1; then T c= E by ZFMISC_1:def 1; hence T = {} \/ E /\ T by XBOOLE_1:28 .= (E \ E) \/ E /\ T by XBOOLE_1:37 .= E \ S by A1,XBOOLE_1:52; end; let B; redefine func A \/ B -> Subset of E; coherence proof B in bool E by Def1; then A2: B c= E by ZFMISC_1:def 1; A in bool E by Def1; then A c= E by ZFMISC_1:def 1; then A \/ B c= E by A2,XBOOLE_1:8; then A \/ B in bool E by ZFMISC_1:def 1; hence thesis by Def1; end; redefine func A \+\ B -> Subset of E; coherence proof B in bool E by Def1; then B \ A c= B & B c= E by XBOOLE_1:36,ZFMISC_1:def 1; then A3: B \ A c= E by XBOOLE_1:1; A in bool E by Def1; then A \ B c= A & A c= E by XBOOLE_1:36,ZFMISC_1:def 1; then A \ B c= E by XBOOLE_1:1; then (A \ B) \/ (B \ A) c= E by A3,XBOOLE_1:8; then A \+\ B in bool E by ZFMISC_1:def 1; hence thesis by Def1; end; end; definition let X,Y be set; redefine func X \ Y -> Subset of X; coherence proof X \ Y c= X by XBOOLE_1:36; then X \ Y in bool X by ZFMISC_1:def 1; hence thesis by Def1; end; end; definition let E,A,X; redefine func A \ X -> Subset of E; coherence proof A in bool E by Def1; then A \ X c= A & A c= E by XBOOLE_1:36,ZFMISC_1:def 1; then A \ X c= E by XBOOLE_1:1; then A \ X in bool E by ZFMISC_1:def 1; hence A \ X is Subset of E by Def1; end; end; definition let E,A,X; redefine func A /\ X -> Subset of E; coherence proof A in bool E by Def1; then A /\ X c= A & A c= E by XBOOLE_1:17,ZFMISC_1:def 1; then A /\ X c= E by XBOOLE_1:1; then A /\ X in bool E by ZFMISC_1:def 1; hence thesis by Def1; end; end; definition let E,X,A; redefine func X /\ A -> Subset of E; coherence proof A /\ X is Subset of E; hence thesis; end; end; theorem (for x being Element of E holds x in A iff x in B or x in C) implies A = B \/ C proof assume A1: for x being Element of E holds x in A iff x in B or x in C; now let x be Element of E; assume x in A; then x in B or x in C by A1; hence x in B \/ C by XBOOLE_0:def 3; end; hence A c= B \/ C by Th2; now let x be Element of E; assume x in B \/ C; then x in B or x in C by XBOOLE_0:def 3; hence x in A by A1; end; hence thesis by Th2; end; theorem (for x being Element of E holds x in A iff x in B & x in C) implies A = B /\ C proof assume A1: for x being Element of E holds x in A iff x in B & x in C; now let x be Element of E; assume x in A; then x in B & x in C by A1; hence x in B /\ C by XBOOLE_0:def 4; end; hence A c= B /\ C by Th2; now let x be Element of E; assume x in B /\ C; then x in B & x in C by XBOOLE_0:def 4; hence x in A by A1; end; hence thesis by Th2; end; theorem (for x being Element of E holds x in A iff x in B & not x in C) implies A = B \ C proof assume A1: for x being Element of E holds x in A iff x in B & not x in C; now let x be Element of E; assume x in A; then x in B & not x in C by A1; hence x in B \ C by XBOOLE_0:def 5; end; hence A c= B \ C by Th2; now let x be Element of E; assume x in B \ C; then x in B & not x in C by XBOOLE_0:def 5; hence x in A by A1; end; hence thesis by Th2; end; theorem (for x being Element of E holds x in A iff not(x in B iff x in C)) implies A = B \+\ C proof assume A1: for x being Element of E holds x in A iff not(x in B iff x in C); now let x be Element of E; assume x in A; then x in B & not x in C or x in C & not x in B by A1; then x in B \ C or x in C \ B by XBOOLE_0:def 5; hence x in B \+\ C by XBOOLE_0:def 3; end; hence A c= B \+\ C by Th2; now let x be Element of E; assume x in B \+\ C; then x in B \ C or x in C \ B by XBOOLE_0:def 3; then x in B & not x in C or x in C & not x in B by XBOOLE_0:def 5; hence x in A by A1; end; hence thesis by Th2; end; theorem [#] E = ({} E)`; theorem Th10: A \/ A` = [#]E proof A in bool E by Def1; then A c= E by ZFMISC_1:def 1; hence thesis by XBOOLE_1:45; end; theorem A \/ [#]E = [#]E proof A in bool E by Def1; then A c= E by ZFMISC_1:def 1; hence thesis by XBOOLE_1:12; end; theorem Th12: A c= B iff B` c= A` proof thus A c= B implies B` c= A` by XBOOLE_1:34; A1: E \ B` = B`` .= B; E \ A` = A`` .= A; hence thesis by A1,XBOOLE_1:34; end; theorem A \ B = A /\ B` proof A in bool E by Def1; then A1: A c= E by ZFMISC_1:def 1; thus A /\ B` = (A /\ E) \ B by XBOOLE_1:49 .= A \ B by A1,XBOOLE_1:28; end; theorem (A \ B)` = A` \/ B proof B in bool E by Def1; then A1: B c= E by ZFMISC_1:def 1; thus (A \ B)` = (E \ A) \/ E /\ B by XBOOLE_1:52 .= A` \/ B by A1,XBOOLE_1:28; end; theorem (A \+\ B)` = A /\ B \/ A` /\ B` proof A in bool E by Def1; then A1: A c= E by ZFMISC_1:def 1; thus (A \+\ B)` = E \ (A \/ B) \/ E /\ A /\ B by XBOOLE_1:102 .= A /\ B \/ (E \ (A \/ B)) by A1,XBOOLE_1:28 .= A /\ B \/ (A`) /\ (B`) by XBOOLE_1:53; end; theorem A c= B` implies B c= A` proof assume A c= B`; then B``c= A` by Th12; hence thesis; end; theorem A` c= B implies B` c= A proof assume A` c= B; then B` c= A`` by Th12; hence thesis; end; theorem A c= A` iff A = {}E proof thus A c= A` implies A = {}E by XBOOLE_1:38; A in bool E by Def1; hence thesis by ZFMISC_1:def 1; end; theorem A` c= A iff A = [#]E proof thus A` c= A implies A = [#]E proof assume A` c= A; hence A = A \/ A` by XBOOLE_1:12 .= [#]E by Th10; end; assume A = [#]E; then A` = {} by XBOOLE_1:37; hence thesis by XBOOLE_1:2; end; theorem X c= A & X c= A` implies X = {} by XBOOLE_1:67,79; theorem (A \/ B)` c= A` proof A c= A \/ B by XBOOLE_1:7; hence thesis by Th12; end; theorem A` c= (A /\ B)` proof A /\ B c= A by XBOOLE_1:17; hence thesis by Th12; end; theorem Th23: A misses B iff A c= B` proof thus A misses B implies A c= B` proof assume A1: A misses B; let x; assume A2: x in A; then A3: not x in B by A1,XBOOLE_0:3; x in E by A2,Lm1; hence thesis by A3,XBOOLE_0:def 5; end; assume A4: A c= B`; assume A meets B; then consider x such that A5: x in A and A6: x in B by XBOOLE_0:3; x in E \ B by A4,A5,TARSKI:def 3; hence thesis by A6,XBOOLE_0:def 5; end; theorem A misses B` iff A c= B proof B``= B; hence thesis by Th23; end; theorem A misses B & A` misses B` implies A = B` proof assume that A1: A misses B and A2: A` misses B`; A3: A in bool E by Def1; thus A c= B` proof let x; assume A4: x in A; then A5: not x in B by A1,XBOOLE_0:3; A c= E by A3,ZFMISC_1:def 1; then x in E by A4,TARSKI:def 3; hence thesis by A5,XBOOLE_0:def 5; end; let x; A6: x in A` implies not x in B` by A2,XBOOLE_0:3; assume A7: x in B`; then x in E by XBOOLE_0:def 5; hence thesis by A7,A6,XBOOLE_0:def 5; end; theorem A c= B & C misses B implies A c= C` proof assume A c= B & C misses B; then A misses C by XBOOLE_1:63; hence thesis by Th23; end; theorem (for a being Element of A holds a in B) implies A c= B proof assume A1: for a being Element of A holds a in B; let a be set; assume a in A; then a is Element of A by Def1; hence thesis by A1; end; theorem (for x being Element of E holds x in A) implies E = A proof assume A1: for x being Element of E holds x in A; thus E c= A proof let a be set; assume a in E; then a is Element of E by Def1; hence thesis by A1; end; A in bool E by Def1; hence thesis by ZFMISC_1:def 1; end; theorem E <> {} implies for B for x being Element of E st not x in B holds x in B` proof assume A1: E <> {}; let B be Subset of E; let x be Element of E; assume A2: not x in B; x in E by A1,Def1; hence thesis by A2,XBOOLE_0:def 5; end; theorem Th30: for A,B st for x being Element of E holds x in A iff not x in B holds A = B` proof let A,B be Subset of E; assume A1: for x being Element of E holds x in A iff not x in B; thus A c= B` proof let x be set; assume A2: x in A; A in bool E by Def1; then A c= E by ZFMISC_1:def 1; then x in E by A2,TARSKI:def 3; then x is Element of E by Def1; then A3: not x in B by A1,A2; x in E by A2,Lm1; hence thesis by A3,XBOOLE_0:def 5; end; let x be set; assume A4: x in B`; B` in bool E by Def1; then B` c= E by ZFMISC_1:def 1; then x in E by A4,TARSKI:def 3; then reconsider x as Element of E by Def1; not x in B by A4,XBOOLE_0:def 5; hence thesis by A1; end; theorem for A,B st for x being Element of E holds not x in A iff x in B holds A = B` proof let A,B; assume for x being Element of E holds not x in A iff x in B; then for x being Element of E holds x in A iff not x in B; hence thesis by Th30; end; theorem for A,B st for x being Element of E holds not(x in A iff x in B) holds A = B` proof let A,B; assume for x being Element of E holds not(x in A iff x in B); then for x being Element of E holds x in A iff not x in B; hence thesis by Th30; end; reserve x1,x2,x3,x4,x5,x6,x7,x8 for Element of X; theorem X <> {} implies {x1} is Subset of X proof assume X <> {}; then A1: x1 in X by Def1; {x1} c= X proof let x; assume x in {x1}; hence thesis by A1,TARSKI:def 1; end; then {x1} in bool X by ZFMISC_1:def 1; hence thesis by Def1; end; theorem X <> {} implies {x1,x2} is Subset of X proof assume X <> {}; then A1: x1 in X & x2 in X by Def1; {x1,x2} c= X proof let x; assume x in {x1,x2}; hence thesis by A1,TARSKI:def 2; end; then {x1,x2} in bool X by ZFMISC_1:def 1; hence thesis by Def1; end; theorem X <> {} implies {x1,x2,x3} is Subset of X proof assume A1: X <> {}; then A2: x3 in X by Def1; A3: x1 in X & x2 in X by A1,Def1; {x1,x2,x3} c= X proof let x; assume x in {x1,x2,x3}; hence thesis by A3,A2,ENUMSET1:def 1; end; then {x1,x2,x3} in bool X by ZFMISC_1:def 1; hence thesis by Def1; end; theorem X <> {} implies {x1,x2,x3,x4} is Subset of X proof assume A1: X <> {}; then A2: x3 in X & x4 in X by Def1; A3: x1 in X & x2 in X by A1,Def1; {x1,x2,x3,x4} c= X proof let x; assume x in {x1,x2,x3,x4}; hence thesis by A3,A2,ENUMSET1:def 2; end; then {x1,x2,x3,x4} in bool X by ZFMISC_1:def 1; hence thesis by Def1; end; theorem X <> {} implies {x1,x2,x3,x4,x5} is Subset of X proof assume A1: X <> {}; {x1,x2,x3,x4,x5} c= X proof let x; A2: x in { x1,x2,x3,x4,x5 } implies x=x1 or x=x2 or x=x3 or x=x4 or x=x5 by ENUMSET1:def 3; assume x in {x1,x2,x3,x4,x5}; hence thesis by A1,A2,Def1; end; then {x1,x2,x3,x4,x5} in bool X by ZFMISC_1:def 1; hence thesis by Def1; end; theorem X <> {} implies {x1,x2,x3,x4,x5,x6} is Subset of X proof assume A1: X <> {}; {x1,x2,x3,x4,x5,x6} c= X proof let x; A2: x in { x1,x2,x3,x4,x5,x6} implies x=x1 or x=x2 or x=x3 or x=x4 or x=x5 or x=x6 by ENUMSET1:def 4; assume x in {x1,x2,x3,x4,x5,x6}; hence thesis by A1,A2,Def1; end; then {x1,x2,x3,x4,x5,x6} in bool X by ZFMISC_1:def 1; hence thesis by Def1; end; theorem X <> {} implies {x1,x2,x3,x4,x5,x6,x7} is Subset of X proof assume A1: X <> {}; {x1,x2,x3,x4,x5,x6,x7} c= X proof let x; A2: x in { x1,x2,x3,x4,x5,x6,x7} implies x=x1 or x=x2 or x=x3 or x=x4 or x =x5 or x=x6 or x=x7 by ENUMSET1:def 5; assume x in {x1,x2,x3,x4,x5,x6,x7}; hence thesis by A1,A2,Def1; end; then {x1,x2,x3,x4,x5,x6,x7} in bool X by ZFMISC_1:def 1; hence thesis by Def1; end; theorem X <> {} implies {x1,x2,x3,x4,x5,x6,x7,x8} is Subset of X proof assume A1: X <> {}; {x1,x2,x3,x4,x5,x6,x7,x8} c= X proof let x; A2: x in { x1,x2,x3,x4,x5,x6,x7,x8} implies x=x1 or x=x2 or x=x3 or x=x4 or x=x5 or x=x6 or x=x7 or x=x8 by ENUMSET1:def 6; assume x in {x1,x2,x3,x4,x5,x6,x7,x8}; hence thesis by A1,A2,Def1; end; then {x1,x2,x3,x4,x5,x6,x7,x8} in bool X by ZFMISC_1:def 1; hence thesis by Def1; end; theorem x in X implies {x} is Subset of X proof assume x in X; then {x} c= X by ZFMISC_1:31; then {x} in bool X by ZFMISC_1:def 1; hence thesis by Def1; end; scheme SubsetEx { A()-> set, P[set] } : ex X being Subset of A() st for x holds x in X iff x in A() & P[x] proof consider X being set such that A1: for x holds x in X iff x in A() & P[x] from XBOOLE_0:sch 1; X c= A() proof let x; thus thesis by A1; end; then X in bool A() by ZFMISC_1:def 1; then reconsider X as Subset of A() by Def1; take X; thus thesis by A1; end; scheme SubsetEq {X() -> set, X1,X2()-> Subset of X(), P[set]}: X1() = X2() provided A1: for y being Element of X() holds y in X1() iff P[y] and A2: for y being Element of X() holds y in X2() iff P[y] proof for x being Element of X() holds x in X1() iff x in X2() proof let x be Element of X(); hereby assume x in X1(); then P[x] by A1; hence x in X2() by A2; end; assume x in X2(); then P[x] by A2; hence thesis by A1; end; hence thesis by Th3; end; definition let X, Y be non empty set; redefine pred X misses Y; irreflexivity proof let A be non empty set; ex x being set st x in A by XBOOLE_0:def 1; hence thesis by XBOOLE_0:3; end; end; definition let X, Y be non empty set; redefine pred X meets Y; reflexivity proof let A be non empty set; thus not A misses A; end; end; definition let S be set; func choose S -> Element of S equals the Element of S; correctness; end; begin reserve Y for set; Lm2: (for x st x in X holds x in Y) implies X is Subset of Y proof assume for x st x in X holds x in Y; then X c= Y by TARSKI:def 3; then X in bool Y by ZFMISC_1:def 1; hence thesis by Def1; end; Lm3: x in A implies x is Element of E proof assume x in A; then x in E by Lm1; hence thesis by Def1; end; scheme SubsetEx { A() -> non empty set, P[set] } : ex B being Subset of A() st for x being Element of A() holds x in B iff P[x] proof consider B being set such that A1: for x being set holds x in B iff x in A() & P[x] from XBOOLE_0:sch 1; for x being set holds x in B implies x in A() by A1; then reconsider B as Subset of A() by Lm2; take B; let x be Element of A(); x in A() by Def1; hence thesis by A1; end; scheme SubComp{A() -> set, F1,F2() -> Subset of A(), P[set]}: F1() = F2() provided A1: for X being Element of A() holds X in F1() iff P[X] and A2: for X being Element of A() holds X in F2() iff P[X] proof thus F1() c= F2() proof let x; assume A3: x in F1(); then reconsider X = x as Element of A() by Lm3; P[X] by A1,A3; hence thesis by A2; end; let x; assume A4: x in F2(); then reconsider X = x as Element of A() by Lm3; P[X] by A2,A4; hence thesis by A1; end; theorem A` = B` implies A = B proof assume A` = B`; hence A = B`` .= B; end; registration let X be empty set; cluster -> empty for Subset of X; coherence proof let Y be Subset of X; Y in bool X by Def1; then Y c= X by ZFMISC_1:def 1; hence thesis by XBOOLE_1:3; end; end; definition let E be set; let A be Subset of E; attr A is proper means A <> E; end; registration let E be set; cluster [#]E -> non proper; coherence proof thus [#]E = E; end; end; registration let E be set; cluster non proper for Subset of E; existence proof take [#]E; thus thesis; end; end; registration let E be non empty set; cluster non proper -> non empty for Subset of E; coherence proof let A be Subset of E; assume A = E; hence thesis; end; cluster empty -> proper for Subset of E; coherence; end; registration let E be non empty set; cluster proper for Subset of E; existence proof take {} E; thus {} E <> E; end; end; registration let E be empty set; cluster -> non proper for Subset of E; coherence proof let A be Subset of E; thus A = E; end; end; theorem for X,Y,A being set, z being set st z in A & A c= [:X,Y:] ex x being Element of X, y being Element of Y st z = [x,y] proof let X,Y,A be set, z be set; assume z in A & A c= [:X,Y:]; then consider x,y being set such that A1: x in X and A2: y in Y and A3: z = [x,y] by ZFMISC_1:84; reconsider y as Element of Y by A2,Def1; reconsider x as Element of X by A1,Def1; take x,y; thus thesis by A3; end; theorem for X being non empty set, A, B being non empty Subset of X st A c< B ex p being Element of X st p in B & A c= B \ {p} proof let X be non empty set, A, B be non empty Subset of X; assume A1: A c< B; then consider p being Element of X such that A2: p in B \ A by Th4,XBOOLE_1:105; A3: not p in A by A2,XBOOLE_0:def 5; take p; A c= B by A1,XBOOLE_0:def 8; hence thesis by A2,A3,XBOOLE_0:def 5,ZFMISC_1:34; end; definition let X be non empty set; redefine attr X is trivial means for x,y being Element of X holds x = y; compatibility proof thus X is trivial implies for x,y being Element of X holds x = y proof assume A1: X is trivial; let x,y be Element of X; x in X & y in X by Def1; hence x = y by A1,ZFMISC_1:def 10; end; assume A2: for x,y being Element of X holds x = y; let x,y be set; assume x in X & y in X; then x is Element of X & y is Element of X by Def1; hence thesis by A2; end; end; registration let X be non empty set; cluster non empty trivial for Subset of X; existence proof the Element of X in X by Def1; then {the Element of X} c= X by ZFMISC_1:31; then {the Element of X} in bool X by ZFMISC_1:def 1; then reconsider A = {the Element of X} as Subset of X by Def1; take A; thus A is non empty; let x,y be set; assume x in A & y in A; then x = the Element of X & y = the Element of X by TARSKI:def 1; hence thesis; end; end; registration let X be trivial set; cluster -> trivial for Subset of X; coherence proof let Y be Subset of X; let x,y be set; assume x in Y & y in Y; then x in X & y in X by Lm1; hence thesis by ZFMISC_1:def 10; end; end; registration let X be non trivial set; cluster non trivial for Subset of X; existence proof take [#]X; thus thesis; end; end; theorem for D being set, A being Subset of D st A is non trivial ex d1,d2 being Element of D st d1 in A & d2 in A & d1 <> d2 proof let D be set, A be Subset of D; assume A is non trivial; then consider d1,d2 being set such that A1: d1 in A & d2 in A and A2: d1 <> d2 by ZFMISC_1:def 10; d1 in D & d2 in D by A1,Lm1; then reconsider d1,d2 as Element of D by Def1; take d1,d2; thus d1 in A & d2 in A & d1 <> d2 by A1,A2; end; theorem Th46: for X being trivial non empty set ex x being Element of X st X = {x} proof let X be trivial non empty set; consider x being set such that A1: X = {x} by ZFMISC_1:131; x in X by A1,TARSKI:def 1; then reconsider x as Element of X by Def1; take x; thus X = {x} by A1; end; theorem for X being non empty set, A being non empty Subset of X holds A is trivial implies ex x being Element of X st A = {x} proof let X be non empty set, A be non empty Subset of X; assume A is trivial; then ex s being Element of A st A = {s} by Th46; hence thesis; end; theorem for X be non trivial set, x being Element of X ex y be set st y in X & x <> y proof let X be non trivial set; let x be Element of X; consider d1,d2 being set such that A1: d1 in X & d2 in X and A2: d1 <> d2 by ZFMISC_1:def 10; x <> d1 or x <> d2 by A2; hence thesis by A1; end; begin theorem for a, b being set st a in b holds a is Element of b by SUBSET_1:def 1; theorem for a, b being set st a is Element of b & b is non empty holds a in b by SUBSET_1:def 1; theorem Th3: for a, b being set holds a is Subset of b iff a c= b proof let a, b be set; hereby assume a is Subset of b; then a in bool b by SUBSET_1:def 1; hence a c= b by ZFMISC_1:def 1; end; assume a c= b; then a in bool b by ZFMISC_1:def 1; hence thesis by SUBSET_1:def 1; end; theorem for a, b, c being set st a in b & b is Subset of c holds a is Element of c proof let a, b, c be set; assume that A1: a in b and A2: b is Subset of c; b c= c by A2,Th3; then a in c by A1,TARSKI:def 3; hence thesis by SUBSET_1:def 1; end; theorem for a, b, c being set st a in b & b is Subset of c holds c is non empty; begin reserve X,Y,Z,Z1,Z2,D,x,y for set; definition let X; func meet X means :Def1: for x holds x in it iff for Y holds Y in X implies x in Y if X <> {} otherwise it = {}; existence proof thus X <> {} implies ex Z1 st for x holds x in Z1 iff for Z st Z in X holds x in Z proof defpred X[set] means for Z st Z in X holds $1 in Z; assume A1: X <> {}; consider Y such that A2: for x holds x in Y iff x in union X & X[x] from XBOOLE_0:sch 1; take Y; for x holds (for Z st Z in X holds x in Z) implies x in Y proof set y = the Element of X; let x such that A3: for Z st Z in X holds x in Z; x in y by A1,A3; then x in union X by A1,TARSKI:def 4; hence thesis by A2,A3; end; hence thesis by A2; end; thus thesis; end; uniqueness proof let Z1,Z2; now assume that X <> {} and A4: for x holds x in Z1 iff for Y holds Y in X implies x in Y and A5: for x holds x in Z2 iff for Y holds Y in X implies x in Y; now let x; x in Z1 iff for Y holds Y in X implies x in Y by A4; hence x in Z1 iff x in Z2 by A5; end; hence Z1 = Z2 by TARSKI:1; end; hence thesis; end; consistency; end; theorem meet {} = {} by Def1; theorem Th2: meet X c= union X proof A1: now assume A2: X <> {}; now set y = the Element of X; let x; assume x in meet X; then x in y by A2,Def1; hence x in union X by A2,TARSKI:def 4; end; hence thesis by TARSKI:def 3; end; now assume X = {}; then meet X = {} by Def1; hence thesis by XBOOLE_1:2; end; hence thesis by A1; end; theorem Th3: Z in X implies meet X c= Z proof assume A1: Z in X; meet X c= Z proof let x; assume x in meet X; hence thesis by A1,Def1; end; hence thesis; end; theorem {} in X implies meet X = {} by Th3,XBOOLE_1:3; theorem X <> {} & (for Z1 st Z1 in X holds Z c= Z1) implies Z c= meet X proof assume that A1: X <> {} and A2: for Z1 st Z1 in X holds Z c= Z1; thus Z c= meet X proof let x such that A3: x in Z; for Y st Y in X holds x in Y proof let Y; assume Y in X; then Z c= Y by A2; hence thesis by A3; end; hence thesis by A1,Def1; end; end; theorem Th6: X <> {} & X c= Y implies meet Y c= meet X proof assume that A1: X <> {} and A2: X c= Y; let x; assume x in meet Y; then for Z st Z in X holds x in Z by A2,Def1; hence thesis by A1,Def1; end; theorem X in Y & X c= Z implies meet Y c= Z proof assume that A1: X in Y and A2: X c= Z; meet Y c= X by A1,Th3; hence thesis by A2,XBOOLE_1:1; end; theorem X in Y & X misses Z implies meet Y misses Z by Th3,XBOOLE_1:63; theorem X <> {} & Y <> {} implies meet (X \/ Y) = meet X /\ meet Y proof assume that A1: X <> {} and A2: Y <> {}; A3: meet X /\ meet Y c= meet (X \/ Y) proof let x; assume x in meet X /\ meet Y; then A4: x in meet X & x in meet Y by XBOOLE_0:def 4; now let Z; assume Z in X \/ Y; then Z in X or Z in Y by XBOOLE_0:def 3; hence x in Z by A4,Def1; end; hence thesis by A1,Def1; end; meet (X \/ Y) c= meet X & meet (X \/ Y) c= meet Y by A1,A2,Th6,XBOOLE_1:7; then meet (X \/ Y) c= meet X /\ meet Y by XBOOLE_1:19; hence thesis by A3,XBOOLE_0:def 10; end; theorem meet {x} = x proof A1: x c= meet {x} proof let y; assume y in x; then for Z st Z in {x} holds y in Z by TARSKI:def 1; hence thesis by Def1; end; x in {x} by TARSKI:def 1; then meet {x} c= x by Th3; hence thesis by A1,XBOOLE_0:def 10; end; theorem meet {X,Y} = X /\ Y proof A1: X in {X,Y} & Y in {X,Y} by TARSKI:def 2; x in meet {X,Y} iff x in X & x in Y proof thus x in meet {X,Y} implies x in X & x in Y by A1,Def1; assume x in X & x in Y; then for Z holds Z in {X,Y} implies x in Z by TARSKI:def 2; hence thesis by Def1; end; hence thesis by XBOOLE_0:def 4; end; reserve SFX,SFY,SFZ for set; definition let SFX,SFY; pred SFX is_finer_than SFY means for X st X in SFX ex Y st Y in SFY & X c= Y; reflexivity; pred SFY is_coarser_than SFX means for Y st Y in SFY ex X st X in SFX & X c= Y; reflexivity; end; theorem SFX c= SFY implies SFX is_finer_than SFY proof assume A1: SFX c= SFY; let X such that A2: X in SFX; take X; thus thesis by A1,A2; end; theorem SFX is_finer_than SFY implies union SFX c= union SFY proof assume A1: for X st X in SFX ex Y st Y in SFY & X c= Y; thus union SFX c= union SFY proof let x; assume x in union SFX; then consider Y such that A2: x in Y and A3: Y in SFX by TARSKI:def 4; ex Z st Z in SFY & Y c= Z by A1,A3; hence thesis by A2,TARSKI:def 4; end; end; theorem SFY <> {} & SFY is_coarser_than SFX implies meet SFX c= meet SFY proof assume that A1: SFY <> {} and A2: for Z2 st Z2 in SFY ex Z1 st Z1 in SFX & Z1 c= Z2; meet SFX c= meet SFY proof let x such that A3: x in meet SFX; for Z st Z in SFY holds x in Z proof let Z; assume Z in SFY; then consider Z1 such that A4: Z1 in SFX and A5: Z1 c= Z by A2; x in Z1 by A3,A4,Def1; hence thesis by A5; end; hence thesis by A1,Def1; end; hence thesis; end; theorem {} is_finer_than SFX proof let X; assume X in {}; hence thesis; end; theorem SFX is_finer_than {} implies SFX = {} proof assume A1: for X st X in SFX ex Y st Y in {} & X c= Y; set x = the Element of SFX; assume not thesis; then ex Y st Y in {} & x c= Y by A1; hence contradiction; end; theorem SFX is_finer_than SFY & SFY is_finer_than SFZ implies SFX is_finer_than SFZ proof assume that A1: for X st X in SFX ex Y st Y in SFY & X c= Y and A2: for X st X in SFY ex Y st Y in SFZ & X c= Y; let X; assume X in SFX; then consider Y such that A3: Y in SFY and A4: X c= Y by A1; consider Z such that A5: Z in SFZ & Y c= Z by A2,A3; take Z; thus thesis by A4,A5,XBOOLE_1:1; end; theorem SFX is_finer_than {Y} implies for X st X in SFX holds X c= Y proof assume A1: for X st X in SFX ex Z st Z in {Y} & X c= Z; let X; assume X in SFX; then ex Z st Z in {Y} & X c= Z by A1; hence thesis by TARSKI:def 1; end; theorem SFX is_finer_than {X,Y} implies for Z st Z in SFX holds Z c= X or Z c= Y proof assume A1: for Z1 st Z1 in SFX ex Z2 st Z2 in {X,Y} & Z1 c= Z2; let Z; assume Z in SFX; then consider Z2 such that A2: Z2 in {X,Y} and A3: Z c= Z2 by A1; {X,Y} = {X} \/ {Y} by ENUMSET1:1; then Z2 in {X} or Z2 in {Y} by A2,XBOOLE_0:def 3; hence thesis by A3,TARSKI:def 1; end; definition let SFX,SFY; func UNION (SFX,SFY) means :Def4: Z in it iff ex X,Y st X in SFX & Y in SFY & Z = X \/ Y; existence proof defpred X[set] means ex Z being set st $1 = Z & ex X,Y st X in SFX & Y in SFY & Z = X \/ Y; consider XX being set such that A1: for x holds x in XX iff x in bool(union SFX \/ union SFY) & X[x] from XBOOLE_0:sch 1; take XX; for Z holds Z in XX iff ex X,Y st X in SFX & Y in SFY & Z = X \/ Y proof let Z; A2: now given X,Y such that A3: X in SFX & Y in SFY and A4: Z = X \/ Y; X c= union SFX & Y c= union SFY by A3,ZFMISC_1:74; then Z c= union SFX \/ union SFY by A4,XBOOLE_1:13; hence Z in XX by A1,A3,A4; end; now assume Z in XX; then ex Z1 st Z = Z1 & ex X,Y st X in SFX & Y in SFY & Z1 = X \/ Y by A1; hence ex X,Y st X in SFX & Y in SFY & Z = X \/ Y; end; hence thesis by A2; end; hence thesis; end; uniqueness proof let Z1,Z2 be set; assume that A5: for Z holds Z in Z1 iff ex X,Y st X in SFX & Y in SFY & Z = X \/ Y and A6: for Z holds Z in Z2 iff ex X,Y st X in SFX & Y in SFY & Z = X \/ Y; now let Z; Z in Z1 iff ex X,Y st X in SFX & Y in SFY & Z = X \/ Y by A5; hence Z in Z1 iff Z in Z2 by A6; end; hence thesis by TARSKI:1; end; commutativity proof let SFZ,SFX,SFY; assume A7: for Z holds Z in SFZ iff ex X,Y st X in SFX & Y in SFY & Z = X \/ Y; let Z; hereby assume Z in SFZ; then ex X,Y st X in SFX & Y in SFY & Z = X \/ Y by A7; hence ex Y,X st Y in SFY & X in SFX & Z = Y \/ X; end; thus thesis by A7; end; func INTERSECTION (SFX,SFY) means :Def5: Z in it iff ex X,Y st X in SFX & Y in SFY & Z = X /\ Y; existence proof defpred X[set] means ex Z being set st $1 = Z & ex X,Y st X in SFX & Y in SFY & Z = X /\ Y; consider XX being set such that A8: for x holds x in XX iff x in bool(union SFX /\ union SFY) & X[x] from XBOOLE_0:sch 1; take XX; for Z holds Z in XX iff ex X,Y st X in SFX & Y in SFY & Z = X /\ Y proof let Z; A9: now given X,Y such that A10: X in SFX & Y in SFY and A11: Z = X /\ Y; X c= union SFX & Y c= union SFY by A10,ZFMISC_1:74; then Z c= union SFX /\ union SFY by A11,XBOOLE_1:27; hence Z in XX by A8,A10,A11; end; now assume Z in XX; then ex Z1 st Z = Z1 & ex X,Y st X in SFX & Y in SFY & Z1 = X /\ Y by A8; hence ex X,Y st X in SFX & Y in SFY & Z = X /\ Y; end; hence thesis by A9; end; hence thesis; end; uniqueness proof let Z1,Z2 be set; assume that A12: for Z holds Z in Z1 iff ex X,Y st X in SFX & Y in SFY & Z = X /\ Y and A13: for Z holds Z in Z2 iff ex X,Y st X in SFX & Y in SFY & Z = X /\ Y; now let Z; Z in Z1 iff ex X,Y st X in SFX & Y in SFY & Z = X /\ Y by A12; hence Z in Z1 iff Z in Z2 by A13; end; hence thesis by TARSKI:1; end; commutativity proof let SFZ,SFX,SFY; assume A14: for Z holds Z in SFZ iff ex X,Y st X in SFX & Y in SFY & Z = X /\ Y; let Z; hereby assume Z in SFZ; then ex X,Y st X in SFX & Y in SFY & Z = X /\ Y by A14; hence ex Y,X st Y in SFY & X in SFX & Z = Y /\ X; end; thus thesis by A14; end; func DIFFERENCE (SFX,SFY) means :Def6: Z in it iff ex X,Y st X in SFX & Y in SFY & Z = X \ Y; existence proof defpred X[set] means ex Z being set st $1 = Z & ex X,Y st X in SFX & Y in SFY & Z = X \ Y; consider XX being set such that A15: for x holds x in XX iff x in bool union SFX & X[x] from XBOOLE_0: sch 1; take XX; for Z holds Z in XX iff ex X,Y st X in SFX & Y in SFY & Z = X \ Y proof let Z; A16: now given X,Y such that A17: X in SFX and A18: Y in SFY and A19: Z = X \ Y; X c= union SFX by A17,ZFMISC_1:74; then Z c= union SFX by A19,XBOOLE_1:1; hence Z in XX by A15,A17,A18,A19; end; now assume Z in XX; then ex Z1 st Z = Z1 & ex X,Y st X in SFX & Y in SFY & Z1 = X \ Y by A15; hence ex X,Y st X in SFX & Y in SFY & Z = X \ Y; end; hence thesis by A16; end; hence thesis; end; uniqueness proof let Z1,Z2 be set; assume that A20: for Z holds Z in Z1 iff ex X,Y st X in SFX & Y in SFY & Z = X \ Y and A21: for Z holds Z in Z2 iff ex X,Y st X in SFX & Y in SFY & Z = X \ Y; now let Z; Z in Z1 iff ex X,Y st X in SFX & Y in SFY & Z = X \ Y by A20; hence Z in Z1 iff Z in Z2 by A21; end; hence thesis by TARSKI:1; end; end; theorem SFX is_finer_than UNION(SFX,SFX) proof let X such that A1: X in SFX; take X; X = X \/ X; hence thesis by A1,Def4; end; theorem INTERSECTION(SFX,SFX) is_finer_than SFX proof let X; assume X in INTERSECTION(SFX,SFX); then consider Z1,Z2 such that A1: Z1 in SFX and Z2 in SFX and A2: X = Z1 /\ Z2 by Def5; take Z1; thus thesis by A1,A2,XBOOLE_1:17; end; theorem DIFFERENCE(SFX,SFX) is_finer_than SFX proof let X; assume X in DIFFERENCE(SFX,SFX); then consider Z1,Z2 such that A1: Z1 in SFX and Z2 in SFX and A2: X = Z1 \ Z2 by Def6; take Z1; thus thesis by A1,A2; end; theorem SFX meets SFY implies meet SFX /\ meet SFY = meet INTERSECTION(SFX,SFY ) proof set y = the Element of SFX /\ SFY; assume A1: SFX /\ SFY <> {}; then A2: SFY <> {}; A3: y in SFX by A1,XBOOLE_0:def 4; A4: y in SFY by A1,XBOOLE_0:def 4; A5: SFX <> {} by A1; A6: meet INTERSECTION(SFX,SFY) c= meet SFX /\ meet SFY proof let x such that A7: x in meet INTERSECTION(SFX,SFY); for Z st Z in SFY holds x in Z proof let Z; assume Z in SFY; then y /\ Z in INTERSECTION(SFX,SFY) by A3,Def5; then x in y /\ Z by A7,Def1; hence thesis by XBOOLE_0:def 4; end; then A8: x in meet SFY by A2,Def1; for Z st Z in SFX holds x in Z proof let Z; assume Z in SFX; then Z /\ y in INTERSECTION(SFX,SFY) by A4,Def5; then x in Z /\ y by A7,Def1; hence thesis by XBOOLE_0:def 4; end; then x in meet SFX by A5,Def1; hence thesis by A8,XBOOLE_0:def 4; end; A9: y /\ y in INTERSECTION(SFX,SFY) by A3,A4,Def5; meet SFX /\ meet SFY c= meet INTERSECTION(SFX,SFY) proof let x; assume x in meet SFX /\ meet SFY; then A10: x in meet SFX & x in meet SFY by XBOOLE_0:def 4; for Z st Z in INTERSECTION(SFX,SFY) holds x in Z proof let Z; assume Z in INTERSECTION(SFX,SFY); then consider Z1,Z2 such that A11: Z1 in SFX & Z2 in SFY and A12: Z = Z1 /\ Z2 by Def5; x in Z1 & x in Z2 by A10,A11,Def1; hence thesis by A12,XBOOLE_0:def 4; end; hence thesis by A9,Def1; end; hence thesis by A6,XBOOLE_0:def 10; end; theorem SFY <> {} implies X \/ meet SFY = meet UNION({X},SFY) proof assume A1: SFY <> {}; set y = the Element of SFY; X in {X} by TARSKI:def 1; then A2: X \/ y in UNION({X},SFY) by A1,Def4; A3: X \/ meet SFY c= meet UNION({X},SFY) proof let x; assume x in X \/ meet SFY; then A4: x in X or x in meet SFY by XBOOLE_0:def 3; for Z st Z in UNION({X},SFY) holds x in Z proof let Z; assume Z in UNION({X},SFY); then consider Z1,Z2 such that A5: Z1 in {X} & Z2 in SFY and A6: Z = Z1 \/ Z2 by Def4; x in Z1 or x in Z2 by A4,A5,Def1,TARSKI:def 1; hence thesis by A6,XBOOLE_0:def 3; end; hence thesis by A2,Def1; end; meet UNION({X},SFY) c= X \/ meet SFY proof let x; assume A7: x in meet UNION({X},SFY); assume A8: not x in X \/ meet SFY; then A9: not x in X by XBOOLE_0:def 3; not x in meet SFY by A8,XBOOLE_0:def 3; then consider Z such that A10: Z in SFY and A11: not x in Z by A1,Def1; X in {X} by TARSKI:def 1; then X \/ Z in UNION({X},SFY) by A10,Def4; then x in X \/ Z by A7,Def1; hence contradiction by A9,A11,XBOOLE_0:def 3; end; hence thesis by A3,XBOOLE_0:def 10; end; theorem X /\ union SFY = union INTERSECTION({X},SFY) proof A1: union INTERSECTION({X},SFY) c= X /\ union SFY proof let x; assume x in union INTERSECTION({X},SFY); then consider Z such that A2: x in Z and A3: Z in INTERSECTION({X},SFY) by TARSKI:def 4; consider X1,X2 be set such that A4: X1 in {X} and A5: X2 in SFY and A6: Z = X1 /\ X2 by A3,Def5; x in X2 by A2,A6,XBOOLE_0:def 4; then A7: x in union SFY by A5,TARSKI:def 4; X1 = X by A4,TARSKI:def 1; then x in X by A2,A6,XBOOLE_0:def 4; hence thesis by A7,XBOOLE_0:def 4; end; X /\ union SFY c= union INTERSECTION({X},SFY) proof let x; assume A8: x in X /\ union SFY; then x in union SFY by XBOOLE_0:def 4; then consider Y such that A9: x in Y and A10: Y in SFY by TARSKI:def 4; x in X by A8,XBOOLE_0:def 4; then A11: x in X /\ Y by A9,XBOOLE_0:def 4; X in {X} by TARSKI:def 1; then X /\ Y in INTERSECTION({X},SFY) by A10,Def5; hence thesis by A11,TARSKI:def 4; end; hence thesis by A1,XBOOLE_0:def 10; end; theorem SFY <> {} implies X \ union SFY = meet DIFFERENCE({X},SFY) proof set y = the Element of SFY; A1: X in {X} by TARSKI:def 1; assume SFY <> {}; then A2: X \ y in DIFFERENCE({X},SFY) by A1,Def6; A3: meet DIFFERENCE({X},SFY) c= X \ union SFY proof let x; assume A4: x in meet DIFFERENCE({X},SFY); for Z st Z in SFY holds not x in Z proof let Z; assume Z in SFY; then X \ Z in DIFFERENCE({X},SFY) by A1,Def6; then x in X \ Z by A4,Def1; hence thesis by XBOOLE_0:def 5; end; then for Z st x in Z holds not Z in SFY; then A5: not x in union SFY by TARSKI:def 4; x in X \ y by A2,A4,Def1; hence thesis by A5,XBOOLE_0:def 5; end; X \ union SFY c= meet DIFFERENCE({X},SFY) proof let x; assume x in X \ union SFY; then A6: x in X & not x in union SFY by XBOOLE_0:def 5; for Z st Z in DIFFERENCE({X},SFY) holds x in Z proof let Z; assume Z in DIFFERENCE({X},SFY); then consider Z1,Z2 such that A7: Z1 in {X} & Z2 in SFY and A8: Z = Z1 \ Z2 by Def6; x in Z1 & not x in Z2 by A6,A7,TARSKI:def 1,def 4; hence thesis by A8,XBOOLE_0:def 5; end; hence thesis by A2,Def1; end; hence thesis by A3,XBOOLE_0:def 10; end; theorem SFY <> {} implies X \ meet SFY = union DIFFERENCE ({X},SFY) proof A1: X in {X} by TARSKI:def 1; A2: union DIFFERENCE({X},SFY) c= X \ meet SFY proof let x; assume x in union DIFFERENCE({X},SFY); then consider Z such that A3: x in Z and A4: Z in DIFFERENCE({X},SFY) by TARSKI:def 4; consider Z1,Z2 such that A5: Z1 in {X} and A6: Z2 in SFY and A7: Z = Z1 \ Z2 by A4,Def6; not x in Z2 by A3,A7,XBOOLE_0:def 5; then A8: not x in meet SFY by A6,Def1; Z1 = X by A5,TARSKI:def 1; hence thesis by A3,A7,A8,XBOOLE_0:def 5; end; assume A9: SFY <> {}; X \ meet SFY c= union DIFFERENCE({X},SFY) proof let x; assume A10: x in X \ meet SFY; then not x in meet SFY by XBOOLE_0:def 5; then consider Z such that A11: Z in SFY and A12: not x in Z by A9,Def1; A13: x in X \ Z by A10,A12,XBOOLE_0:def 5; X \ Z in DIFFERENCE({X},SFY) by A1,A11,Def6; hence thesis by A13,TARSKI:def 4; end; hence thesis by A2,XBOOLE_0:def 10; end; theorem union INTERSECTION (SFX,SFY) = union SFX /\ union SFY proof thus union INTERSECTION(SFX,SFY) c= union SFX /\ union SFY proof let x; assume x in union INTERSECTION(SFX,SFY); then consider Z such that A1: x in Z and A2: Z in INTERSECTION(SFX,SFY) by TARSKI:def 4; consider X,Y such that A3: X in SFX and A4: Y in SFY and A5: Z = X /\ Y by A2,Def5; x in Y by A1,A5,XBOOLE_0:def 4; then A6: x in union SFY by A4,TARSKI:def 4; x in X by A1,A5,XBOOLE_0:def 4; then x in union SFX by A3,TARSKI:def 4; hence thesis by A6,XBOOLE_0:def 4; end; let x be set; assume A7: x in union SFX /\ union SFY; then x in union SFX by XBOOLE_0:def 4; then consider X0 being set such that A8: x in X0 & X0 in SFX by TARSKI:def 4; x in union SFY by A7,XBOOLE_0:def 4; then consider Y0 being set such that A9: x in Y0 & Y0 in SFY by TARSKI:def 4; X0 /\ Y0 in INTERSECTION(SFX,SFY) & x in X0 /\ Y0 by A8,A9,Def5, XBOOLE_0:def 4; hence thesis by TARSKI:def 4; end; theorem SFX <> {} & SFY <> {} implies meet SFX \/ meet SFY c= meet UNION (SFX, SFY) proof set y = the Element of SFX; set z = the Element of SFY; assume SFX <> {} & SFY <> {}; then A1: y \/ z in UNION(SFX,SFY) by Def4; let x; assume x in meet SFX \/ meet SFY; then A2: x in meet SFX or x in meet SFY by XBOOLE_0:def 3; for Z st Z in UNION(SFX,SFY) holds x in Z proof let Z; assume Z in UNION(SFX,SFY); then consider X,Y such that A3: X in SFX & Y in SFY and A4: Z = X \/ Y by Def4; x in X or x in Y by A2,A3,Def1; hence thesis by A4,XBOOLE_0:def 3; end; hence thesis by A1,Def1; end; theorem meet DIFFERENCE (SFX,SFY) c= meet SFX \ meet SFY proof per cases; suppose A1: SFX = {} or SFY = {}; now assume DIFFERENCE (SFX,SFY) <> {}; then consider e being set such that A2: e in DIFFERENCE (SFX,SFY) by XBOOLE_0:def 1; ex X,Y st X in SFX & Y in SFY & e = X \ Y by A2,Def6; hence contradiction by A1; end; then meet DIFFERENCE (SFX,SFY) = {} by Def1; hence thesis by XBOOLE_1:2; end; suppose A3: SFX <> {} & SFY <> {}; set z = the Element of SFX; set y = the Element of SFY; let x such that A4: x in meet DIFFERENCE (SFX,SFY); for Z st Z in SFX holds x in Z proof let Z; assume Z in SFX; then Z \ y in DIFFERENCE (SFX,SFY) by A3,Def6; then x in Z \ y by A4,Def1; hence thesis; end; then A5: x in meet SFX by A3,Def1; z \ y in DIFFERENCE(SFX,SFY) by A3,Def6; then x in z \ y by A4,Def1; then not x in y by XBOOLE_0:def 5; then not x in meet SFY by A3,Def1; hence thesis by A5,XBOOLE_0:def 5; end; end; definition let D be set; mode Subset-Family of D is Subset of bool D; end; reserve F,G for Subset-Family of D; reserve P for Subset of D; definition let D,F; redefine func union F -> Subset of D; coherence proof union F c= D proof let x; assume x in union F; then ex Z st x in Z & Z in F by TARSKI:def 4; hence thesis; end; hence thesis; end; end; definition let D,F; redefine func meet F -> Subset of D; coherence proof meet F c= D proof A1: meet F c= union F by Th2; let x; assume x in meet F; then x in union F by A1; hence thesis; end; hence thesis; end; end; theorem Th31: (for P holds P in F iff P in G) implies F=G proof assume A1: for P holds P in F iff P in G; thus F c= G proof let x; assume x in F; hence thesis by A1; end; let x; assume x in G; hence thesis by A1; end; definition let D,F; func COMPLEMENT(F) -> Subset-Family of D means :Def7: for P being Subset of D holds P in it iff P` in F; existence proof defpred X[Subset of D] means $1` in F; thus ex G being Subset-Family of D st for P being Subset of D holds P in G iff X[P] from SUBSET_1:sch 3; end; uniqueness proof let G,H be Subset-Family of D; assume that A1: for P holds P in G iff P` in F and A2: for P holds P in H iff P` in F; now let P; P in G iff P` in F by A1; hence P in G iff P in H by A2; end; hence thesis by Th31; end; involutiveness proof let F,G such that A3: for P being Subset of D holds P in F iff P` in G; let P be Subset of D; P`` = P; hence thesis by A3; end; end; theorem Th32: F <> {} implies COMPLEMENT(F) <> {} proof set X = the Element of F; assume A1: F <> {}; then reconsider X as Subset of D by TARSKI:def 3; X`` = X; hence thesis by A1,Def7; end; theorem F <> {} implies [#] D \ union F = meet (COMPLEMENT(F)) proof A1: for x st x in D holds (for X st X in F holds not x in X) iff for Y st Y in COMPLEMENT(F) holds x in Y proof let x such that A2: x in D; thus (for X st X in F holds not x in X) implies for Y st Y in COMPLEMENT(F ) holds x in Y proof assume A3: for X st X in F holds not x in X; let Y; assume A4: Y in COMPLEMENT(F); then reconsider Y as Subset of D; Y` in F by A4,Def7; then not x in Y` by A3; hence thesis by A2,XBOOLE_0:def 5; end; assume A5: for Y st Y in COMPLEMENT(F) holds x in Y; let X; assume A6: X in F; then reconsider X as Subset of D; X`` = X; then X` in COMPLEMENT(F) by A6,Def7; then x in X` by A5; hence thesis by XBOOLE_0:def 5; end; assume F <> {}; then A7: COMPLEMENT(F) <> {} by Th32; A8: [#] D \ union F c= meet COMPLEMENT(F) proof let x; assume A9: x in [#] D \ union F; then not x in union F by XBOOLE_0:def 5; then for X st X in F holds not x in X by TARSKI:def 4; then for Y st Y in COMPLEMENT(F) holds x in Y by A1,A9; hence thesis by A7,Def1; end; meet COMPLEMENT(F) c= [#] D \ union F proof let x; assume A10: x in meet COMPLEMENT(F); then for X holds X in COMPLEMENT(F) implies x in X by Def1; then for Y st x in Y holds not Y in F by A1; then not x in union F by TARSKI:def 4; hence thesis by A10,XBOOLE_0:def 5; end; hence thesis by A8,XBOOLE_0:def 10; end; theorem F <> {} implies union COMPLEMENT(F) = [#] D \ meet F proof assume A1: F <> {}; A2: [#] D \ meet F c= union COMPLEMENT(F) proof let x; assume A3: x in [#] D \ meet F; then not x in meet F by XBOOLE_0:def 5; then consider X such that A4: X in F and A5: not x in X by A1,Def1; reconsider X as Subset of D by A4; reconsider XX=X` as set; A6: X`` = X; ex Y st x in Y & Y in COMPLEMENT(F) proof take XX; thus thesis by A3,A4,A5,A6,Def7,XBOOLE_0:def 5; end; hence thesis by TARSKI:def 4; end; union COMPLEMENT(F) c= [#] D \ meet F proof let x; assume A7: x in union COMPLEMENT(F); then consider X such that A8: x in X and A9: X in COMPLEMENT(F) by TARSKI:def 4; reconsider X as Subset of D by A9; reconsider XX=X` as set; ex Y st Y in F & not x in Y proof take Y = XX; thus Y in F by A9,Def7; thus thesis by A8,XBOOLE_0:def 5; end; then not x in meet F by Def1; hence thesis by A7,XBOOLE_0:def 5; end; hence thesis by A2,XBOOLE_0:def 10; end; begin theorem for X being set, F being Subset-Family of X for P being Subset of X holds P` in COMPLEMENT F iff P in F proof let X be set, F be Subset-Family of X; let P be Subset of X; P = P``; hence thesis by Def7; end; theorem Th36: for X being set, F,G being Subset-Family of X st COMPLEMENT F c= COMPLEMENT G holds F c= G proof let X be set, F,G be Subset-Family of X such that A1: COMPLEMENT F c= COMPLEMENT G; let x be set; assume A2: x in F; then reconsider A = x as Subset of X; A in COMPLEMENT COMPLEMENT F by A2; then A` in COMPLEMENT F by Def7; then A`` in G by A1,Def7; hence thesis; end; theorem for X being set, F,G being Subset-Family of X holds COMPLEMENT F c= G iff F c= COMPLEMENT G proof let X be set, F,G be Subset-Family of X; hereby assume COMPLEMENT F c= G; then COMPLEMENT F c= COMPLEMENT COMPLEMENT G; hence F c= COMPLEMENT G by Th36; end; assume F c= COMPLEMENT G; then COMPLEMENT COMPLEMENT F c= COMPLEMENT G; hence thesis by Th36; end; theorem for X being set, F,G being Subset-Family of X st COMPLEMENT F = COMPLEMENT G holds F = G proof let X be set, F,G be Subset-Family of X; assume COMPLEMENT F = COMPLEMENT G; hence F = COMPLEMENT COMPLEMENT G .= G; end; theorem for X being set, F,G being Subset-Family of X holds COMPLEMENT(F \/ G) = COMPLEMENT F \/ COMPLEMENT G proof let X be set, F,G be Subset-Family of X; for P being Subset of X holds P in COMPLEMENT F \/ COMPLEMENT G iff P` in F \/ G proof let P be Subset of X; P in COMPLEMENT F or P in COMPLEMENT G iff P` in F or P` in G by Def7; hence thesis by XBOOLE_0:def 3; end; hence thesis by Def7; end; theorem for X being set, F being Subset-Family of X st F = {X} holds COMPLEMENT F = {{}} proof let X be set, F be Subset-Family of X such that A1: F = {X}; {} c= X by XBOOLE_1:2; then reconsider G = {{}} as Subset-Family of X by ZFMISC_1:31; reconsider G as Subset-Family of X; for P being Subset of X holds P in G iff P` in F proof let P be Subset of X; hereby assume P in G; then P = {}X by TARSKI:def 1; hence P` in F by A1,TARSKI:def 1; end; assume P` in F; then A2: P` = [#]X by A1,TARSKI:def 1; P = P`` .= {} by A2,XBOOLE_1:37; hence thesis by TARSKI:def 1; end; hence thesis by Def7; end; registration let X be set, F be empty Subset-Family of X; cluster COMPLEMENT F -> empty; coherence proof assume COMPLEMENT F is not empty; then ex x being Subset of X st x in COMPLEMENT F by SUBSET_1:4; hence contradiction by Def7; end; end; definition let IT be set; attr IT is with_non-empty_elements means :Def8: not {} in IT; end; registration cluster non empty with_non-empty_elements for set; existence proof take {{{}}}; thus {{{}}} is non empty; assume {} in {{{}}}; hence contradiction by TARSKI:def 1; end; end; registration let A be non empty set; cluster { A } -> with_non-empty_elements; coherence proof assume {} in { A }; hence contradiction by TARSKI:def 1; end; let B be non empty set; cluster { A, B } -> with_non-empty_elements; coherence proof assume {} in { A,B }; hence contradiction by TARSKI:def 2; end; let C be non empty set; cluster { A, B, C } -> with_non-empty_elements; coherence proof assume {} in { A, B, C }; hence contradiction by ENUMSET1:def 1; end; let D be non empty set; cluster { A, B, C, D } -> with_non-empty_elements; coherence proof assume {} in { A, B, C, D }; hence contradiction by ENUMSET1:def 2; end; let E be non empty set; cluster { A, B, C, D, E } -> with_non-empty_elements; coherence proof assume {} in { A, B, C, D, E }; hence contradiction by ENUMSET1:def 3; end; let F be non empty set; cluster { A, B, C, D, E, F } -> with_non-empty_elements; coherence proof assume {} in { A, B, C, D, E, F }; hence contradiction by ENUMSET1:def 4; end; let G be non empty set; cluster { A, B, C, D, E, F, G } -> with_non-empty_elements; coherence proof assume {} in { A, B, C, D, E, F, G }; hence contradiction by ENUMSET1:def 5; end; let H be non empty set; cluster { A, B, C, D, E, F, G, H } -> with_non-empty_elements; coherence proof assume {} in { A, B, C, D, E, F, G, H }; hence contradiction by ENUMSET1:def 6; end; let I be non empty set; cluster { A, B, C, D, E, F, G, H, I } -> with_non-empty_elements; coherence proof assume {} in { A, B, C, D, E, F, G, H, I }; hence contradiction by ENUMSET1:def 7; end; let J be non empty set; cluster { A, B, C, D, E, F, G, H, I, J } -> with_non-empty_elements; coherence proof assume {} in { A, B, C, D, E, F, G, H, I, J }; hence contradiction by ENUMSET1:def 8; end; end; registration let A,B be with_non-empty_elements set; cluster A \/ B -> with_non-empty_elements; coherence proof ( not {} in A)& not {} in B by Def8; then not {} in A \/ B by XBOOLE_0:def 3; hence thesis by Def8; end; end; theorem union Y c= Z & X in Y implies X c= Z proof assume that A1: union Y c= Z and A2: X in Y; thus X c= Z proof let x be set; assume x in X; then x in union Y by A2,TARSKI:def 4; hence thesis by A1; end; end; theorem for A,B,X being set holds ( X c= union (A \/ B) & for Y being set st Y in B holds Y misses X ) implies X c= union A proof let A,B,X be set; assume X c= union (A \/ B); then X c= union (A \/ B) /\ X by XBOOLE_1:19; then X c= (union A \/ union B) /\ X by ZFMISC_1:78; then A1: X c= (union A /\ X) \/ (union B /\ X) by XBOOLE_1:23; assume for Y st Y in B holds Y misses X; then union B misses X by ZFMISC_1:80; then A2: union B /\ X = {} by XBOOLE_0:def 7; union A /\ X c= union A by XBOOLE_1:17; hence thesis by A2,A1,XBOOLE_1:1; end; definition let M be set; let B be Subset-Family of M; func Intersect B -> Subset of M equals :Def9: meet B if B <> {} otherwise M; coherence proof M c= M; hence thesis; end; consistency; end; theorem Th43: for X, x being set, R being Subset-Family of X st x in X holds x in Intersect R iff for Y being set st Y in R holds x in Y proof let X, x be set, R be Subset-Family of X; assume A1: x in X; hereby assume A2: x in Intersect R; let Y be set; assume A3: Y in R; then Intersect R = meet R by Def9; hence x in Y by A2,A3,Def1; end; assume A4: for Y being set st Y in R holds x in Y; per cases; suppose A5: R <> {}; then x in meet R by A4,Def1; hence thesis by A5,Def9; end; suppose R = {}; hence thesis by A1,Def9; end; end; theorem for X being set for H, J being Subset-Family of X st H c= J holds Intersect J c= Intersect H proof let X be set; let H, J be Subset-Family of X such that A1: H c= J; let x be set; assume A2: x in Intersect J; then for Y be set st Y in H holds x in Y by A1,Th43; hence thesis by A2,Th43; end; registration let X be non empty with_non-empty_elements set; cluster -> non empty for Element of X; coherence by Def8; end; reserve E for set; definition let E; attr E is empty-membered means :Def10: not ex x being non empty set st x in E; end; notation let E; antonym E is with_non-empty_element for E is empty-membered; end; registration cluster with_non-empty_element for set; existence proof take {{{}}}, {{}}; thus thesis by TARSKI:def 1; end; end; registration cluster with_non-empty_element -> non empty for set; coherence proof let X be set; assume X is with_non-empty_element; then ex x being non empty set st x in X by Def10; hence thesis; end; end; registration let X be with_non-empty_element set; cluster non empty for Element of X; existence proof ex x being non empty set st x in X by Def10; hence thesis; end; end; registration let D be non empty with_non-empty_elements set; cluster union D -> non empty; coherence proof set d = the Element of D; d c= union D by ZFMISC_1:74; hence thesis; end; end; registration cluster non empty with_non-empty_elements -> with_non-empty_element for set; coherence proof let X be set; assume that A1: X is non empty and A2: X is with_non-empty_elements; consider x being Element of X such that A3: x in [#]X by A1,SUBSET_1:4; reconsider x as non empty set by A2,A3; take x; thus thesis by A3; end; end; definition let X be set; mode Cover of X means :Def11: X c= union it; existence proof take {X}; thus thesis by ZFMISC_1:25; end; end; theorem for X being set, F being Subset-Family of X holds F is Cover of X iff union F = X proof let X be set, F be Subset-Family of X; thus F is Cover of X implies union F = X proof assume A1: F is Cover of X; thus union F c= X; thus thesis by A1,Def11; end; thus thesis by Def11; end; theorem Th46: {{}} is Subset-Family of X proof {} c= X by XBOOLE_1:2; hence thesis by ZFMISC_1:31; end; definition let X be set; let F be Subset-Family of X; attr F is with_proper_subsets means :Def12: not X in F; end; theorem for TS being set, F, G being Subset-Family of TS st F is with_proper_subsets & G c= F holds G is with_proper_subsets proof let TS be set, F, G being Subset-Family of TS; assume A1: F is with_proper_subsets & G c= F; assume not G is with_proper_subsets; then TS in G by Def12; hence thesis by A1,Def12; end; registration let TS be non empty set; cluster with_proper_subsets for Subset-Family of TS; existence proof reconsider F = { {} } as Subset-Family of TS by Th46; take F; assume TS in F; hence thesis by TARSKI:def 1; end; end; theorem for TS being non empty set, A, B being with_proper_subsets Subset-Family of TS holds A \/ B is with_proper_subsets proof let TS be non empty set, A, B be with_proper_subsets Subset-Family of TS; assume TS in A \/ B; then TS in A or TS in B by XBOOLE_0:def 3; hence thesis by Def12; end; registration cluster non trivial -> with_non-empty_element for set; coherence proof let W be set; assume W is non trivial; then consider w1,w2 being set such that A1: w1 in W & w2 in W and A2: w1 <> w2 by ZFMISC_1:def 10; w1 <> {} or w2 <> {} by A2; hence thesis by A1,Def10; end; end; definition let X be set; redefine func bool X -> Subset-Family of X; coherence by ZFMISC_1:def 1; end; theorem for A being non empty set, b being set st A <> {b} ex a being Element of A st a <> b proof let A be non empty set, b be set such that A1: A <> {b}; assume A2: for a being Element of A holds a = b; now set a0 = the Element of A; let a be set; thus a in A implies a = b by A2; assume A3: a = b; a0 = b by A2; hence a in A by A3; end; hence contradiction by A1,TARSKI:def 1; end; begin reserve A,X,X1,X2,Y,Y1,Y2,a,b,c,d,x,y,z for set; definition let IT be set; attr IT is Relation-like means :Def1: x in IT implies ex y,z st x = [y,z]; end; registration cluster empty -> Relation-like for set; coherence proof let X be set; assume X is empty; hence for p being set st p in X ex x,y st [x,y] = p; end; end; definition mode Relation is Relation-like set; end; reserve P,P1,P2,Q,R,S for Relation; registration let R be Relation; cluster -> Relation-like for Subset of R; coherence proof let A be Subset of R; let x; thus thesis by Def1; end; end; scheme RelExistence{A,B() -> set, P[set,set]}: ex R being Relation st for x,y holds [x,y] in R iff x in A() & y in B() & P[x,y] proof ex R being Relation st for p being set holds p in R iff p in [:A(),B():] & ex x,y st p=[x,y] & P[x,y] proof defpred Q[set] means ex x,y st $1=[x,y] & P[x,y]; consider B being set such that A1: for p being set holds p in B iff p in [:A(),B():] & Q[p] from XBOOLE_0:sch 1; for p being set st p in B holds ex x,y st p = [x,y] proof let p be set; assume p in B; then ex x,y st p=[x,y] & P[x,y] by A1; hence thesis; end; then B is Relation by Def1; hence thesis by A1; end; then consider R being Relation such that A2: for p being set holds p in R iff p in [:A(),B():] & ex x,y st p=[x,y] & P[x,y]; take R; let x,y; thus [x,y] in R implies x in A() & y in B() & P[x,y] proof assume A3: [x,y] in R; then consider xx,yy being set such that A4: [x,y]=[xx,yy] and A5: P[xx,yy] by A2; A6: [x,y] in [:A(),B():] by A2,A3; x=xx by A4,XTUPLE_0:1; hence thesis by A4,A5,A6,XTUPLE_0:1,ZFMISC_1:87; end; thus x in A() & y in B() & P[x,y] implies [x,y] in R proof assume that A7: x in A() & y in B() and A8: P[x,y]; [x,y] in [:A(),B():] by A7,ZFMISC_1:87; hence thesis by A2,A8; end; end; definition let P,R; redefine pred P = R means for a,b holds [a,b] in P iff [a,b] in R; compatibility proof thus P = R implies for a,b holds [a,b] in P iff [a,b] in R; assume A1: for a,b holds [a,b] in P iff [a,b] in R; thus P c= R proof let x; assume A2: x in P; then ex y,z st x = [y,z] by Def1; hence x in R by A1,A2; end; let x; assume A3: x in R; then ex y,z st x = [y,z] by Def1; hence x in P by A1,A3; end; end; registration let P,X; cluster P /\ X -> Relation-like; coherence proof P /\ X c= P by XBOOLE_1:17; hence thesis; end; cluster P \ X -> Relation-like; coherence; end; registration let P,R; cluster P \/ R -> Relation-like; coherence proof let x; A1: x in R implies ex y,z st x = [y,z] by Def1; x in P implies ex y,z st x = [y,z] by Def1; hence x in P \/ R implies ex y,z st x = [y,z] by A1,XBOOLE_0:def 3; end; end; registration let R,S be Relation; cluster R \+\ S -> Relation-like; coherence; end; registration let a, b be set; cluster {[a,b]} -> Relation-like; coherence proof let x; assume x in {[a,b]}; then x = [a,b] by TARSKI:def 1; hence thesis; end; cluster [:a,b:] -> Relation-like; coherence proof let z; assume z in [:a,b:]; then ex x,y st x in a & y in b & [x,y]=z by ZFMISC_1:def 2; hence thesis; end; end; registration let a, b, c, d be set; cluster {[a,b],[c,d]} -> Relation-like; coherence proof {[a,b],[c,d]} = {[a,b]} \/ {[c,d]} by ENUMSET1:1; hence thesis; end; end; definition let P,A; redefine pred P c= A means for a,b holds [a,b] in P implies [a,b] in A; compatibility proof thus P c= A implies for a,b holds [a,b] in P implies [a,b] in A; assume A1: for a,b holds [a,b] in P implies [a,b] in A; let x; assume A2: x in P; then ex y,z st x = [y,z] by Def1; hence thesis by A1,A2; end; end; notation let R be Relation; synonym dom R for proj1 R; end; theorem Th1: dom(P \/ R) = dom P \/ dom R by XTUPLE_0:23; theorem Th2: dom(P /\ R) c= dom P /\ dom R by XTUPLE_0:24; theorem dom P \ dom R c= dom(P \ R) by XTUPLE_0:25; notation let R be Relation; synonym rng R for proj2 R; end; canceled 3; theorem Th7: R c= [:dom R, rng R:] proof let y,z; assume [y,z] in R; then y in dom R & z in rng R by XTUPLE_0:def 12,def 13; hence thesis by ZFMISC_1:87; end; theorem R /\ [:dom R, rng R:] = R by Th7,XBOOLE_1:28; theorem Th9: R = {[x,y]} implies dom R = {x} & rng R = {y} proof assume A1: R = {[x,y]}; z in dom R iff z in {x} proof thus z in dom R implies z in {x} proof assume z in dom R; then consider b such that A2: [z,b] in R by XTUPLE_0:def 12; [z,b] = [x,y] by A1,A2,TARSKI:def 1; then z=x by XTUPLE_0:1; hence thesis by TARSKI:def 1; end; assume z in {x}; then z=x by TARSKI:def 1; then [z,y] in R by A1,TARSKI:def 1; hence thesis by XTUPLE_0:def 12; end; hence dom R = {x} by TARSKI:1; z in rng R iff z in {y} proof thus z in rng R implies z in {y} proof assume z in rng R; then consider a such that A3: [a,z] in R by XTUPLE_0:def 13; [a,z] = [x,y] by A1,A3,TARSKI:def 1; then z = y by XTUPLE_0:1; hence thesis by TARSKI:def 1; end; assume z in {y}; then z = y by TARSKI:def 1; then [x,z] in R by A1,TARSKI:def 1; hence thesis by XTUPLE_0:def 13; end; hence thesis by TARSKI:1; end; theorem R = {[a,b],[x,y]} implies dom R = {a,x} & rng R = {b,y} proof assume A1: R = {[a,b],[x,y]}; thus dom R = {a,x} proof thus dom R c= {a,x} proof let z; assume z in dom R; then consider c such that A2: [z,c] in R by XTUPLE_0:def 12; [z,c] = [a,b] or [z,c] = [x,y] by A1,A2,TARSKI:def 2; then z = a or z = x by XTUPLE_0:1; hence thesis by TARSKI:def 2; end; let z; assume z in {a,x}; then z = a or z = x by TARSKI:def 2; then [z,b] in R or [z,y] in R by A1,TARSKI:def 2; hence thesis by XTUPLE_0:def 12; end; thus rng R c= {b,y} proof let z; assume z in rng R; then consider d such that A3: [d,z] in R by XTUPLE_0:def 13; [d,z] = [a,b] or [d,z] = [x,y] by A1,A3,TARSKI:def 2; then z = b or z = y by XTUPLE_0:1; hence thesis by TARSKI:def 2; end; let z; assume z in {b,y}; then z = b or z = y by TARSKI:def 2; then [a,z] in R or [x,z] in R by A1,TARSKI:def 2; hence thesis by XTUPLE_0:def 13; end; theorem Th11: P c= R implies dom P c= dom R & rng P c= rng R by XTUPLE_0:8,9; theorem Th12: rng(P \/ R) = rng P \/ rng R by XTUPLE_0:27; theorem Th13: rng(P /\ R) c= rng P /\ rng R by XTUPLE_0:28; theorem rng P \ rng R c= rng(P \ R) by XTUPLE_0:29; definition canceled 2; let R; func field R -> set equals dom R \/ rng R; coherence; end; theorem [a,b] in R implies a in field R & b in field R proof assume A1: [a,b] in R; then a in dom R by XTUPLE_0:def 12; hence a in field R by XBOOLE_0:def 3; b in rng R by A1,XTUPLE_0:def 13; hence thesis by XBOOLE_0:def 3; end; theorem P c= R implies field P c= field R proof assume P c= R; then dom P c= dom R & rng P c= rng R by Th11; hence thesis by XBOOLE_1:13; end; theorem Th17: field {[x,y]} = {x,y} proof set R = {[x,y]}; dom R = {x} & rng R = {y} by Th9; hence thesis by ENUMSET1:1; end; theorem field(P \/ R) = field P \/ field R proof thus field(P \/ R) = dom P \/ dom R \/ rng(P \/ R) by Th1 .= dom P \/ dom R \/ (rng P \/ rng R) by Th12 .= dom P \/ dom R \/ rng P \/ rng R by XBOOLE_1:4 .= field P \/ dom R \/ rng R by XBOOLE_1:4 .= field P \/ field R by XBOOLE_1:4; end; theorem field(P /\ R) c= field P /\ field R proof let x; assume x in field(P /\ R); then A1: x in dom(P /\ R) or x in rng(P /\ R) by XBOOLE_0:def 3; x in dom P /\ dom R or x in rng P /\ rng R implies (x in dom P or x in rng P) & (x in dom R or x in rng R) by XBOOLE_0:def 4; then A2: x in dom P /\ dom R or x in rng P /\ rng R implies x in dom P \/ rng P & x in dom R \/ rng R by XBOOLE_0:def 3; dom(P /\ R) c= dom P /\ dom R & rng(P /\ R) c= rng P /\ rng R by Th2,Th13; hence thesis by A1,A2,XBOOLE_0:def 4; end; definition let R; func R~ -> Relation means :Def7: [x,y] in it iff [y,x] in R; existence proof defpred Q[set,set] means [$2,$1] in R; consider P such that A1: for x,y holds [x,y] in P iff x in rng R & y in dom R & Q[x,y] from RelExistence; take P; let x,y; [y,x] in R implies y in dom R & x in rng R by XTUPLE_0:def 12,def 13; hence thesis by A1; end; uniqueness proof let P1,P2; assume that A2: [x,y] in P1 iff [y,x] in R and A3: [x,y] in P2 iff [y,x] in R; let x,y; [x,y] in P1 iff [y,x] in R by A2; hence [x,y] in P1 iff [x,y] in P2 by A3; end; involutiveness; end; theorem Th20: rng R = dom(R~) & dom R = rng(R~) proof thus rng R c= dom(R~) proof let u be set; assume u in rng R; then consider x such that A1: [x,u] in R by XTUPLE_0:def 13; [u,x] in R~ by A1,Def7; hence thesis by XTUPLE_0:def 12; end; thus dom(R~) c= rng R proof let u be set; assume u in dom(R~); then consider x such that A2: [u,x] in R~ by XTUPLE_0:def 12; [x,u] in R by A2,Def7; hence thesis by XTUPLE_0:def 13; end; thus dom R c= rng(R~) proof let u be set; assume u in dom R; then consider x such that A3: [u,x] in R by XTUPLE_0:def 12; [x,u] in R~ by A3,Def7; hence thesis by XTUPLE_0:def 13; end; let u be set; assume u in rng(R~); then consider x such that A4: [x,u] in R~ by XTUPLE_0:def 13; [u,x] in R by A4,Def7; hence thesis by XTUPLE_0:def 12; end; theorem field R = field(R~) proof thus field R = rng(R~) \/ rng R by Th20 .= field(R~) by Th20; end; theorem (P /\ R)~ = P~ /\ R~ proof let x,y; [x,y] in (P /\ R)~ iff [y,x] in P /\ R by Def7; then [x,y] in (P /\ R)~ iff [y,x] in P & [y,x] in R by XBOOLE_0:def 4; then [x,y] in (P /\ R)~ iff [x,y] in P~ & [x,y] in R~ by Def7; hence thesis by XBOOLE_0:def 4; end; theorem (P \/ R)~ = P~ \/ R~ proof let x,y; [x,y] in (P \/ R)~ iff [y,x] in P \/ R by Def7; then [x,y] in (P \/ R)~ iff [y,x] in P or [y,x] in R by XBOOLE_0:def 3; then [x,y] in (P \/ R)~ iff [x,y] in P~ or [x,y] in R~ by Def7; hence thesis by XBOOLE_0:def 3; end; theorem (P \ R)~ = P~ \ R~ proof let x,y; [x,y] in (P \ R)~ iff [y,x] in P \ R by Def7; then [x,y] in (P \ R)~ iff [y,x] in P & not [y,x] in R by XBOOLE_0:def 5; then [x,y] in (P \ R)~ iff [x,y] in P~ & not [x,y] in R~ by Def7; hence thesis by XBOOLE_0:def 5; end; definition let P,R be set; func P(#)R -> Relation means :Def8: [x,y] in it iff ex z st [x,z] in P & [z,y] in R; existence proof defpred Z[set,set] means ex z st [$1,z] in P & [z,$2] in R; consider Q such that A1: for x,y holds [x,y] in Q iff x in proj1 P & y in proj2 R & Z[x,y] from RelExistence; take Q; let x,y; thus [x,y] in Q implies ex z st [x,z] in P & [z,y] in R by A1; given z such that A2: [x,z] in P & [z,y] in R; x in proj1 P & y in proj2 R by A2,XTUPLE_0:def 12,def 13; hence thesis by A1,A2; end; uniqueness proof let P1,P2; assume that A3: [x,y] in P1 iff ex z st [x,z] in P & [z,y] in R and A4: [x,y] in P2 iff ex z st [x,z] in P & [z,y] in R; let x,y; [x,y] in P1 iff ex z st [x,z] in P & [z,y] in R by A3; hence [x,y] in P1 iff [x,y] in P2 by A4; end; end; notation let P,R; synonym P*R for P(#)R; end; theorem Th25: dom(P*R) c= dom P proof let x; assume x in dom(P*R); then consider y such that A1: [x,y] in P*R by XTUPLE_0:def 12; ex z st [x,z] in P & [z,y] in R by A1,Def8; hence thesis by XTUPLE_0:def 12; end; theorem Th26: rng(P*R) c= rng R proof let y; assume y in rng(P*R); then consider x such that A1: [x,y] in P*R by XTUPLE_0:def 13; ex z st [x,z] in P & [z,y] in R by A1,Def8; hence thesis by XTUPLE_0:def 13; end; theorem rng R c= dom P implies dom(R*P) = dom R proof assume A1: y in rng R implies y in dom P; thus dom(R*P) c= dom R by Th25; let x; assume x in dom R; then consider y such that A2: [x,y] in R by XTUPLE_0:def 12; y in rng R by A2,XTUPLE_0:def 13; then y in dom P by A1; then consider z such that A3: [y,z] in P by XTUPLE_0:def 12; [x,z] in R*P by A2,A3,Def8; hence thesis by XTUPLE_0:def 12; end; theorem dom P c= rng R implies rng(R*P) = rng P proof assume A1: for y st y in dom P holds y in rng R; thus rng(R*P) c= rng P by Th26; let z; assume z in rng P; then consider y such that A2: [y,z] in P by XTUPLE_0:def 13; y in dom P by A2,XTUPLE_0:def 12; then y in rng R by A1; then consider x such that A3: [x,y] in R by XTUPLE_0:def 13; [x,z] in R*P by A2,A3,Def8; hence thesis by XTUPLE_0:def 13; end; theorem Th29: P c= R implies Q*P c= Q*R proof assume A1: P c= R; let x,y; assume [x,y] in Q*P; then ex z st [x,z] in Q & [z,y] in P by Def8; hence thesis by A1,Def8; end; theorem Th30: P c= Q implies P*R c= Q*R proof assume A1: P c= Q; let x,y; assume [x,y] in P*R; then ex z st [x,z] in P & [z,y] in R by Def8; hence thesis by A1,Def8; end; theorem P c= R & Q c= S implies P*Q c= R*S proof assume A1: P c= R & Q c= S; let x,y; assume [x,y] in P*Q; then ex z st [x,z] in P & [z,y] in Q by Def8; hence [x,y] in R*S by A1,Def8; end; theorem P*(R \/ Q) = (P*R) \/ (P*Q) proof let x,y; hereby assume [x,y] in P*(R \/ Q); then consider z such that A1: [x,z] in P and A2: [z,y] in R \/ Q by Def8; [z,y] in R or [z,y] in Q by A2,XBOOLE_0:def 3; then [x,y] in P*R or [x,y] in P*Q by A1,Def8; hence [x,y] in (P*R) \/ (P*Q) by XBOOLE_0:def 3; end; assume A3: [x,y] in (P*R) \/ (P*Q); per cases by A3,XBOOLE_0:def 3; suppose [x,y] in P*Q; then consider z such that A4: [x,z] in P and A5: [z,y] in Q by Def8; [z,y] in R \/ Q by A5,XBOOLE_0:def 3; hence [x,y] in P*(R \/ Q) by A4,Def8; end; suppose [x,y] in P*R; then consider z such that A6: [x,z] in P and A7: [z,y] in R by Def8; [z,y] in R \/ Q by A7,XBOOLE_0:def 3; hence [x,y] in P*(R \/ Q) by A6,Def8; end; end; theorem P*(R /\ Q) c= (P*R) /\ (P*Q) proof let x,y; assume [x,y] in P*(R /\ Q); then consider z such that A1: [x,z] in P and A2: [z,y] in R /\ Q by Def8; [z,y] in Q by A2,XBOOLE_0:def 4; then A3: [x,y] in P*Q by A1,Def8; [z,y] in R by A2,XBOOLE_0:def 4; then [x,y] in P*R by A1,Def8; hence [x,y] in (P*R) /\ (P*Q) by A3,XBOOLE_0:def 4; end; theorem (P*R) \ (P*Q) c= P*(R \ Q) proof let a,b; assume A1: [a,b] in (P*R) \ (P*Q); then consider y such that A2: [a,y] in P and A3: [y,b] in R by Def8; not [a,b] in P*Q by A1,XBOOLE_0:def 5; then not [a,y] in P or not [y,b] in Q by Def8; then [y,b] in R \ Q by A2,A3,XBOOLE_0:def 5; hence [a,b] in P*(R \ Q) by A2,Def8; end; theorem (P*R)~ = R~*P~ proof let a,b; hereby assume [a,b] in (P*R)~; then [b,a] in P*R by Def7; then consider y such that A1: [b,y] in P & [y,a] in R by Def8; [y,b] in P~ & [a,y] in R~ by A1,Def7; hence [a,b] in R~*P~ by Def8; end; assume [a,b] in R~*P~; then consider y such that A2: [a,y] in R~ & [y,b] in P~ by Def8; [y,a] in R & [b,y] in P by A2,Def7; then [b,a] in P*R by Def8; hence [a,b] in (P*R)~ by Def7; end; theorem Th36: (P*R)*Q = P*(R*Q) proof let a,b; hereby assume [a,b] in (P*R)*Q; then consider y such that A1: [a,y] in P*R and A2: [y,b] in Q by Def8; consider x such that A3: [a,x] in P and A4: [x,y] in R by A1,Def8; [x,b] in R*Q by A2,A4,Def8; hence [a,b] in P*(R*Q) by A3,Def8; end; assume [a,b] in P*(R*Q); then consider y such that A5: [a,y] in P and A6: [y,b] in R*Q by Def8; consider x such that A7: [y,x] in R and A8: [x,b] in Q by A6,Def8; [a,x] in P*R by A5,A7,Def8; hence [a,b] in (P*R)*Q by A8,Def8; end; registration cluster non empty for Relation; existence proof {[{},{}]} is non empty; hence thesis; end; end; registration let f be non empty Relation; cluster dom f -> non empty; coherence proof ex x1,x2 being set st the Element of f = [x1,x2] by Def1; hence thesis by XTUPLE_0:def 12; end; cluster rng f -> non empty; coherence proof ex x1,x2 being set st the Element of f = [x1,x2] by Def1; hence thesis by XTUPLE_0:def 13; end; end; theorem Th37: (for x,y holds not [x,y] in R) implies R = {} proof assume A1: for x,y holds not [x,y] in R; assume A2: not thesis; then ex x,y st the Element of R = [x,y] by Def1; hence contradiction by A1,A2; end; theorem Th38: dom {} = {} & rng {} = {} proof thus dom {} = {} proof let x,y be set; thus [x,y] in dom {} implies [x,y] in {} proof assume [x,y] in dom {}; then ex z st [[x,y],z] in {}; hence thesis; end; thus thesis; end; let x,y be set; thus [x,y] in rng{} implies [x,y] in {} proof assume [x,y] in rng{}; then ex z st [z,[x,y]] in {}; hence thesis; end; thus thesis; end; theorem Th39: {}*R = {} & R*{} = {} proof thus {}*R = {} proof let x,y; hereby assume [x,y] in {}*R; then ex z st [x,z] in {} & [z,y] in R by Def8; hence [x,y] in {}; end; thus thesis; end; let x,y; hereby assume [x,y] in R*{}; then ex z st [x,z] in R & [z,y] in {} by Def8; hence [x,y] in {}; end; thus thesis; end; registration let X be empty set; cluster dom X -> empty; coherence; cluster rng X -> empty; coherence; let R; cluster X*R -> empty; coherence by Th39; cluster R*X -> empty; coherence by Th39; end; theorem field {} = {}; theorem Th41: dom R = {} or rng R = {} implies R = {}; theorem dom R = {} iff rng R = {} by Th38,Th41; registration let X be empty set; cluster X~ -> empty; coherence proof for x,y st [x,y] in {}~ holds contradiction by Def7; hence thesis by Th37; end; end; theorem {}~ = {}; theorem rng R misses dom P implies R*P = {} proof assume A1: rng R /\ dom P = {}; assume R*P <> {}; then consider x,z such that A2: [x,z] in R*P by Th37; consider y such that A3: [x,y] in R & [y,z] in P by A2,Def8; y in rng R & y in dom P by A3,XTUPLE_0:def 12,def 13; hence contradiction by A1,XBOOLE_0:def 4; end; definition let R be Relation; attr R is non-empty means :Def9: not {} in rng R; end; registration cluster non-empty for Relation; existence proof take {}; thus not {} in rng {}; end; end; registration let R be Relation, S be non-empty Relation; cluster R*S -> non-empty; coherence proof rng(R*S) c= rng S by Th26; hence not {} in rng(R*S) by Def9; end; end; definition let X; func id X -> Relation means :Def10: [x,y] in it iff x in X & x = y; existence proof defpred Z[set,set] means $1=$2; consider R such that A1: for x,y holds [x,y] in R iff x in X & y in X & Z[x,y] from RelExistence; take R; let x,y; thus thesis by A1; end; uniqueness proof let P1,P2; assume that A2: [x,y] in P1 iff x in X & x=y and A3: [x,y] in P2 iff x in X & x=y; let x,y; [x,y] in P1 iff x in X & x=y by A2; hence [x,y] in P1 iff [x,y] in P2 by A3; end; end; registration let X; reduce dom id X to X; reducibility proof thus dom id X c= X proof let x; assume x in dom(id X); then ex y st [x,y] in id X by XTUPLE_0:def 12; hence x in X by Def10; end; let x; assume x in X; then [x,x] in id X by Def10; hence x in dom(id X) by XTUPLE_0:def 12; end; reduce rng id X to X; reducibility proof thus rng id X c= X proof let x; assume x in rng id X; then consider y such that A1: [y,x] in id X by XTUPLE_0:def 13; x = y by A1,Def10; hence thesis by A1,Def10; end; let x; [x,x] in id X iff x in X by Def10; hence thesis by XTUPLE_0:def 13; end; end; theorem dom id X = X & rng id X = X; registration let X; reduce (id X)~ to id X; reducibility proof let x,y; thus [x,y] in (id X)~ implies [x,y] in id X proof assume [x,y] in (id X)~; then [y,x] in id X by Def7; hence thesis by Def10; end; assume A1: [x,y] in id X; then x = y by Def10; hence thesis by A1,Def7; end; end; theorem (id X)~ = id X; theorem (for x st x in X holds [x,x] in R) implies id X c= R proof assume A1: for x st x in X holds [x,x] in R; let x,y; assume [x,y] in id X; then x in X & x=y by Def10; hence thesis by A1; end; theorem Th48: [x,y] in (id X)*R iff x in X & [x,y] in R proof thus [x,y] in (id X)*R implies x in X & [x,y] in R proof assume [x,y] in (id X)*R; then ex z st [x,z] in id X & [z,y] in R by Def8; hence thesis by Def10; end; assume x in X; then [x,x] in id X by Def10; hence thesis by Def8; end; theorem Th49: [x,y] in R*id Y iff y in Y & [x,y] in R proof thus [x,y] in R*id Y implies y in Y & [x,y] in R proof assume [x,y] in R*id Y; then consider z such that A1: [x,z] in R and A2: [z,y] in id Y by Def8; z = y by A2,Def10; hence thesis by A1,A2,Def10; end; y in Y implies [y,y] in id Y by Def10; hence thesis by Def8; end; theorem Th50: R*(id X) c= R & (id X)*R c= R proof thus [x,y] in R*id X implies [x,y] in R proof assume [x,y] in R*id X; then ex z st [x,z] in R & [z,y] in id X by Def8; hence thesis by Def10; end; thus [x,y] in (id X)*R implies [x,y] in R proof assume [x,y] in (id X)*R; then ex z st [x,z] in id X & [z,y] in R by Def8; hence thesis by Def10; end; end; theorem Th51: dom R c= X implies (id X)*R = R proof assume A1: dom R c= X; A2: R c= (id X)*R proof let x,y; assume A3: [x,y] in R; then x in dom R by XTUPLE_0:def 12; then [x,x] in id X by A1,Def10; hence thesis by A3,Def8; end; (id X)*R c= R by Th50; hence thesis by A2,XBOOLE_0:def 10; end; theorem (id dom R)*R = R by Th51; theorem Th53: rng R c= Y implies R*(id Y) = R proof assume A1: rng R c= Y; A2: R c= R*(id Y) proof let x,y; assume A3: [x,y] in R; then y in rng R by XTUPLE_0:def 13; then [y,y] in (id Y) by A1,Def10; hence thesis by A3,Def8; end; R*(id Y) c= R by Th50; hence thesis by A2,XBOOLE_0:def 10; end; theorem R*(id rng R) = R by Th53; theorem id {} = {} proof dom(id {}) = {}; hence thesis; end; theorem rng P2 c= X & P2*R = id dom P1 & R*P1 = id X implies P1 = P2 proof (P2*R)*P1 = P2*(R*P1) & id(dom P1)*P1 = P1 by Th36,Th51; hence thesis by Th53; end; definition let R,X; func R|X -> Relation means :Def11: [x,y] in it iff x in X & [x,y] in R; existence proof defpred Z[set,set] means ($1 in X & [$1,$2] in R); consider P such that A1: for x,y holds [x,y] in P iff x in dom R & y in rng R & Z[x,y] from RelExistence; take P; let x,y; x in X & [x,y] in R implies x in dom R & y in rng R by XTUPLE_0:def 12,def 13; hence thesis by A1; end; uniqueness proof let P1,P2; assume that A2: [x,y] in P1 iff x in X & [x,y] in R and A3: [x,y] in P2 iff x in X & [x,y] in R; let x,y; [x,y] in P1 iff x in X & [x,y] in R by A2; hence [x,y] in P1 iff [x,y] in P2 by A3; end; end; registration let R be Relation, X be empty set; cluster R|X -> empty; coherence proof not [x,y] in R|{} by Def11; hence thesis by Th37; end; end; theorem Th57: x in dom(R|X) iff x in X & x in dom R proof thus x in dom(R|X) implies x in X & x in dom R proof assume x in dom(R|X); then consider y such that A1: [x,y] in R|X by XTUPLE_0:def 12; [x,y] in R by A1,Def11; hence thesis by A1,Def11,XTUPLE_0:def 12; end; assume A2: x in X; assume x in dom R; then consider y such that A3: [x,y] in R by XTUPLE_0:def 12; [x,y] in R|X by A2,A3,Def11; hence thesis by XTUPLE_0:def 12; end; theorem Th58: dom(R|X) c= X proof let x; thus thesis by Th57; end; theorem Th59: R|X c= R proof thus [x,y] in R|X implies [x,y] in R by Def11; end; theorem Th60: dom(R|X) c= dom R proof let x; thus thesis by Th57; end; theorem Th61: dom(R|X) = dom R /\ X proof x in dom(R|X) iff x in dom R /\ X proof x in dom(R|X) iff x in dom R & x in X by Th57; hence thesis by XBOOLE_0:def 4; end; hence thesis by TARSKI:1; end; theorem X c= dom R implies dom(R|X) = X proof dom(R|X) = dom R /\ X by Th61; hence thesis by XBOOLE_1:28; end; theorem (R|X)*P c= R*P by Th30,Th59; theorem P*(R|X) c= P*R by Th29,Th59; theorem R|X = (id X)*R proof let x,y; [x,y] in R|X iff [x,y] in R & x in X by Def11; hence thesis by Th48; end; theorem R|X = {} iff dom R misses X proof thus R|X = {} implies dom R misses X proof assume A1: R|X = {}; thus dom R /\ X = {} proof thus dom R /\ X c= {} proof let x be set; assume A2: x in (dom R) /\ X; then x in dom R by XBOOLE_0:def 4; then A3: ex y st [x,y] in R by XTUPLE_0:def 12; x in X by A2,XBOOLE_0:def 4; hence thesis by A1,A3,Def11; end; thus thesis by XBOOLE_1:2; end; end; assume A4: (dom R) /\ X = {}; let x,y; hereby assume A5: [x,y] in R|X; then x in X by Def11; then A6: not x in dom R by A4,XBOOLE_0:def 4; [x,y] in R by A5,Def11; hence [x,y] in {} by A6,XTUPLE_0:def 12; end; thus thesis; end; theorem Th67: R|X = R /\ [:X,rng R:] proof set P = R /\ [:X,rng R:]; let x,y; thus [x,y] in R|X implies [x,y] in P proof assume A1: [x,y] in R|X; then A2: x in X by Def11; A3: [x,y] in R by A1,Def11; then y in rng R by XTUPLE_0:def 13; then [x,y] in [:X,rng R:] by A2,ZFMISC_1:def 2; hence thesis by A3,XBOOLE_0:def 4; end; assume A4: [x,y] in P; then [x,y] in [:X,rng R:] by XBOOLE_0:def 4; then A5: x in X by ZFMISC_1:87; [x,y] in R by A4,XBOOLE_0:def 4; hence thesis by A5,Def11; end; theorem Th68: dom R c= X implies R|X = R proof assume dom R c= X; then A1: [:dom R,rng R:] c= [:X,rng R:] by ZFMISC_1:95; R c= [:dom R,rng R:] & R|X = R /\ [:X,rng R:] by Th7,Th67; hence thesis by A1,XBOOLE_1:1,28; end; registration let R; reduce R|dom R to R; reducibility by Th68; end; theorem R|dom R = R; theorem Th70: rng(R|X) c= rng R proof (R|X) c= R by Th59; hence thesis by Th11; end; theorem Th71: (R|X)|Y = R|(X /\ Y) proof let x,y; A1: [x,y] in R|X iff [x,y] in R & x in X by Def11; A2: [x,y] in R|(X /\ Y) iff [x,y] in R & x in X /\ Y by Def11; [x,y] in (R|X)|Y iff [x,y] in R|X & x in Y by Def11; hence thesis by A1,A2,XBOOLE_0:def 4; end; registration let R,X; reduce R|X|X to R|X; reducibility proof X /\ X = X; hence thesis by Th71; end; end; theorem (R|X)|X = R|X; theorem X c= Y implies (R|X)|Y = R|X proof X c= Y implies X /\ Y = X by XBOOLE_1:28; hence thesis by Th71; end; theorem Y c= X implies (R|X)|Y = R|Y proof Y c= X implies X /\ Y = Y by XBOOLE_1:28; hence thesis by Th71; end; theorem Th75: X c= Y implies R|X c= R|Y proof assume A1: X c= Y; let x,y; assume [x,y] in R|X; then x in X & [x,y] in R by Def11; hence [x,y] in R|Y by A1,Def11; end; theorem Th76: P c= R implies P|X c= R|X proof assume A1: P c= R; let x,y; assume [x,y] in P|X; then [x,y] in P & x in X by Def11; hence thesis by A1,Def11; end; theorem Th77: P c= R & X c= Y implies P|X c= R|Y proof assume P c= R & X c= Y; then P|X c= R|X & R|X c= R|Y by Th75,Th76; hence thesis by XBOOLE_1:1; end; theorem Th78: R|(X \/ Y) = (R|X) \/ (R|Y) proof let x,y; hereby assume A1: [x,y] in R|(X \/ Y); then x in X \/ Y by Def11; then A2: x in X or x in Y by XBOOLE_0:def 3; [x,y] in R by A1,Def11; then [x,y] in R|X or [x,y] in R|Y by A2,Def11; hence [x,y] in (R|X) \/ (R|Y) by XBOOLE_0:def 3; end; assume A3: [x,y] in (R|X) \/ (R|Y); per cases by A3,XBOOLE_0:def 3; suppose A4: [x,y] in R|Y; then x in Y by Def11; then A5: x in X \/ Y by XBOOLE_0:def 3; [x,y] in R by A4,Def11; hence [x,y] in R|(X \/ Y) by A5,Def11; end; suppose A6: [x,y] in R|X; then x in X by Def11; then A7: x in X \/ Y by XBOOLE_0:def 3; [x,y] in R by A6,Def11; hence [x,y] in R|(X \/ Y) by A7,Def11; end; end; theorem R|(X /\ Y) = (R|X) /\ (R|Y) proof let x,y; hereby assume A1: [x,y] in R|(X /\ Y); then A2: x in X /\ Y by Def11; A3: [x,y] in R by A1,Def11; x in Y by A2,XBOOLE_0:def 4; then A4: [x,y] in R|Y by A3,Def11; x in X by A2,XBOOLE_0:def 4; then [x,y] in R|X by A3,Def11; hence [x,y] in (R|X) /\ (R|Y) by A4,XBOOLE_0:def 4; end; assume A5: [x,y] in (R|X) /\ (R|Y); then [x,y] in R|Y by XBOOLE_0:def 4; then A6: x in Y by Def11; A7: [x,y] in R|X by A5,XBOOLE_0:def 4; then x in X by Def11; then A8: x in X /\ Y by A6,XBOOLE_0:def 4; [x,y] in R by A7,Def11; hence [x,y] in R|(X /\ Y) by A8,Def11; end; theorem Th80: R|(X \ Y) = R|X \ R|Y proof let x,y; hereby assume A1: [x,y] in R|(X \ Y); then A2: x in X \ Y by Def11; then not x in Y by XBOOLE_0:def 5; then A3: not [x,y] in R|Y by Def11; [x,y] in R by A1,Def11; then [x,y] in R|X by A2,Def11; hence [x,y] in R|X \ R|Y by A3,XBOOLE_0:def 5; end; assume A4: [x,y] in R|X \ R|Y; then A5: [x,y] in R by Def11; not [x,y] in R|Y by A4,XBOOLE_0:def 5; then A6: not x in Y or not [x,y] in R by Def11; x in X by A4,Def11; then x in X \ Y by A4,A6,Def11,XBOOLE_0:def 5; hence [x,y] in R|(X \ Y) by A5,Def11; end; registration let R be empty Relation, X be set; cluster R|X -> empty; coherence proof for x,y st [x,y] in {}|X holds contradiction by Def11; hence thesis by Th37; end; end; theorem R|{} = {}; theorem {}|X = {}; theorem (P*R)|X = (P|X)*R proof let x,y; hereby assume A1: [x,y] in (P*R)|X; then [x,y] in P*R by Def11; then consider a such that A2: [x,a] in P and A3: [a,y] in R by Def8; x in X by A1,Def11; then [x,a] in P|X by A2,Def11; hence [x,y] in (P|X)*R by A3,Def8; end; assume [x,y] in (P|X)*R; then consider a such that A4: [x,a] in P|X and A5: [a,y] in R by Def8; [x,a] in P by A4,Def11; then A6: [x,y] in P*R by A5,Def8; x in X by A4,Def11; hence [x,y] in (P*R)|X by A6,Def11; end; definition let Y,R; func Y|`R -> Relation means :Def12: [x,y] in it iff y in Y & [x,y] in R; existence proof defpred Z[set,set] means $2 in Y & [$1,$2] in R; consider P such that A1: for x,y holds [x,y] in P iff x in dom R & y in rng R & Z[x,y] from RelExistence; take P; let x,y; y in Y & [x,y] in R implies x in dom R & y in rng R by XTUPLE_0:def 12,def 13; hence thesis by A1; end; uniqueness proof let P1,P2; assume that A2: [x,y] in P1 iff y in Y & [x,y] in R and A3: [x,y] in P2 iff y in Y & [x,y] in R; let x,y; [x,y] in P1 iff y in Y & [x,y] in R by A2; hence [x,y] in P1 iff [x,y] in P2 by A3; end; end; registration let R be Relation, X be empty set; cluster X|`R -> empty; coherence proof not [x,y] in X|`R by Def12; hence thesis by Th37; end; end; theorem Th84: y in rng(Y|`R) iff y in Y & y in rng R proof thus y in rng(Y|`R) implies y in Y & y in rng R proof assume y in rng(Y|`R); then consider x such that A1: [x,y] in Y|`R by XTUPLE_0:def 13; [x,y] in R by A1,Def12; hence thesis by A1,Def12,XTUPLE_0:def 13; end; assume A2: y in Y; assume y in rng R; then consider x such that A3: [x,y] in R by XTUPLE_0:def 13; [x,y] in Y|`R by A2,A3,Def12; hence thesis by XTUPLE_0:def 13; end; theorem Th85: rng(Y|`R) c= Y proof let y; thus thesis by Th84; end; theorem Th86: Y|`R c= R proof thus [x,y] in Y|`R implies [x,y] in R by Def12; end; theorem Th87: rng(Y|`R) c= rng R proof Y|`R c= R by Th86; hence thesis by Th11; end; theorem Th88: rng(Y|`R) = rng R /\ Y proof rng(Y|`R) c= Y & rng(Y|`R) c= rng R by Th85,Th87; hence rng(Y|`R) c= rng R /\ Y by XBOOLE_1:19; let y; assume A1: y in rng R /\ Y; then y in rng R by XBOOLE_0:def 4; then consider x such that A2: [x,y] in R by XTUPLE_0:def 13; y in Y by A1,XBOOLE_0:def 4; then [x,y] in Y|`R by A2,Def12; hence thesis by XTUPLE_0:def 13; end; theorem Y c= rng R implies rng(Y|`R) = Y proof assume Y c= rng R; then rng R /\ Y = Y by XBOOLE_1:28; hence thesis by Th88; end; theorem (Y|`R)*P c= R*P by Th30,Th86; theorem P*(Y|`R) c= P*R by Th29,Th86; theorem Y|`R = R*(id Y) proof let x,y; [x,y] in Y|`R iff y in Y & [x,y] in R by Def12; hence thesis by Th49; end; theorem Th93: Y|`R = R /\ [:dom R,Y:] proof set P = R /\ [:dom R,Y:]; let x,y; thus [x,y] in Y|`R implies [x,y] in P proof assume A1: [x,y] in Y|`R; then A2: y in Y by Def12; A3: [x,y] in R by A1,Def12; then x in dom R by XTUPLE_0:def 12; then [x,y] in [:dom R,Y:] by A2,ZFMISC_1:def 2; hence thesis by A3,XBOOLE_0:def 4; end; assume A4: [x,y] in P; then [x,y] in [:dom R,Y:] by XBOOLE_0:def 4; then A5: y in Y by ZFMISC_1:87; [x,y] in R by A4,XBOOLE_0:def 4; hence thesis by A5,Def12; end; theorem Th94: rng R c= Y implies Y|`R = R proof assume rng R c= Y; then A1: [:dom R,rng R:] c= [:dom R,Y:] by ZFMISC_1:95; R c= [:dom R,rng R:] & Y|`R = R /\ [:dom R,Y:] by Th7,Th93; hence thesis by A1,XBOOLE_1:1,28; end; registration let R; reduce rng R|`R to R; reducibility by Th94; end; theorem rng R|`R=R; theorem Th96: Y|`(X|`R) = (Y /\ X)|`R proof let x,y; A1: [x,y] in X|`R iff [x,y] in R & y in X by Def12; A2: [x,y] in (Y /\ X)|`R iff [x,y] in R & y in Y /\ X by Def12; [x,y] in Y|`(X|`R) iff [x,y] in X|`R & y in Y by Def12; hence thesis by A1,A2,XBOOLE_0:def 4; end; registration let Y,R; reduce Y|`(Y|`R) to Y|`R; reducibility proof Y /\ Y = Y; hence thesis by Th96; end; end; theorem Y|`(Y|`R) = Y|`R; theorem X c= Y implies Y|`(X|`R) = X|`R proof X c= Y implies Y /\ X = X by XBOOLE_1:28; hence thesis by Th96; end; theorem Y c= X implies Y|`(X|`R) = Y|`R proof Y c= X implies Y /\ X = Y by XBOOLE_1:28; hence thesis by Th96; end; theorem Th100: X c= Y implies X|`R c= Y|`R proof assume A1: X c= Y; let x,y; [x,y] in X|`R iff [x,y] in R & y in X by Def12; hence thesis by A1,Def12; end; theorem Th101: P1 c= P2 implies Y|`P1 c= Y|`P2 proof assume A1: P1 c= P2; let x,y; assume [x,y] in Y|`P1; then [x,y] in P1 & y in Y by Def12; hence thesis by A1,Def12; end; theorem P1 c= P2 & Y1 c= Y2 implies Y1|`P1 c= Y2|`P2 proof assume P1 c= P2 & Y1 c= Y2; then Y1|`P1 c= Y1|`P2 & Y1|`P2 c= Y2|`P2 by Th100,Th101; hence thesis by XBOOLE_1:1; end; theorem (X \/ Y)|`R = (X|`R) \/ (Y|`R) proof let x,y; A1: y in X \/ Y iff y in X or y in Y by XBOOLE_0:def 3; A2: [x,y] in (X|`R) \/ (Y|`R) iff [x,y] in X|`R or [x,y] in Y|`R by XBOOLE_0:def 3; [x,y] in (X \/ Y)|`R iff y in X \/ Y & [x,y] in R by Def12; hence thesis by A1,A2,Def12; end; theorem (X /\ Y)|`R = X|`R /\ Y|`R proof let x,y; A1: y in X /\ Y iff y in X & y in Y by XBOOLE_0:def 4; A2: [x,y] in X|`R /\ Y|`R iff [x,y] in X|`R & [x,y] in Y|`R by XBOOLE_0:def 4; [x,y] in (X /\ Y)|`R iff y in X /\ Y & [x,y] in R by Def12; hence thesis by A1,A2,Def12; end; theorem (X \ Y)|`R = X|`R \ Y|`R proof let x,y; A1: y in X \ Y iff y in X & not y in Y by XBOOLE_0:def 5; A2: [x,y] in X|`R \ Y|`R iff [x,y] in X|`R & not [x,y] in Y|`R by XBOOLE_0:def 5; [x,y] in X|`R iff y in X & [x,y] in R by Def12; hence thesis by A1,A2,Def12; end; theorem {}|`R = {}; theorem Y|`{} = {} proof for x,y st [x,y] in Y|`{} holds contradiction by Def12; hence thesis by Th37; end; theorem Y|`(P*R) = P*(Y|`R) proof let x,y; hereby assume A1: [x,y] in Y|`(P*R); then [x,y] in P*R by Def12; then consider a such that A2: [x,a] in P and A3: [a,y] in R by Def8; y in Y by A1,Def12; then [a,y] in Y|`R by A3,Def12; hence [x,y] in P*(Y|`R) by A2,Def8; end; assume [x,y] in P*(Y|`R); then consider a such that A4: [x,a] in P and A5: [a,y] in Y|`R by Def8; [a,y] in R by A5,Def12; then A6: [x,y] in P*R by A4,Def8; y in Y by A5,Def12; hence [x,y] in Y|`(P*R) by A6,Def12; end; theorem (Y|`R)|X = Y|`(R|X) proof let x,y; A1: [x,y] in R & x in X iff [x,y] in R|X by Def11; [x,y] in (Y|`R) iff [x,y] in R & y in Y by Def12; hence thesis by A1,Def11,Def12; end; definition let R,X; func R.:X -> set means :Def13: y in it iff ex x st [x,y] in R & x in X; existence proof defpred Z[set] means ex x st [x,$1] in R & x in X; consider Y such that A1: for y holds y in Y iff y in rng R & Z[y] from XBOOLE_0:sch 1; take Y; let y; thus y in Y implies ex x st [x,y] in R & x in X by A1; given x such that A2: [x,y] in R and A3: x in X; y in rng R by A2,XTUPLE_0:def 13; hence thesis by A1,A2,A3; end; uniqueness proof let Y1,Y2; assume that A4: y in Y1 iff ex x st [x,y] in R & x in X and A5: y in Y2 iff ex x st [x,y] in R & x in X; now let y; y in Y1 iff ex x st [x,y] in R & x in X by A4; hence y in Y1 iff y in Y2 by A5; end; hence thesis by TARSKI:1; end; end; theorem Th110: y in R.:X iff ex x st x in dom R & [x,y] in R & x in X proof thus y in R.:X implies ex x st x in dom R & [x,y] in R & x in X proof assume y in R.:X; then consider x such that A1: [x,y] in R & x in X by Def13; take x; thus thesis by A1,XTUPLE_0:def 12; end; thus thesis by Def13; end; theorem Th111: R.:X c= rng R proof let y; assume y in R.:X; then ex x st [x,y] in R & x in X by Def13; hence thesis by XTUPLE_0:def 13; end; theorem R.:X = R.:(dom R /\ X) proof y in R.:X iff y in R.:(dom R /\ X) proof thus y in R.:(X) implies y in R.:(dom R /\ X) proof assume y in R.:(X); then consider x such that A1: x in dom R and A2: [x,y] in R and A3: x in X by Th110; x in dom R /\ X by A1,A3,XBOOLE_0:def 4; hence thesis by A2,Def13; end; assume y in R.:(dom R /\ X); then consider x such that x in dom R and A4: [x,y] in R and A5: x in dom R /\ X by Th110; x in X by A5,XBOOLE_0:def 4; hence thesis by A4,Def13; end; hence thesis by TARSKI:1; end; theorem Th113: R.:dom R = rng R proof thus R.:dom R c= rng R by Th111; let y; assume y in rng R; then consider x such that A1: [x,y] in R by XTUPLE_0:def 13; x in dom R by A1,XTUPLE_0:def 12; hence thesis by A1,Def13; end; theorem R.:X c= R.:(dom R) proof R.:X c= rng R by Th111; hence thesis by Th113; end; theorem rng(R|X) = R.:X proof y in rng(R|X) iff y in R.:X proof thus y in rng(R|X) implies y in R.:X proof assume y in rng(R|X); then consider x such that A1: [x,y] in R|X by XTUPLE_0:def 13; x in X & [x,y] in R by A1,Def11; hence thesis by Def13; end; assume y in R.:X; then consider x such that A2: [x,y] in R & x in X by Def13; [x,y] in R|X by A2,Def11; hence thesis by XTUPLE_0:def 13; end; hence thesis by TARSKI:1; end; registration let R; let X be empty set; cluster R.:X -> empty; coherence proof set y = the Element of R.:{}; y in R.:{} implies ex x st [x,y] in R & x in {} by Def13; hence thesis; end; end; registration let R be empty Relation; let X; cluster R.:X -> empty; coherence proof assume not thesis; then ex x st [x,the Element of {}.:X] in {} & x in X by Def13; hence contradiction; end; end; canceled 2; theorem R.:X = {} iff dom R misses X proof set y = the Element of R.:X; thus R.:X = {} implies dom R misses X proof assume A1: R.:X = {}; assume not thesis; then consider x be set such that A2: x in dom R and A3: x in X by XBOOLE_0:3; ex y st [x,y] in R by A2,XTUPLE_0:def 12; hence contradiction by A1,A2,A3,Th110; end; assume A4: dom R /\ X ={}; assume not thesis; then ex x st x in dom R & [x,y] in R & x in X by Th110; hence contradiction by A4,XBOOLE_0:def 4; end; theorem X <> {} & X c= dom R implies R.:X <> {} proof assume that A1: X <> {} and A2: X c= dom R; set x = the Element of X; A3: x in dom R by A1,A2,TARSKI:def 3; then ex y st [x,y] in R by XTUPLE_0:def 12; hence thesis by A1,A3,Th110; end; theorem R.:(X \/ Y) = R.:X \/ R.:Y proof thus R.:(X \/ Y) c= R.:X \/ R.:Y proof let y; assume y in R.:(X \/ Y); then consider x such that A1: [x,y] in R and A2: x in X \/ Y by Def13; x in X or x in Y by A2,XBOOLE_0:def 3; then y in R.:X or y in R.:Y by A1,Def13; hence y in R.:X \/ R.:Y by XBOOLE_0:def 3; end; let y; assume A3: y in R.:X \/ R.:Y; per cases by A3,XBOOLE_0:def 3; suppose y in R.:Y; then consider x such that A4: [x,y] in R and A5: x in Y by Def13; x in X \/ Y by A5,XBOOLE_0:def 3; hence y in R.:(X \/ Y) by A4,Def13; end; suppose y in R.:X; then consider x such that A6: [x,y] in R and A7: x in X by Def13; x in X \/ Y by A7,XBOOLE_0:def 3; hence y in R.:(X \/ Y) by A6,Def13; end; end; theorem R.:(X /\ Y) c= R.:X /\ R.:Y proof let y; assume y in R.:(X /\ Y); then consider x such that A1: [x,y] in R and A2: x in X /\ Y by Def13; x in Y by A2,XBOOLE_0:def 4; then A3: y in R.:Y by A1,Def13; x in X by A2,XBOOLE_0:def 4; then y in R.:X by A1,Def13; hence thesis by A3,XBOOLE_0:def 4; end; theorem R.:X \ R.:Y c= R.:(X \ Y) proof let y; assume A1: y in R.:X \ R.:Y; then consider x such that A2: [x,y] in R and A3: x in X by Def13; not y in R.:Y by A1,XBOOLE_0:def 5; then not x in Y or not [x,y] in R by Def13; then x in X \ Y by A2,A3,XBOOLE_0:def 5; hence thesis by A2,Def13; end; theorem Th123: X c= Y implies R.:X c= R.:Y proof assume A1: X c= Y; let y; assume y in R.:X; then ex x st [x,y] in R & x in X by Def13; hence thesis by A1,Def13; end; theorem Th124: P c= R implies P.:X c= R.:X proof assume A1: P c= R; let y; assume y in P.:X; then ex x st [x,y] in P & x in X by Def13; hence thesis by A1,Def13; end; theorem P c= R & X c= Y implies P.:X c= R.:Y proof assume P c= R & X c= Y; then P.:X c= R.:X & R.:X c= R.:Y by Th123,Th124; hence thesis by XBOOLE_1:1; end; theorem (P*R).:X = R.:(P.:X) proof y in (P*R).:X iff y in R.:(P.:X) proof thus y in (P*R).:X implies y in R.:(P.:X) proof assume y in (P*R).:X; then consider x such that A1: [x,y] in P*R and A2: x in X by Def13; consider z such that A3: [x,z] in P and A4: [z,y] in R by A1,Def8; z in P.:X by A2,A3,Def13; hence thesis by A4,Def13; end; assume y in R.:(P.:X); then consider x such that A5: [x,y] in R and A6: x in P.:X by Def13; consider z such that A7: [z,x] in P and A8: z in X by A6,Def13; [z,y] in P*R by A5,A7,Def8; hence thesis by A8,Def13; end; hence thesis by TARSKI:1; end; theorem Th127: rng(P*R) = R.:(rng P) proof z in rng(P*R) iff z in R.:(rng P) proof thus z in rng(P*R) implies z in R.:(rng P) proof assume z in rng(P*R); then consider x such that A1: [x,z] in P*R by XTUPLE_0:def 13; consider y such that A2: [x,y] in P and A3: [y,z] in R by A1,Def8; y in rng P by A2,XTUPLE_0:def 13; hence thesis by A3,Def13; end; assume z in R.:(rng P); then consider y such that A4: [y,z] in R and A5: y in rng P by Def13; consider x such that A6: [x,y] in P by A5,XTUPLE_0:def 13; [x,z] in P*R by A4,A6,Def8; hence thesis by XTUPLE_0:def 13; end; hence thesis by TARSKI:1; end; theorem (R|X).:Y c= R.:Y by Th59,Th124; theorem Th129: for R be Relation, X, Y be set st X c= Y holds (R|Y).:X = R.:X proof let R be Relation, X, Y be set such that A1: X c= Y; thus (R|Y).:X c= R.:X by Th59,Th124; let y be set; assume y in R.:X; then consider x1 be set such that A2: [x1,y] in R and A3: x1 in X by Def13; ex x be set st [x,y] in R|Y & x in X proof take x1; thus [x1,y] in R|Y by A1,A2,A3,Def11; thus thesis by A3; end; hence thesis by Def13; end; theorem (dom R) /\ X c= (R~).:(R.:X) proof let x; assume A1: x in (dom R) /\ X; then x in dom R by XBOOLE_0:def 4; then consider y such that A2: [x,y] in R by XTUPLE_0:def 12; A3: [y,x] in R~ by A2,Def7; x in X by A1,XBOOLE_0:def 4; then y in R.:X by A2,Def13; hence thesis by A3,Def13; end; definition let R,Y; func R"Y -> set means :Def14: x in it iff ex y st [x,y] in R & y in Y; existence proof defpred Z[set] means ex y st [$1,y] in R & y in Y; consider X such that A1: for x holds x in X iff x in dom R & Z[x] from XBOOLE_0:sch 1; take X; let x; thus x in X implies ex y st [x,y] in R & y in Y by A1; given y such that A2: [x,y] in R and A3: y in Y; x in dom R by A2,XTUPLE_0:def 12; hence thesis by A1,A2,A3; end; uniqueness proof let X1,X2; assume that A4: x in X1 iff ex y st [x,y] in R & y in Y and A5: x in X2 iff ex y st [x,y] in R & y in Y; now let x; x in X1 iff ex y st [x,y] in R & y in Y by A4; hence x in X1 iff x in X2 by A5; end; hence thesis by TARSKI:1; end; end; theorem Th131: x in R"Y iff ex y st y in rng R & [x,y] in R & y in Y proof thus x in R"Y implies ex y st y in rng R & [x,y] in R & y in Y proof assume x in R"Y; then consider y such that A1: [x,y] in R & y in Y by Def14; take y; thus thesis by A1,XTUPLE_0:def 13; end; thus thesis by Def14; end; theorem Th132: R"Y c= dom R proof let x; assume x in R"Y; then ex y st [x,y] in R & y in Y by Def14; hence thesis by XTUPLE_0:def 12; end; theorem R"Y = R"(rng R /\ Y) proof x in R"Y iff x in R"(rng R /\ Y) proof thus x in R"Y implies x in R"(rng R /\ Y) proof assume x in R"Y; then consider y such that A1: y in rng R and A2: [x,y] in R and A3: y in Y by Th131; y in rng R /\ Y by A1,A3,XBOOLE_0:def 4; hence thesis by A2,Def14; end; assume x in R"(rng R /\ Y); then consider y such that y in rng R and A4: [x,y] in R and A5: y in rng R /\ Y by Th131; y in Y by A5,XBOOLE_0:def 4; hence thesis by A4,Def14; end; hence thesis by TARSKI:1; end; theorem Th134: R"rng R = dom R proof thus R"rng R c= dom R by Th132; let x; assume x in dom R; then consider y such that A1: [x,y] in R by XTUPLE_0:def 12; y in rng R by A1,XTUPLE_0:def 13; hence thesis by A1,Def14; end; theorem R"Y c= R"rng R proof R"Y c= dom R by Th132; hence thesis by Th134; end; registration let R; let Y be empty set; cluster R"Y -> empty; coherence proof set x = the Element of R"{}; x in R"{} implies ex y st [x,y] in R & y in {} by Def14; hence thesis; end; end; registration let R be empty Relation; let Y; cluster R"Y -> empty; coherence proof assume not thesis; then ex y st [the Element of {}"Y,y] in {} & y in Y by Def14; hence contradiction; end; end; canceled 2; theorem R"Y = {} iff rng R misses Y proof set x = the Element of R"Y; thus R"Y = {} implies rng R misses Y proof assume A1: R"Y = {}; assume not thesis; then consider y being set such that A2: y in rng R and A3: y in Y by XBOOLE_0:3; ex x st [x,y] in R by A2,XTUPLE_0:def 13; hence contradiction by A1,A2,A3,Th131; end; assume A4: rng R /\ Y = {}; assume not thesis; then ex y st y in rng R & [x,y] in R & y in Y by Th131; hence contradiction by A4,XBOOLE_0:def 4; end; theorem Y <> {} & Y c= rng R implies R"Y <> {} proof assume that A1: Y <> {} and A2: Y c= rng R; set y = the Element of Y; A3: y in rng R by A1,A2,TARSKI:def 3; then ex x st [x,y] in R by XTUPLE_0:def 13; hence thesis by A1,A3,Th131; end; theorem R"(X \/ Y) = R"X \/ R"Y proof thus R"(X \/ Y) c= R"X \/ R"Y proof let x; assume x in R"(X \/ Y); then consider y such that A1: [x,y] in R and A2: y in X \/ Y by Def14; y in X or y in Y by A2,XBOOLE_0:def 3; then x in R"X or x in R"Y by A1,Def14; hence x in R"X \/ R"Y by XBOOLE_0:def 3; end; let x; assume A3: x in R"X \/ R"Y; per cases by A3,XBOOLE_0:def 3; suppose x in R"Y; then consider y such that A4: [x,y] in R and A5: y in Y by Def14; y in X \/ Y by A5,XBOOLE_0:def 3; hence x in R"(X \/ Y) by A4,Def14; end; suppose x in R"X; then consider y such that A6: [x,y] in R and A7: y in X by Def14; y in X \/ Y by A7,XBOOLE_0:def 3; hence x in R"(X \/ Y) by A6,Def14; end; end; theorem R"(X /\ Y) c= R"X /\ R"Y proof let x; assume x in R"(X /\ Y); then consider y such that A1: [x,y] in R and A2: y in X /\ Y by Def14; y in Y by A2,XBOOLE_0:def 4; then A3: x in R"Y by A1,Def14; y in X by A2,XBOOLE_0:def 4; then x in R"X by A1,Def14; hence thesis by A3,XBOOLE_0:def 4; end; theorem R"X \ R"Y c= R"(X \ Y) proof let x; assume A1: x in R"X \ R"Y; then consider y such that A2: [x,y] in R and A3: y in X by Def14; not x in R"Y by A1,XBOOLE_0:def 5; then not y in Y or not [x,y] in R by Def14; then y in X \ Y by A2,A3,XBOOLE_0:def 5; hence thesis by A2,Def14; end; theorem Th143: X c= Y implies R"X c= R"Y proof assume A1: X c= Y; let x; assume x in R"X; then ex y st [x,y] in R & y in X by Def14; hence thesis by A1,Def14; end; theorem Th144: P c= R implies P"Y c= R"Y proof assume A1: P c= R; let x; assume x in P"Y; then ex y st [x,y] in P & y in Y by Def14; hence thesis by A1,Def14; end; theorem P c= R & X c= Y implies P"X c= R"Y proof assume P c= R & X c= Y; then P"X c= R"X & R"X c= R"Y by Th143,Th144; hence thesis by XBOOLE_1:1; end; theorem (P*R)"Y = P"(R"Y) proof x in (P*R)"Y iff x in P"(R"Y) proof thus x in (P*R)"Y implies x in P"(R"Y) proof assume x in (P*R)"Y; then consider y such that A1: [x,y] in P*R and A2: y in Y by Def14; consider z such that A3: [x,z] in P and A4: [z,y] in R by A1,Def8; z in R"Y by A2,A4,Def14; hence thesis by A3,Def14; end; assume x in P"(R"Y); then consider y such that A5: [x,y] in P and A6: y in R"Y by Def14; consider z such that A7: [y,z] in R and A8: z in Y by A6,Def14; [x,z] in P*R by A5,A7,Def8; hence thesis by A8,Def14; end; hence thesis by TARSKI:1; end; theorem Th147: dom(P*R) = P"(dom R) proof z in dom(P*R) iff z in P"(dom R) proof thus z in dom(P*R) implies z in P"(dom R) proof assume z in dom(P*R); then consider x such that A1: [z,x] in P*R by XTUPLE_0:def 12; consider y such that A2: [z,y] in P and A3: [y,x] in R by A1,Def8; y in dom R by A3,XTUPLE_0:def 12; hence thesis by A2,Def14; end; assume z in P"(dom R); then consider y such that A4: [z,y] in P and A5: y in dom R by Def14; consider x such that A6: [y,x] in R by A5,XTUPLE_0:def 12; [z,x] in P*R by A4,A6,Def8; hence thesis by XTUPLE_0:def 12; end; hence thesis by TARSKI:1; end; theorem (rng R) /\ Y c= (R~)"(R"Y) proof let y; assume A1: y in (rng R) /\ Y; then y in rng R by XBOOLE_0:def 4; then consider x such that A2: [x,y] in R by XTUPLE_0:def 13; A3: [y,x] in R~ by A2,Def7; y in Y by A1,XBOOLE_0:def 4; then x in R"Y by A2,Def14; hence thesis by A3,Def14; end; begin definition let R; attr R is empty-yielding means :Def15: rng R c= {{}}; end; theorem R is empty-yielding iff for X st X in rng R holds X = {} proof hereby assume R is empty-yielding; then rng R c= {{}} by Def15; hence for X st X in rng R holds X = {} by TARSKI:def 1; end; assume A1: for X st X in rng R holds X = {}; let Y; assume Y in rng R; then Y = {} by A1; hence thesis by TARSKI:def 1; end; theorem for f,g being Relation, A,B being set st f|A = g|A & f|B = g|B holds f|(A \/ B) = g|(A \/ B) proof let f,g be Relation, A,B be set; assume f|A = g|A & f|B = g|B; hence f|(A \/ B) = g|A \/ g|B by Th78 .= g|(A \/ B) by Th78; end; theorem for X being set, f,g being Relation st dom g c= X & g c= f holds g c= f|X proof let X be set, f,g be Relation; assume dom g c= X & g c= f; then g|dom g c= f|X by Th77; hence thesis; end; theorem for f being Relation, X being set st X misses dom f holds f|X = {} proof let f be Relation, X be set such that A1: X /\ dom f = {}; thus f|X = (f|dom f)|X .= f|({} qua set) by A1,Th71 .= {}; end; theorem for f,g being Relation, A,B being set st A c= B & f|B = g|B holds f|A = g|A proof let f,g be Relation, A,B be set; assume that A1: A c= B and A2: f|B = g|B; A3: A = B /\ A by A1,XBOOLE_1:28; hence f|A = (f|B)|A by Th71 .= g|A by A2,A3,Th71; end; theorem R|dom S = R|dom(S|dom R) proof thus R|dom S = R|dom R|dom S .= R|(dom S /\ dom R) by Th71 .= R|dom(S|dom R) by Th61; end; registration cluster empty -> empty-yielding for Relation; coherence proof let R be Relation; assume R is empty; then rng R = {}; hence rng R c= {{}} by XBOOLE_1:2; end; end; registration let R be empty-yielding Relation; let X be set; cluster R|X -> empty-yielding; coherence proof rng R c= {{}} & rng(R|X) c= rng R by Def15,Th70; hence rng(R|X) c= {{}} by XBOOLE_1:1; end; end; theorem R|X is non empty-yielding implies R is non empty-yielding; definition let R be Relation, x be set; func Im(R,x) equals R.:{x}; correctness; end; scheme ExtensionalityR { A, B() -> Relation, P[set,set] }: A() = B() provided A1: for a, b being set holds [a,b] in A() iff P[a,b] and A2: for a, b being set holds [a,b] in B() iff P[a,b] proof let y,z be set; hereby assume [y,z] in A(); then P[y,z] by A1; hence [y,z] in B() by A2; end; assume [y,z] in B(); then P[y,z] by A2; hence thesis by A1; end; theorem dom (R | (dom R \ X)) = dom R \ X proof thus dom (R | (dom R \ X)) = dom R /\ (dom R \ X) by Th61 .= (dom R /\ dom R) \ X by XBOOLE_1:49 .= dom R \ X; end; theorem R | X = R | (dom R /\ X) proof thus R | X = (R | dom R) | X .= R | (dom R /\ X) by Th71; end; theorem dom [:X,Y:] c= X proof let x; assume x in dom [:X,Y:]; then ex y st [x,y] in [:X,Y:] by XTUPLE_0:def 12; hence thesis by ZFMISC_1:87; end; theorem rng [:X,Y:] c= Y proof let x; assume x in rng [:X,Y:]; then ex y st [y,x] in [:X,Y:] by XTUPLE_0:def 13; hence thesis by ZFMISC_1:87; end; theorem X <> {} & Y <> {} implies dom [:X,Y:] = X & rng [:X,Y:] = Y proof assume X <> {}; then consider a such that A1: a in X by XBOOLE_0:def 1; assume Y <> {}; then consider b such that A2: b in Y by XBOOLE_0:def 1; A3: now let x; assume x in X; then [x,b] in [:X,Y:] by A2,ZFMISC_1:87; hence ex y st [x,y] in [:X,Y:]; end; (ex y st [x,y] in [:X,Y:]) implies x in X by ZFMISC_1:87; hence dom[:X,Y:] = X by A3,XTUPLE_0:def 12; A4: now let y; assume y in Y; then [a,y] in [:X,Y:] by A1,ZFMISC_1:87; hence ex x st [x,y] in [:X,Y:]; end; (ex x st [x,y] in [:X,Y:]) implies y in Y by ZFMISC_1:87; hence thesis by A4,XTUPLE_0:def 13; end; theorem dom R = {} & dom Q = {} implies R = Q proof assume that A1: dom R = {} and A2: dom Q = {}; R = {} by A1; hence thesis by A2; end; theorem rng R = {} & rng Q = {} implies R = Q proof assume that A1: rng R = {} and A2: rng Q = {}; R = {} by A1; hence thesis by A2; end; theorem dom R = dom Q implies dom(S*R) = dom (S*Q) proof assume A1: dom R = dom Q; thus dom(S*R) = S"dom R by Th147 .= dom (S*Q) by A1,Th147; end; theorem rng R = rng Q implies rng(R*S) = rng (Q*S) proof assume A1: rng R = rng Q; thus rng(R*S) = S.:rng R by Th127 .= rng (Q*S) by A1,Th127; end; definition let R be Relation, x be set; func Coim(R,x) equals R"{x}; coherence; end; registration let R be trivial Relation; cluster dom R -> trivial; coherence proof let x,y; assume x in dom R; then consider a such that A1: [x,a] in R by XTUPLE_0:def 12; assume y in dom R; then consider b such that A2: [y,b] in R by XTUPLE_0:def 12; [x,a] = [y,b] by A1,A2,ZFMISC_1:def 10; hence thesis by XTUPLE_0:1; end; end; registration let R be trivial Relation; cluster rng R -> trivial; coherence proof let x,y; assume x in rng R; then consider a such that A1: [a,x] in R by XTUPLE_0:def 13; assume y in rng R; then consider b such that A2: [b,y] in R by XTUPLE_0:def 13; [a,x] = [b,y] by A1,A2,ZFMISC_1:def 10; hence thesis by XTUPLE_0:1; end; end; theorem rng R c= dom (S|X) implies R*(S|X) = R*S proof assume A1: rng R c= dom (S|X); let a,b; R*(S|X) c= R*S by Th29,Th59; hence [a,b] in R*(S|X) implies [a,b] in R*S; assume [a,b] in R*S; then consider c such that A2: [a,c] in R and A3: [c,b] in S by Def8; c in rng R by A2,XTUPLE_0:def 13; then c in X by A1,Th57; then [c,b] in S|X by A3,Def11; hence thesis by A2,Def8; end; theorem Q|A = R|A implies Q.:A = R.:A proof assume Q|A = R|A; hence Q.:A = (R|A).:A by Th129 .= R.:A by Th129; end; definition let X,R; attr R is X-defined means :Def18: dom R c= X; attr R is X-valued means :Def19: rng R c= X; end; Lm1: {} is X-defined Y-valued proof thus dom{} c= X & rng{} c= Y by XBOOLE_1:2; end; registration let X,Y; cluster X-defined Y-valued for Relation; existence proof take {}; thus thesis by Lm1; end; end; theorem for D being set, R being D-valued Relation for y being set st y in rng R holds y in D proof let D be set, R be D-valued Relation; rng R c= D by Def19; hence thesis; end; registration let X,A; let R be A-valued Relation; cluster R|X -> A-valued; coherence proof rng(R|X) c= rng R & rng R c= A by Def19,Th70; hence rng(R|X) c= A by XBOOLE_1:1; end; end; registration let X,A; let R be A-defined Relation; cluster R|X -> A-defined X-defined; coherence proof dom(R|X) c= dom R & dom R c= A by Def18,Th60; hence dom(R|X) c= A by XBOOLE_1:1; thus dom(R|X) c= X by Th58; end; end; registration let X; cluster id X -> X-defined X-valued; coherence proof thus dom id X c= X & rng id X c= X; end; end; registration let A be set; let R be A-valued Relation, S be Relation; cluster S*R -> A-valued; coherence proof rng R c= A & rng(S*R) c= rng R by Def19,Th26; hence rng(S*R) c= A by XBOOLE_1:1; end; end; registration let A be set; let R be A-defined Relation, S be Relation; cluster R*S -> A-defined; coherence proof dom R c= A & dom(R*S) c= dom R by Def18,Th25; hence dom(R*S) c= A by XBOOLE_1:1; end; end; theorem x in X implies Im([:X,Y:],x) = Y proof assume A1: x in X; thus Im([:X,Y:],x) c= Y proof let y; assume y in Im([:X,Y:],x); then ex z st [z,y] in [:X,Y:] & z in {x} by Def13; hence y in Y by ZFMISC_1:87; end; let y; assume y in Y; then A2: [x,y] in [:X,Y:] by A1,ZFMISC_1:87; x in {x} by TARSKI:def 1; hence y in Im([:X,Y:],x) by A2,Def13; end; theorem Th169: [x,y] in R iff y in Im(R,x) proof thus [x,y] in R implies y in Im(R,x) proof x in {x} by TARSKI:def 1; hence thesis by Def13; end; assume y in Im(R,x); then ex z st [z,y] in R & z in {x} by Def13; hence [x,y] in R by TARSKI:def 1; end; theorem x in dom R iff Im(R,x) <> {} proof thus x in dom R implies Im(R,x) <> {} proof assume x in dom R; then ex y st [x,y] in R by XTUPLE_0:def 12; hence Im(R,x) <> {} by Th169; end; assume Im(R,x) <> {}; then consider y such that A1: y in Im(R,x) by XBOOLE_0:def 1; [x,y] in R by A1,Th169; hence x in dom R by XTUPLE_0:def 12; end; theorem {} is X-defined Y-valued by Lm1; registration cluster empty -> non-empty for Relation; coherence proof let R be Relation; assume R is empty; hence not {} in rng R; end; end; registration let X be set, R be X-defined Relation; cluster -> X-defined for Subset of R; coherence proof let S be Subset of R; A1: dom R c= X by Def18; dom S c= dom R by Th11; hence dom S c= X by A1,XBOOLE_1:1; end; end; registration let X be set, R be X-valued Relation; cluster -> X-valued for Subset of R; coherence proof let S be Subset of R; A1: rng R c= X by Def19; rng S c= rng R by Th11; hence rng S c= X by A1,XBOOLE_1:1; end; end; theorem X misses Y implies R|X|Y = {} proof assume X misses Y; then X /\ Y = {} by XBOOLE_0:def 7; hence R|X|Y = R|({} qua set) by Th71 .= {}; end; theorem field {[x,x]} = {x} proof thus field {[x,x]} = {x,x} by Th17 .= {x} by ENUMSET1:29; end; registration let X; let R be X-defined Relation; reduce R|X to R; reducibility proof dom R c= X by Def18; hence R|X = R by Th68; end; end; registration let Y; let R be Y-valued Relation; reduce Y|`R to R; reducibility proof rng R c= Y by Def19; hence Y|`R = R by Th94; end; end; theorem for R being X-defined Relation holds R = R|X; theorem for S being Relation, R being X-defined Relation st R c= S holds R c= S|X proof let S be Relation, R be X-defined Relation; R = R|X; hence thesis by Th76; end; theorem Th176: dom R c= X implies R \ (R|A) = R|(X\A) proof assume dom R c= X; hence R \ (R|A) = R|X \ R|A by Th68 .= R|(X\A) by Th80; end; theorem Th177: dom(R \ (R|A)) = dom R \ A proof R \ (R|A) = R|(dom R \ A) by Th176; hence dom(R \ (R|A)) = dom R /\ (dom R \ A) by Th61 .= (dom R /\ dom R) \ A by XBOOLE_1:49 .= dom R \ A; end; theorem dom R \ dom(R|A) = dom(R \ (R|A)) proof thus dom R \ dom(R|A) = dom R \ A /\ dom R by Th61 .= dom R \ A by XBOOLE_1:47 .= dom(R \ (R|A)) by Th177; end; theorem dom R misses dom S implies R misses S proof assume A1: dom R misses dom S; assume R meets S; then consider x such that A2:x in R and A3:x in S by XBOOLE_0:3; consider y,z such that A4:x = [y,z] by A2,Def1; y in dom R & y in dom S by A2,A3,A4,XTUPLE_0:def 12; hence contradiction by A1,XBOOLE_0:3; end; theorem rng R misses rng S implies R misses S proof assume A1:rng R misses rng S; assume R meets S; then consider x such that A2: x in R and A3: x in S by XBOOLE_0:3; consider y,z such that A4: x = [y,z] by A2,Def1; z in rng R & z in rng S by A2,A3,A4,XTUPLE_0:def 13; hence contradiction by A1,XBOOLE_0:3; end; theorem X c= Y implies (R \ R|Y)|X = {} proof assume A1: X c= Y; dom R /\ X c= X by XBOOLE_1:17; then A2: dom R /\ X c= Y by A1,XBOOLE_1:1; dom(R \ R|Y) = dom R \ Y by Th177; then dom((R \ R|Y)|X) =(dom R \ Y) /\ X by Th61 .= dom R /\ X \ Y by XBOOLE_1:49 .= {} by A2,XBOOLE_1:37; hence (R \ R|Y)|X = {}; end; theorem X c= Y implies for R being X-defined Relation holds R is Y-defined proof assume A1: X c= Y; let R be X-defined Relation; dom R c= X by Def18; hence dom R c= Y by A1,XBOOLE_1:1; end; theorem X c= Y implies for R being X-valued Relation holds R is Y-valued proof assume A1: X c= Y; let R be X-valued Relation; rng R c= X by Def19; hence rng R c= Y by A1,XBOOLE_1:1; end; theorem R c= S iff R c= S|dom R proof thus R c= S implies R c= S|dom R proof assume R c= S; then R|dom R c= S|dom R by Th76; hence thesis; end; S|dom R c= S by Th59; hence thesis by XBOOLE_1:1; end; theorem for R being X-defined Y-valued Relation holds R c= [:X,Y:] proof let R be X-defined Y-valued Relation; A1: R c= [:dom R,rng R:] by Th7; dom R c= X & rng R c= Y by Def18,Def19; then [:dom R,rng R:] c= [:X,Y:] by ZFMISC_1:96; hence thesis by A1,XBOOLE_1:1; end; theorem Th186: dom(X|`R) c= dom R proof X|`R c= R by Th86; hence thesis by Th11; end; registration let A,X; let R be A-defined Relation; cluster X|`R -> A-defined; coherence proof dom(X|`R) c= dom R & dom R c= A by Def18,Th186; hence dom(X|`R) c= A by XBOOLE_1:1; end; end; registration let X,A; let R be A-valued Relation; cluster X|`R -> A-valued X-valued; coherence proof rng(X|`R) c= rng R & rng R c= A by Def19,Th87; hence rng(X|`R) c= A by XBOOLE_1:1; thus rng(X|`R) c= X by Th85; end; end; registration let X be empty set; cluster -> empty for X-defined Relation; coherence proof let R be X-defined Relation; dom R c= X by Def18; hence thesis by XBOOLE_1:3; end; cluster -> empty for X-valued Relation; coherence proof let R be X-valued Relation; rng R c= X by Def19; hence thesis by XBOOLE_1:3; end; end; begin reserve X,X1,X2,Y,Y1,Y2,p,x,x1,x2,y,y1,y2,z,z1,z2 for set; definition let X be set; attr X is Function-like means :Def1: for x,y1,y2 st [x,y1] in X & [x,y2] in X holds y1 = y2; end; registration cluster empty -> Function-like for set; coherence proof let f be set; assume f is empty; hence for x,y1,y2 st [x,y1] in f & [x,y2] in f holds y1 = y2; end; end; registration cluster Function-like for Relation; existence proof take {}; thus thesis; end; end; definition mode Function is Function-like Relation; end; registration let a, b be set; cluster {[a,b]} -> Function-like; coherence proof set X = {[a, b]}; A1: [:{a},{b}:] = X by ZFMISC_1:29; for x,y1,y2 be set st [x,y1] in X & [x,y2] in X holds y1 = y2 proof let x,y1,y2 be set such that A2: [x,y1] in X and A3: [x,y2] in X; y1 = b by A1,A2,ZFMISC_1:28; hence thesis by A1,A3,ZFMISC_1:28; end; hence thesis by Def1; end; end; reserve f,g,g1,g2,h for Function, R,S for Relation; scheme GraphFunc { A()->set,P[set,set] } : ex f st for x,y holds [x,y] in f iff x in A() & P[x,y] provided A1: for x,y1,y2 st P[x,y1] & P[x,y2] holds y1 = y2 proof consider Y such that A2: for y holds y in Y iff ex x st x in A() & P[x,y] from TARSKI:sch 1(A1); defpred R[set] means ex x,y st [x,y] = $1 & P[x,y]; consider F being set such that A3: p in F iff p in [:A(),Y:] & R[p] from XBOOLE_0:sch 1; now thus p in F implies ex x,y st [x,y] = p proof p in F implies ex x,y st [x,y] = p & P[x,y] by A3; hence thesis; end; let x,y1,y2; assume [x,y1] in F; then consider x1,z1 such that A4: [x1,z1] = [x,y1] and A5: P[x1,z1] by A3; A6: x = x1 & z1 = y1 by A4,XTUPLE_0:1; assume [x,y2] in F; then consider x2,z2 such that A7: [x2,z2] = [x,y2] and A8: P[x2,z2] by A3; x = x2 & z2 = y2 by A7,XTUPLE_0:1; hence y1 = y2 by A1,A5,A8,A6; end; then reconsider f = F as Function by Def1,RELAT_1:def 1; take f; let x,y; thus [x,y] in f implies x in A() & P[x,y] proof assume A9: [x,y] in f; then consider x1,y1 such that A10: [x1,y1] = [x,y] and A11: P[x1,y1] by A3; [x,y] in [:A(),Y:] by A3,A9; hence x in A() by ZFMISC_1:87; x1 = x by A10,XTUPLE_0:1; hence thesis by A10,A11,XTUPLE_0:1; end; assume that A12: x in A() and A13: P[x,y]; y in Y by A2,A12,A13; then [x,y] in [:A(),Y:] by A12,ZFMISC_1:87; hence thesis by A3,A13; end; definition let f,x; func f.x -> set means :Def2: [x,it] in f if x in dom f otherwise it = {}; existence by XTUPLE_0:def 12; uniqueness by Def1; consistency; end; theorem Th1: [x,y] in f iff x in dom f & y = f.x proof thus [x,y] in f implies x in dom f & y = f.x proof assume A1: [x,y] in f; hence x in dom f by XTUPLE_0:def 12; hence thesis by A1,Def2; end; thus thesis by Def2; end; theorem Th2: dom f = dom g & (for x st x in dom f holds f.x = g.x) implies f = g proof assume that A1: dom f = dom g and A2: for x st x in dom f holds f.x = g.x; let x,y; thus [x,y] in f implies [x,y] in g proof assume A3: [x,y] in f; then A4: x in dom f by XTUPLE_0:def 12; then f.x = y by A3,Def2; then g.x = y by A2,A4; hence thesis by A1,A4,Def2; end; assume A5: [x,y] in g; then A6: x in dom g by XTUPLE_0:def 12; then g.x = y by A5,Def2; then f.x = y by A1,A2,A6; hence thesis by A1,A6,Def2; end; definition let f; redefine func rng f means :Def3: for y holds y in it iff ex x st x in dom f & y = f.x; compatibility proof let Y; hereby assume A1: Y = rng f; let y; hereby assume y in Y; then consider x such that A2: [x,y] in f by A1,XTUPLE_0:def 13; take x; thus x in dom f & y = f.x by A2,Th1; end; given x such that A3: x in dom f & y = f.x; [x,y] in f by A3,Def2; hence y in Y by A1,XTUPLE_0:def 13; end; assume A4: for y holds y in Y iff ex x st x in dom f & y = f.x; hereby let y; assume y in Y; then consider x such that A5: x in dom f & y = f.x by A4; [x,y] in f by A5,Def2; hence y in rng f by XTUPLE_0:def 13; end; let y; assume y in rng f; then consider x such that A6: [x,y] in f by XTUPLE_0:def 13; x in dom f & y = f.x by A6,Th1; hence thesis by A4; end; end; theorem x in dom f implies f.x in rng f by Def3; theorem Th4: dom f = {x} implies rng f = {f.x} proof assume A1: dom f = {x}; y in rng f iff y in {f.x} proof thus y in rng f implies y in {f.x} proof assume y in rng f; then consider z such that A2: z in dom f and A3: y = f.z by Def3; z = x by A1,A2,TARSKI:def 1; hence thesis by A3,TARSKI:def 1; end; assume y in {f.x}; then A4: y = f.x by TARSKI:def 1; x in dom f by A1,TARSKI:def 1; hence thesis by A4,Def3; end; hence thesis by TARSKI:1; end; scheme FuncEx { A()->set,P[set,set] } : ex f st dom f = A() & for x st x in A() holds P[x,f.x] provided A1: for x,y1,y2 st x in A() & P[x,y1] & P[x,y2] holds y1 = y2 and A2: for x st x in A() ex y st P[x,y] proof defpred R[set,set] means $1 in A() & P[$1,$2]; A3: for x,y1,y2 st R[x,y1] & R[x,y2] holds y1 = y2 by A1; consider f being Function such that A4: for x,y holds [x,y] in f iff x in A() & R[x,y] from GraphFunc(A3); take f; x in dom f iff x in A() proof thus x in dom f implies x in A() proof assume x in dom f; then ex y st [x,y] in f by XTUPLE_0:def 12; hence thesis by A4; end; assume A5: x in A(); then consider y such that A6: P[x,y] by A2; [x,y] in f by A4,A5,A6; hence thesis by XTUPLE_0:def 12; end; hence A7: dom f = A() by TARSKI:1; let x; assume A8: x in A(); then consider y such that A9: P[x,y] by A2; [x,y] in f by A4,A8,A9; hence thesis by A7,A8,A9,Def2; end; scheme Lambda { A() -> set,F(set) -> set } : ex f being Function st dom f = A() & for x st x in A() holds f.x = F(x) proof defpred P[set,set] means $2 = F($1); A1: for x st x in A() ex y st P[x,y]; A2: for x,y1,y2 st x in A() & P[x,y1] & P[x,y2] holds y1 = y2; thus ex f being Function st dom f = A() & for x st x in A() holds P[x,f.x] from FuncEx(A2,A1); end; theorem Th5: X <> {} implies for y ex f st dom f = X & rng f = {y} proof assume A1: X <> {}; let y; deffunc F(set) = y; consider f such that A2: dom f = X and A3: for x st x in X holds f.x = F(x) from Lambda; take f; thus dom f = X by A2; y1 in rng f iff y1 = y proof A4: now set x = the Element of X; assume A5: y1 = y; f.x = y by A1,A3; hence y1 in rng f by A1,A2,A5,Def3; end; now assume y1 in rng f; then ex x st x in dom f & y1 = f.x by Def3; hence y1 = y by A2,A3; end; hence thesis by A4; end; hence thesis by TARSKI:def 1; end; theorem (for f,g st dom f = X & dom g = X holds f = g) implies X = {} proof deffunc F(set) = {}; assume A1: for f,g st dom f = X & dom g = X holds f = g; set x = the Element of X; consider f being Function such that A2: dom f = X and A3: for x st x in X holds f.x = F(x) from Lambda; assume A4: not thesis; then A5: f.x = {} by A3; deffunc F(set) = 1; consider g being Function such that A6: dom g = X and A7: for x st x in X holds g.x = F(x) from Lambda; g.x = 1 by A4,A7; hence contradiction by A1,A2,A6,A5; end; theorem dom f = dom g & rng f = {y} & rng g = {y} implies f = g proof assume that A1: dom f = dom g and A2: rng f = {y} and A3: rng g = {y}; x in dom f implies f.x = g.x proof assume A4: x in dom f; then f.x in rng f by Def3; then A5: f.x = y by A2,TARSKI:def 1; g.x in rng g by A1,A4,Def3; hence thesis by A3,A5,TARSKI:def 1; end; hence thesis by A1,Th2; end; theorem Y <> {} or X = {} implies ex f st X = dom f & rng f c= Y proof assume A1: Y <> {} or X = {}; A2: now set y = the Element of Y; deffunc F(set) = y; consider f such that A3: dom f = X and A4: for x st x in X holds f.x = F(x) from Lambda; assume X <> {}; then A5: y in Y by A1; take f; thus dom f = X by A3; z in rng f implies z in Y proof assume z in rng f; then ex x st x in dom f & z = f.x by Def3; hence thesis by A5,A3,A4; end; hence rng f c= Y by TARSKI:def 3; end; now assume A6: X = {}; take f = {}; thus dom f = X by A6; thus rng f c= Y by XBOOLE_1:2; end; hence thesis by A2; end; theorem (for y st y in Y ex x st x in dom f & y = f.x) implies Y c= rng f proof assume A1: for y st y in Y ex x st x in dom f & y = f.x; let y; assume y in Y; then ex x st x in dom f & y = f.x by A1; hence thesis by Def3; end; notation let f,g; synonym g*f for f*g; end; registration let f,g; cluster g*f -> Function-like; coherence proof let x,y1,y2; assume [x,y1] in g*f; then consider z1 such that A1: [x,z1] in f and A2: [z1,y1] in g by RELAT_1:def 8; assume [x,y2] in g*f; then consider z2 such that A3: [x,z2] in f and A4: [z2,y2] in g by RELAT_1:def 8; z1 = z2 by A1,A3,Def1; hence thesis by A2,A4,Def1; end; end; theorem for h st (for x holds x in dom h iff x in dom f & f.x in dom g) & (for x st x in dom h holds h.x = g.(f.x)) holds h = g*f proof let h; assume that A1: for x holds x in dom h iff x in dom f & f.x in dom g and A2: for x st x in dom h holds h.x = g.(f.x); now let x,y; hereby assume A3: [x,y] in h; then A4: x in dom h by XTUPLE_0:def 12; then A5: f.x in dom g by A1; take y1 = f.x; x in dom f by A1,A4; hence [x,y1] in f by Def2; y = h.x by A3,A4,Def2 .= g.(f.x) by A2,A4; hence [y1,y] in g by A5,Def2; end; given z such that A6: [x,z] in f and A7: [z,y] in g; A8: x in dom f by A6,XTUPLE_0:def 12; then A9: z = f.x by A6,Def2; A10: z in dom g by A7,XTUPLE_0:def 12; then A11: x in dom h by A1,A8,A9; y = g.z by A7,A10,Def2; then y = h.x by A2,A9,A11; hence [x,y] in h by A11,Def2; end; hence thesis by RELAT_1:def 8; end; theorem Th11: x in dom(g*f) iff x in dom f & f.x in dom g proof set h = g*f; hereby assume x in dom h; then consider y such that A1: [x,y] in h by XTUPLE_0:def 12; consider z such that A2: [x,z] in f and A3: [z,y] in g by A1,RELAT_1:def 8; thus x in dom f by A2,XTUPLE_0:def 12; then z = f.x by A2,Def2; hence f.x in dom g by A3,XTUPLE_0:def 12; end; assume A4: x in dom f; then consider z such that A5: [x,z] in f by XTUPLE_0:def 12; assume f.x in dom g; then consider y such that A6: [f.x,y] in g by XTUPLE_0:def 12; z = f.x by A4,A5,Def2; then [x,y] in h by A5,A6,RELAT_1:def 8; hence thesis by XTUPLE_0:def 12; end; theorem Th12: x in dom(g*f) implies (g*f).x = g.(f.x) proof set h = g*f; assume A1: x in dom h; then consider y such that A2: [x,y] in h by XTUPLE_0:def 12; consider z such that A3: [x,z] in f and A4: [z,y] in g by A2,RELAT_1:def 8; x in dom f by A3,XTUPLE_0:def 12; then A5: z = f.x by A3,Def2; then f.x in dom g by A4,XTUPLE_0:def 12; then y = g.(f.x) by A4,A5,Def2; hence thesis by A1,A2,Def2; end; theorem Th13: x in dom f implies (g*f).x = g.(f.x) proof assume A1: x in dom f; per cases; suppose f.x in dom g; then x in dom(g*f) by A1,Th11; hence thesis by Th12; end; suppose A2: not f.x in dom g; then not x in dom(g*f) by Th11; hence (g*f).x = {} by Def2 .= g.(f.x) by A2,Def2; end; end; theorem z in rng(g*f) implies z in rng g proof assume z in rng(g*f); then consider x such that A1: x in dom(g*f) and A2: z = (g*f).x by Def3; f.x in dom g & (g*f).x = g.(f.x) by A1,Th11,Th12; hence thesis by A2,Def3; end; theorem Th15: dom(g*f) = dom f implies rng f c= dom g proof assume A1: dom(g*f) = dom f; let y; assume y in rng f; then ex x st x in dom f & y = f.x by Def3; hence thesis by A1,Th11; end; theorem rng f c= Y & (for g,h st dom g = Y & dom h = Y & g*f = h*f holds g = h ) implies Y = rng f proof assume that A1: rng f c= Y and A2: for g,h st dom g = Y & dom h = Y & g*f = h*f holds g = h; Y c= rng f proof deffunc F(set) = {}; let y; assume that A3: y in Y and A4: not y in rng f; defpred P[set,set] means ($1 = y implies $2 = 1) & ($1 <> y implies $2 = {}); A5: x in Y implies ex y1 st P[x,y1] proof assume x in Y; x = y implies thesis; hence thesis; end; A6: for x,y1,y2 st x in Y & P[x,y1] & P[x,y2] holds y1 = y2; consider h being Function such that A7: dom h = Y and A8: for x st x in Y holds P[x,h.x] from FuncEx(A6,A5); A9: dom(h*f) = dom f by A1,A7,RELAT_1:27; consider g being Function such that A10: dom g = Y and A11: x in Y implies g.x = F(x) from Lambda; A12: dom(g*f) = dom f by A1,A10,RELAT_1:27; x in dom f implies (g*f).x = (h*f).x proof assume A13: x in dom f; then f.x in rng f by Def3; then A14: g.(f.x) = {} & h.(f.x) = {} by A1,A4,A11,A8; (g*f).x = g.(f.x) by A12,A13,Th12; hence thesis by A9,A13,A14,Th12; end; then A15: g = h by A2,A10,A7,A12,A9,Th2; g.y = {} by A3,A11; hence contradiction by A3,A8,A15; end; hence thesis by A1,XBOOLE_0:def 10; end; registration let X; cluster id X -> Function-like; coherence proof let x,y1,y2; assume that A1: [x,y1] in id X and A2: [x,y2] in id X; x = y1 by A1,RELAT_1:def 10; hence thesis by A2,RELAT_1:def 10; end; end; theorem Th17: f = id X iff dom f = X & for x st x in X holds f.x = x proof hereby assume A1: f = id X; hence A2: dom f = X by RELAT_1:45; let x; assume A3: x in X; then [x,x] in f by A1,RELAT_1:def 10; hence f.x = x by A2,A3,Def2; end; assume that A4: dom f = X and A5: for x st x in X holds f.x = x; now let x,y; hereby assume A6: [x,y] in f; hence A7: x in X by A4,Th1; y = f.x by A6,Th1; hence x = y by A5,A7; end; assume A8: x in X; then f.x = x by A5; hence x = y implies [x,y] in f by A4,A8,Th1; end; hence thesis by RELAT_1:def 10; end; theorem x in X implies (id X).x = x by Th17; theorem Th19: dom(f*(id X)) = dom f /\ X proof x in dom(f*(id X)) iff x in dom f /\ X proof x in dom(f*(id X)) iff x in dom f & x in X proof thus x in dom(f*(id X)) implies x in dom f & x in X proof assume x in dom(f*(id X)); then A1: x in dom((id X)) & (id X).x in dom f by Th11; thus thesis by A1,Th17; end; assume A2: x in dom f; A3: dom((id X)) = X; assume A4: x in X; then (id X).x in dom f by A2,Th17; hence thesis by A4,A3,Th11; end; hence thesis by XBOOLE_0:def 4; end; hence thesis by TARSKI:1; end; theorem x in dom f /\ X implies f.x = (f*(id X)).x proof assume x in dom f /\ X; then x in X by XBOOLE_0:def 4; then (id X).x = x & x in dom id X by Th17; hence thesis by Th13; end; theorem x in dom((id Y)*f) iff x in dom f & f.x in Y proof dom((id Y)) = Y; hence thesis by Th11; end; theorem (id X)*(id Y) = id(X /\ Y) proof A1: dom((id X)*(id Y)) = dom((id X)) /\ Y by Th19 .= X /\ Y; A2: z in X /\ Y implies ((id X)*(id Y)).z = (id(X /\ Y)).z proof assume A3: z in X /\ Y; then A4: z in X by XBOOLE_0:def 4; A5: z in Y by A3,XBOOLE_0:def 4; thus ((id X)*(id Y)).z = (id X).((id Y).z) by A1,A3,Th12 .= (id X).z by A5,Th17 .= z by A4,Th17 .= (id(X /\ Y)).z by A3,Th17; end; X /\ Y = dom id(X /\ Y); hence thesis by A1,A2,Th2; end; theorem Th23: rng f = dom g & g*f = f implies g = id dom g proof assume that A1: rng f = dom g and A2: g*f = f; set X = dom g; x in X implies g.x = x proof assume x in X; then ex y st y in dom f & f.y = x by A1,Def3; hence thesis by A2,Th13; end; hence thesis by Th17; end; definition let f; attr f is one-to-one means :Def4: for x1,x2 st x1 in dom f & x2 in dom f & f.x1 = f.x2 holds x1 = x2; end; theorem Th24: f is one-to-one & g is one-to-one implies g*f is one-to-one proof assume that A1: f is one-to-one and A2: g is one-to-one; now let x1,x2; assume A3: x1 in dom(g*f) & x2 in dom(g*f); then A4: (g*f).x1 = g.(f.x1) & (g*f).x2 = g .(f.x2) by Th12; A5: x1 in dom f & x2 in dom f by A3,Th11; assume A6: (g*f).x1 = (g*f).x2; f.x1 in dom g & f.x2 in dom g by A3,Th11; then f.x1 = f.x2 by A2,A4,A6,Def4; hence x1 = x2 by A1,A5,Def4; end; hence thesis by Def4; end; theorem Th25: g*f is one-to-one & rng f c= dom g implies f is one-to-one proof assume that A1: g*f is one-to-one and A2: rng f c= dom g; now let x1,x2; assume that A3: x1 in dom f & x2 in dom f and A4: f.x1 =f.x2; A5: x1 in dom(g*f) & x2 in dom(g*f) by A2,A3,RELAT_1:27; (g*f).x1 = g.(f.x1) & (g*f).x2 = g.(f.x2) by A3,Th13; hence x1 = x2 by A1,A4,A5,Def4; end; hence thesis by Def4; end; theorem g*f is one-to-one & rng f = dom g implies f is one-to-one & g is one-to-one proof assume that A1: g*f is one-to-one and A2: rng f = dom g; A3: dom(g*f) = dom f by A2,RELAT_1:27; thus f is one-to-one by A1,A2,Th25; assume not g is one-to-one; then consider y1,y2 such that A4: y1 in dom g and A5: y2 in dom g and A6: g.y1 = g.y2 & y1 <> y2 by Def4; consider x2 such that A7: x2 in dom f and A8: f.x2 = y2 by A2,A5,Def3; A9: (g*f).x2 = g.(f.x2) by A7,Th13; consider x1 such that A10: x1 in dom f and A11: f.x1 = y1 by A2,A4,Def3; (g*f).x1 = g.(f.x1) by A10,Th13; hence contradiction by A1,A6,A10,A11,A7,A8,A3,A9,Def4; end; theorem f is one-to-one iff for g,h st rng g c= dom f & rng h c= dom f & dom g = dom h & f*g = f*h holds g = h proof thus f is one-to-one implies for g,h st rng g c=dom f & rng h c=dom f & dom g = dom h & f*g = f*h holds g = h proof assume A1: f is one-to-one; let g,h such that A2: rng g c= dom f & rng h c= dom f and A3: dom g = dom h and A4: f*g = f*h; x in dom g implies g.x = h.x proof assume A5: x in dom g; then A6: g.x in rng g & h.x in rng h by A3,Def3; (f*g).x = f.(g.x) & (f*h).x = f.(h.x) by A3,A5,Th13; hence thesis by A1,A2,A4,A6,Def4; end; hence thesis by A3,Th2; end; assume A7: for g,h st rng g c=dom f & rng h c=dom f & dom g = dom h & f*g = f* h holds g = h; x1 in dom f & x2 in dom f & f.x1 = f.x2 implies x1 = x2 proof assume that A8: x1 in dom f and A9: x2 in dom f and A10: f.x1 = f.x2; deffunc F(set) = x1; consider g being Function such that A11: dom g = {{}} and A12: for x st x in {{}} holds g.x = F(x) from Lambda; A13: {} in {{}} by TARSKI:def 1; then A14: g.{} = x1 by A12; then rng g = {x1} by A11,Th4; then A15: rng g c= dom f by A8,ZFMISC_1:31; then A16: dom(f*g) = dom g by RELAT_1:27; deffunc F(set) = x2; consider h being Function such that A17: dom h = {{}} and A18: for x st x in {{}} holds h.x = F(x) from Lambda; A19: h.{} = x2 by A18,A13; then rng h = {x2} by A17,Th4; then A20: rng h c= dom f by A9,ZFMISC_1:31; then A21: dom(f*h) = dom h by RELAT_1:27; x in dom(f*g) implies (f*g).x = (f*h).x proof assume A22: x in dom(f*g); then A23: g.x = x1 by A11,A12,A16; (f*g).x = f.(g.x) & (f*h).x = f.(h.x) by A11,A17,A16,A21,A22,Th12; hence thesis by A10,A11,A18,A16,A22,A23; end; hence thesis by A7,A11,A17,A14,A19,A15,A20,A16,A21,Th2; end; hence thesis by Def4; end; theorem dom f = X & dom g = X & rng g c= X & f is one-to-one & f*g = f implies g = id X proof assume that A1: dom f = X and A2: dom g = X and A3: rng g c= X & f is one-to-one and A4: f*g = f; x in X implies g.x = x proof assume A5: x in X; then g.x in rng g & f.x = f.(g.x) by A2,A4,Def3,Th13; hence thesis by A1,A3,A5,Def4; end; hence thesis by A2,Th17; end; theorem rng(g*f) = rng g & g is one-to-one implies dom g c= rng f proof assume that A1: rng(g*f) = rng g and A2: g is one-to-one; let y; assume A3: y in dom g; then g.y in rng(g*f) by A1,Def3; then consider x such that A4: x in dom(g*f) and A5: g.y = (g*f).x by Def3; (g*f).x = g.(f.x) & f.x in dom g by A4,Th11,Th12; then A6: y = f.x by A2,A3,A5,Def4; x in dom f by A4,Th11; hence thesis by A6,Def3; end; registration let X be set; cluster id X -> one-to-one; coherence proof let x1,x2; assume that A1: x1 in dom id X and A2: x2 in dom id X; x1 in X by A1; then A3: (id X).x1 = x1 by Th17; x2 in X by A2; hence thesis by A3,Th17; end; end; canceled; theorem (ex g st g*f = id dom f) implies f is one-to-one proof given g such that A1: g*f = id dom f; dom(g*f) = dom f by A1,RELAT_1:45; then rng f c= dom g by Th15; hence thesis by A1,Th25; end; registration cluster empty -> one-to-one for Function; coherence proof let f be Function; assume A1: f is empty; let x1,x2; thus thesis by A1; end; end; registration cluster one-to-one for Function; existence proof take {}; thus thesis; end; end; registration let f be one-to-one Function; cluster f~ -> Function-like; coherence proof let x,y1,y2; assume that A1: [x,y1] in f~ and A2: [x,y2] in f~; A3: [y2,x] in f by A2,RELAT_1:def 7; then A4: y2 in dom f by XTUPLE_0:def 12; then A5: x = f.y2 by A3,Def2; A6: [y1,x] in f by A1,RELAT_1:def 7; then A7: y1 in dom f by XTUPLE_0:def 12; then x = f.y1 by A6,Def2; hence thesis by A7,A4,A5,Def4; end; end; definition let f; assume A1: f is one-to-one; func f" -> Function equals :Def5: f~; coherence by A1; end; theorem Th32: f is one-to-one implies for g being Function holds g=f" iff dom g = rng f & for y,x holds y in rng f & x = g.y iff x in dom f & y = f.x proof assume A1: f is one-to-one; let g be Function; thus g = f" implies dom g = rng f & for y,x holds y in rng f & x = g.y iff x in dom f & y = f.x proof assume g = f"; then A2: g = f~ by A1,Def5; hence dom g = rng f by RELAT_1:20; let y,x; thus y in rng f & x = g.y implies x in dom f & y = f.x proof assume that A3: y in rng f and A4: x = g.y; y in dom g by A2,A3,RELAT_1:20; then [y,x] in g by A4,Def2; then A5: [x,y] in f by A2,RELAT_1:def 7; hence x in dom f by XTUPLE_0:def 12; hence thesis by A5,Def2; end; assume x in dom f & y = f.x; then A6: [x,y] in f by Def2; hence y in rng f by XTUPLE_0:def 13; then A7: y in dom g by A2,RELAT_1:20; [y,x] in g by A2,A6,RELAT_1:def 7; hence thesis by A7,Def2; end; assume that A8: dom g = rng f and A9: for y,x holds y in rng f & x = g.y iff x in dom f & y = f.x; let a,b be set; thus [a,b] in g implies [a,b] in f" proof assume A10: [a,b] in g; then A11: a in dom g by XTUPLE_0:def 12; then b = g.a by A10,Def2; then b in dom f & a = f.b by A8,A9,A11; then [b,a] in f by Def2; then [a,b] in f~ by RELAT_1:def 7; hence thesis by A1,Def5; end; assume [a,b] in f"; then [a,b] in f~ by A1,Def5; then A12: [b,a] in f by RELAT_1:def 7; then A13: b in dom f by XTUPLE_0:def 12; then a = f.b by A12,Def2; then a in rng f & b = g.a by A9,A13; hence thesis by A8,Def2; end; theorem Th33: f is one-to-one implies rng f = dom(f") & dom f = rng(f") proof assume f is one-to-one; then f" = f~ by Def5; hence thesis by RELAT_1:20; end; theorem Th34: f is one-to-one & x in dom f implies x = (f").(f.x) & x = (f"*f) .x proof assume A1: f is one-to-one; assume A2: x in dom f; hence x = (f").(f.x) by A1,Th32; hence thesis by A2,Th13; end; theorem Th35: f is one-to-one & y in rng f implies y = f.((f").y) & y = (f*f") .y proof assume A1: f is one-to-one; assume A2: y in rng f; hence A3: y = f.((f").y) by A1,Th32; rng f = dom(f") by A1,Th33; hence thesis by A2,A3,Th13; end; theorem Th36: f is one-to-one implies dom(f"*f) = dom f & rng(f"*f) = dom f proof assume A1: f is one-to-one; then A2: rng f = dom(f") by Th33; then rng(f"*f) = rng(f") by RELAT_1:28; hence thesis by A1,A2,Th33,RELAT_1:27; end; theorem Th37: f is one-to-one implies dom(f*f") = rng f & rng(f*f") = rng f proof assume A1: f is one-to-one; then A2: rng(f") = dom f by Th33; then dom(f*f") = dom(f") by RELAT_1:27; hence thesis by A1,A2,Th33,RELAT_1:28; end; theorem f is one-to-one & dom f = rng g & rng f = dom g & (for x,y st x in dom f & y in dom g holds f.x = y iff g.y = x) implies g = f" proof assume that A1: f is one-to-one and A2: dom f = rng g and A3: rng f = dom g and A4: for x,y st x in dom f & y in dom g holds f.x = y iff g.y = x; A5: y in dom g implies g.y = (f").y proof assume A6: y in dom g; then A7: g.y in dom f by A2,Def3; then f.(g.y) = y by A4,A6; hence thesis by A1,A7,Th32; end; rng f = dom(f") by A1,Th32; hence thesis by A3,A5,Th2; end; theorem Th39: f is one-to-one implies f"*f = id dom f & f*f" = id rng f proof assume A1: f is one-to-one; A2: x in dom(f"*f) implies (f"*f).x = x proof assume x in dom(f"*f); then x in dom f by A1,Th36; hence thesis by A1,Th34; end; A3: x in dom(f*f") implies (f*f").x = x proof assume x in dom(f*f"); then x in rng f by A1,Th37; hence thesis by A1,Th35; end; dom(f"*f) = dom f by A1,Th36; hence f"*f = id dom f by A2,Th17; dom(f*f") = rng f by A1,Th37; hence thesis by A3,Th17; end; theorem Th40: f is one-to-one implies f" is one-to-one proof assume A1: f is one-to-one; let y1,y2; assume that A2: y1 in dom(f") and A3: y2 in dom(f"); y1 in rng f by A1,A2,Th32; then A4: y1 = f.((f").y1) by A1,Th35; y2 in rng f by A1,A3,Th32; hence thesis by A1,A4,Th35; end; registration let f be one-to-one Function; cluster f" -> one-to-one; coherence by Th40; let g be one-to-one Function; cluster g*f -> one-to-one; coherence by Th24; end; Lm1: rng(g2) = X & f*g2 = id dom g1 & g1*f = id X implies g1 = g2 proof A1: g1*(f*g2) = (g1*f)*g2 & g1*(id dom g1) = g1 by RELAT_1:36,51; assume rng(g2) = X & f*g2 = id dom g1 & g1*f = id X; hence thesis by A1,RELAT_1:53; end; theorem Th41: f is one-to-one & rng f = dom g & g*f = id dom f implies g = f" proof assume that A1: f is one-to-one and A2: rng f = dom g & g*f = id dom f; f*f" = id rng f & rng(f") = dom f by A1,Th33,Th39; hence thesis by A2,Lm1; end; theorem f is one-to-one & rng g = dom f & f*g = id rng f implies g = f" proof assume that A1: f is one-to-one and A2: rng g = dom f & f*g = id rng f; f"*f = id dom f & dom(f") = rng f by A1,Th33,Th39; hence thesis by A2,Lm1; end; theorem f is one-to-one implies (f")" = f proof assume A1: f is one-to-one; then rng f = dom(f") by Th33; then A2: f*f" = id dom(f") by A1,Th39; dom f = rng(f") by A1,Th33; hence thesis by A1,A2,Th41; end; theorem f is one-to-one & g is one-to-one implies (g*f)" = f"*g" proof assume that A1: f is one-to-one and A2: g is one-to-one; y in rng(g*f) iff y in dom(f"*g") proof thus y in rng(g*f) implies y in dom(f"*g") proof assume y in rng(g*f); then consider x such that A3: x in dom(g*f) and A4: y = (g*f).x by Def3; A5: f.x in dom g by A3,Th11; A6: y = g.(f.x) by A3,A4,Th12; then y in rng g by A5,Def3; then A7: y in dom(g") by A2,Th32; A8: x in dom f by A3,Th11; (g").(g.(f.x)) = (g"*g).(f.x) by A5,Th13 .= (id dom g).(f.x) by A2,Th39 .= f.x by A5,Th17; then (g").y in rng f by A8,A6,Def3; then (g").y in dom(f") by A1,Th32; hence thesis by A7,Th11; end; assume A9: y in dom(f"*g"); then y in dom(g") by Th11; then y in rng g by A2,Th32; then consider z such that A10: z in dom g and A11: y = g.z by Def3; (g").y in dom(f") by A9,Th11; then (g").(g.z) in rng f by A1,A11,Th32; then (g"*g).z in rng f by A10,Th13; then (id dom g).z in rng f by A2,Th39; then z in rng f by A10,Th17; then consider x such that A12: x in dom f & z = f.x by Def3; x in dom(g*f) & y = (g*f).x by A10,A11,A12,Th11,Th13; hence thesis by Def3; end; then A13: rng(g*f) = dom(f"*g") by TARSKI:1; x in dom((f"*g")*(g*f)) iff x in dom(g*f) proof thus x in dom((f"*g")*(g*f)) implies x in dom(g*f) by Th11; assume A14: x in dom(g*f); then (g*f).x in rng(g*f) by Def3; hence thesis by A13,A14,Th11; end; then A15: dom((f"*g")*(g*f)) = dom(g*f) by TARSKI:1; x in dom(g*f) implies ((f"*g")*(g*f)).x = x proof assume A16: x in dom(g*f); then A17: f.x in dom g by Th11; (g*f).x in rng(g*f) by A16,Def3; then A18: g.(f.x) in dom(f"*g") by A13,A16,Th12; A19: x in dom f by A16,Th11; thus ((f"*g")*(g*f)).x = (f"*g").((g*f).x) by A15,A16,Th12 .= (f"*g").(g.(f.x)) by A16,Th12 .= (f").((g").(g.(f.x))) by A18,Th12 .= (f").((g"*g).(f.x)) by A17,Th13 .= (f").((id dom g).(f.x)) by A2,Th39 .= (f").(f.x) by A17,Th17 .= x by A1,A19,Th34; end; then (f"*g")*(g*f) = id dom(g*f) by A15,Th17; hence thesis by A1,A2,A13,Th41; end; theorem (id X)" = id X proof dom id X = X; then A1: (id X)"*(id X) = id X by Th39; dom((id X)") = rng id X & rng id X = X by Th33; hence thesis by A1,Th23; end; registration let f,X; cluster f|X -> Function-like; coherence proof let x,y1,y2; assume [x,y1] in f|X & [x,y2] in f|X; then [x,y1] in f & [x,y2] in f by RELAT_1:def 11; hence thesis by Def1; end; end; theorem dom g = dom f /\ X & (for x st x in dom g holds g.x = f.x) implies g = f|X proof assume that A1: dom g = dom f /\ X and A2: for x st x in dom g holds g.x = f.x; now let x,y; hereby assume A3: [x,y] in g; then A4: x in dom g by XTUPLE_0:def 12; hence x in X by A1,XBOOLE_0:def 4; A5: x in dom f by A1,A4,XBOOLE_0:def 4; y = g.x by A3,A4,Def2 .= f.x by A2,A4; hence [x,y] in f by A5,Def2; end; assume A6: x in X; assume A7: [x,y] in f; then A8: x in dom f by XTUPLE_0:def 12; then A9: x in dom g by A1,A6,XBOOLE_0:def 4; y = f.x by A7,A8,Def2 .= g.x by A2,A9; hence [x,y] in g by A9,Def2; end; hence thesis by RELAT_1:def 11; end; theorem Th47: x in dom(f|X) implies (f|X).x = f.x proof set g = f|X; assume A1: x in dom g; dom g = dom f /\ X by RELAT_1:61; then A2: x in dom f by A1,XBOOLE_0:def 4; g c= f & [x,g.x] in g by A1,Def2,RELAT_1:59; hence g.x = f.x by A2,Def2; end; theorem Th48: x in dom f /\ X implies (f|X).x = f.x proof assume x in dom f /\ X; then x in dom(f|X) by RELAT_1:61; hence thesis by Th47; end; theorem Th49: x in X implies (f|X).x = f.x proof assume A1: x in X; per cases; suppose x in dom f; then x in dom(f|X) by A1,RELAT_1:57; hence thesis by Th47; end; suppose A2: not x in dom f; then not x in dom(f|X) by RELAT_1:57; hence (f|X).x = {} by Def2 .= f.x by A2,Def2; end; end; theorem x in dom f & x in X implies f.x in rng(f|X) proof assume that A1: x in dom f and A2: x in X; x in dom f /\ X by A1,A2,XBOOLE_0:def 4; then A3: x in dom(f|X) by RELAT_1:61; (f|X).x = f.x by A2,Th49; hence thesis by A3,Def3; end; theorem X c= Y implies (f|X)|Y = f|X & (f|Y)|X = f|X by RELAT_1:73,74; theorem f is one-to-one implies f|X is one-to-one proof assume A1: f is one-to-one; let x1,x2; assume that A2: x1 in dom(f|X) and A3: x2 in dom(f|X); x1 in dom f /\ X by A2,RELAT_1:61; then A4: x1 in dom f by XBOOLE_0:def 4; x2 in dom f /\ X by A3,RELAT_1:61; then A5: x2 in dom f by XBOOLE_0:def 4; (f|X).x1 = f.x1 & (f|X).x2 = f.x2 by A2,A3,Th47; hence thesis by A1,A4,A5,Def4; end; registration let Y,f; cluster Y|`f -> Function-like; coherence proof let x,y1,y2; assume [x,y1] in Y|`f & [x,y2] in Y|`f; then [x,y1] in f & [x,y2] in f by RELAT_1:def 12; hence thesis by Def1; end; end; theorem Th53: g = Y|`f iff (for x holds x in dom g iff x in dom f & f.x in Y) & for x st x in dom g holds g.x = f.x proof hereby assume A1: g = Y|`f; hereby let x; hereby assume x in dom g; then A2: [x,g.x] in g by Def2; then A3: [x,g.x] in f by A1,RELAT_1:def 12; hence x in dom f by XTUPLE_0:def 12; then f.x = g.x by A3,Def2; hence f.x in Y by A1,A2,RELAT_1:def 12; end; assume x in dom f; then A4: [x,f.x] in f by Def2; assume f.x in Y; then [x,f.x] in g by A1,A4,RELAT_1:def 12; hence x in dom g by XTUPLE_0:def 12; end; let x; assume x in dom g; then [x,g.x] in g by Def2; then A5: [x,g.x] in f by A1,RELAT_1:def 12; then x in dom f by XTUPLE_0:def 12; hence f.x = g.x by A5,Def2; end; assume that A6: for x holds x in dom g iff x in dom f & f.x in Y and A7: for x st x in dom g holds g.x = f.x; now let x,y; hereby assume A8: [x,y] in g; then A9: x in dom g by XTUPLE_0:def 12; then A10: y = g.x by A8,Def2 .= f.x by A7,A9; hence y in Y by A6,A9; x in dom f by A6,A9; hence [x,y] in f by A10,Def2; end; assume A11: y in Y; assume A12: [x,y] in f; then A13: y = f.x by Th1; x in dom f by A12,XTUPLE_0:def 12; then A14: x in dom g by A6,A11,A13; then y = g.x by A7,A13; hence [x,y] in g by A14,Def2; end; hence thesis by RELAT_1:def 12; end; theorem x in dom(Y|`f) iff x in dom f & f.x in Y by Th53; theorem x in dom(Y|`f) implies (Y|`f).x = f.x by Th53; theorem dom(Y|`f) c= dom f proof let x; thus thesis by Th53; end; theorem X c= Y implies Y|`(X|`f) = X|`f & X|`(Y|`f) = X|`f by RELAT_1:98,99; theorem f is one-to-one implies Y|`f is one-to-one proof assume A1: f is one-to-one; let x1,x2 such that A2: x1 in dom(Y|`f) & x2 in dom(Y|`f) and A3: (Y|`f).x1 = (Y|`f).x2; A4: x1 in dom f & x2 in dom f by A2,Th53; (Y|`f).x1 = f.x1 & (Y|`f).x2 = f.x2 by A2,Th53; hence thesis by A1,A3,A4,Def4; end; definition let f,X; redefine func f.:X means :Def6: for y holds y in it iff ex x st x in dom f & x in X & y = f.x; compatibility proof let Y; hereby assume A1: Y = f.:X; let y; hereby assume y in Y; then consider x such that A2: [x,y] in f and A3: x in X by A1,RELAT_1:def 13; take x; thus A4: x in dom f by A2,XTUPLE_0:def 12; thus x in X by A3; thus y = f.x by A2,A4,Def2; end; given x such that A5: x in dom f and A6: x in X and A7: y = f.x; [x,y] in f by A5,A7,Def2; hence y in Y by A1,A6,RELAT_1:def 13; end; assume A8: for y holds y in Y iff ex x st x in dom f & x in X & y = f.x; now let y; hereby assume y in Y; then consider x such that A9: x in dom f and A10: x in X and A11: y = f.x by A8; take x; thus [x,y] in f by A9,A11,Def2; thus x in X by A10; end; given x such that A12: [x,y] in f and A13: x in X; x in dom f & y = f.x by A12,Th1; hence y in Y by A8,A13; end; hence thesis by RELAT_1:def 13; end; end; theorem Th59: x in dom f implies Im(f,x) = {f.x} proof assume A1: x in dom f; y in f.:{x} iff y in {f.x} proof thus y in f.:{x} implies y in {f.x} proof assume y in f.:{x}; then consider z such that z in dom f and A2: z in {x} and A3: y = f.z by Def6; z = x by A2,TARSKI:def 1; hence thesis by A3,TARSKI:def 1; end; assume y in {f.x}; then A4: y = f.x by TARSKI:def 1; x in {x} by TARSKI:def 1; hence thesis by A1,A4,Def6; end; hence thesis by TARSKI:1; end; theorem x1 in dom f & x2 in dom f implies f.:{x1,x2} = {f.x1,f.x2} proof assume A1: x1 in dom f & x2 in dom f; y in f.:{x1,x2} iff y = f.x1 or y = f.x2 proof A2: x1 in {x1,x2} & x2 in {x1,x2} by TARSKI:def 2; thus y in f.:{x1,x2} implies y = f.x1 or y = f.x2 proof assume y in f.:{x1,x2}; then ex x st x in dom f & x in {x1,x2} & y = f.x by Def6; hence thesis by TARSKI:def 2; end; assume y = f.x1 or y = f.x2; hence thesis by A1,A2,Def6; end; hence thesis by TARSKI:def 2; end; theorem (Y|`f).:X c= f.:X proof let y; assume y in (Y|`f).:X; then consider x such that A1: x in dom(Y|`f) and A2: x in X and A3: y = (Y|`f).x by Def6; y = f.x & x in dom f by A1,A3,Th53; hence thesis by A2,Def6; end; theorem Th62: f is one-to-one implies f.:(X1 /\ X2) = f.:X1 /\ f.:X2 proof assume A1: f is one-to-one; A2: f.:X1 /\ f.:X2 c= f.:(X1 /\ X2) proof let y; assume A3: y in f.:X1 /\ f.:X2; then y in f.:X1 by XBOOLE_0:def 4; then consider x1 such that A4: x1 in dom f and A5: x1 in X1 and A6: y = f.x1 by Def6; y in f.:X2 by A3,XBOOLE_0:def 4; then consider x2 such that A7: x2 in dom f and A8: x2 in X2 and A9: y = f.x2 by Def6; x1 = x2 by A1,A4,A6,A7,A9,Def4; then x1 in X1 /\ X2 by A5,A8,XBOOLE_0:def 4; hence thesis by A4,A6,Def6; end; f.:(X1 /\ X2)c=f.:X1 /\ f.:X2 by RELAT_1:121; hence thesis by A2,XBOOLE_0:def 10; end; theorem (for X1,X2 holds f.:(X1 /\ X2) = f.:X1 /\ f.:X2) implies f is one-to-one proof assume A1: for X1,X2 holds f.:(X1 /\ X2) = f.:X1 /\ f.:X2; given x1,x2 such that A2: x1 in dom f & x2 in dom f and A3: f.x1 = f.x2 and A4: x1 <> x2; A5: f.:({x1}/\{x2}) = f.:{x1}/\f.: {x2} by A1; {x1} misses {x2} by A4,ZFMISC_1:11; then A6: {x1} /\ {x2} = {} by XBOOLE_0:def 7; Im(f,x1) = {f.x1} & Im(f,x2) = {f.x2} by A2,Th59; hence contradiction by A3,A6,A5; end; theorem f is one-to-one implies f.:(X1 \ X2) = f.:X1 \ f.:X2 proof assume A1: f is one-to-one; A2: f.:(X1 \ X2) c= f.:X1 \ f.:X2 proof let y; assume y in f.:(X1\X2); then consider x such that A3: x in dom f and A4: x in X1\X2 and A5: y = f.x by Def6; A6: not x in X2 by A4,XBOOLE_0:def 5; A7: now assume y in f.:X2; then ex z st z in dom f & z in X2 & y = f.z by Def6; hence contradiction by A1,A3,A5,A6,Def4; end; y in f.:X1 by A3,A4,A5,Def6; hence thesis by A7,XBOOLE_0:def 5; end; f.:X1 \ f.: X2 c= f.:(X1 \ X2) by RELAT_1:122; hence thesis by A2,XBOOLE_0:def 10; end; theorem (for X1,X2 holds f.:(X1 \ X2) = f.:X1 \ f.:X2) implies f is one-to-one proof assume A1: for X1,X2 holds f.:(X1 \ X2) = f.:X1 \ f.:X2; given x1,x2 such that A2: x1 in dom f & x2 in dom f and A3: f.x1 = f.x2 and A4: x1 <> x2; A5: f.:({x1}\{x2}) = f.:{x1} by A4,ZFMISC_1:14; A6: f.:({x1}\{x2}) = f.:{x1}\f.:{x2} by A1; Im(f,x1) = {f.x1} & Im(f,x2) = {f.x2} by A2,Th59; hence contradiction by A3,A5,A6,XBOOLE_1:37; end; theorem X misses Y & f is one-to-one implies f.:X misses f.:Y proof assume X /\ Y = {} & f is one-to-one; then f.:(X /\ Y) = {} & f.:(X /\ Y) = f.:X /\ f.:Y by Th62; hence thesis by XBOOLE_0:def 7; end; theorem (Y|`f).:X = Y /\ f.:X proof y in (Y|`f).:X iff y in Y /\ f.:X proof thus y in (Y|`f).:X implies y in Y /\ f.:X proof assume y in (Y|`f).:X; then consider x such that A1: x in dom(Y|`f) and A2: x in X and A3: y = (Y|`f).x by Def6; A4: y = f.x by A1,A3,Th53; then A5: y in Y by A1,Th53; x in dom f by A1,Th53; then y in f.:X by A2,A4,Def6; hence thesis by A5,XBOOLE_0:def 4; end; assume A6: y in Y /\ f.:X; then y in f.:X by XBOOLE_0:def 4; then consider x such that A7: x in dom f and A8: x in X and A9: y = f.x by Def6; y in Y by A6,XBOOLE_0:def 4; then A10: x in dom(Y|`f) by A7,A9,Th53; then (Y|`f).x = f.x by Th53; hence thesis by A8,A9,A10,Def6; end; hence thesis by TARSKI:1; end; definition let f,Y; redefine func f"Y means :Def7: for x holds x in it iff x in dom f & f.x in Y; compatibility proof let X; hereby assume A1: X = f"Y; let x; hereby assume x in X; then A2: ex y st [x,y] in f & y in Y by A1,RELAT_1:def 14; hence x in dom f by XTUPLE_0:def 12; thus f.x in Y by A2,Th1; end; assume that A3: x in dom f and A4: f.x in Y; [x,f.x] in f by A3,Th1; hence x in X by A1,A4,RELAT_1:def 14; end; assume A5: for x holds x in X iff x in dom f & f.x in Y; now let x; hereby assume A6: x in X; take y = f.x; x in dom f by A5,A6; hence [x,y] in f by Def2; thus y in Y by A5,A6; end; given y such that A7: [x,y] in f and A8: y in Y; x in dom f & y = f.x by A7,Th1; hence x in X by A5,A8; end; hence thesis by RELAT_1:def 14; end; end; theorem Th68: f"(Y1 /\ Y2) = f"Y1 /\ f"Y2 proof x in f"(Y1 /\ Y2) iff x in f"Y1 /\ f"Y2 proof A1: x in f"Y2 iff f.x in Y2 & x in dom f by Def7; A2: x in f"(Y1 /\ Y2) iff f.x in Y1 /\ Y2 & x in dom f by Def7; x in f"Y1 iff f.x in Y1 & x in dom f by Def7; hence thesis by A1,A2,XBOOLE_0:def 4; end; hence thesis by TARSKI:1; end; theorem f"(Y1 \ Y2) = f"Y1 \ f"Y2 proof x in f"(Y1 \ Y2) iff x in f"Y1 \ f"Y2 proof A1: x in f"Y2 iff f.x in Y2 & x in dom f by Def7; A2: x in f"(Y1 \ Y2) iff f.x in Y1 \ Y2 & x in dom f by Def7; x in f"Y1 iff f.x in Y1 & x in dom f by Def7; hence thesis by A1,A2,XBOOLE_0:def 5; end; hence thesis by TARSKI:1; end; theorem (R|X)"Y = X /\ (R"Y) proof hereby let x; assume x in (R|X)"Y; then A1: ex y st [x,y] in R|X & y in Y by RELAT_1:def 14; then A2: x in X by RELAT_1:def 11; R|X c= R by RELAT_1:59; then x in R"Y by A1,RELAT_1:def 14; hence x in X /\ (R"Y) by A2,XBOOLE_0:def 4; end; let x; assume A3: x in X /\ (R"Y); then x in R"Y by XBOOLE_0:def 4; then consider y such that A4: [x,y] in R and A5: y in Y by RELAT_1:def 14; x in X by A3,XBOOLE_0:def 4; then [x,y] in R|X by A4,RELAT_1:def 11; hence thesis by A5,RELAT_1:def 14; end; theorem for f being Function, A,B being set st A misses B holds f"A misses f"B proof let f be Function, A,B be set; assume A misses B; then A /\ B = {} by XBOOLE_0:def 7; then {} = f"(A /\ B) .= f"A /\ f"B by Th68; hence thesis by XBOOLE_0:def 7; end; theorem Th72: y in rng R iff R"{y} <> {} proof thus y in rng R implies R"{y} <> {} proof assume y in rng R; then A1: ex x st [x,y] in R by XTUPLE_0:def 13; y in {y} by TARSKI:def 1; hence thesis by A1,RELAT_1:def 14; end; assume R"{y} <> {}; then consider x such that A2: x in R"{y} by XBOOLE_0:def 1; consider z such that A3: [x,z] in R and A4: z in {y} by A2,RELAT_1:def 14; z = y by A4,TARSKI:def 1; hence thesis by A3,XTUPLE_0:def 13; end; theorem (for y st y in Y holds R"{y} <> {}) implies Y c= rng R proof assume A1: for y st y in Y holds R"{y} <> {}; let y; assume y in Y; then R"{y} <> {} by A1; hence thesis by Th72; end; theorem Th74: (for y st y in rng f ex x st f"{y} = {x}) iff f is one-to-one proof thus (for y st y in rng f ex x st f"{y} = {x}) implies f is one-to-one proof assume A1: for y st y in rng f ex x st f"{y} = {x}; let x1,x2; assume that A2: x1 in dom f and A3: x2 in dom f; f.x1 in rng f by A2,Def3; then consider y1 such that A4: f"{f.x1} = {y1} by A1; f.x2 in rng f by A3,Def3; then consider y2 such that A5: f"{f.x2} = {y2} by A1; f.x1 in {f.x1} by TARSKI:def 1; then x1 in {y1} by A2,A4,Def7; then A6: y1 = x1 by TARSKI:def 1; f.x2 in {f.x2} by TARSKI:def 1; then x2 in {y2} by A3,A5,Def7; hence thesis by A4,A5,A6,TARSKI:def 1; end; assume A7: f is one-to-one; let y; assume y in rng f; then consider x such that A8: x in dom f & y = f.x by Def3; take x; z in f"{y} iff z = x proof thus z in f"{y} implies z = x proof assume A9: z in f"{y}; then f.z in {y} by Def7; then A10: f.z = y by TARSKI:def 1; z in dom f by A9,Def7; hence thesis by A7,A8,A10,Def4; end; y in {y} by TARSKI:def 1; hence thesis by A8,Def7; end; hence thesis by TARSKI:def 1; end; theorem Th75: f.:(f"Y) c= Y proof let y; assume y in f.:(f"Y); then ex x st x in dom f & x in f"Y & y = f.x by Def6; hence thesis by Def7; end; theorem Th76: X c= dom R implies X c= R"(R.:X) proof assume A1: X c= dom R; let x; assume A2: x in X; then consider Rx being set such that A3: [x,Rx] in R by A1,XTUPLE_0:def 12; Rx in R.:X by A2,A3,RELAT_1:def 13; hence thesis by A3,RELAT_1:def 14; end; theorem Y c= rng f implies f.:(f"Y) = Y proof assume A1: Y c= rng f; thus f.:(f"Y) c= Y by Th75; let y; assume A2: y in Y; then consider x such that A3: x in dom f & y = f.x by A1,Def3; x in f"Y by A2,A3,Def7; hence thesis by A3,Def6; end; theorem f.:(f"Y) = Y /\ f.:(dom f) proof f.:(f"Y) c= Y & f.:(f"(Y)) c= f.:(dom f) by Th75,RELAT_1:114; hence f.:(f"Y) c= Y /\ f.:(dom f) by XBOOLE_1:19; let y; assume A1: y in Y /\ f.:(dom f); then y in f.:(dom f) by XBOOLE_0:def 4; then consider x such that A2: x in dom f and x in dom f and A3: y = f.x by Def6; y in Y by A1,XBOOLE_0:def 4; then x in f"Y by A2,A3,Def7; hence thesis by A2,A3,Def6; end; theorem Th79: f.:(X /\ f"Y) c= (f.:X) /\ Y proof let y; assume y in f.:(X /\ f"Y); then consider x such that A1: x in dom f and A2: x in X /\ f"Y and A3: y = f.x by Def6; x in f"Y by A2,XBOOLE_0:def 4; then A4: y in Y by A3,Def7; x in X by A2,XBOOLE_0:def 4; then y in f.:X by A1,A3,Def6; hence thesis by A4,XBOOLE_0:def 4; end; theorem f.:(X /\ f"Y) = (f.:X) /\ Y proof thus f.:(X /\ f"Y)c=(f.:X) /\ Y by Th79; let y; assume A1: y in (f.:X) /\ Y; then y in f.:X by XBOOLE_0:def 4; then consider x such that A2: x in dom f and A3: x in X and A4: y = f.x by Def6; y in Y by A1,XBOOLE_0:def 4; then x in f"Y by A2,A4,Def7; then x in X /\ f"Y by A3,XBOOLE_0:def 4; hence thesis by A2,A4,Def6; end; theorem X /\ R"Y c= R"(R.:X /\ Y) proof let x; assume A1: x in X /\ R"Y; then x in R"Y by XBOOLE_0:def 4; then consider Rx being set such that A2: [x,Rx] in R and A3: Rx in Y by RELAT_1:def 14; x in X by A1,XBOOLE_0:def 4; then Rx in R.:X by A2,RELAT_1:def 13; then Rx in R.:X /\ Y by A3,XBOOLE_0:def 4; hence thesis by A2,RELAT_1:def 14; end; theorem Th82: f is one-to-one implies f"(f.:X) c= X proof assume A1: f is one-to-one; let x; assume A2: x in f"(f.:X); then f.x in f.:X by Def7; then A3: ex z st z in dom f & z in X & f.x = f.z by Def6; x in dom f by A2,Def7; hence thesis by A1,A3,Def4; end; theorem (for X holds f"(f.:X) c= X) implies f is one-to-one proof assume A1: for X holds f"(f.:X) c= X; given x1,x2 such that A2: x1 in dom f and A3: x2 in dom f and A4: f.x1 = f.x2 & x1 <> x2; A5: f"(f.:{x1}) c= {x1} by A1; A6: Im(f,x2) = {f.x2} by A3,Th59; A7: Im(f,x1) = {f.x1} by A2,Th59; f.x1 in rng f by A2,Def3; then f"(f.:{x1}) <> {} by A7,Th72; then f"(f.:{x1}) = {x1} by A5,ZFMISC_1:33; hence contradiction by A1,A4,A7,A6,ZFMISC_1:3; end; theorem f is one-to-one implies f.:X = (f")"X proof assume A1: f is one-to-one; y in f.:X iff y in (f")"X proof thus y in f.:X implies y in (f")"X proof assume y in f.:X; then consider x such that A2: x in dom f and A3: x in X and A4: y = f.x by Def6; y in rng f by A2,A4,Def3; then A5: y in dom(f") by A1,Th32; (f").(f.x) = x by A1,A2,Th32; hence thesis by A3,A4,A5,Def7; end; assume A6: y in (f")"X; then A7: (f").y in X by Def7; y in dom(f") by A6,Def7; then y in rng(f) by A1,Th32; then consider x such that A8: x in dom(f) & y = f.x by Def3; (f").y = x by A1,A8,Th34; hence thesis by A7,A8,Def6; end; hence thesis by TARSKI:1; end; theorem f is one-to-one implies f"Y = (f").:Y proof assume A1: f is one-to-one; x in f"Y iff x in (f").:Y proof thus x in f"Y implies x in (f").:Y proof assume A2: x in f"Y; then A3: f.x in Y by Def7; A4: x in dom f by A2,Def7; then f.x in rng(f) by Def3; then A5: f.x in dom(f") by A1,Th32; (f").(f.x) = x by A1,A4,Th32; hence thesis by A3,A5,Def6; end; assume x in (f").:Y; then consider y such that A6: y in dom(f") and A7: y in Y and A8: x = (f").y by Def6; dom(f") = rng f by A1,Th32; then y = f.x & x in dom f by A1,A6,A8,Th32; hence thesis by A7,Def7; end; hence thesis by TARSKI:1; end; theorem Y = rng f & dom g = Y & dom h = Y & g*f = h*f implies g = h proof assume that A1: Y = rng f and A2: dom g = Y & dom h = Y and A3: g*f = h*f; y in Y implies g.y = h.y proof assume y in Y; then consider x such that A4: x in dom f & y = f.x by A1,Def3; (g*f).x = g.y by A4,Th13; hence thesis by A3,A4,Th13; end; hence thesis by A2,Th2; end; theorem f.:X1 c= f.:X2 & X1 c= dom f & f is one-to-one implies X1 c= X2 proof assume that A1: f.:X1 c= f.:X2 and A2: X1 c= dom f and A3: f is one-to-one; let x; assume A4: x in X1; then f.x in f.:X1 by A2,Def6; then ex x2 st x2 in dom f & x2 in X2 & f.x = f.x2 by A1,Def6; hence thesis by A2,A3,A4,Def4; end; theorem Th88: f"Y1 c= f"Y2 & Y1 c= rng f implies Y1 c= Y2 proof assume that A1: f"Y1 c= f"Y2 and A2: Y1 c= rng f; let y; assume A3: y in Y1; then consider x such that A4: x in dom f and A5: y = f.x by A2,Def3; x in f"Y1 by A3,A4,A5,Def7; hence thesis by A1,A5,Def7; end; theorem f is one-to-one iff for y ex x st f"{y} c= {x} proof (for y ex x st f"{y} c= {x}) iff for y st y in rng f ex x st f"{y} = {x} proof thus (for y ex x st f"{y} c= {x}) implies for y st y in rng f ex x st f"{y } = {x} proof assume A1: for y ex x st f"{y} c= {x}; let y; consider x such that A2: f"{y} c= {x} by A1; assume y in rng f; then consider x1 such that A3: x1 in dom f and A4: y = f.x1 by Def3; take x; f.x1 in {y} by A4,TARSKI:def 1; then f"{y} <> {} by A3,Def7; hence thesis by A2,ZFMISC_1:33; end; assume A5: for y st y in rng f ex x st f"{y} = {x}; let y; A6: now set x = the set; assume A7: not y in rng f; take x; rng f misses {y} by A7,ZFMISC_1:50; then f"{y} = {} by RELAT_1:138; hence f"{y} c= {x} by XBOOLE_1:2; end; now assume y in rng f; then consider x such that A8: f"{y} = {x} by A5; take x; thus f"{y} c= {x} by A8; end; hence thesis by A6; end; hence thesis by Th74; end; theorem rng R c= dom S implies R"X c= (R*S)"(S.:X) proof assume A1: rng R c= dom S; let x; assume x in R"X; then consider Rx being set such that A2: [x,Rx] in R and A3: Rx in X by RELAT_1:def 14; Rx in rng R by A2,XTUPLE_0:def 13; then consider SRx being set such that A4: [Rx,SRx] in S by A1,XTUPLE_0:def 12; SRx in S.:X & [x,SRx] in R*S by A2,A3,A4,RELAT_1:def 8,def 13; hence thesis by RELAT_1:def 14; end; theorem for f being Function st f " X = f " Y & X c= rng f & Y c= rng f holds X = Y proof let f be Function; assume f " X = f " Y & X c= rng f & Y c= rng f; then X c= Y & Y c= X by Th88; hence thesis by XBOOLE_0:def 10; end; begin reserve e,u for set, A for Subset of X; theorem (id X).:A = A proof now let e; thus e in A implies ex u st u in dom id X & u in A & e = (id X).u proof assume A1: e in A; take e; thus e in dom id X by A1; thus e in A by A1; thus thesis by A1,Th17; end; assume ex u st u in dom id X & u in A & e = (id X).u; hence e in A by Th17; end; hence thesis by Def6; end; definition let f be Function; redefine attr f is empty-yielding means :Def8: for x st x in dom f holds f.x is empty; compatibility proof hereby assume A1: f is empty-yielding; let x; assume x in dom f; then f.x in rng f by Def3; hence f.x is empty by A1,RELAT_1:149; end; assume A2: for x st x in dom f holds f.x is empty; let s be set; assume s in rng f; then ex e being set st e in dom f & s = f.e by Def3; then s = {} by A2; hence thesis by TARSKI:def 1; end; end; definition let F be Function; redefine attr F is non-empty means :Def9: for n being set st n in dom F holds F.n is non empty; compatibility proof hereby assume F is non-empty; then A1: not {} in rng F by RELAT_1:def 9; let i be set; assume i in dom F; hence F.i is non empty by A1,Def3; end; assume A2: for n being set st n in dom F holds F.n is non empty; assume {} in rng F; then ex i being set st i in dom F & F.i = {} by Def3; hence contradiction by A2; end; end; registration cluster non-empty for Function; existence proof take {}; let x be set; thus thesis; end; end; scheme LambdaB { D()->non empty set, F(set)->set } : ex f be Function st dom f = D() & for d be Element of D() holds f.d = F(d) proof consider f be Function such that A1: dom f = D() & for d be set st d in D() holds f.d = F(d) from Lambda; take f; thus thesis by A1; end; registration let f be non-empty Function; cluster rng f -> with_non-empty_elements; coherence proof assume {} in rng f; then ex x being set st x in dom f & {} = f.x by Def3; hence thesis by Def9; end; end; definition let f be Function; attr f is constant means :Def10: x in dom f & y in dom f implies f.x = f.y; end; theorem for A,B being set, f being Function st A c= dom f & f.:A c= B holds A c= f"B proof let A,B be set, f being Function; assume A c= dom f; then A1: A c= f"(f.:A) by Th76; assume f.:A c= B; then f"(f.:A) c= f"B by RELAT_1:143; hence thesis by A1,XBOOLE_1:1; end; theorem for f being Function st X c= dom f & f is one-to-one holds f"(f.:X) = X proof let f be Function such that A1: X c= dom f and A2: f is one-to-one; thus f"(f.:X) c= X by A2,Th82; let x; assume A3: x in X; then f.x in f.:X by A1,Def6; hence thesis by A1,A3,Def7; end; definition let f,g; redefine pred f = g means dom f = dom g & for x st x in dom f holds f.x = g.x; compatibility by Th2; end; registration cluster non-empty non empty for Function; existence proof consider f such that A1: dom f = {{}} and A2: rng f = {{{}}} by Th5; take f; not {} in rng f by A2,TARSKI:def 1; hence f is non-empty by RELAT_1:def 9; thus thesis by A1; end; end; registration let a be non-empty non empty Function; let i be Element of dom a; cluster a.i -> non empty; coherence proof a.i in rng a by Def3; hence thesis by RELAT_1:def 9; end; end; registration let f be Function; cluster -> Function-like for Subset of f; coherence proof let g be Subset of f; let x,y1,y2; assume [x,y1] in g & [x,y2] in g; hence thesis by Def1; end; end; theorem for f,g being Function, D being set st D c= dom f & D c= dom g holds f | D = g | D iff for x being set st x in D holds f.x = g.x proof let f,g be Function; let D be set; assume that A1: D c= dom f and A2: D c= dom g; A3: dom (g | D) = dom g /\ D by RELAT_1:61 .= D by A2,XBOOLE_1:28; hereby assume A4: f | D = g | D; hereby let x be set; assume A5: x in D; hence f.x = (g | D).x by A4,Th49 .= g.x by A5,Th49; end; end; assume A6: for x being set st x in D holds f.x = g.x; A7: now let x be set; assume A8: x in D; hence (f | D).x = f.x by Th49 .= g.x by A6,A8 .= (g | D).x by A8,Th49; end; dom (f | D) = dom f /\ D by RELAT_1:61 .= D by A1,XBOOLE_1:28; hence thesis by A3,A7,Th2; end; theorem for f,g being Function, X being set st dom f = dom g & (for x being set st x in X holds f.x = g.x) holds f|X = g|X proof let f,g be Function, X be set such that A1: dom f = dom g and A2: for x being set st x in X holds f.x = g.x; A3: dom (f|X) =dom f /\ X by RELAT_1:61; then A4: dom (f|X) = dom (g|X) by A1,RELAT_1:61; now let x be set; assume A5: x in dom (f|X); then A6: x in X by A3,XBOOLE_0:def 4; (f|X).x = f.x & (g|X).x = g.x by A4,A5,Th47; hence (f|X).x = (g|X).x by A2,A6; end; hence thesis by A4,Th2; end; theorem Th97: rng(f|{X}) c= {f.X} proof let x; assume x in rng(f|{X}); then consider y such that A1: y in dom(f|{X}) and A2: x = (f|{X}).y by Def3; dom(f|{X}) c= {X} by RELAT_1:58; then y = X by A1,TARSKI:def 1; then x = f.X by A1,A2,Th47; hence thesis by TARSKI:def 1; end; theorem X in dom f implies rng(f|{X}) ={f.X} proof A1: X in {X} by TARSKI:def 1; assume X in dom f; then A2: X in dom(f|{X}) by A1,RELAT_1:57; thus rng(f|{X}) c= {f.X} by Th97; let x; assume x in {f.X}; then x = f.X by TARSKI:def 1; then x = (f|{X}).X by A2,Th47; hence thesis by A2,Def3; end; registration cluster empty -> constant for Function; coherence proof let f be Function; assume A1: f is empty; let x be set; thus thesis by A1; end; end; registration let f be constant Function; cluster rng f -> trivial; coherence proof per cases; suppose f is empty; then reconsider g = f as empty Function; rng g is empty; hence thesis; end; suppose f <> {}; then consider x being set such that A1: x in dom f by XBOOLE_0:def 1; for y being set holds y in {f.x} iff ex z being set st z in dom f & y = f.z proof let y be set; hereby assume A2: y in {f.x}; take x; thus x in dom f & y = f.x by A1,A2,TARSKI:def 1; end; given z being set such that A3: z in dom f & y = f.z; y = f.x by A1,A3,Def10; hence thesis by TARSKI:def 1; end; hence thesis by Def3; end; end; end; registration cluster non constant for Function; existence proof set f = {[1,1],[2,2]}; f is Function-like proof let x,y,z be set; assume that A1: [x,y] in f and A2: [x,z] in f; [x,y] = [1,1] or [x,y] =[2,2] by A1,TARSKI:def 2; then A3: x = 1 & y = 1 or x = 2 & y = 2 by XTUPLE_0:1; [x,z] = [1,1] or [x,z] =[2,2] by A2,TARSKI:def 2; hence thesis by A3,XTUPLE_0:1; end; then reconsider f as Function; take f, 1, 2; A4: [2,2] in f by TARSKI:def 2; A5: [1,1] in f by TARSKI:def 2; hence A6: 1 in dom f & 2 in dom f by A4,XTUPLE_0:def 12; then f.1 = 1 by A5,Def2; hence thesis by A4,A6,Def2; end; end; registration let f be non constant Function; cluster rng f -> non trivial; coherence proof assume A1: rng f is trivial; per cases; suppose rng f is empty; then reconsider f as empty Function; f is trivial; hence thesis; end; suppose rng f is non empty; then consider x being set such that A2: x in rng f by XBOOLE_0:def 1; f is constant proof let y,z be set; assume that A3: y in dom f and A4: z in dom f; A5: f.z in rng f by A4,Def3; f.y in rng f by A3,Def3; hence f.y = x by A1,A2,ZFMISC_1:def 10 .= f.z by A1,A2,A5,ZFMISC_1:def 10; end; hence thesis; end; end; end; registration cluster non constant -> non trivial for Function; coherence proof let f be Function; assume f is non constant; then consider n1,n2 being set such that A1: n1 in dom f and A2: n2 in dom f and A3: f.n1 <> f.n2 by Def10; reconsider f as non empty Function by A1; f is non trivial proof reconsider x = [n1,f.n1], y = [n2,f.n2] as Element of f by A1,A2,Th1; take x,y; thus x in f & y in f; thus thesis by A3,XTUPLE_0:1; end; hence thesis; end; end; registration cluster trivial -> constant for Function; coherence; end; theorem for F,G be Function, X holds (G|(F.:X))*(F|X) = (G*F)|X proof let F,G be Function,X; set Y = dom ((G*F)|X); now let x; thus x in dom ((G|(F.:X))*(F|X)) implies x in Y proof assume A1: x in dom ((G|(F.:X))*(F|X)); then A2: x in dom (F|X) by Th11; then A3: x in dom F /\ X by RELAT_1:61; then A4: x in X by XBOOLE_0:def 4; (F|X).x in dom (G|(F.:X)) by A1,Th11; then F.x in dom (G|(F.:X)) by A2,Th47; then F.x in dom G /\ (F.:X) by RELAT_1:61; then A5: F.x in dom G by XBOOLE_0:def 4; x in dom F by A3,XBOOLE_0:def 4; then x in dom (G*F) by A5,Th11; then x in dom (G*F)/\ X by A4,XBOOLE_0:def 4; hence thesis by RELAT_1:61; end; assume x in Y; then A6: x in dom (G*F) /\ X by RELAT_1:61; then A7: x in dom (G*F) by XBOOLE_0:def 4; then A8: F.x in dom G by Th11; A9: x in X by A6,XBOOLE_0:def 4; x in dom F by A7,Th11; then x in dom F /\ X by A9,XBOOLE_0:def 4; then A10: x in dom (F|X) by RELAT_1:61; x in dom F by A7,Th11; then F.x in F.:X by A9,Def6; then F.x in dom G /\ (F.:X) by A8,XBOOLE_0:def 4; then F.x in dom (G|(F.:X)) by RELAT_1:61; then (F|X).x in dom (G|(F.:X)) by A10,Th47; hence x in dom ((G|(F.:X))*(F|X)) by A10,Th11; end; then A11: Y = dom ((G|(F.:X))*(F|X)) by TARSKI:1; now let x; assume A12: x in Y; then A13: x in dom (G*F) /\ X by RELAT_1:61; then x in dom (G*F) by XBOOLE_0:def 4; then A14: x in dom F by Th11; A15: x in X by A13,XBOOLE_0:def 4; then A16: F.x in F.:X by A14,Def6; thus ((G|(F.:X))*(F|X)).x =(G|(F.:X)).((F|X).x) by A11,A12,Th12 .= (G|(F.:X)).(F.x) by A15,Th49 .= G.(F.x) by A16,Th49 .= (G*F).x by A14,Th13 .= ((G*F)|X).x by A13,Th48; end; hence thesis by A11,Th2; end; theorem for F,G be Function, X,X1 holds (G|X1)*(F|X) = (G*F)|(X /\ (F"X1)) proof let F,G be Function,X,X1; set Y = dom ((G|X1)*(F|X)); now let x; thus x in dom ((G*F)|(X /\ (F"X1))) implies x in Y proof assume x in dom ((G*F)|(X /\ (F"X1))); then A1: x in dom (G*F) /\ (X /\ (F"X1)) by RELAT_1:61; then A2: x in dom (G*F) by XBOOLE_0:def 4; A3: x in X /\ (F"X1) by A1,XBOOLE_0:def 4; then A4: x in X by XBOOLE_0:def 4; x in dom F by A2,Th11; then x in dom F /\ X by A4,XBOOLE_0:def 4; then A5: x in dom (F|X) by RELAT_1:61; x in (F"X1) by A3,XBOOLE_0:def 4; then A6: F.x in X1 by Def7; F.x in dom G by A2,Th11; then F.x in dom G /\ X1 by A6,XBOOLE_0:def 4; then F.x in dom (G|X1) by RELAT_1:61; then (F|X).x in dom (G|X1) by A5,Th47; hence thesis by A5,Th11; end; assume A7: x in Y; then A8: x in dom(F|X) by Th11; then A9: x in dom F /\ X by RELAT_1:61; then A10: x in dom F by XBOOLE_0:def 4; A11: x in X by A9,XBOOLE_0:def 4; (F|X).x in dom(G|X1) by A7,Th11; then F.x in dom (G|X1) by A8,Th47; then A12: F.x in dom G /\ X1 by RELAT_1:61; then F.x in X1 by XBOOLE_0:def 4; then x in F"X1 by A10,Def7; then A13: x in X /\ F"X1 by A11,XBOOLE_0:def 4; F.x in dom G by A12,XBOOLE_0:def 4; then x in dom (G*F) by A10,Th11; then x in dom (G*F) /\ (X/\(F"X1)) by A13,XBOOLE_0:def 4; hence x in dom ((G*F)|(X /\ (F"X1))) by RELAT_1:61; end; then A14: Y = dom ((G*F)|(X /\ (F"X1))) by TARSKI:1; now let x; assume A15: x in Y; then A16: x in dom (F|X) by Th11; then A17: x in dom F /\ X by RELAT_1:61; then A18: x in dom F by XBOOLE_0:def 4; A19: (F|X).x in dom (G|X1) by A15,Th11; then A20: F.x in dom (G|X1) by A16,Th47; A21: x in X by A17,XBOOLE_0:def 4; F.x in dom (G|X1) by A16,A19,Th47; then F.x in dom G /\ X1 by RELAT_1:61; then F.x in X1 by XBOOLE_0:def 4; then x in F"X1 by A18,Def7; then A22: x in X /\ F"X1 by A21,XBOOLE_0:def 4; thus ((G|X1)*(F|X)).x =(G|X1).((F|X).x) by A15,Th12 .= (G|X1).(F.x) by A16,Th47 .= G.(F.x) by A20,Th47 .= (G*F).x by A18,Th13 .= ((G*F)|(X/\(F"X1))).x by A22,Th49; end; hence thesis by A14,Th2; end; theorem for F,G be Function,X holds X c= dom (G*F) iff X c= dom F & F.:X c= dom G proof let F,G be Function,X; thus X c= dom (G*F) implies X c= dom F & F.:X c= dom G proof assume A1: X c= dom (G*F); then for x st x in X holds x in dom F by Th11; hence X c= dom F by TARSKI:def 3; let x; assume x in F.:X; then ex y st y in dom F & y in X & x=F.y by Def6; hence thesis by A1,Th11; end; assume that A2: X c= dom F and A3: F.:X c= dom G; let x; assume A4: x in X; then F.x in F.:X by A2,Def6; hence thesis by A2,A3,A4,Th11; end; definition let f be Function; assume A1: f is non empty constant; func the_value_of f means ex x being set st x in dom f & it = f.x; existence proof consider x being set such that A2: x in dom f by A1,XBOOLE_0:def 1; take f.x; thus thesis by A2; end; uniqueness by A1,Def10; end; registration let X,Y; cluster X-defined Y-valued for Function; existence proof take {}; thus dom{} c= X & rng{} c= Y by XBOOLE_1:2; end; end; theorem for X being set, f being X-valued Function for x being set st x in dom f holds f.x in X proof let X be set, f be X-valued Function; let x be set; assume x in dom f; then A1: f.x in rng f by Def3; rng f c= X by RELAT_1:def 19; hence thesis by A1; end; definition let IT be set; attr IT is functional means :Def13: for x being set st x in IT holds x is Function; end; registration cluster empty -> functional for set; coherence proof let A be set; assume A1: A is empty; let x be set; thus thesis by A1; end; let f be Function; cluster { f } -> functional; coherence proof let x be set; thus thesis by TARSKI:def 1; end; let g be Function; cluster { f,g } -> functional; coherence proof let x be set; thus thesis by TARSKI:def 2; end; end; registration cluster non empty functional for set; existence proof take { {} }; thus thesis; end; end; registration let P be functional set; cluster -> Function-like Relation-like for Element of P; coherence proof let x be Element of P; per cases; suppose P is empty; hence thesis by SUBSET_1:def 1; end; suppose P is non empty; hence thesis by Def13; end; end; end; registration let A be functional set; cluster -> functional for Subset of A; coherence proof let B be Subset of A; let x be set; thus thesis; end; end; definition let g,f be Function; attr f is g-compatible means :Def14: x in dom f implies f.x in g.x; end; theorem f is g-compatible & dom f = dom g implies g is non-empty proof assume A1: f is g-compatible & dom f = dom g; let x; assume x in dom g; hence g.x is non empty by A1,Def14; end; theorem Th104: {} is f-compatible proof let x; thus thesis; end; registration let I be set, f be Function; cluster empty I-defined f-compatible for Function; existence proof take {}; thus thesis by Th104,RELAT_1:171; end; end; registration let X be set; let f be Function, g be f-compatible Function; cluster g|X -> f-compatible; coherence proof let x; A1: dom(g|X) c= dom g by RELAT_1:60; assume A2: x in dom(g|X); then g.x in f.x by A1,Def14; hence (g|X).x in f.x by A2,Th47; end; end; registration let I be set; cluster non-empty I-defined for Function; existence proof take {}; thus {} is non-empty; thus dom {} c= I by XBOOLE_1:2; end; end; theorem Th105: for g being f-compatible Function holds dom g c= dom f proof let g be f-compatible Function; let x be set; assume x in dom g; then g.x in f.x by Def14; hence x in dom f by Def2; end; registration let X; let f be X-defined Function; cluster f-compatible -> X-defined for Function; coherence proof let g be Function; assume g is f-compatible; then A1: dom g c= dom f by Th105; dom f c= X by RELAT_1:def 18; hence dom g c= X by A1,XBOOLE_1:1; end; end; theorem for f being X-valued Function st x in dom f holds f.x is Element of X proof let f be X-valued Function; assume x in dom f; then A1: f.x in rng f by Def3; rng f c= X by RELAT_1:def 19; hence f.x is Element of X by A1; end; theorem for f being Function,A being set st f is one-to-one & A c= dom f holds f".:(f.:A)=A proof let f be Function,A be set; set B = f.:A; assume that A1: f is one-to-one and A2: A c= dom f; A3: f".:B c= A proof let y be set; assume y in f".:B; then consider x being set such that x in dom (f") and A4: x in B and A5: y=f".x by Def6; ex y2 being set st ( y2 in dom f)&( y2 in A)&( x=f.y2) by A4,Def6 ; hence thesis by A1,A5,Th32; end; A c= f".:B proof let x be set; assume A6: x in A; set y0=f.x; A7: f".y0=x by A1,A2,A6,Th34; y0 in rng f by A2,A6,Def3; then A8: y0 in dom (f") by A1,Th33; y0 in B by A2,A6,Def6; hence thesis by A7,A8,Def6; end; hence thesis by A3,XBOOLE_0:def 10; end; registration let A be functional set, x be set; let F be A-valued Function; cluster F.x -> Function-like Relation-like; coherence proof per cases; suppose x in dom F; then A1: F.x in rng F by Def3; rng F c= A by RELAT_1:def 19; hence thesis by A1; end; suppose not x in dom F; hence thesis by Def2; end; end; end; theorem Th108: x in X & x in dom f implies f.x in f.:X proof assume that A1: x in X and A2: x in dom f; x in X /\ dom f by A1,A2,XBOOLE_0:def 4; then x in dom(f|X) by RELAT_1:61; then A3: (f|X).x in rng(f|X) by Def3; (f|X).x = f.x by A1,Th49; hence f.x in f.:X by A3,RELAT_1:115; end; theorem X <> {} & X c= dom f implies f.:X <> {} proof assume X <> {}; then ex x st x in X by XBOOLE_0:def 1; hence thesis by Th108; end; registration let f be non trivial Function; cluster dom f -> non trivial; coherence proof consider u,w being set such that A1: u in f and A2: w in f and A3: u <> w by ZFMISC_1:def 10; consider u1,u2 being set such that A4: u = [u1,u2] by A1,RELAT_1:def 1; consider w1,w2 being set such that A5: w = [w1,w2] by A2,RELAT_1:def 1; take u1,w1; thus u1 in dom f & w1 in dom f by A4,A5,A1,A2,XTUPLE_0:def 12; thus u1 <> w1 by A1,A2,A3,A4,A5,Def1; end; end; theorem for B being non empty functional set, f being Function st f = union B holds dom f = union { dom g where g is Element of B: not contradiction} & rng f = union { rng g where g is Element of B: not contradiction } proof let B be non empty functional set, f be Function such that A1: f = union B; set X = { dom g where g is Element of B: not contradiction }; now let x be set; hereby assume x in dom f; then [x,f.x] in f by Th1; then consider g being set such that A2: [x,f.x] in g and A3: g in B by A1,TARSKI:def 4; reconsider g as Function by A3; take Z = dom g; thus x in Z & Z in X by A2,A3,Th1; end; given Z being set such that A4: x in Z and A5: Z in X; consider g being Element of B such that A6: Z = dom g by A5; [x,g.x] in g by A4,A6,Th1; then [x,g.x] in f by A1,TARSKI:def 4; hence x in dom f by Th1; end; hence dom f = union X by TARSKI:def 4; set X = { rng g where g is Element of B: not contradiction }; now let y be set; hereby assume y in rng f; then consider x being set such that A7: x in dom f & y = f.x by Def3; [x,y] in f by A7,Th1; then consider g being set such that A8: [x,y] in g and A9: g in B by A1,TARSKI:def 4; reconsider g as Function by A9; take Z = rng g; x in dom g & y = g.x by A8,Th1; hence y in Z & Z in X by A9,Def3; end; given Z being set such that A10: y in Z and A11: Z in X; consider g being Element of B such that A12: Z = rng g by A11; consider x being set such that A13: x in dom g & y = g.x by A10,A12,Def3; [x,y] in g by A13,Th1; then [x,y] in f by A1,TARSKI:def 4; hence y in rng f by XTUPLE_0:def 13; end; hence thesis by TARSKI:def 4; end; theorem Th111: for M being set st for X st X in M holds X <> {} ex f being Function st dom f = M & for X st X in M holds f.X in X proof let M be set; assume A1: for X st X in M holds X <> {}; deffunc F(set) = the Element of $1; consider f being Function such that A2: dom f = M and A3: for x st x in M holds f.x = F(x) from Lambda; take f; thus dom f = M by A2; let X; assume A4: X in M; then A5: f.X = the Element of X by A3; X <> {} by A1,A4; hence f.X in X by A5; end; scheme NonUniqBoundFuncEx { X() -> set, Y() -> set, P[set,set] }: ex f being Function st dom f = X() & rng f c= Y() & for x st x in X() holds P[x,f.x] provided A1: for x st x in X() ex y st y in Y() & P[x,y] proof per cases; suppose A2: X() = {}; take {}; thus thesis by A2,XBOOLE_1:2; end; suppose A3: X() <> {}; defpred Q[set,set] means for y holds y in $2 iff y in Y() & P[$1,y]; A4: for e,u1,u2 being set st e in X() & Q[e,u1] & Q[e,u2] holds u1 = u2 proof let e,u1,u2 be set such that e in X(); assume A5: for y holds y in u1 iff y in Y() & P[e,y]; defpred A[set] means $1 in Y() & P[e,$1]; A6: for x be set holds x in u1 iff A[x] by A5; assume A7: for y holds y in u2 iff y in Y() & P[e,y]; A8: for x be set holds x in u2 iff A[x] by A7; u1 = u2 from XBOOLE_0:sch 2(A6,A8); hence thesis; end; A9: for x st x in X() ex y st Q[x,y] proof let x such that x in X(); defpred R[set] means P[x,$1]; consider X such that A10: y in X iff y in Y() & R[y] from XBOOLE_0:sch 1; take X; thus thesis by A10; end; consider G being Function such that A11: dom G = X() & for x st x in X() holds Q[x,G.x] from FuncEx(A4,A9); reconsider D = rng G as non empty set by A11,A3,RELAT_1:42; now let X; assume X in D; then consider x such that A12: x in dom G & X = G.x by Def3; (for y holds y in X iff y in Y() & P[x,y]) & ex y st y in Y() & P[x,y] by A1,A11,A12; hence X <> {}; end; then consider F be Function such that A13: dom F = D and A14: for X st X in D holds F.X in X by Th111; A15: dom (F*G) = X() by A11,A13,RELAT_1:27; take f = F*G; thus dom f = X() by A11,A13,RELAT_1:27; rng F c= Y() proof let x; assume x in rng F; then consider y such that A16: y in dom F and A17: x = F.y by Def3; A18: ex z st z in dom G & y = G.z by A13,A16,Def3; x in y by A13,A14,A16,A17; hence thesis by A11,A18; end; hence rng f c= Y() by A13,RELAT_1:28; let x; assume A19: x in X(); then f.x = F.(G.x) & G.x in D by A11,A15,Th12,Def3; then f.x in G.x by A14; hence thesis by A11,A19; end; end; registration let f be empty-yielding Function; let x; cluster f.x -> empty; coherence proof x in dom f or not x in dom f; hence thesis by Def2,Def8; end; end; begin reserve X,Y,p,x,x1,x2,y,y1,y2,z,z1,z2 for set; reserve f,g,h for Function; theorem Th1: for G being set st G c= f holds G is Function; theorem Th2: f c= g iff dom f c= dom g & for x st x in dom f holds f.x = g.x proof thus f c= g implies dom f c= dom g & for x st x in dom f holds f.x = g.x proof assume A1: f c= g; hence dom f c= dom g by RELAT_1:11; let x; assume x in dom f; then [x,f.x] in f by FUNCT_1:def 2; hence thesis by A1,FUNCT_1:1; end; assume that A2: dom f c= dom g and A3: for x st x in dom f holds f.x = g.x; let x,y; assume A4: [x,y] in f; then A5: x in dom f by FUNCT_1:1; y = f.x by A4,FUNCT_1:1; then y = g.x by A3,A5; hence thesis by A2,A5,FUNCT_1:def 2; end; theorem dom f = dom g & f c= g implies f = g proof assume that A1: dom f = dom g and A2: f c= g; [x,y] in f iff [x,y] in g proof thus [x,y] in f implies [x,y] in g by A2; assume A3: [x,y] in g; then x in dom f by A1,XTUPLE_0:def 12; then [x,f.x] in f by FUNCT_1:1; hence thesis by A2,A3,FUNCT_1:def 1; end; hence thesis by RELAT_1:def 2; end; Lm1: rng f /\ rng h = {} & x in dom f & y in dom h implies f.x <> h.y proof assume A1: rng f /\ rng h = {}; assume x in dom f & y in dom h; then f.x in rng f & h.y in rng h by FUNCT_1:def 3; hence thesis by A1,XBOOLE_0:def 4; end; theorem [x,z] in (g*f) implies [x,f.x] in f & [f.x,z] in g proof assume [x,z] in (g*f); then ex y st [x,y] in f & [y,z] in g by RELAT_1:def 8; hence thesis by FUNCT_1:1; end; theorem {[x,y]} is Function; Lm2: [x,y] in {[x1,y1]} implies x = x1 & y = y1 proof assume [x,y] in {[x1,y1]}; then [x,y] = [x1,y1] by TARSKI:def 1; hence thesis by XTUPLE_0:1; end; theorem f = {[x,y]} implies f.x = y proof assume f = {[x,y]}; then [x,y] in f by TARSKI:def 1; hence thesis by FUNCT_1:1; end; theorem Th7: dom f = {x} implies f = {[x,f.x]} proof reconsider g = {[x,f.x]} as Function; assume A1: dom f = {x}; [y,z] in f iff [y,z] in g proof thus [y,z] in f implies [y,z] in g proof assume A2: [y,z] in f; then y in {x} by A1,XTUPLE_0:def 12; then A3: y = x by TARSKI:def 1; A4: rng f = {f.x} by A1,FUNCT_1:4; z in rng f by A2,XTUPLE_0:def 13; then z = f.x by A4,TARSKI:def 1; hence thesis by A3,TARSKI:def 1; end; assume [y,z] in g; then A5: y = x & z = f.x by Lm2; x in dom f by A1,TARSKI:def 1; hence thesis by A5,FUNCT_1:def 2; end; hence thesis by RELAT_1:def 2; end; theorem {[x1,y1],[x2,y2]} is Function iff (x1 = x2 implies y1 = y2) proof thus {[x1,y1],[x2,y2]} is Function & x1 = x2 implies y1 = y2 proof A1: [x1,y1] in {[x1,y1],[x2,y2]} & [x2,y2] in {[x1,y1],[x2,y2]} by TARSKI:def 2 ; assume {[x1,y1],[x2,y2]} is Function; hence thesis by A1,FUNCT_1:def 1; end; assume A2: x1 = x2 implies y1 = y2; now thus p in {[x1,y1],[x2,y2]} implies ex x,y st [x,y] = p proof assume p in {[x1,y1],[x2,y2]}; then p = [x1,y1] or p = [x2,y2] by TARSKI:def 2; hence thesis; end; let x,z1,z2; A3: [x,z1] = [x1,y1] & [x,z2] = [x1,y1] or [x,z1] = [x2,y2] & [x,z2] = [ x2,y2] implies z1 = y1 & z2 = y1 or z1 = y2 & z2 = y2 by XTUPLE_0:1; A4: now assume A5: [x,z1] = [x1,y1] & [x,z2] = [x2,y2] or [x,z1] = [x2,y2] & [x,z2 ] = [x1,y1]; then x = x1 & x = x2 by XTUPLE_0:1; hence z1 = z2 by A2,A5,XTUPLE_0:1; end; assume [x,z1] in {[x1,y1],[x2,y2]} & [x,z2] in {[x1,y1],[x2,y2]}; hence z1 = z2 by A3,A4,TARSKI:def 2; end; hence thesis by FUNCT_1:def 1; end; theorem Th9: f is one-to-one iff for x1,x2,y st [x1,y] in f & [x2,y] in f holds x1 = x2 proof thus f is one-to-one implies for x1,x2,y st [x1,y] in f & [x2,y] in f holds x1 = x2 proof assume A1: f is one-to-one; let x1,x2,y; assume A2: [x1,y] in f & [x2,y] in f; then A3: f.x1 = y & f.x2 = y by FUNCT_1:1; x1 in dom f & x2 in dom f by A2,FUNCT_1:1; hence thesis by A1,A3,FUNCT_1:def 4; end; assume A4: for x1,x2,y st [x1,y] in f & [x2,y] in f holds x1 = x2; let x1,x2; assume x1 in dom f & x2 in dom f & f.x1 = f.x2; then [x1,f.x1] in f & [x2,f.x1] in f by FUNCT_1:1; hence thesis by A4; end; theorem Th10: g c= f & f is one-to-one implies g is one-to-one proof assume g c= f & f is one-to-one; then for x1,x2,y st [x1,y] in g & [x2,y] in g holds x1 = x2 by Th9; hence thesis by Th9; end; registration let f,X; cluster f /\ X -> Function-like; coherence by Th1,XBOOLE_1:17; end; theorem x in dom(f /\ g) implies (f /\ g).x = f.x proof set y = (f /\ g).x; assume x in dom(f /\ g); then [x,y] in (f /\ g) by FUNCT_1:def 2; then [x,y] in f by XBOOLE_0:def 4; hence thesis by FUNCT_1:1; end; theorem f is one-to-one implies f /\ g is one-to-one by Th10,XBOOLE_1:17; theorem dom f misses dom g implies f \/ g is Function proof assume A1: dom f /\ dom g = {}; now thus p in f \/ g implies ex x,y st [x,y] = p by RELAT_1:def 1; let x,y1,y2; assume [x,y1] in f \/ g; then A2: [x,y1] in f or [x,y1] in g by XBOOLE_0:def 3; assume [x,y2] in f \/ g; then A3: [x,y2] in f or [x,y2] in g by XBOOLE_0:def 3; not (x in dom f & x in dom g) by A1,XBOOLE_0:def 4; hence y1 = y2 by A2,A3,FUNCT_1:def 1,XTUPLE_0:def 12; end; hence thesis by FUNCT_1:def 1; end; theorem f c= h & g c= h implies f \/ g is Function by Th1,XBOOLE_1:8; Lm3: h = f \/ g implies (x in dom h iff x in dom f or x in dom g) proof assume A1: h = f \/ g; thus x in dom h implies x in dom f or x in dom g proof assume x in dom h; then [x,h.x] in h by FUNCT_1:def 2; then [x,h.x] in f or [x,h.x] in g by A1,XBOOLE_0:def 3; hence thesis by XTUPLE_0:def 12; end; assume x in dom f or x in dom g; then [x,f.x] in f or [x,g.x] in g by FUNCT_1:def 2; then [x,f.x] in h or [x,g.x] in h by A1,XBOOLE_0:def 3; hence thesis by XTUPLE_0:def 12; end; theorem Th15: x in dom g & h = f \/ g implies h.x = g.x proof assume x in dom g; then [x,g.x] in g by FUNCT_1:def 2; then h = f \/ g implies [x,g.x] in h by XBOOLE_0:def 3; hence thesis by FUNCT_1:1; end; theorem x in dom h & h = f \/ g implies h.x = f.x or h.x = g.x proof assume x in dom h; then [x,h.x] in h by FUNCT_1:def 2; then h = f \/ g implies [x,h.x] in f or [x,h.x] in g by XBOOLE_0:def 3; hence thesis by FUNCT_1:1; end; theorem f is one-to-one & g is one-to-one & h = f \/ g & rng f misses rng g implies h is one-to-one proof assume that A1: f is one-to-one & g is one-to-one and A2: h = f \/ g and A3: rng f /\ rng g = {}; now let x1,x2; assume that A4: x1 in dom h & x2 in dom h and A5: h.x1 = h.x2; A6: now assume x1 in dom f & x2 in dom g or x1 in dom g & x2 in dom f; then h.x1 = f.x1 & h.x2 = g.x2 & f.x1 <> g.x2 or h.x1 = g.x1 & h.x2 = f. x2 & f.x2 <> g.x1 by A2,A3,Lm1,Th15; hence x1 = x2 by A5; end; A7: x1 in dom g & x2 in dom g implies h.x1 = g.x1 & h.x2 = g.x2 by A2,Th15; x1 in dom f & x2 in dom f implies h.x1 = f.x1 & h.x2 = f.x2 by A2,Th15; then x1 in dom f & x2 in dom f or x1 in dom g & x2 in dom g implies x1 = x2 by A1,A5,A7,FUNCT_1:def 4; hence x1 = x2 by A2,A4,A6,Lm3; end; hence thesis by FUNCT_1:def 4; end; canceled 2; theorem f is one-to-one implies for x,y holds [y,x] in f" iff [x,y] in f proof assume A1: f is one-to-one; let x,y; dom(f") = rng(f) by A1,FUNCT_1:33; then y in dom(f") & x = (f").y iff x in dom f & y = f.x by A1,FUNCT_1:32; hence thesis by FUNCT_1:1; end; theorem f = {} implies f" = {} proof assume f = {}; then dom(f") = {} by FUNCT_1:33,RELAT_1:38; hence thesis; end; theorem x in dom f & x in X iff [x,f.x] in f|X proof x in dom f iff [x,f.x] in f by FUNCT_1:def 2,XTUPLE_0:def 12; hence thesis by RELAT_1:def 11; end; theorem Th23: g c= f implies f|dom g = g proof assume A1: g c= f; [x,y] in (f|dom g) implies [x,y] in g proof assume A2: [x,y] in (f|dom g); then x in dom g by RELAT_1:def 11; then A3: [x,g.x] in g by FUNCT_1:def 2; [x,y] in f by A2,RELAT_1:def 11; hence thesis by A1,A3,FUNCT_1:def 1; end; then A4: (f|dom g) c= g by RELAT_1:def 3; (g|dom g) c= (f|dom g) by A1,RELAT_1:76; then g c= (f|dom g); hence thesis by A4,XBOOLE_0:def 10; end; theorem x in dom f & f.x in Y iff [x,f.x] in Y|`f proof x in dom f iff [x,f.x] in f by FUNCT_1:def 2,XTUPLE_0:def 12; hence thesis by RELAT_1:def 12; end; theorem g c= f & f is one-to-one implies rng g|`f = g proof assume A1: g c= f; assume A2: f is one-to-one; [x,y] in (rng g|`f) implies [x,y] in g proof assume A3: [x,y] in (rng g|`f); then y in rng g by RELAT_1:def 12; then A4: ex x1 st [x1,y] in g by XTUPLE_0:def 13; [x,y] in f by A3,RELAT_1:def 12; hence thesis by A1,A2,A4,Th9; end; then A5: (rng g|`f) c= g by RELAT_1:def 3; (rng g|`g) c= (rng g|`f) by A1,RELAT_1:101; then g c= (rng g|`f); hence thesis by A5,XBOOLE_0:def 10; end; theorem x in f"Y iff [x,f.x] in f & f.x in Y proof thus x in f"Y implies [x,f.x] in f & f.x in Y proof assume x in f"Y; then ex y st [x,y] in f & y in Y by RELAT_1:def 14; hence thesis by FUNCT_1:1; end; thus thesis by RELAT_1:def 14; end; begin theorem for X being set, f,g being Function st X c= dom f & f c= g holds f|X = g|X proof let X be set, f,g be Function such that A1: X c= dom f; assume f c= g; hence f|X = g|(dom f)|X by Th23 .= g|((dom f) /\ X) by RELAT_1:71 .= g|X by A1,XBOOLE_1:28; end; theorem Th28: for f being Function, x being set st x in dom f holds f|{x} = {[ x,f.x]} proof let f be Function, x be set such that A1: x in dom f; A2: x in {x} by TARSKI:def 1; dom(f|{x} qua Function) = dom f /\ {x} by RELAT_1:61 .= {x} by A1,ZFMISC_1:46; hence f|{x} = {[x,(f|{x}).x]} by Th7 .= {[x,f.x]} by A2,FUNCT_1:49; end; theorem Th29: for f,g being Function, x being set st dom f = dom g & f.x = g.x holds f|{x} = g|{x} proof let f,g be Function, x be set such that A1: dom f = dom g and A2: f.x = g.x; per cases; suppose A3: x in dom f; hence f|{x} = {[x,g.x]} by A2,Th28 .= g|{x} by A1,A3,Th28; end; suppose not x in dom f; then A4: {x} misses dom f by ZFMISC_1:50; hence f|{x} = {} by RELAT_1:66 .= g|{x} by A1,A4,RELAT_1:66; end; end; theorem Th30: for f,g being Function, x,y being set st dom f = dom g & f.x = g .x & f.y = g.y holds f|{x,y} = g|{x,y} proof let f,g be Function, x,y be set; assume dom f = dom g & f.x = g.x & f.y = g.y; then A1: f|{x} = g|{x} & f|{y} = g|{y} by Th29; {x,y} = {x} \/ {y} by ENUMSET1:1; hence thesis by A1,RELAT_1:150; end; theorem for f,g being Function, x,y,z being set st dom f = dom g & f.x = g.x & f.y = g.y & f.z = g.z holds f|{x,y,z} = g|{x,y,z} proof let f,g be Function, x,y,z be set; assume dom f = dom g & f.x = g.x & f.y = g.y & f.z = g.z; then A1: f|{x,y} = g|{x,y} & f|{z} = g|{z} by Th29,Th30; {x,y,z} = {x,y} \/ {z} by ENUMSET1:3; hence thesis by A1,RELAT_1:150; end; registration let f be Function, A be set; cluster f \ A -> Function-like; coherence; end; theorem for f, g being Function st x in dom f \ dom g holds (f \ g).x = f.x proof let f, g be Function such that A1: x in dom f \ dom g; f \ g c= f & dom f \ dom g c= dom (f \ g) by RELAT_1:3; hence thesis by A1,Th2; end; theorem f c= g & f c= h implies g|dom f = h|dom f proof assume that A1: f c= g and A2: f c= h; thus g|dom f = f by A1,Th23 .= h|dom f by A2,Th23; end; registration let f be Function, g be Subset of f; cluster g-compatible -> f-compatible for Function; coherence proof let F be Function such that A1: F is g-compatible; let x; assume x in dom F; then A2: F.x in g.x by A1,FUNCT_1:def 14; then x in dom g by FUNCT_1:def 2; hence F.x in f.x by A2,Th2; end; end; theorem Th34: g c= f implies g = f|dom g proof assume A1: g c= f; then dom g c= dom f by RELAT_1:11; hence dom g = dom(f|dom g) by RELAT_1:62; let x; assume A2: x in dom g; hence g.x = f.x by A1,Th2 .= (f|dom g).x by A2,FUNCT_1:49; end; registration let f be Function, g be f-compatible Function; cluster -> f-compatible for Subset of g; coherence proof let h be Subset of g; h = g|dom h by Th34; hence thesis; end; end; theorem g c= f & x in X & X /\ dom f c= dom g implies f.x = g.x proof assume that A1: g c= f and A2: x in X and A3: X /\ dom f c= dom g; per cases; suppose x in dom g; hence f.x = g.x by A1,Th2; end; suppose A4: not x in dom g; then not x in X /\ dom f by A3; then not x in dom f by A2,XBOOLE_0:def 4; hence f.x = {} by FUNCT_1:def 2 .= g.x by A4,FUNCT_1:def 2; end; end; begin reserve X,a,b,c,x,y,z for set; reserve P,R for Relation; definition let R,X; pred R is_reflexive_in X means :Def1: x in X implies [x,x] in R; pred R is_irreflexive_in X means :Def2: x in X implies not [x,x] in R; pred R is_symmetric_in X means :Def3: x in X & y in X & [x,y] in R implies [ y,x] in R; pred R is_antisymmetric_in X means :Def4: x in X & y in X & [x,y] in R & [y, x] in R implies x = y; pred R is_asymmetric_in X means :Def5: x in X & y in X & [x,y] in R implies not [y,x] in R; pred R is_connected_in X means :Def6: x in X & y in X & x <>y implies [x,y] in R or [y,x] in R; pred R is_strongly_connected_in X means :Def7: x in X & y in X implies [x,y] in R or [y,x] in R; pred R is_transitive_in X means :Def8: x in X & y in X & z in X & [x,y] in R & [y,z] in R implies [x,z] in R; end; definition let R; attr R is reflexive means :Def9: R is_reflexive_in field R; attr R is irreflexive means :Def10: R is_irreflexive_in field R; attr R is symmetric means :Def11: R is_symmetric_in field R; attr R is antisymmetric means :Def12: R is_antisymmetric_in field R; attr R is asymmetric means :Def13: R is_asymmetric_in field R; attr R is connected means :Def14: R is_connected_in field R; attr R is strongly_connected means :Def15: R is_strongly_connected_in field R; attr R is transitive means :Def16: R is_transitive_in field R; end; registration cluster empty -> reflexive irreflexive symmetric antisymmetric asymmetric connected strongly_connected transitive for Relation; coherence proof let R be Relation; assume A1: R is empty; thus R is reflexive proof let x; thus thesis by A1,RELAT_1:40; end; thus R is irreflexive proof let x; thus thesis by A1; end; thus R is symmetric proof let x; thus thesis by A1; end; thus R is antisymmetric proof let x; thus thesis by A1; end; thus R is asymmetric proof let x; thus thesis by A1; end; thus R is connected proof let x; thus thesis by A1,RELAT_1:40; end; thus R is strongly_connected proof let x; thus thesis by A1,RELAT_1:40; end; let x; thus thesis by A1; end; end; theorem R is reflexive iff id field R c= R proof hereby assume A3: R is reflexive; thus id field R c= R proof let a,b; assume [a,b] in id field R; then a in field R & a = b by RELAT_1:def 10; hence [a,b] in R by A3,Def1,Def9; end; end; assume A2: id field R c= R; let a; assume a in field R; then [a,a] in id field R by RELAT_1:def 10; hence [a,a] in R by A2; end; theorem R is irreflexive iff id field R misses R proof hereby assume R is irreflexive; then A2: R is_irreflexive_in field R by Def10; now let a,b; assume A3: [a,b] in id (field R) /\ R; then [a,b] in id (field R) by XBOOLE_0:def 4; then A4: a in field R & a = b by RELAT_1:def 10; [a,b] in R by A3,XBOOLE_0:def 4; hence contradiction by A2,A4,Def2; end; hence id (field R) misses R by RELAT_1:37,XBOOLE_0:def 7; end; assume A5: id (field R) misses R; let a; assume a in field R; then [a,a] in id field R by RELAT_1:def 10; hence thesis by A5,XBOOLE_0:3; end; theorem R is_antisymmetric_in X iff R \ id X is_asymmetric_in X proof hereby assume A1: R is_antisymmetric_in X; thus R \ id X is_asymmetric_in X proof let x,y; assume that A2: x in X and A3: y in X and A4: [x,y] in R \ id X; not [x,y] in id X by A4,XBOOLE_0:def 5; then A5: x <> y by A2,RELAT_1:def 10; [x,y] in R by A4,XBOOLE_0:def 5; then not [y,x] in R by A1,A2,A3,A5,Def4; hence not [y,x] in R \ id X by XBOOLE_0:def 5; end; end; assume A6: R \ id X is_asymmetric_in X; let x,y; assume that A7: x in X & y in X and A8: [x,y] in R and A9: [y,x] in R; assume A10: x <> y; then not [y,x] in id X by RELAT_1:def 10; then A11: [y,x] in R \ id X by A9,XBOOLE_0:def 5; not [x,y] in id X by A10,RELAT_1:def 10; then [x,y] in R \ id X by A8,XBOOLE_0:def 5; hence contradiction by A6,A7,A11,Def5; end; theorem R is_asymmetric_in X implies R \/ id X is_antisymmetric_in X proof assume A1: R is_asymmetric_in X; let x,y; assume that A2: x in X & y in X and A3: [x,y] in R \/ id X and A4: [y,x] in R \/ id X; assume A5: x <> y; then not [y,x] in id X by RELAT_1:def 10; then A6: [y,x] in R by A4,XBOOLE_0:def 3; not [x,y] in id X by A5,RELAT_1:def 10; then [x,y] in R by A3,XBOOLE_0:def 3; hence contradiction by A1,A2,A6,Def5; end; canceled 7; registration cluster symmetric transitive -> reflexive for Relation; coherence proof let R be Relation; assume that A1: R is symmetric and A2: R is transitive; A3: R is_transitive_in field R by A2,Def16; A4: R is_symmetric_in field R by A1,Def11; let a; A5: now assume a in dom R; then consider b such that A6: [a,b] in R by XTUPLE_0:def 12; A7: a in field R & b in field R by A6,RELAT_1:15; then [b,a] in R by A4,A6,Def3; hence [a,a] in R by A3,A6,A7,Def8; end; now assume a in rng R; then consider b such that A9: [b,a] in R by XTUPLE_0:def 13; A10: a in field R & b in field R by A9,RELAT_1:15; then [a,b] in R by A4,A9,Def3; hence [a,a] in R by A3,A9,A10,Def8; end; hence thesis by A5,XBOOLE_0:def 3; end; end; registration let X; cluster id X -> symmetric transitive antisymmetric; coherence proof thus id X is symmetric proof let a,b; assume that a in field(id X) and b in field(id X) and A1: [a,b] in id X; a = b by A1,RELAT_1:def 10; hence thesis by A1; end; thus id X is transitive proof let a,b,c; thus thesis by RELAT_1:def 10; end; thus id X is antisymmetric proof let a,b; thus thesis by RELAT_1:def 10; end; end; end; registration cluster irreflexive transitive -> asymmetric for Relation; coherence proof let R be Relation; assume that A4: R is_irreflexive_in field R and A3: R is_transitive_in field R; let a,b; assume that A5: a in field R and A6: b in field R; not [a,a] in R by A4,A5,Def2; hence thesis by A3,A5,A6,Def8; end; cluster asymmetric -> irreflexive antisymmetric for Relation; coherence proof let R be Relation; assume A1: R is_asymmetric_in field R; then for x holds x in field R implies not [x,x] in R by Def5; hence R is irreflexive by Def2,Def10; for x,y holds x in field R & y in field R & [x,y] in R & [y,x] in R implies x = y by A1,Def5; hence thesis by Def4,Def12; end; end; registration let R be reflexive Relation; cluster R~ -> reflexive; coherence proof A1: R is_reflexive_in field R by Def9; let x; assume x in field(R~); then x in field R by RELAT_1:21; then [x,x] in R by A1,Def1; hence [x,x] in R~ by RELAT_1:def 7; end; end; registration let R be irreflexive Relation; cluster R~ -> irreflexive; coherence proof A1: R is_irreflexive_in field R by Def10; let x; assume x in field(R~); then x in field R by RELAT_1:21; then not [x,x] in R by A1,Def2; hence thesis by RELAT_1:def 7; end; end; theorem R is reflexive implies dom R = dom(R~) & rng R = rng(R~) proof assume A1: R is reflexive; then A2: R is_reflexive_in field R by Def9; A3: R~ is_reflexive_in field(R~) by A1,Def9; now let x; A4: now assume x in dom(R~); then x in field(R~) by XBOOLE_0:def 3; then [x,x] in R~ by A1,Def1,Def9; then [x,x] in R by RELAT_1:def 7; hence x in dom R by XTUPLE_0:def 12; end; now assume x in dom R; then x in field R by XBOOLE_0:def 3; then [x,x] in R by A1,Def1,Def9; then [x,x] in R~ by RELAT_1:def 7; hence x in dom(R~) by XTUPLE_0:def 12; end; hence x in dom R iff x in dom(R~) by A4; end; hence dom R = dom(R~) by TARSKI:1; now let x; A5: now assume x in rng(R~); then x in field(R~) by XBOOLE_0:def 3; then [x,x] in R~ by A3,Def1; then [x,x] in R by RELAT_1:def 7; hence x in rng R by XTUPLE_0:def 13; end; now assume x in rng R; then x in field R by XBOOLE_0:def 3; then [x,x] in R by A2,Def1; then [x,x] in R~ by RELAT_1:def 7; hence x in rng(R~) by XTUPLE_0:def 13; end; hence x in rng R iff x in rng(R~) by A5; end; hence thesis by TARSKI:1; end; theorem Th13: R is symmetric iff R = R~ proof hereby assume R is symmetric; then A2: R is_symmetric_in field R by Def11; now let a,b; A3: now assume [a,b] in R~; then A4: [b,a] in R by RELAT_1:def 7; then a in field R & b in field R by RELAT_1:15; hence [a,b] in R by A2,A4,Def3; end; now assume A5: [a,b] in R; then a in field R & b in field R by RELAT_1:15; then [b,a] in R by A2,A5,Def3; hence [a,b] in R~ by RELAT_1:def 7; end; hence [a,b] in R iff [a,b] in R~ by A3; end; hence R = R~ by RELAT_1:def 2; end; assume R = R~; then for a,b holds a in field R & b in field R & [a,b] in R implies [b,a] in R by RELAT_1:def 7; hence thesis by Def3,Def11; end; registration let P,R be reflexive Relation; cluster P \/ R -> reflexive; coherence proof A3: R is_reflexive_in field R by Def9; A4: P is_reflexive_in field P by Def9; now let a; A5: now assume a in field P; then [a,a] in P by A4,Def1; hence [a,a] in P \/ R by XBOOLE_0:def 3; end; A6: now assume a in field R; then [a,a] in R by A3,Def1; hence [a,a] in P \/ R by XBOOLE_0:def 3; end; assume a in field(P \/ R); then a in field P \/ field R by RELAT_1:18; hence [a,a] in P \/ R by A5,A6,XBOOLE_0:def 3; end; hence P \/ R is reflexive by Def1,Def9; end; cluster P /\ R -> reflexive; coherence proof A3: R is_reflexive_in field R by Def9; A4: P is_reflexive_in field P by Def9; now let a; assume A7: a in field(P /\ R); A8: field(P /\ R) c= field P /\ field R by RELAT_1:19; then a in field R by A7,XBOOLE_0:def 4; then A9: [a,a] in R by A3,Def1; a in field P by A8,A7,XBOOLE_0:def 4; then [a,a] in P by A4,Def1; hence [a,a] in P /\ R by A9,XBOOLE_0:def 4; end; hence thesis by Def1,Def9; end; end; registration let P,R be irreflexive Relation; cluster P \/ R -> irreflexive; coherence proof A3: P is_irreflexive_in field P by Def10; A4: R is_irreflexive_in field R by Def10; let a; A5: now assume a in field P; then A6: not [a,a] in P by A3,Def2; A7: not a in field R implies not [a,a] in R by RELAT_1:15; a in field R implies not [a,a] in R by A4,Def2; hence not [a,a] in P \/ R by A6,A7,XBOOLE_0:def 3; end; A8: now assume a in field R; then A9: not [a,a] in R by A4,Def2; A10: not a in field P implies not [a,a] in P by RELAT_1:15; a in field P implies not [a,a] in P by A3,Def2; hence not [a,a] in P \/ R by A9,A10,XBOOLE_0:def 3; end; assume a in field(P \/ R); then a in field P \/ field R by RELAT_1:18; hence not [a,a] in P \/ R by A5,A8,XBOOLE_0:def 3; end; cluster P /\ R -> irreflexive; coherence proof let a; assume A11: a in field(P /\ R); field(P /\ R) c= (field P) /\ (field R) by RELAT_1:19; then a in field P by A11,XBOOLE_0:def 4; then not [a,a] in P by Def10,Def2; hence thesis by XBOOLE_0:def 4; end; end; registration let P be irreflexive Relation; let R be Relation; cluster P \ R -> irreflexive; coherence proof A1: P is_irreflexive_in field P by Def10; let a; A2: now assume a in dom(P \ R); then consider b such that A3: [a,b] in P \ R by XTUPLE_0:def 12; [a,b] in P by A3,XBOOLE_0:def 5; then a in field P by RELAT_1:15; hence not [a,a] in P by A1,Def2; end; now assume a in rng(P \ R); then consider b such that A5: [b,a] in P \ R by XTUPLE_0:def 13; [b,a] in P by A5,XBOOLE_0:def 5; then a in field P by RELAT_1:15; hence not [a,a] in P by A1,Def2; end; hence thesis by A2,XBOOLE_0:def 3,def 5; end; end; registration let R be symmetric Relation; cluster R~ -> symmetric; coherence by Th13; end; registration let P,R be symmetric Relation; cluster P \/ R -> symmetric; coherence proof A3: R is_symmetric_in field R by Def11; A4: P is_symmetric_in field P by Def11; now let a,b; assume that a in field(P \/ R) and b in field(P \/ R) and A5: [a,b] in P \/ R; A6: now assume A7: [a,b] in R; then a in field R & b in field R by RELAT_1:15; then [b,a] in R by A3,A7,Def3; hence [b,a] in P \/ R by XBOOLE_0:def 3; end; now assume A8: [a,b] in P; then a in field P & b in field P by RELAT_1:15; then [b,a] in P by A4,A8,Def3; hence [b,a] in P \/ R by XBOOLE_0:def 3; end; hence [b,a] in P \/ R by A5,A6,XBOOLE_0:def 3; end; hence thesis by Def3,Def11; end; cluster P /\ R -> symmetric; coherence proof A3: R is_symmetric_in field R by Def11; A4: P is_symmetric_in field P by Def11; now let a,b; assume that A9: a in field(P /\ R) & b in field(P /\ R) and A10: [a,b] in P /\ R; A11: [a,b] in R by A10,XBOOLE_0:def 4; A12: field(P /\ R) c= field P /\ field R by RELAT_1:19; then a in field R & b in field R by A9,XBOOLE_0:def 4; then A13: [b,a] in R by A3,A11,Def3; A14: [a,b] in P by A10,XBOOLE_0:def 4; a in field P & b in field P by A12,A9,XBOOLE_0:def 4; then [b,a] in P by A4,A14,Def3; hence [b,a] in P /\ R by A13,XBOOLE_0:def 4; end; hence thesis by Def3,Def11; end; cluster P \ R -> symmetric; coherence proof A3: R is_symmetric_in field R by Def11; A4: P is_symmetric_in field P by Def11; now let a,b; assume that a in field(P \ R) and b in field(P \ R) and A15: [a,b] in P \ R; not [a,b] in R by A15,XBOOLE_0:def 5; then A16: not b in field R or not a in field R or not [b,a] in R by A3,Def3; A17: [a,b] in P by A15,XBOOLE_0:def 5; then a in field P & b in field P by RELAT_1:15; then A18: [b,a] in P by A4,A17,Def3; ( not b in field R or not a in field R ) implies not [b,a] in R by RELAT_1:15; hence [b,a] in P \ R by A18,A16,XBOOLE_0:def 5; end; hence thesis by Def3,Def11; end; end; registration let R be asymmetric Relation; cluster R~ -> asymmetric; coherence proof A1: R is_asymmetric_in field R by Def13; let x,y; assume that A2: x in field(R~) & y in field(R~) and A3: [x,y] in R~; A4: [y,x] in R by A3,RELAT_1:def 7; x in field R & y in field R by A2,RELAT_1:21; then not [x,y] in R by A1,A4,Def5; hence thesis by RELAT_1:def 7; end; end; registration let P be Relation; let R be asymmetric Relation; cluster P /\ R -> asymmetric; coherence proof A1: R is_asymmetric_in field R by Def13; A2: field(P /\ R) c= (field P) /\ (field R) by RELAT_1:19; let a,b; assume that A3: a in field(P /\ R) & b in field(P /\ R) and A4: [a,b] in P /\ R; A5: [a,b] in R by A4,XBOOLE_0:def 4; a in field R & b in field R by A2,A3,XBOOLE_0:def 4; then not [b,a] in R by A1,A5,Def5; hence thesis by XBOOLE_0:def 4; end; cluster R /\ P -> asymmetric; coherence; end; registration let P be asymmetric Relation; let R be Relation; cluster P \ R -> asymmetric; coherence proof A1: P is_asymmetric_in field P by Def13; let a,b; assume that a in field(P \ R) and b in field(P \ R) and A2: [a,b] in P \ R; A3: [a,b] in P by A2,XBOOLE_0:def 5; then a in field P & b in field P by RELAT_1:15; then not [b,a] in P by A1,A3,Def5; hence thesis by XBOOLE_0:def 5; end; end; canceled 8; theorem R is antisymmetric iff R /\ (R~) c= id (dom R) proof A1: now assume R is antisymmetric; then A2: R is_antisymmetric_in field R by Def12; now let a,b; assume A3: [a,b] in R /\ (R~); then [a,b] in R~ by XBOOLE_0:def 4; then A4: [b,a] in R by RELAT_1:def 7; then A5: b in dom R by XTUPLE_0:def 12; A6: [a,b] in R by A3,XBOOLE_0:def 4; then a in field R & b in field R by RELAT_1:15; then a = b by A2,A6,A4,Def4; hence [a,b] in id (dom R) by A5,RELAT_1:def 10; end; hence R /\ (R~) c= id (dom R) by RELAT_1:def 3; end; now assume A7: R /\ (R~) c= id (dom R); now let a,b; assume that a in field R and b in field R and A8: [a,b] in R and A9: [b,a] in R; [a,b] in R~ by A9,RELAT_1:def 7; then [a,b] in R /\ (R~) by A8,XBOOLE_0:def 4; hence a = b by A7,RELAT_1:def 10; end; hence R is antisymmetric by Def4,Def12; end; hence thesis by A1; end; registration let R be antisymmetric Relation; cluster R~ -> antisymmetric; coherence proof let x,y; assume that A2: x in field(R~) & y in field(R~) and A3: [x,y] in R~ & [y,x] in R~; A4: [y,x] in R & [x,y] in R by A3,RELAT_1:def 7; x in field R & y in field R by A2,RELAT_1:21; hence x = y by A4,Def4,Def12; end; end; registration let P be antisymmetric Relation; let R be Relation; cluster P /\ R -> antisymmetric; coherence proof A1: P is_antisymmetric_in field P by Def12; let a,b; assume that a in field(P /\ R) & b in field(P /\ R) and A2: [a,b] in (P /\ R) and A3: [b,a] in (P /\ R); A4: [b,a] in P by A3,XBOOLE_0:def 4; A5: [a,b] in P by A2,XBOOLE_0:def 4; then a in field P & b in field P by RELAT_1:15; hence a = b by A1,A5,A4,Def4; end; cluster R /\ P -> antisymmetric; coherence; cluster P \ R -> antisymmetric; coherence proof A1: P is_antisymmetric_in field P by Def12; let a,b; assume that a in field(P \ R) & b in field(P \ R) and A6: [a,b] in P \ R and A7: [b,a] in P \ R; A8: [b,a] in P by A7,XBOOLE_0:def 5; A9: [a,b] in P by A6,XBOOLE_0:def 5; then a in field P & b in field P by RELAT_1:15; hence thesis by A1,A9,A8,Def4; end; end; registration let R be transitive Relation; cluster R~ -> transitive; coherence proof A1: R is_transitive_in field R by Def16; let x,y,z; assume that A2: x in field(R~) & y in field(R~) and A3: z in field(R~) and A4: [x,y] in R~ and A5: [y,z] in R~; A6: x in field R & y in field R by A2,RELAT_1:21; A7: [y,x] in R by A4,RELAT_1:def 7; z in field R & [z,y] in R by A3,A5,RELAT_1:21,def 7; then [z,x] in R by A1,A6,A7,Def8; hence thesis by RELAT_1:def 7; end; end; registration let P,R be transitive Relation; cluster P /\ R -> transitive; coherence proof A3: R is_transitive_in field R by Def16; A4: P is_transitive_in field P by Def16; let a,b,c; assume that a in field(P /\ R) & b in field(P /\ R) & c in field(P /\ R) and A5: [a,b] in P /\ R and A6: [b,c] in P /\ R; A7: [b,c] in R by A6,XBOOLE_0:def 4; then A8: c in field R by RELAT_1:15; A9: [a,b] in R by A5,XBOOLE_0:def 4; then a in field R & b in field R by RELAT_1:15; then A10: [a,c] in R by A3,A9,A7,A8,Def8; A11: [b,c] in P by A6,XBOOLE_0:def 4; then A12: c in field P by RELAT_1:15; A13: [a,b] in P by A5,XBOOLE_0:def 4; then a in field P & b in field P by RELAT_1:15; then [a,c] in P by A4,A13,A11,A12,Def8; hence thesis by A10,XBOOLE_0:def 4; end; end; canceled 4; theorem R is transitive iff R*R c= R proof hereby assume R is transitive; then A2: R is_transitive_in field R by Def16; now let a,b; assume [a,b] in R*R; then consider c such that A3: [a,c] in R and A4: [c,b] in R by RELAT_1:def 8; A5: c in field R by A3,RELAT_1:15; a in field R & b in field R by A3,A4,RELAT_1:15; hence [a,b] in R by A2,A3,A4,A5,Def8; end; hence R*R c= R by RELAT_1:def 3; end; assume A6: R*R c= R; let a,b,c; assume a in field R & b in field R & c in field R; assume [a,b] in R & [b,c] in R; then [a,c] in R*R by RELAT_1:def 8; hence thesis by A6; end; theorem R is connected iff [:field R,field R:] \ id (field R) c= R \/ R~ proof hereby assume R is connected; then A2: R is_connected_in field R by Def14; now let x; now assume A3: x in [:field R, field R:] \ id (field R); then x in [:field R, field R:] by XBOOLE_0:def 5; then consider y,z such that A4: y in field R and A5: z in field R and A6: x = [y,z] by ZFMISC_1:def 2; not x in id (field R) by A3,XBOOLE_0:def 5; then y <> z by A4,A6,RELAT_1:def 10; then [y,z] in R or [z,y] in R by A2,A4,A5,Def6; then [y,z] in R or [y,z] in R~ by RELAT_1:def 7; hence x in R \/ R~ by A6,XBOOLE_0:def 3; end; hence x in [:field R, field R:] \ id (field R) implies x in R \/ R~; end; hence [:field R, field R:] \ id (field R) c= R \/ R~ by TARSKI:def 3; end; assume A7: [:field R, field R:] \ id (field R) c= R \/ R~; let a,b; [a,b] in [:field R, field R:] \ id (field R) implies [a,b] in R \/ R~ by A7; then [a,b] in [:field R, field R:] & not [a,b] in id (field R) implies [a,b] in R \/ R~ by XBOOLE_0:def 5; then a in field R & b in field R & a <> b implies [a,b] in R or [a,b] in R~ by RELAT_1:def 10,XBOOLE_0:def 3,ZFMISC_1:87; hence thesis by RELAT_1:def 7; end; registration cluster strongly_connected -> connected reflexive for Relation; coherence proof let R be Relation; assume A1: R is_strongly_connected_in field R; then for x,y holds x in field R & y in field R & x <> y implies ( [x,y] in R or [y,x] in R) by Def7; hence R is connected by Def6,Def14; let x; thus thesis by A1,Def7; end; end; canceled; theorem R is strongly_connected iff [:field R, field R:] = R \/ R~ proof hereby assume A2: R is strongly_connected; now let x; A3: now assume A4: x in R \/ R~; then consider y,z such that A5: x = [y,z] by RELAT_1:def 1; [y,z] in R or [y,z] in R~ by A4,A5,XBOOLE_0:def 3; then [y,z] in R or [z,y] in R by RELAT_1:def 7; then y in field R & z in field R by RELAT_1:15; hence x in [:field R, field R:] by A5,ZFMISC_1:87; end; now assume x in [:field R, field R:]; then consider y,z such that A6: y in field R & z in field R and A7: x = [y,z] by ZFMISC_1:def 2; [y,z] in R or [z,y] in R by A2,A6,Def7,Def15; then [y,z] in R or [y,z] in R~ by RELAT_1:def 7; hence x in R \/ R~ by A7,XBOOLE_0:def 3; end; hence x in [:field R, field R:] iff x in R \/ R~ by A3; end; hence [:field R, field R:] = R \/ R~ by TARSKI:1; end; assume A8: [:field R, field R:] = R \/ R~; let a,b; a in field R & b in field R implies [a,b] in R \/ R~ by A8,ZFMISC_1:87; then a in field R & b in field R implies [a,b] in R or [a,b] in R~ by XBOOLE_0:def 3; hence thesis by RELAT_1:def 7; end; theorem R is transitive iff for x,y,z st [x,y] in R & [y,z] in R holds [x,z] in R proof hereby assume A1: R is transitive; let x,y,z; assume that A2: [x,y] in R and A3: [y,z] in R; A4: z in field R by A3,RELAT_1:15; x in field R & y in field R by A2,RELAT_1:15; hence [x,z] in R by A1,A2,A3,A4,Def8,Def16; end; assume for x,y,z st [x,y] in R & [y,z] in R holds [x,z] in R; then x in field R & y in field R & z in field R & [x,y] in R & [y,z] in R implies [x,z] in R; hence R is_transitive_in field R by Def8; end; begin reserve X,Y,Z,X1,X2,X3,X4,X5,X6,x,y for set; canceled 4; theorem Th5: Y in X implies not X c= Y proof assume A1: Y in X; assume X c= Y; then Y in Y by A1; hence contradiction; end; definition let X; func succ X -> set equals X \/ { X }; coherence; end; registration let X; cluster succ X -> non empty; coherence; end; theorem Th6: X in succ X proof X in { X } by TARSKI:def 1; hence thesis by XBOOLE_0:def 3; end; theorem succ X = succ Y implies X = Y proof assume that A1: succ X = succ Y and A2: X <> Y; Y in X \/ { X } by A1,Th6; then A3: Y in X or Y in { X } by XBOOLE_0:def 3; X in Y \/ { Y } by A1,Th6; then X in Y or X in { Y } by XBOOLE_0:def 3; hence contradiction by A2,A3,TARSKI:def 1; end; theorem Th8: x in succ X iff x in X or x = X proof thus x in succ X implies x in X or x = X proof assume x in succ X; then x in X or x in { X } by XBOOLE_0:def 3; hence thesis by TARSKI:def 1; end; assume x in X or x = X; then x in X or x in { X } by TARSKI:def 1; hence thesis by XBOOLE_0:def 3; end; theorem Th9: X <> succ X proof assume A1: X = succ X; X in succ X by Th6; hence contradiction by A1; end; reserve a,b,c,X,Y,Z,x,y,z for set; definition let X; attr X is epsilon-transitive means :Def2: for x st x in X holds x c= X; attr X is epsilon-connected means :Def3: for x,y st x in X & y in X holds x in y or x = y or y in x; end; Lm1: {} is epsilon-transitive & {} is epsilon-connected proof thus x in {} implies x c= {}; thus x in {} & y in {} implies x in y or x = y or y in x; end; definition let IT be set; attr IT is ordinal means :Def4: IT is epsilon-transitive epsilon-connected; end; registration cluster ordinal -> epsilon-transitive epsilon-connected for set; coherence by Def4; cluster epsilon-transitive epsilon-connected -> ordinal for set; coherence by Def4; end; notation synonym number for set; end; registration cluster ordinal for number; existence by Lm1; end; definition mode Ordinal is ordinal number; end; reserve A,B,C,D for Ordinal; theorem Th10: for A,B being set, C being epsilon-transitive set st A in B & B in C holds A in C proof let A,B be set, C be epsilon-transitive set; assume that A1: A in B and A2: B in C; B c= C by A2,Def2; hence thesis by A1; end; theorem Th11: for x being epsilon-transitive set, A being Ordinal st x c< A holds x in A proof let x be epsilon-transitive set, A be Ordinal; set a = the Element of A \ x; assume A1: x c< A; then A2: x c= A by XBOOLE_0:def 8; A \ x <> {} proof assume A \ x = {}; then A c= x by XBOOLE_1:37; hence contradiction by A1,XBOOLE_1:60; end; then a in A \ x; then consider y such that A3: y in A \ x and A4: not ex a st a in A \ x & a in y by TARSKI:2; A5: not y in x by A3,XBOOLE_0:def 5; now let a; assume a in x; then consider z such that A6: z = a and A7: z in x; z c= x by A7,Def2; then not y in z by A3,XBOOLE_0:def 5; hence a in y by A2,A3,A5,A6,A7,Def3; end; then A8: x c= y by TARSKI:def 3; A9: y c= A by A3,Def2; now let a; assume A10: a in y; then not a in A \ x by A4; hence a in x by A9,A10,XBOOLE_0:def 5; end; then A11: y c= x by TARSKI:def 3; y in A by A3; hence thesis by A11,A8,XBOOLE_0:def 10; end; theorem for A being epsilon-transitive set, B, C being Ordinal st A c= B & B in C holds A in C proof let A be epsilon-transitive set, B, C be Ordinal; assume that A1: A c= B and A2: B in C; B c= C by A2,Def2; then A3: A c= C by A1,XBOOLE_1:1; A <> C by A1,A2,Th5; then A c< C by A3,XBOOLE_0:def 8; hence thesis by Th11; end; theorem Th13: a in A implies a is Ordinal proof assume A1: a in A; then A2: a c= A by Def2; now let y; assume A3: y in a; then A4: y c= A by A2,Def2; assume not y c= a; then consider b such that A5: b in y & not b in a by TARSKI:def 3; b in y \ a by A5,XBOOLE_0:def 5; then consider z such that A6: z in y \ a and not ex c st c in y \ a & c in z by TARSKI:2; z in y by A6; then z in a or z = a or a in z by A1,A4,Def3; hence contradiction by A3,A6,XREGULAR:7,XBOOLE_0:def 5; end; then A7: a is epsilon-transitive by Def2; for y,z st y in a & z in a holds y in z or y = z or z in y by A2,Def3; then a is epsilon-connected by Def3; hence thesis by A7; end; theorem Th14: A in B or A = B or B in A proof assume that A1: not A in B and A2: A <> B; not A c< B by A1,Th11; then not A c= B by A2,XBOOLE_0:def 8; then consider a such that A3: a in A & not a in B by TARSKI:def 3; a in A \ B by A3,XBOOLE_0:def 5; then consider X such that A4: X in A \ B and A5: not ex a st a in A \ B & a in X by TARSKI:2; A6: X c= A by A4,Def2; now let b; assume A7: b in X; then not b in A \ B by A5; hence b in B by A6,A7,XBOOLE_0:def 5; end; then X c= B by TARSKI:def 3; then A8: X c< B or X = B by XBOOLE_0:def 8; ( not X in B)& X is Ordinal by A4,Th13,XBOOLE_0:def 5; hence thesis by A4,A8,Th11; end; definition let A,B; redefine pred A c= B means for C st C in A holds C in B; compatibility proof thus A c= B implies for C st C in A holds C in B; assume A1: for C st C in A holds C in B; let x; assume A2: x in A; then reconsider C = x as Ordinal by Th13; C in B by A1,A2; hence thesis; end; connectedness proof let A,B; given C such that A3: C in A & not C in B; let D; A in B or A = B or B in A by Th14; hence thesis by A3,Th10; end; end; theorem A,B are_c=-comparable proof A c= B or B c= A; hence thesis by XBOOLE_0:def 9; end; theorem Th16: A c= B or B in A proof A in B or A = B or B in A by Th14; hence thesis by Def2; end; registration cluster empty -> ordinal for number; coherence by Lm1; end; theorem Th17: x is Ordinal implies succ x is Ordinal proof A1: now let y; A2: y in { x } implies y = x by TARSKI:def 1; assume y in succ x; hence y in x or y = x by A2,XBOOLE_0:def 3; end; assume A3: x is Ordinal; now let y; A4: y = x implies y c= succ x by XBOOLE_1:7; A5: now assume y in x; then A6: y c= x by A3,Def2; x c= x \/ { x } by XBOOLE_1:7; hence y c= succ x by A6,XBOOLE_1:1; end; assume y in succ x; hence y c= succ x by A1,A5,A4; end; then A7: succ x is epsilon-transitive by Def2; now let y,z; assume that A8: y in succ x and A9: z in succ x; A10: z in x or z = x by A1,A9; y in x or y = x by A1,A8; hence y in z or y = z or z in y by A3,A10,Def3; end; then succ x is epsilon-connected by Def3; hence thesis by A7; end; theorem Th18: x is ordinal implies union x is ordinal proof assume x is epsilon-transitive & x is epsilon-connected; then reconsider A = x as Ordinal; thus y in union x implies y c= union x proof assume y in union x; then consider z such that A1: y in z and A2: z in x by TARSKI:def 4; z in A by A2; then reconsider z as Ordinal by Th13; z c= A by A2,Def2; hence thesis by A1,ZFMISC_1:74; end; let y,z; assume that A3: y in union x and A4: z in union x; consider X such that A5: y in X and A6: X in x by A3,TARSKI:def 4; A7: X in A by A6; consider Y such that A8: z in Y and A9: Y in x by A4,TARSKI:def 4; reconsider X,Y as Ordinal by A9,A7,Th13; z in Y by A8; then A10: z is Ordinal by Th13; y in X by A5; then y is Ordinal by Th13; hence thesis by A10,Th14; end; registration cluster non empty for Ordinal; existence proof reconsider A = succ {} as Ordinal by Th17; take A; thus thesis; end; end; registration let A; cluster succ A -> non empty ordinal; coherence by Th17; cluster union A -> ordinal; coherence by Th18; end; theorem Th19: (for x st x in X holds x is Ordinal & x c= X) implies X is ordinal proof assume A1: for x st x in X holds x is Ordinal & x c= X; thus X is epsilon-transitive proof let x; assume x in X; hence thesis by A1; end; let x,y; assume x in X & y in X; then x is Ordinal & y is Ordinal by A1; hence thesis by Th14; end; theorem Th20: X c= A & X <> {} implies ex C st C in X & for B st B in X holds C c= B proof set a = the Element of X; assume that A1: X c= A and A2: X <> {}; a in X by A2; then consider Y such that A3: Y in X and A4: not ex a st a in X & a in Y by TARSKI:2; Y is Ordinal by A1,A3,Th13; then consider C such that A5: C = Y; take C; thus C in X by A3,A5; let B; assume B in X; then not B in C by A4,A5; then B = C or C in B by Th14; hence thesis by Def2; end; theorem Th21: A in B iff succ A c= B proof thus A in B implies succ A c= B proof assume A1: A in B; then a in { A } implies a in B by TARSKI:def 1; then A2: { A } c= B by TARSKI:def 3; A c= B by A1,Def2; hence thesis by A2,XBOOLE_1:8; end; assume A3: succ A c= B; A in succ A by Th6; hence thesis by A3; end; theorem Th22: A in succ C iff A c= C proof thus A in succ C implies A c= C proof assume A in succ C; then A in C or A in { C } by XBOOLE_0:def 3; hence thesis by Def2,TARSKI:def 1; end; assume A1: A c= C; assume not A in succ C; then A = succ C or succ C in A by Th14; then A2: succ C c= C by A1,Def2; C in succ C by Th6; then C c= succ C by Def2; then succ C = C by A2,XBOOLE_0:def 10; hence contradiction by Th9; end; scheme OrdinalMin { P[Ordinal] } : ex A st P[A] & for B st P[B] holds A c= B provided A1: ex A st P[A] proof consider A such that A2: P[A] by A1; defpred R[set] means ex B st $1 = B & P[B]; consider X such that A3: x in X iff x in succ A & R[x] from XBOOLE_0:sch 1; for a holds a in X implies a in succ A by A3; then A4: X c= succ A by TARSKI:def 3; A in succ A by Th6; then X <> {} by A2,A3; then consider C such that A5: C in X and A6: for B st B in X holds C c= B by A4,Th20; C in succ A by A3,A5; then A7: C c= succ A by Def2; take C; ex B st C = B & P[B] by A3,A5; hence P[C]; let B; assume A8: P[B]; assume A9: not C c= B; then B c< C by XBOOLE_0:def 8; then B in C by Th11; then B in X by A3,A8,A7; hence contradiction by A6,A9; end; scheme TransfiniteInd { P[Ordinal] } : for A holds P[A] provided A1: for A st for C st C in A holds P[C] holds P[A] proof defpred R[set] means ex B st $1 = B & P[B]; let A; set Y = succ A; consider Z such that A2: x in Z iff x in Y & R[x] from XBOOLE_0:sch 1; now assume Y \ Z <> {}; then consider C such that A3: C in Y \ Z and A4: for B st B in Y \ Z holds C c= B by Th20; now let B such that A5: B in C; A6: C c= Y by A3,Def2; now assume not B in Z; then B in Y \ Z by A5,A6,XBOOLE_0:def 5; then A7: C c= B by A4; C <> B by A5; then C c< B by A7,XBOOLE_0:def 8; hence contradiction by A5,Th11; end; then ex B9 being Ordinal st B = B9 & P[B9] by A2; hence P[B]; end; then A8: P[C] by A1; not C in Z by A3,XBOOLE_0:def 5; hence contradiction by A2,A3,A8; end; then not A in Y or A in Z by XBOOLE_0:def 5; then ex B st A = B & P[B] by A2,Th6; hence thesis; end; theorem Th23: for X st for a st a in X holds a is Ordinal holds union X is ordinal proof let X such that A1: for a st a in X holds a is Ordinal; thus union X is epsilon-transitive proof let x; assume x in union X; then consider Y such that A2: x in Y and A3: Y in X by TARSKI:def 4; Y is Ordinal by A1,A3; then A4: x c= Y by A2,Def2; let a; assume a in x; hence thesis by A3,A4,TARSKI:def 4; end; let x,y; assume that A5: x in union X and A6: y in union X; consider Z such that A7: y in Z and A8: Z in X by A6,TARSKI:def 4; Z is Ordinal by A1,A8; then A9: y is Ordinal by A7,Th13; consider Y such that A10: x in Y and A11: Y in X by A5,TARSKI:def 4; Y is Ordinal by A1,A11; then x is Ordinal by A10,Th13; hence thesis by A9,Th14; end; theorem Th24: for X st for a st a in X holds a is Ordinal ex A st X c= A proof let X; assume A1: for a st a in X holds a is Ordinal; then A2: union X is Ordinal by Th23; then reconsider A = succ(union X) as Ordinal; take A; let a; assume A3: a in X; then reconsider B = a as Ordinal by A1; b in B implies b in union X by A3,TARSKI:def 4; then B c= union X by TARSKI:def 3; hence thesis by A2,Th22; end; theorem Th25: not ex X st for x holds x in X iff x is Ordinal proof given X such that A1: for x holds x in X iff x is Ordinal; A2: X is epsilon-transitive proof let x; assume x in X; then A3: x is Ordinal by A1; thus thesis proof let a; assume a in x; then a is Ordinal by A3,Th13; hence thesis by A1; end; end; X is epsilon-connected proof let x,y; assume x in X & y in X; then x is Ordinal & y is Ordinal by A1; hence thesis by Th14; end; then X in X by A1,A2; hence contradiction; end; theorem Th26: not ex X st for A holds A in X proof defpred P[set] means $1 is Ordinal; given X such that A1: A in X; consider Y such that A2: a in Y iff a in X & P[a] from XBOOLE_0:sch 1; now let x; assume A3: x is Ordinal; then x in X by A1; hence x in Y by A2,A3; end; then x in Y iff x is Ordinal by A2; hence contradiction by Th25; end; theorem for X ex A st not A in X & for B st not B in X holds A c= B proof let X; defpred P[set] means not $1 in X; consider B such that A1: not B in X by Th26; consider Y such that A2: a in Y iff a in succ B & P[a] from XBOOLE_0:sch 1; for a holds a in Y implies a in succ B by A2; then A3: Y c= succ B by TARSKI:def 3; B in succ B by Th6; then Y <> {} by A1,A2; then consider A such that A4: A in Y and A5: for B st B in Y holds A c= B by A3,Th20; A in succ B by A2,A4; then A6: A c= succ B by Def2; take A; thus not A in X by A2,A4; let C; assume A7: not C in X; assume A8: not A c= C; then not A in C by Def2; then C in A by A8,Th14; then C in Y by A2,A7,A6; hence contradiction by A5,A8; end; definition let A be set; attr A is limit_ordinal means :Def6: A = union A; end; theorem Th28: for A holds A is limit_ordinal iff for C st C in A holds succ C in A proof let A; thus A is limit_ordinal implies for C st C in A holds succ C in A proof assume A is limit_ordinal; then A1: A = union A by Def6; let C; assume C in A; then consider z such that A2: C in z and A3: z in A by A1,TARSKI:def 4; for b holds b in { C } implies b in z by A2,TARSKI:def 1; then A4: { C } c= z by TARSKI:def 3; A5: z is Ordinal by A3,Th13; then C c= z by A2,Def2; then succ C c= z by A4,XBOOLE_1:8; then succ C = z or succ C c< z by XBOOLE_0:def 8; then A6: succ C = z or succ C in z by A5,Th11; z c= A by A3,Def2; hence thesis by A3,A6; end; assume A7: for C st C in A holds succ C in A; now let a; assume A8: a in A; then a is Ordinal by Th13; then A9: succ a in A by A7,A8; a in succ a by Th6; hence a in union A by A9,TARSKI:def 4; end; then A10: A c= union A by TARSKI:def 3; now let a; assume a in union A; then consider z such that A11: a in z and A12: z in A by TARSKI:def 4; z c= A by A12,Def2; hence a in A by A11; end; then union A c= A by TARSKI:def 3; then A = union A by A10,XBOOLE_0:def 10; hence thesis by Def6; end; theorem not A is limit_ordinal iff ex B st A = succ B proof thus not A is limit_ordinal implies ex B st A = succ B proof assume not A is limit_ordinal; then consider B such that A1: B in A and A2: not succ B in A by Th28; take B; assume A3: A <> succ B; succ B c= A by A1,Th21; then succ B c< A by A3,XBOOLE_0:def 8; hence contradiction by A2,Th11; end; given B such that A4: A = succ B; B in A & not succ B in A by A4,Th6; hence thesis by Th28; end; reserve F,G for Function; definition let IT be set; attr IT is T-Sequence-like means :Def7: proj1 IT is ordinal; end; registration cluster empty -> T-Sequence-like for set; coherence proof let E be set; assume E is empty; then proj1 E = {}; hence thesis by Def7; end; end; definition mode T-Sequence is T-Sequence-like Function; end; registration let Z; cluster Z-valued for T-Sequence; existence proof reconsider L = {} as T-Sequence; take L; rng {} = {}; hence rng L c= Z by XBOOLE_1:2; end; end; definition let Z; mode T-Sequence of Z is Z-valued T-Sequence; end; theorem {} is T-Sequence of Z proof reconsider L = {} as T-Sequence; rng L = {}; then rng L c= Z by XBOOLE_1:2; hence thesis by RELAT_1:def 19; end; reserve L,L1 for T-Sequence; theorem dom F is Ordinal implies F is T-Sequence of rng F by Def7,RELAT_1:def 19; registration let L; cluster dom L -> ordinal; coherence by Def7; end; theorem X c= Y implies for L being T-Sequence of X holds L is T-Sequence of Y proof assume A1: X c= Y; let L be T-Sequence of X; rng L c= X by RELAT_1:def 19; then rng L c= Y by A1,XBOOLE_1:1; hence thesis by RELAT_1:def 19; end; registration let L,A; cluster L|A -> rng L-valued T-Sequence-like; coherence proof A1: rng(L|A) c= rng L by RELAT_1:70; A c= dom L implies dom(L|A) = A by RELAT_1:62; hence thesis by A1,Def7,RELAT_1:68,def 19; end; end; theorem for L being T-Sequence of X for A holds L|A is T-Sequence of X; definition let IT be set; attr IT is c=-linear means :Def8: for x,y being set st x in IT & y in IT holds x,y are_c=-comparable; end; theorem (for a st a in X holds a is T-Sequence) & X is c=-linear implies union X is T-Sequence proof assume that A1: for a st a in X holds a is T-Sequence and A2: X is c=-linear; union X is Relation-like Function-like proof thus a in union X implies ex b,c st [b,c] = a proof assume a in union X; then consider x such that A3: a in x and A4: x in X by TARSKI:def 4; reconsider x as T-Sequence by A1,A4; for a st a in x holds ex b,c st [b,c] = a by RELAT_1:def 1; hence thesis by A3; end; let a,b,c; assume that A5: [a,b] in union X and A6: [a,c] in union X; consider y such that A7: [a,c] in y and A8: y in X by A6,TARSKI:def 4; reconsider y as T-Sequence by A1,A8; consider x such that A9: [a,b] in x and A10: x in X by A5,TARSKI:def 4; reconsider x as T-Sequence by A1,A10; x,y are_c=-comparable by A2,A10,A8,Def8; then x c= y or y c= x by XBOOLE_0:def 9; hence thesis by A9,A7,FUNCT_1:def 1; end; then reconsider F = union X as Function; defpred P[set,set] means $1 in X & for L st L = $1 holds dom L = $2; A11: for a,b,c st P[a,b] & P[a,c] holds b = c proof let a,b,c; assume that A12: a in X and A13: for L st L = a holds dom L = b and a in X and A14: for L st L = a holds dom L = c; reconsider a as T-Sequence by A1,A12; dom a = b by A13; hence thesis by A14; end; consider G such that A15: [a,b] in G iff a in X & P[a,b] from FUNCT_1:sch 1(A11); A16: [a,b] in G implies b is Ordinal proof assume A17: [a,b] in G; then a in X by A15; then reconsider a as T-Sequence by A1; dom a = b by A15,A17; hence thesis; end; a in rng G implies a is Ordinal proof assume a in rng G; then consider b such that A18: b in dom G & a = G.b by FUNCT_1:def 3; [b,a] in G by A18,FUNCT_1:1; hence thesis by A16; end; then consider A such that A19: rng G c= A by Th24; defpred P[Ordinal] means for B st B in rng G holds B c= $1; for B st B in rng G holds B c= A by A19,Def2; then A20: ex A st P[A]; consider A such that A21: P[A] & for C st P[C] holds A c= C from OrdinalMin(A20); dom F = A proof thus a in dom F implies a in A proof assume a in dom F; then consider b such that A22: [a,b] in F by XTUPLE_0:def 12; consider x such that A23: [a,b] in x and A24: x in X by A22,TARSKI:def 4; reconsider x as T-Sequence by A1,A24; for L st L = x holds dom L = dom x; then [x,dom x] in G by A15,A24; then x in dom G & dom x = G.x by FUNCT_1:1; then dom x in rng G by FUNCT_1:def 3; then A25: dom x c= A by A21; a in dom x by A23,XTUPLE_0:def 12; hence thesis by A25; end; let a; assume A26: a in A; then reconsider a9 = a as Ordinal by Th13; now assume A27: for L st L in X holds not a9 in dom L; now let B; assume B in rng G; then consider c such that A28: c in dom G & B = G.c by FUNCT_1:def 3; A29: [c,B] in G by A28,FUNCT_1:1; then c in X by A15; then reconsider c as T-Sequence by A1; c in X & dom c = B by A15,A29; hence B c= a9 by A27,Th16; end; then A30: A c= a9 by A21; a9 c= A by A26,Def2; then A = a by A30,XBOOLE_0:def 10; hence contradiction by A26; end; then consider L such that A31: L in X & a in dom L; L c= F & ex b st [a,b] in L by A31,XTUPLE_0:def 12,ZFMISC_1:74; hence thesis by XTUPLE_0:def 12; end; hence thesis by Def7; end; scheme TSUniq { A()->Ordinal, H(T-Sequence)->set, L1, L2() -> T-Sequence } : L1() = L2() provided A1: dom L1() = A() & for B,L st B in A() & L = L1()|B holds L1().B = H(L ) and A2: dom L2() = A() & for B,L st B in A() & L = L2()|B holds L2().B = H(L ) proof defpred P[set] means L1().$1 <> L2().$1; consider X such that A3: x in X iff x in A() & P[x] from XBOOLE_0:sch 1; for b holds b in X implies b in A() by A3; then A4: X c= A() by TARSKI:def 3; assume L1() <> L2(); then ex a st a in A() & L1().a <> L2().a by A1,A2,FUNCT_1:2; then X <> {} by A3; then consider B such that A5: B in X and A6: for C st C in X holds B c= C by A4,Th20; A7: B in A() by A3,A5; then A8: B c= A() by Def2; then A9: dom(L1()|B) = B by A1,RELAT_1:62; A10: dom(L2()|B) = B by A2,A8,RELAT_1:62; A11: now let C; assume A12: C in B; then not C in X by A6,Th5; hence L1().C = L2().C by A3,A8,A12; end; now let a; assume A13: a in B; then reconsider a9 = a as Ordinal by Th13; L1().a9 = L2().a9 & L1()|B.a = L1().a by A11,A9,A13,FUNCT_1:47; hence L1()|B.a = L2()|B.a by A10,A13,FUNCT_1:47; end; then A14: L1()|B = L2()|B by A9,A10,FUNCT_1:2; L1().B = H(L1()|B) & L2().B = H(L2()|B) by A1,A2,A7; hence contradiction by A3,A5,A14; end; scheme TSExist { A()->Ordinal,H(T-Sequence)->set } : ex L st dom L = A() & for B,L1 st B in A() & L1 = L|B holds L.B = H(L1) proof defpred S[Ordinal] means ex L st dom L = $1 & for B st B in $1 holds L.B = H (L|B); A1: for B st for C st C in B holds S[C] holds S[B] proof defpred P[set,set] means $1 is Ordinal & $2 is T-Sequence & for A,L st A = $1 & L = $2 holds dom L = A & for B st B in A holds L.B = H(L|B); let B such that A2: for C st C in B ex L st dom L = C & for D st D in C holds L.D = H( L|D); A3: for a,b,c st P[a,b] & P[a,c] holds b = c proof let a,b,c; assume that A4: a is Ordinal and A5: b is T-Sequence and A6: for A,L st A = a & L = b holds dom L = A & for B st B in A holds L.B = H(L|B) and a is Ordinal and A7: c is T-Sequence and A8: for A,L st A = a & L = c holds dom L = A & for B st B in A holds L.B = H(L|B); reconsider c as T-Sequence by A7; reconsider a as Ordinal by A4; A9: dom c = a & for B,L st B in a & L=c|B holds c.B = H(L) by A8; reconsider b as T-Sequence by A5; A10: dom b = a & for B,L st B in a & L=b|B holds b.B = H(L) by A6; b = c from TSUniq(A10,A9); hence thesis; end; consider G such that A11: [a,b] in G iff a in B & P[a,b] from FUNCT_1:sch 1(A3); defpred R[set,set] means ex L st L = G.$1 & $2 = H(L); A12: dom G = B proof thus a in dom G implies a in B proof assume a in dom G; then ex b st [a,b] in G by XTUPLE_0:def 12; hence thesis by A11; end; let a; assume A13: a in B; then reconsider a9 = a as Ordinal by Th13; consider L such that A14: dom L = a9 & for D st D in a9 holds L.D = H(L|D) by A2,A13; for A holds for K be T-Sequence holds A = a9 & K = L implies dom K = A & for B holds B in A implies K.B = H(K|B) by A14; then [a9,L] in G by A11,A13; hence thesis by XTUPLE_0:def 12; end; A15: for a st a in B ex b st R[a,b] proof let a; assume a in B; then consider c such that A16: [a,c] in G by A12,XTUPLE_0:def 12; reconsider L = c as T-Sequence by A11,A16; take H(L), L; thus L = G.a by A16,FUNCT_1:1; thus thesis; end; A17: for a,b,c st a in B & R[a,b] & R[a,c] holds b = c; consider F such that A18: dom F = B & for a being set st a in B holds R[a,F.a] from FUNCT_1 :sch 2(A17,A15); reconsider L = F as T-Sequence by A18,Def7; take L; thus dom L = B by A18; let D; assume A19: D in B; then consider K being T-Sequence such that A20: K = G.D and A21: F.D = H(K) by A18; A22: [D,K] in G by A12,A19,A20,FUNCT_1:1; then A23: dom K = D by A11; A24: now let C; assume A25: C in D; A26: now let A,L such that A27: A = C and A28: L = K|C; A29: C c= D by A25,Def2; hence A30: dom L = A by A23,A27,A28,RELAT_1:62; let B; assume A31: B in A; then B c= A by Def2; then A32: K|B = L|B by A27,A28,FUNCT_1:51; K.B = H(K|B) by A11,A22,A27,A29,A31; hence L.B = H(L|B) by A28,A30,A31,A32,FUNCT_1:47; end; C in B by A19,A25,Th10; then [C,K|C] in G by A11,A26; hence G.C = K|C by FUNCT_1:1; end; A33: now let a; assume A34: a in D; then reconsider A = a as Ordinal by Th13; A35: G.A = K|A & L|D.A = L.A by A24,A34,FUNCT_1:49; ex J being T-Sequence st J = G.A & F.A = H(J) by A18,A19,A34,Th10; hence L|D.a = K.a by A11,A22,A34,A35; end; D c= dom L by A18,A19,Def2; then dom(L|D) = D by RELAT_1:62; hence thesis by A21,A23,A33,FUNCT_1:2; end; for A holds S[A] from TransfiniteInd(A1); then consider L such that A36: dom L = A() and A37: for B st B in A() holds L.B = H(L|B); take L; thus dom L = A() by A36; let B,L1; assume B in A() & L1 = L|B; hence thesis by A37; end; scheme FuncTS { L() -> T-Sequence, F(Ordinal)->set, H(T-Sequence)->set } : for B st B in dom L() holds L().B = H(L()|B) provided A1: for A,a holds a = F(A) iff ex L st a = H(L) & dom L = A & for B st B in A holds L.B = H(L|B) and A2: for A st A in dom L() holds L().A = F(A) proof consider L such that F(dom L()) = H(L) and A3: dom L = dom L() and A4: for B st B in dom L() holds L.B = H(L|B) by A1; now let b; assume A5: b in dom L; then reconsider B = b as Ordinal by Th13; now take K = L|B; thus H(L|B) = H(K); A6: B c= dom L by A5,Def2; hence dom K = B by RELAT_1:62; let C; assume A7: C in B; then C c= B by Def2; then A8: L|C = K|C by FUNCT_1:51; K.C = L.C by A7,FUNCT_1:49; hence K.C = H(K|C) by A3,A4,A6,A7,A8; end; then F(B) = H(L|B) by A1 .= L.B by A3,A4,A5; hence L().b = L.b by A2,A3,A5; end; then L() = L by A3,FUNCT_1:2; hence thesis by A4; end; theorem A c< B or A = B or B c< A proof assume that A1: ( not A c< B)& not A = B and A2: not B c< A; not A c= B by A1,XBOOLE_0:def 8; hence contradiction by A2,XBOOLE_0:def 8; end; begin definition let X; func On X -> set means :Def9: x in it iff x in X & x is Ordinal; existence proof defpred P[set] means $1 is Ordinal; thus ex Y being set st for x being set holds x in Y iff x in X & P[x] from XBOOLE_0:sch 1; end; uniqueness proof defpred P[set] means $1 in X & $1 is Ordinal; let Y,Z such that A1: x in Y iff P[x] and A2: x in Z iff P[x]; thus Y = Z from XBOOLE_0:sch 2(A1,A2); end; func Lim X -> set means x in it iff x in X & ex A st x = A & A is limit_ordinal; existence proof defpred P[set] means ex A st $1 = A & A is limit_ordinal; thus ex Y being set st for x being set holds x in Y iff x in X & P[x] from XBOOLE_0:sch 1; end; uniqueness proof defpred P[set] means $1 in X & ex A st $1 = A & A is limit_ordinal; let Y,Z such that A3: x in Y iff P[x] and A4: x in Z iff P[x]; thus Y = Z from XBOOLE_0:sch 2(A3,A4); end; end; theorem Th36: for D ex A st D in A & A is limit_ordinal proof let D; consider Field being set such that A1: D in Field and A2: for X,Y holds X in Field & Y c= X implies Y in Field and A3: for X holds X in Field implies bool X in Field and for X holds X c= Field implies X,Field are_equipotent or X in Field by ZFMISC_1:112; for X st X in On Field holds X is Ordinal & X c= On Field proof let X; assume A4: X in On Field; then reconsider A = X as Ordinal by Def9; A5: A in Field by A4,Def9; thus X is Ordinal by A4,Def9; let y; assume A6: y in X; then y in A; then reconsider B = y as Ordinal by Th13; B c= A by A6,Def2; then B in Field by A2,A5; hence thesis by Def9; end; then reconsider ON = On Field as Ordinal by Th19; take ON; thus D in ON by A1,Def9; A in ON implies succ A in ON proof A7: succ A c= bool A proof let x; assume x in succ A; then x in A or x = A by Th8; then x c= A by Def2; hence thesis; end; assume A in ON; then A in Field by Def9; then bool A in Field by A3; then succ A in Field by A2,A7; hence thesis by Def9; end; hence thesis by Th28; end; definition func omega -> set means :Def11: {} in it & it is limit_ordinal & it is ordinal & for A st {} in A & A is limit_ordinal holds it c= A; existence proof defpred P[Ordinal] means {} in $1 & $1 is limit_ordinal; A1: ex A st P[A] by Th36; ex C st P[C] & for A st P[A] holds C c= A from OrdinalMin(A1); hence thesis; end; uniqueness proof let B,C be set; assume {} in B & B is limit_ordinal &( B is ordinal & for A st {} in A & A is limit_ordinal holds B c= A ) & {} in C & C is limit_ordinal &( C is ordinal & for A st {} in A & A is limit_ordinal holds C c= A ); hence B c= C & C c= B; end; end; registration cluster omega -> non empty ordinal; coherence by Def11; end; definition let A be set; attr A is natural means :Def12: A in omega; end; registration cluster natural for number; existence proof take n = the Element of omega; thus n in omega; end; end; definition mode Nat is natural number; end; registration sethood of natural number proof take omega; let y be Nat; thus y in omega by Def12; end; end; registration let A be Ordinal; cluster -> ordinal for Element of A; coherence proof let x be Element of A; A is empty or A is non empty; hence thesis by Th13,SUBSET_1:def 1; end; end; registration cluster natural -> ordinal for number; coherence proof let n be number; assume n is natural; then reconsider n as Element of omega by Def12; n is ordinal; hence thesis; end; end; scheme ALFA { D() -> non empty set, P[set,set] }: ex F st dom F = D() & for d being Element of D() ex A st A = F.d & P[d,A] & for B st P[d,B] holds A c= B provided A1: for d being Element of D() ex A st P[d,A] proof defpred Q[set,set] means ex A st A = $2 & P[$1,A] & for B st P[$1,B] holds A c= B; A2: for x st x in D() ex y st Q[x,y] proof let x; assume x in D(); then reconsider d = x as Element of D(); defpred Q[Ordinal] means P[d,$1]; A3: ex A st Q[A] by A1; consider A such that A4: Q[A] & for B st Q[B] holds A c= B from OrdinalMin(A3); reconsider y = A as set; take y,A; thus thesis by A4; end; A5: for x,y,z st x in D() & Q[x,y] & Q[x,z] holds y = z proof let x,y,z such that x in D(); given A1 being Ordinal such that A6: A1 = y and A7: ( P[x,A1])& for B st P[x,B] holds A1 c= B; given A2 being Ordinal such that A8: A2 = z and A9: ( P[x,A2])& for B st P[x,B] holds A2 c= B; A1 c= A2 & A2 c= A1 by A7,A9; hence thesis by A6,A8,XBOOLE_0:def 10; end; consider F such that A10: dom F = D() & for x st x in D() holds Q[x,F.x] from FUNCT_1:sch 2( A5, A2); take F; thus dom F = D() by A10; let d be Element of D(); thus thesis by A10; end; theorem succ X \ {X} = X proof thus succ X \ {X} c= X proof let x; assume A1: x in succ X \ {X}; then A2: not x in {X} by XBOOLE_0:def 5; x in X or x = X by A1,Th8; hence thesis by A2,TARSKI:def 1; end; let x; assume A3: x in X; then x <> X; then A4: not x in {X} by TARSKI:def 1; x in succ X by A3,Th8; hence thesis by A4,XBOOLE_0:def 5; end; registration cluster empty -> natural for number; coherence proof {} in omega by Def11; hence thesis by Def12; end; cluster -> natural for Element of omega; coherence by Def12; end; registration cluster non empty natural for number; existence proof take succ{}; thus succ{} is non empty; omega is limit_ordinal & {} in omega by Def11; hence succ{} in omega by Th28; end; end; registration let a be natural Ordinal; cluster succ a -> natural; coherence proof omega is limit_ordinal & a in omega by Def11,Def12; hence succ a in omega by Th28; end; end; registration cluster empty -> c=-linear for set; coherence proof let X be set such that A1: X is empty; let x be set; thus thesis by A1; end; end; registration let X be c=-linear set; cluster -> c=-linear for Subset of X; coherence proof let Y be Subset of X; let x, y be set; assume x in Y & y in Y; hence x,y are_c=-comparable by Def8; end; end; begin reserve a,b,c,d,x,y,z,X,Y,Z for set; reserve R,S,T for Relation; Lm1: R is reflexive iff for x st x in field R holds [x,x] in R proof R is reflexive iff R is_reflexive_in field R by RELAT_2:def 9; hence thesis by RELAT_2:def 1; end; Lm2: R is transitive iff for x,y,z st [x,y] in R & [y,z] in R holds [x,z] in R proof thus R is transitive implies for x,y,z st [x,y] in R & [y,z] in R holds [x,z ] in R proof assume R is transitive; then A1: R is_transitive_in field R by RELAT_2:def 16; let x,y,z; assume that A2: [x,y] in R and A3: [y,z] in R; A4: z in field R by A3,RELAT_1:15; x in field R & y in field R by A2,RELAT_1:15; hence thesis by A1,A2,A3,A4,RELAT_2:def 8; end; assume for x,y,z st [x,y] in R & [y,z] in R holds [x,z] in R; then for x,y,z st x in field R & y in field R & z in field R & [x,y] in R & [ y,z] in R holds [x,z] in R; then R is_transitive_in field R by RELAT_2:def 8; hence thesis by RELAT_2:def 16; end; Lm3: R is antisymmetric iff for x,y st [x,y] in R & [y,x] in R holds x = y proof thus R is antisymmetric implies for x,y st [x,y] in R & [y,x] in R holds x = y proof assume R is antisymmetric; then A1: R is_antisymmetric_in field R by RELAT_2:def 12; let x,y; assume that A2: [x,y] in R and A3: [y,x] in R; x in field R & y in field R by A2,RELAT_1:15; hence thesis by A1,A2,A3,RELAT_2:def 4; end; assume for x,y st [x,y] in R & [y,x] in R holds x = y; then for x,y st x in field R & y in field R & [x,y] in R & [y,x] in R holds x = y; then R is_antisymmetric_in field R by RELAT_2:def 4; hence thesis by RELAT_2:def 12; end; Lm4: R is connected iff for x,y st x in field R & y in field R & x <> y holds [x,y] in R or [y,x] in R proof R is connected iff R is_connected_in field R by RELAT_2:def 14; hence thesis by RELAT_2:def 6; end; definition let R,a; func R-Seg(a) equals Coim(R,a) \ {a}; coherence; end; theorem Th1: x in R-Seg a iff x <> a & [x,a] in R proof hereby assume A1: x in R-Seg a; hence x <> a by ZFMISC_1:56; ex y st [x,y] in R & y in {a} by A1,RELAT_1:def 14; hence [x,a] in R by TARSKI:def 1; end; assume that A2: x <> a and A3: [x,a] in R; a in {a} by TARSKI:def 1; then x in Coim(R,a) by A3,RELAT_1:def 14; hence thesis by A2,ZFMISC_1:56; end; theorem Th2: x in field R or R-Seg(x) = {} proof assume A1: not x in field R; set y = the Element of R-Seg(x); assume R-Seg(x) <> {}; then [y,x] in R by Th1; hence contradiction by A1,RELAT_1:15; end; definition let R; attr R is well_founded means :Def2: for Y st Y c= field R & Y <> {} ex a st a in Y & R-Seg a misses Y; let X; pred R is_well_founded_in X means :Def3: for Y st Y c= X & Y <> {} ex a st a in Y & R-Seg a misses Y; end; theorem Th3: R is well_founded iff R is_well_founded_in field R proof thus R is well_founded implies R is_well_founded_in field R proof assume for Y st Y c= field R & Y <> {} ex a st a in Y & R-Seg(a) misses Y; hence for Y st Y c= field R & Y <> {} ex a st a in Y & R-Seg(a) misses Y; end; assume for Y st Y c= field R & Y <> {} ex a st a in Y & R-Seg(a) misses Y; hence for Y st Y c= field R & Y <> {} ex a st a in Y & R-Seg(a) misses Y; end; definition let R; attr R is well-ordering means :Def4: R is reflexive & R is transitive & R is antisymmetric & R is connected & R is well_founded; let X; pred R well_orders X means :Def5: R is_reflexive_in X & R is_transitive_in X & R is_antisymmetric_in X & R is_connected_in X & R is_well_founded_in X; end; registration cluster well-ordering -> reflexive transitive antisymmetric connected well_founded for Relation; coherence by Def4; cluster reflexive transitive antisymmetric connected well_founded -> well-ordering for Relation; coherence by Def4; end; theorem R well_orders field R iff R is well-ordering proof thus R well_orders field R implies R is well-ordering proof assume R is_reflexive_in field R & R is_transitive_in field R & R is_antisymmetric_in field R & R is_connected_in field R & R is_well_founded_in field R; hence R is reflexive & R is transitive & R is antisymmetric & R is connected & R is well_founded by Th3,RELAT_2:def 9,def 12,def 14,def 16; end; assume R is reflexive & R is transitive & R is antisymmetric & R is connected & R is well_founded; hence R is_reflexive_in field R & R is_transitive_in field R & R is_antisymmetric_in field R & R is_connected_in field R & R is_well_founded_in field R by Th3,RELAT_2:def 9,def 12,def 14,def 16; end; theorem R well_orders X implies for Y st Y c= X & Y <> {} ex a st a in Y & for b st b in Y holds [a,b] in R proof assume A1: R well_orders X; then A2: R is_reflexive_in X by Def5; A3: R is_connected_in X by A1,Def5; let Y; assume that A4: Y c= X and A5: Y <> {}; R is_well_founded_in X by A1,Def5; then consider a such that A6: a in Y and A7: R-Seg(a) misses Y by A4,A5,Def3; take a; thus a in Y by A6; let b; assume A8: b in Y; then not b in R-Seg(a) by A7,XBOOLE_0:3; then a = b or not [b,a] in R by Th1; then a <> b implies [a,b] in R by A3,A4,A6,A8,RELAT_2:def 6; hence thesis by A2,A4,A6,RELAT_2:def 1; end; theorem Th6: R is well-ordering implies for Y st Y c= field R & Y <> {} ex a st a in Y & for b st b in Y holds [a,b] in R proof assume A1: R is well-ordering; let Y; assume that A2: Y c= field R and A3: Y <> {}; consider a such that A4: a in Y and A5: R-Seg(a) misses Y by A1,A2,A3,Def2; take a; thus a in Y by A4; let b; assume A6: b in Y; then not b in R-Seg(a) by A5,XBOOLE_0:3; then a = b or not [b,a] in R by Th1; then a <> b implies [a,b] in R by A1,A2,A4,A6,Lm4; hence thesis by A1,A2,A4,Lm1; end; theorem for R st R is well-ordering & field R <> {} ex a st a in field R & for b st b in field R holds [a,b] in R by Th6; theorem for R st R is well-ordering for a st a in field R holds (for b st b in field R holds [b,a] in R) or ex b st b in field R & [a,b] in R & for c st c in field R & [a,c] in R holds c = a or [b,c] in R proof let R; assume A1: R is well-ordering; let a such that A2: a in field R; defpred P[set] means not [$1,a] in R; given b such that A3: b in field R & not [b,a] in R; consider Z such that A4: c in Z iff c in field R & P[c] from XBOOLE_0:sch 1; for b holds b in Z implies b in field R by A4; then A5: Z c= field R by TARSKI:def 3; Z <> {} by A3,A4; then consider d such that A6: d in Z and A7: for c st c in Z holds [d,c] in R by A1,A5,Th6; take d; thus A8: d in field R by A4,A6; A9: not [d,a] in R by A4,A6; then a <> d by A6,A7; hence [a,d] in R by A1,A2,A8,A9,Lm4; let c; assume that A10: c in field R and A11: [a,c] in R; assume c <> a; then not [c,a] in R by A1,A11,Lm3; then c in Z by A4,A10; hence thesis by A7; end; reserve F,G for Function; theorem Th9: R-Seg(a) c= field R proof let b; assume b in R-Seg(a); then [b,a] in R by Th1; hence thesis by RELAT_1:15; end; definition let R,Y; func R |_2 Y -> Relation equals R /\ [:Y,Y:]; coherence; end; theorem Th10: R |_2 X = X|`R|X proof let x,y; thus [x,y] in R |_2 X implies [x,y] in X|`R|X proof assume A1: [x,y] in R |_2 X; then A2: [x,y] in [:X,X:] by XBOOLE_0:def 4; then A3: x in X by ZFMISC_1:87; A4: y in X by A2,ZFMISC_1:87; [x,y] in R by A1,XBOOLE_0:def 4; then [x,y] in X|`R by A4,RELAT_1:def 12; hence thesis by A3,RELAT_1:def 11; end; assume A5: [x,y] in X|`R|X; then A6: [x,y] in X|`R by RELAT_1:def 11; then A7: [x,y] in R by RELAT_1:def 12; A8: y in X by A6,RELAT_1:def 12; x in X by A5,RELAT_1:def 11; then [x,y] in [:X,X:] by A8,ZFMISC_1:87; hence thesis by A7,XBOOLE_0:def 4; end; theorem Th11: R |_2 X = X|`(R|X) proof thus R |_2 X = X|`R|X by Th10 .= X|`(R|X) by RELAT_1:109; end; Lm5: dom(X|`R) c= dom R proof let x; assume x in dom(X|`R); then consider y such that A1: [x,y] in X|`R by XTUPLE_0:def 12; [x,y] in R by A1,RELAT_1:def 12; hence thesis by XTUPLE_0:def 12; end; theorem Th12: x in field(R |_2 X) implies x in field R & x in X proof A1: dom(X|`R|X) = dom(X|`R) /\ X & rng(X|`(R|X)) = rng(R|X) /\ X by RELAT_1:61,88; assume x in field(R |_2 X); then A2: x in dom(R |_2 X) or x in rng(R |_2 X) by XBOOLE_0:def 3; A3: dom(X|`R) c= dom R & rng(R|X) c= rng R by Lm5,RELAT_1:70; R |_2 X = X|`R|X & R |_2 X = X|`(R|X) by Th10,Th11; then x in dom(X|`R) & x in X or x in rng(R|X) & x in X by A2,A1,XBOOLE_0:def 4; hence thesis by A3,XBOOLE_0:def 3; end; theorem Th13: field(R |_2 X) c= field R & field(R |_2 X) c= X proof ( for x st x in field(R |_2 X) holds x in field R)& for x st x in field( R |_2 X) holds x in X by Th12; hence thesis by TARSKI:def 3; end; theorem Th14: (R |_2 X)-Seg(a) c= R-Seg(a) proof let x; assume A1: x in (R |_2 X)-Seg(a); then [x,a] in R |_2 X by Th1; then A2: [x,a] in R by XBOOLE_0:def 4; x <> a by A1,Th1; hence thesis by A2,Th1; end; theorem Th15: R is reflexive implies R |_2 X is reflexive proof assume A1: R is reflexive; now let a; assume A2: a in field(R |_2 X); then a in X by Th12; then A3: [a,a] in [:X,X:] by ZFMISC_1:87; a in field R by A2,Th12; then [a,a] in R by A1,Lm1; hence [a,a] in R |_2 X by A3,XBOOLE_0:def 4; end; hence thesis by Lm1; end; theorem Th16: R is connected implies R |_2 Y is connected proof assume A1: R is connected; now let a,b; assume that A2: a in field(R |_2 Y) & b in field(R |_2 Y) and A3: a <> b; a in Y & b in Y by A2,Th12; then A4: [a,b] in [:Y,Y:] & [b,a] in [:Y,Y:] by ZFMISC_1:87; a in field R & b in field R by A2,Th12; then [a,b] in R or [b,a] in R by A1,A3,Lm4; hence [a,b] in R |_2 Y or [b,a] in R |_2 Y by A4,XBOOLE_0:def 4; end; hence thesis by Lm4; end; theorem Th17: R is transitive implies R |_2 Y is transitive proof assume A1: R is transitive; now let a,b,c; assume that A2: [a,b] in R |_2 Y and A3: [b,c] in R |_2 Y; [a,b] in R & [b,c] in R by A2,A3,XBOOLE_0:def 4; then A4: [a,c] in R by A1,Lm2; [b,c] in [:Y,Y:] by A3,XBOOLE_0:def 4; then A5: c in Y by ZFMISC_1:87; [a,b] in [:Y,Y:] by A2,XBOOLE_0:def 4; then a in Y by ZFMISC_1:87; then [a,c] in [:Y,Y:] by A5,ZFMISC_1:87; hence [a,c] in R |_2 Y by A4,XBOOLE_0:def 4; end; hence thesis by Lm2; end; theorem Th18: R is antisymmetric implies R |_2 Y is antisymmetric proof assume A1: R is antisymmetric; now let a,b; assume [a,b] in R |_2 Y & [b,a] in R |_2 Y; then [a,b] in R & [b,a] in R by XBOOLE_0:def 4; hence a = b by A1,Lm3; end; hence thesis by Lm3; end; theorem Th19: (R |_2 X) |_2 Y = R |_2 (X /\ Y) proof thus (R |_2 X) |_2 Y = R /\ ([:X,X:] /\ [:Y,Y:]) by XBOOLE_1:16 .= R |_2 (X /\ Y) by ZFMISC_1:100; end; theorem (R |_2 X) |_2 Y = (R |_2 Y) |_2 X proof thus (R |_2 X) |_2 Y = R |_2 (Y /\ X) by Th19 .= (R |_2 Y) |_2 X by Th19; end; theorem (R |_2 Y) |_2 Y = R |_2 Y proof let a,b; thus [a,b] in (R |_2 Y) |_2 Y implies [a,b] in R |_2 Y by XBOOLE_0:def 4; assume A1: [a,b] in R |_2 Y; then [a,b] in [:Y,Y:] by XBOOLE_0:def 4; hence thesis by A1,XBOOLE_0:def 4; end; theorem Th22: Z c= Y implies (R |_2 Y) |_2 Z = R |_2 Z proof assume A1: Z c= Y; let a,b; thus [a,b] in (R |_2 Y) |_2 Z implies [a,b] in R |_2 Z proof assume A2: [a,b] in (R |_2 Y) |_2 Z; then [a,b] in R |_2 Y by XBOOLE_0:def 4; then A3: [a,b] in R by XBOOLE_0:def 4; [a,b] in [:Z,Z:] by A2,XBOOLE_0:def 4; hence thesis by A3,XBOOLE_0:def 4; end; assume A4: [a,b] in R |_2 Z; then A5: [a,b] in R by XBOOLE_0:def 4; A6: [a,b] in [:Z,Z:] by A4,XBOOLE_0:def 4; then a in Z & b in Z by ZFMISC_1:87; then [a,b] in [:Y,Y:] by A1,ZFMISC_1:87; then [a,b] in R |_2 Y by A5,XBOOLE_0:def 4; hence thesis by A6,XBOOLE_0:def 4; end; theorem Th23: R |_2 field R = R proof let x,y; thus [x,y] in R |_2 field R implies [x,y] in R by XBOOLE_0:def 4; assume A1: [x,y] in R; then x in field R & y in field R by RELAT_1:15; then [x,y] in [:field R,field R:] by ZFMISC_1:87; hence thesis by A1,XBOOLE_0:def 4; end; theorem Th24: R is well_founded implies R |_2 X is well_founded proof assume A1: for Y st Y c= field R & Y <> {} ex a st a in Y & R-Seg(a) misses Y; A2: field(R |_2 X) c= field R by Th13; let Y; assume Y c= field(R |_2 X) & Y <> {}; then consider a such that A3: a in Y and A4: R-Seg(a) misses Y by A1,A2,XBOOLE_1:1; take a; thus a in Y by A3; assume not thesis; then A5: ex b being set st b in (R |_2 X)-Seg(a) & b in Y by XBOOLE_0:3; (R |_2 X)-Seg(a) c= R-Seg(a) by Th14; hence contradiction by A4,A5,XBOOLE_0:3; end; theorem Th25: R is well-ordering implies R |_2 Y is well-ordering proof assume R is well-ordering; hence R |_2 Y is reflexive transitive antisymmetric connected well_founded by Th15 ,Th16,Th17,Th18,Th24; end; theorem Th26: R is well-ordering implies R-Seg(a),R-Seg(b) are_c=-comparable proof assume A1: R is well-ordering; A2: now assume A3: a in field R & b in field R; now assume a <> b; A4: now assume A5: [b,a] in R; now let c; assume A6: c in R-Seg(b); then A7: [c,b] in R by Th1; then A8: [c,a] in R by A1,A5,Lm2; c <> b by A6,Th1; then c <> a by A1,A5,A7,Lm3; hence c in R-Seg(a) by A8,Th1; end; hence R-Seg(b) c= R-Seg(a) by TARSKI:def 3; end; now assume A9: [a,b] in R; now let c; assume A10: c in R-Seg(a); then A11: [c,a] in R by Th1; then A12: [c,b] in R by A1,A9,Lm2; c <> a by A10,Th1; then c <> b by A1,A9,A11,Lm3; hence c in R-Seg(b) by A12,Th1; end; hence R-Seg(a) c= R-Seg(b) by TARSKI:def 3; end; hence thesis by A1,A3,A4,Lm4,XBOOLE_0:def 9; end; hence thesis; end; now assume R-Seg(a) = {} or R-Seg(b) = {}; then R-Seg(a) c= R-Seg(b) or R-Seg(b) c= R-Seg(a) by XBOOLE_1:2; hence thesis by XBOOLE_0:def 9; end; hence thesis by A2,Th2; end; theorem Th27: R is well-ordering & b in R-Seg(a) implies (R |_2 (R-Seg(a))) -Seg(b) = R-Seg(b) proof assume that A1: R is well-ordering and A2: b in R-Seg(a); set S = R |_2 (R-Seg(a)); now let c; assume A3: c in R-Seg(b); then A4: [c,b] in R by Th1; A5: [b,a] in R by A2,Th1; then A6: [c,a] in R by A1,A4,Lm2; A7: c <> b by A3,Th1; then c <> a by A1,A4,A5,Lm3; then c in R-Seg(a) by A6,Th1; then [c,b] in [:R-Seg(a),R-Seg(a):] by A2,ZFMISC_1:87; then [c,b] in S by A4,XBOOLE_0:def 4; hence c in S-Seg(b) by A7,Th1; end; then A8: R-Seg(b) c= S-Seg(b) by TARSKI:def 3; now let c; assume A9: c in S-Seg(b); then [c,b] in S by Th1; then A10: [c,b] in R by XBOOLE_0:def 4; c <> b by A9,Th1; hence c in R-Seg(b) by A10,Th1; end; then S-Seg(b) c= R-Seg(b) by TARSKI:def 3; hence thesis by A8,XBOOLE_0:def 10; end; theorem Th28: R is well-ordering & Y c= field R implies (Y = field R or (ex a st a in field R & Y = R-Seg(a) ) iff for a st a in Y for b st [b,a] in R holds b in Y ) proof assume that A1: R is well-ordering and A2: Y c= field R; now given a such that a in field R and A3: Y = R-Seg(a); let b such that A4: b in Y; A5: [b,a] in R by A3,A4,Th1; let c such that A6: [c,b] in R; A7: [c,a] in R by A1,A6,A5,Lm2; b <> a by A3,A4,Th1; then c <> a by A1,A6,A5,Lm3; hence c in Y by A3,A7,Th1; end; hence Y = field R or (ex a st a in field R & Y = R-Seg(a) ) implies for a st a in Y for b st [b,a] in R holds b in Y by RELAT_1:15; assume A8: for a st a in Y for b st [b,a] in R holds b in Y; assume Y <> field R; then ex d st not ( d in field R iff d in Y ) by TARSKI:1; then field R \ Y <> {} by A2,XBOOLE_0:def 5; then consider a such that A9: a in field R \ Y and A10: for b st b in field R \ Y holds [a,b] in R by A1,Th6; A11: now let b; assume A12: b in R-Seg(a); then A13: [b,a] in R by Th1; assume A14: not b in Y; b in field R by A13,RELAT_1:15; then b in field R \ Y by A14,XBOOLE_0:def 5; then A15: [a,b] in R by A10; b <> a by A12,Th1; hence contradiction by A1,A13,A15,Lm3; end; take a; thus a in field R by A9; now A16: not a in Y by A9,XBOOLE_0:def 5; let b; assume A17: b in Y; assume not b in R-Seg(a); then A18: not [b,a] in R or a = b by Th1; a <> b by A9,A17,XBOOLE_0:def 5; then [a,b] in R by A2,A1,A9,A17,A18,Lm4; hence contradiction by A8,A17,A16; end; hence Y = R-Seg(a) by A11,TARSKI:1; end; theorem Th29: R is well-ordering & a in field R & b in field R implies ( [a,b] in R iff R-Seg(a) c= R-Seg(b) ) proof assume that A1: R is well-ordering and A2: a in field R and A3: b in field R; thus [a,b] in R implies R-Seg(a) c= R-Seg(b) proof assume A4: [a,b] in R; let c; assume A5: c in R-Seg(a); then A6: [c,a] in R by Th1; then A7: [c,b] in R by A1,A4,Lm2; c <> a by A5,Th1; then c <> b by A1,A4,A6,Lm3; hence thesis by A7,Th1; end; assume A8: R-Seg(a) c= R-Seg(b); now assume A9: a <> b; assume not [a,b] in R; then [b,a] in R by A2,A3,A1,A9,Lm4; then b in R-Seg(a) by A9,Th1; hence contradiction by A8,Th1; end; hence thesis by A1,A2,Lm1; end; theorem Th30: R is well-ordering & a in field R & b in field R implies ( R-Seg (a) c= R-Seg(b) iff a = b or a in R-Seg(b) ) proof assume A1: R is well-ordering & a in field R & b in field R; thus R-Seg(a) c= R-Seg(b) implies a = b or a in R-Seg(b) proof assume R-Seg(a) c= R-Seg(b); then [a,b] in R by A1,Th29; hence thesis by Th1; end; now assume a in R-Seg(b); then [a,b] in R by Th1; hence R-Seg(a) c= R-Seg(b) by A1,Th29; end; hence thesis; end; theorem Th31: R is well-ordering & X c= field R implies field(R |_2 X) = X proof assume that A1: R is well-ordering and A2: X c= field R; thus field(R |_2 X) c= X by Th13; let x; assume A3: x in X; then A4: [x,x] in [:X,X:] by ZFMISC_1:87; [x,x] in R by A1,A2,A3,Lm1; then [x,x] in R |_2 X by A4,XBOOLE_0:def 4; hence thesis by RELAT_1:15; end; theorem Th32: R is well-ordering implies field(R |_2 R-Seg(a)) = R-Seg(a) proof R-Seg(a) c= field R by Th9; hence thesis by Th31; end; theorem Th33: R is well-ordering implies for Z st for a st a in field R & R -Seg(a) c= Z holds a in Z holds field R c= Z proof assume A1: R is well-ordering; let Z such that A2: for a st a in field R & R-Seg(a) c= Z holds a in Z; A3: now let a such that A4: a in field R and A5: for b st [b,a] in R & a <> b holds b in Z; now let b; assume b in R-Seg(a); then [b,a] in R & b <> a by Th1; hence b in Z by A5; end; then R-Seg(a) c= Z by TARSKI:def 3; hence a in Z by A2,A4; end; given a such that A6: a in field R & not a in Z; field R \ Z <> {} by A6,XBOOLE_0:def 5; then consider a such that A7: a in field R \ Z and A8: for b st b in field R \ Z holds [a,b] in R by A1,Th6; not a in Z by A7,XBOOLE_0:def 5; then consider b such that A9: [b,a] in R and A10: b <> a and A11: not b in Z by A3,A7; b in field R by A9,RELAT_1:15; then b in field R \ Z by A11,XBOOLE_0:def 5; then [a,b] in R by A8; hence contradiction by A1,A9,A10,Lm3; end; theorem Th34: R is well-ordering & a in field R & b in field R & (for c st c in R-Seg(a) holds [c,b] in R & c <> b) implies [a,b] in R proof assume that A1: R is well-ordering & a in field R & b in field R and A2: c in R-Seg(a) implies [c,b] in R & c <> b; assume A3: not [a,b] in R; a <> b by A1,A3,Lm1; then [b,a] in R by A1,A3,Lm4; then b in R-Seg(a) by A3,Th1; hence contradiction by A2; end; theorem Th35: R is well-ordering & dom F = field R & rng F c= field R & (for a ,b st [a,b] in R & a <> b holds [F.a,F.b] in R & F.a <> F.b) implies for a st a in field R holds [a,F.a] in R proof assume that A1: R is well-ordering & dom F = field R & rng F c= field R and A2: [a,b] in R & a <> b implies [F.a,F.b] in R & F.a <> F.b; defpred P[set] means [$1,F.$1] in R; consider Z such that A3: a in Z iff a in field R & P[a] from XBOOLE_0:sch 1; now let a; assume A4: a in field R; assume A5: R-Seg(a) c= Z; A6: now let b; assume A7: b in R-Seg(a); then A8: [b,F.b] in R by A3,A5; A9: [b,a] in R & b <> a by A7,Th1; then A10: [F.b,F.a] in R by A2; hence [b,F.a] in R by A1,A8,Lm2; F.b <> F.a by A2,A9; hence b <> F.a by A1,A8,A10,Lm3; end; F.a in rng F by A1,A4,FUNCT_1:def 3; then [a,F.a] in R by A1,A4,A6,Th34; hence a in Z by A3,A4; end; then A11: field R c= Z by A1,Th33; let a; assume a in field R; hence thesis by A3,A11; end; definition let R,S,F; pred F is_isomorphism_of R,S means :Def7: dom F = field R & rng F = field S & F is one-to-one & for a,b holds [a,b] in R iff a in field R & b in field R & [F.a,F.b] in S; end; theorem Th36: F is_isomorphism_of R,S implies for a,b st [a,b] in R & a <> b holds [F.a,F.b] in S & F.a <> F.b proof assume A1: F is_isomorphism_of R,S; then A2: dom F = field R & F is one-to-one by Def7; let a,b; assume that A3: [a,b] in R and A4: a <> b; a in field R & b in field R by A1,A3,Def7; hence thesis by A1,A2,A3,A4,Def7,FUNCT_1:def 4; end; definition let R,S; pred R,S are_isomorphic means :Def8: ex F st F is_isomorphism_of R,S; end; theorem Th37: id(field R) is_isomorphism_of R,R proof A1: now let a,b; thus [a,b] in R implies a in field R & b in field R & [id(field R).a,id( field R).b] in R proof assume A2: [a,b] in R; hence A3: a in field R & b in field R by RELAT_1:15; then id(field R).a = a by FUNCT_1:18; hence thesis by A2,A3,FUNCT_1:18; end; assume that A4: a in field R and A5: b in field R & [id(field R).a,id(field R).b] in R; id(field R).a = a by A4,FUNCT_1:18; hence [a,b] in R by A5,FUNCT_1:18; end; dom(id(field R)) = field R & rng(id(field R)) = field R; hence thesis by A1,Def7; end; theorem R,R are_isomorphic proof take id(field R); thus thesis by Th37; end; theorem Th39: F is_isomorphism_of R,S implies F" is_isomorphism_of S,R proof assume A1: F is_isomorphism_of R,S; then A2: F is one-to-one by Def7; A3: rng F = field S by A1,Def7; hence A4: dom(F") = field S by A2,FUNCT_1:33; A5: dom F = field R by A1,Def7; hence rng(F") = field R by A2,FUNCT_1:33; thus F" is one-to-one by A2; let a,b; thus [a,b] in S implies a in field S & b in field S & [F".a,F".b] in R proof A6: dom F = rng(F") by A2,FUNCT_1:33; assume A7: [a,b] in S; hence A8: a in field S & b in field S by RELAT_1:15; then A9: F".a in rng(F") & F".b in rng(F") by A4,FUNCT_1:def 3; a = F.(F".a) & b = F.(F".b) by A3,A2,A8,FUNCT_1:35; hence thesis by A1,A5,A7,A6,A9,Def7; end; assume that A10: a in field S & b in field S and A11: [F".a,F".b] in R; F.(F".a) = a & F.(F".b) = b by A3,A2,A10,FUNCT_1:35; hence thesis by A1,A11,Def7; end; theorem Th40: R,S are_isomorphic implies S,R are_isomorphic proof given F such that A1: F is_isomorphism_of R,S; take F"; thus thesis by A1,Th39; end; theorem Th41: F is_isomorphism_of R,S & G is_isomorphism_of S,T implies G*F is_isomorphism_of R,T proof assume that A1: dom F = field R and A2: rng F = field S and A3: F is one-to-one and A4: for a,b holds [a,b] in R iff a in field R & b in field R & [F.a,F.b] in S; assume that A5: dom G = field S and A6: rng G = field T and A7: G is one-to-one and A8: for a,b holds [a,b] in S iff a in field S & b in field S & [G.a,G.b] in T; thus dom(G*F) = field R by A1,A2,A5,RELAT_1:27; thus rng(G*F) = field T by A2,A5,A6,RELAT_1:28; thus G*F is one-to-one by A3,A7; let a,b; thus [a,b] in R implies a in field R & b in field R & [(G*F).a,(G*F).b] in T proof assume A9: [a,b] in R; hence a in field R & b in field R by RELAT_1:15; then A10: (G*F).a = G.(F.a) & (G*F).b = G.(F.b) by A1,FUNCT_1:13; [F.a,F.b] in S by A4,A9; hence thesis by A8,A10; end; assume that A11: a in field R & b in field R and A12: [(G*F).a,(G*F).b] in T; A13: (G*F).a = G.(F.a) & (G*F).b = G.(F.b) by A1,A11,FUNCT_1:13; F.a in field S & F.b in field S by A1,A2,A11,FUNCT_1:def 3; then [F.a,F.b] in S by A8,A12,A13; hence thesis by A4,A11; end; theorem Th42: R,S are_isomorphic & S,T are_isomorphic implies R,T are_isomorphic proof given F such that A1: F is_isomorphism_of R,S; given G such that A2: G is_isomorphism_of S,T; take G*F; thus thesis by A1,A2,Th41; end; theorem Th43: F is_isomorphism_of R,S implies ( R is reflexive implies S is reflexive ) & ( R is transitive implies S is transitive ) & ( R is connected implies S is connected ) & ( R is antisymmetric implies S is antisymmetric ) & ( R is well_founded implies S is well_founded ) proof assume A1: F is_isomorphism_of R,S; then A2: dom F = field R by Def7; A3: rng F = field S by A1,Def7; A4: F is one-to-one by A1,Def7; then A5: rng(F") = dom F & dom(F") = rng F by FUNCT_1:33; thus R is reflexive implies S is reflexive proof assume A6: R is reflexive; now let a; assume A7: a in field S; then F".a in field R by A2,A3,A5,FUNCT_1:def 3; then A8: [F".a,F".a] in R by A6,Lm1; a = F.(F".a) by A3,A4,A7,FUNCT_1:35; hence [a,a] in S by A1,A8,Def7; end; hence thesis by Lm1; end; thus R is transitive implies S is transitive proof assume A9: R is transitive; now let a,b,c; assume that A10: [a,b] in S and A11: [b,c] in S; A12: c in field S by A11,RELAT_1:15; then A13: c = F.(F".c) by A3,A4,FUNCT_1:35; b in field S by A10,RELAT_1:15; then A14: b = F.(F".b) & F".b in field R by A2,A3,A4,A5,FUNCT_1:35,def 3; F".c in field R by A2,A3,A5,A12,FUNCT_1:def 3; then A15: [F".b,F".c] in R by A1,A11,A13,A14,Def7; A16: a in field S by A10,RELAT_1:15; then A17: a = F.(F".a) by A3,A4,FUNCT_1:35; F".a in field R by A2,A3,A5,A16,FUNCT_1:def 3; then [F".a,F".b] in R by A1,A10,A17,A14,Def7; then [F".a,F".c] in R by A9,A15,Lm2; hence [a,c] in S by A1,A17,A13,Def7; end; hence thesis by Lm2; end; thus R is connected implies S is connected proof assume A18: R is connected; now let a,b; assume that A19: a in field S & b in field S and A20: a <> b; A21: a = F.(F".a) & b = F.(F".b) by A3,A4,A19,FUNCT_1:35; F".a in field R & F".b in field R by A2,A3,A5,A19,FUNCT_1:def 3; then [F".a,F".b] in R or [F".b,F".a] in R by A18,A20,A21,Lm4; hence [a,b] in S or [b,a] in S by A1,A21,Def7; end; hence thesis by Lm4; end; thus R is antisymmetric implies S is antisymmetric proof assume A22: R is antisymmetric; now let a,b; assume that A23: [a,b] in S and A24: [b,a] in S; A25: a in field S by A23,RELAT_1:15; then A26: a = F.(F".a) by A3,A4,FUNCT_1:35; A27: b in field S by A23,RELAT_1:15; then A28: b = F.(F".b) by A3,A4,FUNCT_1:35; A29: F".b in field R by A2,A3,A5,A27,FUNCT_1:def 3; F".a in field R by A2,A3,A5,A25,FUNCT_1:def 3; then [F".a,F".b] in R & [F".b,F".a] in R by A1,A23,A24,A26,A28,A29,Def7; hence a = b by A22,A26,A28,Lm3; end; hence thesis by Lm3; end; assume A30: for Y st Y c= field R & Y <> {} ex x st x in Y & R-Seg(x) misses Y; let Z; assume that A31: Z c= field S and A32: Z <> {}; A33: F"Z c= dom F by RELAT_1:132; then consider x such that A34: x in F"Z and A35: R-Seg(x) misses F"Z by A2,A3,A30,A31,A32,RELAT_1:139; take F.x; thus F.x in Z by A34,FUNCT_1:def 7; assume not thesis; then consider y being set such that A36: y in S-Seg(F.x) and A37: y in Z by XBOOLE_0:3; A38: F".y in dom F by A3,A5,A31,A37,FUNCT_1:def 3; A39: [y,F.x] in S by A36,Th1; A40: y = F.(F".y) by A3,A4,A31,A37,FUNCT_1:35; then F".y in F"Z by A37,A38,FUNCT_1:def 7; then not F".y in R-Seg(x) by A35,XBOOLE_0:3; then not [F".y,x] in R or F".y = x by Th1; hence contradiction by A1,A2,A33,A34,A36,A40,A38,A39,Th1,Def7; end; theorem Th44: R is well-ordering & F is_isomorphism_of R,S implies S is well-ordering proof assume R is reflexive transitive antisymmetric connected well_founded & F is_isomorphism_of R,S; hence S is reflexive transitive antisymmetric connected well_founded by Th43; end; theorem Th45: R is well-ordering implies for F,G st F is_isomorphism_of R,S & G is_isomorphism_of R,S holds F = G proof assume A1: R is well-ordering; let F,G; assume that A2: F is_isomorphism_of R,S and A3: G is_isomorphism_of R,S; A4: dom F = field R by A2,Def7; A5: S is well-ordering by A1,A2,Th44; A6: rng F = field S by A2,Def7; A7: G is one-to-one by A3,Def7; A8: dom G = field R by A3,Def7; A9: G" is_isomorphism_of S,R by A3,Th39; then A10: G" is one-to-one by Def7; A11: F is one-to-one by A2,Def7; A12: rng G = field S by A3,Def7; A13: F" is_isomorphism_of S,R by A2,Th39; then A14: F" is one-to-one by Def7; for a st a in field R holds F.a = G.a proof A15: dom(F") = field S by A6,A11,FUNCT_1:33; then A16: dom(F"*G) = field R by A8,A12,RELAT_1:27; A17: now let a,b; assume that A18: [a,b] in R and A19: a <> b; A20: [G.a,G.b] in S by A3,A18,Def7; A21: b in field R by A18,RELAT_1:15; then A22: F".(G.b) = (F"*G).b by A8,FUNCT_1:13; A23: a in field R by A18,RELAT_1:15; then F".(G.a) = (F"*G).a by A8,FUNCT_1:13; hence [(F"*G).a,(F"*G).b] in R by A13,A20,A22,Def7; thus (F"*G).a <> (F"*G).b by A14,A7,A16,A19,A23,A21,FUNCT_1:def 4; end; A24: dom(G") = field S by A12,A7,FUNCT_1:33; then A25: dom(G"*F) = field R by A4,A6,RELAT_1:27; A26: now let a,b; assume that A27: [a,b] in R and A28: a <> b; A29: [F.a,F.b] in S by A2,A27,Def7; A30: b in field R by A27,RELAT_1:15; then A31: G".(F.b) = (G"*F).b by A4,FUNCT_1:13; A32: a in field R by A27,RELAT_1:15; then G".(F.a) = (G"*F).a by A4,FUNCT_1:13; hence [(G"*F).a,(G"*F).b] in R by A9,A29,A31,Def7; thus (G"*F).a <> (G"*F).b by A11,A10,A25,A28,A32,A30,FUNCT_1:def 4; end; let a such that A33: a in field R; A34: F".(G.a) = (F"*G).a by A8,A33,FUNCT_1:13; G.a in rng F by A6,A8,A12,A33,FUNCT_1:def 3; then A35: F.(F".(G.a)) = G.a by A11,FUNCT_1:35; rng(F") = field R by A4,A11,FUNCT_1:33; then rng(F"*G) = field R by A12,A15,RELAT_1:28; then [a,(F"*G).a] in R by A1,A33,A16,A17,Th35; then A36: [F.a,G.a] in S by A2,A34,A35,Def7; F.a in rng G by A4,A6,A12,A33,FUNCT_1:def 3; then A37: G.(G".(F.a)) = F.a by A7,FUNCT_1:35; A38: G".(F.a) = (G"*F).a by A4,A33,FUNCT_1:13; rng(G") = field R by A8,A7,FUNCT_1:33; then rng(G"*F) = field R by A6,A24,RELAT_1:28; then [a,(G"*F).a] in R by A1,A33,A25,A26,Th35; then [G.a,F.a] in S by A3,A38,A37,Def7; hence thesis by A5,A36,Lm3; end; hence thesis by A4,A8,FUNCT_1:2; end; definition let R,S; assume that A1: R is well-ordering and A2: R,S are_isomorphic; func canonical_isomorphism_of(R,S) -> Function means :Def9: it is_isomorphism_of R,S; existence by A2,Def8; uniqueness by A1,Th45; end; theorem Th46: R is well-ordering implies for a st a in field R holds not R,R |_2 (R-Seg(a)) are_isomorphic proof assume A1: R is well-ordering; let a such that A2: a in field R; set S = R |_2 (R-Seg(a)); set F = canonical_isomorphism_of(R,S); assume R,R |_2 (R-Seg(a)) are_isomorphic; then A3: F is_isomorphism_of R,S by A1,Def9; then A4: dom F = field R by Def7; A5: F is one-to-one by A3,Def7; A6: now let b,c; assume that A7: [b,c] in R and A8: b <> c; [F.b,F.c] in R |_2 (R-Seg(a)) by A3,A7,Def7; hence [F.b,F.c] in R by XBOOLE_0:def 4; b in field R & c in field R by A7,RELAT_1:15; hence F.b <> F.c by A4,A5,A8,FUNCT_1:def 4; end; A9: rng F = field S by A3,Def7; field S = R-Seg(a) by A1,Th32; then F.a in R-Seg(a) by A2,A4,A9,FUNCT_1:def 3; then A10: [F.a,a] in R & F.a <> a by Th1; rng F c= field R by A9,Th13; then [a,F.a] in R by A1,A2,A4,A6,Th35; hence contradiction by A1,A10,Lm3; end; theorem Th47: R is well-ordering & a in field R & b in field R & a <> b implies not R |_2 (R-Seg(a)),R |_2 (R-Seg(b)) are_isomorphic proof assume that A1: R is well-ordering and A2: a in field R & b in field R and A3: a <> b; A4: now set S = R |_2 (R-Seg(a)); assume A5: R-Seg(b) c= R-Seg(a); then A6: S |_2 (R-Seg(b)) = R |_2 (R-Seg(b)) by Th22; A7: field S = R-Seg(a) by A1,Th32; A8: b in R-Seg(a) proof assume not b in R-Seg(a); then not [b,a] in R by A3,Th1; then [a,b] in R by A2,A3,A1,Lm4; then a in R-Seg(b) by A3,Th1; hence contradiction by A5,Th1; end; then R-Seg(b) = S-Seg(b) by A1,Th27; hence thesis by A1,A7,A8,A6,Th25,Th46; end; A9: now set S = R |_2 (R-Seg(b)); assume A10: R-Seg(a) c= R-Seg(b); then A11: S |_2 (R-Seg(a)) = R |_2 (R-Seg(a)) by Th22; A12: field S = R-Seg(b) & S is well-ordering by A1,Th25,Th32; A13: a in R-Seg(b) proof assume not a in R-Seg(b); then not [a,b] in R by A3,Th1; then [b,a] in R by A2,A3,A1,Lm4; then b in R-Seg(a) by A3,Th1; hence contradiction by A10,Th1; end; then R-Seg(a) = S-Seg(a) by A1,Th27; hence thesis by A13,A11,A12,Th40,Th46; end; R-Seg(a),R-Seg(b) are_c=-comparable by A1,Th26; hence thesis by A9,A4,XBOOLE_0:def 9; end; theorem Th48: R is well-ordering & Z c= field R & F is_isomorphism_of R,S implies F|Z is_isomorphism_of R |_2 Z,S |_2 (F.:Z) & R |_2 Z,S |_2 (F.:Z) are_isomorphic proof assume that A1: R is well-ordering and A2: Z c= field R and A3: F is_isomorphism_of R,S; A4: F.:Z c= rng F by RELAT_1:111; rng F = field S by A3,Def7; then A5: F.:Z = field(S |_2 (F.:Z)) by A1,A3,A4,Th31,Th44; A6: F is one-to-one by A3,Def7; A7: Z = field(R |_2 Z) by A1,A2,Th31; A8: dom F = field R by A3,Def7; thus F|Z is_isomorphism_of R |_2 Z,S |_2 (F.:Z) proof thus A9: dom(F|Z) = field(R |_2 Z) by A2,A8,A7,RELAT_1:62; thus A10: rng(F|Z) = field(S |_2 (F.:Z)) by A5,RELAT_1:115; thus F|Z is one-to-one by A6,FUNCT_1:52; let a,b; thus [a,b] in R |_2 Z implies a in field(R |_2 Z) & b in field(R |_2 Z) & [F|Z.a,F|Z.b] in S |_2 (F.:Z) proof assume A11: [a,b] in R |_2 Z; then [a,b] in R by XBOOLE_0:def 4; then A12: [F.a,F.b] in S by A3,Def7; thus A13: a in field(R |_2 Z) & b in field(R |_2 Z) by A11,RELAT_1:15; then F|Z.a in rng(F|Z) & F|Z.b in rng(F|Z) by A9,FUNCT_1:def 3; then A14: [F|Z.a,F|Z.b] in [:F.:Z,F.:Z:] by A5,A10,ZFMISC_1:87; F.a = F|Z.a & F.b = F|Z.b by A9,A13,FUNCT_1:47; hence thesis by A12,A14,XBOOLE_0:def 4; end; assume that A15: a in field(R |_2 Z) & b in field(R |_2 Z) and A16: [F|Z.a,F|Z.b] in S |_2 (F.:Z); F.a = F|Z.a & F.b = F|Z.b by A9,A15,FUNCT_1:47; then A17: [F.a,F.b] in S by A16,XBOOLE_0:def 4; A18: [a,b] in [:Z,Z:] by A7,A15,ZFMISC_1:87; a in field R & b in field R by A15,Th12; then [a,b] in R by A3,A17,Def7; hence thesis by A18,XBOOLE_0:def 4; end; hence thesis by Def8; end; theorem Th49: F is_isomorphism_of R,S implies for a st a in field R ex b st b in field S & F.:(R-Seg(a)) = S-Seg(b) proof assume A1: F is_isomorphism_of R,S; then A2: dom F = field R by Def7; let a; assume A3: a in field R; take b = F.a; A4: rng F = field S by A1,Def7; hence b in field S by A3,A2,FUNCT_1:def 3; A5: F is one-to-one by A1,Def7; A6: c in S-Seg(b) implies c in F.:(R-Seg(a)) proof assume A7: c in S-Seg(b); then A8: c <> b by Th1; A9: [c,b] in S by A7,Th1; then A10: c in field S by RELAT_1:15; then A11: c = F.(F".c) by A4,A5,FUNCT_1:35; rng(F") = dom F & dom(F") = rng F by A5,FUNCT_1:33; then A12: F".c in field R by A2,A4,A10,FUNCT_1:def 3; then [F".c,a] in R by A1,A3,A9,A11,Def7; then F".c in R-Seg(a) by A8,A11,Th1; hence thesis by A2,A11,A12,FUNCT_1:def 6; end; c in F.:(R-Seg(a)) implies c in S-Seg(b) proof assume c in F.:(R-Seg(a)); then consider d such that A13: d in dom F and A14: d in R-Seg(a) and A15: c = F.d by FUNCT_1:def 6; [d,a] in R by A14,Th1; then A16: [c,b] in S by A1,A15,Def7; d <> a by A14,Th1; then c <> b by A3,A2,A5,A13,A15,FUNCT_1:def 4; hence thesis by A16,Th1; end; hence thesis by A6,TARSKI:1; end; theorem Th50: R is well-ordering & F is_isomorphism_of R,S implies for a st a in field R ex b st b in field S & R |_2 (R-Seg(a)),S |_2 (S-Seg(b)) are_isomorphic proof assume that A1: R is well-ordering and A2: F is_isomorphism_of R,S; let a; assume a in field R; then consider b such that A3: b in field S & F.:(R-Seg(a)) = S-Seg(b) by A2,Th49; take b; R-Seg(a) c= field R by Th9; hence thesis by A1,A2,A3,Th48; end; theorem Th51: R is well-ordering & S is well-ordering & a in field R & b in field S & c in field S & R,S |_2 (S-Seg(b)) are_isomorphic & R |_2 (R-Seg(a)),S |_2 (S-Seg(c)) are_isomorphic implies S-Seg(c) c= S-Seg(b) & [c,b] in S proof assume that A1: R is well-ordering and A2: S is well-ordering and A3: a in field R and A4: b in field S and A5: c in field S and A6: R,S |_2 (S-Seg(b)) are_isomorphic and A7: R |_2 (R-Seg(a)),S |_2 (S-Seg(c)) are_isomorphic; set Q = S |_2 (S-Seg(b)); set F1 = canonical_isomorphism_of(R,Q); A8: F1 is_isomorphism_of R,Q by A1,A6,Def9; then consider d such that A9: d in field Q and A10: F1.:(R-Seg(a)) = Q-Seg(d) by A3,Th49; A11: S-Seg(b) = field Q by A2,Th32; then A12: Q-Seg(d) = S-Seg(d) by A2,A9,Th27; A13: rng F1 = S-Seg(b) by A8,A11,Def7; then A14: Q-Seg(d) c= S-Seg(b) by A10,RELAT_1:111; set T = S |_2 (S-Seg(c)); set P = R |_2 (R-Seg(a)); A15: T,P are_isomorphic by A7,Th40; A16: d in field S by A9,Th12; R-Seg(a) c= field R by Th9; then P,Q |_2 (F1.:(R-Seg(a))) are_isomorphic by A1,A8,Th48; then T,Q |_2 (Q-Seg(d)) are_isomorphic by A10,A15,Th42; then T,S |_2 (S-Seg(d)) are_isomorphic by A10,A12,A13,Th22,RELAT_1:111; hence S-Seg(c) c= S-Seg(b) by A2,A5,A12,A14,A16,Th47; hence thesis by A2,A4,A5,Th29; end; theorem Th52: R is well-ordering & S is well-ordering implies R,S are_isomorphic or (ex a st a in field R & R |_2 (R-Seg(a)),S are_isomorphic ) or ex a st a in field S & R,S |_2 (S-Seg(a)) are_isomorphic proof assume that A1: R is well-ordering and A2: S is well-ordering; defpred P[set] means ex b st b in field S & R |_2 (R-Seg($1)),S |_2 (S-Seg(b )) are_isomorphic; consider Z such that A3: a in Z iff a in field R & P[a] from XBOOLE_0:sch 1; A4: Z c= field R proof let x; thus thesis by A3; end; defpred P[set,set] means $2 in field S & R |_2 (R-Seg $1),S |_2 (S-Seg $2) are_isomorphic; A5: for a,b,c st P[a, b] & P[a, c] holds b = c proof let a,b,c; assume that A6: b in field S and A7: R |_2 (R-Seg(a)),S |_2 (S-Seg(b)) are_isomorphic and A8: c in field S & R |_2 (R-Seg(a)),S |_2 (S-Seg(c)) are_isomorphic; S |_2 (S-Seg(b)),R |_2 (R-Seg(a)) are_isomorphic by A7,Th40; hence thesis by A2,A6,A8,Th42,Th47; end; consider F such that A9: [a,b] in F iff a in field R & P[a,b] from FUNCT_1:sch 1(A5); A10: Z = dom F proof thus a in Z implies a in dom F proof assume A11: a in Z; then consider b such that A12: b in field S & R |_2 (R-Seg(a)),S |_2 (S-Seg(b)) are_isomorphic by A3; a in field R by A3,A11; then [a,b] in F by A9,A12; hence thesis by XTUPLE_0:def 12; end; let a; assume a in dom F; then consider b such that A13: [a,b] in F by XTUPLE_0:def 12; A14: R |_2 (R-Seg(a)),S |_2 (S-Seg(b)) are_isomorphic by A9,A13; a in field R & b in field S by A9,A13; hence thesis by A3,A14; end; A15: rng F c= field S proof let a; assume a in rng F; then consider b such that A16: b in dom F & a = F.b by FUNCT_1:def 3; [b,a] in F by A16,FUNCT_1:1; hence thesis by A9; end; A17: F is_isomorphism_of R |_2 (dom F),S |_2 (rng F) proof thus dom F = field(R |_2 (dom F)) & rng F = field(S |_2 (rng F)) by A1,A2 ,A4,A15,A10,Th31; thus A18: F is one-to-one proof let a,b; assume that A19: a in dom F and A20: b in dom F and A21: F.a = F.b; A22: [b,F.b] in F by A20,FUNCT_1:1; then R |_2 (R-Seg(b)),S |_2 (S-Seg(F.a)) are_isomorphic by A9,A21; then A23: S |_2 (S-Seg(F.a)),R |_2 (R-Seg(b)) are_isomorphic by Th40; [a,F.a] in F by A19,FUNCT_1:1; then A24: a in field R & R |_2 (R-Seg(a)),S |_2 (S-Seg(F.a)) are_isomorphic by A9; b in field R by A9,A22; hence thesis by A1,A24,A23,Th42,Th47; end; let a,b; set P = R |_2 (R-Seg(a)); A25: field P = R-Seg(a) & P is well-ordering by A1,Th25,Th32; thus [a,b] in R |_2 (dom F) implies a in field(R |_2 (dom F)) & b in field (R |_2 (dom F)) & [F.a,F.b] in S |_2 (rng F) proof assume A26: [a,b] in R |_2 (dom F); hence A27: a in field(R |_2 (dom F)) & b in field(R |_2 (dom F)) by RELAT_1:15; then A28: a in dom F by Th12; then A29: [a,F.a] in F by FUNCT_1:1; then A30: F.a in field S by A9; A31: b in dom F by A27,Th12; then A32: [b,F.b] in F by FUNCT_1:1; then A33: b in field R by A9; A34: F.b in field S & R |_2 (R-Seg(b)),S |_2 (S-Seg(F.b)) are_isomorphic by A9,A32; A35: [a,b] in R by A26,XBOOLE_0:def 4; A36: F.b in rng F by A31,FUNCT_1:def 3; F.a in rng F by A28,FUNCT_1:def 3; then A37: [F.a,F.b] in [:rng F,rng F:] by A36,ZFMISC_1:87; a in field R by A9,A29; then A38: R-Seg(a) c= R-Seg(b) by A1,A33,A35,Th29; A39: R |_2 (R-Seg(a)),S |_2 (S-Seg(F.a)) are_isomorphic by A9,A29; A40: now set P = R |_2 (R-Seg(b)); A41: field P = R-Seg(b) & P is well-ordering by A1,Th25,Th32; assume a <> b; then A42: a in R-Seg(b) by A35,Th1; then P-Seg(a) = R-Seg(a) by A1,Th27; then P |_2(P-Seg(a)),S |_2(S-Seg(F.a)) are_isomorphic by A39,A38,Th22; then [F.a,F.b] in S by A2,A30,A34,A42,A41,Th51; hence thesis by A37,XBOOLE_0:def 4; end; a = b implies thesis proof assume a = b; then [F.a,F.b] in S by A2,A30,Lm1; hence thesis by A37,XBOOLE_0:def 4; end; hence thesis by A40; end; assume that A43: a in field(R |_2 (dom F)) and A44: b in field(R |_2 (dom F)) and A45: [F.a,F.b] in S |_2 (rng F); A46: [F.a,F.b] in S by A45,XBOOLE_0:def 4; A47: a in dom F by A43,Th12; then A48: [a,F.a] in F by FUNCT_1:1; then A49: a in field R by A9; assume not [a,b] in R |_2 (dom F); then A50: not [a,b] in R or not [a,b] in [:dom F,dom F:] by XBOOLE_0:def 4; then A51: a <> b by A1,A47,A49,Lm1,ZFMISC_1:87; A52: b in dom F by A44,Th12; then A53: [b,F.b] in F by FUNCT_1:1; then A54: R |_2 (R-Seg(b)),S |_2 (S-Seg(F.b)) are_isomorphic by A9; A55: b in field R by A9,A53; then A56: [b,a] in R by A1,A47,A52,A50,A49,A51,Lm4,ZFMISC_1:87; then A57: R-Seg(b) c= R-Seg(a) by A1,A49,A55,Th29; A58: b in R-Seg(a) by A47,A52,A50,A56,Th1,ZFMISC_1:87; then P-Seg(b) = R-Seg(b) by A1,Th27; then A59: P |_2 (P-Seg(b)),S |_2 (S-Seg(F.b)) are_isomorphic by A54,A57,Th22; A60: F.b in field S by A9,A53; F.a in field S & R |_2 (R-Seg(a)),S |_2 (S-Seg(F.a)) are_isomorphic by A9,A48; then [F.b,F.a] in S by A2,A60,A58,A25,A59,Th51; then F.a = F.b by A2,A46,Lm3; hence contradiction by A18,A47,A52,A51,FUNCT_1:def 4; end; A61: now given a such that A62: a in field R and A63: Z = R-Seg(a); given b such that A64: b in field S and A65: rng F = S-Seg(b); R |_2 (R-Seg(a)),S |_2 (S-Seg(b)) are_isomorphic by A10,A17,A63,A65,Def8; then a in Z by A3,A62,A64; hence contradiction by A63,Th1; end; A66: now let a such that A67: a in Z; consider c such that A68: c in field S and A69: R |_2 (R-Seg(a)),S |_2 (S-Seg(c)) are_isomorphic by A3,A67; let b such that A70: [b,a] in R; A71: a in field R by A3,A67; now set Q = S |_2 (S-Seg(c)); set P = R |_2 (R-Seg(a)); P is well-ordering by A1,Th25; then A72: canonical_isomorphism_of(P,Q) is_isomorphism_of P,Q by A69,Def9; assume a <> b; then A73: b in R-Seg(a) by A70,Th1; then A74: P-Seg(b) = R-Seg(b) by A1,Th27; A75: b in field R by A70,RELAT_1:15; then R-Seg(b) c= R-Seg(a) by A1,A71,A73,Th30; then A76: P |_2 (R-Seg(b)) = R |_2 (R-Seg(b)) by Th22; field P = R-Seg(a) by A1,Th32; then consider d such that A77: d in field Q and A78: P |_2 (P-Seg(b)),Q |_2 (Q-Seg(d)) are_isomorphic by A1,A72,A73,Th25,Th50; A79: S-Seg(c) = field Q by A2,Th32; then A80: Q-Seg(d) = S-Seg(d) by A2,A77,Th27; [d,c] in S by A77,A79,Th1; then A81: d in field S by RELAT_1:15; then S-Seg(d) c= S-Seg(c) by A2,A68,A77,A79,Th30; then R |_2 (R-Seg(b)),S |_2 (S-Seg(d)) are_isomorphic by A78,A74,A80,A76,Th22; hence b in Z by A3,A75,A81; end; hence b in Z by A67; end; A82: R |_2 Z,S |_2 (rng F) are_isomorphic by A10,A17,Def8; A83: now assume A84: Z = field R; given a such that A85: a in field S and A86: rng F = S-Seg(a); take a; thus a in field S by A85; thus R,S |_2 (S-Seg(a)) are_isomorphic by A82,A84,A86,Th23; end; A87: now let a such that A88: a in rng F; consider c such that A89: c in dom F & a = F.c by A88,FUNCT_1:def 3; A90: [c,a] in F by A89,FUNCT_1:1; then A91: a in field S by A9; let b such that A92: [b,a] in S; A93: R |_2 (R-Seg(c)),S |_2 (S-Seg(a)) are_isomorphic by A9,A90; A94: c in field R by A9,A90; now set Q = S |_2 (S-Seg(a)); set P = R |_2 (R-Seg(c)); assume a <> b; then A95: b in S-Seg(a) by A92,Th1; then A96: Q-Seg(b) = S-Seg(b) by A2,Th27; A97: b in field S by A92,RELAT_1:15; then S-Seg(b) c= S-Seg(a) by A2,A91,A95,Th30; then A98: Q |_2 (S-Seg(b)) = S |_2 (S-Seg(b)) by Th22; Q,P are_isomorphic & Q is well-ordering by A2,A93,Th25,Th40; then A99: canonical_isomorphism_of(Q,P) is_isomorphism_of Q,P by Def9; field Q = S-Seg(a) by A2,Th32; then consider d such that A100: d in field P and A101: Q |_2 (Q-Seg(b)),P |_2 (P-Seg(d)) are_isomorphic by A2,A99,A95,Th25,Th50 ; A102: R-Seg(c) = field P by A1,Th32; then A103: P-Seg(d) = R-Seg(d) by A1,A100,Th27; [d,c] in R by A100,A102,Th1; then A104: d in field R by RELAT_1:15; then R-Seg(d) c= R-Seg(c) by A1,A94,A100,A102,Th30; then S |_2 (S-Seg(b)),R |_2 (R-Seg(d)) are_isomorphic by A101,A96,A103,A98,Th22; then R |_2 (R-Seg(d)),S |_2 (S-Seg(b)) are_isomorphic by Th40; then [d,b] in F by A9,A97,A104; then d in dom F & b = F.d by FUNCT_1:1; hence b in rng F by FUNCT_1:def 3; end; hence b in rng F by A88; end; A105: now assume A106: rng F = field S; given a such that A107: a in field R and A108: Z = R-Seg(a); take a; thus a in field R by A107; thus R |_2 (R-Seg(a)),S are_isomorphic by A82,A106,A108,Th23; end; now assume A109: Z = field R & rng F = field S; R |_2 field R = R & S |_2 field S = S by Th23; hence R,S are_isomorphic by A10,A17,A109,Def8; end; hence thesis by A1,A2,A4,A15,A66,A87,A61,A83,A105,Th28; end; theorem Y c= field R & R is well-ordering implies R,R |_2 Y are_isomorphic or ex a st a in field R & R |_2 (R-Seg(a)),R |_2 Y are_isomorphic proof assume that A1: Y c= field R and A2: R is well-ordering; A3: now given a such that A4: a in field(R |_2 Y) and A5: R,(R |_2 Y) |_2 ((R |_2 Y)-Seg(a)) are_isomorphic; consider F such that A6: F is_isomorphism_of R,(R |_2 Y) |_2 ((R |_2 Y)-Seg(a)) by A5,Def8; A7: now let c,b; assume A8: [c,b] in R & c <> b; then [F.c,F.b] in (R |_2 Y) |_2 ((R |_2 Y)-Seg(a)) by A6,Th36; then [F.c,F.b] in R |_2 Y by XBOOLE_0:def 4; hence [F.c,F.b] in R & F.c <> F.b by A6,A8,Th36,XBOOLE_0:def 4; end; A9: field(R |_2 Y) = Y by A1,A2,Th31; field((R |_2 Y) |_2 ((R |_2 Y)-Seg(a))) = (R |_2 Y)-Seg(a) by A2,Th25,Th32; then A10: rng F = (R |_2 Y)-Seg(a) by A6,Def7; A11: dom F = field R by A6,Def7; then A12: F.a in rng F by A1,A4,A9,FUNCT_1:def 3; then A13: F.a <> a by A10,Th1; [F.a,a] in R |_2 Y by A10,A12,Th1; then A14: [F.a,a] in R by XBOOLE_0:def 4; (R |_2 Y)-Seg(a) c= Y by A9,Th9; then rng F c= field R by A1,A10,XBOOLE_1:1; then [a,F.a] in R by A1,A2,A4,A9,A11,A7,Th35; hence contradiction by A13,A14,A2,Lm3; end; R |_2 Y is well-ordering by A2,Th25; hence thesis by A2,A3,Th52; end; theorem R,S are_isomorphic & R is well-ordering implies S is well-ordering proof assume R,S are_isomorphic; then ex F being Function st F is_isomorphism_of R,S by Def8; hence thesis by Th44; end; begin reserve A,B,X,X1,Y,Y1,Y2,Z,a,x,y,z for set; definition let X,Y; mode Relation of X,Y is Subset of [:X,Y:]; end; registration let X,Y; cluster -> Relation-like for Subset of [:X,Y:]; coherence; end; registration let X,Y; cluster -> X-defined Y-valued for Relation of X,Y; coherence proof let R be Relation of X,Y; thus dom R c= X proof let x; assume x in dom R; then ex y st [x,y] in R by XTUPLE_0:def 12; hence thesis by ZFMISC_1:87; end; let y; assume y in rng R; then ex x st [x,y] in R by XTUPLE_0:def 13; hence thesis by ZFMISC_1:87; end; end; reserve P,R for Relation of X,Y; definition let X,Y,R,Z; redefine pred R c= Z means for x being Element of X, y being Element of Y holds [x,y] in R implies [x,y] in Z; compatibility proof thus R c= Z implies for x being Element of X, y being Element of Y holds [ x,y] in R implies [x,y] in Z; assume A1: for x being Element of X, y being Element of Y holds [x,y] in R implies [x,y] in Z; let a,b be set; assume A2: [a,b] in R; then reconsider a9=a as Element of X by ZFMISC_1:87; reconsider b9=b as Element of Y by A2,ZFMISC_1:87; [a9,b9] in Z by A1,A2; hence thesis; end; end; definition let X,Y,P,R; redefine pred P = R means for x being Element of X, y being Element of Y holds [x,y] in P iff [x,y] in R; compatibility proof thus P = R implies for x being Element of X, y being Element of Y holds [x ,y] in P iff [x,y] in R; assume A1: for x being Element of X, y being Element of Y holds [x,y] in P iff [x,y] in R; let a,b be set; hereby assume A2: [a,b] in P; then reconsider a9=a as Element of X by ZFMISC_1:87; reconsider b9=b as Element of Y by A2,ZFMISC_1:87; [a9,b9] in R by A1,A2; hence [a,b] in R; end; assume A3: [a,b] in R; then reconsider a9=a as Element of X by ZFMISC_1:87; reconsider b9=b as Element of Y by A3,ZFMISC_1:87; [a9,b9] in P by A1,A3; hence thesis; end; end; theorem A c= R implies A is Relation of X,Y by XBOOLE_1:1; theorem a in R implies ex x,y st a = [x,y] & x in X & y in Y proof assume A1: a in R; then consider x,y such that A2: a = [x,y] by RELAT_1:def 1; x in X & y in Y by A1,A2,ZFMISC_1:87; hence thesis by A2; end; theorem x in X & y in Y implies {[x,y]} is Relation of X,Y proof assume x in X & y in Y; then [x,y] in [:X,Y:] by ZFMISC_1:87; hence thesis by ZFMISC_1:31; end; theorem for R being Relation st dom R c= X & rng R c= Y holds R is Relation of X,Y proof let R be Relation; assume dom R c= X & rng R c= Y; then R c= [:dom R, rng R:] & [:dom R, rng R:] c= [:X,Y:] by RELAT_1:7 ,ZFMISC_1:96; hence thesis by XBOOLE_1:1; end; theorem dom R c= X1 implies R is Relation of X1,Y proof A1: rng R c= Y by RELAT_1:def 19; assume dom R c= X1; then R c= [:dom R, rng R:] & [:dom R, rng R:] c= [:X1,Y:] by A1,RELAT_1:7 ,ZFMISC_1:96; hence thesis by XBOOLE_1:1; end; theorem rng R c= Y1 implies R is Relation of X,Y1 proof A1: dom R c= X by RELAT_1:def 18; assume rng R c= Y1; then R c= [:dom R, rng R:] & [:dom R, rng R:] c= [:X,Y1:] by A1,RELAT_1:7 ,ZFMISC_1:96; hence thesis by XBOOLE_1:1; end; theorem X c= X1 & Y c= Y1 implies R is Relation of X1,Y1 proof assume X c= X1 & Y c= Y1; then [:X,Y:] c= [:X1,Y1:] by ZFMISC_1:96; hence thesis by XBOOLE_1:1; end; registration let X; let R,S be X-defined Relation; cluster R \/ S -> X-defined; coherence proof A1: dom(R \/ S) = dom R \/ dom S by RELAT_1:1; dom R c= X & dom S c= X by RELAT_1:def 18; hence dom(R \/ S) c= X by A1,XBOOLE_1:8; end; end; registration let X; let R be X-defined Relation, S be Relation; cluster R /\ S -> X-defined; coherence proof R /\ S c= R by XBOOLE_1:17; then dom R c= X & dom(R /\ S) c= dom R by RELAT_1:11,def 18; hence dom(R /\ S) c= X by XBOOLE_1:1; end; cluster R \ S -> X-defined; coherence; end; registration let X; let R,S be X-valued Relation; cluster R \/ S -> X-valued; coherence proof A1: rng(R \/ S) = rng R \/ rng S by RELAT_1:12; rng R c= X & rng S c= X by RELAT_1:def 19; hence rng(R \/ S) c= X by A1,XBOOLE_1:8; end; end; registration let X; let R be X-valued Relation, S be Relation; cluster R /\ S -> X-valued; coherence proof R /\ S c= R by XBOOLE_1:17; then rng R c= X & rng(R /\ S) c= rng R by RELAT_1:11,def 19; hence rng(R /\ S) c= X by XBOOLE_1:1; end; cluster R \ S -> X-valued; coherence; end; definition let X; let R be X-defined Relation; redefine func dom R -> Subset of X; coherence by RELAT_1:def 18; end; definition let X; let R be X-valued Relation; redefine func rng R -> Subset of X; coherence by RELAT_1:def 19; end; theorem field R c= X \/ Y proof dom R \/ rng R c= X \/ Y by XBOOLE_1:13; hence thesis; end; theorem (for x st x in X ex y st [x,y] in R) iff dom R = X proof thus (for x st x in X ex y st [x,y] in R) implies dom R = X proof assume A1: for x st x in X ex y st [x,y] in R; now let x; now assume x in X; then ex y st [x,y] in R by A1; hence x in dom R by XTUPLE_0:def 12; end; hence x in dom R iff x in X; end; hence dom R = X by TARSKI:1; end; thus thesis by XTUPLE_0:def 12; end; theorem (for y st y in Y ex x st [x,y] in R) iff rng R = Y proof thus (for y st y in Y ex x st [x,y] in R) implies rng R = Y proof assume A1: for y st y in Y ex x st [x,y] in R; now let y; now assume y in Y; then ex x st [x,y] in R by A1; hence y in rng R by XTUPLE_0:def 13; end; hence y in rng R iff y in Y; end; hence rng R = Y by TARSKI:1; end; thus thesis by XTUPLE_0:def 13; end; definition let X,Y,R; redefine func R~ -> Relation of Y,X; coherence proof now let x,y; assume [x,y] in R~; then [y,x] in R by RELAT_1:def 7; hence [x,y] in [:Y,X:] by ZFMISC_1:88; end; hence thesis by RELAT_1:def 3; end; end; definition let X,Y1,Y2,Z; let P be Relation of X,Y1; let R be Relation of Y2,Z; redefine func P*R -> Relation of X,Z; coherence proof now let x,z; assume [x,z] in P*R; then ex y st [x,y] in P & [y,z] in R by RELAT_1:def 8; then x in X & z in Z by ZFMISC_1:87; hence [x,z] in [:X,Z:] by ZFMISC_1:87; end; hence thesis by RELAT_1:def 3; end; end; theorem dom (R~) = rng R & rng (R~) = dom R proof now let x; A1: now assume x in rng R; then consider y such that A2: [y,x] in R by XTUPLE_0:def 13; [x,y] in R~ by A2,RELAT_1:def 7; hence x in dom (R~) by XTUPLE_0:def 12; end; now assume x in dom (R~); then consider y such that A3: [x,y] in R~ by XTUPLE_0:def 12; [y,x] in R by A3,RELAT_1:def 7; hence x in rng R by XTUPLE_0:def 13; end; hence x in dom (R~) iff x in rng R by A1; end; hence dom (R~) = rng R by TARSKI:1; now let x; A4: now assume x in dom R; then consider y such that A5: [x,y] in R by XTUPLE_0:def 12; [y,x] in R~ by A5,RELAT_1:def 7; hence x in rng (R~) by XTUPLE_0:def 13; end; now assume x in rng (R~); then consider y such that A6: [y,x] in R~ by XTUPLE_0:def 13; [x,y] in R by A6,RELAT_1:def 7; hence x in dom R by XTUPLE_0:def 12; end; hence x in rng (R~) iff x in dom R by A4; end; hence thesis by TARSKI:1; end; theorem {} is Relation of X,Y by XBOOLE_1:2; registration let A be empty set, B be set; cluster -> empty for Relation of A,B; coherence; cluster -> empty for Relation of B,A; coherence; end; theorem Th13: id X c= [:X,X:] proof [:X,X:] c= [:X,X:]; then reconsider R = [:X,X:] as Relation of X,X; [x,y] in id X implies [x,y] in R proof assume [x,y] in id X; then x in X & x = y by RELAT_1:def 10; hence thesis by ZFMISC_1:87; end; hence thesis by RELAT_1:def 3; end; theorem id X is Relation of X,X by Th13; theorem Th15: id A c= R implies A c= dom R & A c= rng R proof assume A1: id A c= R; thus A c= dom R proof let x; assume x in A; then [x,x] in id A by RELAT_1:def 10; hence thesis by A1,XTUPLE_0:def 12; end; thus A c= rng R proof let x; assume x in A; then [x,x] in id A by RELAT_1:def 10; hence thesis by A1,XTUPLE_0:def 13; end; end; theorem id X c= R implies X = dom R & X c= rng R proof assume A1: id X c= R; then X c= dom R by Th15; hence X = dom R by XBOOLE_0:def 10; thus thesis by A1,Th15; end; theorem id Y c= R implies Y c= dom R & Y = rng R proof assume A1: id Y c= R; hence Y c= dom R by Th15; Y c= rng R by A1,Th15; hence Y = rng R by XBOOLE_0:def 10; end; definition let X,Y,R,A; redefine func R|A -> Relation of X,Y; coherence proof now let x,y; assume [x,y] in R|A; then [x,y] in R by RELAT_1:def 11; hence [x,y] in [:X,Y:]; end; hence thesis by RELAT_1:def 3; end; end; definition let X,Y,B,R; redefine func B|`R -> Relation of X,Y; coherence proof now let x,y; assume [x,y] in B|`R; then [x,y] in R by RELAT_1:def 12; hence [x,y] in [:X,Y:]; end; hence thesis by RELAT_1:def 3; end; end; theorem R|X1 is Relation of X1,Y proof now let x,y; assume [x,y] in R|X1; then x in X1 & y in Y by RELAT_1:def 11,ZFMISC_1:87; hence [x,y] in [:X1,Y:] by ZFMISC_1:87; end; hence thesis by RELAT_1:def 3; end; theorem X c= X1 implies R|X1 = R proof assume A1: X c= X1; now let x,y; now assume A2: [x,y] in R; then x in X by ZFMISC_1:87; hence [x,y] in R|X1 by A1,A2,RELAT_1:def 11; end; hence [x,y] in R|X1 iff [x,y] in R by RELAT_1:def 11; end; hence thesis by RELAT_1:def 2; end; theorem Y1|`R is Relation of X,Y1 proof now let x,y; assume [x,y] in Y1|`R; then y in Y1 & x in X by RELAT_1:def 12,ZFMISC_1:87; hence [x,y] in [:X,Y1:] by ZFMISC_1:87; end; hence thesis by RELAT_1:def 3; end; theorem Y c= Y1 implies Y1|`R = R proof assume A1: Y c= Y1; now let x,y; now assume A2: [x,y] in R; then y in Y by ZFMISC_1:87; hence [x,y] in Y1|`R by A1,A2,RELAT_1:def 12; end; hence [x,y] in Y1|`R iff [x,y] in R by RELAT_1:def 12; end; hence thesis by RELAT_1:def 2; end; definition let X,Y,R,A; redefine func R.:A -> Subset of Y; coherence proof R.:A c= rng R by RELAT_1:111; hence thesis by XBOOLE_1:1; end; redefine func R"A -> Subset of X; coherence proof R"A c= dom R by RELAT_1:132; hence thesis by XBOOLE_1:1; end; end; theorem Th22: R.:X = rng R & R"Y = dom R proof now let y; A1: now assume y in rng R; then consider x such that A2: [x,y] in R by XTUPLE_0:def 13; x in X by A2,ZFMISC_1:87; hence y in R.:X by A2,RELAT_1:def 13; end; now assume y in R.:X; then ex x st [x,y] in R & x in X by RELAT_1:def 13; hence y in rng R by XTUPLE_0:def 13; end; hence y in R.:X iff y in rng R by A1; end; hence R.:X = rng R by TARSKI:1; now let x; A3: now assume x in dom R; then consider y such that A4: [x,y] in R by XTUPLE_0:def 12; y in Y by A4,ZFMISC_1:87; hence x in R"Y by A4,RELAT_1:def 14; end; now assume x in R"Y; then ex y st [x,y] in R & y in Y by RELAT_1:def 14; hence x in dom R by XTUPLE_0:def 12; end; hence x in R"Y iff x in dom R by A3; end; hence thesis by TARSKI:1; end; theorem R.:(R"Y) = rng R & R"(R.:X) = dom R proof R"Y = dom R & R.:X = rng R by Th22; hence thesis by RELAT_1:113,134; end; scheme RelOnSetEx{A() -> set,B() -> set,P[set,set]}: ex R being Relation of A(),B() st for x,y holds [x,y] in R iff x in A() & y in B() & P[x,y] proof consider R being Relation such that A1: for x,y holds [x,y] in R iff x in A() & y in B() & P[x,y] from RELAT_1:sch 1; R c= [:A(),B():] proof let x1,x2 be set; assume [x1,x2] in R; then x1 in A() & x2 in B() by A1; hence thesis by ZFMISC_1:87; end; then reconsider R as Relation of A(),B(); take R; thus thesis by A1; end; definition let X; mode Relation of X is Relation of X,X; end; reserve D,D1,D2,E,F for non empty set; reserve R for Relation of D,E; reserve x for Element of D; reserve y for Element of E; registration let D be non empty set; cluster id D -> non empty; coherence proof now set y = the Element of D; A1: [y,y] in id D by RELAT_1:def 10; assume id D = {}; hence contradiction by A1; end; hence thesis; end; end; theorem for x being Element of D holds x in dom R iff ex y being Element of E st [x,y] in R proof let x be Element of D; thus x in dom R implies ex y being Element of E st [x,y] in R proof assume x in dom R; then consider y being set such that A1: [x,y] in R by XTUPLE_0:def 12; reconsider b = y as Element of E by A1,ZFMISC_1:87; take b; thus thesis by A1; end; given y being Element of E such that A2: [x,y] in R; thus thesis by A2,XTUPLE_0:def 12; end; theorem for y being set holds y in rng R iff ex x being Element of D st [x,y] in R proof let y be set; thus y in rng R implies ex x being Element of D st [x,y] in R proof assume y in rng R; then consider x being set such that A1: [x,y] in R by XTUPLE_0:def 13; reconsider a = x as Element of D by A1,ZFMISC_1:87; take a; thus thesis by A1; end; given x being Element of D such that A2: [x,y] in R; thus thesis by A2,XTUPLE_0:def 13; end; theorem dom R <> {} implies ex y being Element of E st y in rng R proof assume dom R <> {}; then rng R <> {} by RELAT_1:42; then ex y being set st y in rng R by XBOOLE_0:def 1; hence thesis; end; theorem rng R <> {} implies ex x being Element of D st x in dom R proof assume rng R <> {}; then dom R <> {} by RELAT_1:42; then ex x being set st x in dom R by XBOOLE_0:def 1; hence thesis; end; theorem for P being (Relation of D,E), R being Relation of E,F for x, z being set holds [x,z] in P*R iff ex y being Element of E st [x,y] in P & [y,z] in R proof let P be (Relation of D,E), R be Relation of E,F; let x, z be set; thus [x,z] in P*R implies ex y being Element of E st [x,y] in P & [y,z] in R proof assume [x,z] in P*R; then consider y being set such that A1: [x,y] in P and A2: [y,z] in R by RELAT_1:def 8; reconsider a = y as Element of E by A1,ZFMISC_1:87; take a; thus thesis by A1,A2; end; given y such that A3: [x,y] in P & [y,z] in R; thus thesis by A3,RELAT_1:def 8; end; theorem y in R.:D1 iff ex x being Element of D st [x,y] in R & x in D1 proof thus y in R.:D1 implies ex x being Element of D st [x,y] in R & x in D1 proof assume y in R.:D1; then consider x being set such that A1: [x,y] in R and A2: x in D1 by RELAT_1:def 13; reconsider a = x as Element of D by A1,ZFMISC_1:87; take a; thus thesis by A1,A2; end; given x such that A3: [x,y] in R & x in D1; thus thesis by A3,RELAT_1:def 13; end; theorem x in R"D2 iff ex y being Element of E st [x,y] in R & y in D2 proof thus x in R"D2 implies ex y being Element of E st [x,y] in R & y in D2 proof assume x in R"D2; then consider y being set such that A1: [x,y] in R and A2: y in D2 by RELAT_1:def 14; reconsider b = y as Element of E by A1,ZFMISC_1:87; take b; thus thesis by A1,A2; end; given y being Element of E such that A3: [x,y] in R & y in D2; thus thesis by A3,RELAT_1:def 14; end; scheme RelOnDomEx{A,B() -> non empty set, P[set,set]}: ex R being Relation of A(),B () st for x being Element of A(), y being Element of B() holds [x,y] in R iff P [x,y] proof consider R being Relation of A(),B() qua set such that A1: for x,y being set holds [x,y] in R iff x in A() & y in B() & P[x,y] from RelOnSetEx; take R; thus thesis by A1; end; begin scheme { N()-> set, M() -> Subset of N(), F(set)->set }: ex R being Relation of M() st for i being Element of N() st i in M() holds Im(R,i) = F(i) provided A1: for i being Element of N() st i in M() holds F(i) c= M() proof defpred P[set,set] means $2 in F($1); consider R being Relation of M() such that A2: for x,y being set holds [x,y] in R iff x in M() & y in M() & P[x,y] from RelOnSetEx; take R; let i be Element of N(); assume A3: i in M(); thus Im(R,i) c= F(i) proof let e be set; assume e in Im(R,i); then consider u being set such that A4: [u,e] in R and A5: u in {i} by RELAT_1:def 13; u = i by A5,TARSKI:def 1; hence thesis by A2,A4; end; let e be set; assume A6: e in F(i); F(i) c= M() by A1,A3; then i in {i} & [i,e] in R by A2,A3,A6,TARSKI:def 1; hence thesis by RELAT_1:def 13; end; theorem for N being set, R,S being Relation of N st for i being set st i in N holds Im(R,i) = Im(S,i) holds R = S proof let N be set, R,S be Relation of N such that A1: for i being set st i in N holds Im(R,i) = Im(S,i); let a,b be Element of N; thus [a,b] in R implies [a,b] in S proof assume A2: [a,b] in R; then A3: a in dom R by XTUPLE_0:def 12; a in {a} by TARSKI:def 1; then b in Im(R,a) by A2,RELAT_1:def 13; then b in Im(S,a) by A1,A3; then ex e being set st [e,b] in S & e in {a} by RELAT_1:def 13; hence thesis by TARSKI:def 1; end; assume A4: [a,b] in S; then A5: a in dom S by XTUPLE_0:def 12; a in {a} by TARSKI:def 1; then b in Im(S,a) by A4,RELAT_1:def 13; then b in Im(R,a) by A1,A5; then ex e being set st [e,b] in R & e in {a} by RELAT_1:def 13; hence thesis by TARSKI:def 1; end; scheme {A,B() -> set, P[set,set], P,R()->Relation of A(), B()}: P() = R() provided A1: for p being Element of A(), q being Element of B() holds [p,q] in P( ) iff P[p,q] and A2: for p being Element of A(), q being Element of B() holds [p,q] in R( ) iff P[p,q] proof let y be Element of A(), z be Element of B(); [y,z] in P() iff P[y,z] by A1; hence thesis by A2; end; registration let X,Y,Z; let f be Relation of [:X,Y:], Z; cluster dom f -> Relation-like; coherence; end; registration let X,Y,Z; let f be Relation of X, [:Y, Z:]; cluster rng f -> Relation-like; coherence; end; theorem A misses X implies P|A = {} proof assume A misses X; then A misses dom P by XBOOLE_1:63; hence thesis by RELAT_1:152; end; registration let R be non empty Relation, Y be non empty Subset of dom R; cluster R|Y -> non empty; coherence proof dom(R|Y) = Y by RELAT_1:62; hence thesis; end; end; registration let R be non empty Relation; let Y be non empty Subset of dom R; cluster R.:Y -> non empty; coherence proof R.:Y = rng(R|Y) by RELAT_1:115; hence thesis; end; end; registration let X,Y be set; cluster empty for Relation of X,Y; existence proof {} is Relation of X,Y by XBOOLE_1:2; hence thesis; end; end; begin reserve x,x1,x2,y,y9,y1,y2,z,z1,z2,P,X,X1,X2,Y,Y1,Y2,V,Z for set; theorem Th1: for f,g being Function st for x st x in dom f /\ dom g holds f.x = g.x ex h being Function st f \/ g = h proof let f,g be Function such that A1: for x st x in dom f /\ dom g holds f.x = g.x; defpred P[set,set] means [$1,$2] in f \/ g; A2: for x,y1,y2 st P[x,y1] & P[x,y2] holds y1 = y2 proof let x,y1,y2 such that A3: [x,y1] in f \/ g and A4: [x,y2] in f \/ g; now [x,y1] in f or [x,y1] in g by A3,XBOOLE_0:def 3; then A5: x in dom f & f.x = y1 or x in dom g & g.x = y1 by FUNCT_1:1; A6: [x,y2] in f or [x,y2] in g by A4,XBOOLE_0:def 3; then A7: x in dom f & f.x = y2 or x in dom g & g.x = y2 by FUNCT_1:1; per cases by A6,XTUPLE_0:def 12; suppose x in dom f & x in dom g; then x in dom f /\ dom g by XBOOLE_0:def 4; hence thesis by A1,A5,A7; end; suppose x in dom f & not x in dom g; hence thesis by A6,A5,FUNCT_1:1; end; suppose not x in dom f & x in dom g; hence thesis by A6,A5,FUNCT_1:1; end; end; hence thesis; end; consider h being Function such that A8: for x,y holds [x,y] in h iff x in dom f \/ dom g & P[x,y] from FUNCT_1:sch 1(A2); take h; let x,y; thus [x,y] in f \/ g implies [x,y] in h proof assume A9: [x,y] in f \/ g; then [x,y] in f or [x,y] in g by XBOOLE_0:def 3; then x in dom f or x in dom g by XTUPLE_0:def 12; then x in dom f \/ dom g by XBOOLE_0:def 3; hence thesis by A8,A9; end; thus thesis by A8; end; theorem Th2: for f,g,h being Function st f \/ g = h for x st x in dom f /\ dom g holds f.x = g.x proof let f,g,h be Function such that A1: f \/ g = h; let x; assume A2: x in dom f /\ dom g; then x in dom f by XBOOLE_0:def 4; then A3: h.x = f.x by A1,GRFUNC_1:15; x in dom g by A2,XBOOLE_0:def 4; hence thesis by A1,A3,GRFUNC_1:15; end; scheme LambdaC{A()->set,C[set],F(set)->set,G(set)->set}: ex f being Function st dom f = A() & for x st x in A() holds (C[x] implies f.x = F(x)) & (not C[x] implies f.x = G(x)); defpred P[set,set] means (C[$1] implies $2 = F($1)) & (not C[$1] implies $2 = G($1)); A1: for x st x in A() ex y st P[x,y] proof let x; not C[x] implies (C[x] implies G(x) = F(x)) & (not C[x] implies G(x) = G(x)); hence thesis; end; A2: for x,y1,y2 st x in A() & P[x,y1] & P[x,y2] holds y1 = y2; thus ex f being Function st dom f = A() & for x st x in A() holds P[x,f.x] from FUNCT_1:sch 2(A2,A1); end; Lm1: now let X,Y; take E = {}; thus dom E c= X & rng E c= Y by XBOOLE_1:2; end; registration let X,Y; cluster Function-like for Relation of X,Y; existence proof consider E being Function such that A1: dom E c= X & rng E c= Y by Lm1; reconsider E as Relation of X,Y by A1,RELSET_1:4; take E; thus thesis; end; end; definition let X,Y; mode PartFunc of X,Y is Function-like Relation of X,Y; end; theorem for f being PartFunc of X,Y st y in rng f ex x being Element of X st x in dom f & y = f.x proof let f be PartFunc of X,Y; assume y in rng f; then ex x st x in dom f & y = f.x by FUNCT_1:def 3; hence thesis; end; theorem Th4: for f being Y-valued Function st x in dom f holds f.x in Y proof let f be Y-valued Function; assume x in dom f; then A1: f.x in rng f by FUNCT_1:def 3; rng f c= Y by RELAT_1:def 19; hence thesis by A1; end; theorem for f1,f2 being PartFunc of X,Y st dom f1 = dom f2 & for x being Element of X st x in dom f1 holds f1.x = f2.x holds f1 = f2 proof let f1,f2 be PartFunc of X,Y such that A1: dom f1 = dom f2 and A2: for x being Element of X st x in dom f1 holds f1.x = f2.x; for x st x in dom f1 holds f1.x = f2.x by A2; hence thesis by A1,FUNCT_1:2; end; scheme PartFuncEx{X,Y()->set,P[set,set]}: ex f being PartFunc of X(),Y() st (for x holds x in dom f iff x in X() & ex y st P[x,y]) & for x st x in dom f holds P[x ,f.x] provided A1: for x,y st x in X() & P[x,y] holds y in Y() and A2: for x,y1,y2 st x in X() & P[x,y1] & P[x,y2] holds y1 = y2 proof A3: now defpred R[set] means ex y st P[$1,y]; set y1 = the set; assume Y() <> {}; defpred Q[set,set] means ((ex y st P[$1,y]) implies P[$1,$2]) & ((for y holds not P[$1,y]) implies $2=y1); A4: for x st x in X() ex z st Q[x,z] proof let x such that x in X(); (for y holds not P[x,y]) implies ((ex y st P[x,y]) implies P[x,y1]) & ((for y holds not P[x,y]) implies y1=y1); hence thesis; end; A5: for x,z1,z2 st x in X() & Q[x,z1] & Q[x,z2] holds z1 = z2 by A2; consider g being Function such that A6: dom g = X() and A7: for x st x in X() holds Q[x,g.x] from FUNCT_1:sch 2(A5,A4); consider X being set such that A8: for x holds x in X iff x in X() & R[x] from XBOOLE_0:sch 1; set f=g|X; A9: dom f c= X() by A6,RELAT_1:60; rng f c= Y() proof let y; assume y in rng f; then consider x such that A10: x in dom f and A11: y = f.x by FUNCT_1:def 3; A12: dom f c= X by RELAT_1:58; then x in X() & ex y st P[x,y] by A8,A10; then P[x,g.x] by A7; then A13: P[x,y] by A10,A11,FUNCT_1:47; x in X() by A8,A10,A12; hence thesis by A1,A13; end; then reconsider f as PartFunc of X(),Y() by A9,RELSET_1:4; take f; thus for x holds x in dom f iff x in X() & ex y st P[x,y] proof let x; dom f c= X by RELAT_1:58; hence x in dom f implies x in X() & ex y st P[x,y] by A8; assume that A14: x in X() and A15: ex y st P[x,y]; x in X by A8,A14,A15; then x in dom g /\ X by A6,A14,XBOOLE_0:def 4; hence thesis by RELAT_1:61; end; let x; assume A16: x in dom f; dom f c= X by RELAT_1:58; then ex y st P[x,y] by A8,A16; then P[x,g.x] by A7,A16; hence P[x,f.x] by A16,FUNCT_1:47; end; now consider f being Function such that A17: dom f c= X() & rng f c= Y() by Lm1; reconsider f as PartFunc of X(),Y() by A17,RELSET_1:4; assume A18: Y() = {}; take f; thus for x holds x in dom f iff x in X() & ex y st P[x,y] by A1,A18; thus for x st x in dom f holds P[x,f.x] by A18; end; hence thesis by A3; end; scheme LambdaR{X,Y()->set,F(set)->set,P[set]}: ex f being PartFunc of X(),Y() st ( for x holds x in dom f iff x in X() & P[x]) & for x st x in dom f holds f.x = F (x) provided A1: for x st P[x] holds F(x) in Y() proof defpred Q[set,set] means P[$1] & $2 = F($1); A2: for x,y1,y2 st x in X() & Q[x,y1] & Q[x,y2] holds y1 = y2; A3: for x,y st x in X() & Q[x,y] holds y in Y() by A1; consider f being PartFunc of X(),Y() such that A4: for x holds x in dom f iff x in X() & ex y st Q[x,y] and A5: for x st x in dom f holds Q[x,f.x] from PartFuncEx(A3,A2); take f; thus for x holds x in dom f iff x in X() & P[x] proof let x; thus x in dom f implies x in X() & P[x] proof assume A6: x in dom f; then ex y st P[x] & y = F(x) by A4; hence thesis by A6; end; assume that A7: x in X() and A8: P[x]; ex y st P[x] & y = F(x) by A8; hence thesis by A4,A7; end; thus thesis by A5; end; definition let X,Y,V,Z; let f be PartFunc of X,Y; let g be PartFunc of V,Z; redefine func g*f -> PartFunc of X,Z; coherence proof A1: dom(g*f) c= X; rng(g*f) c= Z by RELAT_1:def 19; hence thesis by A1,RELSET_1:4; end; end; theorem for f being Relation of X,Y holds (id X)*f = f proof let f be Relation of X,Y; dom f c= X; hence thesis by RELAT_1:51; end; theorem for f being Relation of X,Y holds f*(id Y) = f proof let f be Relation of X,Y; rng f c= Y; hence thesis by RELAT_1:53; end; theorem for f being PartFunc of X,Y st (for x1,x2 being Element of X st x1 in dom f & x2 in dom f & f.x1 = f.x2 holds x1 = x2) holds f is one-to-one proof let f be PartFunc of X,Y; assume for x1,x2 being Element of X st x1 in dom f & x2 in dom f & f.x1 = f .x2 holds x1 = x2; then for x1,x2 st x1 in dom f & x2 in dom f & f.x1 = f.x2 holds x1 = x2; hence thesis by FUNCT_1:def 4; end; theorem for f being PartFunc of X,Y st f is one-to-one holds f" is PartFunc of Y,X proof let f be PartFunc of X,Y such that A1: f is one-to-one; rng f c= Y by RELAT_1:def 19; then A2: dom(f") c= Y by A1,FUNCT_1:33; dom f c= X; then rng(f") c= X by A1,FUNCT_1:33; hence thesis by A2,RELSET_1:4; end; theorem for f being PartFunc of X,Y holds f|Z is PartFunc of Z,Y proof let f be PartFunc of X,Y; dom(f|Z) c= Z & rng(f|Z) c= Y by RELAT_1:58,def 19; hence thesis by RELSET_1:4; end; theorem Th11: for f being PartFunc of X,Y holds f|Z is PartFunc of X,Y; definition let X,Y; let f be PartFunc of X,Y; let Z be set; redefine func f|Z -> PartFunc of X,Y; coherence by Th11; end; theorem for f being PartFunc of X,Y holds Z|`f is PartFunc of X,Z proof let f be PartFunc of X,Y; dom(Z|`f) c= X & rng(Z|`f) c= Z by RELAT_1:85; hence thesis by RELSET_1:4; end; theorem for f being PartFunc of X,Y holds Z|`f is PartFunc of X,Y; theorem Th14: for f being Function holds Y|`f|X is PartFunc of X,Y proof let f be Function; Y|`f|X = Y|`(f|X) by RELAT_1:109; then dom(Y|`f|X) c= X & rng(Y|`f|X) c= Y by RELAT_1:58,85; hence thesis by RELSET_1:4; end; theorem for f being PartFunc of X,Y st y in f.:X ex x being Element of X st x in dom f & y = f.x proof let f be PartFunc of X,Y; assume y in f.:X; then ex x st x in dom f & x in X & y = f.x by FUNCT_1:def 6; hence thesis; end; theorem Th16: for f being PartFunc of {x},Y holds rng f c= {f.x} proof let f be PartFunc of {x},Y; dom f = {} or dom f = {x} by ZFMISC_1:33; then rng f = {} or rng f = {f.x} by FUNCT_1:4,RELAT_1:42; hence thesis by ZFMISC_1:33; end; theorem for f being PartFunc of {x},Y holds f is one-to-one proof let f be PartFunc of {x},Y; let x1,x2; assume that A1: x1 in dom f and A2: x2 in dom f; dom f<>{} implies x1 = x & x2 = x by A1,A2,TARSKI:def 1; hence thesis by A1; end; theorem for f being PartFunc of {x},Y holds f.:P c= {f.x} proof let f be PartFunc of {x},Y; f.:P c= rng f & rng f c= {f.x} by Th16,RELAT_1:111; hence thesis by XBOOLE_1:1; end; theorem for f being Function st dom f = {x} & x in X & f.x in Y holds f is PartFunc of X,Y proof let f be Function; assume that A1: dom f = {x} and A2: x in X and A3: f.x in Y; rng f = {f.x} by A1,FUNCT_1:4; then A4: rng f c= Y by A3,ZFMISC_1:31; dom f c= X by A1,A2,ZFMISC_1:31; hence thesis by A4,RELSET_1:4; end; theorem Th20: for f being PartFunc of X,{y} st x in dom f holds f.x = y proof let f be PartFunc of X,{y}; x in dom f implies f.x in {y} by Th4; hence thesis by TARSKI:def 1; end; theorem for f1,f2 being PartFunc of X,{y} st dom f1 = dom f2 holds f1 = f2 proof let f1,f2 be PartFunc of X,{y} such that A1: dom f1 = dom f2; x in dom f1 implies f1.x = f2.x proof assume A2: x in dom f1; then f1.x = y by Th20; hence thesis by A1,A2,Th20; end; hence thesis by A1,FUNCT_1:2; end; definition let f be Function; let X,Y be set; func <:f,X,Y:> -> PartFunc of X,Y equals Y|`f|X; coherence by Th14; end; theorem Th22: for f being Function holds <:f,X,Y:> c= f proof let f be Function; (Y|`f|X) c= (Y|`f) & (Y|`f) c= f by RELAT_1:59,86; hence thesis by XBOOLE_1:1; end; theorem Th23: for f being Function holds dom <:f,X,Y:> c= dom f & rng <:f,X,Y :> c= rng f proof let f be Function; <:f,X,Y:> c= f by Th22; hence thesis by RELAT_1:11; end; theorem Th24: for f being Function holds x in dom <:f,X,Y:> iff x in dom f & x in X & f.x in Y proof let f be Function; thus x in dom <:f,X,Y:> implies x in dom f & x in X & f.x in Y proof assume A1: x in dom <:f,X,Y:>; then x in dom(Y|`f) /\ X by RELAT_1:61; then x in dom(Y|`f) by XBOOLE_0:def 4; hence thesis by A1,FUNCT_1:54; end; assume that A2: x in dom f and A3: x in X and A4: f.x in Y; x in dom(Y|`f) by A2,A4,FUNCT_1:54; then x in dom(Y|`f) /\ X by A3,XBOOLE_0:def 4; hence thesis by RELAT_1:61; end; theorem Th25: for f being Function st x in dom f & x in X & f.x in Y holds <:f ,X,Y:>.x = f.x proof let f be Function such that A1: x in dom f and A2: x in X and A3: f.x in Y; x in dom(Y|`f) by A1,A3,FUNCT_1:54; then f.x = (Y|`f).x by FUNCT_1:55 .= (Y|`f|X).x by A2,FUNCT_1:49; hence thesis; end; theorem Th26: for f being Function st x in dom <:f,X,Y:> holds <:f,X,Y:>.x = f .x proof let f be Function; assume A1: x in dom <:f,X,Y:>; then x in dom f & f.x in Y by Th24; hence thesis by A1,Th25; end; theorem for f,g being Function st f c= g holds <:f,X,Y:> c= <:g,X,Y:> proof let f,g be Function such that A1: f c= g; A2: dom <:f,X,Y:> c= dom f by Th23; now thus A3: dom <:f,X,Y:> c= dom <:g,X,Y:> proof let x; A4: dom f c= dom g by A1,RELAT_1:11; assume A5: x in dom <:f,X,Y:>; then A6: f.x = g.x by A1,A2,GRFUNC_1:2; x in dom f & f.x in Y by A5,Th24; hence thesis by A5,A4,A6,Th24; end; let x; assume A7: x in dom <:f,X,Y:>; then A8: <:f,X,Y:>.x = f.x by Th26; <:g,X,Y:>.x = g.x by A3,A7,Th26; hence <:f,X,Y:>.x = <:g,X,Y:>.x by A1,A2,A7,A8,GRFUNC_1:2; end; hence thesis by GRFUNC_1:2; end; theorem Th28: for f being Function st Z c= X holds <:f,Z,Y:> c= <:f,X,Y:> proof let f be Function such that A1: Z c= X; A2: dom <:f,Z,Y:> c= dom <:f,X,Y:> proof let x; assume A3: x in dom <:f,Z,Y:>; then A4: f.x in Y by Th24; x in Z & x in dom f by A3,Th24; hence thesis by A1,A4,Th24; end; now let x; assume A5: x in dom <:f,Z,Y:>; then <:f,Z,Y:>.x = f.x by Th26; hence <:f,Z,Y:>.x = <:f,X,Y:>.x by A2,A5,Th26; end; hence thesis by A2,GRFUNC_1:2; end; theorem Th29: for f being Function st Z c= Y holds <:f,X,Z:> c= <:f,X,Y:> proof let f be Function such that A1: Z c= Y; A2: dom <:f,X,Z:> c= dom <:f,X,Y:> proof let x; assume A3: x in dom <:f,X,Z:>; then f.x in Z & x in dom f by Th24; hence thesis by A1,A3,Th24; end; now let x; assume A4: x in dom <:f,X,Z:>; then <:f,X,Z:>.x = f.x by Th26; hence <:f,X,Z:>.x = <:f,X,Y:>.x by A2,A4,Th26; end; hence thesis by A2,GRFUNC_1:2; end; theorem for f being Function st X1 c= X2 & Y1 c= Y2 holds <:f,X1,Y1:> c= <:f, X2,Y2:> proof let f be Function; assume X1 c= X2 & Y1 c= Y2; then <:f,X1,Y1:> c= <:f,X2,Y1:> & <:f,X2,Y1:> c= <:f,X2,Y2:> by Th28,Th29; hence thesis by XBOOLE_1:1; end; theorem Th31: for f being Function st dom f c= X & rng f c= Y holds f = <:f,X, Y:> proof let f be Function such that A1: dom f c= X & rng f c= Y; A2: dom f c= dom <:f,X,Y:> proof let x; assume A3: x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis by A1,A3,Th24; end; dom <:f,X,Y:> c= dom f by Th23; then A4: dom f = dom <:f,X,Y:> by A2,XBOOLE_0:def 10; for x st x in dom f holds f.x = <:f,X,Y:>.x by A2,Th26; hence thesis by A4,FUNCT_1:2; end; theorem for f being Function holds f = <:f,dom f,rng f:>; theorem for f being PartFunc of X,Y holds <:f,X,Y:> = f proof let f be PartFunc of X,Y; thus thesis; end; theorem Th34: <:{},X,Y:> = {} proof dom {} c= X & rng {} c= Y by XBOOLE_1:2; hence thesis by Th31; end; theorem Th35: for f,g being Function holds (<:g,Y,Z:>*<:f,X,Y:>) c= <:g*f,X,Z :> proof let f,g be Function; A1: for x st x in dom (<:g,Y,Z:>*<:f,X,Y:>) holds (<:g,Y,Z:>*<:f,X,Y:>).x = <:g*f,X,Z:>.x proof let x; assume A2: x in dom (<:g,Y,Z:>*<:f,X,Y:>); then A3: x in dom<:f,X,Y:> by FUNCT_1:11; then A4: x in dom f by Th24; <:f,X,Y:>.x in dom<:g,Y,Z:> by A2,FUNCT_1:11; then A5: f.x in dom<:g,Y,Z:> by A3,Th26; then g.(f.x) in Z by Th24; then A6: (g*f).x in Z by A4,FUNCT_1:13; f.x in dom g by A5,Th24; then x in dom (g*f) by A4,FUNCT_1:11; then A7: x in dom <:g*f,X,Z:> by A2,A6,Th24; thus (<:g,Y,Z:>*<:f,X,Y:>).x = <:g,Y,Z:>.(<:f,X,Y:>.x) by A2,FUNCT_1:12 .= <:g,Y,Z:>.(f.x) by A3,Th26 .= g.(f.x) by A5,Th26 .= (g*f).x by A4,FUNCT_1:13 .= <:g*f,X,Z:>.x by A7,Th26; end; dom (<:g,Y,Z:>*<:f,X,Y:>) c= dom <:g*f,X,Z:> proof let x; assume A8: x in dom (<:g,Y,Z:>*<:f,X,Y:>); then A9: x in dom<:f,X,Y:> by FUNCT_1:11; then A10: x in dom f by Th24; <:f,X,Y:>.x in dom<:g,Y,Z:> by A8,FUNCT_1:11; then A11: f.x in dom<:g,Y,Z:> by A9,Th26; then g.(f.x) in Z by Th24; then A12: (g*f).x in Z by A10,FUNCT_1:13; f.x in dom g by A11,Th24; then x in dom (g*f) by A10,FUNCT_1:11; hence thesis by A8,A12,Th24; end; hence thesis by A1,GRFUNC_1:2; end; theorem for f,g being Function st rng f /\ dom g c= Y holds <:g,Y,Z:>*<:f,X,Y :> = <:g*f,X,Z:> proof let f,g be Function such that A1: rng f /\ dom g c= Y; A2: dom <:g*f,X,Z:> c= dom (<:g,Y,Z:>*<:f,X,Y:>) proof let x; assume A3: x in dom <:g*f,X,Z:>; then A4: x in dom (g*f) by Th24; then A5: f.x in dom g by FUNCT_1:11; A6: x in dom f by A4,FUNCT_1:11; then f.x in rng f by FUNCT_1:def 3; then A7: f.x in rng f /\ dom g by A5,XBOOLE_0:def 4; (g*f).x in Z by A3,Th24; then g.(f.x) in Z by A4,FUNCT_1:12; then A8: f.x in dom <:g,Y,Z:> by A1,A5,A7,Th24; x in dom <:f,X,Y:> & <:f,X,Y:>.x = f.x by A1,A3,A6,A7,Th24,Th25; hence thesis by A8,FUNCT_1:11; end; for x st x in dom <:g*f,X,Z:> holds <:g*f,X,Z:>.x = (<:g,Y,Z:>*<:f,X,Y :>).x proof let x; assume A9: x in dom <:g*f,X,Z:>; then A10: x in dom (g*f) by Th24; then A11: f.x in dom g by FUNCT_1:11; x in dom f by A10,FUNCT_1:11; then f.x in rng f by FUNCT_1:def 3; then A12: f.x in rng f /\ dom g by A11,XBOOLE_0:def 4; (g*f).x in Z by A9,Th24; then g.(f.x) in Z by A10,FUNCT_1:12; then A13: f.x in dom <:g,Y,Z:> by A1,A11,A12,Th24; x in dom f by A10,FUNCT_1:11; then A14: x in dom <:f,X,Y:> by A1,A9,A12,Th24; thus <:g*f,X,Z:>.x = (g*f).x by A9,Th26 .= g.(f.x) by A10,FUNCT_1:12 .= <:g,Y,Z:>.(f.x) by A13,Th26 .= <:g,Y,Z:>.(<:f,X,Y:>.x) by A14,Th26 .= (<:g,Y,Z:>*<:f,X,Y:>).x by A2,A9,FUNCT_1:12; end; then A15: <:g*f,X,Z:> c= (<:g,Y,Z:>*<:f,X,Y:>) by A2,GRFUNC_1:2; (<:g,Y,Z:>*<:f,X,Y:>) c= <:g*f,X,Z:> by Th35; hence thesis by A15,XBOOLE_0:def 10; end; theorem Th37: for f being Function st f is one-to-one holds <:f,X,Y:> is one-to-one proof let f be Function; assume f is one-to-one; then Y|`f is one-to-one by FUNCT_1:58; hence thesis by FUNCT_1:52; end; theorem for f being Function st f is one-to-one holds <:f,X,Y:>" = <:f",Y,X:> proof let f be Function; assume A1: f is one-to-one; then A2: <:f,X,Y:> is one-to-one by Th37; y in dom (<:f,X,Y:>") iff y in dom <:f",Y,X:> proof thus y in dom (<:f,X,Y:>") implies y in dom <:f",Y,X:> proof assume y in dom (<:f,X,Y:>"); then A3: y in rng <:f,X,Y:> by A2,FUNCT_1:33; then consider x such that A4: x in dom <:f,X,Y:> and A5: y = <:f,X,Y:>.x by FUNCT_1:def 3; A6: f.x = y by A4,A5,Th26; then A7: y in Y by A4,Th24; rng <:f,X,Y:> c= rng f by Th23; then y in rng f by A3; then A8: y in dom(f") by A1,FUNCT_1:32; dom <:f,X,Y:> c= dom f by Th23; then (f").y = x by A1,A4,A6,FUNCT_1:32; hence thesis by A4,A8,A7,Th24; end; assume A9: y in dom <:f",Y,X:>; dom <:f",Y,X:> c= dom (f") by Th23; then y in dom(f") by A9; then y in rng f by A1,FUNCT_1:33; then consider x such that A10: x in dom f and A11: y = f.x by FUNCT_1:def 3; x =(f").(f.x) by A1,A10,FUNCT_1:34; then x in X by A9,A11,Th24; then x in dom <:f,X,Y:> by A9,A10,A11,Th24; then <:f,X,Y:>.x in rng <:f,X,Y:> & <:f,X,Y:>.x = f.x by Th26,FUNCT_1:def 3 ; hence thesis by A2,A11,FUNCT_1:33; end; then A12: dom (<:f,X,Y:>") = dom <:f",Y,X:> by TARSKI:1; for y st y in dom <:f",Y,X:> holds <:f",Y,X:>.y = (<:f,X,Y:>").y proof let y; A13: rng <:f,X,Y:> c= rng f by Th23; assume A14: y in dom <:f",Y,X:>; then y in rng <:f,X,Y:> by A2,A12,FUNCT_1:33; then consider x such that A15: x in dom f and A16: y = f.x by A13,FUNCT_1:def 3; A17: x =(f").(f.x) by A1,A15,FUNCT_1:34; then x in X by A14,A16,Th24; then x in dom<:f,X,Y:> by A14,A15,A16,Th24; then (<:f,X,Y:>").(<:f,X,Y:>.x) = x & <:f,X,Y:>.x = f.x by A2,Th26, FUNCT_1:34; hence thesis by A14,A16,A17,Th26; end; hence thesis by A12,FUNCT_1:2; end; theorem for f being Function holds Z|`<:f,X,Y:> = <:f,X,Z /\ Y:> proof let f be Function; thus Z|`<:f,X,Y:> = Z|`(Y|`(f|X)) by RELAT_1:109 .= (Z /\ Y)|`(f|X) by RELAT_1:96 .= <:f,X,Z /\ Y:> by RELAT_1:109; end; definition let X; let f be X-defined Relation; attr f is total means :Def2: dom f = X; end; registration let X be empty set, Y be set; cluster -> total for Relation of X,Y; coherence proof let R be Relation of X,Y; thus dom R = X; end; end; registration let X be non empty set, Y be empty set; cluster -> non total for Relation of X,Y; coherence proof let f be Relation of X,Y; assume f is total; then dom f = X by Def2; hence thesis; end; end; theorem Th40: for f being Function st <:f,X,Y:> is total holds X c= dom f proof let f be Function such that A1: dom <:f,X,Y:> = X; A2: dom <:f,X,Y:> c= dom f by Th23; let x; assume x in X; hence thesis by A1,A2; end; theorem <:{},X,Y:> is total implies X = {} proof dom {} = {}; hence thesis by Th40,XBOOLE_1:3; end; theorem for f being Function st X c= dom f & rng f c= Y holds <:f,X,Y:> is total proof let f be Function such that A1: X c= dom f and A2: rng f c= Y; X c= dom <:f,X,Y:> proof let x; assume A3: x in X; then f.x in rng f by A1,FUNCT_1:def 3; hence thesis by A1,A2,A3,Th24; end; hence dom <:f,X,Y:> = X by XBOOLE_0:def 10; end; theorem for f being Function st <:f,X,Y:> is total holds f.:X c= Y proof let f be Function such that A1: dom <:f,X,Y:> = X; let y; A2: rng <:f,X,Y:> c= Y by RELAT_1:def 19; assume y in f.:X; then consider x such that x in dom f and A3: x in X & y = f.x by FUNCT_1:def 6; <:f,X,Y:>.x = y & <:f,X,Y:>.x in rng <:f,X,Y:> by A1,A3,Th26,FUNCT_1:def 3; hence thesis by A2; end; theorem for f being Function st X c= dom f & f.:X c= Y holds <:f,X,Y:> is total proof let f be Function such that A1: X c= dom f and A2: f.:X c= Y; X c= dom <:f,X,Y:> proof let x; assume A3: x in X; then f.x in f.:X by A1,FUNCT_1:def 6; hence thesis by A1,A2,A3,Th24; end; hence dom <:f,X,Y:> = X by XBOOLE_0:def 10; end; definition let X,Y; func PFuncs(X,Y) -> set means :Def3: x in it iff ex f being Function st x = f & dom f c= X & rng f c= Y; existence proof defpred P[set] means ex f be Function st $1 = f & dom f c= X & rng f c= Y; consider F being set such that A1: z in F iff z in bool [:X,Y:] & P[z] from XBOOLE_0:sch 1; take F; let z; thus z in F implies ex f being Function st z = f & dom f c= X & rng f c= Y by A1; given f being Function such that A2: z = f and A3: dom f c= X & rng f c= Y; f c= [:X,Y:] proof let x,y; assume A4: [x,y] in f; then A5: x in dom f by XTUPLE_0:def 12; then y = f.x by A4,FUNCT_1:def 2; then y in rng f by A5,FUNCT_1:def 3; hence thesis by A3,A5,ZFMISC_1:def 2; end; hence thesis by A1,A2,A3; end; uniqueness proof let F1,F2 be set such that A6: x in F1 iff ex f being Function st x = f & dom f c= X & rng f c= Y and A7: x in F2 iff ex f being Function st x = f & dom f c= X & rng f c= Y; x in F1 iff x in F2 proof x in F1 iff ex f being Function st x = f & dom f c= X & rng f c= Y by A6; hence thesis by A7; end; hence thesis by TARSKI:1; end; end; registration let X,Y; cluster PFuncs(X,Y) -> non empty; coherence proof ex f being Function st dom f c= X & rng f c= Y by Lm1; hence thesis by Def3; end; end; theorem Th45: for f being PartFunc of X,Y holds f in PFuncs(X,Y) proof let f be PartFunc of X,Y; dom f c= X & rng f c= Y by RELAT_1:def 19; hence thesis by Def3; end; theorem Th46: for f being set st f in PFuncs(X,Y) holds f is PartFunc of X,Y proof let f be set; assume f in PFuncs(X,Y); then ex F being Function st f = F & dom F c= X & rng F c= Y by Def3; hence thesis by RELSET_1:4; end; theorem for f being Element of PFuncs(X,Y) holds f is PartFunc of X,Y by Th46; theorem PFuncs({},Y) = { {} } proof x in PFuncs({},Y) iff x = {} proof thus x in PFuncs({},Y) implies x = {} proof assume x in PFuncs({},Y); then x is PartFunc of {},Y by Th46; hence thesis; end; {} is PartFunc of {},Y by RELSET_1:12; hence thesis by Th45; end; hence thesis by TARSKI:def 1; end; theorem PFuncs(X,{}) = { {} } proof x in PFuncs(X,{}) iff x = {} proof thus x in PFuncs(X,{}) implies x = {} proof assume x in PFuncs(X,{}); then x is PartFunc of X,{} by Th46; hence thesis; end; {} is PartFunc of X,{} by RELSET_1:12; hence thesis by Th45; end; hence thesis by TARSKI:def 1; end; theorem X1 c= X2 & Y1 c= Y2 implies PFuncs(X1,Y1) c= PFuncs(X2,Y2) proof assume A1: X1 c= X2 & Y1 c= Y2; let f be set; assume f in PFuncs(X1,Y1); then f is PartFunc of X1,Y1 by Th46; then f is PartFunc of X2,Y2 by A1,RELSET_1:7; hence thesis by Th45; end; definition let f,g be Function; pred f tolerates g means :Def4: for x st x in dom f /\ dom g holds f.x = g.x; reflexivity; symmetry; end; theorem Th51: for f,g being Function holds f tolerates g iff ex h being Function st f \/ g = h proof let f,g be Function; (for x st x in dom f /\ dom g holds f.x = g.x) iff ex h being Function st f \/ g = h by Th1,Th2; hence thesis by Def4; end; theorem Th52: for f,g being Function holds f tolerates g iff ex h being Function st f c= h & g c= h proof let f,g be Function; now thus (ex h being Function st f c= h & g c= h) implies ex h being Function st f \/ g = h proof given h being Function such that A1: f c= h & g c= h; f \/ g is Function by A1,GRFUNC_1:1,XBOOLE_1:8; hence thesis; end; given h being Function such that A2: f \/ g = h; f c= h & g c= h by A2,XBOOLE_1:7; hence ex h being Function st f c= h & g c= h; end; hence thesis by Th51; end; theorem Th53: for f,g being Function st dom f c= dom g holds f tolerates g iff for x st x in dom f holds f.x = g.x proof let f,g be Function; assume dom f c= dom g; then dom f /\ dom g = dom f by XBOOLE_1:28; hence thesis by Def4; end; theorem for f,g being Function st f c= g holds f tolerates g by Th52; theorem Th55: for f,g being Function st dom f = dom g & f tolerates g holds f = g proof let f,g be Function; assume that A1: dom f = dom g and A2: f tolerates g; for x st x in dom f holds f.x = g.x by A1,A2,Th53; hence thesis by A1,FUNCT_1:2; end; theorem for f,g being Function st dom f misses dom g holds f tolerates g proof let f,g be Function; assume dom f misses dom g; then f \/ g is Function by GRFUNC_1:13; hence thesis by Th51; end; theorem for f,g,h being Function st f c= h & g c= h holds f tolerates g by Th52; theorem for f,g being PartFunc of X,Y for h being Function st f tolerates h & g c= f holds g tolerates h proof let f,g be (PartFunc of X,Y),h be Function such that A1: f tolerates h and A2: g c= f; A3: dom g c= dom f by A2,RELAT_1:11; let x; assume A4: x in dom g /\ dom h; then A5: x in dom g by XBOOLE_0:def 4; then A6: f.x = g.x by A2,GRFUNC_1:2; x in dom h by A4,XBOOLE_0:def 4; then x in dom f /\ dom h by A5,A3,XBOOLE_0:def 4; hence thesis by A1,A6,Def4; end; theorem Th59: for f being Function holds {} tolerates f proof let f be Function; {} \/ f = f; hence thesis by Th51; end; theorem for f being Function holds <:{},X,Y:> tolerates f proof let f be Function; <:{},X,Y:> = {} by Th34; hence thesis by Th59; end; theorem for f,g being PartFunc of X,{y} holds f tolerates g proof let f,g be PartFunc of X,{y}; let x; assume A1: x in dom f /\ dom g; then x in dom f by XBOOLE_0:def 4; then A2: f.x = y by Th20; x in dom g by A1,XBOOLE_0:def 4; hence thesis by A2,Th20; end; theorem for f being Function holds f|X tolerates f proof let f be Function; (f|X) c= f by RELAT_1:59; hence thesis by Th52; end; theorem for f being Function holds Y|`f tolerates f proof let f be Function; (Y|`f) c= f by RELAT_1:86; hence thesis by Th52; end; theorem Th64: for f being Function holds Y|`f|X tolerates f proof let f be Function; (Y|`f|X) c= (Y|`f) & (Y|`f) c= f by RELAT_1:59,86; then (Y|`f|X) c= f by XBOOLE_1:1; hence thesis by Th52; end; theorem for f being Function holds <:f,X,Y:> tolerates f by Th64; theorem Th66: for f,g being PartFunc of X,Y st f is total & g is total & f tolerates g holds f = g proof let f,g be PartFunc of X,Y; assume dom f = X & dom g = X; hence thesis by Th55; end; theorem Th67: for f,g,h being PartFunc of X,Y st f tolerates h & g tolerates h & h is total holds f tolerates g proof let f,g,h be PartFunc of X,Y such that A1: f tolerates h and A2: g tolerates h and A3: dom h = X; let x; assume A4: x in dom f /\ dom g; then x in dom f by XBOOLE_0:def 4; then x in dom f /\ dom h by A3,XBOOLE_0:def 4; then A5: f.x = h.x by A1,Def4; x in dom g by A4,XBOOLE_0:def 4; then x in dom g /\ dom h by A3,XBOOLE_0:def 4; hence thesis by A2,A5,Def4; end; theorem Th68: for f,g being PartFunc of X,Y st (Y = {} implies X = {}) & f tolerates g ex h being PartFunc of X,Y st h is total & f tolerates h & g tolerates h proof let f,g be PartFunc of X,Y such that A1: Y = {} implies X = {} and A2: f tolerates g; now per cases; suppose A3: Y = {}; then f tolerates <:{},X,Y:> & g tolerates <:{},X,Y:>; hence thesis by A1,A3; end; suppose A4: Y <> {}; set y = the Element of Y; defpred P[set,set] means ($1 in dom f implies $2 = f.$1) & ($1 in dom g implies $2 = g.$1) & (not $1 in dom f & not $1 in dom g implies $2 = y); A5: for x st x in X ex y9 st P[x,y9] proof let x such that x in X; now per cases; suppose A6: x in dom f & x in dom g; take y9 = f.x; thus x in dom f implies y9 = f.x; x in dom f /\ dom g by A6,XBOOLE_0:def 4; hence x in dom g implies y9 = g.x by A2,Def4; thus not x in dom f & not x in dom g implies y9 = y by A6; end; suppose A7: x in dom f & not x in dom g; take y9 = f.x; thus (x in dom f implies y9 = f.x) & (x in dom g implies y9 = g.x) & (not x in dom f & not x in dom g implies y9 = y) by A7; end; suppose A8: not x in dom f & x in dom g; take y9 = g.x; thus (x in dom f implies y9 = f.x) & (x in dom g implies y9 = g.x) & (not x in dom f & not x in dom g implies y9 = y) by A8; end; suppose not x in dom f & not x in dom g; hence thesis; end; end; hence thesis; end; A9: for x,y1,y2 st x in X & P[x,y1] & P[x,y2] holds y1 = y2; consider h being Function such that A10: dom h = X and A11: for x st x in X holds P[x,h.x] from FUNCT_1:sch 2(A9,A5); rng h c= Y proof let z; assume z in rng h; then consider x such that A12: x in dom h and A13: z = h.x by FUNCT_1:def 3; per cases; suppose A14: x in dom f & x in dom g; then z = f.x by A11,A13; hence thesis by A14,Th4; end; suppose A15: x in dom f & not x in dom g; then z = f.x by A11,A13; hence thesis by A15,Th4; end; suppose A16: not x in dom f & x in dom g; then z = g.x by A11,A13; hence thesis by A16,Th4; end; suppose not x in dom f & not x in dom g; then z = y by A10,A11,A12,A13; hence thesis by A4; end; end; then reconsider h9 = h as PartFunc of X,Y by A10,RELSET_1:4; A17: f tolerates h proof let x; assume x in dom f /\ dom h; then x in dom f by XBOOLE_0:def 4; hence thesis by A11; end; A18: g tolerates h proof let x; assume x in dom g /\ dom h; then x in dom g by XBOOLE_0:def 4; hence thesis by A11; end; h9 is total by A10,Def2; hence thesis by A17,A18; end; end; hence thesis; end; definition let X,Y; let f be PartFunc of X,Y; func TotFuncs f -> set means :Def5: x in it iff ex g being PartFunc of X,Y st g = x & g is total & f tolerates g; existence proof defpred P[set] means ex g being PartFunc of X,Y st g = $1 & g is total & f tolerates g; now consider F being set such that A1: for x holds x in F iff x in PFuncs(X,Y) & P[x] from XBOOLE_0:sch 1; take F; let x; thus x in F implies ex g being PartFunc of X,Y st g = x & g is total & f tolerates g by A1; given g being PartFunc of X,Y such that A2: g = x & g is total & f tolerates g; g in PFuncs(X,Y) by Th45; hence x in F by A1,A2; end; hence thesis; end; uniqueness proof defpred P[set] means ex g being PartFunc of X,Y st g = $1 & g is total & f tolerates g; let F1,F2 be set such that A3: for x holds x in F1 iff P[x] and A4: for x holds x in F2 iff P[x]; thus thesis from XBOOLE_0:sch 2(A3,A4); end; end; theorem Th69: for f being PartFunc of X,Y for g being set st g in TotFuncs(f) holds g is PartFunc of X,Y proof let f be PartFunc of X,Y; let g be set; assume g in TotFuncs(f); then ex g9 being PartFunc of X,Y st g9 = g & g9 is total & f tolerates g9 by Def5; hence thesis; end; theorem Th70: for f,g being PartFunc of X,Y st g in TotFuncs(f) holds g is total proof let f,g be PartFunc of X,Y; assume g in TotFuncs(f); then ex g9 being PartFunc of X,Y st g9 = g & g9 is total & f tolerates g9 by Def5; hence thesis; end; theorem Th71: for f being PartFunc of X,Y for g being Function st g in TotFuncs(f) holds f tolerates g proof let f be PartFunc of X,Y; let g be Function; assume g in TotFuncs(f); then ex g9 being PartFunc of X,Y st g9 = g & g9 is total & f tolerates g9 by Def5; hence thesis; end; registration let X be non empty set, Y be empty set; let f be PartFunc of X,Y; cluster TotFuncs f -> empty; coherence proof set g = the Element of TotFuncs(f); assume TotFuncs(f) is not empty; then ex g9 being PartFunc of X,{} st g9 = g & g9 is total & f tolerates g9 by Def5; hence contradiction; end; end; theorem Th72: for f being PartFunc of X,Y holds f is total iff TotFuncs f = { f} proof let f be PartFunc of X,Y; thus f is total implies TotFuncs f = {f} proof assume A1: f is total; for g being set holds g in TotFuncs f iff f = g proof let g be set; thus g in TotFuncs f implies f = g proof assume g in TotFuncs f; then ex g9 being PartFunc of X,Y st g9 = g & g9 is total & f tolerates g9 by Def5; hence thesis by A1,Th66; end; thus thesis by A1,Def5; end; hence thesis by TARSKI:def 1; end; assume TotFuncs f = {f}; then f in TotFuncs f by TARSKI:def 1; hence thesis by Th70; end; theorem for f being PartFunc of {},Y holds TotFuncs f = {f} by Th72; theorem for f being PartFunc of {},Y holds TotFuncs f = {{}} by Th72; theorem for f,g being PartFunc of X,Y st TotFuncs f meets TotFuncs g holds f tolerates g proof let f,g be PartFunc of X,Y; set h = the Element of TotFuncs f /\ TotFuncs g; assume A1: TotFuncs f /\ TotFuncs g <> {}; then A2: h in TotFuncs f by XBOOLE_0:def 4; A3: h in TotFuncs g by A1,XBOOLE_0:def 4; reconsider h as PartFunc of X,Y by A2,Th69; A4: g tolerates h by A3,Th71; f tolerates h by A2,Th71; hence thesis by A2,A4,Th67,Th70; end; theorem for f,g being PartFunc of X,Y st (Y = {} implies X = {}) & f tolerates g holds TotFuncs f meets TotFuncs g proof let f,g be PartFunc of X,Y; assume ( Y = {} implies X = {})& f tolerates g; then consider h being PartFunc of X,Y such that A1: h is total & f tolerates h & g tolerates h by Th68; h in TotFuncs f & h in TotFuncs g by A1,Def5; hence TotFuncs f /\ TotFuncs g <> {} by XBOOLE_0:def 4; end; begin Lm2: for R being Relation of X st R = id X holds R is total proof let R be Relation of X; assume R = id X; hence dom R = X by RELAT_1:45; end; Lm3: for R being Relation st R = id X holds R is reflexive symmetric antisymmetric transitive proof let R be Relation; assume A1: R = id X; then A2: dom R = X & rng R = X by RELAT_1:45; thus R is_reflexive_in field R proof let x; thus thesis by A1,A2,RELAT_1:def 10; end; thus R is_symmetric_in field R proof let x,y; assume that x in field R and y in field R; assume [x,y] in R; hence thesis by A1,RELAT_1:def 10; end; thus R is_antisymmetric_in field R proof let x; thus thesis by A1,RELAT_1:def 10; end; thus R is_transitive_in field R proof let x; thus thesis by A1,RELAT_1:def 10; end; end; Lm4: id X is Relation of X proof dom id X c= X & rng id X c= X; hence thesis by RELSET_1:4; end; registration let X; cluster total reflexive symmetric antisymmetric transitive for Relation of X; existence proof reconsider R = id X as Relation of X by Lm4; take R; thus thesis by Lm2,Lm3; end; end; registration cluster symmetric transitive -> reflexive for Relation; coherence proof let R be Relation; assume that A1: R is_symmetric_in field R and A2: R is_transitive_in field R; let x; assume A3: x in field R; then x in dom R or x in rng R by XBOOLE_0:def 3; then consider y such that A4: [x,y] in R or [y,x] in R by XTUPLE_0:def 12,def 13; y in rng R or y in dom R by A4,XTUPLE_0:def 12,def 13; then A5: y in field R by XBOOLE_0:def 3; then [x,y] in R & [y,x] in R by A1,A3,A4,RELAT_2:def 3; hence thesis by A2,A3,A5,RELAT_2:def 8; end; end; registration let X; cluster id X -> symmetric antisymmetric transitive; coherence by Lm3; end; definition let X; redefine func id X -> total Relation of X; coherence by Lm2,Lm4; end; scheme LambdaC9{ A() -> non empty set, C[set], F,G(set) -> set } : ex f being Function st dom f = A() & for x be Element of A() holds (C[x] implies f.x = F(x)) & (not C[x] implies f.x = G(x)); consider f being Function such that A1: dom f = A() & for x be set st x in A() holds (C[x] implies f.x = F(x )) & (not C[x] implies f.x = G(x)) from LambdaC; take f; thus thesis by A1; end; begin reserve A for set, f,g,h for Function; theorem Th77: f tolerates g & [x,y] in f & [x,z] in g implies y = z proof assume f tolerates g; then consider h such that A1: h = f \/ g by Th51; assume [x,y] in f & [x,z] in g; then [x,y] in h & [x,z] in h by A1,XBOOLE_0:def 3; hence thesis by FUNCT_1:def 1; end; theorem A is functional & (for f,g being Function st f in A & g in A holds f tolerates g) implies union A is Function proof assume that A1: for x st x in A holds x is Function and A2: for f,g being Function st f in A & g in A holds f tolerates g; A3: now let x,y,z; assume that A4: [x,y] in union A and A5: [x,z] in union A; consider p being set such that A6: [x,y] in p and A7: p in A by A4,TARSKI:def 4; consider q being set such that A8: [x,z] in q and A9: q in A by A5,TARSKI:def 4; reconsider p,q as Function by A1,A7,A9; p tolerates q by A2,A7,A9; hence y = z by A6,A8,Th77; end; now let z; assume z in union A; then consider p being set such that A10: z in p and A11: p in A by TARSKI:def 4; reconsider p as Function by A1,A11; p = p; hence ex x,y st [x,y] = z by A10,RELAT_1:def 1; end; hence thesis by A3,FUNCT_1:def 1,RELAT_1:def 1; end; definition let D be set, p be D-valued Function, i be set; assume A1: i in dom p; func p/.i -> Element of D equals :Def6: p.i; coherence by A1,Th4; end; registration let X,Y be non empty set; cluster non empty for PartFunc of X,Y; existence proof reconsider p = {[choose X,choose Y]} as PartFunc of X,Y by RELSET_1:3; take p; thus thesis; end; end; registration let A, B be set; cluster PFuncs(A,B) -> functional; coherence proof let x be set; assume x in PFuncs(A,B); then ex f being Function st x = f & dom f c= A & rng f c= B by Def3; hence thesis; end; end; theorem for f1,f2, g being Function st rng g c= dom f1 & rng g c= dom f2 & f1 tolerates f2 holds f1*g = f2*g proof let f1,f2, g be Function; assume that A1: rng g c= dom f1 and A2: rng g c= dom f2 and A3: f1 tolerates f2; A4: dom (f2*g) = dom g by A2,RELAT_1:27; A5: dom (f1*g) = dom g by A1,RELAT_1:27; now let x be set; assume A6: x in dom g; then A7: (f2*g).x = f2.(g.x) by A4,FUNCT_1:12; g.x in rng g by A6,FUNCT_1:def 3; then A8: g.x in (dom f1) /\ (dom f2) by A1,A2,XBOOLE_0:def 4; (f1*g).x = f1.(g.x) by A5,A6,FUNCT_1:12; hence (f1*g).x = (f2*g).x by A3,A7,A8,Def4; end; hence thesis by A5,A4,FUNCT_1:2; end; theorem for f being Y-valued Function st x in dom(f|X) holds (f|X)/.x = f/.x proof let f be Y-valued Function; assume A1: x in dom(f|X); then A2: x in dom f by RELAT_1:57; thus (f|X)/.x = (f|X).x by A1,Def6 .= f.x by A1,FUNCT_1:47 .= f/.x by A2,Def6; end; begin reserve v,x,x1,x2,x3,x4,y,y1,y2,y3,y4,z,z1,z2, X,X1,X2,X3,X4,Y,Y1,Y2,Y3,Y4,Y5, Z,Z1,Z2,Z3,Z4,Z5 for set; reserve p for pair set; canceled 6; theorem Th7: [x,y]`1=x & [x,y]`2=y; theorem Th8: [p`1,p`2] = p; theorem X <> {} implies ex v st v in X & not ex x,y st (x in X or y in X) & v = [x,y] proof assume X <> {}; then consider Y such that A1: Y in X and A2: not ex Y1 st Y1 in Y & not Y1 misses X by XREGULAR:2; take v = Y; thus v in X by A1; given x,y such that A3: x in X or y in X and A4: v = [x,y]; A5: { x,y } in Y by A4,TARSKI:def 2; x in { x,y } & y in { x,y } by TARSKI:def 2; hence contradiction by A2,A5,A3,XBOOLE_0:3; end; theorem Th10: z in [:X,Y:] implies z`1 in X & z`2 in Y proof assume z in [:X,Y:]; then consider x,y such that W: x in X & y in Y & z=[x,y] by ZFMISC_1:def 2; [x,y]`1 = x & [x,y]`2 = y; hence thesis by W; end; theorem (ex x,y st z=[x,y]) & z`1 in X & z`2 in Y implies z in [:X,Y:] proof assume ex x,y st z=[x,y]; then [z`1,z`2]=z by Th8; hence thesis by ZFMISC_1:def 2; end; theorem z in [:{x},Y:] implies z`1=x & z`2 in Y proof assume A1: z in [:{x},Y:]; then z`1 in {x} by Th10; hence thesis by A1,Th10,TARSKI:def 1; end; theorem z in [:X,{y}:] implies z`1 in X & z`2 = y proof assume A1: z in [:X,{y}:]; then z`2 in {y} by Th10; hence thesis by A1,Th10,TARSKI:def 1; end; theorem z in [:{x},{y}:] implies z`1 = x & z`2 = y proof assume z in [:{x},{y}:]; then z`1 in {x} & z`2 in {y} by Th10; hence thesis by TARSKI:def 1; end; theorem z in [:{x1,x2},Y:] implies (z`1=x1 or z`1=x2) & z`2 in Y proof assume A1: z in [:{x1,x2},Y:]; then z`1 in {x1,x2} by Th10; hence thesis by A1,Th10,TARSKI:def 2; end; theorem z in [:X,{y1,y2}:] implies z`1 in X & (z`2 = y1 or z`2 = y2) proof assume A1: z in [:X,{y1,y2}:]; then z`2 in {y1,y2} by Th10; hence thesis by A1,Th10,TARSKI:def 2; end; theorem z in [:{x1,x2},{y}:] implies (z`1=x1 or z`1=x2) & z`2 = y proof assume z in [:{x1,x2},{y}:]; then z`1 in {x1,x2} & z`2 in {y} by Th10; hence thesis by TARSKI:def 1,def 2; end; theorem z in [:{x},{y1,y2}:] implies z`1 = x & (z`2 = y1 or z`2 = y2) proof assume z in [:{x},{y1,y2}:]; then z`1 in {x} & z`2 in {y1,y2} by Th10; hence thesis by TARSKI:def 1,def 2; end; theorem z in [:{x1,x2},{y1,y2}:] implies (z`1 = x1 or z`1 = x2) & (z`2 = y1 or z`2 = y2) proof assume z in [:{x1,x2},{y1,y2}:]; then z`1 in {x1,x2} & z`2 in {y1,y2} by Th10; hence thesis by TARSKI:def 2; end; theorem Th20: (ex y,z st x = [y,z]) implies x <> x`1 & x <> x`2 proof given y,z such that A1: x = [y,z]; X: [y,z]`1 = y & [y,z]`2 = z; now assume y = x; then {{y,z},{y}} in {y} by A1,TARSKI:def 1; hence contradiction by TARSKI:def 2; end; hence x <> x`1 by A1,X; now assume z = x; then {{y,z},{y}} in {y,z} by A1,TARSKI:def 2; hence contradiction by TARSKI:def 2; end; hence thesis by A1,X; end; reserve R for Relation; theorem Th21: x in R implies x = [x`1,x`2] proof assume x in R; then ex x1,x2 st x=[x1,x2] by RELAT_1:def 1; hence thesis by Th8; end; theorem X <> {} & Y <> {} implies for x being Element of [:X,Y:] holds x = [x`1,x`2] by Th21; Lm1: X1 <> {} & X2 <> {} implies for x being Element of [:X1,X2:] ex xx1 being (Element of X1), xx2 being Element of X2 st x = [xx1,xx2] proof assume A1: X1 <> {} & X2 <> {}; let x be Element of [:X1,X2:]; reconsider xx2 = x`2 as Element of X2 by A1,Th10; reconsider xx1 = x`1 as Element of X1 by A1,Th10; take xx1,xx2; thus thesis by A1,Th21; end; theorem Th23: [:{x1,x2},{y1,y2}:] = {[x1,y1],[x1,y2],[x2,y1],[x2,y2]} proof thus [:{x1,x2},{y1,y2}:] = [:{x1},{y1,y2}:] \/ [:{x2},{y1,y2}:] by ZFMISC_1:109 .= {[x1,y1],[x1,y2]} \/ [:{x2},{y1,y2}:] by ZFMISC_1:30 .= {[x1,y1],[x1,y2]} \/ {[x2,y1],[x2,y2]} by ZFMISC_1:30 .= {[x1,y1],[x1,y2],[x2,y1],[x2,y2]} by ENUMSET1:5; end; theorem Th24: X <> {} & Y <> {} implies for x being Element of [:X,Y:] holds x <> x`1 & x <> x`2 proof assume A1: X <> {} & Y <> {}; let x be Element of [:X,Y:]; x = [x`1,x`2] by A1,Th21; hence thesis by Th20; end; canceled; theorem Th26: X <> {} implies ex v st v in X & not ex x,y,z st (x in X or y in X) & v = [x,y,z] proof assume X <> {}; then consider Y such that A1: Y in X and A2: not ex Y1,Y2,Y3 st Y1 in Y2 & Y2 in Y3 & Y3 in Y & not Y1 misses X by XREGULAR:4; take v = Y; thus v in X by A1; given x,y,z such that A3: x in X or y in X and A4: v = [x,y,z]; set Y1 = { x,y }, Y2 = { Y1,{x} }, Y3 = { Y2,z }; B5: x in Y1 & y in Y1 by TARSKI:def 2; A6: Y3 in Y by A4,TARSKI:def 2; Y1 in Y2 & Y2 in Y3 by TARSKI:def 2; hence contradiction by A2,B5,A6,A3,XBOOLE_0:3; end; canceled 3; theorem Th30: X <> {} implies ex v st v in X & not ex x1,x2,x3,x4 st (x1 in X or x2 in X) & v = [x1,x2,x3,x4] proof assume X <> {}; then consider Y such that A1: Y in X and A2: for Y1,Y2,Y3,Y4,Y5 st Y1 in Y2 & Y2 in Y3 & Y3 in Y4 & Y4 in Y5 & Y5 in Y holds Y1 misses X by XREGULAR:6; take v = Y; thus v in X by A1; given x1,x2,x3,x4 such that A3: x1 in X or x2 in X and A4: v = [x1,x2,x3,x4]; set Y1 = { x1,x2 }, Y2 = { Y1,{x1} }, Y3 = { Y2,x3 }, Y4 = { Y3, {Y2}}, Y5 = { Y4,x4 }; A5: Y3 in Y4 & Y4 in Y5 by TARSKI:def 2; A6: Y5 in Y by A4,TARSKI:def 2; B7: x1 in Y1 & x2 in Y1 by TARSKI:def 2; Y1 in Y2 & Y2 in Y3 by TARSKI:def 2; hence contradiction by A2,B7,A5,A6,A3,XBOOLE_0:3; end; theorem Th31: X1 <> {} & X2 <> {} & X3 <> {} iff [:X1,X2,X3:] <> {} proof A1: X1 <> {} & X2 <> {} iff [:X1,X2:] <> {} by ZFMISC_1:90; [:[:X1,X2:],X3:] = [:X1,X2,X3:] by ZFMISC_1:def 3; hence thesis by A1,ZFMISC_1:90; end; reserve xx1 for Element of X1, xx2 for Element of X2, xx3 for Element of X3; theorem Th32: X1<>{} & X2<>{} & X3<>{} implies ( [:X1,X2,X3:] = [:Y1,Y2,Y3:] implies X1=Y1 & X2=Y2 & X3=Y3) proof A1: [:X1,X2,X3:] = [:[:X1,X2:],X3:] by ZFMISC_1:def 3; assume A2: X1<>{} & X2<>{}; assume A4: X3<>{}; assume [:X1,X2,X3:] = [:Y1,Y2,Y3:]; then A5: [:[:X1,X2:],X3:] = [:[:Y1,Y2:],Y3:] by A1,ZFMISC_1:def 3; then [:X1,X2:] = [:Y1,Y2:] by A2,A4,ZFMISC_1:110; hence thesis by A2,A4,A5,ZFMISC_1:110; end; theorem [:X1,X2,X3:]<>{} & [:X1,X2,X3:] = [:Y1,Y2,Y3:] implies X1=Y1 & X2=Y2 & X3=Y3 proof assume A1: [:X1,X2,X3:]<>{}; then A2: X3<>{} by Th31; X1<>{} & X2<>{} by A1,Th31; hence thesis by A2,Th32; end; theorem [:X,X,X:] = [:Y,Y,Y:] implies X = Y proof assume [:X,X,X:] = [:Y,Y,Y:]; then X<>{} or Y<>{} implies thesis by Th32; hence thesis; end; Lm2: X1 <> {} & X2 <> {} & X3 <> {} implies for x being Element of [:X1,X2,X3:] ex xx1,xx2,xx3 st x = [xx1,xx2,xx3] proof assume that A1: X1 <> {} & X2 <> {} and A2: X3 <> {}; let x be Element of [:X1,X2,X3:]; reconsider x9=x as Element of [:[:X1,X2:],X3:] by ZFMISC_1:def 3; consider x12 being (Element of [:X1,X2:]), xx3 such that A3: x9 = [x12,xx3] by A1,A2,Lm1; consider xx1,xx2 such that A4: x12 = [xx1,xx2] by A1,Lm1; take xx1,xx2,xx3; thus thesis by A3,A4; end; theorem Th35: [:{x1},{x2},{x3}:] = { [x1,x2,x3] } proof thus [:{x1},{x2},{x3}:] = [:[:{x1},{x2}:],{x3}:] by ZFMISC_1:def 3 .= [:{[x1,x2]},{x3}:] by ZFMISC_1:29 .= { [x1,x2,x3] } by ZFMISC_1:29; end; theorem [:{x1,y1},{x2},{x3}:] = { [x1,x2,x3],[y1,x2,x3] } proof thus [:{x1,y1},{x2},{x3}:] = [:[:{x1,y1},{x2}:],{x3}:] by ZFMISC_1:def 3 .= [:{[x1,x2],[y1,x2]},{x3}:] by ZFMISC_1:30 .= { [x1,x2,x3],[y1,x2,x3] } by ZFMISC_1:30; end; theorem [:{x1},{x2,y2},{x3}:] = { [x1,x2,x3],[x1,y2,x3] } proof thus [:{x1},{x2,y2},{x3}:] = [:[:{x1},{x2,y2}:],{x3}:] by ZFMISC_1:def 3 .= [:{[x1,x2],[x1,y2]},{x3}:] by ZFMISC_1:30 .= { [x1,x2,x3],[x1,y2,x3] } by ZFMISC_1:30; end; theorem [:{x1},{x2},{x3,y3}:] = { [x1,x2,x3],[x1,x2,y3] } proof thus [:{x1},{x2},{x3,y3}:] = [:[:{x1},{x2}:],{x3,y3}:] by ZFMISC_1:def 3 .= [:{[x1,x2]},{x3,y3}:] by ZFMISC_1:29 .= { [x1,x2,x3],[x1,x2,y3] } by ZFMISC_1:30; end; theorem [:{x1,y1},{x2,y2},{x3}:] = { [x1,x2,x3],[y1,x2,x3],[x1,y2,x3],[y1,y2, x3] } proof thus [:{x1,y1},{x2,y2},{x3}:] = [:[:{x1,y1},{x2,y2}:],{x3}:] by ZFMISC_1:def 3 .= [:{[x1,x2],[x1,y2],[y1,x2],[y1,y2]},{x3}:] by Th23 .= [:{[x1,x2],[x1,y2]} \/ {[y1,x2],[y1,y2]},{x3}:] by ENUMSET1:5 .= [:{[x1,x2],[x1,y2]},{x3}:] \/ [:{[y1,x2],[y1,y2]},{x3}:] by ZFMISC_1:97 .= { [[x1,x2],x3],[[x1,y2],x3]} \/ [:{[y1,x2],[y1,y2]},{x3}:] by ZFMISC_1:30 .= { [[x1,x2],x3],[[x1,y2],x3]} \/ {[[y1,x2],x3],[[y1,y2],x3] } by ZFMISC_1:30 .= { [x1,x2,x3],[x1,y2,x3],[y1,x2,x3],[[y1,y2],x3] } by ENUMSET1:5 .= { [x1,x2,x3],[y1,x2,x3],[x1,y2,x3],[y1,y2,x3] } by ENUMSET1:62; end; theorem [:{x1,y1},{x2},{x3,y3}:] = { [x1,x2,x3],[y1,x2,x3],[x1,x2,y3],[y1,x2, y3] } proof thus [:{x1,y1},{x2},{x3,y3}:] = [:[:{x1,y1},{x2}:],{x3,y3}:] by ZFMISC_1:def 3 .= [:{[x1,x2],[y1,x2]},{x3,y3}:] by ZFMISC_1:30 .= { [[x1,x2],x3],[[x1,x2],y3],[[y1,x2],x3],[[y1,x2],y3] } by Th23 .= { [x1,x2,x3],[y1,x2,x3],[x1,x2,y3],[y1,x2,y3] } by ENUMSET1:62; end; theorem [:{x1},{x2,y2},{x3,y3}:] = { [x1,x2,x3],[x1,y2,x3],[x1,x2,y3],[x1,y2, y3] } proof thus [:{x1},{x2,y2},{x3,y3}:] = [:[:{x1},{x2,y2}:],{x3,y3}:] by ZFMISC_1:def 3 .= [:{[x1,x2],[x1,y2]},{x3,y3}:] by ZFMISC_1:30 .= { [[x1,x2],x3],[[x1,x2],y3],[[x1,y2],x3],[[x1,y2],y3] } by Th23 .= { [x1,x2,x3],[x1,y2,x3],[x1,x2,y3],[x1,y2,y3] } by ENUMSET1:62; end; theorem [:{x1,y1},{x2,y2},{x3,y3}:] = { [x1,x2,x3],[x1,y2,x3],[x1,x2,y3],[x1, y2,y3], [y1,x2,x3],[y1,y2,x3],[y1,x2,y3],[y1,y2,y3] } proof A1: [:{[x1,x2],[x1,y2]},{x3,y3}:] = { [[x1,x2],x3],[[x1,x2],y3],[[x1,y2],x3] ,[[x1,y2],y3]} by Th23 .= { [x1,x2,x3],[x1,y2,x3],[x1,x2,y3],[x1,y2,y3]} by ENUMSET1:62; A2: [:{[y1,x2],[y1,y2]},{x3,y3}:] = { [[y1,x2],x3],[[y1,x2],y3],[[y1,y2],x3] ,[[y1,y2],y3]} by Th23 .= { [y1,x2,x3],[y1,y2,x3],[y1,x2,y3],[y1,y2,y3]} by ENUMSET1:62; thus [:{x1,y1},{x2,y2},{x3,y3}:] = [:[:{x1,y1},{x2,y2}:],{x3,y3}:] by ZFMISC_1:def 3 .= [:{[x1,x2],[x1,y2],[y1,x2],[y1,y2]},{x3,y3}:] by Th23 .= [:{[x1,x2],[x1,y2]} \/ {[y1,x2],[y1,y2]},{x3,y3}:] by ENUMSET1:5 .= { [x1,x2,x3],[x1,y2,x3],[x1,x2,y3],[x1,y2,y3]} \/ {[y1,x2,x3],[y1,y2, x3],[y1,x2,y3],[y1,y2,y3] } by A1,A2,ZFMISC_1:97 .= { [x1,x2,x3],[x1,y2,x3],[x1,x2,y3],[x1,y2,y3], [y1,x2,x3],[y1,y2,x3], [y1,x2,y3],[y1,y2,y3] } by ENUMSET1:25; end; registration let X1,X2,X3 be non empty set; cluster -> triple for Element of [:X1,X2,X3:]; coherence proof let x be Element of [:X1,X2,X3:]; ex xx1 being Element of X1, xx2 being Element of X2, xx3 being Element of X3 st x = [xx1,xx2,xx3] by Lm2; hence thesis; end; end; definition canceled 4; let X1,X2,X3 be non empty set; let x be Element of [:X1,X2,X3:]; redefine func x`1_3 -> Element of X1 means :Def5: x = [x1,x2,x3] implies it = x1; coherence proof consider xx1 being Element of X1,xx2 being Element of X2, xx3 being Element of X3 such that A6: x = [xx1,xx2,xx3] by Lm2; [xx1,xx2,xx3]`1_3 = xx1; hence x`1_3 is Element of X1 by A6; end; compatibility proof let y be Element of X1; thus y = x`1_3 implies for x1,x2,x3 holds x = [x1,x2,x3] implies y = x1 proof assume Z: y = x`1_3; let x1,x2,x3 such that W: x = [x1,x2,x3]; [x1,x2,x3]`1_3 = x1; hence y = x1 by W,Z; end; assume Z: for x1,x2,x3 holds x = [x1,x2,x3] implies y = x1; consider xx1 being Element of X1,xx2 being Element of X2, xx3 being Element of X3 such that A6: x = [xx1,xx2,xx3] by Lm2; [xx1,xx2,xx3]`1_3 = xx1; hence y = x`1_3 by Z,A6; end; redefine func x`2_3 -> Element of X2 means :Def6: x = [x1,x2,x3] implies it = x2; coherence proof consider xx1 being Element of X1,xx2 being Element of X2, xx3 being Element of X3 such that A6: x = [xx1,xx2,xx3] by Lm2; [xx1,xx2,xx3]`2_3 = xx2; hence x`2_3 is Element of X2 by A6; end; compatibility proof let y be Element of X2; thus y = x`2_3 implies for x1,x2,x3 holds x = [x1,x2,x3] implies y = x2 proof assume Z: y = x`2_3; let x1,x2,x3 such that W: x = [x1,x2,x3]; [x1,x2,x3]`2_3 = x2; hence y = x2 by W,Z; end; assume Z: for x1,x2,x3 holds x = [x1,x2,x3] implies y = x2; consider xx1 being Element of X1,xx2 being Element of X2, xx3 being Element of X3 such that A6: x = [xx1,xx2,xx3] by Lm2; [xx1,xx2,xx3]`2_3 = xx2; hence y = x`2_3 by Z,A6; end; redefine func x`3_3 -> Element of X3 means :Def7: x = [x1,x2,x3] implies it = x3; coherence proof consider xx1 being Element of X1,xx2 being Element of X2, xx3 being Element of X3 such that A6: x = [xx1,xx2,xx3] by Lm2; [xx1,xx2,xx3]`3_3 = xx3; hence x`3_3 is Element of X3 by A6; end; compatibility proof let y be Element of X3; thus y = x`3_3 implies for x1,x2,x3 holds x = [x1,x2,x3] implies y = x3 proof assume Z: y = x`3_3; let x1,x2,x3 such that W: x = [x1,x2,x3]; [x1,x2,x3]`3_3 = x3; hence y = x3 by W,Z; end; assume Z: for x1,x2,x3 holds x = [x1,x2,x3] implies y = x3; consider xx1 being Element of X1,xx2 being Element of X2, xx3 being Element of X3 such that A6: x = [xx1,xx2,xx3] by Lm2; [xx1,xx2,xx3]`3_3 = xx3; hence y = x`3_3 by Z,A6; end; end; canceled; theorem for X1,X2,X3 being non empty set for x being Element of [:X1,X2, X3:] holds x = [x`1_3,x`2_3,x`3_3]; theorem Th45: X c= [:X,Y,Z:] or X c= [:Y,Z,X:] or X c= [:Z,X,Y:] implies X = {} proof assume that A1: X c= [:X,Y,Z:] or X c= [:Y,Z,X:] or X c= [:Z,X,Y:] and A2: X <> {}; [:X,Y,Z:]<>{} or [:Y,Z,X:]<>{} or [:Z,X,Y:]<>{} by A1,A2; then reconsider X,Y,Z as non empty set by Th31; per cases by A1; suppose A4: X c= [:X,Y,Z:]; consider v such that A5: v in X and A6: for x,y,z st x in X or y in X holds v <> [x,y,z] by Th26; reconsider v as Element of [:X,Y,Z:] by A4,A5; v = [v`1_3,v`2_3,v`3_3]; hence contradiction by A6; end; suppose X c= [:Y,Z,X:]; then X c= [:[:Y,Z:],X:] by ZFMISC_1:def 3; hence thesis by ZFMISC_1:111; end; suppose A7: X c= [:Z,X,Y:]; consider v such that A8: v in X and A9: for z,x,y st z in X or x in X holds v <> [z,x,y] by Th26; reconsider v as Element of [:Z,X,Y:] by A7,A8; v = [v`1_3,v`2_3,v`3_3]; hence thesis by A9; end; end; canceled; theorem Th47: for X1,X2,X3 being non empty set for x being Element of [:X1,X2,X3:] holds x <> x`1_3 & x <> x`2_3 & x <> x`3_3 proof let X1,X2,X3 be non empty set; let x be Element of [:X1,X2,X3:]; set Y9 = { x`1_3,x`2_3 }, Y = { Y9,{x`1_3}}, X9 = { Y,x`3_3 }, X = { X9,{Y} }; A2: x = [x`1_3,x`2_3,x`3_3] .= [[x`1_3,x`2_3],x`3_3]; then x = x`1_3 or x = x`2_3 implies X in Y9 & Y9 in Y & Y in X9 & X9 in X by TARSKI:def 2; hence x <> x`1_3 & x <> x`2_3 by XREGULAR:8; thus thesis by A2,Th20; end; theorem [:X1,X2,X3:] meets [:Y1,Y2,Y3:] implies X1 meets Y1 & X2 meets Y2 & X3 meets Y3 proof assume A1: [:X1,X2,X3:] meets [:Y1,Y2,Y3:]; A2: [:[:X1,X2:],X3:] = [:X1,X2,X3:] & [:[:Y1,Y2:],Y3:] = [:Y1,Y2,Y3:] by ZFMISC_1:def 3; then [:X1,X2:] meets [:Y1,Y2:] by A1,ZFMISC_1:104; hence thesis by A2,A1,ZFMISC_1:104; end; theorem Th49: [:X1,X2,X3,X4:] = [:[:[:X1,X2:],X3:],X4:] proof thus [:X1,X2,X3,X4:] = [:[:X1,X2,X3:],X4:] by ZFMISC_1:def 4 .= [:[:[:X1,X2:],X3:],X4:] by ZFMISC_1:def 3; end; theorem Th50: [:[:X1,X2:],X3,X4:] = [:X1,X2,X3,X4:] proof thus [:[:X1,X2:],X3,X4:] = [:[:[:X1,X2:],X3:],X4:] by ZFMISC_1:def 3 .= [:X1,X2,X3,X4:] by Th49; end; theorem Th51: X1 <> {} & X2 <> {} & X3 <> {} & X4 <> {} iff [:X1,X2,X3,X4:] <> {} proof A1: [:[:X1,X2,X3:],X4:] = [:X1,X2,X3,X4:] by ZFMISC_1:def 4; X1 <> {} & X2 <> {} & X3 <> {} iff [:X1,X2,X3:] <> {} by Th31; hence thesis by A1,ZFMISC_1:90; end; theorem Th52: X1<>{} & X2<>{} & X3<>{} & X4<>{} & [:X1,X2,X3,X4:] = [:Y1,Y2,Y3 ,Y4:] implies X1=Y1 & X2=Y2 & X3=Y3 & X4=Y4 proof A1: [:X1,X2,X3,X4:] = [:[:X1,X2,X3:],X4:] by ZFMISC_1:def 4; assume A2: X1<>{} & X2<>{} & X3<>{}; assume A3: X4<>{}; assume [:X1,X2,X3,X4:] = [:Y1,Y2,Y3,Y4:]; then A4: [:[:X1,X2,X3:],X4:] = [:[:Y1,Y2,Y3:],Y4:] by A1,ZFMISC_1:def 4; [:X1,X2,X3:] = [:Y1,Y2,Y3:] by A3,A4,A2,ZFMISC_1:110; hence thesis by A2,A3,A4,Th32,ZFMISC_1:110; end; theorem [:X1,X2,X3,X4:]<>{} & [:X1,X2,X3,X4:] = [:Y1,Y2,Y3,Y4:] implies X1=Y1 & X2=Y2 & X3=Y3 & X4=Y4 proof assume A1: [:X1,X2,X3,X4:]<>{}; then A2: X3<>{} & X4<>{} by Th51; X1<>{} & X2<>{} by A1,Th51; hence thesis by A2,Th52; end; theorem [:X,X,X,X:] = [:Y,Y,Y,Y:] implies X = Y proof assume [:X,X,X,X:] = [:Y,Y,Y,Y:]; then X<>{} or Y<>{} implies thesis by Th52; hence thesis; end; reserve xx4 for Element of X4; Lm3: X1 <> {} & X2 <> {} & X3 <> {} & X4 <> {} implies for x being Element of [:X1,X2,X3,X4:] ex xx1,xx2,xx3,xx4 st x = [xx1,xx2,xx3,xx4] proof assume that A1: X1 <> {} & X2 <> {} & X3 <> {} and A2: X4 <> {}; let x be Element of [:X1,X2,X3,X4:]; reconsider x9=x as Element of [:[:X1,X2,X3:],X4:] by ZFMISC_1:def 4; consider x123 being (Element of [:X1,X2,X3:]), xx4 such that A3: x9 = [x123,xx4] by A2,Lm1,A1; consider xx1,xx2,xx3 such that A4: x123 = [xx1,xx2,xx3] by A1,Lm2; take xx1,xx2,xx3,xx4; thus thesis by A3,A4; end; registration let X1,X2,X3,X4 be non empty set; cluster -> quadruple for Element of [:X1,X2,X3,X4:]; coherence proof let x be Element of [:X1,X2,X3,X4:]; ex xx1 being Element of X1, xx2 being Element of X2, xx3 being Element of X3, xx4 being Element of X4 st x = [xx1,xx2,xx3,xx4] by Lm3; hence thesis; end; end; definition let X1,X2,X3,X4 be non empty set; let x be Element of [:X1,X2,X3,X4:]; redefine func x`1_4 -> Element of X1 means :Def8: x = [x1,x2,x3,x4] implies it = x1; coherence proof consider xx1 being Element of X1, xx2 being Element of X2, xx3 being Element of X3, xx4 being Element of X4 such that A6: x = [xx1,xx2,xx3,xx4] by Lm3; [xx1,xx2,xx3,xx4]`1_4 = xx1; hence x`1_4 is Element of X1 by A6; end; compatibility proof let y be Element of X1; thus y = x`1_4 implies for x1,x2,x3,x4 holds x = [x1,x2,x3,x4] implies y = x1 proof assume Z: y = x`1_4; let x1,x2,x3,x4 such that W: x = [x1,x2,x3,x4]; [x1,x2,x3,x4]`1_4 = x1; hence y = x1 by W,Z; end; assume Z: for x1,x2,x3,x4 holds x = [x1,x2,x3,x4] implies y = x1; consider xx1 being Element of X1, xx2 being Element of X2, xx3 being Element of X3, xx4 being Element of X4 such that A6: x = [xx1,xx2,xx3,xx4] by Lm3; [xx1,xx2,xx3,xx4]`1_4 = xx1; hence y = x`1_4 by Z,A6; end; redefine func x`2_4 -> Element of X2 means :Def9: x = [x1,x2,x3,x4] implies it = x2; coherence proof consider xx1 being Element of X1, xx2 being Element of X2, xx3 being Element of X3, xx4 being Element of X4 such that A6: x = [xx1,xx2,xx3,xx4] by Lm3; [xx1,xx2,xx3,xx4]`2_4 = xx2; hence x`2_4 is Element of X2 by A6; end; compatibility proof let y be Element of X2; thus y = x`2_4 implies for x1,x2,x3,x4 holds x = [x1,x2,x3,x4] implies y = x2 proof assume Z: y = x`2_4; let x1,x2,x3,x4 such that W: x = [x1,x2,x3,x4]; [x1,x2,x3,x4]`2_4 = x2; hence y = x2 by W,Z; end; assume Z: for x1,x2,x3,x4 holds x = [x1,x2,x3,x4] implies y = x2; consider xx1 being Element of X1, xx2 being Element of X2, xx3 being Element of X3, xx4 being Element of X4 such that A6: x = [xx1,xx2,xx3,xx4] by Lm3; [xx1,xx2,xx3,xx4]`2_4 = xx2; hence y = x`2_4 by Z,A6; end; redefine func x`3_4 -> Element of X3 means :Def10: x = [x1,x2,x3,x4] implies it = x3; coherence proof consider xx1 being Element of X1, xx2 being Element of X2, xx3 being Element of X3, xx4 being Element of X4 such that A6: x = [xx1,xx2,xx3,xx4] by Lm3; [xx1,xx2,xx3,xx4]`3_4 = xx3; hence x`3_4 is Element of X3 by A6; end; compatibility proof let y be Element of X3; thus y = x`3_4 implies for x1,x2,x3,x4 holds x = [x1,x2,x3,x4] implies y = x3 proof assume Z: y = x`3_4; let x1,x2,x3,x4 such that W: x = [x1,x2,x3,x4]; [x1,x2,x3,x4]`3_4 = x3; hence y = x3 by W,Z; end; assume Z: for x1,x2,x3,x4 holds x = [x1,x2,x3,x4] implies y = x3; consider xx1 being Element of X1, xx2 being Element of X2, xx3 being Element of X3, xx4 being Element of X4 such that A6: x = [xx1,xx2,xx3,xx4] by Lm3; [xx1,xx2,xx3,xx4]`3_4 = xx3; hence y = x`3_4 by Z,A6; end; redefine func x`4_4 -> Element of X4 means :Def11: x = [x1,x2,x3,x4] implies it = x4; coherence proof consider xx1 being Element of X1, xx2 being Element of X2, xx3 being Element of X3, xx4 being Element of X4 such that A6: x = [xx1,xx2,xx3,xx4] by Lm3; [xx1,xx2,xx3,xx4]`4_4 = xx4; hence x`4_4 is Element of X4 by A6; end; compatibility proof let y be Element of X4; thus y = x`4_4 implies for x1,x2,x3,x4 holds x = [x1,x2,x3,x4] implies y = x4 proof assume Z: y = x`4_4; let x1,x2,x3,x4 such that W: x = [x1,x2,x3,x4]; [x1,x2,x3,x4]`4_4 = x4; hence y = x4 by W,Z; end; assume Z: for x1,x2,x3,x4 holds x = [x1,x2,x3,x4] implies y = x4; consider xx1 being Element of X1, xx2 being Element of X2, xx3 being Element of X3, xx4 being Element of X4 such that A6: x = [xx1,xx2,xx3,xx4] by Lm3; [xx1,xx2,xx3,xx4]`4_4 = xx4; hence y = x`4_4 by Z,A6; end; end; canceled; theorem for X1,X2,X3,X4 being non empty set for x being Element of [:X1,X2,X3,X4:] holds x = [x`1_4,x`2_4,x`3_4,x`4_4]; canceled; theorem for X1,X2,X3,X4 being non empty set for x being Element of [:X1,X2,X3,X4:] holds x <> x`1_4 & x <> x`2_4 & x <> x`3_4 & x <> x`4_4 proof let X1,X2,X3,X4 be non empty set; let x be Element of [:X1,X2,X3,X4:]; reconsider Y = [:X1,X2:], X3, X4 as non empty set; reconsider x9=x as Element of [:Y,X3,X4:] by Th50; set Z9 = { x`1_4,x`2_4 }, Z = { Z9,{x`1_4}}, Y9 = { Z,x`3_4 }, Y = { Y9,{Z} }, X9 = { Y,x`4_4 }, X = { X9,{Y} }; x = [x`1_4,x`2_4,x`3_4,x`4_4] .= X; then x = x`1_4 or x = x`2_4 implies X in Z9 & Z9 in Z & Z in Y9 & Y9 in Y & Y in X9 & X9 in X by TARSKI:def 2; hence x <> x`1_4 & x <> x`2_4 by XREGULAR:10; x`3_4 = (x qua set)`1`2 .= x9`2_3; hence thesis by Th47; end; theorem X1 c= [:X1,X2,X3,X4:] or X1 c= [:X2,X3,X4,X1:] or X1 c= [:X3,X4,X1,X2 :] or X1 c= [:X4,X1,X2,X3:] implies X1 = {} proof assume that A1: X1 c= [:X1,X2,X3,X4:] or X1 c= [:X2,X3,X4,X1:] or X1 c= [:X3,X4,X1, X2:] or X1 c= [:X4,X1,X2,X3:] and A2: X1 <> {}; A3: [:X1,X2,X3,X4:]<>{} or [:X2,X3,X4,X1:]<>{} or [:X3,X4,X1,X2:]<>{} or [: X4,X1,X2,X3:]<>{} by A1,A2; reconsider X1,X2,X3,X4 as non empty set by A3,Th51; per cases by A1; suppose A6: X1 c= [:X1,X2,X3,X4:]; consider v such that A7: v in X1 and A8: for x1,x2,x3,x4 st x1 in X1 or x2 in X1 holds v <> [x1,x2,x3,x4] by Th30; reconsider v as Element of [:X1,X2,X3,X4:] by A6,A7; v = [v`1_4,v`2_4,v`3_4,v`4_4]; hence contradiction by A8; end; suppose X1 c= [:X2,X3,X4,X1:]; then X1 c= [:[:X2,X3:],X4,X1:] by Th50; hence thesis by Th45; end; suppose X1 c= [:X3,X4,X1,X2:]; then X1 c= [:[:X3,X4:],X1,X2:] by Th50; hence thesis by Th45; end; suppose A9: X1 c= [:X4,X1,X2,X3:]; consider v such that A10: v in X1 and A11: for x1,x2,x3,x4 st x1 in X1 or x2 in X1 holds v <> [x1,x2,x3,x4] by Th30; reconsider v as Element of [:X4,X1,X2,X3:] by A9,A10; v = [v`1_4,v`2_4,v`3_4,v`4_4]; hence thesis by A11; end; end; theorem [:X1,X2,X3,X4:] meets [:Y1,Y2,Y3,Y4:] implies X1 meets Y1 & X2 meets Y2 & X3 meets Y3 & X4 meets Y4 proof assume A1: [:X1,X2,X3,X4:] meets [:Y1,Y2,Y3,Y4:]; A2: [:[:[:X1,X2:],X3:],X4:] = [:X1,X2,X3,X4:] & [:[:[:Y1,Y2:],Y3:],Y4:] = [: Y1, Y2,Y3,Y4:] by Th49; then A3: [:[:X1,X2:],X3:] meets [:[:Y1,Y2:],Y3:] by A1,ZFMISC_1:104; then [:X1,X2:] meets [:Y1,Y2:] by ZFMISC_1:104; hence thesis by A2,A1,A3,ZFMISC_1:104; end; theorem [:{x1},{x2},{x3},{x4}:] = { [x1,x2,x3,x4] } proof thus [:{x1},{x2},{x3},{x4}:] = [:[:{x1},{x2}:],{x3},{x4}:] by Th50 .= [:{[x1,x2]},{x3},{x4}:] by ZFMISC_1:29 .= {[[x1,x2],x3,x4]} by Th35 .= { [x1,x2,x3,x4] }; end; theorem Th62: [:X,Y:] <> {} implies for x being Element of [:X,Y:] holds x <> x`1 & x <> x`2 proof assume [:X,Y:] <> {}; then X <> {} & Y <> {} by ZFMISC_1:90; hence thesis by Th24; end; theorem x in [:X,Y:] implies x <> x`1 & x <> x`2 by Th62; reserve A1 for Subset of X1, A2 for Subset of X2, A3 for Subset of X3, A4 for Subset of X4; reserve x for Element of [:X1,X2,X3:]; theorem for X1,X2,X3 being non empty set for x being Element of [:X1,X2,X3:] for x1,x2,x3 st x = [x1,x2,x3] holds x`1_3 = x1 & x`2_3 = x2 & x`3_3 = x3 by Def5,Def6,Def7; theorem for X1,X2,X3 being non empty set for x being Element of [:X1,X2,X3:] st for xx1 being Element of X1,xx2 being Element of X2, xx3 being Element of X3 st x = [xx1,xx2,xx3] holds y1 = xx1 holds y1 =x`1_3 proof let X1,X2,X3 be non empty set; let x be Element of [:X1,X2,X3:]; assume that A2: for xx1 being Element of X1,xx2 being Element of X2, xx3 being Element of X3 st x = [xx1,xx2,xx3] holds y1 = xx1; x = [x`1_3,x`2_3,x`3_3]; hence thesis by A2; end; theorem for X1,X2,X3 being non empty set for x being Element of [:X1,X2,X3:] st for xx1 being Element of X1,xx2 being Element of X2, xx3 being Element of X3 st x = [xx1,xx2,xx3] holds y2 = xx2 holds y2 =x`2_3 proof let X1,X2,X3 be non empty set; let x be Element of [:X1,X2,X3:]; assume that A2: for xx1 being Element of X1,xx2 being Element of X2, xx3 being Element of X3 st x = [xx1,xx2,xx3] holds y2 = xx2; x = [x`1_3,x`2_3,x`3_3]; hence thesis by A2; end; theorem for X1,X2,X3 being non empty set for x being Element of [:X1,X2,X3:] st for xx1 being Element of X1,xx2 being Element of X2, xx3 being Element of X3 st x = [xx1,xx2,xx3] holds y3 = xx3 holds y3 =x`3_3 proof let X1,X2,X3 be non empty set; let x be Element of [:X1,X2,X3:]; assume that A2: for xx1 being Element of X1,xx2 being Element of X2, xx3 being Element of X3 st x = [xx1,xx2,xx3] holds y3 = xx3; x = [x`1_3,x`2_3,x`3_3]; hence thesis by A2; end; theorem Th68: z in [: X1,X2,X3 :] implies ex x1,x2,x3 st x1 in X1 & x2 in X2 & x3 in X3 & z = [x1,x2,x3] proof assume z in [: X1,X2,X3 :]; then z in [:[:X1,X2:],X3:] by ZFMISC_1:def 3; then consider x12, x3 being set such that A1: x12 in [:X1,X2:] and A2: x3 in X3 and A3: z = [x12,x3] by ZFMISC_1:def 2; consider x1,x2 being set such that A4: x1 in X1 & x2 in X2 and A5: x12 = [x1,x2] by A1,ZFMISC_1:def 2; z = [x1,x2,x3] by A3,A5; hence thesis by A2,A4; end; theorem Th69: [x1,x2,x3] in [: X1,X2,X3 :] iff x1 in X1 & x2 in X2 & x3 in X3 proof A1: [x1,x2] in [:X1,X2:] iff x1 in X1 & x2 in X2 by ZFMISC_1:87; [:X1,X2,X3:] = [:[:X1,X2:],X3:] by ZFMISC_1:def 3; hence thesis by A1,ZFMISC_1:87; end; theorem (for z holds z in Z iff ex x1,x2,x3 st x1 in X1 & x2 in X2 & x3 in X3 & z = [x1,x2,x3]) implies Z = [: X1,X2,X3 :] proof assume A1: for z holds z in Z iff ex x1,x2,x3 st x1 in X1 & x2 in X2 & x3 in X3 & z = [x1,x2,x3]; now let z; thus z in Z implies z in [:[:X1,X2:],X3:] proof assume z in Z; then consider x1,x2,x3 such that A2: x1 in X1 & x2 in X2 and A3: x3 in X3 & z = [x1,x2,x3] by A1; [x1,x2] in [:X1,X2:] by A2,ZFMISC_1:def 2; hence thesis by A3,ZFMISC_1:def 2; end; assume z in [:[:X1,X2:],X3:]; then consider x12,x3 being set such that A4: x12 in [:X1,X2:] and A5: x3 in X3 and A6: z = [x12,x3] by ZFMISC_1:def 2; consider x1,x2 being set such that A7: x1 in X1 & x2 in X2 and A8: x12 = [x1,x2] by A4,ZFMISC_1:def 2; z = [x1,x2,x3] by A6,A8; hence z in Z by A1,A5,A7; end; then Z = [:[:X1,X2:],X3:] by TARSKI:1; hence thesis by ZFMISC_1:def 3; end; canceled; theorem for X1,X2,X3 being non empty set for A1 being non empty Subset of X1, A2 being non empty Subset of X2, A3 being non empty Subset of X3 for x being Element of [:X1,X2,X3:] st x in [:A1,A2,A3:] holds x`1_3 in A1 & x`2_3 in A2 & x`3_3 in A3 proof let X1,X2,X3 be non empty set; let A1 be non empty Subset of X1, A2 be non empty Subset of X2, A3 be non empty Subset of X3; let x be Element of [:X1,X2,X3:]; assume x in [:A1,A2,A3:]; then reconsider y = x as Element of [:A1,A2,A3:]; A2: y`2_3 in A2; A3: y`3_3 in A3; y`1_3 in A1; hence thesis by A2,A3; end; theorem Th73: X1 c= Y1 & X2 c= Y2 & X3 c= Y3 implies [:X1,X2,X3:] c= [:Y1,Y2, Y3:] proof A1: [:X1,X2,X3:] = [:[:X1,X2:],X3:] & [:Y1,Y2,Y3:] = [:[:Y1,Y2:],Y3:] by ZFMISC_1:def 3; assume X1 c= Y1 & X2 c= Y2; then A2: [:X1,X2:] c= [:Y1,Y2:] by ZFMISC_1:96; assume X3 c= Y3; hence thesis by A2,A1,ZFMISC_1:96; end; reserve x for Element of [:X1,X2,X3,X4:]; theorem for X1,X2,X3,X4 being non empty set for x being Element of [:X1,X2,X3,X4:] for x1,x2,x3,x4 being set st x = [x1, x2,x3,x4] holds x`1_4 = x1 & x`2_4 = x2 & x`3_4 = x3 & x`4_4 = x4 by Def8,Def9,Def10,Def11; theorem for X1,X2,X3,X4 being non empty set for x being Element of [:X1,X2,X3,X4:] st for xx1 being Element of X1, xx2 being Element of X2, xx3 being Element of X3, xx4 being Element of X4 st x = [xx1,xx2,xx3,xx4] holds y1 = xx1 holds y1 =x`1_4 proof let X1,X2,X3,X4 be non empty set; let x be Element of [:X1,X2,X3,X4:]; assume that A2: for xx1 being Element of X1, xx2 being Element of X2, xx3 being Element of X3, xx4 being Element of X4 st x = [xx1,xx2,xx3,xx4] holds y1 = xx1; x = [x`1_4,x`2_4,x`3_4,x`4_4]; hence thesis by A2; end; theorem for X1,X2,X3,X4 being non empty set for x being Element of [:X1,X2,X3,X4:] st for xx1 being Element of X1, xx2 being Element of X2, xx3 being Element of X3, xx4 being Element of X4 st x = [xx1, xx2,xx3,xx4] holds y2 = xx2 holds y2 =x`2_4 proof let X1,X2,X3,X4 be non empty set; let x be Element of [:X1,X2,X3,X4:]; assume that A2: for xx1 being Element of X1, xx2 being Element of X2, xx3 being Element of X3, xx4 being Element of X4 st x = [xx1,xx2,xx3,xx4] holds y2 = xx2; x = [x`1_4,x`2_4,x`3_4,x`4_4]; hence thesis by A2; end; theorem for X1,X2,X3,X4 being non empty set for x being Element of [:X1,X2,X3,X4:] st for xx1 being Element of X1, xx2 being Element of X2, xx3 being Element of X3, xx4 being Element of X4 st x = [xx1, xx2,xx3,xx4] holds y3 = xx3 holds y3 =x`3_4 proof let X1,X2,X3,X4 be non empty set; let x be Element of [:X1,X2,X3,X4:]; assume that A2: for xx1 being Element of X1, xx2 being Element of X2, xx3 being Element of X3, xx4 being Element of X4 st x = [xx1,xx2,xx3,xx4] holds y3 = xx3; x = [x`1_4,x`2_4,x`3_4,x`4_4]; hence thesis by A2; end; theorem for X1,X2,X3,X4 being non empty set for x being Element of [:X1,X2,X3,X4:] st for xx1 being Element of X1, xx2 being Element of X2, xx3 being Element of X3, xx4 being Element of X4 st x = [xx1, xx2,xx3,xx4] holds y4 = xx4 holds y4 =x`4_4 proof let X1,X2,X3,X4 be non empty set; let x be Element of [:X1,X2,X3,X4:]; assume that A2: for xx1 being Element of X1, xx2 being Element of X2, xx3 being Element of X3, xx4 being Element of X4 st x = [xx1,xx2,xx3,xx4] holds y4 = xx4; x = [x`1_4,x`2_4,x`3_4,x`4_4]; hence thesis by A2; end; theorem z in [: X1,X2,X3,X4 :] implies ex x1,x2,x3,x4 st x1 in X1 & x2 in X2 & x3 in X3 & x4 in X4 & z = [x1,x2,x3,x4] proof assume z in [: X1,X2,X3,X4 :]; then z in [:[:X1,X2,X3:],X4:] by ZFMISC_1:def 4; then consider x123, x4 being set such that A1: x123 in [:X1,X2,X3:] and A2: x4 in X4 and A3: z = [x123,x4] by ZFMISC_1:def 2; consider x1, x2, x3 such that A4: x1 in X1 & x2 in X2 & x3 in X3 and A5: x123 = [x1,x2,x3] by A1,Th68; z = [x1,x2,x3,x4] by A3,A5; hence thesis by A2,A4; end; theorem [x1,x2,x3,x4] in [: X1,X2,X3,X4 :] iff x1 in X1 & x2 in X2 & x3 in X3 & x4 in X4 proof A1: [x1,x2] in [:X1,X2:] iff x1 in X1 & x2 in X2 by ZFMISC_1:87; [:X1,X2,X3,X4:] = [:[:X1,X2:],X3,X4:] & [x1,x2,x3,x4] = [[x1,x2],x3,x4] by Th50; hence thesis by A1,Th69; end; theorem (for z holds z in Z iff ex x1,x2,x3,x4 st x1 in X1 & x2 in X2 & x3 in X3 & x4 in X4 & z = [x1,x2,x3,x4]) implies Z = [: X1,X2,X3,X4 :] proof assume A1: for z holds z in Z iff ex x1,x2,x3,x4 st x1 in X1 & x2 in X2 & x3 in X3 & x4 in X4 & z = [x1,x2,x3,x4]; now let z; thus z in Z implies z in [:[:X1,X2,X3:],X4:] proof assume z in Z; then consider x1,x2,x3,x4 such that A2: x1 in X1 & x2 in X2 & x3 in X3 and A3: x4 in X4 & z = [x1,x2,x3,x4] by A1; [x1,x2,x3] in [:X1,X2,X3:] by A2,Th69; hence thesis by A3,ZFMISC_1:def 2; end; assume z in [:[:X1,X2,X3:],X4:]; then consider x123,x4 being set such that A4: x123 in [:X1,X2,X3:] and A5: x4 in X4 and A6: z = [x123,x4] by ZFMISC_1:def 2; consider x1,x2,x3 such that A7: x1 in X1 & x2 in X2 & x3 in X3 and A8: x123 = [x1,x2,x3] by A4,Th68; z = [x1,x2,x3,x4] by A6,A8; hence z in Z by A1,A5,A7; end; then Z = [:[:X1,X2,X3:],X4:] by TARSKI:1; hence thesis by ZFMISC_1:def 4; end; canceled; theorem for X1,X2,X3,X4 being non empty set, A1 being non empty Subset of X1, A2 being non empty Subset of X2, A3 being non empty Subset of X3, A4 being non empty Subset of X4 for x being Element of [:X1,X2,X3,X4:] st x in [:A1,A2,A3,A4:] holds x`1_4 in A1 & x`2_4 in A2 & x`3_4 in A3 & x`4_4 in A4 proof let X1,X2,X3,X4 be non empty set, A1 be non empty Subset of X1, A2 be non empty Subset of X2, A3 be non empty Subset of X3, A4 be non empty Subset of X4; let x be Element of [:X1,X2,X3,X4:]; assume x in [:A1,A2,A3,A4:]; then reconsider y = x as Element of [:A1,A2,A3,A4:]; A2: y`2_4 in A2; A3: y`4_4 in A4; A4: y`3_4 in A3; y`1_4 in A1; hence thesis by A2,A4,A3; end; theorem Th84: X1 c= Y1 & X2 c= Y2 & X3 c= Y3 & X4 c= Y4 implies [:X1,X2,X3,X4:] c= [:Y1,Y2,Y3,Y4:] proof A1: [:X1,X2,X3,X4:] = [:[:X1,X2,X3:],X4:] & [:Y1,Y2,Y3,Y4:] = [:[:Y1,Y2,Y3:] ,Y4 :] by ZFMISC_1:def 4; assume X1 c= Y1 & X2 c= Y2 & X3 c= Y3; then A2: [:X1,X2,X3:] c= [:Y1,Y2,Y3:] by Th73; assume X4 c= Y4; hence thesis by A2,A1,ZFMISC_1:96; end; definition let X1,X2,A1,A2; redefine func [:A1,A2:] -> Subset of [:X1,X2:]; coherence by ZFMISC_1:96; end; definition let X1,X2,X3,A1,A2,A3; redefine func [:A1,A2,A3:] -> Subset of [:X1,X2,X3:]; coherence by Th73; end; definition let X1,X2,X3,X4,A1,A2,A3,A4; redefine func [:A1,A2,A3,A4:] -> Subset of [:X1,X2,X3,X4:]; coherence by Th84; end; begin definition let f be Function; func pr1 f -> Function means dom it = dom f & for x being set st x in dom f holds it.x = (f.x)`1; existence proof deffunc F(set) = (f.$1)`1; ex g being Function st dom g = dom f & for x being set st x in dom f holds g.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let p1, p2 be Function such that A1: dom p1 = dom f and A2: for x being set st x in dom f holds p1.x = (f.x)`1 and A3: dom p2 = dom f and A4: for x being set st x in dom f holds p2.x = (f.x)`1; now let x be set; assume A5: x in dom f; then p1.x = (f.x)`1 by A2; hence p1.x = p2.x by A4,A5; end; hence thesis by A1,A3,FUNCT_1:2; end; func pr2 f -> Function means dom it = dom f & for x being set st x in dom f holds it.x = (f.x)`2; existence proof deffunc F(set) = (f.$1)`2; ex g being Function st dom g = dom f & for x being set st x in dom f holds g.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let p1, p2 be Function such that A6: dom p1 = dom f and A7: for x being set st x in dom f holds p1.x = (f.x)`2 and A8: dom p2 = dom f and A9: for x being set st x in dom f holds p2.x = (f.x)`2; now let x be set; assume A10: x in dom f; then p1.x = (f.x)`2 by A7; hence p1.x = p2.x by A9,A10; end; hence thesis by A6,A8,FUNCT_1:2; end; end; definition let x be set; func x`11 equals x`1`1; coherence; func x`12 equals x`1`2; coherence; func x`21 equals x`2`1; coherence; func x`22 equals x`2`2; coherence; end; reserve x for set; theorem [[x1,x2],y]`11 = x1 & [[x1,x2],y]`12 = x2 & [x,[y1,y2]]`21 = y1 & [x,[ y1,y2]]`22 = y2; theorem x in R implies x`1 in dom R & x`2 in rng R proof assume A1: x in R; then x = [x`1,x`2] by Th21; hence thesis by A1,XTUPLE_0:def 12,def 13; end; theorem Th87: for R being non empty Relation, x being set holds Im(R,x) = { I`2 where I is Element of R: I`1 = x } proof let R be non empty Relation, x being set; set X = { I`2 where I is Element of R: I`1 = x }; thus Im(R,x) c= X proof let z; assume z in Im(R,x); then consider y such that A1: [y,z] in R and A2: y in {x} by RELAT_1:def 13; A3: y = x by A2,TARSKI:def 1; y = [y,z]`1 & z = [y,z]`2; hence z in X by A1,A3; end; let z; assume z in X; then consider I being Element of R such that A4: z= I`2 and A5: I`1 = x; A6: I = [I`1,I`2] by Th21; x in {x} by TARSKI:def 1; hence z in Im(R,x) by A4,A5,A6,RELAT_1:def 13; end; theorem x in R implies x`2 in Im(R,x`1) proof assume A1: x in R; then x`2 in { I`2 where I is Element of R: I`1 = x`1 }; hence thesis by A1,Th87; end; theorem Th89: x in R & y in R & x`1 = y`1 & x`2 = y`2 implies x = y proof assume x in R & y in R; then x = [x`1,x`2] & y = [y`1,y`2] by Th21; hence thesis; end; theorem for R being non empty Relation, x,y being Element of R st x`1 = y`1 & x`2 = y`2 holds x = y by Th89; theorem proj1 proj1 {[x1,x2,x3],[y1,y2,y3]} = {x1,y1} proof thus proj1 proj1 {[x1,x2,x3],[y1,y2,y3]} = proj1 {[x1,x2],[y1,y2]} by RELAT_1:10 .= {x1,y1} by RELAT_1:10; end; theorem proj1 proj1 {[x1,x2,x3]} = {x1} proof thus proj1 proj1 {[x1,x2,x3]} = proj1 {[x1,x2]} by RELAT_1:9 .= {x1} by RELAT_1:9; end; scheme BiFuncEx{A()->set,B()->set,C()->set,P[set,set,set]}: ex f,g being Function st dom f = A() & dom g = A() & for x st x in A() holds P[x,f.x,g.x] provided A1: x in A() implies ex y,z st y in B() & z in C() & P[x,y,z] proof defpred H[set,set] means for y,z st $2`1 = y & $2`2 = z holds P[$1,y,z]; A2: x in A() implies ex p being set st p in [:B(),C():] & H[x,p] proof assume x in A(); then consider y,z such that A3: y in B() & z in C() and A4: P[x,y,z] by A1; take p=[y,z]; thus p in [:B(),C():] by A3,ZFMISC_1:87; thus for y,z st p`1 = y & p`2 = z holds P[x,y,z] proof let x1,x2 be set; assume that A5: p`1 = x1 and A6: p`2 = x2; x1=y by A5,Th7; hence thesis by A4,A6,Th7; end; end; consider h being Function such that dom h = A() & rng h c= [:B(),C():] and A7: for x st x in A() holds H[x,h.x] from FUNCT_1:sch 5(A2); deffunc g(set) = (h.$1)`2; deffunc f(set) = (h.$1)`1; consider f being Function such that A8: dom f = A() and A9: for x st x in A() holds f.x = f(x) from FUNCT_1:sch 3; consider g being Function such that A10: dom g = A() and A11: for x st x in A() holds g.x = g(x) from FUNCT_1:sch 3; take f,g; thus dom f = A() & dom g = A() by A8,A10; thus for x st x in A() holds P[x,f.x,g.x] proof let x; assume A12: x in A(); then f.x = (h.x)`1 & g.x = (h.x)`2 by A9,A11; hence thesis by A7,A12; end; end; begin reserve X,Y,Z for set, a,b,c,d,x,y,z,u for set, R for Relation, A,B,C for Ordinal; definition let X; func RelIncl X -> Relation means :Def1: field it = X & for Y,Z st Y in X & Z in X holds [Y,Z] in it iff Y c= Z; existence proof defpred P[set,set] means $1 c= $2; consider R such that A1: [x,y] in R iff x in X & y in X & P[x,y] from RELAT_1:sch 1; take R; thus field R = X proof thus x in field R implies x in X proof A2: now assume x in dom R; then ex y st [x,y] in R by XTUPLE_0:def 12; hence thesis by A1; end; A3: now assume x in rng R; then ex y st [y,x] in R by XTUPLE_0:def 13; hence thesis by A1; end; assume x in field R; hence thesis by A2,A3,XBOOLE_0:def 3; end; let x; assume x in X; then [x,x] in R by A1; hence thesis by RELAT_1:15; end; let Y,Z such that A4: Y in X & Z in X; thus [Y,Z] in R implies Y c= Z by A1; thus thesis by A1,A4; end; uniqueness proof let R1,R2 be Relation such that A5: field R1 = X and A6: for Y,Z st Y in X & Z in X holds [Y,Z] in R1 iff Y c= Z and A7: field R2 = X and A8: for Y,Z st Y in X & Z in X holds [Y,Z] in R2 iff Y c= Z; let x,y; thus [x,y] in R1 implies [x,y] in R2 proof assume A9: [x,y] in R1; then A10: x in field R1 & y in field R1 by RELAT_1:15; then x c= y by A5,A6,A9; hence thesis by A5,A8,A10; end; assume A11: [x,y] in R2; then A12: x in field R2 & y in field R2 by RELAT_1:15; then x c= y by A7,A8,A11; hence thesis by A6,A7,A12; end; end; canceled 6; registration let X; cluster RelIncl X -> reflexive; coherence proof A1: field RelIncl X = X by Def1; let a; assume a in field RelIncl X; hence thesis by A1,Def1; end; cluster RelIncl X -> transitive; coherence proof let a,b,c such that A2: a in field RelIncl X and A3: b in field RelIncl X and A4: c in field RelIncl X and A5: [a,b] in RelIncl X & [b,c] in RelIncl X; field RelIncl X = X by Def1; then a c= b & b c= c by A2,A3,A4,A5,Def1; then A6: a c= c by XBOOLE_1:1; a in X & c in X by A2,A4,Def1; hence thesis by A6,Def1; end; cluster RelIncl X -> antisymmetric; coherence proof A7: field RelIncl X = X by Def1; let a,b; assume a in field RelIncl X & b in field RelIncl X & [a,b] in RelIncl X & [ b,a ] in RelIncl X; then a c= b & b c= a by A7,Def1; hence thesis by XBOOLE_0:def 10; end; end; registration let A; cluster RelIncl A -> connected; coherence proof let a,b such that A1: a in field RelIncl A & b in field RelIncl A and a <> b; A2: field RelIncl A = A by Def1; then reconsider Y = a, Z = b as Ordinal by A1; Y c= Z or Z c= Y; hence thesis by A1,A2,Def1; end; cluster RelIncl A -> well_founded; coherence proof let Y; assume that A3: Y c= field RelIncl A and A4: Y <> {}; defpred P[set] means $1 in Y; set x = the Element of Y; A5: field RelIncl A = A by Def1; then x in A by A3,A4,TARSKI:def 3; then reconsider x as Ordinal; x in Y by A4; then A6: ex B st P[B]; consider B such that A7: P[B] & for C st P[C] holds B c= C from ORDINAL1:sch 1(A6); reconsider x = B as set; take x; thus x in Y by A7; set y = the Element of (RelIncl A)-Seg(x) /\ Y; assume A8: (RelIncl A)-Seg(x) /\ Y <> {}; then A9: y in Y by XBOOLE_0:def 4; then reconsider C = y as Ordinal by A3,A5; A10: y in (RelIncl A)-Seg(x) by A8,XBOOLE_0:def 4; then [y,x] in RelIncl A by WELLORD1:1; then A11: C c= B by A3,A5,A7,A9,Def1; A12: y <> x by A10,WELLORD1:1; B c= C by A7,A9; hence contradiction by A12,A11,XBOOLE_0:def 10; end; end; theorem Th7: Y c= X implies (RelIncl X) |_2 Y = RelIncl Y proof assume A1: Y c= X; let a,b; thus [a,b] in (RelIncl X) |_2 Y implies [a,b] in RelIncl Y proof assume A2: [a,b] in (RelIncl X) |_2 Y; then [a,b] in [:Y,Y:] by XBOOLE_0:def 4; then A3: a in Y & b in Y by ZFMISC_1:87; [a,b] in RelIncl X by A2,XBOOLE_0:def 4; then a c= b by A1,A3,Def1; hence thesis by A3,Def1; end; assume A4: [a,b] in RelIncl Y; then A5: a in field RelIncl Y & b in field RelIncl Y by RELAT_1:15; A6: field RelIncl Y = Y by Def1; then a c= b by A4,A5,Def1; then A7: [a,b] in RelIncl X by A1,A5,A6,Def1; [a,b] in [:Y,Y:] by A5,A6,ZFMISC_1:87; hence thesis by A7,XBOOLE_0:def 4; end; theorem Th8: for A,X st X c= A holds RelIncl X is well-ordering proof let A,X; (RelIncl A) |_2 X is well-ordering by WELLORD1:25; hence thesis by Th7; end; reserve H for Function; theorem Th9: A in B implies A = (RelIncl B)-Seg(A) proof assume A1: A in B; thus a in A implies a in (RelIncl B)-Seg(A) proof assume A2: a in A; then reconsider C = a as Ordinal; A3: a <> A by A2; A4: A c= B by A1,ORDINAL1:def 2; C c= A by A2,ORDINAL1:def 2; then [C,A] in RelIncl B by A1,A2,A4,Def1; hence thesis by A3,WELLORD1:1; end; let a; assume A5: a in (RelIncl B)-Seg(A); then A6: a <> A by WELLORD1:1; A7: [a,A] in RelIncl B by A5,WELLORD1:1; then A8: a in field RelIncl B by RELAT_1:15; A9: field RelIncl B = B by Def1; then reconsider C = a as Ordinal by A8; C c= A by A1,A7,A8,A9,Def1; then C c< A by A6,XBOOLE_0:def 8; hence thesis by ORDINAL1:11; end; theorem Th10: RelIncl A,RelIncl B are_isomorphic implies A = B proof A1: field RelIncl A = A by Def1; assume A2: RelIncl A,RelIncl B are_isomorphic; A3: now A4: field RelIncl B = B by Def1; assume A5: A in B; then A = (RelIncl B)-Seg(A) by Th9; then RelIncl A = (RelIncl B) |_2 ((RelIncl B)-Seg(A)) by A4,Th7,WELLORD1:9; hence contradiction by A2,A5,A4,WELLORD1:40,46; end; assume A <> B; then A6: A in B or B in A by ORDINAL1:14; then B = (RelIncl A)-Seg(B) by A3,Th9; then RelIncl B = (RelIncl A) |_2 ((RelIncl A)-Seg(B)) by A1,Th7,WELLORD1:9; hence contradiction by A2,A6,A3,A1,WELLORD1:46; end; theorem Th11: R,RelIncl A are_isomorphic & R,RelIncl B are_isomorphic implies A = B proof assume that A1: R,RelIncl A are_isomorphic and A2: R,RelIncl B are_isomorphic; RelIncl A,R are_isomorphic by A1,WELLORD1:40; hence thesis by A2,Th10,WELLORD1:42; end; theorem Th12: for R st R is well-ordering & for a st a in field R ex A st R |_2 (R-Seg(a)),RelIncl A are_isomorphic ex A st R,RelIncl A are_isomorphic proof let R such that A1: R is well-ordering; defpred P[set,set] means for A holds A = $2 iff R |_2 (R-Seg $1),RelIncl A are_isomorphic; assume A2: for a st a in field R ex A st R |_2 (R-Seg(a)),RelIncl A are_isomorphic; A3: for a st a in field R ex b st P[a,b] proof let a; assume a in field R; then consider A such that A4: R |_2 (R-Seg(a)),RelIncl A are_isomorphic by A2; reconsider b = A as set; take b; let B; thus B = b implies R |_2 (R-Seg(a)),RelIncl B are_isomorphic by A4; assume R |_2 (R-Seg(a)),RelIncl B are_isomorphic; hence thesis by A4,Th11; end; A5: for b,c,d st b in field R & P[b,c] & P[b,d] holds c = d proof let b,c,d such that A6: b in field R and A7: A = c iff R |_2 (R-Seg(b)),RelIncl A are_isomorphic and A8: B = d iff R |_2 (R-Seg(b)),RelIncl B are_isomorphic; consider A such that A9: R |_2 (R-Seg(b)),RelIncl A are_isomorphic by A2,A6; A = c by A7,A9; hence thesis by A8,A9; end; consider H such that A10: dom H = field R & for b st b in field R holds P[b, H.b] from FUNCT_1:sch 2(A5,A3); for a st a in rng H holds a is Ordinal proof let b; assume b in rng H; then consider c such that A11: c in dom H and A12: b = H.c by FUNCT_1:def 3; ex A st R |_2 (R-Seg(c)),RelIncl A are_isomorphic by A2,A10,A11; hence thesis by A10,A11,A12; end; then consider C such that A13: rng H c= C by ORDINAL1:24; A14: now let b; assume A15: b in rng H; then consider b9 being set such that A16: b9 in dom H and A17: b = H.b9 by FUNCT_1:def 3; set V = R-Seg(b9); set P = R |_2 V; consider A such that A18: P,RelIncl A are_isomorphic by A2,A10,A16; let c such that A19: [c,b] in RelIncl C; A20: A = b by A10,A16,A17,A18; now A21: C = field RelIncl C by Def1; then A22: c in C by A19,RELAT_1:15; then reconsider B = c as Ordinal; b in C by A19,A21,RELAT_1:15; then A23: B c= A by A20,A19,A22,Def1; then A24: (RelIncl A) |_2 B = RelIncl B by Th7; assume c <> b; then A25: B c< A by A20,A23,XBOOLE_0:def 8; then A26: B = (RelIncl A)-Seg(B) by Th9,ORDINAL1:11; A27: A = field RelIncl A by Def1; RelIncl A,P are_isomorphic by A18,WELLORD1:40; then canonical_isomorphism_of(RelIncl A,P) is_isomorphism_of RelIncl A,P by WELLORD1:def 9; then consider d such that A28: d in field P and A29: (RelIncl A) |_2 ((RelIncl A)-Seg(B)),P |_2 (P-Seg(d)) are_isomorphic by A25,A27,ORDINAL1:11,WELLORD1:50; A30: d in field R by A28,WELLORD1:12; A31: P-Seg(d) = R-Seg(d) by A1,A28,WELLORD1:12,27; d in V by A28,WELLORD1:12; then [d,b9] in R by WELLORD1:1; then R-Seg(d) c= R-Seg(b9) by A1,A10,A16,A30,WELLORD1:29; then RelIncl B,R |_2 (R-Seg(d)) are_isomorphic by A29,A26,A24,A31, WELLORD1:22; then R |_2 (R-Seg(d)),RelIncl B are_isomorphic by WELLORD1:40; then B = H.d by A10,A30; hence c in rng H by A10,A30,FUNCT_1:def 3; end; hence c in rng H by A15; end; A32: (ex a st a in C & rng H = (RelIncl C)-Seg(a)) implies rng H is Ordinal by Th9; C = field RelIncl C & RelIncl C is well-ordering by Def1; then reconsider A = rng H as Ordinal by A13,A14,A32,WELLORD1:28; take A; take H; thus dom H = field R by A10; thus rng H = field RelIncl A by Def1; A33: a in dom H implies H.a is Ordinal proof assume a in dom H; then H.a in A by FUNCT_1:def 3; hence thesis; end; thus A34: H is one-to-one proof let a,b; assume that A35: a in dom H and A36: b in dom H and A37: H.a = H.b; reconsider B = H.a as Ordinal by A33,A35; R |_2 (R-Seg(b)),RelIncl B are_isomorphic by A10,A36,A37; then A38: RelIncl B,R |_2 (R-Seg(b)) are_isomorphic by WELLORD1:40; R |_2 (R-Seg(a)),RelIncl B are_isomorphic by A10,A35; then R |_2 (R-Seg(a)),R |_2 (R-Seg(b)) are_isomorphic by A38,WELLORD1:42; hence thesis by A1,A10,A35,A36,WELLORD1:47; end; let a,b; thus [a,b] in R implies a in field R & b in field R & [H.a,H.b] in RelIncl A proof set Z = R-Seg(b); set P = R |_2 Z; A39: A = field RelIncl A & P is well-ordering by A1,Def1,WELLORD1:25; assume A40: [a,b] in R; hence A41: a in field R & b in field R by RELAT_1:15; then reconsider A9 = H.a, B9 = H.b as Ordinal by A10,A33; A42: R |_2 (R-Seg(b)),RelIncl B9 are_isomorphic by A10,A41; A43: A9 in A by A10,A41,FUNCT_1:def 3; A44: B9 in A by A10,A41,FUNCT_1:def 3; A45: R |_2 (R-Seg(a)),RelIncl A9 are_isomorphic by A10,A41; now assume a <> b; then A46: a in Z by A40,WELLORD1:1; then A47: P-Seg(a) = R-Seg(a) by A1,WELLORD1:27; Z c= field R by WELLORD1:9; then A48: a in field P by A1,A46,WELLORD1:31; A9 c= A by A43,ORDINAL1:def 2; then A49: (RelIncl A) |_2 A9 = RelIncl A9 by Th7; A9 = (RelIncl A)-Seg(A9) & R-Seg(a) c= R-Seg(b) by A1,A40,A41,A43,Th9, WELLORD1:29; then A50: P |_2 (P-Seg(a)),(RelIncl A) |_2 ((RelIncl A)-Seg(A9)) are_isomorphic by A45,A49,A47,WELLORD1:22; B9 = (RelIncl A)-Seg(B9) & B9 c= A by A44,Th9,ORDINAL1:def 2; then P,(RelIncl A) |_2 ((RelIncl A)-Seg(B9)) are_isomorphic by A42,Th7; hence [A9,B9] in RelIncl A by A43,A44,A39,A48,A50,WELLORD1:51; end; hence thesis by A43,Def1; end; assume that A51: a in field R and A52: b in field R and A53: [H.a,H.b] in RelIncl A; assume A54: not [a,b] in R; R is_reflexive_in field R by A1,RELAT_2:def 9; then A55: a <> b by A51,A54,RELAT_2:def 1; R is_connected_in field R by A1,RELAT_2:def 14; then A56: [b,a] in R by A51,A52,A54,A55,RELAT_2:def 6; then A57: R-Seg(b) c= R-Seg(a) by A1,A51,A52,WELLORD1:29; A58: RelIncl A is_antisymmetric_in field RelIncl A by RELAT_2:def 12; A59: A = field RelIncl A by Def1; reconsider A9 = H.a, B9 = H.b as Ordinal by A10,A33,A51,A52; A60: R |_2 (R-Seg(a)),RelIncl A9 are_isomorphic by A10,A51; A61: R |_2 (R-Seg(b)),RelIncl B9 are_isomorphic by A10,A52; A62: B9 in A by A10,A52,FUNCT_1:def 3; then B9 c= A by ORDINAL1:def 2; then A63: (RelIncl A) |_2 B9 = RelIncl B9 by Th7; set Z = R-Seg(a); set P = R |_2 Z; A64: A9 in A by A10,A51,FUNCT_1:def 3; then A9 = (RelIncl A)-Seg(A9) & A9 c= A by Th9,ORDINAL1:def 2; then A65: P,(RelIncl A) |_2 ((RelIncl A)-Seg(A9)) are_isomorphic by A60,Th7; A66: b in Z by A54,A56,WELLORD1:1; then A67: P-Seg(b) = R-Seg(b) by A1,WELLORD1:27; B9 = (RelIncl A)-Seg(B9) by A62,Th9; then A68: P |_2 (P-Seg(b)),(RelIncl A) |_2 ((RelIncl A)-Seg(B9)) are_isomorphic by A61,A63,A67,A57,WELLORD1:22; Z c= field R by WELLORD1:9; then A69: b in field P by A1,A66,WELLORD1:31; P is well-ordering by A1,WELLORD1:25; then [B9,A9] in RelIncl A by A69,A64,A62,A59,A65,A68,WELLORD1:51; then H.a = H.b by A53,A58,A64,A62,A59,RELAT_2:def 4; hence contradiction by A10,A34,A51,A52,A55,FUNCT_1:def 4; end; theorem Th13: for R st R is well-ordering ex A st R,RelIncl A are_isomorphic proof let R such that A1: R is well-ordering; defpred P[set] means ex A st R |_2 (R-Seg($1)),RelIncl A are_isomorphic; consider Z such that A2: a in Z iff a in field R & P[a] from XBOOLE_0:sch 1; now let a such that A3: a in field R and A4: R-Seg(a) c= Z; set P = R |_2 (R-Seg(a)); now let b; assume A5: b in field P; then A6: b in R-Seg(a) by WELLORD1:12; then A7: [b,a] in R by WELLORD1:1; b in field R by A5,WELLORD1:12; then A8: R-Seg(b) c= R-Seg(a) by A1,A3,A7,WELLORD1:29; consider A such that A9: R |_2 (R-Seg(b)),RelIncl A are_isomorphic by A2,A4,A6; take A; P-Seg(b) = R-Seg(b) by A1,A5,WELLORD1:12,27; hence P |_2 (P-Seg(b)),RelIncl A are_isomorphic by A9,A8,WELLORD1:22; end; then ex A st P,RelIncl A are_isomorphic by A1,Th12,WELLORD1:25; hence a in Z by A2,A3; end; then field R c= Z by A1,WELLORD1:33; then for a st a in field R ex A st R |_2 (R-Seg(a)),RelIncl A are_isomorphic by A2; hence thesis by A1,Th12; end; definition let R; assume A1: R is well-ordering; func order_type_of R -> Ordinal means :Def2: R,RelIncl it are_isomorphic; existence by A1,Th13; uniqueness by Th11; end; definition let A,R; pred A is_order_type_of R means A = order_type_of R; end; theorem X c= A implies order_type_of RelIncl X c= A proof assume A1: X c= A; then A2: (RelIncl A) |_2 X = RelIncl X by Th7; A3: RelIncl X is well-ordering by A1,Th8; A4: now assume RelIncl A,(RelIncl A) |_2 X are_isomorphic; then RelIncl X,RelIncl A are_isomorphic by A2,WELLORD1:40; hence thesis by A3,Def2; end; A5: now given a such that A6: a in A and A7: (RelIncl A) |_2 ((RelIncl A)-Seg(a)),(RelIncl A) |_2 X are_isomorphic; reconsider a as Ordinal by A6; A8: (RelIncl A)-Seg(a) = a by A6,Th9; A9: a c= A by A6,ORDINAL1:def 2; then (RelIncl A) |_2 a = RelIncl a by Th7; then RelIncl X,RelIncl a are_isomorphic by A2,A7,A8,WELLORD1:40; hence thesis by A3,A9,Def2; end; field RelIncl A = A by Def1; hence thesis by A1,A4,A5,WELLORD1:53; end; reserve f,g for Function; definition let X,Y; redefine pred X,Y are_equipotent means ex f st f is one-to-one & dom f = X & rng f = Y; compatibility proof thus X,Y are_equipotent implies ex f st f is one-to-one & dom f = X & rng f = Y proof assume X,Y are_equipotent; then consider Z such that A1: for x st x in X ex y st y in Y & [x,y] in Z and A2: for y st y in Y ex x st x in X & [x,y] in Z and A3: for x,y,z,u st [x,y] in Z & [z,u] in Z holds x = z iff y = u by TARSKI:def 6; set F = Z /\ [:X,Y:]; for x,y,z st [x,y] in F & [x,z] in F holds y = z proof let x,y,z; assume [x,y] in F & [x,z] in F; then [x,y] in Z & [x,z] in Z by XBOOLE_0:def 4; hence thesis by A3; end; then reconsider F as Function by FUNCT_1:def 1; take f = F; thus f is one-to-one proof let x,y; assume that A4: x in dom f and A5: y in dom f and A6: f.x = f.y; [y,f.y] in f by A5,FUNCT_1:1; then A7: [y,f.y] in Z by XBOOLE_0:def 4; [x,f.x] in f by A4,FUNCT_1:1; then [x,f.x] in Z by XBOOLE_0:def 4; hence thesis by A3,A6,A7; end; thus dom f c= X proof let x; assume x in dom f; then [x,f.x] in f by FUNCT_1:1; then [x,f.x] in [:X,Y:] by XBOOLE_0:def 4; hence thesis by ZFMISC_1:87; end; thus X c= dom f proof let x; assume A8: x in X; then consider y such that A9: y in Y and A10: [x,y] in Z by A1; [x,y] in [:X,Y:] by A8,A9,ZFMISC_1:87; then [x,y] in f by A10,XBOOLE_0:def 4; hence thesis by FUNCT_1:1; end; thus rng f c= Y proof let y; assume y in rng f; then consider x such that A11: x in dom f & y = f.x by FUNCT_1:def 3; [x,y] in f by A11,FUNCT_1:1; then [x,y] in [:X,Y:] by XBOOLE_0:def 4; hence thesis by ZFMISC_1:87; end; thus Y c= rng f proof let y; assume A12: y in Y; then consider x such that A13: x in X and A14: [x,y] in Z by A2; [x,y] in [:X,Y:] by A12,A13,ZFMISC_1:87; then [x,y] in f by A14,XBOOLE_0:def 4; then x in dom f & y = f.x by FUNCT_1:1; hence thesis by FUNCT_1:def 3; end; end; (ex f st f is one-to-one & dom f = X & rng f = Y) implies ex Z st ( for x st x in X ex y st y in Y & [x,y] in Z) & (for y st y in Y ex x st x in X & [x,y] in Z) & for x,y,z,u st [x,y] in Z & [z,u] in Z holds x = z iff y = u proof given f such that A15: f is one-to-one and A16: dom f = X and A17: rng f = Y; take Z = f; thus x in X implies ex y st y in Y & [x,y] in Z proof assume A18: x in X; take f.x; thus f.x in Y by A16,A17,A18,FUNCT_1:def 3; thus thesis by A16,A18,FUNCT_1:1; end; thus for y st y in Y ex x st x in X & [x,y] in Z proof let y such that A19: y in Y; take f".y; A20: dom(f") = rng f by A15,FUNCT_1:33; then A21: f".y in rng(f") by A17,A19,FUNCT_1:def 3; A22: rng(f") = dom f by A15,FUNCT_1:33; hence f".y in X by A16,A17,A19,A20,FUNCT_1:def 3; y = f.(f".y) by A15,A17,A19,FUNCT_1:35; hence thesis by A22,A21,FUNCT_1:1; end; let x,y,z,u; assume A23: [x,y] in Z & [z,u] in Z; then A24: x in dom f & z in dom f by FUNCT_1:1; y = f.x & u = f.z by A23,FUNCT_1:1; hence thesis by A15,A24,FUNCT_1:def 4; end; hence thesis by TARSKI:def 6; end; reflexivity proof let X; take id X; thus thesis; end; symmetry proof let X,Y; given f such that A25: f is one-to-one & dom f = X & rng f = Y; take f"; thus thesis by A25,FUNCT_1:33; end; end; theorem X,Y are_equipotent & Y,Z are_equipotent implies X,Z are_equipotent proof given f such that A1: f is one-to-one & dom f = X & rng f = Y; given g such that A2: g is one-to-one & dom g = Y & rng g = Z; take g*f; thus thesis by A1,A2,RELAT_1:27,28; end; theorem Th16: R well_orders X implies field(R|_2 X) = X & R|_2 X is well-ordering proof assume that A1: R is_reflexive_in X and A2: R is_transitive_in X and A3: R is_antisymmetric_in X and A4: R is_connected_in X and A5: R is_well_founded_in X; A6: R|_2 X is_antisymmetric_in X proof let x,y; assume that A7: x in X & y in X and A8: [x,y] in R|_2 X & [y,x] in R|_2 X; [x,y] in R & [y,x] in R by A8,XBOOLE_0:def 4; hence thesis by A3,A7,RELAT_2:def 4; end; A9: R|_2 X is_well_founded_in X proof let Y; assume Y c= X & Y <> {}; then consider a such that A10: a in Y and A11: R-Seg(a) misses Y by A5,WELLORD1:def 3; take a; thus a in Y by A10; assume not thesis; then consider x being set such that A12: x in (R|_2 X)-Seg(a) and A13: x in Y by XBOOLE_0:3; [x,a] in R|_2 X by A12,WELLORD1:1; then A14: [x,a] in R by XBOOLE_0:def 4; x <> a by A12,WELLORD1:1; then x in R-Seg(a) by A14,WELLORD1:1; hence contradiction by A11,A13,XBOOLE_0:3; end; A15: R|_2 X is_transitive_in X proof let x,y,z; assume that A16: x in X and A17: y in X and A18: z in X and A19: [x,y] in R|_2 X & [y,z] in R|_2 X; [x,y] in R & [y,z] in R by A19,XBOOLE_0:def 4; then A20: [x,z] in R by A2,A16,A17,A18,RELAT_2:def 8; [x,z] in [:X,X:] by A16,A18,ZFMISC_1:87; hence thesis by A20,XBOOLE_0:def 4; end; A21: R|_2 X is_connected_in X proof let x,y; assume that A22: x in X & y in X and A23: x <> y; A24: [x,y] in [:X,X:] & [y,x] in [:X,X :] by A22,ZFMISC_1:87; [x,y] in R or [y,x] in R by A4,A22,A23,RELAT_2:def 6; hence thesis by A24,XBOOLE_0:def 4; end; thus A25: field(R|_2 X) = X proof thus field(R|_2 X) c= X by WELLORD1:13; let x; assume x in X; then [x,x] in R & [x,x] in [:X,X:] by A1,RELAT_2:def 1,ZFMISC_1:87; then [x,x] in R|_2 X by XBOOLE_0:def 4; hence thesis by RELAT_1:15; end; R|_2 X is_reflexive_in X proof let x; assume x in X; then [x,x] in R & [x,x] in [:X,X:] by A1,RELAT_2:def 1,ZFMISC_1:87; hence thesis by XBOOLE_0:def 4; end; then R|_2 X well_orders X by A15,A6,A21,A9,WELLORD1:def 5; hence thesis by A25,WELLORD1:4; end; Lm1: R is well-ordering & X,field R are_equipotent implies ex R st R well_orders X proof assume A1: R is well-ordering; given f such that A2: f is one-to-one and A3: dom f = X and A4: rng f = field R; defpred P[set,set] means [f.$1,f.$2] in R; consider Q being Relation such that A5: [x,y] in Q iff x in X & y in X & P[x,y] from RELAT_1:sch 1; take Q; A6: R is_reflexive_in field R by A1,RELAT_2:def 9; A7: field Q = X proof thus field Q c= X proof let x; assume that A8: x in field Q and A9: not x in X; for y holds not [y,x] in Q by A5,A9; then A10: not x in rng Q by XTUPLE_0:def 13; for y holds not [x,y] in Q by A5,A9; then not x in dom Q by XTUPLE_0:def 12; hence contradiction by A8,A10,XBOOLE_0:def 3; end; let x; assume A11: x in X; then f.x in rng f by A3,FUNCT_1:def 3; then [f.x,f.x] in R by A6,A4,RELAT_2:def 1; then [x,x] in Q by A5,A11; hence thesis by RELAT_1:15; end; f is_isomorphism_of Q,R proof thus dom f = field Q & rng f = field R & f is one-to-one by A2,A3,A4,A7; let x,y; thus [x,y] in Q implies x in field Q & y in field Q & [f.x,f.y] in R by A5 ,A7; assume x in field Q & y in field Q & [f.x,f.y] in R; hence thesis by A5,A7; end; then f" is_isomorphism_of R,Q by WELLORD1:39; then Q is well-ordering by A1,WELLORD1:44; hence thesis by A7,WELLORD1:4; end; theorem Th17: for X ex R st R well_orders X proof deffunc F(set) = {$1}; defpred P[set] means $1 is Ordinal; let X; consider Class being set such that A1: X in Class and A2: Y in Class & Z c= Y implies Z in Class and Y in Class implies bool Y in Class and A3: Y c= Class implies Y,Class are_equipotent or Y in Class by ZFMISC_1:112; consider ON being set such that A4: x in ON iff x in Class & P[x] from XBOOLE_0:sch 1; for Y st Y in ON holds Y is Ordinal & Y c= ON proof let Y; assume A5: Y in ON; hence Y is Ordinal by A4; reconsider A = Y as Ordinal by A4,A5; let x; assume A6: x in Y; then x in A; then reconsider B = x as Ordinal; A7: B c= A by A6,ORDINAL1:def 2; A in Class by A4,A5; then B in Class by A2,A7; hence thesis by A4; end; then reconsider ON as Ordinal by ORDINAL1:19; A8: ON c= Class proof let x; thus thesis by A4; end; A9: ON,Class are_equipotent proof assume not thesis; then ON in Class by A3,A8; then ON in ON by A4; hence contradiction; end; field RelIncl ON = ON by Def1; then consider R such that A10: R well_orders Class by A9,Lm1; consider f such that A11: dom f = X & for x st x in X holds f.x = F(x) from FUNCT_1:sch 3; A12: rng f c= Class proof let x; assume x in rng f; then consider y such that A13: y in dom f and A14: x = f.y by FUNCT_1:def 3; A15: { y } c= X proof let z; assume z in { y }; hence thesis by A11,A13,TARSKI:def 1; end; f.y = { y } by A11,A13; hence thesis by A1,A2,A14,A15; end; A16: X,rng f are_equipotent proof take f; thus f is one-to-one proof let x,y; assume that A17: x in dom f & y in dom f and A18: f.x = f.y; f.x = { x } & f.y = { y } by A11,A17; hence thesis by A18,ZFMISC_1:3; end; thus thesis by A11; end; set Q = R|_2 Class; field Q = Class by A10,Th16; then A19: field(Q|_2 rng f) = rng f by A10,A12,Th16,WELLORD1:31; Q is well-ordering by A10,Th16; hence thesis by A16,A19,Lm1,WELLORD1:25; end; reserve M for non empty set; theorem (for X st X in M holds X <> {}) & (for X,Y st X in M & Y in M & X <> Y holds X misses Y) implies ex Choice being set st for X st X in M ex x st Choice /\ X = { x } proof assume that A1: for X st X in M holds X <> {} and A2: for X,Y st X in M & Y in M & X <> Y holds X misses Y; consider R such that A3: R well_orders union M by Th17; A4: R is_reflexive_in union M by A3,WELLORD1:def 5; A5: R is_connected_in union M by A3,WELLORD1:def 5; defpred Ch[set,set] means $2 in $1 & for z st z in $1 holds [$2,z] in R; A6: R is_antisymmetric_in union M by A3,WELLORD1:def 5; A7: for x,y,z st x in M & Ch[x,y] & Ch[x,z] holds y = z proof let x,y,z such that A8: x in M; assume that A9: y in x and A10: for u st u in x holds [y,u] in R; A11: y in union M by A8,A9,TARSKI:def 4; assume that A12: z in x and A13: for u st u in x holds [z,u] in R; A14: z in union M by A8,A12,TARSKI:def 4; [y,z] in R & [z,y] in R by A9,A10,A12,A13; hence thesis by A6,A11,A14,RELAT_2:def 4; end; A15: R is_well_founded_in union M by A3,WELLORD1:def 5; A16: for x st x in M ex y st Ch[x,y] proof let x; assume A17: x in M; then A18: x c= union M by ZFMISC_1:74; x <> {} by A1,A17; then consider y such that A19: y in x and A20: R-Seg(y) misses x by A15,A18,WELLORD1:def 3; take y; thus y in x by A19; let z; assume A21: z in x; then A22: not z in R-Seg(y) by A20,XBOOLE_0:3; y <> z implies [y,z] in R or [z,y] in R by A5,A18,A19,A21,RELAT_2:def 6; hence thesis by A4,A18,A21,A22,RELAT_2:def 1,WELLORD1:1; end; consider f such that A23: dom f = M & for x st x in M holds Ch[x,f.x] from FUNCT_1:sch 2(A7, A16 ); take Choice = rng f; let X such that A24: X in M; take x = f.X; thus Choice /\ X c= { x } proof let y; assume A25: y in Choice /\ X; then A26: y in X by XBOOLE_0:def 4; y in Choice by A25,XBOOLE_0:def 4; then consider z such that A27: z in dom f and A28: y = f.z by FUNCT_1:def 3; assume not y in { x }; then X <> z by A28,TARSKI:def 1; then X misses z by A2,A23,A24,A27; then A29: X /\ z = {} by XBOOLE_0:def 7; f.z in z by A23,A27; hence contradiction by A26,A28,A29,XBOOLE_0:def 4; end; let y; assume y in { x }; then A30: y = x by TARSKI:def 1; then A31: y in X by A24,A23; y in Choice by A23,A24,A30,FUNCT_1:def 3; hence thesis by A31,XBOOLE_0:def 4; end; begin theorem for X being set holds RelIncl X is_reflexive_in X proof let X be set; RelIncl X is reflexive & field RelIncl X = X by Def1; hence thesis by RELAT_2:def 9; end; theorem for X being set holds RelIncl X is_transitive_in X proof let X be set; RelIncl X is transitive & field RelIncl X = X by Def1; hence thesis by RELAT_2:def 16; end; theorem for X being set holds RelIncl X is_antisymmetric_in X proof let X be set; RelIncl X is antisymmetric & field RelIncl X = X by Def1; hence thesis by RELAT_2:def 12; end; registration cluster RelIncl {} -> empty; coherence proof for Y,Z being set st Y in {} & Z in {} holds [Y,Z] in {} iff Y c= Z; hence thesis by Def1,RELAT_1:40; end; end; registration let X be non empty set; cluster RelIncl X -> non empty; coherence proof set a = the Element of X; [a,a] in RelIncl X by Def1; hence thesis; end; end; theorem RelIncl {x} = {[x,x]} proof A1: for Y,Z being set st Y in {x} & Z in {x} holds [Y,Z] in {[x,x]} iff Y c= Z proof let Y,Z be set; assume that A2: Y in {x} and A3: Z in {x}; A4: Y = x by A2,TARSKI:def 1; hence [Y,Z] in {[x,x]} implies Y c= Z by A3,TARSKI:def 1; Z = x by A3,TARSKI:def 1; hence thesis by A4,TARSKI:def 1; end; field {[x,x]} = {x} by RELAT_1:173; hence thesis by A1,Def1; end; theorem RelIncl X c= [:X,X:] proof set R = RelIncl X; let a,b be set; assume A1: [a,b] in R; then b in field R by RELAT_1:15; then A2: b in X by Def1; a in field R by A1,RELAT_1:15; then a in X by Def1; hence thesis by A2,ZFMISC_1:87; end; begin reserve P,Q,X,Y,Z,p,x,x9,x1,x2,y,z for set; definition let X,Y; let R be Relation of X,Y; attr R is quasi_total means :Def1: X = dom R if Y <> {} otherwise R = {}; consistency; end; registration let X,Y; cluster quasi_total for PartFunc of X,Y; existence proof per cases; suppose A1: Y = {}; reconsider R = {} as PartFunc of X,Y by RELSET_1:12; take R; thus thesis by A1,Def1; end; suppose A2: Y <> {}; then consider f being Function such that A3: X = dom f and A4: rng f c= Y by FUNCT_1:8; reconsider R = f as PartFunc of X,Y by A3,A4,RELSET_1:4; take R; thus thesis by A2,A3,Def1; end; end; end; registration let X,Y; cluster total -> quasi_total for Relation of X,Y; coherence proof let f be Relation of X,Y; assume A1: dom f = X; per cases; case Y <> {}; thus thesis by A1; end; case Y = {}; hence thesis; end; end; end; definition let X,Y; mode Function of X,Y is quasi_total PartFunc of X,Y; end; registration let X be empty set, Y be set; cluster quasi_total -> total for Relation of X,Y; coherence; end; registration let X be set, Y be non empty set; cluster quasi_total -> total for Relation of X,Y; coherence proof let F be Relation of X,Y; assume F is quasi_total; hence X = dom F by Def1; end; end; registration let X be set; cluster quasi_total -> total for Relation of X,X; coherence proof per cases; suppose X = {}; hence thesis; end; suppose X <> {}; hence thesis; end; end; end; theorem for f being Function holds f is Function of dom f, rng f proof let f be Function; reconsider R = f as Relation of dom f, rng f by RELSET_1:4; rng R <> {} or rng R = {}; hence thesis by Def1; end; theorem Th2: for f being Function st rng f c= Y holds f is Function of dom f, Y proof let f be Function; assume rng f c= Y; then reconsider R = f as Relation of dom f,Y by RELSET_1:4; Y = {} or Y <> {}; then R is quasi_total by Def1; hence thesis; end; theorem for f being Function st dom f = X & for x st x in X holds f.x in Y holds f is Function of X,Y proof let f be Function such that A1: dom f = X and A2: for x st x in X holds f.x in Y; rng f c= Y proof let y; assume y in rng f; then ex x st x in X & y = f.x by A1,FUNCT_1:def 3; hence thesis by A2; end; then reconsider R = f as Relation of dom f,Y by RELSET_1:4; Y = {} or Y <> {}; then R is quasi_total by Def1; hence thesis by A1; end; theorem Th4: for f being Function of X,Y st Y <> {} & x in X holds f.x in rng f proof let f be Function of X,Y; assume Y <> {}; then dom f = X by Def1; hence thesis by FUNCT_1:def 3; end; theorem Th5: for f being Function of X,Y st Y <> {} & x in X holds f.x in Y proof let f be Function of X,Y; assume Y <> {} & x in X; then f.x in rng f by Th4; hence thesis; end; theorem for f being Function of X,Y st (Y = {} implies X = {}) & rng f c= Z holds f is Function of X,Z proof let f be Function of X,Y; assume Y <> {} or X = {}; then A1: dom f = X by Def1; assume A2: rng f c= Z; now assume Z = {}; then rng f = {} by A2; hence X = {} by A1,RELAT_1:42; end; hence thesis by A1,A2,Def1,RELSET_1:4; end; theorem for f being Function of X,Y st (Y = {} implies X = {}) & Y c= Z holds f is Function of X,Z by RELSET_1:7; scheme FuncEx1{X, Y() -> set, P[set,set]}: ex f being Function of X(),Y() st for x st x in X() holds P[x,f.x] provided A1: for x st x in X() ex y st y in Y() & P[x,y] proof consider f being Function such that A2: dom f = X() & rng f c= Y() and A3: for x st x in X() holds P[x,f.x] from FUNCT_1:sch 5(A1); reconsider f as Function of X(),Y() by A2,Th2; take f; thus thesis by A3; end; scheme Lambda1{X, Y() -> set, F(set)->set}: ex f being Function of X(),Y() st for x st x in X() holds f.x = F(x) provided A1: for x st x in X() holds F(x) in Y() proof defpred P[set,set] means $2 = F($1); A2: for x st x in X() ex y st y in Y() & P[x,y] by A1; thus ex f being Function of X(),Y() st for x st x in X() holds P[x,f.x] from FuncEx1(A2); end; definition let X,Y; func Funcs(X,Y) -> set means :Def2: x in it iff ex f being Function st x = f & dom f = X & rng f c= Y; existence proof defpred P[set] means ex f being Function st $1 = f & dom f = X & rng f c= Y; consider F being set such that A1: z in F iff z in bool [:X,Y:] & P[z] from XBOOLE_0:sch 1; take F; let z; thus z in F implies ex f being Function st z = f & dom f = X & rng f c= Y by A1; given f being Function such that A2: z = f and A3: dom f = X & rng f c= Y; f c= [:X,Y:] proof let p; assume A4: p in f; then consider x,y such that A5: p = [x,y] by RELAT_1:def 1; A6: x in dom f by A4,A5,XTUPLE_0:def 12; then y = f.x by A4,A5,FUNCT_1:def 2; then y in rng f by A6,FUNCT_1:def 3; hence thesis by A3,A5,A6,ZFMISC_1:def 2; end; hence thesis by A1,A2,A3; end; uniqueness proof let F1,F2 be set such that A7: x in F1 iff ex f being Function st x = f & dom f = X & rng f c= Y and A8: x in F2 iff ex f being Function st x = f & dom f = X & rng f c= Y; x in F1 iff x in F2 proof x in F1 iff ex f being Function st x = f & dom f = X & rng f c= Y by A7; hence thesis by A8; end; hence thesis by TARSKI:1; end; end; theorem Th8: for f being Function of X,Y st Y = {} implies X = {} holds f in Funcs(X,Y) proof let f be Function of X,Y; assume Y = {} implies X = {}; then A1: dom f = X by Def1; rng f c= Y; hence thesis by A1,Def2; end; theorem for f being Function of X,X holds f in Funcs(X,X) by Th8; registration let X be set, Y be non empty set; cluster Funcs(X,Y) -> non empty; coherence by Th8; end; registration let X be set; cluster Funcs(X,X) -> non empty; coherence by Th8; end; registration let X be non empty set, Y be empty set; cluster Funcs(X,Y) -> empty; coherence proof assume Funcs(X,Y) is non empty; then consider f being Function such that the Element of Funcs(X,Y) = f and A1: dom f = X and A2: rng f c= {} by Def2; rng f = {} by A2; hence contradiction by A1,RELAT_1:42; end; end; theorem for f being Function of X,Y st for y st y in Y ex x st x in X & y = f.x holds rng f = Y proof let f be Function of X,Y such that A1: for y st y in Y ex x st x in X & y = f.x; per cases; suppose Y = {}; hence thesis; end; suppose A2: Y <> {}; y in rng f iff y in Y proof dom f = X by A2,Def1; then y in rng f iff ex x st x in X & y = f.x by FUNCT_1:def 3; hence thesis by A1; end; hence thesis by TARSKI:1; end; end; theorem Th11: for f being Function of X,Y st y in rng f ex x st x in X & f.x = y proof let f be Function of X,Y; assume A1: y in rng f; then dom f = X by Def1; hence thesis by A1,FUNCT_1:def 3; end; theorem Th12: for f1,f2 being Function of X,Y st for x st x in X holds f1.x = f2.x holds f1 = f2 proof let f1,f2 be Function of X,Y; per cases; suppose Y = {}; hence thesis; end; suppose Y <> {}; then dom f1 = X & dom f2 = X by Def1; hence thesis by FUNCT_1:2; end; end; theorem Th13: for f being quasi_total Relation of X,Y for g being quasi_total Relation of Y,Z st Y = {} implies Z = {} or X = {} holds f*g is quasi_total proof let f be quasi_total Relation of X,Y; let g be quasi_total Relation of Y,Z such that A1: Y = {} implies Z = {} or X = {}; per cases; case A2: Z <> {}; then A3: dom g = Y by Def1; dom f = X & rng f c= Y by A1,A2,Def1; hence thesis by A3,RELAT_1:27; end; case Z = {}; hence thesis; end; end; theorem for f being Function of X,Y for g being Function of Y,Z st Z <> {} & rng f = Y & rng g = Z holds rng(g*f) = Z proof let f be Function of X,Y; let g be Function of Y,Z; assume Z <> {}; then dom g = Y by Def1; hence thesis by RELAT_1:28; end; theorem Th15: for f being Function of X,Y, g being Function st Y <> {} & x in X holds (g*f).x = g.(f.x) proof let f be Function of X,Y, g be Function; assume Y <> {}; then X = dom f by Def1; hence thesis by FUNCT_1:13; end; theorem for f being Function of X,Y st Y <> {} holds rng f = Y iff for Z st Z <> {} for g,h being Function of Y,Z st g*f = h*f holds g = h proof let f be Function of X,Y; assume A1: Y <> {}; thus rng f = Y implies for Z st Z <> {} for g,h being Function of Y,Z st g*f = h*f holds g = h proof assume A2: rng f = Y; let Z such that A3: Z <> {}; let g,h be Function of Y,Z; dom g = Y & dom h = Y by A3,Def1; hence thesis by A2,FUNCT_1:86; end; assume A4: for Z st Z <> {} for g,h being Function of Y,Z st g*f = h*f holds g = h; for g,h being Function st dom g = Y & dom h = Y & g*f = h*f holds g = h proof let g,h be Function; assume that A5: dom g = Y and A6: dom h = Y; A7: rng g <> {} by A1,A5,RELAT_1:42; A8: g is Function of Y,rng g \/ rng h by A5,Th2,XBOOLE_1:7; h is Function of Y,rng g \/ rng h by A6,Th2,XBOOLE_1:7; hence thesis by A4,A7,A8; end; hence thesis by FUNCT_1:16; end; theorem for f being Relation of X,Y holds (id X)*f = f & f*(id Y) = f proof let f be Relation of X,Y; dom f c= X; hence (id X)*f = f by RELAT_1:51; rng f c= Y; hence thesis by RELAT_1:53; end; theorem for f being Function of X,Y for g being Function of Y,X st f*g = id Y holds rng f = Y proof let f be (Function of X,Y),g be Function of Y,X; assume f*g = id Y; then rng(f*g) = Y by RELAT_1:45; then Y c= rng f by RELAT_1:26; hence thesis by XBOOLE_0:def 10; end; theorem for f being Function of X,Y st Y = {} implies X = {} holds f is one-to-one iff for x1,x2 st x1 in X & x2 in X & f.x1 = f.x2 holds x1 = x2 proof let f be Function of X,Y; assume Y = {} implies X = {}; then dom f = X by Def1; hence thesis by FUNCT_1:def 4; end; theorem for f being Function of X,Y for g being Function of Y,Z st (Z = {} implies Y = {}) & g*f is one-to-one holds f is one-to-one proof let f be Function of X,Y; let g be Function of Y,Z; assume Z <> {} or Y = {}; then A1: Y = dom g by Def1; rng f c= Y; hence thesis by A1,FUNCT_1:25; end; theorem for f being Function of X,Y st X <> {} & Y <> {} holds f is one-to-one iff for Z for g,h being Function of Z,X st f*g = f*h holds g = h proof let f be Function of X,Y; assume that A1: X <> {} and A2: Y <> {}; A3: dom f = X by A2,Def1; thus f is one-to-one implies for Z for g,h being Function of Z,X st f*g = f* h holds g = h proof assume A4: f is one-to-one; let Z; let g,h be Function of Z,X; A5: rng g c= X & rng h c= X; dom g = Z & dom h = Z by A1,Def1; hence thesis by A3,A4,A5,FUNCT_1:27; end; assume A6: for Z for g,h being Function of Z,X st f*g = f*h holds g = h; now let g,h be Function; assume rng g c= dom f & rng h c= dom f & dom g = dom h; then g is Function of dom g,X & h is Function of dom g,X by A3,Th2; hence f*g = f*h implies g = h by A6; end; hence thesis by FUNCT_1:27; end; theorem for f being Function of X,Y for g being Function of Y,Z st Z <> {} & rng(g*f) = Z & g is one-to-one holds rng f = Y proof let f be Function of X,Y; let g be Function of Y,Z; assume that A1: Z <> {} and A2: rng(g*f) = Z and A3: g is one-to-one; A4: dom g = Y by A1,Def1; rng(g*f) c= rng g by RELAT_1:26; then rng g = rng(g*f) by A2,XBOOLE_0:def 10; then Y c= rng f by A3,A4,FUNCT_1:29; hence thesis by XBOOLE_0:def 10; end; definition let Y be set; let f be Y-valued Relation; attr f is onto means :Def3: rng f = Y; end; theorem for f being Function of X,Y for g being Function of Y,X st g*f = id X holds f is one-to-one & g is onto proof let f be Function of X,Y; let g be Function of Y,X; assume that A1: g*f = id X; thus f is one-to-one proof per cases; suppose Y = {}; hence thesis; end; suppose Y <> {}; then dom f = X by Def1; hence thesis by A1,FUNCT_1:31; end; end; rng(g*f) = X by A1,RELAT_1:45; then X c= rng g by RELAT_1:26; hence rng g = X by XBOOLE_0:def 10; end; theorem for f being Function of X,Y for g being Function of Y,Z st (Z = {} implies Y = {}) & g*f is one-to-one & rng f = Y holds f is one-to-one & g is one-to-one proof let f be Function of X,Y; let g be Function of Y,Z; assume Z <> {} or Y = {}; then Y = dom g by Def1; hence thesis by FUNCT_1:26; end; theorem Th25: for f being Function of X,Y st f is one-to-one & rng f = Y holds f" is Function of Y,X proof let f be Function of X,Y; assume that A1: f is one-to-one and A2: rng f = Y; A3: rng(f") c= X proof let x; assume x in rng(f"); then x in dom f by A1,FUNCT_1:33; hence thesis; end; dom(f") = Y by A1,A2,FUNCT_1:33; then reconsider R = f" as Relation of Y,X by A3,RELSET_1:4; R is quasi_total proof per cases; case X <> {}; thus thesis by A1,A2,FUNCT_1:33; end; case X = {}; then rng f = {}; then dom(f") = {} by A1,FUNCT_1:32; hence thesis; end; end; hence thesis; end; theorem for f being Function of X,Y st Y <> {} & f is one-to-one & x in X holds (f").(f.x) = x proof let f be Function of X,Y; assume Y <> {}; then dom f = X by Def1; hence thesis by FUNCT_1:34; end; theorem for X be set, Y,Z be non empty set for f be Function of X,Y for g be Function of Y,Z holds f is onto & g is onto implies g*f is onto proof let X be set, Y,Z be non empty set; let f be Function of X,Y; let g be Function of Y,Z; assume that A1: f is onto and A2: g is onto; rng f = Y by A1,Def3 .= dom g by Def1; then rng(g*f) = rng g by RELAT_1:28 .= Z by A2,Def3; hence thesis by Def3; end; theorem for f being Function of X,Y for g being Function of Y,X st X <> {} & Y <> {} & rng f = Y & f is one-to-one & for y,x holds y in Y & g.y = x iff x in X & f.x = y holds g = f" proof let f be Function of X,Y; let g be Function of Y,X; assume X <> {} & Y <> {}; then dom f = X & dom g = Y by Def1; hence thesis by FUNCT_1:32; end; theorem for f being Function of X,Y st Y <> {} & rng f = Y & f is one-to-one holds f"*f = id X & f*f" = id Y proof let f be Function of X,Y; assume Y <> {}; then dom f = X by Def1; hence thesis by FUNCT_1:39; end; theorem for f being Function of X,Y for g being Function of Y,X st X <> {} & Y <> {} & rng f = Y & g*f = id X & f is one-to-one holds g = f" proof let f be Function of X,Y; let g be Function of Y,X; assume X <> {} & Y <> {}; then dom f = X & dom g = Y by Def1; hence thesis by FUNCT_1:41; end; theorem for f being Function of X,Y st Y <> {} & ex g being Function of Y,X st g*f = id X holds f is one-to-one proof let f be Function of X,Y; assume Y <> {}; then A1: dom f = X by Def1; given g being Function of Y,X such that A2: g*f = id X; thus thesis by A2,A1,FUNCT_1:31; end; theorem Th32: for f being Function of X,Y st (Y = {} implies X = {}) & Z c= X holds f|Z is Function of Z,Y proof let f be Function of X,Y such that A1: Y = {} implies X = {} and A2: Z c= X; dom f = X by A1,Def1; then A3: Z = dom(f|Z) by A2,RELAT_1:62; rng(f|Z) c= Y; then reconsider R = f|Z as Relation of Z,Y by A3,RELSET_1:4; R is quasi_total proof per cases; case Y <> {}; dom f = X by A1,Def1; hence thesis by A2,RELAT_1:62; end; case Y = {}; hence thesis; end; end; hence thesis; end; theorem for f being Function of X,Y st X c= Z holds f|Z = f by RELSET_1:19; theorem for f being Function of X,Y st Y <> {} & x in X & f.x in Z holds (Z|`f) .x = f.x proof let f be Function of X,Y; assume that A1: Y <> {} & x in X and A2: f.x in Z; x in dom f by A1,Def1; then x in dom(Z|`f) by A2,FUNCT_1:54; hence thesis by FUNCT_1:55; end; theorem for f being Function of X,Y st Y <> {} for y holds (ex x st x in X & x in P & y = f.x) implies y in f.:P proof let f be Function of X,Y; assume Y <> {}; then A1: dom f = X by Def1; let y; given x such that A2: x in X & x in P & y = f.x; thus thesis by A1,A2,FUNCT_1:def 6; end; theorem for f being Function of X,Y holds f.:P c= Y; canceled; theorem for f being Function of X,Y st Y <> {} for x holds x in f"Q iff x in X & f.x in Q proof let f be Function of X,Y; assume Y <> {}; then dom f = X by Def1; hence thesis by FUNCT_1:def 7; end; theorem for f being PartFunc of X,Y holds f"Q c= X; theorem Th40: for f being Function of X,Y st Y = {} implies X = {} holds f"Y = X proof let f be Function of X,Y; rng f /\ Y = rng f by XBOOLE_1:28; then A1: f"Y = f"(rng f) by RELAT_1:133; assume Y <> {} or X = {}; then dom f = X by Def1; hence thesis by A1,RELAT_1:134; end; theorem for f being Function of X,Y holds (for y st y in Y holds f"{y} <> {}) iff rng f = Y proof let f be Function of X,Y; thus (for y st y in Y holds f"{y} <> {}) implies rng f = Y proof assume for y st y in Y holds f"{y} <> {}; then Y c= rng f by FUNCT_1:73; hence thesis by XBOOLE_0:def 10; end; thus thesis by FUNCT_1:72; end; theorem Th42: for f being Function of X,Y st (Y = {} implies X = {}) & P c= X holds P c= f"(f.:P) proof let f be Function of X,Y; assume Y <> {} or X = {}; then dom f = X by Def1; hence thesis by FUNCT_1:76; end; theorem for f being Function of X,Y st Y = {} implies X = {} holds f"(f.:X) = X proof let f be Function of X,Y; assume Y <> {} or X = {}; then A1: dom f = X by Def1; then f"(rng f) = X by RELAT_1:134; hence thesis by A1,RELAT_1:113; end; theorem for f being Function of X,Y for g being Function of Y,Z st (Z = {} implies Y = {}) holds f"Q c= (g*f)"(g.:Q) proof let f be Function of X,Y; let g be Function of Y,Z; assume Z <> {} or Y = {}; then A1: dom g = Y by Def1; rng f c= Y; hence thesis by A1,FUNCT_1:90; end; theorem for f being Function of {},Y holds f.:P = {}; theorem for f being Function of {},Y holds f"Q = {}; theorem for f being Function of {x},Y st Y <> {} holds f.x in Y proof let f be Function of {x},Y; assume Y <> {}; then A1: dom f = {x} by Def1; rng f c= Y; then {f.x} c= Y by A1,FUNCT_1:4; hence thesis by ZFMISC_1:31; end; theorem Th48: for f being Function of {x},Y st Y <> {} holds rng f = {f.x} proof let f be Function of {x},Y; assume Y <> {}; then dom f = {x} by Def1; hence thesis by FUNCT_1:4; end; theorem for f being Function of {x},Y st Y <> {} holds f.:P c= {f.x} proof let f be Function of {x},Y; f.:P c= rng f by RELAT_1:111; hence thesis by Th48; end; theorem Th50: for f being Function of X,{y} st x in X holds f.x = y proof let f be Function of X,{y}; x in X implies f.x in {y} by Th5; hence thesis by TARSKI:def 1; end; theorem Th51: for f1,f2 being Function of X,{y} holds f1 = f2 proof let f1,f2 be Function of X,{y}; x in X implies f1.x = f2.x proof assume A1: x in X; then f1.x = y by Th50; hence thesis by A1,Th50; end; hence thesis by Th12; end; theorem Th52: for f being Function of X,X holds dom f = X proof X = {} implies X = {}; hence thesis by Def1; end; registration let X,Y be set; let f be quasi_total PartFunc of X,Y; let g be quasi_total PartFunc of X,X; cluster f*g -> quasi_total for PartFunc of X,Y; coherence proof per cases; suppose Y = {}; hence thesis; end; suppose A1: Y <> {}; then dom f = X by Def1; then dom(f*g) = g"X by RELAT_1:147 .= dom g by RELSET_1:22 .= X by Th52; hence thesis by A1,Def1; end; end; end; registration let X,Y be set; let f be quasi_total PartFunc of Y,Y; let g be quasi_total PartFunc of X,Y; cluster f*g -> quasi_total for PartFunc of X,Y; coherence proof per cases; suppose Y = {}; hence thesis; end; suppose A1: Y <> {}; dom f = Y by Th52; then dom(f*g) = g"Y by RELAT_1:147 .= dom g by RELSET_1:22 .= X by A1,Def1; hence thesis by A1,Def1; end; end; end; theorem Th53: for f,g being Relation of X,X st rng f = X & rng g = X holds rng (g*f) = X proof let f,g be Relation of X,X; assume that A1: rng f = X and A2: rng g = X; thus rng(g*f) = f.:X by A2,RELAT_1:127 .= X by A1,RELSET_1:22; end; theorem for f,g being Function of X,X st g*f = f & rng f = X holds g = id X proof let f,g be Function of X,X; dom g = X by Th52; hence thesis by FUNCT_1:23; end; theorem for f,g being Function of X,X st f*g = f & f is one-to-one holds g = id X proof let f,g be Function of X,X; A1: rng g c= X; dom f = X & dom g = X by Th52; hence thesis by A1,FUNCT_1:28; end; theorem Th56: for f being Function of X,X holds f is one-to-one iff for x1,x2 st x1 in X & x2 in X & f.x1 = f.x2 holds x1 = x2 proof let f be Function of X,X; dom f = X by Th52; hence thesis by FUNCT_1:def 4; end; definition let X, Y; let f be X-defined Y-valued Function; attr f is bijective means :Def4: f is one-to-one onto; end; registration let X, Y be set; cluster bijective -> one-to-one onto for PartFunc of X,Y; coherence by Def4; cluster one-to-one onto -> bijective for PartFunc of X,Y; coherence by Def4; end; registration let X; cluster bijective for Function of X,X; existence proof take id X; thus id X is one-to-one & rng id X = X; end; end; definition let X; mode Permutation of X is bijective Function of X,X; end; theorem Th57: for f being Function of X, X st f is one-to-one & rng f = X holds f is Permutation of X proof let f be Function of X, X; assume that A1: f is one-to-one and A2: rng f = X; f is onto by A2,Def3; hence thesis by A1; end; theorem for f being Function of X,X st f is one-to-one holds for x1,x2 st x1 in X & x2 in X & f.x1 = f.x2 holds x1 = x2 by Th56; registration let X; let f,g be onto PartFunc of X,X; cluster f*g -> onto for PartFunc of X,X; coherence proof rng f = X & rng g = X by Def3; then rng(f*g) = X by Th53; hence thesis by Def3; end; end; registration let X; let f,g be bijective Function of X,X; cluster g*f -> bijective for Function of X,X; coherence; end; registration let X; cluster reflexive total -> bijective for Function of X,X; coherence proof let f be Function of X,X; assume A1: f is reflexive total; A3: field f = dom f \/ rng f by RELAT_1:def 6; thus f is one-to-one proof let x1,x2 such that A4: x1 in dom f and A5: x2 in dom f and A6: f.x1 = f.x2; x1 in field f by A3,A4,XBOOLE_0:def 3; then [x1,x1] in f by A1,RELAT_2:def 1,def 9; then A7: x1 = f.x1 by A4,FUNCT_1:def 2; x2 in field f by A3,A5,XBOOLE_0:def 3; then [x2,x2] in f by A1,RELAT_2:def 1,def 9; hence thesis by A5,A6,A7,FUNCT_1:def 2; end; thus rng f c= X; let x; assume x in X; then x in dom f by PARTFUN1:def 2; then x in field f by A3,XBOOLE_0:def 3; then [x,x] in f by A1,RELAT_2:def 1,def 9; hence thesis by XTUPLE_0:def 13; end; end; definition let X; let f be Permutation of X; redefine func f" -> Permutation of X; coherence proof dom f = X by Th52; then A1: rng(f") = X by FUNCT_1:33; rng f = X by Def3; then f" is Function of X,X by Th25; hence thesis by A1,Th57; end; end; theorem for f,g being Permutation of X st g*f = g holds f = id X proof let f,g be Permutation of X; A1: rng f c= X; dom f = X & dom g = X by Th52; hence thesis by A1,FUNCT_1:28; end; theorem for f,g being Permutation of X st g*f = id X holds g = f" proof let f,g be Permutation of X; A1: dom f = X by Th52; rng f= X & dom g = X by Def3,Th52; hence thesis by A1,FUNCT_1:41; end; theorem for f being Permutation of X holds (f")*f =id X & f*(f") = id X proof let f be Permutation of X; dom f = X & rng f = X by Def3,Th52; hence thesis by FUNCT_1:39; end; theorem Th62: for f being Permutation of X st P c= X holds f.:(f"P) = P & f"(f .:P) = P proof let f be Permutation of X such that A1: P c= X; dom f = X by Th52; then A2: P c= f"(f.:P) by A1,FUNCT_1:76; f"(f.:P) c= P & rng f = X by Def3,FUNCT_1:82; hence thesis by A1,A2,FUNCT_1:77,XBOOLE_0:def 10; end; reserve D for non empty set; registration let X,D,Z; let f be Function of X,D; let g be Function of D,Z; cluster g*f -> quasi_total for PartFunc of X,Z; coherence by Th13; end; definition let C be non empty set, D be set; let f be Function of C,D; let c be Element of C; redefine func f.c -> Element of D; coherence proof D is non empty or D is empty; hence thesis by Th5,SUBSET_1:def 1; end; end; scheme FuncExD{C, D() -> non empty set, P[set,set]}: ex f being Function of C(),D() st for x being Element of C() holds P[x,f.x] provided A1: for x being Element of C() ex y being Element of D() st P[x,y] proof defpred R[set,set] means $1 in C() & $2 in D() & P[ $1,$2]; A2: for x being set st x in C() ex y being set st y in D() & R[x,y] proof let x be set; assume A3: x in C(); then ex y being Element of D() st P[x,y] by A1; hence thesis by A3; end; consider f being Function of C(),D() such that A4: for x being set st x in C() holds R[x,f.x] from FuncEx1(A2); take f; let x be Element of C(); thus thesis by A4; end; scheme LambdaD{C, D() -> non empty set, F(Element of C()) -> Element of D()}: ex f being Function of C(),D() st for x being Element of C() holds f.x = F(x) proof defpred P[Element of C(),set] means $2 = F($1); A1: for x being Element of C() ex y being Element of D() st P[x,y]; thus ex f being Function of C(),D() st for x being Element of C() holds P[x, f.x] from FuncExD(A1); end; theorem Th63: for f1,f2 being Function of X,Y st for x being Element of X holds f1.x = f2.x holds f1 = f2 proof let f1,f2 be Function of X,Y; assume for x being Element of X holds f1.x = f2.x; then for x st x in X holds f1.x = f2.x; hence thesis by Th12; end; theorem Th64: for P being set for f being Function of X,Y for y holds y in f .:P implies ex x st x in X & x in P & y = f.x proof let P be set; let f be Function of X,Y; let y; assume y in f.:P; then consider x such that A1: x in dom f and A2: x in P & y = f.x by FUNCT_1:def 6; take x; thus x in X by A1; thus thesis by A2; end; theorem for f being Function of X,Y for y st y in f.:P ex c being Element of X st c in P & y = f.c proof let f be Function of X,Y; let y; assume y in f.:P; then consider x such that A1: x in X and A2: x in P & y = f.x by Th64; reconsider c = x as Element of X by A1; take c; thus thesis by A2; end; begin theorem Th66: for f being set st f in Funcs(X,Y) holds f is Function of X,Y proof let f be set; assume f in Funcs(X,Y); then ( not(Y = {} & X <> {}))& ex f9 being Function st f9 = f & dom f9 = X & rng f9 c= Y by Def2; hence thesis by Def1,RELSET_1:4; end; scheme Lambda1C{A, B() -> set, C[set], F(set)->set, G(set)->set}: ex f being Function of A(),B() st for x st x in A() holds (C[ x] implies f.x = F(x)) & ( not C[ x] implies f.x = G(x)) provided A1: for x st x in A() holds (C[ x] implies F(x) in B()) & (not C[ x] implies G(x) in B()) proof A2: now set x = the Element of A(); assume A3: B() = {}; assume A4: A() <> {}; then C[ x] implies F(x) in B() by A1; hence contradiction by A1,A3,A4; end; consider f being Function such that A5: dom f = A() and A6: for x st x in A() holds (C[ x] implies f.x = F(x)) & (not C[ x] implies f.x = G(x)) from PARTFUN1:sch 1; rng f c= B() proof let y; assume y in rng f; then consider x such that A7: x in dom f and A8: y = f.x by FUNCT_1:def 3; A9: not C[ x] implies f.x = G(x) by A5,A6,A7; C[ x] implies f.x = F(x) by A5,A6,A7; hence thesis by A1,A5,A7,A8,A9; end; then f is Function of A(),B() by A5,A2,Def1,RELSET_1:4; hence thesis by A6; end; theorem for f being PartFunc of X,Y st dom f = X holds f is Function of X,Y proof let f be PartFunc of X,Y; rng f c= Y; hence thesis by Th2; end; theorem for f being PartFunc of X,Y st f is total holds f is Function of X,Y; theorem for f being PartFunc of X,Y st (Y = {} implies X = {}) & f is Function of X,Y holds f is total; theorem for f being Function of X,Y st (Y = {} implies X = {}) holds <:f,X,Y:> is total; registration let X; let f be Function of X,X; cluster <:f,X,X:> -> total; coherence; end; theorem Th71: for f being PartFunc of X,Y st Y = {} implies X = {} ex g being Function of X,Y st for x st x in dom f holds g.x = f.x proof let f be PartFunc of X,Y such that A1: Y = {} implies X = {}; per cases; suppose Y = {}; then reconsider g = f as Function of X,Y by A1; take g; thus thesis; end; suppose A2: Y <> {}; deffunc F(set) = f.$1; defpred P[set] means $1 in dom f; set y = the Element of Y; deffunc G(set) = y; A3: for x st x in X holds (P[ x] implies F(x) in Y) & (not P[ x] implies G (x) in Y) by A2,PARTFUN1:4; consider g being Function of X,Y such that A4: for x st x in X holds (P[ x] implies g.x = F(x)) & (not P[ x] implies g.x = G(x)) from Lambda1C(A3); take g; thus thesis by A4; end; end; theorem Funcs(X,Y) c= PFuncs(X,Y) proof let x; assume x in Funcs(X,Y); then ex f being Function st x = f & dom f = X & rng f c= Y by Def2; hence thesis by PARTFUN1:def 3; end; theorem for f,g being Function of X,Y st (Y = {} implies X = {}) & f tolerates g holds f = g by PARTFUN1:66; theorem for f,g being Function of X,X st f tolerates g holds f = g by PARTFUN1:66; theorem Th75: for f being PartFunc of X,Y for g being Function of X,Y st Y = {} implies X = {} holds f tolerates g iff for x st x in dom f holds f.x = g.x proof let f be PartFunc of X,Y; let g be Function of X,Y; assume Y = {} implies X = {}; then dom g = X by Def1; hence thesis by PARTFUN1:53; end; theorem for f being PartFunc of X,X for g being Function of X,X holds f tolerates g iff for x st x in dom f holds f.x = g.x proof let f be PartFunc of X,X; let g be Function of X,X; X = {} implies X = {}; hence thesis by Th75; end; theorem Th77: for f being PartFunc of X,Y st Y = {} implies X = {} ex g being Function of X,Y st f tolerates g proof let f be PartFunc of X,Y; assume A1: Y = {} implies X = {}; then consider g being Function of X,Y such that A2: for x st x in dom f holds g.x = f.x by Th71; take g; thus thesis by A1,A2,Th75; end; theorem for f,g being PartFunc of X,X for h being Function of X,X st f tolerates h & g tolerates h holds f tolerates g by PARTFUN1:67; theorem for f,g being PartFunc of X,Y st (Y = {} implies X = {}) & f tolerates g ex h being Function of X,Y st f tolerates h & g tolerates h proof let f,g be PartFunc of X,Y; assume ( Y = {} implies X = {})& f tolerates g; then ex h being PartFunc of X,Y st h is total & f tolerates h & g tolerates h by PARTFUN1:68; hence thesis; end; theorem for f being PartFunc of X,Y for g being Function of X,Y st (Y = {} implies X = {}) & f tolerates g holds g in TotFuncs f by PARTFUN1:def 5; theorem for f being PartFunc of X,X for g being Function of X,X st f tolerates g holds g in TotFuncs f by PARTFUN1:def 5; theorem Th82: for f being PartFunc of X,Y for g being set st g in TotFuncs(f) holds g is Function of X,Y proof let f be PartFunc of X,Y; let g be set; assume g in TotFuncs(f); then ex g9 being PartFunc of X,Y st g9 = g & g9 is total & f tolerates g9 by PARTFUN1:def 5; hence thesis; end; theorem for f being PartFunc of X,Y holds TotFuncs f c= Funcs(X,Y) proof let f be PartFunc of X,Y; per cases; suppose Y = {} & X <> {}; hence thesis; end; suppose A1: Y <> {} or X = {}; let g be set; assume g in TotFuncs f; then g is Function of X,Y by Th82; hence thesis by A1,Th8; end; end; theorem TotFuncs <:{},X,Y:> = Funcs(X,Y) proof per cases; suppose A1: Y = {} & X <> {}; then TotFuncs <:{},X,Y:> = {}; hence thesis by A1; end; suppose A2: Y = {} implies X = {}; for g being set holds g in TotFuncs <:{},X,Y:> iff g in Funcs(X,Y) proof let g be set; thus g in TotFuncs <:{},X,Y:> implies g in Funcs(X,Y) proof assume g in TotFuncs <:{},X,Y:>; then g is Function of X,Y by Th82; hence thesis by A2,Th8; end; assume A3: g in Funcs(X,Y); then reconsider g9 = g as PartFunc of X,Y by Th66; A4: <:{},X,Y:> tolerates g9 by PARTFUN1:60; g is Function of X,Y by A3,Th66; hence thesis by A2,A4,PARTFUN1:def 5; end; hence thesis by TARSKI:1; end; end; theorem for f being Function of X,Y st Y = {} implies X = {} holds TotFuncs <:f,X,Y:> = {f} by PARTFUN1:72; theorem for f being Function of X,X holds TotFuncs <:f,X,X:> = {f} by PARTFUN1:72; theorem for f being PartFunc of X,{y} for g being Function of X,{y} holds TotFuncs f = {g} proof let f be PartFunc of X,{y}; let g be Function of X,{y}; for h being set holds h in TotFuncs f iff h = g proof let h be set; thus h in TotFuncs f implies h = g proof assume h in TotFuncs f; then h is Function of X,{y} by Th82; hence thesis by Th51; end; f tolerates g by PARTFUN1:61; hence thesis by PARTFUN1:def 5; end; hence thesis by TARSKI:def 1; end; theorem for f,g being PartFunc of X,Y st g c= f holds TotFuncs f c= TotFuncs g proof let f,g be PartFunc of X,Y such that A1: g c= f; let h be set; assume A2: h in TotFuncs f; then reconsider h9=h as PartFunc of X,Y by PARTFUN1:69; A3: h9 is total by A2,PARTFUN1:70; g tolerates h9 by A1,A2,PARTFUN1:58,71; hence thesis by A3,PARTFUN1:def 5; end; theorem Th89: for f,g being PartFunc of X,Y st dom g c= dom f & TotFuncs f c= TotFuncs g holds g c= f proof let f,g be PartFunc of X,Y such that A1: dom g c= dom f; now per cases; suppose Y = {} & X <> {}; hence thesis; end; suppose A2: Y = {} implies X = {}; thus TotFuncs f c= TotFuncs g implies g c= f proof assume A3: TotFuncs f c= TotFuncs g; for x st x in dom g holds g.x = f.x proof let x; consider h being Function of X,Y such that A4: f tolerates h by A2,Th77; h in TotFuncs f by A2,A4,PARTFUN1:def 5; then B5: g tolerates h by A3,PARTFUN1:71; assume x in dom g; then x in dom f /\ dom g by A1,XBOOLE_0:def 4; hence thesis by B5,PARTFUN1:def 4,A2,A4,PARTFUN1:67; end; hence thesis by A1,GRFUNC_1:2; end; end; end; hence thesis; end; theorem Th90: for f,g being PartFunc of X,Y st TotFuncs f c= TotFuncs g & ( for y holds Y <> {y}) holds g c= f proof let f,g be PartFunc of X,Y such that A1: TotFuncs f c= TotFuncs g and A2: for y holds Y <> {y}; now per cases; suppose Y = {}; hence dom g c= dom f; end; suppose A3: Y <> {}; thus dom g c= dom f proof deffunc F(set) = f.$1; defpred P[set] means $1 in dom f; let x such that A4: x in dom g and A5: not x in dom f; A6: Y <> {g.x} by A2; g.x in Y by A4,PARTFUN1:4; then consider y such that A7: y in Y and A8: y <> g.x by A6,ZFMISC_1:35; deffunc G(set) = y; A9: for x9 st x9 in X holds (P[ x9] implies F(x9) in Y) & (not P[ x9] implies G(x9) in Y) by A7,PARTFUN1:4; consider h being Function of X,Y such that A10: for x9 st x9 in X holds (P[ x9] implies h.x9 = F(x9)) & (not P[ x9] implies h.x9 = G(x9)) from Lambda1C(A9); f tolerates h proof let x9; assume x9 in dom f /\ dom h; then x9 in dom f by XBOOLE_0:def 4; hence thesis by A10; end; then B11: h in TotFuncs f by A3,PARTFUN1:def 5; x in X by A4; then x in dom h by A3,Def1; then A12: x in dom g /\ dom h by A4,XBOOLE_0:def 4; h.x = y by A4,A5,A10; hence contradiction by A8,B11,A12,PARTFUN1:def 4,A1,PARTFUN1:71; end; end; end; hence thesis by A1,Th89; end; theorem for f,g being PartFunc of X,Y st (for y holds Y <> {y}) & TotFuncs f = TotFuncs g holds f = g proof let f,g be PartFunc of X,Y; assume A1: for y holds Y <> {y}; assume TotFuncs f = TotFuncs g; then g c= f & f c= g by A1,Th90; hence thesis by XBOOLE_0:def 10; end; registration let A,B be non empty set; cluster -> non empty for Function of A,B; coherence by Def1,RELAT_1:38; end; begin scheme LambdaSep1{D, R() -> non empty set, A() -> Element of D(), B() -> Element of R(), F(set) -> Element of R()}: ex f being Function of D(),R() st f.A() = B() & for x being Element of D() st x <> A() holds f.x = F(x) proof defpred P[set,set] means ($1 = A() implies $2 = B()) & ($1 <> A() implies $2 = F($1)); A1: for x being Element of D() ex y being Element of R() st P[x,y] proof let x be Element of D(); x = A() implies thesis; hence thesis; end; consider f being Function of D(),R() such that A2: for x being Element of D() holds P[x,f.x] from FuncExD(A1); take f; thus thesis by A2; end; scheme LambdaSep2{D, R() -> non empty set, A1, A2() -> Element of D(), B1, B2() -> Element of R(), F(set) -> Element of R()}: ex f being Function of D(),R() st f. A1() = B1() & f.A2() = B2() & for x being Element of D() st x <> A1() & x <> A2 () holds f.x = F(x) provided A1: A1() <> A2() proof defpred P[set,set] means ($1 = A1() implies $2 = B1()) & ($1 = A2() implies $2 = B2()) & ($1 <> A1() & $1 <> A2() implies $2 = F($1)); A2: for x being Element of D() ex y being Element of R() st P[x,y] proof let x be Element of D(); A3: x = A2() implies thesis by A1; x = A1() implies thesis by A1; hence thesis by A3; end; consider f being Function of D(),R() such that A4: for x being Element of D() holds P[x,f.x] from FuncExD(A2); take f; thus thesis by A4; end; theorem for A,B being set for f being Function st f in Funcs(A,B) holds dom f = A & rng f c= B proof let A,B be set; let f be Function; assume f in Funcs(A,B); then ex g being Function st f = g & dom g = A & rng g c= B by Def2; hence thesis; end; scheme FunctRealEx{X()->non empty set,Y()->set,F(set)->set}: ex f being Function of X(),Y() st for x being Element of X() holds f.x = F(x) provided A1: for x being Element of X() holds F(x) in Y() proof defpred P[set,set] means $2 = F($1); A2: for x being set st x in X() ex y being set st y in Y() & P[x,y] by A1; ex f being Function of X(),Y() st for x being set st x in X() holds P[x, f.x] from FuncEx1(A2); then consider f being Function of X(),Y() such that A3: for x being set st x in X() holds f.x = F(x); for x being Element of X() holds f.x = F (x) by A3; hence thesis; end; scheme KappaMD{X, Y() -> non empty set, F(set) -> set}: ex f being Function of X(), Y() st for x being Element of X() holds f.x = F(x) provided A1: for x being Element of X() holds F(x) is Element of Y() proof A2: now let x be Element of X(); F(x) is Element of Y() by A1; hence F(x) in Y(); end; consider f being Function of X(), Y() such that A3: for x being Element of X() holds f.x = F(x) from FunctRealEx(A2); take f; thus thesis by A3; end; definition let A,B,C be non empty set; let f be Function of A, [:B,C:]; redefine func pr1 f -> Function of A,B means :Def5: for x being Element of A holds it.x = (f.x)`1; coherence proof A1: dom pr1 f = dom f by MCART_1:def 12; A2: rng pr1 f c= B proof let x be set; assume x in rng pr1 f; then consider y being set such that A3: y in dom pr1 f & x = (pr1 f).y by FUNCT_1:def 3; x = (f.y)`1 & f.y in [:B,C:] by A1,A3,Th5,MCART_1:def 12; hence thesis by MCART_1:10; end; dom pr1 f = A by A1,Def1; hence thesis by A2,Th2; end; compatibility proof let IT be Function of A,B; A4: dom pr1 f = dom f by MCART_1:def 12; then A5: dom pr1 f = A by Def1; hence IT = pr1 f implies for x being Element of A holds IT.x = (f.x)`1 by A4,MCART_1:def 12; assume for x being Element of A holds IT.x = (f.x)`1; then A6: for x being set st x in dom f holds IT.x = (f.x)`1; dom IT = dom f by A4,A5,Def1; hence thesis by A6,MCART_1:def 12; end; redefine func pr2 f -> Function of A,C means :Def6: for x being Element of A holds it .x = (f.x)`2; coherence proof A7: dom pr2 f = dom f by MCART_1:def 13; A8: rng pr2 f c= C proof let x be set; assume x in rng pr2 f; then consider y being set such that A9: y in dom pr2 f & x = (pr2 f).y by FUNCT_1:def 3; x = (f.y)`2 & f.y in [:B,C:] by A7,A9,Th5,MCART_1:def 13; hence thesis by MCART_1:10; end; dom pr2 f = A by A7,Def1; hence thesis by A8,Th2; end; compatibility proof let IT be Function of A,C; A10: dom pr2 f = dom f by MCART_1:def 13; then A11: dom pr2 f = A by Def1; hence IT = pr2 f implies for x being Element of A holds IT.x = (f.x)`2 by A10,MCART_1:def 13; assume for x being Element of A holds IT.x = (f.x)`2; then A12: for x being set st x in dom f holds IT.x = (f.x)`2; dom IT = dom f by A10,A11,Def1; hence thesis by A12,MCART_1:def 13; end; end; definition let A1 be set, B1 be non empty set, A2 be set, B2 be non empty set, f1 be Function of A1,B1, f2 be Function of A2,B2; redefine pred f1 = f2 means A1 = A2 & for a being Element of A1 holds f1.a = f2.a; compatibility proof A1: dom f1 = A1 by Def1; hence f1 = f2 implies A1 = A2 & for a being Element of A1 holds f1.a = f2.a by Def1; assume that A2: A1 = A2 and A3: for a being Element of A1 holds f1.a = f2.a; A4: dom f2 = A2 by Def1; for a being set st a in A1 holds f1.a = f2.a by A3; hence thesis by A1,A4,A2,FUNCT_1:2; end; end; definition let A,B be set, f1,f2 be Function of A,B; redefine pred f1 = f2 means for a being Element of A holds f1.a = f2.a; compatibility by Th63; end; theorem for N being set, f being Function of N, bool N ex R being Relation of N st for i being set st i in N holds Im(R,i) = f.i proof let N be set, f be Function of N, bool N; deffunc F(set) = f.$1; A1: for i being Element of N st i in [#]N holds F(i) c= [#]N proof let i be Element of N; assume i in [#]N; then f.i in bool N by Th5; hence thesis; end; consider R being Relation of [#]N such that A2: for i being Element of N st i in [#]N holds Im(R,i) = F(i) from RELSET_1:sch 3(A1); reconsider R as Relation of N; take R; thus thesis by A2; end; theorem Th94: for A being Subset of X holds (id X)"A = A proof let A be Subset of X; thus A = (id X)"((id X).:A) by Th62 .= (id X)"A by FUNCT_1:92; end; reserve A,B for non empty set; theorem for f being Function of A,B, A0 being Subset of A, B0 being Subset of B holds f.:A0 c= B0 iff A0 c= f"B0 proof let f be Function of A,B, A0 be Subset of A, B0 be Subset of B; thus f.:A0 c= B0 implies A0 c= f"B0 proof assume f.:A0 c= B0; then A1: f"(f.:A0) c= f"B0 by RELAT_1:143; A0 c= f"(f.:A0) by Th42; hence thesis by A1,XBOOLE_1:1; end; thus A0 c= f"B0 implies f.:A0 c= B0 proof assume A0 c= f"B0; then A2: f.:A0 c= f.:f"B0 by RELAT_1:123; f.:f"B0 c= B0 by FUNCT_1:75; hence thesis by A2,XBOOLE_1:1; end; end; theorem for f being Function of A,B, A0 being non empty Subset of A, f0 being Function of A0,B st for c being Element of A st c in A0 holds f.c = f0.c holds f|A0 = f0 proof let f be Function of A,B, A0 be non empty Subset of A, f0 be Function of A0, B such that A1: for c being Element of A st c in A0 holds f.c = f0.c; reconsider g = f|A0 as Function of A0,B by Th32; for c being Element of A0 holds g.c = f0.c proof let c be Element of A0; thus g.c = f.c by FUNCT_1:49 .= f0.c by A1; end; hence thesis by Th63; end; theorem for f being Function, A0, C being set st C c= A0 holds f.:C = (f|A0).: C proof let f be Function, A0, C be set; assume A1: C c= A0; thus (f|A0).:C = (f*(id A0)).:C by RELAT_1:65 .= f.:((id A0).:C) by RELAT_1:126 .= f.:C by A1,FUNCT_1:92; end; theorem for f being Function, A0, D being set st f"D c= A0 holds f"D = (f|A0)" D proof let f be Function, A0, D be set; assume A1: f"D c= A0; thus (f|A0)"D = (f*(id A0))"D by RELAT_1:65 .= (id A0)"(f"D) by RELAT_1:146 .= f"D by A1,Th94; end; scheme MChoice{A()-> non empty set, B()-> non empty set, F(set) -> set}: ex t being Function of A(),B() st for a being Element of A() holds t.a in F(a) provided A1: for a being Element of A() holds B() meets F(a) proof defpred P[set,set] means $2 in F($1); A2: for e being set st e in A() ex u being set st u in B() & P[e,u] by A1,XBOOLE_0:3; consider t being Function such that A3: dom t = A() & rng t c= B() and A4: for e being set st e in A() holds P[e,t.e] from FUNCT_1:sch 5(A2); reconsider t as Function of A(),B() by A3,Def1,RELSET_1:4; take t; let a be Element of A(); thus thesis by A4; end; theorem Th99: for X, D be non empty set, p be Function of X,D, i be Element of X holds p/.i = p.i proof let X, D be non empty set, p be Function of X,D, i be Element of X; i in X; then i in dom p by Def1; hence thesis by PARTFUN1:def 6; end; registration let X, D be non empty set, p be Function of X,D, i be Element of X; identify p/.i with p.i; correctness by Th99; end; theorem for S,X being set, f being Function of S,X, A being Subset of X st X = {} implies S = {} holds (f"A)` = f"(A`) proof let S,X be set, f be Function of S,X, A be Subset of X such that A1: X = {} implies S = {}; A /\ A` = {} by XBOOLE_0:def 7,XBOOLE_1:79; then f"A /\ f"(A`) = f"({}X) by FUNCT_1:68 .= {}; then A2: f"A misses f"(A`) by XBOOLE_0:def 7; f"A \/ f"(A`) = f"(A \/ A`) by RELAT_1:140 .= f"[#]X by SUBSET_1:10 .= [#]S by A1,Th40; then (f"A)` /\ (f"(A`))` = ([#]S)` by XBOOLE_1:53 .= {}S by XBOOLE_1:37; then (f"A)` misses (f"(A`))` by XBOOLE_0:def 7; hence thesis by A2,SUBSET_1:25; end; theorem for X,Y,Z being set, D being non empty set, f being Function of X,D st Y c= X & f.:Y c= Z holds f|Y is Function of Y,Z proof let X,Y,Z be set, D be non empty set, f be Function of X,D; assume that A1: Y c= X and A2: f.:Y c= Z; dom f = X by Def1; then A3: dom(f|Y) = Y by A1,RELAT_1:62; A4: now assume Z = {}; then rng(f|Y) = {} by A2,RELAT_1:115; hence Y = {} by A3,RELAT_1:42; end; rng(f|Y) c= Z by A2,RELAT_1:115; hence thesis by A3,A4,Def1,RELSET_1:4; end; definition let T,S be non empty set; let f be Function of T,S; let G be Subset-Family of S; func f"G -> Subset-Family of T means :Def9: for A being Subset of T holds A in it iff ex B being Subset of S st B in G & A = f"B; existence proof defpred P[Subset of T] means ex B being Subset of S st B in G & $1 = f"B; ex R being Subset-Family of T st for A being Subset of T holds A in R iff P[A] from SUBSET_1:sch 3; hence thesis; end; uniqueness proof let R1,R2 be Subset-Family of T such that A1: for A being Subset of T holds A in R1 iff ex B being Subset of S st B in G & A = f"B and A2: for A being Subset of T holds A in R2 iff ex B being Subset of S st B in G & A = f"B; for x being set holds (x in R1 iff x in R2) proof let x be set; thus x in R1 implies x in R2 proof assume A3: x in R1; then reconsider x as Subset of T; ex B being Subset of S st B in G & x = f"B by A1,A3; hence thesis by A2; end; assume A4: x in R2; then reconsider x as Subset of T; ex B being Subset of S st B in G & x = f"B by A2,A4; hence thesis by A1; end; hence thesis by TARSKI:1; end; end; theorem for T,S being non empty set, f being Function of T,S, A,B being Subset-Family of S st A c= B holds f"A c= f"B proof let T,S be non empty set; let f be Function of T,S; let A,B be Subset-Family of S; assume A1: A c= B; let x be set; assume A2: x in f"A; then reconsider x as Subset of T; ex C being Subset of S st C in B & x = f"C proof consider C being Subset of S such that A3: C in A & x = f"C by A2,Def9; take C; thus thesis by A1,A3; end; hence thesis by Def9; end; definition let T,S be non empty set; let f be Function of T,S; let G be Subset-Family of T; func f.:G -> Subset-Family of S means :Def10: for A being Subset of S holds A in it iff ex B being Subset of T st B in G & A = f.:B; existence proof thus ex R being Subset-Family of S st for A being Subset of S holds A in R iff ex B being Subset of T st B in G & A = f.:B proof defpred P[Subset of S] means ex B being Subset of T st B in G & $1 = f.: B; ex R being Subset-Family of S st for A being Subset of S holds A in R iff P[A] from SUBSET_1:sch 3; hence thesis; end; end; uniqueness proof let R1,R2 be Subset-Family of S such that A1: for A being Subset of S holds A in R1 iff ex B being Subset of T st B in G & A = f.:B and A2: for A being Subset of S holds A in R2 iff ex B being Subset of T st B in G & A = f.:B; for x being set holds (x in R1 iff x in R2) proof let x be set; thus x in R1 implies x in R2 proof assume A3: x in R1; then reconsider x as Subset of S; ex B being Subset of T st B in G & x = f.:B by A1,A3; hence thesis by A2; end; assume A4: x in R2; then reconsider x as Subset of S; ex B being Subset of T st B in G & x = f.:B by A2,A4; hence thesis by A1; end; hence thesis by TARSKI:1; end; end; theorem for T,S being non empty set, f being Function of T,S, A,B being Subset-Family of T holds A c= B implies f.:A c= f.:B proof let T,S be non empty set; let f be Function of T,S; let A,B be Subset-Family of T; assume A1: A c= B; let x be set; assume A2: x in f.:A; then reconsider x as Subset of S; ex C being Subset of T st C in B & x = f.:C proof consider C being Subset of T such that A3: C in A & x = f.:C by A2,Def10; take C; thus thesis by A1,A3; end; hence thesis by Def10; end; theorem for T,S being non empty set, f being Function of T,S, B being Subset-Family of S, P being Subset of S st f.:(f"B) is Cover of P holds B is Cover of P proof let T,S be non empty set; let f be Function of T,S; let B be Subset-Family of S; let P be Subset of S; assume f.:(f"B) is Cover of P; then A1: P c= union (f.:(f"B)) by SETFAM_1:def 11; P c= union B proof let x be set; assume x in P; then consider Y being set such that A2: x in Y and A3: Y in f.:(f"(B)) by A1,TARSKI:def 4; ex Z being set st x in Z & Z in B proof reconsider Y as Subset of S by A3; consider Y1 being Subset of T such that A4: Y1 in f"(B) and A5: Y = f.:Y1 by A3,Def10; consider Y2 being Subset of S such that A6: Y2 in B & Y1 = f"(Y2) by A4,Def9; A7: f.:(f"Y2) c= Y2 by FUNCT_1:75; reconsider Y2 as set; take Y2; thus thesis by A2,A5,A6,A7; end; hence thesis by TARSKI:def 4; end; hence thesis by SETFAM_1:def 11; end; theorem for T,S being non empty set, f being Function of T,S, B being Subset-Family of T, P being Subset of T st B is Cover of P holds f"(f.:B) is Cover of P proof let T,S be non empty set; let f be Function of T,S; let B be Subset-Family of T; let P be Subset of T; assume B is Cover of P; then A1: P c= union B by SETFAM_1:def 11; P c= union(f"(f.:B)) proof let x be set; assume x in P; then consider Y being set such that A2: x in Y and A3: Y in B by A1,TARSKI:def 4; ex Z being set st x in Z & Z in f"(f.:B) proof reconsider Y as Subset of T by A3; set Z = f"(f.:Y); take Z; dom f = T by Def1; then A4: Y c= f"(f.:Y) by FUNCT_1:76; f.:Y in f.:B by A3,Def10; hence thesis by A2,A4,Def9; end; hence thesis by TARSKI:def 4; end; hence thesis by SETFAM_1:def 11; end; theorem for T,S being non empty set, f being Function of T,S, Q being Subset-Family of S holds union(f.:(f"(Q))) c= union Q proof let T,S be non empty set; let f be Function of T,S; let Q be Subset-Family of S; let x be set; thus x in union(f.:(f"(Q))) implies x in union Q proof assume x in union(f.:(f"Q)); then consider A being set such that A1: x in A and A2: A in f.:(f"Q) by TARSKI:def 4; reconsider A as Subset of S by A2; consider A1 being Subset of T such that A3: A1 in f"Q and A4: A = f.:A1 by A2,Def10; consider A2 being Subset of S such that A5: A2 in Q & A1 = f"A2 by A3,Def9; f.:(f"A2) c= A2 by FUNCT_1:75; hence thesis by A1,A4,A5,TARSKI:def 4; end; end; theorem for T,S being non empty set, f being Function of T,S, P being Subset-Family of T holds union P c= union(f"(f.:P)) proof let T,S be non empty set; let f be Function of T,S; let P be Subset-Family of T; let x be set; assume x in union P; then consider A being set such that A1: x in A and A2: A in P by TARSKI:def 4; A3: A c= T by A2; reconsider A as Subset of T by A2; reconsider A1 = f.:A as Subset of S; reconsider A2 = f"A1 as Subset of T; A c= dom f by A3,Def1; then A4: A c= A2 by FUNCT_1:76; A1 in f.:P by A2,Def10; then A2 in f"(f.:P) by Def9; hence thesis by A1,A4,TARSKI:def 4; end; definition let X,Z be set, Y be non empty set; let f be Function of X,Y; let p be Z-valued Function; assume A1: rng f c= dom p; func p/*f -> Function of X,Z equals :Def11: p*f; coherence proof dom f = X by Def1; then A2: dom(p*f) = X by A1,RELAT_1:27; then A3: p*f is total by PARTFUN1:def 2; rng(p*f) c= Z; hence thesis by A3,A2,RELSET_1:4; end; end; reserve Y for non empty set, f for Function of X,Y, p for PartFunc of Y,Z, x for Element of X; theorem Th108: X <> {} & rng f c= dom p implies (p/*f).x = p.(f.x) proof assume that A1: X <> {} and A2: rng f c= dom p; p/*f = p*f by A2,Def11; hence thesis by A1,Th15; end; theorem Th109: X <> {} & rng f c= dom p implies (p/*f).x = p/.(f.x) proof assume that A1: X <> {} and A2: rng f c= dom p; A3: f.x in rng f by A1,Th4; thus (p/*f).x = p.(f.x) by A1,A2,Th108 .= p/.(f.x) by A2,A3,PARTFUN1:def 6; end; reserve g for Function of X,X; theorem rng f c= dom p implies (p/*f)*g = p/*(f*g) proof A1: rng(f*g) c= rng f by RELAT_1:26; assume A2: rng f c= dom p; hence (p/*f)*g = p*f*g by Def11 .= p*(f*g) by RELAT_1:36 .= p /* (f*g) by A2,A1,Def11,XBOOLE_1:1; end; theorem for X,Y being non empty set, f being Function of X,Y holds f is constant iff ex y being Element of Y st rng f = {y} proof let X,Y be non empty set; let f be Function of X,Y; hereby consider x be set such that A1: x in dom f by XBOOLE_0:def 1; set y = f.x; reconsider y as Element of Y by A1,Th5; assume A2: f is constant; take y; for y9 being set holds y9 in rng f iff y9 = y proof let y9 be set; hereby assume y9 in rng f; then ex x9 be set st x9 in dom f & y9 = f.x9 by FUNCT_1:def 3; hence y9 = y by A2,A1,FUNCT_1:def 10; end; assume y9 = y; hence thesis by A1,Th4; end; hence rng f = {y} by TARSKI:def 1; end; given y be Element of Y such that A3: rng f = {y}; let x,x9 be set; assume x in dom f; then A4: f.x in rng f by Th4; assume x9 in dom f; then A5: f.x9 in rng f by Th4; thus f.x = y by A3,A4,TARSKI:def 1 .= f.x9 by A3,A5,TARSKI:def 1; end; theorem for A,B being non empty set, x being Element of A, f being Function of A,B holds f.x in rng f proof let A,B be non empty set, x be Element of A, f be Function of A,B; dom f = A by Def1; hence thesis by FUNCT_1:def 3; end; theorem Th113: for A,B being set, f being Function of A,B st y in rng f ex x being Element of A st y = f.x proof let A,B be set, f be Function of A,B; assume y in rng f; then consider x being set such that A1: x in A and A2: f.x = y by Th11; reconsider x as Element of A by A1; take x; thus thesis by A2; end; theorem for A,B being non empty set, f being Function of A,B st for x being Element of A holds f.x in Z holds rng f c= Z proof let A,B be non empty set, f be Function of A,B such that A1: for x being Element of A holds f.x in Z; let y; assume y in rng f; then ex x being Element of A st f.x=y by Th113; hence thesis by A1; end; reserve X,Y for non empty set, Z,S,T for set, f for Function of X,Y, g for PartFunc of Y,Z, x for Element of X; theorem g is total implies (g/*f).x = g.(f.x) proof assume g is total; then dom g = Y by PARTFUN1:def 2; then rng f c= dom g; hence thesis by Th108; end; theorem g is total implies (g/*f).x = g/.(f.x) proof assume g is total; then dom g = Y by PARTFUN1:def 2; then rng f c= dom g; hence thesis by Th109; end; theorem Th117: rng f c= dom (g|S) implies (g|S)/*f = g/*f proof assume A1: rng f c= dom (g|S); let x be Element of X; A2: dom (g|S) c= dom g by RELAT_1:60; A3: f.x in rng f by Th4; thus ((g|S)/*f).x = (g|S).(f.x) by A1,Th108 .= g.(f.x) by A1,A3,FUNCT_1:47 .= (g/*f).x by A1,A2,Th108,XBOOLE_1:1; end; theorem rng f c= dom (g|S) & S c= T implies (g|S)/*f = (g|T)/*f proof assume A1: rng f c= dom (g|S); assume S c= T; then g|S c= g|T by RELAT_1:75; then A2: dom (g|S) c= dom (g|T) by RELAT_1:11; thus (g|S)/*f = g/*f by A1,Th117 .= (g|T)/*f by A1,A2,Th117,XBOOLE_1:1; end; theorem for H being Function of D, [:A,B:], d being Element of D holds H.d = [ pr1 H.d,pr2 H.d] proof let H be Function of D, [:A,B:], d be Element of D; thus H.d = [(H.d)`1,(H.d)`2] by MCART_1:21 .= [(H.d)`1,pr2 H.d] by Def6 .= [pr1 H.d,pr2 H.d] by Def5; end; theorem for A1,A2, B1,B2 being set for f being Function of A1,A2, g being Function of B1,B2 st f tolerates g holds f /\ g is Function of A1 /\ B1, A2 /\ B2 proof let A1,A2, B1,B2 be set; let f be Function of A1,A2, g be Function of B1,B2 such that A1: f tolerates g; A2: dom (f/\g) c= dom f /\ dom g & dom f /\ dom g c= A1/\B1 by RELAT_1:2 ,XBOOLE_1:27; A3: now set a = the Element of A1 /\ B1; assume that A4: dom f = A1 and A1 <> {} and A5: dom g = B1 and B1 <> {}; hereby assume A6: A1 /\ B1 <> {}; then a in A1 by XBOOLE_0:def 4; then A7: f.a in rng f by A4,FUNCT_1:def 3; f.a = g.a & a in B1 by A1,A4,A5,A6,PARTFUN1:def 4,XBOOLE_0:def 4; then f.a in rng g by A5,FUNCT_1:def 3; hence A2 /\ B2 <> {} by A7,XBOOLE_0:def 4; end; thus dom (f /\ g) = A1 /\ B1 proof thus dom (f /\ g) c= A1 /\ B1 by A2,XBOOLE_1:1; let a be set; assume A8: a in A1 /\ B1; then a in A1 by XBOOLE_0:def 4; then A9: [a,f.a] in f by A4,FUNCT_1:def 2; f.a = g.a & a in B1 by A1,A4,A5,A8,PARTFUN1:def 4,XBOOLE_0:def 4; then [a,f.a] in g by A5,FUNCT_1:def 2; then [a,f.a] in f /\ g by A9,XBOOLE_0:def 4; hence thesis by XTUPLE_0:def 12; end; end; rng (f/\g) c= rng f /\ rng g & rng f /\ rng g c= A2/\B2 by RELAT_1:13 ,XBOOLE_1:27; then A10: rng (f/\g) c= A2/\B2 by XBOOLE_1:1; A11: A2 = {} or A2 <> {}; A12: B2 = {} or B2 <> {}; A13: now per cases; case A2 /\ B2 <> {}; hence dom (f /\ g) = A1 /\ B1 by A12,A3,Def1,A11; end; case A1 /\ B1 = {}; hence dom (f /\ g) = A1 /\ B1 by A2; end; case A2 /\ B2 = {} & A1 /\ B1 <> {}; hence f /\ g = {} by A12,A3,Def1,A11; end; end; dom (f/\g) c= A1/\B1 by A2,XBOOLE_1:1; hence thesis by A10,A13,Def1,RELSET_1:4; end; registration let A, B be set; cluster Funcs(A,B) -> functional; coherence proof let x be set; assume x in Funcs(A,B); then ex f being Function st x = f & dom f = A & rng f c= B by Def2; hence thesis; end; end; definition let A, B be set; mode FUNCTION_DOMAIN of A,B -> non empty set means :Def12: for x being Element of it holds x is Function of A,B; existence proof take IT = {the Function of A,B}; let g be Element of IT; thus thesis by TARSKI:def 1; end; end; registration let A, B be set; cluster -> functional for FUNCTION_DOMAIN of A,B; coherence proof let F be FUNCTION_DOMAIN of A,B; thus for x being set st x in F holds x is Function by Def12; end; end; theorem for f being Function of P,Q holds { f } is FUNCTION_DOMAIN of P,Q proof let f be Function of P,Q; for g be Element of { f } holds g is Function of P,Q by TARSKI:def 1; hence thesis by Def12; end; theorem Th122: Funcs(P,B) is FUNCTION_DOMAIN of P,B proof for f be Element of Funcs(P,B) holds f is Function of P,B by Th66; hence thesis by Def12; end; definition let A be set, B be non empty set; redefine func Funcs(A,B) -> FUNCTION_DOMAIN of A,B; coherence by Th122; let F be FUNCTION_DOMAIN of A,B; redefine mode Element of F -> Function of A,B; coherence by Def12; end; registration let I be set; cluster id I -> total for I-defined Function; coherence; end; definition let X,A; let F be Function of X,A; let x be set; assume A1: x in X; redefine func F/.x equals F.x; compatibility proof let a be Element of A; x in dom F by A1,Def1; hence thesis by PARTFUN1:def 6; end; end; theorem for f being Function of X, X, g being X-valued Function holds dom(f*g) = dom g proof let f be Function of X, X; let g be X-valued Function; dom f = X by Def1; then rng g c= dom f; hence thesis by RELAT_1:27; end; theorem for X being non empty set, f being Function of X,X st for x being Element of X holds f.x = x holds f = id X proof let X be non empty set, f be Function of X,X; assume A1: for x being Element of X holds f.x = x; let x be Element of X; x = (id X).x by FUNCT_1:18; hence thesis by A1; end; definition let O,E be set; mode Action of O,E is Function of O, Funcs(E,E); end; theorem for x being set, A being set for f,g being Function of {x}, A st f.x = g.x holds f = g proof let x be set, A be set; let f,g be Function of {x}, A such that A1: f.x = g.x; now let y be set; assume y in {x}; then y = x by TARSKI:def 1; hence f.y = g.y by A1; end; hence thesis by Th12; end; begin definition let f be Function; let a,b be set; func f.(a,b) -> set equals f.[a,b]; correctness; end; reserve A for set; definition let A,B be non empty set, C be set, f be Function of [:A,B:],C; let a be Element of A; let b be Element of B; redefine func f.(a,b) -> Element of C; coherence proof reconsider ab = [a,b] as Element of [:A,B:] by ZFMISC_1:def 2; f.ab is Element of C; hence thesis; end; end; reserve X,Y,Z,x,x1,x2,y,y1,y2,z,z1,z2 for set; theorem Th1: for X,Y,Z being set for f1,f2 being Function of [:X,Y:],Z st for x,y being set st x in X & y in Y holds f1.(x,y) = f2.(x,y) holds f1 = f2 proof let X,Y,Z be set; let f1,f2 be Function of [:X,Y:],Z such that A1: for x,y being set st x in X & y in Y holds f1.(x,y) = f2.(x,y); for z being set st z in [:X,Y:] holds f1.z = f2.z proof let z be set; assume z in [:X,Y:]; then consider x,y being set such that A2: x in X & y in Y and A3: z = [x,y] by ZFMISC_1:def 2; f1.(x,y) = f1.z & f2.(x,y) = f2.z by A3; hence thesis by A1,A2; end; hence thesis by FUNCT_2:12; end; theorem for f1,f2 being Function of [:X,Y:],Z st for a being Element of X for b being Element of Y holds f1.(a,b) = f2.(a,b) holds f1 = f2 proof let f1,f2 be Function of [:X,Y:],Z; assume for a being Element of X for b being Element of Y holds f1.(a,b) = f2.(a,b); then for x,y being set st x in X & y in Y holds f1.(x,y) = f2.(x,y); hence thesis by Th1; end; definition let A be set; mode UnOp of A is Function of A,A; mode BinOp of A is Function of [:A,A:],A; end; definition let A be set, f be BinOp of A; let a,b be Element of A; redefine func f.(a,b) -> Element of A; coherence proof per cases; suppose A <> {}; then reconsider A as non empty set; reconsider f as BinOp of A; reconsider ab = [a,b] as Element of [:A,A:] by ZFMISC_1:def 2; f.ab is Element of A; hence thesis; end; suppose A1: A = {}; then not [a,b] in dom f; then f.(a,b) = {} by FUNCT_1:def 2; hence thesis by A1,SUBSET_1:def 1; end; end; end; reserve u for UnOp of A, o,o9 for BinOp of A, a,b,c,e,e1,e2 for Element of A; scheme FuncEx2{X, Y, Z() -> set, P[set,set,set]}: ex f being Function of [:X(),Y() :],Z() st for x,y st x in X() & y in Y() holds P[x,y,f.(x,y)] provided A1: for x,y st x in X() & y in Y() ex z st z in Z() & P[x,y,z] proof defpred R[set,set] means for x1,y1 st $1 = [x1,y1] holds P[x1,y1,$2]; A2: for x st x in [:X(),Y():] ex z st z in Z() & R[x,z] proof let x; assume x in [:X(),Y():]; then consider x1,y1 such that A3: x1 in X() & y1 in Y() and A4: x = [x1,y1] by ZFMISC_1:def 2; consider z such that A5: z in Z() and A6: P[x1,y1,z] by A1,A3; take z; thus z in Z() by A5; let x2,y2; assume A7: x = [x2,y2]; then x1 = x2 by A4,XTUPLE_0:1; hence thesis by A4,A6,A7,XTUPLE_0:1; end; consider f being Function of [:X(),Y():],Z() such that A8: for x st x in [:X(),Y():] holds R[x,f.x] from FUNCT_2:sch 1(A2); take f; let x,y; assume x in X() & y in Y(); then [x,y] in [:X(),Y():] by ZFMISC_1:def 2; hence thesis by A8; end; scheme Lambda2{X, Y, Z() -> set, F(set,set)->set}: ex f being Function of [:X(),Y() :],Z() st for x,y st x in X() & y in Y() holds f.(x,y) = F(x,y) provided A1: for x,y st x in X() & y in Y() holds F(x,y) in Z() proof defpred P[set,set,set] means $3 = F($1,$2); A2: for x,y st x in X() & y in Y() ex z st z in Z() & P[x,y,z] by A1; thus ex f being Function of [:X(),Y():],Z() st for x,y st x in X() & y in Y( ) holds P[x,y,f.(x,y)] from FuncEx2(A2); end; scheme FuncEx2D{X, Y, Z() -> non empty set, P[set,set,set]}: ex f being Function of [:X(),Y():],Z() st for x being Element of X() for y being Element of Y() holds P[x,y,f.(x,y)] provided A1: for x being Element of X() for y being Element of Y() ex z being Element of Z() st P[x,y,z] proof defpred R[set,set] means for x being (Element of X()),y being Element of Y() st $1 = [x,y] holds P[x,y,$2]; A2: for p being Element of [:X(),Y():] ex z being Element of Z() st R[p,z] proof let p be Element of [:X(),Y():]; consider x1,y1 such that A3: x1 in X() and A4: y1 in Y() and A5: p = [x1,y1] by ZFMISC_1:def 2; reconsider y1 as Element of Y() by A4; reconsider x1 as Element of X() by A3; consider z being Element of Z() such that A6: P[x1,y1,z] by A1; take z; let x be Element of X(),y be Element of Y(); assume A7: p = [x,y]; then x1 = x by A5,XTUPLE_0:1; hence thesis by A5,A6,A7,XTUPLE_0:1; end; consider f being Function of [:X(),Y():],Z() such that A8: for p being Element of [:X(),Y():] holds R[p,f.p] from FUNCT_2:sch 3 (A2); take f; let x be Element of X(); let y be Element of Y(); reconsider xy = [x,y] as Element of [:X(),Y():] by ZFMISC_1:def 2; P[x,y,f.xy] by A8; hence thesis; end; scheme Lambda2D{X, Y, Z() -> non empty set, F(Element of X(),Element of Y()) -> Element of Z()}: ex f being Function of [:X(),Y():],Z() st for x being Element of X() for y being Element of Y() holds f.(x,y)=F(x,y) proof defpred P[Element of X(),Element of Y(),set] means $3 = F($1,$2); A1: for x being Element of X() for y being Element of Y() ex z being Element of Z() st P[x,y,z]; thus ex f being Function of [:X(),Y():],Z() st for x being Element of X() for y being Element of Y() holds P[x,y,f.(x,y)] from FuncEx2D(A1); end; definition let A,o; attr o is commutative means :Def2: for a,b holds o.(a,b) = o.(b,a); attr o is associative means for a,b,c holds o.(a,o.(b,c)) = o.(o.(a,b ),c); attr o is idempotent means for a holds o.(a,a) = a; end; registration cluster -> empty associative commutative for BinOp of {}; coherence proof let f be BinOp of {}; thus f is empty; A1: f c= [:dom f, rng f:]; hereby let a,b,c be Element of {}; thus f.(a,f.(b,c)) = {} by A1,FUNCT_1:def 2 .= f.(f.(a,b),c) by A1,FUNCT_1:def 2; end; let a,b be Element of {}; thus f.(a,b) = {} by A1,FUNCT_1:def 2 .= f.(b,a) by A1,FUNCT_1:def 2; end; end; definition let A,e,o; pred e is_a_left_unity_wrt o means :Def5: for a holds o.(e,a) = a; pred e is_a_right_unity_wrt o means :Def6: for a holds o.(a,e) = a; end; definition let A,e,o; pred e is_a_unity_wrt o means e is_a_left_unity_wrt o & e is_a_right_unity_wrt o; end; theorem Th3: e is_a_unity_wrt o iff for a holds o.(e,a) = a & o.(a,e) = a proof thus e is_a_unity_wrt o implies for a holds o.(e,a) = a & o.(a,e) = a proof assume e is_a_left_unity_wrt o & e is_a_right_unity_wrt o; hence thesis by Def5,Def6; end; assume for a holds o.(e,a) = a & o.(a,e) = a; hence (for a holds o.(e,a) = a) & for a holds o.(a,e) = a; end; theorem Th4: o is commutative implies (e is_a_unity_wrt o iff for a holds o.( e,a) = a) proof assume A1: o is commutative; now thus (for a holds o.(e,a) = a & o.(a,e) = a) implies for a holds o.(e,a) = a; assume A2: for a holds o.(e,a) = a; let a; thus o.(e,a) = a by A2; thus o.(a,e) = o.(e,a) by A1,Def2 .= a by A2; end; hence thesis by Th3; end; theorem Th5: o is commutative implies (e is_a_unity_wrt o iff for a holds o.( a,e) = a) proof assume A1: o is commutative; now thus (for a holds o.(e,a) = a & o.(a,e) = a) implies for a holds o.(a,e) = a; assume A2: for a holds o.(a,e) = a; let a; thus o.(e,a) = o.(a,e) by A1,Def2 .= a by A2; thus o.(a,e) = a by A2; end; hence thesis by Th3; end; theorem Th6: o is commutative implies (e is_a_unity_wrt o iff e is_a_left_unity_wrt o) proof e is_a_left_unity_wrt o iff for a holds o.(e,a) = a by Def5; hence thesis by Th4; end; theorem Th7: o is commutative implies (e is_a_unity_wrt o iff e is_a_right_unity_wrt o) proof e is_a_right_unity_wrt o iff for a holds o.(a,e) = a by Def6; hence thesis by Th5; end; theorem o is commutative implies (e is_a_left_unity_wrt o iff e is_a_right_unity_wrt o) proof assume A1: o is commutative; then e is_a_unity_wrt o iff e is_a_left_unity_wrt o by Th6; hence thesis by A1,Th7; end; theorem Th9: e1 is_a_left_unity_wrt o & e2 is_a_right_unity_wrt o implies e1 = e2 proof assume that A1: e1 is_a_left_unity_wrt o and A2: e2 is_a_right_unity_wrt o; thus e1 = o.(e1,e2) by A2,Def6 .= e2 by A1,Def5; end; theorem Th10: e1 is_a_unity_wrt o & e2 is_a_unity_wrt o implies e1 = e2 proof assume that e1 is_a_left_unity_wrt o and A1: e1 is_a_right_unity_wrt o & e2 is_a_left_unity_wrt o and e2 is_a_right_unity_wrt o; thus thesis by A1,Th9; end; definition let A,o; assume A1: ex e st e is_a_unity_wrt o; func the_unity_wrt o -> Element of A means it is_a_unity_wrt o; existence by A1; uniqueness by Th10; end; definition let A,o9,o; pred o9 is_left_distributive_wrt o means :Def9: for a,b,c holds o9.(a,o.(b,c )) = o.(o9.(a,b),o9.(a,c)); pred o9 is_right_distributive_wrt o means :Def10: for a,b,c holds o9.(o.(a,b ),c) = o.(o9.(a,c),o9.(b,c)); end; definition let A,o9,o; pred o9 is_distributive_wrt o means o9 is_left_distributive_wrt o & o9 is_right_distributive_wrt o; end; theorem Th11: o9 is_distributive_wrt o iff for a,b,c holds o9.(a,o.(b,c)) = o. (o9.(a,b),o9.(a,c)) & o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c)) proof thus o9 is_distributive_wrt o implies for a,b,c holds o9.(a,o.(b,c)) = o.(o9 .(a,b),o9.(a,c)) & o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c)) proof assume o9 is_left_distributive_wrt o & o9 is_right_distributive_wrt o; hence thesis by Def9,Def10; end; assume for a,b,c holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(a,c)) & o9.(o.(a,b) ,c) = o.(o9.(a,c),o9.(b,c)); hence (for a,b,c holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(a,c))) & for a,b,c holds o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c)); end; theorem Th12: for A being non empty set, o,o9 being BinOp of A holds o9 is commutative implies (o9 is_distributive_wrt o iff for a,b,c being Element of A holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(a,c))) proof let A be non empty set, o,o9 be BinOp of A; assume A1: o9 is commutative; (for a,b,c being Element of A holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(a,c )) & o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c))) iff for a,b,c being Element of A holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(a,c)) proof thus (for a,b,c being Element of A holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.( a,c)) & o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c))) implies for a,b,c being Element of A holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(a,c)); assume A2: for a,b,c being Element of A holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9 .(a,c)); let a,b,c be Element of A; thus o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(a,c)) by A2; thus o9.(o.(a,b),c) = o9.(c,o.(a,b)) by A1,Def2 .= o.(o9.(c,a),o9.(c,b)) by A2 .= o.(o9.(a,c),o9.(c,b)) by A1,Def2 .= o.(o9.(a,c),o9.(b,c)) by A1,Def2; end; hence thesis by Th11; end; theorem Th13: for A being non empty set, o,o9 being BinOp of A holds o9 is commutative implies (o9 is_distributive_wrt o iff for a,b,c being Element of A holds o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c))) proof let A be non empty set, o,o9 be BinOp of A; assume A1: o9 is commutative; (for a,b,c being Element of A holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(a,c )) & o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c))) iff for a,b,c being Element of A holds o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c)) proof thus (for a,b,c being Element of A holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.( a,c)) & o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c))) implies for a,b,c being Element of A holds o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c)); assume A2: for a,b,c being Element of A holds o9.(o.(a,b),c) = o.(o9.(a,c),o9 .(b,c)); let a,b,c be Element of A; thus o9.(a,o.(b,c)) = o9.(o.(b,c),a) by A1,Def2 .= o.(o9.(b,a),o9.(c,a)) by A2 .= o.(o9.(a,b),o9.(c,a)) by A1,Def2 .= o.(o9.(a,b),o9.(a,c)) by A1,Def2; thus thesis by A2; end; hence thesis by Th11; end; theorem Th14: for A being non empty set, o,o9 being BinOp of A holds o9 is commutative implies (o9 is_distributive_wrt o iff o9 is_left_distributive_wrt o ) proof let A be non empty set, o,o9 be BinOp of A; o9 is_left_distributive_wrt o iff for a,b,c being Element of A holds o9. (a,o.(b,c)) = o.(o9.(a,b),o9.(a,c)) by Def9; hence thesis by Th12; end; theorem Th15: for A being non empty set, o,o9 being BinOp of A holds o9 is commutative implies (o9 is_distributive_wrt o iff o9 is_right_distributive_wrt o) proof let A be non empty set, o,o9 be BinOp of A; o9 is_right_distributive_wrt o iff for a,b,c being Element of A holds o9 .(o.(a,b),c) = o.(o9.(a,c),o9.(b,c)) by Def10; hence thesis by Th13; end; theorem for A being non empty set, o,o9 being BinOp of A holds o9 is commutative implies (o9 is_right_distributive_wrt o iff o9 is_left_distributive_wrt o) proof let A be non empty set, o,o9 be BinOp of A; assume A1: o9 is commutative; then o9 is_distributive_wrt o iff o9 is_left_distributive_wrt o by Th14; hence thesis by A1,Th15; end; definition let A,u,o; pred u is_distributive_wrt o means :Def12: for a,b holds u.(o.(a,b)) = o.((u .a),(u.b)); end; definition canceled 3; let A be non empty set, e be Element of A, o be BinOp of A; redefine pred e is_a_left_unity_wrt o means for a being Element of A holds o .(e,a) = a; correctness by Def5; redefine pred e is_a_right_unity_wrt o means for a being Element of A holds o.(a,e) = a; correctness by Def6; end; definition let A be non empty set, o9,o be BinOp of A; redefine pred o9 is_left_distributive_wrt o means for a,b,c being Element of A holds o9.(a,o.(b,c)) = o.(o9.(a,b),o9.(a,c)); correctness by Def9; redefine pred o9 is_right_distributive_wrt o means for a,b,c being Element of A holds o9.(o.(a,b),c) = o.(o9.(a,c),o9.(b,c)); correctness by Def10; end; definition let A be non empty set, u be UnOp of A, o be BinOp of A; redefine pred u is_distributive_wrt o means for a,b being Element of A holds u.(o.(a,b)) = o.((u.a),(u.b)); correctness by Def12; end; theorem for f being Function of [:X,Y:],Z st x in X & y in Y & Z <> {} holds f .(x,y) in Z proof let f be Function of [:X,Y:],Z; assume x in X & y in Y; then [x,y] in [:X,Y:] by ZFMISC_1:87; hence thesis by FUNCT_2:5; end; theorem for x, y, X, Y, Z being set, f being Function of [:X,Y:],Z, g being Function st Z <> {} & x in X & y in Y holds (g*f).(x,y) = g.(f.(x,y)) proof let x, y, X, Y, Z be set, f be Function of [:X,Y:],Z, g be Function such that A1: Z <> {}; assume x in X & y in Y; then [x,y] in [:X,Y:] by ZFMISC_1:87; hence thesis by A1,FUNCT_2:15; end; theorem for f being Function st dom f = [:X,Y:] holds f is constant iff for x1 ,x2,y1,y2 st x1 in X & x2 in X & y1 in Y & y2 in Y holds f.(x1,y1)=f.(x2,y2) proof let f be Function such that A1: dom f = [:X,Y:]; hereby assume A2: f is constant; let x1,x2,y1,y2; assume x1 in X & x2 in X & y1 in Y & y2 in Y; then [x1,y1] in [:X,Y:] & [x2,y2] in [:X,Y:] by ZFMISC_1:87; hence f.(x1,y1)=f.(x2,y2) by A1,A2,FUNCT_1:def 10; end; assume A3: for x1,x2,y1,y2 st x1 in X & x2 in X & y1 in Y & y2 in Y holds f.(x1 ,y1)=f.(x2,y2); let x,y; assume x in dom f; then consider x1,y1 such that A4: x1 in X & y1 in Y and A5: x = [x1,y1] by A1,ZFMISC_1:84; assume y in dom f; then consider x2,y2 such that A6: x2 in X & y2 in Y and A7: y = [x2,y2] by A1,ZFMISC_1:84; thus f.x = f.(x1,y1) by A5 .= f.(x2,y2) by A3,A4,A6 .= f.y by A7; end; theorem for f1,f2 being PartFunc of [:X,Y:],Z st dom f1 = dom f2 & for x,y st [x,y] in dom f1 holds f1.(x,y)=f2.(x,y) holds f1 = f2 proof let f1,f2 be PartFunc of [:X,Y:],Z such that A1: dom f1 = dom f2 and A2: for x,y st [x,y] in dom f1 holds f1.(x,y) = f2.(x,y); z in dom f1 implies f1.z = f2.z proof assume A3: z in dom f1; then consider x,y such that A4: z = [x,y] by RELAT_1:def 1; f1.(x,y) = f2.(x,y) by A2,A3,A4; hence thesis by A4; end; hence thesis by A1,FUNCT_1:2; end; scheme PartFuncEx2{X,Y,Z()->set,P[set,set,set]}: ex f being PartFunc of [:X(),Y():] ,Z() st (for x,y holds [x,y] in dom f iff x in X() & y in Y() & ex z st P[x,y,z ]) & for x,y st [x,y] in dom f holds P[x,y,f.(x,y)] provided A1: for x,y,z st x in X() & y in Y() & P[x,y,z] holds z in Z() and A2: for x,y,z1,z2 st x in X() & y in Y() & P[x,y,z1] & P[x,y,z2] holds z1 = z2 proof defpred Q[set,set] means for x1,y1 st $1 = [x1,y1] holds P[x1,y1,$2]; A3: for x,z st x in [:X(),Y():] & Q[x,z] holds z in Z() proof let x,z; assume x in [:X(),Y():]; then A4: ex x1,y1 st x1 in X() & y1 in Y() & x = [x1,y1] by ZFMISC_1:def 2; assume for x1,y1 st x = [x1,y1] holds P[x1,y1,z]; hence thesis by A1,A4; end; A5: for x,z1,z2 st x in [:X(),Y():] & Q[x,z1] & Q[x,z2] holds z1 = z2 proof let x,z1,z2 such that A6: x in [:X(),Y():] and A7: ( for x1,y1 st x = [x1,y1] holds P[x1,y1,z1])& for x1,y1 st x = [ x1,y1] holds P[x1,y1,z2]; consider x1,y1 such that A8: x1 in X() & y1 in Y() and A9: x = [x1,y1] by A6,ZFMISC_1:def 2; ( P[x1,y1,z1])& P[x1,y1,z2] by A7,A9; hence thesis by A2,A8; end; consider f being PartFunc of [:X(),Y():],Z() such that A10: for x holds x in dom f iff x in [:X(),Y():] & ex z st Q[x,z] and A11: for x st x in dom f holds Q[x,f.x] from PARTFUN1:sch 2(A3,A5); take f; thus for x,y holds [x,y] in dom f iff x in X() & y in Y() & ex z st P[x,y,z ] proof let x,y; thus [x,y] in dom f implies x in X() & y in Y() & ex z st P[x,y,z] proof assume A12: [x,y] in dom f; hence x in X() & y in Y() by ZFMISC_1:87; consider z such that A13: for x1,y1 st [x,y] = [x1,y1] holds P[x1,y1,z] by A10,A12; take z; thus thesis by A13; end; assume x in X() & y in Y(); then A14: [x,y] in [:X(),Y():] by ZFMISC_1:def 2; given z such that A15: P[x,y,z]; now take z; let x1,y1; assume A16: [x,y] = [x1,y1]; then x=x1 by XTUPLE_0:1; hence P[x1,y1,z] by A15,A16,XTUPLE_0:1; end; hence thesis by A10,A14; end; thus thesis by A11; end; scheme LambdaR2{X,Y,Z()->set,F(set,set)->set,P[set,set]}: ex f being PartFunc of [: X(),Y():],Z() st (for x,y holds [x,y] in dom f iff x in X() & y in Y() & P[x,y] ) & for x,y st [x,y] in dom f holds f.(x,y) = F(x,y) provided A1: for x,y st P[x,y] holds F(x,y) in Z() proof defpred Q[set,set,set] means P[$1,$2] & $3 = F($1,$2); A2: for x,y,z1,z2 st x in X() & y in Y() & Q[x,y,z1] & Q[x,y,z2] holds z1 = z2; A3: for x,y,z st x in X() & y in Y() & Q[x,y,z] holds z in Z() by A1; consider f being PartFunc of [:X(),Y():],Z() such that A4: for x,y holds [x,y] in dom f iff x in X() & y in Y() & ex z st Q[x,y ,z] and A5: for x,y st [x,y] in dom f holds Q[x,y,f.(x,y)] from PartFuncEx2(A3, A2 ); take f; thus for x,y holds [x,y] in dom f iff x in X() & y in Y() & P[x,y] proof let x,y; thus [x,y] in dom f implies x in X() & y in Y() & P[x,y] proof assume A6: [x,y] in dom f; then ex z st P[x,y] & z = F(x,y) by A4; hence thesis by A4,A6; end; assume that A7: x in X() & y in Y() and A8: P[x,y]; ex z st P[x,y] & z = F(x,y) by A8; hence thesis by A4,A7; end; thus thesis by A5; end; scheme PartLambda2{X,Y,Z()->set,F(set,set)->set,P[set,set]}: ex f being PartFunc of [:X(),Y():],Z() st (for x,y holds [x,y] in dom f iff x in X() & y in Y() & P[x, y]) & for x,y st [x,y] in dom f holds f.(x,y) = F(x,y) provided A1: for x,y st x in X() & y in Y() & P[x,y] holds F(x,y) in Z() proof defpred R[set,set] means $1 in X() & $2 in Y() & P[$1,$2]; A2: for x,y st R[x,y] holds F(x,y) in Z() by A1; consider f being PartFunc of [:X(),Y():],Z() such that A3: ( for x,y holds [x,y] in dom f iff x in X() & y in Y() & R[x,y])& for x,y st [ x,y] in dom f holds f.(x,y) = F(x,y) from LambdaR2(A2); take f; thus thesis by A3; end; scheme {X,Y()->non empty set,Z()->set,F(set,set)->set, P[set,set]}: ex f being PartFunc of [:X(),Y():],Z() st (for x being Element of X(), y being Element of Y() holds [x,y] in dom f iff P[x,y]) & for x being Element of X(), y being Element of Y() st [x,y] in dom f holds f.(x,y) = F(x,y) provided A1: for x being Element of X(), y being Element of Y() st P[x,y] holds F (x,y) in Z() proof A2: for x,y st x in X() & y in Y() & P[x,y] holds F(x,y) in Z() by A1; consider f being PartFunc of [:X(),Y():],Z() such that A3: ( for x,y holds [x,y] in dom f iff x in X() & y in Y() & P[x,y])& for x,y st [ x,y] in dom f holds f.(x,y) = F(x,y) from PartLambda2(A2); take f; thus thesis by A3; end; definition let A be set, f be BinOp of A, x,y be Element of A; redefine func f.(x,y) -> Element of A; coherence proof per cases; suppose A = {}; then dom f = {}; then f.(x,y) = {} by FUNCT_1:def 2; hence thesis; end; suppose A <> {}; then reconsider A as non empty set; reconsider f as BinOp of A; reconsider x,y as Element of A; f.(x,y) is Element of A; hence thesis; end; end; end; definition let X,Y,Z be set; let f1,f2 being Function of [:X,Y:],Z; redefine pred f1 = f2 means for x,y being set st x in X & y in Y holds f1.(x,y) = f2.(x,y); compatibility by Th1; end; begin reserve a,b,c,d for set, D,X1,X2,X3,X4 for non empty set, x1,y1,z1 for Element of X1, x2 for Element of X2, x3 for Element of X3, x4 for Element of X4, A1,B1 for Subset of X1; theorem a in [:X1,X2:] implies ex x1,x2 st a=[x1,x2] proof assume a in [:X1,X2:]; then consider x1,x2 being set such that A1: x1 in X1 and A2: x2 in X2 and A3: a=[x1,x2] by ZFMISC_1:def 2; reconsider x2 as Element of X2 by A2; reconsider x1 as Element of X1 by A1; take x1,x2; thus thesis by A3; end; theorem for x,y being Element of [:X1,X2:] st x`1=y`1 & x`2=y`2 holds x=y proof let x,y be Element of [:X1,X2:]; [x`1,x`2]=x by MCART_1:21; hence thesis by MCART_1:21; end; definition let X1,X2,x1,x2; redefine func [x1,x2] -> Element of [:X1,X2:]; coherence by ZFMISC_1:87; end; definition let X1,X2; let x be Element of [:X1,X2:]; redefine func x`1 -> Element of X1; coherence by MCART_1:10; redefine func x`2 -> Element of X2; coherence by MCART_1:10; end; theorem Th3: a in [: X1,X2,X3 :] iff ex x1,x2,x3 st a = [x1,x2,x3] proof thus a in [: X1,X2,X3 :] implies ex x1,x2,x3 st a = [x1,x2,x3] proof assume a in [: X1,X2,X3 :]; then a in [:[:X1,X2:],X3:] by ZFMISC_1:def 3; then consider x12, x3 being set such that A1: x12 in [:X1,X2:] and A2: x3 in X3 and A3: a = [x12,x3] by ZFMISC_1:def 2; reconsider x3 as Element of X3 by A2; consider x1,x2 being set such that A4: x1 in X1 and A5: x2 in X2 and A6: x12 = [x1,x2] by A1,ZFMISC_1:def 2; reconsider x2 as Element of X2 by A5; reconsider x1 as Element of X1 by A4; a = [x1,x2,x3] by A3,A6; hence thesis; end; given x1,x2,x3 such that A7: a = [x1,x2,x3]; a = [[x1,x2],x3] by A7; then a in [:[:X1,X2:],X3:]; hence thesis by ZFMISC_1:def 3; end; theorem Th4: (for a holds a in D iff ex x1,x2,x3 st a = [x1,x2,x3]) implies D = [: X1,X2,X3 :] proof assume A1: for a holds a in D iff ex x1,x2,x3 st a = [x1,x2,x3]; now let a; thus a in D implies a in [:[:X1,X2:],X3:] proof assume a in D; then consider x1,x2,x3 such that A2: a = [x1,x2,x3] by A1; a = [[x1,x2],x3] by A2; hence thesis; end; assume a in [:[:X1,X2:],X3:]; then consider x12,x3 being set such that A3: x12 in [:X1,X2:] and A4: x3 in X3 and A5: a = [x12,x3] by ZFMISC_1:def 2; reconsider x3 as Element of X3 by A4; consider x1,x2 being set such that A6: x1 in X1 and A7: x2 in X2 and A8: x12 = [x1,x2] by A3,ZFMISC_1:def 2; reconsider x2 as Element of X2 by A7; reconsider x1 as Element of X1 by A6; a = [x1,x2,x3] by A5,A8; hence a in D by A1; end; then D = [:[:X1,X2:],X3:] by TARSKI:1; hence thesis by ZFMISC_1:def 3; end; theorem D = [: X1,X2,X3 :] iff for a holds a in D iff ex x1,x2,x3 st a = [x1, x2,x3] by Th3,Th4; reserve x,y for Element of [:X1,X2,X3:]; definition let X1,X2,X3,x1,x2,x3; redefine func [x1,x2,x3] -> Element of [:X1,X2,X3:]; coherence by MCART_1:69; end; theorem a =x`1_3 iff for x1,x2,x3 st x = [x1,x2,x3] holds a = x1 proof thus a =x`1_3 implies for x1,x2,x3 st x = [x1,x2,x3] holds a = x1 proof A1: x = [x`1_3,x`2_3,x`3_3]; assume A2: a = x`1_3; let x1,x2,x3; assume x = [x1,x2,x3]; hence thesis by A2,A1,XTUPLE_0:3; end; thus thesis by MCART_1:65; end; theorem b =x`2_3 iff for x1,x2,x3 st x = [x1,x2,x3] holds b = x2 proof thus b =x`2_3 implies for x1,x2,x3 st x = [x1,x2,x3] holds b = x2 proof A1: x = [x`1_3,x`2_3,x`3_3]; assume A2: b = x`2_3; let x1,x2,x3; assume x = [x1,x2,x3]; hence thesis by A2,A1,XTUPLE_0:3; end; thus thesis by MCART_1:66; end; theorem c =x`3_3 iff for x1,x2,x3 st x = [x1,x2,x3] holds c = x3 proof thus c =x`3_3 implies for x1,x2,x3 st x = [x1,x2,x3] holds c = x3 proof A1: x = [x`1_3,x`2_3,x`3_3]; assume A2: c = x`3_3; let x1,x2,x3; assume x = [x1,x2,x3]; hence thesis by A2,A1,XTUPLE_0:3; end; thus thesis by MCART_1:67; end; theorem x`1_3=y`1_3 & x`2_3=y`2_3 & x`3_3=y`3_3 implies x=y proof [x`1_3,x`2_3,x`3_3]=x; hence thesis by MCART_1:44; end; theorem Th10: a in [: X1,X2,X3,X4 :] iff ex x1,x2,x3,x4 st a = [x1,x2,x3,x4] proof thus a in [: X1,X2,X3,X4 :] implies ex x1,x2,x3,x4 st a = [x1,x2,x3,x4] proof assume a in [: X1,X2,X3,X4 :]; then a in [:[:X1,X2,X3:],X4:] by ZFMISC_1:def 4; then consider x123, x4 being set such that A1: x123 in [:X1,X2,X3:] and A2: x4 in X4 and A3: a = [x123,x4] by ZFMISC_1:def 2; reconsider x4 as Element of X4 by A2; consider x1 being (Element of X1), x2 being (Element of X2), x3 being Element of X3 such that A4: x123 = [x1,x2,x3] by A1,Th3; a = [x1,x2,x3,x4] by A3,A4; hence thesis; end; given x1,x2,x3,x4 such that A5: a = [x1,x2,x3,x4]; a = [[x1,x2,x3],x4] by A5; then a in [:[:X1,X2,X3:],X4:]; hence thesis by ZFMISC_1:def 4; end; theorem Th11: (for a holds a in D iff ex x1,x2,x3,x4 st a = [x1,x2,x3,x4]) implies D = [: X1,X2,X3,X4 :] proof assume A1: for a holds a in D iff ex x1,x2,x3,x4 st a = [x1,x2,x3,x4]; now let a; thus a in D implies a in [:[:X1,X2,X3:],X4:] proof assume a in D; then consider x1,x2,x3,x4 such that A2: a = [x1,x2,x3,x4] by A1; a = [[x1,x2,x3],x4] by A2; hence thesis; end; assume a in [:[:X1,X2,X3:],X4:]; then consider x123,x4 being set such that A3: x123 in [:X1,X2,X3:] and A4: x4 in X4 and A5: a = [x123,x4] by ZFMISC_1:def 2; reconsider x4 as Element of X4 by A4; consider x1,x2,x3 such that A6: x123 = [x1,x2,x3] by A3,Th3; a = [x1,x2,x3,x4] by A5,A6; hence a in D by A1; end; then D = [:[:X1,X2,X3:],X4:] by TARSKI:1; hence thesis by ZFMISC_1:def 4; end; theorem D = [: X1,X2,X3,X4 :] iff for a holds a in D iff ex x1,x2,x3,x4 st a = [x1,x2,x3,x4] by Th10,Th11; reserve x for Element of [:X1,X2,X3,X4:]; definition let X1,X2,X3,X4,x1,x2,x3,x4; redefine func [x1,x2,x3,x4] -> Element of [:X1,X2,X3,X4:]; coherence by MCART_1:80; end; theorem a=x`1_4 iff for x1,x2,x3,x4 st x = [x1,x2,x3,x4] holds a = x1 proof thus a =x`1_4 implies for x1,x2,x3,x4 st x = [x1,x2,x3,x4] holds a = x1 proof A1: x = [x`1_4,x`2_4,x`3_4,x`4_4]; assume A2: a = x`1_4; let x1,x2,x3,x4; assume x = [x1,x2,x3,x4]; hence thesis by A2,A1,XTUPLE_0:5; end; thus thesis by MCART_1:75; end; theorem b=x`2_4 iff for x1,x2,x3,x4 st x = [x1,x2,x3,x4] holds b = x2 proof thus b =x`2_4 implies for x1,x2,x3,x4 st x = [x1,x2,x3,x4] holds b = x2 proof A1: x = [x`1_4,x`2_4,x`3_4,x`4_4]; assume A2: b = x`2_4; let x1,x2,x3,x4; assume x = [x1,x2,x3,x4]; hence thesis by A2,A1,XTUPLE_0:5; end; thus thesis by MCART_1:76; end; theorem c = x`3_4 iff for x1,x2,x3,x4 st x = [x1,x2,x3,x4] holds c = x3 proof thus c =x`3_4 implies for x1,x2,x3,x4 st x = [x1,x2,x3,x4] holds c = x3 proof A1: x = [x`1_4,x`2_4,x`3_4,x`4_4]; assume A2: c = x`3_4; let x1,x2,x3,x4; assume x = [x1,x2,x3,x4]; hence thesis by A2,A1,XTUPLE_0:5; end; thus thesis by MCART_1:77; end; theorem d=x`4_4 iff for x1,x2,x3,x4 st x = [x1,x2,x3,x4] holds d = x4 proof thus d =x`4_4 implies for x1,x2,x3,x4 st x = [x1,x2,x3,x4] holds d = x4 proof A1: x = [x`1_4,x`2_4,x`3_4,x`4_4]; assume A2: d = x`4_4; let x1,x2,x3,x4; assume x = [x1,x2,x3,x4]; hence thesis by A2,A1,XTUPLE_0:5; end; thus thesis by MCART_1:78; end; theorem for x,y being Element of [:X1,X2,X3,X4:] st x`1_4=y`1_4 & x`2_4=y`2_4 & x`3_4=y `3_4 & x`4_4=y`4_4 holds x=y proof let x,y be Element of [:X1,X2,X3,X4:]; [x`1_4,x`2_4,x`3_4,x`4_4]=x; hence thesis by MCART_1:56; end; reserve A2 for Subset of X2, A3 for Subset of X3, A4 for Subset of X4; scheme Fraenkel1 {P[set]}: for X1 holds { x1 : P[x1] } is Subset of X1 proof let X1; { x1 : P[x1] } c= X1 proof let a; assume a in { x1 : P[x1] }; then ex x1 st a = x1 & P[x1]; hence thesis; end; hence thesis; end; scheme Fraenkel2 {P[set,set]}: for X1,X2 holds { [x1,x2] : P[x1,x2] } is Subset of [:X1,X2:] proof let X1,X2; { [x1,x2] : P[x1,x2] } c= [:X1,X2:] proof let a; assume a in { [x1,x2] : P[x1,x2] }; then ex x1,x2 st a = [x1,x2] & P[x1,x2]; hence thesis; end; hence thesis; end; scheme Fraenkel3 {P[set,set,set]}: for X1,X2,X3 holds { [x1,x2,x3] : P[x1,x2,x3] } is Subset of [:X1,X2,X3:] proof let X1,X2,X3; { [x1,x2,x3] : P[x1,x2,x3] } c= [:X1,X2,X3:] proof let a; assume a in { [x1,x2,x3] : P[x1,x2,x3] }; then ex x1,x2,x3 st a = [x1,x2,x3] & P[x1,x2,x3]; hence thesis; end; hence thesis; end; scheme Fraenkel4 {P[set,set,set,set]}: for X1,X2,X3,X4 holds { [x1,x2,x3,x4] : P[x1 ,x2,x3,x4] } is Subset of [:X1,X2,X3,X4:] proof let X1,X2,X3,X4; { [x1,x2,x3,x4] : P[x1,x2,x3,x4] } c= [:X1,X2,X3,X4:] proof let a; assume a in { [x1,x2,x3,x4] : P[x1,x2,x3,x4] }; then ex x1,x2,x3,x4 st a = [x1,x2,x3,x4] & P[x1,x2,x3,x4]; hence thesis; end; hence thesis; end; scheme Fraenkel5 {P[set],Q[set]}: for X1 st for x1 holds P[x1] implies Q[x1] holds { y1 : P[y1] } c= { z1 : Q[z1] } proof let X1 such that A1: P[x1] implies Q[x1]; let a; assume a in { x1 : P[x1] }; then consider x1 such that A2: a = x1 and A3: P[x1]; Q[x1] by A1,A3; hence thesis by A2; end; scheme Fraenkel6 {P[set],Q[set]}: for X1 st for x1 holds P[x1] iff Q[x1] holds { y1 : P[y1] } = { z1 : Q[z1] } proof let X1; assume A1: P[x1] iff Q[x1]; for X1 st for x1 holds P[x1] implies Q[x1] holds { y1 : P[y1] } c= { z1 : Q[z1] } from Fraenkel5; hence { y1 : P[y1] } c= { z1 : Q[z1] } by A1; for X1 st for x1 holds Q[x1] implies P[x1] holds { y1 : Q[y1] } c= { z1 : P[z1] } from Fraenkel5; hence thesis by A1; end; scheme SubsetD{D() -> non empty set,P[set]}: {d where d is Element of D() : P[d]} is Subset of D() proof for D being non empty set holds {d where d is Element of D : P[d]} is Subset of D from Fraenkel1; hence thesis; end; theorem X1 = { x1 : not contradiction } proof defpred P[set] means not contradiction; A1: y1 in { x1 : not contradiction }; { x1 : P[x1] } is Subset of X1 from SubsetD; hence thesis by A1,SUBSET_1:28; end; theorem [:X1,X2:] = { [x1,x2] : not contradiction } proof defpred P[set,set] means not contradiction; A1: for x being Element of [:X1,X2:] holds x in { [x1,x2] : not contradiction } proof let x be Element of [:X1,X2:]; x = [x`1,x`2] by MCART_1:21; hence thesis; end; for X1,X2 holds { [x1,x2] : P[x1,x2] } is Subset of [:X1,X2:] from Fraenkel2; then { [x1,x2] : not contradiction } is Subset of [:X1,X2:]; hence thesis by A1,SUBSET_1:28; end; theorem [:X1,X2,X3:] = { [x1,x2,x3] : not contradiction } proof defpred P[set,set,set] means not contradiction; A1: for x being Element of [:X1,X2,X3:] holds x in { [x1,x2,x3] : not contradiction } proof let x be Element of [:X1,X2,X3:]; x = [x`1_3,x`2_3,x`3_3]; hence thesis; end; for X1,X2,X3 holds { [x1,x2,x3] : P[x1,x2,x3] } is Subset of [:X1,X2,X3 :] from Fraenkel3; then { [x1,x2,x3] : not contradiction } is Subset of [:X1,X2,X3:]; hence thesis by A1,SUBSET_1:28; end; theorem [:X1,X2,X3,X4:] = { [x1,x2,x3,x4] : not contradiction } proof defpred P[set,set,set,set] means not contradiction; A1: for x being Element of [:X1,X2,X3,X4:] holds x in { [x1,x2,x3,x4] : not contradiction } proof let x be Element of [:X1,X2,X3,X4:]; x = [x`1_4,x`2_4,x`3_4,x`4_4]; hence thesis; end; for X1,X2,X3,X4 holds { [x1,x2,x3,x4] : P[x1,x2,x3,x4] } is Subset of [: X1,X2,X3,X4:] from Fraenkel4; then { [x1,x2,x3,x4] : not contradiction } is Subset of [:X1,X2,X3,X4:]; hence thesis by A1,SUBSET_1:28; end; theorem A1 = { x1 : x1 in A1 } proof thus A1 c= { x1 : x1 in A1 } proof let a; assume a in A1; hence thesis; end; let a; assume a in { x1 : x1 in A1 }; then ex x1 st a = x1 & x1 in A1; hence thesis; end; theorem [:A1,A2:] = { [x1,x2] : x1 in A1 & x2 in A2 } proof thus [:A1,A2:] c= { [x1,x2] : x1 in A1 & x2 in A2 } proof let a; assume A1: a in [:A1,A2:]; then reconsider x = a as Element of [:X1,X2:]; A2: x = [x`1,x`2] by MCART_1:21; x`1 in A1 & x`2 in A2 by A1,MCART_1:10; hence thesis by A2; end; let a; assume a in { [x1,x2] : x1 in A1 & x2 in A2 }; then ex x1,x2 st a = [x1,x2] & x1 in A1 & x2 in A2; hence thesis by ZFMISC_1:87; end; theorem [:A1,A2,A3:] = { [x1,x2,x3] : x1 in A1 & x2 in A2 & x3 in A3 } proof thus [:A1,A2,A3:] c= { [x1,x2,x3] : x1 in A1 & x2 in A2 & x3 in A3 } proof let a; assume B1: a in [:A1,A2,A3:]; reconsider A1 as non empty Subset of X1 by B1,MCART_1:31; reconsider A2 as non empty Subset of X2 by B1,MCART_1:31; reconsider A3 as non empty Subset of X3 by B1,MCART_1:31; A1: a in [:A1,A2,A3:] by B1; reconsider x = a as Element of [:X1,X2,X3:] by A1; B2: x = [x`1_3,x`2_3,x`3_3]; A2: x`3_3 in A3 by A1,MCART_1:72; x`1_3 in A1 & x`2_3 in A2 by A1,MCART_1:72; hence thesis by A2,B2; end; let a; assume a in { [x1,x2,x3] : x1 in A1 & x2 in A2 & x3 in A3 }; then ex x1,x2,x3 st a= [x1,x2,x3] & x1 in A1 & x2 in A2 & x3 in A3; hence thesis by MCART_1:69; end; theorem [:A1,A2,A3,A4:] = { [x1,x2,x3,x4] : x1 in A1 & x2 in A2 & x3 in A3 & x4 in A4 } proof thus [:A1,A2,A3,A4:] c= { [x1,x2,x3,x4] : x1 in A1 & x2 in A2 & x3 in A3 & x4 in A4 } proof let a; assume B1: a in [:A1,A2,A3,A4:]; reconsider A1 as non empty Subset of X1 by B1,MCART_1:51; reconsider A2 as non empty Subset of X2 by B1,MCART_1:51; reconsider A3 as non empty Subset of X3 by B1,MCART_1:51; reconsider A4 as non empty Subset of X4 by B1,MCART_1:51; A1: a in [:A1,A2,A3,A4:] by B1; then reconsider x = a as Element of [:X1,X2,X3,X4:]; A2: x`3_4 in A3 & x`4_4 in A4 by A1,MCART_1:83; A3: x = [x`1_4,x`2_4,x`3_4,x`4_4]; x`1_4 in A1 & x`2_4 in A2 by A1,MCART_1:83; hence thesis by A3,A2; end; let a; assume a in { [x1,x2,x3,x4] : x1 in A1 & x2 in A2 & x3 in A3 & x4 in A4 }; then ex x1,x2,x3,x4 st a = [x1,x2,x3,x4] & x1 in A1 & x2 in A2 & x3 in A3 & x4 in A4; hence thesis by MCART_1:80; end; theorem {} X1 = { x1 : contradiction } proof thus {} X1 c= { x1 : contradiction } proof let a; thus thesis; end; let a; assume a in { x1 : contradiction }; then ex x1 st a = x1 & contradiction; hence thesis; end; theorem A1` = { x1 : not x1 in A1 } proof thus A1` c= { x1 : not x1 in A1 } proof let a; assume A1: a in A1`; then not a in A1 by XBOOLE_0:def 5; hence thesis by A1; end; let a; assume a in { x1 : not x1 in A1 }; then ex x1 st a = x1 & not x1 in A1; hence thesis by SUBSET_1:29; end; theorem A1 /\ B1 = { x1 : x1 in A1 & x1 in B1 } proof thus A1 /\ B1 c= { x1 : x1 in A1 & x1 in B1 } proof let a; assume A1: a in A1 /\ B1; then reconsider x = a as Element of X1; x in A1 & x in B1 by A1,XBOOLE_0:def 4; hence thesis; end; let a; assume a in { x1 : x1 in A1 & x1 in B1 }; then ex x1 st a = x1 & x1 in A1 & x1 in B1; hence thesis by XBOOLE_0:def 4; end; theorem A1 \/ B1 = { x1 : x1 in A1 or x1 in B1 } proof thus A1 \/ B1 c= { x1 : x1 in A1 or x1 in B1 } proof let a; assume A1: a in A1 \/ B1; then reconsider x = a as Element of X1; x in A1 or x in B1 by A1,XBOOLE_0:def 3; hence thesis; end; let a; assume a in { x1 : x1 in A1 or x1 in B1 }; then ex x1 st a = x1 & (x1 in A1 or x1 in B1); hence thesis by XBOOLE_0:def 3; end; theorem A1 \ B1 = { x1 : x1 in A1 & not x1 in B1 } proof thus A1 \ B1 c= { x1 : x1 in A1 & not x1 in B1 } proof let a; assume A1: a in A1 \ B1; then reconsider x = a as Element of X1; x in A1 & not x in B1 by A1,XBOOLE_0:def 5; hence thesis; end; let a; assume a in { x1 : x1 in A1 & not x1 in B1 }; then ex x1 st a = x1 & x1 in A1 & not x1 in B1; hence thesis by XBOOLE_0:def 5; end; theorem Th31: A1 \+\ B1 = { x1 : x1 in A1 & not x1 in B1 or not x1 in A1 & x1 in B1 } proof thus A1 \+\ B1 c= { x1 : x1 in A1 & not x1 in B1 or not x1 in A1 & x1 in B1} proof let a; assume A1: a in A1 \+\ B1; then reconsider x = a as Element of X1; x in A1 & not x in B1 or not x in A1 & x in B1 by A1,XBOOLE_0:1; hence thesis; end; let a; assume a in { x1 : x1 in A1 & not x1 in B1 or not x1 in A1 & x1 in B1 }; then ex x1 st a = x1 & (x1 in A1 & not x1 in B1 or not x1 in A1 & x1 in B1); hence thesis by XBOOLE_0:1; end; theorem Th32: A1 \+\ B1 = { x1 : not x1 in A1 iff x1 in B1 } proof A1: for x1 holds (x1 in A1 & not x1 in B1 or not x1 in A1 & x1 in B1) iff ( not x1 in A1 iff x1 in B1); defpred Q[set] means not $1 in A1 iff $1 in B1; defpred P[set] means $1 in A1 & not $1 in B1 or not $1 in A1 & $1 in B1; A2: A1 \+\ B1 = { x1 : x1 in A1 & not x1 in B1 or not x1 in A1 & x1 in B1 } by Th31; for X1 st for x1 holds P[x1] iff Q[x1] holds { y1 : P[y1] } = { z1 : Q[ z1] } from Fraenkel6; hence thesis by A1,A2; end; theorem A1 \+\ B1 = { x1 : x1 in A1 iff not x1 in B1 } proof A1: for x1 holds (not x1 in A1 iff x1 in B1) iff (x1 in A1 iff not x1 in B1); defpred Q[set] means $1 in A1 iff not $1 in B1; defpred P[set] means not $1 in A1 iff $1 in B1; A2: A1 \+\ B1 = { x1 : not x1 in A1 iff x1 in B1 } by Th32; for X1 st for x1 holds P[x1] iff Q[x1] holds { y1 : P[y1] } = { z1 : Q[ z1] } from Fraenkel6; hence thesis by A1,A2; end; theorem A1 \+\ B1 = { x1 : not(x1 in A1 iff x1 in B1) } proof A1: for x1 holds (not x1 in A1 iff x1 in B1) iff not(x1 in A1 iff x1 in B1); defpred Q[set] means not($1 in A1 iff $1 in B1); defpred P[set] means not $1 in A1 iff $1 in B1; A2: A1 \+\ B1 = { x1 : not x1 in A1 iff x1 in B1 } by Th32; for X1 st for x1 holds P[x1] iff Q[x1] holds { y1 : P[y1] } = { z1 : Q[ z1] } from Fraenkel6; hence thesis by A1,A2; end; definition let D be non empty set; let x1 be Element of D; redefine func {x1} -> Subset of D; coherence by SUBSET_1:33; let x2 be Element of D; redefine func {x1,x2} -> Subset of D; coherence by SUBSET_1:34; let x3 be Element of D; redefine func {x1,x2,x3} -> Subset of D; coherence by SUBSET_1:35; let x4 be Element of D; redefine func {x1,x2,x3,x4} -> Subset of D; coherence by SUBSET_1:36; let x5 be Element of D; redefine func {x1,x2,x3,x4,x5} -> Subset of D; coherence by SUBSET_1:37; let x6 be Element of D; redefine func {x1,x2,x3,x4,x5,x6} -> Subset of D; coherence by SUBSET_1:38; let x7 be Element of D; redefine func {x1,x2,x3,x4,x5,x6,x7} -> Subset of D; coherence by SUBSET_1:39; let x8 be Element of D; redefine func {x1,x2,x3,x4,x5,x6,x7,x8} -> Subset of D; coherence by SUBSET_1:40; end; begin scheme SubsetFD { A, D() -> non empty set, F(set) -> Element of D(), P[set] }: { F( x) where x is Element of A(): P[x]} is Subset of D() proof set X = { F(x) where x is Element of A(): P[x]}; X c= D() proof let y be set; assume y in X; then ex z being Element of A() st y = F(z) & P[z]; hence thesis; end; hence thesis; end; scheme SubsetFD2 { A, B, D() -> non empty set, F(set,set) -> Element of D(), P[set, set] }: { F(x,y) where x is Element of A(), y is Element of B(): P[x,y]} is Subset of D() proof set X = { F(x,y) where x is Element of A(), y is Element of B(): P[x,y]}; X c= D() proof let w be set; assume w in X; then ex x being Element of A(), y being Element of B() st w = F(x,y) & P[ x ,y]; hence thesis; end; hence thesis; end; definition let D1,D2,D3 be non empty set, x be Element of [:[:D1,D2:],D3:]; redefine func x`11 -> Element of D1; coherence proof x`11 = x`1`1 by MCART_1:def 14; hence thesis; end; redefine func x`12 -> Element of D2; coherence proof x`12 = x`1`2 by MCART_1:def 15; hence thesis; end; end; definition let D1,D2,D3 be non empty set, x be Element of [:D1,[:D2,D3:]:]; redefine func x`21 -> Element of D2; coherence proof x`21 = x`2`1 by MCART_1:def 16; hence thesis; end; redefine func x`22 -> Element of D3; coherence proof x`22 = x`2`2 by MCART_1:def 17; hence thesis; end; end; scheme AndScheme{A()-> non empty set, P,Q[set]}: { a where a is Element of A(): P[a ] & Q[a] } = { a1 where a1 is Element of A(): P[a1] } /\ { a2 where a2 is Element of A(): Q[a2] } proof set A = { a where a is Element of A(): P[a] & Q[a] }, A1 = { a1 where a1 is Element of A(): P[a1] }, A2 = { a2 where a2 is Element of A(): Q[a2] }; thus A c= A1 /\ A2 proof let x be set; assume x in A; then consider a being Element of A() such that A1: x = a and A2: ( P[a])& Q[a]; a in A1 & a in A2 by A2; hence thesis by A1,XBOOLE_0:def 4; end; let x be set; assume A3: x in A1 /\ A2; then x in A2 by XBOOLE_0:def 4; then A4: ex a being Element of A() st x = a & Q[a]; x in A1 by A3,XBOOLE_0:def 4; then ex a being Element of A() st x = a & P[a]; hence thesis by A4; end; registration let A be non empty set; cluster c=-linear non empty for Subset of A; existence proof set a = the Element of A; reconsider B = { a } as non empty Subset of A; take B; B is c=-linear proof let x,y be set; assume that A1: x in B and A2: y in B; x = a by A1,TARSKI:def 1; hence thesis by A2,TARSKI:def 1; end; hence thesis; end; end; begin reserve p,q,x,x1,x2,y,y1,y2,z,z1,z2 for set; reserve A,B,V,X,X1,X2,Y,Y1,Y2,Z for set; reserve C,C1,C2,D,D1,D2 for non empty set; theorem Th1: A c= Y implies id A = (id Y)|A proof assume A c= Y; hence id A = id(Y /\ A) by XBOOLE_1:28 .= (id Y)*(id A) by FUNCT_1:22 .= (id Y)|A by RELAT_1:65; end; theorem Th2: for f,g being Function st X c= dom(g*f) holds f.:X c= dom g proof let f,g be Function such that A1: X c= dom(g*f); let y; assume y in f.:X; then ex x st x in dom f & x in X & y = f.x by FUNCT_1:def 6; hence thesis by A1,FUNCT_1:11; end; theorem Th3: for f,g being Function st X c= dom f & f.:X c= dom g holds X c= dom(g*f) proof let f,g be Function such that A1: X c= dom f and A2: f.:X c= dom g; let x; assume A3: x in X; then f.x in f.:X by A1,FUNCT_1:def 6; hence thesis by A1,A2,A3,FUNCT_1:11; end; theorem Th4: for f,g being Function st Y c= rng(g*f) & g is one-to-one holds g "Y c= rng f proof let f,g be Function such that A1: Y c= rng(g*f) and A2: g is one-to-one; let y; assume A3: y in g"Y; then A4: y in dom g by FUNCT_1:def 7; g.y in Y by A3,FUNCT_1:def 7; then consider x such that A5: x in dom(g*f) and A6: g.y = (g*f).x by A1,FUNCT_1:def 3; A7: x in dom f by A5,FUNCT_1:11; g.y = g.(f.x) & f.x in dom g by A5,A6,FUNCT_1:11,12; then y = f.x by A2,A4,FUNCT_1:def 4; hence thesis by A7,FUNCT_1:def 3; end; theorem Th5: for f,g being Function st Y c= rng g & g"Y c= rng f holds Y c= rng(g*f) proof let f,g be Function such that A1: Y c= rng g and A2: g"Y c= rng f; let y; assume A3: y in Y; then consider z such that A4: z in dom g & y = g.z by A1,FUNCT_1:def 3; z in g"Y by A3,A4,FUNCT_1:def 7; then consider x such that A5: x in dom f & z = f.x by A2,FUNCT_1:def 3; x in dom(g*f) & (g*f).x = y by A4,A5,FUNCT_1:11,13; hence thesis by FUNCT_1:def 3; end; scheme FuncEx3{A()->set,B()-> set,P[set,set,set]}: ex f being Function st dom f = [:A(),B():] & for x,y st x in A() & y in B() holds P[x,y,f.(x,y)] provided A1: for x,y,z1,z2 st x in A() & y in B() & P[x,y,z1] & P[x,y,z2] holds z1 = z2 and A2: for x,y st x in A() & y in B() ex z st P[x,y,z] proof defpred R[set,set] means for x,y st $1=[x,y] holds P[x,y,$2]; set D = [:A(), B():]; A3: for p st p in D ex z st R[p,z] proof let p; assume p in D; then consider x1,y1 such that A4: x1 in A() & y1 in B() and A5: p = [x1,y1] by ZFMISC_1:def 2; consider z such that A6: P[x1,y1,z] by A2,A4; take z; let x,y; assume A7: p=[x,y]; then x=x1 by A5,XTUPLE_0:1; hence thesis by A5,A6,A7,XTUPLE_0:1; end; A8: for p,y1,y2 st p in D & R[p,y1] & R[p,y2] holds y1 = y2 proof let p,y1,y2; assume p in D; then consider x1,x2 such that A9: x1 in A() & x2 in B() and A10: p = [x1,x2] by ZFMISC_1:def 2; assume ( for x,y st p=[x,y] holds P[x,y,y1])& for x,y st p=[x,y] holds P[ x,y,y2]; then ( P[x1,x2,y1])& P[x1,x2,y2] by A10; hence thesis by A1,A9; end; consider f being Function such that A11: dom f = D and A12: for p st p in D holds R[p,f.p] from FUNCT_1:sch 2(A8,A3); take f; thus dom f = [:A(),B():] by A11; let x,y; assume x in A() & y in B(); then [x,y] in [:A(),B():] by ZFMISC_1:def 2; hence thesis by A12; end; scheme Lambda3{A()->set,B()->set,F(set,set)->set}: ex f being Function st dom f = [:A(),B():] & for x,y st x in A() & y in B() holds f.(x,y) = F(x,y) proof defpred P[set,set,set] means $3 = F($1,$2); A1: for x,y st x in A() & y in B() ex z st P[x,y,z]; A2: for x,y,z1,z2 st x in A() & y in B() & P[x,y,z1] & P[x,y,z2] holds z1=z2; ex f being Function st dom f = [:A(),B():] & for x,y st x in A() & y in B() holds P[x,y,f.(x,y)] from FuncEx3(A2,A1); hence thesis; end; theorem Th6: for f,g being Function st dom f = [:X,Y:] & dom g = [:X,Y:] & for x,y st x in X & y in Y holds f.(x,y) = g.(x,y) holds f = g proof let f,g be Function such that A1: dom f = [:X,Y:] & dom g = [:X,Y:] and A2: for x,y st x in X & y in Y holds f.(x,y) = g.(x,y); p in [:X,Y:] implies f.p = g.p proof assume p in [:X,Y:]; then consider x,y such that A3: x in X & y in Y and A4: p = [x,y] by ZFMISC_1:def 2; f.(x,y) = g.(x,y) by A2,A3; hence thesis by A4; end; hence thesis by A1,FUNCT_1:2; end; definition let f be Function; func .:f -> Function means :Def1: dom it = bool dom f & for X st X c= dom f holds it.X = f.:X; existence proof defpred P[set,set] means for X st $1=X holds $2 = f.:X; A1: for x st x in bool dom f ex y st P[x,y] proof let x such that x in bool dom f; take f.:x; thus thesis; end; A2: for x,y1,y2 st x in bool dom f & P[x,y1] & P[x,y2] holds y1=y2 proof let x,y1,y2 such that x in bool dom f and A3: for X st x=X holds y1 = f.:X and A4: for X st x=X holds y2 = f.:X; thus y1 = f.:x by A3 .= y2 by A4; end; consider g being Function such that A5: dom g = bool dom f & for x st x in bool dom f holds P[x,g.x] from FUNCT_1:sch 2(A2,A1); take g; thus thesis by A5; end; uniqueness proof let f1,f2 be Function such that A6: dom f1 = bool dom f and A7: for X st X c= dom f holds f1.X = f.:X and A8: dom f2 = bool dom f and A9: for X st X c= dom f holds f2.X = f.:X; for x st x in bool dom f holds f1.x = f2.x proof let x; assume A10: x in bool dom f; then f1.x = f.:x by A7; hence thesis by A9,A10; end; hence thesis by A6,A8,FUNCT_1:2; end; end; theorem Th7: for f being Function st X in dom(.:f) holds (.:f).X = f.:X proof let f be Function; assume X in dom(.:f); then X in bool dom f by Def1; hence thesis by Def1; end; theorem for f being Function holds (.:f).{} = {} proof let f be Function; {} c= dom f by XBOOLE_1:2; then (.:f).{} = f.:{} by Def1; hence thesis; end; theorem Th9: for f being Function holds rng(.:f) c= bool rng f proof let f be Function; let y; assume y in rng(.:f); then consider x such that A1: x in dom(.:f) & y = (.:f).x by FUNCT_1:def 3; y = f.:x by A1,Th7; then y c= rng f by RELAT_1:111; hence thesis; end; theorem for f being Function holds (.:f).:A c= bool rng f proof let f be Function; (.:f).:A c= rng(.:f) & rng(.:f) c= bool rng f by Th9,RELAT_1:111; hence thesis by XBOOLE_1:1; end; theorem Th11: for f being Function holds (.:f)"B c= bool dom f proof let f be Function; dom(.:f) = bool dom f by Def1; hence thesis by RELAT_1:132; end; theorem for f being Function of X,D holds (.:f)"B c= bool X proof let f be Function of X,D; dom f = X by FUNCT_2:def 1; hence thesis by Th11; end; theorem Th13: for f being Function holds union((.:f).:A) c= f.:(union A) proof let f be Function; let y; assume y in union((.:f).:A); then consider Z such that A1: y in Z and A2: Z in (.:f).:A by TARSKI:def 4; consider X such that A3: X in dom(.:f) and A4: X in A and A5: Z = (.:f).X by A2,FUNCT_1:def 6; y in f.:X by A1,A3,A5,Th7; then consider x such that A6: x in dom f and A7: x in X and A8: y = f.x by FUNCT_1:def 6; x in union A by A4,A7,TARSKI:def 4; hence thesis by A6,A8,FUNCT_1:def 6; end; theorem Th14: for f being Function st A c= bool dom f holds f.:(union A) = union((.:f).:A) proof let f be Function such that A1: A c= bool dom f; A2: f.:(union A) c= union((.:f).:A) proof let y; assume y in f.:(union A); then consider x such that x in dom f and A3: x in union A and A4: y = f.x by FUNCT_1:def 6; consider X such that A5: x in X and A6: X in A by A3,TARSKI:def 4; X in bool dom f by A1,A6; then X in dom(.:f) by Def1; then A7: (.:f).X in (.:f).:A by A6,FUNCT_1:def 6; y in f.:X by A1,A4,A5,A6,FUNCT_1:def 6; then y in (.:f).X by A1,A6,Def1; hence thesis by A7,TARSKI:def 4; end; union((.:f).:A) c= f.:(union A) by Th13; hence thesis by A2,XBOOLE_0:def 10; end; theorem for f being Function of X,D st A c= bool X holds f.:(union A) = union( (.:f).:A) proof let f be Function of X,D; dom f = X by FUNCT_2:def 1; hence thesis by Th14; end; theorem Th16: for f being Function holds union((.:f)"B) c= f"(union B) proof let f be Function; let x; assume x in union((.:f)"B); then consider X such that A1: x in X and A2: X in (.:f)"B by TARSKI:def 4; dom(.:f) = bool dom f by Def1; then A3: X in bool dom f by A2,FUNCT_1:def 7; then A4: f.x in f.:X by A1,FUNCT_1:def 6; (.:f).X in B by A2,FUNCT_1:def 7; then f.:X in B by A3,Def1; then f.x in union B by A4,TARSKI:def 4; hence thesis by A1,A3,FUNCT_1:def 7; end; theorem for f being Function st B c= bool rng f holds f"(union B) = union((.:f ) " B ) proof let f be Function such that A1: B c= bool rng f; A2: f"(union B) c= union((.:f)"B) proof let x; assume A3: x in f"(union B); then f.x in union B by FUNCT_1:def 7; then consider Y such that A4: f.x in Y and A5: Y in B by TARSKI:def 4; A6: f"Y c= dom f by RELAT_1:132; then f"Y in bool dom f; then A7: f"Y in dom(.:f) by Def1; f.:(f"Y) = Y by A1,A5,FUNCT_1:77; then (.:f).(f"Y) in B by A5,A6,Def1; then A8: f"Y in (.:f)"B by A7,FUNCT_1:def 7; x in dom f by A3,FUNCT_1:def 7; then x in f"Y by A4,FUNCT_1:def 7; hence thesis by A8,TARSKI:def 4; end; union((.:f)"B) c= f"(union B) by Th16; hence thesis by A2,XBOOLE_0:def 10; end; theorem for f,g being Function holds .:(g*f) = .:g*.:f proof let f,g be Function; for x holds x in dom .:(g*f) iff x in dom(.:g*.:f) proof let x; thus x in dom .:(g*f) implies x in dom(.:g*.:f) proof assume x in dom .:(g*f); then A1: x in bool dom(g*f) by Def1; dom(g*f) c= dom f by RELAT_1:25; then A2: x c= dom f by A1,XBOOLE_1:1; then x in bool dom f; then A3: x in dom .:f by Def1; f.:x c= dom g by A1,Th2; then f.:x in bool dom g; then f.:x in dom .:g by Def1; then .:f.x in dom .:g by A2,Def1; hence thesis by A3,FUNCT_1:11; end; assume A4: x in dom(.:g*.:f); then A5: x in dom .:f by FUNCT_1:11; .:f.x in dom .:g by A4,FUNCT_1:11; then f.:x in dom .:g by A5,Th7; then A6: f.:x in bool dom g by Def1; x in bool dom f by A5,Def1; then x c= dom(g*f) by A6,Th3; then x in bool dom(g*f); hence thesis by Def1; end; then A7: dom .:(g*f) = dom(.:g*.:f) by TARSKI:1; for x st x in dom .:(g*f) holds (.:(g*f)).x = (.:g*.:f).x proof let x; assume A8: x in dom .:(g*f); then A9: x in bool dom(g*f) by Def1; then A10: f.:x c= dom g by Th2; dom(g*f) c= dom f by RELAT_1:25; then A11: x c= dom f by A9,XBOOLE_1:1; then x in bool dom f; then A12: x in dom .:f by Def1; thus (.:(g*f)).x = (g*f).:x by A8,Th7 .= g.:(f.:x) by RELAT_1:126 .= .:g.(f.:x) by A10,Def1 .= .:g.(.:f.x) by A11,Def1 .= (.:g*.:f).x by A12,FUNCT_1:13; end; hence thesis by A7,FUNCT_1:2; end; theorem Th19: for f being Function holds .:f is Function of bool dom f, bool rng f proof let f be Function; dom .:f = bool dom f & rng.:f c= bool rng f by Def1,Th9; hence thesis by FUNCT_2:def 1,RELSET_1:4; end; theorem Th20: for f being Function of X,Y st Y = {} implies X = {} holds .:f is Function of bool X, bool Y proof let f be Function of X,Y; assume Y = {} implies X = {}; then A1: dom f = X by FUNCT_2:def 1; rng f c= Y by RELAT_1:def 19; then A2: bool rng f c= bool Y by ZFMISC_1:67; A3: .:f is Function of bool dom f, bool rng f by Th19; then rng.:f c= bool rng f by RELAT_1:def 19; then A4: rng.:f c= bool Y by A2,XBOOLE_1:1; dom.:f = bool dom f by A3,FUNCT_2:def 1; hence thesis by A1,A4,FUNCT_2:def 1,RELSET_1:4; end; definition let X,D; let f be Function of X,D; redefine func .:f -> Function of bool X, bool D; coherence by Th20; end; definition let f be Function; func "f -> Function means :Def2: dom it = bool rng f & for Y st Y c= rng f holds it.Y = f"Y; existence proof defpred P[set,set] means for Y st $1=Y holds $2 = f"Y; A1: for y st y in bool rng f ex x st P[y,x] proof let y such that y in bool rng f; take f"y; thus thesis; end; A2: for y,x1,x2 st y in bool rng f & P[y,x1] & P[y,x2] holds x1=x2 proof let y,x1,x2 such that y in bool rng f and A3: for Y st y=Y holds x1 = f"Y and A4: for Y st y=Y holds x2 = f"Y; thus x1 = f"y by A3 .= x2 by A4; end; consider g being Function such that A5: dom g = bool rng f & for y st y in bool rng f holds P[y,g.y] from FUNCT_1:sch 2(A2,A1); take g; thus thesis by A5; end; uniqueness proof let f1,f2 be Function such that A6: dom f1 = bool rng f and A7: for Y st Y c= rng f holds f1.Y = f"Y and A8: dom f2 = bool rng f and A9: for Y st Y c= rng f holds f2.Y = f"Y; for y st y in bool rng f holds f1.y = f2.y proof let y; assume A10: y in bool rng f; then f1.y = f"y by A7; hence thesis by A9,A10; end; hence thesis by A6,A8,FUNCT_1:2; end; end; theorem Th21: for f being Function st Y in dom("f) holds ("f).Y = f"Y proof let f be Function; dom("f) = bool rng f by Def2; hence thesis by Def2; end; theorem Th22: for f being Function holds rng("f) c= bool dom f proof let f be Function; let x; assume x in rng("f); then consider y such that A1: y in dom("f) & x = "f.y by FUNCT_1:def 3; x = f"y by A1,Th21; then x c= dom f by RELAT_1:132; hence thesis; end; theorem for f being Function holds ("f).:B c= bool dom f proof let f be Function; rng("f) c= bool dom f & ("f).:B c= rng("f) by Th22,RELAT_1:111; hence thesis by XBOOLE_1:1; end; theorem for f being Function holds ("f)"A c= bool rng f proof let f be Function; dom("f) = bool rng f by Def2; hence thesis by RELAT_1:132; end; theorem Th25: for f being Function holds union(("f).:B) c= f"(union B) proof let f be Function; let x; assume x in union(("f).:B); then consider X such that A1: x in X and A2: X in ("f).:B by TARSKI:def 4; consider Y such that A3: Y in dom("f) and A4: Y in B and A5: X = "f.Y by A2,FUNCT_1:def 6; A6: ("f).Y = f"Y by A3,Th21; Y in bool rng f by A3,Def2; then A7: f.:X in B by A4,A5,A6,FUNCT_1:77; A8: f"Y c= dom f by RELAT_1:132; then f.x in f.:X by A1,A5,A6,FUNCT_1:def 6; then f.x in union B by A7,TARSKI:def 4; hence thesis by A1,A5,A6,A8,FUNCT_1:def 7; end; theorem for f being Function st B c= bool rng f holds union(("f).:B) = f"( union B ) proof let f be Function such that A1: B c= bool rng f; A2: f"(union B) c= union(("f).:B) proof let x; assume A3: x in f"(union B); then f.x in union B by FUNCT_1:def 7; then consider Y such that A4: f.x in Y and A5: Y in B by TARSKI:def 4; x in dom f by A3,FUNCT_1:def 7; then A6: x in f"Y by A4,FUNCT_1:def 7; Y in bool rng f by A1,A5; then A7: Y in dom("f) by Def2; ("f).Y = f"Y by A1,A5,Def2; then f"Y in ("f).:B by A5,A7,FUNCT_1:def 6; hence thesis by A6,TARSKI:def 4; end; union(("f).:B) c= f"(union B) by Th25; hence thesis by A2,XBOOLE_0:def 10; end; theorem Th27: for f being Function holds union(("f)"A) c= f.:(union A) proof let f be Function; let y; assume y in union(("f)"A); then consider Y such that A1: y in Y and A2: Y in ("f)"A by TARSKI:def 4; dom("f) = bool rng f by Def2; then A3: Y in bool rng f by A2,FUNCT_1:def 7; then consider x such that A4: x in dom f & y = f.x by A1,FUNCT_1:def 3; "f.Y in A by A2,FUNCT_1:def 7; then A5: f"Y in A by A3,Def2; x in f"Y by A1,A4,FUNCT_1:def 7; then x in union A by A5,TARSKI:def 4; hence thesis by A4,FUNCT_1:def 6; end; theorem for f being Function st A c= bool dom f & f is one-to-one holds union( ("f)"A) = f.:(union A) proof let f be Function such that A1: A c= bool dom f and A2: f is one-to-one; A3: f.:(union A) c= union(("f)"A) proof let y; assume y in f.:(union A); then consider x such that A4: x in dom f and A5: x in union A and A6: y = f.x by FUNCT_1:def 6; consider X such that A7: x in X and A8: X in A by A5,TARSKI:def 4; A9: f"(f.:X) c= X by A2,FUNCT_1:82; A10: f.:X c= rng f by RELAT_1:111; then f.:X in bool rng f; then A11: (f.:X) in dom("f) by Def2; X c= f"(f.:X) by A1,A8,FUNCT_1:76; then f"(f.:X) = X by A9,XBOOLE_0:def 10; then ("f).(f.:X) in A by A8,A10,Def2; then A12: (f.:X) in ("f)"A by A11,FUNCT_1:def 7; y in (f.:X) by A4,A6,A7,FUNCT_1:def 6; hence thesis by A12,TARSKI:def 4; end; union(("f)"A) c= f.:(union A) by Th27; hence thesis by A3,XBOOLE_0:def 10; end; theorem Th29: for f being Function holds ("f).:B c= (.:f)"B proof let f be Function; let x; assume x in ("f).:B; then consider Y such that A1: Y in dom ("f) and A2: Y in B and A3: x = "f.Y by FUNCT_1:def 6; A4: "f.Y = f"Y by A1,Th21; then A5: x c= dom f by A3,RELAT_1:132; then x in bool dom f; then A6: x in dom(.:f) by Def1; Y in bool rng f by A1,Def2; then f.:x in B by A2,A3,A4,FUNCT_1:77; then (.:f).x in B by A5,Def1; hence thesis by A6,FUNCT_1:def 7; end; theorem for f being Function st f is one-to-one holds ("f).:B = (.:f)"B proof let f be Function such that A1: f is one-to-one; A2: (.:f)"B c= ("f).:B proof let x; A3: f.:x c= rng f by RELAT_1:111; then f.:x in bool rng f; then A4: f.:x in dom("f) by Def2; assume A5: x in (.:f)"B; then A6: x in dom(.:f) by FUNCT_1:def 7; then x in bool dom f by Def1; then A7: x c= f"(f.:x) by FUNCT_1:76; f"(f.:x) c= x by A1,FUNCT_1:82; then x = f"(f.:x) by A7,XBOOLE_0:def 10; then A8: x =("f).(f.:x) by A3,Def2; (.:f).x in B by A5,FUNCT_1:def 7; then f.:x in B by A6,Th7; hence thesis by A8,A4,FUNCT_1:def 6; end; ("f).:B c= (.:f)"B by Th29; hence thesis by A2,XBOOLE_0:def 10; end; theorem Th31: for f being Function,A be set st A c= bool dom f holds ("f)"A c= (.:f).:A proof let f be Function,A be set such that A1: A c= bool dom f; let y; assume A2: y in ("f)"A; then A3: "f.y in A by FUNCT_1:def 7; y in dom("f) by A2,FUNCT_1:def 7; then A4: y in bool rng f by Def2; then A5: f"y in A by A3,Def2; then f"y in bool dom f by A1; then A6: f"y in dom .:f by Def1; f.:(f"y) = y by A4,FUNCT_1:77; then A7: .:f.(f"y) = y by A1,A5,Def1; f"y in A by A3,A4,Def2; hence thesis by A7,A6,FUNCT_1:def 6; end; theorem Th32: for f being Function,A be set st f is one-to-one holds (.:f).:A c= ("f)"A proof let f be Function,A be set such that A1: f is one-to-one; let y; assume y in (.:f).:A; then consider x such that A2: x in dom(.:f) and A3: x in A and A4: y = .:f.x by FUNCT_1:def 6; A5: x in bool dom f by A2,Def1; then A6: y = f.:x by A4,Def1; then A7: x c= f"y by A5,FUNCT_1:76; A8: y c= rng f by A6,RELAT_1:111; then y in bool rng f; then A9: y in dom("f) by Def2; f"y c= x by A1,A6,FUNCT_1:82; then f"y in A by A3,A7,XBOOLE_0:def 10; then "f.y in A by A8,Def2; hence thesis by A9,FUNCT_1:def 7; end; theorem for f being Function,A be set st f is one-to-one & A c= bool dom f holds ("f)"A = (.:f).:A proof let f be Function,A be set; assume f is one-to-one & A c= bool dom f; then ("f)"A c= (.:f).:A & (.:f).:A c= ("f)"A by Th31,Th32; hence thesis by XBOOLE_0:def 10; end; theorem for f,g being Function st g is one-to-one holds "(g*f) = "f*"g proof let f,g be Function such that A1: g is one-to-one; for y holds y in dom "(g*f) iff y in dom("f*"g) proof let y; thus y in dom "(g*f) implies y in dom("f*"g) proof assume y in dom "(g*f); then A2: y in bool rng(g*f) by Def2; rng(g*f) c= rng g by RELAT_1:26; then A3: y c= rng g by A2,XBOOLE_1:1; then y in bool rng g; then A4: y in dom "g by Def2; g"y c= rng f by A1,A2,Th4; then g"y in bool rng f; then g"y in dom "f by Def2; then "g.y in dom "f by A3,Def2; hence thesis by A4,FUNCT_1:11; end; assume A5: y in dom("f*"g); then A6: y in dom "g by FUNCT_1:11; "g.y in dom "f by A5,FUNCT_1:11; then g"y in dom "f by A6,Th21; then A7: g"y in bool rng f by Def2; y in bool rng g by A6,Def2; then y c= rng(g*f) by A7,Th5; then y in bool rng(g*f); hence thesis by Def2; end; then A8: dom "(g*f) = dom("f*"g) by TARSKI:1; for y st y in dom "(g*f) holds "(g*f).y = ("f*"g).y proof let y; assume A9: y in dom "(g*f); then A10: y in bool rng(g*f) by Def2; then A11: g"y c= rng f by A1,Th4; rng(g*f) c= rng g by RELAT_1:26; then A12: y c= rng g by A10,XBOOLE_1:1; then y in bool rng g; then A13: y in dom "g by Def2; thus "(g*f).y = (g*f)"y by A9,Th21 .= f"(g"y) by RELAT_1:146 .= "f.(g"y) by A11,Def2 .= "f.("g.y) by A12,Def2 .= ("f*"g).y by A13,FUNCT_1:13; end; hence thesis by A8,FUNCT_1:2; end; theorem for f being Function holds "f is Function of bool rng f, bool dom f proof let f be Function; dom"f = bool rng f & rng"f c= bool dom f by Def2,Th22; hence thesis by FUNCT_2:def 1,RELSET_1:4; end; definition let A,X; func chi(A,X) -> Function means :Def3: dom it = X & for x st x in X holds (x in A implies it.x = 1) & (not x in A implies it.x = {}); existence proof defpred P[set,set] means ($1 in A implies $2 = 1) & (not $1 in A implies $2 = {}); A1: for x st x in X ex y st P[x,y] proof let x; assume x in X; not x in A implies ex y st y = {} & (x in A implies y = 1) & (not x in A implies y = {}); hence thesis; end; A2: for x,y1,y2 st x in X & P[x,y1] & P[x,y2] holds y1 = y2; ex f being Function st dom f = X & for x st x in X holds P[x,f.x] from FUNCT_1:sch 2(A2,A1); hence thesis; end; uniqueness proof let f1,f2 be Function such that A3: dom f1 = X and A4: for x st x in X holds (x in A implies f1.x = 1) & (not x in A implies f1.x = {}) and A5: dom f2 = X and A6: for x st x in X holds (x in A implies f2.x = 1) & (not x in A implies f2.x = {}); for x st x in X holds f1.x=f2.x proof let x; assume A7: x in X; then A8: not x in A implies f1.x = {} & f2.x = {} by A4,A6; x in A implies f1.x = 1 & f2.x = 1 by A4,A6,A7; hence thesis by A8; end; hence thesis by A3,A5,FUNCT_1:2; end; end; theorem Th36: chi(A,X).x = 1 implies x in A proof assume A1: chi(A,X).x = 1; per cases; suppose x in X; hence thesis by A1,Def3; end; suppose not x in X; then not x in dom chi(A,X) by Def3; hence thesis by A1,FUNCT_1:def 2; end; end; theorem x in X \ A implies chi(A,X).x = {} proof assume A1: x in X\A; then not x in A by XBOOLE_0:def 5; hence thesis by A1,Def3; end; theorem A c= X & B c= X & chi(A,X) = chi(B,X) implies A = B proof assume that A1: A c= X and A2: B c= X and A3: chi(A,X) = chi(B,X); x in A iff x in B proof thus x in A implies x in B proof assume x in A; then chi(A,X).x = 1 by A1,Def3; hence thesis by A3,Th36; end; assume x in B; then chi(B,X).x = 1 by A2,Def3; hence thesis by A3,Th36; end; hence thesis by TARSKI:1; end; theorem Th39: rng chi(A,X) c= {{},1} proof let y; assume y in rng chi(A,X); then consider x such that A1: x in dom chi(A,X) and A2: y = chi(A,X).x by FUNCT_1:def 3; A3: x in A or not x in A; x in X by A1,Def3; then y = {} or y = 1 by A2,A3,Def3; hence thesis by TARSKI:def 2; end; theorem for f being Function of X,{{},1} holds f = chi(f"{1},X) proof let f be Function of X,{{},1}; now thus A1: dom f = X by FUNCT_2:def 1; let x such that A2: x in X; thus x in f"{1} implies f.x = 1 proof assume x in f"{1}; then f.x in {1} by FUNCT_1:def 7; hence thesis by TARSKI:def 1; end; assume not x in f"{1}; then not f.x in {1} by A1,A2,FUNCT_1:def 7; then A3: rng f c= {{},1} & f.x <> 1 by RELAT_1:def 19,TARSKI:def 1; f.x in rng f by A1,A2,FUNCT_1:def 3; hence f.x = {} by A3,TARSKI:def 2; end; hence thesis by Def3; end; definition let A,X; redefine func chi(A,X) -> Function of X,{{},1}; coherence proof dom chi(A,X) = X & rng chi(A,X) c= {{},1} by Def3,Th39; hence thesis by FUNCT_2:def 1,RELSET_1:4; end; end; notation let Y; let A be Subset of Y; synonym incl A for id A; end; definition let Y; let A be Subset of Y; redefine func incl A -> Function of A,Y; coherence proof A1: rng id A = A & dom id A = A; thus thesis by A1,FUNCT_2:2; end; end; theorem for A being Subset of Y holds incl A = (id Y)|A by Th1; theorem for A being Subset of Y st x in A holds incl(A).x in Y proof let A be Subset of Y such that A1: x in A; dom incl A = A & rng incl A = A; then incl(A).x in A by A1,FUNCT_1:def 3; hence thesis; end; definition let X,Y; func pr1(X,Y) -> Function means :Def4: dom it = [:X,Y:] & for x,y st x in X & y in Y holds it.(x,y) = x; existence proof deffunc F(set,set) = $1; ex f being Function st dom f = [:X,Y:] & for x,y st x in X & y in Y holds f.(x,y) = F(x,y) from Lambda3; hence thesis; end; uniqueness proof let f1,f2 be Function such that A1: dom f1 = [:X,Y:] and A2: for x,y st x in X & y in Y holds f1.(x,y) = x and A3: dom f2 = [:X,Y:] and A4: for x,y st x in X & y in Y holds f2.(x,y) = x; for x,y st x in X & y in Y holds f1.(x,y) = f2.(x,y) proof let x,y; assume A5: x in X & y in Y; then f1.(x,y) = x by A2; hence thesis by A4,A5; end; hence thesis by A1,A3,Th6; end; func pr2(X,Y) -> Function means :Def5: dom it = [:X,Y:] & for x,y st x in X & y in Y holds it.(x,y) = y; existence proof deffunc F(set,set) = $2; ex f being Function st dom f = [:X,Y:] & for x,y st x in X & y in Y holds f.(x,y) = F(x,y) from Lambda3; hence thesis; end; uniqueness proof let f1,f2 be Function such that A6: dom f1 = [:X,Y:] and A7: for x,y st x in X & y in Y holds f1.(x,y) = y and A8: dom f2 = [:X,Y:] and A9: for x,y st x in X & y in Y holds f2.(x,y) = y; for x,y st x in X & y in Y holds f1.(x,y) = f2.(x,y) proof let x,y; assume A10: x in X & y in Y; then f1.(x,y) = y by A7; hence thesis by A9,A10; end; hence thesis by A6,A8,Th6; end; end; theorem Th43: rng pr1(X,Y) c= X proof let x; assume x in rng pr1(X,Y); then consider p such that A1: p in dom pr1(X,Y) and A2: x = pr1(X,Y).p by FUNCT_1:def 3; p in [:X,Y:] by A1,Def4; then consider x1,y1 such that A3: x1 in X & y1 in Y and A4: p = [x1,y1] by ZFMISC_1:def 2; x =pr1(X,Y).(x1,y1) by A2,A4; hence thesis by A3,Def4; end; theorem Y <> {} implies rng pr1(X,Y) = X proof set y = the Element of Y; assume A1: Y <> {}; A2: X c= rng pr1(X,Y) proof let x; assume A3: x in X; then [x,y] in [:X,Y:] by A1,ZFMISC_1:87; then A4: [x,y] in dom pr1(X,Y) by Def4; pr1(X,Y).(x,y) = x by A1,A3,Def4; hence thesis by A4,FUNCT_1:def 3; end; rng pr1(X,Y) c= X by Th43; hence thesis by A2,XBOOLE_0:def 10; end; theorem Th45: rng pr2(X,Y) c= Y proof let y; assume y in rng pr2(X,Y); then consider p such that A1: p in dom pr2(X,Y) and A2: y = pr2(X,Y).p by FUNCT_1:def 3; p in [:X,Y:] by A1,Def5; then consider x1,y1 such that A3: x1 in X & y1 in Y and A4: p = [x1,y1] by ZFMISC_1:def 2; y = pr2(X,Y).(x1,y1) by A2,A4; hence thesis by A3,Def5; end; theorem X <> {} implies rng pr2(X,Y) = Y proof set x = the Element of X; assume A1: X <> {}; A2: Y c= rng pr2(X,Y) proof let y; assume A3: y in Y; then [x,y] in [:X,Y:] by A1,ZFMISC_1:87; then A4: [x,y] in dom pr2(X,Y) by Def5; pr2(X,Y).(x,y) = y by A1,A3,Def5; hence thesis by A4,FUNCT_1:def 3; end; rng pr2(X,Y) c= Y by Th45; hence thesis by A2,XBOOLE_0:def 10; end; definition let X,Y; redefine func pr1(X,Y) -> Function of [:X,Y:],X; coherence proof per cases; suppose X = {} implies [:X,Y:] = {}; dom pr1(X,Y) = [:X,Y:] & rng pr1(X,Y) c= X by Def4,Th43; hence thesis by FUNCT_2:2; end; suppose X = {} & [:X,Y:] <> {}; hence thesis by ZFMISC_1:90; end; end; redefine func pr2(X,Y) -> Function of [:X,Y:],Y; coherence proof per cases; suppose Y = {} implies [:X,Y:] = {}; dom pr2(X,Y) = [:X,Y:] & rng pr2(X,Y) c= Y by Def5,Th45; hence thesis by FUNCT_2:2; end; suppose Y = {} & [:X,Y:] <> {}; hence thesis by ZFMISC_1:90; end; end; end; definition let X; func delta(X) -> Function means :Def6: dom it = X & for x st x in X holds it .x = [x,x]; existence proof deffunc F(set) = [$1,$1]; ex f being Function st dom f = X & for x st x in X holds f.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let f1,f2 be Function such that A1: dom f1 = X and A2: for x st x in X holds f1.x = [x,x] and A3: dom f2 = X and A4: for x st x in X holds f2.x = [x,x]; for x st x in X holds f1.x = f2.x proof let x; assume A5: x in X; then f1.x = [x,x] by A2; hence thesis by A4,A5; end; hence thesis by A1,A3,FUNCT_1:2; end; end; theorem Th47: rng delta X c= [:X,X:] proof let y; assume y in rng delta X; then consider x such that A1: x in dom delta X and A2: y = (delta X).x by FUNCT_1:def 3; A3: x in X by A1,Def6; then y = [x,x] by A2,Def6; hence thesis by A3,ZFMISC_1:87; end; definition let X; redefine func delta(X) -> Function of X,[:X,X:]; coherence proof dom delta X = X & rng delta X c= [:X,X:] by Def6,Th47; hence thesis by FUNCT_2:2; end; end; definition let f,g be Function; func <:f,g:> -> Function means :Def7: dom it = dom f /\ dom g & for x st x in dom it holds it.x = [f.x,g.x]; existence proof deffunc F(set) = [f.$1,g.$1]; ex fg being Function st dom fg = dom f /\ dom g & for x st x in dom f /\ dom g holds fg.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let f1,f2 be Function such that A1: dom f1 = dom f /\ dom g and A2: for x st x in dom f1 holds f1.x = [f.x,g.x] and A3: dom f2 = dom f /\ dom g and A4: for x st x in dom f2 holds f2.x = [f.x,g.x]; for x st x in dom f /\ dom g holds f1.x=f2.x proof let x; assume A5: x in dom f /\ dom g; then f1.x=[f.x,g.x] by A1,A2; hence thesis by A3,A4,A5; end; hence thesis by A1,A3,FUNCT_1:2; end; end; registration let f be empty Function, g be Function; cluster <:f,g:> -> empty; coherence proof dom f = {}; then dom<:f,g:> = {} /\ dom g by Def7; hence thesis; end; cluster <:g,f:> -> empty; coherence proof dom f = {}; then dom<:g,f:> = {} /\ dom g by Def7; hence thesis; end; end; theorem Th48: for f,g being Function st x in dom f /\ dom g holds <:f,g:>.x = [f.x,g.x] proof let f,g be Function; assume x in dom f /\ dom g; then x in dom <:f,g:> by Def7; hence thesis by Def7; end; theorem Th49: for f,g being Function st dom f = X & dom g = X & x in X holds <:f,g:>.x = [f.x,g.x] proof let f,g be Function; assume dom f = X & dom g = X & x in X; then x in dom f /\ dom g; then x in dom <:f,g:> by Def7; hence thesis by Def7; end; theorem Th50: for f,g being Function st dom f = X & dom g = X holds dom <:f,g :> = X proof let f,g be Function; dom <:f,g:> = dom f /\ dom g by Def7; hence thesis; end; theorem Th51: for f,g being Function holds rng <:f,g:> c= [:rng f,rng g:] proof let f,g be Function; let q; assume q in rng <:f,g:>; then consider x such that A1: x in dom <:f,g:> and A2: q = <:f,g:>.x by FUNCT_1:def 3; A3: x in dom f /\ dom g by A1,Def7; then x in dom f by XBOOLE_0:def 4; then A4: f.x in rng f by FUNCT_1:def 3; x in dom g by A3,XBOOLE_0:def 4; then A5: g.x in rng g by FUNCT_1:def 3; q = [f.x,g.x] by A1,A2,Def7; hence thesis by A4,A5,ZFMISC_1:87; end; theorem Th52: for f,g being Function st dom f = dom g & rng f c= Y & rng g c= Z holds pr1(Y,Z)*<:f,g:> = f & pr2(Y,Z)*<:f,g:> = g proof let f,g be Function such that A1: dom f = dom g and A2: rng f c= Y & rng g c= Z; A3: [:rng f, rng g:] c= [:Y,Z:] by A2,ZFMISC_1:96; A4: rng <:f,g:> c= [:rng f, rng g:] by Th51; dom pr1(Y,Z) = [:Y, Z:] by Def4; then A5: dom(pr1(Y,Z)*<:f,g:>) = dom <:f,g:> by A3,A4,RELAT_1:27,XBOOLE_1:1; then A6: dom(pr1(Y,Z)*<:f,g:>) = dom f by A1,Th50; x in dom f implies (pr1(Y,Z)*<:f,g:>).x = f.x proof assume A7: x in dom f; then A8: f.x in rng f & g.x in rng g by A1,FUNCT_1:def 3; thus (pr1(Y,Z)*<:f,g:>).x = pr1(Y,Z).(<:f,g:>.x) by A6,A7,FUNCT_1:12 .= pr1(Y,Z).(f.x,g.x) by A5,A6,A7,Def7 .= f.x by A2,A8,Def4; end; hence pr1(Y,Z)*<:f,g:> = f by A6,FUNCT_1:2; dom pr2(Y,Z) = [:Y, Z:] by Def5; then A9: dom(pr2(Y,Z)*<:f,g:>) = dom <:f,g:> by A3,A4,RELAT_1:27,XBOOLE_1:1; then A10: dom(pr2(Y,Z)*<:f,g:>) = dom g by A1,Th50; x in dom g implies (pr2(Y,Z)*<:f,g:>).x = g.x proof assume A11: x in dom g; then A12: f.x in rng f & g.x in rng g by A1,FUNCT_1:def 3; thus (pr2(Y,Z)*<:f,g:>).x = pr2(Y,Z).(<:f,g:>.x) by A10,A11,FUNCT_1:12 .= pr2(Y,Z).(f.x,g.x) by A9,A10,A11,Def7 .= g.x by A2,A12,Def5; end; hence thesis by A10,FUNCT_1:2; end; theorem Th53: <:pr1(X,Y),pr2(X,Y):> = id [:X,Y:] proof dom pr1(X,Y) = [:X,Y:] & dom pr2(X,Y) = [:X,Y:] by Def4,Def5; then A1: dom <:pr1(X,Y),pr2(X,Y):> = [:X,Y:] by Th50; A2: for x,y st x in X & y in Y holds <:pr1(X,Y),pr2(X,Y):>.(x,y) = (id [:X,Y :]).(x,y) proof let x,y; assume A3: x in X & y in Y; then A4: [x,y] in [:X,Y:] by ZFMISC_1:87; hence <:pr1(X,Y),pr2(X,Y):>.(x,y) = [pr1(X,Y).(x,y),pr2(X,Y).(x,y)] by A1 ,Def7 .= [x,pr2(X,Y).(x,y)] by A3,Def4 .= [x,y] by A3,Def5 .= (id [:X,Y:]).(x,y) by A4,FUNCT_1:18; end; dom id [:X,Y:] = [:X,Y:]; hence thesis by A1,A2,Th6; end; theorem Th54: for f,g,h,k being Function st dom f = dom g & dom k = dom h & <: f,g:> = <:k,h:> holds f = k & g = h proof let f,g,h,k be Function such that A1: dom f = dom g and A2: dom k = dom h and A3: <:f,g:> = <:k,h:>; A4: dom <:f,g:> = dom f by A1,Th50; x in dom f implies f.x = k.x proof assume x in dom f; then <:f,g:>.x = [f.x,g.x] & <:k,h:>.x = [k.x,h.x] by A3,A4,Def7; hence thesis by A3,XTUPLE_0:1; end; hence f = k by A2,A3,A4,Th50,FUNCT_1:2; A5: dom <:f,g:> = dom g by A1,Th50; x in dom g implies g.x = h.x proof assume x in dom g; then <:f,g:>.x = [f.x,g.x] & <:k,h:>.x = [k.x,h.x] by A3,A5,Def7; hence thesis by A3,XTUPLE_0:1; end; hence thesis by A2,A3,A5,Th50,FUNCT_1:2; end; theorem for f,g,h being Function holds <:f*h,g*h:> = <:f,g:>*h proof let f,g,h be Function; x in dom <:f*h,g*h:> iff x in dom(<:f,g:>*h) proof thus x in dom <:f*h,g*h:> implies x in dom(<:f,g:>*h) proof assume x in dom <:f*h,g*h:>; then A1: x in dom(f*h) /\ dom(g*h) by Def7; then A2: x in dom(f*h) by XBOOLE_0:def 4; x in dom(g*h) by A1,XBOOLE_0:def 4; then A3: h.x in dom g by FUNCT_1:11; h.x in dom f by A2,FUNCT_1:11; then h.x in dom f /\ dom g by A3,XBOOLE_0:def 4; then A4: h.x in dom <:f,g:> by Def7; x in dom h by A2,FUNCT_1:11; hence thesis by A4,FUNCT_1:11; end; assume A5: x in dom(<:f,g:>*h); then A6: x in dom h by FUNCT_1:11; h.x in dom <:f,g:> by A5,FUNCT_1:11; then A7: h.x in dom f /\ dom g by Def7; then h.x in dom g by XBOOLE_0:def 4; then A8: x in dom(g*h) by A6,FUNCT_1:11; h.x in dom f by A7,XBOOLE_0:def 4; then x in dom(f*h) by A6,FUNCT_1:11; then x in dom(f*h) /\ dom(g*h) by A8,XBOOLE_0:def 4; hence thesis by Def7; end; then A9: dom <:f*h,g*h:> = dom(<:f,g:>*h) by TARSKI:1; for x st x in dom <:f*h,g*h:> holds <:f*h,g*h:>.x = (<:f,g:>*h).x proof let x; assume A10: x in dom <:f*h,g*h:>; then A11: x in dom(f*h) /\ dom(g*h) by Def7; then A12: x in dom(f*h) by XBOOLE_0:def 4; then A13: x in dom h by FUNCT_1:11; A14: x in dom(g*h) by A11,XBOOLE_0:def 4; then A15: h.x in dom g by FUNCT_1:11; h.x in dom f by A12,FUNCT_1:11; then A16: h.x in dom f /\ dom g by A15,XBOOLE_0:def 4; thus <:f*h,g*h:>.x = [(f*h).x,(g*h).x] by A10,Def7 .= [f.(h.x),(g*h).x] by A12,FUNCT_1:12 .= [f.(h.x),g.(h.x)] by A14,FUNCT_1:12 .= <:f,g:>.(h.x) by A16,Th48 .= (<:f,g:>*h).x by A13,FUNCT_1:13; end; hence thesis by A9,FUNCT_1:2; end; theorem for f,g being Function holds <:f,g:>.:A c= [:f.:A,g.:A:] proof let f,g be Function; let y; assume y in <:f,g:>.:A; then consider x such that A1: x in dom <:f,g:> and A2: x in A and A3: y = <:f,g:>.x by FUNCT_1:def 6; A4: x in dom f /\ dom g by A1,Def7; then x in dom f by XBOOLE_0:def 4; then A5: f.x in f.:A by A2,FUNCT_1:def 6; x in dom g by A4,XBOOLE_0:def 4; then A6: g.x in g.: A by A2,FUNCT_1:def 6; y = [f.x,g.x] by A1,A3,Def7; hence thesis by A5,A6,ZFMISC_1:def 2; end; theorem for f,g being Function holds <:f,g:>"[:B,C:] = f"B /\ g"C proof let f,g be Function; x in <:f,g:>"[:B,C:] iff x in f"B /\ g"C proof thus x in <:f,g:>"[:B,C:] implies x in f"B /\ g"C proof assume A1: x in <:f,g:>"[:B,C:]; then <:f,g:>.x in [:B,C:] by FUNCT_1:def 7; then consider y1,y2 such that A2: y1 in B and A3: y2 in C and A4: <:f,g:>.x = [y1,y2] by ZFMISC_1:def 2; A5: x in dom <:f,g:> by A1,FUNCT_1:def 7; then A6: x in dom f /\ dom g by Def7; then A7: x in dom g by XBOOLE_0:def 4; A8: [y1,y2] = [f.x,g.x] by A4,A5,Def7; then y2 = g.x by XTUPLE_0:1; then A9: x in g"C by A3,A7,FUNCT_1:def 7; A10: x in dom f by A6,XBOOLE_0:def 4; y1 =f.x by A8,XTUPLE_0:1; then x in f"B by A2,A10,FUNCT_1:def 7; hence thesis by A9,XBOOLE_0:def 4; end; assume A11: x in f"B /\ g"C; then A12: x in g"C by XBOOLE_0:def 4; then A13: x in dom g by FUNCT_1:def 7; A14: x in f"B by A11,XBOOLE_0:def 4; then x in dom f by FUNCT_1:def 7; then A15: x in dom f /\ dom g by A13,XBOOLE_0:def 4; then A16: x in dom <:f,g:> by Def7; A17: g.x in C by A12,FUNCT_1:def 7; f.x in B by A14,FUNCT_1:def 7; then [f.x,g.x] in [:B,C:] by A17,ZFMISC_1:def 2; then <:f,g:>.x in [:B,C:] by A15,Th48; hence thesis by A16,FUNCT_1:def 7; end; hence thesis by TARSKI:1; end; theorem Th58: for f being Function of X,Y for g being Function of X,Z st (Y = {} implies X = {}) & (Z = {} implies X = {}) holds <:f,g:> is Function of X,[:Y ,Z:] proof let f be Function of X,Y; let g be Function of X,Z; assume A1: ( Y = {} implies X = {})&( Z = {} implies X = {}); per cases; suppose [:Y,Z:] = {} implies X = {}; rng f c= Y & rng g c= Z by RELAT_1:def 19; then A2: [:rng f,rng g:] c= [:Y,Z:] by ZFMISC_1:96; dom f = X & dom g = X by A1,FUNCT_2:def 1; then A3: dom<:f,g:> = X by Th50; rng <:f,g:> c= [:rng f,rng g:] by Th51; then rng<:f,g:> c= [:Y,Z:] by A2,XBOOLE_1:1; hence thesis by A3,FUNCT_2:2; end; suppose [:Y,Z:] = {} & X <> {}; hence thesis by A1; end; end; definition let X,D1,D2; let f1 be Function of X,D1; let f2 be Function of X,D2; redefine func <:f1,f2:> -> Function of X,[:D1,D2:]; coherence by Th58; end; theorem for f1 being Function of C,D1 for f2 being Function of C,D2 for c being Element of C holds <:f1,f2:>.c = [f1.c,f2.c] proof let f1 be Function of C,D1; let f2 be Function of C,D2; let c be Element of C; dom f1 = C & dom f2 = C by FUNCT_2:def 1; hence thesis by Th49; end; theorem for f being Function of X,Y for g being Function of X,Z holds rng <:f, g:> c= [:Y,Z:] proof let f be Function of X,Y; let g be Function of X,Z; rng f c= Y & rng g c= Z by RELAT_1:def 19; then A1: [:rng f,rng g:] c= [:Y,Z:] by ZFMISC_1:96; rng <:f,g:> c= [:rng f,rng g:] by Th51; hence thesis by A1,XBOOLE_1:1; end; theorem Th61: for f being Function of X,Y for g being Function of X,Z st (Y = {} implies X = {}) & (Z = {} implies X = {}) holds pr1(Y,Z)*<:f,g:> = f & pr2(Y ,Z)*<:f,g:> = g proof let f be Function of X,Y; let g be Function of X,Z; assume ( Y = {} implies X = {})&( Z = {} implies X = {}); then A1: dom f = X & dom g = X by FUNCT_2:def 1; rng f c= Y & rng g c= Z by RELAT_1:def 19; hence thesis by A1,Th52; end; theorem for f being Function of X,D1 for g being Function of X,D2 holds pr1(D1 ,D2)*<:f,g:> = f & pr2(D1,D2)*<:f,g:> = g by Th61; theorem for f1,f2 being Function of X,Y for g1,g2 being Function of X,Z st (Y = {} implies X = {}) & (Z = {} implies X = {}) & <:f1,g1:> = <:f2,g2:> holds f1 = f2 & g1 = g2 proof let f1,f2 be Function of X,Y; let g1,g2 be Function of X,Z; assume that A1: Y = {} implies X = {} and A2: Z = {} implies X = {}; A3: dom g1 = X & dom g2 = X by A2,FUNCT_2:def 1; dom f1 = X & dom f2 = X by A1,FUNCT_2:def 1; hence thesis by A3,Th54; end; theorem for f1,f2 being Function of X,D1 for g1,g2 being Function of X,D2 st <:f1,g1:> = <:f2,g2:> holds f1 = f2 & g1 = g2 proof let f1,f2 be Function of X,D1; let g1,g2 be Function of X,D2; A1: dom g1 = X & dom g2 = X by FUNCT_2:def 1; dom f1 = X & dom f2 = X by FUNCT_2:def 1; hence thesis by A1,Th54; end; definition let f,g be Function; func [:f,g:] -> Function means :Def8: dom it = [:dom f, dom g:] & for x,y st x in dom f & y in dom g holds it.(x,y) = [f.x,g.y]; existence proof deffunc F(set,set) = [f.$1,g.$2]; ex F being Function st dom F = [:dom f,dom g:] & for x,y st x in dom f & y in dom g holds F.(x,y) = F(x,y) from Lambda3; hence thesis; end; uniqueness proof let fg1, fg2 be Function such that A1: dom fg1 = [:dom f, dom g:] and A2: for x,y st x in dom f & y in dom g holds fg1.(x,y) = [f.x,g.y] and A3: dom fg2 = [:dom f, dom g:] and A4: for x,y st x in dom f & y in dom g holds fg2.(x,y) = [f.x,g.y]; for p st p in [:dom f,dom g:] holds fg1.p=fg2.p proof let p; assume p in [:dom f,dom g:]; then consider x,y such that A5: x in dom f & y in dom g and A6: p = [x,y] by ZFMISC_1:def 2; fg1.(x,y) = [f.x,g.y] & fg2.(x,y) = [f.x,g.y] by A2,A4,A5; hence thesis by A6; end; hence thesis by A1,A3,FUNCT_1:2; end; end; theorem Th65: for f,g being Function, x,y st [x,y] in [:dom f,dom g:] holds [: f,g:].(x,y) = [f.x,g.y] proof let f,g be Function, x,y; assume [x,y] in [:dom f,dom g:]; then x in dom f & y in dom g by ZFMISC_1:87; hence thesis by Def8; end; theorem Th66: for f,g being Function holds [:f,g:] = <:f*pr1(dom f,dom g),g* pr2(dom f,dom g):> proof let f,g be Function; A1: dom pr1(dom f,dom g) = [:dom f,dom g:] by Def4; A2: dom pr2(dom f,dom g) = [:dom f,dom g:] by Def5; rng pr2(dom f,dom g) c= dom g by Th45; then A3: dom(g*pr2(dom f,dom g)) = [:dom f,dom g:] by A2,RELAT_1:27; rng pr1(dom f,dom g) c= dom f by Th43; then dom(f*pr1(dom f,dom g)) = [:dom f,dom g:] by A1,RELAT_1:27; then A4: dom <:f*pr1(dom f,dom g),g*pr2(dom f,dom g):> = [:dom f,dom g:] by A3,Th50; A5: for x,y st x in dom f & y in dom g holds [:f,g:].(x,y) = <:f*pr1(dom f, dom g),g*pr2(dom f,dom g):>.(x,y) proof let x,y; assume A6: x in dom f & y in dom g; then A7: [x,y] in [:dom f,dom g:] by ZFMISC_1:87; thus [:f,g:].(x,y) = [f.x,g.y] by A6,Def8 .= [f.(pr1(dom f,dom g).(x,y)),g.y] by A6,Def4 .= [f.(pr1(dom f,dom g).(x,y)),g.(pr2(dom f,dom g).(x,y))] by A6,Def5 .= [(f*pr1(dom f,dom g)).(x,y),g.(pr2(dom f,dom g).(x,y))] by A1,A7, FUNCT_1:13 .= [(f*pr1(dom f,dom g)).(x,y),(g*pr2(dom f,dom g)).(x,y)] by A2,A7, FUNCT_1:13 .= <:f*pr1(dom f,dom g),g*pr2(dom f,dom g):>.(x,y) by A4,A7,Def7; end; dom [:f,g:] = [:dom f,dom g:] by Def8; hence thesis by A4,A5,Th6; end; theorem Th67: for f,g being Function holds rng [:f,g:] = [:rng f,rng g:] proof let f,g be Function; q in rng [:f,g:] iff q in [:rng f,rng g:] proof A1: dom [:f,g:]=[:dom f,dom g:] by Def8; thus q in rng [:f,g:] implies q in [:rng f,rng g:] proof assume q in rng [:f,g:]; then consider p such that A2: p in dom [:f,g:] and A3: q = [:f,g:].p by FUNCT_1:def 3; p in [:dom f, dom g:] by A2,Def8; then consider x,y such that A4: x in dom f & y in dom g and A5: p = [x,y] by ZFMISC_1:def 2; A6: f.x in rng f & g.y in rng g by A4,FUNCT_1:def 3; q = [:f,g:].(x,y) by A3,A5 .= [f.x,g.y] by A4,Def8; hence thesis by A6,ZFMISC_1:87; end; assume q in [:rng f,rng g:]; then consider y1,y2 such that A7: y1 in rng f and A8: y2 in rng g and A9: q = [y1,y2] by ZFMISC_1:def 2; consider x2 such that A10: x2 in dom g and A11: y2 = g.x2 by A8,FUNCT_1:def 3; consider x1 such that A12: x1 in dom f and A13: y1 = f.x1 by A7,FUNCT_1:def 3; A14: [x1,x2] in [:dom f,dom g:] by A12,A10,ZFMISC_1:87; [:f,g:].(x1,x2)=q by A9,A12,A13,A10,A11,Def8; hence thesis by A14,A1,FUNCT_1:def 3; end; hence thesis by TARSKI:1; end; theorem Th68: for f,g being Function st dom f = X & dom g = X holds <:f,g:> = [:f,g:]*(delta X) proof let f,g be Function such that A1: dom f = X & dom g = X; A2: dom delta X = X by Def6; rng delta X c= [:X,X:] by Th47; then rng delta X c= dom [:f,g:] by A1,Def8; then A3: dom([:f,g:]*(delta X)) = X by A2,RELAT_1:27; dom f /\ dom g = X by A1; then A4: dom <:f,g:> = X by Def7; for x st x in X holds <:f,g:>.x = ([:f,g:]*(delta X)).x proof let x; assume A5: x in X; hence <:f,g:>.x = [f.x,g.x] by A4,Def7 .= [:f,g:].(x,x) by A1,A5,Def8 .= [:f,g:].((delta X).x) by A5,Def6 .= ([:f,g:]*(delta X)).x by A3,A5,FUNCT_1:12; end; hence thesis by A4,A3,FUNCT_1:2; end; theorem [:id X, id Y:] = id [:X,Y:] proof rng pr1(X,Y) c= X by Th43; then A1: (id X)*pr1(X,Y) = pr1(X,Y) by RELAT_1:53; rng pr2(X,Y) c= Y by Th45; then A2: (id Y)*pr2(X,Y) = pr2(X,Y) by RELAT_1:53; dom id X = X & dom id Y = Y; hence [:id X, id Y:] = <:pr1(X,Y),pr2(X,Y):> by A1,A2,Th66 .= id [:X,Y:] by Th53; end; theorem for f,g,h,k being Function holds [:f,h:]*<:g,k:> = <:f*g,h*k:> proof let f,g,h,k be Function; x in dom([:f,h:]*<:g,k:>) iff x in dom <:f*g,h*k:> proof thus x in dom([:f,h:]*<:g,k:>) implies x in dom <:f*g,h*k:> proof assume A1: x in dom([:f,h:]*<:g,k:>); then A2: x in dom <:g,k:> by FUNCT_1:11; then A3: x in dom g /\ dom k by Def7; then A4: x in dom g by XBOOLE_0:def 4; A5: x in dom k by A3,XBOOLE_0:def 4; <:g,k:>.x in dom [:f,h:] by A1,FUNCT_1:11; then [g.x,k.x] in dom [:f,h:] by A2,Def7; then A6: [g.x,k.x] in [:dom f,dom h:] by Def8; then k.x in dom h by ZFMISC_1:87; then A7: x in dom(h*k) by A5,FUNCT_1:11; g.x in dom f by A6,ZFMISC_1:87; then x in dom(f*g) by A4,FUNCT_1:11; then x in dom(f*g) /\ dom(h*k) by A7,XBOOLE_0:def 4; hence thesis by Def7; end; assume x in dom <:f*g,h*k:>; then A8: x in dom(f*g) /\ dom(h*k) by Def7; then A9: x in dom(f*g) by XBOOLE_0:def 4; A10: x in dom(h*k) by A8,XBOOLE_0:def 4; then A11: x in dom k by FUNCT_1:11; x in dom g by A9,FUNCT_1:11; then x in dom g /\ dom k by A11,XBOOLE_0:def 4; then A12: x in dom <:g,k:> by Def7; A13: k.x in dom h by A10,FUNCT_1:11; g.x in dom f by A9,FUNCT_1:11; then [g.x,k.x] in [:dom f,dom h:] by A13,ZFMISC_1:87; then [g.x,k.x] in dom [:f,h:] by Def8; then <:g,k:>.x in dom [:f,h:] by A12,Def7; hence thesis by A12,FUNCT_1:11; end; then A14: dom([:f,h:]*<:g,k:>) = dom <:f*g,h*k:> by TARSKI:1; for x st x in dom([:f,h:]*<:g,k:>) holds ([:f,h:]*<:g,k:>).x = <:f*g,h* k :> . x proof let x; assume A15: x in dom([:f,h:]*<:g,k:>); then A16: x in dom <:g,k:> by FUNCT_1:11; then A17: x in dom g /\ dom k by Def7; then A18: x in dom g by XBOOLE_0:def 4; <:g,k:>.x in dom [:f,h:] by A15,FUNCT_1:11; then [g.x,k.x] in dom [:f,h:] by A16,Def7; then A19: [g.x,k.x] in [:dom f,dom h:] by Def8; then A20: g.x in dom f by ZFMISC_1:87; A21: x in dom k by A17,XBOOLE_0:def 4; A22: k.x in dom h by A19,ZFMISC_1:87; then A23: x in dom(h*k) by A21,FUNCT_1:11; x in dom(f*g) by A20,A18,FUNCT_1:11; then A24: x in dom(f*g) /\ dom(h*k) by A23,XBOOLE_0:def 4; thus ([:f,h:]*<:g,k:>).x = [:f,h:].(<:g,k:>.x) by A15,FUNCT_1:12 .= [:f,h:].(g.x,k.x) by A16,Def7 .= [f.(g.x),h.(k.x)] by A20,A22,Def8 .= [(f*g).x,h.(k.x)] by A18,FUNCT_1:13 .= [(f*g).x,(h*k).x] by A21,FUNCT_1:13 .= <:f*g,h*k:>.x by A24,Th48; end; hence thesis by A14,FUNCT_1:2; end; theorem for f,g,h,k being Function holds [:f,h:]*[:g,k:] = [:f*g,h*k:] proof let f,g,h,k be Function; A1: for x,y st x in dom(f*g) & y in dom(h*k) holds ([:f,h:]*[:g,k:]).(x,y) = [:f*g,h*k:].(x,y) proof let x,y such that A2: x in dom(f*g) and A3: y in dom(h*k); A4: g.x in dom f & k.y in dom h by A2,A3,FUNCT_1:11; A5: x in dom g & y in dom k by A2,A3,FUNCT_1:11; then [x,y] in [:dom g, dom k:] by ZFMISC_1:87; then [x,y] in dom [:g,k:] by Def8; hence ([:f,h:]*[:g,k:]).(x,y) = [:f,h:].([:g,k:].(x,y)) by FUNCT_1:13 .= [:f,h:].(g.x,k.y) by A5,Def8 .= [f.(g.x),h.(k.y)] by A4,Def8 .= [(f*g).x,h.(k.y)] by A2,FUNCT_1:12 .= [(f*g).x,(h*k).y] by A3,FUNCT_1:12 .= [:f*g,h*k:].(x,y) by A2,A3,Def8; end; p in dom([:f,h:]*[:g,k:]) iff p in [:dom(f*g),dom(h*k):] proof A6: dom [:g,k:] = [:dom g, dom k:] by Def8; A7: dom [:f,h:] = [:dom f, dom h:] by Def8; thus p in dom([:f,h:]*[:g,k:]) implies p in [:dom(f*g),dom(h*k):] proof assume A8: p in dom([:f,h:]*[:g,k:]); then A9: [:g,k:].p in dom [:f,h:] by FUNCT_1:11; A10: p in dom [:g,k:] by A8,FUNCT_1:11; then consider x1,x2 such that A11: x1 in dom g and A12: x2 in dom k and A13: p = [x1,x2] by A6,ZFMISC_1:def 2; [:g,k:].(x1,x2) =[:g,k:].p by A13; then A14: [g.x1,k.x2] in dom [:f,h:] by A6,A10,A9,A13,Th65; then k.x2 in dom h by A7,ZFMISC_1:87; then A15: x2 in dom(h*k) by A12,FUNCT_1:11; g.x1 in dom f by A7,A14,ZFMISC_1:87; then x1 in dom(f*g) by A11,FUNCT_1:11; hence thesis by A13,A15,ZFMISC_1:87; end; assume p in [:dom(f*g),dom(h*k):]; then consider x1,x2 such that A16: x1 in dom(f*g) & x2 in dom(h*k) and A17: p = [x1,x2] by ZFMISC_1:def 2; x1 in dom g & x2 in dom k by A16,FUNCT_1:11; then A18: [x1,x2] in dom [:g,k:] by A6,ZFMISC_1:87; g.x1 in dom f & k.x2 in dom h by A16,FUNCT_1:11; then [g.x1,k.x2] in dom [:f,h:] by A7,ZFMISC_1:87; then [:g,k:].(x1,x2) in dom [:f,h:] by A6,A18,Th65; hence thesis by A17,A18,FUNCT_1:11; end; then A19: dom([:f,h:]*[:g,k:]) = [:dom(f*g),dom(h*k):] by TARSKI:1; [:dom(f*g),dom(h*k):] = dom [:f*g,h*k:] by Def8; hence thesis by A19,A1,Th6; end; theorem for f,g being Function holds [:f,g:].:[:B,A:] = [:f.:B,g.:A:] proof let f,g be Function; q in [:f,g:].:[:B,A:] iff q in [:f.:B,g.:A:] proof A1: [:dom f,dom g:] = dom [:f,g:] by Def8; thus q in [:f,g:].:[:B,A:] implies q in [:f.:B,g.:A:] proof assume q in [:f,g:].:[:B,A:]; then consider p such that A2: p in dom [:f,g:] and A3: p in [:B,A:] and A4: q = [:f,g:].p by FUNCT_1:def 6; dom [:f,g:] = [:dom f,dom g:] by Def8; then consider x,y such that A5: x in dom f and A6: y in dom g and A7: p =[x,y] by A2,ZFMISC_1:def 2; x in B by A3,A7,ZFMISC_1:87; then A8: f.x in f.:B by A5,FUNCT_1:def 6; y in A by A3,A7,ZFMISC_1:87; then A9: g.y in g.:A by A6,FUNCT_1:def 6; q = [:f,g:].(x,y) by A4,A7; then q=[f.x,g.y] by A5,A6,Def8; hence thesis by A8,A9,ZFMISC_1:87; end; assume q in [:f.:B,g.:A:]; then consider y1,y2 such that A10: y1 in f.:B and A11: y2 in g.:A and A12: q = [y1,y2] by ZFMISC_1:def 2; consider x1 such that A13: x1 in dom f and A14: x1 in B and A15: y1 = f.x1 by A10,FUNCT_1:def 6; consider x2 such that A16: x2 in dom g and A17: x2 in A and A18: y2 = g.x2 by A11,FUNCT_1:def 6; A19: [:f,g:].(x1,x2) = [f.x1,g.x2] by A13,A16,Def8; [x1,x2] in [:dom f,dom g:] & [x1,x2] in [:B,A:] by A13,A14,A16,A17, ZFMISC_1:87; hence thesis by A12,A15,A18,A1,A19,FUNCT_1:def 6; end; hence thesis by TARSKI:1; end; theorem for f,g being Function holds [:f,g:]"[:B,A:] = [:f"B,g"A:] proof let f,g be Function; q in [:f,g:]"[:B,A:] iff q in [:f"B,g"A:] proof thus q in [:f,g:]"[:B,A:] implies q in [:f"B,g"A:] proof assume A1: q in [:f,g:]"[:B,A:]; then A2: [:f,g:].q in [:B,A:] by FUNCT_1:def 7; q in dom [:f,g:] by A1,FUNCT_1:def 7; then q in [:dom f,dom g:] by Def8; then consider x1,x2 such that A3: x1 in dom f and A4: x2 in dom g and A5: q = [x1,x2] by ZFMISC_1:def 2; [:f,g:].q = [:f,g:].(x1,x2) by A5; then A6: [f.x1,g.x2] in [:B,A:] by A3,A4,A2,Def8; then g.x2 in A by ZFMISC_1:87; then A7: x2 in g"A by A4,FUNCT_1:def 7; f.x1 in B by A6,ZFMISC_1:87; then x1 in f"B by A3,FUNCT_1:def 7; hence thesis by A5,A7,ZFMISC_1:87; end; assume q in [:f"B,g"A:]; then consider x1,x2 such that A8: x1 in f"B & x2 in g"A and A9: q = [x1,x2] by ZFMISC_1:def 2; f.x1 in B & g.x2 in A by A8,FUNCT_1:def 7; then A10: [f.x1,g.x2] in [:B,A:] by ZFMISC_1:87; x1 in dom f & x2 in dom g by A8,FUNCT_1:def 7; then A11: [x1,x2] in [:dom f,dom g:] & [:f,g:].(x1,x2) = [f.x1,g.x2] by Def8, ZFMISC_1:87; [:dom f,dom g:] = dom [:f,g:] by Def8; hence thesis by A9,A11,A10,FUNCT_1:def 7; end; hence thesis by TARSKI:1; end; theorem Th74: for f being Function of X,Y for g being Function of V,Z holds [: f,g:] is Function of [:X,V:],[:Y,Z:] proof let f be Function of X,Y; let g be Function of V,Z; per cases; suppose A1: [:Y,Z:] = {} implies [:X,V:] = {}; now per cases by A1; suppose A2: [:Y,Z:] <> {}; rng f c= Y & rng g c= Z by RELAT_1:def 19; then [:rng f,rng g:] c= [:Y,Z:] by ZFMISC_1:96; then A3: rng [:f,g:] c= [:Y,Z:] by Th67; Z = {} implies V = {} by A2,ZFMISC_1:90; then A4: dom g = V by FUNCT_2:def 1; Y = {} implies X = {} by A2,ZFMISC_1:90; then dom f = X by FUNCT_2:def 1; then dom[:f,g:] = [:X,V:] by A4,Def8; hence thesis by A3,FUNCT_2:2; end; suppose A5: [:X,V:] = {}; then X = {} or V = {}; then dom f = {} or dom g = {}; then [:dom f,dom g:] = {} by ZFMISC_1:90; then A6: dom[:f,g:] = [:X,V:] by A5,Def8; rng f c= Y & rng g c= Z by RELAT_1:def 19; then [:rng f,rng g:] c= [:Y,Z:] by ZFMISC_1:96; then rng[:f,g:] c= [:Y,Z:] by Th67; hence thesis by A6,FUNCT_2:2; end; end; hence thesis; end; suppose A7: [:Y,Z:] = {} & [:X,V:] <> {}; then Y = {} or Z = {}; then f = {} or g = {}; then [:dom f,dom g:] = {} by RELAT_1:38,ZFMISC_1:90; then A8: dom [:f,g:] = {} by Def8; then rng[:f,g:] = {} & dom [:f,g:] c= [:X,V:] by RELAT_1:42,XBOOLE_1:2; then reconsider R = [:f,g:] as Relation of [:X,V:],[:Y,Z:] by RELSET_1:4 ,XBOOLE_1:2; [:f,g:] = {} by A8; then R is quasi_total by A7,FUNCT_2:def 1; hence thesis; end; end; definition let X1,X2,Y1,Y2; let f1 be Function of X1,Y1; let f2 be Function of X2,Y2; redefine func [:f1,f2:] -> Function of [:X1,X2:],[:Y1,Y2:]; coherence by Th74; end; theorem for f1 being Function of C1,D1 for f2 being Function of C2,D2 for c1 being Element of C1 for c2 being Element of C2 holds [:f1,f2:].(c1,c2) = [f1.c1 ,f2.c2] proof let f1 be Function of C1,D1; let f2 be Function of C2,D2; let c1 be Element of C1; let c2 be Element of C2; dom f1 = C1 & dom f2 = C2 by FUNCT_2:def 1; hence thesis by Def8; end; theorem for f1 being Function of X1,Y1 for f2 being Function of X2,Y2 st (Y1 = {} implies X1 = {}) & (Y2 = {} implies X2 = {}) holds [:f1,f2:] = <:f1*pr1(X1, X2),f2*pr2(X1,X2):> proof let f1 be Function of X1,Y1; let f2 be Function of X2,Y2; assume ( Y1 = {} implies X1 = {})&( Y2 = {} implies X2 = {}); then dom f1 = X1 & dom f2 = X2 by FUNCT_2:def 1; hence thesis by Th66; end; theorem for f1 being Function of X1,D1 for f2 being Function of X2,D2 holds [: f1,f2:] = <:f1*pr1(X1,X2),f2*pr2(X1,X2):> proof let f1 be Function of X1,D1; let f2 be Function of X2,D2; dom f1 = X1 & dom f2 = X2 by FUNCT_2:def 1; hence thesis by Th66; end; theorem for f1 being Function of X,Y1 for f2 being Function of X,Y2 holds <:f1 ,f2:> = [:f1,f2:]*(delta X) proof let f1 be Function of X,Y1; let f2 be Function of X,Y2; per cases; suppose Y1 = {} or Y2 = {}; then A1: dom f1 = {} or dom f2 = {}; A2: dom[:f1,f2:] = [:dom f1, dom f2:] by Def8 .= {} by A1,ZFMISC_1:90; dom<:f1,f2:> = dom f1 /\ dom f2 by Def7 .= {} by A1; hence <:f1,f2:> = {}*delta X .= [:f1,f2:]*delta X by A2,RELAT_1:41; end; suppose Y1 <> {} & Y2 <> {}; then dom f1 = X & dom f2 = X by FUNCT_2:def 1; hence thesis by Th68; end; end; begin theorem for f being Function holds pr1(dom f,rng f).:f = dom f proof let f be Function; now let y be set; thus y in dom f implies ex x being set st x in dom pr1(dom f,rng f) & x in f & y = pr1(dom f,rng f).x proof assume A1: y in dom f; take [y,f.y]; A2: f.y in rng f by A1,FUNCT_1:def 3; then [y,f.y] in [:dom f,rng f:] by A1,ZFMISC_1:87; hence [y,f.y] in dom pr1(dom f,rng f) by Def4; thus [y,f.y] in f by A1,FUNCT_1:def 2; thus y = pr1(dom f,rng f).(y,f.y) by A1,A2,Def4 .= pr1(dom f,rng f).[y,f.y]; end; given x being set such that A3: x in dom pr1(dom f,rng f) and x in f and A4: y = pr1(dom f,rng f).x; consider x1,x2 being set such that A5: x1 in dom f & x2 in rng f and A6: x = [x1,x2] by A3,ZFMISC_1:84; y = pr1(dom f,rng f).(x1,x2) by A4,A6; hence y in dom f by A5,Def4; end; hence thesis by FUNCT_1:def 6; end; theorem for A,B,C being non empty set, f,g being Function of A,[:B,C:] st pr1(B,C)*f = pr1(B,C)*g & pr2(B,C)*f = pr2(B,C)*g holds f = g proof let A,B,C be non empty set, f,g be Function of A,[:B,C:] such that A1: pr1(B,C)*f = pr1(B,C)*g & pr2(B,C)*f = pr2(B,C)*g; now let a be Element of A; consider b1 being Element of B, c1 being Element of C such that A2: f.a = [b1,c1] by DOMAIN_1:1; consider b2 being Element of B, c2 being Element of C such that A3: g.a = [b2,c2] by DOMAIN_1:1; A4: pr1(B,C).(g.a) = (pr1(B,C)*g).a by FUNCT_2:15; A5: pr1(B,C).(f.a) = (pr1(B,C)*f).a & pr2(B,C).(f.a) = (pr2(B,C)*f).a by FUNCT_2:15; A6: pr2(B,C).(b1,c1) = c1 & pr2(B,C).(b2,c2) = c2 by Def5; pr1(B,C).(b1,c1) = b1 & pr1(B,C).(b2,c2) = b2 by Def4; hence f.a = g.a by A1,A2,A3,A6,A5,A4,FUNCT_2:15; end; hence thesis by FUNCT_2:63; end; registration let F,G be one-to-one Function; cluster [:F,G:] -> one-to-one; coherence proof let z1,z2 be set such that A1: z1 in dom [:F,G:] and A2: z2 in dom [:F,G:] and A3: [:F,G:].z1 = [:F,G:].z2; A4: dom[:F,G:] = [:dom F, dom G:] by Def8; then consider x1,y1 being set such that A5: x1 in dom F and A6: y1 in dom G and A7: z1 = [x1,y1] by A1,ZFMISC_1:84; A8: [:F,G:].(x1,y1) = [F.x1,G.y1] by A5,A6,Def8; consider x2,y2 being set such that A9: x2 in dom F and A10: y2 in dom G and A11: z2 = [x2,y2] by A2,A4,ZFMISC_1:84; A12: [:F,G:].(x2,y2) = [F.x2,G.y2] by A9,A10,Def8; then F.x1 = F.x2 by A3,A7,A11,A8,XTUPLE_0:1; then A13: x1 = x2 by A5,A9,FUNCT_1:def 4; G.y1 = G.y2 by A3,A7,A11,A8,A12,XTUPLE_0:1; hence thesis by A6,A7,A10,A11,A13,FUNCT_1:def 4; end; end; registration let A be set; cluster idempotent for BinOp of A; existence proof take pr1(A,A); per cases; suppose A1: A <> {}; let a be Element of A; a in A by A1; hence pr1(A,A).(a,a) = a by Def4; end; suppose A2: A = {}; let a be Element of A; not [a,a] in dom pr1(A,A) by A2; hence pr1(A,A).(a,a) = {} by FUNCT_1:def 2 .= a by A2,SUBSET_1:def 1; end; end; end; registration let A be set, b be idempotent BinOp of A; let a be Element of A; reduce b.(a,a) to a; reducibility by BINOP_1:def 4; end; begin reserve f,g,h for Function, A for set; theorem Th1: delta A = <:id A, id A:> proof thus delta A = id [:A,A:]*delta A by FUNCT_2:17 .= [:id A, id A:]*delta A by FUNCT_3:69 .= <:id A, id A:> by FUNCT_3:78; end; reserve F for Function, B,x,y,y1,y2,z for set; definition let f; func f~ -> Function means :Def1: dom it = dom f & for x st x in dom f holds (for y,z st f.x = [y,z] holds it.x = [z,y]) & (f.x = it.x or ex y,z st f.x =[y, z]); existence proof defpred P[set,set] means (for y,z st f.$1 = [y,z] holds $2 = [z,y]) & (f. $1 = $2 or ex y,z st f.$1 = [y,z]); A1: now let x such that x in dom f; now per cases; suppose A2: ex y,z st f.x = [y,z]; then consider y,z such that A3: f.x = [y,z]; take y1 = [z,y]; thus for y,z st f.x = [y,z] holds y1 = [z,y] proof let y9,z9 be set; assume A4: f.x = [y9,z9]; then z = z9 by A3,XTUPLE_0:1; hence thesis by A3,A4,XTUPLE_0:1; end; thus f.x = y1 or ex y,z st f.x = [y,z] by A2; end; suppose A5: not ex y,z st f.x = [y,z]; take y1 = f.x; thus (for y,z st f.x = [y,z] holds y1 = [z,y]) & (f.x = y1 or ex y,z st f.x = [y,z]) by A5; end; end; hence ex y st P[x,y]; end; A6: now let x,y1,y2 such that x in dom f; assume that A7: P[x,y1] and A8: P[x,y2]; now per cases; suppose ex y,z st f.x = [y,z]; then consider y,z such that A9: f.x = [y,z]; y1 = [z,y] by A7,A9; hence y1 = y2 by A8,A9; end; suppose not ex y,z st f.x = [y,z]; hence y1 = y2 by A7,A8; end; end; hence y1 = y2; end; thus ex g st dom g = dom f & for x st x in dom f holds P[x,g.x] from FUNCT_1:sch 2(A6,A1); end; uniqueness proof defpred P[Function] means for x st x in dom f holds (for y,z st f.x = [y,z ] holds $1.x = [z,y]) & (f.x = $1.x or ex y,z st f.x =[y,z]); let g1,g2 be Function such that A10: dom g1 = dom f and A11: P[g1] and A12: dom g2 = dom f and A13: P[g2]; now let x; assume A14: x in dom f; now per cases; suppose ex y,z st f.x = [y,z]; then consider y,z such that A15: f.x = [y,z]; g1.x = [z,y] by A11,A14,A15; hence g1.x = g2.x by A13,A14,A15; end; suppose A16: not ex y,z st f.x = [y,z]; then g1.x = f.x by A11,A14; hence g1.x = g2.x by A13,A14,A16; end; end; hence g1.x = g2.x; end; hence thesis by A10,A12,FUNCT_1:2; end; involutiveness proof let g,f be Function; assume that A17: dom g = dom f and A18: for x st x in dom f holds (for y,z st f.x = [y,z] holds g.x = [z, y]) & (f.x = g.x or ex y,z st f.x =[y,z]); thus dom f = dom g by A17; let x; assume A19: x in dom g; thus for y,z st g.x = [y,z] holds f.x = [z,y] proof let y,z such that A20: g.x = [y,z]; per cases; suppose ex z,y st f.x =[z,y]; then consider y1,y2 such that A21: f.x = [y1,y2]; A22: g.x = [y2,y1] by A17,A18,A19,A21; then y = y2 by A20,XTUPLE_0:1; hence thesis by A20,A21,A22,XTUPLE_0:1; end; suppose not ex z,y st f.x =[z,y]; then f.x = g.x by A17,A18,A19; hence thesis by A17,A18,A19,A20; end; end; assume g.x <> f.x; then consider y,z such that A23: f.x = [y,z] by A17,A18,A19; take z,y; thus thesis by A17,A18,A19,A23; end; end; theorem Th2: <:f,g:> = <:g,f:>~ proof A1: dom <:f,g:> = dom g /\ dom f by FUNCT_3:def 7 .= dom <:g,f:> by FUNCT_3:def 7; A2: now let x; assume A3: x in dom <:f,g:>; then A4: <:g,f:>.x = [g.x, f.x] by A1,FUNCT_3:def 7; thus <:f,g:>.x = [f.x, g.x] by A3,FUNCT_3:def 7 .= <:g,f:>~.x by A1,A3,A4,Def1; end; dom <:f,g:> = dom (<:g,f:>~) by A1,Def1; hence thesis by A2,FUNCT_1:2; end; theorem Th3: (f|A)~ = f~|A proof A1: dom (f|A) = dom f /\ A by RELAT_1:61 .= dom (f~) /\ A by Def1 .= dom (f~|A) by RELAT_1:61; A2: now let x such that A3: x in dom(f~|A); A4: dom (f|A) c= dom f by RELAT_1:60; now per cases; suppose ex y,z st (f|A).x = [y,z]; then consider y,z such that A5: (f|A).x = [y,z]; A6: f.x = [y,z] by A1,A3,A5,FUNCT_1:47; thus (f|A)~.x = [z,y] by A1,A3,A5,Def1 .= f~.x by A1,A3,A4,A6,Def1 .= (f~|A).x by A3,FUNCT_1:47; end; suppose A7: not ex y,z st (f|A).x = [y,z]; A8: (f|A).x = f.x by A1,A3,FUNCT_1:47; (f|A)~.x = (f|A).x by A1,A3,A7,Def1; hence (f|A)~.x = f~.x by A1,A3,A4,A7,A8,Def1 .= (f~|A).x by A3,FUNCT_1:47; end; end; hence (f|A)~.x = (f~|A).x; end; dom ((f|A)~) = dom (f|A) by Def1; hence thesis by A1,A2,FUNCT_1:2; end; theorem (delta A)~ = delta A proof thus (delta A)~ = <:id A, id A:>~ by Th1 .= <:id A, id A:> by Th2 .= delta A by Th1; end; theorem Th5: <:f,g:>|A = <:f|A,g:> proof A1: dom (<:f,g:>|A) = dom <:f,g:> /\ A by RELAT_1:61 .= dom f /\ dom g /\ A by FUNCT_3:def 7 .= dom f /\ A /\ dom g by XBOOLE_1:16 .= dom (f|A) /\ dom g by RELAT_1:61; now A2: dom (<:f,g:>|A) c= dom <:f,g:> by RELAT_1:60; let x such that A3: x in dom (<:f,g:>|A); A4: x in dom (f|A) by A1,A3,XBOOLE_0:def 4; thus (<:f,g:>|A).x = <:f,g:>.x by A3,FUNCT_1:47 .= [f.x, g.x] by A3,A2,FUNCT_3:def 7 .= [(f|A).x, g.x] by A4,FUNCT_1:47; end; hence thesis by A1,FUNCT_3:def 7; end; theorem Th6: <:f,g:>|A = <:f,g|A:> proof thus <:f,g:>|A = <:g,f:>~|A by Th2 .= (<:g,f:>|A)~ by Th3 .= <:g|A,f:>~ by Th5 .= <:f,g|A:> by Th2; end; definition let A, z be set; func A --> z -> set equals [:A, {z}:]; coherence; end; registration let A, z be set; cluster A --> z -> Function-like Relation-like; coherence proof thus A --> z is Function-like proof let x,y1,y2; assume that A1: [x,y1] in A --> z and A2: [x,y2] in A --> z; y1 in {z} by A1,ZFMISC_1:87; then A3: y1 = z by TARSKI:def 1; y2 in {z} by A2,ZFMISC_1:87; hence thesis by A3,TARSKI:def 1; end; thus for x st x in A --> z ex y1,y2 st [y1,y2] =x by RELAT_1:def 1; end; end; theorem Th7: x in A implies (A --> z).x = z proof assume A1: x in A; z in {z} by TARSKI:def 1; then [x,z] in (A --> z) by A1,ZFMISC_1:87; hence thesis by FUNCT_1:1; end; theorem A <> {} implies rng (A --> x) = {x} by RELAT_1:160; theorem Th9: rng f = {x} implies f = (dom f) --> x proof assume A1: rng f = {x}; then dom f <> {} by RELAT_1:42; then dom((dom f) --> x) = dom f & rng((dom f) -->x) = {x} by RELAT_1:160; hence thesis by A1,FUNCT_1:7; end; registration let x; cluster {} --> x -> empty; coherence by ZFMISC_1:90; end; registration let x; let A be empty set; cluster A --> x -> empty; coherence; end; registration let x; let A be non empty set; cluster A --> x -> non empty; coherence; end; theorem dom ({} --> x) = {} & rng ({} --> x) = {}; theorem Th11: (for z st z in dom f holds f.z = x) implies f = dom f --> x proof assume A1: for z st z in dom f holds f.z = x; now per cases; suppose A2: dom f = {}; dom ({} --> x) = {}; hence thesis by A2; end; suppose A3: dom f <> {}; set z = the Element of dom f; now let y; thus y in {x} implies ex y1 st y1 in dom f & y = f.y1 proof assume y in {x}; then y = x by TARSKI:def 1; then f.z = y by A1,A3; hence thesis by A3; end; assume ex y1 st y1 in dom f & y = f.y1; then y = x by A1; hence y in {x} by TARSKI:def 1; end; then rng f = {x} by FUNCT_1:def 3; hence thesis by Th9; end; end; hence thesis; end; theorem Th12: (A --> x)|B = A /\ B --> x proof A1: A = {} or A <> {}; A2: A /\ B = {} or A /\ B <> {}; A3: dom ((A --> x)|B) = dom (A --> x) /\ B by RELAT_1:61 .= A /\ B by A1,RELAT_1:160 .= dom (A /\ B --> x) by A2,RELAT_1:160; now let z such that A4: z in dom (A /\ B --> x); A /\ B = {} or A /\ B <> {}; then A5: z in A /\ B by A4,RELAT_1:160; then A6: z in A by XBOOLE_0:def 4; thus ((A --> x)|B).z = (A --> x).z by A3,A4,FUNCT_1:47 .= x by A6,Th7 .= (A /\ B --> x).z by A5,Th7; end; hence thesis by A3,FUNCT_1:2; end; theorem Th13: dom (A --> x) = A & rng (A --> x) c= {x} proof now per cases; suppose A1: A = {}; rng ({} --> x) = {}; hence thesis by A1,XBOOLE_1:2; end; suppose A <> {}; hence thesis by RELAT_1:160; end; end; hence thesis; end; theorem Th14: x in B implies (A --> x)"B = A proof assume A1: x in B; now per cases; suppose A2: A = {}; thus thesis by A2; end; suppose A <> {}; then A3: rng (A --> x) = {x} by RELAT_1:160; {x} c= B by A1,ZFMISC_1:31; then {x} /\ B = {x} by XBOOLE_1:28; hence (A --> x)"B = (A --> x)"{x} by A3,RELAT_1:133 .= dom (A -->x) by A3,RELAT_1:134 .= A by Th13; end; end; hence thesis; end; theorem (A --> x)"{x} = A proof x in {x} by TARSKI:def 1; hence thesis by Th14; end; theorem not x in B implies (A --> x)"B = {} proof assume A1: not x in B; rng (A --> x) c= {x} by Th13; then rng (A --> x) misses B by A1,XBOOLE_1:63,ZFMISC_1:50; hence thesis by RELAT_1:138; end; theorem x in dom h implies h*(A --> x) = A --> h.x proof assume A1: x in dom h; A2: now let z; assume A3: z in dom (h*(A --> x)); then z in dom (A --> x) by FUNCT_1:11; then A4: z in A by Th13; thus (h*(A --> x)).z = h.((A --> x).z) by A3,FUNCT_1:12 .= h.x by A4,Th7 .= (A --> h.x).z by A4,Th7; end; dom (h*(A --> x)) = (A --> x)"dom h by RELAT_1:147 .= A by A1,Th14 .= dom (A --> h.x) by Th13; hence thesis by A2,FUNCT_1:2; end; theorem A <> {} & x in dom h implies dom(h*(A --> x)) <> {} proof assume that A1: A <> {} and A2: x in dom h; set y = the Element of A; y in A by A1; then A3: y in dom (A -->x) by Th13; (A --> x).y = x by A1,Th7; hence thesis by A2,A3,FUNCT_1:11; end; theorem (A --> x)*h = h"A --> x proof A1: dom ((A --> x)*h) = h"dom(A --> x) by RELAT_1:147 .= h"A by Th13; A2: now let z; assume A3: z in dom ((A --> x)*h); then h.z in dom (A --> x) by FUNCT_1:11; then A4: h.z in A by Th13; thus ((A --> x)*h).z = (A --> x).(h.z) by A3,FUNCT_1:12 .= x by A4,Th7 .= (h"A --> x).z by A1,A3,Th7; end; dom ((A --> x)*h) = dom (h"A --> x) by A1,Th13; hence thesis by A2,FUNCT_1:2; end; theorem (A --> [x,y])~ = A --> [y,x] proof A1: dom ((A --> [x,y])~) = dom (A --> [x,y]) by Def1; then A2: dom ((A --> [x,y])~) = A by Th13; A3: now let z; assume A4: z in dom ((A --> [x,y])~); then (A --> [x,y]).z = [x,y] by A2,Th7; hence ((A --> [x,y])~).z = [y,x] by A1,A4,Def1 .= (A --> [y,x]).z by A2,A4,Th7; end; dom ((A --> [x,y])~) = dom (A --> [y,x]) by A2,Th13; hence thesis by A3,FUNCT_1:2; end; definition let F,f,g; func F.:(f,g) -> set equals F * <:f,g:>; correctness; end; registration let F,f,g; cluster F.:(f,g) -> Function-like Relation-like; coherence; end; Lm1: x in dom (F*<:f,g:>) implies (F*<:f,g:>).x = F.(f.x,g.x) proof assume A1: x in dom (F*<:f,g:>); then A2: x in dom <:f,g:> by FUNCT_1:11; thus (F*<:f,g:>).x = F.(<:f,g:>.x) by A1,FUNCT_1:12 .= F.(f.x,g.x) by A2,FUNCT_3:def 7; end; theorem for h st dom h = dom(F.:(f,g)) & for z being set st z in dom (F.:(f,g) ) holds h.z = F.(f.z,g.z) holds h = F.:(f,g) proof let h; assume that A1: dom h = dom(F.:(f,g)) and A2: for z being set st z in dom (F.:(f,g)) holds h.z = F.(f.z,g.z); now let z be set; assume A3: z in dom (F.:(f,g)); hence h.z = F.(f.z,g.z) by A2 .= (F.:(f,g)).z by A3,Lm1; end; hence thesis by A1,FUNCT_1:2; end; theorem x in dom (F.:(f,g)) implies (F.:(f,g)).x = F.(f.x,g.x) by Lm1; theorem Th23: f|A = g|A implies (F.:(f,h))|A = (F.:(g,h))|A proof assume A1: f|A = g|A; thus (F.:(f,h))|A = F*<:f,h:>|A by RELAT_1:83 .= F*<:f|A,h:> by Th5 .= F*<:g,h:>|A by A1,Th5 .= (F.:(g,h))|A by RELAT_1:83; end; theorem Th24: f|A = g|A implies (F.:(h,f))|A = (F.:(h,g))|A proof assume A1: f|A = g|A; thus (F.:(h,f))|A = F*<:h,f:>|A by RELAT_1:83 .= F*<:h,f|A:> by Th6 .= F*<:h,g:>|A by A1,Th6 .= (F.:(h,g))|A by RELAT_1:83; end; theorem Th25: F.:(f,g)*h = F.:(f*h, g*h) proof thus F.:(f,g)*h = F*(<:f,g:>*h) by RELAT_1:36 .= F.:(f*h, g*h) by FUNCT_3:55; end; definition let F,f,x; func F[:](f,x) -> set equals F * <:f, dom f --> x:>; correctness; end; registration let F,f,x; cluster F[:](f,x) -> Function-like Relation-like; coherence; end; theorem F[:](f,x) = F.:(f, dom f --> x); theorem Th27: x in dom (F[:](f,z)) implies (F[:](f,z)).x = F.(f.x,z) proof A1: dom <:f, dom f --> z:> = dom f /\ dom (dom f --> z) by FUNCT_3:def 7; assume A2: x in dom (F[:](f,z)); then x in dom <:f, dom f --> z:> by FUNCT_1:11; then A3: x in dom f by A1,XBOOLE_0:def 4; thus (F[:](f,z)).x = F.(f.x,(dom f --> z).x) by A2,Lm1 .= F.(f.x,z) by A3,Th7; end; theorem f|A = g|A implies (F[:](f,x))|A = (F[:](g,x))|A proof assume A1: f|A = g|A; dom f /\ A = dom (f|A) by RELAT_1:61 .= dom g /\ A by A1,RELAT_1:61; then A2: (dom f --> x)|A = dom g /\ A --> x by Th12 .= (dom g -->x)|A by Th12; thus (F[:](f,x))|A = (F.:(f, dom f --> x))|A .= (F.:(g, dom f --> x))|A by A1,Th23 .= (F.:(g, dom g --> x))|A by A2,Th24 .= (F[:](g,x))|A; end; theorem Th29: F[:](f,x)*h = F[:](f*h,x) proof A1: dom (dom f -->x) = dom f by Th13; then A2: dom ((dom f --> x)*h) = dom (f*h) by RELAT_1:163; A3: now let z; assume A4: z in dom ((dom f --> x)*h); then A5: h.z in dom(dom f -->x) by FUNCT_1:11; thus ((dom f --> x)*h).z = (dom f --> x).(h.z) by A4,FUNCT_1:12 .= x by A1,A5,Th7; end; thus F[:](f,x)*h = F.:(f, dom f --> x)*h .= F.:(f*h, (dom f --> x)*h) by Th25 .= F[:](f*h,x) by A2,A3,Th11; end; theorem F[:](f,x)*id A = F[:](f|A,x) proof thus F[:](f,x)*id A = F[:](f*id A, x) by Th29 .= F[:](f|A, x) by RELAT_1:65; end; definition let F,x,g; func F[;](x,g) -> set equals F * <:dom g --> x, g:>; correctness; end; registration let F,x,g; cluster F[;](x,g) -> Function-like Relation-like; coherence; end; theorem F[;](x,g) = F.:(dom g --> x, g); theorem Th32: x in dom (F[;](z,f)) implies (F[;](z,f)).x = F.(z,f.x) proof A1: dom <:dom f --> z, f:> = dom (dom f --> z) /\ dom f by FUNCT_3:def 7; assume A2: x in dom (F[;](z,f)); then x in dom <:dom f --> z, f:> by FUNCT_1:11; then A3: x in dom f by A1,XBOOLE_0:def 4; thus (F[;](z,f)).x = F.((dom f --> z).x, f.x) by A2,Lm1 .= F.(z, f.x) by A3,Th7; end; theorem f|A = g|A implies (F[;](x,f))|A = (F[;](x,g))|A proof assume A1: f|A = g|A; dom f /\ A = dom (f|A) by RELAT_1:61 .= dom g /\ A by A1,RELAT_1:61; then A2: (dom f --> x)|A = dom g /\ A --> x by Th12 .= (dom g -->x)|A by Th12; thus (F[;](x,f))|A = (F.:(dom f --> x, f))|A .= (F.:(dom f --> x, g))|A by A1,Th24 .= (F.:(dom g --> x, g))|A by A2,Th23 .= (F[;](x,g))|A; end; theorem Th34: F[;](x,f)*h = F[;](x,f*h) proof A1: dom (dom f -->x) = dom f by Th13; then A2: dom ((dom f --> x)*h) = dom (f*h) by RELAT_1:163; A3: now let z; assume A4: z in dom ((dom f --> x)*h); then A5: h.z in dom(dom f -->x) by FUNCT_1:11; thus ((dom f --> x)*h).z = (dom f --> x).(h.z) by A4,FUNCT_1:12 .= x by A1,A5,Th7; end; thus F[;](x,f)*h = F.:(dom f --> x, f)*h .= F.:((dom f --> x)*h, f*h) by Th25 .= F[;](x,f*h) by A2,A3,Th11; end; theorem F[;](x,f)*id A = F[;](x,f|A) proof thus F[;](x,f)*id A = F[;](x,f*id A) by Th34 .= F[;](x,f|A) by RELAT_1:65; end; reserve X for non empty set, Y for set, F for BinOp of X, f,g,h for Function of Y,X, x,x1,x2 for Element of X; theorem Th36: F.:(f,g) is Function of Y,X proof F*<:f,g:> is Function of Y,X; hence thesis; end; definition let X be non empty set, Z be set; let F be BinOp of X, f,g be Function of Z,X; redefine func F.:(f,g) -> Function of Z,X; coherence by Th36; end; reserve Y for non empty set, F for BinOp of X, f,g,h for Function of Y,X, x, x1,x2 for Element of X; theorem Th37: for z being Element of Y holds (F.:(f,g)).z = F.(f.z,g.z) proof let z be Element of Y; dom (F.:(f,g)) = Y by FUNCT_2:def 1; hence thesis by Lm1; end; theorem Th38: for h being Function of Y,X holds (for z being Element of Y holds h.z = F.(f.z,g.z)) implies h = F.:(f,g) proof let h be Function of Y,X; assume A1: for z being Element of Y holds h.z = F.(f.z,g.z); now let z be Element of Y; thus h.z = F.(f.z,g.z) by A1 .= (F.:(f,g)).z by Th37; end; hence thesis by FUNCT_2:63; end; theorem for g being Function of X,X holds F.:(id X, g)*f = F.:(f,g*f) proof let g be Function of X,X; thus F.:(id X, g)*f = F.:(id X*f, g*f) by Th25 .= F.:(f,g*f) by FUNCT_2:17; end; theorem for g being Function of X,X holds F.:(g, id X)*f = F.:(g*f,f) proof let g be Function of X,X; thus F.:(g, id X)*f = F.:(g*f, id X*f) by Th25 .= F.:(g*f, f) by FUNCT_2:17; end; theorem F.:(id X, id X)*f = F.:(f,f) proof thus F.:(id X, id X)*f = F.:(id X*f, id X*f) by Th25 .= F.:(id X*f, f) by FUNCT_2:17 .= F.:(f,f) by FUNCT_2:17; end; theorem for g being Function of X,X holds F.:(id X, g).x = F.(x,g.x) proof let g be Function of X,X; thus F.:(id X, g).x = F.(id X.x, g.x) by Th37 .= F.(x,g.x) by FUNCT_1:18; end; theorem for g being Function of X,X holds F.:(g, id X).x = F.(g.x,x) proof let g be Function of X,X; thus F.:(g, id X).x = F.(g.x, id X.x) by Th37 .= F.(g.x, x) by FUNCT_1:18; end; theorem F.:(id X, id X).x = F.(x,x) proof thus F.:(id X, id X).x = F.(id X.x, id X.x) by Th37 .= F.(id X.x, x) by FUNCT_1:18 .= F.(x,x) by FUNCT_1:18; end; theorem Th45: for A,B for x being set st x in B holds A --> x is Function of A , B proof let A,B; let x be set; A1: rng (A --> x) c= {x} by Th13; A2: dom (A --> x) = A by Th13; assume A3: x in B; then {x} c= B by ZFMISC_1:31; then rng (A --> x) c= B by A1,XBOOLE_1:1; hence thesis by A3,A2,FUNCT_2:def 1,RELSET_1:4; end; definition let I,i be set; redefine func I --> i -> Function of I,{i}; coherence proof dom (I --> i) = I & rng (I --> i) c= {i} by Th13; hence thesis by FUNCT_2:def 1,RELSET_1:4; end; end; definition let B be non empty set, A be set, b be Element of B; redefine func A --> b -> Function of A,B; coherence by Th45; end; theorem for A,X,x holds A --> x is Function of A, X; reserve Y for set, F for BinOp of X, f,g,h for Function of Y,X, x,x1,x2 for Element of X; theorem Th47: F[:](f,x) is Function of Y,X proof dom f = Y by FUNCT_2:def 1; then reconsider g = dom f --> x as Function of Y,X; F*<:f,g:> is Function of Y,X; hence thesis; end; definition let X be non empty set, Z be set; let F be BinOp of X, f be Function of Z,X, x be Element of X; redefine func F[:](f,x) -> Function of Z,X; coherence by Th47; end; reserve Y for non empty set, F for BinOp of X, f,g,h for Function of Y,X, x, x1,x2 for Element of X; theorem Th48: for y being Element of Y holds (F[:](f,x)).y = F.(f.y,x) proof let y be Element of Y; dom (F[:](f,x)) = Y by FUNCT_2:def 1; hence thesis by Th27; end; theorem Th49: (for y being Element of Y holds g.y = F.(f.y,x)) implies g = F [:](f,x) proof assume A1: for y being Element of Y holds g.y = F.(f.y,x); now let y be Element of Y; thus g.y = F.(f.y,x) by A1 .= (F[:](f,x)).y by Th48; end; hence thesis by FUNCT_2:63; end; theorem F[:](id X, x)*f = F[:](f,x) proof thus F[:](id X, x)*f = F[:](id X*f, x) by Th29 .= F[:](f,x) by FUNCT_2:17; end; theorem F[:](id X, x).x = F.(x,x) proof thus F[:](id X, x).x = F.(id X.x, x) by Th48 .= F.(x,x) by FUNCT_1:18; end; reserve Y for set, F for BinOp of X, f,g,h for Function of Y,X, x,x1,x2 for Element of X; theorem Th52: F[;](x,g) is Function of Y,X proof dom g = Y by FUNCT_2:def 1; then reconsider f = dom g --> x as Function of Y,X; F*<:f,g:> is Function of Y,X; hence thesis; end; definition let X be non empty set, Z be set; let F be BinOp of X, x be Element of X; let g be Function of Z,X; redefine func F[;](x,g) -> Function of Z,X; coherence by Th52; end; reserve Y for non empty set, F for BinOp of X, f,g,h for Function of Y,X, x, x1,x2 for Element of X; theorem Th53: for y being Element of Y holds (F[;](x,f)).y = F.(x,f.y) proof let y be Element of Y; dom (F[;](x,f)) = Y by FUNCT_2:def 1; hence thesis by Th32; end; theorem Th54: (for y being Element of Y holds g.y = F.(x,f.y)) implies g = F [;](x,f) proof assume A1: for y being Element of Y holds g.y = F.(x,f.y); now let y be Element of Y; thus g.y = F.(x,f.y) by A1 .= (F[;](x,f)).y by Th53; end; hence thesis by FUNCT_2:63; end; reserve Y for set, F for BinOp of X, f,g,h for Function of Y,X, x,x1,x2 for Element of X; theorem F[;](x, id X)*f = F[;](x,f) proof thus F[;](x, id X)*f = F[;](x, id X*f) by Th34 .= F[;](x,f) by FUNCT_2:17; end; theorem F[;](x, id X).x = F.(x,x) proof thus F[;](x, id X).x = F.(x, id X.x) by Th53 .= F.(x,x) by FUNCT_1:18; end; theorem for X,Y,Z being non empty set for f being Function of X, [:Y,Z:] for x being Element of X holds f~.x =[(f.x)`2,(f.x)`1] proof let X,Y,Z be non empty set; let f be Function of X, [:Y,Z:]; let x be Element of X; x in X; then A1: x in dom f by FUNCT_2:def 1; f.x = [(f.x)`1, (f.x)`2] by MCART_1:22; hence thesis by A1,Def1; end; definition let X,Y,Z be non empty set; let f be Function of X, [:Y,Z:]; redefine func rng f -> Relation of Y,Z; coherence by RELAT_1:def 19; end; definition let X,Y,Z be non empty set; let f be Function of X, [:Y,Z:]; redefine func f~ -> Function of X, [:Z,Y:]; coherence proof A1: rng (f~) c= [:Z,Y:] proof let x be set; assume x in rng (f~); then consider y being set such that A2: y in dom (f~) and A3: x = f~.y by FUNCT_1:def 3; A4: y in dom f by A2,Def1; then reconsider y as Element of X; A5: f.y = [(f.y)`1,(f.y)`2] by MCART_1:21; then f~.y = [(f.y)`2,(f.y)`1] by A4,Def1; hence thesis by A3,A5,ZFMISC_1:88; end; X = dom f by FUNCT_2:def 1 .= dom (f~) by Def1; hence thesis by A1,FUNCT_2:def 1,RELSET_1:4; end; end; theorem for X,Y,Z being non empty set for f being Function of X, [:Y,Z:] holds rng (f~) = (rng f)~ proof let X,Y,Z be non empty set; let f be Function of X, [:Y,Z:]; let x,y be set; thus [x,y] in rng (f~) implies [x,y] in (rng f)~ proof assume [x,y] in rng (f~); then consider z being set such that A1: z in dom (f~) and A2: [x,y] = f~.z by FUNCT_1:def 3; A3: z in dom f by A1,Def1; f.z = f~~.z .= [y,x] by A1,A2,Def1; then [y,x] in rng f by A3,FUNCT_1:def 3; hence thesis by RELAT_1:def 7; end; assume [x,y] in (rng f)~; then [y,x] in rng f by RELAT_1:def 7; then consider z being set such that A4: z in dom f & [y,x] = f.z by FUNCT_1:def 3; z in dom (f~) & f~.z = [x,y] by A4,Def1; hence thesis by FUNCT_1:def 3; end; reserve y for Element of Y; theorem F is associative implies F[:](F[;](x1,f),x2) = F[;](x1,F[:](f,x2)) proof assume A1: F is associative; per cases; suppose Y = {}; hence thesis; end; suppose A2: Y <> {}; now let y; reconsider x3 = f.y as Element of X by A2,FUNCT_2:5; thus (F[:](F[;](x1,f),x2)).y = F.((F[;](x1,f)).y,x2) by A2,Th48 .= F.(F.(x1,x3),x2) by A2,Th53 .= F.(x1,F.(x3,x2)) by A1,BINOP_1:def 3 .= F.(x1,(F[:](f,x2)).y) by A2,Th48; end; hence thesis by A2,Th54; end; end; theorem F is associative implies F.:(F[:](f,x),g) = F.:(f,F[;](x,g)) proof assume A1: F is associative; per cases; suppose Y = {}; hence thesis; end; suppose A2: Y <> {}; now let y; reconsider x1 = f.y, x2 = g.y as Element of X by A2,FUNCT_2:5; thus (F.:(F[:](f,x),g)).y = F.((F[:](f,x)).y,g.y) by A2,Th37 .= F.(F.(x1,x),x2) by A2,Th48 .= F.(x1,F.(x,x2)) by A1,BINOP_1:def 3 .= F.(f.y,(F[;](x,g)).y) by A2,Th53; end; hence thesis by A2,Th38; end; end; theorem F is associative implies F.:(F.:(f,g),h) = F.:(f,F.:(g,h)) proof assume A1: F is associative; per cases; suppose Y = {}; hence thesis; end; suppose A2: Y <> {}; now let y; reconsider x1 = f.y, x2 = g.y, x3 = h.y as Element of X by A2,FUNCT_2:5; thus (F.:(F.:(f,g),h)).y = F.((F.:(f,g)).y,h.y) by A2,Th37 .= F.(F.(f.y,g.y),h.y) by A2,Th37 .= F.(x1,F.(x2,x3)) by A1,BINOP_1:def 3 .= F.(f.y,(F.:(g,h)).y) by A2,Th37; end; hence thesis by A2,Th38; end; end; theorem F is associative implies F[;](F.(x1,x2),f) = F[;](x1,F[;](x2,f)) proof assume A1: F is associative; per cases; suppose Y = {}; hence thesis; end; suppose A2: Y <> {}; now let y; reconsider x3 = f.y as Element of X by A2,FUNCT_2:5; thus (F[;](F.(x1,x2),f)).y = F.(F.(x1,x2),f.y) by A2,Th53 .= F.(x1,F.(x2,x3)) by A1,BINOP_1:def 3 .= F.(x1,(F[;](x2,f)).y) by A2,Th53; end; hence thesis by A2,Th54; end; end; theorem F is associative implies F[:](f, F.(x1,x2)) = F[:](F[:](f,x1),x2) proof assume A1: F is associative; per cases; suppose Y = {}; hence thesis; end; suppose A2: Y <> {}; now let y; reconsider x3 = f.y as Element of X by A2,FUNCT_2:5; thus (F[:](f, F.(x1,x2))).y = F.(f.y, F.(x1,x2)) by A2,Th48 .= F.(F.(x3,x1),x2) by A1,BINOP_1:def 3 .= F.(F[:](f,x1).y,x2) by A2,Th48; end; hence thesis by A2,Th49; end; end; theorem F is commutative implies F[;](x,f) = F[:](f,x) proof assume A1: F is commutative; per cases; suppose Y = {}; hence thesis; end; suppose A2: Y <> {}; now let y; reconsider x1 = f.y as Element of X by A2,FUNCT_2:5; thus (F[;](x,f)).y = F.(x,x1) by A2,Th53 .= F.(f.y,x) by A1,BINOP_1:def 2; end; hence thesis by A2,Th49; end; end; theorem F is commutative implies F.:(f,g) = F.:(g,f) proof assume A1: F is commutative; per cases; suppose Y = {}; hence thesis; end; suppose A2: Y <> {}; now let y; reconsider x1 = f.y, x2 = g.y as Element of X by A2,FUNCT_2:5; thus (F.:(f,g)).y = F.(x1,x2) by A2,Th37 .= F.(g.y,f.y) by A1,BINOP_1:def 2; end; hence thesis by A2,Th38; end; end; theorem F is idempotent implies F.:(f,f) = f proof assume A1: F is idempotent; per cases; suppose A2: Y = {}; hence F.:(f,f) = {} .= f by A2; end; suppose A3: Y <> {}; now let y; reconsider x = f.y as Element of X by A3,FUNCT_2:5; thus f.y = F.(x,x) by A1 .= F.(f.y,f.y); end; hence thesis by A3,Th38; end; end; reserve Y for non empty set, F for BinOp of X, f for Function of Y,X, x for Element of X, y for Element of Y; theorem F is idempotent implies F[;](f.y,f).y = f.y proof assume A1: F is idempotent; thus F[;](f.y,f).y = F.(f.y,f.y) by Th53 .= f.y by A1; end; theorem F is idempotent implies F[:](f,f.y).y = f.y proof assume A1: F is idempotent; thus F[:](f,f.y).y = F.(f.y,f.y) by Th48 .= f.y by A1; end; theorem for F,f,g being Function st [:rng f, rng g:] c= dom F holds dom(F.:(f, g)) = dom f /\ dom g proof let F,f,g be Function such that A1: [:rng f, rng g:] c= dom F; rng<:f,g:> c= [:rng f, rng g:] by FUNCT_3:51; hence dom(F.:(f,g)) = dom<:f,g:> by A1,RELAT_1:27,XBOOLE_1:1 .= dom f /\ dom g by FUNCT_3:def 7; end; definition let IT be Function; attr IT is Function-yielding means :Def6: for x being set st x in dom IT holds IT.x is Function; end; registration cluster Function-yielding for Function; existence proof take the set --> the Function; let x be set; thus thesis; end; end; registration let B be Function-yielding Function, j be set; cluster B.j -> Function-like Relation-like; coherence proof per cases; suppose j in dom B; hence thesis by Def6; end; suppose not j in dom B; hence thesis by FUNCT_1:def 2; end; end; end; registration let F be Function-yielding Function, f be Function; cluster F * f -> Function-yielding; coherence proof thus F * f is Function-yielding proof let x be set; assume x in dom (F*f); then (F*f).x = F.(f.x) by FUNCT_1:12; hence thesis; end; end; end; registration let B; let c be non empty set; cluster B --> c -> non-empty; coherence proof not {} in rng(B --> c) by TARSKI:def 1; hence thesis by RELAT_1:def 9; end; end; theorem ([:X,Y:] --> z).(x,y) = z proof [x,y] in [:X,Y:] by ZFMISC_1:87; hence thesis by Th7; end; reserve a,b,c for set; definition let a,b,c; func (a,b).-->c -> Function equals {[a,b]} --> c; coherence; end; theorem ((a,b).-->c).(a,b) = c proof [a,b] in {[a,b]} by TARSKI:def 1; hence thesis by Th7; end; definition let x,y,a,b be set; func IFEQ(x,y,a,b) -> set equals :Def8: a if x = y otherwise b; correctness; end; definition let D be set; let x,y be set, a,b be Element of D; redefine func IFEQ(x,y,a,b) -> Element of D; coherence proof x = y or x <> y; hence thesis by Def8; end; end; definition let x,y be set; func x .--> y -> set equals {x} --> y; coherence; end; registration let x,y be set; cluster x .--> y -> Function-like Relation-like; coherence; end; registration let x,y be set; cluster x .--> y -> one-to-one; coherence proof let x1,x2 be set; set f = x .--> y; assume that A1: x1 in dom f and A2: x2 in dom f; A3: dom f = {x} by Th13; then x1 =x by A1,TARSKI:def 1; hence thesis by A3,A2,TARSKI:def 1; end; end; theorem Th72: for x,y be set holds (x .--> y).x = y proof let x,y be set; x in {x} by TARSKI:def 1; hence thesis by Th7; end; theorem for a,b being set, f being Function holds a.-->b c= f iff a in dom f & f.a = b proof let a,b be set, f be Function; A1: dom(a.-->b) = {a} by Th13; then A2: a in dom(a.-->b) by TARSKI:def 1; hereby assume A3: a.-->b c= f; then {a} c= dom f by A1,GRFUNC_1:2; hence a in dom f by ZFMISC_1:31; thus f.a = (a.-->b).a by A2,A3,GRFUNC_1:2 .= b by Th72; end; assume that A4: a in dom f and A5: f.a = b; A6: now let x be set; assume x in dom(a.-->b); then x = a by A1,TARSKI:def 1; hence (a.-->b).x = f.x by A5,Th72; end; dom(a.-->b) c= dom f by A1,A4,ZFMISC_1:31; hence thesis by A6,GRFUNC_1:2; end; notation let o,m,r be set; synonym (o,m) :-> r for (o,m) .--> r; end; Lm2: for o,m,r be set holds (o,m) :-> r is Function of [:{o},{m}:],{r} proof let o,m,r be set; dom((o,m) :-> r) = {[o,m]} by Th13 .= [:{o},{m}:] by ZFMISC_1:29; hence thesis by FUNCT_2:def 1; end; definition let o,m,r be set; redefine func (o,m) :-> r -> Function of [:{o},{m}:],{r} means not contradiction; coherence by Lm2; compatibility proof let f be Function of [:{o},{m}:],{r}; (o,m) .--> r is Function of [:{o},{m}:],{r} by Lm2; hence thesis by FUNCT_2:51; end; end; reserve x,y,z for set; theorem x in dom(x .--> y) proof dom(x .--> y) = {x} by Th13; hence thesis by TARSKI:def 1; end; theorem z in dom(x .--> y) implies z = x proof dom(x .--> y) = {x} by Th13; hence thesis by TARSKI:def 1; end; theorem not x in A implies (x .--> y)|A = {} proof assume not x in A; then {x} misses A by ZFMISC_1:50; then dom(x .--> y) misses A by Th13; hence thesis by RELAT_1:66; end; notation let x,y; synonym x :-> y for x .--> y; end; definition let m,o be set; redefine func m :-> o -> Function of {m}, {o}; coherence; end; theorem for x being Element of {a} for y being Element of {b} holds ((a,b):->c ).(x,y) = c by TARSKI:def 1; registration let f be Function-yielding Function, C be set; cluster f|C -> Function-yielding; coherence proof let i be set; f.i is Function; hence thesis by FUNCT_1:47; end; end; registration let A be set; let f be Function; cluster A --> f -> Function-yielding; coherence proof let a be set; thus thesis; end; end; registration let X,a be set; cluster X --> a -> constant; coherence proof let x,y be set; assume that A1: x in dom(X --> a) and A2: y in dom(X --> a); thus (X --> a).x = a by A1,Th7 .= (X --> a).y by A2,Th7; end; end; registration cluster non empty constant for Function; existence proof take {{}} --> {}; thus thesis; end; end; registration let f be constant Function, X be set; cluster f|X -> constant; coherence proof let x,y be set; A1: dom(f|X) c= dom f by RELAT_1:60; assume that A2: x in dom(f|X) and A3: y in dom (f|X); thus (f|X).x = f.x by A2,FUNCT_1:47 .= f.y by A1,A2,A3,FUNCT_1:def 10 .= (f|X).y by A3,FUNCT_1:47; end; end; theorem for f being non empty constant Function ex y st for x st x in dom f holds f.x = y proof let f be non empty constant Function; consider y such that A1: y in rng f by XBOOLE_0:def 1; take y; ex x0 being set st x0 in dom f & f.x0 = y by A1,FUNCT_1:def 3; hence thesis by FUNCT_1:def 10; end; theorem for X being non empty set, x being set holds the_value_of (X --> x) = x proof let X be non empty set, x be set; set f = X --> x; ex i being set st i in dom f & the_value_of f = f.i by FUNCT_1:def 12; hence thesis by Th7; end; theorem for f being constant Function holds f = (dom f) --> the_value_of f proof let f be constant Function; thus dom ((dom f) --> the_value_of f) = dom f by Th13; let x be set; assume A1: x in dom f; then f <> {} & ((dom f) --> the_value_of f).x = the_value_of f by Th7; hence thesis by A1,FUNCT_1:def 12; end; registration let X be set, Y be non empty set; cluster total for PartFunc of X,Y; existence proof consider y being set such that A1: y in Y by XBOOLE_0:def 1; reconsider y as Element of Y by A1; take X --> y; thus thesis; end; end; registration let I, A be set; cluster I --> A -> I-defined; coherence; end; registration let I, A be set; cluster I .--> A -> {I}-defined; coherence; end; theorem (A --> x).:B c= {x}; registration let I be set, f be Function; cluster I .--> f -> Function-yielding; coherence; end; registration let I be set; cluster total for I-defined non-empty Function; existence proof take I --> 1; thus thesis; end; end; theorem Th82: x .--> y is_isomorphism_of {[x,x]},{[y,y]} proof set F = x .--> y; set R = {[x,x]}; set S = {[y,y]}; A1: field R = {x} by RELAT_1:173; hence dom F = field R by Th13; field S = {y} by RELAT_1:173; hence rng F = field S by RELAT_1:160; thus F is one-to-one; let a,b be set; hereby assume [a,b] in R; then [a,b] = [x,x] by TARSKI:def 1; then A2: a = x & b = x by XTUPLE_0:1; hence a in field R & b in field R by A1,TARSKI:def 1; F.x = y by Th72; hence [F.a,F.b] in S by A2,TARSKI:def 1; end; assume a in field R & b in field R; then a = x & b = x by A1,TARSKI:def 1; hence thesis by TARSKI:def 1; end; theorem {[x,x]}, {[y,y]} are_isomorphic proof take x .--> y; thus thesis by Th82; end; registration let I, A be set; cluster I --> A -> total for I-defined Function; coherence; end; theorem for f being Function st x in dom f holds x .--> f.x c= f proof let f be Function; assume x in dom f; then [x, f.x] in f by FUNCT_1:1; then {[x, f.x]} c= f by ZFMISC_1:31; hence thesis by ZFMISC_1:29; end; registration let A be non empty set; let x be set, i be Element of A; cluster x .--> i -> A-valued; coherence proof rng(x .--> i) = {i} by RELAT_1:160; hence rng(x .--> i) c= A by ZFMISC_1:31; end; end; reserve Y for set, f,g for Function of Y,X, x for Element of X, y for Element of Y; theorem F is associative implies F.:(F[;](x,f),g) = F[;](x,F.:(f,g)) proof assume A1: F is associative; per cases; suppose Y = {}; hence thesis; end; suppose A2: Y <> {}; now let y; reconsider x1 = f.y, x2 = g.y as Element of X by A2,FUNCT_2:5; thus (F[;](x,F.:(f,g))).y = F.(x,F.:(f,g).y) by A2,Th53 .= F.(x,F.(x1,x2)) by A2,Th37 .= F.(F.(x,x1),x2) by A1,BINOP_1:def 3 .= F.(F[;](x,f).y,g.y) by A2,Th53; end; hence thesis by A2,Th38; end; end; registration let A be set, B be non empty set, x be Element of B; cluster A --> x -> B-valued; coherence; end; registration let A be non empty set, x be Element of A, y be set; cluster x .--> y -> A-defined; coherence proof dom(x .--> y) = {x} by Th13; hence dom(x .--> y) c= A by ZFMISC_1:31; end; end; theorem for x,y,A being set st x in A holds (x .--> y)|A = x .--> y proof let x,y,A be set; assume x in A; then {x} c= A by ZFMISC_1:31; then dom(x .--> y) c= A by Th13; hence thesis by RELAT_1:68; end; registration let Y be functional set; cluster Y-valued -> Function-yielding for Function; coherence proof let f be Function; assume A1: f is Y-valued; let x be set; thus thesis by A1; end; end; definition let IT be Function; attr IT is Relation-yielding means for x be set st x in dom IT holds IT.x is Relation; end; registration cluster Function-yielding -> Relation-yielding for Function; coherence proof let f be Function; assume A1: f is Function-yielding; let x be set; thus thesis by A1; end; end; registration cluster empty -> Function-yielding for Function; coherence proof let f be Function; assume A1: f is empty; let x be set; thus thesis by A1; end; end; theorem for X,Y,x,y being set holds X --> x tolerates Y --> y iff x = y or X misses Y proof let X,Y,x,y be set; set f = X --> x, g = Y --> y; A1: dom g = Y by Th13; A2: dom f = X by Th13; thus f tolerates g implies x = y or X misses Y proof assume that A3: for z being set st z in dom f /\ dom g holds f.z = g.z and A4: x <> y; assume X meets Y; then consider z be set such that A5: z in X and A6: z in Y by XBOOLE_0:3; A7: f.z = x by A5,Th7; A8: g.z = y by A6,Th7; z in X /\ Y by A5,A6,XBOOLE_0:def 4; hence thesis by A2,A1,A3,A4,A7,A8; end; assume A9: x = y or X misses Y; let z be set; assume A10: z in dom f /\ dom g; then A11: z in Y; A12: z in X by A2,A10,XBOOLE_0:def 4; then f.z = x by Th7; hence thesis by A9,A12,A11,Th7,XBOOLE_0:3; end; reserve x,y,z,A for set; theorem Th88: rng(x .--> y) = {y} proof dom(x .--> y) = {x} by Th13; hence rng(x .--> y) = {(x .--> y).x} by FUNCT_1:4 .= {y} by Th72; end; theorem z in A implies (A --> x)*(y .--> z) = y .--> x proof assume A1: z in A; A2: dom(y .--> z) = {y} by Th13 .= dom(y .--> x) by Th13; rng(y .--> z) = {z} by Th88; then rng(y .--> z) c= A by A1,ZFMISC_1:31; then rng(y .--> z) c= dom(A --> x) by Th13; hence dom((A --> x)*(y .--> z)) = dom(y .--> x) by A2,RELAT_1:27; let e be set; assume A3: e in dom((A --> x)*(y .--> z)); thus ((A --> x)*(y .--> z)).e = (A --> x).((y .--> z).e) by A3,FUNCT_1:12 .= (A --> x).z by A3,Th7 .= x by A1,Th7 .= (y .--> x).e by A3,Th7; end; begin reserve a,b,p,x,x9,x1,x19,x2,y,y9,y1,y19,y2,z,z9,z1,z2,X,X9,Y,Y9,Z,Z9 for set; reserve A,D,D9 for non empty set; reserve f,g,h for Function; Lm1: [[x,x9],[y,y9]] = [[x1,x19],[y1,y19]] implies x = x1 & y = y1 & x9= x19 & y9 = y19 proof assume [[x,x9],[y,y9]] = [[x1,x19],[y1,y19]]; then [x,x9] = [x1,x19] & [y,y9] = [y1,y19] by XTUPLE_0:1; hence thesis by XTUPLE_0:1; end; theorem Th1: (for z st z in Z holds ex x,y st z = [x,y]) implies ex X,Y st Z c= [:X,Y:] proof assume A1: for z st z in Z holds ex x,y st z = [x,y]; defpred P[set] means ex y st [ $1,y] in Z; consider X such that A2: x in X iff x in union union Z & P[ x] from XBOOLE_0:sch 1; defpred P[set] means ex x st [x,$1] in Z; consider Y such that A3: y in Y iff y in union union Z & P[y] from XBOOLE_0:sch 1; take X,Y; let z; assume A4: z in Z; then consider x,y such that A5: z = [x,y] by A1; x in union union Z by A4,A5,ZFMISC_1:134; then A6: x in X by A2,A4,A5; y in union union Z by A4,A5,ZFMISC_1:134; then y in Y by A3,A4,A5; hence thesis by A5,A6,ZFMISC_1:87; end; theorem g*f = (g|rng f)*f proof x in dom(g*f) iff x in dom((g|rng f)*f) proof A1: dom(g|rng f) = dom g /\ rng f by RELAT_1:61; thus x in dom(g*f) implies x in dom((g|rng f)*f) proof assume A2: x in dom(g*f); then A3: x in dom f by FUNCT_1:11; x in dom f by A2,FUNCT_1:11; then A4: f.x in rng f by FUNCT_1:def 3; f.x in dom g by A2,FUNCT_1:11; then f.x in dom(g|rng f) by A1,A4,XBOOLE_0:def 4; hence thesis by A3,FUNCT_1:11; end; assume A5: x in dom((g|rng f)*f); then f.x in dom(g|rng f) by FUNCT_1:11; then A6: f.x in dom g by A1,XBOOLE_0:def 4; x in dom f by A5,FUNCT_1:11; hence thesis by A6,FUNCT_1:11; end; then A7: dom(g*f) = dom((g|rng f)*f) by TARSKI:1; x in dom(g*f) implies (g*f).x = ((g|rng f)*f).x proof assume A8: x in dom(g*f); then A9: x in dom f by FUNCT_1:11; then A10: f.x in rng f by FUNCT_1:def 3; thus (g*f).x = g.(f.x) by A8,FUNCT_1:12 .= (g|rng f).(f.x) by A10,FUNCT_1:49 .= ((g|rng f)*f).x by A9,FUNCT_1:13; end; hence thesis by A7,FUNCT_1:2; end; theorem id X c= id Y iff X c= Y proof thus id X c= id Y implies X c= Y proof assume A1: id X c= id Y; let x; assume x in X; then [x,x] in id X by RELAT_1:def 10; hence thesis by A1,RELAT_1:def 10; end; assume A2: X c= Y; let z; assume A3: z in id X; then consider x,x9 such that A4: x in X and x9 in X and A5: z = [x,x9] by ZFMISC_1:84; x = x9 by A3,A5,RELAT_1:def 10; hence thesis by A2,A4,A5,RELAT_1:def 10; end; theorem X c= Y implies X --> a c= Y --> a proof A1: dom(X --> a) = X by FUNCOP_1:13; assume A2: X c= Y; A3: now let x; assume A4: x in dom(X --> a); then (X --> a).x = a by FUNCOP_1:7; hence (X --> a).x = (Y --> a).x by A2,A1,A4,FUNCOP_1:7; end; dom(Y --> a) = Y by FUNCOP_1:13; hence thesis by A2,A1,A3,GRFUNC_1:2; end; theorem Th5: X --> a c= Y --> b implies X c= Y proof assume X --> a c= Y --> b; then A1: dom(X --> a) c= dom(Y --> b) by RELAT_1:11; dom(X --> a) = X by FUNCOP_1:13; hence thesis by A1,FUNCOP_1:13; end; theorem X <> {} & X --> a c= Y --> b implies a = b proof assume A1: X <> {}; set x = the Element of X; assume A2: X --> a c= Y --> b; then X c= Y by Th5; then x in Y by A1,TARSKI:def 3; then A3: (Y --> b).x = b by FUNCOP_1:7; dom(X --> a) = X & (X --> a).x = a by A1,FUNCOP_1:7,13; hence thesis by A1,A2,A3,GRFUNC_1:2; end; theorem x in dom f implies x .--> f.x c= f proof A1: now let y; assume y in dom (x .--> f.x); then x = y by FUNCOP_1:75; hence (x .--> f.x).y = f.y by FUNCOP_1:72; end; assume A2: x in dom f; dom (x .--> f.x) c= dom f proof let y; thus thesis by A2,FUNCOP_1:75; end; hence thesis by A1,GRFUNC_1:2; end; theorem Y|`f|X c= f proof Y|`f|X c= Y|`f & Y|`f c= f by RELAT_1:59,86; hence thesis by XBOOLE_1:1; end; theorem f c= g implies Y|`f|X c= Y|`g|X proof assume f c= g; then Y|`f c= Y|`g by RELAT_1:101; hence thesis by RELAT_1:76; end; definition let f,g; func f +* g -> Function means :Def1: dom it = dom f \/ dom g & for x st x in dom f \/ dom g holds (x in dom g implies it.x = g.x) & (not x in dom g implies it.x = f.x); existence proof deffunc G(set) = f.$1; deffunc F(set) = g.$1; defpred P[set] means $1 in dom g; thus ex F being Function st dom F = dom f \/ dom g & for x st x in dom f \/ dom g holds (P[x] implies F.x = F(x)) & (not P[x] implies F.x = G(x)) from PARTFUN1:sch 1; end; uniqueness proof let h1,h2 be Function such that A1: dom h1 = dom f \/ dom g and A2: for x st x in dom f \/ dom g holds (x in dom g implies h1.x = g.x) & (not x in dom g implies h1.x = f.x) and A3: dom h2 = dom f \/ dom g and A4: for x st x in dom f \/ dom g holds (x in dom g implies h2.x = g.x) & (not x in dom g implies h2.x = f.x); for x st x in dom f \/ dom g holds h1.x = h2.x proof let x; assume A5: x in dom f \/ dom g; then A6: not x in dom g implies h1.x = f.x & h2.x = f.x by A2,A4; x in dom g implies h1.x = g.x & h2.x = g.x by A2,A4,A5; hence thesis by A6; end; hence thesis by A1,A3,FUNCT_1:2; end; idempotence; end; theorem Th10: dom f c= dom(f+*g) & dom g c= dom(f+*g) proof dom(f+*g) = dom f \/ dom g by Def1; hence thesis by XBOOLE_1:7; end; theorem Th11: not x in dom g implies (f +* g).x = f.x proof assume A1: not x in dom g; per cases; suppose x in dom f; then x in dom f \/ dom g by XBOOLE_0:def 3; hence thesis by A1,Def1; end; suppose A2: not x in dom f; then not x in dom f \/ dom g by A1,XBOOLE_0:def 3; then not x in dom(f+*g) by Def1; hence (f+*g).x = {} by FUNCT_1:def 2 .= f.x by A2,FUNCT_1:def 2; end; end; theorem Th12: x in dom(f +* g) iff x in dom f or x in dom g proof x in dom(f +* g) iff x in dom f \/ dom g by Def1; hence thesis by XBOOLE_0:def 3; end; theorem Th13: x in dom g implies (f+*g).x = g.x proof x in dom g implies x in dom f \/ dom g by XBOOLE_0:def 3; hence thesis by Def1; end; theorem Th14: f +* g +* h = f +* (g +* h) proof A1: now let x such that x in dom f \/ dom(g +* h); hereby assume A2: x in dom(g +* h); per cases by A2,Th12; suppose A3: x in dom g & not x in dom h; hence (f +* g +* h).x = (f +* g).x by Th11 .= g.x by A3,Th13 .= (g +* h).x by A3,Th11; end; suppose A4: x in dom h; hence (f +* g +* h).x = h.x by Th13 .= (g +* h).x by A4,Th13; end; end; assume A5: not x in dom(g +* h); then A6: not x in dom g by Th12; not x in dom h by A5,Th12; hence (f +* g +* h).x = (f +* g).x by Th11 .= f.x by A6,Th11; end; dom(f +* g +* h) = dom(f +* g) \/ dom h by Def1 .= dom f \/ dom g \/ dom h by Def1 .= dom f \/ (dom g \/ dom h) by XBOOLE_1:4 .= dom f \/ dom(g +* h) by Def1; hence thesis by A1,Def1; end; theorem Th15: f tolerates g & x in dom f implies (f+*g).x = f.x proof assume that A1: f tolerates g and A2: x in dom f; now per cases; suppose x in dom g; then x in dom f /\ dom g & (f+*g).x = g.x by A2,Th13,XBOOLE_0:def 4; hence thesis by A1,PARTFUN1:def 4; end; suppose not x in dom g; hence thesis by Th11; end; end; hence thesis; end; theorem dom f misses dom g & x in dom f implies (f +* g).x = f.x proof assume dom f /\ dom g = {} & x in dom f; then not x in dom g by XBOOLE_0:def 4; hence thesis by Th11; end; theorem Th17: rng(f +* g) c= rng f \/ rng g proof let y; assume y in rng(f +* g); then consider x such that A1: x in dom (f +* g) and A2: y = (f +* g).x by FUNCT_1:def 3; x in dom f & not x in dom g or x in dom g by A1,Th12; then x in dom f & (f +* g).x = f.x or x in dom g & (f +* g).x = g.x by Th11 ,Th13; then y in rng f or y in rng g by A2,FUNCT_1:def 3; hence thesis by XBOOLE_0:def 3; end; theorem rng g c= rng(f +* g) proof let y; assume y in rng g; then consider x such that A1: x in dom g & y = g.x by FUNCT_1:def 3; x in dom(f +* g) & (f +* g).x = y by A1,Th12,Th13; hence thesis by FUNCT_1:def 3; end; theorem Th19: dom f c= dom g implies f +* g = g proof assume dom f c= dom g; then dom f \/ dom g = dom g by XBOOLE_1:12; then dom(f +* g) = dom g & for x st x in dom g holds (f +* g).x = g.x by Def1 ; hence thesis by FUNCT_1:2; end; registration let f; let g be empty Function; reduce g +* f to f; reducibility proof dom g c= dom f by XBOOLE_1:2; hence thesis by Th19; end; reduce f +* g to f; reducibility proof A1: for x st x in dom f holds (f +* g).x = f.x proof let x; assume x in dom f; then x in dom f \ dom g; hence thesis by Th11; end; dom f \/ dom g = dom f; then dom(f +* g) = dom f by Def1; hence thesis by A1,FUNCT_1:2; end; end; theorem Th20: {} +* f = f; theorem Th21: f +* {} = f; theorem id(X) +* id(Y) = id(X \/ Y) proof A1: x in dom id(X \/ Y) implies (id(X) +* id(Y)).x = id(X \/ Y).x proof assume A2: x in dom id(X \/ Y); now per cases; suppose A3: x in Y; dom id Y = Y; hence (id(X) +* id(Y)).x = (id Y).x by A3,Th13 .= x by A3,FUNCT_1:18 .= id(X \/ Y).x by A2,FUNCT_1:18; end; suppose A4: not x in Y; then A5: x in X by A2,XBOOLE_0:def 3; not x in dom id Y by A4; hence (id(X) +* id(Y)).x = (id X).x by Th11 .= x by A5,FUNCT_1:18 .= id(X \/ Y).x by A2,FUNCT_1:18; end; end; hence thesis; end; dom(id(X) +* id(Y)) = dom id X \/ dom id Y by Def1 .= X \/ dom id Y .= X \/ Y .= dom id(X \/ Y); hence thesis by A1,FUNCT_1:2; end; theorem (f +* g)|(dom g) = g proof dom f \/ dom g = dom(f +* g) by Def1; then A1: dom((f +* g)|(dom g)) = dom g by RELAT_1:62,XBOOLE_1:7; for x st x in dom g holds ((f +* g)|(dom g)).x = g.x proof let x; x in dom g implies (f +* g).x = g.x by Th13; hence thesis by A1,FUNCT_1:47; end; hence thesis by A1,FUNCT_1:2; end; theorem Th24: ((f +* g)|(dom f \ dom g)) c= f proof A1: for x st x in dom((f +* g)|(dom f \ dom g)) holds ((f +* g)|(dom f \ dom g)).x = f.x proof let x such that A2: x in dom((f +* g)|(dom f \ dom g)); dom((f +* g)|(dom f \ dom g)) c= dom f \ dom g by RELAT_1:58; then not x in dom g by A2,XBOOLE_0:def 5; then (f +* g).x = f.x by Th11; hence thesis by A2,FUNCT_1:47; end; dom((f +* g)|(dom f \ dom g)) c= dom f \ dom g by RELAT_1:58; then dom((f +* g)|(dom f \ dom g)) c= dom f by XBOOLE_1:1; hence thesis by A1,GRFUNC_1:2; end; theorem Th25: g c= f +* g proof dom(f +* g) = dom f \/ dom g by Def1; then A1: dom g c= dom(f +* g) by XBOOLE_1:7; for x st x in dom g holds (f+*g).x = g.x by Th13; hence thesis by A1,GRFUNC_1:2; end; theorem f tolerates g +* h implies f|(dom f \ dom h) tolerates g proof assume A1: f tolerates g +* h; let x; assume A2: x in dom(f|(dom f \ dom h)) /\ dom g; then A3: x in dom(f|(dom f \ dom h)) by XBOOLE_0:def 4; x in dom g by A2,XBOOLE_0:def 4; then A4: x in dom(g +* h) by Th12; A5: dom(f|(dom f \ dom h)) c= dom f \ dom h by RELAT_1:58; then x in dom f by A3,XBOOLE_0:def 5; then A6: x in dom f /\ dom(g +* h) by A4,XBOOLE_0:def 4; not x in dom h by A3,A5,XBOOLE_0:def 5; then (g +* h).x = g.x by Th11; then f.x = g.x by A1,A6,PARTFUN1:def 4; hence thesis by A3,A5,FUNCT_1:49; end; theorem Th27: f tolerates g +* h implies f tolerates h proof assume A1: f tolerates g +* h; let x; assume A2: x in dom f /\ dom h; then A3: x in dom f by XBOOLE_0:def 4; A4: x in dom h by A2,XBOOLE_0:def 4; then x in dom(g +* h) by Th12; then A5: x in dom f /\ dom(g +* h) by A3,XBOOLE_0:def 4; (g +* h).x = h.x by A4,Th13; hence thesis by A1,A5,PARTFUN1:def 4; end; theorem Th28: f tolerates g iff f c= f +* g proof thus f tolerates g implies f c= (f +* g) proof dom f \/ dom g = dom(f +* g) by Def1; then A1: dom f c= dom(f +* g) by XBOOLE_1:7; assume f tolerates g; then for x st x in dom f holds (f +* g).x = f.x by Th15; hence thesis by A1,GRFUNC_1:2; end; thus thesis by Th27,PARTFUN1:54; end; theorem Th29: f +* g c= f \/ g proof let p; assume A1: p in f +* g; then consider x,y such that A2: p = [x,y] by RELAT_1:def 1; x in dom(f +* g) by A1,A2,FUNCT_1:1; then x in dom f & not x in dom g or x in dom g by Th12; then A3: x in dom f & (f +* g).x = f.x or x in dom g & (f +* g).x = g.x by Th11,Th13 ; y = (f +* g).x by A1,A2,FUNCT_1:1; then p in f or p in g by A2,A3,FUNCT_1:1; hence thesis by XBOOLE_0:def 3; end; theorem Th30: f tolerates g iff f \/ g = f +* g proof thus f tolerates g implies f \/ g = f +* g proof assume f tolerates g; then A1: f c= f +* g by Th28; A2: f +* g c= f \/ g by Th29; g c= f +* g by Th25; then f \/ g c= f +* g by A1,XBOOLE_1:8; hence thesis by A2,XBOOLE_0:def 10; end; thus thesis by PARTFUN1:51; end; theorem Th31: dom f misses dom g implies f \/ g = f +* g proof assume dom f misses dom g; then f tolerates g by PARTFUN1:56; hence thesis by Th30; end; theorem Th32: dom f misses dom g implies f c= f +* g proof assume dom f misses dom g; then f \/ g = f +* g by Th31; hence thesis by XBOOLE_1:7; end; theorem dom f misses dom g implies (f +* g)|(dom f) = f proof assume dom f misses dom g; then A1: dom f \ dom g = dom f by XBOOLE_1:83; dom((f +* g)|(dom f)) = dom(f +* g) /\ dom f by RELAT_1:61 .= (dom f \/ dom g) /\ dom f by Def1 .= dom f by XBOOLE_1:21; hence thesis by A1,Th24,GRFUNC_1:3; end; theorem Th34: f tolerates g iff f +* g = g +* f proof thus f tolerates g implies f +* g = g +* f proof assume A1: f tolerates g; A2: for x st x in dom(f +* g) holds (f +* g).x = (g +* f).x proof let x such that A3: x in dom(f +* g); now A4: dom(f +* g) = dom f \/ dom g by Def1; per cases by A3,A4,XBOOLE_0:def 3; suppose A5: x in dom f & x in dom g; then A6: (g +* f).x = f.x by Th13; x in dom f /\ dom g & (f +* g).x = g.x by A5,Th13,XBOOLE_0:def 4; hence thesis by A1,A6,PARTFUN1:def 4; end; suppose A7: x in dom f & not x in dom g; then (f +* g).x = f.x by Th11; hence thesis by A7,Th13; end; suppose A8: not x in dom f & x in dom g; then (f +* g).x = g.x by Th13; hence thesis by A8,Th11; end; end; hence thesis; end; dom(f +* g) = dom g \/ dom f by Def1 .= dom(g +* f) by Def1; hence thesis by A2,FUNCT_1:2; end; assume A9: f +* g = g +* f; let x; assume A10: x in dom f /\ dom g; then x in dom g by XBOOLE_0:def 4; then A11: (f +* g).x = g.x by Th13; x in dom f by A10,XBOOLE_0:def 4; hence thesis by A9,A11,Th13; end; theorem Th35: dom f misses dom g implies f +* g = g +* f proof assume dom f misses dom g; then f tolerates g by PARTFUN1:56; hence thesis by Th34; end; theorem for f,g being PartFunc of X,Y st g is total holds f +* g = g proof let f,g be PartFunc of X,Y; assume dom g = X; then dom f c= dom g; hence thesis by Th19; end; theorem Th37: for f,g being Function of X,Y st Y = {} implies X = {} holds f +* g = g proof let f,g be Function of X,Y; assume Y = {} implies X = {}; then dom f = X & dom g = X by FUNCT_2:def 1; hence thesis by Th19; end; theorem for f,g being Function of X,X holds f +* g = g by Th37; theorem for f,g being Function of X,D holds f +* g = g by Th37; theorem for f,g being PartFunc of X,Y holds f +* g is PartFunc of X,Y proof let f,g be PartFunc of X,Y; rng (f +* g) c= rng f \/ rng g by Th17; then A1: rng(f +* g) c= Y by XBOOLE_1:1; dom (f +* g) = dom f \/ dom g by Def1; hence thesis by A1,RELSET_1:4; end; definition let f; func ~f -> Function means :Def2: (for x holds x in dom it iff ex y,z st x = [z,y] & [y,z] in dom f) & for y,z st [y,z] in dom f holds it.(z,y) = f.(y,z); existence proof defpred P[set,set] means ex y,z st $1 = [z,y] & $2 = f.[y,z]; defpred P[set] means ex y st [ $1,y] in dom f; consider D1 being set such that A1: x in D1 iff x in union union dom f & P[ x] from XBOOLE_0:sch 1; defpred P[set] means ex y st [y,$1] in dom f; consider D2 being set such that A2: y in D2 iff y in union union dom f & P[y] from XBOOLE_0:sch 1; defpred P[set] means ex y,z st $1 = [z,y] & [y,z] in dom f; consider D being set such that A3: x in D iff x in [:D2,D1:] & P[ x] from XBOOLE_0:sch 1; A4: for x,y1,y2 st x in D & P[x,y1] & P[x,y2] holds y1 = y2 proof let x,y1,y2 such that x in D; given y,z such that A5: x = [z,y] and A6: y1 = f.[y,z]; given y9,z9 such that A7: x = [z9,y9] and A8: y2 = f.[y9,z9]; z = z9 by A5,A7,XTUPLE_0:1; hence thesis by A5,A6,A7,A8,XTUPLE_0:1; end; A9: for x st x in D ex y1 st P[x,y1] proof let x; assume x in D; then consider y,z such that A10: x = [z,y] and [y,z] in dom f by A3; take f.[y,z]; thus thesis by A10; end; consider h being Function such that A11: dom h = D and A12: for x st x in D holds P[x,h.x] from FUNCT_1:sch 2(A4,A9); take h; thus A13: for x holds x in dom h iff ex y,z st x = [z,y] & [y,z] in dom f proof let x; thus x in dom h implies ex y,z st x = [z,y] & [y,z] in dom f by A3,A11; given y,z such that A14: x = [z,y] and A15: [y,z] in dom f; y in union union dom f by A15,ZFMISC_1:134; then A16: y in D1 by A1,A15; z in union union dom f by A15,ZFMISC_1:134; then z in D2 by A2,A15; then [z,y] in [:D2,D1:] by A16,ZFMISC_1:87; hence thesis by A3,A11,A14,A15; end; let y,z; assume [y,z] in dom f; then [z,y] in D by A11,A13; then consider y9,z9 such that A17: [z,y] = [z9,y9] and A18: h.(z,y) = f.[y9,z9] by A12; z = z9 by A17,XTUPLE_0:1; hence thesis by A17,A18,XTUPLE_0:1; end; uniqueness proof let h1,h2 be Function such that A19: for x holds x in dom h1 iff ex y,z st x = [z,y] & [y,z] in dom f and A20: for y,z st [y,z] in dom f holds h1.(z,y) = f.(y,z) and A21: for x holds x in dom h2 iff ex y,z st x = [z,y] & [y,z] in dom f and A22: for y,z st [y,z] in dom f holds h2.(z,y) = f.(y,z); A23: x in dom h1 implies h1.x = h2.x proof assume x in dom h1; then consider x1,x2 such that A24: x = [x2,x1] and A25: [x1,x2] in dom f by A19; h1.(x2,x1) = f.(x1,x2) by A20,A25 .= h2.(x2,x1) by A22,A25; hence thesis by A24; end; x in dom h1 iff x in dom h2 proof x in dom h1 iff ex y,z st x = [z,y] & [y,z] in dom f by A19; hence thesis by A21; end; then dom h1 = dom h2 by TARSKI:1; hence thesis by A23,FUNCT_1:2; end; end; theorem Th41: rng ~f c= rng f proof let y; assume y in rng ~f; then consider x such that A1: x in dom ~f and A2: y = (~f).x by FUNCT_1:def 3; consider x1,x2 such that A3: x = [x2,x1] and A4: [x1,x2] in dom f by A1,Def2; y = (~f).(x2,x1) by A2,A3 .= f.(x1,x2) by A4,Def2; hence thesis by A4,FUNCT_1:def 3; end; theorem Th42: [x,y] in dom f iff [y,x] in dom ~f proof thus [x,y] in dom f implies [y,x] in dom ~f by Def2; assume [y,x] in dom ~f; then consider x1,y1 such that A1: [y,x] = [y1,x1] and A2: [x1,y1] in dom f by Def2; x1 = x by A1,XTUPLE_0:1; hence thesis by A1,A2,XTUPLE_0:1; end; theorem [y,x] in dom ~f implies (~f).(y,x) = f.(x,y) proof assume [y,x] in dom ~f; then [x,y] in dom f by Th42; hence thesis by Def2; end; theorem ex X,Y st dom ~f c= [:X,Y:] proof now let z; assume z in dom ~f; then ex x,y st z = [y,x] & [x,y] in dom f by Def2; hence ex x,y st z = [x,y]; end; hence thesis by Th1; end; theorem Th45: dom f c= [:X,Y:] implies dom ~f c= [:Y,X:] proof assume A1: dom f c= [:X,Y:]; let z; assume z in dom ~f; then ex x,y st z = [y,x] & [x,y] in dom f by Def2; hence thesis by A1,ZFMISC_1:88; end; theorem Th46: dom f = [:X,Y:] implies dom ~f = [:Y,X:] proof assume A1: dom f = [:X,Y:]; hence dom ~f c= [:Y,X:] by Th45; let z; assume z in [:Y,X:]; then consider y,x such that A2: y in Y & x in X and A3: z = [y,x] by ZFMISC_1:def 2; [x,y] in dom f by A1,A2,ZFMISC_1:def 2; hence thesis by A3,Def2; end; theorem Th47: dom f c= [:X,Y:] implies rng ~f = rng f proof assume A1: dom f c= [:X,Y:]; thus rng ~f c= rng f by Th41; let y; assume y in rng f; then consider x such that A2: x in dom f and A3: y = f.x by FUNCT_1:def 3; consider x1,y1 such that x1 in X and y1 in Y and A4: x =[x1,y1] by A1,A2,ZFMISC_1:84; A5: [y1,x1] in dom ~f by A2,A4,Th42; y = f.(x1,y1) by A3,A4 .= (~f).(y1,x1) by A2,A4,Def2; hence thesis by A5,FUNCT_1:def 3; end; theorem for f being PartFunc of [:X,Y:],Z holds ~f is PartFunc of [:Y,X:],Z proof let f be PartFunc of [:X,Y:],Z; A1: dom f c= [:X,Y:]; then A2: dom ~f c= [:Y,X:] by Th45; rng f c= Z; then rng ~f c= Z by A1,Th47; hence thesis by A2,RELSET_1:4; end; theorem Th49: for f being Function of [:X,Y:],Z st Z<>{} holds ~f is Function of [:Y,X:],Z proof let f be Function of [:X,Y:],Z; assume A1: Z <> {}; then A2: dom f = [:X,Y:] by FUNCT_2:def 1; then A3: [:Y,X:] = dom ~f by Th46; rng f c= Z; then rng ~f c= Z by A2,Th47; then reconsider R = ~f as Relation of [:Y,X:],Z by A3,RELSET_1:4; R is quasi_total proof per cases; case Z <> {}; dom f = [:X,Y:] by A1,FUNCT_2:def 1; hence thesis by Th46; end; case Z = {}; hence thesis; end; end; hence thesis; end; theorem for f being Function of [:X,Y:],D holds ~f is Function of [:Y,X:],D by Th49; theorem Th51: ~~f c= f proof A1: now let x; assume x in dom ~~f; then consider y2,z2 such that A2: x = [z2,y2] & [y2,z2] in dom ~f by Def2; take y2,z2; thus x = [z2,y2] & [y2,z2] in dom ~ f & [z2,y2] in dom f by A2,Th42; end; A3: x in dom ~~f implies (~~f).x = f.x proof assume x in dom ~~f; then consider y2,z2 such that A4: x = [z2,y2] and A5: [y2,z2] in dom ~f and A6: [z2,y2] in dom f by A1; (~~f).(z2,y2) = (~f).(y2,z2) by A5,Def2 .= f.(z2,y2) by A6,Def2; hence thesis by A4; end; dom ~~f c= dom f proof let x; assume x in dom ~~f; then ex y2,z2 st x = [z2,y2] & [y2,z2] in dom ~ f & [z2,y2] in dom f by A1; hence thesis; end; hence thesis by A3,GRFUNC_1:2; end; theorem Th52: dom f c= [:X,Y:] implies ~~f = f proof assume A1: dom f c= [:X,Y:]; A2: ~~f c= f by Th51; dom ~~ f = dom f proof thus dom ~~f c= dom f by A2,RELAT_1:11; let z; assume A3: z in dom f; then consider x,y such that x in X and y in Y and A4: z = [x,y] by A1,ZFMISC_1:84; [y,x] in dom ~f by A3,A4,Th42; hence thesis by A4,Th42; end; hence thesis by Th51,GRFUNC_1:3; end; theorem for f being PartFunc of [:X,Y:],Z holds ~~f = f proof let f be PartFunc of [:X,Y:],Z; dom f c= [:X,Y:]; hence thesis by Th52; end; definition let f,g; func |:f,g:| -> Function means :Def3: (for z holds z in dom it iff ex x,y,x9 ,y9 st z = [[x,x9],[y,y9]] & [x,y] in dom f & [x9,y9] in dom g) & for x,y,x9,y9 st [x,y] in dom f & [x9,y9] in dom g holds it.([x,x9],[y,y9]) = [f.(x,y),g.(x9, y9)]; existence proof defpred P[set,set] means ex x,y,x9,y9 st $1 = [[x,x9],[y,y9]] & $2 = [f.[x ,y],g.[x9,y9]]; defpred P[set] means ex y st [ $1,y] in dom f; consider D1 being set such that A1: x in D1 iff x in union union dom f & P[ x] from XBOOLE_0:sch 1; defpred P[set] means ex x st [x,$1] in dom f; consider D2 being set such that A2: y in D2 iff y in union union dom f & P[y] from XBOOLE_0:sch 1; defpred P[set] means ex y st [ $1,y] in dom g; consider D19 being set such that A3: x in D19 iff x in union union dom g & P[ x] from XBOOLE_0:sch 1; defpred P[set] means ex x st [x,$1] in dom g; consider D29 being set such that A4: y in D29 iff y in union union dom g & P[y] from XBOOLE_0:sch 1; defpred P[set] means ex x,y,x9,y9 st $1 = [[x,x9],[y,y9]] & [x,y] in dom f & [x9,y9] in dom g; consider D being set such that A5: z in D iff z in [:[:D1,D19:],[:D2,D29:]:] & P[z] from XBOOLE_0:sch 1; A6: for z,z1,z2 st z in D & P[z,z1] & P[z,z2] holds z1 = z2 proof let z,z1,z2 such that z in D; given x,y,x9,y9 such that A7: z = [[x,x9],[y,y9]] and A8: z1 = [f.[x,y],g.[x9,y9]]; given x1,y1,x19,y19 such that A9: z = [[x1,x19],[y1,y19]] and A10: z2 = [f.[x1,y1],g.[x19,y19]]; A11: x9 = x19 by A7,A9,Lm1; x = x1 & y = y1 by A7,A9,Lm1; hence thesis by A7,A8,A9,A10,A11,Lm1; end; A12: for z st z in D holds ex z1 st P[z,z1] proof let z; assume z in D; then consider x,y,x9,y9 such that A13: z = [[x,x9],[y,y9]] and [x,y] in dom f and [x9,y9] in dom g by A5; take [f.[x,y],g.[x9,y9]]; thus thesis by A13; end; consider h being Function such that A14: dom h = D and A15: for z st z in D holds P[z,h.z] from FUNCT_1:sch 2(A6,A12); take h; thus A16: for z holds z in dom h iff ex x,y,x9,y9 st z = [[x,x9],[y,y9]] & [x,y] in dom f & [x9,y9] in dom g proof let z; thus z in dom h implies ex x,y,x9,y9 st z = [[x,x9],[y,y9]] & [x,y] in dom f & [x9,y9] in dom g by A5,A14; given x,y,x9,y9 such that A17: z = [[x,x9],[y,y9]] and A18: [x,y] in dom f and A19: [x9,y9] in dom g; y9 in union union dom g by A19,ZFMISC_1:134; then A20: y9 in D29 by A4,A19; y in union union dom f by A18,ZFMISC_1:134; then y in D2 by A2,A18; then A21: [y,y9] in [:D2,D29:] by A20,ZFMISC_1:87; x9 in union union dom g by A19,ZFMISC_1:134; then A22: x9 in D19 by A3,A19; x in union union dom f by A18,ZFMISC_1:134; then x in D1 by A1,A18; then [x,x9] in [:D1,D19:] by A22,ZFMISC_1:87; then z in [:[:D1,D19:],[:D2,D29:]:] by A17,A21,ZFMISC_1:87; hence thesis by A5,A14,A17,A18,A19; end; let x,y,x9,y9; assume [x,y] in dom f & [x9,y9] in dom g; then [[x,x9],[y,y9]] in D by A14,A16; then consider x1,y1,x19,y19 such that A23: [[x,x9],[y,y9]] = [[x1,x19],[y1,y19]] and A24: h.[[x,x9],[y,y9]] = [f.[x1,y1],g.[x19,y19]] by A15; A25: x9= x19 by A23,Lm1; x = x1 & y = y1 by A23,Lm1; hence thesis by A23,A24,A25,Lm1; end; uniqueness proof let h1,h2 be Function such that A26: for z holds z in dom h1 iff ex x,y,x9,y9 st z = [[x,x9],[y,y9]] & [x,y] in dom f & [x9,y9] in dom g and A27: for x,y,x9,y9 st [x,y] in dom f & [x9,y9] in dom g holds h1.([x, x9],[y,y9]) = [f.(x,y),g.(x9,y9)] and A28: for z holds z in dom h2 iff ex x,y,x9,y9 st z = [[x,x9],[y,y9]] & [x,y] in dom f & [x9,y9] in dom g and A29: for x,y,x9,y9 st [x,y] in dom f & [x9,y9] in dom g holds h2.([x, x9],[y,y9]) = [f.(x,y),g.(x9,y9)]; A30: z in dom h1 implies h1.z = h2.z proof assume z in dom h1; then consider x,y,x9,y9 such that A31: z = [[x,x9],[y,y9]] and A32: [x,y] in dom f & [x9,y9] in dom g by A26; h1.([x,x9],[y,y9]) = [f.(x,y),g.(x9,y9)] by A27,A32 .= h2.([x,x9],[y,y9]) by A29,A32; hence thesis by A31; end; z in dom h1 iff z in dom h2 proof z in dom h1 iff ex x,y,x9,y9 st z = [[x,x9],[y,y9]] & [x,y] in dom f & [x9,y9] in dom g by A26; hence thesis by A28; end; then dom h1 = dom h2 by TARSKI:1; hence thesis by A30,FUNCT_1:2; end; end; theorem Th54: [[x,x9],[y,y9]] in dom |:f,g:| iff [x,y] in dom f & [x9,y9] in dom g proof thus [[x,x9],[y,y9]] in dom |:f,g:| implies [x,y] in dom f & [x9,y9] in dom g proof assume [[x,x9],[y,y9]] in dom |:f,g:|; then consider x1,y1,x19,y19 such that A1: [[x,x9],[y,y9]] = [[x1,x19],[y1,y19]] and A2: [x1,y1] in dom f & [x19,y19] in dom g by Def3; x = x1 & x9= x19 by A1,Lm1; hence thesis by A1,A2,Lm1; end; thus thesis by Def3; end; theorem [[x,x9],[y,y9]] in dom |:f,g:| implies |:f,g:|.([x,x9],[y,y9]) = [f.(x ,y),g.(x9,y9)] proof assume [[x,x9],[y,y9]] in dom |:f,g:|; then [x,y] in dom f & [x9,y9] in dom g by Th54; hence thesis by Def3; end; theorem Th56: rng |:f,g:| c= [:rng f,rng g:] proof let z; assume z in rng |:f,g:|; then consider p such that A1: p in dom |:f,g:| and A2: z = |:f,g:|.p by FUNCT_1:def 3; consider x,y,x9,y9 such that A3: p = [[x,x9],[y,y9]] and A4: [x,y] in dom f & [x9,y9] in dom g by A1,Def3; A5: f.[x,y] in rng f & g.[x9,y9] in rng g by A4,FUNCT_1:def 3; z = |:f,g:|.([x,x9],[y,y9]) by A2,A3 .= [f.(x,y),g.(x9,y9)] by A4,Def3; hence thesis by A5,ZFMISC_1:87; end; theorem Th57: dom f c= [:X,Y:] & dom g c= [:X9,Y9:] implies dom|:f,g:| c= [:[: X,X9:],[:Y,Y9:]:] proof assume A1: dom f c= [:X,Y:] & dom g c= [:X9,Y9:]; let xy be set; assume xy in dom|:f,g:|; then consider x,y,x9,y9 such that A2: xy = [[x,x9],[y,y9]] and A3: [x,y] in dom f & [x9,y9] in dom g by Def3; y in Y & y9 in Y9 by A1,A3,ZFMISC_1:87; then A4: [y,y9] in [:Y,Y9:] by ZFMISC_1:87; x in X & x9 in X9 by A1,A3,ZFMISC_1:87; then [x,x9] in [:X,X9:] by ZFMISC_1:87; hence thesis by A2,A4,ZFMISC_1:87; end; theorem Th58: dom f = [:X,Y:] & dom g = [:X9,Y9:] implies dom|:f,g:| = [:[:X,X9:],[:Y,Y9:]:] proof assume A1: dom f = [:X,Y:] & dom g = [:X9,Y9:]; hence dom|:f,g:| c= [:[:X,X9:],[:Y,Y9:]:] by Th57; let z; assume z in [:[:X,X9:],[:Y,Y9:]:]; then consider xx,yy being set such that A2: xx in [:X,X9:] and A3: yy in [:Y,Y9:] and A4: z = [xx,yy] by ZFMISC_1:def 2; consider y,y9 such that A5: y in Y & y9 in Y9 and A6: yy = [y,y9] by A3,ZFMISC_1:def 2; consider x,x9 such that A7: x in X & x9 in X9 and A8: xx = [x,x9] by A2,ZFMISC_1:def 2; [x,y] in dom f & [x9,y9] in dom g by A1,A7,A5,ZFMISC_1:87; hence thesis by A4,A8,A6,Def3; end; theorem for f being PartFunc of [:X,Y:],Z for g being PartFunc of [:X9,Y9:],Z9 holds |:f,g:| is PartFunc of [:[:X,X9:],[:Y,Y9:]:],[:Z,Z9:] proof let f be PartFunc of [:X,Y:],Z; let g be PartFunc of [:X9,Y9:],Z9; rng |:f,g:| c= [:rng f,rng g:] & [:rng f,rng g:] c= [:Z,Z9:] by Th56, ZFMISC_1:96; then A1: rng|:f,g:| c= [:Z,Z9:] by XBOOLE_1:1; dom f c= [:X,Y:] & dom g c= [:X9,Y9:]; then dom|:f,g:| c= [:[:X,X9:],[:Y,Y9:]:] by Th57; hence thesis by A1,RELSET_1:4; end; theorem Th60: for f being Function of [:X,Y:],Z for g being Function of [:X9, Y9:],Z9 st Z <> {} & Z9 <> {} holds |:f,g:| is Function of [:[:X,X9:],[:Y,Y9:] :],[:Z,Z9:] proof let f be Function of [:X,Y:],Z; let g be Function of [:X9,Y9:],Z9; rng |:f,g:| c= [:rng f,rng g:] & [:rng f,rng g:] c= [:Z,Z9:] by Th56, ZFMISC_1:96; then A1: rng|:f,g:| c= [:Z,Z9:] by XBOOLE_1:1; assume A2: Z <> {} & Z9 <> {}; then dom f = [:X,Y:] & dom g = [:X9,Y9:] by FUNCT_2:def 1; then [:[:X,X9:],[:Y,Y9:]:] = dom|:f,g:| by Th58; then reconsider R = |:f,g:| as Relation of [:[:X,X9:],[:Y,Y9:]:],[:Z,Z9:] by A1,RELSET_1:4; R is quasi_total proof per cases; case [:Z,Z9:] <> {}; dom f = [:X,Y:] & dom g = [:X9,Y9:] by A2,FUNCT_2:def 1; hence thesis by Th58; end; case [:Z,Z9:] = {}; hence thesis; end; end; hence thesis; end; theorem for f being Function of [:X,Y:],D for g being Function of [:X9,Y9:],D9 holds |:f,g:| is Function of [:[:X,X9:],[:Y,Y9:]:],[:D,D9:] by Th60; definition let x,y,a,b be set; func (x,y) --> (a,b) -> set equals (x .--> a) +* (y .--> b); correctness; end; registration let x,y,a,b be set; cluster (x,y) --> (a,b) -> Function-like Relation-like; coherence; end; theorem Th62: dom((x1,x2) --> (y1,y2)) = {x1,x2} & rng((x1,x2) --> (y1,y2)) c= {y1,y2} proof set f = {x1} --> y1, g = {x2} -->y2, h = (x1,x2) --> (y1,y2); rng f \/ rng g c= {y1} \/ {y2} by XBOOLE_1:13; then A1: rng f \/ rng g c= {y1,y2} by ENUMSET1:1; dom f = {x1} & dom g = {x2} by FUNCOP_1:13; then dom f \/ dom g = {x1,x2} by ENUMSET1:1; hence dom h = {x1,x2} by Def1; rng h c= rng f \/ rng g by Th17; hence thesis by A1,XBOOLE_1:1; end; theorem Th63: (x1 <> x2 implies ((x1,x2) --> (y1,y2)).x1 = y1) & ((x1,x2) --> (y1,y2)).x2 = y2 proof set f = {x1} --> y1, g = {x2} -->y2, h = (x1,x2) --> (y1,y2); A1: x2 in {x2} by TARSKI:def 1; A2: x1 in {x1} by TARSKI:def 1; hereby assume x1 <> x2; then not x1 in dom g by TARSKI:def 1; then h.x1 = f.x1 by Th11; hence h.x1 = y1 by A2,FUNCOP_1:7; end; {x2} = dom g by FUNCOP_1:13; then h.x2 = g.x2 by A1,Th13; hence thesis by A1,FUNCOP_1:7; end; theorem x1 <> x2 implies rng((x1,x2) --> (y1,y2)) = {y1,y2} proof set h = (x1,x2) --> (y1,y2); assume A1: x1 <> x2; thus rng h c= {y1,y2} by Th62; let y; assume y in {y1,y2}; then y = y1 or y = y2 by TARSKI:def 2; then A2: h.x1 = y or h.x2 = y by A1,Th63; dom h = {x1,x2} by Th62; then x1 in dom h & x2 in dom h by TARSKI:def 2; hence thesis by A2,FUNCT_1:def 3; end; theorem (x1,x2) --> (y,y) = {x1,x2} --> y proof set F = (x1,x2)-->(y,y), f = {x1}-->y, g = {x2}-->y, F9 = {x1,x2}-->y; now thus A1: dom F = {x1,x2} & dom F9 = {x1,x2} by Th62,FUNCOP_1:13; let x such that A2: x in {x1,x2}; now per cases by A1,A2,Th12; suppose A3: x in dom f & not x in dom g; then F.x = f.x by Th11; hence F.x = y & F9.x = y by A2,A3,FUNCOP_1:7; end; suppose A4: x in dom g; then F.x = g.x by Th13; hence F.x = y & F9.x = y by A2,A4,FUNCOP_1:7; end; end; hence F.x = F9.x; end; hence thesis by FUNCT_1:2; end; definition let A,x1,x2; let y1,y2 be Element of A; redefine func (x1,x2) --> (y1,y2) -> Function of {x1,x2},A; coherence proof set f = {x1} --> y1, g = {x2} -->y2, h = (x1,x2) --> (y1,y2); rng h c= rng f \/ rng g by Th17; then A1: rng h c= A by XBOOLE_1:1; dom h = {x1,x2} by Th62; hence thesis by A1,FUNCT_2:def 1,RELSET_1:4; end; end; theorem for a,b,c,d being set, g being Function st dom g = {a,b} & g.a = c & g .b = d holds g = (a,b) --> (c,d) proof let a,b,c,d be set; let h be Function such that A1: dom h = {a,b} and A2: h.a = c and A3: h.b = d; set f = {a} --> c, g = {b} -->d; A4: b in {b} by TARSKI:def 1; A5: a in {a} by TARSKI:def 1; A6: now let x such that A7: x in dom f \/ dom g; thus x in dom g implies h.x = g.x proof assume x in dom g; then x = b by TARSKI:def 1; hence thesis by A3,A4,FUNCOP_1:7; end; assume not x in dom g; then x in dom f by A7,XBOOLE_0:def 3; then x = a by TARSKI:def 1; hence h.x = f.x by A2,A5,FUNCOP_1:7; end; dom f = {a} & dom g = {b} by FUNCOP_1:13; then dom h = dom f \/ dom g by A1,ENUMSET1:1; hence thesis by A6,Def1; end; theorem Th67: for a,b,c,d being set st a <> c holds (a,c) --> (b,d) = { [a,b], [c,d] } proof let a,b,c,d be set such that A1: a <> c; set f = {a} --> b, g = {c} --> d; A2: dom f = {a} & dom g = {c} by FUNCOP_1:13; {a} --> b = {[a,b]} & {c} --> d = {[c,d]} by ZFMISC_1:29; hence (a,c) --> (b,d) = {[a,b]} \/ {[c,d]} by A1,A2,Th31,ZFMISC_1:11 .= { [a,b], [c,d] } by ENUMSET1:1; end; theorem for a,b,x,y,x9,y9 being set st a <> b & (a,b) --> (x,y) = (a,b) --> ( x9,y9) holds x = x9 & y = y9 proof let a,b,x,y,x9,y9 be set such that A1: a <> b and A2: (a,b) --> (x,y) = (a,b) --> (x9,y9); thus x = ((a,b) --> (x,y)).a by A1,Th63 .= x9 by A1,A2,Th63; thus y = ((a,b) --> (x,y)).b by Th63 .= y9 by A2,Th63; end; begin theorem for f1,f2, g1,g2 being Function st rng g1 c= dom f1 & rng g2 c= dom f2 & f1 tolerates f2 holds (f1+*f2)*(g1+*g2) = (f1*g1)+*(f2*g2) proof let f1,f2, g1,g2 be Function; assume that A1: rng g1 c= dom f1 & rng g2 c= dom f2 and A2: f1 tolerates f2; A3: rng (g1+*g2) c= (rng g1) \/ rng g2 & dom (f1+*f2) = (dom f1) \/ dom f2 by Def1,Th17; (rng g1) \/ rng g2 c= (dom f1) \/ dom f2 by A1,XBOOLE_1:13; then A4: dom ((f1+*f2)*(g1+*g2)) = dom (g1+*g2) by A3,RELAT_1:27,XBOOLE_1:1 .= (dom g1) \/ dom g2 by Def1; A5: dom (f1*g1) = dom g1 & dom (f2*g2) = dom g2 by A1,RELAT_1:27; A6: now let x be set; A7: not x in dom g2 or x in dom g2; assume A8: x in (dom g1) \/ dom g2; then A9: ((f1+*f2)*(g1+*g2)).x = (f1+*f2).((g1+*g2).x) by A4,FUNCT_1:12; x in dom g1 or x in dom g2 by A8,XBOOLE_0:def 3; then (g1+*g2).x = g1.x & ((f1*g1)+*(f2*g2)).x = (f1*g1).x & (f1*g1).x = f1 .(g1.x) & g1.x in rng g1 & (g1.x in rng g1 implies g1.x in dom f1) or (g1+*g2). x = g2.x & ((f1*g1)+*(f2*g2)).x = (f2*g2).x & (f2*g2).x = f2.(g2.x) & g2.x in rng g2 & (g2.x in rng g2 implies g2.x in dom f2) by A1,A5,A8,A7,Def1, FUNCT_1:12,def 3; hence ((f1+*f2)*(g1+*g2)).x = ((f1*g1)+*(f2*g2)).x by A2,A9,Th13,Th15; end; dom ((f1*g1)+*(f2*g2)) = (dom g1) \/ dom g2 by A5,Def1; hence thesis by A4,A6,FUNCT_1:2; end; reserve A,B for set; theorem Th70: dom f c= A \/ B implies f|A +* f|B = f proof A1: dom(f|A) = dom f /\ A & dom(f|B) = dom f /\ B by RELAT_1:61; A2: x in dom(f|A) \/ dom(f|B) implies (x in dom(f|B) implies f.x = f|B.x) & (not x in dom(f|B) implies f.x = f|A.x) proof assume A3: x in dom(f|A) \/ dom(f|B); thus x in dom(f|B) implies f.x = f|B.x by FUNCT_1:47; assume not x in dom(f|B); then x in dom(f|A) by A3,XBOOLE_0:def 3; hence thesis by FUNCT_1:47; end; assume dom f c= A \/ B; then dom f = dom f /\ (A \/ B) by XBOOLE_1:28 .= dom(f|A) \/ dom(f|B) by A1,XBOOLE_1:23; hence thesis by A2,Def1; end; theorem Th71: for p,q being Function , A being set holds (p +* q)|A = p|A +* q|A proof let p,q be Function , A be set; A1: dom ((p +* q)|A) = dom (p +* q) /\ A by RELAT_1:61 .= (dom p \/ dom q) /\ A by Def1 .= (dom p /\ A) \/ (dom q /\ A) by XBOOLE_1:23 .= dom (p|A) \/ (dom q /\ A) by RELAT_1:61 .= dom (p|A) \/ dom (q|A) by RELAT_1:61; for x being set st x in dom (p|A) \/ dom (q|A) holds (x in dom (q|A) implies ((p +* q)|A).x = (q|A).x) & (not x in dom (q|A) implies ((p +* q)|A).x = (p|A).x) proof let x be set; assume A2: x in dom (p|A) \/ dom (q|A); then x in dom (p|A) or x in dom (q|A) by XBOOLE_0:def 3; then x in (dom p /\ A) or x in dom q /\ A by RELAT_1:61; then A3: x in A by XBOOLE_0:def 4; hereby assume A4: x in dom (q|A); then x in (dom q /\ A) by RELAT_1:61; then A5: x in dom q by XBOOLE_0:def 4; thus ((p +* q)|A).x = (p +* q).x by A1,A2,FUNCT_1:47 .= q.x by A5,Th13 .= (q|A).x by A4,FUNCT_1:47; end; assume A6: not x in dom (q|A); then not x in (dom q /\ A) by RELAT_1:61; then A7: not x in dom q by A3,XBOOLE_0:def 4; A8: x in dom (p|A) by A2,A6,XBOOLE_0:def 3; then x in dom p /\ A by RELAT_1:61; then x in dom p by XBOOLE_0:def 4; then x in dom (p +* q) by Th12; then x in dom (p +* q) /\ A by A3,XBOOLE_0:def 4; then x in dom ((p +* q)|A) by RELAT_1:61; hence ((p +* q)|A).x = (p +* q).x by FUNCT_1:47 .= p.x by A7,Th11 .= (p|A).x by A8,FUNCT_1:47; end; hence thesis by A1,Def1; end; theorem Th72: for f,g being Function, A being set st A misses dom g holds (f +* g)|A = f|A proof let f,g be Function, A be set; assume A misses dom g; then dom g /\ A = {} by XBOOLE_0:def 7; then dom (g|A) = {} by RELAT_1:61; then g|A = {}; hence (f +* g)|A = f|A +* {} by Th71 .= f|A; end; theorem for f,g being Function , A being set holds dom f misses A implies (f +* g)|A = g|A proof let f,g be Function , A be set; assume dom f misses A; then dom f /\ A = {} by XBOOLE_0:def 7; then dom (f|A) = {} by RELAT_1:61; then f|A = {}; hence (f +* g)|A = {} +* g|A by Th71 .= g|A; end; theorem for f,g,h being Function st dom g = dom h holds f +* g +* h = f +* h proof let f,g,h be Function; assume A1: dom g = dom h; thus f +* g +* h = f +* (g +* h) by Th14 .= f +* h by A1,Th19; end; Lm2: for f,g being Function holds f c= g implies g +* f = g proof let f,g be Function; assume A1: f c= g; then f tolerates g by PARTFUN1:54; hence g+*f = f\/ g by Th30 .= g by A1,XBOOLE_1:12; end; theorem for f being Function, A being set holds f +* f|A = f by Lm2,RELAT_1:59; theorem for f,g being Function, B,C being set st dom f c= B & dom g c= C & B misses C holds (f +* g)|B = f & (f +* g)|C = g proof let f,g be Function, B,C be set; assume that A1: dom f c= B and A2: dom g c= C and A3: B misses C; dom f misses C by A1,A3,XBOOLE_1:63; then dom f /\ C = {} by XBOOLE_0:def 7; then dom (f|C) = {} by RELAT_1:61; then A4: f|C = {}; dom g misses B by A2,A3,XBOOLE_1:63; then dom g /\ B = {} by XBOOLE_0:def 7; then dom (g|B) = {} by RELAT_1:61; then A5: g|B = {}; thus (f +* g)|B = f|B +* g|B by Th71 .= f|B by A5,Th21 .= f by A1,RELAT_1:68; thus (f +* g)|C = f|C +* g|C by Th71 .= g|C by A4,Th20 .= g by A2,RELAT_1:68; end; theorem for p,q being Function, A being set holds dom p c= A & dom q misses A implies (p +* q)|A = p proof let p,q be Function, A be set; assume that A1: dom p c= A and A2: dom q misses A; thus (p +* q )|A = p|A by A2,Th72 .= p by A1,RELAT_1:68; end; theorem for f being Function, A,B being set holds f|(A \/ B) = f|A +* f|B proof let f be Function, A,B be set; A1: f|(A \/ B)|B = f|((A \/ B) /\ B) by RELAT_1:71 .= f|B by XBOOLE_1:21; A2: dom (f|(A \/ B)) c= A \/ B by RELAT_1:58; f|(A \/ B)|A = f|((A \/ B) /\ A) by RELAT_1:71 .= f|A by XBOOLE_1:21; hence thesis by A1,A2,Th70; end; reserve x,y,i,j,k for set; theorem (i,j):->k = [i,j].-->k; theorem ((i,j):->k).(i,j) = k by FUNCOP_1:71; theorem for a,b,c being set holds (a,a) --> (b,c) = a .--> c proof let a,b,c be set; dom(a .-->c) = {a} by FUNCOP_1:13 .= dom({a} -->b) by FUNCOP_1:13; hence thesis by Th19; end; theorem for x,y holds x .--> y = {[x,y]} by ZFMISC_1:29; theorem for f being Function, a,b,c being set st a <> c holds (f +* (a .-->b)) .c = f.c proof let f be Function, a,b,c be set such that A1: a <> c; set g = a .-->b; not c in dom g by A1,TARSKI:def 1; hence thesis by Th11; end; theorem for f being Function, a,b,c,d being set st a <> b holds (f +* ((a,b)-->(c,d))) .a = c & (f +* ((a,b)-->(c,d))) .b = d proof let f be Function, a,b,c,d be set such that A1: a <> b; set g = (a,b)-->(c,d); A2: dom g = {a,b} by Th62; then a in dom g by TARSKI:def 2; hence (f +* g).a = g.a by Th13 .= c by A1,Th63; b in dom g by A2,TARSKI:def 2; hence (f +* g).b = g.b by Th13 .= d by Th63; end; theorem Th85: for a,b being set, f being Function st a in dom f & f.a = b holds a .--> b c= f proof let a,b be set, f be Function; assume a in dom f & f.a = b; then [a,b] in f by FUNCT_1:1; then {[a,b]} c= f by ZFMISC_1:31; hence thesis by ZFMISC_1:29; end; theorem for a,b,c,d being set, f being Function st a in dom f & c in dom f & f.a = b & f.c = d holds (a,c) --> (b,d) c= f proof let a,b,c,d be set, f be Function; assume that A1: a in dom f and A2: c in dom f and A3: f.a = b & f.c = d; per cases; suppose A4: a <> c; [a,b] in f & [c,d] in f by A1,A2,A3,FUNCT_1:1; then { [a,b], [c,d]} c= f by ZFMISC_1:32; hence thesis by A4,Th67; end; suppose a = c; hence thesis by A1,A3,Th85; end; end; theorem Th87: for f,g,h being Function st f c= h & g c= h holds f +* g c= h proof let f,g,h be Function; assume f c= h & g c= h; then A1: f \/ g c= h by XBOOLE_1:8; f +* g c= f \/ g by Th29; hence thesis by A1,XBOOLE_1:1; end; theorem for f, g being Function, A being set st A /\ dom f c= A /\ dom g holds (f+*g|A)|A = g|A proof let f, g be Function, A be set; assume A1: A /\ dom f c= A /\ dom g; A2: dom (f|A) = A /\ dom f & dom (g|A) = A /\ dom g by RELAT_1:61; thus (f+*g|A)|A = (f|A)+*(g|A)|A by Th71 .= (f|A)+*g|A .= g|A by A1,A2,Th19; end; theorem for f be Function, a,b,n,m be set holds (f +* (a .--> b) +* (m .--> n)).m = n proof let f be Function, a,b,n,m be set; set mn=m .--> n; dom mn ={ m } by FUNCOP_1:13; then m in dom mn by TARSKI:def 1; hence (f +* (a .--> b) +* mn).m=mn.m by Th13 .=n by FUNCOP_1:72; end; theorem for f be Function, n,m be set holds (f +* (n .--> m) +* (m .--> n)).n= m proof let f be Function,n,m be set; set mn=m .--> n, nm=n .--> m; dom mn ={ m } by FUNCOP_1:13; then A1: m in dom mn by TARSKI:def 1; per cases; suppose A2: n=m; hence (f +* nm +* mn).n=mn.m by A1,Th13 .=m by A2,FUNCOP_1:72; end; suppose A3: n<>m; dom nm ={ n } by FUNCOP_1:13; then A4: n in dom nm by TARSKI:def 1; not n in dom mn by A3,TARSKI:def 1; hence (f +* nm +* mn).n=(f +* nm).n by Th11 .=nm.n by A4,Th13 .=m by FUNCOP_1:72; end; end; theorem for f be Function, a,b,n,m,x be set st x <> m & x <> a holds (f +* (a .--> b) +* (m .--> n)).x=f.x proof let f be Function, a,b,n,m,x be set; assume that A1: x<>m and A2: x<>a; set mn=m .--> n, nm=a .--> b; A3: not x in dom nm by A2,TARSKI:def 1; not x in dom mn by A1,TARSKI:def 1; hence (f +* nm +* mn).x=(f +* nm).x by Th11 .=f.x by A3,Th11; end; theorem f is one-to-one & g is one-to-one & rng f misses rng g implies f+*g is one-to-one proof assume that A1: f is one-to-one and A2: g is one-to-one and A3: rng f misses rng g; let x1,x2 be set; set fg = f+*g; assume that A4: x1 in dom fg and A5: x2 in dom fg and A6: fg.x1 = fg.x2; A7: x1 in dom f or x1 in dom g by A4,Th12; A8: x2 in dom f or x2 in dom g by A5,Th12; per cases; suppose A9: x1 in dom g & x2 in dom g; then fg.x1 = g.x1 & fg.x2 = g.x2 by Th13; hence thesis by A2,A6,A9,FUNCT_1:def 4; end; suppose A10: x1 in dom g & not x2 in dom g; then x2 in dom f by A5,Th12; then A11: f.x2 in rng f by FUNCT_1:def 3; A12: g.x1 in rng g by A10,FUNCT_1:def 3; fg.x1 = g.x1 & fg.x2 = f.x2 by A10,Th11,Th13; hence thesis by A3,A6,A12,A11,XBOOLE_0:3; end; suppose A13: not x1 in dom g & x2 in dom g; then x1 in dom f by A4,Th12; then A14: f.x1 in rng f by FUNCT_1:def 3; A15: g.x2 in rng g by A13,FUNCT_1:def 3; fg.x1 = f.x1 & fg.x2 = g.x2 by A13,Th11,Th13; hence thesis by A3,A6,A15,A14,XBOOLE_0:3; end; suppose A16: not x1 in dom g & not x2 in dom g; then fg.x1 = f.x1 & fg.x2 = f.x2 by Th11; hence thesis by A1,A6,A7,A8,A16,FUNCT_1:def 4; end; end; registration let f,g be Function; reduce f +* g +* g to f +* g; reducibility proof thus f +* g +* g = f +*( g +* g ) by Th14 .= f +* g; end; end; theorem for f,g being Function holds f +* g +* g = f +* g; theorem for f,g,h being Function, D being set holds (f +* g)|D =h | D implies (h +* g) | D = (f +* g) | D proof let f,g,h be Function, D be set; assume A1: (f +* g)|D =h | D; A2: dom ((f +* g) | D) = dom (f +* g) /\ D by RELAT_1:61 .= (dom f \/ dom g) /\ D by Def1; A3: dom ((h +* g) | D) = dom (h +* g) /\ D by RELAT_1:61 .= (dom h \/ dom g) /\ D by Def1; then A4: dom ((h +* g) | D) = (dom h /\ D) \/ (dom g /\ D) by XBOOLE_1:23 .= ((dom f \/ dom g) /\ D) \/ (dom g /\ D) by A1,A2,RELAT_1:61 .= ((dom f \/ dom g) \/ dom g) /\ D by XBOOLE_1:23 .= (dom f \/ (dom g \/ dom g)) /\ D by XBOOLE_1:4 .= (dom f \/ dom g ) /\ D; now let x be set; assume A5: x in dom ((f +* g) | D); then A6: x in dom f \/ dom g by A2,XBOOLE_0:def 4; A7: x in D by A2,A5,XBOOLE_0:def 4; A8: x in dom h \/ dom g & ((h +* g) | D).x = (h +* g).x by A2,A3,A4,A5, FUNCT_1:47,XBOOLE_0:def 4; per cases; suppose A9: x in dom g; ((f +* g) | D).x = (f +* g).x by A5,FUNCT_1:47 .=g.x by A6,A9,Def1; hence ((h +* g) | D).x =((f +* g) | D).x by A8,A9,Def1; end; suppose not x in dom g; hence ((h +* g) | D).x = h.x by A8,Def1 .=((f +* g) | D).x by A1,A7,FUNCT_1:49; end; end; hence thesis by A2,A4,FUNCT_1:2; end; theorem for f,g,h being Function, D being set holds f | D =h | D implies (h +* g) | D = (f +* g) | D proof let f,g,h be Function, D be set; assume A1: f |D = h | D; A2: dom ((f +* g) | D) = dom (f +* g) /\ D by RELAT_1:61 .= (dom f \/ dom g) /\ D by Def1; A3: dom ((h +* g) | D) = dom (h +* g) /\ D by RELAT_1:61 .= (dom h \/ dom g) /\ D by Def1; then A4: dom ((h +* g) | D) = (dom h /\ D) \/ (dom g /\ D) by XBOOLE_1:23 .= dom (f| D) \/ (dom g /\ D) by A1,RELAT_1:61 .= (dom f /\ D) \/ (dom g /\ D) by RELAT_1:61 .= (dom f \/ dom g ) /\ D by XBOOLE_1:23; now let x be set; assume A5: x in dom ((f +* g) | D); then A6: x in dom f \/ dom g by A2,XBOOLE_0:def 4; A7: x in D by A2,A5,XBOOLE_0:def 4; A8: x in dom h \/ dom g & ((h +* g) | D).x = (h +* g).x by A2,A3,A4,A5, FUNCT_1:47,XBOOLE_0:def 4; per cases; suppose A9: x in dom g; ((f +* g) | D).x = (f +* g).x by A5,FUNCT_1:47 .=g.x by A6,A9,Def1; hence ((h +* g) | D).x =((f +* g) | D).x by A8,A9,Def1; end; suppose A10: not x in dom g; then A11: ((h +* g) | D).x = h.x by A8,Def1 .=(h | D ).x by A7,FUNCT_1:49; thus ((f +* g) | D).x = (f +* g).x by A5,FUNCT_1:47 .=f.x by A6,A10,Def1 .=((h +* g) | D).x by A1,A7,A11,FUNCT_1:49; end; end; hence thesis by A2,A4,FUNCT_1:2; end; theorem Th96: x .--> x = id{x} proof for y,z holds [y,z] in x .--> x iff y in {x} & y = z proof let y,z; A1: x .--> x = {[x,x]} by ZFMISC_1:29; thus [y,z] in x .--> x implies y in {x} & y = z proof assume [y,z] in x .--> x; then A2: [y,z] = [x,x] by A1,TARSKI:def 1; then y = x by XTUPLE_0:1; hence thesis by A2,TARSKI:def 1,XTUPLE_0:1; end; assume y in {x}; then y = x by TARSKI:def 1; hence thesis by A1,TARSKI:def 1; end; hence thesis by RELAT_1:def 10; end; theorem Th97: f c= g implies f+*g = g proof assume A1: f c= g; then f tolerates g by PARTFUN1:54; hence f+*g = f\/ g by Th30 .= g by A1,XBOOLE_1:12; end; theorem Th98: f c= g implies g+*f = g proof assume A1: f c= g; then f tolerates g by PARTFUN1:54; hence g+*f = f\/ g by Th30 .= g by A1,XBOOLE_1:12; end; begin definition let f,x,y; func f+~(x,y) equals f+*((x .--> y)*f); coherence; end; registration let f,x,y; cluster f+~(x,y) -> Relation-like Function-like; coherence; end; theorem Th99: dom(f+~(x,y)) = dom f proof thus dom(f+~(x,y)) = dom f \/ dom((x .--> y)*f) by Def1 .= dom f by RELAT_1:25,XBOOLE_1:12; end; theorem Th100: x <> y implies not x in rng(f+~(x,y)) proof assume A1: x <> y; assume x in rng(f+~(x,y)); then consider z such that A2: z in dom(f+~(x,y)) and A3: (f+~(x,y)).z = x by FUNCT_1:def 3; A4: z in dom f by A2,Th99; A5: now assume A6: not z in dom((x .--> y)*f); then f.z = x by A3,Th11; then f.z in dom(x .--> y) by FUNCOP_1:74; hence contradiction by A4,A6,FUNCT_1:11; end; (x .--> y).(f.z) = ((x .--> y)*f).z by A4,FUNCT_1:13 .= x by A3,A5,Th13; then f.z <> x by A1,FUNCOP_1:72; then not f.z in dom(x .--> y) by FUNCOP_1:75; hence thesis by A5,FUNCT_1:11; end; theorem x in rng f implies y in rng(f+~(x,y)) proof assume x in rng f; then consider z such that A1: z in dom f and A2: f.z = x by FUNCT_1:def 3; A3: dom((x .--> y)*f) c= dom(f+~(x,y)) by Th10; x in dom(x.-->y) by FUNCOP_1:74; then A4: z in dom((x .--> y)*f) by A1,A2,FUNCT_1:11; then (f+~(x,y)).z = ((x .--> y)*f).z by Th13 .= (x .--> y).(f.z) by A1,FUNCT_1:13 .= y by A2,FUNCOP_1:72; hence thesis by A4,A3,FUNCT_1:3; end; theorem Th102: f+~(x,x) = f proof thus f+~(x,x) = f+*((id{x})*f) by Th96 .= f by Th98,RELAT_1:50; end; theorem Th103: not x in rng f implies f+~(x,y) = f proof A1: dom (x .--> y) = {x} by FUNCOP_1:13; assume not x in rng f; then dom (x .--> y) misses rng f by A1,ZFMISC_1:50; then (x .--> y)*f = {} by RELAT_1:44; hence thesis by Th21; end; theorem rng(f+~(x,y)) c= rng f \ {x} \/ {y} proof per cases; suppose A1: not x in rng f; then f+~(x,y) = f by Th103; then rng(f+~(x,y)) = rng f \ {x} by A1,ZFMISC_1:57; hence thesis by XBOOLE_1:7; end; suppose that A2: x in rng f and A3: x = y; f+~(x,y) = f by A3,Th102; hence thesis by A2,A3,ZFMISC_1:116; end; suppose that A4: x <> y; not x in rng(f+~(x,y)) by A4,Th100; then A5: rng(f+~(x,y)) \ {x} = rng(f+~(x,y)) by ZFMISC_1:57; rng(x .--> y) = {y} by FUNCOP_1:8; then A6: rng f \/ rng((x .--> y)*f) c= rng f \/ {y} by RELAT_1:26,XBOOLE_1:9; rng(f+~(x,y)) c= rng f \/ rng((x .--> y)*f) by Th17; then rng(f+~(x,y)) c= rng f \/ {y} by A6,XBOOLE_1:1; then rng(f+~(x,y)) c= rng f \/ {y} \ {x} by A5,XBOOLE_1:33; hence thesis by A4,ZFMISC_1:123; end; end; theorem f.z <> x implies (f+~(x,y)).z = f.z proof assume f.z <> x; then not f.z in dom(x.-->y) by FUNCOP_1:75; then not z in dom((x.-->y)*f) by FUNCT_1:11; hence thesis by Th11; end; theorem z in dom f & f.z = x implies (f+~(x,y)).z = y proof assume that A1: z in dom f and A2: f.z = x; f.z in dom(x.-->y) by A2,FUNCOP_1:74; then A3: z in dom((x.-->y)*f) by A1,FUNCT_1:11; hence (f+~(x,y)).z = ((x.-->y)*f).z by Th13 .= (x.-->y).x by A2,A3,FUNCT_1:12 .= y by FUNCOP_1:72; end; theorem not x in dom f implies f c= f +*(x .--> y) proof assume not x in dom f; then dom f misses {x} by ZFMISC_1:50; then dom f misses dom(x .--> y) by FUNCOP_1:13; hence thesis by Th32; end; theorem for f being PartFunc of X,Y, x,y st x in X & y in Y holds f+*(x .--> y ) is PartFunc of X,Y proof let f be PartFunc of X,Y, x,y; assume that A1: x in X and A2: y in Y; A3: {x} c= X by A1,ZFMISC_1:31; {y} c= Y by A2,ZFMISC_1:31; then rng(x .--> y) c= Y by FUNCOP_1:8; then A4: rng f \/ rng(x .--> y) c= Y by XBOOLE_1:8; rng(f+*(x .--> y)) c= rng f \/ rng(x .--> y) by Th17; then A5: rng(f+*(x .--> y)) c= Y by A4,XBOOLE_1:1; dom(f+*(x .--> y)) = dom f \/ dom(x .--> y) by Def1 .= dom f \/ {x} by FUNCOP_1:13; hence thesis by A3,A5,RELSET_1:4,XBOOLE_1:8; end; registration let f be Function, g be non empty Function; cluster f +* g -> non empty; coherence proof dom (f+*g) = dom f \/ dom g by Def1; hence thesis; end; cluster g +* f -> non empty; coherence proof dom (g+*f) = dom g \/ dom f by Def1; hence thesis; end; end; registration let f,g be non-empty Function; cluster f+*g -> non-empty; coherence proof set h = f+*g; A1: dom (f+*g) = dom f \/ dom g by Def1; not {} in rng h proof assume {} in rng h; then consider x being set such that A2: x in dom (f+*g) & {} = h.x by FUNCT_1:def 3; not x in dom g or x in dom g; then {} = f.x & x in dom f or {} = g.x & x in dom g by A1,A2,Def1, XBOOLE_0:def 3; then {} in rng f or {} in rng g by FUNCT_1:def 3; hence thesis by RELAT_1:def 9; end; hence thesis by RELAT_1:def 9; end; end; definition let X,Y be set; let f,g be PartFunc of X,Y; redefine func f+* g -> PartFunc of X,Y; coherence proof A1: dom(f+* g) c= dom f \/ dom g by Def1; A2: dom(f+* g) c= X by A1,XBOOLE_1:1; A3: rng(f+* g) c= rng f \/ rng g by Th17; rng(f+* g) c= Y by A3,XBOOLE_1:1; then f+* g is Relation of X,Y by A2,RELSET_1:4; hence thesis; end; end; theorem dom ((x --> y)+*(x .-->z)) = succ x proof thus dom ((x --> y)+*(x .-->z)) = dom (x --> y) \/ dom (x .-->z) by Def1 .= x \/ dom (x .-->z) by FUNCOP_1:13 .= x \/ {x} by FUNCOP_1:13 .= succ x by ORDINAL1:def 1; end; theorem dom ((x --> y)+*(x .-->z)+*(succ x .-->z)) = succ succ x proof thus dom ((x --> y)+*(x .-->z)+*(succ x .-->z)) = dom ((x --> y)+*(x .-->z)) \/ dom(succ x .-->z) by Def1 .= dom (x --> y) \/ dom (x .-->z) \/ dom(succ x .-->z) by Def1 .= x \/ dom (x .-->z) \/ dom(succ x .-->z) by FUNCOP_1:13 .= x \/ {x} \/ dom(succ x .-->z) by FUNCOP_1:13 .= x \/ {x} \/ {succ x} by FUNCOP_1:13 .= succ x \/ {succ x} by ORDINAL1:def 1 .= succ succ x by ORDINAL1:def 1; end; registration let f,g be Function-yielding Function; cluster f+*g -> Function-yielding; coherence proof let x be set; assume x in dom(f+*g); then A1: x in dom f \/ dom g by Def1; per cases by A1,XBOOLE_0:def 3; suppose x in dom g; then (f+*g).x = g.x by Th13; hence (f+*g).x is Function; end; suppose x in dom f & not x in dom g; then (f+*g).x = f.x by Th11; hence (f+*g).x is Function; end; end; end; registration let I be set; let f,g be I-defined Function; cluster f+*g -> I-defined; coherence proof dom (f+*g) = dom f \/ dom g by Def1; then dom (f+*g) c= I; hence thesis by RELAT_1:def 18; end; end; registration let I be set; let f be total I-defined Function; let g be I-defined Function; cluster f+*g -> total for I-defined Function; coherence proof dom f = I by PARTFUN1:def 2; then dom (f+*g) = I \/ dom g by Def1 .= I by XBOOLE_1:12; hence thesis by PARTFUN1:def 2; end; cluster g+*f -> total for I-defined Function; coherence proof dom f = I by PARTFUN1:def 2; then dom (g+*f) = I \/ dom g by Def1 .= I by XBOOLE_1:12; hence thesis by PARTFUN1:def 2; end; end; registration let I be set; let g,h be I-valued Function; cluster g+*h -> I-valued; coherence proof A1: rng(g+*h) c= rng g \/ rng h by Th17; rng(g+*h) c= I by A1,XBOOLE_1:1; hence thesis by RELAT_1:def 19; end; end; registration let f be Function; let g,h be f-compatible Function; cluster g+*h -> f-compatible; coherence proof let x; assume A1: x in dom(g+*h); A2: dom(g+*h) = dom g \/ dom h by Def1; per cases by A1,A2,XBOOLE_0:def 3; suppose A3: x in dom g & not x in dom h; then g.x in f.x by FUNCT_1:def 14; hence (g+*h).x in f.x by A3,Th11; end; suppose A4: x in dom h; then h.x in f.x by FUNCT_1:def 14; hence (g+*h).x in f.x by A4,Th13; end; end; end; theorem f|A +* f = f by Th97,RELAT_1:59; theorem for R being Relation st dom R = {x} & rng R = {y} holds R = x .--> y proof let R be Relation; assume that A1: dom R = {x} and A2: rng R = {y}; set g = x .--> y; A3: g = {[x,y]} by ZFMISC_1:29; for a, b being set holds [a,b] in R iff [a,b] in g proof let a, b be set; hereby assume A4: [a,b] in R; then b in rng R by XTUPLE_0:def 13; then A5: b = y by A2,TARSKI:def 1; a in dom R by A4,XTUPLE_0:def 12; then a = x by A1,TARSKI:def 1; hence [a,b] in g by A3,A5,TARSKI:def 1; end; assume [a,b] in g; then A6: [a,b] = [x,y] by A3,TARSKI:def 1; then A7: b = y by XTUPLE_0:1; a = x by A6,XTUPLE_0:1; then a in dom R by A1,TARSKI:def 1; then consider z being set such that A8: [a,z] in R by XTUPLE_0:def 12; z in rng R by A8,XTUPLE_0:def 13; hence thesis by A2,A7,A8,TARSKI:def 1; end; hence thesis by RELAT_1:def 2; end; theorem (f +* (x .-->y)).x = y proof A1: x in {x} by TARSKI:def 1; then dom(x .--> y) = {x} & x in dom f \/ {x} by FUNCOP_1:13,XBOOLE_0:def 3; hence (f +* (x .-->y) ).x = (x .-->y).x by A1,Def1 .= y by FUNCOP_1:72; end; theorem f +* (x .--> z1) +* (x .--> z2) = f +* (x .--> z2) proof A1: dom (x .--> z1) = {x} by FUNCOP_1:13 .= dom (x .--> z2) by FUNCOP_1:13; thus f +* (x .--> z1) +* (x .--> z2) = f +* ((x .--> z1) +* (x .--> z2)) by Th14 .= f +* (x .--> z2) by A1,Th19; end; registration let A be non empty set, a,b be Element of A, x,y be set; cluster (a,b) --> (x,y) -> A-defined; coherence; end; theorem dom g misses dom h implies f +* g +* h +* g = f +* g +* h proof assume A1: dom g misses dom h; thus f +* g +* h +* g = f +* (g +* h) +* g by Th14 .= f +* (g +* h +* g) by Th14 .= f +* (h +* g +* g) by A1,Th35 .= f +* (h +* g) .= f +* (g +* h) by A1,Th35 .= f +* g +* h by Th14; end; theorem dom f misses dom h & f c= g +* h implies f c= g proof assume that A1: dom f misses dom h and A2: f c= g +* h; A3: (g +* h)|dom f = g|dom f +* h|dom f by Th71 .= g|dom f +* {} by A1,RELAT_1:66 .= g|dom f; f|dom f = f; then f c= g|dom f by A2,A3,RELAT_1:76; hence f c= g by RELAT_1:184; end; theorem Th117: dom f misses dom h & f c= g implies f c= g +* h proof assume that A1: dom f misses dom h and A2: f c= g; A3: (g +* h)|dom f = g|dom f +* h|dom f by Th71 .= g|dom f +* {} by A1,RELAT_1:66 .= g|dom f; f|dom f = f; then f c= (g +* h)|dom f by A2,A3,RELAT_1:76; hence f c= g +* h by RELAT_1:184; end; theorem dom g misses dom h implies f +* g +* h = f +* h +* g proof assume A1: dom g misses dom h; thus f +* g +* h = f +* (g +* h) by Th14 .= f +* (h +* g) by A1,Th35 .= f +* h +* g by Th14; end; theorem dom f misses dom g implies (f +* g) \ g = f proof assume A1: dom f misses dom g; then A2: f misses g by RELAT_1:179; thus (f +* g) \ g = (f \/ g) \ g by A1,Th31 .= f by A2,XBOOLE_1:88; end; theorem dom f misses dom g implies f \ g = f proof assume dom f misses dom g; then f misses g by RELAT_1:179; hence thesis by XBOOLE_1:83; end; theorem dom g misses dom h implies (f \ g) +* h = (f +* h) \ g proof assume A1: dom g misses dom h; A2: dom(f+*h) = dom f \/ dom h by Def1; A3: dom((f\g)+*h) = dom(f\g) \/ dom h by Def1; A4: dom((f\g)+*h) = dom((f+*h)\g) proof thus dom((f\g)+*h) c= dom((f+*h)\g) proof let x be set; assume A5: x in dom((f\g)+*h); per cases by A3,A5,XBOOLE_0:def 3; suppose that A6: x in dom(f\g) and A7: not x in dom h; consider y being set such that A8: [x,y] in f\g by A6,XTUPLE_0:def 12; A9: x in dom f by A8,XTUPLE_0:def 12; then A10: x in dom(f+*h) by A2,XBOOLE_0:def 3; A11: not [x,y] in g by A8,XBOOLE_0:def 5; A12: (f+*h).x = f.x by A7,Th11; f.x = y by A8,A9,FUNCT_1:def 2; then [x,y] in f+*h by A12,A10,FUNCT_1:def 2; then [x,y] in (f+*h)\g by A11,XBOOLE_0:def 5; hence thesis by XTUPLE_0:def 12; end; suppose A13: x in dom h; then A14: not x in dom g by A1,XBOOLE_0:3; x in dom(f+*h) by A2,A13,XBOOLE_0:def 3; then A15: x in dom(f+*h) \ dom g by A14,XBOOLE_0:def 5; dom(f+*h) \ dom g c= dom((f+*h)\g) by RELAT_1:3; hence thesis by A15; end; end; let x be set; assume x in dom((f+*h)\g); then consider y being set such that A16: [x,y] in (f+*h)\g by XTUPLE_0:def 12; A17: x in dom(f+*h) by A16,XTUPLE_0:def 12; then A18: y = (f+*h).x by A16,FUNCT_1:def 2; per cases by A2,A17,XBOOLE_0:def 3; suppose that A19: x in dom f and A20: not x in dom h; A21: not [x,y] in g by A16,XBOOLE_0:def 5; (f+*h).x = f.x by A20,Th11; then [x,y] in f by A19,A18,FUNCT_1:def 2; then [x,y] in f\g by A21,XBOOLE_0:def 5; then x in dom(f\g) by XTUPLE_0:def 12; hence thesis by A3,XBOOLE_0:def 3; end; suppose x in dom h; hence thesis by A3,XBOOLE_0:def 3; end; end; now let x be set; assume A22: x in dom((f\g)+*h); per cases by A3,A22,XBOOLE_0:def 3; suppose that A23: x in dom(f\g) and A24: not x in dom h; thus ((f\g)+*h).x = (f\g).x by A24,Th11 .= f.x by A23,GRFUNC_1:2 .= (f+*h).x by A24,Th11 .= ((f+*h)\g).x by A4,A22,GRFUNC_1:2; end; suppose A25: x in dom h; then A26: not x in dom g by A1,XBOOLE_0:3; x in dom(f+*h) by A25,A2,XBOOLE_0:def 3; then x in dom(f+*h) \ dom g by A26,XBOOLE_0:def 5; hence ((f+*h)\g).x = (f+*h).x by GRFUNC_1:32 .= h.x by A25,Th13 .= ((f\g)+*h).x by A25,Th13; end; end; hence thesis by A4,FUNCT_1:2; end; theorem for f1,f2,g1,g2 being Function st f1 c= g1 & f2 c= g2 & dom f1 misses dom g2 holds f1 +* f2 c= g1 +* g2 proof let f1,f2,g1,g2 be Function such that A1: f1 c= g1 and A2: f2 c= g2 and A3: dom f1 misses dom g2; A4: f1 c= g1 +* g2 by A1,A3,Th117; g2 c= g1 +* g2 by Th25; then f2 c= g1 +* g2 by A2,XBOOLE_1:1; hence f1 +* f2 c= g1 +* g2 by A4,Th87; end; theorem Th123: for f, g, h being Function st f c= g holds f +* h c= g +* h proof let f, g, h be Function; assume A1: f c= g; now dom (f +* h) = dom f \/ dom h & dom (g +* h) = dom g \/ dom h by Def1; hence dom (f +* h) c= dom (g +* h) by A1,RELAT_1:11,XBOOLE_1:9; let x be set; assume x in dom (f +* h); then A2: x in dom f or x in dom h by Th12; per cases; suppose A3: x in dom h; hence (f +* h).x = h.x by Th13 .= (g +* h).x by A3,Th13; end; suppose A4: not x in dom h; then (f +* h).x = f.x & (g +* h).x = g.x by Th11; hence (f +* h).x = (g +* h).x by A1,A2,A4,GRFUNC_1:2; end; end; hence thesis by GRFUNC_1:2; end; theorem for f, g, h being Function st f c= g & dom f misses dom h holds f c= g +* h proof let f, g, h be Function; assume f c= g; then A1: f +* h c= g +* h by Th123; assume dom f misses dom h; then f c= f +* h by Th32; hence thesis by A1,XBOOLE_1:1; end; registration let x, y be set; cluster x .--> y -> trivial; coherence proof x .--> y = {[x,y]} by ZFMISC_1:29; hence thesis; end; end; theorem for f,g,h being Function st f tolerates g & g tolerates h & h tolerates f holds f+*g tolerates h proof let f,g,h be Function such that A1: f tolerates g and A2: g tolerates h and A3: h tolerates f; let x be set; assume A4: x in (dom (f+*g)) /\ dom h; then x in dom (f+*g) by XBOOLE_0:def 4; then A5: x in dom f or x in dom g by Th12; x in dom h by A4,XBOOLE_0:def 4; then x in (dom h) /\ dom f & (f+*g).x = f.x or x in (dom g) /\ dom h & (f+*g) .x = g.x by A1,A5,Th13,Th15,XBOOLE_0:def 4; hence thesis by A2,A3,PARTFUN1:def 4; end; begin theorem {} is Element of omega proof {} in omega by ORDINAL1:def 11; hence thesis by SUBSET_1:def 1; end; begin reserve A,A1,A2,B,C,D for Ordinal, X,Y for set, x,y,a,b,c for set, L,L1,L2,L3 for T-Sequence, f for Function; scheme OrdinalInd { P[Ordinal] } : for A holds P[A] provided A1: P[{}] and A2: for A st P[A] holds P[succ A] and A3: for A st A <> {} & A is limit_ordinal & for B st B in A holds P[B] holds P[A] proof A4: for A st for B st B in A holds P[B] holds P[A] proof let A such that A5: for B st B in A holds P[B]; A6: now assume that A7: A <> {} and A8: for B holds A <> succ B; A is limit_ordinal by A8,ORDINAL1:29; hence thesis by A3,A5,A7; end; now given B such that A9: A = succ B; B in A by A9,ORDINAL1:6; hence thesis by A2,A5,A9; end; hence thesis by A1,A6; end; thus for A holds P[A] from ORDINAL1:sch 2(A4); end; theorem Th1: A c= B iff succ A c= succ B proof A c= B iff A in succ B by ORDINAL1:22; hence thesis by ORDINAL1:21; end; theorem Th2: union succ A = A proof thus union succ A c= A proof let x; assume x in union succ A; then consider X such that A1: x in X and A2: X in succ A by TARSKI:def 4; reconsider X as Ordinal by A2; X c= A by A2,ORDINAL1:22; hence thesis by A1; end; thus thesis by ORDINAL1:6,ZFMISC_1:74; end; theorem succ A c= bool A proof let x; assume A1: x in succ A; then reconsider B = x as Ordinal; x in A or x = A by A1,ORDINAL1:8; then B c= A by ORDINAL1:def 2; hence thesis; end; theorem {} is limit_ordinal proof thus {} = union {} by ZFMISC_1:2; end; theorem Th5: union A c= A proof let x; assume x in union A; then consider Y such that A1: x in Y and A2: Y in A by TARSKI:def 4; Y c= A by A2,ORDINAL1:def 2; hence thesis by A1; end; definition let L; func last L -> set equals L.(union dom L); coherence; end; theorem dom L = succ A implies last L = L.A by Th2; theorem On X c= X proof thus x in On X implies x in X by ORDINAL1:def 9; end; theorem Th8: On A = A proof x in A iff x in A & x is Ordinal; hence thesis by ORDINAL1:def 9; end; theorem Th9: X c= Y implies On X c= On Y proof assume A1: X c= Y; let x; assume x in On X; then x in X & x is Ordinal by ORDINAL1:def 9; hence thesis by A1,ORDINAL1:def 9; end; theorem Lim X c= X proof thus x in Lim X implies x in X by ORDINAL1:def 10; end; theorem X c= Y implies Lim X c= Lim Y proof assume A1: X c= Y; let x; assume x in Lim X; then x in X & ex A st x = A & A is limit_ordinal by ORDINAL1:def 10; hence thesis by A1,ORDINAL1:def 10; end; theorem Lim X c= On X proof let x; assume x in Lim X; then x in X & ex A st x = A & A is limit_ordinal by ORDINAL1:def 10; hence thesis by ORDINAL1:def 9; end; theorem Th13: (for x st x in X holds x is Ordinal) implies meet X is Ordinal proof assume A1: for x st x in X holds x is Ordinal; now defpred P[Ordinal] means $1 in X; set x = the Element of X; assume A2: X <> {}; then x is Ordinal by A1; then A3: ex A st P[A] by A2; consider A such that A4: P[A] & for B st P[B] holds A c= B from ORDINAL1:sch 1(A3); for x holds x in A iff for Y st Y in X holds x in Y proof let x; thus x in A implies for Y st Y in X holds x in Y proof assume A5: x in A; let Y; assume A6: Y in X; then reconsider B = Y as Ordinal by A1; A c= B by A4,A6; hence thesis by A5; end; assume for Y st Y in X holds x in Y; hence thesis by A4; end; hence thesis by A2,SETFAM_1:def 1; end; hence thesis by SETFAM_1:def 1; end; registration cluster limit_ordinal for Ordinal; existence proof take omega; thus thesis by ORDINAL1:def 11; end; end; definition let X; func inf X -> Ordinal equals meet On X; coherence proof x in On X implies x is Ordinal by ORDINAL1:def 9; hence thesis by Th13; end; func sup X -> Ordinal means :Def3: On X c= it & for A st On X c= A holds it c= A; existence proof defpred P[Ordinal] means On X c= $1; x in On X implies x is Ordinal by ORDINAL1:def 9; then reconsider A = union On X as Ordinal by ORDINAL1:23; On X c= succ A proof let x; assume A1: x in On X; then reconsider B = x as Ordinal by ORDINAL1:def 9; B c= A by A1,ZFMISC_1:74; hence thesis by ORDINAL1:22; end; then A2: ex A st P[A]; thus ex F being Ordinal st P[F] & for A st P[A] holds F c= A from ORDINAL1 :sch 1(A2); end; uniqueness proof let B,C; assume ( On X c= B & for A st On X c= A holds B c= A )&( On X c= C & for A st On X c= A holds C c= A ); hence B c= C & C c= B; end; end; theorem A in X implies inf X c= A proof assume A in X; then A in On X by ORDINAL1:def 9; hence thesis by SETFAM_1:3; end; theorem On X <> {} & (for A st A in X holds D c= A) implies D c= inf X proof assume that A1: On X <> {} and A2: for A st A in X holds D c= A; let x such that A3: x in D; for Y st Y in On X holds x in Y proof let Y; assume A4: Y in On X; then reconsider A = Y as Ordinal by ORDINAL1:def 9; A in X by A4,ORDINAL1:def 9; then D c= A by A2; hence thesis by A3; end; hence thesis by A1,SETFAM_1:def 1; end; theorem A in X & X c= Y implies inf Y c= inf X proof assume A in X; then A1: On X <> {} by ORDINAL1:def 9; assume X c= Y; then On X c= On Y by Th9; hence thesis by A1,SETFAM_1:6; end; theorem A in X implies inf X in X proof defpred P[Ordinal] means $1 in X; assume A in X; then A1: ex A st P[A]; consider A such that A2: P[A] & for B st P[B] holds A c= B from ORDINAL1:sch 1(A1); A3: A in On X by A2,ORDINAL1:def 9; A4: now let x; thus x in A implies for Y st Y in On X holds x in Y proof assume A5: x in A; let Y; assume A6: Y in On X; then reconsider B = Y as Ordinal by ORDINAL1:def 9; Y in X by A6,ORDINAL1:def 9; then A c= B by A2; hence thesis by A5; end; assume for Y st Y in On X holds x in Y; hence x in A by A3; end; On X <> {} by A2,ORDINAL1:def 9; hence thesis by A2,A4,SETFAM_1:def 1; end; theorem Th18: sup A = A proof On A = A & for B st On A c= B holds A c= B by Th8; hence thesis by Def3; end; theorem Th19: A in X implies A in sup X proof assume A in X; then A1: A in On X by ORDINAL1:def 9; On X c= sup X by Def3; hence thesis by A1; end; theorem Th20: (for A st A in X holds A in D) implies sup X c= D proof assume A1: for A st A in X holds A in D; On X c= D proof let x; assume A2: x in On X; then reconsider A = x as Ordinal by ORDINAL1:def 9; A in X by A2,ORDINAL1:def 9; hence thesis by A1; end; hence thesis by Def3; end; theorem A in sup X implies ex B st B in X & A c= B proof assume that A1: A in sup X and A2: for B st B in X holds not A c= B; for B st B in X holds B in A by A2,ORDINAL1:16; then sup X c= A by Th20; hence contradiction by A1,ORDINAL1:5; end; theorem X c= Y implies sup X c= sup Y proof assume X c= Y; then A1: On X c= On Y by Th9; On Y c= sup Y by Def3; then On X c= sup Y by A1,XBOOLE_1:1; hence thesis by Def3; end; theorem sup { A } = succ A proof A1: On { A } c= succ A proof let x; assume x in On { A }; then x in { A } by ORDINAL1:def 9; then x = A by TARSKI:def 1; hence thesis by ORDINAL1:6; end; now A in { A } by TARSKI:def 1; then A2: A in On { A } by ORDINAL1:def 9; let B; assume On { A } c= B; hence succ A c= B by A2,ORDINAL1:21; end; hence thesis by A1,Def3; end; theorem inf X c= sup X proof let x; set y = the Element of On X; assume A1: x in inf X; then reconsider y as Ordinal by ORDINAL1:def 9,SETFAM_1:1; On X c= sup X by Def3; then y in sup X by A1,SETFAM_1:1,TARSKI:def 3; then A2: y c= sup X by ORDINAL1:def 2; x in y by A1,SETFAM_1:1,def 1; hence thesis by A2; end; scheme TSLambda { A()->Ordinal, F(Ordinal)->set } : ex L st dom L = A() & for A st A in A() holds L.A = F(A) proof deffunc G(set) = F(sup union { $1 }); consider f such that A1: dom f = A() & for x st x in A() holds f.x = G(x) from FUNCT_1:sch 3; reconsider f as T-Sequence by A1,ORDINAL1:def 7; take L = f; thus dom L = A() by A1; let A; assume A in A(); hence L.A = F(sup union { A }) by A1 .= F(sup A) by ZFMISC_1:25 .= F(A) by Th18; end; definition let f; attr f is Ordinal-yielding means :Def4: ex A st rng f c= A; end; registration cluster Ordinal-yielding for T-Sequence; existence proof set A = the Ordinal; set L = the T-Sequence of A; take L,A; thus thesis by RELAT_1:def 19; end; end; definition mode Ordinal-Sequence is Ordinal-yielding T-Sequence; end; registration let A; cluster -> Ordinal-yielding for T-Sequence of A; coherence proof let L be T-Sequence of A; take A; thus thesis by RELAT_1:def 19; end; end; registration let L be Ordinal-Sequence; let A; cluster L|A -> Ordinal-yielding; coherence proof consider B such that A1: rng L c= B by Def4; L|A is Ordinal-yielding proof take B; rng(L|A) c= rng L by RELAT_1:70; hence thesis by A1,XBOOLE_1:1; end; hence thesis; end; end; reserve fi,psi for Ordinal-Sequence; theorem Th25: A in dom fi implies fi.A is Ordinal proof assume A in dom fi; then A1: fi.A in rng fi by FUNCT_1:def 3; ex B st rng fi c= B by Def4; hence thesis by A1; end; registration let f be Ordinal-Sequence, a be Ordinal; cluster f.a -> ordinal; coherence proof a in dom f or not a in dom f; hence thesis by Th25,FUNCT_1:def 2; end; end; scheme OSLambda { A()->Ordinal, F(Ordinal)->Ordinal } : ex fi st dom fi = A() & for A st A in A() holds fi.A = F(A) proof consider L such that A1: dom L = A() & for A st A in A() holds L.A = F(A) from TSLambda; L is Ordinal-yielding proof take sup rng L; let x; assume A2: x in rng L; then consider y such that A3: y in dom L and A4: x = L.y by FUNCT_1:def 3; reconsider y as Ordinal by A3; L.y = F(y) by A1,A3; then A5: x in On rng L by A2,A4,ORDINAL1:def 9; On rng L c= sup rng L by Def3; hence thesis by A5; end; then reconsider L as Ordinal-Sequence; take fi = L; thus dom fi = A() by A1; let A; assume A in A(); hence thesis by A1; end; scheme TSUniq1 { A()->Ordinal, B()->set, C(Ordinal,set)->set, D(Ordinal,T-Sequence) ->set, L1()->T-Sequence, L2()->T-Sequence } : L1() = L2() provided A1: dom L1() = A() and A2: {} in A() implies L1().{} = B() and A3: for A st succ A in A() holds L1().(succ A) = C(A,L1().A) and A4: for A st A in A() & A <> {} & A is limit_ordinal holds L1().A = D(A, L1()|A) and A5: dom L2() = A() and A6: {} in A() implies L2().{} = B() and A7: for A st succ A in A() holds L2().(succ A) = C(A,L2().A) and A8: for A st A in A() & A <> {} & A is limit_ordinal holds L2().A = D(A, L2()|A) proof defpred P[set] means L1().$1 <> L2().$1; consider X such that A9: Y in X iff Y in A() & P[Y] from XBOOLE_0:sch 1; for b holds b in X implies b in A() by A9; then A10: X c= A() by TARSKI:def 3; assume L1() <> L2(); then ex a st a in A() & L1().a <> L2().a by A1,A5,FUNCT_1:2; then X <> {} by A9; then consider B such that A11: B in X and A12: for C st C in X holds B c= C by A10,ORDINAL1:20; A13: B in A() by A9,A11; then A14: B c= A() by ORDINAL1:def 2; then A15: dom(L1()|B) = B & dom(L2()|B) = B by A1,A5,RELAT_1:62; A16: now let C; assume A17: C in B; then not C in X by A12,ORDINAL1:5; hence L1().C = L2().C by A9,A14,A17; end; A18: now let a; assume A19: a in B; L1()|B.a = L1().a & L2()|B.a = L2().a by A15,A19,FUNCT_1:47; hence L1()|B.a = L2()|B.a by A16,A19; end; A20: now given C such that A21: B = succ C; A22: L1().C = L1()|B.C & L2().C = L2()|B.C by A21,FUNCT_1:49,ORDINAL1:6; L1().B = C(C,L1().C) & L2().B = C(C,L2().C) by A3,A7,A13,A21; hence L1().B = L2().B by A18,A21,A22,ORDINAL1:6; end; now assume that A23: B <> {} and A24: for C holds B <> succ C; B is limit_ordinal by A24,ORDINAL1:29; then L1().B = D(B,L1()|B) & L2().B = D(B,L2()|B) by A4,A8,A13,A23; hence L1().B = L2().B by A15,A18,FUNCT_1:2; end; hence contradiction by A2,A6,A9,A11,A20; end; scheme TSExist1 { A()->Ordinal, B()->set, C(Ordinal,set)->set, D(Ordinal,T-Sequence )->set } : ex L st dom L = A() & ({} in A() implies L.{} = B() ) & (for A st succ A in A() holds L.(succ A) = C(A,L.A) ) & for A st A in A() & A <> {} & A is limit_ordinal holds L.A = D(A,L|A) proof defpred P[Ordinal,T-Sequence] means dom $2 = $1 & ({} in $1 implies $2.{} = B() ) & (for A st succ A in $1 holds $2.(succ A) = C(A,$2.A) ) & for A st A in $1 & A <> {} & A is limit_ordinal holds $2.A = D(A,$2|A); defpred R[Ordinal] means ex L st P[$1,L]; A1: for B st for C st C in B holds R[C] holds R[B] proof defpred R[set,set] means $1 is Ordinal & $2 is T-Sequence & for A,L st A = $1 & L = $2 holds P[A,L]; let B such that A2: for C st C in B ex L st P[C,L]; A3: for a,b,c st R[a,b] & R[a,c] holds b = c proof let a,b,c; assume that A4: a is Ordinal and A5: b is T-Sequence and A6: for A,L st A = a & L = b holds P[A,L] and a is Ordinal and A7: c is T-Sequence and A8: for A,L st A = a & L = c holds P[ A,L]; reconsider a as Ordinal by A4; reconsider c as T-Sequence by A7; A9: dom c = a by A8; A10: for A st A in a & A <> {} & A is limit_ordinal holds c.A = D(A,c|A) by A8; A11: for A st succ A in a holds c.(succ A) = C(A,c.A) by A8; A12: {} in a implies c.{} = B() by A8; reconsider b as T-Sequence by A5; A13: {} in a implies b.{} = B() by A6; A14: for A st succ A in a holds b.(succ A) = C(A,b.A) by A6; A15: for A st A in a & A <> {} & A is limit_ordinal holds b.A = D(A,b|A) by A6; A16: dom b = a by A6; b = c from TSUniq1(A16,A13,A14,A15,A9,A12,A11,A10); hence thesis; end; consider G being Function such that A17: [a,b] in G iff a in B & R[a,b] from FUNCT_1:sch 1(A3); defpred Q[set,set] means ex A,L st A = $1 & L = G.$1 & (A = {} & $2 = B() or (ex B st A = succ B & $2 = C(B,L.B)) or A <> {} & A is limit_ordinal & $2 = D(A,L)); A18: dom G = B proof thus a in dom G implies a in B proof assume a in dom G; then ex b st [a,b] in G by XTUPLE_0:def 12; hence thesis by A17; end; let a; assume A19: a in B; then reconsider a9 = a as Ordinal; consider L such that A20: P[a9,L] by A2,A19; for A holds for K be T-Sequence holds A = a9 & K = L implies P[A,K] by A20; then [a9,L] in G by A17,A19; hence thesis by XTUPLE_0:def 12; end; A21: for a st a in B ex b st Q[a,b] proof let a; assume A22: a in B; then reconsider A = a as Ordinal; consider c such that A23: [a,c] in G by A18,A22,XTUPLE_0:def 12; reconsider L = c as T-Sequence by A17,A23; A24: now given C such that A25: A = succ C; thus ex b st Q[a,b] proof take C(C,L.C), A, L; thus A = a & L = G.a by A23,FUNCT_1:1; thus thesis by A25; end; end; A26: now assume A27: A <> {} & for C holds A <> succ C; thus Q[a,D(A,L)] proof take A,L; thus A = a & L = G.a by A23,FUNCT_1:1; thus thesis by A27,ORDINAL1:29; end; end; now assume A28: A = {}; thus Q[a,B()] proof take A,L; thus A = a & L = G.a by A23,FUNCT_1:1; thus thesis by A28; end; end; hence thesis by A24,A26; end; A29: for a,b,c st a in B & Q[a,b] & Q[a,c] holds b = c proof let a,b,c such that a in B; given Ab being Ordinal,Lb being T-Sequence such that A30: Ab = a and A31: Lb = G.a and A32: Ab = {} & b = B() or (ex B st Ab = succ B & b = C(B,Lb.B)) or Ab <> {} & Ab is limit_ordinal & b = D(Ab,Lb); given Ac being Ordinal,Lc being T-Sequence such that A33: Ac = a and A34: Lc = G.a and A35: Ac = {} & c = B() or (ex B st Ac = succ B & c = C(B,Lc.B)) or Ac <> {} & Ac is limit_ordinal & c = D(Ac,Lc); now given C such that A36: Ab = succ C; consider A such that A37: Ab = succ A and A38: b = C(A,Lb.A) by A32,A36,ORDINAL1:29; consider D such that A39: Ac = succ D and A40: c = C(D,Lc.D) by A30,A33,A35,A36,ORDINAL1:29; A = D by A30,A33,A37,A39,ORDINAL1:7; hence thesis by A31,A34,A38,A40; end; hence thesis by A30,A31,A32,A33,A34,A35; end; consider F being Function such that A41: dom F = B & for a st a in B holds Q[a,F.a] from FUNCT_1:sch 2(A29 ,A21); reconsider L = F as T-Sequence by A41,ORDINAL1:def 7; take L; thus dom L = B by A41; thus {} in B implies L.{} = B() proof assume {} in B; then ex A being Ordinal, K being T-Sequence st A = {} & K = G.{} & (A = {} & F.{} = B() or (ex B st A = succ B & F.{} = C(B,K.B)) or A <> {} & A is limit_ordinal & F.{} = D(A,K)) by A41; hence thesis; end; A42: for A,L1 st A in B & L1 = G.A holds L|A = L1 proof defpred P[Ordinal] means for L1 st $1 in B & L1 = G.$1 holds L|$1 = L1; A43: for A st for C st C in A holds P[C] holds P[A] proof let A such that for C st C in A for L1 st C in B & L1 = G.C holds L|C = L1; let L1; assume that A44: A in B and A45: L1 = G.A; A46: [A,L1] in G by A18,A44,A45,FUNCT_1:1; then A47: P[A,L1] by A17; A48: now let x; assume A49: x in A; then reconsider x9 = x as Ordinal; A50: x9 in B by A44,A49,ORDINAL1:10; then consider A1,L2 such that A51: A1 = x9 and A52: L2 = G.x9 and A53: A1 = {} & L.x9 = B() or (ex B st A1 = succ B & L.x9 = C(B, L2.B)) or A1 <> {} & A1 is limit_ordinal & L.x9 = D(A1,L2) by A41; for D,L3 st D = x9 & L3 = L1|x9 holds P[D,L3] proof let D,L3 such that A54: D = x9 and A55: L3 = L1|x9; x9 c= A by A49,ORDINAL1:def 2; hence dom L3 = D by A47,A54,A55,RELAT_1:62; thus {} in D implies L3.{} = B() by A47,A49,A54,A55,FUNCT_1:49 ,ORDINAL1:10; thus succ C in D implies L3.(succ C) = C(C,L3.C) proof assume A56: succ C in D; C in succ C by ORDINAL1:6; then A57: L1|x9.C = L1.C by A54,A56,FUNCT_1:49,ORDINAL1:10; succ C in A & L1|x9.succ C = L1.succ C by A49,A54,A56,FUNCT_1:49 ,ORDINAL1:10; hence thesis by A17,A46,A55,A57; end; let C; assume that A58: C in D and A59: C <> {} & C is limit_ordinal; C c= x9 by A54,A58,ORDINAL1:def 2; then A60: L1|C = L3|C by A55,FUNCT_1:51; C in A by A49,A54,A58,ORDINAL1:10; then L1.C = D(C,L3|C) by A17,A46,A59,A60; hence thesis by A54,A55,A58,FUNCT_1:49; end; then [x9,L1|x9] in G by A17,A50; then A61: L1|x9 = L2 by A52,FUNCT_1:1; A62: L|A.x = L.x by A49,FUNCT_1:49; now given D such that A63: x9 = succ D; A64: L1.x = C(D,L1.D) by A17,A46,A49,A63; consider C such that A65: A1 = succ C and A66: L.x9 = C(C,L2.C) by A51,A53,A63,ORDINAL1:29; C = D by A51,A63,A65,ORDINAL1:7; hence L1.x = L|A.x by A62,A61,A63,A66,A64,FUNCT_1:49,ORDINAL1:6; end; hence L1.x = L|A.x by A17,A46,A49,A51,A53,A62,A61; end; A c= dom L by A41,A44,ORDINAL1:def 2; then dom(L|A) = A by RELAT_1:62; hence thesis by A47,A48,FUNCT_1:2; end; thus for A holds P[A] from ORDINAL1:sch 2(A43); end; thus succ A in B implies L.(succ A) = C(A,L.A) proof assume A67: succ A in B; then consider C being Ordinal, K being T-Sequence such that A68: C = succ A and A69: K = G.succ A and A70: C = {} & F.succ A = B() or (ex B st C = succ B & F.succ A = C(B ,K.B)) or C <> {} & C is limit_ordinal & F.succ A = D(C,K) by A41; A71: K = L|succ A by A42,A67,A69; consider D such that A72: C = succ D and A73: F.succ A = C(D,K.D) by A68,A70,ORDINAL1:29; A = D by A68,A72,ORDINAL1:7; hence thesis by A73,A71,FUNCT_1:49,ORDINAL1:6; end; let D; assume that A74: D in B and A75: D <> {} & D is limit_ordinal; ex A being Ordinal, K being T-Sequence st A = D & K = G.D & (A = {} & F.D = B() or (ex B st A = succ B & F.D = C(B,K.B)) or A <> {} & A is limit_ordinal & F.D = D(A,K)) by A41,A74; hence thesis by A42,A74,A75,ORDINAL1:29; end; for A holds R[A] from ORDINAL1:sch 2(A1); hence thesis; end; scheme TSResult { L()->T-Sequence, F(Ordinal)->set, A()->Ordinal, B()->set, C( Ordinal,set)->set, D(Ordinal,T-Sequence)->set } : for A st A in dom L() holds L ().A = F(A) provided A1: for A,x holds x = F(A) iff ex L st x = last L & dom L = succ A & L. {} = B() & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) and A2: dom L() = A() and A3: {} in A() implies L().{} = B() and A4: for A st succ A in A() holds L().(succ A) = C(A,L().A) and A5: for A st A in A() & A <> {} & A is limit_ordinal holds L().A = D(A,L ()|A) proof let A; set L = L()|succ A; assume A in dom L(); then A6: succ A c= dom L() by ORDINAL1:21; A7: for C st succ C in succ A holds L.succ C = C(C,L.C) proof let C such that A8: succ C in succ A; C in succ C by ORDINAL1:6; then A9: L.C = L().C by A8,FUNCT_1:49,ORDINAL1:10; L.succ C = L().succ C by A8,FUNCT_1:49; hence thesis by A2,A4,A6,A8,A9; end; A10: for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C ) proof let C; assume that A11: C in succ A and A12: C <> {} & C is limit_ordinal; C c= succ A by A11,ORDINAL1:def 2; then A13: L|C = L()|C by FUNCT_1:51; L.C = L().C by A11,FUNCT_1:49; hence thesis by A2,A5,A6,A11,A12,A13; end; {} c= succ A; then {} c< succ A by XBOOLE_0:def 8; then A14: {} in succ A & L.{} = L().{} by FUNCT_1:49,ORDINAL1:11; A15: dom L = succ A by A6,RELAT_1:62; then A in succ A & last L = L.A by Th2,ORDINAL1:21; then last L = L().A by FUNCT_1:49; hence thesis by A1,A2,A3,A6,A15,A14,A7,A10; end; scheme TSDef { A()->Ordinal, B()->set, C(Ordinal,set)->set, D(Ordinal,T-Sequence)-> set } : (ex x,L st x = last L & dom L = succ A() & L.{} = B() & (for C st succ C in succ A() holds L.succ C = C(C,L.C)) & for C st C in succ A() & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) ) & for x1,x2 being set st (ex L st x1 = last L & dom L = succ A() & L.{} = B() & (for C st succ C in succ A() holds L. succ C = C(C,L.C)) & for C st C in succ A() & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) ) & (ex L st x2 = last L & dom L = succ A() & L.{} = B() & (for C st succ C in succ A() holds L.succ C = C(C,L.C)) & for C st C in succ A( ) & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) ) holds x1 = x2 proof consider L such that A1: dom L = succ A() & ({} in succ A() implies L.{} = B() ) & (for C st succ C in succ A() holds L.(succ C) = C(C,L.C)) & for C st C in succ A() & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) from TSExist1; thus ex x,L st x = last L & dom L = succ A() & L.{} = B() & (for C st succ C in succ A() holds L.succ C = C(C,L.C)) & for C st C in succ A() & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) proof take x = last L, L; thus x = last L & dom L = succ A() by A1; {} c= succ A(); then {} c< succ A() by XBOOLE_0:def 8; hence thesis by A1,ORDINAL1:11; end; let x1,x2 be set; given L1 such that A2: x1 = last L1 and A3: dom L1 = succ A() and A4: L1.{} = B() and A5: for C st succ C in succ A() holds L1.succ C = C(C,L1.C) and A6: for C st C in succ A() & C <> {} & C is limit_ordinal holds L1.C = D (C,L1|C); A7: {} in succ A() implies L1.{} = B() by A4; given L2 such that A8: x2 = last L2 and A9: dom L2 = succ A() and A10: L2.{} = B() and A11: for C st succ C in succ A() holds L2.succ C = C(C,L2.C) and A12: for C st C in succ A() & C <> {} & C is limit_ordinal holds L2.C = D(C,L2|C); A13: {} in succ A() implies L2.{} = B() by A10; L1 = L2 from TSUniq1(A3,A7,A5,A6,A9,A13,A11,A12); hence thesis by A2,A8; end; scheme TSResult0 { F(Ordinal)->set, B()->set, C(Ordinal,set)->set, D(Ordinal, T-Sequence)->set } : F({}) = B() provided A1: for A,x holds x = F(A) iff ex L st x = last L & dom L = succ A & L. {} = B() & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) proof consider L such that A2: dom L = succ {} & ({} in succ {} implies L.{} = B() ) & (for A st succ A in succ {} holds L.(succ A) = C(A,L.A) ) & for A st A in succ {} & A <> {} & A is limit_ordinal holds L.A = D(A,L|A) from TSExist1; B() = last L by A2,Th2,ORDINAL1:6; hence thesis by A1,A2,ORDINAL1:6; end; scheme TSResultS { B()->set, C(Ordinal,set)->set, D(Ordinal,T-Sequence)->set, F( Ordinal)->set } : for A holds F(succ A) = C(A,F(A)) provided A1: for A,x holds x = F(A) iff ex L st x = last L & dom L = succ A & L. {} = B() & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) proof let A; consider L such that A2: dom L = succ succ A and A3: {} in succ succ A implies L.{} = B() and A4: for C st succ C in succ succ A holds L.(succ C) = C(C,L.C) and A5: for C st C in succ succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) from TSExist1; A6: for A,x holds x = F(A) iff ex L st x = last L & dom L = succ A & L.{} = B() & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) by A1; A7: for B st B in dom L holds L.B = F(B) from TSResult(A6,A2,A3,A4, A5); then A8: L.succ A = F(succ A) by A2,ORDINAL1:6; A in succ A & succ A in succ succ A by ORDINAL1:6; then L.A = F(A) by A2,A7,ORDINAL1:10; hence thesis by A4,A8,ORDINAL1:6; end; scheme TSResultL { L()->T-Sequence, A()->Ordinal, F(Ordinal)->set, B()->set, C( Ordinal,set)->set, D(Ordinal,T-Sequence)->set } : F(A()) = D(A(),L()) provided A1: for A,x holds x = F(A) iff ex L st x = last L & dom L = succ A & L. {} = B() & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) and A2: A() <> {} & A() is limit_ordinal and A3: dom L() = A() and A4: for A st A in A() holds L().A = F(A) proof A5: A() in succ A() by ORDINAL1:6; consider L such that A6: dom L = succ A() and A7: {} in succ A() implies L.{} = B() and A8: for C st succ C in succ A() holds L.(succ C) = C(C,L.C) and A9: for C st C in succ A() & C <> {} & C is limit_ordinal holds L.C = D( C,L|C) from TSExist1; set L1 = L|A(); A10: for A,x holds x = F(A) iff ex L st x = last L & dom L = succ A & L.{} = B() & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) by A1; A11: for B st B in dom L holds L.B = F(B) from TSResult(A10,A6,A7,A8, A9); A12: now let x; assume A13: x in A(); then reconsider x9 = x as Ordinal; thus L1.x = L.x9 by A13,FUNCT_1:49 .= F(x9) by A6,A11,A5,A13,ORDINAL1:10 .= L().x by A4,A13; end; A() c= dom L by A6,A5,ORDINAL1:def 2; then dom L1 = A() by RELAT_1:62; then L1 = L() by A3,A12,FUNCT_1:2; then L.A() = D(A(),L()) by A2,A9,ORDINAL1:6; hence thesis by A6,A11,ORDINAL1:6; end; scheme OSExist { A()->Ordinal, B()->Ordinal, C(Ordinal,Ordinal)->Ordinal, D(Ordinal ,T-Sequence)->Ordinal } : ex fi st dom fi = A() & ({} in A() implies fi.{} = B( ) ) & (for A st succ A in A() holds fi.(succ A) = C(A,fi.A) ) & for A st A in A () & A <> {} & A is limit_ordinal holds fi.A = D(A,fi|A) proof deffunc CC(Ordinal,set) = C($1,sup union {$2}); consider L such that A1: dom L = A() and A2: {} in A() implies L.{} = B() and A3: for A st succ A in A() holds L.(succ A) = CC(A,L.A) and A4: for A st A in A() & A <> {} & A is limit_ordinal holds L.A = D(A,L|A ) from TSExist1; L is Ordinal-yielding proof take sup rng L; let x; assume A5: x in rng L; then consider y such that A6: y in dom L and A7: x = L.y by FUNCT_1:def 3; reconsider y as Ordinal by A6; A8: now assume that A9: y <> {} and A10: for B holds y <> succ B; y is limit_ordinal by A10,ORDINAL1:29; then L.y = D(y,L|y) by A1,A4,A6,A9; hence x is Ordinal by A7; end; A11: On rng L c= sup rng L by Def3; now given B such that A12: y = succ B; L.y = C(B,sup union {L.B}) by A1,A3,A6,A12; hence x is Ordinal by A7; end; then x in On rng L by A1,A2,A5,A6,A7,A8,ORDINAL1:def 9; hence thesis by A11; end; then reconsider L as Ordinal-Sequence; take fi = L; thus dom fi = A() & ({} in A() implies fi.{} = B() ) by A1,A2; thus for A st succ A in A() holds fi.(succ A) = C(A,fi.A) proof let A; reconsider B = fi.A as Ordinal; sup union {B} = sup B by ZFMISC_1:25 .= B by Th18; hence thesis by A3; end; thus thesis by A4; end; scheme OSResult { fi()->Ordinal-Sequence, F(Ordinal)->Ordinal, A()->Ordinal, B()-> Ordinal, C(Ordinal,Ordinal)->Ordinal, D(Ordinal,T-Sequence)->Ordinal } : for A st A in dom fi() holds fi().A = F(A) provided A1: for A,B holds B = F(A) iff ex fi st B = last fi & dom fi = succ A & fi.{} = B() & (for C st succ C in succ A holds fi.succ C = C(C,fi.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) and A2: dom fi() = A() and A3: {} in A() implies fi().{} = B() and A4: for A st succ A in A() holds fi().(succ A) = C(A,fi().A) and A5: for A st A in A() & A <> {} & A is limit_ordinal holds fi().A = D(A, fi()|A) proof let A; set fi = fi()|succ A; assume A in dom fi(); then A6: succ A c= dom fi() by ORDINAL1:21; A7: for C st succ C in succ A holds fi.succ C = C(C,fi.C) proof let C such that A8: succ C in succ A; C in succ C by ORDINAL1:6; then A9: fi.C = fi().C by A8,FUNCT_1:49,ORDINAL1:10; fi.succ C = fi().succ C by A8,FUNCT_1:49; hence thesis by A2,A4,A6,A8,A9; end; A10: for C st C in succ A & C <> {} & C is limit_ordinal holds fi.C = D(C,fi |C) proof let C; assume that A11: C in succ A and A12: C <> {} & C is limit_ordinal; C c= succ A by A11,ORDINAL1:def 2; then A13: fi|C = fi()|C by FUNCT_1:51; fi.C = fi().C by A11,FUNCT_1:49; hence thesis by A2,A5,A6,A11,A12,A13; end; {} c= succ A; then {} c< succ A by XBOOLE_0:def 8; then A14: {} in succ A & fi.{} = fi().{} by FUNCT_1:49,ORDINAL1:11; A15: dom fi = succ A by A6,RELAT_1:62; then A in succ A & last fi = fi.A by Th2,ORDINAL1:21; then last fi = fi().A by FUNCT_1:49; hence thesis by A1,A2,A3,A6,A15,A14,A7,A10; end; scheme OSDef { A()->Ordinal, B()->Ordinal, C(Ordinal,Ordinal)->Ordinal, D(Ordinal, T-Sequence)->Ordinal } : (ex A,fi st A = last fi & dom fi = succ A() & fi.{} = B() & (for C st succ C in succ A() holds fi.succ C = C(C,fi.C)) & for C st C in succ A() & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) ) & for A1,A2 st (ex fi st A1 = last fi & dom fi = succ A() & fi.{} = B() & (for C st succ C in succ A() holds fi.succ C = C(C,fi.C)) & for C st C in succ A() & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) ) & (ex fi st A2 = last fi & dom fi = succ A() & fi.{} = B() & (for C st succ C in succ A() holds fi.succ C = C(C,fi.C)) & for C st C in succ A() & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) ) holds A1 = A2 proof consider fi such that A1: dom fi = succ A() & ({} in succ A() implies fi.{} = B() ) & (for C st succ C in succ A() holds fi.(succ C) = C(C,fi.C)) & for C st C in succ A() & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) from OSExist; reconsider A = last fi as Ordinal; thus ex A,fi st A = last fi & dom fi = succ A() & fi.{} = B() & (for C st succ C in succ A() holds fi.succ C = C(C,fi.C)) & for C st C in succ A() & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) proof take A, fi; thus A = last fi & dom fi = succ A() by A1; {} c= succ A(); then {} c< succ A() by XBOOLE_0:def 8; hence thesis by A1,ORDINAL1:11; end; deffunc CD(Ordinal,Ordinal) = C($1,sup union { $2 }); let A1,A2 be Ordinal; given L1 being Ordinal-Sequence such that A2: A1 = last L1 and A3: dom L1 = succ A() and A4: L1.{} = B() and A5: for C st succ C in succ A() holds L1.succ C = C(C,L1.C) and A6: for C st C in succ A() & C <> {} & C is limit_ordinal holds L1.C = D (C,L1|C); A7: {} in succ A() implies L1.{} = B() by A4; A8: for C st succ C in succ A() holds L1.(succ C) = CD(C,L1.C) proof let C such that A9: succ C in succ A(); reconsider x9 = L1.C as Ordinal; sup union { L1.C } = sup x9 by ZFMISC_1:25 .= x9 by Th18; hence thesis by A5,A9; end; given L2 being Ordinal-Sequence such that A10: A2 = last L2 and A11: dom L2 = succ A() and A12: L2.{} = B() and A13: for C st succ C in succ A() holds L2.succ C = C(C,L2.C) and A14: for C st C in succ A() & C <> {} & C is limit_ordinal holds L2.C = D(C,L2|C); A15: for C st C in succ A() & C <> {} & C is limit_ordinal holds L2.C = D(C, L2|C) by A14; A16: for C st C in succ A() & C <> {} & C is limit_ordinal holds L1.C = D(C, L1|C) by A6; A17: for C st succ C in succ A() holds L2.(succ C) = CD(C,L2.C) proof let C such that A18: succ C in succ A(); reconsider x9 = L2.C as Ordinal; sup union { L2.C } = sup x9 by ZFMISC_1:25 .= x9 by Th18; hence thesis by A13,A18; end; A19: {} in succ A() implies L2.{} = B() by A12; L1 = L2 from TSUniq1(A3,A7,A8,A16,A11,A19,A17,A15); hence thesis by A2,A10; end; scheme OSResult0 { F(Ordinal)->Ordinal, B()->Ordinal, C(Ordinal,Ordinal)->Ordinal, D(Ordinal,T-Sequence)->Ordinal } : F({}) = B() provided A1: for A,B holds B = F(A) iff ex fi st B = last fi & dom fi = succ A & fi.{} = B() & (for C st succ C in succ A holds fi.succ C = C(C,fi.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) proof consider fi such that A2: dom fi = succ {} & ({} in succ {} implies fi.{} = B() ) & (for A st succ A in succ {} holds fi.(succ A) = C(A,fi.A) ) & for A st A in succ {} & A <> {} & A is limit_ordinal holds fi.A = D(A,fi|A) from OSExist; B() = last fi by A2,Th2,ORDINAL1:6; hence thesis by A1,A2,ORDINAL1:6; end; scheme OSResultS { B()->Ordinal, C(Ordinal,Ordinal)->Ordinal, D(Ordinal,T-Sequence) ->Ordinal, F(Ordinal)->Ordinal } : for A holds F(succ A) = C(A,F(A)) provided A1: for A,B holds B = F(A) iff ex fi st B = last fi & dom fi = succ A & fi.{} = B() & (for C st succ C in succ A holds fi.succ C = C(C,fi.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) proof let A; consider fi such that A2: dom fi = succ succ A and A3: {} in succ succ A implies fi.{} = B() and A4: for C st succ C in succ succ A holds fi.(succ C) = C(C,fi.C) and A5: for C st C in succ succ A & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) from OSExist; A6: for A,B holds B = F(A) iff ex fi st B = last fi & dom fi = succ A & fi. {} = B() & (for C st succ C in succ A holds fi.succ C = C(C,fi.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by A1; A7: for B st B in dom fi holds fi.B = F(B) from OSResult(A6,A2,A3,A4, A5); then A8: fi.succ A = F(succ A) by A2,ORDINAL1:6; A in succ A & succ A in succ succ A by ORDINAL1:6; then fi.A = F(A) by A2,A7,ORDINAL1:10; hence thesis by A4,A8,ORDINAL1:6; end; scheme OSResultL { fi()->Ordinal-Sequence, A()->Ordinal, F(Ordinal)->Ordinal, B()-> Ordinal, C(Ordinal,Ordinal)->Ordinal, D(Ordinal,T-Sequence)->Ordinal } : F(A()) = D(A(),fi()) provided A1: for A,B holds B = F(A) iff ex fi st B = last fi & dom fi = succ A & fi.{} = B() & (for C st succ C in succ A holds fi.succ C = C(C,fi.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) and A2: A() <> {} & A() is limit_ordinal and A3: dom fi() = A() and A4: for A st A in A() holds fi().A = F(A) proof A5: A() in succ A() by ORDINAL1:6; consider fi such that A6: dom fi = succ A() and A7: {} in succ A() implies fi.{} = B() and A8: for C st succ C in succ A() holds fi.(succ C) = C(C,fi.C) and A9: for C st C in succ A() & C <> {} & C is limit_ordinal holds fi.C = D (C,fi|C) from OSExist; set psi = fi|A(); A10: for A,B holds B = F(A) iff ex fi st B = last fi & dom fi = succ A & fi. {} = B() & (for C st succ C in succ A holds fi.succ C = C(C,fi.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by A1; A11: for B st B in dom fi holds fi.B = F(B) from OSResult(A10,A6,A7,A8, A9); A12: now let x; assume A13: x in A(); then reconsider x9 = x as Ordinal; thus psi.x = fi.x9 by A13,FUNCT_1:49 .= F(x9) by A6,A11,A5,A13,ORDINAL1:10 .= fi().x by A4,A13; end; A() c= dom fi by A6,A5,ORDINAL1:def 2; then dom psi = A() by RELAT_1:62; then psi = fi() by A3,A12,FUNCT_1:2; then fi.A() = D(A(),fi()) by A2,A9,ORDINAL1:6; hence thesis by A6,A11,ORDINAL1:6; end; definition let L; func sup L -> Ordinal equals sup rng L; correctness; func inf L -> Ordinal equals inf rng L; correctness; end; theorem sup L = sup rng L & inf L = inf rng L; definition let L; func lim_sup L -> Ordinal means ex fi st it = inf fi & dom fi = dom L & for A st A in dom L holds fi.A = sup rng (L|(dom L \ A)); existence proof deffunc F(Ordinal) = sup rng (L|(dom L \ $1)); consider fi such that A1: dom fi = dom L & for A st A in dom L holds fi.A = F(A) from OSLambda; take inf fi, fi; thus thesis by A1; end; uniqueness proof let A1,A2 be Ordinal; given fi such that A2: A1 = inf fi & dom fi = dom L and A3: for A st A in dom L holds fi.A = sup rng (L|(dom L \ A)); given psi such that A4: A2 = inf psi & dom psi = dom L and A5: for A st A in dom L holds psi.A = sup rng (L|(dom L \ A)); now let x; assume A6: x in dom L; then reconsider A = x as Ordinal; fi.A = sup rng (L|(dom L \ A)) by A3,A6; hence fi.x = psi.x by A5,A6; end; hence thesis by A2,A4,FUNCT_1:2; end; func lim_inf L -> Ordinal means ex fi st it = sup fi & dom fi = dom L & for A st A in dom L holds fi.A = inf rng (L|(dom L \ A)); existence proof deffunc F(Ordinal) = inf rng (L|(dom L \ $1)); consider fi such that A7: dom fi = dom L & for A st A in dom L holds fi.A = F(A) from OSLambda; take sup fi, fi; thus thesis by A7; end; uniqueness proof let A1,A2 be Ordinal; given fi such that A8: A1 = sup fi & dom fi = dom L and A9: for A st A in dom L holds fi.A = inf rng (L|(dom L \ A)); given psi such that A10: A2 = sup psi & dom psi = dom L and A11: for A st A in dom L holds psi.A = inf rng (L|(dom L \ A)); now let x; assume A12: x in dom L; then reconsider A = x as Ordinal; fi.A = inf rng (L|(dom L \ A)) by A9,A12; hence fi.x = psi.x by A11,A12; end; hence thesis by A8,A10,FUNCT_1:2; end; end; definition let A,fi; pred A is_limes_of fi means :Def9: ex B st B in dom fi & for C st B c= C & C in dom fi holds fi.C = {} if A = {} otherwise for B,C st B in A & A in C ex D st D in dom fi & for E being Ordinal st D c= E & E in dom fi holds B in fi.E & fi.E in C; consistency; end; definition let fi; given A such that A1: A is_limes_of fi; func lim fi -> Ordinal means :Def10: it is_limes_of fi; existence by A1; uniqueness proof let A1,A2 be Ordinal such that A2: (A1 = {} & ex B st B in dom fi & for C st B c= C & C in dom fi holds fi.C = {}) or (A1 <> {} & for B,C st B in A1 & A1 in C ex D st D in dom fi & for E being Ordinal st D c= E & E in dom fi holds B in fi.E & fi.E in C) and A3: (A2 = {} & ex B st B in dom fi & for C st B c= C & C in dom fi holds fi.C = {}) or (A2 <> {} & for B,C st B in A2 & A2 in C ex D st D in dom fi & for E being Ordinal st D c= E & E in dom fi holds B in fi.E & fi.E in C); A4: now set x = the Element of A1; reconsider x as Ordinal; assume A1 in A2; then consider D such that A5: D in dom fi and A6: for A st D c= A & A in dom fi holds A1 in fi.A & fi.A in succ A2 by A3,ORDINAL1:6; now assume A1 = {}; then consider B such that A7: B in dom fi and A8: for C st B c= C & C in dom fi holds fi.C = {} by A2; B c= D or D c= B; then consider E being Ordinal such that A9: E = D & B c= D or E = B & D c= B; fi.E = {} by A5,A7,A8,A9; hence contradiction by A5,A6,A7,A9; end; then consider C such that A10: C in dom fi and A11: for A st C c= A & A in dom fi holds x in fi.A & fi.A in succ A1 by A2,ORDINAL1:6; C c= D or D c= C; then consider E being Ordinal such that A12: E = D & C c= D or E = C & D c= C; fi.E in succ A1 by A5,A10,A11,A12; then A13: fi.E in A1 or fi.E = A1 by ORDINAL1:8; A1 in fi.E by A5,A6,A10,A12; hence contradiction by A13; end; set x = the Element of A2; reconsider x as Ordinal; assume A1 <> A2; then A1 in A2 or A2 in A1 by ORDINAL1:14; then consider D such that A14: D in dom fi and A15: for A st D c= A & A in dom fi holds A2 in fi.A & fi.A in succ A1 by A2,A4,ORDINAL1:6; now assume A2 = {}; then consider B such that A16: B in dom fi and A17: for C st B c= C & C in dom fi holds fi.C = {} by A3; B c= D or D c= B; then consider E being Ordinal such that A18: E = D & B c= D or E = B & D c= B; fi.E = {} by A14,A16,A17,A18; hence contradiction by A14,A15,A16,A18; end; then consider C such that A19: C in dom fi and A20: for A st C c= A & A in dom fi holds x in fi.A & fi.A in succ A2 by A3,ORDINAL1:6; C c= D or D c= C; then consider E being Ordinal such that A21: E = D & C c= D or E = C & D c= C; fi.E in succ A2 by A14,A19,A20,A21; then A22: fi.E in A2 or fi.E = A2 by ORDINAL1:8; A2 in fi.E by A14,A15,A19,A21; hence contradiction by A22; end; end; definition let A,fi; func lim(A,fi) -> Ordinal equals lim(fi|A); correctness; end; definition let L be Ordinal-Sequence; attr L is increasing means for A,B st A in B & B in dom L holds L.A in L.B; attr L is continuous means for A,B st A in dom L & A <> {} & A is limit_ordinal & B = L.A holds B is_limes_of L|A; end; definition let A,B; func A +^ B -> Ordinal means :Def14: ex fi st it = last fi & dom fi = succ B & fi.{} = A & (for C st succ C in succ B holds fi.succ C = succ(fi.C)) & for C st C in succ B & C <> {} & C is limit_ordinal holds fi.C = sup(fi|C); correctness proof deffunc D(Ordinal,T-Sequence) = sup $2; deffunc C(Ordinal,Ordinal) = succ $2; (ex F being Ordinal,fi st F = last fi & dom fi = succ B & fi.{} = A & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) ) & for A1,A2 st (ex fi st A1 = last fi & dom fi = succ B & fi.{} = A & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) ) & (ex fi st A2 = last fi & dom fi = succ B & fi.{} = A & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) ) holds A1 = A2 from OSDef; hence thesis; end; end; definition let A,B; func A *^ B -> Ordinal means :Def15: ex fi st it = last fi & dom fi = succ A & fi.{} = {} & (for C st succ C in succ A holds fi.succ C = (fi.C)+^B) & for C st C in succ A & C <> {} & C is limit_ordinal holds fi.C = union sup(fi|C); correctness proof deffunc D(Ordinal,Ordinal-Sequence) = union sup $2; deffunc C(Ordinal,Ordinal) = $2+^B; (ex F being Ordinal,fi st F = last fi & dom fi = succ A & fi.{} = {} & (for C st succ C in succ A holds fi.succ C = C(C,fi.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) ) & for A1,A2 st (ex fi st A1 = last fi & dom fi = succ A & fi.{} = {} & (for C st succ C in succ A holds fi.succ C = C(C,fi.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) ) & (ex fi st A2 = last fi & dom fi = succ A & fi.{} = {} & (for C st succ C in succ A holds fi.succ C = C(C,fi.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) ) holds A1 = A2 from OSDef; hence thesis; end; end; registration let O be Ordinal; cluster -> ordinal for Element of O; coherence; end; definition let A,B; func exp(A,B) -> Ordinal means :Def16: ex fi st it = last fi & dom fi = succ B & fi.{} = 1 & (for C st succ C in succ B holds fi.succ C = A*^(fi.C)) & for C st C in succ B & C <> {} & C is limit_ordinal holds fi.C = lim(fi|C); correctness proof deffunc D(Ordinal,Ordinal-Sequence) = lim $2; deffunc C(Ordinal,Ordinal) = A*^$2; (ex F being Ordinal,fi st F = last fi & dom fi = succ B & fi.{} = 1 & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) ) & for A1,A2 st (ex fi st A1 = last fi & dom fi = succ B & fi.{} = 1 & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) ) & (ex fi st A2 = last fi & dom fi = succ B & fi.{} = 1 & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) ) holds A1 = A2 from OSDef; hence thesis; end; end; theorem Th27: A+^{} = A proof deffunc C(Ordinal,Ordinal) = succ $2; deffunc D(Ordinal,T-Sequence) = sup $2; deffunc F(Ordinal) = A+^$1; A1: for B,C holds C = F(B) iff ex fi st C = last fi & dom fi = succ B & fi. {} = A & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by Def14; thus F({}) = A from OSResult0(A1); end; theorem Th28: A+^succ B = succ(A+^B) proof deffunc C(Ordinal,Ordinal) = succ $2; deffunc D(Ordinal,T-Sequence) = sup $2; deffunc F(Ordinal) = A+^$1; A1: for B,C holds C = F(B) iff ex fi st C = last fi & dom fi = succ B & fi. {} = A & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by Def14; for B holds F(succ B) = C(B,F(B)) from OSResultS(A1); hence thesis; end; theorem Th29: B <> {} & B is limit_ordinal implies for fi st dom fi = B & for C st C in B holds fi.C = A+^C holds A+^B = sup fi proof deffunc C(Ordinal,Ordinal) = succ $2; deffunc D(Ordinal,Ordinal-Sequence) = sup $2; assume A1: B <> {} & B is limit_ordinal; deffunc F(Ordinal) = A+^$1; let fi such that A2: dom fi = B and A3: for C st C in B holds fi.C = F(C); A4: for B,C holds C = F(B) iff ex fi st C = last fi & dom fi = succ B & fi. {} = A & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by Def14; thus F(B) = D(B,fi) from OSResultL(A4,A1,A2,A3); end; theorem Th30: {}+^A = A proof defpred P[Ordinal] means {}+^$1 = $1; A1: for A holds P[A] implies P[succ A] by Th28; A2: for A st A <> {} & A is limit_ordinal & for B st B in A holds P[B] holds P[A] proof deffunc F(Ordinal) = {}+^$1; let A; assume that A3: A <> {} & A is limit_ordinal and A4: for B st B in A holds {}+^B = B; consider fi such that A5: dom fi = A & for B st B in A holds fi.B = F(B) from OSLambda; A6: rng fi = A proof thus x in rng fi implies x in A proof assume x in rng fi; then consider y such that A7: y in dom fi and A8: x = fi.y by FUNCT_1:def 3; reconsider y as Ordinal by A7; x = {}+^y by A5,A7,A8 .= y by A4,A5,A7; hence thesis by A5,A7; end; let x; assume A9: x in A; then reconsider B = x as Ordinal; {}+^B = B & fi.B = {}+^B by A4,A5,A9; hence thesis by A5,A9,FUNCT_1:def 3; end; {}+^A = sup fi by A3,A5,Th29 .= sup rng fi; hence thesis by A6,Th18; end; A10: P[{}] by Th27; for A holds P[A] from OrdinalInd(A10,A1,A2); hence thesis; end; Lm1: 1 = succ {}; theorem A+^1 = succ A proof thus A+^1 = succ(A+^{}) by Lm1,Th28 .= succ A by Th27; end; theorem Th32: A in B implies C +^ A in C +^ B proof defpred P[Ordinal] means A in $1 implies C +^ A in C +^ $1; A1: for B st for D st D in B holds P[D] holds P[B] proof let B such that A2: for D st D in B holds A in D implies C +^ A in C +^ D and A3: A in B; A4: now given D such that A5: B = succ D; A6: now assume A in D; then A7: C +^ A in C +^ D by A2,A5,ORDINAL1:6; succ(C +^ D) = C +^ succ D & C +^ D in succ(C +^ D) by Th28,ORDINAL1:6 ; hence thesis by A5,A7,ORDINAL1:10; end; now assume A8: not A in D; A c< D iff A c= D & A <> D by XBOOLE_0:def 8; then C +^ A in succ(C +^ D) by A3,A5,A8,ORDINAL1:11,22; hence thesis by A5,Th28; end; hence thesis by A6; end; now deffunc F(Ordinal) = C+^$1; consider fi such that A9: dom fi = B & for D st D in B holds fi.D = F(D) from OSLambda; fi.A = C+^A by A3,A9; then A10: C+^A in rng fi by A3,A9,FUNCT_1:def 3; assume for D holds B <> succ D; then B is limit_ordinal by ORDINAL1:29; then C+^B = sup fi by A3,A9,Th29 .= sup rng fi; hence thesis by A10,Th19; end; hence thesis by A4; end; for B holds P[B] from ORDINAL1:sch 2(A1); hence thesis; end; theorem Th33: A c= B implies C +^ A c= C +^ B proof assume A1: A c= B; now assume A <> B; then A c< B by A1,XBOOLE_0:def 8; then C +^ A in C +^ B by Th32,ORDINAL1:11; hence thesis by ORDINAL1:def 2; end; hence thesis; end; theorem Th34: A c= B implies A +^ C c= B +^ C proof defpred P[Ordinal] means A +^ $1 c= B +^ $1; assume A1: A c= B; A2: for C st for D st D in C holds P[D] holds P[C] proof let C such that A3: for D st D in C holds A +^ D c= B +^ D; A4: now given D such that A5: C = succ D; A6: B +^ C = succ(B +^ D) by A5,Th28; A +^ D c= B +^ D & A +^ C = succ(A +^ D) by A3,A5,Th28,ORDINAL1:6; hence thesis by A6,Th1; end; A7: now deffunc F(Ordinal) = A+^$1; assume that A8: C <> {} and A9: for D holds C <> succ D; consider fi such that A10: dom fi = C & for D st D in C holds fi.D = F(D) from OSLambda; A11: now let D; assume D in rng fi; then consider x such that A12: x in dom fi and A13: D = fi.x by FUNCT_1:def 3; reconsider x as Ordinal by A12; A14: B +^ x in B +^ C by A10,A12,Th32; D = A+^x & A +^ x c= B +^ x by A3,A10,A12,A13; hence D in B +^ C by A14,ORDINAL1:12; end; C is limit_ordinal by A9,ORDINAL1:29; then A+^C = sup fi by A8,A10,Th29 .= sup rng fi; hence thesis by A11,Th20; end; now assume A15: C = {}; then A +^ C = A by Th27; hence thesis by A1,A15,Th27; end; hence thesis by A4,A7; end; for C holds P[C] from ORDINAL1:sch 2(A2); hence thesis; end; theorem Th35: {}*^A = {} proof deffunc D(Ordinal,T-Sequence) = union sup $2; deffunc F(Ordinal) = $1*^A; deffunc C(Ordinal,Ordinal) = $2+^A; A1: for B,C holds C = F(B) iff ex fi st C = last fi & dom fi = succ B & fi. {} = {} & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by Def15; thus F({}) = {} from OSResult0(A1); end; theorem Th36: (succ B)*^A = B*^A +^ A proof deffunc D(Ordinal,T-Sequence) = union sup $2; deffunc F(Ordinal) = $1*^A; deffunc C(Ordinal,Ordinal) = $2 +^ A; A1: for B,C holds C = F(B) iff ex fi st C = last fi & dom fi = succ B & fi. {} = {} & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by Def15; for B holds F(succ B) = C(B,F(B)) from OSResultS(A1); hence thesis; end; theorem Th37: B <> {} & B is limit_ordinal implies for fi st dom fi = B & for C st C in B holds fi.C = C*^A holds B*^A = union sup fi proof deffunc D(Ordinal,Ordinal-Sequence) = union sup $2; assume A1: B <> {} & B is limit_ordinal; deffunc C(Ordinal,Ordinal) = $2+^A; deffunc F(Ordinal) = $1*^A; let fi such that A2: dom fi = B and A3: for C st C in B holds fi.C = F(C); A4: for B,C holds C = F(B) iff ex fi st C = last fi & dom fi = succ B & fi. {} = {} & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by Def15; thus F(B) = D(B,fi) from OSResultL(A4,A1,A2,A3); end; theorem Th38: A*^{} = {} proof defpred P[Ordinal] means $1*^{} = {}; A1: for A st P[A] holds P[succ A] proof let A; assume A*^{} = {}; hence (succ A)*^{} = {}+^{} by Th36 .= {} by Th27; end; A2: for A st A <> {} & A is limit_ordinal & for B st B in A holds P[B] holds P[A] proof deffunc F(Ordinal) = $1*^{}; let A; assume that A3: A <> {} and A4: A is limit_ordinal and A5: for B st B in A holds B*^{} = {}; consider fi such that A6: dom fi = A & for B st B in A holds fi.B = F(B) from OSLambda; rng fi = succ {} proof thus x in rng fi implies x in succ {} proof assume x in rng fi; then consider y such that A7: y in dom fi and A8: x = fi.y by FUNCT_1:def 3; reconsider y as Ordinal by A7; x = y*^{} by A6,A7,A8 .= {} by A5,A6,A7; hence thesis by TARSKI:def 1; end; let x; assume x in succ {}; then A9: x = {} by TARSKI:def 1; {} c= A; then A10: {} c< A by A3,XBOOLE_0:def 8; then A11: {} in A by ORDINAL1:11; {} *^ {} = {} by Th35; then fi.x = x by A6,A10,A9,ORDINAL1:11; hence thesis by A6,A11,A9,FUNCT_1:def 3; end; then A12: sup rng fi = succ {} by Th18; A*^{} = union sup fi by A3,A4,A6,Th37 .= union sup rng fi; hence thesis by A12,Th2; end; A13: P[{}] by Th35; for A holds P[A] from OrdinalInd(A13,A1,A2); hence thesis; end; theorem Th39: 1*^A = A & A*^1 = A proof defpred P[Ordinal] means $1*^succ {} = $1; thus 1*^A = {}*^A +^ A by Lm1,Th36 .= {} +^ A by Th35 .= A by Th30; A1: for A st for B st B in A holds P[B] holds P[A] proof let A such that A2: for B st B in A holds B*^(succ {}) = B; A3: now deffunc F(Ordinal) = $1*^succ {}; assume that A4: A <> {} and A5: for B holds A <> succ B; consider fi such that A6: dom fi = A & for D st D in A holds fi.D = F(D) from OSLambda; A7: A = rng fi proof thus A c= rng fi proof let x; assume A8: x in A; then reconsider B = x as Ordinal; x = B*^succ {} by A2,A8 .= fi.x by A6,A8; hence thesis by A6,A8,FUNCT_1:def 3; end; let x; assume x in rng fi; then consider y such that A9: y in dom fi and A10: x = fi.y by FUNCT_1:def 3; reconsider y as Ordinal by A9; fi.y = y*^succ {} by A6,A9 .= y by A2,A6,A9; hence thesis by A6,A9,A10; end; A11: A is limit_ordinal by A5,ORDINAL1:29; then A*^succ {} = union sup fi by A4,A6,Th37 .= union sup rng fi; hence A*^succ {} = union A by A7,Th18 .= A by A11,ORDINAL1:def 6; end; now given B such that A12: A = succ B; thus A*^(succ {}) = B*^(succ {}) +^ succ {} by A12,Th36 .= B +^ succ {} by A2,A12,ORDINAL1:6 .= succ(B +^ {}) by Th28 .= A by A12,Th27; end; hence thesis by A3,Th35; end; for A holds P[A] from ORDINAL1:sch 2(A1); hence thesis; end; theorem Th40: C <> {} & A in B implies A*^C in B*^C proof A1: {} c= C; defpred P[Ordinal] means A in $1 implies A*^C in $1*^C; assume C <> {}; then A2: {} c< C by A1,XBOOLE_0:def 8; then A3: {} in C by ORDINAL1:11; A4: for B st for D st D in B holds P[D] holds P[B] proof let B such that A5: for D st D in B holds A in D implies A *^ C in D *^ C and A6: A in B; A7: now given D such that A8: B = succ D; A9: now assume A in D; then A10: A*^C in D*^C by A5,A8,ORDINAL1:6; A11: D*^C +^ {} in D*^C +^ C by A2,Th32,ORDINAL1:11; D*^C +^ C = (succ D)*^C & D*^C +^ {} = D*^C by Th27,Th36; hence thesis by A8,A10,A11,ORDINAL1:10; end; now A12: A*^C +^ {} = A*^C by Th27; assume A13: not A in D; A c< D iff A c= D & A <> D by XBOOLE_0:def 8; then A*^C +^ {} in D*^C +^ C by A3,A6,A8,A13,Th32,ORDINAL1:11,22; hence thesis by A8,A12,Th36; end; hence thesis by A9; end; now A14: A*^C +^ {} = A*^C & A*^C +^ {} in A*^C +^ C by A2,Th27,Th32,ORDINAL1:11; A15: (succ A)*^C = A*^C +^ C by Th36; deffunc F(Ordinal) = $1*^C; consider fi such that A16: dom fi = B & for D st D in B holds fi.D = F(D) from OSLambda; assume for D holds B <> succ D; then A17: B is limit_ordinal by ORDINAL1:29; then A18: succ A in B by A6,ORDINAL1:28; then fi.(succ A) = (succ A)*^C by A16; then (succ A)*^C in rng fi by A16,A18,FUNCT_1:def 3; then A19: (succ A)*^C c= union sup rng fi by Th19,ZFMISC_1:74; B*^C = union sup fi by A6,A17,A16,Th37 .= union sup rng fi; hence thesis by A19,A14,A15; end; hence thesis by A7; end; for B holds P[B] from ORDINAL1:sch 2(A4); hence thesis; end; theorem A c= B implies A*^C c= B*^C proof assume A1: A c= B; A2: now assume A3: C <> {}; now assume A <> B; then A c< B by A1,XBOOLE_0:def 8; then A*^C in B*^C by A3,Th40,ORDINAL1:11; hence thesis by ORDINAL1:def 2; end; hence thesis; end; now assume C = {}; then A*^C = {} by Th38; hence thesis; end; hence thesis by A2; end; theorem A c= B implies C*^A c= C*^B proof assume A1: A c= B; now defpred P[Ordinal] means $1*^A c= $1*^B; assume A2: B <> {}; A3: for C st for D st D in C holds P[D] holds P[C] proof let C such that A4: for D st D in C holds D*^A c= D*^B; A5: now given D such that A6: C = succ D; D*^A c= D*^B by A4,A6,ORDINAL1:6; then A7: D*^A +^ A c= D*^B +^ A by Th34; A8: C*^A = D*^A +^ A & C*^B = D*^B +^ B by A6,Th36; D*^B +^ A c= D*^B +^ B by A1,Th33; hence thesis by A7,A8,XBOOLE_1:1; end; A9: now deffunc F(Ordinal) = $1*^A; assume that A10: C <> {} and A11: for D holds C <> succ D; consider fi such that A12: dom fi = C & for D st D in C holds fi.D = F(D) from OSLambda; now let D; assume D in rng fi; then consider x such that A13: x in dom fi and A14: D = fi.x by FUNCT_1:def 3; reconsider x as Ordinal by A13; A15: x*^B in C*^B by A2,A12,A13,Th40; D = x*^A & x*^A c= x*^B by A4,A12,A13,A14; hence D in C*^B by A15,ORDINAL1:12; end; then A16: sup rng fi c= C*^B by Th20; C is limit_ordinal by A11,ORDINAL1:29; then A17: C*^A = union sup fi by A10,A12,Th37 .= union sup rng fi; union sup rng fi c= sup rng fi by Th5; hence thesis by A17,A16,XBOOLE_1:1; end; now assume C = {}; then C*^A = {} by Th35; hence thesis; end; hence thesis by A5,A9; end; for C holds P[C] from ORDINAL1:sch 2(A3); hence thesis; end; hence thesis by A1; end; theorem Th43: exp(A,{}) = 1 proof deffunc D(Ordinal,Ordinal-Sequence) = lim $2; deffunc F(Ordinal) = exp(A,$1); deffunc C(Ordinal,Ordinal) = A*^$2; A1: for B,C holds C = F(B) iff ex fi st C = last fi & dom fi = succ B & fi. {} = 1 & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by Def16; thus F({}) = 1 from OSResult0(A1); end; theorem Th44: exp(A,succ B) = A*^exp(A,B) proof deffunc D(Ordinal,Ordinal-Sequence) = lim $2; deffunc F(Ordinal) = exp(A,$1); deffunc C(Ordinal,Ordinal) = A *^ $2; A1: for B,C holds C = F(B) iff ex fi st C = last fi & dom fi = succ B & fi. {} = 1 & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by Def16; for B holds F(succ B) = C(B,F(B)) from OSResultS(A1); hence thesis; end; theorem Th45: B <> {} & B is limit_ordinal implies for fi st dom fi = B & for C st C in B holds fi.C = exp(A,C) holds exp(A,B) = lim fi proof deffunc D(Ordinal,Ordinal-Sequence) = lim $2; assume A1: B <> {} & B is limit_ordinal; deffunc C(Ordinal,Ordinal) = A*^$2; deffunc F(Ordinal) = exp(A,$1); let fi such that A2: dom fi = B and A3: for C st C in B holds fi.C = F(C); A4: for B,C holds C = F(B) iff ex fi st C = last fi & dom fi = succ B & fi. {} = 1 & (for C st succ C in succ B holds fi.succ C = C(C,fi.C)) & for C st C in succ B & C <> {} & C is limit_ordinal holds fi.C = D(C,fi|C) by Def16; thus F(B) = D(B,fi) from OSResultL(A4,A1,A2,A3); end; theorem exp(A,1) = A & exp(1,A) = 1 proof defpred P[Ordinal] means exp(1,$1) = 1; A1: for A st P[A] holds P[succ A] proof let A; assume exp(1,A) = 1; hence exp(1,succ A) = 1*^1 by Th44 .= 1 by Th39; end; thus exp(A,1) = A*^exp(A,{}) by Lm1,Th44 .= A*^1 by Th43 .= A by Th39; A2: for A st A <> {} & A is limit_ordinal & for B st B in A holds P[B] holds P[A] proof deffunc F(Ordinal) = exp(1,$1); let A such that A3: A <> {} and A4: A is limit_ordinal and A5: for B st B in A holds exp(1,B) = 1; consider fi such that A6: dom fi = A & for B st B in A holds fi.B = F(B) from OSLambda; A7: rng fi c= { 1 } proof let x; assume x in rng fi; then consider y such that A8: y in dom fi and A9: x = fi.y by FUNCT_1:def 3; reconsider y as Ordinal by A8; x = exp(1,y) by A6,A8,A9 .= 1 by A5,A6,A8; hence thesis by TARSKI:def 1; end; now set x = the Element of A; thus {} <> 1; let B,C such that A10: B in 1 & 1 in C; reconsider x as Ordinal; take D = x; thus D in dom fi by A3,A6; let E be Ordinal; assume that D c= E and A11: E in dom fi; fi.E in rng fi by A11,FUNCT_1:def 3; hence B in fi.E & fi.E in C by A7,A10,TARSKI:def 1; end; then A12: 1 is_limes_of fi by Def9; exp(1,A) = lim fi by A3,A4,A6,Th45; hence thesis by A12,Def10; end; A13: P[{}] by Th43; for A holds P[A] from OrdinalInd(A13,A1,A2); hence thesis; end; theorem for A ex B,C st B is limit_ordinal & C is natural & A = B +^ C proof defpred Th[Ordinal] means ex B,C st B is limit_ordinal & C is natural & $1 = B +^ C; A1: for A st for B st B in A holds Th[B] holds Th[A] proof let A such that A2: for B st B in A holds Th[B]; A3: (ex B st A = succ B) implies Th[A] proof given B such that A4: A = succ B; consider C,D such that A5: C is limit_ordinal and A6: D is natural and A7: B = C +^ D by A2,A4,ORDINAL1:6; take C, E = succ D; thus C is limit_ordinal by A5; thus E in omega by A6,ORDINAL1:def 12; thus thesis by A4,A7,Th28; end; (for B holds A <> succ B) implies Th[A] proof assume A8: for D holds A <> succ D; take B = A, C = {}; thus B is limit_ordinal by A8,ORDINAL1:29; thus C in omega by ORDINAL1:def 11; thus thesis by Th27; end; hence thesis by A3; end; thus for A holds Th[A] from ORDINAL1:sch 2(A1); end; registration let X be set, o be Ordinal; cluster X --> o -> Ordinal-yielding; coherence proof rng(X --> o) c= {o} & {o} c= succ o by FUNCOP_1:13,XBOOLE_1:7; then rng(X --> o) c= succ o by XBOOLE_1:1; hence thesis by Def4; end; end; registration let O be Ordinal, x be set; cluster O --> x -> T-Sequence-like; coherence proof dom(O --> x) = O by FUNCOP_1:13; hence thesis by ORDINAL1:def 7; end; end; definition let A,B be Ordinal; pred A is_cofinal_with B means ex xi being Ordinal-Sequence st dom xi = B & rng xi c= A & xi is increasing & A = sup xi; reflexivity proof let A; A1: dom id A = A by RELAT_1:45; then reconsider xi = id A as T-Sequence by ORDINAL1:def 7; A2: rng id A = A by RELAT_1:45; then reconsider xi as Ordinal-Sequence by Def4; take xi; thus dom xi = A & rng xi c= A by RELAT_1:45; thus xi is increasing proof let B,C; assume that A3: B in C and A4: C in dom xi; xi.C = C by A1,A4,FUNCT_1:18; hence thesis by A1,A3,A4,FUNCT_1:18,ORDINAL1:10; end; thus thesis by A2,Th18; end; end; reserve e,u for set; theorem Th48: e in rng psi implies e is Ordinal proof assume e in rng psi; then ex u st u in dom psi & e = psi.u by FUNCT_1:def 3; hence thesis; end; theorem rng psi c= sup psi proof let e; assume A1: e in rng psi; then e is Ordinal by Th48; hence thesis by A1,Th19; end; theorem A is_cofinal_with {} implies A = {} proof given psi such that A1: dom psi = {} and rng psi c= A and psi is increasing and A2: A = sup psi; thus A = sup {} by A1,A2,RELAT_1:42 .= {} by Th18; end; scheme OmegaInd {a()-> Nat, P[set]}: P[a()] provided A1: P[{}] and A2: for a being Nat st P[a] holds P[succ a] proof defpred P[Ordinal] means $1 is natural implies P[$1]; A3: now let A; assume A4: P[A]; now assume succ A is natural; then A5: succ A in omega by ORDINAL1:def 12; A in succ A by ORDINAL1:6; then A is Element of omega by A5,ORDINAL1:10; hence P[succ A] by A2,A4; end; hence P[succ A]; end; A6: now let A; assume A7: A <> {}; {} c= A; then {} c< A by A7,XBOOLE_0:def 8; then A8: {} in A by ORDINAL1:11; A9: not A in A; assume A is limit_ordinal; then omega c= A by A8,ORDINAL1:def 11; then not A in omega by A9; hence (for B st B in A holds P[B]) implies P[A] by ORDINAL1:def 12; end; A10: P[{}] by A1; for A holds P[A] from OrdinalInd(A10,A3,A6); hence thesis; end; registration let a, b be Nat; cluster a +^ b -> natural; coherence proof defpred P[Nat] means a+^$1 is natural; A1: now let b be Nat; assume P[b]; then reconsider c = a+^b as Nat; a+^succ b = succ c by Th28; hence P[succ b]; end; A2: P[{}] by Th27; thus P[b] from OmegaInd(A2,A1); end; end; registration let x,y be set, a,b be Nat; cluster IFEQ(x,y,a,b) -> natural; coherence proof per cases; suppose x = y; hence thesis by FUNCOP_1:def 8; end; suppose x <> y; hence thesis by FUNCOP_1:def 8; end; end; end; scheme LambdaRecEx{A() -> set,G(set,set) -> set}: ex f being Function st dom f = omega & f.{} = A() & for n being Nat holds f.succ n = G(n,f.n) proof deffunc D(set,set) = {}; consider L being T-Sequence such that A1: dom L = omega and A2: {} in omega implies L.{} = A() and A3: for A being Ordinal st succ A in omega holds L.(succ A) = G(A,L.A) and for A being Ordinal st A in omega & A <> {} & A is limit_ordinal holds L.A = D(A,L|A) from TSExist1; take L; thus dom L = omega by A1; {} in omega by ORDINAL1:def 12; hence L.{} = A() by A2; let n be Nat; succ n in omega by ORDINAL1:def 12; hence thesis by A3; end; reserve n for Nat; scheme RecUn{A() -> set, F, G() -> Function, P[set,set,set]}: F() = G() provided A1: dom F() = omega and A2: F().{} = A() and A3: for n holds P[n,F().n,F().(succ n)] and A4: dom G() = omega and A5: G().{} = A() and A6: for n holds P[n,G().n,G().(succ n)] and A7: for n for x,y1,y2 being set st P[n,x,y1] & P[n,x,y2] holds y1 = y2 proof defpred P[Nat] means F().$1 = G().$1; A8: for n st P[n] holds P[succ n] proof let n; assume F().n = G().n; then A9: P[n,F().n,G().(succ n)] by A6; P[n,F().n,F().(succ n)] by A3; hence thesis by A7,A9; end; A10: P[{}] by A2,A5; for n holds P[n] proof let n; thus thesis from OmegaInd(A10,A8); end; then for x st x in omega holds F().x = G().x; hence thesis by A1,A4,FUNCT_1:2; end; scheme LambdaRecUn{A() -> set, F(set,set) -> set, F, G() -> Function}: F() = G() provided A1: dom F() = omega and A2: F().{} = A() and A3: for n holds F().(succ n) = F(n,F().n) and A4: dom G() = omega and A5: G().{} = A() and A6: for n holds G().(succ n) = F(n,G().n) proof defpred P[Nat,set,set] means $3=F($1,$2); A7: for n holds P[n,G().n,G().(succ n)] by A6; A8: for n being Nat,x,y1,y2 being set st P[n,x,y1] & P[n,x,y2] holds y1=y2; A9: for n holds P[n,F().n,F().(succ n)] by A3; thus F() = G() from RecUn(A1,A2,A9,A4,A5,A7,A8); end; begin reserve fi,psi for Ordinal-Sequence, A,B,C,D for Ordinal, X,Y for set, x,y for set; theorem X c= succ X by XBOOLE_1:7; theorem succ X c= Y implies X c= Y proof X c= succ X by XBOOLE_1:7; hence thesis by XBOOLE_1:1; end; theorem A in B iff succ A in succ B proof A in B iff succ A c= B by ORDINAL1:21; hence thesis by ORDINAL1:22; end; theorem X c= A implies union X is Ordinal proof assume X c= A; then for x st x in X holds x is Ordinal; hence thesis by ORDINAL1:23; end; theorem Th5: union On X is Ordinal proof x in On X implies x is Ordinal by ORDINAL1:def 9; hence thesis by ORDINAL1:23; end; theorem Th6: X c= A implies On X = X proof defpred P[set] means $1 in X & $1 is Ordinal; assume X c= A; then A1: x in X iff P[x]; A2: x in On X iff P[x] by ORDINAL1:def 9; thus thesis from XBOOLE_0:sch 2(A2,A1); end; theorem Th7: On {A} = {A} proof {A} c= succ A by XBOOLE_1:7; hence thesis by Th6; end; theorem Th8: A <> {} implies {} in A proof A1: {} c= A by XBOOLE_1:2; assume A <> {}; then {} c< A by A1,XBOOLE_0:def 8; hence thesis by ORDINAL1:11; end; theorem inf A = {} proof A1: inf A = meet A by ORDINAL2:8; then A <> {} implies thesis by Th8,SETFAM_1:4; hence thesis by A1,SETFAM_1:def 1; end; theorem inf {A} = A proof thus inf {A} = meet {A} by Th7 .= A by SETFAM_1:10; end; theorem X c= A implies meet X is Ordinal proof assume X c= A; then inf X = meet X by Th6; hence thesis; end; registration let A,B; cluster A \/ B -> ordinal; coherence proof A c= B or B c= A; hence thesis by XBOOLE_1:12; end; cluster A /\ B -> ordinal; coherence proof A c= B or B c= A; hence thesis by XBOOLE_1:28; end; end; theorem A \/ B = A or A \/ B = B proof A c= B or B c= A; hence thesis by XBOOLE_1:12; end; theorem A /\ B = A or A /\ B = B proof A c= B or B c= A; hence thesis by XBOOLE_1:28; end; Lm1: 1 = succ {}; theorem Th14: A in 1 implies A = {} proof assume A in 1; hence A c= {} & {} c= A by Lm1,ORDINAL1:22,XBOOLE_1:2; end; theorem 1 = {{}} by Lm1; theorem Th16: A c= 1 implies A = {} or A = 1 proof assume that A1: A c= 1 and A2: A <> {} and A3: A <> 1; A c< 1 by A1,A3,XBOOLE_0:def 8; hence contradiction by A2,Th14,ORDINAL1:11; end; theorem (A c= B or A in B) & C in D implies A+^C in B+^D proof assume that A1: A c= B or A in B and A2: C in D; A3: B+^C in B+^D by A2,ORDINAL2:32; A c= B by A1,ORDINAL1:def 2; hence thesis by A3,ORDINAL1:12,ORDINAL2:34; end; theorem A c= B & C c= D implies A+^C c= B+^D proof assume that A1: A c= B and A2: C c= D; A3: B+^C c= B+^D by A2,ORDINAL2:33; A+^C c= B+^C by A1,ORDINAL2:34; hence thesis by A3,XBOOLE_1:1; end; theorem Th19: A in B & (C c= D & D <> {} or C in D) implies A*^C in B*^D proof assume that A1: A in B and A2: C c= D & D <> {} or C in D; A3: C c= D by A2,ORDINAL1:def 2; A*^D in B*^D by A1,A2,ORDINAL2:40; hence thesis by A3,ORDINAL1:12,ORDINAL2:42; end; theorem A c= B & C c= D implies A*^C c= B*^D proof assume that A1: A c= B and A2: C c= D; A3: B*^C c= B*^D by A2,ORDINAL2:42; A*^C c= B*^C by A1,ORDINAL2:41; hence thesis by A3,XBOOLE_1:1; end; theorem Th21: B+^C = B+^D implies C = D proof assume that A1: B+^C = B+^D and A2: C <> D; C in D or D in C by A2,ORDINAL1:14; then B+^C in B+^C by A1,ORDINAL2:32; hence contradiction; end; theorem Th22: B+^C in B+^D implies C in D proof assume that A1: B+^C in B+^D and A2: not C in D; D c= C by A2,ORDINAL1:16; hence contradiction by A1,ORDINAL1:5,ORDINAL2:33; end; theorem Th23: B+^C c= B+^D implies C c= D proof assume A1: B+^C c= B+^D; B+^C c= B+^D & B+^C <> B+^D iff B+^C c< B+^D by XBOOLE_0:def 8; then C = D or C in D by A1,Th21,Th22,ORDINAL1:11; hence thesis by ORDINAL1:def 2; end; theorem Th24: A c= A+^B & B c= A+^B proof A1: {}+^B c= A+^B by ORDINAL2:34,XBOOLE_1:2; A+^{} c= A+^B by ORDINAL2:33,XBOOLE_1:2; hence thesis by A1,ORDINAL2:27,30; end; theorem A in B implies A in B+^C & A in C+^B proof assume A1: A in B; A2: B c= C+^B by Th24; B c= B+^C by Th24; hence thesis by A1,A2; end; theorem Th26: A+^B = {} implies A = {} & B = {} proof assume A1: A+^B = {}; then A2: B c= {} by Th24; A c= {} by A1,Th24; hence thesis by A2,XBOOLE_1:3; end; theorem Th27: A c= B implies ex C st B = A+^C proof defpred P[Ordinal] means A c= $1 implies ex C st $1 = A+^C; A1: for B st P[B] holds P[succ B] proof let B such that A2: A c= B implies ex C st B = A+^C and A3: A c= succ B; A4: now assume A <> succ B; then A c< succ B by A3,XBOOLE_0:def 8; then A in succ B by ORDINAL1:11; then consider C such that A5: B = A+^C by A2,ORDINAL1:22; succ B = A+^succ C by A5,ORDINAL2:28; hence thesis; end; A = succ B implies succ B = A+^{} by ORDINAL2:27; hence thesis by A4; end; A6: for B st B <> {} & B is limit_ordinal & for C st C in B holds P[C] holds P[B] proof deffunc F(Ordinal) = A +^ $1; let B such that B <> {} and A7: B is limit_ordinal and for C st C in B holds A c= C implies ex D st C = A+^D and A8: A c= B; defpred P[Ordinal] means B c= A+^$1; A9: B = {}+^B by ORDINAL2:30; {}+^B c= A+^B by ORDINAL2:34,XBOOLE_1:2; then A10: ex C st P[C] by A9; consider C such that A11: P[C] & for D st P[D] holds C c= D from ORDINAL1:sch 1(A10); consider L being Ordinal-Sequence such that A12: dom L = C & for D st D in C holds L.D = F(D) from ORDINAL2:sch 3; A13: now for D st D in rng L holds D in B proof let D; assume D in rng L; then consider y such that A14: y in dom L and A15: D = L.y by FUNCT_1:def 3; reconsider y as Ordinal by A14; A16: not C c= y by A12,A14,ORDINAL1:5; L.y = A+^y by A12,A14; hence thesis by A11,A15,A16,ORDINAL1:16; end; then A17: sup rng L c= B by ORDINAL2:20; A18: C is limit_ordinal proof assume not thesis; then consider D such that A19: C = succ D by ORDINAL1:29; not C c= D by A19,ORDINAL1:5,6; then A+^D in B by A11,ORDINAL1:16; then A20: succ(A+^D) c= B by ORDINAL1:21; succ(A+^D) = A+^succ D by ORDINAL2:28; then B = succ(A+^D) by A11,A19,A20,XBOOLE_0:def 10; hence contradiction by A7,ORDINAL1:29; end; assume C <> {}; then A+^C = sup L by A12,A18,ORDINAL2:29 .= sup rng L; then B = A+^C by A11,A17,XBOOLE_0:def 10; hence thesis; end; now assume C = {}; then A+^C = A by ORDINAL2:27; hence B = A by A8,A11,XBOOLE_0:def 10 .= A+^{} by ORDINAL2:27; end; hence thesis by A13; end; A21: P[{}] proof assume A c= {}; then A = {} by XBOOLE_1:3; then {} = A+^{} by ORDINAL2:30; hence thesis; end; for B holds P[B] from ORDINAL2:sch 1(A21,A1,A6); hence thesis; end; theorem Th28: A in B implies ex C st B = A+^C & C <> {} proof assume A1: A in B; then A c= B by ORDINAL1:def 2; then consider C such that A2: B = A+^C by Th27; take C; thus B = A+^C by A2; assume C = {}; then B = A by A2,ORDINAL2:27; hence contradiction by A1; end; theorem Th29: A <> {} & A is limit_ordinal implies B+^A is limit_ordinal proof assume that A1: A <> {} and A2: A is limit_ordinal; {} c= A by XBOOLE_1:2; then A3: {} c< A by A1,XBOOLE_0:def 8; deffunc F(Ordinal) = B +^ $1; consider L being Ordinal-Sequence such that A4: dom L = A & for C st C in A holds L.C = F(C) from ORDINAL2:sch 3; A5: B+^A = sup L by A1,A2,A4,ORDINAL2:29 .= sup rng L; for C st C in B+^A holds succ C in B+^A proof let C such that A6: C in B+^A; A7: now assume not C in B; then consider D such that A8: C = B+^D by Th27,ORDINAL1:16; now assume not D in A; then B+^A c= B+^D by ORDINAL1:16,ORDINAL2:33; then C in C by A6,A8; hence contradiction; end; then A9: succ D in A by A2,ORDINAL1:28; then L.(succ D) = B+^succ D by A4 .= succ(B+^D) by ORDINAL2:28; then succ C in rng L by A4,A8,A9,FUNCT_1:def 3; hence thesis by A5,ORDINAL2:19; end; now assume C in B; then A10: succ C c= B by ORDINAL1:21; A11: (succ C)+^{} = succ C by ORDINAL2:27; B+^{} in B+^A by A3,ORDINAL1:11,ORDINAL2:32; hence thesis by A10,A11,ORDINAL1:12,ORDINAL2:34; end; hence thesis by A7; end; hence thesis by ORDINAL1:28; end; theorem Th30: A+^B+^C = A+^(B+^C) proof defpred Sigma[Ordinal] means A+^B+^$1 = A+^(B+^$1); A1: for C st Sigma[C] holds Sigma[succ C] proof let C such that A2: A+^B+^C = A+^(B+^C); thus A+^B+^succ C = succ(A+^B+^C) by ORDINAL2:28 .= A+^succ(B+^C) by A2,ORDINAL2:28 .= A+^(B+^succ C) by ORDINAL2:28; end; A3: for C st C <> {} & C is limit_ordinal & for D st D in C holds Sigma[D] holds Sigma[C] proof deffunc F(Ordinal) = A +^ B +^ $1; let C such that A4: C <> {} and A5: C is limit_ordinal and A6: for D st D in C holds Sigma[D]; consider L being Ordinal-Sequence such that A7: dom L = C & for D st D in C holds L.D = F(D) from ORDINAL2:sch 3; deffunc F(Ordinal) = A +^ $1; consider L1 being Ordinal-Sequence such that A8: dom L1 = B+^C & for D st D in B+^C holds L1.D = F(D) from ORDINAL2:sch 3; A9: rng L c= rng L1 proof let x; assume x in rng L; then consider y such that A10: y in dom L and A11: x = L.y by FUNCT_1:def 3; reconsider y as Ordinal by A10; A12: B+^y in B+^C by A7,A10,ORDINAL2:32; L.y = A+^B+^y by A7,A10; then A13: L.y = A+^(B+^y) by A6,A7,A10; L1.(B+^y) = A+^(B+^y) by A7,A8,A10,ORDINAL2:32; hence thesis by A8,A11,A13,A12,FUNCT_1:def 3; end; A14: B+^C <> {} by A4,Th26; B+^C is limit_ordinal by A4,A5,Th29; then A15: A+^(B+^C) = sup L1 by A8,A14,ORDINAL2:29 .= sup rng L1; A+^B+^C = sup L by A4,A5,A7,ORDINAL2:29 .= sup rng L; hence A+^B+^C c= A+^(B+^C) by A15,A9,ORDINAL2:22; let x; assume A16: x in A+^(B+^C); then reconsider x9 = x as Ordinal; A17: now A18: A c= A+^B by Th24; assume A19: not x in A+^B; then A+^B c= x9 by ORDINAL1:16; then consider E being Ordinal such that A20: x9 = A+^E by A18,Th27,XBOOLE_1:1; B c= E by A19,A20,ORDINAL1:16,ORDINAL2:32; then consider F being Ordinal such that A21: E = B+^F by Th27; A22: now assume not F in C; then B+^C c= B+^F by ORDINAL1:16,ORDINAL2:33; then A+^(B+^C) c= A+^(B+^F) by ORDINAL2:33; then x9 in x9 by A16,A20,A21; hence contradiction; end; then x = A+^B+^F by A6,A20,A21; hence thesis by A22,ORDINAL2:32; end; A23: A+^B+^{} = A+^B by ORDINAL2:27; A+^B+^{} c= A+^B+^C by ORDINAL2:33,XBOOLE_1:2; hence thesis by A23,A17; end; A+^B+^{} = A+^B by ORDINAL2:27 .= A+^(B+^{}) by ORDINAL2:27; then A24: Sigma[{}]; for C holds Sigma[C] from ORDINAL2:sch 1(A24,A1,A3); hence thesis; end; theorem A*^B = {} implies A = {} or B = {} proof assume that A1: A*^B = {} and A2: A <> {} and A3: B <> {}; {} c= A by XBOOLE_1:2; then {} c< A by A2,XBOOLE_0:def 8; hence contradiction by A1,A3,ORDINAL1:11,ORDINAL2:40; end; theorem A in B & C <> {} implies A in B*^C & A in C*^B proof assume that A1: A in B and A2: C <> {}; {} c= C by XBOOLE_1:2; then {} c< C by A2,XBOOLE_0:def 8; then {} in C by ORDINAL1:11; then A3: 1 c= C by Lm1,ORDINAL1:21; then A4: 1*^B c= C*^B by ORDINAL2:41; A5: 1*^B = B by ORDINAL2:39; A6: B*^1 = B by ORDINAL2:39; B*^1 c= B*^C by A3,ORDINAL2:42; hence thesis by A1,A4,A6,A5; end; theorem Th33: B*^A = C*^A & A <> {} implies B = C proof assume that A1: B*^A = C*^A and A2: A <> {} and A3: B <> C; B in C or C in B by A3,ORDINAL1:14; then B*^A in B*^A by A1,A2,ORDINAL2:40; hence contradiction; end; theorem Th34: B*^A in C*^A implies B in C proof assume that A1: B*^A in C*^A and A2: not B in C; C c= B by A2,ORDINAL1:16; hence contradiction by A1,ORDINAL1:5,ORDINAL2:41; end; theorem Th35: B*^A c= C*^A & A <> {} implies B c= C proof assume A1: B*^A c= C*^A; B*^A c= C*^A & B*^A <> C*^A iff B*^A c< C*^A by XBOOLE_0:def 8; then (A <> {} implies B = C) or B in C by A1,Th33,Th34,ORDINAL1:11; hence thesis by ORDINAL1:def 2; end; theorem Th36: B <> {} implies A c= A*^B & A c= B*^A proof assume B <> {}; then {} in B by Th8; then A1: 1 c= B by Lm1,ORDINAL1:21; then A2: A*^1 c= A*^B by ORDINAL2:42; 1*^A c= B*^A by A1,ORDINAL2:41; hence thesis by A2,ORDINAL2:39; end; theorem A*^B = 1 implies A = 1 & B = 1 proof assume A1: A*^B = 1; then A2: B <> {} by ORDINAL2:38; {} c= B by XBOOLE_1:2; then {} c< B by A2,XBOOLE_0:def 8; then {} in B by ORDINAL1:11; then A3: 1 c= B by Lm1,ORDINAL1:21; A4: now A5: B = 1*^B by ORDINAL2:39; assume 1 in A; hence contradiction by A1,A2,A3,A5,ORDINAL1:5,ORDINAL2:40; end; now assume A in 1; then A c= {} by Lm1,ORDINAL1:22; then A = {} by XBOOLE_1:3; hence contradiction by A1,ORDINAL2:35; end; hence A = 1 by A4,ORDINAL1:14; hence thesis by A1,ORDINAL2:39; end; theorem Th38: A in B+^C implies A in B or ex D st D in C & A = B+^D proof assume that A1: A in B+^C and A2: not A in B; consider D such that A3: A = B+^D by A2,Th27,ORDINAL1:16; take D; assume not thesis; then C c= D by A3,ORDINAL1:16; hence contradiction by A1,A3,ORDINAL1:5,ORDINAL2:33; end; definition let C,fi; func C+^fi -> Ordinal-Sequence means : Def1: dom it = dom fi & for A st A in dom fi holds it.A = C+^(fi.A); existence proof deffunc F(Ordinal) = C+^(fi.$1); thus ex F being Ordinal-Sequence st dom F = dom fi & for A st A in dom fi holds F.A = F(A) from ORDINAL2:sch 3; end; uniqueness proof let f1,f2 be Ordinal-Sequence such that A1: dom f1 = dom fi and A2: for A st A in dom fi holds f1.A = C+^(fi.A) and A3: dom f2 = dom fi and A4: for A st A in dom fi holds f2.A = C+^(fi.A); now let x; assume A5: x in dom fi; then reconsider A = x as Ordinal; thus f1.x = C+^(fi.A) by A2,A5 .= f2.x by A4,A5; end; hence thesis by A1,A3,FUNCT_1:2; end; func fi+^C -> Ordinal-Sequence means dom it = dom fi & for A st A in dom fi holds it.A = (fi.A)+^C; existence proof deffunc F(Ordinal) = (fi.$1)+^C; thus ex F being Ordinal-Sequence st dom F = dom fi & for A st A in dom fi holds F.A = F(A) from ORDINAL2:sch 3; end; uniqueness proof let f1,f2 be Ordinal-Sequence such that A6: dom f1 = dom fi and A7: for A st A in dom fi holds f1.A = (fi.A)+^C and A8: dom f2 = dom fi and A9: for A st A in dom fi holds f2.A = (fi.A)+^C; now let x; assume A10: x in dom fi; then reconsider A = x as Ordinal; thus f1.x = (fi.A)+^C by A7,A10 .= f2.x by A9,A10; end; hence thesis by A6,A8,FUNCT_1:2; end; func C*^fi -> Ordinal-Sequence means dom it = dom fi & for A st A in dom fi holds it.A = C*^(fi.A); existence proof deffunc F(Ordinal) = C*^(fi.$1); thus ex F being Ordinal-Sequence st dom F = dom fi & for A st A in dom fi holds F.A = F(A) from ORDINAL2:sch 3; end; uniqueness proof let f1,f2 be Ordinal-Sequence such that A11: dom f1 = dom fi and A12: for A st A in dom fi holds f1.A = C*^(fi.A) and A13: dom f2 = dom fi and A14: for A st A in dom fi holds f2.A = C*^(fi.A); now let x; assume A15: x in dom fi; then reconsider A = x as Ordinal; thus f1.x = C*^(fi.A) by A12,A15 .= f2.x by A14,A15; end; hence thesis by A11,A13,FUNCT_1:2; end; func fi*^C -> Ordinal-Sequence means : Def4: dom it = dom fi & for A st A in dom fi holds it.A = (fi.A)*^C; existence proof deffunc F(Ordinal) = (fi.$1)*^C; thus ex F being Ordinal-Sequence st dom F = dom fi & for A st A in dom fi holds F.A = F(A) from ORDINAL2:sch 3; end; uniqueness proof let f1,f2 be Ordinal-Sequence such that A16: dom f1 = dom fi and A17: for A st A in dom fi holds f1.A = (fi.A)*^C and A18: dom f2 = dom fi and A19: for A st A in dom fi holds f2.A = (fi.A)*^C; now let x; assume A20: x in dom fi; then reconsider A = x as Ordinal; thus f1.x = (fi.A)*^C by A17,A20 .= f2.x by A19,A20; end; hence thesis by A16,A18,FUNCT_1:2; end; end; theorem Th39: {} <> dom fi & dom fi = dom psi & (for A,B st A in dom fi & B = fi.A holds psi.A = C+^B) implies sup psi = C+^sup fi proof assume that A1: {} <> dom fi and A2: dom fi = dom psi and A3: for A,B st A in dom fi & B = fi.A holds psi.A = C+^B; set z = the Element of dom fi; reconsider z9 = fi.z as Ordinal; A4: C+^sup rng fi c= sup rng psi proof let x; assume A5: x in C+^sup rng fi; then reconsider A = x as Ordinal; A6: now given B such that A7: B in sup rng fi and A8: A = C+^B; consider D such that A9: D in rng fi and A10: B c= D by A7,ORDINAL2:21; consider x such that A11: x in dom fi and A12: D = fi.x by A9,FUNCT_1:def 3; reconsider x as Ordinal by A11; psi.x = C+^D by A3,A11,A12; then C+^D in rng psi by A2,A11,FUNCT_1:def 3; then C+^D in sup rng psi by ORDINAL2:19; hence A in sup rng psi by A8,A10,ORDINAL1:12,ORDINAL2:33; end; now C+^z9 = psi.z by A1,A3; then C+^z9 in rng psi by A1,A2,FUNCT_1:def 3; then A13: C+^z9 in sup rng psi by ORDINAL2:19; assume A14: A in C; C c= C+^z9 by Th24; then A c= C+^z9 by A14,ORDINAL1:def 2; hence A in sup rng psi by A13,ORDINAL1:12; end; hence thesis by A5,A6,Th38; end; sup rng psi c= C+^sup rng fi proof let x; assume A15: x in sup rng psi; then reconsider A = x as Ordinal; consider B such that A16: B in rng psi and A17: A c= B by A15,ORDINAL2:21; consider y such that A18: y in dom psi and A19: B = psi.y by A16,FUNCT_1:def 3; reconsider y as Ordinal by A18; reconsider y9 = fi.y as Ordinal; y9 in rng fi by A2,A18,FUNCT_1:def 3; then A20: y9 in sup rng fi by ORDINAL2:19; B = C+^y9 by A2,A3,A18,A19; then B in C+^sup rng fi by A20,ORDINAL2:32; hence thesis by A17,ORDINAL1:12; end; hence thesis by A4,XBOOLE_0:def 10; end; theorem Th40: A is limit_ordinal implies A*^B is limit_ordinal proof A1: now deffunc F(Ordinal) = $1 *^ B; assume that A2: A <> {} and A3: A is limit_ordinal; consider fi such that A4: dom fi = A & for C st C in A holds fi.C = F(C) from ORDINAL2:sch 3; A5: A*^B = union sup fi by A2,A3,A4,ORDINAL2:37 .= union sup rng fi; for C st C in A*^B holds succ C in A*^B proof let C; assume A6: C in A*^B; then consider X such that A7: C in X and A8: X in sup rng fi by A5,TARSKI:def 4; reconsider X as Ordinal by A8; consider D such that A9: D in rng fi and A10: X c= D by A8,ORDINAL2:21; consider x such that A11: x in dom fi and A12: D = fi.x by A9,FUNCT_1:def 3; succ C c= D by A7,A10,ORDINAL1:21; then A13: succ C in succ D by ORDINAL1:22; reconsider x as Ordinal by A11; A14: succ x in dom fi by A3,A4,A11,ORDINAL1:28; then fi.succ x = (succ x)*^B by A4 .= x*^B+^B by ORDINAL2:36; then x*^B+^B in rng fi by A14,FUNCT_1:def 3; then A15: x*^B+^B in sup rng fi by ORDINAL2:19; A16: x*^B+^succ {} = succ(x*^B+^{}) by ORDINAL2:28; B<>{} by A6,ORDINAL2:38; then {} in B by Th8; then A17: succ {} c= B by ORDINAL1:21; A18: x*^B+^{} = x*^B by ORDINAL2:27; x*^B = fi.x by A4,A11; then succ D in sup rng fi by A12,A17,A16,A18,A15,ORDINAL1:12,ORDINAL2:33; hence thesis by A5,A13,TARSKI:def 4; end; hence thesis by ORDINAL1:28; end; assume A is limit_ordinal; hence thesis by A1,ORDINAL2:35; end; theorem Th41: A in B*^C & B is limit_ordinal implies ex D st D in B & A in D*^ C proof assume that A1: A in B*^C and A2: B is limit_ordinal; deffunc F(Ordinal) = $1 *^ C; consider fi such that A3: dom fi = B & for D st D in B holds fi.D = F(D) from ORDINAL2:sch 3; B <> {} by A1,ORDINAL2:35; then B*^C = union sup fi by A2,A3,ORDINAL2:37 .= union sup rng fi; then consider X such that A4: A in X and A5: X in sup rng fi by A1,TARSKI:def 4; reconsider X as Ordinal by A5; consider D such that A6: D in rng fi and A7: X c= D by A5,ORDINAL2:21; consider x such that A8: x in dom fi and A9: D = fi.x by A6,FUNCT_1:def 3; reconsider x as Ordinal by A8; take E = succ x; thus E in B by A2,A3,A8,ORDINAL1:28; A10: D+^{} = D by ORDINAL2:27; A11: C <> {} by A1,ORDINAL2:38; E*^C = x*^C+^C by ORDINAL2:36 .= D+^C by A3,A8,A9; then D in E*^C by A11,A10,Th8,ORDINAL2:32; hence thesis by A4,A7,ORDINAL1:10; end; theorem Th42: dom fi = dom psi & C <> {} & sup fi is limit_ordinal & (for A,B st A in dom fi & B = fi.A holds psi.A = B*^C) implies sup psi = (sup fi)*^C proof assume that A1: dom fi = dom psi and A2: C <> {} and A3: sup fi is limit_ordinal and A4: for A,B st A in dom fi & B = fi.A holds psi.A = B*^C; A5: (sup rng fi)*^C c= sup rng psi proof let x; assume A6: x in (sup rng fi)*^C; then reconsider A = x as Ordinal; consider B such that A7: B in sup rng fi and A8: A in B*^C by A3,A6,Th41; consider D such that A9: D in rng fi and A10: B c= D by A7,ORDINAL2:21; consider y such that A11: y in dom fi and A12: D = fi.y by A9,FUNCT_1:def 3; reconsider y as Ordinal by A11; reconsider y9 = psi.y as Ordinal; A13: y9 in rng psi by A1,A11,FUNCT_1:def 3; y9 = D*^C by A4,A11,A12; then A14: D*^C in sup rng psi by A13,ORDINAL2:19; B*^C c= D*^C by A10,ORDINAL2:41; hence thesis by A8,A14,ORDINAL1:10; end; sup rng psi c= (sup rng fi)*^C proof let x; assume A15: x in sup rng psi; then reconsider A = x as Ordinal; consider B such that A16: B in rng psi and A17: A c= B by A15,ORDINAL2:21; consider y such that A18: y in dom psi and A19: B = psi.y by A16,FUNCT_1:def 3; reconsider y as Ordinal by A18; reconsider y9 = fi.y as Ordinal; y9 in rng fi by A1,A18,FUNCT_1:def 3; then A20: y9 in sup rng fi by ORDINAL2:19; B = y9*^C by A1,A4,A18,A19; then B in (sup rng fi)*^C by A2,A20,ORDINAL2:40; hence thesis by A17,ORDINAL1:12; end; hence thesis by A5,XBOOLE_0:def 10; end; theorem Th43: {} <> dom fi implies sup (C+^fi) = C+^sup fi proof A1: for A,B st A in dom fi & B = fi.A holds (C+^fi).A = C+^B by Def1; dom (C+^fi) = dom fi by Def1; hence thesis by A1,Th39; end; theorem Th44: {} <> dom fi & C <> {} & sup fi is limit_ordinal implies sup (fi *^C) = (sup fi)*^C proof A1: for A,B st A in dom fi & B = fi.A holds (fi*^C).A = B*^C by Def4; dom (fi*^C) = dom fi by Def4; hence thesis by A1,Th42; end; theorem Th45: B <> {} implies union(A+^B) = A+^union B proof assume A1: B <> {}; A2: now assume not ex C st B = succ C; then A3: B is limit_ordinal by ORDINAL1:29; then A+^B is limit_ordinal by A1,Th29; then union(A+^B) = A+^B by ORDINAL1:def 6; hence thesis by A3,ORDINAL1:def 6; end; now given C such that A4: B = succ C; thus union(A+^B) = union succ (A+^C) by A4,ORDINAL2:28 .= A+^C by ORDINAL2:2 .= A+^union B by A4,ORDINAL2:2; end; hence thesis by A2; end; theorem Th46: (A+^B)*^C = A*^C +^ B*^C proof defpred S[Ordinal] means (A+^$1)*^C = A*^C +^ $1*^C; A1: for B st S[B] holds S[succ B] proof let B such that A2: (A+^B)*^C = A*^C +^ B*^C; thus (A+^succ B)*^C = (succ(A+^B))*^C by ORDINAL2:28 .= A*^C +^ B*^C +^ C by A2,ORDINAL2:36 .= A*^C +^ (B*^C +^ C) by Th30 .= A*^C +^ (succ B)*^C by ORDINAL2:36; end; A3: for B st B <> {} & B is limit_ordinal & for D st D in B holds S[D] holds S[B] proof deffunc F(Ordinal) = A +^ $1; let B such that A4: B <> {} and A5: B is limit_ordinal and A6: for D st D in B holds S[D]; consider fi such that A7: dom fi = B & for D st D in B holds fi.D = F(D) from ORDINAL2:sch 3; A+^B is limit_ordinal by A4,A5,Th29; then A8: (A+^B)*^C is limit_ordinal by Th40; A9: dom (fi*^C) = dom fi by Def4; A10: now assume A11: C = {}; then A12: A*^C = {} by ORDINAL2:38; A13: B*^C = {} by A11,ORDINAL2:38; (A+^B)*^C = {} by A11,ORDINAL2:38; hence thesis by A12,A13,ORDINAL2:27; end; deffunc F(Ordinal) = $1 *^ C; consider psi such that A14: dom psi = B & for D st D in B holds psi.D = F(D) from ORDINAL2: sch 3; A15: now let x; assume A16: x in B; then reconsider k = x as Ordinal; reconsider m = fi.k, n = psi.k as Ordinal; thus (fi*^C).x = m*^C by A7,A16,Def4 .= (A+^k)*^C by A7,A16 .= A*^C+^k*^C by A6,A16 .= A*^C+^n by A14,A16 .= (A*^C+^psi).x by A14,A16,Def1; end; reconsider k = psi.{} as Ordinal; {} in B by A4,Th8; then k in rng psi by A14,FUNCT_1:def 3; then A17: k in sup rng psi by ORDINAL2:19; dom (A*^C+^psi) = dom psi by Def1; then A18: fi*^C = A*^C+^psi by A7,A14,A9,A15,FUNCT_1:2; A19: A+^B = sup fi by A4,A5,A7,ORDINAL2:29; now assume C <> {}; then (A+^B)*^C = sup(fi*^C) by A4,A5,A7,A19,Th29,Th44 .= A*^C+^sup psi by A4,A14,A18,Th43; hence (A+^B)*^C = union(A*^C+^sup psi) by A8,ORDINAL1:def 6 .= A*^C+^union sup psi by A17,Th45 .= A*^C+^B*^C by A4,A5,A14,ORDINAL2:37; end; hence thesis by A10; end; (A+^{})*^C = A*^C by ORDINAL2:27 .= A*^C +^ {} by ORDINAL2:27 .= A*^C +^ {}*^C by ORDINAL2:35; then A20: S[{}]; for B holds S[B] from ORDINAL2:sch 1(A20,A1,A3); hence thesis; end; theorem Th47: A <> {} implies ex C,D st B = C*^A+^D & D in A proof defpred I[Ordinal] means ex C,D st $1 = C*^A+^D & D in A; assume A1: A <> {}; A2: for B st B <> {} & B is limit_ordinal & for A st A in B holds I[A] holds I[B] proof {} in A by A1,Th8; then A3: succ {} c= A by ORDINAL1:21; let B such that B <> {} and A4: B is limit_ordinal and for A st A in B holds I[A]; defpred P[Ordinal] means $1 in B & B in $1*^A; B*^1 = B by ORDINAL2:39; then A5: B c= B*^A by A3,ORDINAL2:42; A6: now assume B <> B*^A; then B c< B*^A by A5,XBOOLE_0:def 8; then B in B*^A by ORDINAL1:11; then A7: ex C st P[C] by A4,Th41; consider C such that A8: P[C] and A9: for C1 being Ordinal st P[C1] holds C c= C1 from ORDINAL1:sch 1 (A7); now assume C is limit_ordinal; then consider C1 being Ordinal such that A10: C1 in C and A11: B in C1*^A by A8,Th41; C1 in B by A8,A10,ORDINAL1:10; hence contradiction by A9,A10,A11,ORDINAL1:5; end; then consider C1 being Ordinal such that A12: C = succ C1 by ORDINAL1:29; A13: C1 in C by A12,ORDINAL1:6; then C1 in B by A8,ORDINAL1:10; then not B in C1*^A by A9,A13,ORDINAL1:5; then consider D such that A14: B = C1*^A+^D by Th27,ORDINAL1:16; thus I[B] proof take C1,D; thus B = C1*^A+^D by A14; C1*^A+^D in C1*^A+^A by A8,A12,A14,ORDINAL2:36; hence thesis by Th22; end; end; B = B*^A implies B = B*^A+^{} & {} in A by A1,Th8,ORDINAL2:27; hence thesis by A6; end; A15: for B st I[B] holds I[succ B] proof let B; given C,D such that A16: B = C*^A+^D and A17: D in A; A18: now assume not succ D in A; then A19: A c= succ D by ORDINAL1:16; take C1 = succ C, D1 = {}; succ D c= A by A17,ORDINAL1:21; then A20: A = succ D by A19,XBOOLE_0:def 10; thus C1*^A+^D1 = C1*^A by ORDINAL2:27 .= C*^A+^A by ORDINAL2:36 .= succ B by A16,A20,ORDINAL2:28; thus D1 in A by A1,Th8; end; now assume A21: succ D in A; take C1 = C, D1 = succ D; thus C1*^A+^D1 = succ B by A16,ORDINAL2:28; thus D1 in A by A21; end; hence thesis by A18; end; A22: I[{}] proof take C = {}, D = {}; thus {} = {}+^{} by ORDINAL2:27 .= C*^A+^D by ORDINAL2:35; thus thesis by A1,Th8; end; for B holds I[B] from ORDINAL2:sch 1(A22,A15,A2); hence thesis; end; theorem Th48: for C1,D1,C2,D2 being Ordinal st C1*^A+^D1 = C2*^A+^D2 & D1 in A & D2 in A holds C1 = C2 & D1 = D2 proof let C1,D1,C2,D2 be Ordinal such that A1: C1*^A+^D1 = C2*^A+^D2 and A2: D1 in A and A3: D2 in A; set B = C1*^A+^D1; A4: now assume C2 in C1; then consider C such that A5: C1 = C2+^C and A6: C <> {} by Th28; B = C2*^A+^C*^A+^D1 by A5,Th46 .= C2*^A+^(C*^A+^D1) by Th30; then A7: D2 = C*^A+^D1 by A1,Th21; A8: C*^A c= C*^A+^D1 by Th24; A c= C*^A by A6,Th36; hence contradiction by A3,A7,A8,ORDINAL1:5; end; now assume C1 in C2; then consider C such that A9: C2 = C1+^C and A10: C <> {} by Th28; B = C1*^A+^C*^A+^D2 by A1,A9,Th46 .= C1*^A+^(C*^A+^D2) by Th30; then A11: D1 = C*^A+^D2 by Th21; A12: C*^A c= C*^A+^D2 by Th24; A c= C*^A by A10,Th36; hence contradiction by A2,A11,A12,ORDINAL1:5; end; hence C1 = C2 by A4,ORDINAL1:14; hence thesis by A1,Th21; end; theorem Th49: 1 in B & A <> {} & A is limit_ordinal implies for fi st dom fi = A & for C st C in A holds fi.C = C*^B holds A*^B = sup fi proof assume that A1: 1 in B and A2: A <> {} and A3: A is limit_ordinal; let fi; assume that A4: dom fi = A and A5: for C st C in A holds fi.C = C*^B; now given C such that A6: sup fi = succ C; consider D such that A7: D in rng fi and A8: C c= D by A6,ORDINAL1:6,ORDINAL2:21; D in sup fi by A7,ORDINAL2:19; then A9: succ D c= succ C by A6,ORDINAL1:21; succ C c= succ D by A8,ORDINAL2:1; then succ C = succ D by A9,XBOOLE_0:def 10; then C = D by ORDINAL1:7; then consider x such that A10: x in dom fi and A11: C = fi.x by A7,FUNCT_1:def 3; reconsider x as Ordinal by A10; A12: C = x*^B by A4,A5,A10,A11; C+^1 in C+^B by A1,ORDINAL2:32; then A13: sup fi in C+^B by A6,ORDINAL2:31; A14: (succ x)*^B = x*^B+^B by ORDINAL2:36; A15: succ x in dom fi by A3,A4,A10,ORDINAL1:28; then fi.succ x = (succ x)*^B by A4,A5; then C+^B in rng fi by A15,A12,A14,FUNCT_1:def 3; hence contradiction by A13,ORDINAL2:19; end; then A16: sup fi is limit_ordinal by ORDINAL1:29; A*^B = union sup fi by A2,A3,A4,A5,ORDINAL2:37; hence thesis by A16,ORDINAL1:def 6; end; theorem (A*^B)*^C = A*^(B*^C) proof defpred P[Ordinal] means ($1*^B)*^C = $1*^(B*^C); A1: {}*^C = {} by ORDINAL2:35; A2: for A st P[A] holds P[succ A] proof let A such that A3: (A*^B)*^C = A*^(B*^C); thus ((succ A)*^B)*^C = (A*^B+^B)*^C by ORDINAL2:36 .= A*^(B*^C)+^B*^C by A3,Th46 .= A*^(B*^C)+^1*^(B*^C) by ORDINAL2:39 .= (A+^1)*^(B*^C) by Th46 .= (succ A)*^(B*^C) by ORDINAL2:31; end; A4: for A st A <> {} & A is limit_ordinal & for D st D in A holds P[D] holds P[A] proof let A such that A5: A <> {} and A6: A is limit_ordinal and A7: for D st D in A holds (D*^B)*^C = D*^(B*^C); A8: now deffunc F(Ordinal) = $1 *^ B; assume that A9: 1 in B and A10: 1 in C; consider fi such that A11: dom fi = A & for D st D in A holds fi.D = F(D) from ORDINAL2: sch 3; A12: dom(fi*^C) = A & for D st D in A holds (fi*^C).D = D*^(B*^C) proof thus dom(fi*^C) = A by A11,Def4; let D; assume A13: D in A; then A14: fi.D = D*^B by A11; (fi*^C).D = (fi.D)*^C by A11,A13,Def4; hence thesis by A7,A13,A14; end; 1 = 1*^1 by ORDINAL2:39; then 1 in B*^C by A9,A10,Th19; then A15: A*^(B*^C) = sup(fi*^C) by A5,A6,A12,Th49; A*^B = sup fi by A5,A6,A9,A11,Th49; hence thesis by A5,A6,A10,A11,A15,Th40,Th44; end; now assume not (1 in B & 1 in C); then A16: B = {} or B = 1 or C = {} or C = 1 by Th16,ORDINAL1:16; A17: {}*^C = {} by ORDINAL2:35; A18: A*^B*^1 = A*^B by ORDINAL2:39; A19: (A*^B)*^{} = {} by ORDINAL2:38; A20: A*^1 = A by ORDINAL2:39; A*^{} = {} by ORDINAL2:38; hence thesis by A16,A17,A20,A19,A18,ORDINAL2:38,39; end; hence thesis by A8; end; {}*^B = {} by ORDINAL2:35; then A21: P[{}] by A1,ORDINAL2:35; for A holds P[A] from ORDINAL2:sch 1(A21,A2,A4); hence thesis; end; definition let A,B; func A -^ B -> Ordinal means : Def5: A = B+^it if B c= A otherwise it = {}; existence by Th27; uniqueness by Th21; consistency; func A div^ B -> Ordinal means : Def6: ex C st A = it*^B+^C & C in B if B <> {} otherwise it = {}; consistency; existence by Th47; uniqueness by Th48; end; definition let A,B; func A mod^ B -> Ordinal equals A-^(A div^ B)*^B; correctness; end; theorem A in B implies B = A+^(B-^A) proof assume A in B; then A c= B by ORDINAL1:def 2; hence thesis by Def5; end; theorem Th52: A+^B-^A = B proof A c= A+^B by Th24; hence thesis by Def5; end; theorem Th53: A in B & (C c= A or C in A) implies A-^C in B-^C proof assume that A1: A in B and A2: C c= A or C in A; A c= B by A1,ORDINAL1:def 2; then C c= B by A2,ORDINAL1:def 2,XBOOLE_1:1; then A3: B = C+^(B-^C) by Def5; C c= A by A2,ORDINAL1:def 2; then A = C+^(A-^C) by Def5; hence thesis by A1,A3,Th22; end; theorem Th54: A-^A = {} proof A+^{} = A by ORDINAL2:27; hence thesis by Def5; end; theorem A in B implies B-^A <> {} & {} in B-^A proof assume A in B; then A-^A in B-^A by Th53; hence thesis by Th54; end; theorem Th56: A-^{} = A & {}-^A = {} proof A1: {}+^A = A by ORDINAL2:30; {} c= A by XBOOLE_1:2; hence A-^{} = A by A1,Def5; not A c= {} or A c= {}; then thesis or A = {} by Def5,XBOOLE_1:3; hence thesis by A1,Def5; end; theorem A-^(B+^C) = (A-^B)-^C proof now per cases; suppose B+^C c= A; then A = B+^C+^(A-^(B+^C)) by Def5; then A = B+^(C+^(A-^(B+^C))) by Th30; then C+^(A-^(B+^C)) = A-^B by Th52; hence thesis by Th52; end; suppose A1: not B+^C c= A; A2: now assume A = B+^(A-^B); then not C c= A-^B by A1,ORDINAL2:33; hence A-^B-^C = {} by Def5; end; B c= A or not B c= A; then A3: A = B+^(A-^B) or A-^B = {} by Def5; A-^(B+^C) = {} by A1,Def5; hence thesis by A3,A2,Th56; end; end; hence thesis; end; theorem A c= B implies C-^B c= C-^A proof assume A1: A c= B; then A2: B = A+^(B-^A) by Def5; A3: now assume A4: B c= C; then A5: C = B+^(C-^B) by Def5; A c= C by A1,A4,XBOOLE_1:1; then B+^(C-^B) = A+^(C-^A) by A5,Def5; then A+^((B-^A)+^(C-^B)) = A+^(C-^A) by A2,Th30; then (B-^A)+^(C-^B) = C-^A by Th21; hence thesis by Th24; end; now assume not B c= C; then C-^B = {} by Def5; hence thesis by XBOOLE_1:2; end; hence thesis by A3; end; theorem A c= B implies A-^C c= B-^C proof assume A1: A c= B; A2: now assume A3: C c= A; then A4: A = C+^(A-^C) by Def5; C c= B by A1,A3,XBOOLE_1:1; then C+^(A-^C) c= C+^(B-^C) by A1,A4,Def5; hence thesis by Th23; end; now assume not C c= A; then A-^C = {} by Def5; hence thesis by XBOOLE_1:2; end; hence thesis by A2; end; theorem C <> {} & A in B+^C implies A-^B in C proof assume A1: C <> {}; A2: B+^C-^B = C by Th52; not B c= A implies A-^B = {} by Def5; hence thesis by A1,A2,Th8,Th53; end; theorem A+^B in C implies B in C-^A proof A1: A+^B-^A = B by Th52; A c= A+^B by Th24; hence thesis by A1,Th53; end; theorem A c= B+^(A-^B) proof now per cases; suppose B c= A; hence thesis by Def5; end; suppose A1: not B c= A; then A-^B = {} by Def5; hence thesis by A1,ORDINAL2:27; end; end; hence thesis; end; theorem A*^C -^ B*^C = (A-^B)*^C proof A1: now assume A2: not B c= A; then A3: not B*^C c= A*^C or C = {} by Th35; A4: {}*^C = {} by ORDINAL2:35; A5: A*^{} = {} by ORDINAL2:38; A-^B = {} by A2,Def5; hence thesis by A3,A5,A4,Def5,Th56; end; now assume B c= A; then A = B+^(A-^B) by Def5; then A*^C = B*^C+^(A-^B)*^C by Th46; hence thesis by Th52; end; hence thesis by A1; end; theorem Th64: (A div^ B)*^B c= A proof now per cases; suppose B <> {}; then ex C st A = (A div^ B)*^B+^C & C in B by Def6; hence thesis by Th24; end; suppose B = {}; then A div^ B = {} by Def6; then (A div^ B)*^B = {} by ORDINAL2:35; hence thesis by XBOOLE_1:2; end; end; hence thesis; end; theorem Th65: A = (A div^ B)*^B+^(A mod^ B) proof (A div^ B)*^B c= A by Th64; hence thesis by Def5; end; theorem A = B*^C+^D & D in C implies B = A div^ C & D = A mod^ C proof assume that A1: A = B*^C+^D and A2: D in C; thus B = A div^ C by A1,A2,Def6; hence thesis by A1,Th52; end; theorem A in B*^C implies A div^ C in B & A mod^ C in C proof A1: A = (A div^ C)*^C+^(A mod^ C) by Th65; assume A2: A in B*^C; then C <> {} by ORDINAL2:38; then A3: ex D st A = (A div^ C)*^C+^D & D in C by Def6; then A4: (A div^ C)*^C c= A by Th24; assume not thesis; then B*^C c= (A div^ C)*^C by A3,A1,Th21,ORDINAL1:16,ORDINAL2:41; hence contradiction by A2,A4,ORDINAL1:5; end; theorem Th68: B <> {} implies A*^B div^ B = A proof assume B <> {}; then A1: {} in B by Th8; A*^B = A*^B+^{} by ORDINAL2:27; hence thesis by A1,Def6; end; theorem A*^B mod^ B = {} proof A1: A*^{} = {} by ORDINAL2:38; A2: A*^B-^A*^B = {} by Th54; {}-^(A*^B div^ B)*^B = {} by Th56; hence thesis by A1,A2,Th68; end; theorem {} div^ A = {} & {} mod^ A = {} & A mod^ {} = A proof A1: A = {} or A <> {}; {} = {}*^A by ORDINAL2:35; hence {} div^ A = {} by A1,Def6,Th68; thus {} mod^ A = {} by Th56; thus A mod^ {} = A-^{} by ORDINAL2:38 .= A by Th56; end; theorem A div^ 1 = A & A mod^ 1 = {} proof A1: A = A*^1 by ORDINAL2:39; A2: A = A+^{} by ORDINAL2:27; A3: {} in 1 by Th8; hence A div^ 1 = A by A1,A2,Def6; thus A mod^ 1 = A-^A by A1,A2,A3,Def6 .= {} by Th54; end; begin theorem sup X c= succ union On X proof reconsider A = union On X as Ordinal by Th5; On X c= succ A proof let x; assume A1: x in On X; then reconsider a = x as Ordinal by ORDINAL1:def 9; a c= A by A1,ZFMISC_1:74; hence thesis by ORDINAL1:22; end; hence thesis by ORDINAL2:def 3; end; reserve e,u for set; theorem succ A is_cofinal_with 1 proof deffunc F(set) = A; consider psi such that A1: dom psi = 1 & for B st B in 1 holds psi.B = F(B) from ORDINAL2:sch 3; take psi; thus dom psi = 1 by A1; thus rng psi c= succ A proof let e; assume e in rng psi; then consider u such that A2: u in 1 and A3: e = psi.u by A1,FUNCT_1:def 3; reconsider u as Ordinal by A2; psi.u = A by A1,A2; hence thesis by A3,ORDINAL1:6; end; thus psi is increasing proof let B,C; assume that A4: B in C and A5: C in dom psi; thus thesis by A1,A4,A5,Th14; end; A6: psi.{} = A by A1,Lm1,ORDINAL1:6; rng psi = {psi.{}} by A1,Lm1,FUNCT_1:4; hence thesis by A6,ORDINAL2:23; end; theorem Th74: for a,b being Ordinal st a+^b is natural holds a in omega & b in omega proof let x,y be Ordinal such that A1: x+^y in omega; A2: y c= x+^y by Th24; x c= x+^y by Th24; hence thesis by A1,A2,ORDINAL1:12; end; registration let a, b be natural Ordinal; cluster a -^ b -> natural; coherence proof not b c= a or b c= a; then a -^ b = {} or a = b+^(a-^b) by Def5; hence a-^b in omega by Th74,ORDINAL1:def 11; end; cluster a *^ b -> natural; coherence proof defpred P[natural Ordinal] means $1*^b is natural; A1: now let a be natural Ordinal; assume P[a]; then reconsider c = a*^b as natural Ordinal; (succ a)*^b = c+^b by ORDINAL2:36; hence P[succ a]; end; A2: P[{}] by ORDINAL2:35; P[a] from ORDINAL2:sch 17(A2,A1); hence thesis; end; end; theorem for a,b being Ordinal st a*^b is natural non empty holds a in omega & b in omega proof let x,y be Ordinal such that A1: x*^y in omega; assume A2: x*^y is non empty; then y <> {} by ORDINAL2:38; then A3: x c= x*^y by Th36; x <> {} by A2,ORDINAL2:35; then y c= x*^y by Th36; hence thesis by A1,A3,ORDINAL1:12; end; definition let a,b be natural Ordinal; redefine func a+^b; commutativity proof let a,b be natural Ordinal; defpred R[natural Ordinal] means a+^$1 = $1+^a; A1: now let b be natural Ordinal; assume A2: R[b]; defpred P[natural Ordinal] means (succ b)+^$1 = succ (b+^$1); A3: now let a be natural Ordinal; assume A4: P[a]; (succ b)+^succ a = succ ((succ b)+^a) by ORDINAL2:28 .= succ (b+^succ a) by A4,ORDINAL2:28; hence P[succ a]; end; (succ b)+^{} = succ b by ORDINAL2:27 .= succ (b+^{}) by ORDINAL2:27; then A5: P[{}]; P[a] from ORDINAL2:sch 17(A5,A3); hence R[succ b] by A2,ORDINAL2:28; end; a+^{} = a by ORDINAL2:27 .= {}+^a by ORDINAL2:30; then A6: R[{}]; thus R[b] from ORDINAL2:sch 17(A6,A1); end; end; definition let a,b be natural Ordinal; redefine func a*^b; commutativity proof let a,b be natural Ordinal; defpred R[natural Ordinal] means a*^$1 = $1*^a; A1: now let b be natural Ordinal; defpred P[natural Ordinal] means $1*^succ b = $1*^b+^$1; assume A2: R[b]; A3: now let a be natural Ordinal; assume A4: P[a]; (succ a)*^succ b = a*^(succ b)+^succ b by ORDINAL2:36 .= a*^b+^(a+^succ b) by A4,Th30 .= a*^b+^succ (a+^b) by ORDINAL2:28 .= succ (a*^b+^(a+^b)) by ORDINAL2:28 .= succ (a*^b+^b+^a) by Th30 .= succ ((succ a)*^b+^a) by ORDINAL2:36 .= (succ a)*^b+^succ a by ORDINAL2:28; hence P[succ a]; end; {}*^succ b = {} by ORDINAL2:35 .= {}+^{} by ORDINAL2:27 .= {}*^b+^{} by ORDINAL2:35; then A5: P[{}]; P[a] from ORDINAL2:sch 17(A5,A3); hence R[succ b] by A2,ORDINAL2:36; end; a*^{} = {} by ORDINAL2:38 .= {}*^a by ORDINAL2:35; then A6: R[{}]; thus R[b] from ORDINAL2:sch 17(A6,A1); end; end; begin reserve a,b,x,y,z,z1,z2,z3,y1,y3,y4,A,B,C,D,G,M,N,X,Y,Z,W0,W00 for set, R,S,T, W,W1,W2 for Relation, F,H,H1 for Function; theorem Th1: x in field R iff ex y st ([x,y] in R or [y,x] in R) proof x in (dom R \/ rng R) iff x in dom R or x in rng R by XBOOLE_0:def 3; hence thesis by RELAT_1:def 6,XTUPLE_0:def 12,def 13; end; theorem Th2: X <> {} & Y <> {} & W = [: X,Y :] implies field W = X \/ Y proof set a = the Element of X,b = the Element of Y; assume that A1: X <> {} and A2: Y <> {} and A3: W = [: X,Y :]; A4: x in field W implies x in X \/ Y proof assume x in field W; then consider y such that A5: [x,y] in W or [y,x] in W by Th1; A6: [y,x] in W implies x in X \/ Y proof assume [y,x] in W; then x in Y by A3,ZFMISC_1:87; hence thesis by XBOOLE_0:def 3; end; [x,y] in W implies x in X \/ Y proof assume [x,y] in W; then x in X by A3,ZFMISC_1:87; hence thesis by XBOOLE_0:def 3; end; hence thesis by A5,A6; end; x in X \/ Y implies x in field W proof A7: x in X implies x in field W proof assume x in X; then [x,b] in W by A2,A3,ZFMISC_1:87; hence thesis by Th1; end; A8: x in Y implies x in field W proof assume x in Y; then [a,x] in W by A1,A3,ZFMISC_1:87; hence thesis by Th1; end; assume x in X \/ Y; hence thesis by A7,A8,XBOOLE_0:def 3; end; hence thesis by A4,TARSKI:1; end; scheme RSeparation { A()-> set, P[Relation] } : ex B st for R being Relation holds R in B iff R in A() & P[R] proof defpred p[set,set] means $1 = $2 & ex S st S = $2 & P[S]; A1: for y,t,v being set st p[y,t] & p[y,v] holds t = v; consider B such that A2: for t being set holds t in B iff ex y being set st y in A() & p[y,t] from TARSKI:sch 1(A1); take B; let R; R in B implies ex T st T in A() & T = R & P[R] proof assume R in B; then consider y being set such that A3: y in A() and A4: y = R and A5: ex S st S = R & P[S] by A2; reconsider y as Relation by A4; take y; thus thesis by A3,A4,A5; end; hence R in B implies R in A() & P[R]; thus thesis by A2; end; theorem Th3: for x,y,W st x in field W & y in field W & W is well-ordering holds not x in W-Seg(y) implies [y,x] in W proof let x,y,W; assume that A1: x in field W and A2: y in field W and A3: W is well-ordering; W is connected by A3,WELLORD1:def 4; then W is_connected_in field W by RELAT_2:def 14; then A4: x<>y implies [x,y] in W or [y,x] in W by A1,A2,RELAT_2:def 6; W is reflexive by A3,WELLORD1:def 4; then A5: W is_reflexive_in field W by RELAT_2:def 9; assume not x in W-Seg(y); hence thesis by A1,A5,A4,RELAT_2:def 1,WELLORD1:1; end; theorem Th4: for x,y,W st x in field W & y in field W & W is well-ordering holds x in W-Seg(y) implies not [y,x] in W proof let x,y,W; assume that A1: x in field W & y in field W and A2: W is well-ordering; W is antisymmetric by A2,WELLORD1:def 4; then A3: W is_antisymmetric_in field W by RELAT_2:def 12; assume x in W-Seg(y); then A4: x<>y & [x,y] in W by WELLORD1:1; assume [y,x] in W; hence contradiction by A1,A3,A4,RELAT_2:def 4; end; theorem Th5: for F,D st (for X st X in D holds not F.X in X & F.X in union D) ex R st field R c= union D & R is well-ordering & not field R in D & for y st y in field R holds R-Seg(y) in D & F.(R-Seg(y)) = y proof let F,D; assume A1: for X st X in D holds not F.X in X & F.X in union D; defpred P[Relation] means $1 is well-ordering & for y st y in field $1 holds $1-Seg(y) in D & F.($1-Seg(y)) = y; set W0=bool [: union D, union D :]; consider G such that A2: W in G iff W in W0 & P[W] from RSeparation; defpred P[set,set] means ex W st [$1,$2] in W & W in G; consider S such that A3: [x,y] in S iff x in union D & y in union D & P[x,y] from RELAT_1: sch 1; take R = S; A4: x in field R implies x in union D & ex W st x in field W & W in G proof assume x in field R; then consider y such that A5: [x,y] in R or [y,x] in R by Th1; (x in union D & y in union D & ex S st [x,y] in S & S in G) or (y in union D & x in union D & ex S st [y,x] in S & S in G) by A3,A5; then consider S such that A6: ( [x,y] in S or [y,x] in S)& S in G; thus x in union D by A3,A5; take S; thus thesis by A6,Th1; end; then x in field R implies x in union D; hence field R c= union D by TARSKI:def 3; A7: for W1,W2 holds W1 in G & W2 in G implies ((W1 c= W2 & for x st x in field W1 holds W1-Seg(x) = W2-Seg(x) ) or (W2 c= W1 & for x st x in field W2 holds W2-Seg(x) = W1-Seg(x) )) proof let W1,W2; assume that A8: W1 in G and A9: W2 in G; A10: W2 is well-ordering by A2,A9; defpred P[set] means $1 in field W2 & W1 |_2 (W1-Seg($1)) = W2 |_2 (W2-Seg ($1)); consider C such that A11: x in C iff x in field W1 & P[x] from XBOOLE_0:sch 1; A12: W1 is well-ordering by A2,A8; A13: x in C implies W1-Seg(x) = W2-Seg(x) proof assume A14: x in C; for y holds y in W1-Seg(x) iff y in W2-Seg(x) proof let y; field (W1 |_2(W1-Seg(x))) = W1-Seg(x) & field (W2 |_2(W2-Seg(x))) = W2-Seg(x ) by A12,A10,WELLORD1:32; hence thesis by A11,A14; end; hence thesis by TARSKI:1; end; A15: x in C implies W1-Seg(x) c= C proof assume A16: x in C; y in W1-Seg(x) implies y in C proof assume A17: y in W1-Seg(x); then A18: y in W2-Seg(x) by A13,A16; then A19: [y,x] in W2 by WELLORD1:1; then A20: y in field W2 by RELAT_1:15; A21: W1-Seg(y)=(W1 |_2 (W1-Seg(x)))-Seg(y) by A12,A17,WELLORD1:27 .=(W2 |_2 (W2-Seg(x)))-Seg(y) by A11,A16 .=W2-Seg(y) by A10,A18,WELLORD1:27; A22: [y,x] in W1 by A17,WELLORD1:1; then A23: y in field W1 by RELAT_1:15; x in field W2 by A19,RELAT_1:15; then A24: W2-Seg(y) c= W2-Seg(x) by A10,A18,A20,WELLORD1:30; x in field W1 by A22,RELAT_1:15; then W1-Seg(y) c= W1-Seg(x) by A12,A17,A23,WELLORD1:30; then W1 |_2 (W1-Seg(y)) = (W1 |_2 (W1-Seg(x))) |_2 (W1-Seg(y)) by WELLORD1:22 .= (W2 |_2 (W2-Seg(x))) |_2 (W2-Seg(y)) by A11,A16,A21 .= W2 |_2 (W2-Seg(y)) by A24,WELLORD1:22; hence thesis by A11,A23,A20; end; hence thesis by TARSKI:def 3; end; A25: y1 in field W1 & not y1 in C implies ex y3 st y3 in field W1 & C=W1 -Seg(y3) & not y3 in C proof set Y = field W1 \ C; assume y1 in field W1 & not y1 in C; then Y <> {} by XBOOLE_0:def 5; then consider a such that A26: a in Y and A27: for b st b in Y holds [a,b] in W1 by A12,WELLORD1:6; take y3=a; x in C iff x in W1-Seg(y3) proof thus x in C implies x in W1-Seg(y3) proof assume that A28: x in C and A29: not x in W1-Seg(y3); x in field W1 by A11,A28; then A30: [y3,x] in W1 by A12,A26,A29,Th3; A31: W1-Seg(x) c= C by A15,A28; y3 <> x implies y3 in C proof assume y3 <> x; then y3 in W1-Seg(x) by A30,WELLORD1:1; hence thesis by A31; end; hence contradiction by A26,A28,XBOOLE_0:def 5; end; thus x in W1-Seg(y3) implies x in C proof assume that A32: x in W1-Seg(y3) and A33: not x in C; [x,y3] in W1 by A32,WELLORD1:1; then A34: x in field W1 by RELAT_1:15; then x in Y by A33,XBOOLE_0:def 5; then [y3,x] in W1 by A27; hence contradiction by A12,A26,A32,A34,Th4; end; end; hence thesis by A26,TARSKI:1,XBOOLE_0:def 5; end; A35: x in C implies W2-Seg(x) c= C proof assume A36: x in C; let y; assume A37: y in W2-Seg(x); then A38: y in W1-Seg(x) by A13,A36; then A39: [y,x] in W1 by WELLORD1:1; then A40: y in field W1 by RELAT_1:15; A41: W2-Seg(y)=(W2 |_2 (W2-Seg(x)))-Seg(y) by A10,A37,WELLORD1:27 .=(W1 |_2 (W1-Seg(x)))-Seg(y) by A11,A36 .=W1-Seg(y) by A12,A38,WELLORD1:27; A42: [y,x] in W2 by A37,WELLORD1:1; then A43: y in field W2 by RELAT_1:15; x in field W1 by A39,RELAT_1:15; then A44: W1-Seg(y) c= W1-Seg(x) by A12,A38,A40,WELLORD1:30; x in field W2 by A42,RELAT_1:15; then W2-Seg(y) c= W2-Seg(x) by A10,A37,A43,WELLORD1:30; then W2 |_2 (W2-Seg(y)) = (W2 |_2 (W2-Seg(x))) |_2 (W2-Seg(y)) by WELLORD1:22 .= (W1 |_2 (W1-Seg(x))) |_2 (W1-Seg(y)) by A11,A36,A41 .= W1 |_2 (W1-Seg(y)) by A44,WELLORD1:22; hence thesis by A11,A43,A40; end; A45: y1 in field W2 & not y1 in C implies ex y3 st y3 in field W2 & C=W2 -Seg(y3) & not y3 in C proof set Y = field W2 \ C; assume y1 in field W2 & not y1 in C; then Y <> {} by XBOOLE_0:def 5; then consider a such that A46: a in Y and A47: for b st b in Y holds [a,b] in W2 by A10,WELLORD1:6; take y3=a; x in C iff x in W2-Seg(y3) proof thus x in C implies x in W2-Seg(y3) proof assume that A48: x in C and A49: not x in W2-Seg(y3); x in field W2 by A11,A48; then A50: [y3,x] in W2 by A10,A46,A49,Th3; A51: W2-Seg(x) c= C by A35,A48; y3 <> x implies y3 in C proof assume y3 <> x; then y3 in W2-Seg(x) by A50,WELLORD1:1; hence thesis by A51; end; hence contradiction by A46,A48,XBOOLE_0:def 5; end; thus x in W2-Seg(y3) implies x in C proof assume that A52: x in W2-Seg(y3) and A53: not x in C; [x,y3] in W2 by A52,WELLORD1:1; then A54: x in field W2 by RELAT_1:15; then x in Y by A53,XBOOLE_0:def 5; then [y3,x] in W2 by A47; hence contradiction by A10,A46,A52,A54,Th4; end; end; hence thesis by A46,TARSKI:1,XBOOLE_0:def 5; end; A55: C = field W1 or C = field W2 proof assume not C = field W1; then ex x st not (x in C implies x in field W1) or not (x in field W1 implies x in C) by TARSKI:1; then consider y3 such that A56: y3 in field W1 and A57: C=W1-Seg(y3) and A58: not y3 in C by A11,A25; assume not C = field W2; then ex x st not (x in C implies x in field W2) or not (x in field W2 implies x in C) by TARSKI:1; then consider y4 such that A59: y4 in field W2 and A60: C=W2-Seg(y4) and not y4 in C by A11,A45; A61: y3 = F.(W2-Seg(y4)) by A2,A8,A56,A57,A60 .= y4 by A2,A9,A59; z in W1 |_2 (W1-Seg(y3)) iff z in W2 |_2 (W2-Seg(y3)) proof A62: z in W1 & z in [: W1-Seg(y3),W1-Seg(y3) :] implies z in W2 & z in [: W2-Seg(y3),W2-Seg(y3) :] proof assume that A63: z in W1 and A64: z in [: W1-Seg(y3),W1-Seg(y3) :]; consider z1,z2 such that A65: z1 in W1-Seg(y3) and A66: z2 in W1-Seg(y3) and A67: z=[z1,z2] by A64,ZFMISC_1:def 2; z1 in W1-Seg(z2) or z1=z2 & not z1 in W1-Seg(z2) by A63,A67, WELLORD1:1; then A68: z1 in W2-Seg(z2) or z1=z2 & not z1 in W2-Seg(z2) by A13,A57,A66; z1 in field W2 by A11,A57,A65; hence thesis by A10,A57,A60,A61,A64,A67,A68,Th3,WELLORD1:1; end; z in W2 & z in [: W2-Seg(y3),W2-Seg(y3) :] implies z in W1 & z in [: W1-Seg(y3),W1-Seg(y3) :] proof assume that A69: z in W2 and A70: z in [: W2-Seg(y3),W2-Seg(y3) :]; consider z1,z2 such that A71: z1 in W2-Seg(y3) and A72: z2 in W2-Seg(y3) and A73: z=[z1,z2] by A70,ZFMISC_1:def 2; z1 in W2-Seg(z2) or z1=z2 & not z1 in W2-Seg(z2) by A69,A73, WELLORD1:1; then A74: z1 in W1-Seg(z2) or z1=z2 & not z1 in W1-Seg(z2) by A13,A60,A61,A72; z1 in field W1 by A11,A60,A61,A71; hence thesis by A12,A57,A60,A61,A70,A73,A74,Th3,WELLORD1:1; end; hence thesis by A62,XBOOLE_0:def 4; end; then W1 |_2 (W1-Seg(y3)) = W2 |_2 (W2-Seg(y3)) by TARSKI:1; hence contradiction by A11,A56,A58,A59,A61; end; A75: C = field W2 implies (W2 c= W1 & for x st x in field W2 holds W2-Seg (x) = W1-Seg(x) ) proof assume A76: C = field W2; [z1,z2] in W2 implies [z1,z2] in W1 proof assume A77: [z1,z2] in W2; then A78: z1 in W2-Seg(z2) or z1=z2 & not z1 in W2-Seg(z2) by WELLORD1:1; z1 in C by A76,A77,RELAT_1:15; then A79: z1 in field W1 by A11; z2 in C by A76,A77,RELAT_1:15; then z1 in W1-Seg(z2) or z1=z2 & not z1 in W1-Seg(z2) by A13,A78; hence thesis by A12,A79,Th3,WELLORD1:1; end; hence thesis by A13,A76,RELAT_1:def 3; end; C = field W1 implies (W1 c= W2 & for x st x in field W1 holds W1-Seg (x) = W2-Seg(x) ) proof assume A80: C = field W1; [z1,z2] in W1 implies [z1,z2] in W2 proof assume A81: [z1,z2] in W1; then A82: z1 in W1-Seg(z2) or z1=z2 & not z1 in W1-Seg(z2) by WELLORD1:1; z1 in C by A80,A81,RELAT_1:15; then A83: z1 in field W2 by A11; z2 in C by A80,A81,RELAT_1:15; then z1 in W2-Seg(z2) or z1=z2 & not z1 in W2-Seg(z2) by A13,A82; hence thesis by A10,A83,Th3,WELLORD1:1; end; hence thesis by A13,A80,RELAT_1:def 3; end; hence thesis by A55,A75; end; A84: x in field R & y in field R & [x,y] in R & [y,x] in R implies x=y proof assume that x in field R and y in field R and A85: [x,y] in R and A86: [y,x] in R; consider W1 such that A87: [x,y] in W1 and A88: W1 in G by A3,A85; consider W2 such that A89: [y,x] in W2 and A90: W2 in G by A3,A86; A91: W2 c= W1 implies x=y proof W1 is well-ordering by A2,A88; then W1 well_orders field W1 by WELLORD1:4; then A92: W1 is_antisymmetric_in field W1 by WELLORD1:def 5; assume A93: W2 c= W1; then x in field W1 & y in field W1 by A89,RELAT_1:15; hence thesis by A87,A89,A93,A92,RELAT_2:def 4; end; W1 c= W2 implies x=y proof W2 is well-ordering by A2,A90; then W2 well_orders field W2 by WELLORD1:4; then A94: W2 is_antisymmetric_in field W2 by WELLORD1:def 5; assume A95: W1 c= W2; then x in field W2 & y in field W2 by A87,RELAT_1:15; hence thesis by A87,A89,A95,A94,RELAT_2:def 4; end; hence thesis by A7,A88,A90,A91; end; then A96: R is_antisymmetric_in field R by RELAT_2:def 4; A97: W in G implies field W c= field R proof assume A98: W in G; let x; assume x in field W; then consider y such that A99: [x,y] in W or [y,x] in W by Th1; A100: [y,x] in W implies [y,x] in R proof assume A101: [y,x] in W; W in W0 by A2,A98; then ex z1,z2 st z1 in union D & z2 in union D & [y,x]=[z1,z2] by A101, ZFMISC_1:84; hence thesis by A3,A98,A101; end; [x,y] in W implies [x,y] in R proof assume A102: [x,y] in W; W in W0 by A2,A98; then ex z1,z2 st z1 in union D & z2 in union D & [x,y]=[z1,z2] by A102, ZFMISC_1:84; hence thesis by A3,A98,A102; end; hence thesis by A99,A100,Th1; end; A103: for y st y in field R holds R-Seg(y) in D & F.(R-Seg(y)) = y proof let y; assume A104: y in field R; then consider W such that A105: y in field W and A106: W in G by A4; A107: y in union D by A4,A104; A108: field W c= field R by A97,A106; A109: x in W-Seg(y) implies x in R-Seg(y) proof assume A110: x in W-Seg(y); then A111: [x,y] in W by WELLORD1:1; then x in field W by RELAT_1:15; then x in union D by A4,A108; then A112: [x,y] in R by A3,A106,A107,A111; not x =y by A110,WELLORD1:1; hence thesis by A112,WELLORD1:1; end; x in R-Seg(y) implies x in W-Seg(y) proof assume A113: x in R-Seg(y); then [x,y] in R by WELLORD1:1; then consider W1 such that A114: [x,y] in W1 and A115: W1 in G by A3; A116: y in field W1 by A114,RELAT_1:15; not x =y by A113,WELLORD1:1; then x in W1-Seg(y) by A114,WELLORD1:1; hence thesis by A7,A105,A106,A115,A116; end; then W-Seg(y) = R-Seg(y) by A109,TARSKI:1; hence thesis by A2,A105,A106; end; A117: x in field R & y in field R & x <>y implies [x,y] in R or [y,x] in R proof assume that A118: x in field R and A119: y in field R and A120: x <>y; consider W2 such that A121: y in field W2 and A122: W2 in G by A4,A119; consider W1 such that A123: x in field W1 and A124: W1 in G by A4,A118; A125: x in union D & y in union D by A4,A118,A119; A126: W2 c= W1 implies [x,y] in R or [y,x] in R proof W1 is well-ordering by A2,A124; then W1 well_orders field W1 by WELLORD1:4; then A127: W1 is_connected_in field W1 by WELLORD1:def 5; assume W2 c= W1; then field W2 c= field W1 by RELAT_1:16; then [x,y] in W1 or [y,x] in W1 by A120,A123,A121,A127,RELAT_2:def 6; hence thesis by A3,A124,A125; end; W1 c= W2 implies [x,y] in R or [y,x] in R proof W2 is well-ordering by A2,A122; then W2 well_orders field W2 by WELLORD1:4; then A128: W2 is_connected_in field W2 by WELLORD1:def 5; assume W1 c= W2; then field W1 c= field W2 by RELAT_1:16; then [x,y] in W2 or [y,x] in W2 by A120,A123,A121,A128,RELAT_2:def 6; hence thesis by A3,A125,A122; end; hence thesis by A7,A124,A122,A126; end; then A129: R is_connected_in field R by RELAT_2:def 6; A130: R is_well_founded_in field R proof let Y; assume that A131: Y c= field R and A132: Y <> {}; set y = the Element of Y; y in field R by A131,A132,TARSKI:def 3; then consider W such that A133: y in field W and A134: W in G by A4; W is well-ordering by A2,A134; then W well_orders field W by WELLORD1:4; then A135: W is_well_founded_in field W by WELLORD1:def 5; set A = Y /\ field W; A136: A c= field W by XBOOLE_1:17; A <> {} by A132,A133,XBOOLE_0:def 4; then consider a such that A137: a in A and A138: W-Seg(a) misses A by A135,A136,WELLORD1:def 3; ex b st b in Y & R-Seg(b) misses Y proof take b= a; thus b in Y by A137,XBOOLE_0:def 4; assume not thesis; then consider x being set such that A139: x in R-Seg(b) and A140: x in Y by XBOOLE_0:3; [x,b] in R by A139,WELLORD1:1; then consider W1 such that A141: [x,b] in W1 and A142: W1 in G by A3; A143: b in field W1 by A141,RELAT_1:15; x<>b by A139,WELLORD1:1; then x in W1-Seg(b) by A141,WELLORD1:1; then A144: x in W-Seg(a) by A7,A134,A136,A137,A142,A143; then [x,a] in W by WELLORD1:1; then x in field W by RELAT_1:15; then x in A by A140,XBOOLE_0:def 4; hence contradiction by A138,A144,XBOOLE_0:3; end; hence thesis; end; A145: x in field R & y in field R & z in field R & [x,y] in R & [y,z] in R implies [x,z] in R proof assume that x in field R and y in field R and z in field R and A146: [x,y] in R and A147: [y,z] in R; A148: x in union D & z in union D by A3,A146,A147; consider W1 such that A149: [x,y] in W1 and A150: W1 in G by A3,A146; consider W2 such that A151: [y,z] in W2 and A152: W2 in G by A3,A147; ex W st [x,y] in W & [y,z] in W & W in G proof take W = W2; A153: not x in W1-Seg(y) implies [x,y] in W proof A154: W1 is well-ordering by A2,A150; then W1 well_orders field W1 by WELLORD1:4; then A155: W1 is_antisymmetric_in field W1 by WELLORD1:def 5; W is well-ordering by A2,A152; then W well_orders field W by WELLORD1:4; then A156: W is_reflexive_in field W by WELLORD1:def 5; A157: x in field W1 & y in field W1 by A149,RELAT_1:15; assume not x in W1-Seg(y); then [y,x] in W1 by A157,A154,Th3; then A158: x=y by A149,A157,A155,RELAT_2:def 4; y in field W by A151,RELAT_1:15; hence thesis by A158,A156,RELAT_2:def 1; end; y in field W1 & y in field W by A149,A151,RELAT_1:15; then W1-Seg(y) = W-Seg(y) by A7,A150,A152; hence thesis by A151,A152,A153,WELLORD1:1; end; then consider W such that A159: [x,y] in W and A160: [y,z] in W and A161: W in G; A162: z in field W by A160,RELAT_1:15; W is well-ordering by A2,A161; then W well_orders field W by WELLORD1:4; then A163: W is_transitive_in field W by WELLORD1:def 5; x in field W & y in field W by A159,RELAT_1:15; then [x,z] in W by A159,A160,A163,A162,RELAT_2:def 8; hence thesis by A3,A148,A161; end; then A164: R is_transitive_in field R by RELAT_2:def 8; A165: x in field R implies [x,x] in R proof assume A166: x in field R; then consider W such that A167: x in field W and A168: W in G by A4; W is well-ordering by A2,A168; then W well_orders field W by WELLORD1:4; then W is_reflexive_in field W by WELLORD1:def 5; then A169: [x,x] in W by A167,RELAT_2:def 1; x in union D by A4,A166; hence thesis by A3,A168,A169; end; A170: not field R in D proof set a0=F.(field R); reconsider W3 = [: field R,{ a0 } :] as Relation; reconsider W4 = { [a0,a0]} as Relation; reconsider W1=R \/ [: field R,{ a0 }:] \/ {[ a0,a0 ]} as Relation; {[ a0,a0 ]} c= W1 & [ a0,a0 ] in {[ a0,a0 ]} by TARSKI:def 1,XBOOLE_1:7; then A171: a0 in field W1 by RELAT_1:15; field W4 = {a0,a0} by RELAT_1:17; then A172: field W4 = {a0}\/{a0} by ENUMSET1:1; A173: field R = {} implies field W1 =field R \/ { a0 } proof assume A174: field R = {}; A175: field W3 = {} proof set z3 = the Element of field W3; assume field W3 <> {}; then ex z2 st [z3,z2] in W3 or [z2,z3] in W3 by Th1; hence contradiction by A174,ZFMISC_1:90; end; field W1 =field (R \/ W3) \/ field W4 by RELAT_1:18; then field W1 =field R \/ {} \/ {a0} by A172,A175,RELAT_1:18; hence thesis; end; A176: field R <> {} implies field W1 =field R \/ { a0 } proof assume field R <> {}; then A177: field W3 = field R \/ { a0 } by Th2; field W1 =field (R \/ W3) \/ field W4 by RELAT_1:18; then field W1 =field R \/ (field R \/ { a0 }) \/ {a0} by A172,A177,RELAT_1:18; then field W1 =(field R \/ field R) \/ { a0 } \/ {a0} by XBOOLE_1:4; then field W1 =(field R \/ field R) \/ ({ a0 } \/ {a0}) by XBOOLE_1:4; hence thesis; end; A178: x in field W1 implies x in field R or x = a0 proof assume x in field W1; then x in field R or x in {a0} by A176,A173,XBOOLE_0:def 3; hence thesis by TARSKI:def 1; end; A179: [x,y] in W1 iff [x,y] in R or [x,y] in W3 or [x,y] in W4 proof [x,y] in W1 iff ([x,y] in (R \/ W3) or [x,y] in W4) by XBOOLE_0:def 3; hence thesis by XBOOLE_0:def 3; end; x in field W1 & y in field W1 & x <>y implies [x,y] in W1 or [y,x] in W1 proof assume that A180: x in field W1 and A181: y in field W1 and A182: x <>y; A183: not x in field R implies [x,y] in W1 or [y,x] in W1 proof assume not x in field R; then A184: x = a0 by A178,A180; A185: y in field R implies [x,y] in W1 or [y,x] in W1 proof assume y in field R; then [y,x] in W3 by A184,ZFMISC_1:106; hence thesis by A179; end; y = a0 implies [x,y] in W1 or [y,x] in W1 proof assume y = a0; then [x,y] in W4 by A184,TARSKI:def 1; hence thesis by A179; end; hence thesis by A178,A181,A185; end; A186: not y in field R implies [x,y] in W1 or [y,x] in W1 proof assume not y in field R; then A187: y = a0 by A178,A181; A188: x in field R implies [y,x] in W1 or [x,y] in W1 proof assume x in field R; then [x,y] in W3 by A187,ZFMISC_1:106; hence thesis by A179; end; x = a0 implies [y,x] in W1 or [x,y] in W1 proof assume x = a0; then [y,x] in W4 by A187,TARSKI:def 1; hence thesis by A179; end; hence thesis by A178,A180,A188; end; x in field R & y in field R implies [x,y] in W1 or [y,x] in W1 proof assume x in field R & y in field R; then [x,y] in R or [y,x] in R by A117,A182; hence thesis by A179; end; hence thesis by A183,A186; end; then A189: W1 is_connected_in field W1 by RELAT_2:def 6; assume A190: field R in D; for x,y holds [x,y] in W1 implies [x,y] in [: union D, union D :] proof let x,y; assume A191: [x,y] in W1; then y in field W1 by RELAT_1:15; then y in field R or y=a0 by A178; then A192: y in union D by A1,A4,A190; x in field W1 by A191,RELAT_1:15; then x in field R or x=a0 by A178; then x in union D by A1,A4,A190; hence thesis by A192,ZFMISC_1:def 2; end; then A193: W1 c= [: union D,union D :] by RELAT_1:def 3; A194: not a0 in field R by A1,A190; A195: [x,y] in W1 & y in field R implies [x,y] in R & x in field R proof assume that A196: [x,y] in W1 and A197: y in field R; A198: not [x,y] in W4 proof assume [x,y] in W4; then [x,y] = [a0,a0] by TARSKI:def 1; hence contradiction by A194,A197,XTUPLE_0:1; end; not [x,y] in W3 by A194,A197,ZFMISC_1:106; hence [x,y] in R by A179,A196,A198; [x,y] in R or [x,y] in W3 or [x,y] in W4 by A179,A196; hence thesis by A198,RELAT_1:15,ZFMISC_1:106; end; x in field W1 & y in field W1 & [x,y] in W1 & [y,x] in W1 implies x= y proof assume that A199: x in field W1 and A200: y in field W1 and A201: [x,y] in W1 and A202: [y,x] in W1; A203: x in field R implies x=y proof assume A204: x in field R; then A205: [y,x] in R by A195,A202; A206: y in field R by A195,A202,A204; then [x,y] in R by A195,A201; hence thesis by A84,A204,A205,A206; end; A207: y in field R implies x=y proof assume A208: y in field R; then A209: [x,y] in R by A195,A201; A210: x in field R by A195,A201,A208; then [y,x] in R by A195,A202; hence thesis by A84,A208,A209,A210; end; y in field R or y =a0 by A178,A200; hence thesis by A178,A199,A203,A207; end; then A211: W1 is_antisymmetric_in field W1 by RELAT_2:def 4; A212: y in field R implies W1-Seg(y) = R-Seg(y) proof assume A213: y in field R; A214: x in W1-Seg(y) implies x in R-Seg(y) proof assume A215: x in W1-Seg(y); then [x,y] in W1 by WELLORD1:1; then A216: [x,y] in R by A195,A213; x<>y by A215,WELLORD1:1; hence thesis by A216,WELLORD1:1; end; x in R-Seg(y) implies x in W1-Seg(y) proof assume A217: x in R-Seg(y); then [x,y] in R by WELLORD1:1; then A218: [x,y] in W1 by A179; x<>y by A217,WELLORD1:1; hence thesis by A218,WELLORD1:1; end; hence thesis by A214,TARSKI:1; end; A219: W1 is_well_founded_in field W1 proof let Y; assume that A220: Y c= field W1 and A221: Y <> {}; A222: not Y c=field R implies ex a st a in Y & W1-Seg(a) misses Y proof assume not Y c= field R; A223: not (field R) /\ Y = {} implies ex a st a in Y & W1-Seg(a) misses Y proof set X = (field R) /\ Y; A224: X c= field R by XBOOLE_1:17; assume not (field R) /\ Y = {}; then consider y such that A225: y in X and A226: R-Seg(y) misses X by A130,A224,WELLORD1:def 3; A227: R-Seg(y) /\ Y c= R-Seg(y) /\ X proof let x; assume A228: x in R-Seg(y) /\ Y; then A229: x in Y by XBOOLE_0:def 4; A230: x in R-Seg(y) by A228,XBOOLE_0:def 4; then [x,y] in R by WELLORD1:1; then x in field R by RELAT_1:15; then x in X by A229,XBOOLE_0:def 4; hence thesis by A230,XBOOLE_0:def 4; end; R-Seg(y) /\ X = {} by A226,XBOOLE_0:def 7; then W1-Seg(y) /\ Y = {} by A212,A224,A225,A227; then A231: W1-Seg(y) misses Y by XBOOLE_0:def 7; y in Y by A225,XBOOLE_0:def 4; hence thesis by A231; end; (field R) /\ Y = {} implies ex a st a in Y & W1-Seg(a) misses Y proof set y = the Element of Y; A232: W1-Seg(a0) c= field R proof let z be set; assume A233: z in W1-Seg(a0); then [z,a0] in W1 by WELLORD1:1; then A234: z in field W1 by RELAT_1:15; z <> a0 by A233,WELLORD1:1; hence thesis by A178,A234; end; A235: y in field W1 by A220,A221,TARSKI:def 3; assume A236: (field R) /\ Y = {}; then not y in field R by A221,XBOOLE_0:def 4; then y = a0 by A178,A235; then W1-Seg(y) /\ Y = {} by A236,A232,XBOOLE_1:3,26; then W1-Seg(y) misses Y by XBOOLE_0:def 7; hence thesis by A221; end; hence thesis by A223; end; Y c= field R implies ex a st a in Y & W1-Seg(a) misses Y proof assume A237: Y c= field R; then consider b such that A238: b in Y & R-Seg(b) misses Y by A130,A221,WELLORD1:def 3; take b; thus thesis by A212,A237,A238; end; hence thesis by A222; end; A239: for y st y in field W1 holds W1-Seg(y) in D & F.(W1-Seg(y)) = y proof let y; A240: y in field R implies W1-Seg(y) = R-Seg(y) proof assume A241: y in field R; A242: x in W1-Seg(y) implies x in R-Seg(y) proof A243: [x,y] in W4 implies [x,y] = [a0,a0] by TARSKI:def 1; assume A244: x in W1-Seg(y); then [x,y] in W1 by WELLORD1:1; then [x,y] in (R \/ W3) or [x,y] in W4 by XBOOLE_0:def 3; then A245: [x,y] in R or [x,y] in W3 or [x,y] in W4 by XBOOLE_0:def 3; not x=y by A244,WELLORD1:1; hence thesis by A194,A241,A245,A243,WELLORD1:1,XTUPLE_0:1 ,ZFMISC_1:106; end; x in R-Seg(y) implies x in W1-Seg(y) proof assume A246: x in R-Seg(y); then [x,y] in R by WELLORD1:1; then [x,y] in R \/ W3 by XBOOLE_0:def 3; then A247: [x,y] in W1 by XBOOLE_0:def 3; not x=y by A246,WELLORD1:1; hence thesis by A247,WELLORD1:1; end; hence thesis by A242,TARSKI:1; end; A248: x in W1-Seg(a0) implies x in field R proof assume A249: x in W1-Seg(a0); then [x,a0] in W1 by WELLORD1:1; then A250: x in field W1 by RELAT_1:15; not x=a0 by A249,WELLORD1:1; hence thesis by A178,A250; end; A251: x in field R implies x in W1-Seg(a0) proof assume A252: x in field R; then [x,a0] in W3 by ZFMISC_1:106; then [x,a0] in R \/ W3 by XBOOLE_0:def 3; then [x,a0] in W1 by XBOOLE_0:def 3; hence thesis by A194,A252,WELLORD1:1; end; assume y in field W1; then y in field R or y=a0 by A178; hence thesis by A103,A190,A240,A248,A251,TARSKI:1; end; x in field W1 & y in field W1 & z in field W1 & [x,y] in W1 & [y,z] in W1 implies [x,z] in W1 proof assume that A253: x in field W1 and y in field W1 and A254: z in field W1 and A255: [x,y] in W1 and A256: [y,z] in W1; A257: z = a0 implies [x,z] in W1 proof assume A258: z = a0; A259: x = a0 implies [x,z] in W1 proof assume x = a0; then [x,z] in W4 by A258,TARSKI:def 1; hence thesis by A179; end; x in field R implies [x,z] in W1 proof assume x in field R; then [x,z] in W3 by A258,ZFMISC_1:106; hence thesis by A179; end; hence thesis by A178,A253,A259; end; z in field R implies [x,z] in W1 proof assume A260: z in field R; then A261: [y,z] in R by A195,A256; A262: y in field R by A195,A256,A260; then [x,y] in R & x in field R by A195,A255; then [x,z] in R by A145,A260,A261,A262; hence thesis by A179; end; hence thesis by A178,A254,A257; end; then A263: W1 is_transitive_in field W1 by RELAT_2:def 8; x in field W1 implies [x,x] in W1 proof A264: x = a0 implies [x,x] in W1 proof A265: [a0,a0] in W4 by TARSKI:def 1; assume x=a0; hence thesis by A179,A265; end; A266: x in field R implies [x,x] in W1 proof assume x in field R; then [x,x] in R by A165; hence thesis by A179; end; assume x in field W1; hence thesis by A178,A266,A264; end; then W1 is_reflexive_in field W1 by RELAT_2:def 1; then W1 well_orders field W1 by A263,A211,A189,A219,WELLORD1:def 5; then W1 is well-ordering by WELLORD1:4; then W1 in G by A2,A193,A239; then field W1 c= field R by A97; hence contradiction by A1,A190,A171; end; R is_reflexive_in field R by A165,RELAT_2:def 1; then R well_orders field R by A164,A96,A129,A130,WELLORD1:def 5; hence thesis by A103,A170,WELLORD1:4; end; Lm1: X,M are_equipotent iff ex Z st (for x st x in X ex y st y in M & [x,y] in Z) & (for y st y in M ex x st x in X & [x,y] in Z) & for x,z1,y,z2 st [x,z1] in Z & [y,z2] in Z holds x = y iff z1 = z2 proof A1: ( ex Z st (for x st x in X ex y st y in M & [x,y] in Z) & (for y st y in M ex x st x in X & [x,y] in Z) & for x,z1,y,z2 st [x,z1] in Z & [y,z2] in Z holds x = y iff z1 = z2 ) implies X,M are_equipotent proof assume ex Z st (for x st x in X ex y st y in M & [x,y] in Z) & (for y st y in M ex x st x in X & [x,y] in Z) & for x,z1,y,z2 st [x,z1] in Z & [y,z2] in Z holds x = y iff z1 = z2; hence ex Z st (for x st x in X ex y st y in M & [x,y] in Z) & (for y st y in M ex x st x in X & [x,y] in Z) & for x,z1,y,z2 st [x,z1] in Z & [y,z2] in Z holds x = y iff z1 = z2; end; X,M are_equipotent implies ex Z st (for x st x in X ex y st y in M & [x, y] in Z) & (for y st y in M ex x st x in X & [x,y] in Z) & for x,z1,y,z2 st [x, z1] in Z & [y,z2] in Z holds x = y iff z1 = z2 proof assume ex Z st (for x st x in X ex y st y in M & [x,y] in Z) & (for y st y in M ex x st x in X & [x,y] in Z) & for x,z1,y,z2 st [x,z1] in Z & [y,z2] in Z holds x = y iff z1 = z2; hence thesis; end; hence thesis by A1; end; theorem for N ex R st R is well-ordering & field R = N proof let N; consider M such that A1: N in M & for X,Y holds X in M & Y c= X implies Y in M and A2: for X holds X in M implies bool X in M and A3: for X holds X c= M implies X,M are_equipotent or X in M by ZFMISC_1:112; defpred P[set] means not $1,M are_equipotent; consider D such that A4: A in D iff A in bool M & P[A] from XBOOLE_0:sch 1; A5: union D c= M proof let x; assume x in union D; then consider A such that A6: x in A and A7: A in D by TARSKI:def 4; A in bool M by A4,A7; hence thesis by A6; end; set F = id D; for Z st Z in D holds not F.Z in Z & F.Z in union D proof let Z; assume A8: Z in D; not Z in Z; hence not F.Z in Z by A8,FUNCT_1:18; X in D implies X in union D proof A9: X in { X } by TARSKI:def 1; assume X in D; then A10: X in bool M & not X,M are_equipotent by A4; A11: not { X },M are_equipotent proof A12: X <> bool X proof assume X = bool X; then not X in bool X; hence contradiction by ZFMISC_1:def 1; end; assume { X },M are_equipotent; then consider Z such that for x st x in { X } ex y st y in M & [x,y] in Z and A13: for y st y in M ex x st x in { X } & [x,y] in Z and A14: for x,z1,y,z2 st [x,z1] in Z & [y,z2] in Z holds x = y iff z1 = z2 by Lm1; bool X in M by A2,A3,A10; then consider y such that A15: y in {X} and A16: [y,bool X] in Z by A13; consider x such that A17: x in {X} and A18: [x,X] in Z by A3,A10,A13; x=X by A17,TARSKI:def 1; then y=x by A15,TARSKI:def 1; hence contradiction by A14,A12,A18,A16; end; X in M by A3,A10; then x in {X} implies x in M by TARSKI:def 1; then { X } c= M by TARSKI:def 3; then { X } in D by A4,A11; hence thesis by A9,TARSKI:def 4; end; then Z in union D by A8; hence thesis by A8,FUNCT_1:18; end; then consider S such that A19: field S c= union D and A20: S is well-ordering and A21: not field S in D and for y st y in field S holds S-Seg(y) in D & F.(S-Seg(y)) = y by Th5; not field S c= M or field S,M are_equipotent by A4,A21; then consider Z such that A22: for x st x in field S ex y st y in M & [x,y] in Z and A23: for y st y in M ex x st x in field S & [x,y] in Z and A24: for x,z1,y,z2 st [x,z1] in Z & [y,z2] in Z holds x = y iff z1 = z2 by A5,A19,Lm1,XBOOLE_1:1; defpred P[set,set] means [$2,$1] in Z; A25: for x st x in M ex y st P[x,y] proof let x; assume x in M; then ex y st y in field S & [y,x] in Z by A23; hence thesis; end; A26: for x,z1,z2 st x in M & P[x,z1] & P[x,z2] holds z1 = z2 by A24; consider H such that A27: dom H = M and A28: for x st x in M holds P[x, H.x] from FUNCT_1:sch 2(A26,A25); defpred P[set,set] means $2={$1}; defpred P[set] means ex x,y st $1=[x,y] & [H.x,H.y] in S; consider W0 such that A29: z in W0 iff z in [: M,M :] & P[z] from XBOOLE_0:sch 1; A30: x in field S implies x in rng H proof assume x in field S; then consider y such that A31: y in M and A32: [x,y] in Z by A22; set z1= H.y; z1 in rng H & [z1,y] in Z by A27,A28,A31,FUNCT_1:def 3; hence thesis by A24,A32; end; for z1,z2 st z1 in dom H & z2 in dom H & H.z1 = H.z2 holds z1 = z2 proof let z1,z2; assume that A33: z1 in dom H & z2 in dom H and A34: H.z1 = H.z2; [H.z1,z1] in Z & [H.z2,z2] in Z by A27,A28,A33; hence thesis by A24,A34; end; then A35: H is one-to-one by FUNCT_1:def 4; z in W0 implies ex x,y st z=[x,y] proof assume z in W0; then ex z1,z2 st z=[z1,z2] & [H.z1,H.z2] in S by A29; hence thesis; end; then reconsider W0 as Relation by RELAT_1:def 1; A36: z in field W0 implies z in M proof assume z in field W0; then consider z1 such that A37: [z,z1] in W0 or [z1,z] in W0 by Th1; A38: [z1,z] in W0 implies z in M proof assume [z1,z] in W0; then [z1,z] in [: M,M :] by A29; hence thesis by ZFMISC_1:87; end; [z,z1] in W0 implies z in M proof assume [z,z1] in W0; then [z,z1] in [: M,M :] by A29; hence thesis by ZFMISC_1:87; end; hence thesis by A37,A38; end; A39: for x st x in N ex y st P[x,y]; A40: for x,z1,z2 st x in N & P[x,z1] & P[x,z2] holds z1 = z2; consider H1 such that A41: dom H1 = N and A42: for x st x in N holds P[x, H1.x] from FUNCT_1:sch 2(A40,A39); for z1,z2 st z1 in dom H1 & z2 in dom H1 & H1.z1 = H1.z2 holds z1 = z2 proof let z1,z2; assume that A43: z1 in dom H1 and A44: z2 in dom H1 and A45: H1.z1 = H1.z2; H1.z1={z1} by A41,A42,A43; then A46: z1 in H1.z2 by A45,TARSKI:def 1; H1.z2={z2} by A41,A42,A44; hence thesis by A46,TARSKI:def 1; end; then A47: H1 is one-to-one by FUNCT_1:def 4; set S1=W0 |_2 rng H1; x in rng H implies x in field S proof assume x in rng H; then consider z1 such that A48: z1 in dom H & x = H.z1 by FUNCT_1:def 3; ( ex z2 st z2 in field S & [z2,z1] in Z)& [x,z1] in Z by A23,A27,A28,A48; hence thesis by A24; end; then A49: rng H = field S by A30,TARSKI:1; z in M implies z in field W0 proof assume A50: z in M; ex z1 st [z,z1] in W0 or [z1,z] in W0 proof H.z in field S by A27,A49,A50,FUNCT_1:def 3; then consider z2 such that A51: [H.z,z2] in S or [z2,H.z] in S by Th1; A52: [H.z,z2] in S implies ex z1 st [z,z1] in W0 or [z1,z] in W0 proof assume A53: [H.z,z2] in S; then z2 in rng H by A49,RELAT_1:15; then consider z3 such that A54: z3 in dom H and A55: z2=H.z3 by FUNCT_1:def 3; take z3; [z,z3] in [: M,M :] by A27,A50,A54,ZFMISC_1:87; hence thesis by A29,A53,A55; end; [z2,H.z] in S implies ex z1 st [z,z1] in W0 or [z1,z] in W0 proof assume A56: [z2,H.z] in S; then z2 in rng H by A49,RELAT_1:15; then consider z3 such that A57: z3 in dom H and A58: z2=H.z3 by FUNCT_1:def 3; take z3; [z3,z] in [: M,M :] by A27,A50,A57,ZFMISC_1:87; hence thesis by A29,A56,A58; end; hence thesis by A51,A52; end; hence thesis by Th1; end; then A59: field W0 = M by A36,TARSKI:1; for a,b holds [a,b] in W0 iff a in field W0 & b in field W0 & [H.a,H.b ] in S proof let a,b; A60: [a,b] in W0 implies a in field W0 & b in field W0 & [H.a,H.b] in S proof assume A61: [a,b] in W0; then A62: [a,b] in [: M,M :] by A29; consider x,y such that A63: [a,b] = [x,y] and A64: [H.x,H.y] in S by A29,A61; a=x by A63,XTUPLE_0:1; hence thesis by A59,A62,A63,A64,XTUPLE_0:1,ZFMISC_1:87; end; a in field W0 & b in field W0 & [H.a,H.b] in S implies [a,b] in W0 proof assume that A65: a in field W0 & b in field W0 and A66: [H.a,H.b] in S; [a,b] in [: M,M :] by A59,A65,ZFMISC_1:87; hence thesis by A29,A66; end; hence thesis by A60; end; then H is_isomorphism_of W0,S by A27,A35,A49,A59,WELLORD1:def 7; then A67: (H") is_isomorphism_of S, W0 by WELLORD1:39; then W0 is well-ordering by A20,WELLORD1:44; then A68: S1 is well-ordering by WELLORD1:25; defpred P[set] means ex x,y st $1=[x,y] & [H1.x,H1.y] in S1; consider W00 such that A69: z in W00 iff z in [: N,N :] & P[z] from XBOOLE_0:sch 1; z in W00 implies ex x,y st z=[x,y] proof assume z in W00; then ex z1,z2 st z=[z1,z2] & [H1.z1,H1.z2] in S1 by A69; hence thesis; end; then reconsider W00 as Relation by RELAT_1:def 1; A70: z in field W00 implies z in N proof assume z in field W00; then consider z1 such that A71: [z,z1] in W00 or [z1,z] in W00 by Th1; A72: [z1,z] in W00 implies z in N proof assume [z1,z] in W00; then [z1,z] in [: N,N :] by A69; hence thesis by ZFMISC_1:87; end; [z,z1] in W00 implies z in N proof assume [z,z1] in W00; then [z,z1] in [: N,N :] by A69; hence thesis by ZFMISC_1:87; end; hence thesis by A71,A72; end; rng H1 c= M proof let x; assume x in rng H1; then consider y such that A73: y in dom H1 and A74: x = H1.y by FUNCT_1:def 3; z1 in { y } implies z1 in N by A41,A73,TARSKI:def 1; then A75: { y } c= N by TARSKI:def 3; x = { y } by A41,A42,A73,A74; hence thesis by A1,A75; end; then A76: field S1 = rng H1 by A20,A59,A67,WELLORD1:31,44; z in N implies z in field W00 proof assume A77: z in N; ex z1 st [z,z1] in W00 or [z1,z] in W00 proof H1.z in field S1 by A41,A76,A77,FUNCT_1:def 3; then consider z2 such that A78: [H1.z,z2] in S1 or [z2,H1.z] in S1 by Th1; A79: [H1.z,z2] in S1 implies ex z1 st [z,z1] in W00 or [z1,z] in W00 proof assume A80: [H1.z,z2] in S1; then z2 in rng H1 by A76,RELAT_1:15; then consider z3 such that A81: z3 in dom H1 and A82: z2=H1.z3 by FUNCT_1:def 3; take z3; [z,z3] in [: N,N :] by A41,A77,A81,ZFMISC_1:87; hence thesis by A69,A80,A82; end; [z2,H1.z] in S1 implies ex z1 st [z,z1] in W00 or [z1,z] in W00 proof assume A83: [z2,H1.z] in S1; then z2 in rng H1 by A76,RELAT_1:15; then consider z3 such that A84: z3 in dom H1 and A85: z2=H1.z3 by FUNCT_1:def 3; take z3; [z3,z] in [: N,N :] by A41,A77,A84,ZFMISC_1:87; hence thesis by A69,A83,A85; end; hence thesis by A78,A79; end; hence thesis by Th1; end; then A86: field W00 = N by A70,TARSKI:1; for a,b holds [a,b] in W00 iff a in field W00 & b in field W00 & [H1.a ,H1.b] in S1 proof let a,b; A87: [a,b] in W00 implies a in field W00 & b in field W00 & [H1.a,H1.b] in S1 proof assume A88: [a,b] in W00; then A89: [a,b] in [: N,N :] by A69; consider x,y such that A90: [a,b] = [x,y] and A91: [H1.x,H1.y] in S1 by A69,A88; a=x by A90,XTUPLE_0:1; hence thesis by A86,A89,A90,A91,XTUPLE_0:1,ZFMISC_1:87; end; a in field W00 & b in field W00 & [H1.a,H1.b] in S1 implies [a,b] in W00 proof assume that A92: a in field W00 & b in field W00 and A93: [H1.a,H1.b] in S1; [a,b] in [: N,N :] by A86,A92,ZFMISC_1:87; hence thesis by A69,A93; end; hence thesis by A87; end; then H1 is_isomorphism_of W00,S1 by A41,A47,A76,A86,WELLORD1:def 7; then (H1") is_isomorphism_of S1, W00 by WELLORD1:39; hence thesis by A68,A86,WELLORD1:44; end; begin definition let f be Function; let a,b,c be set; func f.(a,b,c) -> set equals f.[a,b,c]; correctness; end; reserve A,B,C,D,E for non empty set, a for Element of A, b for Element of B, c for Element of C, d for Element of D, X,Y,Z,S,x,y,z,s,t for set; definition let A,B,C,D; let f be Function of [:A,B,C:],D; let a,b,c; redefine func f.(a,b,c) -> Element of D; coherence proof f.([a,b,c]) is Element of D; hence thesis; end; end; theorem Th1: for f1,f2 being Function of [:X,Y,Z:],D st for x,y,z st x in X & y in Y & z in Z holds f1.[x,y,z] = f2.[x,y,z] holds f1 = f2 proof let f1,f2 be Function of [:X,Y,Z:],D such that A1: for x,y,z st x in X & y in Y & z in Z holds f1.[x,y,z] = f2.[x,y,z]; for t st t in [:X,Y,Z:] holds f1.t = f2.t proof let t; assume t in [:X,Y,Z:]; then ex x,y,z st x in X & y in Y & z in Z & t = [x,y,z] by MCART_1:68; hence thesis by A1; end; hence thesis by FUNCT_2:12; end; theorem Th2: for f1,f2 being Function of [:A,B,C:],D st for a,b,c holds f1.[a, b,c] = f2.[a,b,c] holds f1 = f2 proof let f1,f2 be Function of [:A,B,C:],D; assume for a,b,c holds f1.[a,b,c] = f2.[a,b,c]; then for x,y,z st x in A & y in B & z in C holds f1.[x,y,z] = f2.[x,y,z]; hence thesis by Th1; end; theorem for f1,f2 being Function of [:A,B,C:],D st for a being Element of A for b being Element of B for c being Element of C holds f1.(a,b,c) = f2.(a,b,c) holds f1 = f2 proof let f1,f2 be Function of [:A,B,C:],D such that A1: for a being Element of A for b being Element of B for c being Element of C holds f1.(a,b,c) = f2.(a,b,c); for a being Element of A for b being Element of B for c being Element of C holds f1.[a,b,c] = f2.[a,b,c] proof let a be Element of A; let b be Element of B; let c be Element of C; f1.(a,b,c) = f1.[a,b,c] & f2.(a,b,c) = f2.[a,b,c]; hence thesis by A1; end; hence thesis by Th2; end; definition let A be set; mode TriOp of A is Function of [:A,A,A:],A; end; scheme FuncEx3D { X,Y,Z,T() -> non empty set, P[set,set,set,set] } : ex f being Function of [:X(),Y(),Z():],T() st for x being Element of X() for y being Element of Y() for z being Element of Z() holds P[x,y,z,f.[x,y,z]] provided A1: for x being Element of X() for y being Element of Y() for z being Element of Z() ex t being Element of T() st P[x,y,z,t] proof defpred Q[set,set] means ( for x being (Element of X()), y being (Element of Y()), z being Element of Z() st $1 = [x,y,z] holds P[x,y,z,$2]); A2: for p being Element of [:X(),Y(),Z():] ex t being Element of T() st Q[p, t] proof let p be Element of [:X(),Y(),Z():]; consider x1, y1, z1 be set such that A3: x1 in X() and A4: y1 in Y() and A5: z1 in Z() and A6: p = [x1,y1,z1] by MCART_1:68; reconsider z1 as Element of Z() by A5; reconsider y1 as Element of Y() by A4; reconsider x1 as Element of X() by A3; consider t being Element of T() such that A7: P[x1,y1,z1,t] by A1; take t; let x be (Element of X()), y be (Element of Y()), z be Element of Z(); assume A8: p = [x,y,z]; then x1 = x & y1 = y by A6,XTUPLE_0:3; hence thesis by A6,A7,A8,XTUPLE_0:3; end; consider f being Function of [:X(),Y(),Z():],T() such that A9: for p being Element of [:X(),Y(),Z():] holds Q[p,f.p] from FUNCT_2: sch 3 (A2); take f; let x be Element of X(); let y be Element of Y(); let z be Element of Z(); thus thesis by A9; end; scheme TriOpEx { A()->non empty set, P[ Element of A(), Element of A(), Element of A(), Element of A()] }: ex o being TriOp of A() st for a,b,c being Element of A () holds P[a,b,c,o.(a,b,c)] provided A1: for x,y,z being Element of A() ex t being Element of A() st P[x,y,z, t] proof defpred Q[Element of A(),Element of A(),Element of A(),Element of A()] means for r being Element of A() st r = $4 holds P[$1,$2,$3,r]; A2: for x,y,z being Element of A() ex t being Element of A() st Q[x,y,z,t] proof let x,y,z be Element of A(); consider t being Element of A() such that A3: P[x,y,z,t] by A1; take t; thus thesis by A3; end; consider f being Function of [:A(),A(),A():],A() such that A4: for a,b,c being Element of A() holds Q[a,b,c,f.[a,b,c]] from FuncEx3D(A2 ); take f; let a,b,c be Element of A(); thus thesis by A4; end; scheme Lambda3D { X, Y, Z, T()->non empty set, F( Element of X(), Element of Y(), Element of Z()) -> Element of T() }: ex f being Function of [:X(),Y(),Z():],T() st for x being Element of X() for y being Element of Y() for z being Element of Z() holds f.[x,y,z]=F(x,y,z) proof defpred Q[Element of X(),Element of Y(),Element of Z(),Element of T()] means $4 = F($1,$2,$3); A1: for x being Element of X() for y being Element of Y() for z being Element of Z() ex t being Element of T() st Q[x,y,z,t]; ex f being Function of [:X(),Y(),Z():],T() st for x being Element of X() for y being Element of Y() for z being Element of Z() holds Q[x,y,z,f.[x,y,z]] from FuncEx3D(A1); hence thesis; end; scheme TriOpLambda { A,B,C,D()->non empty set, O( Element of A(), Element of B(), Element of C()) -> Element of D() }: ex o being Function of [:A(),B(),C():],D() st for a being Element of A(), b being Element of B(), c being Element of C() holds o.(a,b,c) = O(a,b,c) proof consider f being Function of [:A(),B(),C():],D() such that A1: for a being Element of A(), b being Element of B(), c being Element of C() holds f.[a,b,c] = O(a,b,c) from Lambda3D; take f; let a be Element of A(), b be Element of B(), c be Element of C(); thus thesis by A1; end; definition let f be Function; let a,b,c,d be set; func f.(a,b,c,d) -> set equals f.[a,b,c,d]; correctness; end; definition let A,B,C,D,E; let f be Function of [:A,B,C,D:],E; let a,b,c,d; redefine func f.(a,b,c,d) -> Element of E; coherence proof f.([a,b,c,d]) is Element of E; hence thesis; end; end; theorem Th4: for f1,f2 being Function of [:X,Y,Z,S:],D st for x,y,z,s st x in X & y in Y & z in Z & s in S holds f1.[x,y,z,s] = f2.[x,y,z,s] holds f1 = f2 proof let f1,f2 be Function of [:X,Y,Z,S:],D such that A1: for x,y,z,s st x in X & y in Y & z in Z & s in S holds f1.[x,y,z,s] = f2.[x,y,z,s]; for t st t in [:X,Y,Z,S:] holds f1.t = f2.t proof let t; assume t in [:X,Y,Z,S:]; then ex x,y,z,s st x in X & y in Y & z in Z & s in S & t = [x,y,z,s] by MCART_1:79; hence thesis by A1; end; hence thesis by FUNCT_2:12; end; theorem Th5: for f1,f2 being Function of [:A,B,C,D:],E st for a,b,c,d holds f1 .[a,b,c,d] = f2.[a,b,c,d] holds f1 = f2 proof let f1,f2 be Function of [:A,B,C,D:],E; assume for a,b,c,d holds f1.[a,b,c,d] = f2.[a,b,c,d]; then for x,y,z,s st x in A & y in B & z in C & s in D holds f1.[x,y,z,s] = f2 .[x,y,z,s]; hence thesis by Th4; end; theorem for f1,f2 being Function of [:A,B,C,D:],E st for a,b,c,d holds f1.(a,b ,c,d) = f2.(a,b,c,d) holds f1 = f2 proof let f1,f2 be Function of [:A,B,C,D:],E such that A1: for a,b,c,d holds f1.(a,b,c,d) = f2.(a,b,c,d); for a,b,c,d holds f1.[a,b,c,d] = f2.[a,b,c,d] proof let a,b,c,d; f1.(a,b,c,d) = f1.[a,b,c,d] & f2.(a,b,c,d) = f2.[a,b,c,d]; hence thesis by A1; end; hence thesis by Th5; end; definition let A; mode QuaOp of A is Function of [:A,A,A,A:],A; end; scheme FuncEx4D { X, Y, Z, S, T() -> non empty set, P[set,set,set,set,set] }: ex f being Function of [:X(),Y(),Z(),S():],T() st for x being Element of X() for y being Element of Y() for z being Element of Z() for s being Element of S() holds P[x,y,z,s,f.[x,y,z,s]] provided A1: for x being Element of X() for y being Element of Y() for z being Element of Z() for s being Element of S() ex t being Element of T() st P[x,y,z, s,t] proof defpred Q[set,set] means for x being (Element of X()), y being (Element of Y ()), z being (Element of Z()), s being Element of S() st $1 = [x,y,z,s] holds P [x,y,z,s,$2]; A2: for p being Element of [:X(),Y(),Z(),S():] ex t being Element of T() st Q[p,t] proof let p be Element of [:X(),Y(),Z(),S():]; consider x1, y1, z1, s1 be set such that A3: x1 in X() and A4: y1 in Y() and A5: z1 in Z() and A6: s1 in S() and A7: p = [x1,y1,z1,s1] by MCART_1:79; reconsider s1 as Element of S() by A6; reconsider z1 as Element of Z() by A5; reconsider y1 as Element of Y() by A4; reconsider x1 as Element of X() by A3; consider t being Element of T() such that A8: P[x1,y1,z1,s1,t] by A1; take t; let x be Element of X(), y be Element of Y(), z be Element of Z(), s be Element of S(); assume A9: p = [x,y,z,s]; then A10: z1 = z by A7,XTUPLE_0:5; x1 = x & y1 = y by A7,A9,XTUPLE_0:5; hence thesis by A7,A8,A9,A10,XTUPLE_0:5; end; consider f being Function of [:X(),Y(),Z(),S():],T() such that A11: for p being Element of [:X(),Y(),Z(),S():] holds Q[p,f.p] from FUNCT_2:sch 3(A2); take f; let x be Element of X(); let y be Element of Y(); let z be Element of Z(); let s be Element of S(); thus thesis by A11; end; scheme QuaOpEx { A()->non empty set, P[ Element of A(), Element of A(), Element of A(), Element of A(), Element of A()] }: ex o being QuaOp of A() st for a,b,c,d being Element of A() holds P[a,b,c,d,o.(a,b,c,d)] provided A1: for x,y,z,s being Element of A() ex t being Element of A() st P[x,y, z,s,t] proof defpred Q[Element of A(), Element of A(),Element of A(), Element of A(), Element of A()] means for r being Element of A() st r = $5 holds P[$1,$2,$3,$4, $5]; A2: for x,y,z,s being Element of A() ex t being Element of A() st Q[x,y,z,s, t] proof let x,y,z,s be Element of A(); consider t being Element of A() such that A3: P[x,y,z,s,t] by A1; take t; thus thesis by A3; end; consider f being Function of [:A(),A(),A(),A():],A() such that A4: for a,b,c,d being Element of A() holds Q[a,b,c,d,f.[a,b,c,d]] from FuncEx4D(A2); take f; let a,b,c,d be Element of A(); thus thesis by A4; end; scheme Lambda4D { X, Y, Z, S, T() -> non empty set, F( Element of X(), Element of Y (), Element of Z(), Element of S()) -> Element of T() }: ex f being Function of [:X(),Y(),Z(),S():],T() st for x being Element of X() for y being Element of Y( ) for z being Element of Z() for s being Element of S() holds f.[x,y,z,s]=F(x,y ,z,s) proof defpred P[Element of X(),Element of Y(),Element of Z(),Element of S(), Element of T()] means $5 = F($1,$2,$3,$4); A1: for x being Element of X() for y being Element of Y() for z being Element of Z() for s being Element of S() ex t being Element of T() st P[x,y,z, s,t]; ex f being Function of [:X(),Y(),Z(),S():],T() st for x being Element of X() for y being Element of Y() for z being Element of Z() for s being Element of S() holds P[x,y,z,s,f.[x,y,z,s]] from FuncEx4D(A1); hence thesis; end; scheme QuaOpLambda { A()->non empty set, O( Element of A(), Element of A(), Element of A(), Element of A()) -> Element of A() }: ex o being QuaOp of A() st for a,b ,c,d being Element of A() holds o.(a,b,c,d) = O(a,b,c,d) proof deffunc F(Element of A(),Element of A(),Element of A(),Element of A()) = O( $1,$2,$3,$4); consider f being Function of [:A(),A(),A(),A():],A() such that A1: for a,b,c,d being Element of A() holds f.[a,b,c,d] = F(a,b,c,d) from Lambda4D; take f; let a,b,c,d be Element of A(); thus thesis by A1; end; begin reserve a,b,d for set; scheme Schemat0 {P[set]} : ex a st P[a] provided A1: for a holds P[a] proof set a = the set; P[a] by A1; hence thesis; end; scheme Schemat3 {S[set,set]} : for b ex a st S[a,b] provided A1: ex a st for b holds S[a,b] proof thus thesis by A1; end; scheme Schemat8 {P[set],Q[set]} : (for a holds P[a]) implies for a holds Q[a] provided A1: for a holds P[a] implies Q[a] proof thus thesis by A1; end; scheme Schemat9 {P[set],Q[set]} : (for a holds P[a]) iff for a holds Q[a] provided A1: for a holds P[a] iff Q[a] proof thus (for a holds P[a]) implies for a holds Q[a] proof assume A2: for a holds P[a]; now let a; P[a] iff Q[a] by A1; hence Q[a] by A2; end; hence thesis; end; assume A3: for a holds Q[a]; now let a; P[a] iff Q[a] by A1; hence P[a] by A3; end; hence thesis; end; scheme Schemat17 {P[set],T[]} : (for a holds P[a]) implies T[] provided A1: for a holds P[a] implies T[] proof assume A2: for a holds P[a]; now let a; P[a] by A2; hence thesis by A1; end; hence thesis; end; scheme Schemat18a {P[set],Q[set]} : ex a st for b holds P[a] or Q[b] provided A1: (ex a st P[a]) or for b holds Q[b] proof now A2: now set a = the set; assume for b holds Q[b]; then for b holds P[a] or Q[b]; hence thesis; end; now given a such that A3: P[a]; for b holds P[a] or Q[b] by A3; hence thesis; end; hence thesis by A1,A2; end; hence thesis; end; scheme Schemat18b {P[set],Q[set]} : (ex a st P[a]) or for b holds Q[b] provided A1: ex a st for b holds P[a] or Q[b] proof thus thesis by A1; end; scheme Schemat20b {P[set],Q[set]} : ex a st for b holds P[a] or Q[b] provided A1: for b ex a st P[a] or Q[b] proof A2: (ex a st P[a]) or for b holds Q[b] by A1; ex a st for b holds P[a] or Q[b] from Schemat18a(A2); hence thesis; end; scheme Schemat22a {P[set],Q[set]} : for b ex a st P[a] & Q[b] provided A1: (ex a st P[a]) & for b holds Q[b] proof thus thesis by A1; end; scheme Schemat22b {P[set],Q[set]} : (ex a st P[a]) & for b holds Q[b] provided A1: for b ex a st P[a] & Q[b] proof assume A2: (for a holds not P[a]) or ex b st not Q[b]; per cases by A2; suppose ex b st not Q[b]; then consider b such that A3: not Q[b]; now let d; assume d = b; ex a st P[a] & Q[b] by A1; hence contradiction by A3; end; hence thesis; end; suppose A4: for a holds not P[a]; now let b; ex a st ( P[a])& Q[b] by A1; hence thesis by A4; end; hence thesis; end; end; scheme Schemat23b {P[set],Q[set]} : ex a st for b holds P[a] & Q[b] provided A1: for b ex a st P[a] & Q[b] proof A2: for b ex a st P[a] & Q[b] by A1; (ex a st P[a]) & for b holds Q[b] from Schemat22b(A2); hence thesis; end; scheme Schemat28 {S[set,set]} : ex b st for a holds S[a,b] provided A1: for a,b holds S[a,b] proof now let b; for a holds S[a,b] by A1; hence thesis; end; hence thesis; end; scheme Schemat30 {S[set,set]} : ex a st S[a,a] provided A1: ex a st for b holds S[a,b] proof thus thesis by A1; end; scheme Schemat31 {S[set,set]} : for a ex b st S[b,a] provided A1: for a holds S[a,a] proof thus thesis by A1; end; scheme Schemat33 {S[set,set]} : for a ex b st S[a,b] provided A1: for a holds S[a,a] proof thus thesis by A1; end; scheme Schemat36 {S[set,set]} : ex a,b st S[a,b] provided A1: for b ex a st S[a,b] proof set b = the set; ex a st S[a,b] by A1; hence thesis; end; begin reserve x,y,z,t,X,Y,Z,W for set; reserve R,S,T for Relation; Lm1: X <> {} & Y <> {} implies dom [:X,Y:] = X & rng [:X,Y:] = Y by RELAT_1:160; theorem Th1: dom (R /\ [:X,Y:]) c= X & rng (R /\ [:X,Y:]) c= Y proof per cases; suppose X = {} or Y = {}; then R /\ [:X,Y:] = R /\ {} by ZFMISC_1:90 .= {}; hence thesis by RELAT_1:38,XBOOLE_1:2; end; suppose A1: X <> {} & Y <> {}; rng (R /\ [:X,Y:]) c= rng R /\ rng [:X,Y:] by RELAT_1:13; then A2: rng (R /\ [:X,Y:]) c= rng R /\ Y by A1,Lm1; dom (R /\ [:X,Y:]) c= dom R /\ dom [:X,Y:] by RELAT_1:2; then A3: dom (R /\ [:X,Y:]) c= dom R /\ X by A1,Lm1; dom R /\ X c= X by XBOOLE_1:17; hence dom (R /\ [:X,Y:]) c= X by A3,XBOOLE_1:1; rng R /\ Y c= Y by XBOOLE_1:17; hence rng (R /\ [:X,Y:]) c= Y by A2,XBOOLE_1:1; end; end; theorem X misses Y implies dom (R /\ [:X,Y:]) misses rng (R /\ [:X,Y:]) proof assume A1: X /\ Y = {}; dom (R /\ [:X,Y:]) c= X by Th1; then A2: dom (R /\ [:X,Y:]) /\ rng (R /\ [:X,Y:]) c= X /\ rng (R /\ [:X,Y:]) by XBOOLE_1:26; X /\ rng (R /\ [:X,Y:]) c= X /\ Y by Th1,XBOOLE_1:26; hence dom (R /\ [:X,Y:]) /\ rng (R /\ [:X,Y:]) = {} by A1,A2,XBOOLE_1:1,3; end; theorem Th3: R c= [:X,Y:] implies dom R c= X & rng R c= Y proof assume R c= [:X,Y:]; then R /\ [:X,Y:] = R by XBOOLE_1:28; hence thesis by Th1; end; theorem R c= [:X,Y:] implies R~ c= [:Y,X:] proof assume A1: R c= [:X,Y:]; let z,t; assume [z,t] in R~; then [t,z] in R by RELAT_1:def 7; then t in X & z in Y by A1,ZFMISC_1:87; hence thesis by ZFMISC_1:87; end; theorem [:X,Y:]~ = [:Y,X:] proof let x,y; thus [x,y] in [:X,Y:]~ implies [x,y] in [:Y,X:] proof assume [x,y] in [:X,Y:]~; then [y,x] in [:X,Y:] by RELAT_1:def 7; then y in X & x in Y by ZFMISC_1:87; hence thesis by ZFMISC_1:87; end; assume [x,y] in [:Y,X:]; then y in X & x in Y by ZFMISC_1:87; then [y,x] in [:X,Y:] by ZFMISC_1:87; hence thesis by RELAT_1:def 7; end; theorem Th6: (R \/ S) * T = (R * T) \/ (S * T) proof thus (R \/ S) * T = (R * T) \/ (S * T) proof let x,y; thus [x,y] in (R \/ S) * T implies [x,y] in (R * T) \/ (S * T) proof assume [x,y] in (R \/ S) * T; then consider z such that A1: [x,z] in R \/ S & [z,y] in T by RELAT_1:def 8; [x,z] in R & [z,y] in T or [x,z] in S & [z,y] in T by A1,XBOOLE_0:def 3; then [x,y] in R * T or [x,y] in S *T by RELAT_1:def 8; hence thesis by XBOOLE_0:def 3; end; assume A2: [x,y] in (R * T) \/ (S * T); per cases by A2,XBOOLE_0:def 3; suppose [x,y] in S * T; then consider z such that A3: [x,z] in S and A4: [z,y] in T by RELAT_1:def 8; [x,z] in R \/ S by A3,XBOOLE_0:def 3; hence thesis by A4,RELAT_1:def 8; end; suppose [x,y] in R * T; then consider z such that A5: [x,z] in R and A6: [z,y] in T by RELAT_1:def 8; [x,z] in R \/ S by A5,XBOOLE_0:def 3; hence thesis by A6,RELAT_1:def 8; end; end; end; theorem (X misses Y & R c= [:X,Y:] \/ [:Y,X:] & [x,y] in R & x in X implies not x in Y & not y in X & y in Y) & (X misses Y & R c= [:X,Y:] \/ [:Y,X:] & [x,y] in R & y in Y implies not y in X & not x in Y & x in X) & (X misses Y & R c= [:X,Y:] \/ [:Y,X:] & [x,y] in R & x in Y implies not x in X & not y in Y & y in X) & (X misses Y & R c= [:X,Y:] \/ [:Y,X:] & [x,y] in R & y in X implies not x in X & not y in Y & x in Y) proof thus X misses Y & R c= [:X,Y:] \/ [:Y,X:] & [x,y] in R & x in X implies not x in Y & not y in X & y in Y proof assume that A1: X misses Y and A2: R c= [:X,Y:] \/ [:Y,X:] & [x,y] in R and A3: x in X; A4: not [x,y] in [:Y,X:] proof assume A5: [x,y] in [:Y,X:]; not x in Y by A1,A3,XBOOLE_0:3; hence thesis by A5,ZFMISC_1:87; end; A6: [x,y] in [:X,Y:] implies thesis proof assume [x,y] in [:X,Y:]; then x in X & y in Y by ZFMISC_1:87; hence thesis by A1,XBOOLE_0:3; end; [:X,Y:] misses [:Y,X:] by A1,ZFMISC_1:104; hence thesis by A2,A6,A4,XBOOLE_0:5; end; thus X misses Y & R c= [:X,Y:] \/ [:Y,X:] & [x,y] in R & y in Y implies not y in X & not x in Y & x in X proof assume that A7: X misses Y and A8: R c= [:X,Y:] \/ [:Y,X:] & [x,y] in R and A9: y in Y; A10: not [x,y] in [:Y,X:] proof assume A11: [x,y] in [:Y,X:]; not y in X by A7,A9,XBOOLE_0:3; hence thesis by A11,ZFMISC_1:87; end; [x,y] in [:X,Y:] implies thesis proof assume [x,y] in [:X,Y:]; then x in X & y in Y by ZFMISC_1:87; hence thesis by A7,XBOOLE_0:3; end; hence thesis by A8,A10,XBOOLE_0:def 3; end; thus X misses Y & R c= [:X,Y:] \/ [:Y,X:] & [x,y] in R & x in Y implies not x in X & not y in Y & y in X proof assume that A12: X misses Y and A13: R c= [:X,Y:] \/ [:Y,X:] & [x,y] in R and A14: x in Y; A15: not [x,y] in [:X,Y:] proof assume A16: [x,y] in [:X,Y:]; not x in X by A12,A14,XBOOLE_0:3; hence thesis by A16,ZFMISC_1:87; end; [x,y] in [:Y,X:] & not [x,y] in [:X,Y:] implies thesis proof assume [x,y] in [:Y,X:] & not [x,y] in [:X,Y:]; then x in Y & y in X & not x in X or x in Y & y in X & not y in Y by ZFMISC_1:87; hence thesis by A12,XBOOLE_0:3; end; hence thesis by A13,A15,XBOOLE_0:def 3; end; assume that A17: X misses Y and A18: R c= [:X,Y:] \/ [:Y,X:] & [x,y] in R and A19: y in X; A20: not [x,y] in [:X,Y:] proof assume A21: [x,y] in [:X,Y:]; not y in Y by A17,A19,XBOOLE_0:3; hence thesis by A21,ZFMISC_1:87; end; [x,y] in [:Y,X:] implies thesis proof assume [x,y] in [:Y,X:]; then x in Y & y in X by ZFMISC_1:87; hence thesis by A17,XBOOLE_0:3; end; hence thesis by A18,A20,XBOOLE_0:def 3; end; theorem Th8: R c= [:X,Y:] implies R|Z = R /\ [:Z,Y:] & (Z|`R) = R /\ [:X,Z:] proof assume A1: R c= [:X,Y:]; thus (R|Z) = R /\ [:Z,Y:] proof let x,y; thus [x,y] in (R|Z) implies [x,y] in R /\ [:Z,Y:] proof assume A2: [x,y] in (R|Z); then A3: x in Z by RELAT_1:def 11; A4: [x,y] in R by A2,RELAT_1:def 11; then y in Y by A1,ZFMISC_1:87; then [x,y] in [:Z,Y:] by A3,ZFMISC_1:87; hence thesis by A4,XBOOLE_0:def 4; end; thus [x,y] in R /\ [:Z,Y:] implies [x,y] in (R|Z) proof assume A5: [x,y] in R /\ [:Z,Y:]; then [x,y] in [:Z,Y:] by XBOOLE_0:def 4; then A6: x in Z by ZFMISC_1:87; [x,y] in R by A5,XBOOLE_0:def 4; hence thesis by A6,RELAT_1:def 11; end; end; let x,y; thus [x,y] in (Z|`R) implies [x,y] in R /\ [:X,Z:] proof assume A7: [x,y] in (Z|`R); then A8: y in Z by RELAT_1:def 12; A9: [x,y] in R by A7,RELAT_1:def 12; then x in X by A1,ZFMISC_1:87; then [x,y] in [:X,Z:] by A8,ZFMISC_1:87; hence thesis by A9,XBOOLE_0:def 4; end; assume A10: [x,y] in R /\ [:X,Z:]; then [x,y] in [:X,Z:] by XBOOLE_0:def 4; then A11: y in Z by ZFMISC_1:87; [x,y] in R by A10,XBOOLE_0:def 4; hence thesis by A11,RELAT_1:def 12; end; theorem R c= [:X,Y:] & X = Z \/ W implies R = (R|Z) \/ (R|W) proof assume that A1: R c= [:X,Y:] and A2: X = Z \/ W; thus R = R /\ [:X,Y:] by A1,XBOOLE_1:28 .= R /\ ([:Z,Y:] \/ [:W,Y:]) by A2,ZFMISC_1:97 .= (R /\ [:Z,Y:]) \/ (R /\ [:W,Y:]) by XBOOLE_1:23 .= (R|Z) \/ (R /\ [:W,Y:]) by A1,Th8 .= (R|Z) \/ (R|W) by A1,Th8; end; theorem X misses Y & R c= [:X,Y:] \/ [:Y,X:] implies R|X c= [:X,Y:] proof assume that A1: X /\ Y = {} and A2: R c= [:X,Y:] \/ [:Y,X:]; R|X = R /\ [:X,rng R:] by RELAT_1:67; then R|X c= ([:X,Y:] \/ [:Y,X:]) /\ [:X,rng R:] by A2,XBOOLE_1:26; then A3: R|X c= [:X,Y:] /\ [:X,rng R:] \/ [:Y,X:] /\ [:X,rng R:] by XBOOLE_1:23; [:Y,X:] /\ [:X,rng R:] = [:X /\ Y, X /\ rng R:] by ZFMISC_1:100 .= {} by A1,ZFMISC_1:90; hence thesis by A3,XBOOLE_1:18; end; theorem R c= S implies R~ c= S~ proof assume R c= S; then R \/ S = S by XBOOLE_1:12; then (R~) \/ (S~) = S~ by RELAT_1:23; hence thesis by XBOOLE_1:7; end; Lm2: id X c= [:X,X:] proof let x,y; assume [x,y] in id X; then x in X & x = y by RELAT_1:def 10; hence thesis by ZFMISC_1:87; end; theorem Th12: id(X) * id(X) = id X proof dom id(X) = X; hence thesis by RELAT_1:51; end; theorem id({x}) = {[x,x]} proof x in {x} by TARSKI:def 1; then [x,x] in id({x}) by RELAT_1:def 10; then A1: {[x,x]} c= id {x} by ZFMISC_1:31; [:{x},{x}:] = {[x,x]} by ZFMISC_1:29; then id({x}) c= {[x,x]} by Lm2; hence thesis by A1,XBOOLE_0:def 10; end; theorem Th14: id(X \/ Y) = id(X) \/ id(Y) & id(X /\ Y) = id(X) /\ id(Y) & id(X \ Y) = id(X) \ id(Y) proof thus id(X \/ Y) = id(X) \/ id(Y) proof let x,y; thus [x,y] in id(X \/ Y) implies [x,y] in id(X) \/ id(Y) proof assume A1: [x,y] in id(X \/ Y); then x in X \/ Y by RELAT_1:def 10; then A2: x in X or x in Y by XBOOLE_0:def 3; x = y by A1,RELAT_1:def 10; then [x,y] in id(X) or [x,y] in id(Y) by A2,RELAT_1:def 10; hence thesis by XBOOLE_0:def 3; end; assume [x,y] in id(X) \/ id(Y); then A3: [x,y] in id(X) or [x,y] in id(Y) by XBOOLE_0:def 3; then x in X or x in Y by RELAT_1:def 10; then A4: x in X \/ Y by XBOOLE_0:def 3; x = y by A3,RELAT_1:def 10; hence thesis by A4,RELAT_1:def 10; end; thus id(X /\ Y) = id(X) /\ id(Y) proof let x,y; thus [x,y] in id(X /\ Y) implies [x,y] in id(X) /\ id(Y) proof assume A5: [x,y] in id(X /\ Y); then A6: x in X /\ Y by RELAT_1:def 10; A7: x = y by A5,RELAT_1:def 10; x in Y by A6,XBOOLE_0:def 4; then A8: [x,y] in id(Y) by A7,RELAT_1:def 10; x in X by A6,XBOOLE_0:def 4; then [x,y] in id(X) by A7,RELAT_1:def 10; hence thesis by A8,XBOOLE_0:def 4; end; assume A9: [x,y] in id(X) /\ id Y; then A10: [x,y] in id(X) by XBOOLE_0:def 4; then A11: x = y by RELAT_1:def 10; [x,y] in id(Y) by A9,XBOOLE_0:def 4; then A12: x in Y by RELAT_1:def 10; x in X by A10,RELAT_1:def 10; then x in X /\ Y by A12,XBOOLE_0:def 4; hence thesis by A11,RELAT_1:def 10; end; let x,y; thus [x,y] in id(X \ Y) implies [x,y] in id(X) \ id(Y) proof assume A13: [x,y] in id(X \ Y); then A14: x in X \ Y by RELAT_1:def 10; then not x in Y by XBOOLE_0:def 5; then A15: not [x,y] in id(Y) by RELAT_1:def 10; x = y by A13,RELAT_1:def 10; then [x,y] in id(X) by A14,RELAT_1:def 10; hence thesis by A15,XBOOLE_0:def 5; end; assume A16: [x,y] in id(X) \ id(Y); then A17: x = y by RELAT_1:def 10; not [x,y] in id(Y) by A16,XBOOLE_0:def 5; then A18: not (x in Y & x = y) by RELAT_1:def 10; x in X by A16,RELAT_1:def 10; then x in X \ Y by A16,A18,RELAT_1:def 10,XBOOLE_0:def 5; hence thesis by A17,RELAT_1:def 10; end; theorem Th15: X c= Y implies id X c= id Y proof assume X c= Y; then X \/ Y = Y by XBOOLE_1:12; then id(X) \/ id Y = id Y by Th14; hence thesis by XBOOLE_1:7; end; theorem id(X \ Y) \ id X = {} proof id(X \ Y) c= id(X) by Th15; hence thesis by XBOOLE_1:37; end; theorem R c= id dom R implies R = id dom R proof assume A1: R c= id dom R; let x,y; thus [x,y] in R implies [x,y] in id dom R by A1; assume A2: [x,y] in id dom R; then x in dom R by RELAT_1:def 10; then A3: ex z st [x,z] in R by XTUPLE_0:def 12; x = y by A2,RELAT_1:def 10; hence thesis by A1,A3,RELAT_1:def 10; end; theorem id X c= R \/ R~ implies id X c= R & id X c= R~ proof assume A1: id X c= R \/ R~; for x holds x in X implies [x,x] in R & [x,x] in R~ proof let x; assume x in X; then [x,x] in id(X) by RELAT_1:def 10; then A2: [x,x] in R or [x,x] in R~ by A1,XBOOLE_0:def 3; hence [x,x] in R by RELAT_1:def 7; thus thesis by A2,RELAT_1:def 7; end; then (for x holds x in X implies [x,x] in R) & for x holds x in X implies [x,x] in R~; hence thesis by RELAT_1:47; end; theorem id X c= R implies id X c= R~ proof assume A1: id X c= R; for x holds x in X implies [x,x] in R~ proof let x; assume x in X; then [x,x] in id X by RELAT_1:def 10; hence thesis by A1,RELAT_1:def 7; end; hence thesis by RELAT_1:47; end; theorem R c= [:X,X:] implies R \ id dom R = R \ id X & R \ id rng R = R \ id X proof A1: R \ id dom R c= R \ id X proof let x,y; assume A2: [x,y] in R \ id dom R; then A3: not [x,y] in id dom R by XBOOLE_0:def 5; not [x,y] in id X proof assume [x,y] in id X; then A4: x = y by RELAT_1:def 10; x in dom R by A2,XTUPLE_0:def 12; hence contradiction by A3,A4,RELAT_1:def 10; end; hence thesis by A2,XBOOLE_0:def 5; end; A5: R \ id rng R c= R \ id X proof let x,y; assume A6: [x,y] in R \ id rng R; then A7: not [x,y] in id rng R by XBOOLE_0:def 5; not [x,y] in id X proof assume [x,y] in id X; then A8: x = y by RELAT_1:def 10; y in rng R by A6,XTUPLE_0:def 13; hence contradiction by A7,A8,RELAT_1:def 10; end; hence thesis by A6,XBOOLE_0:def 5; end; assume A9: R c= [:X,X:]; then id dom R c= id X by Th3,Th15; then R \ id X c= R \ id dom R by XBOOLE_1:34; hence R \ id dom R = R \ id X by A1,XBOOLE_0:def 10; id(rng R) c= id X by A9,Th3,Th15; then R \ id(X) c= R \ id rng R by XBOOLE_1:34; hence thesis by A5,XBOOLE_0:def 10; end; theorem (id(X) * (R \ id X) = {} implies dom (R \ id X) = dom R \ X) & ((R \ id X) * id X = {} implies rng (R \ id X) = rng R \ X) proof thus id(X) * (R \ id X) = {} implies dom (R \ id X) = dom R \ X proof assume A1: id(X) * (R \ id X) = {}; A2: dom (R \ id X) c= dom R \ X proof let x; A3: x in dom R & not x in X implies thesis by XBOOLE_0:def 5; assume x in dom (R \ id X); then A6: ex y st [x,y] in (R \ id X) by XTUPLE_0:def 12; not x in X proof assume x in X; then [x,x] in id X by RELAT_1:def 10; hence thesis by A1,A6,RELAT_1:def 8; end; hence thesis by A6,A3,XTUPLE_0:def 12; end; dom R \ dom id X c= dom (R \ id X) by RELAT_1:3; then dom R \ X c= dom (R \ id X); hence thesis by A2,XBOOLE_0:def 10; end; thus (R \ id X) * id(X) = {} implies rng (R \ id X) = rng R \ X proof assume A7: (R \ id X) * id X = {}; A8: rng (R \ id X) c= rng R \ X proof let y; A9: y in rng R & not y in X implies thesis by XBOOLE_0:def 5; assume y in rng(R \ id X); then A12: ex x st [x,y] in R \ id X by XTUPLE_0:def 13; not y in X proof assume y in X; then [y,y] in id X by RELAT_1:def 10; hence thesis by A7,A12,RELAT_1:def 8; end; hence thesis by A12,A9,XTUPLE_0:def 13; end; rng R \ rng id X c= rng (R \ id X) by RELAT_1:14; then rng R \ X c= rng (R \ id X); hence thesis by A8,XBOOLE_0:def 10; end; end; theorem Th22: (R c= R * R & R * (R \ id rng R) = {} implies id rng R c= R) & (R c= R * R & (R \ id dom R) * R = {} implies id dom R c= R) proof thus R c= R * R & R * (R \ id rng R) = {} implies id rng R c= R proof assume that A1: R c= R * R and A2: R * (R \ id rng R) = {}; for y holds y in rng R implies [y,y] in R proof let y; assume y in rng R; then consider x such that A3: [x,y] in R by XTUPLE_0:def 13; consider z such that A4: [x,z] in R and A5: [z,y] in R by A1,A3,RELAT_1:def 8; z = y proof assume z <> y; then not [z,y] in id rng R by RELAT_1:def 10; then [z,y] in (R \ id rng R) by A5,XBOOLE_0:def 5; hence contradiction by A2,A4,RELAT_1:def 8; end; hence thesis by A5; end; hence thesis by RELAT_1:47; end; assume that A6: R c= R * R and A7: (R \ id dom R) * R = {}; for x holds x in dom R implies [x,x] in R proof let x; assume x in dom R; then consider y such that A8: [x,y] in R by XTUPLE_0:def 12; consider z such that A9: [x,z] in R and A10: [z,y] in R by A6,A8,RELAT_1:def 8; z = x proof assume z <> x; then not [x,z] in id dom R by RELAT_1:def 10; then [x,z] in R \ id dom R by A9,XBOOLE_0:def 5; hence contradiction by A7,A10,RELAT_1:def 8; end; hence thesis by A9; end; hence thesis by RELAT_1:47; end; theorem (R c= R * R & R * (R \ id rng R) = {} implies R /\ (id rng R) = id rng R) & (R c= R * R & (R \ id dom R) * R = {} implies R /\ (id dom R) = id dom R) by Th22,XBOOLE_1:28; theorem (R * (R \ id X) = {} implies R * (R \ id rng R) = {}) & ((R \ id X) * R = {} implies (R \ id dom R) * R = {}) proof thus R * (R \ id X) = {} implies R * (R \ id rng R) = {} proof assume that A1: R * (R \ id X) = {} and A2: R * (R \ id rng R) <> {}; consider x,y such that A3: [x,y] in R * (R \ id rng R) by A2,RELAT_1:37; consider z such that A4: [x,z] in R and A5: [z,y] in R \ id rng R by A3,RELAT_1:def 8; z in rng R & not [z,y] in id rng R by A4,A5,XBOOLE_0:def 5,XTUPLE_0:def 13; then z <> y by RELAT_1:def 10; then not [z,y] in id X by RELAT_1:def 10; then [z,y] in R \ id X by A5,XBOOLE_0:def 5; hence contradiction by A1,A4,RELAT_1:def 8; end; assume that A6: (R \ id X) * R = {} and A7: (R \ id dom R) * R <> {}; consider x,y such that A8: [x,y] in (R \ id dom R) * R by A7,RELAT_1:37; consider z such that A9: [x,z] in (R \ id dom R) and A10: [z,y] in R by A8,RELAT_1:def 8; not [x,z] in id dom R by A9,XBOOLE_0:def 5; then not z in dom R or x <> z by RELAT_1:def 10; then not [x,z] in id X by A10,RELAT_1:def 10,XTUPLE_0:def 12; then [x,z] in R \ id X by A9,XBOOLE_0:def 5; hence contradiction by A6,A10,RELAT_1:def 8; end; definition let R; func CL R -> Relation equals R /\ id dom R; correctness; end; theorem Th25: [x,y] in CL R implies x in dom CL R & x = y proof assume A1: [x,y] in CL R; then [x,y] in id dom R by XBOOLE_0:def 4; hence thesis by A1,RELAT_1:def 10,XTUPLE_0:def 12; end; theorem Th26: dom CL R = rng CL R proof thus dom CL R c= rng CL R proof let x; assume x in dom CL R; then consider y such that A1: [x,y] in CL R by XTUPLE_0:def 12; [x,y] in id dom R by A1,XBOOLE_0:def 4; then [x,x] in CL R by A1,RELAT_1:def 10; hence thesis by XTUPLE_0:def 13; end; let x; assume x in rng CL R; then consider y such that A2: [y,x] in CL R by XTUPLE_0:def 13; [y,x] in id dom R by A2,XBOOLE_0:def 4; then [x,x] in CL R by A2,RELAT_1:def 10; hence thesis by XTUPLE_0:def 12; end; theorem Th27: (x in dom CL R iff x in dom R & [x,x] in R) & (x in rng CL R iff x in dom R & [x,x] in R) & (x in rng CL R iff x in rng R & [x,x] in R) & (x in dom CL R iff x in rng R & [x,x] in R) proof A1: x in dom R & [x,x] in R implies x in dom CL R proof assume that A2: x in dom R and A3: [x,x] in R; [x,x] in id dom R by A2,RELAT_1:def 10; then [x,x] in (R /\ id dom R) by A3,XBOOLE_0:def 4; hence thesis by XTUPLE_0:def 12; end; A4: x in dom CL R implies x in dom R & [x,x] in R proof assume x in dom CL R; then consider y such that A5: [x,y] in CL R by XTUPLE_0:def 12; [x,y] in R & [x,y] in id dom R by A5,XBOOLE_0:def 4; hence thesis by RELAT_1:def 10; end; hence x in dom CL R iff x in dom R & [x,x] in R by A1; thus x in rng CL R iff x in dom R & [x,x] in R by A4,A1,Th26; thus x in rng CL R iff x in rng R & [x,x] in R by A4,A1,Th26,XTUPLE_0:def 12,def 13; thus thesis by A4,A1,XTUPLE_0:def 12,def 13; end; theorem Th28: CL R = id dom CL R proof let x,y; thus [x,y] in CL R implies [x,y] in id dom CL R proof assume A1: [x,y] in CL R; then [x,y] in id dom R by XBOOLE_0:def 4; then A2: x = y by RELAT_1:def 10; x in dom CL R by A1,XTUPLE_0:def 12; hence thesis by A2,RELAT_1:def 10; end; assume A3: [x,y] in id dom CL R; then x in dom CL R by RELAT_1:def 10; then A4: ex z st [x,z] in CL R by XTUPLE_0:def 12; x = y by A3,RELAT_1:def 10; hence thesis by A4,Th25; end; theorem Th29: (R * R = R & R * (R \ CL R) = {} & [x,y] in R & x <> y implies x in (dom R \ dom CL R) & y in dom CL R) & (R * R = R & (R \ CL R) * R = {} & [x,y] in R & x <> y implies y in (rng R \ dom CL R) & x in dom CL R) proof thus R * R = R & R * (R \ CL R) = {} & [x,y] in R & x <> y implies x in (dom R \ dom CL R) & y in dom CL R proof assume that A1: R * R = R and A2: R * (R \ CL R) = {} and A3: [x,y] in R and A4: x <> y; A5: y in rng R by A3,XTUPLE_0:def 13; consider z such that A6: [x,z] in R and A7: [z,y] in R by A1,A3,RELAT_1:def 8; A8: z = y proof assume z <> y; then not [z,y] in id dom R by RELAT_1:def 10; then not [z,y] in R /\ id dom R by XBOOLE_0:def 4; then [z,y] in R \ CL R by A7,XBOOLE_0:def 5; hence thesis by A2,A6,RELAT_1:def 8; end; not [x,y] in id dom R by A4,RELAT_1:def 10; then not [x,y] in R /\ id dom R by XBOOLE_0:def 4; then A9: [x,y] in R \ CL(R) by A3,XBOOLE_0:def 5; A10: not x in dom CL R proof assume x in dom CL R; then [x,x] in R by Th27; hence thesis by A2,A9,RELAT_1:def 8; end; x in dom R by A6,XTUPLE_0:def 12; hence thesis by A7,A8,A5,A10,Th27,XBOOLE_0:def 5; end; thus R * R = R & (R \ CL R) * R = {} & [x,y] in R & x <> y implies y in (rng R \ dom CL R) & x in dom CL R proof assume that A11: R * R = R and A12: (R \ CL R) * R = {} and A13: [x,y] in R and A14: x <> y; A15: x in dom R by A13,XTUPLE_0:def 12; consider z such that A16: [x,z] in R and A17: [z,y] in R by A11,A13,RELAT_1:def 8; A18: z = x proof assume z <> x; then not [x,z] in id dom R by RELAT_1:def 10; then not [x,z] in R /\ id dom R by XBOOLE_0:def 4; then [x,z] in R \ CL R by A16,XBOOLE_0:def 5; hence thesis by A12,A17,RELAT_1:def 8; end; not [x,y] in id dom R by A14,RELAT_1:def 10; then not [x,y] in R /\ id dom R by XBOOLE_0:def 4; then A19: [x,y] in R \ CL R by A13,XBOOLE_0:def 5; A20: not y in dom CL R proof assume y in dom CL R; then [y,y] in R by Th27; hence thesis by A12,A19,RELAT_1:def 8; end; y in rng R by A17,XTUPLE_0:def 13; hence thesis by A16,A18,A15,A20,Th27,XBOOLE_0:def 5; end; end; theorem (R * R = R & R * (R \ id dom R) = {} & [x,y] in R & x <> y implies x in ((dom R) \ dom CL R) & y in dom CL R) & (R * R = R & (R \ id dom R) * R = {} & [x,y] in R & x <> y implies y in ((rng R) \ dom CL R) & x in dom CL R) proof R \ CL R = R \ id dom R by XBOOLE_1:47; hence thesis by Th29; end; theorem (R * R = R & R * (R \ id dom R) = {} implies dom CL R = rng R & rng CL R = rng R) & (R * R = R & (R \ id dom R) * R = {} implies dom CL R = dom R & rng CL R = dom R) proof thus R * R = R & R * (R \ id dom R) = {} implies dom CL R = rng R & rng CL R = rng R proof assume that A1: R * R = R and A2: R * (R \ id dom R) = {}; for y holds y in rng R implies y in dom CL R proof let y; assume y in rng R; then consider x such that A3: [x,y] in R by XTUPLE_0:def 13; consider z such that A4: [x,z] in R and A5: [z,y] in R by A1,A3,RELAT_1:def 8; A6: z = y proof assume z <> y; then not [z,y] in id dom R by RELAT_1:def 10; then [z,y] in R \ id dom R by A5,XBOOLE_0:def 5; hence thesis by A2,A4,RELAT_1:def 8; end; z in dom R by A5,XTUPLE_0:def 12; then [z,y] in id dom R by A6,RELAT_1:def 10; then [z,y] in R /\ id dom R by A5,XBOOLE_0:def 4; hence thesis by A6,XTUPLE_0:def 12; end; then A7: rng R c= dom CL R by TARSKI:def 3; CL(R) c= R by XBOOLE_1:17; then rng CL R c= rng R by RELAT_1:11; then dom CL R c= rng R by Th26; then dom CL R = rng R by A7,XBOOLE_0:def 10; hence thesis by Th26; end; thus R * R = R & (R \ id dom R) * R = {} implies dom CL R = dom R & rng CL R = dom R proof assume that A8: R * R = R and A9: (R \ id dom R) * R = {}; for x holds x in dom R implies x in dom CL R proof let x; assume A10: x in dom R; then consider y such that A11: [x,y] in R by XTUPLE_0:def 12; consider z such that A12: [x,z] in R and A13: [z,y] in R by A8,A11,RELAT_1:def 8; A14: z = x proof assume z <> x; then not [x,z] in id dom R by RELAT_1:def 10; then [x,z] in R \ id dom R by A12,XBOOLE_0:def 5; hence thesis by A9,A13,RELAT_1:def 8; end; then [x,z] in id dom R by A10,RELAT_1:def 10; then [x,z] in R /\ id dom R by A12,XBOOLE_0:def 4; then z in rng CL R by XTUPLE_0:def 13; hence thesis by A14,Th26; end; then A15: dom R c= dom CL R by TARSKI:def 3; CL R c= R by XBOOLE_1:17; then dom CL R c= dom R by RELAT_1:11; then dom CL R = dom R by A15,XBOOLE_0:def 10; hence thesis by Th26; end; end; theorem Th32: dom CL R c= dom R & rng CL R c= rng R & rng CL R c= dom R & dom CL R c= rng R proof CL R c= R by XBOOLE_1:17; hence dom CL R c= dom R & rng CL R c= rng R by RELAT_1:11; hence thesis by Th26; end; theorem id dom CL R c= id dom R & id rng CL R c= id dom R proof dom CL R c= dom R by Th32; then id dom CL R c= id dom R by Th15; hence thesis by Th26; end; theorem Th34: id dom CL R c= R & id rng CL R c= R proof thus id dom CL R c= R proof let x,y; assume [x,y] in id dom CL R; then x in dom CL R & x = y by RELAT_1:def 10; hence thesis by Th27; end; hence thesis by Th26; end; theorem Th35: (id X c= R & id(X) * (R \ id X) = {} implies R|X = id X) & (id X c= R & (R \ id X) * id X = {} implies X|`R = id X) proof thus id X c= R & id(X) * (R \ id X) = {} implies R|X = id X proof assume that A1: id(X) c= R and A2: id(X) * (R \ id(X)) = {}; R|X = id(X) * R by RELAT_1:65 .= id(X) * (R \/ id(X)) by A1,XBOOLE_1:12 .= id(X) * ((R \ id(X)) \/ id(X)) by XBOOLE_1:39 .= {} \/ id(X) * id(X) by A2,RELAT_1:32 .= id(X) by Th12; hence thesis; end; assume that A3: id(X) c= R and A4: (R \ id X) * id X = {}; X|`R = R * id X by RELAT_1:92 .= (R \/ id X) * id X by A3,XBOOLE_1:12 .= ((R \ id X) \/ id X) * id X by XBOOLE_1:39 .= {} \/ id(X) * id X by A4,Th6 .= id X by Th12; hence thesis; end; theorem (id(dom CL R) * (R \ id(dom CL R)) = {} implies R|(dom CL R) = id dom CL R & R|(rng CL R) = id dom CL R) & ((R \ id rng CL R) * id(rng CL R) = {} implies (dom CL R)|`R = id dom CL R & (rng CL R)|`R = id rng CL R) proof thus id(dom CL R) * (R \ id dom CL R) = {} implies R|(dom CL R) = id(dom CL R) & R|(rng CL R) = id dom CL R proof assume A1: id(dom CL R) * (R \ id dom CL R) = {}; id(dom CL R) c= R by Th34; then R|(dom CL R) = id dom CL R by A1,Th35; hence thesis by Th26; end; assume A2: (R \ id rng CL R) * id rng CL R = {}; id rng CL R c= R by Th34; then (rng CL R)|`R = id rng CL R by A2,Th35; then (dom CL R)|`R = id rng CL R by Th26; hence thesis by Th26; end; theorem (R * (R \ id dom R) = {} implies id(dom CL R) * (R \ id dom CL R) = {}) & ((R \ id dom R) * R = {} implies (R \ id dom CL R) * id dom CL R = {}) proof thus R * (R \ id dom R) = {} implies id (dom CL R) * (R \ id dom CL R) = {} proof A1: id dom CL R c= R by Th34; assume A2: R * (R \ id dom R) = {}; R \ id dom R = R \ CL R by XBOOLE_1:47 .= R \ id dom CL R by Th28; hence thesis by A2,A1,RELAT_1:30,XBOOLE_1:3; end; A3: id dom CL R c= R by Th34; assume A4: (R \ id dom R) * R = {}; R \ id dom R = R \ CL R by XBOOLE_1:47 .= R \ id dom CL R by Th28; hence thesis by A4,A3,RELAT_1:29,XBOOLE_1:3; end; theorem Th38: (S * R = S & R * (R \ id dom R) = {} implies S * (R \ id dom R) = {}) & (R * S = S & (R \ id dom R) * R = {} implies (R \ id dom R) * S = {}) proof thus S * R = S & R * (R \ id dom R) = {} implies S * (R \ id dom R) = {} proof assume S * R = S & R * (R \ id dom R) = {}; then S * (R \ id dom R) = S * {} by RELAT_1:36 .= {}; hence thesis; end; assume R * S = S & (R \ id dom R) * R = {}; then (R \ id dom R) * S = {} * S by RELAT_1:36 .= {}; hence thesis; end; theorem Th39: (S * R = S & R * (R \ id dom R) = {} implies CL(S) c= CL(R)) & (R * S = S & (R \ id dom R) * R = {} implies CL(S) c= CL(R)) proof thus S * R = S & R * (R \ id dom R) = {} implies CL S c= CL R proof assume that A1: S * R = S and A2: R * (R \ id dom R) = {}; A3: S * (R \ id dom R) = {} by A1,A2,Th38; for x,y holds [x,y] in CL S implies [x,y] in CL R proof let x,y; assume A4: [x,y] in CL S; then A5: [x,y] in id dom S by XBOOLE_0:def 4; [x,y] in S by A4,XBOOLE_0:def 4; then consider z such that A6: [x,z] in S and A7: [z,y] in R by A1,RELAT_1:def 8; A8: z = y proof assume z <> y; then not [z,y] in id dom R by RELAT_1:def 10; then [z,y] in R \ id dom R by A7,XBOOLE_0:def 5; hence contradiction by A3,A6,RELAT_1:def 8; end; A9: x = y by A5,RELAT_1:def 10; then x in dom R by A7,A8,XTUPLE_0:def 12; then A10: [x,y] in id dom R by A9,RELAT_1:def 10; [x,y] in R by A5,A7,A8,RELAT_1:def 10; hence thesis by A10,XBOOLE_0:def 4; end; hence thesis by RELAT_1:def 3; end; assume that A11: R * S = S and A12: (R \ id dom R) * R = {}; A13: (R \ id dom R) * S = {} by A11,A12,Th38; for x,y holds [x,y] in CL S implies [x,y] in CL R proof let x,y; assume A14: [x,y] in CL S; then A15: [x,y] in id dom S by XBOOLE_0:def 4; then A16: x = y by RELAT_1:def 10; [x,y] in S by A14,XBOOLE_0:def 4; then consider z such that A17: [x,z] in R and A18: [z,y] in S by A11,RELAT_1:def 8; x in dom R by A17,XTUPLE_0:def 12; then A19: [x,y] in id dom R by A16,RELAT_1:def 10; z = x proof assume z <> x; then not [x,z] in id dom R by RELAT_1:def 10; then [x,z] in R \ id dom R by A17,XBOOLE_0:def 5; hence contradiction by A13,A18,RELAT_1:def 8; end; then [x,y] in R by A15,A17,RELAT_1:def 10; hence thesis by A19,XBOOLE_0:def 4; end; hence thesis by RELAT_1:def 3; end; theorem (S * R = S & R * (R \ id dom R) = {} & R * S = R & S * (S \ id dom S) = {} implies CL S = CL R) & (R * S = S & (R \ id dom R) * R = {} & S * R = R & (S \ id dom S) * S = {} implies CL S = CL R) proof thus S * R = S & R * (R \ id dom R) = {} & R * S = R & S * (S \ id dom S) = {} implies CL S = CL R proof assume S * R = S & R * (R \ id dom R) = {} & R * S = R & S * (S \ id dom S) = {}; then CL S c= CL R & CL R c= CL S by Th39; hence thesis by XBOOLE_0:def 10; end; assume R * S = S & (R \ id dom R) * R = {} & S * R = R & (S \ id dom S) * S = {}; then CL S c= CL R & CL R c= CL S by Th39; hence thesis by XBOOLE_0:def 10; end; begin definition let a be set; func NOT1 a equals :Def1: {} if a is non empty otherwise {{}}; correctness; end; registration let a be empty set; cluster NOT1 a -> non empty; coherence by Def1; end; registration let a be non empty set; cluster NOT1 a -> empty; coherence by Def1; end; theorem NOT1 {{}} = {} & NOT1 {} = {{}} by Def1; theorem for a being set holds NOT1 a is non empty iff not a is non empty; reserve a,b,c,d,e,f,g,h for set; theorem NOT1 {} is non empty; definition let a,b be set; func AND2(a,b) equals :Def2: NOT1 {} if a is non empty & b is non empty otherwise {}; correctness; commutativity; end; registration let a,b be non empty set; cluster AND2(a,b) -> non empty; coherence by Def2; end; registration let a be empty set, b be set; cluster AND2(a,b) -> empty; coherence by Def2; end; theorem AND2(a,b) is non empty iff a is non empty & b is non empty; definition let a,b be set; func OR2(a, b) equals :Def3: NOT1 {} if a is non empty or b is non empty otherwise {}; correctness; commutativity; end; registration let a be set,b be non empty set; cluster OR2(a,b) -> non empty; coherence by Def3; end; registration let a,b be empty set; cluster OR2(a,b) -> empty; coherence by Def3; end; theorem OR2(a,b) is non empty iff (a is non empty or b is non empty); definition let a,b be set; func XOR2(a,b) equals :Def4: NOT1 {} if a is non empty & not b is non empty or not a is non empty & b is non empty otherwise {}; correctness; commutativity; end; registration let a be empty set,b be non empty set; cluster XOR2(a,b) -> non empty; coherence by Def4; end; registration let a,b be empty set; cluster XOR2(a,b) -> empty; coherence by Def4; end; registration let a,b be non empty set; cluster XOR2(a,b) -> empty; coherence by Def4; end; theorem XOR2(a, b) is non empty iff a is non empty & not b is non empty or not a is non empty & b is non empty; theorem not XOR2(a,a) is non empty proof XOR2(a,a) is non empty iff a is non empty & not a is non empty or not a is non empty & a is non empty; hence thesis; end; theorem XOR2(a,{}) is non empty iff a is non empty; theorem XOR2(a,b) is non empty iff XOR2(b,a) is non empty; definition let a,b be set; func EQV2(a, b) equals :Def5: NOT1 {} if a is non empty iff b is non empty otherwise {}; correctness; commutativity; end; registration let a be empty set,b be non empty set; cluster EQV2(a,b) -> empty; coherence by Def5; end; registration let a,b be empty set; cluster EQV2(a,b) -> non empty; coherence by Def5; end; registration let a,b be non empty set; cluster EQV2(a,b) -> non empty; coherence by Def5; end; theorem EQV2(a, b) is non empty iff (a is non empty iff b is non empty); theorem EQV2(a,b) is non empty iff not XOR2(a,b) is non empty proof EQV2(a,b) is non empty iff (a is non empty iff b is non empty); hence thesis; end; definition let a,b be set; func NAND2(a, b) equals :Def6: NOT1 {} if not (a is non empty & b is non empty) otherwise {}; correctness; commutativity; end; registration let a be empty set, b be set; cluster NAND2(a,b) -> non empty; coherence by Def6; end; registration let a,b be non empty set; cluster NAND2(a,b) -> empty; coherence by Def6; end; theorem NAND2(a, b) is non empty iff not (a is non empty & b is non empty); definition let a,b be set; func NOR2(a, b) equals :Def7: NOT1 {} if not (a is non empty or b is non empty) otherwise {}; correctness; commutativity; end; registration let a,b be empty set; cluster NOR2(a,b) -> non empty; coherence by Def7; end; registration let a be non empty set, b be set; cluster NOR2(a,b) -> empty; coherence by Def7; end; theorem NOR2(a,b) is non empty iff not (a is non empty or b is non empty); definition let a,b,c be set; func AND3(a,b,c) equals :Def8: NOT1 {} if a is non empty & b is non empty & c is non empty otherwise {}; correctness; end; registration let a,b,c be non empty set; cluster AND3(a,b,c) -> non empty; coherence by Def8; end; registration let a be empty set, b,c be set; cluster AND3(a,b,c) -> empty; coherence by Def8; cluster AND3(b,a,c) -> empty; coherence by Def8; cluster AND3(b,c,a) -> empty; coherence by Def8; end; theorem AND3(a,b,c) is non empty iff a is non empty & b is non empty & c is non empty; definition let a,b,c be set; func OR3(a,b,c) equals :Def9: NOT1 {} if a is non empty or b is non empty or c is non empty otherwise {}; correctness; end; registration let a,b,c be empty set; cluster OR3(a,b,c) -> empty; coherence by Def9; end; registration let a be non empty set, b,c be set; cluster OR3(a,b,c) -> non empty; coherence by Def9; cluster OR3(b,a,c) -> non empty; coherence by Def9; cluster OR3(b,c,a) -> non empty; coherence by Def9; end; theorem OR3(a,b,c) is non empty iff a is non empty or b is non empty or c is non empty; definition let a,b,c be set; func XOR3(a,b,c) equals :Def10: NOT1 {} if ( a is non empty & not b is non empty or not a is non empty & b is non empty ) & not c is non empty or not ( a is non empty & not b is non empty or not a is non empty & b is non empty ) & c is non empty otherwise {}; correctness; end; registration let a,b,c be empty set; cluster XOR3(a,b,c) -> empty; coherence by Def10; end; registration let a,b be empty set, c be non empty set; cluster XOR3(a,b,c) -> non empty; coherence by Def10; cluster XOR3(a,c,b) -> non empty; coherence by Def10; cluster XOR3(c,a,b) -> non empty; coherence by Def10; end; registration let a,b be non empty set, c be empty set; cluster XOR3(a,b,c) -> empty; coherence by Def10; cluster XOR3(a,c,b) -> empty; coherence by Def10; cluster XOR3(c,a,b) -> empty; coherence by Def10; end; registration let a,b,c be non empty set; cluster XOR3(a,b,c) -> non empty; coherence by Def10; end; theorem XOR3(a,b,c) is non empty iff ( a is non empty & not b is non empty or not a is non empty & b is non empty ) & not c is non empty or not ( a is non empty & not b is non empty or not a is non empty & b is non empty ) & c is non empty; definition let a,b,c be set; func MAJ3(a,b,c) equals :Def11: NOT1 {} if a is non empty & b is non empty or b is non empty & c is non empty or c is non empty & a is non empty otherwise {}; correctness; end; registration let a,b be non empty set, c be set; cluster MAJ3(a,b,c) -> non empty; coherence by Def11; cluster MAJ3(a,c,b) -> non empty; coherence by Def11; cluster MAJ3(c,a,b) -> non empty; coherence by Def11; end; registration let a,b be empty set, c be set; cluster MAJ3(a,b,c) -> empty; coherence by Def11; cluster MAJ3(a,c,b) -> empty; coherence by Def11; cluster MAJ3(c,a,b) -> empty; coherence by Def11; end; theorem MAJ3(a,b,c) is non empty iff a is non empty & b is non empty or b is non empty & c is non empty or c is non empty & a is non empty; definition let a,b,c be set; func NAND3(a,b,c) equals :Def12: NOT1 {} if not (a is non empty & b is non empty & c is non empty) otherwise {}; correctness; end; theorem NAND3(a,b,c) is non empty iff not (a is non empty & b is non empty & c is non empty) by Def12; definition let a,b,c be set; func NOR3(a,b,c) equals :Def13: NOT1 {} if not (a is non empty or b is non empty or c is non empty) otherwise {}; correctness; end; theorem NOR3(a,b,c) is non empty iff not (a is non empty or b is non empty or c is non empty) by Def13; definition let a,b,c,d be set; func AND4(a,b,c,d) equals :Def14: NOT1 {} if a is non empty & b is non empty & c is non empty & d is non empty otherwise {}; correctness; end; theorem AND4(a,b,c,d) is non empty iff a is non empty & b is non empty & c is non empty & d is non empty by Def14; definition let a,b,c,d be set; func OR4(a,b,c,d) equals :Def15: NOT1 {} if a is non empty or b is non empty or c is non empty or d is non empty otherwise {}; correctness; end; theorem OR4(a,b,c,d) is non empty iff a is non empty or b is non empty or c is non empty or d is non empty by Def15; definition let a,b,c,d be set; func NAND4(a,b,c,d) equals :Def16: NOT1 {} if not (a is non empty & b is non empty & c is non empty & d is non empty) otherwise {}; correctness; end; theorem NAND4(a,b,c,d) is non empty iff not (a is non empty & b is non empty & c is non empty & d is non empty) by Def16; definition let a,b,c,d be set; func NOR4(a,b,c,d) equals :Def17: NOT1 {} if not (a is non empty or b is non empty or c is non empty or d is non empty) otherwise {}; correctness; end; theorem NOR4(a,b,c,d) is non empty iff not (a is non empty or b is non empty or c is non empty or d is non empty) by Def17; definition let a,b,c,d,e be set; func AND5(a,b,c,d,e) equals :Def18: NOT1 {} if a is non empty & b is non empty & c is non empty & d is non empty & e is non empty otherwise {}; correctness; end; theorem AND5(a,b,c,d,e) is non empty iff a is non empty & b is non empty & c is non empty & d is non empty & e is non empty by Def18; definition let a,b,c,d,e be set; func OR5(a,b,c,d,e) equals :Def19: NOT1 {} if a is non empty or b is non empty or c is non empty or d is non empty or e is non empty otherwise {}; correctness; end; theorem OR5(a,b,c,d,e) is non empty iff a is non empty or b is non empty or c is non empty or d is non empty or e is non empty by Def19; definition let a,b,c,d,e be set; func NAND5(a,b,c,d,e) equals :Def20: NOT1 {} if not (a is non empty & b is non empty & c is non empty & d is non empty & e is non empty) otherwise {}; correctness; end; theorem NAND5(a,b,c,d,e) is non empty iff not (a is non empty & b is non empty & c is non empty & d is non empty & e is non empty) by Def20; definition let a,b,c,d,e be set; func NOR5(a,b,c,d,e) equals :Def21: NOT1 {} if not (a is non empty or b is non empty or c is non empty or d is non empty or e is non empty) otherwise {}; correctness; end; theorem NOR5(a,b,c,d,e) is non empty iff not (a is non empty or b is non empty or c is non empty or d is non empty or e is non empty) by Def21; definition let a,b,c,d,e,f be set; func AND6(a,b,c,d,e,f) equals :Def22: NOT1 {} if a is non empty & b is non empty & c is non empty & d is non empty & e is non empty &f is non empty otherwise {}; correctness; end; theorem AND6(a,b,c,d,e,f) is non empty iff a is non empty & b is non empty & c is non empty & d is non empty & e is non empty &f is non empty by Def22; definition let a,b,c,d,e,f be set; func OR6(a,b,c,d,e,f) equals :Def23: NOT1 {} if a is non empty or b is non empty or c is non empty or d is non empty or e is non empty or f is non empty otherwise {}; correctness; end; theorem OR6(a,b,c,d,e,f) is non empty iff a is non empty or b is non empty or c is non empty or d is non empty or e is non empty or f is non empty by Def23; definition let a,b,c,d,e,f be set; func NAND6(a,b,c,d,e,f) equals :Def24: NOT1 {} if not (a is non empty & b is non empty & c is non empty & d is non empty & e is non empty &f is non empty) otherwise {}; correctness; end; theorem NAND6(a,b,c,d,e,f) is non empty iff not (a is non empty & b is non empty & c is non empty & d is non empty & e is non empty &f is non empty) by Def24; definition let a,b,c,d,e,f be set; func NOR6(a,b,c,d,e,f) equals :Def25: NOT1 {} if not (a is non empty or b is non empty or c is non empty or d is non empty or e is non empty or f is non empty) otherwise {}; correctness; end; theorem NOR6(a,b,c,d,e,f) is non empty iff not (a is non empty or b is non empty or c is non empty or d is non empty or e is non empty or f is non empty) by Def25; definition let a,b,c,d,e,f,g be set; func AND7(a,b,c,d,e,f,g) equals :Def26: NOT1 {} if a is non empty & b is non empty & c is non empty & d is non empty & e is non empty & f is non empty & g is non empty otherwise {}; correctness; end; theorem AND7(a,b,c,d,e,f,g) is non empty iff a is non empty & b is non empty & c is non empty & d is non empty & e is non empty & f is non empty & g is non empty by Def26; definition let a,b,c,d,e,f,g be set; func OR7(a,b,c,d,e,f,g) equals :Def27: NOT1 {} if a is non empty or b is non empty or c is non empty or d is non empty or e is non empty or f is non empty or g is non empty otherwise {}; correctness; end; theorem OR7(a,b,c,d,e,f,g) is non empty iff a is non empty or b is non empty or c is non empty or d is non empty or e is non empty or f is non empty or g is non empty by Def27; definition let a,b,c,d,e,f,g be set; func NAND7(a,b,c,d,e,f,g) equals :Def28: NOT1 {} if not (a is non empty & b is non empty & c is non empty & d is non empty & e is non empty & f is non empty & g is non empty) otherwise {}; correctness; end; theorem NAND7(a,b,c,d,e,f,g) is non empty iff not (a is non empty & b is non empty & c is non empty & d is non empty & e is non empty & f is non empty & g is non empty) by Def28; definition let a,b,c,d,e,f,g be set; func NOR7(a,b,c,d,e,f,g) equals :Def29: NOT1 {} if not (a is non empty or b is non empty or c is non empty or d is non empty or e is non empty or f is non empty or g is non empty) otherwise {}; correctness; end; theorem NOR7(a,b,c,d,e,f,g) is non empty iff not (a is non empty or b is non empty or c is non empty or d is non empty or e is non empty or f is non empty or g is non empty) by Def29; definition let a,b,c,d,e,f,g,h be set; func AND8(a,b,c,d,e,f,g,h) equals :Def30: NOT1 {} if a is non empty & b is non empty & c is non empty & d is non empty & e is non empty & f is non empty & g is non empty & h is non empty otherwise {}; correctness; end; theorem AND8(a,b,c,d,e,f,g,h) is non empty iff a is non empty & b is non empty & c is non empty & d is non empty & e is non empty & f is non empty & g is non empty & h is non empty by Def30; definition let a,b,c,d,e,f,g,h be set; func OR8(a,b,c,d,e,f,g,h) equals :Def31: NOT1 {} if a is non empty or b is non empty or c is non empty or d is non empty or e is non empty or f is non empty or g is non empty or h is non empty otherwise {}; correctness; end; theorem OR8(a,b,c,d,e,f,g,h) is non empty iff a is non empty or b is non empty or c is non empty or d is non empty or e is non empty or f is non empty or g is non empty or h is non empty by Def31; definition let a,b,c,d,e,f,g,h be set; func NAND8(a,b,c,d,e,f,g,h) equals :Def32: NOT1 {} if not (a is non empty & b is non empty & c is non empty & d is non empty & e is non empty & f is non empty & g is non empty & h is non empty) otherwise {}; correctness; end; theorem NAND8(a,b,c,d,e,f,g,h) is non empty iff not (a is non empty & b is non empty & c is non empty & d is non empty & e is non empty & f is non empty & g is non empty & h is non empty) by Def32; definition let a,b,c,d,e,f,g,h be set; func NOR8(a,b,c,d,e,f,g,h) equals :Def33: NOT1 {} if not (a is non empty or b is non empty or c is non empty or d is non empty or e is non empty or f is non empty or g is non empty or h is non empty) otherwise {}; correctness; end; theorem NOR8(a,b,c,d,e,f,g,h) is non empty iff not (a is non empty or b is non empty or c is non empty or d is non empty or e is non empty or f is non empty or g is non empty or h is non empty) by Def33; begin theorem for c1,x1,x2,x3,x4,y1,y2,y3,y4,c2,c3,c4,c5,n1,n2,n3,n4,n,c5b being set holds (MAJ3(x1,y1,c1) is non empty implies c2 is non empty) & (MAJ3(x2,y2,c2) is non empty implies c3 is non empty) & (MAJ3(x3,y3,c3) is non empty implies c4 is non empty) & (MAJ3(x4,y4,c4) is non empty implies c5 is non empty) & (n1 is non empty implies OR2(x1,y1) is non empty)& (n2 is non empty implies OR2(x2,y2) is non empty)& (n3 is non empty implies OR2(x3,y3) is non empty)& (n4 is non empty implies OR2(x4,y4) is non empty)& (n is non empty implies AND5(c1,n1,n2, n3,n4) is non empty)& (c5b is non empty iff OR2(c5,n) is non empty) implies (c5 is non empty iff c5b is non empty) proof let c1,x1,x2,x3,x4,y1,y2,y3,y4,c2,c3,c4,c5,n1,n2,n3,n4,n,c5b be set; assume that A1: ( MAJ3(x1,y1,c1) is non empty implies c2 is non empty)&( MAJ3(x2,y2, c2) is non empty implies c3 is non empty) &( MAJ3(x3,y3,c3) is non empty implies c4 is non empty) and A2: MAJ3(x4,y4,c4) is non empty implies c5 is non empty and A3: n1 is non empty implies OR2(x1,y1) is non empty and A4: n2 is non empty implies OR2(x2,y2) is non empty and A5: n3 is non empty implies OR2(x3,y3) is non empty and A6: n4 is non empty implies OR2(x4,y4) is non empty and A7: n is non empty implies AND5(c1,n1,n2,n3,n4) is non empty and A8: c5b is non empty implies OR2(c5,n) is non empty and A9: OR2(c5,n) is non empty implies c5b is non empty; A10: now assume A11: n is non empty; then A12: c1 is non empty by A7,Def18; A13: x3 is non empty or y3 is non empty by A5,A7,A11,Def18; A14: x2 is non empty or y2 is non empty by A4,A7,A11,Def18; A15: x4 is non empty or y4 is non empty by A6,A7,A11,Def18; x1 is non empty or y1 is non empty by A3,A7,A11,Def18; hence MAJ3(x4,y4,c4) is non empty by A1,A12,A14,A13,A15; end; thus c5 is non empty implies c5b is non empty by A9; assume c5b is non empty; hence thesis by A2,A8,A10; end; definition let a,b be set; func MODADD2(a,b) equals :Def34: NOT1 {} if (a is non empty or b is non empty) & not(a is non empty & b is non empty) otherwise {}; correctness; commutativity; end; theorem MODADD2(a,b) is non empty iff (a is non empty or b is non empty) & not (a is non empty & b is non empty) by Def34; notation let a,b,c be set; synonym ADD1(a,b,c) for XOR3(a,b,c); synonym CARR1(a,b,c) for MAJ3(a,b,c); end; definition let a1,b1,a2,b2,c be set; func ADD2(a2,b2,a1,b1,c) equals XOR3(a2,b2,CARR1(a1,b1,c)); coherence; end; definition let a1,b1,a2,b2,c be set; func CARR2(a2,b2,a1,b1,c) equals MAJ3(a2,b2,CARR1(a1,b1,c)); coherence; end; definition let a1,b1,a2,b2,a3,b3,c be set; func ADD3(a3,b3,a2,b2,a1,b1,c) equals XOR3(a3,b3,CARR2(a2,b2,a1,b1,c)); coherence; end; definition let a1,b1,a2,b2,a3,b3,c be set; func CARR3(a3,b3,a2,b2,a1,b1,c) equals MAJ3(a3,b3,CARR2(a2,b2,a1,b1,c)); coherence; end; definition let a1,b1,a2,b2,a3,b3,a4,b4,c be set; func ADD4(a4,b4,a3,b3,a2,b2,a1,b1,c) equals XOR3(a4,b4,CARR3(a3,b3,a2,b2,a1, b1,c)); coherence; end; definition let a1,b1,a2,b2,a3,b3,a4,b4,c be set; func CARR4(a4,b4,a3,b3,a2,b2,a1,b1,c) equals MAJ3(a4,b4,CARR3(a3,b3,a2,b2,a1 ,b1,c)); coherence; end; theorem for c1,x1,y1,x2,y2,x3,y3,x4,y4,c4, q1,p1,sd1,q2,p2,sd2,q3,p3,sd3,q4,p4 ,sd4,cb1,cb2,l2,t2,l3,m3, t3,l4,m4,n4,t4,l5,m5,n5,o5,s1,s2,s3,s4 being set holds (q1 is non empty iff NOR2(x1,y1) is non empty)& (p1 is non empty iff NAND2(x1,y1) is non empty)& (sd1 is non empty iff MODADD2(x1,y1) is non empty)& (q2 is non empty iff NOR2(x2,y2) is non empty)& (p2 is non empty iff NAND2(x2, y2) is non empty)& (sd2 is non empty iff MODADD2(x2,y2) is non empty)& (q3 is non empty iff NOR2(x3,y3) is non empty)& (p3 is non empty iff NAND2(x3,y3) is non empty)& (sd3 is non empty iff MODADD2(x3,y3) is non empty)& (q4 is non empty iff NOR2(x4,y4) is non empty)& (p4 is non empty iff NAND2(x4,y4) is non empty)& (sd4 is non empty iff MODADD2(x4,y4) is non empty)& (cb1 is non empty iff NOT1 c1 is non empty)& (cb2 is non empty iff NOT1 cb1 is non empty)& (s1 is non empty iff XOR2(cb2,sd1) is non empty)& (l2 is non empty iff AND2(cb1,p1) is non empty)& (t2 is non empty iff NOR2(l2,q1) is non empty)& (s2 is non empty iff XOR2(t2,sd2) is non empty)& (l3 is non empty iff AND2(q1,p2) is non empty)& (m3 is non empty iff AND3(p2,p1,cb1) is non empty)& (t3 is non empty iff NOR3( l3,m3,q2) is non empty)& (s3 is non empty iff XOR2(t3,sd3) is non empty)& (l4 is non empty iff AND2(q2,p3) is non empty)& (m4 is non empty iff AND3(q1,p3,p2) is non empty)& (n4 is non empty iff AND4(p3,p2,p1,cb1) is non empty)& (t4 is non empty iff NOR4(l4,m4,n4,q3) is non empty)& (s4 is non empty iff XOR2(t4,sd4 ) is non empty)& (l5 is non empty iff AND2(q3,p4) is non empty)& (m5 is non empty iff AND3(q2,p4,p3) is non empty)& (n5 is non empty iff AND4(q1,p4,p3,p2) is non empty)& (o5 is non empty iff AND5(p4,p3,p2,p1,cb1) is non empty)& (c4 is non empty iff NOR5(q4,l5,m5,n5,o5) is non empty) implies (s1 is non empty iff ADD1(x1,y1,c1) is non empty)& (s2 is non empty iff ADD2(x2,y2,x1,y1,c1) is non empty)& (s3 is non empty iff ADD3(x3,y3,x2,y2,x1,y1,c1) is non empty)& (s4 is non empty iff ADD4(x4,y4,x3,y3,x2,y2,x1,y1,c1) is non empty)& (c4 is non empty iff CARR4(x4,y4,x3,y3,x2,y2,x1,y1,c1) is non empty) proof let c1,x1,y1,x2,y2,x3,y3,x4,y4,c4, q1,p1,sd1,q2,p2,sd2,q3,p3,sd3,q4,p4,sd4, cb1,cb2,l2,t2,l3,m3, t3,l4,m4,n4,t4,l5,m5,n5,o5,s1,s2,s3,s4 be set; assume that A1: q1 is non empty iff NOR2(x1,y1) is non empty and A2: p1 is non empty iff NAND2(x1,y1) is non empty and A3: sd1 is non empty iff MODADD2(x1,y1) is non empty and A4: q2 is non empty iff NOR2(x2,y2) is non empty and A5: p2 is non empty iff NAND2(x2,y2) is non empty and A6: sd2 is non empty iff MODADD2(x2,y2) is non empty and A7: q3 is non empty iff NOR2(x3,y3) is non empty and A8: p3 is non empty iff NAND2(x3,y3) is non empty and A9: sd3 is non empty iff MODADD2(x3,y3) is non empty and A10: q4 is non empty iff NOR2(x4,y4) is non empty and A11: p4 is non empty iff NAND2(x4,y4) is non empty and A12: sd4 is non empty iff MODADD2(x4,y4) is non empty and A13: cb1 is non empty iff NOT1 c1 is non empty and A14: ( cb2 is non empty iff NOT1 cb1 is non empty)&( s1 is non empty iff XOR2(cb2, sd1) is non empty) and A15: l2 is non empty iff AND2(cb1,p1) is non empty and A16: ( t2 is non empty iff NOR2(l2,q1) is non empty)&( s2 is non empty iff XOR2(t2, sd2) is non empty) and A17: l3 is non empty iff AND2(q1,p2) is non empty and A18: m3 is non empty iff AND3(p2,p1,cb1) is non empty and A19: ( t3 is non empty iff NOR3(l3,m3,q2) is non empty)&( s3 is non empty iff XOR2( t3,sd3) is non empty) and A20: l4 is non empty iff AND2(q2,p3) is non empty and A21: ( m4 is non empty iff AND3(q1,p3,p2) is non empty)&( n4 is non empty iff AND4 ( p3,p2,p1,cb1) is non empty) & ( t4 is non empty iff NOR4(l4,m4 ,n4,q3) is non empty)&( s4 is non empty iff XOR2(t4,sd4) is non empty) and A22: l5 is non empty iff AND2(q3,p4) is non empty and A23: ( m5 is non empty iff AND3(q2,p4,p3) is non empty)&( n5 is non empty iff AND4 ( q1,p4,p3,p2) is non empty) &( o5 is non empty iff AND5( p4,p3, p2,p1,cb1) is non empty) and A24: c4 is non empty iff NOR5( q4,l5,m5,n5,o5) is non empty; A25: p1 is non empty iff not (x1 is non empty & y1 is non empty) by A2; A26: sd1 is non empty iff (x1 is non empty or y1 is non empty) & not(x1 is non empty & y1 is non empty) by A3,Def34; hereby assume A27: s1 is non empty; per cases by A13,A14,A27; suppose c1 is non empty & sd1 is empty; hence ADD1(x1,y1,c1) is non empty by A26; end; suppose c1 is empty & sd1 is non empty; hence ADD1(x1,y1,c1) is non empty by A26; end; end; hereby assume A28: ADD1(x1,y1,c1) is non empty; per cases by A26,A28; suppose c1 is non empty & sd1 is empty; hence s1 is non empty by A13,A14; end; suppose c1 is empty & sd1 is non empty; hence s1 is non empty by A13,A14; end; end; A29: q1 is non empty iff not (x1 is non empty or y1 is non empty) by A1; A30: sd2 is non empty iff (x2 is non empty or y2 is non empty) & not(x2 is non empty & y2 is non empty) by A6,Def34; hereby assume A31: s2 is non empty; per cases by A13,A15,A16,A31; suppose (c1 is non empty or p1 is empty) & q1 is empty & sd2 is empty; hence ADD2(x2,y2,x1,y1,c1) is non empty by A29,A25,A30; end; suppose (c1 is empty & p1 is non empty or q1 is non empty) & sd2 is non empty; hence ADD2(x2,y2,x1,y1,c1) is non empty by A29,A25,A30; end; end; A32: cb1 is non empty iff not c1 is non empty by A13; hereby assume A33: ADD2(x2,y2,x1,y1,c1) is non empty; per cases by A15,A29,A25,A30,A32,A33; suppose l2 is empty & q1 is empty & sd2 is empty; hence s2 is non empty by A16; end; suppose (l2 is non empty or q1 is non empty) & sd2 is non empty; hence s2 is non empty by A16; end; end; A34: q2 is non empty iff not(x2 is non empty or y2 is non empty) by A4; A35: p2 is non empty iff not(x2 is non empty & y2 is non empty) by A5; A36: sd3 is non empty iff (x3 is non empty or y3 is non empty) & not(x3 is non empty & y3 is non empty) by A9,Def34; hereby assume A37: s3 is non empty; per cases by A9,A19,A37,Def13,Def34; suppose l3 is empty & m3 is empty & q2 is empty & x3 is empty & y3 is empty; hence ADD3(x3,y3,x2,y2,x1,y1,c1) is non empty by A17,A18,A29,A25,A34,A35,A32; end; suppose l3 is empty & m3 is empty & q2 is empty & x3 is non empty & y3 is non empty; hence ADD3(x3,y3,x2,y2,x1,y1,c1) is non empty by A17,A18,A29,A25,A34,A35,A32; end; suppose A38: l3 is non empty & sd3 is non empty; then A39: x2 is empty or y2 is empty by A5,A17; x1 is empty & y1 is empty by A1,A17,A38; hence ADD3(x3,y3,x2,y2,x1,y1,c1) is non empty by A36,A38,A39; end; suppose A40: m3 is non empty & sd3 is non empty; then c1 is empty by A13,A18; hence ADD3(x3,y3,x2,y2,x1,y1,c1) is non empty by A18,A25,A35,A36,A40; end; suppose q2 is non empty & sd3 is non empty; hence ADD3(x3,y3,x2,y2,x1,y1,c1) is non empty by A34,A36; end; end; hereby assume A41: ADD3(x3,y3,x2,y2,x1,y1,c1) is non empty; per cases by A17,A18,A29,A25,A34,A35,A36,A32,A41; suppose l3 is empty & m3 is empty & q2 is empty & x3 is empty & y3 is empty; hence s3 is non empty by A9,A19,Def13,Def34; end; suppose l3 is empty & m3 is empty & q2 is empty & x3 is non empty & y3 is non empty; hence s3 is non empty by A9,A19,Def13,Def34; end; suppose l3 is non empty & sd3 is non empty; hence s3 is non empty by A19,Def13; end; suppose m3 is non empty & sd3 is non empty; hence s3 is non empty by A19,Def13; end; suppose q2 is non empty & sd3 is non empty; hence s3 is non empty by A19,Def13; end; end; A42: p3 is non empty iff not(x3 is non empty & y3 is non empty) by A8; A43: sd4 is non empty iff (x4 is non empty or y4 is non empty) & not(x4 is non empty & y4 is non empty) by A12,Def34; A44: q3 is non empty iff not(x3 is non empty or y3 is non empty) by A7; hereby assume A45: s4 is non empty; per cases by A13,A21,A45,Def14,Def17; suppose l4 is empty & (q1 is empty or p3 is empty or p2 is empty) & (p3 is empty or p2 is empty or p1 is empty or c1 is non empty) & q3 is empty & sd4 is empty; hence ADD4(x4,y4,x3,y3,x2,y2,x1,y1,c1) is non empty by A20,A29,A25,A34 ,A35,A44,A42,A43; end; suppose l4 is non empty & sd4 is non empty; hence ADD4(x4,y4,x3,y3,x2,y2,x1,y1,c1) is non empty by A20,A34,A42,A43; end; suppose q1 is non empty & p3 is non empty & p2 is non empty & sd4 is non empty; hence ADD4(x4,y4,x3,y3,x2,y2,x1,y1,c1) is non empty by A29,A35,A42,A43; end; suppose p3 is non empty & p2 is non empty & p1 is non empty & c1 is empty & sd4 is non empty; hence ADD4(x4,y4,x3,y3,x2,y2,x1,y1,c1) is non empty by A25,A35,A42,A43; end; suppose q3 is non empty &sd4 is non empty; hence ADD4(x4,y4,x3,y3,x2,y2,x1,y1,c1) is non empty by A44,A43; end; end; hereby assume A46: ADD4(x4,y4,x3,y3,x2,y2,x1,y1,c1) is non empty; thus s4 is non empty proof assume A47: s4 is empty; per cases by A13,A21,A47,Def14,Def17; suppose l4 is empty & (q1 is empty or p3 is empty or p2 is empty) & ( p3 is empty or p2 is empty or p1 is empty or c1 is non empty) & q3 is empty & sd4 is non empty; hence thesis by A20,A29,A25,A34,A35,A44,A42,A43,A46; end; suppose l4 is non empty & sd4 is empty; hence thesis by A20,A34,A42,A43,A46; end; suppose q1 is non empty & p3 is non empty & p2 is non empty & sd4 is empty; hence thesis by A29,A35,A42,A43,A46; end; suppose p3 is non empty & p2 is non empty & p1 is non empty & c1 is empty & sd4 is empty; hence thesis by A25,A35,A42,A43,A46; end; suppose q3 is non empty &sd4 is empty; hence thesis by A44,A43,A46; end; end; end; A48: p4 is non empty iff not(x4 is non empty & y4 is non empty) by A11; A49: q4 is non empty iff not(x4 is non empty or y4 is non empty) by A10; now assume that A50: q4 is empty and A51: l5 is empty and A52: m5 is empty & n5 is empty & o5 is empty; per cases by A13,A23,A52,Def14,Def18; suppose p4 is empty; hence CARR4(x4,y4,x3,y3,x2,y2,x1,y1,c1) is non empty by A48; end; suppose p3 is empty; hence CARR4(x4,y4,x3,y3,x2,y2,x1,y1,c1) is non empty by A42,A49,A50; end; suppose p2 is empty & q2 is empty; hence CARR4(x4,y4,x3,y3,x2,y2,x1,y1,c1) is non empty by A22,A35,A44,A49 ,A48,A50,A51; end; suppose p1 is empty & q2 is empty; hence CARR4(x4,y4,x3,y3,x2,y2,x1,y1,c1) is non empty by A22,A25,A34,A44 ,A49,A48,A50,A51; end; suppose c1 is non empty & q1 is empty& q2 is empty; hence CARR4(x4,y4,x3,y3,x2,y2,x1,y1,c1) is non empty by A22,A29,A34,A44 ,A49,A48,A50,A51; end; end; hence c4 is non empty implies CARR4(x4,y4,x3,y3,x2,y2,x1,y1,c1) is non empty by A24,Def21; assume A53: CARR4(x4,y4,x3,y3,x2,y2,x1,y1,c1) is non empty; assume A54: c4 is empty; per cases by A13,A22,A23,A24,A54,Def14,Def18,Def21; suppose q4 is non empty; hence thesis by A49,A53; end; suppose q3 is non empty & p4 is non empty; hence thesis by A44,A48,A53; end; suppose q2 is non empty & p4 is non empty & p3 is non empty; hence thesis by A34,A42,A48,A53; end; suppose q1 is non empty & p4 is non empty & p3 is non empty & p2 is non empty; hence thesis by A29,A35,A42,A48,A53; end; suppose p4 is non empty & p3 is non empty & p2 is non empty & p1 is non empty & c1 is empty; hence thesis by A25,A35,A42,A48,A53; end; end; begin reserve a,b,c,d for set; theorem for s0,s1,s2,s3,s4,s5,s6,s7,ns0,ns1,ns2,ns3,ns4,ns5,ns6,ns7,q1,q2,q3, nq1, nq2,nq3 being set holds (s0 is non empty iff AND3(NOT1 q3,NOT1 q2,NOT1 q1) is not empty)& (s1 is non empty iff AND3(NOT1 q3,NOT1 q2,q1) is not empty)& (s2 is non empty iff AND3(NOT1 q3,q2,NOT1 q1) is not empty)& (s3 is non empty iff AND3(NOT1 q3,q2,q1) is not empty)& (s4 is non empty iff AND3(q3,NOT1 q2,NOT1 q1 ) is not empty)& (s5 is non empty iff AND3(q3,NOT1 q2,q1) is not empty)& (s6 is non empty iff AND3(q3,q2,NOT1 q1) is not empty)& (s7 is non empty iff AND3(q3, q2,q1) is not empty)& (ns0 is non empty iff AND3(NOT1 nq3,NOT1 nq2,NOT1 nq1) is not empty)& (ns1 is non empty iff AND3(NOT1 nq3,NOT1 nq2,nq1) is not empty)& ( ns2 is non empty iff AND3(NOT1 nq3,nq2,NOT1 nq1) is not empty)& (ns3 is non empty iff AND3(NOT1 nq3,nq2,nq1) is not empty)& (ns4 is non empty iff AND3(nq3, NOT1 nq2,NOT1 nq1) is not empty)& (ns5 is non empty iff AND3(nq3,NOT1 nq2,nq1) is not empty)& (ns6 is non empty iff AND3(nq3,nq2,NOT1 nq1) is not empty)& (ns7 is non empty iff AND3(nq3,nq2,nq1) is not empty)& (nq1 is non empty iff (NOT1 q1) is not empty)& (nq2 is non empty iff XOR2(q1,q2) is not empty)& (nq3 is non empty iff OR2(AND2(q3, NOT1 q1), AND2(q1, XOR2(q2,q3))) is not empty) implies ( ns1 is non empty iff s0 is non empty)& (ns2 is non empty iff s1 is non empty)& (ns3 is non empty iff s2 is non empty)& (ns4 is non empty iff s3 is non empty)& (ns5 is non empty iff s4 is non empty)& (ns6 is non empty iff s5 is non empty)& (ns7 is non empty iff s6 is non empty)& (ns0 is non empty iff s7 is non empty) proof let s0,s1,s2,s3,s4,s5,s6,s7,ns0,ns1,ns2,ns3,ns4,ns5,ns6,ns7,q1,q2,q3,nq1, nq2,nq3 be set; assume that A1: s0 is non empty iff AND3(NOT1 q3,NOT1 q2,NOT1 q1) is not empty and A2: s1 is non empty iff AND3(NOT1 q3,NOT1 q2,q1) is not empty and A3: s2 is non empty iff AND3(NOT1 q3,q2,NOT1 q1) is not empty and A4: s3 is non empty iff AND3(NOT1 q3,q2,q1) is not empty and A5: s4 is non empty iff AND3(q3,NOT1 q2,NOT1 q1) is not empty and A6: s5 is non empty iff AND3(q3,NOT1 q2,q1) is not empty and A7: s6 is non empty iff AND3(q3,q2,NOT1 q1) is not empty and A8: s7 is non empty iff AND3(q3,q2,q1) is not empty and A9: ns0 is non empty iff AND3(NOT1 nq3,NOT1 nq2,NOT1 nq1) is not empty and A10: ns1 is non empty iff AND3(NOT1 nq3,NOT1 nq2,nq1) is not empty and A11: ns2 is non empty iff AND3(NOT1 nq3,nq2,NOT1 nq1) is not empty and A12: ns3 is non empty iff AND3(NOT1 nq3,nq2,nq1) is not empty and A13: ns4 is non empty iff AND3(nq3,NOT1 nq2,NOT1 nq1) is not empty and A14: ns5 is non empty iff AND3(nq3,NOT1 nq2,nq1) is not empty and A15: ns6 is non empty iff AND3(nq3,nq2,NOT1 nq1) is not empty and A16: ns7 is non empty iff AND3(nq3,nq2,nq1) is not empty and A17: ( nq1 is non empty iff NOT1 q1 is not empty)&( nq2 is non empty iff XOR2(q1,q2) is not empty) and A18: nq3 is non empty iff OR2(AND2(q3, NOT1 q1), AND2(q1, XOR2(q2,q3))) is not empty; ns1 is non empty iff NOT1 nq3 is non empty & not XOR2(q1,q2) is not empty & not q1 is non empty by A10,A17; then ns1 is non empty iff (not q3 is not empty or not NOT1 q1 is not empty) & (not q1 is not empty or not XOR2(q2,q3) is not empty) & not q2 is non empty & not q1 is non empty by A18; hence ns1 is non empty iff s0 is non empty by A1; ns2 is non empty iff not AND2(q3, NOT1 q1) is non empty & not AND2(q1, XOR2(q2,q3)) is non empty & not q2 is non empty & q1 is non empty by A11,A17 ,A18,GATE_1:6; then ns2 is non empty iff (not q3 is non empty or q1 is non empty) & not q3 is non empty & not q2 is non empty & q1 is non empty; hence ns2 is non empty iff s1 is non empty by A2; ns3 is non empty iff NOT1 nq3 is non empty & XOR2(q1,q2) is non empty & not q1 is non empty by A12,A17; then ns3 is non empty iff (not q3 is non empty or not NOT1 q1 is non empty) & (not q1 is non empty or not XOR2(q2,q3) is non empty) & q2 is non empty & not q1 is non empty by A18; hence ns3 is non empty iff s2 is non empty by A3; ns4 is non empty iff (AND2(q3, NOT1 q1) is non empty or AND2(q1, XOR2( q2,q3)) is non empty) & q2 is non empty & q1 is non empty by A13,A17,A18, GATE_1:6; then ns4 is non empty iff not q3 is non empty & q2 is non empty & q1 is non empty; hence ns4 is non empty iff s3 is non empty by A4; ns5 is non empty iff nq3 is non empty & not XOR2(q1,q2) is non empty & not q1 is non empty by A14,A17; then ns5 is non empty iff (AND2(q3, NOT1 q1) is non empty or AND2(q1, XOR2( q2,q3)) is non empty) & not q2 is non empty & not q1 is non empty by A18; then ns5 is non empty iff q3 is non empty & NOT1 q2 is non empty & NOT1 q1 is non empty; hence ns5 is non empty iff s4 is non empty by A5; ns6 is non empty iff (AND2(q3, NOT1 q1) is non empty or AND2(q1, XOR2( q2,q3)) is non empty) & not q2 is non empty & q1 is non empty by A15,A17,A18, GATE_1:6; then ns6 is non empty iff q3 is non empty & not q2 is non empty & q1 is non empty; hence ns6 is non empty iff s5 is non empty by A6; ns7 is non empty iff nq3 is non empty & XOR2(q1,q2) is non empty & not q1 is non empty by A16,A17; then ns7 is non empty iff (AND2(q3, NOT1 q1) is non empty or AND2(q1, XOR2( q2,q3)) is non empty) & q2 is non empty & not q1 is non empty by A18; then ns7 is non empty iff q3 is non empty & q2 is non empty & NOT1 q1 is non empty; hence ns7 is non empty iff s6 is non empty by A7; ns0 is non empty iff not AND2(q3, NOT1 q1) is non empty & not AND2(q1, XOR2(q2,q3)) is non empty & q2 is non empty & q1 is non empty by A9,A17,A18, GATE_1:6; then ns0 is non empty iff (not q3 is non empty or q1 is non empty) & q3 is non empty & q2 is non empty & q1 is non empty; hence thesis by A8; end; theorem AND3(AND2(a,d),AND2(b,d),AND2(c,d)) is non empty iff AND2(AND3(a,b,c), d) is non empty proof a is non empty & b is non empty & c is non empty & d is non empty iff AND3(a,b,c) is non empty & d is non empty; hence thesis; end; theorem (not AND2(a,b) is non empty iff OR2(NOT1 a, NOT1 b) is non empty)& ( OR2(a,b) is non empty & OR2(c,b) is non empty iff OR2(AND2(a,c),b) is non empty ) & (OR2(a,b) is non empty & OR2(c,b) is non empty & OR2(d,b) is non empty iff OR2(AND3(a,c,d),b) is non empty)& (OR2(a,b) is non empty & (a is non empty iff c is non empty) implies OR2(c,b) is non empty ) proof A1: OR2(a,b) is non empty & OR2(c,b) is non empty iff (a is non empty or b is non empty) & (c is non empty or b is non empty); A2: OR2(a,b) is non empty & OR2(c,b) is non empty & OR2(d,b) is non empty iff (a is non empty or b is non empty ) & (c is non empty or b is non empty ) & (d is non empty or b is non empty ); not AND2(a,b) is non empty iff not (a is non empty & b is non empty); hence thesis by A1,A2; end; theorem for s0,s1,s2,s3,s4,s5,s6,s7,ns0,ns1,ns2,ns3,ns4,ns5,ns6,ns7,q1,q2,q3, nq1, nq2,nq3,R being set holds (s0 is non empty iff AND3(NOT1 q3,NOT1 q2,NOT1 q1) is non empty)& (s1 is non empty iff AND3(NOT1 q3,NOT1 q2,q1) is non empty)& (s2 is non empty iff AND3(NOT1 q3,q2,NOT1 q1) is non empty)& (s3 is non empty iff AND3(NOT1 q3,q2,q1) is non empty)& (s4 is non empty iff AND3(q3,NOT1 q2, NOT1 q1) is non empty)& (s5 is non empty iff AND3(q3,NOT1 q2,q1) is non empty)& (s6 is non empty iff AND3(q3,q2,NOT1 q1) is non empty)& (s7 is non empty iff AND3(q3,q2,q1) is non empty)& (ns0 is non empty iff AND3(NOT1 nq3,NOT1 nq2,NOT1 nq1) is non empty)& (ns1 is non empty iff AND3(NOT1 nq3,NOT1 nq2,nq1) is non empty)& (ns2 is non empty iff AND3(NOT1 nq3,nq2,NOT1 nq1) is non empty)& (ns3 is non empty iff AND3(NOT1 nq3,nq2,nq1) is non empty)& (ns4 is non empty iff AND3(nq3,NOT1 nq2,NOT1 nq1) is non empty)& (ns5 is non empty iff AND3(nq3,NOT1 nq2,nq1) is non empty)& (ns6 is non empty iff AND3(nq3,nq2,NOT1 nq1) is non empty)& (ns7 is non empty iff AND3(nq3,nq2,nq1) is non empty)& (nq1 is non empty iff AND2(NOT1 q1,R) is non empty)& (nq2 is non empty iff AND2(XOR2(q1,q2) ,R) is non empty)& (nq3 is non empty iff AND2(OR2(AND2(q3, NOT1 q1), AND2(q1, XOR2(q2,q3))),R) is non empty) implies (ns1 is non empty iff AND2(s0,R) is non empty)& (ns2 is non empty iff AND2(s1,R) is non empty)& (ns3 is non empty iff AND2(s2,R) is non empty)& (ns4 is non empty iff AND2(s3,R) is non empty)& (ns5 is non empty iff AND2(s4,R) is non empty)& (ns6 is non empty iff AND2(s5,R) is non empty)& (ns7 is non empty iff AND2(s6,R) is non empty)& (ns0 is non empty iff OR2(s7,NOT1 R) is non empty) proof let s0,s1,s2,s3,s4,s5,s6,s7,ns0,ns1,ns2,ns3,ns4,ns5,ns6,ns7,q1,q2,q3,nq1, nq2,nq3,R be set; assume that A1: s0 is non empty iff AND3(NOT1 q3,NOT1 q2,NOT1 q1) is non empty and A2: s1 is non empty iff AND3(NOT1 q3,NOT1 q2,q1) is non empty and A3: s2 is non empty iff AND3(NOT1 q3,q2,NOT1 q1) is non empty and A4: s3 is non empty iff AND3(NOT1 q3,q2,q1) is non empty and A5: s4 is non empty iff AND3(q3,NOT1 q2,NOT1 q1) is non empty and A6: s5 is non empty iff AND3(q3,NOT1 q2,q1) is non empty and A7: s6 is non empty iff AND3(q3,q2,NOT1 q1) is non empty and A8: s7 is non empty iff AND3(q3,q2,q1) is non empty and A9: ns0 is non empty iff AND3(NOT1 nq3,NOT1 nq2,NOT1 nq1) is non empty and A10: ns1 is non empty iff AND3(NOT1 nq3,NOT1 nq2,nq1) is non empty and A11: ns2 is non empty iff AND3(NOT1 nq3,nq2,NOT1 nq1) is non empty and A12: ns3 is non empty iff AND3(NOT1 nq3,nq2,nq1) is non empty and A13: ns4 is non empty iff AND3(nq3,NOT1 nq2,NOT1 nq1) is non empty and A14: ns5 is non empty iff AND3(nq3,NOT1 nq2,nq1) is non empty and A15: ns6 is non empty iff AND3(nq3,nq2,NOT1 nq1) is non empty and A16: ns7 is non empty iff AND3(nq3,nq2,nq1) is non empty and A17: nq1 is non empty iff AND2(NOT1 q1,R) is non empty and A18: nq2 is non empty iff AND2(XOR2(q1,q2),R) is non empty and A19: nq3 is non empty iff AND2(OR2(AND2(q3, NOT1 q1), AND2(q1, XOR2(q2, q3))),R) is non empty; ns1 is non empty iff not nq3 is non empty & ( not XOR2(q1,q2) is non empty or not R is non empty) & not q1 is non empty & R is non empty by A10,A17 ,A18; then ns1 is non empty iff (not q3 is non empty or not NOT1 q1 is non empty) & (not q1 is non empty or not XOR2(q2,q3) is non empty) & not q2 is non empty & not q1 is non empty & R is non empty by A19; hence ns1 is non empty iff AND2(s0,R) is non empty by A1; ns2 is non empty iff not nq3 is non empty & XOR2(q1,q2) is non empty & R is non empty & (not NOT1 q1 is non empty or not R is non empty) by A11,A17 ,A18; then ns2 is non empty iff not nq3 is non empty & XOR2(q1,q2) is non empty & R is non empty & q1 is non empty; then ns2 is non empty iff not AND2(q3, NOT1 q1) is non empty & not AND2(q1, XOR2(q2,q3)) is non empty & not q2 is non empty & q1 is non empty & R is non empty by A19; then ns2 is non empty iff (not q3 is non empty or q1 is non empty) & not q3 is non empty & not q2 is non empty & q1 is non empty & R is non empty; hence ns2 is non empty iff AND2(s1,R) is non empty by A2; ns3 is non empty iff not nq3 is non empty & XOR2(q1,q2) is non empty & R is non empty & not q1 is non empty & R is non empty by A12,A17,A18; then ns3 is non empty iff (not q3 is non empty or not NOT1 q1 is non empty) & (not q1 is non empty or not XOR2(q2,q3) is non empty) & q2 is non empty & not q1 is non empty & R is non empty by A19; hence ns3 is non empty iff AND2(s2,R) is non empty by A3; ns4 is non empty iff OR2(AND2(q3, NOT1 q1), AND2(q1, XOR2(q2,q3))) is non empty & R is non empty & not nq2 is non empty & not AND2(NOT1 q1,R) is non empty by A13,A17,A19; then ns4 is non empty iff OR2(AND2(q3, NOT1 q1), AND2(q1, XOR2(q2,q3))) is non empty & R is non empty & not XOR2(q1,q2) is non empty & q1 is non empty by A18; then ns4 is non empty iff ( q3 is non empty & NOT1 q1 is non empty or q1 is non empty & XOR2(q2,q3) is non empty ) & R is non empty & q2 is non empty & q1 is non empty; then ns4 is non empty iff not q3 is non empty & R is non empty & q2 is non empty & q1 is non empty; hence ns4 is non empty iff AND2(s3,R) is non empty by A4; ns5 is non empty iff nq3 is non empty & (not XOR2(q1,q2) is non empty or not R is non empty) & not q1 is non empty & R is non empty by A14,A17,A18; then ns5 is non empty iff OR2(AND2(q3, NOT1 q1), AND2(q1, XOR2(q2,q3))) is non empty & not q2 is non empty & not q1 is non empty & R is non empty by A19; then ns5 is non empty iff q3 is non empty & NOT1 q2 is non empty & NOT1 q1 is non empty & R is non empty; hence ns5 is non empty iff AND2(s4,R) is non empty by A5; ns6 is non empty iff nq3 is non empty & XOR2(q1,q2) is non empty & R is non empty & (not NOT1 q1 is non empty or not R is non empty) by A15,A17,A18; then ns6 is non empty iff nq3 is non empty & XOR2(q1,q2) is non empty & R is non empty & q1 is non empty; then ns6 is non empty iff ( q3 is non empty & NOT1 q1 is non empty or q1 is non empty & XOR2(q2,q3) is non empty ) & R is non empty & not q2 is non empty & q1 is non empty by A19; then ns6 is non empty iff q3 is non empty & R is non empty & not q2 is non empty & q1 is non empty; hence ns6 is non empty iff AND2(s5,R) is non empty by A6; ns7 is non empty iff nq3 is non empty & XOR2(q1,q2) is non empty & not q1 is non empty & R is non empty by A16,A17,A18; then ns7 is non empty iff OR2(AND2(q3, NOT1 q1), AND2(q1, XOR2(q2,q3))) is non empty & q2 is non empty & not q1 is non empty & R is non empty by A19; then ns7 is non empty iff q3 is non empty & q2 is non empty & NOT1 q1 is non empty & R is non empty; hence ns7 is non empty iff AND2(s6,R) is non empty by A7; ns0 is non empty iff q1 is non empty & not XOR2(q1,q2) is non empty & not OR2(AND2(q3, NOT1 q1), AND2(q1, XOR2(q2,q3))) is non empty or not R is non empty by A9,A17,A18,A19; then ns0 is non empty iff q1 is non empty & q2 is non empty & not AND2(q3, NOT1 q1) is non empty & not XOR2(q2,q3) is non empty or not R is non empty; then ns0 is non empty iff q1 is non empty & q2 is non empty & q1 is non empty & q3 is non empty or not R is non empty; hence thesis by A8; end; begin theorem for s0,s1,s2,s3,ns0,ns1,ns2,ns3,q1,q2,nq1,nq2 being set holds (s0 is not empty iff AND2(NOT1 q2, NOT1 q1) is not empty)& (s1 is not empty iff AND2( NOT1 q2, q1) is not empty)& (s2 is not empty iff AND2( q2, NOT1 q1) is not empty)& (s3 is not empty iff AND2( q2, q1) is not empty) & (ns0 is not empty iff AND2(NOT1 nq2,NOT1 nq1) is not empty)& (ns1 is not empty iff AND2(NOT1 nq2, nq1) is not empty)& (ns2 is not empty iff AND2( nq2,NOT1 nq1) is not empty)& ( ns3 is not empty iff AND2( nq2, nq1) is not empty) & (nq1 is not empty iff NOT1 q2 is not empty)& (nq2 is not empty iff q1 is not empty) implies (ns1 is not empty iff s0 is not empty)& (ns3 is not empty iff s1 is not empty)& (ns2 is not empty iff s3 is not empty)& (ns0 is not empty iff s2 is not empty) proof let s0,s1,s2,s3,ns0,ns1,ns2,ns3,q1,q2,nq1,nq2 be set; assume that A1: s0 is not empty iff AND2(NOT1 q2,NOT1 q1) is not empty and A2: s1 is not empty iff AND2(NOT1 q2,q1) is not empty and A3: s2 is not empty iff AND2(q2,NOT1 q1) is not empty and A4: s3 is not empty iff AND2(q2,q1) is not empty and A5: ns0 is not empty iff AND2(NOT1 nq2,NOT1 nq1) is not empty and A6: ns1 is not empty iff AND2(NOT1 nq2,nq1) is not empty and A7: ns2 is not empty iff AND2(nq2,NOT1 nq1) is not empty and A8: ns3 is not empty iff AND2(nq2,nq1) is not empty and A9: ( nq1 is not empty iff NOT1 q2 is not empty)&( nq2 is not empty iff q1 is not empty); thus ns1 is not empty iff s0 is not empty by A1,A6,A9; thus ns3 is not empty iff s1 is not empty by A2,A8,A9; ns2 is not empty iff q2 is not empty & q1 is not empty by A7,A9; hence ns2 is not empty iff s3 is not empty by A4; ns0 is not empty iff q2 is not empty & NOT1 q1 is not empty by A5,A9; hence thesis by A3; end; theorem for s0,s1,s2,s3,ns0,ns1,ns2,ns3,q1,q2,nq1,nq2,R being set holds (s0 is not empty iff AND2(NOT1 q2, NOT1 q1) is not empty)& (s1 is not empty iff AND2( NOT1 q2, q1) is not empty)& (s2 is not empty iff AND2( q2, NOT1 q1) is not empty)& (s3 is not empty iff AND2( q2, q1) is not empty) & (ns0 is not empty iff AND2(NOT1 nq2,NOT1 nq1) is not empty)& (ns1 is not empty iff AND2(NOT1 nq2, nq1) is not empty)& (ns2 is not empty iff AND2( nq2,NOT1 nq1) is not empty)& ( ns3 is not empty iff AND2( nq2, nq1) is not empty) & (nq1 is not empty iff AND2 (NOT1 q2, R) is not empty)& (nq2 is not empty iff AND2( q1, R) is not empty) implies (ns1 is not empty iff AND2(s0, R) is not empty)& (ns3 is not empty iff AND2(s1, R) is not empty)& (ns2 is not empty iff AND2(s3, R) is not empty)& ( ns0 is not empty iff OR2(AND2(s2, R),NOT1 R) is not empty) proof let s0,s1,s2,s3,ns0,ns1,ns2,ns3,q1,q2,nq1,nq2,R be set; assume that A1: s0 is not empty iff AND2(NOT1 q2,NOT1 q1) is not empty and A2: s1 is not empty iff AND2(NOT1 q2,q1) is not empty and A3: s2 is not empty iff AND2(q2,NOT1 q1) is not empty and A4: s3 is not empty iff AND2(q2,q1) is not empty and A5: ns0 is not empty iff AND2(NOT1 nq2,NOT1 nq1) is not empty and A6: ns1 is not empty iff AND2(NOT1 nq2,nq1) is not empty and A7: ns2 is not empty iff AND2(nq2,NOT1 nq1) is not empty and A8: ns3 is not empty iff AND2(nq2,nq1) is not empty and A9: ( nq1 is not empty iff AND2(NOT1 q2,R) is not empty)&( nq2 is not empty iff AND2( q1,R) is not empty); ns1 is not empty iff NOT1 q2 is not empty & R is not empty & not(q1 is not empty & R is not empty) by A6,A9; hence ns1 is not empty iff AND2(s0,R) is not empty by A1; ns3 is not empty iff NOT1 q2 is not empty & q1 is not empty & R is not empty by A8,A9; hence ns3 is not empty iff AND2(s1,R) is not empty by A2; ns2 is not empty iff not(NOT1 q2 is not empty & R is not empty) & q1 is not empty & R is not empty by A7,A9; then ns2 is not empty iff q2 is not empty & q1 is not empty & R is not empty; hence ns2 is not empty iff AND2(s3,R) is not empty by A4; ns0 is not empty iff not(NOT1 q2 is not empty & R is not empty) & not( q1 is not empty & R is not empty) by A5,A9; then ns0 is not empty iff q2 is not empty & NOT1 q1 is not empty & R is not empty or not R is not empty; hence thesis by A3; end; theorem for s0,s1,s2,s3,s4,s5,s6,s7,ns0,ns1,ns2,ns3,ns4,ns5,ns6,ns7, q1,q2,q3, nq1,nq2,nq3 being set holds (s0 is not empty iff AND3(NOT1 q3, NOT1 q2, NOT1 q1 ) is not empty)& (s1 is not empty iff AND3(NOT1 q3, NOT1 q2, q1) is not empty)& (s2 is not empty iff AND3(NOT1 q3, q2, NOT1 q1) is not empty)& (s3 is not empty iff AND3(NOT1 q3, q2, q1) is not empty)& (s4 is not empty iff AND3( q3, NOT1 q2 , NOT1 q1) is not empty)& (s5 is not empty iff AND3( q3, NOT1 q2, q1) is not empty)& (s6 is not empty iff AND3( q3, q2, NOT1 q1) is not empty)& (s7 is not empty iff AND3( q3, q2, q1) is not empty) & (ns0 is not empty iff AND3(NOT1 nq3 ,NOT1 nq2,NOT1 nq1) is not empty)& (ns1 is not empty iff AND3(NOT1 nq3,NOT1 nq2 , nq1) is not empty)& (ns2 is not empty iff AND3(NOT1 nq3, nq2,NOT1 nq1) is not empty)& (ns3 is not empty iff AND3(NOT1 nq3, nq2, nq1) is not empty)& (ns4 is not empty iff AND3( nq3,NOT1 nq2,NOT1 nq1) is not empty)& (ns5 is not empty iff AND3( nq3,NOT1 nq2, nq1) is not empty)& (ns6 is not empty iff AND3( nq3, nq2, NOT1 nq1) is not empty)& (ns7 is not empty iff AND3( nq3, nq2, nq1) is not empty) & (nq1 is not empty iff NOT1 q3 is not empty)& (nq2 is not empty iff q1 is not empty)& (nq3 is not empty iff q2 is not empty) implies (ns1 is not empty iff s0 is not empty)& (ns3 is not empty iff s1 is not empty)& (ns7 is not empty iff s3 is not empty)& (ns6 is not empty iff s7 is not empty)& (ns4 is not empty iff s6 is not empty)& (ns0 is not empty iff s4 is not empty) & (ns2 is not empty iff s5 is not empty)& (ns5 is not empty iff s2 is not empty) proof let s0,s1,s2,s3,s4,s5,s6,s7,ns0,ns1,ns2,ns3,ns4,ns5,ns6,ns7, q1,q2,q3,nq1, nq2,nq3 be set; assume that A1: s0 is not empty iff AND3(NOT1 q3,NOT1 q2,NOT1 q1) is not empty and A2: s1 is not empty iff AND3(NOT1 q3,NOT1 q2,q1) is not empty and A3: s2 is not empty iff AND3(NOT1 q3,q2,NOT1 q1) is not empty and A4: s3 is not empty iff AND3(NOT1 q3,q2,q1) is not empty and A5: s4 is not empty iff AND3(q3,NOT1 q2,NOT1 q1) is not empty and A6: s5 is not empty iff AND3(q3,NOT1 q2,q1) is not empty and A7: s6 is not empty iff AND3(q3,q2,NOT1 q1) is not empty and A8: s7 is not empty iff AND3(q3,q2,q1) is not empty and A9: ns0 is not empty iff AND3(NOT1 nq3,NOT1 nq2,NOT1 nq1) is not empty and A10: ns1 is not empty iff AND3(NOT1 nq3,NOT1 nq2,nq1) is not empty and A11: ns2 is not empty iff AND3(NOT1 nq3,nq2,NOT1 nq1) is not empty and A12: ns3 is not empty iff AND3(NOT1 nq3,nq2,nq1) is not empty and A13: ns4 is not empty iff AND3(nq3,NOT1 nq2,NOT1 nq1) is not empty and A14: ns5 is not empty iff AND3(nq3,NOT1 nq2,nq1) is not empty and A15: ns6 is not empty iff AND3(nq3,nq2,NOT1 nq1) is not empty and A16: ns7 is not empty iff AND3(nq3,nq2,nq1) is not empty and A17: ( nq1 is not empty iff NOT1 q3 is not empty)&( nq2 is not empty iff q1 is not empty) &( nq3 is not empty iff q2 is not empty); thus ns1 is not empty iff s0 is not empty by A1,A10,A17; thus ns3 is not empty iff s1 is not empty by A2,A12,A17; thus ns7 is not empty iff s3 is not empty by A4,A16,A17; ns6 is not empty iff q3 is not empty & q2 is not empty & q1 is not empty by A15,A17; hence ns6 is not empty iff s7 is not empty by A8; ns4 is not empty iff q3 is not empty & q2 is not empty & NOT1 q1 is not empty by A13,A17; hence ns4 is not empty iff s6 is not empty by A7; ns0 is not empty iff q3 is not empty & NOT1 q2 is not empty & NOT1 q1 is not empty by A9,A17; hence ns0 is not empty iff s4 is not empty by A5; ns2 is not empty iff q3 is not empty & NOT1 q2 is not empty & q1 is not empty by A11,A17; hence ns2 is not empty iff s5 is not empty by A6; thus thesis by A3,A14,A17; end; theorem for s0,s1,s2,s3,s4,s5,s6,s7,ns0,ns1,ns2,ns3,ns4,ns5,ns6,ns7, q1,q2,q3, nq1,nq2,nq3,R being set holds (s0 is not empty iff AND3(NOT1 q3, NOT1 q2, NOT1 q1) is not empty)& (s1 is not empty iff AND3(NOT1 q3, NOT1 q2, q1) is not empty )& (s2 is not empty iff AND3(NOT1 q3, q2, NOT1 q1) is not empty)& (s3 is not empty iff AND3(NOT1 q3, q2, q1) is not empty)& (s4 is not empty iff AND3( q3, NOT1 q2, NOT1 q1) is not empty)& (s5 is not empty iff AND3( q3, NOT1 q2, q1) is not empty)& (s6 is not empty iff AND3( q3, q2, NOT1 q1) is not empty)& (s7 is not empty iff AND3( q3, q2, q1) is not empty) & (ns0 is not empty iff AND3(NOT1 nq3,NOT1 nq2,NOT1 nq1) is not empty)& (ns1 is not empty iff AND3(NOT1 nq3,NOT1 nq2, nq1) is not empty)& (ns2 is not empty iff AND3(NOT1 nq3, nq2,NOT1 nq1) is not empty)& (ns3 is not empty iff AND3(NOT1 nq3, nq2, nq1) is not empty)& (ns4 is not empty iff AND3( nq3,NOT1 nq2,NOT1 nq1) is not empty)& (ns5 is not empty iff AND3( nq3,NOT1 nq2, nq1) is not empty)& (ns6 is not empty iff AND3( nq3, nq2,NOT1 nq1) is not empty)& (ns7 is not empty iff AND3( nq3, nq2, nq1) is not empty) & (nq1 is not empty iff AND2(NOT1 q3, R) is not empty)& (nq2 is not empty iff AND2( q1, R) is not empty)& (nq3 is not empty iff AND2( q2, R) is not empty) implies (ns1 is not empty iff AND2(s0, R) is not empty)& (ns3 is not empty iff AND2(s1, R) is not empty)& (ns7 is not empty iff AND2(s3, R) is not empty)& (ns6 is not empty iff AND2(s7, R) is not empty)& (ns4 is not empty iff AND2(s6, R) is not empty)& (ns0 is not empty iff OR2(AND2(s4, R),NOT1 R) is not empty) & (ns2 is not empty iff AND2(s5, R) is not empty)& (ns5 is not empty iff AND2(s2, R) is not empty) proof let s0,s1,s2,s3,s4,s5,s6,s7,ns0,ns1,ns2,ns3,ns4,ns5,ns6,ns7, q1,q2,q3,nq1, nq2,nq3,R be set; assume that A1: s0 is not empty iff AND3(NOT1 q3,NOT1 q2,NOT1 q1) is not empty and A2: s1 is not empty iff AND3(NOT1 q3,NOT1 q2,q1) is not empty and A3: s2 is not empty iff AND3(NOT1 q3,q2,NOT1 q1) is not empty and A4: s3 is not empty iff AND3(NOT1 q3,q2,q1) is not empty and A5: s4 is not empty iff AND3(q3,NOT1 q2,NOT1 q1) is not empty and A6: s5 is not empty iff AND3(q3,NOT1 q2,q1) is not empty and A7: s6 is not empty iff AND3(q3,q2,NOT1 q1) is not empty and A8: s7 is not empty iff AND3(q3,q2,q1) is not empty and A9: ns0 is not empty iff AND3(NOT1 nq3,NOT1 nq2,NOT1 nq1) is not empty and A10: ns1 is not empty iff AND3(NOT1 nq3,NOT1 nq2,nq1) is not empty and A11: ns2 is not empty iff AND3(NOT1 nq3,nq2,NOT1 nq1) is not empty and A12: ns3 is not empty iff AND3(NOT1 nq3,nq2,nq1) is not empty and A13: ns4 is not empty iff AND3(nq3,NOT1 nq2,NOT1 nq1) is not empty and A14: ns5 is not empty iff AND3(nq3,NOT1 nq2,nq1) is not empty and A15: ns6 is not empty iff AND3(nq3,nq2,NOT1 nq1) is not empty and A16: ns7 is not empty iff AND3(nq3,nq2,nq1) is not empty and A17: ( nq1 is not empty iff AND2(NOT1 q3,R) is not empty)&( nq2 is not empty iff AND2( q1,R) is not empty) &( nq3 is not empty iff AND2( q2,R) is not empty); ns1 is not empty iff NOT1 q3 is not empty & R is not empty & not(q2 is not empty & R is not empty) & not(q1 is not empty & R is not empty) by A10,A17; hence ns1 is not empty iff AND2(s0,R) is not empty by A1; ns3 is not empty iff NOT1 q3 is not empty & R is not empty & not(q2 is not empty & R is not empty) & q1 is not empty & R is not empty by A12,A17; hence ns3 is not empty iff AND2(s1,R) is not empty by A2; ns7 is not empty iff NOT1 q3 is not empty & R is not empty & q2 is not empty & R is not empty & q1 is not empty & R is not empty by A16,A17; hence ns7 is not empty iff AND2(s3,R) is not empty by A4; ns6 is not empty iff not(NOT1 q3 is not empty & R is not empty) & q2 is not empty & R is not empty & q1 is not empty & R is not empty by A15,A17; then ns6 is not empty iff q3 is not empty & q2 is not empty & q1 is not empty & R is not empty; hence ns6 is not empty iff AND2(s7,R) is not empty by A8; ns4 is not empty iff not(NOT1 q3 is not empty & R is not empty) & q2 is not empty & R is not empty & not(q1 is not empty & R is not empty) by A13,A17; then ns4 is not empty iff q3 is not empty & q2 is not empty & NOT1 q1 is not empty & R is not empty; hence ns4 is not empty iff AND2(s6,R) is not empty by A7; ns0 is not empty iff not(NOT1 q3 is not empty & R is not empty) & not( q2 is not empty & R is not empty) & not(q1 is not empty & R is not empty) by A9 ,A17; then ns0 is not empty iff q3 is not empty & NOT1 q2 is not empty & NOT1 q1 is not empty & R is not empty or not(R) is not empty; hence ns0 is not empty iff OR2(AND2(s4, R),NOT1 R) is not empty by A5; ns2 is not empty iff not(NOT1 q3 is not empty & R is not empty) & not( q2 is not empty & R is not empty) & q1 is not empty & R is not empty by A11,A17 ; then ns2 is not empty iff q3 is not empty & NOT1 q2 is not empty & q1 is not empty & R is not empty; hence ns2 is not empty iff AND2(s5,R) is not empty by A6; ns5 is not empty iff NOT1 q3 is not empty & R is not empty & q2 is not empty & R is not empty & not(q1 is not empty & R is not empty) by A14,A17; hence thesis by A3; end; theorem for s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15, ns0,ns1,ns2 ,ns3,ns4,ns5,ns6,ns7,ns8,ns9,ns10,ns11,ns12,ns13,ns14,ns15, q1,q2,q3,q4,nq1,nq2 ,nq3,nq4 being set holds (s0 is not empty iff AND4(NOT1 q4, NOT1 q3, NOT1 q2, NOT1 q1) is not empty)& (s1 is not empty iff AND4(NOT1 q4, NOT1 q3, NOT1 q2, q1 ) is not empty)& (s2 is not empty iff AND4(NOT1 q4, NOT1 q3, q2, NOT1 q1) is not empty)& (s3 is not empty iff AND4(NOT1 q4, NOT1 q3, q2, q1) is not empty)& (s4 is not empty iff AND4(NOT1 q4, q3, NOT1 q2, NOT1 q1) is not empty)& (s5 is not empty iff AND4(NOT1 q4, q3, NOT1 q2, q1) is not empty)& (s6 is not empty iff AND4(NOT1 q4, q3, q2, NOT1 q1) is not empty)& (s7 is not empty iff AND4( NOT1 q4, q3, q2, q1) is not empty)& (s8 is not empty iff AND4( q4, NOT1 q3, NOT1 q2, NOT1 q1) is not empty)& (s9 is not empty iff AND4( q4, NOT1 q3, NOT1 q2, q1) is not empty)& (s10 is not empty iff AND4( q4, NOT1 q3, q2, NOT1 q1) is not empty)& (s11 is not empty iff AND4( q4, NOT1 q3, q2, q1) is not empty)& ( s12 is not empty iff AND4( q4, q3, NOT1 q2, NOT1 q1) is not empty)& (s13 is not empty iff AND4( q4, q3, NOT1 q2, q1) is not empty)& (s14 is not empty iff AND4( q4, q3, q2, NOT1 q1) is not empty)& (s15 is not empty iff AND4( q4, q3, q2, q1) is not empty) & (ns0 is not empty iff AND4(NOT1 nq4, NOT1 nq3, NOT1 nq2, NOT1 nq1) is not empty)& (ns1 is not empty iff AND4(NOT1 nq4, NOT1 nq3, NOT1 nq2, nq1) is not empty)& (ns2 is not empty iff AND4(NOT1 nq4, NOT1 nq3, nq2, NOT1 nq1) is not empty)& (ns3 is not empty iff AND4(NOT1 nq4, NOT1 nq3, nq2, nq1) is not empty)& (ns4 is not empty iff AND4(NOT1 nq4, nq3, NOT1 nq2, NOT1 nq1) is not empty)& (ns5 is not empty iff AND4(NOT1 nq4, nq3, NOT1 nq2, nq1) is not empty)& (ns6 is not empty iff AND4(NOT1 nq4, nq3, nq2, NOT1 nq1) is not empty)& (ns7 is not empty iff AND4(NOT1 nq4, nq3, nq2, nq1) is not empty)& (ns8 is not empty iff AND4( nq4, NOT1 nq3, NOT1 nq2, NOT1 nq1) is not empty)& (ns9 is not empty iff AND4( nq4, NOT1 nq3, NOT1 nq2, nq1) is not empty)& (ns10 is not empty iff AND4( nq4, NOT1 nq3, nq2, NOT1 nq1) is not empty)& (ns11 is not empty iff AND4( nq4, NOT1 nq3, nq2, nq1) is not empty)& (ns12 is not empty iff AND4( nq4, nq3, NOT1 nq2, NOT1 nq1) is not empty)& (ns13 is not empty iff AND4( nq4, nq3, NOT1 nq2, nq1) is not empty)& (ns14 is not empty iff AND4( nq4, nq3, nq2, NOT1 nq1) is not empty)& (ns15 is not empty iff AND4( nq4, nq3, nq2, nq1) is not empty) & (nq1 is not empty iff NOT1 q4 is not empty)& (nq2 is not empty iff q1 is not empty)& (nq3 is not empty iff q2 is not empty)& (nq4 is not empty iff q3 is not empty) implies (ns1 is not empty iff s0 is not empty )& (ns3 is not empty iff s1 is not empty )& (ns7 is not empty iff s3 is not empty )& (ns15 is not empty iff s7 is not empty )& (ns14 is not empty iff s15 is not empty)& ( ns12 is not empty iff s14 is not empty)& (ns8 is not empty iff s12 is not empty )& (ns0 is not empty iff s8 is not empty ) & (ns5 is not empty iff s2 is not empty )& (ns11 is not empty iff s5 is not empty )& (ns6 is not empty iff s11 is not empty)& (ns13 is not empty iff s6 is not empty )& (ns10 is not empty iff s13 is not empty)& (ns4 is not empty iff s10 is not empty)& (ns9 is not empty iff s4 is not empty)& (ns2 is not empty iff s9 is not empty) proof let s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15, ns0,ns1,ns2,ns3, ns4,ns5,ns6,ns7,ns8,ns9,ns10,ns11,ns12,ns13,ns14,ns15, q1,q2,q3,q4,nq1,nq2,nq3, nq4 be set; assume that A1: s0 is not empty iff AND4(NOT1 q4, NOT1 q3, NOT1 q2, NOT1 q1) is not empty and A2: s1 is not empty iff AND4(NOT1 q4, NOT1 q3, NOT1 q2, q1) is not empty and A3: s2 is not empty iff AND4(NOT1 q4, NOT1 q3, q2, NOT1 q1) is not empty and A4: s3 is not empty iff AND4(NOT1 q4, NOT1 q3, q2, q1) is not empty and A5: s4 is not empty iff AND4(NOT1 q4, q3, NOT1 q2, NOT1 q1) is not empty and A6: s5 is not empty iff AND4(NOT1 q4, q3, NOT1 q2, q1) is not empty and A7: s6 is not empty iff AND4(NOT1 q4, q3, q2, NOT1 q1) is not empty and A8: s7 is not empty iff AND4(NOT1 q4, q3, q2, q1) is not empty and A9: s8 is not empty iff AND4( q4, NOT1 q3, NOT1 q2, NOT1 q1) is not empty and A10: s9 is not empty iff AND4( q4, NOT1 q3, NOT1 q2, q1) is not empty and A11: s10 is not empty iff AND4( q4, NOT1 q3, q2, NOT1 q1) is not empty and A12: s11 is not empty iff AND4( q4, NOT1 q3, q2, q1) is not empty and A13: s12 is not empty iff AND4( q4, q3, NOT1 q2, NOT1 q1) is not empty and A14: s13 is not empty iff AND4( q4, q3, NOT1 q2, q1) is not empty and A15: s14 is not empty iff AND4( q4, q3, q2, NOT1 q1) is not empty and A16: s15 is not empty iff AND4( q4, q3, q2, q1) is not empty and A17: ns0 is not empty iff AND4(NOT1 nq4, NOT1 nq3, NOT1 nq2, NOT1 nq1) is not empty and A18: ns1 is not empty iff AND4(NOT1 nq4, NOT1 nq3, NOT1 nq2, nq1) is not empty and A19: ns2 is not empty iff AND4(NOT1 nq4, NOT1 nq3, nq2, NOT1 nq1) is not empty and A20: ns3 is not empty iff AND4(NOT1 nq4, NOT1 nq3, nq2, nq1) is not empty and A21: ns4 is not empty iff AND4(NOT1 nq4, nq3, NOT1 nq2, NOT1 nq1) is not empty and A22: ns5 is not empty iff AND4(NOT1 nq4, nq3, NOT1 nq2, nq1) is not empty and A23: ns6 is not empty iff AND4(NOT1 nq4, nq3, nq2, NOT1 nq1) is not empty and A24: ns7 is not empty iff AND4(NOT1 nq4, nq3, nq2, nq1) is not empty and A25: ns8 is not empty iff AND4( nq4, NOT1 nq3, NOT1 nq2, NOT1 nq1) is not empty and A26: ns9 is not empty iff AND4( nq4, NOT1 nq3, NOT1 nq2, nq1) is not empty and A27: ns10 is not empty iff AND4( nq4, NOT1 nq3, nq2, NOT1 nq1) is not empty and A28: ns11 is not empty iff AND4( nq4, NOT1 nq3, nq2, nq1) is not empty and A29: ns12 is not empty iff AND4( nq4, nq3, NOT1 nq2, NOT1 nq1) is not empty and A30: ns13 is not empty iff AND4( nq4, nq3, NOT1 nq2, nq1) is not empty and A31: ns14 is not empty iff AND4( nq4, nq3, nq2, NOT1 nq1) is not empty and A32: ns15 is not empty iff AND4( nq4, nq3, nq2, nq1) is not empty and A33: ( nq1 is not empty iff NOT1 q4 is not empty)&( nq2 is not empty iff q1 is not empty) & ( nq3 is not empty iff q2 is not empty)&( nq4 is not empty iff q3 is not empty); thus ns1 is not empty iff s0 is not empty by A1,A18,A33,GATE_1:20; thus ns3 is not empty iff s1 is not empty by A2,A20,A33,GATE_1:20; thus ns7 is not empty iff s3 is not empty by A4,A24,A33,GATE_1:20; thus ns15 is not empty iff s7 is not empty by A8,A32,A33,GATE_1:20; ns14 is not empty iff q4 is not empty & q3 is not empty & q2 is not empty & q1 is not empty by A31,A33,GATE_1:20; hence ns14 is not empty iff s15 is not empty by A16,GATE_1:20; ns12 is not empty iff q4 is not empty & q3 is not empty & q2 is not empty & NOT1 q1 is not empty by A29,A33,GATE_1:20; hence ns12 is not empty iff s14 is not empty by A15,GATE_1:20; ns8 is not empty iff q4 is not empty & q3 is not empty & NOT1 q2 is not empty & NOT1 q1 is not empty by A25,A33,GATE_1:20; hence ns8 is not empty iff s12 is not empty by A13,GATE_1:20; ns0 is not empty iff q4 is not empty & NOT1 q3 is not empty & NOT1 q2 is not empty & NOT1 q1 is not empty by A17,A33,GATE_1:20; hence ns0 is not empty iff s8 is not empty by A9,GATE_1:20; thus ns5 is not empty iff s2 is not empty by A3,A22,A33,GATE_1:20; thus ns11 is not empty iff s5 is not empty by A6,A28,A33,GATE_1:20; ns6 is not empty iff q4 is not empty & NOT1 q3 is not empty & q2 is not empty & q1 is not empty by A23,A33,GATE_1:20; hence ns6 is not empty iff s11 is not empty by A12,GATE_1:20; thus ns13 is not empty iff s6 is not empty by A7,A30,A33,GATE_1:20; ns10 is not empty iff q4 is not empty & q3 is not empty & NOT1 q2 is not empty & q1 is not empty by A27,A33,GATE_1:20; hence ns10 is not empty iff s13 is not empty by A14,GATE_1:20; ns4 is not empty iff q4 is not empty & NOT1 q3 is not empty & q2 is not empty & NOT1 q1 is not empty by A21,A33,GATE_1:20; hence ns4 is not empty iff s10 is not empty by A11,GATE_1:20; thus ns9 is not empty iff s4 is not empty by A5,A26,A33,GATE_1:20; ns2 is not empty iff q4 is not empty & NOT1 q3 is not empty & NOT1 q2 is not empty & q1 is not empty by A19,A33,GATE_1:20; hence thesis by A10,GATE_1:20; end; theorem for s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15, ns0,ns1,ns2 ,ns3,ns4,ns5,ns6,ns7,ns8,ns9,ns10,ns11,ns12,ns13,ns14,ns15, q1,q2,q3,q4,nq1,nq2 ,nq3,nq4,R being set holds (s0 is not empty iff AND4(NOT1 q4, NOT1 q3, NOT1 q2, NOT1 q1) is not empty)& (s1 is not empty iff AND4(NOT1 q4, NOT1 q3, NOT1 q2, q1 ) is not empty)& (s2 is not empty iff AND4(NOT1 q4, NOT1 q3, q2, NOT1 q1) is not empty)& (s3 is not empty iff AND4(NOT1 q4, NOT1 q3, q2, q1) is not empty)& (s4 is not empty iff AND4(NOT1 q4, q3, NOT1 q2, NOT1 q1) is not empty)& (s5 is not empty iff AND4(NOT1 q4, q3, NOT1 q2, q1) is not empty)& (s6 is not empty iff AND4(NOT1 q4, q3, q2, NOT1 q1) is not empty)& (s7 is not empty iff AND4( NOT1 q4, q3, q2, q1) is not empty)& (s8 is not empty iff AND4( q4, NOT1 q3, NOT1 q2, NOT1 q1) is not empty)& (s9 is not empty iff AND4( q4, NOT1 q3, NOT1 q2, q1) is not empty)& (s10 is not empty iff AND4( q4, NOT1 q3, q2, NOT1 q1) is not empty)& (s11 is not empty iff AND4( q4, NOT1 q3, q2, q1) is not empty)& ( s12 is not empty iff AND4( q4, q3, NOT1 q2, NOT1 q1) is not empty)& (s13 is not empty iff AND4( q4, q3, NOT1 q2, q1) is not empty)& (s14 is not empty iff AND4( q4, q3, q2, NOT1 q1) is not empty)& (s15 is not empty iff AND4( q4, q3, q2, q1) is not empty) & (ns0 is not empty iff AND4(NOT1 nq4, NOT1 nq3, NOT1 nq2, NOT1 nq1) is not empty)& (ns1 is not empty iff AND4(NOT1 nq4, NOT1 nq3, NOT1 nq2, nq1) is not empty)& (ns2 is not empty iff AND4(NOT1 nq4, NOT1 nq3, nq2, NOT1 nq1) is not empty)& (ns3 is not empty iff AND4(NOT1 nq4, NOT1 nq3, nq2, nq1) is not empty)& (ns4 is not empty iff AND4(NOT1 nq4, nq3, NOT1 nq2, NOT1 nq1) is not empty)& (ns5 is not empty iff AND4(NOT1 nq4, nq3, NOT1 nq2, nq1) is not empty)& (ns6 is not empty iff AND4(NOT1 nq4, nq3, nq2, NOT1 nq1) is not empty)& (ns7 is not empty iff AND4(NOT1 nq4, nq3, nq2, nq1) is not empty)& (ns8 is not empty iff AND4( nq4, NOT1 nq3, NOT1 nq2, NOT1 nq1) is not empty)& (ns9 is not empty iff AND4( nq4, NOT1 nq3, NOT1 nq2, nq1) is not empty)& (ns10 is not empty iff AND4( nq4, NOT1 nq3, nq2, NOT1 nq1) is not empty)& (ns11 is not empty iff AND4( nq4, NOT1 nq3, nq2, nq1) is not empty)& (ns12 is not empty iff AND4( nq4, nq3, NOT1 nq2, NOT1 nq1) is not empty)& (ns13 is not empty iff AND4( nq4, nq3, NOT1 nq2, nq1) is not empty)& (ns14 is not empty iff AND4( nq4, nq3, nq2, NOT1 nq1) is not empty)& (ns15 is not empty iff AND4( nq4, nq3, nq2, nq1) is not empty) & (nq1 is not empty iff AND2(NOT1 q4,R) is not empty)& (nq2 is not empty iff AND2( q1,R) is not empty)& (nq3 is not empty iff AND2( q2,R) is not empty)& (nq4 is not empty iff AND2( q3,R) is not empty) implies (ns1 is not empty iff AND2(s0,R) is not empty)& (ns3 is not empty iff AND2(s1,R) is not empty)& (ns7 is not empty iff AND2(s3,R) is not empty)& (ns15 is not empty iff AND2(s7,R) is not empty)& (ns14 is not empty iff AND2(s15,R) is not empty)& (ns12 is not empty iff AND2(s14,R) is not empty)& (ns8 is not empty iff AND2(s12,R) is not empty)& (ns0 is not empty iff OR2(AND2(s8,R),NOT1 R) is not empty) & (ns5 is not empty iff AND2(s2,R) is not empty)& (ns11 is not empty iff AND2(s5,R) is not empty)& (ns6 is not empty iff AND2(s11,R) is not empty)& (ns13 is not empty iff AND2(s6,R) is not empty)& (ns10 is not empty iff AND2(s13,R) is not empty)& (ns4 is not empty iff AND2(s10,R) is not empty)& (ns9 is not empty iff AND2(s4, R) is not empty)& (ns2 is not empty iff AND2(s9,R) is not empty) proof let s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15, ns0,ns1,ns2,ns3, ns4,ns5,ns6,ns7,ns8,ns9,ns10,ns11,ns12,ns13,ns14,ns15, q1,q2,q3,q4,nq1,nq2,nq3, nq4,R be set; assume that A1: s0 is not empty iff AND4(NOT1 q4, NOT1 q3, NOT1 q2, NOT1 q1) is not empty and A2: s1 is not empty iff AND4(NOT1 q4, NOT1 q3, NOT1 q2, q1) is not empty and A3: s2 is not empty iff AND4(NOT1 q4, NOT1 q3, q2, NOT1 q1) is not empty and A4: s3 is not empty iff AND4(NOT1 q4, NOT1 q3, q2, q1) is not empty and A5: s4 is not empty iff AND4(NOT1 q4, q3, NOT1 q2, NOT1 q1) is not empty and A6: s5 is not empty iff AND4(NOT1 q4, q3, NOT1 q2, q1) is not empty and A7: s6 is not empty iff AND4(NOT1 q4, q3, q2, NOT1 q1) is not empty and A8: s7 is not empty iff AND4(NOT1 q4, q3, q2, q1) is not empty and A9: s8 is not empty iff AND4( q4, NOT1 q3, NOT1 q2, NOT1 q1) is not empty and A10: s9 is not empty iff AND4( q4, NOT1 q3, NOT1 q2, q1) is not empty and A11: s10 is not empty iff AND4( q4, NOT1 q3, q2, NOT1 q1) is not empty and A12: s11 is not empty iff AND4( q4, NOT1 q3, q2, q1) is not empty and A13: s12 is not empty iff AND4( q4, q3, NOT1 q2, NOT1 q1) is not empty and A14: s13 is not empty iff AND4( q4, q3, NOT1 q2, q1) is not empty and A15: s14 is not empty iff AND4( q4, q3, q2, NOT1 q1) is not empty and A16: s15 is not empty iff AND4( q4, q3, q2, q1) is not empty and A17: ns0 is not empty iff AND4(NOT1 nq4, NOT1 nq3, NOT1 nq2, NOT1 nq1) is not empty and A18: ns1 is not empty iff AND4(NOT1 nq4, NOT1 nq3, NOT1 nq2, nq1) is not empty and A19: ns2 is not empty iff AND4(NOT1 nq4, NOT1 nq3, nq2, NOT1 nq1) is not empty and A20: ns3 is not empty iff AND4(NOT1 nq4, NOT1 nq3, nq2, nq1) is not empty and A21: ns4 is not empty iff AND4(NOT1 nq4, nq3, NOT1 nq2, NOT1 nq1) is not empty and A22: ns5 is not empty iff AND4(NOT1 nq4, nq3, NOT1 nq2, nq1) is not empty and A23: ns6 is not empty iff AND4(NOT1 nq4, nq3, nq2, NOT1 nq1) is not empty and A24: ns7 is not empty iff AND4(NOT1 nq4, nq3, nq2, nq1) is not empty and A25: ns8 is not empty iff AND4( nq4, NOT1 nq3, NOT1 nq2, NOT1 nq1) is not empty and A26: ns9 is not empty iff AND4( nq4, NOT1 nq3, NOT1 nq2, nq1) is not empty and A27: ns10 is not empty iff AND4( nq4, NOT1 nq3, nq2, NOT1 nq1) is not empty and A28: ns11 is not empty iff AND4( nq4, NOT1 nq3, nq2, nq1) is not empty and A29: ns12 is not empty iff AND4( nq4, nq3, NOT1 nq2, NOT1 nq1) is not empty and A30: ns13 is not empty iff AND4( nq4, nq3, NOT1 nq2, nq1) is not empty and A31: ns14 is not empty iff AND4( nq4, nq3, nq2, NOT1 nq1) is not empty and A32: ns15 is not empty iff AND4( nq4, nq3, nq2, nq1) is not empty and A33: ( nq1 is not empty iff AND2(NOT1 q4,R) is not empty)&( nq2 is not empty iff AND2( q1,R) is not empty) & ( nq3 is not empty iff AND2( q2,R) is not empty)&( nq4 is not empty iff AND2( q3,R) is not empty); ns1 is not empty iff NOT1 q4 is not empty & R is not empty & not(q3 is not empty & R is not empty) & not(q2 is not empty & R is not empty) & not(q1 is not empty & R is not empty) by A18,A33,GATE_1:20; hence ns1 is not empty iff AND2(s0,R) is not empty by A1,GATE_1:20; ns3 is not empty iff NOT1 q4 is not empty & R is not empty & not(q3 is not empty & R is not empty) & not(q2 is not empty & R is not empty) & q1 is not empty & R is not empty by A20,A33,GATE_1:20; hence ns3 is not empty iff AND2(s1,R) is not empty by A2,GATE_1:20; ns7 is not empty iff NOT1 q4 is not empty & R is not empty & not(q3 is not empty & R is not empty) & q2 is not empty & R is not empty & q1 is not empty & R is not empty by A24,A33,GATE_1:20; hence ns7 is not empty iff AND2(s3,R) is not empty by A4,GATE_1:20; ns15 is not empty iff NOT1 q4 is not empty & R is not empty & q3 is not empty & R is not empty & q2 is not empty & R is not empty & q1 is not empty & R is not empty by A32,A33,GATE_1:20; hence ns15 is not empty iff AND2(s7,R) is not empty by A8,GATE_1:20; ns14 is not empty iff not(NOT1 q4 is not empty & R is not empty) & q3 is not empty & R is not empty & q2 is not empty & R is not empty & q1 is not empty & R is not empty by A31,A33,GATE_1:20; then ns14 is not empty iff q4 is not empty & q3 is not empty & q2 is not empty & q1 is not empty & R is not empty; hence ns14 is not empty iff AND2(s15,R) is not empty by A16,GATE_1:20; ns12 is not empty iff not(NOT1 q4 is not empty & R is not empty) & q3 is not empty & R is not empty & q2 is not empty & R is not empty & not(q1 is not empty & R is not empty) by A29,A33,GATE_1:20; then ns12 is not empty iff q4 is not empty & q3 is not empty & q2 is not empty & NOT1 q1 is not empty & R is not empty; hence ns12 is not empty iff AND2(s14,R) is not empty by A15,GATE_1:20; ns8 is not empty iff not(NOT1 q4 is not empty & R is not empty) & q3 is not empty & R is not empty & not(q2 is not empty & R is not empty) & not(q1 is not empty & R is not empty) by A25,A33,GATE_1:20; then ns8 is not empty iff q4 is not empty & q3 is not empty & NOT1 q2 is not empty & NOT1 q1 is not empty & R is not empty; hence ns8 is not empty iff AND2(s12,R) is not empty by A13,GATE_1:20; ns0 is not empty iff not(NOT1 q4 is not empty & R is not empty) & not( q3 is not empty & R is not empty) & not(q2 is not empty & R is not empty) & not (q1 is not empty & R is not empty) by A17,A33,GATE_1:20; then ns0 is not empty iff q4 is not empty & NOT1 q3 is not empty & NOT1 q2 is not empty & NOT1 q1 is not empty & R is not empty or not(R) is not empty; hence ns0 is not empty iff OR2(AND2(s8, R),NOT1 R) is not empty by A9, GATE_1:20; ns5 is not empty iff NOT1 q4 is not empty & R is not empty & not(q3 is not empty & R is not empty) & q2 is not empty & R is not empty & not(q1 is not empty & R is not empty) by A22,A33,GATE_1:20; hence ns5 is not empty iff AND2(s2,R) is not empty by A3,GATE_1:20; ns11 is not empty iff NOT1 q4 is not empty & R is not empty & q3 is not empty & R is not empty & not(q2 is not empty & R is not empty) & q1 is not empty & R is not empty by A28,A33,GATE_1:20; hence ns11 is not empty iff AND2(s5,R) is not empty by A6,GATE_1:20; ns6 is not empty iff not(NOT1 q4 is not empty & R is not empty) & not( q3 is not empty & R is not empty) & q2 is not empty & R is not empty & q1 is not empty & R is not empty by A23,A33,GATE_1:20; then ns6 is not empty iff q4 is not empty & NOT1 q3 is not empty & q2 is not empty & q1 is not empty & R is not empty; hence ns6 is not empty iff AND2(s11,R) is not empty by A12,GATE_1:20; ns13 is not empty iff NOT1 q4 is not empty & R is not empty & q3 is not empty & R is not empty & q2 is not empty & R is not empty & not(q1 is not empty & R is not empty) by A30,A33,GATE_1:20; hence ns13 is not empty iff AND2(s6,R) is not empty by A7,GATE_1:20; ns10 is not empty iff not(NOT1 q4 is not empty & R is not empty) & q3 is not empty & R is not empty & not(q2 is not empty & R is not empty) & q1 is not empty & R is not empty by A27,A33,GATE_1:20; then ns10 is not empty iff q4 is not empty & q3 is not empty & NOT1 q2 is not empty & q1 is not empty & R is not empty; hence ns10 is not empty iff AND2(s13,R) is not empty by A14,GATE_1:20; ns4 is not empty iff not(NOT1 q4 is not empty & R is not empty) & not( q3 is not empty & R is not empty) & q2 is not empty & R is not empty & not(q1 is not empty & R is not empty) by A21,A33,GATE_1:20; then ns4 is not empty iff q4 is not empty & NOT1 q3 is not empty & q2 is not empty & NOT1 q1 is not empty & R is not empty; hence ns4 is not empty iff AND2(s10,R) is not empty by A11,GATE_1:20; ns9 is not empty iff NOT1 q4 is not empty & R is not empty & q3 is not empty & R is not empty & not(q2 is not empty & R is not empty) & not(q1 is not empty & R is not empty) by A26,A33,GATE_1:20; hence ns9 is not empty iff AND2(s4,R) is not empty by A5,GATE_1:20; ns2 is not empty iff not(NOT1 q4 is not empty & R is not empty) & not( q3 is not empty & R is not empty) & not(q2 is not empty & R is not empty) & q1 is not empty & R is not empty by A19,A33,GATE_1:20; then ns2 is not empty iff q4 is not empty & NOT1 q3 is not empty & NOT1 q2 is not empty & q1 is not empty & R is not empty; hence thesis by A10,GATE_1:20; end; begin theorem for g0,g1,g2,g3,g4,g5,g6,g7,g8,g9,g10,g11,g12, a0,a1,a2,a3,a4,a5,a6,a7 ,a8,a9,a10,a11, b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11, p being set holds g12 is not empty & (b0 is not empty iff XOR2(p,AND2(g0,a11)) is not empty)& (b1 is not empty iff XOR2(a0,AND2(g1,a11)) is not empty)& (b2 is not empty iff XOR2(a1, AND2(g2,a11)) is not empty)& (b3 is not empty iff XOR2(a2,AND2(g3,a11)) is not empty)& (b4 is not empty iff XOR2(a3,AND2(g4,a11)) is not empty)& (b5 is not empty iff XOR2(a4,AND2(g5,a11)) is not empty)& (b6 is not empty iff XOR2(a5, AND2(g6,a11)) is not empty)& (b7 is not empty iff XOR2(a6,AND2(g7,a11)) is not empty)& (b8 is not empty iff XOR2(a7,AND2(g8,a11)) is not empty)& (b9 is not empty iff XOR2(a8,AND2(g9,a11)) is not empty)& (b10 is not empty iff XOR2(a9, AND2(g10,a11)) is not empty)& (b11 is not empty iff XOR2(a10,AND2(g11,a11)) is not empty) implies (a11 is not empty iff AND2(g12,a11) is not empty) & (a10 is not empty iff XOR2(b11,AND2(g11,a11)) is not empty)& (a9 is not empty iff XOR2( b10,AND2(g10,a11)) is not empty)& (a8 is not empty iff XOR2(b9,AND2(g9,a11)) is not empty)& (a7 is not empty iff XOR2(b8,AND2(g8,a11)) is not empty)& (a6 is not empty iff XOR2(b7,AND2(g7,a11)) is not empty)& (a5 is not empty iff XOR2(b6 ,AND2(g6,a11)) is not empty)& (a4 is not empty iff XOR2(b5,AND2(g5,a11)) is not empty)& (a3 is not empty iff XOR2(b4,AND2(g4,a11)) is not empty)& (a2 is not empty iff XOR2(b3,AND2(g3,a11)) is not empty)& (a1 is not empty iff XOR2(b2, AND2(g2,a11)) is not empty)& (a0 is not empty iff XOR2(b1,AND2(g1,a11)) is not empty)& (p is not empty iff XOR2(b0,AND2(g0,a11)) is not empty) proof let g0,g1,g2,g3,g4,g5,g6,g7,g8,g9,g10,g11,g12, a0,a1,a2,a3,a4,a5,a6,a7,a8,a9 ,a10,a11, b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11, p be set; assume that A1: g12 is not empty and A2: b0 is not empty iff XOR2(p,AND2(g0,a11)) is not empty and A3: b1 is not empty iff XOR2(a0,AND2(g1,a11)) is not empty and A4: b2 is not empty iff XOR2(a1,AND2(g2,a11)) is not empty and A5: b3 is not empty iff XOR2(a2,AND2(g3,a11)) is not empty and A6: b4 is not empty iff XOR2(a3,AND2(g4,a11)) is not empty and A7: b5 is not empty iff XOR2(a4,AND2(g5,a11)) is not empty and A8: b6 is not empty iff XOR2(a5,AND2(g6,a11)) is not empty and A9: b7 is not empty iff XOR2(a6,AND2(g7,a11)) is not empty and A10: b8 is not empty iff XOR2(a7,AND2(g8,a11)) is not empty and A11: b9 is not empty iff XOR2(a8,AND2(g9,a11)) is not empty and A12: b10 is not empty iff XOR2(a9,AND2(g10,a11)) is not empty and A13: b11 is not empty iff XOR2(a10,AND2(g11,a11)) is not empty; thus a11 is not empty iff AND2(g12,a11) is not empty by A1; XOR2(b11,AND2(g11,a11)) is not empty iff b11 is not empty & not AND2( g11,a11) is not empty or not b11 is not empty & AND2(g11,a11) is not empty; hence a10 is not empty iff XOR2(b11,AND2(g11,a11)) is not empty by A13; XOR2(b10,AND2(g10,a11)) is not empty iff b10 is not empty & not AND2( g10,a11) is not empty or not b10 is not empty & AND2(g10,a11) is not empty; hence a9 is not empty iff XOR2(b10,AND2(g10,a11)) is not empty by A12; XOR2(b9,AND2(g9,a11)) is not empty iff b9 is not empty & not AND2(g9, a11) is not empty or not b9 is not empty & AND2(g9,a11) is not empty; hence a8 is not empty iff XOR2(b9,AND2(g9,a11)) is not empty by A11; XOR2(b8,AND2(g8,a11)) is not empty iff b8 is not empty & not AND2(g8, a11) is not empty or not b8 is not empty & AND2(g8,a11) is not empty; hence a7 is not empty iff XOR2(b8,AND2(g8,a11)) is not empty by A10; XOR2(b7,AND2(g7,a11)) is not empty iff b7 is not empty & not AND2(g7, a11) is not empty or not b7 is not empty & AND2(g7,a11) is not empty; hence a6 is not empty iff XOR2(b7,AND2(g7,a11)) is not empty by A9; XOR2(b6,AND2(g6,a11)) is not empty iff b6 is not empty & not AND2(g6, a11) is not empty or not b6 is not empty & AND2(g6,a11) is not empty; hence a5 is not empty iff XOR2(b6,AND2(g6,a11)) is not empty by A8; XOR2(b5,AND2(g5,a11)) is not empty iff b5 is not empty & not AND2(g5, a11) is not empty or not b5 is not empty & AND2(g5,a11) is not empty; hence a4 is not empty iff XOR2(b5,AND2(g5,a11)) is not empty by A7; XOR2(b4,AND2(g4,a11)) is not empty iff b4 is not empty & not AND2(g4, a11) is not empty or not b4 is not empty & AND2(g4,a11) is not empty; hence a3 is not empty iff XOR2(b4,AND2(g4,a11)) is not empty by A6; XOR2(b3,AND2(g3,a11)) is not empty iff b3 is not empty & not AND2(g3, a11) is not empty or not b3 is not empty & AND2(g3,a11) is not empty; hence a2 is not empty iff XOR2(b3,AND2(g3,a11)) is not empty by A5; XOR2(b2,AND2(g2,a11)) is not empty iff b2 is not empty & not AND2(g2, a11) is not empty or not b2 is not empty & AND2(g2,a11) is not empty; hence a1 is not empty iff XOR2(b2,AND2(g2,a11)) is not empty by A4; XOR2(b1,AND2(g1,a11)) is not empty iff b1 is not empty & not AND2(g1, a11) is not empty or not b1 is not empty & AND2(g1,a11) is not empty; hence a0 is not empty iff XOR2(b1,AND2(g1,a11)) is not empty by A3; XOR2(b0,AND2(g0,a11)) is not empty iff b0 is not empty & not AND2(g0, a11) is not empty or not b0 is not empty & AND2(g0,a11) is not empty; hence thesis by A2; end; theorem for g0,g1,g2,g3,g4,g5,g6,g7,g8,g9,g10,g11,g12,g13,g14,g15,g16, a0,a1, a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15, b0,b1,b2,b3,b4,b5,b6,b7,b8,b9, b10,b11,b12,b13,b14,b15, p being set holds g16 is not empty & (b0 is not empty iff XOR2(p,AND2(g0,a15)) is not empty)& (b1 is not empty iff XOR2(a0,AND2(g1, a15)) is not empty)& (b2 is not empty iff XOR2(a1,AND2(g2,a15)) is not empty)& (b3 is not empty iff XOR2(a2,AND2(g3,a15)) is not empty)& (b4 is not empty iff XOR2(a3,AND2(g4,a15)) is not empty)& (b5 is not empty iff XOR2(a4,AND2(g5,a15)) is not empty)& (b6 is not empty iff XOR2(a5,AND2(g6,a15)) is not empty)& (b7 is not empty iff XOR2(a6,AND2(g7,a15)) is not empty)& (b8 is not empty iff XOR2(a7 ,AND2(g8,a15)) is not empty)& (b9 is not empty iff XOR2(a8,AND2(g9,a15)) is not empty)& (b10 is not empty iff XOR2(a9,AND2(g10,a15)) is not empty)& (b11 is not empty iff XOR2(a10,AND2(g11,a15)) is not empty)& (b12 is not empty iff XOR2(a11 ,AND2(g12,a15)) is not empty)& (b13 is not empty iff XOR2(a12,AND2(g13,a15)) is not empty)& (b14 is not empty iff XOR2(a13,AND2(g14,a15)) is not empty)& (b15 is not empty iff XOR2(a14,AND2(g15,a15)) is not empty) implies (a15 is not empty iff AND2(g16,a15) is not empty) & (a14 is not empty iff XOR2(b15,AND2(g15 ,a15)) is not empty)& (a13 is not empty iff XOR2(b14,AND2(g14,a15)) is not empty)& (a12 is not empty iff XOR2(b13,AND2(g13,a15)) is not empty)& (a11 is not empty iff XOR2(b12,AND2(g12,a15)) is not empty)& (a10 is not empty iff XOR2 (b11,AND2(g11,a15)) is not empty)& (a9 is not empty iff XOR2(b10,AND2(g10,a15)) is not empty)& (a8 is not empty iff XOR2(b9,AND2(g9,a15)) is not empty)& (a7 is not empty iff XOR2(b8,AND2(g8,a15)) is not empty)& (a6 is not empty iff XOR2(b7 ,AND2(g7,a15)) is not empty)& (a5 is not empty iff XOR2(b6,AND2(g6,a15)) is not empty)& (a4 is not empty iff XOR2(b5,AND2(g5,a15)) is not empty)& (a3 is not empty iff XOR2(b4,AND2(g4,a15)) is not empty)& (a2 is not empty iff XOR2(b3, AND2(g3,a15)) is not empty)& (a1 is not empty iff XOR2(b2,AND2(g2,a15)) is not empty)& (a0 is not empty iff XOR2(b1,AND2(g1,a15)) is not empty)& (p is not empty iff XOR2(b0,AND2(g0,a15)) is not empty) proof let g0,g1,g2,g3,g4,g5,g6,g7,g8,g9,g10,g11,g12,g13,g14,g15,g16, a0,a1,a2,a3, a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15, b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10, b11,b12,b13,b14,b15, p be set; assume that A1: g16 is not empty and A2: b0 is not empty iff XOR2(p,AND2(g0,a15)) is not empty and A3: b1 is not empty iff XOR2(a0,AND2(g1,a15)) is not empty and A4: b2 is not empty iff XOR2(a1,AND2(g2,a15)) is not empty and A5: b3 is not empty iff XOR2(a2,AND2(g3,a15)) is not empty and A6: b4 is not empty iff XOR2(a3,AND2(g4,a15)) is not empty and A7: b5 is not empty iff XOR2(a4,AND2(g5,a15)) is not empty and A8: b6 is not empty iff XOR2(a5,AND2(g6,a15)) is not empty and A9: b7 is not empty iff XOR2(a6,AND2(g7,a15)) is not empty and A10: b8 is not empty iff XOR2(a7,AND2(g8,a15)) is not empty and A11: b9 is not empty iff XOR2(a8,AND2(g9,a15)) is not empty and A12: b10 is not empty iff XOR2(a9,AND2(g10,a15)) is not empty and A13: b11 is not empty iff XOR2(a10,AND2(g11,a15)) is not empty and A14: b12 is not empty iff XOR2(a11,AND2(g12,a15)) is not empty and A15: b13 is not empty iff XOR2(a12,AND2(g13,a15)) is not empty and A16: b14 is not empty iff XOR2(a13,AND2(g14,a15)) is not empty and A17: b15 is not empty iff XOR2(a14,AND2(g15,a15)) is not empty; thus a15 is not empty iff AND2(g16,a15) is not empty by A1; XOR2(b15,AND2(g15,a15)) is not empty iff b15 is not empty & not AND2( g15,a15) is not empty or not b15 is not empty & AND2(g15,a15) is not empty; hence a14 is not empty iff XOR2(b15,AND2(g15,a15)) is not empty by A17; XOR2(b14,AND2(g14,a15)) is not empty iff b14 is not empty & not AND2( g14,a15) is not empty or not b14 is not empty & AND2(g14,a15) is not empty; hence a13 is not empty iff XOR2(b14,AND2(g14,a15)) is not empty by A16; XOR2(b13,AND2(g13,a15)) is not empty iff b13 is not empty & not AND2( g13,a15) is not empty or not b13 is not empty & AND2(g13,a15) is not empty; hence a12 is not empty iff XOR2(b13,AND2(g13,a15)) is not empty by A15; XOR2(b12,AND2(g12,a15)) is not empty iff b12 is not empty & not AND2( g12,a15) is not empty or not b12 is not empty & AND2(g12,a15) is not empty; hence a11 is not empty iff XOR2(b12,AND2(g12,a15)) is not empty by A14; XOR2(b11,AND2(g11,a15)) is not empty iff b11 is not empty & not AND2( g11,a15) is not empty or not b11 is not empty & AND2(g11,a15) is not empty; hence a10 is not empty iff XOR2(b11,AND2(g11,a15)) is not empty by A13; XOR2(b10,AND2(g10,a15)) is not empty iff b10 is not empty & not AND2( g10,a15) is not empty or not b10 is not empty & AND2(g10,a15) is not empty; hence a9 is not empty iff XOR2(b10,AND2(g10,a15)) is not empty by A12; XOR2(b9,AND2(g9,a15)) is not empty iff b9 is not empty & not AND2(g9, a15) is not empty or not b9 is not empty & AND2(g9,a15) is not empty; hence a8 is not empty iff XOR2(b9,AND2(g9,a15)) is not empty by A11; XOR2(b8,AND2(g8,a15)) is not empty iff b8 is not empty & not AND2(g8, a15) is not empty or not b8 is not empty & AND2(g8,a15) is not empty; hence a7 is not empty iff XOR2(b8,AND2(g8,a15)) is not empty by A10; XOR2(b7,AND2(g7,a15)) is not empty iff b7 is not empty & not AND2(g7, a15) is not empty or not b7 is not empty & AND2(g7,a15) is not empty; hence a6 is not empty iff XOR2(b7,AND2(g7,a15)) is not empty by A9; XOR2(b6,AND2(g6,a15)) is not empty iff b6 is not empty & not AND2(g6, a15) is not empty or not b6 is not empty & AND2(g6,a15) is not empty; hence a5 is not empty iff XOR2(b6,AND2(g6,a15)) is not empty by A8; XOR2(b5,AND2(g5,a15)) is not empty iff b5 is not empty & not AND2(g5, a15) is not empty or not b5 is not empty & AND2(g5,a15) is not empty; hence a4 is not empty iff XOR2(b5,AND2(g5,a15)) is not empty by A7; XOR2(b4,AND2(g4,a15)) is not empty iff b4 is not empty & not AND2(g4, a15) is not empty or not b4 is not empty & AND2(g4,a15) is not empty; hence a3 is not empty iff XOR2(b4,AND2(g4,a15)) is not empty by A6; XOR2(b3,AND2(g3,a15)) is not empty iff b3 is not empty & not AND2(g3, a15) is not empty or not b3 is not empty & AND2(g3,a15) is not empty; hence a2 is not empty iff XOR2(b3,AND2(g3,a15)) is not empty by A5; XOR2(b2,AND2(g2,a15)) is not empty iff b2 is not empty & not AND2(g2, a15) is not empty or not b2 is not empty & AND2(g2,a15) is not empty; hence a1 is not empty iff XOR2(b2,AND2(g2,a15)) is not empty by A4; XOR2(b1,AND2(g1,a15)) is not empty iff b1 is not empty & not AND2(g1, a15) is not empty or not b1 is not empty & AND2(g1,a15) is not empty; hence a0 is not empty iff XOR2(b1,AND2(g1,a15)) is not empty by A3; XOR2(b0,AND2(g0,a15)) is not empty iff b0 is not empty & not AND2(g0, a15) is not empty or not b0 is not empty & AND2(g0,a15) is not empty; hence thesis by A2; end; begin theorem for g0,g1,g2,g3,g4,g5,g6,g7,g8,g9,g10,g11,g12, a0,a1,a2,a3,a4,a5,a6,a7 ,a8,a9,a10,a11, b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11, z,p being set holds g0 is not empty & not z is not empty & (b0 is not empty iff XOR2(p,a11) is not empty)& (b1 is not empty iff XOR2(a0,AND2(g1,b0)) is not empty)& (b2 is not empty iff XOR2(a1,AND2(g2,b0)) is not empty)& (b3 is not empty iff XOR2(a2,AND2 (g3,b0)) is not empty)& (b4 is not empty iff XOR2(a3,AND2(g4,b0)) is not empty) & (b5 is not empty iff XOR2(a4,AND2(g5,b0)) is not empty)& (b6 is not empty iff XOR2(a5,AND2(g6,b0)) is not empty)& (b7 is not empty iff XOR2(a6,AND2(g7,b0)) is not empty)& (b8 is not empty iff XOR2(a7,AND2(g8,b0)) is not empty)& (b9 is not empty iff XOR2(a8,AND2(g9,b0)) is not empty)& (b10 is not empty iff XOR2(a9 ,AND2(g10,b0)) is not empty)& (b11 is not empty iff XOR2(a10,AND2(g11,b0)) is not empty) implies (b11 is not empty iff XOR2(XOR2(a10,AND2(g11,a11)),XOR2(z, AND2(g11,p))) is not empty) & (b10 is not empty iff XOR2(XOR2(a9,AND2(g10,a11)) ,XOR2(z,AND2(g10,p))) is not empty) & (b9 is not empty iff XOR2(XOR2(a8,AND2(g9 ,a11)),XOR2(z,AND2(g9,p))) is not empty) & (b8 is not empty iff XOR2(XOR2(a7, AND2(g8,a11)),XOR2(z,AND2(g8,p))) is not empty) & (b7 is not empty iff XOR2( XOR2(a6,AND2(g7,a11)),XOR2(z,AND2(g7,p))) is not empty) & (b6 is not empty iff XOR2(XOR2(a5,AND2(g6,a11)),XOR2(z,AND2(g6,p))) is not empty) & (b5 is not empty iff XOR2(XOR2(a4,AND2(g5,a11)),XOR2(z,AND2(g5,p))) is not empty) & (b4 is not empty iff XOR2(XOR2(a3,AND2(g4,a11)),XOR2(z,AND2(g4,p))) is not empty) & (b3 is not empty iff XOR2(XOR2(a2,AND2(g3,a11)),XOR2(z,AND2(g3,p))) is not empty) & ( b2 is not empty iff XOR2(XOR2(a1,AND2(g2,a11)),XOR2(z,AND2(g2,p))) is not empty ) & (b1 is not empty iff XOR2(XOR2(a0,AND2(g1,a11)),XOR2(z,AND2(g1,p))) is not empty) & (b0 is not empty iff XOR2(XOR2(z, AND2(g0,a11)),XOR2(z,AND2(g0,p))) is not empty) proof let g0,g1,g2,g3,g4,g5,g6,g7,g8,g9,g10,g11,g12, a0,a1,a2,a3,a4,a5,a6,a7,a8,a9 ,a10,a11, b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11, z,p be set; assume that A1: g0 is not empty and A2: not z is not empty and A3: b0 is not empty iff XOR2(p,a11) is not empty and A4: b1 is not empty iff XOR2(a0,AND2(g1,b0)) is not empty and A5: b2 is not empty iff XOR2(a1,AND2(g2,b0)) is not empty and A6: b3 is not empty iff XOR2(a2,AND2(g3,b0)) is not empty and A7: b4 is not empty iff XOR2(a3,AND2(g4,b0)) is not empty and A8: b5 is not empty iff XOR2(a4,AND2(g5,b0)) is not empty and A9: b6 is not empty iff XOR2(a5,AND2(g6,b0)) is not empty and A10: b7 is not empty iff XOR2(a6,AND2(g7,b0)) is not empty and A11: b8 is not empty iff XOR2(a7,AND2(g8,b0)) is not empty and A12: b9 is not empty iff XOR2(a8,AND2(g9,b0)) is not empty and A13: b10 is not empty iff XOR2(a9,AND2(g10,b0)) is not empty and A14: b11 is not empty iff XOR2(a10,AND2(g11,b0)) is not empty; XOR2(XOR2(a10,AND2(g11,a11)),XOR2(z,AND2(g11,p))) is not empty iff ( a10 is not empty & (not g11 is not empty or not a11 is not empty) & (not g11 is not empty or not p is not empty) or not a10 is not empty & g11 is not empty & a11 is not empty & (not g11 is not empty or not p is not empty) ) or (not a10 is not empty or g11 is not empty & a11 is not empty ) & (a10 is not empty or not (g11 is not empty & a11 is not empty)) & g11 is not empty & p is not empty by A2; hence b11 is not empty iff XOR2(XOR2(a10,AND2(g11,a11)),XOR2(z,AND2(g11,p))) is not empty by A3,A14; XOR2(XOR2(a9,AND2(g10,a11)),XOR2(z,AND2(g10,p))) is not empty iff ( a9 is not empty & (not g10 is not empty or not a11 is not empty) & (not g10 is not empty or not p is not empty) or not a9 is not empty & g10 is not empty & a11 is not empty & (not g10 is not empty or not p is not empty) ) or (not a9 is not empty or g10 is not empty & a11 is not empty ) & (a9 is not empty or not (g10 is not empty & a11 is not empty)) & g10 is not empty & p is not empty by A2; hence b10 is not empty iff XOR2(XOR2(a9,AND2(g10,a11)),XOR2(z,AND2(g10,p))) is not empty by A3,A13; XOR2(XOR2(a8,AND2(g9,a11)),XOR2(z,AND2(g9,p))) is not empty iff ( a8 is not empty & (not g9 is not empty or not a11 is not empty) & (not g9 is not empty or not p is not empty) or not a8 is not empty & g9 is not empty & a11 is not empty & (not g9 is not empty or not p is not empty) ) or (not a8 is not empty or g9 is not empty & a11 is not empty ) & (a8 is not empty or not (g9 is not empty & a11 is not empty)) & g9 is not empty & p is not empty by A2; hence b9 is not empty iff XOR2(XOR2(a8,AND2(g9,a11)),XOR2(z,AND2(g9,p))) is not empty by A3,A12; XOR2(XOR2(a7,AND2(g8,a11)),XOR2(z,AND2(g8,p))) is not empty iff ( a7 is not empty & (not g8 is not empty or not a11 is not empty) & (not g8 is not empty or not p is not empty) or not a7 is not empty & g8 is not empty & a11 is not empty & (not g8 is not empty or not p is not empty) ) or (not a7 is not empty or g8 is not empty & a11 is not empty ) & (a7 is not empty or not (g8 is not empty & a11 is not empty)) & g8 is not empty & p is not empty by A2; hence b8 is not empty iff XOR2(XOR2(a7,AND2(g8,a11)),XOR2(z,AND2(g8,p))) is not empty by A3,A11; XOR2(XOR2(a6,AND2(g7,a11)),XOR2(z,AND2(g7,p))) is not empty iff ( a6 is not empty & (not g7 is not empty or not a11 is not empty) & (not g7 is not empty or not p is not empty) or not a6 is not empty & g7 is not empty & a11 is not empty & (not g7 is not empty or not p is not empty) ) or (not a6 is not empty or g7 is not empty & a11 is not empty ) & (a6 is not empty or not (g7 is not empty & a11 is not empty)) & g7 is not empty & p is not empty by A2; hence b7 is not empty iff XOR2(XOR2(a6,AND2(g7,a11)),XOR2(z,AND2(g7,p))) is not empty by A3,A10; XOR2(XOR2(a5,AND2(g6,a11)),XOR2(z,AND2(g6,p))) is not empty iff ( a5 is not empty & (not g6 is not empty or not a11 is not empty) & (not g6 is not empty or not p is not empty) or not a5 is not empty & g6 is not empty & a11 is not empty & (not g6 is not empty or not p is not empty) ) or (not a5 is not empty or g6 is not empty & a11 is not empty ) & (a5 is not empty or not (g6 is not empty & a11 is not empty)) & g6 is not empty & p is not empty by A2; hence b6 is not empty iff XOR2(XOR2(a5,AND2(g6,a11)),XOR2(z,AND2(g6,p))) is not empty by A3,A9; XOR2(XOR2(a4,AND2(g5,a11)),XOR2(z,AND2(g5,p))) is not empty iff ( a4 is not empty & (not g5 is not empty or not a11 is not empty) & (not g5 is not empty or not p is not empty) or not a4 is not empty & g5 is not empty & a11 is not empty & (not g5 is not empty or not p is not empty) ) or (not a4 is not empty or g5 is not empty & a11 is not empty ) & (a4 is not empty or not (g5 is not empty & a11 is not empty)) & g5 is not empty & p is not empty by A2; hence b5 is not empty iff XOR2(XOR2(a4,AND2(g5,a11)),XOR2(z,AND2(g5,p))) is not empty by A3,A8; XOR2(XOR2(a3,AND2(g4,a11)),XOR2(z,AND2(g4,p))) is not empty iff ( a3 is not empty & (not g4 is not empty or not a11 is not empty) & (not g4 is not empty or not p is not empty) or not a3 is not empty & g4 is not empty & a11 is not empty & (not g4 is not empty or not p is not empty) ) or (not a3 is not empty or g4 is not empty & a11 is not empty ) & (a3 is not empty or not (g4 is not empty & a11 is not empty)) & g4 is not empty & p is not empty by A2; hence b4 is not empty iff XOR2(XOR2(a3,AND2(g4,a11)),XOR2(z,AND2(g4,p))) is not empty by A3,A7; XOR2(XOR2(a2,AND2(g3,a11)),XOR2(z,AND2(g3,p))) is not empty iff ( a2 is not empty & (not g3 is not empty or not a11 is not empty) & (not g3 is not empty or not p is not empty) or not a2 is not empty & g3 is not empty & a11 is not empty & (not g3 is not empty or not p is not empty) ) or (not a2 is not empty or g3 is not empty & a11 is not empty ) & (a2 is not empty or not (g3 is not empty & a11 is not empty)) & g3 is not empty & p is not empty by A2; hence b3 is not empty iff XOR2(XOR2(a2,AND2(g3,a11)),XOR2(z,AND2(g3,p))) is not empty by A3,A6; XOR2(XOR2(a1,AND2(g2,a11)),XOR2(z,AND2(g2,p))) is not empty iff ( a1 is not empty & (not g2 is not empty or not a11 is not empty) & (not g2 is not empty or not p is not empty) or not a1 is not empty & g2 is not empty & a11 is not empty & (not g2 is not empty or not p is not empty) ) or (not a1 is not empty or g2 is not empty & a11 is not empty ) & (a1 is not empty or not (g2 is not empty & a11 is not empty)) & g2 is not empty & p is not empty by A2; hence b2 is not empty iff XOR2(XOR2(a1,AND2(g2,a11)),XOR2(z,AND2(g2,p))) is not empty by A3,A5; XOR2(XOR2(a0,AND2(g1,a11)),XOR2(z,AND2(g1,p))) is not empty iff ( a0 is not empty & (not g1 is not empty or not a11 is not empty) & (not g1 is not empty or not p is not empty) or not a0 is not empty & g1 is not empty & a11 is not empty & (not g1 is not empty or not p is not empty) ) or (not a0 is not empty or g1 is not empty & a11 is not empty ) & (a0 is not empty or not (g1 is not empty & a11 is not empty)) & g1 is not empty & p is not empty by A2; hence b1 is not empty iff XOR2(XOR2(a0,AND2(g1,a11)),XOR2(z,AND2(g1,p))) is not empty by A3,A4; XOR2(XOR2(z,AND2(g0,a11)),XOR2(z,AND2(g0,p))) is not empty iff ( z is not empty & (not g0 is not empty or not a11 is not empty) & (not g0 is not empty or not p is not empty) or not z is not empty & g0 is not empty & a11 is not empty & (not g0 is not empty or not p is not empty) ) or (not z is not empty or g0 is not empty & a11 is not empty ) & (z is not empty or not (g0 is not empty & a11 is not empty)) & g0 is not empty & p is not empty by A2; hence thesis by A1,A3; end; theorem for g0,g1,g2,g3,g4,g5,g6,g7,g8,g9,g10,g11,g12,g13,g14,g15,g16, a0,a1, a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15, b0,b1,b2,b3,b4,b5,b6,b7,b8,b9, b10,b11,b12,b13,b14,b15, z,p being set holds g0 is not empty & not z is not empty & (b0 is not empty iff XOR2(p,a15) is not empty)& (b1 is not empty iff XOR2(a0,AND2(g1,b0)) is not empty)& (b2 is not empty iff XOR2(a1,AND2(g2,b0)) is not empty)& (b3 is not empty iff XOR2(a2,AND2(g3,b0)) is not empty)& (b4 is not empty iff XOR2(a3,AND2(g4,b0)) is not empty)& (b5 is not empty iff XOR2(a4, AND2(g5,b0)) is not empty)& (b6 is not empty iff XOR2(a5,AND2(g6,b0)) is not empty)& (b7 is not empty iff XOR2(a6,AND2(g7,b0)) is not empty)& (b8 is not empty iff XOR2(a7,AND2(g8,b0)) is not empty)& (b9 is not empty iff XOR2(a8,AND2 (g9,b0)) is not empty)& (b10 is not empty iff XOR2(a9,AND2(g10,b0)) is not empty)& (b11 is not empty iff XOR2(a10,AND2(g11,b0)) is not empty)& (b12 is not empty iff XOR2(a11,AND2(g12,b0)) is not empty)& (b13 is not empty iff XOR2(a12, AND2(g13,b0)) is not empty)& (b14 is not empty iff XOR2(a13,AND2(g14,b0)) is not empty)& (b15 is not empty iff XOR2(a14,AND2(g15,b0)) is not empty) implies (b15 is not empty iff XOR2(XOR2(a14,AND2(g15,a15)),XOR2(z,AND2(g15,p))) is not empty) & (b14 is not empty iff XOR2(XOR2(a13,AND2(g14,a15)),XOR2(z,AND2(g14,p)) ) is not empty) & (b13 is not empty iff XOR2(XOR2(a12,AND2(g13,a15)),XOR2(z, AND2(g13,p))) is not empty) & (b12 is not empty iff XOR2(XOR2(a11,AND2(g12,a15) ),XOR2(z,AND2(g12,p))) is not empty) & (b11 is not empty iff XOR2(XOR2(a10,AND2 (g11,a15)),XOR2(z,AND2(g11,p))) is not empty) & (b10 is not empty iff XOR2(XOR2 (a9,AND2(g10,a15)),XOR2(z,AND2(g10,p))) is not empty) & (b9 is not empty iff XOR2(XOR2(a8,AND2(g9,a15)),XOR2(z,AND2(g9,p))) is not empty) & (b8 is not empty iff XOR2(XOR2(a7,AND2(g8,a15)),XOR2(z,AND2(g8,p))) is not empty) & (b7 is not empty iff XOR2(XOR2(a6,AND2(g7,a15)),XOR2(z,AND2(g7,p))) is not empty) & (b6 is not empty iff XOR2(XOR2(a5,AND2(g6,a15)),XOR2(z,AND2(g6,p))) is not empty) & ( b5 is not empty iff XOR2(XOR2(a4,AND2(g5,a15)),XOR2(z,AND2(g5,p))) is not empty ) & (b4 is not empty iff XOR2(XOR2(a3,AND2(g4,a15)),XOR2(z,AND2(g4,p))) is not empty) & (b3 is not empty iff XOR2(XOR2(a2,AND2(g3,a15)),XOR2(z,AND2(g3,p))) is not empty) & (b2 is not empty iff XOR2(XOR2(a1,AND2(g2,a15)),XOR2(z,AND2(g2,p)) ) is not empty) & (b1 is not empty iff XOR2(XOR2(a0,AND2(g1,a15)),XOR2(z,AND2( g1,p))) is not empty) & (b0 is not empty iff XOR2(XOR2(z, AND2(g0,a15)),XOR2(z, AND2(g0,p))) is not empty) proof let g0,g1,g2,g3,g4,g5,g6,g7,g8,g9,g10,g11,g12,g13,g14,g15,g16, a0,a1,a2,a3, a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15, b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10, b11,b12,b13,b14,b15, z,p be set; assume that A1: g0 is not empty and A2: not z is not empty and A3: b0 is not empty iff XOR2(p,a15) is not empty and A4: b1 is not empty iff XOR2(a0,AND2(g1,b0)) is not empty and A5: b2 is not empty iff XOR2(a1,AND2(g2,b0)) is not empty and A6: b3 is not empty iff XOR2(a2,AND2(g3,b0)) is not empty and A7: b4 is not empty iff XOR2(a3,AND2(g4,b0)) is not empty and A8: b5 is not empty iff XOR2(a4,AND2(g5,b0)) is not empty and A9: b6 is not empty iff XOR2(a5,AND2(g6,b0)) is not empty and A10: b7 is not empty iff XOR2(a6,AND2(g7,b0)) is not empty and A11: b8 is not empty iff XOR2(a7,AND2(g8,b0)) is not empty and A12: b9 is not empty iff XOR2(a8,AND2(g9,b0)) is not empty and A13: b10 is not empty iff XOR2(a9,AND2(g10,b0)) is not empty and A14: b11 is not empty iff XOR2(a10,AND2(g11,b0)) is not empty and A15: b12 is not empty iff XOR2(a11,AND2(g12,b0)) is not empty and A16: b13 is not empty iff XOR2(a12,AND2(g13,b0)) is not empty and A17: b14 is not empty iff XOR2(a13,AND2(g14,b0)) is not empty and A18: b15 is not empty iff XOR2(a14,AND2(g15,b0)) is not empty; XOR2(XOR2(a14,AND2(g15,a15)),XOR2(z,AND2(g15,p))) is not empty iff ( a14 is not empty & (not g15 is not empty or not a15 is not empty) & (not g15 is not empty or not p is not empty) or not a14 is not empty & g15 is not empty & a15 is not empty & (not g15 is not empty or not p is not empty) ) or (not a14 is not empty or g15 is not empty & a15 is not empty ) & (a14 is not empty or not (g15 is not empty & a15 is not empty)) & g15 is not empty & p is not empty by A2; hence b15 is not empty iff XOR2(XOR2(a14,AND2(g15,a15)),XOR2(z,AND2(g15,p))) is not empty by A3,A18; XOR2(XOR2(a13,AND2(g14,a15)),XOR2(z,AND2(g14,p))) is not empty iff ( a13 is not empty & (not g14 is not empty or not a15 is not empty) & (not g14 is not empty or not p is not empty) or not a13 is not empty & g14 is not empty & a15 is not empty & (not g14 is not empty or not p is not empty) ) or (not a13 is not empty or g14 is not empty & a15 is not empty ) & (a13 is not empty or not (g14 is not empty & a15 is not empty)) & g14 is not empty & p is not empty by A2; hence b14 is not empty iff XOR2(XOR2(a13,AND2(g14,a15)),XOR2(z,AND2(g14,p))) is not empty by A3,A17; XOR2(XOR2(a12,AND2(g13,a15)),XOR2(z,AND2(g13,p))) is not empty iff ( a12 is not empty & (not g13 is not empty or not a15 is not empty) & (not g13 is not empty or not p is not empty) or not a12 is not empty & g13 is not empty & a15 is not empty & (not g13 is not empty or not p is not empty) ) or (not a12 is not empty or g13 is not empty & a15 is not empty ) & (a12 is not empty or not (g13 is not empty & a15 is not empty)) & g13 is not empty & p is not empty by A2; hence b13 is not empty iff XOR2(XOR2(a12,AND2(g13,a15)),XOR2(z,AND2(g13,p))) is not empty by A3,A16; XOR2(XOR2(a11,AND2(g12,a15)),XOR2(z,AND2(g12,p))) is not empty iff ( a11 is not empty & (not g12 is not empty or not a15 is not empty) & (not g12 is not empty or not p is not empty) or not a11 is not empty & g12 is not empty & a15 is not empty & (not g12 is not empty or not p is not empty) ) or (not a11 is not empty or g12 is not empty & a15 is not empty ) & (a11 is not empty or not (g12 is not empty & a15 is not empty)) & g12 is not empty & p is not empty by A2; hence b12 is not empty iff XOR2(XOR2(a11,AND2(g12,a15)),XOR2(z,AND2(g12,p))) is not empty by A3,A15; XOR2(XOR2(a10,AND2(g11,a15)),XOR2(z,AND2(g11,p))) is not empty iff ( a10 is not empty & (not g11 is not empty or not a15 is not empty) & (not g11 is not empty or not p is not empty) or not a10 is not empty & g11 is not empty & a15 is not empty & (not g11 is not empty or not p is not empty) ) or (not a10 is not empty or g11 is not empty & a15 is not empty ) & (a10 is not empty or not (g11 is not empty & a15 is not empty)) & g11 is not empty & p is not empty by A2; hence b11 is not empty iff XOR2(XOR2(a10,AND2(g11,a15)),XOR2(z,AND2(g11,p))) is not empty by A3,A14; XOR2(XOR2(a9,AND2(g10,a15)),XOR2(z,AND2(g10,p))) is not empty iff ( a9 is not empty & (not g10 is not empty or not a15 is not empty) & (not g10 is not empty or not p is not empty) or not a9 is not empty & g10 is not empty & a15 is not empty & (not g10 is not empty or not p is not empty) ) or (not a9 is not empty or g10 is not empty & a15 is not empty ) & (a9 is not empty or not (g10 is not empty & a15 is not empty)) & g10 is not empty & p is not empty by A2; hence b10 is not empty iff XOR2(XOR2(a9,AND2(g10,a15)),XOR2(z,AND2(g10,p))) is not empty by A3,A13; XOR2(XOR2(a8,AND2(g9,a15)),XOR2(z,AND2(g9,p))) is not empty iff ( a8 is not empty & (not g9 is not empty or not a15 is not empty) & (not g9 is not empty or not p is not empty) or not a8 is not empty & g9 is not empty & a15 is not empty & (not g9 is not empty or not p is not empty) ) or (not a8 is not empty or g9 is not empty & a15 is not empty ) & (a8 is not empty or not (g9 is not empty & a15 is not empty)) & g9 is not empty & p is not empty by A2; hence b9 is not empty iff XOR2(XOR2(a8,AND2(g9,a15)),XOR2(z,AND2(g9,p))) is not empty by A3,A12; XOR2(XOR2(a7,AND2(g8,a15)),XOR2(z,AND2(g8,p))) is not empty iff ( a7 is not empty & (not g8 is not empty or not a15 is not empty) & (not g8 is not empty or not p is not empty) or not a7 is not empty & g8 is not empty & a15 is not empty & (not g8 is not empty or not p is not empty) ) or (not a7 is not empty or g8 is not empty & a15 is not empty ) & (a7 is not empty or not (g8 is not empty & a15 is not empty)) & g8 is not empty & p is not empty by A2; hence b8 is not empty iff XOR2(XOR2(a7,AND2(g8,a15)),XOR2(z,AND2(g8,p))) is not empty by A3,A11; XOR2(XOR2(a6,AND2(g7,a15)),XOR2(z,AND2(g7,p))) is not empty iff ( a6 is not empty & (not g7 is not empty or not a15 is not empty) & (not g7 is not empty or not p is not empty) or not a6 is not empty & g7 is not empty & a15 is not empty & (not g7 is not empty or not p is not empty) ) or (not a6 is not empty or g7 is not empty & a15 is not empty ) & (a6 is not empty or not (g7 is not empty & a15 is not empty)) & g7 is not empty & p is not empty by A2; hence b7 is not empty iff XOR2(XOR2(a6,AND2(g7,a15)),XOR2(z,AND2(g7,p))) is not empty by A3,A10; XOR2(XOR2(a5,AND2(g6,a15)),XOR2(z,AND2(g6,p))) is not empty iff ( a5 is not empty & (not g6 is not empty or not a15 is not empty) & (not g6 is not empty or not p is not empty) or not a5 is not empty & g6 is not empty & a15 is not empty & (not g6 is not empty or not p is not empty) ) or (not a5 is not empty or g6 is not empty & a15 is not empty ) & (a5 is not empty or not (g6 is not empty & a15 is not empty)) & g6 is not empty & p is not empty by A2; hence b6 is not empty iff XOR2(XOR2(a5,AND2(g6,a15)),XOR2(z,AND2(g6,p))) is not empty by A3,A9; XOR2(XOR2(a4,AND2(g5,a15)),XOR2(z,AND2(g5,p))) is not empty iff ( a4 is not empty & (not g5 is not empty or not a15 is not empty) & (not g5 is not empty or not p is not empty) or not a4 is not empty & g5 is not empty & a15 is not empty & (not g5 is not empty or not p is not empty) ) or (not a4 is not empty or g5 is not empty & a15 is not empty ) & (a4 is not empty or not (g5 is not empty & a15 is not empty)) & g5 is not empty & p is not empty by A2; hence b5 is not empty iff XOR2(XOR2(a4,AND2(g5,a15)),XOR2(z,AND2(g5,p))) is not empty by A3,A8; XOR2(XOR2(a3,AND2(g4,a15)),XOR2(z,AND2(g4,p))) is not empty iff ( a3 is not empty & (not g4 is not empty or not a15 is not empty) & (not g4 is not empty or not p is not empty) or not a3 is not empty & g4 is not empty & a15 is not empty & (not g4 is not empty or not p is not empty) ) or (not a3 is not empty or g4 is not empty & a15 is not empty ) & (a3 is not empty or not (g4 is not empty & a15 is not empty)) & g4 is not empty & p is not empty by A2; hence b4 is not empty iff XOR2(XOR2(a3,AND2(g4,a15)),XOR2(z,AND2(g4,p))) is not empty by A3,A7; XOR2(XOR2(a2,AND2(g3,a15)),XOR2(z,AND2(g3,p))) is not empty iff ( a2 is not empty & (not g3 is not empty or not a15 is not empty) & (not g3 is not empty or not p is not empty) or not a2 is not empty & g3 is not empty & a15 is not empty & (not g3 is not empty or not p is not empty) ) or (not a2 is not empty or g3 is not empty & a15 is not empty ) & (a2 is not empty or not (g3 is not empty & a15 is not empty)) & g3 is not empty & p is not empty by A2; hence b3 is not empty iff XOR2(XOR2(a2,AND2(g3,a15)),XOR2(z,AND2(g3,p))) is not empty by A3,A6; XOR2(XOR2(a1,AND2(g2,a15)),XOR2(z,AND2(g2,p))) is not empty iff ( a1 is not empty & (not g2 is not empty or not a15 is not empty) & (not g2 is not empty or not p is not empty) or not a1 is not empty & g2 is not empty & a15 is not empty & (not g2 is not empty or not p is not empty) ) or (not a1 is not empty or g2 is not empty & a15 is not empty ) & (a1 is not empty or not (g2 is not empty & a15 is not empty)) & g2 is not empty & p is not empty by A2; hence b2 is not empty iff XOR2(XOR2(a1,AND2(g2,a15)),XOR2(z,AND2(g2,p))) is not empty by A3,A5; XOR2(XOR2(a0,AND2(g1,a15)),XOR2(z,AND2(g1,p))) is not empty iff ( a0 is not empty & (not g1 is not empty or not a15 is not empty) & (not g1 is not empty or not p is not empty) or not a0 is not empty & g1 is not empty & a15 is not empty & (not g1 is not empty or not p is not empty) ) or (not a0 is not empty or g1 is not empty & a15 is not empty ) & (a0 is not empty or not (g1 is not empty & a15 is not empty)) & g1 is not empty & p is not empty by A2; hence b1 is not empty iff XOR2(XOR2(a0,AND2(g1,a15)),XOR2(z,AND2(g1,p))) is not empty by A3,A4; XOR2(XOR2(z,AND2(g0,a15)),XOR2(z,AND2(g0,p))) is not empty iff ( z is not empty & (not g0 is not empty or not a15 is not empty) & (not g0 is not empty or not p is not empty) or not z is not empty & g0 is not empty & a15 is not empty & (not g0 is not empty or not p is not empty) ) or (not z is not empty or g0 is not empty & a15 is not empty ) & (z is not empty or not (g0 is not empty & a15 is not empty)) & g0 is not empty & p is not empty by A2; hence thesis by A1,A3; end; begin definition let x0,x1,y0,y1 be set; func MULT210(x1,y1,x0,y0) -> set equals AND2(x0,y0); correctness; func MULT211(x1,y1,x0,y0) -> set equals ADD1(AND2(x1,y0),AND2(x0,y1),{}); correctness; func MULT212(x1,y1,x0,y0) -> set equals ADD2({},AND2(x1,y1),AND2(x1,y0),AND2 (x0,y1),{}); correctness; func MULT213(x1,y1,x0,y0) -> set equals CARR2({},AND2(x1,y1),AND2(x1,y0), AND2(x0,y1),{}); correctness; end; theorem for x0,x1,y0,y1,z0,z1,z2,z3,q00,q01,c01,q11,c11 being set holds (q00 is not empty iff AND2(x0,y0) is not empty)& (q01 is not empty iff XOR3(AND2(x1, y0),AND2(x0,y1),{} ) is not empty)& (c01 is not empty iff MAJ3(AND2(x1,y0),AND2 (x0,y1),{} ) is not empty)& (q11 is not empty iff XOR3(AND2(x1,y1),{} ,c01) is not empty)& (c11 is not empty iff MAJ3(AND2(x1,y1),{} ,c01) is not empty)& (z0 is not empty iff q00 is not empty)& (z1 is not empty iff q01 is not empty)& (z2 is not empty iff q11 is not empty)& (z3 is not empty iff c11 is not empty) implies (z0 is not empty iff MULT210(x1,y1,x0,y0) is not empty)& (z1 is not empty iff MULT211(x1,y1,x0,y0) is not empty)& (z2 is not empty iff MULT212(x1, y1,x0,y0) is not empty)& (z3 is not empty iff MULT213(x1,y1,x0,y0) is not empty ) proof let x0,x1,y0,y1,z0,z1,z2,z3,q00,q01,c01,q11,c11 be set; assume that A1: q00 is not empty iff AND2(x0,y0) is not empty and A2: q01 is not empty iff XOR3(AND2(x1,y0),AND2(x0,y1),{} ) is not empty and A3: c01 is not empty iff MAJ3(AND2(x1,y0),AND2(x0,y1),{} ) is not empty and A4: q11 is not empty iff XOR3(AND2(x1,y1),{} ,c01) is not empty and A5: c11 is not empty iff MAJ3(AND2(x1,y1),{} ,c01) is not empty and A6: z0 is not empty iff q00 is not empty and A7: z1 is not empty iff q01 is not empty and A8: z2 is not empty iff q11 is not empty and A9: z3 is not empty iff c11 is not empty; thus z0 is not empty iff MULT210(x1,y1,x0,y0) is not empty by A1,A6; thus z1 is not empty iff MULT211(x1,y1,x0,y0) is not empty by A2,A7; set m212 = MULT212(x1,y1,x0,y0); set x1y1 = AND2(x1,y1); set x0y1 = AND2(x0,y1); set x1y0 = AND2(x1,y0); m212 = XOR3({},x1y1,MAJ3(x1y0,x0y1,{})) by GATE_1:def 35; then m212 is not empty iff x1y1 is not empty & not MAJ3(x1y0,x0y1,{}) is not empty or not x1y1 is not empty & MAJ3(x1y0,x0y1,{}) is not empty; hence z2 is not empty iff MULT212(x1,y1,x0,y0) is not empty by A3,A4,A8; set m213 = MULT213(x1,y1,x0,y0); m213 = MAJ3({},x1y1,MAJ3(x1y0,x0y1,{})) by GATE_1:def 36; then m213 is not empty iff x1y1 is not empty & MAJ3(x1y0,x0y1,{}) is not empty; hence thesis by A3,A5,A9; end; definition let x0,x1,x2,y0,y1 be set; func MULT310(x2,x1,y1,x0,y0) -> set equals AND2(x0,y0); correctness; func MULT311(x2,x1,y1,x0,y0) -> set equals ADD1(AND2(x1,y0),AND2(x0,y1),{}); correctness; func MULT312(x2,x1,y1,x0,y0) -> set equals ADD2(AND2(x2,y0),AND2(x1,y1), AND2(x1,y0),AND2(x0,y1),{}); correctness; func MULT313(x2,x1,y1,x0,y0) -> set equals ADD3({} ,AND2(x2,y1), AND2(x2,y0) ,AND2(x1,y1), AND2(x1,y0),AND2(x0,y1),{}); correctness; func MULT314(x2,x1,y1,x0,y0) -> set equals CARR3({} ,AND2(x2,y1), AND2(x2,y0 ),AND2(x1,y1), AND2(x1,y0),AND2(x0,y1),{}); correctness; end; definition let x0,x1,x2,y0,y1,y2 be set; func MULT321(x2,y2,x1,y1,x0,y0) -> set equals ADD1(MULT312(x2,x1,y1,x0,y0), AND2(x0,y2),{}); correctness; func MULT322(x2,y2,x1,y1,x0,y0) -> set equals ADD2(MULT313(x2,x1,y1,x0,y0), AND2(x1,y2), MULT312(x2,x1,y1,x0,y0),AND2(x0,y2),{}); correctness; func MULT323(x2,y2,x1,y1,x0,y0) -> set equals ADD3(MULT314(x2,x1,y1,x0,y0), AND2(x2,y2), MULT313(x2,x1,y1,x0,y0),AND2(x1,y2), MULT312(x2,x1,y1,x0,y0),AND2( x0,y2),{}); correctness; func MULT324(x2,y2,x1,y1,x0,y0) -> set equals CARR3(MULT314(x2,x1,y1,x0,y0), AND2(x2,y2), MULT313(x2,x1,y1,x0,y0),AND2(x1,y2), MULT312(x2,x1,y1,x0,y0),AND2( x0,y2),{}); correctness; end; theorem for x0,x1,x2,y0,y1,y2,z0,z1,z2,z3,z4,z5, q00,q01,q02,c01,c02,q11,q12, c11,c12,q21,q22,c21,c22 being set holds (q00 is not empty iff AND2(x0,y0) is not empty)& (q01 is not empty iff XOR3(AND2(x1,y0),AND2(x0,y1),{} ) is not empty)& (c01 is not empty iff MAJ3(AND2(x1,y0),AND2(x0,y1),{} ) is not empty)& (q02 is not empty iff XOR3(AND2(x2,y0),AND2(x1,y1),{} ) is not empty)& (c02 is not empty iff MAJ3(AND2(x2,y0),AND2(x1,y1),{} ) is not empty)& (q11 is not empty iff XOR3(q02,AND2(x0,y2),c01) is not empty)& (c11 is not empty iff MAJ3( q02,AND2(x0,y2),c01) is not empty)& (q12 is not empty iff XOR3(AND2(x2,y1),AND2 (x1,y2),c02) is not empty)& (c12 is not empty iff MAJ3(AND2(x2,y1),AND2(x1,y2), c02) is not empty)& (q21 is not empty iff XOR3(q12,{} ,c11) is not empty)& (c21 is not empty iff MAJ3(q12,{} ,c11) is not empty)& (q22 is not empty iff XOR3( AND2(x2,y2),c21,c12) is not empty)& (c22 is not empty iff MAJ3(AND2(x2,y2),c21, c12) is not empty)& (z0 is not empty iff q00 is not empty)& (z1 is not empty iff q01 is not empty)& (z2 is not empty iff q11 is not empty)& (z3 is not empty iff q21 is not empty)& (z4 is not empty iff q22 is not empty)& (z5 is not empty iff c22 is not empty) implies (z0 is not empty iff MULT310(x2, x1,y1,x0,y0) is not empty)& (z1 is not empty iff MULT311(x2, x1,y1,x0,y0) is not empty)& (z2 is not empty iff MULT321(x2,y2,x1,y1,x0,y0) is not empty)& (z3 is not empty iff MULT322(x2,y2,x1,y1,x0,y0) is not empty)& (z4 is not empty iff MULT323(x2,y2,x1 ,y1,x0,y0) is not empty)& (z5 is not empty iff MULT324(x2,y2,x1,y1,x0,y0) is not empty) proof let x0,x1,x2,y0,y1,y2,z0,z1,z2,z3,z4,z5, q00,q01,q02,c01,c02,q11,q12,c11,c12 ,q21,q22,c21,c22 be set; assume that A1: q00 is not empty iff AND2(x0,y0) is not empty and A2: q01 is not empty iff XOR3(AND2(x1,y0),AND2(x0,y1),{} ) is not empty and A3: ( c01 is not empty iff MAJ3(AND2(x1,y0),AND2(x0,y1),{} ) is not empty)&( q02 is not empty iff XOR3(AND2(x2,y0),AND2(x1,y1),{} ) is not empty) and A4: c02 is not empty iff MAJ3(AND2(x2,y0),AND2(x1,y1),{} ) is not empty and A5: q11 is not empty iff XOR3(q02,AND2(x0,y2),c01) is not empty and A6: c11 is not empty iff MAJ3(q02,AND2(x0,y2),c01) is not empty and A7: q12 is not empty iff XOR3(AND2(x2,y1),AND2(x1,y2),c02) is not empty and A8: c12 is not empty iff MAJ3(AND2(x2,y1),AND2(x1,y2),c02) is not empty and A9: q21 is not empty iff XOR3(q12,{} ,c11) is not empty and A10: c21 is not empty iff MAJ3(q12,{} ,c11) is not empty and A11: q22 is not empty iff XOR3(AND2(x2,y2),c21,c12) is not empty and A12: c22 is not empty iff MAJ3(AND2(x2,y2),c21,c12) is not empty and A13: z0 is not empty iff q00 is not empty and A14: z1 is not empty iff q01 is not empty and A15: z2 is not empty iff q11 is not empty and A16: z3 is not empty iff q21 is not empty and A17: z4 is not empty iff q22 is not empty and A18: z5 is not empty iff c22 is not empty; set x0y2 = AND2(x0,y2); A19: c11 is not empty iff q02 is not empty & x0y2 is not empty or x0y2 is not empty & c01 is not empty or c01 is not empty & q02 is not empty by A6; thus z0 is not empty iff MULT310(x2,x1,y1,x0,y0) is not empty by A1,A13; thus z1 is not empty iff MULT311(x2,x1,y1,x0,y0) is not empty by A2,A14; set m312 = MULT312(x2,x1,y1,x0,y0); set x1y1 = AND2(x1,y1); set x0y1 = AND2(x0,y1); set x2y0 = AND2(x2,y0); set x1y0 = AND2(x1,y0); A20: m312 = XOR3(x2y0,x1y1,MAJ3(x1y0,x0y1,{})) by GATE_1:def 35; then A21: m312 is not empty iff ( x2y0 is not empty & not x1y1 is not empty or not x2y0 is not empty & x1y1 is not empty ) & not MAJ3(x1y0,x0y1,{}) is not empty or not ( x2y0 is not empty & not x1y1 is not empty or not x2y0 is not empty & x1y1 is not empty ) & MAJ3(x1y0,x0y1,{}) is not empty; A22: m312 is not empty iff ( x2y0 is not empty & not x1y1 is not empty or not x2y0 is not empty & x1y1 is not empty ) & not (x1y0 is not empty & x0y1 is not empty) or not ( x2y0 is not empty & not x1y1 is not empty or not x2y0 is not empty & x1y1 is not empty ) & x1y0 is not empty & x0y1 is not empty by A20; q11 is not empty iff ( q02 is not empty & not x0y2 is not empty or not q02 is not empty & x0y2 is not empty ) & not c01 is not empty or not ( q02 is not empty & not x0y2 is not empty or not q02 is not empty & x0y2 is not empty ) & c01 is not empty by A5; hence z2 is not empty iff MULT321(x2,y2,x1,y1,x0,y0) is not empty by A3,A15 ,A21; set x1y2 = AND2(x1,y2); set x2y1 = AND2(x2,y1); A23: q12 is not empty iff ( x2y1 is not empty & not x1y2 is not empty or not x2y1 is not empty & x1y2 is not empty ) & not c02 is not empty or not ( x2y1 is not empty & not x1y2 is not empty or not x2y1 is not empty & x1y2 is not empty ) & c02 is not empty by A7; set m324 = MULT324(x2,y2,x1,y1,x0,y0); set m323 = MULT323(x2,y2,x1,y1,x0,y0); set m314 = MULT314(x2,x1,y1,x0,y0); set x2y2 = AND2(x2,y2); A24: m314 = MAJ3({},x2y1,CARR2(x2y0,x1y1,x1y0,x0y1,{})) by GATE_1:def 38 .= MAJ3({},x2y1,MAJ3(x2y0,x1y1,MAJ3(x1y0,x0y1,{}))) by GATE_1:def 36; set m322 = MULT322(x2,y2,x1,y1,x0,y0); set m313 = MULT313(x2,x1,y1,x0,y0); A25: m313 = XOR3({},x2y1,CARR2(x2y0,x1y1,x1y0,x0y1,{})) by GATE_1:def 37 .= XOR3({},x2y1,MAJ3(x2y0,x1y1,MAJ3(x1y0,x0y1,{}))) by GATE_1:def 36; m322 = XOR3(m313,x1y2,MAJ3(m312,x0y2,{})) by GATE_1:def 35; hence z3 is not empty iff MULT322(x2,y2,x1,y1,x0,y0) is not empty by A3,A4,A9 ,A16,A19,A23,A22,A25; A26: m323 = XOR3(m314,x2y2,CARR2(m313,x1y2,m312,x0y2,{})) by GATE_1:def 37 .= XOR3(m314,x2y2,MAJ3(m313,x1y2,MAJ3(m312,x0y2,{}))) by GATE_1:def 36; q22 is not empty iff ( x2y2 is not empty & not c21 is not empty or not x2y2 is not empty & c21 is not empty ) & not c12 is not empty or not ( x2y2 is not empty & not c21 is not empty or not x2y2 is not empty & c21 is not empty ) & c12 is not empty by A11; hence z4 is not empty iff MULT323(x2,y2,x1,y1,x0,y0) is not empty by A3,A4,A8,A10 ,A17,A19,A23,A22,A25,A24,A26; A27: m324 = MAJ3(m314,x2y2,CARR2(m313,x1y2,m312,x0y2,{})) by GATE_1:def 38 .= MAJ3(m314,x2y2,MAJ3(m313,x1y2,MAJ3(m312,x0y2,{}))) by GATE_1:def 36; c22 is not empty iff x2y2 is not empty & c21 is not empty or c21 is not empty & c12 is not empty or c12 is not empty & x2y2 is not empty by A12; hence thesis by A3,A4,A8,A10,A18,A19,A23,A22,A25,A24,A27; end; begin theorem for x0,x1,x2,y0,y1,y2,z0,z1,z2,z3,z4,z5, q00,q01,q02,q03,c01,c02,c03, q11,q12,q13,c11,c12,c13 being set holds (q00 is not empty iff AND2(x0,y0) is not empty)& (q01 is not empty iff XOR3(AND2(x1,y0),AND2(x0,y1),{}) is not empty )& (c01 is not empty iff MAJ3(AND2(x1,y0),AND2(x0,y1),{}) is not empty)& (q02 is not empty iff XOR3(AND2(x2,y0),AND2(x1,y1),AND2(x0,y2)) is not empty)& (c02 is not empty iff MAJ3(AND2(x2,y0),AND2(x1,y1),AND2(x0,y2)) is not empty)& (q03 is not empty iff XOR3(AND2(x2,y1),AND2(x1,y2),{}) is not empty)& (c03 is not empty iff MAJ3(AND2(x2,y1),AND2(x1,y2),{}) is not empty)& (q11 is not empty iff XOR3(q02,c01,{}) is not empty)& (c11 is not empty iff MAJ3(q02,c01,{}) is not empty)& (q12 is not empty iff XOR3(q03,c02,c11) is not empty)& (c12 is not empty iff MAJ3(q03,c02,c11) is not empty)& (q13 is not empty iff XOR3(AND2(x2, y2),c03,c12) is not empty)& (c13 is not empty iff MAJ3(AND2(x2,y2),c03,c12) is not empty)& (z0 is not empty iff q00 is not empty)& (z1 is not empty iff q01 is not empty)& (z2 is not empty iff q11 is not empty)& (z3 is not empty iff q12 is not empty)& (z4 is not empty iff q13 is not empty)& (z5 is not empty iff c13 is not empty) implies (z0 is not empty iff MULT310(x2, x1,y1,x0,y0) is not empty)& (z1 is not empty iff MULT311(x2, x1,y1,x0,y0) is not empty)& (z2 is not empty iff MULT321(x2,y2,x1,y1,x0,y0) is not empty)& (z3 is not empty iff MULT322(x2, y2,x1,y1,x0,y0) is not empty)& (z4 is not empty iff MULT323(x2,y2,x1,y1,x0,y0) is not empty)& (z5 is not empty iff MULT324(x2,y2,x1,y1,x0,y0) is not empty) proof let x0,x1,x2,y0,y1,y2,z0,z1,z2,z3,z4,z5, q00,q01,q02,q03,c01,c02,c03,q11,q12 ,q13,c11,c12,c13 be set; assume that A1: q00 is not empty iff AND2(x0,y0) is not empty and A2: q01 is not empty iff XOR3(AND2(x1,y0),AND2(x0,y1),{}) is not empty and A3: c01 is not empty iff MAJ3(AND2(x1,y0),AND2(x0,y1),{}) is not empty and A4: q02 is not empty iff XOR3(AND2(x2,y0),AND2(x1,y1),AND2(x0,y2)) is not empty and A5: c02 is not empty iff MAJ3(AND2(x2,y0),AND2(x1,y1),AND2(x0,y2)) is not empty and A6: q03 is not empty iff XOR3(AND2(x2,y1),AND2(x1,y2),{}) is not empty and A7: c03 is not empty iff MAJ3(AND2(x2,y1),AND2(x1,y2),{}) is not empty and A8: q11 is not empty iff XOR3(q02,c01,{}) is not empty and A9: c11 is not empty iff MAJ3(q02,c01,{}) is not empty and A10: q12 is not empty iff XOR3(q03,c02,c11) is not empty and A11: c12 is not empty iff MAJ3(q03,c02,c11) is not empty and A12: q13 is not empty iff XOR3(AND2(x2,y2),c03,c12) is not empty and A13: c13 is not empty iff MAJ3(AND2(x2,y2),c03,c12) is not empty and A14: z0 is not empty iff q00 is not empty and A15: z1 is not empty iff q01 is not empty and A16: z2 is not empty iff q11 is not empty and A17: z3 is not empty iff q12 is not empty and A18: z4 is not empty iff q13 is not empty and A19: z5 is not empty iff c13 is not empty; thus z0 is not empty iff MULT310(x2,x1,y1,x0,y0) is not empty by A1,A14; thus z1 is not empty iff MULT311(x2,x1,y1,x0,y0) is not empty by A2,A15; set m312 = MULT312(x2,x1,y1,x0,y0); set x0y2 = AND2(x0,y2); set x1y1 = AND2(x1,y1); set x0y1 = AND2(x0,y1); set x2y0 = AND2(x2,y0); set x1y0 = AND2(x1,y0); A20: m312 = XOR3(x2y0,x1y1,MAJ3(x1y0,x0y1,{})) by GATE_1:def 35; set m323 = MULT323(x2,y2,x1,y1,x0,y0); set m314 = MULT314(x2,x1,y1,x0,y0); set x2y2 = AND2(x2,y2); set m322 = MULT322(x2,y2,x1,y1,x0,y0); set m313 = MULT313(x2,x1,y1,x0,y0); set x1y2 = AND2(x1,y2); set x2y1 = AND2(x2,y1); A21: q03 is not empty iff x2y1 is not empty & not x1y2 is not empty or not x2y1 is not empty & x1y2 is not empty by A6; A22: q02 is not empty iff ( x2y0 is not empty & not x1y1 is not empty or not x2y0 is not empty & x1y1 is not empty ) & not x0y2 is not empty or not ( x2y0 is not empty & not x1y1 is not empty or not x2y0 is not empty & x1y1 is not empty ) & x0y2 is not empty by A4; hence z2 is not empty iff MULT321(x2,y2,x1,y1,x0,y0) is not empty by A3,A8 ,A16,A20; A23: m313 = XOR3({},x2y1,CARR2(x2y0,x1y1,x1y0,x0y1,{})) by GATE_1:def 37 .= XOR3({},x2y1,MAJ3(x2y0,x1y1,MAJ3(x1y0,x0y1,{}))) by GATE_1:def 36; m322 = XOR3(m313,x1y2,MAJ3(m312,x0y2,{})) by GATE_1:def 35; hence z3 is not empty iff MULT322(x2,y2,x1,y1,x0,y0) is not empty by A3,A5,A9,A10 ,A17,A22,A21,A20,A23; A24: m314 = MAJ3({},x2y1,CARR2(x2y0,x1y1,x1y0,x0y1,{})) by GATE_1:def 38 .= MAJ3({},x2y1,MAJ3(x2y0,x1y1,MAJ3(x1y0,x0y1,{}))) by GATE_1:def 36; set m324 = MULT324(x2,y2,x1,y1,x0,y0); A25: m324 = MAJ3(m314,x2y2,CARR2(m313,x1y2,m312,x0y2,{})) by GATE_1:def 38 .= MAJ3(m314,x2y2,MAJ3(m313,x1y2,MAJ3(m312,x0y2,{}))) by GATE_1:def 36; A26: m323 = XOR3(m314,x2y2,CARR2(m313,x1y2,m312,x0y2,{})) by GATE_1:def 37 .= XOR3(m314,x2y2,MAJ3(m313,x1y2,MAJ3(m312,x0y2,{}))) by GATE_1:def 36; q13 is not empty iff ( x2y2 is not empty & not c03 is not empty or not x2y2 is not empty & c03 is not empty ) & not c12 is not empty or not ( x2y2 is not empty & not c03 is not empty or not x2y2 is not empty & c03 is not empty ) & c12 is not empty by A12; hence z4 is not empty iff MULT323(x2,y2,x1,y1,x0,y0) is not empty by A3,A5,A7,A9 ,A11,A18,A22,A21,A20,A23,A24,A26; c13 is not empty iff x2y2 is not empty & c03 is not empty or c03 is not empty & c12 is not empty or c12 is not empty & x2y2 is not empty by A13; hence thesis by A3,A5,A7,A9,A11,A19,A22,A21,A20,A23,A24,A25; end; notation let a1,b1,c be set; synonym CLAADD1(a1,b1,c) for XOR3(a1,b1,c); synonym CLACARR1(a1,b1,c) for MAJ3(a1,b1,c); end; definition let a1,b1,a2,b2,c be set; func CLAADD2(a2,b2,a1,b1,c) -> set equals XOR3(a2,b2,MAJ3(a1,b1,c)); correctness; func CLACARR2(a2,b2,a1,b1,c) -> set equals OR2(AND2(a2,b2),AND2(OR2(a2,b2), MAJ3(a1,b1,c))); correctness; end; definition let a1,b1,a2,b2,a3,b3,c be set; func CLAADD3(a3,b3,a2,b2,a1,b1,c) -> set equals XOR3(a3,b3,CLACARR2(a2,b2,a1 ,b1,c)); correctness; func CLACARR3(a3,b3,a2,b2,a1,b1,c) -> set equals OR3(AND2(a3,b3),AND2(OR2(a3 ,b3),AND2(a2,b2)), AND3(OR2(a3,b3),OR2(a2,b2),MAJ3(a1,b1,c))); correctness; end; definition let a1,b1,a2,b2,a3,b3,a4,b4,c be set; func CLAADD4(a4,b4,a3,b3,a2,b2,a1,b1,c) -> set equals XOR3(a4,b4,CLACARR3(a3 ,b3,a2,b2,a1,b1,c)); correctness; func CLACARR4(a4,b4,a3,b3,a2,b2,a1,b1,c) -> set equals OR4(AND2(a4,b4),AND2( OR2(a4,b4),AND2(a3,b3)), AND3(OR2(a4,b4),OR2(a3,b3),AND2(a2,b2)), AND4(OR2(a4, b4),OR2(a3,b3),OR2(a2,b2),MAJ3(a1,b1,c))); correctness; end; theorem for x0,x1,x2,y0,y1,y2,z0,z1,z2,z3,z4,z5, q00,q01,q02,q03,c01,c02,c03 being set holds (q00 is not empty iff AND2(x0,y0) is not empty)& (q01 is not empty iff XOR3(AND2(x1,y0),AND2(x0,y1),{}) is not empty)& (c01 is not empty iff MAJ3(AND2(x1,y0),AND2(x0,y1),{}) is not empty)& (q02 is not empty iff XOR3(AND2 (x2,y0),AND2(x1,y1),AND2(x0,y2)) is not empty)& (c02 is not empty iff MAJ3(AND2 (x2,y0),AND2(x1,y1),AND2(x0,y2)) is not empty)& (q03 is not empty iff XOR3(AND2 (x2,y1),AND2(x1,y2),{}) is not empty)& (c03 is not empty iff MAJ3(AND2(x2,y1), AND2(x1,y2),{}) is not empty)& (z0 is not empty iff q00 is not empty)& (z1 is not empty iff q01 is not empty)& (z2 is not empty iff CLAADD1( q02,c01,{}) is not empty)& (z3 is not empty iff CLAADD2( q03,c02,q02,c01,{}) is not empty)& ( z4 is not empty iff CLAADD3(AND2(x2,y2),c03,q03,c02,q02,c01,{}) is not empty)& (z5 is not empty iff CLACARR3(AND2(x2,y2),c03,q03,c02,q02,c01,{}) is not empty) implies (z0 is not empty iff MULT310(x2, x1,y1,x0,y0) is not empty)& (z1 is not empty iff MULT311(x2, x1,y1,x0,y0) is not empty)& (z2 is not empty iff MULT321( x2,y2,x1,y1,x0,y0) is not empty)& (z3 is not empty iff MULT322(x2,y2,x1,y1,x0, y0) is not empty)& (z4 is not empty iff MULT323(x2,y2,x1,y1,x0,y0) is not empty )& (z5 is not empty iff MULT324(x2,y2,x1,y1,x0,y0) is not empty) proof let x0,x1,x2,y0,y1,y2,z0,z1,z2,z3,z4,z5, q00,q01,q02,q03,c01,c02,c03 be set; assume that A1: q00 is not empty iff AND2(x0,y0) is not empty and A2: q01 is not empty iff XOR3(AND2(x1,y0),AND2(x0,y1),{}) is not empty and A3: c01 is not empty iff MAJ3(AND2(x1,y0),AND2(x0,y1),{}) is not empty and A4: q02 is not empty iff XOR3(AND2(x2,y0),AND2(x1,y1),AND2(x0,y2)) is not empty and A5: c02 is not empty iff MAJ3(AND2(x2,y0),AND2(x1,y1),AND2(x0,y2)) is not empty and A6: q03 is not empty iff XOR3(AND2(x2,y1),AND2(x1,y2),{}) is not empty and A7: c03 is not empty iff MAJ3(AND2(x2,y1),AND2(x1,y2),{}) is not empty and A8: z0 is not empty iff q00 is not empty and A9: z1 is not empty iff q01 is not empty and A10: z2 is not empty iff CLAADD1( q02,c01,{}) is not empty and A11: z3 is not empty iff CLAADD2( q03,c02,q02,c01,{}) is not empty and A12: z4 is not empty iff CLAADD3(AND2(x2,y2),c03,q03,c02,q02,c01,{}) is not empty and A13: z5 is not empty iff CLACARR3(AND2(x2,y2),c03,q03,c02,q02,c01,{}) is not empty; set x0y2 = AND2(x0,y2); set x1y1 = AND2(x1,y1); set x2y0 = AND2(x2,y0); thus z0 is not empty iff MULT310(x2,x1,y1,x0,y0) is not empty by A1,A8; thus z1 is not empty iff MULT311(x2,x1,y1,x0,y0) is not empty by A2,A9; set m312 = MULT312(x2,x1,y1,x0,y0); set x0y1 = AND2(x0,y1); set x1y0 = AND2(x1,y0); A14: m312 = XOR3(x2y0,x1y1,MAJ3(x1y0,x0y1,{})) by GATE_1:def 35; then A15: m312 is not empty iff ( x2y0 is not empty & not x1y1 is not empty or not x2y0 is not empty & x1y1 is not empty ) & not (x1y0 is not empty & x0y1 is not empty) or not ( x2y0 is not empty & not x1y1 is not empty or not x2y0 is not empty & x1y1 is not empty ) & x1y0 is not empty & x0y1 is not empty; set x1y2 = AND2(x1,y2); set x2y1 = AND2(x2,y1); A16: q03 is not empty iff x2y1 is not empty & not x1y2 is not empty or not x2y1 is not empty & x1y2 is not empty by A6; set m324 = MULT324(x2,y2,x1,y1,x0,y0); set m323 = MULT323(x2,y2,x1,y1,x0,y0); set m314 = MULT314(x2,x1,y1,x0,y0); set x2y2 = AND2(x2,y2); A17: m314 = MAJ3({},x2y1,CARR2(x2y0,x1y1,x1y0,x0y1,{})) by GATE_1:def 38 .= MAJ3({},x2y1,MAJ3(x2y0,x1y1,MAJ3(x1y0,x0y1,{}))) by GATE_1:def 36; set m322 = MULT322(x2,y2,x1,y1,x0,y0); set m313 = MULT313(x2,x1,y1,x0,y0); A18: m313 = XOR3({},x2y1,CARR2(x2y0,x1y1,x1y0,x0y1,{})) by GATE_1:def 37 .= XOR3({},x2y1,MAJ3(x2y0,x1y1,MAJ3(x1y0,x0y1,{}))) by GATE_1:def 36; q02 is not empty iff ( x2y0 is not empty & not x1y1 is not empty or not x2y0 is not empty & x1y1 is not empty ) & not x0y2 is not empty or not ( x2y0 is not empty & not x1y1 is not empty or not x2y0 is not empty & x1y1 is not empty ) & x0y2 is not empty by A4; hence z2 is not empty iff MULT321(x2,y2,x1,y1,x0,y0) is not empty by A3,A10 ,A14; A19: c02 is not empty iff x2y0 is not empty & x1y1 is not empty or x1y1 is not empty & x0y2 is not empty or x0y2 is not empty & x2y0 is not empty by A5; m322 = XOR3(m313,x1y2,MAJ3(m312,x0y2,{})) by GATE_1:def 35; then m322 is not empty iff ( m313 is not empty & not x1y2 is not empty or not m313 is not empty & x1y2 is not empty ) & not (m312 is not empty & x0y2 is not empty) or not ( m313 is not empty & not x1y2 is not empty or not m313 is not empty & x1y2 is not empty ) & m312 is not empty & x0y2 is not empty; hence z3 is not empty iff MULT322(x2,y2,x1,y1,x0,y0) is not empty by A3,A4 ,A11,A19,A16,A15,A18; m323 = XOR3(m314,x2y2,CARR2(m313,x1y2,m312,x0y2,{})) by GATE_1:def 37 .= XOR3(m314,x2y2,MAJ3(m313,x1y2,MAJ3(m312,x0y2,{}))) by GATE_1:def 36; then m323 is not empty iff ( m314 is not empty & not x2y2 is not empty or not m314 is not empty & x2y2 is not empty ) & not ( m313 is not empty & x1y2 is not empty or x1y2 is not empty & m312 is not empty & x0y2 is not empty or m312 is not empty & x0y2 is not empty & m313 is not empty ) or not ( m314 is not empty & not x2y2 is not empty or not m314 is not empty & x2y2 is not empty ) & ( m313 is not empty & x1y2 is not empty or x1y2 is not empty & m312 is not empty & x0y2 is not empty or m312 is not empty & x0y2 is not empty & m313 is not empty ); hence z4 is not empty iff MULT323(x2,y2,x1,y1,x0,y0) is not empty by A3,A4,A7,A12 ,A19,A16,A15,A18,A17; m324 = MAJ3(m314,x2y2,CARR2(m313,x1y2,m312,x0y2,{})) by GATE_1:def 38 .= MAJ3(m314,x2y2,MAJ3(m313,x1y2,MAJ3(m312,x0y2,{}))) by GATE_1:def 36; then m324 is not empty iff m314 is not empty & x2y2 is not empty or x2y2 is not empty & ( m313 is not empty & x1y2 is not empty or x1y2 is not empty & m312 is not empty & x0y2 is not empty or m312 is not empty & x0y2 is not empty & m313 is not empty ) or ( m313 is not empty & x1y2 is not empty or x1y2 is not empty & m312 is not empty & x0y2 is not empty or m312 is not empty & x0y2 is not empty & m313 is not empty ) & m314 is not empty; hence thesis by A3,A4,A7,A13,A19,A16,A15,A18,A17; end; begin definition let IT be set; attr IT is finite means :Def1: ex p being Function st rng p = IT & dom p in omega; end; notation let IT be set; antonym IT is infinite for IT is finite; end; reserve A, B, X, Y, Z, x, y for set; reserve f for Function; Lm1: {x} is finite proof set p = {{}} --> x; A1: dom p = {{}} by FUNCOP_1:13; take p; for y holds y in {x} iff ex x st x in dom p & y = p.x proof let y; thus y in {x} implies ex x st x in dom p & y = p.x proof assume y in {x}; then A2: y = x by TARSKI:def 1; take {}; thus {} in dom p by A1,TARSKI:def 1; {} in {{}} by TARSKI:def 1; hence thesis by A2,FUNCOP_1:7; end; assume ex z be set st z in dom p & y = p.z; then y = x by FUNCOP_1:7; hence thesis by TARSKI:def 1; end; hence rng p = {x} by FUNCT_1:def 3; thus thesis by A1,ORDINAL3:15; end; registration cluster non empty finite for set; existence proof {the set} is finite by Lm1; hence thesis; end; end; registration cluster empty -> finite for set; coherence proof let A be set; assume A1: A is empty; take {}; thus rng {} = A by A1; thus thesis by ORDINAL1:def 11; end; end; scheme OLambdaC{A()->set,C[set],F(set)->set,G(set)->set}: ex f being Function st dom f = A() & for x being Ordinal st x in A() holds (C[x] implies f.x = F(x)) & (not C[x] implies f.x = G(x)) proof consider f being Function such that A1: dom f = A() & for x being set st x in A() holds (C[x] implies f.x = F(x)) & (not C[x] implies f.x = G(x)) from PARTFUN1:sch 1; take f; thus thesis by A1; end; Lm2: A is finite & B is finite implies A \/ B is finite proof given p be Function such that A1: rng p = A and A2: dom p in omega; given q be Function such that A3: rng q = B and A4: dom q in omega; reconsider domp = dom p, domq = dom q as Ordinal by A2,A4; deffunc F(Ordinal) = p.$1; deffunc G(Ordinal) = q.($1-^domp); defpred P[set] means $1 in domp; consider f such that A5: dom f = domp+^domq and A6: for x being Ordinal st x in domp+^domq holds (P[x] implies f.x = F(x)) & (not P[x] implies f.x = G(x)) from OLambdaC; take f; reconsider domp, domq as natural Ordinal by A2,A4; thus rng f = A \/ B proof thus rng f c= A \/ B proof let y; assume y in rng f; then consider x such that A7: x in dom f and A8: y = f.x by FUNCT_1:def 3; reconsider x as Ordinal by A5,A7; per cases; suppose A9: x in domp; then A10: y = p.x by A5,A6,A7,A8; p.x in rng p by A9,FUNCT_1:def 3; hence thesis by A1,A10,XBOOLE_0:def 3; end; suppose A11: not x in domp; then A12: domp c= x by ORDINAL1:16; A13: y = q.(x-^domp) by A5,A6,A7,A8,A11; (domp)+^(x-^domp) = x by A12,ORDINAL3:def 5; then x-^domp in dom q by A5,A7,ORDINAL3:22; then y in B by A3,A13,FUNCT_1:def 3; hence thesis by XBOOLE_0:def 3; end; end; let x; assume A14: x in A \/ B; per cases by A1,A3,A14,XBOOLE_0:def 3; suppose x in rng p; then consider y such that A15: y in dom p and A16: x = p.y by FUNCT_1:def 3; A17: dom p c= dom f by A5,ORDINAL3:24; then x = f.y by A5,A6,A15,A16; hence thesis by A15,A17,FUNCT_1:def 3; end; suppose x in rng q; then consider y such that A18: y in domq and A19: x = q.y by FUNCT_1:def 3; reconsider y as Ordinal by A18; set z = domp +^ y; domp c= z by ORDINAL3:24; then A20: not z in domp by ORDINAL1:5; A21: z in dom f by A5,A18,ORDINAL3:17; x = q.(z-^domp) by A19,ORDINAL3:52 .= f.z by A5,A6,A20,A21; hence thesis by A21,FUNCT_1:def 3; end; end; domp+^domq is natural; hence thesis by A5,ORDINAL1:def 12; end; registration let x be set; cluster {x} -> finite; coherence by Lm1; end; registration let x,y be set; cluster {x,y} -> finite; coherence proof {x,y} = {x} \/ {y} by ENUMSET1:1; hence thesis by Lm2; end; end; registration let x,y,z be set; cluster {x,y,z} -> finite; coherence proof {x,y,z} = {x} \/ {y,z} by ENUMSET1:2; hence thesis by Lm2; end; end; registration let x1,x2,x3,x4 be set; cluster {x1,x2,x3,x4} -> finite; coherence proof {x1,x2,x3,x4} = {x1} \/ {x2,x3,x4} by ENUMSET1:4; hence thesis by Lm2; end; end; registration let x1,x2,x3,x4,x5 be set; cluster {x1,x2,x3,x4,x5} -> finite; coherence proof {x1,x2,x3,x4,x5} = {x1} \/ {x2,x3,x4,x5} by ENUMSET1:7; hence thesis by Lm2; end; end; registration let x1,x2,x3,x4,x5,x6 be set; cluster {x1,x2,x3,x4,x5,x6} -> finite; coherence proof {x1,x2,x3,x4,x5,x6} = {x1} \/ {x2,x3,x4,x5,x6} by ENUMSET1:11; hence thesis by Lm2; end; end; registration let x1,x2,x3,x4,x5,x6,x7 be set; cluster {x1,x2,x3,x4,x5,x6,x7} -> finite; coherence proof {x1,x2,x3,x4,x5,x6,x7} = {x1} \/ {x2,x3,x4,x5,x6,x7} by ENUMSET1:16; hence thesis by Lm2; end; end; registration let x1,x2,x3,x4,x5,x6,x7,x8 be set; cluster {x1,x2,x3,x4,x5,x6,x7,x8} -> finite; coherence proof {x1,x2,x3,x4,x5,x6,x7,x8} = {x1} \/ {x2,x3,x4,x5,x6,x7,x8} by ENUMSET1:22; hence thesis by Lm2; end; end; registration let B be finite set; cluster -> finite for Subset of B; coherence proof let A be Subset of B; per cases; suppose A is empty; hence thesis; end; suppose A is non empty; then consider x1 be set such that A1: x1 in A by XBOOLE_0:def 1; consider p be Function such that A2: rng p = B and A3: dom p in omega by Def1; deffunc F(set) = p.$1; deffunc G(set) = x1; defpred P[set] means p.$1 in A; consider q be Function such that A4: dom q = dom p and A5: for x st x in dom p holds (P[x] implies q.x = F(x)) & (not P[x] implies q.x = G(x)) from PARTFUN1:sch 1; now let y; thus y in A implies ex x st x in dom q & y = q.x proof assume A6: y in A; then consider x such that A7: x in dom p and A8: p.x = y by A2,FUNCT_1:def 3; take x; thus x in dom q by A4,A7; thus thesis by A5,A6,A7,A8; end; given x such that A9: x in dom q and A10: y = q.x; per cases; suppose p.x in A; hence y in A by A4,A5,A9,A10; end; suppose not p.x in A; hence y in A by A1,A4,A5,A9,A10; end; end; then rng q = A by FUNCT_1:def 3; hence thesis by A3,A4,Def1; end; end; end; registration let X,Y be finite set; cluster X \/ Y -> finite; coherence by Lm2; end; theorem A c= B & B is finite implies A is finite; theorem A is finite & B is finite implies A \/ B is finite; registration let A be set, B be finite set; cluster A /\ B -> finite; coherence proof A /\ B c= B by XBOOLE_1:17; hence thesis; end; end; registration let A be finite set, B be set; cluster A /\ B -> finite; coherence; cluster A \ B -> finite; coherence; end; theorem A is finite implies A /\ B is finite; theorem A is finite implies A \ B is finite; registration let f be Function, A be finite set; cluster f.:A -> finite; coherence proof set B = dom f /\ A; consider p be Function such that A1: rng p=B and A2: dom p in omega by Def1; take f*p; rng (f*p) = f.:B by A1,RELAT_1:127; hence rng (f*p) = f.:A by RELAT_1:112; thus thesis by A1,A2,RELAT_1:27,XBOOLE_1:17; end; end; theorem A is finite implies f.:A is finite; reserve O for Ordinal; theorem Th6: A is finite implies for X being Subset-Family of A st X <> {} ex x being set st x in X & for B being set st B in X holds x c= B implies B = x proof assume A1: A is finite; let X be Subset-Family of A such that A2: X <> {}; consider p be Function such that A3: rng p = A and A4: dom p in omega by A1,Def1; defpred P[set] means p.:$1 in X; consider G being set such that A5: for x holds x in G iff x in bool dom p & P[x] from XBOOLE_0:sch 1; G c= bool dom p proof let x; assume x in G; hence thesis by A5; end; then reconsider GX=G as Subset-Family of dom p; set x = the Element of X; x is Subset of A by A2,TARSKI:def 3; then A6: p.:(p"x) = x by A3,FUNCT_1:77; p"x c= dom p by RELAT_1:132; then A7: GX <> {} by A2,A5,A6; defpred P[set] means $1 in omega implies for X being Subset-Family of $1 st X <> {} ex x being set st x in X & for B being set st B in X holds x c= B implies B = x; A8: P[{}] proof assume {} in omega; let X be Subset-Family of {}; assume X <> {}; then A9: X = {{}} by ZFMISC_1:1,33; take {}; thus thesis by A9,TARSKI:def 1; end; A10: P[O] implies P[succ O] proof assume A11: O in omega implies for X being Subset-Family of O st X <> {} ex x being set st x in X & for B being set st B in X holds x c= B implies B = x; thus succ O in omega implies for X being Subset-Family of succ O st X <> {} ex x being set st x in X & for B being set st B in X holds x c= B implies B = x proof assume succ O in omega; then A12: succ O c= omega by ORDINAL1:def 2; let X be Subset-Family of succ O such that A13: X <> {}; defpred P[set] means ex A st A in X & $1 = A \ {O}; consider X1 being set such that A14: for x holds x in X1 iff x in bool O & P[x] from XBOOLE_0:sch 1; X1 c= bool O proof let x; assume x in X1; hence thesis by A14; end; then reconsider X2=X1 as Subset-Family of O; set y = the Element of X; A15: succ O = O \/ {O} by ORDINAL1:def 1; y is Subset of succ O by A13,TARSKI:def 3; then y \ {O} c= (O \/ {O}) \ {O} by A15,XBOOLE_1:33; then A16: y \ {O} c= O \ {O} by XBOOLE_1:40; A17: O in succ O by ORDINAL1:6; A18: not O in O; then y \ {O} c= O by A16,ZFMISC_1:57; then X2 <> {} by A13,A14; then consider Z such that A19: Z in X2 and A20: for B being set st B in X2 holds Z c= B implies B = Z by A11,A12,A17; consider X1 being set such that A21: X1 in X and A22: Z=X1 \ {O} by A14,A19; A23: O in {O} by TARSKI:def 1; then A24: not O in Z by A22,XBOOLE_0:def 5; A25: now assume A26: Z \/ {O} in X; take A=Z \/ {O}; for B being set st B in X holds A c= B implies B = A proof let B such that A27: B in X; assume A28: A c= B; A29: now assume A30: O in B; set Y = B \ {O}; {O} c= B by A30,ZFMISC_1:31; then A31: B = Y \/ {O} by XBOOLE_1:45; A \ {O} c= Y by A28,XBOOLE_1:33; then A32: Z \ {O} c= Y by XBOOLE_1:40; not O in Z by A22,A23,XBOOLE_0:def 5; then A33: Z c= Y by A32,ZFMISC_1:57; Y c= (O \/ {O}) \ {O} by A15,A27,XBOOLE_1:33; then Y c= O \ {O} by XBOOLE_1:40; then Y c= O by A18,ZFMISC_1:57; then Y in X2 by A14,A27; hence thesis by A20,A31,A33; end; now assume A34: not O in B; O in {O} by TARSKI:def 1; then O in A by XBOOLE_0:def 3; hence contradiction by A28,A34; end; hence thesis by A29; end; hence thesis by A26; end; now assume A35: not Z \/ {O} in X; take A=Z; now assume O in X1; then X1 = X1 \/ {O} by ZFMISC_1:40 .= Z \/ {O} by A22,XBOOLE_1:39; hence contradiction by A21,A35; end; then A36: A in X by A21,A22,ZFMISC_1:57; for B being set st B in X holds A c= B implies B = A proof let B; assume A37: B in X; then B \ {O} c= (O \/ {O}) \ {O} by A15,XBOOLE_1:33; then B \ {O} c= O \ {O} by XBOOLE_1:40; then B \ {O} c= O by A18,ZFMISC_1:57; then A38: B \ {O} in X2 by A14,A37; assume A39: A c= B; then A \ {O} c= B \ {O} by XBOOLE_1:33; then A40: A c= B \ {O} by A24,ZFMISC_1:57; A41: now assume A42: O in B; A \/ {O} = (B \ {O}) \/ {O} by A20,A38,A40 .= B \/ {O} by XBOOLE_1:39 .= B by A42,ZFMISC_1:40; hence contradiction by A35,A37; end; A43: B c= O proof let x such that A44: x in B; x in O or x in {O} by A15,A37,A44,XBOOLE_0:def 3; hence thesis by A41,A44,TARSKI:def 1; end; B \ {O} = B by A41,ZFMISC_1:57; then B in X2 by A14,A37,A43; hence thesis by A20,A39; end; hence thesis by A36; end; hence thesis by A25; end; end; A45: O <> {} & O is limit_ordinal & (for B being Ordinal st B in O holds P[B]) implies P[O] proof assume that A46: O <> {} and A47: O is limit_ordinal and for B being Ordinal st B in O holds P[B] and A48: O in omega; {} in O by A46,ORDINAL1:14; then omega c= O by A47,ORDINAL1:def 11; then O in O by A48; hence thesis; end; P[O] from ORDINAL2:sch 1(A8,A10,A45); then consider g being set such that A49: g in GX and A50: for B being set st B in GX holds g c= B implies B=g by A4,A7; take p.:g; for B st B in X holds p.:g c= B implies B = p.:g proof let B; assume A51: B in X; assume p.:g c= B; then A52: p"(p.:g) c= p"B by RELAT_1:143; A53: g c= p"(p.:g) by A49,FUNCT_1:76; A54: p.:(p"B) = B by A3,A51,FUNCT_1:77; p"B c= dom p by RELAT_1:132; then p"B in GX by A5,A51,A54; hence thesis by A50,A52,A53,A54,XBOOLE_1:1; end; hence thesis by A5,A49; end; scheme Finite{A()->set,P[set]} : P[A()] provided A1: A() is finite and A2: P[{}] and A3: for x,B being set st x in A() & B c= A() & P[B] holds P[B \/ {x}] proof now assume A() <> {}; defpred R[set] means ex B st B=$1 & P[B]; consider G being set such that A4: for x holds x in G iff x in bool A() & R[x] from XBOOLE_0:sch 1; G c= bool A() proof let x; assume x in G; hence thesis by A4; end; then reconsider GA=G as Subset-Family of A(); {} c= A() by XBOOLE_1:2; then GA <> {} by A2,A4; then consider B such that A5: B in GA and A6: for X being set st X in GA holds B c= X implies B=X by A1,Th6; A7: ex A st A = B & P[A] by A4,A5; now set x = the Element of A() \ B; assume B <> A(); then not A() c= B by A5,XBOOLE_0:def 10; then A8: A() \ B <> {} by XBOOLE_1:37; then A9: x in A() by XBOOLE_0:def 5; then A10: P[B \/ {x}] by A3,A5,A7; {x} c= A() by A9,ZFMISC_1:31; then B \/ {x} c= A() by A5,XBOOLE_1:8; then A11: B \/ {x} in GA by A4,A10; not x in B by A8,XBOOLE_0:def 5; then not {x} c= B by ZFMISC_1:31; then B \/ {x} <> B by XBOOLE_1:7; hence contradiction by A6,A11,XBOOLE_1:7; end; hence thesis by A7; end; hence thesis by A2; end; Lm3: A is finite & (for X st X in A holds X is finite) implies union A is finite proof assume that A1: A is finite and A2: for X st X in A holds X is finite; defpred P[set] means ex B st B=$1 & union B is finite; consider G being set such that A3: for x holds x in G iff x in bool A & P[x] from XBOOLE_0:sch 1; defpred P[set] means $1 in G; {} c= A by XBOOLE_1:2; then A4: P[{}] by A3,ZFMISC_1:2; A5: for x,B being set st x in A & B c= A & P[B] holds P[B \/ {x}] proof let x,B be set; assume that A6: x in A and B c= A and A7: B in G; A8: ex X st X=B & union X is finite by A3,A7; A9: x is finite by A2,A6; A10: union (B \/ {x}) = union B \/ union {x} by ZFMISC_1:78 .= union B \/ x by ZFMISC_1:25; A11: {x} c= A by A6,ZFMISC_1:31; B in bool A by A3,A7; then B \/ {x} c= A by A11,XBOOLE_1:8; hence thesis by A3,A8,A9,A10; end; P[A] from Finite(A1,A4,A5); then ex X st X=A & union X is finite by A3; hence thesis; end; registration let A,B be finite set; cluster [:A,B:] -> finite; coherence proof A1: for y holds [:A,{y}:] is finite proof let y; deffunc F(set) = [$1,y]; consider f such that A2: dom f=A & for x st x in A holds f.x=F(x) from FUNCT_1:sch 3; for x holds x in rng f iff x in [:A,{y}:] proof let x; thus x in rng f implies x in [:A,{y}:] proof assume x in rng f; then consider z be set such that A3: z in dom f and A4: f.z = x by FUNCT_1:def 3; x = [z,y] by A2,A3,A4; hence thesis by A2,A3,ZFMISC_1:106; end; thus x in [:A,{y}:] implies x in rng f proof assume x in [:A,{y}:]; then consider x1,x2 be set such that A5: x1 in A and A6: x2 in {y} and A7: x=[x1,x2] by ZFMISC_1:def 2; x2=y by A6,TARSKI:def 1; then x = f.x1 by A2,A5,A7; hence thesis by A2,A5,FUNCT_1:def 3; end; end; then rng f = [:A,{y}:] by TARSKI:1; then f.:A=[:A,{y}:] by A2,RELAT_1:113; hence thesis; end; defpred P[set] means ex y st y in B & $1 = [:A,{y}:]; consider G being set such that A8: for x holds x in G iff x in bool [:A,B:] & P[x] from XBOOLE_0:sch 1; for x holds x in union G iff x in [:A,B:] proof let x; thus x in union G implies x in [:A,B:] proof assume x in union G; then consider X such that A9: x in X and A10: X in G by TARSKI:def 4; X in bool [:A,B:]by A8,A10; hence thesis by A9; end; assume x in [:A,B:]; then consider y,z be set such that A11: y in A and A12: z in B and A13: x=[y,z] by ZFMISC_1:def 2; A14: [y,z] in [:A,{z}:] by A11,ZFMISC_1:106; {z} c= B by A12,ZFMISC_1:31; then [:A,{z}:] c= [:A,B:] by ZFMISC_1:95; then [:A,{z}:] in G by A8,A12; hence thesis by A13,A14,TARSKI:def 4; end; then A15: union G = [:A,B:] by TARSKI:1; deffunc F(set) = [:A,{$1}:]; consider g being Function such that A16: dom g = B & for x st x in B holds g.x = F(x) from FUNCT_1:sch 3; for x holds x in rng g iff x in G proof let x; thus x in rng g implies x in G proof assume x in rng g; then consider y such that A17: y in dom g and A18: g.y = x by FUNCT_1:def 3; A19: x = [:A,{y}:] by A16,A17,A18; {y} c= B by A16,A17,ZFMISC_1:31; then x c= [:A,B:] by A19,ZFMISC_1:95; hence thesis by A8,A16,A17,A19; end; assume x in G; then consider y such that A20: y in B and A21: x = [:A,{y}:] by A8; x = g.y by A16,A20,A21; hence thesis by A16,A20,FUNCT_1:def 3; end; then rng g = G by TARSKI:1; then A22: g.:B = G by A16,RELAT_1:113; for X st X in G holds X is finite proof let X; assume X in G; then ex y st y in B & X=[:A,{y}:] by A8; hence thesis by A1; end; hence thesis by A15,A22,Lm3; end; end; registration let A,B,C be finite set; cluster [:A,B,C:] -> finite; coherence proof [:[:A,B:],C:] is finite; hence thesis by ZFMISC_1:def 3; end; end; registration let A,B,C,D be finite set; cluster [:A,B,C,D:] -> finite; coherence proof [:[:A,B,C:],D:] is finite; hence thesis by ZFMISC_1:def 4; end; end; registration let A be finite set; cluster bool A -> finite; coherence proof A1: A is finite; defpred P[set] means bool $1 is finite; consider G being set such that A2: for x holds x in G iff x in bool A & P[x] from XBOOLE_0:sch 1; defpred P[set] means $1 in G; A3: bool{} is finite by ZFMISC_1:1; {} c= A by XBOOLE_1:2; then A4: P[{}] by A3,A2; A5: for x,B being set st x in A & B c= A & P[B] holds P[B \/ {x}] proof let x,B be set; assume that A6: x in A and B c= A and A7: B in G; A8: now assume x in B; then {x} c= B by ZFMISC_1:31; hence thesis by A7,XBOOLE_1:12; end; now assume A9: not x in B; defpred P[set,set] means ex Y st Y=$1 & $2=Y \/ {x}; A10: for y,y1,y2 be set st y in bool B & P[y,y1] & P[y,y2] holds y1 = y2; A11: for y st y in bool B ex z be set st P[y,z] proof let y such that y in bool B; ex Y st Y=y & y \/ {x} = Y \/ {x}; hence thesis; end; consider f such that A12: dom f = bool B and A13: for y st y in bool B holds P[y,f.y] from FUNCT_1:sch 2(A10,A11); A14: bool B is finite by A2,A7; y in rng f iff y in bool(B \/ {x}) \ bool B proof thus y in rng f implies y in bool(B \/ {x}) \ bool B proof assume y in rng f; then consider x1 be set such that A15: x1 in dom f and A16: f.x1=y by FUNCT_1:def 3; consider X1 being set such that A17: X1=x1 and A18: f.x1= X1 \/ {x} by A12,A13,A15; A19: X1 \/ {x} c= B \/ {x} by A12,A15,A17,XBOOLE_1:13; x in {x} by TARSKI:def 1; then x in y by A16,A18,XBOOLE_0:def 3; then not y in bool B by A9; hence thesis by A16,A18,A19,XBOOLE_0:def 5; end; assume A20: y in bool(B \/ {x}) \ bool B; set Z=y \ {x}; A21: now assume A22: not x in y; y c= B proof let z be set; assume A23: z in y; then not z in {x} by A22,TARSKI:def 1; hence thesis by A20,A23,XBOOLE_0:def 3; end; hence contradiction by A20,XBOOLE_0:def 5; end; A24: Z c= B by A20,XBOOLE_1:43; then consider X such that A25: X=Z and A26: f.Z = X \/ {x} by A13; X \/ {x} = y \/ {x} by A25,XBOOLE_1:39 .= y by A21,ZFMISC_1:40; hence thesis by A12,A24,A26,FUNCT_1:def 3; end; then rng f = bool(B \/ {x}) \ bool B by TARSKI:1; then A27: f.:(bool B) = bool(B \/ {x}) \ bool B by A12,RELAT_1:113; A28: bool B c= bool(B \/ {x}) by XBOOLE_1:7,ZFMISC_1:67; A29: (bool(B \/ {x}) \ bool B) \/ bool B = bool(B \/ {x}) \/ bool B by XBOOLE_1:39 .= bool(B \/ {x}) by A28,XBOOLE_1:12; A30: {x} c= A by A6,ZFMISC_1:31; B in bool A by A2,A7; then B \/ {x} c= A by A30,XBOOLE_1:8; hence thesis by A2,A14,A27,A29; end; hence thesis by A8; end; P[A] from Finite(A1,A4,A5); hence thesis by A2; end; end; theorem Th7: A is finite & (for X st X in A holds X is finite) iff union A is finite proof thus A is finite & (for X st X in A holds X is finite) implies union A is finite by Lm3; thus union A is finite implies A is finite & for X st X in A holds X is finite proof assume A1: union A is finite; A c= bool union A by ZFMISC_1:82; hence A is finite by A1; let X; assume X in A; then X c= union A by ZFMISC_1:74; hence thesis by A1; end; end; theorem Th8: dom f is finite implies rng f is finite proof assume dom f is finite; then f.:(dom f) is finite; hence thesis by RELAT_1:113; end; theorem Y c= rng f & f"Y is finite implies Y is finite proof assume Y c= rng f; then f.:(f"Y) = Y by FUNCT_1:77; hence thesis; end; registration let X, Y be finite set; cluster X \+\ Y -> finite; coherence; end; registration let X be non empty set; cluster finite non empty for Subset of X; existence proof take {the Element of X}; thus thesis; end; end; begin theorem Th10: for f being Function holds dom f is finite iff f is finite proof let f be Function; thus dom f is finite implies f is finite proof assume A1: dom f is finite; then A2: rng f is finite by Th8; f c= [:dom f, rng f:] by RELAT_1:7; hence thesis by A1,A2; end; pr1(dom f,rng f).:f = dom f by FUNCT_3:79; hence thesis; end; theorem for F being set st F is finite & F <> {} & F is c=-linear ex m being set st m in F & for C being set st C in F holds m c= C proof defpred P[set] means $1 <> {} implies ex m being set st m in $1 & for C being set st C in $1 holds m c= C; let F be set such that A1: F is finite and A2: F <> {} and A3: F is c=-linear; A4: P[{}]; A5: now let x,B be set such that A6: x in F and A7: B c= F and A8: P[B]; now per cases; suppose A9: not ex y being set st y in B & y c=x; assume B \/ {x} <> {}; take m = x; x in {x} by TARSKI:def 1; hence m in B \/ {x} by XBOOLE_0:def 3; let C be set; assume C in B \/ {x}; then A10: C in B or C in {x} by XBOOLE_0:def 3; then C,x are_c=-comparable by A3,A6,A7,ORDINAL1:def 8,TARSKI:def 1; then C c= x or x c= C by XBOOLE_0:def 9; hence m c= C by A9,A10,TARSKI:def 1; end; suppose ex y being set st y in B & y c=x; then consider y being set such that A11: y in B and A12: y c=x; assume B \/ {x} <> {}; consider m being set such that A13: m in B and A14: for C being set st C in B holds m c= C by A8,A11; m c= y by A11,A14; then A15: m c= x by A12,XBOOLE_1:1; take m; thus m in B \/ {x} by A13,XBOOLE_0:def 3; let C be set; assume C in B \/ {x}; then C in B or C in {x} by XBOOLE_0:def 3; hence m c= C by A14,A15,TARSKI:def 1; end; end; hence P[B \/ {x}]; end; P[F] from Finite(A1,A4,A5); hence thesis by A2; end; theorem for F being set st F is finite & F <> {} & F is c=-linear ex m being set st m in F & for C being set st C in F holds C c= m proof defpred P[set] means $1 <> {} implies ex m being set st m in $1 & for C being set st C in $1 holds C c= m; let F be set such that A1: F is finite and A2: F <> {} and A3: F is c=-linear; A4: P[{}]; A5: now let x,B be set such that A6: x in F and A7: B c= F and A8: P[B]; now per cases; suppose A9: not ex y being set st y in B & x c= y; assume B \/ {x} <> {}; take m = x; x in {x} by TARSKI:def 1; hence m in B \/ {x} by XBOOLE_0:def 3; let C be set; assume C in B \/ {x}; then A10: C in B or C in {x} by XBOOLE_0:def 3; then C,x are_c=-comparable by A3,A6,A7,ORDINAL1:def 8,TARSKI:def 1; then C c= x or x c= C by XBOOLE_0:def 9; hence C c= m by A9,A10,TARSKI:def 1; end; suppose ex y being set st y in B & x c= y; then consider y being set such that A11: y in B and A12: x c= y; assume B \/ {x} <> {}; consider m being set such that A13: m in B and A14: for C being set st C in B holds C c= m by A8,A11; y c= m by A11,A14; then A15: x c= m by A12,XBOOLE_1:1; take m; thus m in B \/ {x} by A13,XBOOLE_0:def 3; let C be set; assume C in B \/ {x}; then C in B or C in {x} by XBOOLE_0:def 3; hence C c= m by A14,A15,TARSKI:def 1; end; end; hence P[B \/ {x}]; end; P[F] from Finite(A1,A4,A5); hence thesis by A2; end; definition let R be Relation; attr R is finite-yielding means :Def2: for x st x in rng R holds x is finite; end; reserve a for set; deffunc F(set) = $1`1; theorem X is finite & X c= [:Y,Z:] implies ex A,B being set st A is finite & A c= Y & B is finite & B c= Z & X c= [:A,B:] proof deffunc G(set) = $1`2; assume that A1: X is finite and A2: X c= [:Y,Z:]; consider f being Function such that A3: dom f = X and A4: for a st a in X holds f.a = F(a) from FUNCT_1:sch 3; consider g being Function such that A5: dom g = X and A6: for a st a in X holds g.a = G(a) from FUNCT_1:sch 3; take A = rng f, B = rng g; thus A is finite by A1,A3,Th8; thus A c= Y proof let a; assume a in A; then consider x being set such that A7: x in dom f and A8: f.x = a by FUNCT_1:def 3; consider y,z being set such that A9: y in Y and z in Z and A10: x = [y,z] by A2,A3,A7,ZFMISC_1:def 2; f.x = x`1 by A3,A4,A7 .= y by A10,MCART_1:7; hence thesis by A8,A9; end; thus B is finite by A1,A5,Th8; thus B c= Z proof let a; assume a in B; then consider x being set such that A11: x in dom g and A12: g.x = a by FUNCT_1:def 3; consider y,z being set such that y in Y and A13: z in Z and A14: x = [y,z] by A2,A5,A11,ZFMISC_1:def 2; g.x = x`2 by A5,A6,A11 .= z by A14,MCART_1:7; hence thesis by A12,A13; end; thus X c= [:A,B:] proof let a; assume A15: a in X; then consider x,y being set such that x in Y and y in Z and A16: a=[x,y] by A2,ZFMISC_1:def 2; A17: g.a = a`2 by A6,A15 .= y by A16,MCART_1:7; f.a = a`1 by A4,A15 .= x by A16,MCART_1:7; then A18: x in A by A3,A15,FUNCT_1:def 3; y in B by A5,A15,A17,FUNCT_1:def 3; hence thesis by A16,A18,ZFMISC_1:87; end; end; theorem X is finite & X c= [:Y,Z:] implies ex A being set st A is finite & A c= Y & X c= [:A,Z:] proof assume that A1: X is finite and A2: X c= [:Y,Z:]; consider f being Function such that A3: dom f = X and A4: for a st a in X holds f.a = F(a) from FUNCT_1:sch 3; take A = rng f; thus A is finite by A1,A3,Th8; thus A c= Y proof let a; assume a in A; then consider x being set such that A5: x in dom f and A6: f.x = a by FUNCT_1:def 3; consider y,z being set such that A7: y in Y and z in Z and A8: x = [y,z] by A2,A3,A5,ZFMISC_1:def 2; f.x = x`1 by A3,A4,A5 .= y by A8,MCART_1:7; hence thesis by A6,A7; end; thus X c= [:A,Z:] proof let a; assume A9: a in X; then consider x,y being set such that x in Y and A10: y in Z and A11: a=[x,y] by A2,ZFMISC_1:def 2; f.a = a`1 by A4,A9 .= x by A11,MCART_1:7; then x in A by A3,A9,FUNCT_1:def 3; hence thesis by A10,A11,ZFMISC_1:87; end; end; registration cluster finite non empty for Function; existence proof {[{},{}]} is Function; hence thesis; end; end; registration let R be finite Relation; cluster dom R -> finite; coherence proof consider f being Function such that A1: dom f = R and A2: for x st x in R holds f.x = x`1 from FUNCT_1:sch 3; now let x; thus x in rng f implies ex y st [x,y] in R proof assume x in rng f; then consider a such that A3: a in dom f and A4: f.a = x by FUNCT_1:def 3; take a`2; A5: ex x,y st a = [x,y] by A1,A3,RELAT_1:def 1; x = a`1 by A1,A2,A3,A4; hence thesis by A1,A3,A5,MCART_1:8; end; given y such that A6: [x,y] in R; f.[x,y] = [x,y]`1 by A2,A6 .= x; hence x in rng f by A1,A6,FUNCT_1:3; end; then rng f = dom R by XTUPLE_0:def 12; hence thesis by A1,Th8; end; end; registration let f be Function, g be finite Function; cluster f*g -> finite; coherence proof dom(f*g) c= dom g by RELAT_1:25; hence thesis by Th10; end; end; registration let A be finite set, B be set; cluster -> finite for Function of A, B; coherence proof let f be Function of A, B; dom f is finite; hence thesis by Th10; end; end; registration let x,y be set; cluster x .--> y -> finite; coherence; end; registration let R be finite Relation; cluster rng R -> finite; coherence proof consider f being Function such that A1: dom f = R and A2: for x st x in R holds f.x = x`2 from FUNCT_1:sch 3; now let y; thus y in rng f implies ex x st [x,y] in R proof assume y in rng f; then consider a such that A3: a in dom f and A4: f.a = y by FUNCT_1:def 3; take a`1; A5: ex x,y st a = [x,y] by A1,A3,RELAT_1:def 1; y = a`2 by A1,A2,A3,A4; hence thesis by A1,A3,A5,MCART_1:8; end; given x such that A6: [x,y] in R; f.[x,y] = [x,y]`2 by A2,A6 .= y; hence y in rng f by A1,A6,FUNCT_1:3; end; then rng f = rng R by XTUPLE_0:def 13; hence thesis by A1,Th8; end; end; registration let f be finite Function, x be set; cluster f"x -> finite; coherence proof f"x c= dom f by RELAT_1:132; hence thesis; end; end; registration let f, g be finite Function; cluster f +* g -> finite; coherence proof dom (f+*g) = dom f \/ dom g by FUNCT_4:def 1; hence thesis by Th10; end; end; definition let F be set; attr F is centered means F <> {} & for G being set st G <> {} & G c= F & G is finite holds meet G <> {}; end; definition let f be Function; redefine attr f is finite-yielding means :Def4: for i being set st i in dom f holds f.i is finite; compatibility proof hereby assume A1: f is finite-yielding; let i be set such that i in dom f; per cases; suppose i in dom f; then f.i in rng f by FUNCT_1:3; hence f.i is finite by A1,Def2; end; suppose not i in dom f; hence f.i is finite by FUNCT_1:def 2; end; end; assume A2: for i being set st i in dom f holds f.i is finite; let i be set; assume i in rng f; then ex x st x in dom f & i = f.x by FUNCT_1:def 3; hence thesis by A2; end; end; definition let I be set; let IT be I-defined Function; redefine attr IT is finite-yielding means for i being set st i in I holds IT.i is finite; compatibility proof hereby assume A1: IT is finite-yielding; let i be set such that i in I; per cases; suppose i in dom IT; hence IT.i is finite by A1,Def4; end; suppose not i in dom IT; hence IT.i is finite by FUNCT_1:def 2; end; end; assume A2: for i being set st i in I holds IT.i is finite; let i be set; dom IT c= I; hence thesis by A2; end; end; theorem B is infinite implies not B in [:A,B:] proof assume that A1: B is infinite and A2: B in [:A,B:]; ex x st x in A & B = [x,{x}] by A2,ZFMISC_1:129; hence thesis by A1; end; registration let I be set, f be I-defined Function; cluster finite I-defined f-compatible for Function; existence proof take {}; thus thesis by FUNCT_1:104,RELAT_1:171; end; end; registration let X,Y be set; cluster finite X-defined Y-valued for Function; existence proof take {}; thus thesis by RELAT_1:171; end; end; registration let X,Y be non empty set; cluster X-defined Y-valued non empty finite for Function; existence proof set x = the Element of X, y = the Element of Y; take F = x .--> y; thus F is X-defined; thus F is Y-valued; thus thesis; end; end; registration let A be set, F be finite Relation; cluster A|`F -> finite; coherence proof A|`F c= F by RELAT_1:86; hence thesis; end; end; registration let A be set, F be finite Relation; cluster F|A -> finite; coherence proof F|A c= F by RELAT_1:59; hence thesis; end; end; registration let A be finite set, F be Function; cluster F|A -> finite; coherence proof dom(F|A) c= A by RELAT_1:58; hence thesis by Th10; end; end; registration let R be finite Relation; cluster field R -> finite; coherence; end; registration cluster trivial -> finite for set; coherence proof let S be set such that A1: S is trivial; per cases by A1,ZFMISC_1:131; suppose S is empty; hence thesis; end; suppose ex x being set st S = {x}; hence thesis; end; end; end; registration cluster infinite -> non trivial for set; coherence; end; registration let X be non trivial set; cluster finite non trivial for Subset of X; existence proof consider a1,a2 being set such that A1: a1 in X & a2 in X & a1 <> a2 by ZFMISC_1:def 10; reconsider A = {a1,a2} as Subset of X by A1,ZFMISC_1:32; take A; thus A is finite; a1 in A & a2 in A by TARSKI:def 2; hence thesis by A1,ZFMISC_1:def 10; end; end; registration let x,y,a,b be set; cluster (x,y) --> (a,b) -> finite; coherence; end; definition let A be set; attr A is finite-membered means :Def6: for B being set st B in A holds B is finite; end; registration cluster empty -> finite-membered for set; coherence proof let A be set; assume A1: A is empty; let B be set; thus thesis by A1; end; end; registration let A be finite-membered set; cluster -> finite for Element of A; coherence proof let B be Element of A; per cases; suppose A is empty; hence thesis by SUBSET_1:def 1; end; suppose A is not empty; hence thesis by Def6; end; end; end; registration cluster non empty finite finite-membered for set; existence proof take x = {{{}}}; thus x is non empty finite; let y be set; thus thesis by TARSKI:def 1; end; end; registration let X be finite set; cluster {X} -> finite-membered; coherence proof let x; thus thesis by TARSKI:def 1; end; cluster bool X -> finite-membered; coherence proof let x; thus thesis; end; let Y be finite set; cluster {X,Y} -> finite-membered; coherence proof let x; thus thesis by TARSKI:def 2; end; end; registration let X be finite-membered set; cluster -> finite-membered for Subset of X; coherence proof let S be Subset of X; let x be set; thus thesis; end; let Y be finite-membered set; cluster X \/ Y -> finite-membered; coherence proof let x be set; assume x in X\/Y; then x in X or x in Y by XBOOLE_0:def 3; hence thesis; end; end; registration let X be finite finite-membered set; cluster union X -> finite; coherence proof for x st x in X holds x is finite; hence thesis by Th7; end; end; registration cluster non empty finite-yielding for Function; existence proof take F = {{}} .--> {{}}; thus F is non empty; let x; assume x in {{{}}}; then x = {{}} by TARSKI:def 1; hence F.x is finite by FUNCOP_1:72; end; cluster empty -> finite-yielding for Relation; coherence proof let F be Relation; assume A1: F is empty; let x; thus thesis by A1; end; end; registration let F be finite-yielding Function, x be set; cluster F.x -> finite; coherence proof per cases; suppose x in dom F; hence thesis by Def4; end; suppose not x in dom F; hence thesis by FUNCT_1:def 2; end; end; end; registration let F be finite-yielding Relation; cluster rng F -> finite-membered; coherence proof let e be set; thus thesis by Def2; end; end; begin reserve X,Y,x for set; definition let IT be set; attr IT is cup-closed means :Def1: for X,Y being set st X in IT & Y in IT holds X \/ Y in IT; attr IT is cap-closed means for X,Y being set st X in IT & Y in IT holds X /\ Y in IT; attr IT is diff-closed means :Def3: for X,Y being set st X in IT & Y in IT holds X \ Y in IT; end; definition let IT be set; attr IT is preBoolean means :Def4: IT is cup-closed diff-closed; end; registration cluster preBoolean -> cup-closed diff-closed for set; coherence by Def4; cluster cup-closed diff-closed -> preBoolean for set; coherence by Def4; end; registration cluster non empty cup-closed cap-closed diff-closed for set; existence proof take {{}}; thus {{}} is non empty; thus {{}} is cup-closed proof let X,Y be set; assume that A1: X in {{}} and A2: Y in {{}}; X = {} by A1,TARSKI:def 1; hence thesis by A2; end; thus {{}} is cap-closed proof let X,Y be set; assume that A3: X in {{}} and Y in {{}}; X = {} by A3,TARSKI:def 1; hence thesis by TARSKI:def 1; end; thus {{}} is diff-closed proof let X,Y be set; assume that A4: X in {{}} and Y in {{}}; X = {} by A4,TARSKI:def 1; hence thesis by TARSKI:def 1; end; end; end; theorem Th1: for A being set holds A is preBoolean iff for X,Y being set st X in A & Y in A holds X \/ Y in A & X \ Y in A proof let A be set; thus A is preBoolean implies for X,Y being set st X in A & Y in A holds X \/ Y in A & X \ Y in A by Def1,Def3; assume A1: for X,Y being set st X in A & Y in A holds X \/ Y in A & X \ Y in A; A2: A is diff-closed proof let X,Y be set; assume X in A & Y in A; hence thesis by A1; end; A is cup-closed proof let X,Y be set; assume X in A & Y in A; hence thesis by A1; end; hence thesis by A2; end; reserve A for non empty preBoolean set; definition let A; let X,Y be Element of A; redefine func X \/ Y -> Element of A; correctness by Th1; redefine func X \ Y -> Element of A; correctness by Th1; end; theorem Th2: X is Element of A & Y is Element of A implies X /\ Y is Element of A proof assume X is Element of A & Y is Element of A; then reconsider X,Y as Element of A; X /\ Y = X \ (X \ Y) by XBOOLE_1:48; hence thesis; end; theorem Th3: X is Element of A & Y is Element of A implies X \+\ Y is Element of A proof assume X is Element of A & Y is Element of A; then reconsider X,Y as Element of A; X \+\ Y = (X \ Y) \/ (Y \ X); hence thesis; end; theorem for A being non empty set st for X,Y being Element of A holds X \+\ Y in A & X \ Y in A holds A is preBoolean proof let A be non empty set such that A1: for X,Y being Element of A holds X \+\ Y in A & X \ Y in A; now let X,Y be set; assume that A2: X in A and A3: Y in A; reconsider Z = Y \ X as Element of A by A1,A2,A3; X \/ Y = X \+\ Z by XBOOLE_1:98; hence X \/ Y in A by A1,A2; thus X \ Y in A by A1,A2,A3; end; hence thesis by Th1; end; theorem for A being non empty set st for X,Y being Element of A holds X \+\ Y in A & X /\ Y in A holds A is preBoolean proof let A be non empty set such that A1: for X,Y being Element of A holds X \+\ Y in A & X /\ Y in A; now let X,Y be set; assume that A2: X in A and A3: Y in A; reconsider Z1 = X \+\ Y, Z2 = X /\ Y as Element of A by A1,A2,A3; X \/ Y = Z1 \+\ Z2 by XBOOLE_1:94; hence X \/ Y in A by A1; X \ Y = X \+\ Z2 by XBOOLE_1:100; hence X \ Y in A by A1,A2; end; hence thesis by Th1; end; theorem for A being non empty set st for X,Y being Element of A holds X \+\ Y in A & X \/ Y in A holds A is preBoolean proof let A be non empty set such that A1: for X,Y being Element of A holds X \+\ Y in A & X \/ Y in A; now let X,Y be set; assume that A2: X in A and A3: Y in A; thus X \/ Y in A by A1,A2,A3; reconsider Z1 = X \+\ Y, Z2 = X \/ Y as Element of A by A1,A2,A3; X /\ Y = Z1 \+\ Z2 by XBOOLE_1:95; then reconsider Z = X /\ Y as Element of A by A1; X \ Y = X \+\ Z by XBOOLE_1:100; hence X \ Y in A by A1,A2; end; hence thesis by Th1; end; definition let A; let X,Y be Element of A; redefine func X /\ Y -> Element of A; coherence by Th2; redefine func X \+\ Y -> Element of A; coherence by Th3; end; theorem Th7: {} in A proof set x = the Element of A; x \ x = {} by XBOOLE_1:37; hence thesis; end; theorem Th8: for A being set holds bool A is preBoolean proof let A be set; now let X,Y be set; assume X in bool A & Y in bool A; then reconsider X9=X,Y9=Y as Subset of A; X9 \/ Y9 in bool A & X9 \ Y9 in bool A; hence X \/ Y in bool A & X \ Y in bool A; end; hence thesis by Th1; end; registration let A be set; cluster bool A -> preBoolean; coherence by Th8; end; theorem for A,B being non empty preBoolean set holds A /\ B is non empty preBoolean proof let A,B be non empty preBoolean set; {} in A & {} in B by Th7; then reconsider C = A /\ B as non empty set by XBOOLE_0:def 4; now let X,Y be set; assume A1: X in C & Y in C; then A2: X in B & Y in B by XBOOLE_0:def 4; then A3: X \/ Y in B by Th1; A4: X \ Y in B by A2,Th1; A5: X in A & Y in A by A1,XBOOLE_0:def 4; then X \/ Y in A by Th1; hence X \/ Y in C by A3,XBOOLE_0:def 4; X \ Y in A by A5,Th1; hence X \ Y in C by A4,XBOOLE_0:def 4; end; hence thesis by Th1; end; definition let A be set; func Fin A -> preBoolean set means :Def5: for X being set holds X in it iff X c= A & X is finite; existence proof defpred P[set] means ex y being set st y=$1 & y c= A & y is finite; consider P being set such that A1: for x holds x in P iff x in bool A & P[x] from XBOOLE_0:sch 1; {} c= A by XBOOLE_1:2; then reconsider Q=P as non empty set by A1; for X,Y being set st X in Q & Y in Q holds X \/ Y in Q & X \ Y in Q proof let X,Y be set; assume that A2: X in Q and A3: Y in Q; consider Z1 being set such that A4: Z1=X and A5: Z1 c=A and A6: Z1 is finite by A1,A2; consider Z2 being set such that A7: Z2=Y and A8: Z2 c= A and A9: Z2 is finite by A1,A3; A10: Z1 \ Z2 c= A by A5,XBOOLE_1:1; Z1 \/ Z2 c= A by A5,A8,XBOOLE_1:8; hence thesis by A1,A4,A6,A7,A9,A10; end; then reconsider R=Q as non empty preBoolean set by Th1; for X being set holds X in R iff X c= A & X is finite proof let X be set; thus X in R implies X c= A & X is finite proof assume X in R; then ex Y being set st Y=X & Y c= A & Y is finite by A1; hence thesis; end; thus thesis by A1; end; hence thesis; end; uniqueness proof let P,Q be preBoolean set; assume that A11: for X being set holds X in P iff X c= A & X is finite and A12: for X being set holds X in Q iff X c= A & X is finite; for x being set holds x in P iff x in Q proof let x; thus x in P implies x in Q proof assume x in P; then x c= A & x is finite by A11; hence thesis by A12; end; thus x in Q implies x in P proof assume x in Q; then x c= A & x is finite by A12; hence thesis by A11; end; end; hence thesis by TARSKI:1; end; end; registration let A be set; cluster Fin A -> non empty; coherence proof {} c= A by XBOOLE_1:2; hence thesis by Def5; end; end; registration let A be set; cluster -> finite for Element of Fin A; coherence by Def5; end; theorem Th10: for A, B being set st A c= B holds Fin A c= Fin B proof let A,B be set; assume A1: A c= B; now let X; assume A2: X in Fin A; then X c= A by Def5; then X c= B by A1,XBOOLE_1:1; hence X in Fin B by A2,Def5; end; hence thesis by TARSKI:def 3; end; theorem for A, B being set holds Fin (A /\ B) = Fin A /\ Fin B proof let A, B be set; Fin (A /\ B) c= Fin A & Fin (A /\ B) c= Fin B by Th10,XBOOLE_1:17; hence Fin (A /\ B) c= Fin A /\ Fin B by XBOOLE_1:19; now let X; assume A1: X in Fin A /\ Fin B; then X in Fin B by XBOOLE_0:def 4; then A2: X c= B by Def5; A3: X in Fin A by A1,XBOOLE_0:def 4; then X c= A by Def5; then X c= A /\ B by A2,XBOOLE_1:19; hence X in Fin (A /\ B) by A3,Def5; end; hence thesis by TARSKI:def 3; end; theorem for A, B being set holds Fin A \/ Fin B c= Fin (A \/ B) proof let A, B be set; Fin A c= Fin (A \/ B) & Fin B c= Fin(A \/ B) by Th10,XBOOLE_1:7; hence thesis by XBOOLE_1:8; end; theorem Th13: for A being set holds Fin A c= bool A proof let A be set; let x; assume x in Fin A; then x c= A by Def5; hence thesis; end; theorem Th14: for A being set st A is finite holds Fin A = bool A proof let A be set; assume A1: A is finite; A2: bool A c= Fin A proof let x; assume x in bool A; hence thesis by A1,Def5; end; Fin A c= bool A by Th13; hence thesis by A2,XBOOLE_0:def 10; end; theorem Fin {} = { {} } by Th14,ZFMISC_1:1; definition let A be set; mode Finite_Subset of A is Element of Fin A; end; theorem for A being set, X being Finite_Subset of A holds X is finite; theorem for A being set, X being Finite_Subset of A holds X is Subset of A by Def5; theorem for A being set, X being Subset of A st A is finite holds X is Finite_Subset of A by Def5; begin reserve X,Y for set, x,x1,x2,y,y1,y2,z for set, f,g,h for Function; Lm1: (ex X st X <> {} & X in Y) iff union Y <> {} proof thus (ex X st X <> {} & X in Y) implies union Y <> {} proof given X such that A1: X <> {} and A2: X in Y; set x = the Element of X; x in X by A1; hence thesis by A2,TARSKI:def 4; end; set x = the Element of union Y; assume union Y <> {}; then consider X such that A3: x in X and A4: X in Y by TARSKI:def 4; take X; thus thesis by A3,A4; end; reserve M for non empty set; definition let M; assume A1: not {} in M; mode Choice_Function of M -> Function of M, union M means :Def1: for X st X in M holds it.X in X; existence proof deffunc FF(set)=$1`2; set x = the Element of M; deffunc F(set)=[:{$1},$1:]; consider f such that A2: dom f = M and A3: for X st X in M holds f.X = F(X) from FUNCT_1:sch 3; A4: x in M; then reconsider N = rng f as non empty set by A2,FUNCT_1:3; A5: now let X,Y; assume that A6: X in N and A7: Y in N and A8: X <> Y; consider y such that A9: y in dom f and A10: f.y = Y by A7,FUNCT_1:def 3; A11: Y = [:{y},y:] by A2,A3,A9,A10; set z = the Element of X /\ Y; assume X meets Y; then A12: X /\ Y <> {} by XBOOLE_0:def 7; consider x such that A13: x in dom f and A14: f.x = X by A6,FUNCT_1:def 3; X = [:{x},x:] by A2,A3,A13,A14; then consider x1,x2 such that z = [x1,x2] and A15: x1 in {x} /\ {y} and x2 in x /\ y by A11,A12,ZFMISC_1:85; x1 in {x} by A15,XBOOLE_0:def 4; then A16: x1 = x by TARSKI:def 1; x1 in{y} by A15,XBOOLE_0:def 4; hence contradiction by A8,A14,A10,A16,TARSKI:def 1; end; now let X; assume X in N; then consider y such that A17: y in dom f and A18: f.y = X by FUNCT_1:def 3; A19: y <> {} by A1,A2,A17; X = [:{y},y:] by A2,A3,A17,A18; hence X <> {} by A19; end; then consider Choice being set such that A20: for X st X in N ex x st Choice /\ X = {x} by A5,WELLORD2:18; defpred P[set,set] means $2 in $1 /\ Choice; A21: for X st X in N ex y st P[X,y] proof let X; assume X in N; then consider x such that A22: Choice /\ X = {x} by A20; take x; thus thesis by A22,TARSKI:def 1; end; A23: for X,y1,y2 st X in N & P[X,y1] & P[X,y2] holds y1 = y2 proof let X,y1,y2; assume that A24: X in N and A25: y1 in X /\ Choice and A26: y2 in X /\ Choice; consider x such that A27: {x} = Choice /\ X by A20,A24; x = y1 by A25,A27,TARSKI:def 1; hence thesis by A26,A27,TARSKI:def 1; end; consider g such that A28: dom g = N and A29: for X st X in N holds P[X,g.X] from FUNCT_1:sch 2 (A23,A21); A30: rng g c= union N proof let x; assume x in rng g; then consider y such that A31: y in dom g and A32: g.y = x by FUNCT_1:def 3; x in y /\ Choice by A28,A29,A31,A32; then x in y by XBOOLE_0:def 4; hence thesis by A28,A31,TARSKI:def 4; end; f.x in rng f by A2,FUNCT_1:def 3; then consider x1 such that A33: x1 in N; consider x2 such that A34: x2 in dom f and A35: f.x2 = x1 by A33,FUNCT_1:def 3; A36: x2 <> {} by A1,A2,A34; reconsider f as Function of M,N by A2,FUNCT_2:def 1,RELSET_1:4; consider h such that A37: dom h = union N and A38: for x st x in union N holds h.x = FF(x) from FUNCT_1:sch 3; A39: rng h c= union M proof let x; assume x in rng h; then consider y such that A40: y in dom h and A41: h.y = x by FUNCT_1:def 3; consider Y such that A42: y in Y and A43: Y in N by A37,A40,TARSKI:def 4; consider z such that A44: z in dom f and A45: f.z = Y by A43,FUNCT_1:def 3; A46: Y = [:{z},z:] by A3,A44,A45; then consider x1,x2 such that A47: y = [x1,x2] by A42,RELAT_1:def 1; A48: x2 in z by A42,A46,A47,ZFMISC_1:87; x = [x1,x2]`2 by A37,A38,A40,A41,A47; then x in z by A48; hence thesis by A44,TARSKI:def 4; end; x1 = [:{x2},x2:] by A2,A3,A34,A35; then A49: union N <> {} by A33,A36,Lm1; then reconsider g as Function of N, union N by A28,A30,FUNCT_2:def 1 ,RELSET_1:4; union M <> {} by A1,A4,Lm1; then reconsider h as Function of union N, union M by A37,A39,FUNCT_2:def 1 ,RELSET_1:4; A50: dom(g * f) = M by A49,FUNCT_2:def 1; reconsider F = h * (g * f) as Function of M, union M by A49; take F; let X; assume A51: X in M; then A52: f.X = [:{X},X:] by A3; set fX = f.X; A53: f.X in N by A2,A51,FUNCT_1:def 3; then g.(fX) in rng g by A28,FUNCT_1:def 3; then A54: h.(g.fX) = (g.fX)`2 by A38; A55: g.(fX) in fX /\ Choice by A29,A53; then consider x1,x2 such that A56: [x1,x2] = g.(fX) by A52,RELAT_1:def 1; g.(fX) in fX by A55,XBOOLE_0:def 4; then x2 in X by A52,A56,ZFMISC_1:87; then A57: h.(g.fX) in X by A56,A54,MCART_1:7; (g * f).X = g.fX by A2,A51,FUNCT_1:13; hence thesis by A50,A51,A57,FUNCT_1:13; end; end; reserve D for non empty set; definition let D be set; func BOOL D -> set equals bool D \ {{}}; coherence; end; registration let D; cluster BOOL D -> non empty; coherence proof A1: not D in {{}} by TARSKI:def 1; D in bool D by ZFMISC_1:def 1; hence thesis by A1,XBOOLE_0:def 5; end; end; theorem not {} in BOOL D proof assume not thesis; then not {} in {{}} by XBOOLE_0:def 5; hence thesis by TARSKI:def 1; end; theorem D c= X iff D in BOOL X proof thus D c= X implies D in BOOL X proof A1: not D in {{}} by TARSKI:def 1; assume D c= X; hence thesis by A1,XBOOLE_0:def 5; end; assume D in BOOL X; hence thesis; end; reserve P for Relation; definition let X; mode Order of X is total reflexive antisymmetric transitive Relation of X; end; reserve O for Order of X; Lm2: for R being total Relation of X holds field R = X proof let R be total Relation of X; thus field R = X \/ rng R by PARTFUN1:def 2 .= X by XBOOLE_1:12; end; theorem Th3: x in X implies [x,x] in O proof field O = X by Lm2; then O is_reflexive_in X by RELAT_2:def 9; hence thesis by RELAT_2:def 1; end; theorem x in X & y in X & [x,y] in O & [y,x] in O implies x = y proof field O = X by Lm2; then O is_antisymmetric_in X by RELAT_2:def 12; hence thesis by RELAT_2:def 4; end; theorem x in X & y in X & z in X & [x,y] in O & [y,z] in O implies [x,z] in O proof field O = X by Lm2; then O is_transitive_in X by RELAT_2:def 16; hence thesis by RELAT_2:def 8; end; theorem (ex X st X <> {} & X in Y) iff union Y <> {} by Lm1; theorem P is_strongly_connected_in X iff P is_reflexive_in X & P is_connected_in X proof thus P is_strongly_connected_in X implies P is_reflexive_in X & P is_connected_in X proof assume A1: P is_strongly_connected_in X; thus P is_reflexive_in X proof let x; assume x in X; hence thesis by A1,RELAT_2:def 7; end; let x,y; assume that A2: x in X and A3: y in X; thus thesis by A1,A2,A3,RELAT_2:def 7; end; assume that A4: P is_reflexive_in X and A5: P is_connected_in X; let x,y; assume that A6: x in X and A7: y in X; x = y implies thesis by A4,A6,RELAT_2:def 1; hence thesis by A5,A6,A7,RELAT_2:def 6; end; theorem Th8: P is_reflexive_in X & Y c= X implies P is_reflexive_in Y proof assume that A1: P is_reflexive_in X and A2: Y c= X; let x; assume x in Y; hence thesis by A1,A2,RELAT_2:def 1; end; theorem Th9: P is_antisymmetric_in X & Y c= X implies P is_antisymmetric_in Y proof assume that A1: P is_antisymmetric_in X and A2: Y c= X; let x,y; assume that A3: x in Y and A4: y in Y; thus thesis by A1,A2,A3,A4,RELAT_2:def 4; end; theorem Th10: P is_transitive_in X & Y c= X implies P is_transitive_in Y proof assume that A1: P is_transitive_in X and A2: Y c= X; let x,y,z; assume that A3: x in Y and A4: y in Y and A5: z in Y; thus thesis by A1,A2,A3,A4,A5,RELAT_2:def 8; end; theorem P is_strongly_connected_in X & Y c= X implies P is_strongly_connected_in Y proof assume that A1: P is_strongly_connected_in X and A2: Y c= X; let x,y; assume that A3: x in Y and A4: y in Y; thus thesis by A1,A2,A3,A4,RELAT_2:def 7; end; theorem for R being total Relation of X holds field R = X by Lm2; theorem Th13: for A being set, R being Relation of A st R is_reflexive_in A holds dom R = A & field R = A proof let A be set, R be Relation of A such that A1: R is_reflexive_in A; A2: A c= dom R proof let x; assume x in A; then [x,x] in R by A1,RELAT_2:def 1; hence thesis by XTUPLE_0:def 12; end; hence dom R = A by XBOOLE_0:def 10; thus field R = A \/ rng R by A2,XBOOLE_0:def 10 .= A by XBOOLE_1:12; end; begin reserve R,P for Relation, X,X1,X2,Y,Z,x,y,z,u for set, g,h for Function, O for Order of X, D for non empty set, d,d1,d2 for Element of D, A1,A2,B for Ordinal, L,L1,L2 for T-Sequence; theorem Th14: dom O = X & rng O = X proof thus dom O = X proof thus dom O c= X; let x; assume x in X; then [x,x] in O by Th3; hence thesis by XTUPLE_0:def 12; end; thus rng O c= X; let x; assume x in X; then [x,x] in O by Th3; hence thesis by XTUPLE_0:def 13; end; theorem field O = X proof thus X = X \/ X .= dom O \/ X by Th14 .= field O by Th14; end; definition let R; attr R is being_quasi-order means R is reflexive transitive; attr R is being_partial-order means :Def4: R is reflexive transitive antisymmetric; attr R is being_linear-order means :Def5: R is reflexive transitive antisymmetric connected; end; theorem R is being_quasi-order implies R~ is being_quasi-order proof assume that A1: R is reflexive and A2: R is transitive; thus R~ is reflexive & R~ is transitive by A1,A2; end; theorem R is being_partial-order implies R~ is being_partial-order proof assume that A1: R is reflexive and A2: R is transitive and A3: R is antisymmetric; thus R~ is reflexive & R~ is transitive & R~ is antisymmetric by A1,A2,A3; end; Lm3: R is connected implies R~ is connected proof assume A1: x in field R & y in field R & x <> y implies [x,y] in R or [y,x] in R; let x,y; assume that A2: x in field(R~) and A3: y in field(R~) and A4: x <> y; field R = field(R~) by RELAT_1:21; then [x,y] in R or [y,x] in R by A1,A2,A3,A4; hence thesis by RELAT_1:def 7; end; theorem Th18: R is being_linear-order implies R~ is being_linear-order proof assume that A1: R is reflexive and A2: R is transitive and A3: R is antisymmetric and A4: R is connected; thus R~ is reflexive & R~ is transitive & R~ is antisymmetric & R~ is connected by A1,A2,A3,A4,Lm3; end; theorem R is well-ordering implies R is being_quasi-order & R is being_partial-order & R is being_linear-order proof assume that A1: R is reflexive and A2: R is transitive and A3: R is antisymmetric and A4: R is connected and R is well_founded; thus R is reflexive & R is transitive & R is reflexive & R is transitive & R is antisymmetric & R is reflexive & R is transitive & R is antisymmetric & R is connected by A1,A2,A3,A4; end; theorem R is being_linear-order implies R is being_quasi-order & R is being_partial-order proof assume that A1: R is reflexive and A2: R is transitive and A3: R is antisymmetric and R is connected; thus R is reflexive & R is transitive & R is reflexive & R is transitive & R is antisymmetric by A1,A2,A3; end; theorem Th21: R is being_partial-order implies R is being_quasi-order proof assume that A1: R is reflexive and A2: R is transitive and R is antisymmetric; thus R is reflexive & R is transitive by A1,A2; end; theorem O is being_partial-order by Def4; theorem O is being_quasi-order proof O is being_partial-order by Def4; hence thesis by Th21; end; theorem O is connected implies O is being_linear-order by Def5; Lm4: R c= [:field R,field R:] proof let y,z; assume A1: [y,z] in R; then A2: z in field R by RELAT_1:15; y in field R by A1,RELAT_1:15; hence thesis by A2,ZFMISC_1:87; end; Lm5: R is reflexive & X c= field R implies field(R|_2 X) = X proof assume that A1: x in field R implies [x,x] in R and A2: X c= field R; thus field(R|_2 X) c= X proof let y; thus thesis by WELLORD1:12; end; let y; assume A3: y in X; then A4: [y,y] in [:X,X:] by ZFMISC_1:87; [y,y] in R by A1,A2,A3; then [y,y] in R|_2 X by A4,XBOOLE_0:def 4; hence thesis by RELAT_1:15; end; theorem R is being_quasi-order implies R|_2 X is being_quasi-order proof assume that A1: R is reflexive and A2: R is transitive; thus R|_2 X is reflexive & R|_2 X is transitive by A1,A2,WELLORD1:15,17; end; theorem R is being_partial-order implies R|_2 X is being_partial-order proof assume that A1: R is reflexive and A2: R is transitive and A3: R is antisymmetric; thus R|_2 X is reflexive & R|_2 X is transitive & R|_2 X is antisymmetric by A1,A2,A3,WELLORD1:15,17; end; theorem R is being_linear-order implies R|_2 X is being_linear-order proof assume that A1: R is reflexive and A2: R is transitive and A3: R is antisymmetric and A4: R is connected; thus R|_2 X is reflexive & R|_2 X is transitive & R|_2 X is antisymmetric & R|_2 X is connected by A1,A2,A3,A4,WELLORD1:15,16,17; end; registration let R be empty Relation; cluster field R -> empty; coherence; end; registration cluster empty -> being_quasi-order being_partial-order being_linear-order well-ordering for Relation; coherence proof let R be Relation such that A1: R is empty; thus A2: R is reflexive proof let x; assume x in field R; hence thesis by A1; end; thus A3: R is transitive proof let x,y,z such that x in field R; thus thesis by A1; end; hence R is reflexive & R is transitive by A2; thus A4: R is antisymmetric proof let x,y such that x in field R; thus thesis by A1; end; hence R is reflexive & R is transitive & R is antisymmetric by A2,A3; thus R is connected proof let x,y such that x in field R; thus thesis by A1; end; hence R is reflexive & R is transitive & R is antisymmetric & R is connected by A2,A3,A4; let Y; assume that A5: Y c= field R and A6: Y <> {}; thus thesis by A5,A6,A1; end; end; registration let X; cluster id X -> being_quasi-order being_partial-order; coherence proof thus id X is reflexive & id X is transitive & id X is reflexive & id X is transitive & id X is antisymmetric; end; end; definition let R,X; pred R quasi_orders X means :Def6: R is_reflexive_in X & R is_transitive_in X; pred R partially_orders X means :Def7: R is_reflexive_in X & R is_transitive_in X & R is_antisymmetric_in X; pred R linearly_orders X means R is_reflexive_in X & R is_transitive_in X & R is_antisymmetric_in X & R is_connected_in X; end; theorem Th28: R well_orders X implies R quasi_orders X & R partially_orders X & R linearly_orders X proof assume that A1: R is_reflexive_in X and A2: R is_transitive_in X and A3: R is_antisymmetric_in X and A4: R is_connected_in X and R is_well_founded_in X; thus R is_reflexive_in X & R is_transitive_in X & R is_reflexive_in X & R is_transitive_in X & R is_antisymmetric_in X & R is_reflexive_in X & R is_transitive_in X & R is_antisymmetric_in X & R is_connected_in X by A1,A2,A3 ,A4; end; theorem Th29: R linearly_orders X implies R quasi_orders X & R partially_orders X proof assume that A1: R is_reflexive_in X and A2: R is_transitive_in X and A3: R is_antisymmetric_in X and R is_connected_in X; thus R is_reflexive_in X & R is_transitive_in X & R is_reflexive_in X & R is_transitive_in X & R is_antisymmetric_in X by A1,A2,A3; end; theorem R partially_orders X implies R quasi_orders X proof assume that A1: R is_reflexive_in X and A2: R is_transitive_in X and R is_antisymmetric_in X; thus R is_reflexive_in X & R is_transitive_in X by A1,A2; end; theorem Th31: R is being_quasi-order implies R quasi_orders field R proof assume that A1: R is_reflexive_in field R and A2: R is_transitive_in field R; thus R is_reflexive_in field R & R is_transitive_in field R by A1,A2; end; theorem R quasi_orders Y & X c= Y implies R quasi_orders X proof assume that A1: R is_reflexive_in Y and A2: R is_transitive_in Y and A3: X c= Y; thus R is_reflexive_in X & R is_transitive_in X by A1,A2,A3,Th8,Th10; end; Lm6: R is_reflexive_in X implies R|_2 X is reflexive proof assume A1: x in X implies [x,x] in R; let x; assume A2: x in field(R|_2 X); then x in X by WELLORD1:12; then A3: [x,x] in [:X,X:] by ZFMISC_1:87; [x,x] in R by A1,A2,WELLORD1:12; hence thesis by A3,XBOOLE_0:def 4; end; Lm7: R is_transitive_in X implies R|_2 X is transitive proof assume A1: x in X & y in X & z in X & [x,y] in R & [y,z] in R implies [x,z] in R; let x,y,z; assume that A2: x in field(R|_2 X) and A3: y in field(R|_2 X) and A4: z in field(R|_2 X); A5: z in X by A4,WELLORD1:12; A6: x in X by A2,WELLORD1:12; then A7: [x,z] in [:X,X:] by A5,ZFMISC_1:87; assume that A8: [x,y] in R|_2 X and A9: [y,z] in R|_2 X; A10: [x,y] in R by A8,XBOOLE_0:def 4; A11: [y,z] in R by A9,XBOOLE_0:def 4; y in X by A3,WELLORD1:12; then [x,z] in R by A1,A6,A5,A10,A11; hence thesis by A7,XBOOLE_0:def 4; end; Lm8: R is_antisymmetric_in X implies R|_2 X is antisymmetric proof assume A1: x in X & y in X & [x,y] in R & [y,x] in R implies x = y; let x,y; assume that A2: x in field(R|_2 X) and A3: y in field(R|_2 X); A4: y in X by A3,WELLORD1:12; assume that A5: [x,y] in R|_2 X and A6: [y,x] in R|_2 X; A7: [x,y] in R by A5,XBOOLE_0:def 4; A8: [y,x] in R by A6,XBOOLE_0:def 4; x in X by A2,WELLORD1:12; hence thesis by A1,A4,A7,A8; end; Lm9: R is_connected_in X implies R|_2 X is connected proof assume A1: x in X & y in X & x <> y implies [x,y] in R or [y,x] in R; let x,y; assume that A2: x in field(R|_2 X) and A3: y in field(R|_2 X) and A4: x <> y; A5: y in X by A3,WELLORD1:12; A6: x in X by A2,WELLORD1:12; then A7: [x,y] in [:X,X:] by A5,ZFMISC_1:87; A8: [y,x] in [:X,X:] by A6,A5,ZFMISC_1:87; [x,y] in R or [y,x] in R by A1,A4,A6,A5; hence thesis by A7,A8,XBOOLE_0:def 4; end; theorem R quasi_orders X implies R|_2 X is being_quasi-order proof assume that A1: R is_reflexive_in X and A2: R is_transitive_in X; thus R|_2 X is reflexive & R|_2 X is transitive by A1,A2,Lm6,Lm7; end; theorem Th34: R is being_partial-order implies R partially_orders field R proof assume that A1: R is_reflexive_in field R and A2: R is_transitive_in field R and A3: R is_antisymmetric_in field R; thus R is_reflexive_in field R & R is_transitive_in field R & R is_antisymmetric_in field R by A1,A2,A3; end; theorem R partially_orders Y & X c= Y implies R partially_orders X proof assume that A1: R is_reflexive_in Y and A2: R is_transitive_in Y and A3: R is_antisymmetric_in Y and A4: X c= Y; thus R is_reflexive_in X & R is_transitive_in X & R is_antisymmetric_in X by A1,A2,A3,A4,Th8,Th9,Th10; end; theorem R partially_orders X implies R|_2 X is being_partial-order proof assume that A1: R is_reflexive_in X and A2: R is_transitive_in X and A3: R is_antisymmetric_in X; thus R|_2 X is reflexive & R|_2 X is transitive & R|_2 X is antisymmetric by A1,A2,A3,Lm6,Lm7,Lm8; end; Lm10: R is_connected_in X & Y c= X implies R is_connected_in Y proof assume that A1: R is_connected_in X and A2: Y c= X; let x,y; assume that A3: x in Y and A4: y in Y; thus thesis by A1,A2,A3,A4,RELAT_2:def 6; end; theorem R is being_linear-order implies R linearly_orders field R proof assume that A1: R is_reflexive_in field R and A2: R is_transitive_in field R and A3: R is_antisymmetric_in field R and A4: R is_connected_in field R; thus R is_reflexive_in field R & R is_transitive_in field R & R is_antisymmetric_in field R & R is_connected_in field R by A1,A2,A3,A4; end; theorem R linearly_orders Y & X c= Y implies R linearly_orders X proof assume that A1: R is_reflexive_in Y and A2: R is_transitive_in Y and A3: R is_antisymmetric_in Y and A4: R is_connected_in Y and A5: X c= Y; thus R is_reflexive_in X & R is_transitive_in X & R is_antisymmetric_in X & R is_connected_in X by A1,A2,A3,A4,A5,Lm10,Th8,Th9,Th10; end; theorem R linearly_orders X implies R|_2 X is being_linear-order proof assume that A1: R is_reflexive_in X and A2: R is_transitive_in X and A3: R is_antisymmetric_in X and A4: R is_connected_in X; thus R|_2 X is reflexive & R|_2 X is transitive & R|_2 X is antisymmetric & R|_2 X is connected by A1,A2,A3,A4,Lm6,Lm7,Lm8,Lm9; end; Lm11: R is_reflexive_in X implies R~ is_reflexive_in X proof assume A1: x in X implies [x,x] in R; let x; assume x in X; then [x,x] in R by A1; hence thesis by RELAT_1:def 7; end; Lm12: R is_transitive_in X implies R~ is_transitive_in X proof assume A1: x in X & y in X & z in X & [x,y] in R & [y,z] in R implies [x,z] in R; let x,y,z; assume that A2: x in X and A3: y in X and A4: z in X and A5: [x,y] in R~ and A6: [y,z] in R~; A7: [z,y] in R by A6,RELAT_1:def 7; [y,x] in R by A5,RELAT_1:def 7; then [z,x] in R by A1,A2,A3,A4,A7; hence thesis by RELAT_1:def 7; end; Lm13: R is_antisymmetric_in X implies R~ is_antisymmetric_in X proof assume A1: x in X & y in X & [x,y] in R & [y,x] in R implies x = y; let x,y; assume that A2: x in X and A3: y in X and A4: [x,y] in R~ and A5: [y,x] in R~; A6: [y,x] in R by A4,RELAT_1:def 7; [x,y] in R by A5,RELAT_1:def 7; hence thesis by A1,A2,A3,A6; end; Lm14: R is_connected_in X implies R~ is_connected_in X proof assume A1: x in X & y in X & x <> y implies [x,y] in R or [y,x] in R; let x,y; assume that A2: x in X and A3: y in X and A4: x <> y; [x,y] in R or [y,x] in R by A1,A2,A3,A4; hence thesis by RELAT_1:def 7; end; theorem R quasi_orders X implies R~ quasi_orders X proof assume that A1: R is_reflexive_in X and A2: R is_transitive_in X; thus R~ is_reflexive_in X & R~ is_transitive_in X by A1,A2,Lm11,Lm12; end; theorem Th41: R partially_orders X implies R~ partially_orders X proof assume that A1: R is_reflexive_in X and A2: R is_transitive_in X and A3: R is_antisymmetric_in X; thus R~ is_reflexive_in X & R~ is_transitive_in X & R~ is_antisymmetric_in X by A1,A2,A3,Lm11,Lm12,Lm13; end; theorem R linearly_orders X implies R~ linearly_orders X proof assume that A1: R is_reflexive_in X and A2: R is_transitive_in X and A3: R is_antisymmetric_in X and A4: R is_connected_in X; thus R~ is_reflexive_in X & R~ is_transitive_in X & R~ is_antisymmetric_in X & R~ is_connected_in X by A1,A2,A3,A4,Lm11,Lm12,Lm13,Lm14; end; theorem O quasi_orders X proof A1: field O = X by Lm2; then A2: O is_transitive_in X by RELAT_2:def 16; O is_reflexive_in X by A1,RELAT_2:def 9; hence thesis by A2,Def6; end; theorem O partially_orders X proof A1: field O = X by Lm2; then A2: O is_antisymmetric_in X by RELAT_2:def 12; A3: O is_transitive_in X by A1,RELAT_2:def 16; O is_reflexive_in X by A1,RELAT_2:def 9; hence thesis by A2,A3,Def7; end; theorem Th45: R partially_orders X implies R |_2 X is Order of X proof set S = R |_2 X; A1: field S c= X by WELLORD1:13; rng S c= field S by XBOOLE_1:7; then A2: rng S c= X by A1,XBOOLE_1:1; dom S c= field S by XBOOLE_1:7; then dom S c= X by A1,XBOOLE_1:1; then reconsider S as Relation of X by A2,RELSET_1:4; assume A3: R partially_orders X; A4: R |_2 X is_antisymmetric_in X proof A5: R is_antisymmetric_in X by A3,Def7; let x,y; assume that A6: x in X and A7: y in X and A8: [x,y] in R |_2 X and A9: [y,x] in R |_2 X; A10: [y,x] in R by A9,XBOOLE_0:def 4; [x,y] in R by A8,XBOOLE_0:def 4; hence thesis by A6,A7,A10,A5,RELAT_2:def 4; end; A11: R |_2 X is_transitive_in X proof A12: R is_transitive_in X by A3,Def7; let x,y,z; assume that A13: x in X and A14: y in X and A15: z in X and A16: [x,y] in R |_2 X and A17: [y,z] in R |_2 X; A18: [x,z] in [:X,X:] by A13,A15,ZFMISC_1:87; A19: [y,z] in R by A17,XBOOLE_0:def 4; [x,y] in R by A16,XBOOLE_0:def 4; then [x,z] in R by A13,A14,A15,A19,A12,RELAT_2:def 8; hence thesis by A18,XBOOLE_0:def 4; end; A20: R is_reflexive_in X by A3,Def7; A21: R |_2 X is_reflexive_in X proof let x; assume A22: x in X; then A23: [x,x] in [:X,X:] by ZFMISC_1:87; [x,x] in R by A20,A22,RELAT_2:def 1; hence thesis by A23,XBOOLE_0:def 4; end; then A24: field S = X by Th13; dom S = X by A21,Th13; hence thesis by A21,A24,A4,A11,PARTFUN1:def 2,RELAT_2:def 9,def 12,def 16; end; theorem R linearly_orders X implies R |_2 X is Order of X by Th29,Th45; theorem R well_orders X implies R |_2 X is Order of X by Th28,Th45; theorem id X quasi_orders X & id X partially_orders X proof field id X = X \/ rng id X .= X \/ X .= X; hence thesis by Th31,Th34; end; definition let R,X; pred X has_upper_Zorn_property_wrt R means :Def9: for Y st Y c= X & R|_2 Y is being_linear-order ex x st x in X & for y st y in Y holds [y,x] in R; pred X has_lower_Zorn_property_wrt R means for Y st Y c= X & R|_2 Y is being_linear-order ex x st x in X & for y st y in Y holds [x,y] in R; end; Lm15: (R|_2 X)~ = R~|_2 X proof now let x,y; thus [x,y] in R~|_2 X implies [y,x] in R|_2 X proof assume A1: [x,y] in R~|_2 X; then [x,y] in [:X,X:] by XBOOLE_0:def 4; then A2: [y,x] in [:X,X:] by ZFMISC_1:88; [x,y] in R~ by A1,XBOOLE_0:def 4; then [y,x] in R by RELAT_1:def 7; hence thesis by A2,XBOOLE_0:def 4; end; assume A3: [y,x] in R|_2 X; then [y,x] in [:X,X:] by XBOOLE_0:def 4; then A4: [x,y] in [:X,X:] by ZFMISC_1:88; [y,x] in R by A3,XBOOLE_0:def 4; then [x,y] in R~ by RELAT_1:def 7; hence [x,y] in R~|_2 X by A4,XBOOLE_0:def 4; end; hence thesis by RELAT_1:def 7; end; Lm16: now let R; thus R|_2 {} = {}|`R|{} by WELLORD1:10 .= {}; end; theorem Th49: X has_upper_Zorn_property_wrt R implies X <> {} proof assume A1: for Y st Y c= X & R|_2 Y is being_linear-order ex x st x in X & for y st y in Y holds [y,x] in R; R|_2 {} is being_linear-order by Lm16; then ex x st x in X & for y st y in {} holds [y,x] in R by A1,XBOOLE_1:2; hence thesis; end; theorem X has_lower_Zorn_property_wrt R implies X <> {} proof assume A1: for Y st Y c= X & R|_2 Y is being_linear-order ex x st x in X & for y st y in Y holds [x,y] in R; R|_2 {} is being_linear-order by Lm16; then ex x st x in X & for y st y in {} holds [x,y] in R by A1,XBOOLE_1:2; hence thesis; end; theorem Th51: X has_upper_Zorn_property_wrt R iff X has_lower_Zorn_property_wrt R~ proof thus X has_upper_Zorn_property_wrt R implies X has_lower_Zorn_property_wrt R ~ proof assume A1: for Y st Y c= X & R|_2 Y is being_linear-order ex x st x in X & for y st y in Y holds [y,x] in R; let Y; A2: (R|_2 Y)~~ = R|_2 Y; assume that A3: Y c= X and A4: R~|_2 Y is being_linear-order; R~|_2 Y = (R|_2 Y)~ by Lm15; then consider x such that A5: x in X and A6: for y st y in Y holds [y,x] in R by A1,A2,A3,A4,Th18; take x; thus x in X by A5; let y; assume y in Y; then [y,x] in R by A6; hence thesis by RELAT_1:def 7; end; assume A7: for Y st Y c= X & R~|_2 Y is being_linear-order ex x st x in X & for y st y in Y holds [x,y] in R~; let Y; assume that A8: Y c= X and A9: R|_2 Y is being_linear-order; R~|_2 Y = (R|_2 Y)~ by Lm15; then consider x such that A10: x in X and A11: for y st y in Y holds [x,y] in R~ by A7,A8,A9,Th18; take x; thus x in X by A10; let y; assume y in Y; then [x,y] in R~ by A11; hence thesis by RELAT_1:def 7; end; theorem X has_upper_Zorn_property_wrt R~ iff X has_lower_Zorn_property_wrt R proof R~~ = R; hence thesis by Th51; end; definition let R,x; pred x is_maximal_in R means :Def11: x in field R & not ex y st y in field R & y <> x & [x,y] in R; pred x is_minimal_in R means :Def12: x in field R & not ex y st y in field R & y <> x & [y,x] in R; pred x is_superior_of R means :Def13: x in field R & for y st y in field R & y <> x holds [y,x] in R; pred x is_inferior_of R means :Def14: x in field R & for y st y in field R & y <> x holds [x,y] in R; end; theorem x is_inferior_of R & R is antisymmetric implies x is_minimal_in R proof assume that A1: x is_inferior_of R and A2: R is antisymmetric; A3: R is_antisymmetric_in field R by A2,RELAT_2:def 12; thus A4: x in field R by A1,Def14; let y; assume that A5: y in field R and A6: y <> x and A7: [y,x] in R; [x,y] in R by A1,A5,A6,Def14; hence thesis by A4,A5,A6,A7,A3,RELAT_2:def 4; end; theorem x is_superior_of R & R is antisymmetric implies x is_maximal_in R proof assume that A1: x is_superior_of R and A2: R is antisymmetric; A3: R is_antisymmetric_in field R by A2,RELAT_2:def 12; thus A4: x in field R by A1,Def13; let y; assume that A5: y in field R and A6: y <> x and A7: [x,y] in R; [y,x] in R by A1,A5,A6,Def13; hence thesis by A4,A5,A6,A7,A3,RELAT_2:def 4; end; theorem x is_minimal_in R & R is connected implies x is_inferior_of R proof assume that A1: x is_minimal_in R and A2: R is connected; thus A3: x in field R by A1,Def12; let y; assume that A4: y in field R and A5: y <> x; R is_connected_in field R by A2,RELAT_2:def 14; then [x,y] in R or [y,x] in R by A3,A4,A5,RELAT_2:def 6; hence thesis by A1,A4,Def12; end; theorem x is_maximal_in R & R is connected implies x is_superior_of R proof assume that A1: x is_maximal_in R and A2: R is connected; thus A3: x in field R by A1,Def11; let y; assume that A4: y in field R and A5: y <> x; R is_connected_in field R by A2,RELAT_2:def 14; then [x,y] in R or [y,x] in R by A3,A4,A5,RELAT_2:def 6; hence thesis by A1,A4,Def11; end; theorem x in X & x is_superior_of R & X c= field R & R is reflexive implies X has_upper_Zorn_property_wrt R proof assume that A1: x in X and A2: x is_superior_of R and A3: X c= field R and A4: R is_reflexive_in field R; let Y such that A5: Y c= X and R|_2 Y is being_linear-order; take x; thus x in X by A1; let y; assume y in Y; then A6: y in X by A5; y = x or y <> x; hence thesis by A2,A3,A4,A6,Def13,RELAT_2:def 1; end; theorem x in X & x is_inferior_of R & X c= field R & R is reflexive implies X has_lower_Zorn_property_wrt R proof assume that A1: x in X and A2: x is_inferior_of R and A3: X c= field R and A4: R is_reflexive_in field R; let Y such that A5: Y c= X and R|_2 Y is being_linear-order; take x; thus x in X by A1; let y; assume y in Y; then A6: y in X by A5; y = x or y <> x; hence thesis by A2,A3,A4,A6,Def14,RELAT_2:def 1; end; theorem Th59: x is_minimal_in R iff x is_maximal_in R~ proof A1: field R = field(R~) by RELAT_1:21; thus x is_minimal_in R implies x is_maximal_in R~ proof assume that A2: x in field R and A3: not ex y st y in field R & y <> x & [y,x] in R; thus x in field(R~) by A2,RELAT_1:21; let y; assume that A4: y in field(R~) and A5: y <> x; not [y,x] in R by A1,A3,A4,A5; hence thesis by RELAT_1:def 7; end; assume that A6: x in field(R~) and A7: not ex y st y in field(R~) & y <> x & [x,y] in R~; thus x in field R by A6,RELAT_1:21; let y; assume that A8: y in field R and A9: y <> x; not [x,y] in R~ by A1,A7,A8,A9; hence thesis by RELAT_1:def 7; end; theorem x is_minimal_in R~ iff x is_maximal_in R proof A1: field R = field(R~) by RELAT_1:21; thus x is_minimal_in R~ implies x is_maximal_in R proof assume that A2: x in field(R~) and A3: not ex y st y in field(R~) & y <> x & [y,x] in R~; thus x in field R by A2,RELAT_1:21; let y; assume that A4: y in field R and A5: y <> x; not [y,x] in R~ by A1,A3,A4,A5; hence thesis by RELAT_1:def 7; end; assume that A6: x in field R and A7: not ex y st y in field R & y <> x & [x,y] in R; thus x in field(R~) by A6,RELAT_1:21; let y; assume that A8: y in field(R~) and A9: y <> x; not [x,y] in R by A1,A7,A8,A9; hence thesis by RELAT_1:def 7; end; theorem x is_inferior_of R iff x is_superior_of R~ proof A1: field R = field(R~) by RELAT_1:21; thus x is_inferior_of R implies x is_superior_of R~ proof assume that A2: x in field R and A3: for y st y in field R & y <> x holds [x,y] in R; thus x in field(R~) by A2,RELAT_1:21; let y; assume that A4: y in field(R~) and A5: y <> x; [x,y] in R by A1,A3,A4,A5; hence thesis by RELAT_1:def 7; end; assume that A6: x in field(R~) and A7: for y st y in field(R~) & y <> x holds [y,x] in R~; thus x in field R by A6,RELAT_1:21; let y; assume that A8: y in field R and A9: y <> x; [y,x] in R~ by A1,A7,A8,A9; hence thesis by RELAT_1:def 7; end; theorem x is_inferior_of R~ iff x is_superior_of R proof A1: field R = field(R~) by RELAT_1:21; thus x is_inferior_of R~ implies x is_superior_of R proof assume that A2: x in field(R~) and A3: for y st y in field(R~) & y <> x holds [x,y] in R~; thus x in field R by A2,RELAT_1:21; let y; assume that A4: y in field R and A5: y <> x; [x,y] in R~ by A1,A3,A4,A5; hence thesis by RELAT_1:def 7; end; assume that A6: x in field R and A7: for y st y in field R & y <> x holds [y,x] in R; thus x in field(R~) by A6,RELAT_1:21; let y; assume that A8: y in field(R~) and A9: y <> x; [y,x] in R by A1,A7,A8,A9; hence thesis by RELAT_1:def 7; end; Lm17: R well_orders X & Y c= X implies R well_orders Y proof assume that A1: R well_orders X and A2: Y c= X; A3: R is_transitive_in X by A1,WELLORD1:def 5; A4: R is_connected_in X by A1,WELLORD1:def 5; A5: R is_antisymmetric_in X by A1,WELLORD1:def 5; A6: R is_well_founded_in X by A1,WELLORD1:def 5; R is_reflexive_in X by A1,WELLORD1:def 5; hence R is_reflexive_in Y & R is_transitive_in Y & R is_antisymmetric_in Y & R is_connected_in Y by A2,A3,A5,A4,Lm10,Th8,Th9,Th10; let Z; assume that A7: Z c= Y and A8: Z <> {}; Z c= X by A2,A7,XBOOLE_1:1; hence thesis by A8,A6,WELLORD1:def 3; end; reserve A,C for Ordinal; theorem Th63: for R,X st R partially_orders X & field R = X & X has_upper_Zorn_property_wrt R ex x st x is_maximal_in R proof let R; let FIELD be set; assume that A1: R is_reflexive_in FIELD and A2: R is_transitive_in FIELD and A3: R is_antisymmetric_in FIELD and A4: field R = FIELD and A5: FIELD has_upper_Zorn_property_wrt R; reconsider XD = FIELD as non empty set by A5,Th49; consider D such that A6: D = XD; A7: D in bool D by ZFMISC_1:def 1; not D in {{}} by TARSKI:def 1; then reconsider M = (bool D) \ {{}} as non empty set by A7,XBOOLE_0:def 5; set f = the Choice_Function of M; defpred P[set,set] means $1 <> {} & $2 = f.$1 or $1 = {} & $2 = D; A8: for x st x in bool D ex y st P[x,y] proof let x such that x in bool D; x = {} implies thesis; hence thesis; end; A9: for x,y,z st x in bool D & P[x,y] & P[x,z] holds y = z; consider g such that A10: dom g = bool D & for x st x in bool D holds P[x,g.x] from FUNCT_1: sch 2 (A9,A8); defpred ON[Ordinal,set] means ex L st $2 = g.{ d : for x st x in rng L holds x <> d & [x,d] in R } & dom L = $1 & for A,L1 st A in $1 & L1 = L|A holds L.A = g.{ d1 : for x st x in rng L1 holds x <> d1 & [x,d1] in R }; A11: ON[A,x] & ON[A,y] implies x = y proof given L1 such that A12: x = g.{ d1 : for x st x in rng L1 holds x <> d1 & [x,d1] in R } and A13: dom L1 = A & for C,L st C in A & L = L1|C holds L1.C = g.{ d2 : for x st x in rng L holds x <> d2 & [x,d2] in R }; A14: L1 = L1|A by A13,RELAT_1:68; given L2 such that A15: y = g.{ d1 : for x st x in rng L2 holds x <> d1 & [x,d1] in R } and A16: dom L2 = A & for C,L st C in A & L = L2|C holds L2.C = g.{ d2 : for x st x in rng L holds x <> d2 & [x,d2] in R }; defpred P[Ordinal] means $1 c= A implies L1|$1 = L2|$1; A17: for A1 st for A2 st A2 in A1 holds P[A2] holds P[A1] proof let A1 such that A18: for A2 st A2 in A1 holds A2 c= A implies L1|A2 = L2|A2 and A19: A1 c= A; A20: dom(L2|A1) = A1 by A16,A19,RELAT_1:62; A21: now let x; assume A22: x in A1; then reconsider A3 = x as Ordinal; A23: L1.x = L1|A1.x by A22,FUNCT_1:49; A3 c= A by A19,A22,ORDINAL1:def 2; then A24: L1|A3 = L2|A3 by A18,A22; A25: L2.A3 = g.{ d2 : for x st x in rng(L2|A3) holds x <> d2 & [x,d2] in R } by A16,A19,A22; L1.A3 = g.{ d1 : for x st x in rng(L1|A3) holds x <> d1 & [x,d1] in R } by A13,A19,A22; hence L1|A1.x = L2|A1.x by A22,A24,A23,A25,FUNCT_1:49; end; dom(L1|A1) = A1 by A13,A19,RELAT_1:62; hence thesis by A20,A21,FUNCT_1:2; end; for A1 holds P[A1] from ORDINAL1:sch 2(A17); then A26: L1|A = L2|A; L2 = L2|A by A16,RELAT_1:68; hence thesis by A12,A15,A26,A14; end; {} in {{}} by TARSKI:def 1; then A27: not {} in M by XBOOLE_0:def 5; A28: X in bool D & X <> {} implies g.X in X proof assume that A29: X in bool D and A30: X <> {}; not X in {{}} by A30,TARSKI:def 1; then A31: X in M by A29,XBOOLE_0:def 5; f.X = g.X by A10,A29,A30; hence thesis by A27,A31,Def1; end; defpred OM[Ordinal] means ON[$1,D]; {} c= D by XBOOLE_1:2; then A32: g.{} = D by A10; A33: now let A,B,L1,L2; assume that A34: dom L1 = A & for C,L st C in A & L = L1|C holds L1.C = g.{ d2 : for x st x in rng L holds x <> d2 & [x,d2] in R } and A35: dom L2 = B & for C,L st C in B & L = L2|C holds L2.C = g.{ d2 : for x st x in rng L holds x <> d2 & [x,d2] in R }; let C such that A36: C c= A and A37: C c= B; defpred P[Ordinal] means $1 c= C implies L1|$1 = L2|$1; A38: for A1 st for A2 st A2 in A1 holds P[A2] holds P[A1] proof let A1 such that A39: for A2 st A2 in A1 holds A2 c= C implies L1|A2 = L2|A2 and A40: A1 c= C; A41: dom(L2|A1) = A1 by A35,A37,A40,RELAT_1:62,XBOOLE_1:1; A42: now let x; assume A43: x in A1; then reconsider A3 = x as Ordinal; A44: L1.x = L1|A1.x by A43,FUNCT_1:49; A3 c= C by A40,A43,ORDINAL1:def 2; then A45: L1|A3 = L2|A3 by A39,A43; A46: A3 in C by A40,A43; then A47: L2.A3 = g.{ d2 : for x st x in rng(L2|A3) holds x <> d2 & [x,d2] in R } by A35,A37; L1.A3 = g.{ d1 : for x st x in rng(L1|A3) holds x <> d1 & [x,d1] in R } by A34,A36,A46; hence L1|A1.x = L2|A1.x by A43,A45,A44,A47,FUNCT_1:49; end; dom(L1|A1) = A1 by A34,A36,A40,RELAT_1:62,XBOOLE_1:1; hence thesis by A41,A42,FUNCT_1:2; end; for A1 holds P[A1] from ORDINAL1:sch 2(A38); hence L1|C = L2|C; end; A48: for d,A,B st ON[A,d] & ON[B,d] holds A = B proof let d,A,B; given L1 such that A49: d = g.{ d1 : for x st x in rng L1 holds x <> d1 & [x,d1] in R } and A50: dom L1 = A & for C,L st C in A & L = L1|C holds L1.C = g.{ d2 : for x st x in rng L holds x <> d2 & [x,d2] in R }; given L2 such that A51: d = g.{ d1 : for x st x in rng L2 holds x <> d1 & [x,d1] in R } and A52: dom L2 = B & for C,L st C in B & L = L2|C holds L2.C = g.{ d2 : for x st x in rng L holds x <> d2 & [x,d2] in R }; A53: now set Y = { d1 : for x st x in rng L1 holds x <> d1 & [x,d1] in R }; set X = { d1 : for x st x in rng(L1|B) holds x <> d1 & [x,d1] in R }; A54: Y c= D proof let x; assume x in Y; then ex d1 st x = d1 & for x st x in rng L1 holds x <> d1 & [x,d1] in R; hence thesis; end; assume A55: B in A; then B c= A by ORDINAL1:def 2; then A56: L1|B = L2|B by A33,A50,A52 .= L2 by A52,RELAT_1:68; L1.B = g.X by A50,A55; then A57: d in rng L1 by A50,A51,A55,A56,FUNCT_1:def 3; A58: now assume A59: Y <> {}; then not Y in {{}} by TARSKI:def 1; then A60: Y in M by A54,XBOOLE_0:def 5; g.Y = f.Y by A10,A54,A59; then d in Y by A27,A49,A60,Def1; then ex d1 st d = d1 & for x st x in rng L1 holds x <> d1 & [x,d1] in R; hence contradiction by A57; end; A61: not d in d; P[Y,g.Y] by A10,A54; hence contradiction by A49,A61,A58; end; now set Y = { d1 : for x st x in rng L2 holds x <> d1 & [x,d1] in R }; set X = { d1 : for x st x in rng(L2|A) holds x <> d1 & [x,d1] in R }; A62: Y c= D proof let x; assume x in Y; then ex d1 st x = d1 & for x st x in rng L2 holds x <> d1 & [x,d1] in R; hence thesis; end; assume A63: A in B; then A c= B by ORDINAL1:def 2; then A64: L2|A = L1|A by A33,A50,A52 .= L1 by A50,RELAT_1:68; L2.A = g.X by A52,A63; then A65: d in rng L2 by A49,A52,A63,A64,FUNCT_1:def 3; A66: now assume A67: Y <> {}; then not Y in {{}} by TARSKI:def 1; then A68: Y in M by A62,XBOOLE_0:def 5; g.Y = f.Y by A10,A62,A67; then d in Y by A27,A51,A68,Def1; then ex d1 st d = d1 & for x st x in rng L2 holds x <> d1 & [x,d1] in R; hence contradiction by A65; end; A69: not d in d; P[Y,g.Y] by A10,A62; hence contradiction by A51,A69,A66; end; hence thesis by A53,ORDINAL1:14; end; A70: ex A st OM[A] proof defpred P[set,set] means ex A st $2 = A & ON[A,$1]; defpred OO[Ordinal] means ex d st ON[$1,d]; assume A71: for A holds not ON[A,D]; A72: for A st for B st B in A holds OO[B] holds OO[A] proof defpred P[set,set] means ex C st $1 = C & ON[C,$2]; let A such that A73: for B st B in A ex d st ON[B,d]; A74: for x st x in A ex y st P[x,y] proof let x; assume A75: x in A; then reconsider C = x as Ordinal; consider d such that A76: ON[C,d] by A73,A75; reconsider y = d as set; take y,C; thus thesis by A76; end; A77: for x,y,z st x in A & P[x,y] & P[x,z] holds y = z by A11; consider h such that A78: dom h = A & for x st x in A holds P[x,h.x] from FUNCT_1:sch 2( A77,A74 ); reconsider h as T-Sequence by A78,ORDINAL1:def 7; set X = { d1 : for x st x in rng h holds x <> d1 & [x,d1] in R }; A79: X c= D proof let x; assume x in X; then ex d1 st x = d1 & for x st x in rng h holds x <> d1 & [x,d1] in R; hence thesis; end; A80: ON[A,g.X] proof take h; thus g.X = g.{ d1 : for x st x in rng h holds x <> d1 & [x,d1] in R } & dom h = A by A78; let B,L; assume that A81: B in A and A82: L = h|B; ex C st B = C & ON[C,h.B] by A78,A81; then consider L1 such that A83: h.B = g.{d1: for x st x in rng L1 holds x <> d1 & [x,d1] in R } and A84: dom L1 = B & for C,L st C in B & L = L1|C holds L1.C = g.{ d1: for x st x in rng L holds x <> d1 & [x,d1] in R }; A85: for x st x in B holds L1.x = h|B.x proof let x; assume A86: x in B; then reconsider A1 = x as Ordinal; A87: h|B.x = h.x by A86,FUNCT_1:49; A88: ON[A1,L1.x] proof reconsider K = L1|A1 as T-Sequence; take K; thus L1.x = g.{d1: for x st x in rng K holds x <> d1 & [x,d1] in R } by A84,A86; A1 c= B by A86,ORDINAL1:def 2; hence dom K = A1 by A84,RELAT_1:62; let A2,L2; assume that A89: A2 in A1 and A90: L2 = K|A2; A2 c= A1 by A89,ORDINAL1:def 2; then A91: L2 = L1|A2 by A90,FUNCT_1:51; K.A2 = L1.A2 by A89,FUNCT_1:49; hence thesis by A84,A86,A89,A91,ORDINAL1:10; end; ex A2 st x = A2 & ON[A2,h.x] by A78,A81,A86,ORDINAL1:10; hence thesis by A11,A88,A87; end; B c= A by A81,ORDINAL1:def 2; then dom(h|B) = B by A78,RELAT_1:62; then h|B = L1 by A84,A85,FUNCT_1:2; hence thesis by A82,A83; end; then X <> {} by A32,A71; then g.X in X by A28,A79; then reconsider d = g.X as Element of D by A79; take d; thus thesis by A80; end; A92: for A holds OO[A] from ORDINAL1:sch 2(A72); A93: for x,y,z st P[x,y] & P[x,z] holds y = z proof let x,y,z; given A1 such that A94: y = A1 and A95: ON[A1,x]; consider d1 such that A96: ON[A1,d1] by A92; given A2 such that A97: z = A2 and A98: ON[A2,x]; d1 = x by A11,A95,A96; hence thesis by A48,A94,A95,A97,A98; end; consider X such that A99: x in X iff ex y st y in D & P[y,x] from TARSKI:sch 1(A93); for A holds A in X proof let A; ex d st ON[A,d] by A92; hence thesis by A99; end; hence contradiction by ORDINAL1:26; end; consider A such that A100: OM[A] & for B st OM[B] holds A c= B from ORDINAL1:sch 1(A70); A101: for L holds { d : for x st x in rng L holds x <> d & [x,d] in R } c= D proof let L,x; assume x in { d : for x st x in rng L holds x <> d & [x,d] in R }; then ex d1 st x = d1 & for x st x in rng L holds x <> d1 & [x,d1] in R; hence thesis; end; D in bool D by ZFMISC_1:def 1; then reconsider d = g.D as Element of D by A28; A102: d in D & ON[{},d] proof deffunc H(set) = {}; thus d in D; consider L such that A103: dom L = {} & for B,L1 st B in {} & L1 = L|B holds L.B = H(L1) from ORDINAL1:sch 4; take L; A104: D c= { d1 : for x st x in rng L holds x <> d1 & [x,d1] in R } proof let x; assume x in D; then reconsider d = x as Element of D; for x st x in rng L holds x <> d & [x,d] in R by A103,RELAT_1:42; hence thesis; end; { d1 : for x st x in rng L holds x <> d1 & [x,d1] in R } c= D by A101; hence d = g.{ d1 : for x st x in rng L holds x <> d1 & [x,d1] in R } by A104,XBOOLE_0:def 10; thus dom L = {} by A103; thus thesis; end; A105: {} c= A; defpred P[set] means ex B st B in A & ON[B,$1]; consider X such that A106: x in X iff x in D & P[x] from XBOOLE_0:sch 1; not Y in Y; then d <> D; then {} <> A by A11,A100,A102; then {} c< A by A105,XBOOLE_0:def 8; then {} in A by ORDINAL1:11; then reconsider X as non empty set by A106,A102; consider L such that A107: D = g.{ d1 : for x st x in rng L holds x <> d1 & [x,d1] in R } and A108: dom L = A & for B,L1 st B in A & L1 = L|B holds L.B = g.{ d2 : for x st x in rng L1 holds x <> d2 & [x,d2] in R } by A100; R is transitive by A2,A4,RELAT_2:def 16; then A109: R|_2 X is transitive by WELLORD1:17; A110: rng L c= X proof let z; assume z in rng L; then consider y such that A111: y in dom L and A112: z = L.y by FUNCT_1:def 3; reconsider y as Ordinal by A111; set Z = { d2 : for x st x in rng(L|y) holds x <> d2 & [x,d2] in R }; A113: Z c= D by A101; A114: ON[y,z] proof reconsider K = L|y as T-Sequence; take K; thus z = g.{ d2 : for x st x in rng K holds x <> d2 & [x,d2] in R } by A108,A111,A112; y c= dom L by A111,ORDINAL1:def 2; hence A115: dom K = y by RELAT_1:62; let B,L1; assume that A116: B in y and A117: L1 = K|B; B c= y by A116,ORDINAL1:def 2; then A118: L1 = L|B by A117,FUNCT_1:51; K.B = L.B by A115,A116,FUNCT_1:47; hence thesis by A108,A111,A116,A118,ORDINAL1:10; end; now assume Z = {}; then z = D by A32,A108,A111,A112; then dom L c= y by A100,A108,A114; hence contradiction by A111,ORDINAL1:5; end; then g.Z in Z by A28,A113; then z in Z by A108,A111,A112; hence thesis by A106,A108,A111,A114,A113; end; A119: R|_2 X is connected proof let x,y; assume that A120: x in field(R|_2 X) and A121: y in field(R|_2 X); A122: x in X by A120,WELLORD1:12; then consider A1 such that A1 in A and A123: ON[A1,x] by A106; A124: y in X by A121,WELLORD1:12; then consider A2 such that A2 in A and A125: ON[A2,y] by A106; reconsider x9 = x, y9 = y as Element of D by A106,A122,A124; consider L1 such that A126: x9 = g.{ d1 : for x st x in rng L1 holds x <> d1 & [x,d1] in R } and A127: dom L1 = A1 & for C,L st C in A1 & L = L1|C holds L1.C = g.{ d2 : for x st x in rng L holds x <> d2 & [x,d2] in R } by A123; consider L2 such that A128: y9 = g.{ d1 : for x st x in rng L2 holds x <> d1 & [x,d1] in R } and A129: dom L2 = A2 & for C,L st C in A2 & L = L2|C holds L2.C = g.{ d2 : for x st x in rng L holds x <> d2 & [x,d2] in R } by A125; A130: [x,y] in [:X,X:] by A122,A124,ZFMISC_1:87; A131: now set Y = { d1 : for x st x in rng L2 holds x <> d1 & [x,d1] in R }; set Z = { d1 : for x st x in rng(L2|A1) holds x <> d1 & [x,d1] in R }; not y9 in y9; then A132: Y <> {} by A32,A128; Y c= D by A101; then y9 in Y by A28,A128,A132; then A133: ex d1 st y9 = d1 & for x st x in rng L2 holds x <> d1 & [x,d1] in R; assume A134: A1 in A2; then A1 c= A2 by ORDINAL1:def 2; then A135: L2|A1 = L1|A1 by A33,A127,A129 .= L1 by A127,RELAT_1:68; L2.A1 = g.Z by A129,A134; then x9 in rng L2 by A126,A129,A134,A135,FUNCT_1:def 3; then [x,y] in R by A133; hence thesis by A130,XBOOLE_0:def 4; end; A136: [y,x] in [:X,X:] by A122,A124,ZFMISC_1:87; A137: now set Y = { d1 : for x st x in rng L1 holds x <> d1 & [x,d1] in R }; set Z = { d1 : for x st x in rng(L1|A2) holds x <> d1 & [x,d1] in R }; not d1 in d1; then A138: Y <> {} by A32,A126; Y c= D by A101; then x9 in Y by A28,A126,A138; then A139: ex d1 st x9 = d1 & for x st x in rng L1 holds x <> d1 & [x,d1] in R; assume A140: A2 in A1; then A2 c= A1 by ORDINAL1:def 2; then A141: L1|A2 = L2|A2 by A33,A127,A129 .= L2 by A129,RELAT_1:68; L1.A2 = g.Z by A127,A140; then y9 in rng L1 by A127,A128,A140,A141,FUNCT_1:def 3; then [y,x] in R by A139; hence thesis by A136,XBOOLE_0:def 4; end; A1 = A2 implies thesis by A11,A123,A125; hence thesis by A131,A137,ORDINAL1:14; end; R is antisymmetric by A3,A4,RELAT_2:def 12; then A142: R|_2 X is antisymmetric; set Z = { d1 : for x st x in rng L holds x <> d1 & [x,d1] in R }; A143: X c= D proof let x; thus thesis by A106; end; R is reflexive by A1,A4,RELAT_2:def 9; then R|_2 X is reflexive by WELLORD1:15; then R|_2 X is being_linear-order by A109,A142,A119,Def5; then consider x such that A144: x in D and A145: for y st y in X holds [y,x] in R by A5,A6,A143,Def9; take x; thus x in field R by A4,A6,A144; let y such that A146: y in field R and A147: y <> x and A148: [x,y] in R; reconsider y9 = y as Element of D by A4,A6,A146; A149: now assume y in X; then [y,x] in R by A145; hence contradiction by A3,A4,A6,A144,A146,A147,A148,RELAT_2:def 4; end; now let z; assume A150: z in rng L; then reconsider z9 = z as Element of X by A110; thus z <> y9 by A110,A149,A150; A151: [z9,x] in R by A145; z in D by A106,A110,A150; hence [z,y] in R by A2,A4,A6,A144,A146,A148,A151,RELAT_2:def 8; end; then A152: y in Z; Z c= D by A101; hence contradiction by A28,A107,A152,ORDINAL1:5; end; theorem Th64: for R,X st R partially_orders X & field R = X & X has_lower_Zorn_property_wrt R ex x st x is_minimal_in R proof let R,X such that A1: R partially_orders X and A2: field R = X and A3: X has_lower_Zorn_property_wrt R; R = R~~; then A4: X has_upper_Zorn_property_wrt R~ by A3,Th51; field(R~) = X by A2,RELAT_1:21; then consider x such that A5: x is_maximal_in R~ by A1,A4,Th41,Th63; take x; thus thesis by A5,Th59; end; theorem Th65: for X st X <> {} & for Z st Z c= X & Z is c=-linear ex Y st Y in X & for X1 st X1 in Z holds X1 c= Y ex Y st Y in X & for Z st Z in X & Z <> Y holds not Y c= Z proof let X; assume that A1: X <> {} and A2: for Z st Z c= X & Z is c=-linear ex Y st Y in X & for X1 st X1 in Z holds X1 c= Y; reconsider D = X as non empty set by A1; set R = RelIncl D; A3: D has_upper_Zorn_property_wrt R proof let Z; assume that A4: Z c= D and A5: R|_2 Z is being_linear-order; set Q = R|_2 Z; A6: Z c= field(R|_2 Z) proof let x; assume A7: x in Z; then A8: [x,x] in [:Z,Z:] by ZFMISC_1:87; [x,x] in R by A4,A7,WELLORD2:def 1; then [x,x] in R|_2 Z by A8,XBOOLE_0:def 4; hence thesis by RELAT_1:15; end; R|_2 Z is connected by A5,Def5; then A9: R|_2 Z is_connected_in field(R|_2 Z) by RELAT_2:def 14; Z is c=-linear proof let X1,X2; assume that A10: X1 in Z and A11: X2 in Z; X1 <> X2 implies [X1,X2] in Q or [X2,X1] in Q by A9,A6,A10,A11, RELAT_2:def 6; then X1 <> X2 implies [X1,X2] in R or [X2,X1] in R by XBOOLE_0:def 4; hence X1 c= X2 or X2 c= X1 by A4,A10,A11,WELLORD2:def 1; end; then consider Y such that A12: Y in X and A13: for X1 st X1 in Z holds X1 c= Y by A2,A4; take x = Y; thus x in D by A12; let y; assume A14: y in Z; then y c= Y by A13; hence thesis by A4,A12,A14,WELLORD2:def 1; end; A15: field R = D by WELLORD2:def 1; A16: R is_antisymmetric_in D by A15,RELAT_2:def 12; A17: R is_transitive_in D by A15,RELAT_2:def 16; R is_reflexive_in D by A15,RELAT_2:def 9; then R partially_orders D by A17,A16,Def7; then consider x such that A18: x is_maximal_in R by A15,A3,Th63; take Y = x; A19: Y in field R by A18,Def11; thus Y in X by A15,A18,Def11; let Z; assume that A20: Z in X and A21: Z <> Y; not [Y,Z] in R by A15,A18,A20,A21,Def11; hence thesis by A15,A19,A20,WELLORD2:def 1; end; theorem Th66: for X st X <> {} & for Z st Z c= X & Z is c=-linear ex Y st Y in X & for X1 st X1 in Z holds Y c= X1 ex Y st Y in X & for Z st Z in X & Z <> Y holds not Z c= Y proof let X; assume that A1: X <> {} and A2: for Z st Z c= X & Z is c=-linear ex Y st Y in X & for X1 st X1 in Z holds Y c= X1; reconsider D = X as non empty set by A1; set R = (RelIncl D)~; A3: x in D implies [x,x] in R proof x in D implies [x,x] in RelIncl D by WELLORD2:def 1; hence thesis by RELAT_1:def 7; end; A4: D has_upper_Zorn_property_wrt R proof let Z; assume that A5: Z c= D and A6: R|_2 Z is being_linear-order; set Q = R|_2 Z; A7: Z c= field(R|_2 Z) proof let x; assume A8: x in Z; then A9: [x,x] in [:Z,Z:] by ZFMISC_1:87; [x,x] in R by A3,A5,A8; then [x,x] in R|_2 Z by A9,XBOOLE_0:def 4; hence thesis by RELAT_1:15; end; R|_2 Z is connected by A6,Def5; then A10: R|_2 Z is_connected_in field(R|_2 Z) by RELAT_2:def 14; Z is c=-linear proof let X1,X2; assume that A11: X1 in Z and A12: X2 in Z; X1 <> X2 implies [X1,X2] in Q or [X2,X1] in Q by A10,A7,A11,A12, RELAT_2:def 6; then X1 <> X2 implies [X1,X2] in R or [X2,X1] in R by XBOOLE_0:def 4; then X1 <> X2 implies [X1,X2] in RelIncl D or [X2,X1] in RelIncl D by RELAT_1:def 7; hence X1 c= X2 or X2 c= X1 by A5,A11,A12,WELLORD2:def 1; end; then consider Y such that A13: Y in X and A14: for X1 st X1 in Z holds Y c= X1 by A2,A5; take x = Y; thus x in D by A13; let y; assume A15: y in Z; then Y c= y by A14; then [Y,y] in RelIncl D by A5,A13,A15,WELLORD2:def 1; hence thesis by RELAT_1:def 7; end; A16: field R = field RelIncl D by RELAT_1:21 .= D by WELLORD2:def 1; A17: field RelIncl D = D by WELLORD2:def 1; RelIncl D is_antisymmetric_in D by A17,RELAT_2:def 12; then A18: R is_antisymmetric_in D by Lm13; RelIncl D is_transitive_in D by A17,RELAT_2:def 16; then A19: R is_transitive_in D by Lm12; RelIncl D is_reflexive_in D by A17,RELAT_2:def 9; then R is_reflexive_in D by Lm11; then R partially_orders D by A19,A18,Def7; then consider x such that A20: x is_maximal_in R by A16,A4,Th63; take Y = x; A21: Y in field R by A20,Def11; thus Y in X by A16,A20,Def11; let Z; assume that A22: Z in X and A23: Z <> Y; not [Y,Z] in R by A16,A20,A22,A23,Def11; then not [Z,Y] in RelIncl D by RELAT_1:def 7; hence thesis by A16,A21,A22,WELLORD2:def 1; end; theorem Th67: for X st X <> {} & for Z st Z <> {} & Z c= X & Z is c=-linear holds union Z in X ex Y st Y in X & for Z st Z in X & Z <> Y holds not Y c= Z proof let X such that A1: X <> {} and A2: for Z st Z <> {} & Z c= X & Z is c=-linear holds union Z in X; for Z st Z c= X & Z is c=-linear ex Y st Y in X & for X1 st X1 in Z holds X1 c= Y proof set x = the Element of X; let Z such that A3: Z c= X and A4: Z is c=-linear; Z <> {} or Z = {}; then consider Y such that A5: Y = union Z & Z <> {} or Y = x & Z = {}; take Y; thus thesis by A1,A2,A3,A4,A5,ZFMISC_1:74; end; hence thesis by A1,Th65; end; theorem for X st X <> {} & for Z st Z <> {} & Z c= X & Z is c=-linear holds meet Z in X ex Y st Y in X & for Z st Z in X & Z <> Y holds not Z c= Y proof let X such that A1: X <> {} and A2: for Z st Z <> {} & Z c= X & Z is c=-linear holds meet Z in X; for Z st Z c= X & Z is c=-linear ex Y st Y in X & for X1 st X1 in Z holds Y c= X1 proof set x = the Element of X; let Z such that A3: Z c= X and A4: Z is c=-linear; Z <> {} or Z = {}; then consider Y such that A5: Y = meet Z & Z <> {} or Y = x & Z = {}; take Y; thus thesis by A1,A2,A3,A4,A5,SETFAM_1:3; end; hence thesis by A1,Th66; end; scheme ZornMax{A() -> non empty set, P[set,set]}: ex x being Element of A() st for y being Element of A() st x <> y holds not P[x,y] provided A1: for x being Element of A() holds P[x,x] and A2: for x,y being Element of A() st P[x,y] & P[y,x] holds x = y and A3: for x,y,z being Element of A() st P[x,y] & P[y,z] holds P[x,z] and A4: for X st X c= A() & (for x,y being Element of A() st x in X & y in X holds P[x,y] or P[y,x]) holds ex y being Element of A() st for x being Element of A() st x in X holds P[x,y] proof consider R being Relation of A() such that A5: for x,y being Element of A() holds [x,y] in R iff P[x,y] from RELSET_1:sch 2; A6: R is_transitive_in A() proof let x,y,z; assume that A7: x in A() and A8: y in A() and A9: z in A(); reconsider x9 = x, y9 = y, z9 = z as Element of A() by A7,A8,A9; assume that A10: [x,y] in R and A11: [y,z] in R; A12: P[y9,z9] by A5,A11; P[x9,y9] by A5,A10; then P[x9,z9] by A3,A12; hence thesis by A5; end; A() c= dom R proof let x; assume x in A(); then reconsider x9 = x as Element of A(); P[x9,x9] by A1; then [x,x] in R by A5; hence thesis by XTUPLE_0:def 12; end; then dom R = A() by XBOOLE_0:def 10; then A13: A() c= field R by XBOOLE_1:7; field R = dom R \/ rng R; then A14: field R = A() by A13,XBOOLE_0:def 10; A15: R is_reflexive_in A() proof let x; assume x in A(); then reconsider x9 = x as Element of A(); P[x9,x9] by A1; hence thesis by A5; end; A16: A() has_upper_Zorn_property_wrt R proof let Y such that A17: Y c= A() and A18: R|_2 Y is being_linear-order; for x,y being Element of A() st x in Y & y in Y holds P[x,y] or P[y,x ] proof let x,y be Element of A() such that A19: x in Y and A20: y in Y; A21: R|_2 Y is reflexive connected by A18,Def5; Y c= field(R|_2 Y) proof let x; assume A22: x in Y; then A23: [x,x] in [:Y,Y:] by ZFMISC_1:87; [x,x] in R by A15,A17,A22,RELAT_2:def 1; then [x,x] in R|_2 Y by A23,XBOOLE_0:def 4; hence thesis by RELAT_1:15; end; then A24: Y = field(R|_2 Y|_2 Y) by A21,Lm5 .= field(R|_2 Y) by WELLORD1:21; then A25: R|_2 Y is_connected_in Y by A21,RELAT_2:def 14; A26: R|_2 Y is_reflexive_in Y by A21,A24,RELAT_2:def 9; x = y or x <> y; then [x,y] in R|_2 Y or [y,x] in R|_2 Y by A19,A20,A25,A26,RELAT_2:def 1 ,def 6; then [x,y] in R or [y,x] in R by XBOOLE_0:def 4; hence thesis by A5; end; then consider y being Element of A() such that A27: for x being Element of A() st x in Y holds P[x,y] by A4,A17; take y; thus y in A(); let x; assume A28: x in Y; then P[x,y] by A17,A27; hence thesis by A5,A17,A28; end; R is_antisymmetric_in A() proof let x,y; assume that A29: x in A() and A30: y in A(); reconsider x9 = x, y9 = y as Element of A() by A29,A30; assume that A31: [x,y] in R and A32: [y,x] in R; A33: P[y9,x9] by A5,A32; P[x9,y9] by A5,A31; hence thesis by A2,A33; end; then R partially_orders A() by A15,A6,Def7; then consider x such that A34: x is_maximal_in R by A14,A16,Th63; take x; thus x is Element of A() by A14,A34,Def11; let y being Element of A(); assume x <> y; then A35: not [x,y] in R by A14,A34,Def11; x in A() by A14,A34,Def11; hence thesis by A5,A35; end; scheme ZornMin{A() -> non empty set, P[set,set]}: ex x being Element of A() st for y being Element of A() st x <> y holds not P[y,x] provided A1: for x being Element of A() holds P[x,x] and A2: for x,y being Element of A() st P[x,y] & P[y,x] holds x = y and A3: for x,y,z being Element of A() st P[x,y] & P[y,z] holds P[x,z] and A4: for X st X c= A() & (for x,y being Element of A() st x in X & y in X holds P[x,y] or P[y,x]) holds ex y being Element of A() st for x being Element of A() st x in X holds P[y,x] proof consider R being Relation of A() such that A5: for x,y being Element of A() holds [x,y] in R iff P[x,y] from RELSET_1:sch 2; A6: R is_transitive_in A() proof let x,y,z; assume that A7: x in A() and A8: y in A() and A9: z in A(); reconsider x9 = x, y9 = y, z9 = z as Element of A() by A7,A8,A9; assume that A10: [x,y] in R and A11: [y,z] in R; A12: P[y9,z9] by A5,A11; P[x9,y9] by A5,A10; then P[x9,z9] by A3,A12; hence thesis by A5; end; A() c= dom R proof let x; assume x in A(); then reconsider x9 = x as Element of A(); P[x9,x9] by A1; then [x,x] in R by A5; hence thesis by XTUPLE_0:def 12; end; then dom R = A() by XBOOLE_0:def 10; then A13: A() c= field R by XBOOLE_1:7; field R = dom R \/ rng R; then A14: field R = A() by A13,XBOOLE_0:def 10; A15: R is_reflexive_in A() proof let x; assume x in A(); then reconsider x9 = x as Element of A(); P[x9,x9] by A1; hence thesis by A5; end; A16: A() has_lower_Zorn_property_wrt R proof let Y such that A17: Y c= A() and A18: R|_2 Y is being_linear-order; for x,y being Element of A() st x in Y & y in Y holds P[x,y] or P[y,x ] proof let x,y be Element of A() such that A19: x in Y and A20: y in Y; A21: R|_2 Y is reflexive connected by A18,Def5; Y c= field(R|_2 Y) proof let x; assume A22: x in Y; then A23: [x,x] in [:Y,Y:] by ZFMISC_1:87; [x,x] in R by A15,A17,A22,RELAT_2:def 1; then [x,x] in R|_2 Y by A23,XBOOLE_0:def 4; hence thesis by RELAT_1:15; end; then A24: Y = field(R|_2 Y|_2 Y) by A21,Lm5 .= field(R|_2 Y) by WELLORD1:21; then A25: R|_2 Y is_connected_in Y by A21,RELAT_2:def 14; A26: R|_2 Y is_reflexive_in Y by A21,A24,RELAT_2:def 9; x = y or x <> y; then [x,y] in R|_2 Y or [y,x] in R|_2 Y by A19,A20,A25,A26,RELAT_2:def 1 ,def 6; then [x,y] in R or [y,x] in R by XBOOLE_0:def 4; hence thesis by A5; end; then consider y being Element of A() such that A27: for x being Element of A() st x in Y holds P[y,x] by A4,A17; take y; thus y in A(); let x; assume A28: x in Y; then P[y,x] by A17,A27; hence thesis by A5,A17,A28; end; R is_antisymmetric_in A() proof let x,y; assume that A29: x in A() and A30: y in A(); reconsider x9 = x, y9 = y as Element of A() by A29,A30; assume that A31: [x,y] in R and A32: [y,x] in R; A33: P[y9,x9] by A5,A32; P[x9,y9] by A5,A31; hence thesis by A2,A33; end; then R partially_orders A() by A15,A6,Def7; then consider x such that A34: x is_minimal_in R by A14,A16,Th64; take x; thus x is Element of A() by A14,A34,Def12; let y being Element of A(); assume x <> y; then A35: not [y,x] in R by A14,A34,Def12; x in A() by A14,A34,Def12; hence thesis by A5,A35; end; theorem R partially_orders X & field R = X implies ex P st R c= P & P linearly_orders X & field P = X proof assume that A1: R partially_orders X and A2: field R = X; defpred P[set] means ex P st $1 = P & R c= P & P partially_orders X & field P = X; consider Rel being set such that A3: x in Rel iff x in bool [:X,X:] & P[x] from XBOOLE_0:sch 1; A4: for Z st Z <> {} & Z c= Rel & Z is c=-linear holds union Z in Rel proof reconsider T = [:X,X:] as Relation; let Z; assume that A5: Z <> {} and A6: Z c= Rel and A7: Z is c=-linear; A8: union bool [:X,X:] = T by ZFMISC_1:81; Z c= bool [:X,X:] proof let x; assume x in Z; hence thesis by A3,A6; end; then A9: union Z c= union bool [:X,X:] by ZFMISC_1:77; then reconsider S = union Z as Relation; set y = the Element of Z; y in Rel by A5,A6,TARSKI:def 3; then consider P such that A10: y = P and A11: R c= P and A12: P partially_orders X and field P = X by A3; A13: S is_antisymmetric_in X proof let x,y; assume that A14: x in X and A15: y in X and A16: [x,y] in S and A17: [y,x] in S; consider X1 such that A18: [x,y] in X1 and A19: X1 in Z by A16,TARSKI:def 4; consider P1 being Relation such that A20: X1 = P1 and R c= P1 and A21: P1 partially_orders X and field P1 = X by A3,A6,A19; consider X2 such that A22: [y,x] in X2 and A23: X2 in Z by A17,TARSKI:def 4; X1,X2 are_c=-comparable by A7,A19,A23,ORDINAL1:def 8; then A24: X1 c= X2 or X2 c= X1 by XBOOLE_0:def 9; consider P2 being Relation such that A25: X2 = P2 and R c= P2 and A26: P2 partially_orders X and field P2 = X by A3,A6,A23; A27: P2 is_antisymmetric_in X by A26,Def7; P1 is_antisymmetric_in X by A21,Def7; hence thesis by A14,A15,A18,A22,A24,A20,A25,A27,RELAT_2:def 4; end; A28: S is_transitive_in X proof let x,y,z; assume that A29: x in X and A30: y in X and A31: z in X and A32: [x,y] in S and A33: [y,z] in S; consider X1 such that A34: [x,y] in X1 and A35: X1 in Z by A32,TARSKI:def 4; consider P1 being Relation such that A36: X1 = P1 and R c= P1 and A37: P1 partially_orders X and field P1 = X by A3,A6,A35; consider X2 such that A38: [y,z] in X2 and A39: X2 in Z by A33,TARSKI:def 4; X1,X2 are_c=-comparable by A7,A35,A39,ORDINAL1:def 8; then A40: X1 c= X2 or X2 c= X1 by XBOOLE_0:def 9; consider P2 being Relation such that A41: X2 = P2 and R c= P2 and A42: P2 partially_orders X and field P2 = X by A3,A6,A39; A43: P2 is_transitive_in X by A42,Def7; P1 is_transitive_in X by A37,Def7; then [x,z] in P1 or [x,z] in P2 by A29,A30,A31,A34,A38,A40,A36,A41,A43, RELAT_2:def 8; hence thesis by A35,A39,A36,A41,TARSKI:def 4; end; A44: P is_reflexive_in X by A12,Def7; S is_reflexive_in X proof let x; assume x in X; then [x,x] in P by A44,RELAT_2:def 1; hence thesis by A5,A10,TARSKI:def 4; end; then A45: S partially_orders X by A28,A13,Def7; A46: field S c= X proof let x; A47: now assume x in dom S; then consider y such that A48: [x,y] in S by XTUPLE_0:def 12; consider Y such that A49: [x,y] in Y and A50: Y in Z by A48,TARSKI:def 4; ex P st Y = P & R c= P & P partially_orders X & field P = X by A3,A6 ,A50; hence thesis by A49,RELAT_1:15; end; A51: now assume x in rng S; then consider y such that A52: [y,x] in S by XTUPLE_0:def 13; consider Y such that A53: [y,x] in Y and A54: Y in Z by A52,TARSKI:def 4; ex P st Y = P & R c= P & P partially_orders X & field P = X by A3,A6 ,A54; hence thesis by A53,RELAT_1:15; end; assume x in field S; hence thesis by A47,A51,XBOOLE_0:def 3; end; A55: R c= S proof let x,y; assume [x,y] in R; hence thesis by A5,A10,A11,TARSKI:def 4; end; then X c= field S by A2,RELAT_1:16; then field S = X by A46,XBOOLE_0:def 10; hence thesis by A3,A9,A8,A55,A45; end; R c= [:X,X:] by A2,Lm4; then Rel <> {} by A1,A2,A3; then consider Y such that A56: Y in Rel and A57: for Z st Z in Rel & Z <> Y holds not Y c= Z by A4,Th67; consider P such that A58: Y = P and A59: R c= P and A60: P partially_orders X and A61: field P = X by A3,A56; take P; thus R c= P by A59; thus A62: P is_reflexive_in X & P is_transitive_in X & P is_antisymmetric_in X by A60,Def7; thus P is_connected_in X proof let x,y such that A63: x in X and A64: y in X and x <> y and A65: not [x,y] in P and A66: not [y,x] in P; defpred Q[set,set] means [$1,$2] in P or [$1,x] in P & [y,$2] in P; consider Q being Relation such that A67: [z,u] in Q iff z in X & u in X & Q[z,u] from RELAT_1:sch 1; A68: field Q c= X proof let z; A69: now assume z in dom Q; then ex u st [z,u] in Q by XTUPLE_0:def 12; hence thesis by A67; end; A70: now assume z in rng Q; then ex u st [u,z] in Q by XTUPLE_0:def 13; hence thesis by A67; end; assume z in field Q; hence thesis by A69,A70,XBOOLE_0:def 3; end; A71: P c= Q proof let z,u; assume A72: [z,u] in P; then A73: u in field P by RELAT_1:15; z in field P by A72,RELAT_1:15; hence thesis by A61,A67,A72,A73; end; then X c= field Q by A61,RELAT_1:16; then A74: field Q = X by A68,XBOOLE_0:def 10; A75: Q is_transitive_in X proof let a,b,c be set; assume that A76: a in X and A77: b in X and A78: c in X and A79: [a,b] in Q and A80: [b,c] in Q; A81: [b,c] in P or [b,x] in P & [y,c] in P by A67,A80; [a,b] in P or [a,x] in P & [y,b] in P by A67,A79; then [a,c] in P or [a,x] in P & [y,c] in P or [a,x] in P & [y,c] in P or [y,x] in P by A62,A63,A64,A76,A77,A78,A81,RELAT_2:def 8; hence thesis by A66,A67,A76,A78; end; A82: Q is_antisymmetric_in X proof let a,b be set; assume that A83: a in X and A84: b in X and A85: [a,b] in Q and A86: [b,a] in Q; A87: [b,a] in P or [b,x] in P & [y,a] in P by A67,A86; [a,b] in P or [a,x] in P & [y,b] in P by A67,A85; then a = b or [a,x] in P & [y,a] in P or [y,x] in P by A62,A63,A64,A83 ,A84,A87,RELAT_2:def 4,def 8; hence thesis by A62,A63,A64,A66,A83,RELAT_2:def 8; end; Q is_reflexive_in X proof let z; assume A88: z in X; then [z,z] in P by A62,RELAT_2:def 1; hence thesis by A67,A88; end; then A89: Q partially_orders X by A75,A82,Def7; A90: Q c= [:X,X:] proof let y,z; assume A91: [y,z] in Q; then A92: z in X by A67; y in X by A67,A91; hence thesis by A92,ZFMISC_1:87; end; R c= Q by A59,A71,XBOOLE_1:1; then Q in Rel by A3,A90,A74,A89; then A93: Q = P by A57,A58,A71; A94: [y,y] in P by A62,A64,RELAT_2:def 1; [x,x] in P by A62,A63,RELAT_2:def 1; hence contradiction by A63,A64,A65,A67,A93,A94; end; thus thesis by A61; end; theorem R c= [:field R,field R:] by Lm4; theorem R is reflexive & X c= field R implies field(R|_2 X) = X by Lm5; theorem R is_reflexive_in X implies R|_2 X is reflexive by Lm6; theorem R is_transitive_in X implies R|_2 X is transitive by Lm7; theorem R is_antisymmetric_in X implies R|_2 X is antisymmetric by Lm8; theorem R is_connected_in X implies R|_2 X is connected by Lm9; theorem R is_connected_in X & Y c= X implies R is_connected_in Y by Lm10; theorem R well_orders X & Y c= X implies R well_orders Y by Lm17; theorem R is connected implies R~ is connected by Lm3; theorem R is_reflexive_in X implies R~ is_reflexive_in X by Lm11; theorem R is_transitive_in X implies R~ is_transitive_in X by Lm12; theorem R is_antisymmetric_in X implies R~ is_antisymmetric_in X by Lm13; theorem R is_connected_in X implies R~ is_connected_in X by Lm14; theorem (R|_2 X)~ = R~|_2 X by Lm15; theorem R|_2 {} = {} by Lm16; begin theorem Z is finite & Z c= rng f implies ex Y st Y c= dom f & Y is finite & f .:Y = Z proof assume that A1: Z is finite and A2: Z c= rng f; per cases; suppose A3: Z = {}; take Y = {}; thus Y c= dom f & Y is finite by XBOOLE_1:2; thus thesis by A3; end; suppose A4: Z <> {}; deffunc F(set) = f"{$1}; consider g being Function such that A5: dom g = Z and A6: for x st x in Z holds g.x = F(x) from FUNCT_1:sch 3; reconsider AA = rng g as non empty set by A4,A5,RELAT_1:42; set ff = the Choice_Function of AA; take Y = ff.:AA; A7: for X being set st X in AA holds X <> {} proof let X be set; assume X in AA; then consider x such that A8: x in dom g and A9: g.x=X by FUNCT_1:def 3; g.x = f"{x} by A5,A6,A8; hence thesis by A2,A5,A8,A9,FUNCT_1:72; end; then A10: not {} in AA; thus A11: Y c= dom f proof let x; assume x in Y; then consider y such that y in dom ff and A12: y in AA and A13: ff.y=x by FUNCT_1:def 6; y in g.:Z by A5,A12,RELAT_1:113; then consider z such that z in dom g and A14: z in Z and A15: g.z=y by FUNCT_1:def 6; A16: g.z = f"{z} by A6,A14; x in g.z by A10,A12,A13,A15,Def1; hence thesis by A16,FUNCT_1:def 7; end; AA = g.:Z by A5,RELAT_1:113; hence Y is finite by A1; set z = the Element of AA; set y = the Element of z; z <> {} by A7; then y in z; then reconsider AA9=union AA as non empty set by TARSKI:def 4; reconsider f9= ff as Function of AA,AA9; A17: dom f9 = AA by FUNCT_2:def 1; x in f.:Y iff x in Z proof thus x in f.:Y implies x in Z proof assume x in f.:(Y); then consider y such that y in dom f and A18: y in Y and A19: f.y = x by FUNCT_1:def 6; consider z such that A20: z in dom ff and z in AA and A21: ff.z=y by A18,FUNCT_1:def 6; consider a being set such that A22: a in dom g and A23: g.a=z by A20,FUNCT_1:def 3; g.a = f"{a} by A5,A6,A22; then y in f"{a} by A10,A20,A21,A23,Def1; then f.y in {a} by FUNCT_1:def 7; hence thesis by A5,A19,A22,TARSKI:def 1; end; set y=ff.(g.x); assume A24: x in Z; then A25: g.x in AA by A5,FUNCT_1:def 3; g.x = f"{x} by A6,A24; then y in f"{x} by A10,A25,Def1; then f.y in {x} by FUNCT_1:def 7; then A26: f.y = x by TARSKI:def 1; ff.(g.x) in rng ff by A17,A25,FUNCT_1:def 3; then y in Y by A17,RELAT_1:113; hence thesis by A11,A26,FUNCT_1:def 6; end; hence thesis by TARSKI:1; end; end; theorem Th86: field R is finite implies R is finite proof assume field R is finite; then reconsider A = field R as finite set; R c= [:A,A:] by Lm4; hence thesis; end; theorem dom R is finite & rng R is finite implies R is finite proof assume that A1: dom R is finite and A2: rng R is finite; field R is finite by A1,A2; hence thesis by Th86; end; registration cluster order_type_of {} -> empty; coherence proof {},RelIncl {} are_isomorphic by WELLORD1:38; hence thesis by WELLORD2:def 2; end; end; theorem for O being Ordinal holds order_type_of RelIncl O = O proof let O be Ordinal; RelIncl O is well-ordering & RelIncl O,RelIncl O are_isomorphic by WELLORD1:38; hence thesis by WELLORD2:def 2; end; begin reserve x,y,z,X,Y for set; theorem Th1: {x} c= {x,y,z} proof {x,y,z} = {x} \/ {y,z} by ENUMSET1:2; hence thesis by XBOOLE_1:7; end; theorem Th2: {x,y} c= {x,y,z} proof {x,y,z} = {x,y} \/ {z} by ENUMSET1:3; hence thesis by XBOOLE_1:7; end; canceled 3; theorem Th6: for X,Y for f being Function holds f.:(Y \ f"X) = f.:Y \ X proof let X,Y; let f be Function; now let x; thus x in f.:(Y \ f"X) implies x in f.:Y \ X proof assume x in f.:(Y \ f"X); then consider z such that A1: z in dom f and A2: z in Y \ f"X and A3: f.z = x by FUNCT_1:def 6; not z in f"X by A2,XBOOLE_0:def 5; then A4: not x in X by A1,A3,FUNCT_1:def 7; f.z in f.:Y by A1,A2,FUNCT_1:def 6; hence thesis by A3,A4,XBOOLE_0:def 5; end; assume A5: x in f.:Y \ X; then consider z such that A6: z in dom f and A7: z in Y and A8: f.z = x by FUNCT_1:def 6; not x in X by A5,XBOOLE_0:def 5; then not z in f"X by A8,FUNCT_1:def 7; then z in Y \ f"X by A7,XBOOLE_0:def 5; hence x in f.:(Y \ f"X) by A6,A8,FUNCT_1:def 6; end; hence thesis by TARSKI:1; end; reserve X,Y for non empty set, f for Function of X,Y; theorem Th7: for x being Element of X holds x in f"{f.x} proof let x be Element of X; f.x in {f.x} by TARSKI:def 1; hence thesis by FUNCT_2:38; end; theorem Th8: for x being Element of X holds Im(f,x) = {f.x} proof let x be Element of X; for y holds y in f.:{x} iff y = f.x proof let y; thus y in f.:{x} implies y = f.x proof assume y in f.:{x}; then ex z st z in dom f & z in {x} & f.z = y by FUNCT_1:def 6; hence thesis by TARSKI:def 1; end; x in {x} by TARSKI:def 1; hence thesis by FUNCT_2:35; end; hence thesis by TARSKI:def 1; end; theorem Th9: for B being Element of Fin X for x st x in B holds x is Element of X proof let B be Element of Fin X; A1: B c= X by FINSUB_1:def 5; let x; assume x in B; hence thesis by A1; end; theorem for A being (Element of Fin X), B being set for f being Function of X, Y st for x being Element of X holds x in A implies f.x in B holds f.:A c= B proof let A be (Element of Fin X), B be set; let f be Function of X,Y such that A1: for x being Element of X holds x in A implies f.x in B; let x be set; assume x in f.:A; then consider y being set such that y in dom f and A2: y in A and A3: x = f.y by FUNCT_1:def 6; reconsider y as Element of X by A2,Th9; x = f.y by A3; hence thesis by A1,A2; end; theorem Th11: for X being set for B being Element of Fin X for A being set st A c= B holds A is Element of Fin X proof let X be set, B be Element of Fin X; let A be set such that A1: A c= B; B c= X by FINSUB_1:def 5; then A c= X by A1,XBOOLE_1:1; hence thesis by A1,FINSUB_1:def 5; end; Lm1: for A being Element of Fin X holds f.: A is Element of Fin Y by FINSUB_1:def 5; theorem Th12: for B being Element of Fin X st B <> {} ex x being Element of X st x in B proof let B be Element of Fin X; set x = the Element of B; assume A1: B <> {}; then reconsider x as Element of X by Th9; take x; thus thesis by A1; end; theorem Th13: for A being Element of Fin X holds f.:A = {} implies A = {} proof let A be Element of Fin X; assume A1: f.:A = {}; assume A <> {}; then consider x being Element of X such that A2: x in A by Th12; f.x in f.:A by A2,FUNCT_2:35; hence contradiction by A1; end; registration let X be set; cluster empty for Element of Fin X; existence proof {} is Element of Fin X by FINSUB_1:7; hence thesis; end; end; definition let X be set; func {}.X -> empty Element of Fin X equals {}; coherence by FINSUB_1:7; end; scheme FinSubFuncEx{ A()->non empty set, B()->(Element of Fin A()), P[set,set] } : ex f being Function of A(), Fin A() st for b,a being Element of A() holds a in f.b iff a in B() & P[a,b] proof defpred X[set,Element of Fin A()] means for a being Element of A() holds a in $2 iff a in B() & P[a,$1]; A1: now reconsider B = B() as Subset of A() by FINSUB_1:def 5; let x be Element of A(); defpred X[set] means $1 in B() & P[$1,x]; consider y being Subset of A() such that A2: for a being Element of A() holds a in y iff X[a] from SUBSET_1:sch 3; for x being Element of A() holds x in y implies x in B by A2; then y c= B() by SUBSET_1:2; then reconsider y as Element of Fin A() by FINSUB_1:def 5; take y9 = y; thus X[x,y9] by A2; end; thus ex f being Function of A(), Fin A() st for x being Element of A() holds X[x,f.x] from FUNCT_2:sch 3(A1); end; definition let X be non empty set, F be BinOp of X; attr F is having_a_unity means :Def2: ex x being Element of X st x is_a_unity_wrt F; end; theorem Th14: for X being non empty set, F being BinOp of X holds F is having_a_unity iff the_unity_wrt F is_a_unity_wrt F proof let X be non empty set, F be BinOp of X; thus F is having_a_unity implies the_unity_wrt F is_a_unity_wrt F proof assume F is having_a_unity; then ex x being Element of X st x is_a_unity_wrt F by Def2; hence thesis by BINOP_1:def 8; end; thus thesis by Def2; end; theorem Th15: for X being non empty set, F being BinOp of X st F is having_a_unity for x being Element of X holds F.(the_unity_wrt F, x) = x & F.(x , the_unity_wrt F) = x proof let X be non empty set, F be BinOp of X; assume F is having_a_unity; then A1: the_unity_wrt F is_a_unity_wrt F by Th14; let x be Element of X; thus thesis by A1,BINOP_1:3; end; registration let X be non empty set; cluster non empty for Element of Fin X; existence proof set x = the Element of X; {x} is Subset of X by SUBSET_1:41; then {x} is Element of Fin X by FINSUB_1:def 5; hence thesis; end; end; notation let X be non empty set, x be Element of X; synonym {.x.} for {x}; let y be Element of X; synonym {.x,y.} for {x,y}; let z be Element of X; synonym {.x,y,z.} for {x,y,z}; end; definition let X be non empty set, x be Element of X; redefine func {.x.} -> Element of Fin X; coherence proof {x} is Subset of X by SUBSET_1:41; hence thesis by FINSUB_1:def 5; end; let y be Element of X; redefine func {.x,y.} -> Element of Fin X; coherence proof {x,y} is Subset of X by SUBSET_1:34; hence thesis by FINSUB_1:def 5; end; let z be Element of X; redefine func {.x,y,z.} -> Element of Fin X; coherence proof {x,y,z} is Subset of X by SUBSET_1:35; hence thesis by FINSUB_1:def 5; end; end; definition let X be set; let A,B be Element of Fin X; redefine func A \/ B -> Element of Fin X; coherence by FINSUB_1:1; end; definition let X be set; let A,B be Element of Fin X; redefine func A \ B -> Element of Fin X; coherence by FINSUB_1:1; end; scheme FinSubInd1{ X() -> non empty set, P[set] } : for B being Element of Fin X() holds P[B] provided A1: P[{}.X()] and A2: for B9 being (Element of Fin X()), b being Element of X() holds P[B9 ] & not b in B9 implies P[B9 \/ {b}] proof defpred X[set] means ex B9 being Element of Fin X() st B9 = $1 & P[B9]; let B be Element of Fin X(); A3: for x,A being set st x in B & A c= B & X[A] holds X[A \/ {x}] proof let x,A be set such that A4: x in B and A5: A c= B and A6: ex B9 being Element of Fin X() st B9 = A & P[B9]; reconsider x9 = x as Element of X() by A4,Th9; reconsider A9 = A as Element of Fin X() by A5,Th11; take A9 \/ {.x9.}; thus A9 \/ {.x9.} = A \/ {x}; thus P[A9 \/ {x9}] by A2,A6,ZFMISC_1:40; end; A7: B is finite; A8: X[{}] by A1; X[B] from FINSET_1:sch 2(A7,A8,A3); hence thesis; end; scheme FinSubInd2{ X() -> non empty set, P[Element of Fin X()] } : for B being non empty Element of Fin X() holds P[B] provided A1: for x being Element of X() holds P[{.x.}] and A2: for B1,B2 being non empty Element of Fin X() st P[B1] & P[B2] holds P[B1 \/ B2] proof defpred X[set] means $1 <> {} implies ex B9 being Element of Fin X() st B9 = $1 & P[B9]; let B be non empty Element of Fin X(); A3: for x,A being set st x in B & A c= B & X[A] holds X[A \/ {x}] proof let x,A be set such that A4: x in B and A5: A c= B and A6: A <> {} implies ex B9 being Element of Fin X() st B9 = A & P[B9] and A \/ {x} <> {}; reconsider x9 = x as Element of X() by A4,Th9; reconsider A9 = A as Element of Fin X() by A5,Th11; take A9 \/ {.x9.}; thus A9 \/ {.x9.} =A \/ {x}; A7: P[{.x9.}] by A1; per cases; suppose A = {}; hence thesis by A1; end; suppose A <> {}; hence thesis by A2,A6,A7; end; end; A8: X[{}]; A9: B is finite; X[B] from FINSET_1:sch 2(A9,A8,A3); hence thesis; end; scheme FinSubInd3{ X() -> non empty set, P[set] } : for B being Element of Fin X() holds P[B] provided A1: P[{}.X()] and A2: for B9 being (Element of Fin X()), b being Element of X() holds P[B9 ] implies P[B9 \/ {b}] proof A3: for B9 being (Element of Fin X()), b being Element of X() holds P[B9] & not b in B9 implies P[B9 \/ {b}] by A2; A4: P[{}.X()] by A1; thus for B being Element of Fin X() holds P[B] from FinSubInd1(A4, A3); end; definition let X, Y be non empty set; let F be BinOp of Y; let B be Element of Fin X; let f be Function of X,Y; assume that A1: B <> {} or F is having_a_unity and A2: F is commutative and A3: F is associative; func F $$ (B,f) -> Element of Y means :Def3: ex G being Function of Fin X, Y st it = G.B & (for e being Element of Y st e is_a_unity_wrt F holds G.{} = e) & (for x being Element of X holds G.{x} = f.x) & for B9 being Element of Fin X st B9 c= B & B9 <> {} for x being Element of X st x in B \ B9 holds G.(B9 \/ {x}) = F.(G.B9,f.x); existence proof defpred X[set] means ex G being Function of Fin X, Y st (for e being Element of Y st e is_a_unity_wrt F holds G.{} = e) & (for x being Element of X holds G.{x} = f.x) & for B9 being Element of Fin X st B9 c= $1 & B9 <> {} for x being Element of X st x in $1 \ B9 holds G.(B9 \/ {x}) = F.(G.B9, f.x); A4: for B9 being Element of Fin X, b being Element of X holds X[B9] & not b in B9 implies X[B9 \/ {b}] proof let B be (Element of Fin X), x be Element of X; given G being Function of Fin X, Y such that A5: for e being Element of Y st e is_a_unity_wrt F holds G.{} = e and A6: for x being Element of X holds G.{x} = f.x and A7: for B9 being Element of Fin X st B9 c= B & B9 <> {} for x being Element of X st x in B \ B9 holds G.(B9 \/ {x}) = F.(G.B9, f.x); assume A8: not x in B; thus ex G being Function of Fin X, Y st (for e being Element of Y st e is_a_unity_wrt F holds G.{} = e) & (for x being Element of X holds G.{x} = f.x) & for B9 being Element of Fin X st B9 c= B \/ {x} & B9 <> {} for x9 being Element of X st x9 in (B \/ {x}) \ B9 holds G.(B9 \/ {x9}) = F.(G.B9, f.x9) proof defpred X[set,set] means (for C being Element of Fin X st C <> {} & C c= B & $1 = C \/ {.x.} holds $2 = F.(G.C, f.x)) & ((not ex C being Element of Fin X st C <> {} & C c= B & $1 = C \/ {.x.}) implies $2 = G.$1); A9: now let B9 be Element of Fin X; thus ex y being Element of Y st X[B9,y] proof A10: now given C being Element of Fin X such that A11: C <> {} and A12: C c= B and A13: B9 = C \/ {x}; take y = F.(G.C, f.x); for C being Element of Fin X st C <> {} & C c= B & B9 = C \/ {x} holds y = F.(G.C, f.x) proof not x in C by A8,A12; then A14: C c= B9 \ {x} by A13,XBOOLE_1:7,ZFMISC_1:34; B9 \ {x} = C \ {x} by A13,XBOOLE_1:40; then A15: B9 \ {x} = C by A14,XBOOLE_0:def 10; let C1 be Element of Fin X such that C1 <> {} and A16: C1 c= B and A17: B9 = C1 \/ {x}; not x in C1 by A8,A16; then A18: C1 c= B9 \ {x} by A17,XBOOLE_1:7,ZFMISC_1:34; B9 \{x} = C1 \ {x} by A17,XBOOLE_1:40; hence thesis by A18,A15,XBOOLE_0:def 10; end; hence thesis by A11,A12,A13; end; now assume A19: not ex C being Element of Fin X st C <> {} & C c= B & B9 = C \/ {x}; take y = G.B9; thus for C being Element of Fin X st C <> {} & C c= B & B9 = C \/ {x} holds y = F.(G.C, f.x) by A19; thus (not ex C being Element of Fin X st C <> {} & C c= B & B9 = C \/ {x}) implies y = G.B9; end; hence thesis by A10; end; end; consider H being Function of Fin X, Y such that A20: for B9 being Element of Fin X holds X[B9,H.B9] from FUNCT_2: sch 3 (A9); take J = H; now given C being Element of Fin X such that A21: C <> {} and A22: C c= B and A23: {x} = C \/ {x}; C = {x} by A21,ZFMISC_1:33,A23,XBOOLE_1:7; then x in C by TARSKI:def 1; hence contradiction by A8,A22; end; then A24: J.{x} = G.{.x.} by A20; thus for e being Element of Y st e is_a_unity_wrt F holds J.{} = e proof reconsider E = {} as Element of Fin X by FINSUB_1:7; not ex C being Element of Fin X st C <> {} & C c= B & E = C \/ { x}; then J.E = G.E by A20; hence thesis by A5; end; thus for x being Element of X holds J.{x} = f.x proof let x9 be Element of X; now given C being Element of Fin X such that A25: C <> {} and A26: C c= B and A27: {x9} = C \/ {x}; A28: C = {x9} by A25,ZFMISC_1:33,A27,XBOOLE_1:7; x = x9 by A27,XBOOLE_1:7,ZFMISC_1:18; then x in C by A28,TARSKI:def 1; hence contradiction by A8,A26; end; hence J.{x9} = G.{.x9.} by A20 .= f.x9 by A6; end; let B9 be Element of Fin X such that A29: B9 c= B \/ {x} and A30: B9 <> {}; let x9 be Element of X; assume A31: x9 in (B \/ {x}) \ B9; then A32: not x9 in B9 by XBOOLE_0:def 5; per cases; suppose A33: x in B9; then A34: x9 in B by A31,A32,ZFMISC_1:136; per cases; suppose A36: B9 = {x}; hence J.(B9 \/ {.x9.}) = F.(G.{.x9.}, f.x) by A20,ZFMISC_1:31,A34 .= F.(f.x9, f.x) by A6 .= F.(f.x, f.x9) by A2,BINOP_1:def 2 .= F.(J.B9, f.x9) by A6,A24,A36; end; suppose B9 <> {x}; then not B9 c= {x} by A30,ZFMISC_1:33; then A37: B9 \ {x} <> {} by XBOOLE_1:37; set C = (B9 \ {.x.}) \/ {.x9.}; not x9 in B9 \ {x} by A31,XBOOLE_0:def 5; then A38: x9 in B \(B9 \ {x}) by A34,XBOOLE_0:def 5; B9 \ {x} c= B by A29,XBOOLE_1:43; then A39: C c= B by A33,ZFMISC_1:137,A31,A32,ZFMISC_1:136; B9 \/ {.x9.} = B9 \/ {x} \/ {x9} by A33,ZFMISC_1:40 .= (B9 \ {x}) \/ {x} \/ {x9} by XBOOLE_1:39 .= C \/ {.x.} by XBOOLE_1:4; hence J.(B9 \/ {.x9.}) = F.(G.C, f.x) by A20,A39 .= F.(F.(G.(B9\{.x.}), f.x9), f.x) by A7,A29,A37,A38,XBOOLE_1:43 .= F.(G.(B9\{.x.}),F.(f.x9, f.x)) by A3,BINOP_1:def 3 .= F.(G.(B9\{x}),F.(f.x, f.x9)) by A2,BINOP_1:def 2 .= F.(F.(G.(B9\{.x.}), f.x), f.x9) by A3,BINOP_1:def 3 .= F.(J.((B9\{.x.})\/{.x.}), f.x9) by A20,A29,A37,XBOOLE_1:43 .= F.(J.(B9 \/ {x}), f.x9) by XBOOLE_1:39 .= F.(J.B9, f.x9) by A33,ZFMISC_1:40; end; end; suppose A40: not x in B9; then A41: B9 c= B by A29,ZFMISC_1:135; A42: not ex C being Element of Fin X st C <> {} & C c= B & B9 = C \/ {x} by A40,ZFMISC_1:136; per cases; suppose A43: x <> x9; then x9 in B by A31,ZFMISC_1:136; then A44: x9 in B \ B9 by A32,XBOOLE_0:def 5; not x in B9 \/ {x9} by A40,A43,ZFMISC_1:136; then not ex C being Element of Fin X st C <> {} & C c= B & B9 \/ {x9} = C \/ {x} by ZFMISC_1:136; hence J.(B9 \/ {.x9.}) = G.(B9 \/ {.x9.}) by A20 .= F.(G.B9, f.x9) by A7,A30,A41,A44 .= F.(J.B9, f.x9) by A20,A42; end; suppose x = x9; hence J.(B9 \/ {.x9.}) = F.(G.B9, f.x9) by A20,A29,A30,A40,ZFMISC_1:135 .= F.(J.B9, f.x9) by A20,A42; end; end; end; end; A45: X[{}.X] proof consider e being Element of Y such that A46: (ex e being Element of Y st e is_a_unity_wrt F) implies e = the_unity_wrt F; defpred X[set,set] means (for x9 being Element of X st $1 = {x9} holds $2 = f.x9) & (not (ex x9 being Element of X st $1 = {x9}) implies $2 = e); A47: now let x be Element of Fin X; A48: now given x9 being Element of X such that A49: x = {x9}; take y = f.x9; thus for x9 being Element of X st x = {x9} holds y = f.x9 by A49, ZFMISC_1:3; thus not (ex x9 being Element of X st x = {x9}) implies y = e by A49; end; now assume A50: not ex x9 being Element of X st x = {x9}; take y = e; thus (for x9 being Element of X st x = {x9} holds y = f.x9) & (not ( ex x9 being Element of X st x = {x9}) implies y = e) by A50; end; hence ex y being Element of Y st X[x,y] by A48; end; consider G9 being Function of Fin X, Y such that A51: for B9 being Element of Fin X holds X[B9,G9.B9] from FUNCT_2: sch 3(A47 ); take G = G9; thus for e being Element of Y st e is_a_unity_wrt F holds G.{} = e proof reconsider E = {} as Element of Fin X by FINSUB_1:7; let e9 be Element of Y such that A52: e9 is_a_unity_wrt F; not ex x9 being Element of X st E = {x9}; hence G.{} = e by A51 .= e9 by A46,A52,BINOP_1:def 8; end; thus for x being Element of X holds G.{.x.} = f.x by A51; thus for B9 being Element of Fin X st B9 c= {}.X & B9 <> {} for x being Element of X st x in {}.X \ B9 holds G.(B9 \/ {x}) = F.(G.B9, f.x); end; for B being Element of Fin X holds X[B] from FinSubInd1(A45,A4); then consider G being Function of Fin X, Y such that A53: ( ( for e being Element of Y st e is_a_unity_wrt F holds G.{} = e)& for x being Element of X holds G.{x} = f.x )& for B9 being Element of Fin X st B9 c= B & B9 <> {} for x being Element of X st x in B \ B9 holds G.(B9 \/ {x }) = F.(G .B9, f.x); take G.B, G; thus thesis by A53; end; uniqueness proof let x,y be Element of Y; given G1 being Function of Fin X, Y such that A54: x = G1.B and A55: for e being Element of Y st e is_a_unity_wrt F holds G1.{} = e and A56: for x being Element of X holds G1.{x} = f.x and A57: for B9 being Element of Fin X st B9 c= B & B9 <> {} for x being Element of X st x in B \ B9 holds G1.(B9 \/ {x}) = F.(G1.B9,f.x); given G2 being Function of Fin X, Y such that A58: y = G2.B and A59: for e being Element of Y st e is_a_unity_wrt F holds G2.{} = e and A60: for x being Element of X holds G2.{x} = f.x and A61: for B9 being Element of Fin X st B9 c= B & B9 <> {} for x being Element of X st x in B \ B9 holds G2.(B9 \/ {x}) = F.(G2.B9,f.x); per cases; suppose A62: B = {}; thus x = the_unity_wrt F by A54,A55,A62,A1,Th14 .= y by A58,A59,A62,A1,Th14; end; suppose A64: B <> {}; defpred X[set] means $1 c= B & $1 <> {} implies G1.$1 = G2.$1; A65: for B9 being Element of Fin X, b being Element of X holds X[B9] & not b in B9 implies X[B9 \/ {b}] proof let B9 be (Element of Fin X), x be Element of X; assume A66: B9 c= B & B9 <> {} implies G1.B9 = G2.B9; assume A67: not x in B9; assume A68: B9 \/ {x} c= B; then A69: B9 c= B by ZFMISC_1:137; assume B9 \/ {x} <> {}; x in B by A68,ZFMISC_1:137; then A70: x in B \ B9 by A67,XBOOLE_0:def 5; per cases; suppose A71: B9 = {}; hence G1.(B9 \/ {x}) = f.x by A56 .= G2.(B9 \/ {x}) by A60,A71; end; suppose A72: B9 <> {}; hence G1.(B9 \/ {x}) = F.(G1.B9, f.x) by A57,A69,A70 .= G2.(B9 \/ {x}) by A61,A66,A69,A70,A72; end; end; A73: X[{}.X]; for B9 being Element of Fin X holds X[B9] from FinSubInd1(A73, A65 ); hence thesis by A54,A58,A64; end; end; end; theorem Th16: for X, Y being non empty set for F being BinOp of Y for B being Element of Fin X for f being Function of X,Y st (B <> {} or F is having_a_unity ) & F is idempotent & F is commutative & F is associative for IT being Element of Y holds IT = F $$ (B,f) iff ex G being Function of Fin X, Y st IT = G.B & ( for e being Element of Y st e is_a_unity_wrt F holds G.{} = e) & (for x being Element of X holds G.{x} = f.x) & for B9 being Element of Fin X st B9 c= B & B9 <> {} for x being Element of X st x in B holds G.(B9 \/ {x}) = F.(G.B9,f.x) proof let X, Y be non empty set; let F be BinOp of Y; let B be Element of Fin X; let f be Function of X,Y; assume that A1: B <> {} or F is having_a_unity and A2: F is idempotent and A3: F is commutative and A4: F is associative; let IT be Element of Y; thus IT = F $$ (B,f) implies ex G being Function of Fin X, Y st IT = G.B & ( for e being Element of Y st e is_a_unity_wrt F holds G.{} = e) & (for x being Element of X holds G.{x} = f.x) & for B9 being Element of Fin X st B9 c= B & B9 <> {} for x being Element of X st x in B holds G.(B9 \/ {x}) = F.(G.B9,f.x) proof assume IT = F $$ (B,f); then consider G being Function of Fin X, Y such that A5: IT = G.B & for e being Element of Y st e is_a_unity_wrt F holds G. {} = e and A6: for x being Element of X holds G.{x} = f.x and A7: for B9 being Element of Fin X st B9 c= B & B9 <> {} for x being Element of X st x in B \ B9 holds G.(B9 \/ {x}) = F.(G.B9,f.x) by A1,A3,A4 ,Def3; for B9 being Element of Fin X st B9 c= B & B9 <> {} for x being Element of X st x in B holds G.(B9 \/ {x}) = F.(G.B9,f.x) proof let B9 be Element of Fin X such that A8: B9 c= B and A9: B9 <> {}; let x be Element of X such that A10: x in B; per cases; suppose x in B9; then A11: B9 \/ {x} = B9 by ZFMISC_1:40; then A12: {x} c= B9 by XBOOLE_1:7; not x in B9 \ {x} by ZFMISC_1:56; then A13: x in B \ (B9 \ {x}) by A10,XBOOLE_0:def 5; per cases; suppose A14: B9 = {x}; hence G.(B9 \/ {x}) = F.(f.x, f.x) by A2,A6 .= F.(G.B9,f.x) by A6,A14; end; suppose B9 <> {x}; then not B9 c= {x} by A12,XBOOLE_0:def 10; then B9 \ {x} <> {} by XBOOLE_1:37; then A15: G.(B9 \ {.x.} \/ {.x.}) = F.(G.(B9 \ {.x.}), f.x) by A7,A8,A13, XBOOLE_1:1; thus G.(B9 \/ {x}) = F.(G.(B9 \ {x}), F.(f.x,f.x)) by A2,A15,XBOOLE_1:39 .= F.(F.(G.(B9 \ {.x.}),f.x), f.x) by A4,BINOP_1:def 3 .= F.(G.B9,f.x) by A11,A15,XBOOLE_1:39; end; end; suppose not x in B9; then x in B \ B9 by A10,XBOOLE_0:def 5; hence thesis by A7,A8,A9; end; end; hence thesis by A5,A6; end; given G being Function of Fin X, Y such that A16: ( IT = G.B & for e being Element of Y st e is_a_unity_wrt F holds G .{} = e ) & for x being Element of X holds G.{x} = f.x and A17: for B9 being Element of Fin X st B9 c= B & B9 <> {} for x being Element of X st x in B holds G.(B9 \/ {x}) = F.(G.B9,f.x); for B9 being Element of Fin X st B9 c= B & B9 <> {} for x being Element of X st x in B \ B9 holds G.(B9 \/ {x}) = F.(G.B9,f.x) proof let B9 be Element of Fin X such that A18: B9 c= B & B9 <> {}; let x be Element of X; assume x in B \ B9; then x in B by XBOOLE_0:def 5; hence thesis by A17,A18; end; hence thesis by A1,A3,A4,A16,Def3; end; reserve X, Y for non empty set, F for (BinOp of Y), B for (Element of Fin X), f for Function of X,Y; theorem Th17: F is commutative & F is associative implies for b being Element of X holds F $$ ({.b.},f) = f.b proof assume A1: F is commutative & F is associative; let b be Element of X; ex G being Function of Fin X, Y st F $$ ({.b.},f) = G.{b} & (for e being Element of Y st e is_a_unity_wrt F holds G.{} = e) & ( for x being Element of X holds G.{x} = f.x) & for B9 being Element of Fin X st B9 c= {b} & B9 <> {} for x being Element of X st x in {b} \ B9 holds G.(B9 \/ {x}) = F.(G.B9,f.x) by A1 ,Def3; hence thesis; end; theorem Th18: F is idempotent & F is commutative & F is associative implies for a,b being Element of X holds F $$ ({.a,b.},f) = F.(f.a, f.b) proof assume A1: F is idempotent & F is commutative & F is associative; let a,b be Element of X; consider G being Function of Fin X, Y such that A2: F $$ ({.a,b.},f) = G.{a,b} and for e being Element of Y st e is_a_unity_wrt F holds G.{} = e and A3: for x being Element of X holds G.{x} = f.x and A4: for B9 being Element of Fin X st B9 c= {a,b} & B9 <> {} for x being Element of X st x in {a,b} holds G.(B9 \/ {x}) = F.(G.B9,f.x) by A1,Th16; A5: b in {a,b} by TARSKI:def 2; thus F $$ ({.a,b.},f) = G.({.a.} \/ {.b.}) by A2,ENUMSET1:1 .= F.(G.{.a.}, f.b) by A4,A5,ZFMISC_1:7 .= F.(f.a, f.b) by A3; end; theorem Th19: F is idempotent & F is commutative & F is associative implies for a,b,c being Element of X holds F $$ ({.a,b,c.},f) = F.(F.(f.a, f.b), f.c) proof assume A1: F is idempotent & F is commutative & F is associative; let a,b,c be Element of X; consider G being Function of Fin X, Y such that A2: F $$ ({.a,b,c.},f) = G.{a,b,c} and for e being Element of Y st e is_a_unity_wrt F holds G.{} = e and A3: for x being Element of X holds G.{x} = f.x and A4: for B9 being Element of Fin X st B9 c= {a,b,c} & B9 <> {} for x being Element of X st x in {a,b,c} holds G.(B9 \/ {x}) = F.(G.B9,f.x) by A1 ,Th16; A5: b in {a,b,c} by ENUMSET1:def 1; A6: G.{a,b} = G.({a} \/ {b}) by ENUMSET1:1 .= F.(G.{.a.}, f.b) by A4,A5,Th1 .= F.(f.a, f.b) by A3; A7: c in {a,b,c} by ENUMSET1:def 1; thus F $$ ({.a,b,c.},f) = G.({.a,b.} \/ {.c.}) by A2,ENUMSET1:3 .= F.(F.(f.a, f.b), f.c) by A4,A6,A7,Th2; end; theorem Th20: F is idempotent & F is commutative & F is associative & B <> {} implies for x being Element of X holds F $$(B \/ {.x.}, f) = F.(F $$(B,f),f.x) proof assume A1: F is idempotent & F is commutative & F is associative; assume A2: B <> {}; then consider G9 being Function of Fin X, Y such that A3: F $$ (B,f) = G9.B and for e being Element of Y st e is_a_unity_wrt F holds G9.{} = e and A4: for x being Element of X holds G9.{x} = f.x and A5: for B9 being Element of Fin X st B9 c= B & B9 <> {} for x being Element of X st x in B holds G9.(B9 \/ {x}) = F.(G9.B9,f.x) by A1,Th16; let x be Element of X; consider G being Function of Fin X, Y such that A6: F $$ (B \/ {.x.},f) = G.(B \/ {.x.}) and for e being Element of Y st e is_a_unity_wrt F holds G.{} = e and A7: for x being Element of X holds G.{x} = f.x and A8: for B9 being Element of Fin X st B9 c= B \/ {x} & B9 <> {} for x9 being Element of X st x9 in B \/ {x} holds G.(B9 \/ {x9}) = F.(G.B9,f.x9) by A1 ,Th16; defpred X[set] means $1 <> {} & $1 c= B implies G.$1 = G9.$1; A9: for B9 being Element of Fin X, b being Element of X holds X[B9] implies X[B9 \/ {b}] proof A10: B c= B \/ {x} by XBOOLE_1:7; let C be (Element of Fin X), y be Element of X such that A11: C <> {} & C c= B implies G.C = G9.C; assume that C \/ {y} <> {} and A12: C \/ {y} c= B; A13: C c= B & y in B by A12,ZFMISC_1:137; per cases; suppose A14: C = {}; hence G.(C \/ {y}) = f.y by A7 .= G9.(C \/ {y}) by A4,A14; end; suppose A15: C <> {}; hence G.(C \/ {y}) = F.(G9.C, f.y) by A8,A11,A13,A10,XBOOLE_1:1 .= G9.(C \/ {y}) by A5,A13,A15; end; end; A16: X[{}.X]; A17: for C being Element of Fin X holds X[C] from FinSubInd3(A16,A9); x in B \/ {x} by ZFMISC_1:136; hence F $$(B \/ {.x.}, f) = F.(G.B, f.x) by A2,A6,A8,XBOOLE_1:7 .= F.(F $$(B,f),f.x) by A2,A3,A17; end; theorem Th21: F is idempotent & F is commutative & F is associative implies for B1,B2 being Element of Fin X st B1 <> {} & B2 <> {} holds F $$ (B1 \/ B2,f) = F.(F $$ (B1,f),F $$ (B2,f)) proof assume that A1: F is idempotent and A2: F is commutative and A3: F is associative; let B1,B2 be Element of Fin X; defpred X[Element of Fin X] means $1 <> {} implies F $$ (B1 \/ $1,f) = F.(F $$ (B1,f),F $$ ($1,f)); assume A4: B1 <> {}; A5: for B9 being Element of Fin X, b being Element of X holds X[B9] implies X[B9 \/ {.b.}] proof let B be (Element of Fin X), x be Element of X such that A6: B <> {} implies F $$ (B1 \/ B,f) = F.(F $$ (B1,f),F $$ (B,f)) and B \/ {x} <> {}; per cases; suppose A7: B = {}; hence F $$ (B1 \/ (B \/ {.x.}),f) = F.(F $$ (B1,f), f.x) by A1,A2,A3,A4,Th20 .= F.(F $$ (B1,f),F $$ (B \/ {.x.},f)) by A2,A3,A7,Th17; end; suppose A8: B <> {}; thus F $$ (B1 \/ (B \/ {.x.}),f) = F $$ (B1 \/ B \/ {.x.},f) by XBOOLE_1:4 .= F.(F.(F $$ (B1,f),F $$ (B,f)), f.x) by A1,A2,A3,A6,A8,Th20 .= F.(F $$ (B1,f),F.(F $$ (B,f), f.x)) by A3,BINOP_1:def 3 .= F.(F $$ (B1,f),F $$ (B \/ {.x.},f)) by A1,A2,A3,A8,Th20; end; end; A9: X[{}.X]; for B2 being Element of Fin X holds X[B2] from FinSubInd3(A9,A5); hence thesis; end; theorem F is commutative & F is associative & F is idempotent implies for x being Element of X st x in B holds F.(f.x,F$$(B,f)) = F$$(B,f) proof assume that A1: F is commutative & F is associative and A2: F is idempotent; let x be Element of X; assume A3: x in B; thus F.(f.x,F$$(B,f)) = F.(F$$({.x.},f), F$$(B,f)) by A1,Th17 .= F$$({.x.} \/ B, f) by A1,A2,A3,Th21 .= F$$(B,f) by A3,ZFMISC_1:40; end; theorem F is commutative & F is associative & F is idempotent implies for B,C being Element of Fin X st B <> {} & B c= C holds F.(F$$(B,f),F$$(C,f)) = F$$(C, f) proof assume A1: F is commutative & F is associative & F is idempotent; let B,C be Element of Fin X such that A2: B <> {} and A3: B c= C; C <> {} by A2,A3; hence F.(F$$(B,f),F$$(C,f)) = F$$(B \/ C,f) by A1,A2,Th21 .= F$$(C,f) by A3,XBOOLE_1:12; end; theorem Th24: B <> {} & F is commutative & F is associative & F is idempotent implies for a being Element of Y st for b being Element of X st b in B holds f. b = a holds F$$(B,f) = a proof assume that A1: B <> {} and A2: F is commutative & F is associative and A3: F is idempotent; let a be Element of Y; defpred X[Element of Fin X] means (for b being Element of X st b in $1 holds f.b = a) implies F$$($1,f) = a; A4: for B1,B2 being non empty Element of Fin X holds X[B1] & X[B2] implies X [B1 \/ B2] proof let B1,B2 be non empty Element of Fin X; assume that A5: ( (for b being Element of X st b in B1 holds f.b = a) implies F$$ (B1,f) = a)&( (for b being Element of X st b in B2 holds f.b = a) implies F$$( B2,f) = a) and A6: for b being Element of X st b in B1 \/ B2 holds f.b = a; A7: now let b be Element of X; assume b in B2; then b in B1 \/ B2 by XBOOLE_0:def 3; hence f.b = a by A6; end; now let b be Element of X; assume b in B1; then b in B1 \/ B2 by XBOOLE_0:def 3; hence f.b = a by A6; end; hence F$$(B1 \/ B2,f) = F.(a,a) by A2,A3,A5,A7,Th21 .= a by A3; end; A8: for x being Element of X holds X[{.x.}] proof let x be Element of X such that A9: for b being Element of X st b in {x} holds f.b = a; A10: x in { x } by TARSKI:def 1; thus F$$({.x.},f) = f.x by A2,Th17 .= a by A9,A10; end; for B being non empty Element of Fin X holds X[B] from FinSubInd2(A8, A4); hence thesis by A1; end; theorem Th25: F is commutative & F is associative & F is idempotent implies for a being Element of Y st f.:B = {a} holds F$$(B,f) = a proof assume A1: F is commutative & F is associative & F is idempotent; let a be Element of Y; assume A2: f.:B = {a}; A3: for b being Element of X st b in B holds f.b = a proof let b be Element of X; assume b in B; then f.b in {a} by A2,FUNCT_2:35; hence thesis by TARSKI:def 1; end; B <> {} by A2; hence thesis by A1,A3,Th24; end; theorem Th26: F is commutative & F is associative & F is idempotent implies for f,g being Function of X,Y for A,B being Element of Fin X st A <> {} & f.:A = g.:B holds F$$(A,f) = F$$(B,g) proof assume that A1: F is commutative and A2: F is associative and A3: F is idempotent; let f,g be Function of X,Y; defpred X[Element of Fin X] means $1 <> {} implies for B being Element of Fin X st f.:$1 = g.:B holds F$$($1,f) = F$$(B,g); A4: for B9 being Element of Fin X, b being Element of X holds X[B9] implies X[B9 \/ {.b.}] proof let A be (Element of Fin X), x be Element of X such that A5: A <> {} implies for B being Element of Fin X st f.:A = g.:B holds F$$(A,f) = F$$(B,g); assume A \/ {x} <> {}; let B be Element of Fin X such that A6: f.:(A \/ {x}) = g.:B; per cases; suppose f.x in f.:A; then consider x9 being Element of X such that A7: x9 in A and A8: f.x9 = f.x by FUNCT_2:65; A9: g.:B = f.:A \/ Im(f,x) by A6,RELAT_1:120 .= f.:A \/ {f.x} by Th8 .= f.:A by A7,A8,FUNCT_2:35,ZFMISC_1:40; thus F$$(A \/ {.x.},f) = F.(F$$(A,f), f.x) by A1,A2,A3,A7,Th20 .= F.(F$$(A \/ {.x9.},f), f.x) by A7,ZFMISC_1:40 .= F.(F.(F$$(A,f), f.x9), f.x) by A1,A2,A3,A7,Th20 .= F.(F$$(A,f), F.(f.x9, f.x9)) by A2,A8,BINOP_1:def 3 .= F$$(A \/ {.x9.},f) by A1,A2,A3,A7,Th20 .= F$$(A,f) by A7,ZFMISC_1:40 .= F$$(B,g) by A5,A7,A9; end; suppose A10: not f.x in f.:A; per cases; suppose A11: A = {}; then A12: g.:B = Im(f,x) by A6 .= {f.x} by Th8; thus F$$(A \/ {.x.},f) = f.x by A1,A2,A11,Th17 .= F$$(B,g) by A1,A2,A3,A12,Th25; end; suppose A13: A <> {}; reconsider B1 = B \ g"{f.x} as Element of Fin X by Th11; A14: now assume B1 = {}; then A15: g.:B c= g.:g"{f.x} by RELAT_1:123,XBOOLE_1:37; g.:g"{f.x} c= {f.x} by FUNCT_1:75; then f.:(A \/ {x}) c= {f.x} by A6,A15,XBOOLE_1:1; then f.:A \/ f.:{x} c= {f.x} by RELAT_1:120; then f.:A = f.:A /\ {f.x} by XBOOLE_1:11,28 .= {} by A10,ZFMISC_1:50,XBOOLE_0:def 7; hence contradiction by A13,Th13; end; reconsider B2 = B /\ g"{f.x} as Element of Fin X by Th11,XBOOLE_1:17; A17: B = B1 \/ B2 by XBOOLE_1:51; A18: for b being Element of X st b in B2 holds g.b = f.x proof let b be Element of X; assume b in B2; then b in g"{f.x} by XBOOLE_0:def 4; then g.b in {f.x} by FUNCT_1:def 7; hence thesis by TARSKI:def 1; end; A19: f.:A = f.:A \ {f.x} by A10,ZFMISC_1:57 .= f.:A \ Im(f,x) by Th8 .= (f.:A \/ f.:{x}) \ f.:{x} by XBOOLE_1:40 .= f.:(A \/ {x}) \ Im(f,x) by RELAT_1:120 .= g.:B \ {f.x} by A6,Th8 .= g.:B1 by Th6; x in A \/ {x} by ZFMISC_1:136; then consider x9 being Element of X such that A20: x9 in B and A21: g.x9 = f.x by A6,FUNCT_2:35,65; x9 in g"{f.x} by A21,Th7; then A22: B2 <> {} by A20,XBOOLE_0:def 4; thus F$$(A \/ {.x.},f) = F.(F$$(A,f), f.x) by A1,A2,A3,A13,Th20 .= F.(F$$(B1,g), f.x) by A5,A13,A19 .= F.(F$$(B1,g), F$$(B2,g)) by A1,A2,A3,A22,A18,Th24 .= F$$(B,g) by A1,A2,A3,A17,A14,A22,Th21; end; end; end; A23: X[{}.X]; A24: for A being Element of Fin X holds X[A] from FinSubInd3(A23,A4); let A,B be Element of Fin X; assume A <> {} & f.:A = g.:B; hence thesis by A24; end; theorem for F,G being BinOp of Y st F is idempotent & F is commutative & F is associative & G is_distributive_wrt F for B being Element of Fin X st B <> {} for f being Function of X,Y for a being Element of Y holds G.(a,F$$(B,f)) = F$$ (B,G[;](a,f)) proof let F,G be BinOp of Y such that A1: F is idempotent and A2: F is commutative & F is associative and A3: G is_distributive_wrt F; let B be Element of Fin X such that A4: B<> {}; let f be Function of X,Y; let a be Element of Y; defpred X[Element of Fin X] means G.(a,F$$($1,f)) = F$$($1,G[;](a,f)); A5: for B1,B2 being non empty Element of Fin X holds X[B1] & X[B2] implies X [B1 \/ B2] proof let B1,B2 be non empty Element of Fin X; assume A6: G.(a,F$$(B1,f)) = F$$(B1,G[;](a,f)) & G.(a,F$$(B2,f)) = F$$(B2,G [;](a,f)); thus G.(a,F$$(B1 \/ B2,f)) = G.(a,F.(F$$(B1,f),F$$(B2,f))) by A1,A2,Th21 .= F.(F$$(B1,G[;](a,f)), F$$(B2,G[;] (a,f))) by A3,A6,BINOP_1:11 .= F$$(B1 \/ B2,G[;](a,f)) by A1,A2,Th21; end; A7: for x being Element of X holds X[{.x.}] proof let x be Element of X; thus G.(a,F$$({.x.},f)) = G.(a,f.x) by A2,Th17 .= (G[;](a,f)).x by FUNCOP_1:53 .= F$$({.x.},G[;](a,f)) by A2,Th17; end; for B being non empty Element of Fin X holds X[B] from FinSubInd2(A7, A5); hence thesis by A4; end; theorem for F,G being BinOp of Y st F is idempotent & F is commutative & F is associative & G is_distributive_wrt F for B being Element of Fin X st B <> {} for f being Function of X,Y for a being Element of Y holds G.(F$$(B,f),a) = F$$ (B,G[:](f,a)) proof let F,G be BinOp of Y such that A1: F is idempotent and A2: F is commutative & F is associative and A3: G is_distributive_wrt F; let B be Element of Fin X such that A4: B<> {}; let f be Function of X,Y; let a be Element of Y; defpred X[Element of Fin X] means G.(F$$($1,f),a) = F$$($1,G[:](f,a)); A5: for B1,B2 being non empty Element of Fin X holds X[B1] & X[B2] implies X [B1 \/ B2] proof let B1,B2 be non empty Element of Fin X; assume A6: G.(F$$(B1,f),a) = F$$(B1,G[:](f,a)) & G.(F$$(B2,f),a) = F$$(B2,G [:](f,a)); thus G.(F$$(B1 \/ B2,f),a) = G.(F.(F$$(B1,f),F$$(B2,f)),a) by A1,A2,Th21 .= F.(F$$(B1,G[:](f,a)), F$$(B2,G[:] (f,a))) by A3,A6,BINOP_1:11 .= F$$(B1 \/ B2,G[:](f,a)) by A1,A2,Th21; end; A7: for x being Element of X holds X[{.x.}] proof let x be Element of X; thus G.(F$$({.x.},f),a) = G.(f.x,a) by A2,Th17 .= (G[:](f,a)).x by FUNCOP_1:48 .= F$$({.x.},G[:](f,a)) by A2,Th17; end; for B being non empty Element of Fin X holds X[B] from FinSubInd2(A7, A5); hence thesis by A4; end; definition let X, Y be non empty set; let f be Function of X,Y; let A be Element of Fin X; redefine func f.:A -> Element of Fin Y; coherence by Lm1; end; theorem Th29: for A, X, Y being non empty set for F being BinOp of A st F is idempotent & F is commutative & F is associative for B being Element of Fin X st B <> {} for f being Function of X,Y holds for g being Function of Y,A holds F$$(f.:B,g) = F$$(B,g*f) proof let A, X, Y be non empty set, F be BinOp of A such that A1: F is idempotent and A2: F is commutative & F is associative; let B be Element of Fin X such that A3: B <> {}; let f be Function of X,Y; let g be Function of Y,A; defpred X[Element of Fin X] means F$$(f.:$1,g) = F$$($1,g*f); A4: dom f = X by FUNCT_2:def 1; A5: for B1,B2 being non empty Element of Fin X holds X[B1] & X[B2] implies X [B1 \/ B2] proof let B1,B2 be non empty Element of Fin X; assume A6: F$$(f.:B1,g) = F$$(B1,g*f) & F$$(f.:B2,g) = F$$(B2,g*f); B7: B1 c= X by FINSUB_1:def 5; B8: B2 c= X by FINSUB_1:def 5; thus F$$(f.:(B1 \/ B2),g) = F$$(f.:B1 \/ f.:B2, g) by RELAT_1:120 .= F.(F$$(f.:B1,g), F$$(f.:B2,g)) by A1,A2,B7,B8,Th21,A4 .= F$$(B1 \/ B2,g*f) by A1,A2,A6,Th21; end; A9: for x being Element of X holds X[{.x.}] proof let x be Element of X; f.:{.x.} = Im(f,x); hence F$$(f.:{.x.},g) = F$$({.f.x.},g) by A4,FUNCT_1:59 .= g.(f.x) by A2,Th17 .= (g*f).x by FUNCT_2:15 .= F$$({.x.},g*f) by A2,Th17; end; for B being non empty Element of Fin X holds X[B] from FinSubInd2(A9, A5); hence thesis by A3; end; theorem Th30: F is commutative & F is associative & F is idempotent implies for Z being non empty set for G being BinOp of Z st G is commutative & G is associative & G is idempotent for f being Function of X, Y for g being Function of Y,Z st for x,y being Element of Y holds g.(F.(x,y)) = G.(g.x,g.y) for B being Element of Fin X st B <> {} holds g.(F$$(B,f)) = G$$(B,g*f) proof assume that A1: F is commutative & F is associative and A2: F is idempotent; let Z be non empty set, G be BinOp of Z such that A3: G is commutative & G is associative and A4: G is idempotent; let f be Function of X,Y; let g be Function of Y,Z such that A5: for x,y being Element of Y holds g.(F.(x, y)) = G.(g.x, g.y); defpred X[Element of Fin X] means $1 <> {} implies g.(F$$($1,f)) = G$$($1,g* f); A6: for B9 being Element of Fin X, b being Element of X holds X[B9] implies X[B9 \/ {.b.}] proof let B be (Element of Fin X), x be Element of X; assume that A7: B <> {} implies g.(F$$(B,f)) = G$$(B,g*f) and B \/ {x} <> {}; per cases; suppose A8: B = {}; hence g.(F$$(B \/ {.x.},f)) = g.(f.x) by A1,Th17 .= (g*f).x by FUNCT_2:15 .= G$$(B \/ {.x.},g*f) by A3,A8,Th17; end; suppose A9: B <> {}; hence g.(F$$(B \/ {.x.},f)) = g.(F.(F$$(B,f), f.x)) by A1,A2,Th20 .= G.(g.(F$$(B,f)), g.(f.x)) by A5 .= G.(G$$(B,g*f), (g*f).x) by A7,A9,FUNCT_2:15 .= G$$(B \/ {.x.},g*f) by A3,A4,A9,Th20; end; end; A10: X[{}.X]; thus for B being Element of Fin X holds X[B] from FinSubInd3(A10,A6 ); end; theorem Th31: F is commutative & F is associative & F is having_a_unity implies for f holds F$$({}.X,f) = the_unity_wrt F proof assume A1: F is commutative & F is associative & F is having_a_unity; let f; the_unity_wrt F is_a_unity_wrt F & ex G being Function of Fin X, Y st F $$ ( {}.X,f) = G.{}.X & (for e being Element of Y st e is_a_unity_wrt F holds G .{} = e) & (for x being Element of X holds G.{x} = f.x) & for B9 being Element of Fin X st B9 c= {}.X & B9 <> {} for x being Element of X st x in {}.X \ B9 holds G.( B9 \/ {x}) = F.(G.B9,f.x) by A1,Def3,Th14; hence thesis; end; theorem Th32: F is idempotent & F is commutative & F is associative & F is having_a_unity implies for x being Element of X holds F $$(B \/ {.x.}, f) = F.( F $$(B,f),f.x) proof assume that A1: F is idempotent and A2: F is commutative & F is associative; assume A3: F is having_a_unity; let x be Element of X; A4: {} = {}.X; now assume A5: B = {}; hence F $$(B \/ {.x.}, f) = f.x by A2,Th17 .= F.(the_unity_wrt F, f.x) by A3,Th15 .= F.(F $$(B,f),f.x) by A2,A3,A4,A5,Th31; end; hence thesis by A1,A2,Th20; end; theorem F is idempotent & F is commutative & F is associative & F is having_a_unity implies for B1,B2 being Element of Fin X holds F $$ (B1 \/ B2,f) = F.(F $$ (B1,f),F $$ (B2,f)) proof assume that A1: F is idempotent and A2: F is commutative & F is associative and A3: F is having_a_unity; let B1,B2 be Element of Fin X; now A4: {} = {}.X; assume A5: B1 = {} or B2 = {}; per cases by A5; suppose A6: B2 = {}; hence F $$ (B1 \/ B2,f) = F.(F$$(B1,f),the_unity_wrt F) by A3,Th15 .= F.(F $$ (B1,f),F $$ (B2,f)) by A2,A3,A4,A6,Th31; end; suppose A7: B1 = {}; hence F $$ (B1 \/ B2,f) = F.(the_unity_wrt F, F$$(B2,f)) by A3,Th15 .= F.(F $$ (B1,f),F $$ (B2,f)) by A2,A3,A4,A7,Th31; end; end; hence thesis by A1,A2,Th21; end; theorem F is commutative & F is associative & F is idempotent & F is having_a_unity implies for f,g being Function of X,Y for A,B being Element of Fin X st f.:A = g.:B holds F$$(A,f) = F$$(B,g) proof assume that A1: F is commutative & F is associative and A2: F is idempotent and A3: F is having_a_unity; let f,g be Function of X,Y; let A,B be Element of Fin X such that A4: f.:A = g.:B; now assume A5: A = {}; then A = {}.X; then A6: F$$(A,f) = the_unity_wrt F by A1,A3,Th31; f.:A = {} by A5; then B = {}.X by A4,Th13; hence thesis by A1,A3,A6,Th31; end; hence thesis by A1,A2,A4,Th26; end; theorem Th35: for A, X, Y being non empty set for F being BinOp of A st F is idempotent & F is commutative & F is associative & F is having_a_unity for B being Element of Fin X for f being Function of X,Y holds for g being Function of Y,A holds F$$(f.:B,g) = F$$(B,g*f) proof let A, X, Y be non empty set, F be BinOp of A such that A1: F is idempotent and A2: F is commutative & F is associative and A3: F is having_a_unity; let B be Element of Fin X; let f be Function of X,Y; let g be Function of Y,A; now assume A4: B = {}; then f.:B = {}.Y; then A5: F$$(f.:B,g) = the_unity_wrt F by A2,A3,Th31; B = {}.X by A4; hence thesis by A2,A3,A5,Th31; end; hence thesis by A1,A2,Th29; end; theorem F is commutative & F is associative & F is idempotent & F is having_a_unity implies for Z being non empty set for G being BinOp of Z st G is commutative & G is associative & G is idempotent & G is having_a_unity for f being Function of X, Y for g being Function of Y,Z st g.the_unity_wrt F = the_unity_wrt G & for x,y being Element of Y holds g.(F.(x,y)) = G.(g.x,g.y) for B being Element of Fin X holds g.(F$$(B,f)) = G$$(B,g*f) proof assume that A1: F is commutative & F is associative and A2: F is idempotent and A3: F is having_a_unity; let Z be non empty set; let G be BinOp of Z such that A4: G is commutative & G is associative and A5: G is idempotent and A6: G is having_a_unity; let f be Function of X, Y; let g be Function of Y,Z such that A7: g.the_unity_wrt F = the_unity_wrt G and A8: for x,y being Element of Y holds g.(F.(x,y)) = G.(g.x,g.y); let B be Element of Fin X; per cases; suppose B = {}; then A9: B = {}.X; hence g.(F$$(B,f)) = g.the_unity_wrt F by A1,A3,Th31 .= G$$(B,g*f) by A4,A6,A7,A9,Th31; end; suppose B <> {}; hence thesis by A1,A2,A4,A5,A8,Th30; end; end; definition let A be set; func FinUnion A -> BinOp of Fin A means :Def4: for x,y being Element of Fin A holds it.(x,y) = (x \/ y); existence proof deffunc U(Element of Fin A,Element of Fin A) = $1 \/ $2; ex IT being BinOp of Fin A st for x,y being Element of Fin A holds IT. (x,y) = U(x,y) from BINOP_1:sch 4; hence thesis; end; uniqueness proof let IT, IT9 be BinOp of Fin A such that A1: for x,y being Element of Fin A holds IT.(x,y) = (x \/ y) and A2: for x,y being Element of Fin A holds IT9.(x,y) = (x \/ y); now let x,y be Element of Fin A; thus IT.(x,y) = (x \/ y) by A1 .= IT9.(x,y) by A2; end; hence IT = IT9 by BINOP_1:2; end; end; reserve A for set, x,y,z for Element of Fin A; theorem Th37: FinUnion A is idempotent proof let x; thus FinUnion A.(x,x) = x \/ x by Def4 .= x; end; theorem Th38: FinUnion A is commutative proof let x,y; thus FinUnion A.(x,y) = y \/ x by Def4 .= FinUnion A.(y,x) by Def4; end; theorem Th39: FinUnion A is associative proof let x,y,z; thus FinUnion A.(FinUnion A.(x,y), z) = FinUnion A.(x \/ y, z) by Def4 .= x \/ y \/ z by Def4 .= x \/ (y \/ z) by XBOOLE_1:4 .= FinUnion A.(x, y \/ z) by Def4 .= FinUnion A.(x, FinUnion A.(y,z)) by Def4; end; theorem Th40: {}.A is_a_unity_wrt FinUnion A proof thus for x holds FinUnion A.({}.A, x) =x proof let x; thus FinUnion A.({}.A, x) = {} \/ x by Def4 .= x; end; let x; thus FinUnion A.(x, {}.A) = x \/ {} by Def4 .= x; end; theorem Th41: FinUnion A is having_a_unity proof {}.A is_a_unity_wrt FinUnion A by Th40; hence thesis by Def2; end; theorem the_unity_wrt FinUnion A is_a_unity_wrt FinUnion A proof thus thesis by Th14,Th41; end; theorem Th43: the_unity_wrt FinUnion A = {} proof {}.A is_a_unity_wrt FinUnion A by Th40; hence thesis by BINOP_1:def 8; end; reserve X,Y for non empty set, A for set, f for (Function of X, Fin A), i,j,k for (Element of X); definition let X be non empty set, A be set; let B be Element of Fin X; let f be Function of X, Fin A; func FinUnion(B,f) -> Element of Fin A equals FinUnion A $$(B,f); coherence; end; theorem FinUnion({.i.},f) = f.i proof FinUnion A is commutative by Th38; hence thesis by Th17,Th39; end; theorem FinUnion({.i,j.},f) = f.i \/ f.j proof FinUnion A is idempotent & FinUnion A is commutative by Th37,Th38; hence FinUnion({.i,j.},f) = FinUnion A.(f.i, f.j) by Th18,Th39 .= f.i \/ f.j by Def4; end; theorem FinUnion({.i,j,k.},f) = f.i \/ f.j \/ f.k proof FinUnion A is idempotent & FinUnion A is commutative by Th37,Th38; hence FinUnion({.i,j,k.},f) = FinUnion A.(FinUnion A.(f.i, f.j), f.k) by Th19 ,Th39 .= FinUnion A.(f.i \/ f.j, f.k) by Def4 .= f.i \/ f.j \/ f.k by Def4; end; theorem Th47: FinUnion({}.X,f) = {} proof FinUnion A is commutative & FinUnion A is associative by Th38,Th39; hence FinUnion({}.X,f) = the_unity_wrt FinUnion A by Th31,Th41 .= {} by Th43; end; theorem Th48: for B being Element of Fin X holds FinUnion(B \/ {.i.}, f) = FinUnion(B,f) \/ f.i proof let B be Element of Fin X; A1: FinUnion A is associative by Th39; FinUnion A is idempotent & FinUnion A is commutative by Th37,Th38; hence FinUnion(B \/ {.i.}, f) = FinUnion A.(FinUnion(B,f), f.i) by A1,Th32 ,Th41 .= FinUnion(B,f) \/ f.i by Def4; end; theorem Th49: for B being Element of Fin X holds FinUnion(B,f) = union (f.:B) proof defpred X[Element of Fin X] means FinUnion($1,f) = union (f.:$1); A1: for B being (Element of Fin X), i st X[B] holds X[B \/ {.i.}] proof let B be (Element of Fin X), i; assume FinUnion(B,f) = union (f.:B); hence FinUnion(B \/ {.i.}, f) = union(f.:B) \/ f.i by Th48 .= union (f.:B) \/ union {f.i} by ZFMISC_1:25 .= union (f.:B \/ {f.i}) by ZFMISC_1:78 .= union (f.:B \/ Im(f,i)) by Th8 .= union (f.:(B \/ {i})) by RELAT_1:120; end; FinUnion({}.X,f) = union (f.:{}.X) by Th47,ZFMISC_1:2; then A2: X[{}.X]; thus for B being Element of Fin X holds X[B] from FinSubInd3(A2,A1 ); end; theorem for B1,B2 being Element of Fin X holds FinUnion(B1 \/ B2, f) = FinUnion(B1,f) \/ FinUnion(B2,f) proof let B1,B2 be Element of Fin X; thus FinUnion(B1 \/ B2, f) = union(f.:(B1 \/ B2)) by Th49 .= union(f.:B1 \/ f .:B2) by RELAT_1:120 .= union(f.:B1) \/ union(f.:B2) by ZFMISC_1:78 .= FinUnion(B1,f) \/ union(f.:B2) by Th49 .= FinUnion(B1,f) \/ FinUnion(B2,f) by Th49; end; theorem for B being Element of Fin X for f being Function of X,Y holds for g being Function of Y,Fin A holds FinUnion(f.:B,g) = FinUnion(B,g*f) proof let B be Element of Fin X; let f be Function of X,Y; let g be Function of Y,Fin A; thus FinUnion(f.:B,g) = union (g.:(f.:B)) by Th49 .= union ((g*f).:B) by RELAT_1:126 .= FinUnion(B,g*f) by Th49; end; theorem Th52: for A,X being non empty set, Y being set for G being BinOp of A st G is commutative & G is associative & G is idempotent for B being Element of Fin X st B <> {} for f being (Function of X,Fin Y), g being Function of Fin Y,A st for x,y being Element of Fin Y holds g.(x \/ y) = G.(g.x,g.y) holds g.( FinUnion(B,f)) = G$$(B,g*f) proof let A,X be non empty set, Y be set, G be BinOp of A such that A1: G is commutative & G is associative & G is idempotent; let B be Element of Fin X such that A2: B <> {}; let f be (Function of X,Fin Y), g be Function of Fin Y,A such that A3: for x,y being Element of Fin Y holds g.(x \/ y) = G.(g.x,g.y); A4: now let x,y be Element of Fin Y; thus g.(FinUnion Y.(x,y)) = g.(x \/ y) by Def4 .= G.(g.x,g.y) by A3; end; A5: FinUnion Y is idempotent by Th37; FinUnion Y is commutative & FinUnion Y is associative by Th38,Th39; hence thesis by A1,A5,A2,A4,Th30; end; theorem Th53: for Z being non empty set, Y being set for G being BinOp of Z st G is commutative & G is associative & G is idempotent & G is having_a_unity for f being Function of X, Fin Y for g being Function of Fin Y,Z st g.{}.Y = the_unity_wrt G & for x,y being Element of Fin Y holds g.(x \/ y) = G.(g.x,g.y) for B being Element of Fin X holds g.(FinUnion(B,f)) = G$$(B,g*f) proof let Z be non empty set, Y be set; let G be BinOp of Z such that A1: G is commutative & G is associative and A2: G is idempotent and A3: G is having_a_unity; let f be Function of X, Fin Y; let g be Function of Fin Y,Z such that A4: g.{}.Y = the_unity_wrt G and A5: for x,y being Element of Fin Y holds g.(x \/ y) = G.(g.x,g.y); let B be Element of Fin X; A6: {} = {}.X; A7: {} = {}.Fin Y; per cases; suppose A8: B = {}; then A9: f.:B = {}; thus g.(FinUnion(B,f)) = g.{}.Y by A6,A8,Th47 .= G$$(f.:B,g) by A1,A3,A4,A7,A9,Th31 .= G$$(B,g*f) by A1,A2,A3,Th35; end; suppose B <> {}; hence thesis by A1,A2,A5,Th52; end; end; definition let A be set; func singleton A -> Function of A, Fin A means :Def6: for x being set st x in A holds it.x = {x}; existence proof deffunc U(set) = {$1}; A1: now let x be set; assume A2: x in A; then reconsider A9 = A as non empty set; reconsider x9 = x as Element of A9 by A2; {.x9.} in Fin A9; hence U(x) in Fin A; end; thus ex f being Function of A, Fin A st for x being set st x in A holds f. x = U(x) from FUNCT_2:sch 2(A1); end; uniqueness proof let IT,IT9 be Function of A, Fin A such that A3: for x being set st x in A holds IT.x = {x} and A4: for x being set st x in A holds IT9.x = {x}; now let x be set; assume A5: x in A; then IT.x = {x} by A3; hence IT.x = IT9.x by A4,A5; end; hence thesis by FUNCT_2:12; end; end; theorem Th54: for A being non empty set for f being Function of A, Fin A holds f = singleton A iff for x being Element of A holds f.x = {x} proof let A be non empty set; let f be Function of A, Fin A; thus f = singleton A implies for x being Element of A holds f.x = {x} by Def6 ; assume for x being Element of A holds f.x = {x}; then for x be set holds x in A implies f.x = {x}; hence thesis by Def6; end; theorem Th55: for x being set, y being Element of X holds x in singleton X.y iff x = y proof let x be set, y be Element of X; singleton X.y = {y} by Th54; hence thesis by TARSKI:def 1; end; theorem for x,y,z being Element of X st x in singleton X.z & y in singleton X. z holds x = y proof let x,y,z be Element of X; assume that A1: x in singleton X.z and A2: y in singleton X.z; x = z by A1,Th55; hence thesis by A2,Th55; end; Lm2: for D being non empty set, X, P being set for f being Function of X,D holds f.:P c= D; theorem Th57: for B being Element of Fin X, x being set holds x in FinUnion(B, f) iff ex i being Element of X st i in B & x in f.i proof let B be Element of Fin X, x be set; A1: now assume x in union (f.:B); then consider Z being set such that A2: x in Z and A3: Z in f .:B by TARSKI:def 4; f.:B is Subset of Fin A by Lm2; then reconsider Z as Element of Fin A by A3; consider i being Element of X such that A4: i in B & Z = f.i by A3,FUNCT_2:65; take i9 = i; thus i9 in B & x in f.i9 by A2,A4; end; now given i being Element of X such that A5: i in B and A6: x in f.i; f.i in f.:B by A5,FUNCT_2:35; hence x in union (f.:B) by A6,TARSKI:def 4; end; hence thesis by A1,Th49; end; theorem for B being Element of Fin X holds FinUnion(B, singleton X) = B proof let B be Element of Fin X; now let x be set; thus x in FinUnion(B, singleton X) implies x in B proof assume x in FinUnion(B, singleton X); then ex i being Element of X st i in B & x in singleton X.i by Th57; hence thesis by Th55; end; assume A1: x in B; then reconsider x9 = x as Element of X by Th9; x in singleton X.x9 by Th55; hence x in FinUnion(B, singleton X) by A1,Th57; end; hence thesis by TARSKI:1; end; theorem for Y,Z being set for f being Function of X, Fin Y for g being Function of Fin Y, Fin Z st g.{}.Y = {}.Z & for x,y being Element of Fin Y holds g.(x \/ y) = g.x \/ g.y for B being Element of Fin X holds g.(FinUnion(B, f)) = FinUnion(B,g*f) proof let Y,Z be set; let f be Function of X, Fin Y; let g be Function of Fin Y, Fin Z; assume that A1: g.{}.Y = {}.Z and A2: for x,y being Element of Fin Y holds g.(x \/ y) = g.x \/ g.y; A3: g.{}.Y = the_unity_wrt FinUnion Z by A1,Th43; A4: now let x,y be Element of Fin Y; thus g.(x \/ y) = g.x \/ g.y by A2 .= FinUnion Z.(g.x,g.y) by Def4; end; let B be Element of Fin X; A5: FinUnion Z is idempotent by Th37; FinUnion Z is associative & FinUnion Z is commutative by Th38,Th39; hence thesis by A5,A3,A4,Th41,Th53; end; begin reserve B for non empty set, A,X,x for set; scheme Fraenkel59{ A() -> set, F(set) -> set, P,Q[set] } : { F(v) where v is Element of A() : P[v] } c= { F(u) where u is Element of A() : Q[u] } provided A1: for v being Element of A() holds P[v] implies Q[v] proof let x be set; assume x in { F(v9) where v9 is Element of A() : P[v9] }; then consider v being Element of A() such that A2: x = F(v) and A3: P[v]; Q[v] by A1,A3; hence thesis by A2; end; scheme Fraenkel599 { A,B() -> set, F(set,set) -> set, P,Q[set,set] } : { F(u1,v1) where u1 is Element of A(), v1 is Element of B() : P[u1,v1] } c= { F(u2,v2) where u2 is Element of A(), v2 is Element of B() : Q[u2,v2] } provided A1: for u being (Element of A()), v being Element of B() holds P[u,v] implies Q[u,v] proof let x be set; assume x in {F(u9,v9) where u9 is (Element of A()), v9 is Element of B() : P[u9,v9]}; then consider u being (Element of A()), v being Element of B() such that A2: x = F(u,v) and A3: P[u,v]; Q[u,v] by A1,A3; hence thesis by A2; end; scheme Fraenkel69{ B() -> set, F(set) -> set, P, Q[set] } : { F(v1) where v1 is Element of B() : P[v1] } = { F(v2) where v2 is Element of B() : Q[v2] } provided A1: for v being Element of B() holds P[v] iff Q[v] proof set A = { F(v1) where v1 is Element of B() : P[v1] }, B = { F(v2) where v2 is Element of B() : Q[v2] }; A2: for v being Element of B() holds P[v] implies Q[v] by A1; thus A c= B from Fraenkel59(A2); A3: for v being Element of B() holds Q[v] implies P[v] by A1; thus B c= A from Fraenkel59(A3); end; scheme Fraenkel699 { A,B() -> set, F(set,set) -> set, P,Q[set,set] } : { F(u1,v1) where u1 is Element of A(), v1 is Element of B() : P[u1,v1] } = { F(u2,v2) where u2 is Element of A(), v2 is Element of B() : Q[u2,v2] } provided A1: for u being Element of A(), v being Element of B() holds P[u,v] iff Q[u,v] proof set B = { F(u2,v2) where u2 is (Element of A()), v2 is Element of B() : Q[u2 ,v2] }; set A = { F(u1,v1) where u1 is (Element of A()), v1 is Element of B() : P[u1 ,v1] }; A2: for u being (Element of A()), v being Element of B() holds P[u,v] implies Q[u,v] by A1; thus A c= B from Fraenkel599(A2); A3: for u being (Element of A()), v being Element of B() holds Q[u,v] implies P[u,v] by A1; thus B c= A from Fraenkel599(A3); end; scheme FraenkelF9{ B() -> set, F,G(set) -> set, P[set] } : { F(v1) where v1 is Element of B() : P[v1] } = { G(v2) where v2 is Element of B() : P[v2] } provided A1: for v being Element of B() holds F(v) = G(v) proof set X = { F(v1) where v1 is Element of B() : P[v1] }, Y = { G(v2) where v2 is Element of B() : P[v2] }; A2: Y c= X proof let x be set; assume x in Y; then consider v1 being Element of B() such that A3: x = G(v1) and A4: P[v1]; x = F(v1) by A1,A3; hence thesis by A4; end; X c= Y proof let x be set; assume x in X; then consider v1 being Element of B() such that A5: x = F(v1) and A6: P[v1]; x = G(v1) by A1,A5; hence thesis by A6; end; hence thesis by A2,XBOOLE_0:def 10; end; scheme FraenkelF9R{ B() -> set, F,G(set) -> set, P[set] } : { F(v1) where v1 is Element of B() : P[v1] } = { G(v2) where v2 is Element of B() : P[v2] } provided A1: for v being Element of B() st P[v] holds F(v) = G(v) proof set X = { F(v1) where v1 is Element of B() : P[v1] }, Y = { G(v2) where v2 is Element of B() : P[v2] }; A2: Y c= X proof let x be set; assume x in Y; then consider v1 being Element of B() such that A3: x = G(v1) and A4: P[v1]; x = F(v1) by A1,A3,A4; hence thesis by A4; end; X c= Y proof let x be set; assume x in X; then consider v1 being Element of B() such that A5: x = F(v1) and A6: P[v1]; x = G(v1) by A1,A5,A6; hence thesis by A6; end; hence thesis by A2,XBOOLE_0:def 10; end; scheme FraenkelF99 { A,B() -> set, F(set,set) -> set, G(set,set) -> set, P[set,set] } : { F(u1,v1) where u1 is Element of A(), v1 is Element of B() : P[u1,v1] } = { G(u2,v2) where u2 is Element of A(), v2 is Element of B() : P[u2,v2] } provided A1: for u being Element of A(), v being Element of B() holds F(u,v) = G(u,v) proof set Y = { G(u2,v2) where u2 is (Element of A()), v2 is Element of B() : P[u2 ,v2] }; set X = { F(u1,v1) where u1 is (Element of A()), v1 is Element of B() : P[u1 ,v1] }; A2: Y c= X proof let x be set; assume x in Y; then consider u1 being (Element of A()), v1 being Element of B() such that A3: x = G(u1,v1) and A4: P[u1,v1]; x = F(u1,v1) by A1,A3; hence thesis by A4; end; X c= Y proof let x be set; assume x in X; then consider u1 being (Element of A()), v1 being Element of B() such that A5: x = F(u1,v1) and A6: P[u1,v1]; x = G(u1,v1) by A1,A5; hence thesis by A6; end; hence thesis by A2,XBOOLE_0:def 10; end; scheme FraenkelF699 { A,B() -> set, F(set,set) -> set, P,Q[set,set] } : { F(u1,v1) where u1 is Element of A(), v1 is Element of B() : P[u1,v1] } = { F(v2,u2) where u2 is Element of A(), v2 is Element of B() : Q[u2,v2] } provided A1: for u being Element of A(), v being Element of B() holds P[u,v] iff Q[u,v] and A2: for u being Element of A(), v being Element of B() holds F(u,v) = F(v,u) proof A3: for u being Element of A(), v being Element of B() holds Q[u,v] implies P[u,v] by A1; A4: { F(u1,v1) where u1 is (Element of A()), v1 is Element of B() : Q[u1,v1] } c= { F(u2,v2) where u2 is (Element of A()), v2 is Element of B() : P[u2,v2] } from Fraenkel599(A3); deffunc H(set,set) = F($2,$1); A5: for u being (Element of A()), v being Element of B() holds P[u,v] implies Q[u,v] by A1; A6: { F(u1,v1) where u1 is (Element of A()), v1 is Element of B() : P[u1,v1] } c= { F(u2,v2) where u2 is (Element of A()), v2 is Element of B() : Q[u2,v2] } from Fraenkel599(A5); A7: for u being Element of A(), v being Element of B() holds F(u,v) = H(u,v) by A2; { F(u1,v1) where u1 is Element of A(), v1 is Element of B() : Q[u1,v1] } = { H(u2,v2) where u2 is Element of A(), v2 is Element of B() : Q[u2,v2] } from FraenkelF99(A7); hence thesis by A6,A4,XBOOLE_0:def 10; end; theorem Th1: for A,B being set, F,G being Function of A,B for X being set st F|X = G|X for x being Element of A st x in X holds F.x = G.x proof let A,B be set, F,G be Function of A,B; let X be set such that A1: F|X = G|X; let x be Element of A; assume A2: x in X; hence F.x = (G|X).x by A1,FUNCT_1:49 .= G.x by A2,FUNCT_1:49; end; theorem Th2: for A,B being set holds Funcs(A,B) c= bool [:A,B:] proof let A,B be set, x be set; assume x in Funcs(A,B); then consider f being Function such that A1: x = f and A2: dom f = A and A3: rng f c= B by FUNCT_2:def 2; A4: f c= [: dom f, rng f:] by RELAT_1:7; [:dom f, rng f:] c= [:A,B:] by A2,A3,ZFMISC_1:95; then f c= [:A,B:] by A4,XBOOLE_1:1; hence thesis by A1; end; theorem Th3: for X,Y being set st Funcs(X,Y) <> {} & X c= A & Y c= B for f being Element of Funcs(X,Y) holds f is PartFunc of A,B proof let X,Y be set such that A1: Funcs(X,Y) <> {} and A2: X c= A and A3: Y c= B; let f be Element of Funcs(X,Y); consider g being Function such that A4: f = g and A5: dom g = X and A6: rng g c= Y by A1,FUNCT_2:def 2; rng g c= B by A3,A6,XBOOLE_1:1; hence thesis by A2,A4,A5,RELSET_1:4; end; scheme RelevantArgs { A,B,X() -> set, f,g() -> Function of A(),B(), P[set], Q[set] } : { f().u9 where u9 is Element of A() : P[u9] & u9 in X() } = { g().v9 where v9 is Element of A() : Q[v9] & v9 in X() } provided A1: f()|X() = g()|X() and A2: for u being Element of A() st u in X() holds P[u] iff Q[u] proof deffunc F(set) = f().$1; deffunc G(set) = g().$1; defpred PP[set] means P[$1] & $1 in X(); defpred QQ[set] means Q[$1] & $1 in X(); set C = { G(v9) where v9 is Element of A() : PP[v9] }; A3: for v being Element of A() holds PP[v] iff QQ[v] by A2; A4: C = { G(v9) where v9 is Element of A() : QQ[v9] } from Fraenkel69(A3); A5: for v being Element of A() st PP[v] holds F(v) = G(v) by A1,Th1; { F(u9) where u9 is Element of A() : PP[u9] } = C from FraenkelF9R(A5); hence thesis by A4; end; scheme FrSet0{ A() -> non empty set, P[set] }: { x where x is Element of A(): P[x] } c= A() proof { x where x is Element of A(): P[x] } is Subset of A() from DOMAIN_1:sch 7; hence thesis; end; scheme Gen199{A,B() -> set, F(set,set) -> set, P[set,set], Q[set] } : for s being Element of A(), t being Element of B() st P[s,t] holds Q[F(s,t)] provided A1: for st1 being set st st1 in { F(s1,t1) where s1 is (Element of A()), t1 is Element of B(): P[s1,t1] } holds Q[st1] proof let s be (Element of A()), t be Element of B(); assume P[s,t]; then F(s,t) in { F(s1,t1) where s1 is (Element of A()), t1 is Element of B(): P[s1,t1] }; hence thesis by A1; end; scheme Gen199A{A,B() -> set, F(set,set) -> set, P[set,set], Q[set] } : for st1 being set st st1 in { F(s1,t1) where s1 is Element of A(), t1 is Element of B(): P[s1,t1] } holds Q[st1] provided A1: for s being Element of A(), t being Element of B() st P[s,t] holds Q[F(s,t)] proof let st1 be set; assume st1 in { F(s1,t1) where s1 is (Element of A()), t1 is Element of B() : P[s1,t1] }; then ex s1 being (Element of A()), t1 being Element of B() st st1 = F(s1,t1) & P[s1,t1]; hence thesis by A1; end; scheme Gen299{A,B,C() -> set, F(set,set) -> Element of C(), P[set, set], Q[set] } : { st1 where st1 is Element of C() : st1 in { F(s1,t1) where s1 is Element of A(), t1 is Element of B() : P[s1,t1] } & Q[st1] } = { F(s2,t2) where s2 is Element of A(), t2 is Element of B() : P[s2,t2] & Q[F(s2,t2)]} proof thus { st1 where st1 is Element of C() : st1 in { F(s1,t1) where s1 is ( Element of A()), t1 is Element of B() : P[s1,t1] } & Q[st1] } c= { F(s2,t2) where s2 is (Element of A()), t2 is Element of B() : P[s2,t2] & Q[F(s2,t2)]} proof let x be set; assume x in { st1 where st1 is Element of C() : st1 in { F(s1,t1) where s1 is (Element of A()), t1 is Element of B() : P[s1,t1] } & Q[st1] }; then consider st1 being Element of C() such that A1: x = st1 and A2: st1 in { F(s1,t1) where s1 is (Element of A()), t1 is Element of B () : P[s1,t1] } and A3: Q[st1]; ex s1 being (Element of A()), t1 being Element of B() st st1 = F(s1,t1 ) & P[s1,t1] by A2; hence thesis by A1,A3; end; let x be set; assume x in { F(s2,t2) where s2 is (Element of A()), t2 is Element of B() : P[s2,t2] & Q[F(s2,t2)]}; then consider s2 being (Element of A()), t2 being Element of B() such that A4: x = F(s2,t2) and A5: P[s2,t2] and A6: Q[F(s2,t2)]; F(s2,t2) in { F(s1,t1) where s1 is (Element of A()), t1 is Element of B ( ) : P[s1,t1] } by A5; hence thesis by A4,A6; end; scheme Gen39{A() -> set, F(set) -> set, P[set], Q[set] } : { F(s) where s is Element of A() : s in { s1 where s1 is Element of A(): Q[s1] } & P[s] } = { F(s2) where s2 is Element of A() : Q[s2] & P[s2] } proof defpred QQ[set] means Q[$1] & P[$1]; defpred PP[set] means $1 in { s1 where s1 is Element of A(): Q[s1] } & P[$1]; A1: for s being Element of A() holds PP[s] iff QQ[s] proof let s be Element of A(); now assume s in { s1 where s1 is Element of A(): Q[s1] }; then ex s1 being Element of A() st s = s1 & Q[s1]; hence Q[s]; end; hence thesis; end; thus { F(s) where s is Element of A() : PP[s] } = { F(s2) where s2 is Element of A() : QQ[s2] } from Fraenkel69(A1); end; scheme Gen399{A,B() -> set, F(set,set) -> set, P[set, set], Q[set] } : { F(s,t) where s is (Element of A()), t is Element of B() : s in { s1 where s1 is Element of A(): Q[s1] } & P[s,t] } = { F(s2,t2) where s2 is (Element of A()), t2 is Element of B() : Q[s2] & P[s2,t2] } proof defpred QQ[set,set] means Q[$1] & P[$1,$2]; defpred PP[set,set] means $1 in { s1 where s1 is Element of A(): Q[s1] } & P [$1,$2]; A1: for s being Element of A(), t being Element of B() holds PP[s,t] iff QQ[ s,t] proof let s be Element of A(), t be Element of B(); now assume s in { s1 where s1 is Element of A(): Q[s1] }; then ex s1 being Element of A() st s = s1 & Q[s1]; hence Q[s]; end; hence thesis; end; thus { F(s,t) where s is (Element of A()), t is Element of B() : PP[s,t] } = { F(s2,t2) where s2 is (Element of A()), t2 is Element of B() : QQ[s2,t2] } from Fraenkel699(A1); end; scheme Gen499{A,B() -> set, F(set,set) -> set, P[set, set], Q[set,set] } : { F(s,t) where s is (Element of A()), t is Element of B() : P[s,t] } c= { F(s1,t1) where s1 is (Element of A()), t1 is Element of B() : Q [s1,t1] } provided A1: for s being (Element of A()), t being Element of B() st P[s,t] ex s9 being Element of A() st Q[s9,t] & F(s,t) = F(s9,t) proof let x be set; assume x in { F(s,t) where s is (Element of A()), t is Element of B() : P[s ,t] }; then consider s being (Element of A()), t being Element of B() such that A2: x = F(s,t) and A3: P[s,t]; ex s9 being Element of A() st Q[s9,t] & F(s,t) = F(s9,t) by A1,A3; hence thesis by A2; end; scheme FrSet1{ D,A() -> set, P[set], F(set) -> set }: { F(y) where y is Element of D() : F(y) in A() & P[y] } c= A() proof let x be set; assume x in { F(y) where y is Element of D() : F(y) in A() & P[y] }; then ex y being Element of D() st x = F(y) & F(y) in A() & P[y]; hence thesis; end; scheme FrSet2{ D,A() -> set, Q[set], F(set) -> set }: { F(y) where y is Element of D() : Q[y] & not F(y) in A() } misses A() proof assume { F(y) where y is Element of D() : Q[y] & not F(y) in A() } meets A( ); then consider x be set such that A1: x in { F(y) where y is Element of D() : Q[y] & not F(y) in A() } and A2: x in A() by XBOOLE_0:3; ex y being Element of D() st x = F(y) & Q[y] & not F(y) in A() by A1; hence thesis by A2; end; scheme FrEqua1{ A,B() -> set, F(set,set) -> set, x() -> (Element of B()), P[set,set], Q[set,set] }: { F(s,t) where s is (Element of A()), t is Element of B(): Q[s,t] } = { F(s9,x()) where s9 is Element of A(): P [s9,x()] } provided A1: for s being Element of A() for t being Element of B() holds Q[s,t] iff t = x() & P[s,t] proof thus { F(s,t) where s is (Element of A()), t is Element of B(): Q[s,t] } c= { F(s9,x()) where s9 is Element of A(): P[s9,x()] } proof let x be set; assume x in { F(s,t) where s is (Element of A()), t is Element of B(): Q[ s,t ] }; then consider s being (Element of A()), t being Element of B() such that A2: x = F(s,t) and A3: Q[s,t]; A4: P[s,t] by A1,A3; t = x() by A1,A3; hence thesis by A2,A4; end; let x be set; assume x in { F(s9,x()) where s9 is Element of A(): P[s9,x()] }; then consider s9 being Element of A() such that A5: x = F(s9,x()) and A6: P[s9,x()]; Q[s9,x()] by A1,A6; hence thesis by A5; end; scheme FrEqua2{ A,B() -> set, F(set,set) -> set, x() -> (Element of B()), P[set,set] }: { F(s,t) where s is (Element of A()), t is Element of B(): t = x() & P[s,t] } = { F(s9,x()) where s9 is Element of A(): P[ s9,x()] } proof defpred Q[set,set] means $2 = x() & P[$1,$2]; A1: for s being Element of A() for t being Element of B() holds Q[s,t] iff t = x() & P[s,t]; thus { F(s,t) where s is Element of A(), t is Element of B(): Q[s,t] } = { F (s9,x()) where s9 is Element of A(): P[s9,x()] } from FrEqua1(A1); end; reserve phi for Element of Funcs(A,B); theorem Th4: for X,Y being set st Funcs(X,Y) <> {} & X c= A & Y c= B for f being Element of Funcs(X,Y) ex phi being Element of Funcs(A,B) st phi|X = f proof let X,Y be set such that A1: Funcs(X,Y) <> {} and A2: X c= A and A3: Y c= B; let f be Element of Funcs(X,Y); reconsider f9=f as PartFunc of A,B by A1,A2,A3,Th3; consider phi being Function of A,B such that A4: for x st x in dom f9 holds phi.x = f9.x by FUNCT_2:71; reconsider phi as Element of Funcs(A,B) by FUNCT_2:8; take phi; ex g being Function st f = g & dom g = X & rng g c= Y by A1,FUNCT_2:def 2; then dom f9 = A /\ X by XBOOLE_1:28 .= dom phi /\ X by FUNCT_2:def 1; hence thesis by A4,FUNCT_1:46; end; theorem Th5: phi|X = phi|(A /\ X) proof dom phi = A by FUNCT_2:def 1; then A1: dom (phi|X) = (dom phi /\ A) /\ X by RELAT_1:61 .= dom phi /\ (A /\ X) by XBOOLE_1:16; for x st x in dom (phi|X) holds (phi|X).x = phi.x by FUNCT_1:47; hence thesis by A1,FUNCT_1:46; end; scheme FraenkelFin { A() -> set, X() -> set, F(set) -> set }: { F(w) where w is Element of A(): w in X() } is finite provided A1: X() is finite proof set M = { F(w) where w is Element of A(): w in X() }; per cases; suppose A2: A() is empty; M c= {F({})} proof let x; assume x in M; then consider w being Element of A() such that A3: x = F(w) & w in X(); w = {} by A2,SUBSET_1:def 1; hence thesis by A3,TARSKI:def 1; end; hence thesis; end; suppose A4: A() is non empty; consider f being Function such that A5: dom f = X() /\ A() and A6: for y being set st y in X() /\ A() holds f.y = F(y) from FUNCT_1:sch 3; M = f.:X() proof thus M c= f.:X() proof let x be set; assume x in M; then consider u being Element of A() such that A7: x = F(u) and A8: u in X(); A9: u in dom f by A4,A5,A8,XBOOLE_0:def 4; then f.u = F(u) by A5,A6; hence thesis by A7,A8,A9,FUNCT_1:def 6; end; let x be set; assume x in f.:X(); then consider y being set such that A10: y in dom f and A11: y in X() and A12: x = f.y by FUNCT_1:def 6; reconsider y as Element of A() by A5,A10,XBOOLE_0:def 4; x = F(y) by A5,A6,A10,A12; hence thesis by A11; end; hence thesis by A1; end; end; scheme CartFin { A, B() -> non empty set, X, Y() -> set, F(set, set) -> set }: { F(u,v) where u is Element of A(), v is Element of B() : u in X() & v in Y () } is finite provided A1: X() is finite and A2: Y() is finite proof deffunc G(set) = F($1`1,$1`2); set M = { F(u9,v9) where u9 is (Element of A()), v9 is Element of B() : u9 in X() & v9 in Y() }; consider f being Function such that A3: dom f = [:X() /\ A(), Y() /\ B():] and A4: for y being set st y in [:X() /\ A(), Y() /\ B():] holds f.y = G(y) from FUNCT_1:sch 3; A5: dom f = [:X(), Y():] /\ [:A(), B():] by A3,ZFMISC_1:100; M = f.:[:X(), Y():] proof thus M c= f.:[:X(), Y():] proof let x be set; assume x in M; then consider u being Element of A(), v being Element of B() such that A6: x = F(u,v) and A7: u in X() and A8: v in Y(); A9: [u,v] in [:X(), Y():] by A7,A8,ZFMISC_1:87; then A10: [u,v] in dom f by A5,XBOOLE_0:def 4; A11: [u,v]`2 = v; [u,v]`1 = u; then f.(u,v) = F(u,v) by A3,A4,A10,A11; hence thesis by A6,A9,A10,FUNCT_1:def 6; end; let x be set; assume x in f.:[:X(), Y():]; then consider y being set such that A12: y in dom f and A13: y in [:X(), Y():] and A14: x = f.y by FUNCT_1:def 6; reconsider y as Element of [:A(), B():] by A5,A12,XBOOLE_0:def 4; A15: y = [y`1,y`2] by MCART_1:21; then A16: y`1 in X() by A13,ZFMISC_1:87; A17: y`2 in Y() by A13,A15,ZFMISC_1:87; x = F(y`1,y`2) by A3,A4,A12,A14; hence thesis by A16,A17; end; hence thesis by A1,A2; end; scheme Finiteness { A()->non empty set, B()->(Element of Fin A()), P[(Element of A( )), Element of A()] } : for x being Element of A() st x in B() ex y being Element of A() st y in B() & P[y,x] & for z being Element of A() st z in B() & P[z,y] holds P[y,z] provided A1: for x being Element of A() holds P[x,x] and A2: for x,y,z being Element of A() st P[x,y] & P[y,z] holds P[x,z] proof defpred R[(Element of A()), Element of Fin A()] means ex y being Element of A() st y in $2 & P[y,$1] & for z being Element of A() st z in $2 & P[z,y] holds P[y,z]; defpred Q[Element of Fin A()] means for x being Element of A() st x in $1 holds R[x, $1]; A3: now let B be (Element of Fin A()), x be Element of A(); assume A4: Q[B]; thus Q[B \/ {.x.}] proof let z be Element of A() such that A5: z in B \/ {x}; now per cases by A5,ZFMISC_1:136; suppose z in B; then consider y being Element of A() such that A6: y in B and A7: P[y,z] and A8: for x being Element of A() st x in B & P[x,y] holds P[y,x] by A4; now per cases; case A9: P[x,y]; thus x in B \/ {x} by ZFMISC_1:136; thus P[x,z] by A2,A7,A9; let v be Element of A() such that A10: v in B \/ {x} and A11: P[v,x]; A12: now assume A13: v in B; P[v,y] by A2,A9,A11; then P[y,v] by A8,A13; hence P[x,v] by A2,A9; end; v in B or v = x by A10,ZFMISC_1:136; hence P[x,v] by A1,A12; end; case A14: not P[x,y]; thus y in B \/ {x} by A6,XBOOLE_0:def 3; thus P[y,z] by A7; let v be Element of A() such that A15: v in B \/ {x} and A16: P[v,y]; v in B or v = x by A15,ZFMISC_1:136; hence P[y,v] by A8,A14,A16; end; end; hence thesis; end; suppose A17: z = x; now per cases; case ex w being Element of A() st w in B & P[w,x]; then consider w being Element of A() such that A18: w in B and A19: P[w,z] by A17; consider y being Element of A() such that A20: y in B and A21: P[y,w] and A22: for x being Element of A() st x in B & P[x,y] holds P[y ,x] by A4,A18; take u = y; thus u in B \/ {x} by A20,XBOOLE_0:def 3; thus P[u,z] by A2,A19,A21; let v be Element of A() such that A23: v in B \/ {x} and A24: P[v,u]; v in B or v = x by A23,ZFMISC_1:136; hence P[u,v] by A2,A17,A19,A21,A22,A24; end; case A25: for w being Element of A() st w in B holds not P[w,x]; thus x in B \/ {x} by ZFMISC_1:136; thus A26: P[x,x] by A1; let v be Element of A() such that A27: v in B \/ {x} and A28: P[v,x]; not v in B by A25,A28; hence P[x,v] by A26,A27,ZFMISC_1:136; end; end; hence thesis by A17; end; end; hence thesis; end; end; A29: Q[{}.A()]; for B being Element of Fin A() holds Q[B] from SETWISEO:sch 4(A29,A3 ); hence thesis; end; scheme FinIm{A,B()->non empty set, x()-> (Element of Fin B()), F (set)->(Element of A()), P[set,set]}: ex c1 being Element of Fin A() st for t being Element of A() holds t in c1 iff ex t9 being Element of B() st t9 in x() & t = F(t9) & P[t,t9] proof defpred R[set] means ex t9 being Element of B() st t9 in x() & $1 = F(t9) & P[$1,t9]; set c = { F(t9) where t9 is Element of B() : t9 in x() }, c1 = { tt where tt is Element of A() : R[tt]}; A1: c1 c= c proof let x; assume x in c1; then ex tt being Element of A() st x = tt & ex t9 being Element of B() st t9 in x() & tt = F(t9) & P[tt,t9]; hence thesis; end; A2: c1 c= A() from FrSet0; A3: x() is finite; c is finite from FraenkelFin(A3); then reconsider c1 as Element of Fin A() by A1,A2,FINSUB_1:def 5; take c1; let t be Element of A(); t in c1 implies ex tt being Element of A() st t = tt & ex t9 being Element of B() st t9 in x() & tt = F(t9) & P[tt,t9]; hence thesis; end; registration let A, B be finite set; cluster Funcs(A,B) -> finite; coherence proof bool [:A,B:] is finite; hence thesis by Th2,FINSET_1:1; end; end; theorem for A,B being set st A is finite & B is finite holds Funcs(A,B) is finite; scheme ImFin { A() -> set, B() -> non empty set, X() -> set, Y() -> set, F(set) -> set } : { F(phi9) where phi9 is Element of Funcs(A(),B()): phi9.:X() c= Y() } is finite provided A1: X() is finite and A2: Y() is finite and A3: for phi,psi being Element of Funcs(A(),B()) holds phi|X() = psi|X() implies F(phi) = F(psi) proof defpred P[set,set] means for phi being Element of Funcs(A(),B()) st phi|X() = $1 holds $2 = F(phi); set Z = { F(phi9) where phi9 is Element of Funcs(A(),B()): phi9.: X() c= Y() }; set x = the Element of Z; A4: B() /\ Y() c= B() by XBOOLE_1:17; assume A5: not thesis; then Z <> {}; then x in Z; then consider phi being Element of Funcs(A(),B()) such that x = F(phi) and A6: phi.:X() c= Y(); now assume B() /\ Y() = {}; then A7: phi.:X() = {} by A6,XBOOLE_1:3,19; A() = dom phi by FUNCT_2:def 1; then A() misses X() by A7,RELAT_1:118; hence A() /\ X() = {} by XBOOLE_0:def 7; end; then reconsider FF = Funcs(A() /\ X(),B() /\ Y()), Z as non empty set by A5, FUNCT_2:8; A8: B() /\ Y() c= Y() by XBOOLE_1:17; A9: A() /\ X() c= A() by XBOOLE_1:17; A10: now let f be Element of FF; consider phi being Element of Funcs(A(),B()) such that A11: phi|(A() /\ X()) = f by A9,A4,Th4; A12: phi|X() = f by A11,Th5; ex g being Function st f = g & dom g = A() /\ X() & rng g c= B() /\ Y () by FUNCT_2:def 2; then rng (phi|X()) c= Y() by A8,A12,XBOOLE_1:1; then phi.:X() c= Y() by RELAT_1:115; then F(phi) in Z; then reconsider g9 = F(phi) as Element of Z; take g = g9; thus P[f,g] by A3,A12; end; consider F being Function of FF, Z such that A13: for f being Element of FF holds P[f,F.f] from FUNCT_2:sch 3(A10); Z c= F.:Funcs(A() /\ X(), B() /\ Y()) proof let y be set; assume y in Z; then consider phi being Element of Funcs(A(),B()) such that A14: y = F(phi) and A15: phi.:X() c= Y(); rng (phi|X()) c= Y() by A15,RELAT_1:115; then A16: rng (phi|X()) c= B() /\ Y() by XBOOLE_1:19; A17: dom (phi|X()) = dom phi /\ X() by RELAT_1:61 .= A() /\ X() by FUNCT_2:def 1; then reconsider x = phi|X() as Element of Funcs(A() /\ X(), B() /\ Y()) by A16,FUNCT_2:def 2; phi|X() in Funcs(A() /\ X(), B() /\ Y()) by A17,A16,FUNCT_2:def 2; then A18: x in dom F by FUNCT_2:def 1; y = F.x by A13,A14; hence thesis by A18,FUNCT_1:def 6; end; hence contradiction by A1,A2,A5; end; scheme FunctChoice { A()->non empty set, B()->non empty set, P[(Element of A()), Element of B()], x()->Element of Fin A() }: ex ff being Function of A(), B() st for t being Element of A() st t in x() holds P[t,ff.t] provided A1: for t being Element of A() st t in x() ex ff being Element of B() st P[t,ff] proof set b = the Element of B(); set M = { { ff where ff is Element of B() : P[tt,ff] } where tt is Element of A() : tt in x() }; set f = the Function of A(), B(); assume A2: not thesis; then consider t being Element of A() such that A3: t in x() and not P[t,f.t]; { ff where ff is Element of B() : P[t,ff] } in M by A3; then reconsider M as non empty set; now let X; assume X in M; then consider t being Element of A() such that A4: X = { ff where ff is Element of B() : P[t,ff] } and A5: t in x(); consider ff being Element of B() such that A6: P[t,ff] by A1,A5; ff in X by A4,A6; hence X <> {}; end; then consider Choice being Function such that dom Choice = M and A7: X in M implies Choice.X in X by FUNCT_1:111; defpred Q[(Element of A()),set] means ($1 in x() implies $2 = Choice.{ ff where ff is Element of B() : P[$1,ff] }) & ($1 in x() or $2 = b); A8: now let t be Element of A(); A9: now set s = { ff where ff is Element of B() : P[t,ff] }; assume t in x(); then s in M; then Choice.s in s by A7; then ex ff being Element of B() st Choice.s = ff & P[t,ff]; hence Choice.s is Element of B(); end; t in x() implies t in x(); hence ex y being Element of B() st Q[t,y] by A9; end; consider f being Function of A(), B() such that A10: for x being Element of A() holds Q[x,f.x] from FUNCT_2:sch 3(A8); now let t be Element of A(); assume A11: t in x(); then A12: { ff where ff is Element of B() : P[t,ff] } in M; f.t = Choice.{ ff where ff is Element of B() : P[t,ff] } by A10,A11; then f.t in { ff where ff is Element of B() : P[t,ff] } by A7,A12; then ex ff being Element of B() st f.t = ff & P[t,ff]; hence P[t,f.t]; end; hence contradiction by A2; end; scheme FuncsChoice { A()->non empty set, B()->non empty set, P[Element of A(), Element of B()], x()->Element of Fin A() }: ex ff being Element of Funcs(A(),B( )) st for t being Element of A() st t in x() holds P[t,ff.t] provided A1: for t being Element of A() st t in x() ex ff being Element of B() st P[t,ff] proof A2: for t being Element of A() st t in x() ex ff being Element of B() st P[t ,ff] by A1; consider ff being Function of A(), B() such that A3: for t being Element of A() st t in x() holds P[t,ff.t] from FunctChoice(A2); reconsider ff as Element of Funcs(A(),B()) by FUNCT_2:8; take ff; thus thesis by A3; end; scheme FraenkelFin9 { A,B() -> non empty set, X() -> set, P[set,set] }: { x where x is Element of B(): ex w being Element of A() st P[w,x] & w in X() } is finite provided A1: X() is finite and A2: for w being Element of A(), x,y being Element of B() st P[w,x] & P[w ,y] holds x = y proof set M = { x where x is Element of B(): ex w being Element of A() st P[w,x] & w in X() }; defpred Q[set,set] means P[$1,$2] & $1 in X() & $2 in B(); A3: for x,y being set st x in A() & Q[x,y] holds y in B(); A4: for x,y1,y2 being set st x in A() & Q[x,y1] & Q[x,y2] holds y1 = y2 by A2; consider f being PartFunc of A(),B() such that A5: for x holds x in dom f iff x in A() & ex y being set st Q[x,y] and A6: for x st x in dom f holds Q[x,f.x] from PARTFUN1:sch 2(A3,A4); M = f.:X() proof thus M c= f.:X() proof let x be set; assume x in M; then consider u being Element of B() such that A7: x = u and A8: ex w being Element of A() st P[w,u] & w in X(); consider w being Element of A() such that A9: P[w,u] and A10: w in X() by A8; A11: w in dom f by A5,A9,A10; then Q[w,f.w] by A6; then f.w = x by A2,A7,A9; hence thesis by A10,A11,FUNCT_1:def 6; end; let x be set; assume x in f.:X(); then consider y being set such that A12: y in dom f and A13: y in X() and A14: x = f.y by FUNCT_1:def 6; reconsider x as Element of B() by A6,A12,A14; P[y,x] by A6,A12,A14; hence thesis by A12,A13; end; hence thesis by A1; end; begin reserve A,B,C for Ordinal, X,X1,Y,Y1,Z,a,b,b1,b2,x,y,z for set, R for Relation, f,g,h for Function, k,m,n for Nat; notation synonym 0 for {}; end; definition let IT be set; attr IT is cardinal means :Def1: ex B st IT = B & for A st A,B are_equipotent holds B c= A; end; registration cluster cardinal for set; existence proof set A = the Ordinal; defpred P[Ordinal] means $1,A are_equipotent; A1: ex A st P[A]; consider B such that A2: P[B] & for C st P[C] holds B c= C from ORDINAL1:sch 1(A1); reconsider IT = B as set; take IT,B; thus IT = B; let C; assume C,B are_equipotent; hence thesis by A2,WELLORD2:15; end; end; definition mode Cardinal is cardinal set; end; registration cluster cardinal -> ordinal for set; coherence proof let M be set; assume M is cardinal; then ex B st M = B & for A st A,B are_equipotent holds B c= A by Def1; hence thesis; end; end; reserve M,N for Cardinal; theorem Th1: for X ex A st X,A are_equipotent proof let X; consider R such that A1: R well_orders X by WELLORD2:17; set Q = R|_2 X; take A = order_type_of Q; Q is well-ordering by A1,WELLORD2:16; then Q,RelIncl A are_isomorphic by WELLORD2:def 2; then consider f such that A2: f is_isomorphism_of Q,RelIncl A by WELLORD1:def 8; take f; dom f = field Q & rng f = field RelIncl A by A2,WELLORD1:def 7; hence thesis by A1,A2,WELLORD1:def 7,WELLORD2:16,def 1; end; theorem Th2: M = N iff M,N are_equipotent proof thus M = N implies M,N are_equipotent; consider A such that A1: M = A and A2: for C st C,A are_equipotent holds A c= C by Def1; consider B such that A3: N = B and A4: for C st C,B are_equipotent holds B c= C by Def1; assume M,N are_equipotent; then B c= A & A c= B by A1,A2,A3,A4; hence thesis by A1,A3,XBOOLE_0:def 10; end; theorem M in N iff M c= N & M <> N proof M c< N iff M c= N & M <> N by XBOOLE_0:def 8; hence thesis by ORDINAL1:11,def 2; end; theorem M in N iff not N c= M by ORDINAL1:5,16; definition let X; func card X -> Cardinal means :Def2: X,it are_equipotent; existence proof defpred P[Ordinal] means $1,X are_equipotent; A1: ex A st P[A] by Th1; consider A such that A2: P[A] & for B st P[B] holds A c= B from ORDINAL1:sch 1(A1); A is cardinal proof take A; thus A = A; let B; assume B,A are_equipotent; hence thesis by A2,WELLORD2:15; end; then reconsider M = A as Cardinal; take M; thus thesis by A2; end; uniqueness proof let M,N; assume X,M are_equipotent & X,N are_equipotent; then M,N are_equipotent by WELLORD2:15; hence thesis by Th2; end; projectivity; end; registration cluster empty -> cardinal for set; coherence proof let S be set; assume A1: S is empty; take {}; thus S = {} by A1; let A such that A,{} are_equipotent; thus thesis; end; end; registration let X be empty set; cluster card X -> empty; coherence by Def2; end; registration let X be non empty set; cluster card X -> non empty; coherence proof assume card X is empty; then X,{} are_equipotent by Def2; then ex f st f is one-to-one & dom f = X & rng f = {} by WELLORD2:def 4; hence contradiction by RELAT_1:42; end; end; theorem Th5: X,Y are_equipotent iff card X = card Y proof A1: Y,card Y are_equipotent by Def2; A2: X,card X are_equipotent by Def2; thus X,Y are_equipotent implies card X = card Y proof assume X,Y are_equipotent; then card X,Y are_equipotent by A2,WELLORD2:15; hence thesis by Def2; end; assume card X = card Y; hence thesis by A2,A1,WELLORD2:15; end; theorem Th6: R is well-ordering implies field R,order_type_of R are_equipotent proof assume R is well-ordering; then R,RelIncl order_type_of R are_isomorphic by WELLORD2:def 2; then consider f such that A1: f is_isomorphism_of R,RelIncl order_type_of R by WELLORD1:def 8; take f; field RelIncl order_type_of R = order_type_of R by WELLORD2:def 1; hence thesis by A1,WELLORD1:def 7; end; theorem Th7: X c= M implies card X c= M proof defpred P[Ordinal] means $1 c= M & X,$1 are_equipotent; reconsider m = M as Ordinal; assume X c= M; then A1: order_type_of RelIncl X c= m & RelIncl X is well-ordering by WELLORD2:8,14; field RelIncl X = X by WELLORD2:def 1; then A2: ex A st P[A] by A1,Th6; consider A such that A3: P[A] & for B st P[B] holds A c= B from ORDINAL1:sch 1(A2); A is cardinal proof take A; thus A = A; let B; assume A4: B,A are_equipotent; assume A5: not A c= B; then m c= B by A3,A4,WELLORD2:15; hence contradiction by A3,A5,XBOOLE_1:1; end; then reconsider A as Cardinal; card X = A by A3,Def2; hence thesis by A3; end; theorem Th8: card A c= A proof ( ex B st card A = B & for C st C,B are_equipotent holds B c= C)& A,card A are_equipotent by Def1,Def2; hence thesis; end; theorem X in M implies card X in M by Th8,ORDINAL1:12; theorem Th10: card X c= card Y iff ex f st f is one-to-one & dom f = X & rng f c= Y proof thus card X c= card Y implies ex f st f is one-to-one & dom f = X & rng f c= Y proof X,card X are_equipotent by Def2; then consider f such that A1: f is one-to-one and A2: dom f = X & rng f = card X by WELLORD2:def 4; assume A3: card X c= card Y; Y,card Y are_equipotent by Def2; then consider g such that A4: g is one-to-one and A5: dom g = Y & rng g = card Y by WELLORD2:def 4; take h = g"*f; thus h is one-to-one by A1,A4; rng g = dom(g") & dom g = rng(g") by A4,FUNCT_1:33; hence thesis by A3,A2,A5,RELAT_1:26,27; end; given f such that A6: f is one-to-one and A7: dom f = X & rng f c= Y; Y,card Y are_equipotent by Def2; then consider g such that A8: g is one-to-one and A9: dom g = Y and A10: rng g = card Y by WELLORD2:def 4; A11: X,rng(g*f) are_equipotent proof take g*f; thus g*f is one-to-one by A6,A8; thus dom(g*f) = X by A7,A9,RELAT_1:27; thus thesis; end; rng(g*f),card rng(g*f) are_equipotent by Def2; then A12: X,card rng(g*f) are_equipotent by A11,WELLORD2:15; card rng(g*f) c= card Y by A10,Th7,RELAT_1:26; hence thesis by A12,Def2; end; theorem Th11: X c= Y implies card X c= card Y proof assume A1: X c= Y; ex f st f is one-to-one & dom f = X & rng f c= Y proof take id X; thus thesis by A1,RELAT_1:45; end; hence thesis by Th10; end; theorem Th12: card X c= card Y iff ex f st dom f = Y & X c= rng f proof thus card X c= card Y implies ex f st dom f = Y & X c= rng f proof assume card X c= card Y; then consider f such that A1: f is one-to-one and A2: dom f = X and A3: rng f c= Y by Th10; defpred P[set,set] means $1 in rng f & $2 = f".$1 or not $1 in rng f & $2 = 0; A4: for x st x in Y ex y st P[x,y] proof let x such that x in Y; not x in rng f implies thesis; hence thesis; end; A5: for x,y,z st x in Y & P[x,y] & P[x,z] holds y = z; consider g such that A6: dom g = Y & for y st y in Y holds P[y,g.y] from FUNCT_1:sch 2(A5, A4); take g; thus dom g = Y by A6; let x; assume A7: x in X; then A8: f.x in rng f by A2,FUNCT_1:def 3; f".(f.x) = x by A1,A2,A7,FUNCT_1:34; then x = g.(f.x) by A3,A6,A8; hence thesis by A3,A6,A8,FUNCT_1:def 3; end; given f such that A9: dom f = Y and A10: X c= rng f; deffunc f(set) = f"{$1}; consider g such that A11: dom g = X & for x st x in X holds g.x = f(x) from FUNCT_1:sch 3; X <> {} implies thesis proof assume X <> {}; then reconsider M = rng g as non empty set by A11,RELAT_1:42; for Z st Z in M holds Z <> {} proof let Z; assume Z in M; then consider x such that A12: x in dom g & Z = g.x by FUNCT_1:def 3; A13: x in {x} by TARSKI:def 1; Z = f"{x} & ex y st y in dom f & x = f.y by A10,A11,A12,FUNCT_1:def 3; hence thesis by A13,FUNCT_1:def 7; end; then consider F being Function such that A14: dom F = M and A15: for Z st Z in M holds F.Z in Z by FUNCT_1:111; A16: dom(F*g) = X by A11,A14,RELAT_1:27; A17: F*g is one-to-one proof let x,y; assume that A18: x in dom(F*g) and A19: y in dom(F*g) and A20: (F*g).x = (F*g).y; A21: g.y = f"{y} by A11,A16,A19; then f"{y} in M by A11,A16,A19,FUNCT_1:def 3; then F.(f"{y}) in f"{y} by A15; then A22: f.(F.(f"{y})) in {y} by FUNCT_1:def 7; A23: g.x = f"{x} by A11,A16,A18; then f"{x} in M by A11,A16,A18,FUNCT_1:def 3; then F.(f"{x}) in f"{x} by A15; then f.(F.(f"{x})) in {x} by FUNCT_1:def 7; then A24: f.(F.(f"{x})) = x by TARSKI:def 1; (F*g).x = F.(g.x) & (F*g).y = F. ( g.y) by A11,A16,A18,A19,FUNCT_1:13; hence thesis by A20,A23,A21,A22,A24,TARSKI:def 1; end; rng(F*g) c= Y proof let x; assume x in rng(F*g); then consider y such that A25: y in dom(F*g) and A26: x = (F*g).y by FUNCT_1:def 3; A27: x = F.(g.y) by A11,A16,A25,A26,FUNCT_1:13; A28: g.y = f"{y} by A11,A16,A25; then f"{y} in M by A11,A16,A25,FUNCT_1:def 3; then x in f"{y} by A15,A28,A27; hence thesis by A9,FUNCT_1:def 7; end; hence thesis by A16,A17,Th10; end; hence thesis; end; theorem Th13: not X,bool X are_equipotent proof given f such that f is one-to-one and A1: dom f = X & rng f = bool X; defpred P[set] means for Y st Y = f.$1 holds not $1 in Y; consider Z such that A2: a in Z iff a in X & P[a] from XBOOLE_0:sch 1; Z c= X proof let a; thus thesis by A2; end; then consider a such that A3: a in X and A4: Z = f.a by A1,FUNCT_1:def 3; not a in Z by A2,A4; then ex Y st Y = f.a & a in Y by A2,A3; hence contradiction by A2,A4; end; theorem Th14: card X in card bool X proof deffunc f(set) = {$1}; consider f such that A1: dom f = X & for x st x in X holds f.x = f(x) from FUNCT_1:sch 3; A2: rng f c= bool X proof let x; assume x in rng f; then consider y such that A3: y in dom f and A4: x = f.y by FUNCT_1:def 3; A5: { y } c= X proof let z; assume z in { y }; hence thesis by A1,A3,TARSKI:def 1; end; f.y = { y } by A1,A3; hence thesis by A4,A5; end; not X,bool X are_equipotent by Th13; then A6: card X <> card bool X by Th5; f is one-to-one proof let x,y; assume that A7: x in dom f & y in dom f and A8: f.x = f.y; f.x = { x } & f.y = { y } by A1,A7; hence thesis by A8,ZFMISC_1:3; end; then card X c= card bool X by A1,A2,Th10; then card X c< card bool X by A6,XBOOLE_0:def 8; hence thesis by ORDINAL1:11; end; definition let X; func nextcard X -> Cardinal means :Def3: card X in it & for M st card X in M holds it c= M; existence proof defpred P[Ordinal] means ex M st $1 = M & card X in M; card X in card bool X by Th14; then A1: ex A st P[A]; consider A such that A2: P[A] and A3: for B st P[B] holds A c= B from ORDINAL1:sch 1(A1); consider M such that A4: A = M and A5: card X in M by A2; take M; thus card X in M by A5; let N; assume card X in N; hence thesis by A3,A4; end; uniqueness proof let M1,M2 be Cardinal; assume card X in M1 & ( for M st card X in M holds M1 c= M)& card X in M2 & for M st card X in M holds M2 c= M; then M1 c= M2 & M2 c= M1; hence thesis by XBOOLE_0:def 10; end; end; theorem {} in nextcard X proof card {} c= card X & card X in nextcard X by Def3; hence thesis by ORDINAL1:12; end; theorem Th16: card X = card Y implies nextcard X = nextcard Y proof assume A1: card X = card Y; card X in nextcard X & for N st card X in N holds nextcard X c= N by Def3; hence thesis by A1,Def3; end; theorem Th17: X,Y are_equipotent implies nextcard X = nextcard Y proof assume X,Y are_equipotent; then card X = card Y by Th5; hence thesis by Th16; end; theorem Th18: A in nextcard A proof assume not A in nextcard A; then A1: card nextcard A c= card A by Th11,ORDINAL1:16; A,card A are_equipotent by Def2; then A2: nextcard card A = nextcard A by Th17; A3: card card A in nextcard card A by Def3; card nextcard A = nextcard A by Def2; hence contradiction by A1,A2,A3,ORDINAL1:5; end; reserve S for T-Sequence; definition let M; attr M is limit_cardinal means :Def4: not ex N st M = nextcard N; end; definition let A; func alef A -> set means :Def5: ex S st it = last S & dom S = succ A & S.{} = card omega & (for B st succ B in succ A holds S.succ B = nextcard union { S.B }) & for B st B in succ A & B <> {} & B is limit_ordinal holds S.B = card sup(S |B); correctness proof set B = card omega; deffunc D(Ordinal,T-Sequence) = card sup $2; deffunc C(Ordinal,set) = nextcard union {$2}; thus (ex x,S st x = last S & dom S = succ A & S.{} = B & (for C st succ C in succ A holds S.succ C = C(C,S.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds S.C = D(C,S|C) ) & for x1,x2 being set st (ex S st x1 = last S & dom S = succ A & S.{} = B & (for C st succ C in succ A holds S.succ C = C(C,S.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds S.C = D (C,S|C) ) & (ex S st x2 = last S & dom S = succ A & S.{} = B & (for C st succ C in succ A holds S.succ C = C(C,S.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds S.C = D(C,S|C) ) holds x1 = x2 from ORDINAL2:sch 7; end; end; Lm1: now deffunc D(Ordinal,T-Sequence) = card sup $2; deffunc C(Ordinal,set) = nextcard union { $2 }; deffunc F(Ordinal) = alef $1; A1: for A,x holds x = F(A) iff ex S st x = last S & dom S = succ A & S.{} = card omega & (for C st succ C in succ A holds S.succ C = C(C,S.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds S.C = D(C,S|C) by Def5; F({}) = card omega from ORDINAL2:sch 8(A1); hence alef 0 = card omega; thus for A holds F(succ A) = C(A,F(A)) from ORDINAL2:sch 9(A1); thus A <> {} & A is limit_ordinal implies for S st dom S = A & for B st B in A holds S.B = alef B holds alef A = card sup S proof assume A2: A <> {} & A is limit_ordinal; let S such that A3: dom S = A and A4: for B st B in A holds S.B = F(B); thus F(A) = D(A,S) from ORDINAL2:sch 10(A1,A2,A3,A4); end; end; deffunc f(Ordinal) = alef $1; registration let A; cluster alef A -> cardinal; coherence proof A1: now consider S such that A2: dom S = A & for B st B in A holds S.B = f(B) from ORDINAL2:sch 2; assume that A3: A <> {} and A4: for B holds A <> succ B; A is limit_ordinal by A4,ORDINAL1:29; then alef A = card sup S by A3,A2,Lm1; hence alef A is Cardinal; end; now given B such that A5: A = succ B; alef A = nextcard union {alef B} by A5,Lm1; hence thesis; end; hence thesis by A1,Lm1; end; end; theorem Th19: alef succ A = nextcard alef A proof thus alef succ A = nextcard union { alef A } by Lm1 .= nextcard alef A by ZFMISC_1:25; end; theorem A <> {} & A is limit_ordinal implies for S st dom S = A & for B st B in A holds S.B = alef B holds alef A = card sup S by Lm1; theorem Th21: A in B iff alef A in alef B proof defpred P[Ordinal] means for A st A in $1 holds alef A in alef $1; A1: for B st P[B] holds P[succ B] proof let B such that A2: P[B]; let A; A3: alef succ B = nextcard alef B by Th19; A4: now assume A in B; then A5: alef A in alef B by A2; alef B in nextcard alef B by Th18; hence thesis by A3,A5,ORDINAL1:10; end; A6: A c< B iff A c= B & A <> B by XBOOLE_0:def 8; assume A in succ B; hence thesis by A3,A6,A4,Th18,ORDINAL1:11,22; end; A7: for B st B <> {} & B is limit_ordinal & for C st C in B holds P[C] holds P[B] proof let B such that A8: B <> {} and A9: B is limit_ordinal and for C st C in B for A st A in C holds alef A in alef C; let A; consider S such that A10: dom S = B & for C st C in B holds S.C = f(C) from ORDINAL2:sch 2; assume A in B; then succ A in B by A9,ORDINAL1:28; then S.succ A in rng S & S.succ A = alef succ A by A10,FUNCT_1:def 3; then A11: alef succ A in sup rng S by ORDINAL2:19; sup rng S = sup S by ORDINAL2:26; then A12: alef succ A c= sup S by A11,ORDINAL1:def 2; A13: card alef succ A = alef succ A by Def2; A14: alef succ A = nextcard alef A & alef A in nextcard alef A by Th18,Th19; alef B = card sup S by A8,A9,A10,Lm1; then alef succ A c= alef B by A12,A13,Th11; hence thesis by A14; end; A15: P[{}]; A16: for B holds P[B] from ORDINAL2:sch 1(A15,A1,A7); hence A in B implies alef A in alef B; assume A17: alef A in alef B; then A18: alef A <> alef B; not B in A by A16,A17; hence thesis by A18,ORDINAL1:14; end; theorem Th22: alef A = alef B implies A = B proof assume A1: alef A = alef B; A2: now assume B in A; then alef B in alef A by Th21; hence contradiction by A1; end; now assume A in B; then alef A in alef B by Th21; hence contradiction by A1; end; hence thesis by A2,ORDINAL1:14; end; theorem A c= B iff alef A c= alef B proof A1: A c< B iff A <> B & A c= B by XBOOLE_0:def 8; A2: alef A c< alef B iff alef A <> alef B & alef A c= alef B by XBOOLE_0:def 8; A in B iff alef A in alef B by Th21; hence thesis by A1,A2,Th22,ORDINAL1:11,def 2; end; theorem X c= Y & Y c= Z & X,Z are_equipotent implies X,Y are_equipotent & Y,Z are_equipotent proof assume that A1: X c= Y & Y c= Z and A2: X,Z are_equipotent; A3: card X = card Z by A2,Th5; card X c= card Y & card Y c= card Z by A1,Th11; then card X = card Y by A3,XBOOLE_0:def 10; hence thesis by A3,Th5; end; theorem bool Y c= X implies card Y in card X & not Y,X are_equipotent proof assume bool Y c= X; then A1: card bool Y c= card X by Th11; card Y in card bool Y by Th14; hence card Y in card X by A1; then card Y <> card X; hence thesis by Th5; end; theorem Th26: X,{} are_equipotent implies X = {} proof given f such that f is one-to-one and A1: dom f = X & rng f = {}; thus thesis by A1,RELAT_1:42; end; theorem card {} = {}; theorem Th28: X,{x} are_equipotent iff ex x st X = { x } proof thus X,{x} are_equipotent implies ex x st X = { x } proof assume X,{x} are_equipotent; then consider f such that f is one-to-one and A1: dom f = { x } and A2: rng f = X by WELLORD2:def 4; rng f = { f.x } by A1,FUNCT_1:4; hence thesis by A2; end; given y such that A3: X = { y }; take f = X --> x; A4: dom f = X by FUNCOP_1:13; thus f is one-to-one proof let a,b; assume that A5: a in dom f and A6: b in dom f and f.a = f.b; a = y by A3,A4,A5,TARSKI:def 1; hence thesis by A3,A4,A6,TARSKI:def 1; end; thus dom f = X by FUNCOP_1:13; thus rng f c= { x } by FUNCOP_1:13; let a; assume a in { x }; then A7: a = x by TARSKI:def 1; A8: y in { y } by TARSKI:def 1; then f.y = x by A3,FUNCOP_1:7; hence thesis by A3,A4,A7,A8,FUNCT_1:def 3; end; theorem Th29: card X = card { x } iff ex x st X = { x } proof card X = card { x } iff X,{x} are_equipotent by Th5; hence thesis by Th28; end; theorem Th30: card { x } = 1 proof A1: 1 = succ 0; 1 is cardinal proof take IT = 1; thus 1 = IT; let A; assume A,IT are_equipotent; then ex y st A = { y } by A1,Th28; hence thesis by A1,ZFMISC_1:33; end; then reconsider M = 1 as Cardinal; { x },M are_equipotent by A1,Th28; hence thesis by Def2; end; theorem Th31: X misses X1 & Y misses Y1 & X,Y are_equipotent & X1,Y1 are_equipotent implies X \/ X1,Y \/ Y1 are_equipotent proof assume that A1: X /\ X1 = {} and A2: Y /\ Y1 = {}; given f such that A3: f is one-to-one and A4: dom f = X and A5: rng f = Y; given g such that A6: g is one-to-one and A7: dom g = X1 and A8: rng g = Y1; defpred P[set,set] means $1 in X & $2 = f.$1 or $1 in X1 & $2 = g.$1; A9: for x st x in X \/ X1 ex y st P[x,y] proof let x; assume x in X \/ X1; then x in X or x in X1 by XBOOLE_0:def 3; hence thesis; end; A10: for x,y,z st x in X \/ X1 & P[x,y] & P[x,z] holds y = z by A1, XBOOLE_0:def 4; consider h such that A11: dom h = X \/ X1 and A12: for x st x in X \/ X1 holds P[x,h.x] from FUNCT_1:sch 2(A10,A9); take h; thus h is one-to-one proof let x,y; assume that A13: x in dom h and A14: y in dom h and A15: h.x = h.y; A16: y in X & h.y = f.y or y in X1 & h.y = g.y by A11,A12,A14; A17: x in X & h.x = f.x or x in X1 & h.x = g.x by A11,A12,A13; A18: now assume A19: y in X & x in X1; then f.y in Y & g.x in Y1 by A4,A5,A7,A8,FUNCT_1:def 3; hence contradiction by A1,A2,A15,A17,A16,A19,XBOOLE_0:def 4; end; now assume A20: x in X & y in X1; then f.x in Y & g.y in Y1 by A4,A5,A7,A8,FUNCT_1:def 3; hence contradiction by A1,A2,A15,A17,A16,A20,XBOOLE_0:def 4; end; hence thesis by A3,A4,A6,A7,A15,A17,A16,A18,FUNCT_1:def 4; end; thus dom h = X \/ X1 by A11; thus rng h c= Y \/ Y1 proof let x; assume x in rng h; then consider y such that A21: y in dom h and A22: x = h.y by FUNCT_1:def 3; A23: y in X & x = f.y or y in X1 & x = g.y by A11,A12,A21,A22; A24: now assume y in X1; then x in Y1 by A1,A7,A8,A23,FUNCT_1:def 3,XBOOLE_0:def 4; hence thesis by XBOOLE_0:def 3; end; now assume y in X; then x in Y by A1,A4,A5,A23,FUNCT_1:def 3,XBOOLE_0:def 4; hence thesis by XBOOLE_0:def 3; end; hence thesis by A11,A21,A24,XBOOLE_0:def 3; end; let x such that A25: x in Y \/ Y1; A26: now assume x in Y1; then consider y such that A27: y in dom g and A28: x = g.y by A8,FUNCT_1:def 3; A29: y in X \/ X1 by A7,A27,XBOOLE_0:def 3; then P[y,h.y] by A12; hence thesis by A1,A7,A11,A27,A28,A29,FUNCT_1:def 3,XBOOLE_0:def 4; end; now assume x in Y; then consider y such that A30: y in dom f and A31: x = f.y by A5,FUNCT_1:def 3; A32: y in X \/ X1 by A4,A30,XBOOLE_0:def 3; then P[y,h.y] by A12; hence thesis by A1,A4,A11,A30,A31,A32,FUNCT_1:def 3,XBOOLE_0:def 4; end; hence thesis by A25,A26,XBOOLE_0:def 3; end; theorem Th32: x in X & y in X implies X \ { x },X \ { y } are_equipotent proof assume that A1: x in X and A2: y in X; defpred P[set,set] means $1 = y & $2 = x or $1 <> y & $1 = $2; A3: for a st a in X \ { x } ex b st P[a,b] proof let a such that a in X \ { x }; a = y implies thesis; hence thesis; end; A4: for a,b1,b2 st a in X \ { x } & P[a,b1] & P[a,b2] holds b1 = b2; consider f such that A5: dom f = X \ { x } & for a st a in X \ { x } holds P[a,f.a] from FUNCT_1:sch 2(A4, A3); take f; thus f is one-to-one proof let b1,b2; assume that A6: b1 in dom f & b2 in dom f and A7: f.b1 = f.b2 & b1 <> b2; A8: ( not b1 in { x })& not b2 in { x } by A5,A6,XBOOLE_0:def 5; ( P[b1,f.b1])& P[b2,f.b2] by A5,A6; hence thesis by A7,A8,TARSKI:def 1; end; thus dom f = X \ { x } by A5; thus rng f c= X \ { y } proof let z; assume z in rng f; then consider a such that A9: a in dom f and A10: z = f.a by FUNCT_1:def 3; A11: now assume A12: a = y; then ( not y in { x })& z = x by A5,A9,A10,XBOOLE_0:def 5; then y <> z by TARSKI:def 1; then A13: not z in { y } by TARSKI:def 1; z in X by A1,A5,A9,A10,A12; hence thesis by A13,XBOOLE_0:def 5; end; now assume a <> y; then ( not a in { y })& a = z by A5,A9,A10,TARSKI:def 1; hence thesis by A5,A9,XBOOLE_0:def 5; end; hence thesis by A11; end; let z; assume A14: z in X \ { y }; then not z in { y } by XBOOLE_0:def 5; then A15: z <> y by TARSKI:def 1; A16: now assume z <> x; then not z in { x } by TARSKI:def 1; then A17: z in X \ { x } by A14,XBOOLE_0:def 5; then z = f.z by A5,A15; hence thesis by A5,A17,FUNCT_1:def 3; end; now assume A18: z = x; then not y in { x } by A15,TARSKI:def 1; then A19: y in dom f by A2,A5,XBOOLE_0:def 5; then z = f.y by A5,A18; hence thesis by A19,FUNCT_1:def 3; end; hence thesis by A16; end; theorem Th33: X c= dom f & f is one-to-one implies X,f.:X are_equipotent proof assume that A1: X c= dom f and A2: f is one-to-one; take g = f|X; thus g is one-to-one by A2,FUNCT_1:52; thus dom g = X by A1,RELAT_1:62; thus thesis by RELAT_1:115; end; theorem Th34: X,Y are_equipotent & x in X & y in Y implies X \ { x },Y \ { y } are_equipotent proof given f such that A1: f is one-to-one and A2: dom f = X and A3: rng f = Y; A4: X \ { x },f.:(X \ { x }) are_equipotent by A1,A2,Th33; assume that A5: x in X and A6: y in Y; f.x in Y by A2,A3,A5,FUNCT_1:def 3; then A7: Y \ { f.x },Y \ { y } are_equipotent by A6,Th32; f.:(X \ { x }) = f.:X \ Im(f,x) by A1,FUNCT_1:64 .= Y \ Im(f,x) by A2,A3,RELAT_1:113 .= Y \ { f.x } by A2,A5,FUNCT_1:59; hence thesis by A4,A7,WELLORD2:15; end; theorem Th35: succ X, succ Y are_equipotent implies X, Y are_equipotent proof A1: X in succ X & Y in succ Y by ORDINAL1:6; X = succ X \ {X} & Y = succ Y \ {Y} by ORDINAL1:37; hence thesis by A1,Th34; end; theorem Th36: n = {} or ex m st n = succ m proof defpred P[Nat] means $1 = {} or ex m st $1 = succ m; A1: for a being Nat st P[a] holds P[succ a]; A2: P[{}]; thus P[n] from ORDINAL2:sch 17(A2,A1); end; Lm2: n,m are_equipotent implies n = m proof defpred P[Nat] means for n st n,$1 are_equipotent holds n = $1; A1: for a being Nat st P[a] holds P[succ a] proof let a be Nat such that A2: P[a]; let n; assume A3: n,succ a are_equipotent; per cases; suppose n = {}; hence thesis by A3,Th26; end; suppose n <> {}; then ex m st n = succ m by Th36; hence thesis by A2,A3,Th35; end; end; A4: P[{}] by Th26; P[m] from ORDINAL2:sch 17(A4,A1); hence thesis; end; theorem Th37: x in omega implies x is cardinal proof assume that A1: x in omega and A2: for B st x = B ex C st C,B are_equipotent & not B c= C; reconsider A = x as Ordinal by A1; consider B such that A3: B,A are_equipotent and A4: not A c= B by A2; B in A by A4,ORDINAL1:16; then B in omega by A1,ORDINAL1:10; then reconsider n = A, m = B as Nat by A1; n,m are_equipotent by A3; hence contradiction by A4,Lm2; end; registration cluster natural -> cardinal for number; correctness proof let n be number; assume n is natural; then n in omega by ORDINAL1:def 12; hence thesis by Th37; end; end; theorem Th38: X,Y are_equipotent & X is finite implies Y is finite proof assume X,Y are_equipotent; then consider f such that f is one-to-one and A1: dom f = X and A2: rng f = Y by WELLORD2:def 4; given p being Function such that A3: rng p = X and A4: dom p in omega; take f*p; thus rng(f*p) = Y by A1,A2,A3,RELAT_1:28; thus thesis by A1,A3,A4,RELAT_1:27; end; theorem Th39: n is finite & card n is finite proof reconsider n as Element of omega by ORDINAL1:def 12; rng id n = n & dom id n = n by RELAT_1:45; then n is finite by FINSET_1:def 1; hence thesis by Def2; end; theorem card n = card m implies n = m proof assume A1: card n = card m; reconsider n as Element of omega by ORDINAL1:def 12; card n = n by Def2; hence thesis by A1,Def2; end; theorem card n c= card m iff n c= m proof card n = n by Def2; hence thesis by Def2; end; theorem Th42: card n in card m iff n in m proof card n = n by Def2; hence thesis by Def2; end; theorem Th43: X is finite implies ex n st X,n are_equipotent proof defpred P[set] means ex n st $1,n are_equipotent; A1: P[{}]; A2: for Z,Y st Z in X & Y c= X & P[Y] holds P[Y \/ {Z}] proof let Z,Y such that Z in X and Y c= X; given n such that A3: Y,n are_equipotent; A4: not Z in Y implies thesis proof assume A5: not Z in Y; now set x = the Element of Y /\ { Z }; assume Y /\ { Z } <> {}; then x in Y & x in { Z } by XBOOLE_0:def 4; hence contradiction by A5,TARSKI:def 1; end; then A6: Y misses { Z } by XBOOLE_0:def 7; A7: now assume n meets { n }; then consider x being set such that A8: x in n and A9: x in { n } by XBOOLE_0:3; x = n by A9,TARSKI:def 1; hence contradiction by A8; end; take succ n; { Z },{ n } are_equipotent by Th28; hence thesis by A3,A7,A6,Th31; end; Z in Y implies thesis proof assume A10: Z in Y; take n; { Z } c= Y by A10,ZFMISC_1:31; hence thesis by A3,XBOOLE_1:12; end; hence thesis by A4; end; assume A11: X is finite; thus P[X] from FINSET_1:sch 2(A11,A1,A2); end; theorem Th44: nextcard card n = card succ n proof reconsider sn = succ n as Nat; A1: for M st card card n in M holds card succ n c= M proof A2: card n = n by Def2; let M; assume card card n in M; then succ n c= M by A2,ORDINAL1:21; hence thesis by Def2; end; n in succ n by ORDINAL1:6; then card n in card sn by Th42; hence thesis by A1,Def3; end; definition let n be Nat; redefine func succ n -> Element of omega; coherence by ORDINAL1:def 12; end; definition let X be finite set; redefine func card X -> Element of omega; coherence proof consider n such that A1: X,n are_equipotent by Th43; reconsider n as Element of omega by ORDINAL1:def 12; X,n are_equipotent by A1; hence thesis by Def2; end; end; theorem X is finite implies nextcard X is finite proof assume X is finite; then reconsider X as finite set; card X = card card X; then A1: card(succ card X) = nextcard card X by Th44; X,card X are_equipotent by Def2; then nextcard card X = nextcard X by Th17; hence thesis by A1,Th39; end; scheme CardinalInd { Sigma[set] }: for M holds Sigma[M] provided A1: Sigma[{}] and A2: for M st Sigma[M] holds Sigma[nextcard M] and A3: for M st M <> {} & M is limit_cardinal & for N st N in M holds Sigma [N] holds Sigma[M] proof let M; defpred P[Ordinal] means $1 is Cardinal implies Sigma[$1]; A4: for A st for B st B in A holds P[B] holds P[A] proof let A such that A5: for B st B in A holds P[B] and A6: A is Cardinal; reconsider M = A as Cardinal by A6; A7: now assume not M is limit_cardinal; then consider N such that A8: M = nextcard N by Def4; N in M by A8,Th18; hence Sigma[M] by A2,A5,A8; end; now assume A9: M <> {} & M is limit_cardinal; for N st N in M holds Sigma[N] by A5; hence Sigma[M] by A3,A9; end; hence thesis by A1,A7; end; for A holds P[A] from ORDINAL1:sch 2(A4); hence thesis; end; scheme CardinalCompInd { Sigma[set] }: for M holds Sigma[M] provided A1: for M st for N st N in M holds Sigma[N] holds Sigma[M] proof let M; defpred P[Ordinal] means $1 is Cardinal implies Sigma[$1]; A2: for A st for B st B in A holds P[B] holds P[A] proof let A such that A3: for B st B in A holds B is Cardinal implies Sigma[B]; assume A is Cardinal; then reconsider M = A as Cardinal; for N st N in M holds Sigma[N] by A3; hence thesis by A1; end; for A holds P[A] from ORDINAL1:sch 2(A2); hence thesis; end; theorem Th46: alef 0 = omega proof thus alef 0 c= omega by Lm1,Th8; thus omega c= alef 0 proof let x; assume A1: x in omega; then reconsider A = x as Ordinal; consider n being Element of omega such that A2: A = n by A1; succ n c= omega by ORDINAL1:21; then A3: card succ n c= card omega by Th11; n in succ n & card succ n = succ n by Def2,ORDINAL1:6; hence thesis by A2,A3,Lm1; end; end; registration cluster omega -> cardinal for number; coherence by Th46; end; theorem card omega = omega by Lm1,Th46; registration cluster omega -> limit_cardinal; coherence proof given N such that A1: omega = nextcard N; N in omega by A1,Th18; then A2: succ N in omega by ORDINAL1:def 12; reconsider n=N as Element of omega by A1,Th18; A3: card succ n = succ n by Def2; nextcard card n = card succ n & card n = n by Def2,Th44; hence contradiction by A1,A2,A3; end; end; registration cluster -> finite for Element of omega; coherence by Th39; end; registration cluster finite for Cardinal; existence proof set n = the Element of omega; take n; thus thesis; end; end; theorem for M being finite Cardinal ex n st M = card n proof let M be finite Cardinal; card M = M by Def2; hence thesis; end; registration let X be finite set; cluster card X -> finite; coherence; end; Lm3: A,n are_equipotent implies A = n proof defpred P[Nat] means for A st A,$1 are_equipotent holds A = $1; A1: for n st P[n] holds P[succ n] proof let n such that A2: P[n]; let A; A3: n in (succ n) & (succ n) \ { n} = n by ORDINAL1:6,37; assume A4: A,succ n are_equipotent; then A <> {} by Th26; then A5: {} in A by ORDINAL3:8; now assume A is limit_ordinal; then A6: omega c= A by A5,ORDINAL1:def 11; card A = card (succ n) by A4,Th5; hence contradiction by A6,Lm1,Th11,Th46,ORDINAL1:5; end; then consider B such that A7: A = succ B by ORDINAL1:29; B in A & A\{B} = B by A7,ORDINAL1:6,37; hence thesis by A2,A4,A7,A3,Th34; end; A8: P[{}] by Th26; P[n] from ORDINAL2:sch 17(A8,A1); hence thesis; end; Lm4: A is finite iff A in omega proof thus A is finite implies A in omega proof assume A is finite; then consider n such that A1: A,n are_equipotent by Th43; A = n by A1,Lm3; hence thesis by ORDINAL1:def 12; end; assume A in omega; hence thesis; end; registration cluster omega -> infinite; coherence proof not omega in omega; hence thesis by Lm4; end; end; registration cluster infinite for set; existence proof take omega; thus thesis; end; end; registration let X be infinite set; cluster card X -> infinite; coherence proof X,card X are_equipotent by Def2; hence thesis by Th38; end; end; begin theorem Th49: 1 = { 0 } proof thus 1 = succ 0 .= { 0 }; end; theorem Th50: 2 = { 0,1 } proof thus 2 = succ 1 .= { 0,1 } by Th49,ENUMSET1:1; end; theorem Th51: 3 = { 0,1,2 } proof thus 3 = succ 2 .= { 0,1,2 } by Th50,ENUMSET1:3; end; theorem Th52: 4 = { 0,1,2,3 } proof thus 4 = succ 3 .= { 0,1,2,3 } by Th51,ENUMSET1:6; end; theorem Th53: 5 = { 0,1,2,3,4 } proof thus 5 = succ 4 .= { 0,1,2,3,4 } by Th52,ENUMSET1:10; end; theorem Th54: 6 = { 0,1,2,3,4,5 } proof thus 6 = succ 5 .= { 0,1,2,3,4,5 } by Th53,ENUMSET1:15; end; theorem Th55: 7 = { 0,1,2,3,4,5,6 } proof thus 7 = succ 6 .= { 0,1,2,3,4,5,6 } by Th54,ENUMSET1:21; end; theorem Th56: 8 = { 0,1,2,3,4,5,6,7 } proof thus 8 = succ 7 .= { 0,1,2,3,4,5,6,7 } by Th55,ENUMSET1:28; end; theorem Th57: 9 = { 0,1,2,3,4,5,6,7,8 } proof thus 9 = succ 8 .= { 0,1,2,3,4,5,6,7,8 } by Th56,ENUMSET1:84; end; theorem 10 = { 0,1,2,3,4,5,6,7,8,9 } proof thus 10 = succ 9 .= { 0,1,2,3,4,5,6,7,8,9 } by Th57,ENUMSET1:85; end; theorem for f being Function st dom f is infinite & f is one-to-one holds rng f is infinite proof let f be Function; assume that A1: dom f is infinite and A2: f is one-to-one; dom f,rng f are_equipotent by A2,WELLORD2:def 4; hence thesis by A1,Th38; end; reserve k,n,m for Nat; definition let n; func Segm n -> set equals n; coherence; end; reserve l for Element of omega; definition let n; redefine func Segm n -> Subset of omega; coherence proof n in omega by ORDINAL1:def 12; hence thesis by ORDINAL1:16; end; end; theorem A,n are_equipotent implies A = n by Lm3; theorem A is finite iff A in omega by Lm4; registration cluster natural -> finite for set; coherence proof let a be set; assume a in omega; hence thesis; end; end; registration let A be infinite set; cluster bool A -> infinite; coherence proof defpred P[set] means ex y st $1={y}; consider X being set such that A1: for x holds x in X iff x in bool A & P[x] from XBOOLE_0:sch 1; for x holds x in union X iff x in A proof let x; thus x in union X implies x in A proof assume x in union X; then consider B being set such that A2: x in B and A3: B in X by TARSKI:def 4; B in bool A by A1,A3; hence thesis by A2; end; assume x in A; then {x} c= A by ZFMISC_1:31; then A4: {x} in X by A1; x in {x} by TARSKI:def 1; hence thesis by A4,TARSKI:def 4; end; then A5: union X = A by TARSKI:1; A6: for B being set st B in X holds B is finite proof let B be set; assume B in X; then ex y st B = {y} by A1; hence thesis; end; A7: X c= bool A proof let x; assume x in X; hence thesis by A1; end; assume bool A is finite; hence thesis by A5,A6,A7,FINSET_1:7; end; let B be non empty set; cluster [:A,B:] ->infinite; coherence proof deffunc F(set) = $1`1; consider f such that A8: dom f = [:A,B:] and A9: for x st x in [:A,B:] holds f.x = F(x) from FUNCT_1:sch 3; x in rng f iff x in A proof thus x in rng f implies x in A proof assume x in rng f; then consider y such that A10: y in dom f and A11: f.y = x by FUNCT_1:def 3; x = y`1 by A8,A9,A10,A11; hence thesis by A8,A10,MCART_1:10; end; set y = the Element of B; assume x in A; then A12: [x,y] in dom f by A8,ZFMISC_1:87; then f.([x,y]) = [x,y]`1 by A8,A9 .= x; hence thesis by A12,FUNCT_1:def 3; end; then rng f = A by TARSKI:1; then A13: f.:[:A,B:] = A by A8,RELAT_1:113; assume [:A,B:] is finite; hence contradiction by A13; end; cluster [:B,A:] ->infinite; coherence proof deffunc F(set) = $1`2; consider f such that A14: dom f = [:B,A:] and A15: for x st x in [:B,A:] holds f.x = F(x) from FUNCT_1:sch 3; y in rng f iff y in A proof thus y in rng f implies y in A proof assume y in rng f; then consider x such that A16: x in dom f and A17: f.x = y by FUNCT_1:def 3; y = x`2 by A14,A15,A16,A17; hence thesis by A14,A16,MCART_1:10; end; set x = the Element of B; assume y in A; then A18: [x,y] in dom f by A14,ZFMISC_1:87; [x,y]`2 = y; then f.([x,y]) = y by A14,A15,A18; hence thesis by A18,FUNCT_1:def 3; end; then rng f = A by TARSKI:1; then A19: f.:[:B,A:] = A by A14,RELAT_1:113; assume [:B,A:] is finite; hence contradiction by A19; end; end; registration let X be infinite set; cluster infinite for Subset of X; existence proof X c= X; hence thesis; end; end; registration cluster finite ordinal -> natural for number; coherence proof let n be number; assume n is finite ordinal; then n in omega by Lm4; hence thesis; end; end; theorem Th62: for f being Function holds card f = card dom f proof let f be Function; dom f,f are_equipotent proof deffunc F(set) = [$1,f.$1]; consider g being Function such that A1: dom g = dom f and A2: for x st x in dom f holds g.x = F(x) from FUNCT_1:sch 3; take g; thus g is one-to-one proof let x,y; assume that A3: x in dom g and A4: y in dom g; assume g.x = g.y; then [x,f.x] = g.y by A1,A2,A3 .= [y,f.y] by A1,A2,A4; hence thesis by XTUPLE_0:1; end; thus dom g = dom f by A1; thus rng g c= f proof let i be set; assume i in rng g; then consider x such that A5: x in dom g and A6: g.x = i by FUNCT_1:def 3; g.x = [x,f.x] by A1,A2,A5; hence thesis by A1,A5,A6,FUNCT_1:1; end; let x,y; assume A7: [x,y] in f; then A8: x in dom f by FUNCT_1:1; y = f.x by A7,FUNCT_1:1; then g.x = [x,y] by A2,A8; hence thesis by A1,A8,FUNCT_1:def 3; end; hence thesis by Th5; end; registration let X be finite set; cluster RelIncl X -> finite; coherence proof RelIncl X c= [:X,X:] by WELLORD2:23; hence thesis; end; end; theorem RelIncl X is finite implies X is finite proof set R = RelIncl X; assume R is finite; then reconsider A = R as finite Relation; field A is finite; hence thesis by WELLORD2:def 1; end; theorem card(k -->x) = k proof dom(k -->x) = k by FUNCOP_1:13; hence card(k -->x) = card k by Th62 .= k by Def2; end; begin definition let N,X be set; attr X is N-element means :Def7: card X = N; end; registration let N be Cardinal; cluster N-element for set; existence proof take N; thus card N = N by Def2; end; end; registration cluster 0-element -> empty for set; coherence proof let X be set; assume X is 0-element; then card X = 0 by Def7; hence X is empty; end; cluster empty -> 0-element for set; coherence proof let X be set; assume X is empty; then card X = {}; hence X is 0-element by Def7; end; end; registration let x be set; cluster {x} -> 1-element; coherence proof 1 = succ 0; then { x },1 are_equipotent by Th28; hence card { x } = 1 by Def2; end; end; registration let N be Cardinal; cluster N-element for Function; existence proof take f = N --> {{}}; dom f = N by FUNCOP_1:13; then card dom f = N by Def2; hence card f = N by Th62; end; end; registration let N be Cardinal; let f be N-element Function; cluster dom f -> N-element; coherence proof card f = N by Def7; hence card dom f = N by Th62; end; end; registration cluster 1-element -> trivial non empty for set; coherence proof let X be set; assume X is 1-element; then card X = 1 by Def7 .= card {0} by Th30; then ex x st X = {x} by Th29; hence thesis; end; cluster trivial non empty -> 1-element for set; coherence proof let X be set; assume X is trivial non empty; then ex x st X = {x} by ZFMISC_1:131; hence thesis; end; end; registration let X be non empty set; cluster 1-element for Subset of X; existence proof take the non empty trivial Subset of X; thus thesis; end; end; definition let X be non empty set; mode Singleton of X is 1-element Subset of X; end; theorem for X being non empty set, A being Singleton of X ex x being Element of X st A = {x} proof let X be non empty set, A be Singleton of X; consider x such that A1: A = {x} by ZFMISC_1:131; x in A by A1,TARSKI:def 1; then reconsider x as Element of X; take x; thus thesis by A1; end; theorem Th66: card X c= card Y iff ex f st X c= f.:Y proof deffunc G(set) = $1; thus card X c= card Y implies ex f st X c= f.:Y proof assume card X c= card Y; then consider f such that A1: dom f = Y & X c= rng f by Th12; take f; thus thesis by A1,RELAT_1:113; end; given f such that A2: X c= f.:Y; defpred C[set] means $1 in dom f; deffunc F(set) = f.$1; consider g such that A3: dom g = Y & for x st x in Y holds (C[x] implies g.x = F(x)) & (not C [x] implies g.x = G(x)) from PARTFUN1:sch 1; X c= rng g proof let x; assume x in X; then consider y such that A4: y in dom f and A5: y in Y and A6: x = f.y by A2,FUNCT_1:def 6; x = g.y by A3,A4,A5,A6; hence thesis by A3,A5,FUNCT_1:def 3; end; hence thesis by A3,Th12; end; theorem card (f.:X) c= card X by Th66; theorem card X in card Y implies Y \ X <> {} proof assume that A1: card X in card Y and A2: Y \ X = {}; Y c= X by A2,XBOOLE_1:37; then card Y c= card X by Th11; hence contradiction by A1,ORDINAL1:5; end; theorem X,[:X,{x}:] are_equipotent & card X = card [:X,{x}:] proof deffunc f(set) = [$1,x]; consider f such that A1: dom f = X & for y st y in X holds f.y = f(y) from FUNCT_1:sch 3; thus X,[:X,{x}:] are_equipotent proof take f; thus f is one-to-one proof let y,z; assume that A2: y in dom f & z in dom f and A3: f.y = f.z; A4: [y,x]`1 = y; f.y = [y,x] & f.z = [z,x] by A1,A2; hence thesis by A3,A4,MCART_1:7; end; thus dom f = X by A1; thus rng f c= [:X,{x}:] proof let y; A5: x in {x} by TARSKI:def 1; assume y in rng f; then consider z such that A6: z in dom f and A7: y = f.z by FUNCT_1:def 3; y = [z,x] by A1,A6,A7; hence thesis by A1,A6,A5,ZFMISC_1:87; end; let y; assume y in [:X,{x}:]; then consider y1,y2 being set such that A8: y1 in X and A9: y2 in {x} and A10: y = [y1,y2] by ZFMISC_1:84; y2 = x by A9,TARSKI:def 1; then y = f.y1 by A1,A8,A10; hence thesis by A1,A8,FUNCT_1:def 3; end; hence thesis by Th5; end; theorem for f being Function st f is one-to-one holds card dom f = card rng f proof let f be Function; assume f is one-to-one; then A1: dom f, f .: dom f are_equipotent by Th33; f .: dom f = rng f by RELAT_1:113; hence thesis by A1,Th5; end; begin reserve X,Y,Z,X1,X2,Y1,Y2,x,y,z,t,x1,x2 for set, f,g,h,f1,f2,g1,g2 for Function; scheme LambdaFS { FS()->set, f(set)->set }: ex f st dom f = FS() & for g st g in FS () holds f.g = f(g) proof consider f such that A1: dom f = FS() & for x st x in FS() holds f.x = f(x) from FUNCT_1:sch 3; take f; thus thesis by A1; end; theorem Th1: ~{} = {} proof [:{} qua set,{}:] = {} & dom {} = {} by ZFMISC_1:90; then dom ~{} = {} by FUNCT_4:46; hence thesis; end; canceled 6; theorem Th8: proj1 {} = {} & proj2 {} = {}; theorem Th9: Y <> {} or [:X,Y:] <> {} or [:Y,X:] <> {} implies proj1 [:X,Y:] = X & proj2 [:Y,X:] = X proof set y = the Element of Y; assume Y <> {} or [:X,Y:] <> {} or [:Y,X:] <> {}; then A1: Y <> {} by ZFMISC_1:90; now let x; x in X implies [x,y] in [:X,Y:] by A1,ZFMISC_1:87; hence x in X iff ex y st [x,y] in [:X,Y:] by ZFMISC_1:87; end; hence proj1 [:X,Y:] = X by XTUPLE_0:def 12; now let x; x in X implies [y,x] in [:Y,X:] by A1,ZFMISC_1:87; hence x in X iff ex y st [y,x] in [:Y,X:] by ZFMISC_1:87; end; hence thesis by XTUPLE_0:def 13; end; theorem Th10: proj1 [:X,Y:] c= X & proj2 [:X,Y:] c= Y proof thus proj1 [:X,Y:] c= X proof let x; assume x in proj1 [:X,Y:]; then ex y st [x,y] in [:X,Y:] by XTUPLE_0:def 12; hence thesis by ZFMISC_1:87; end; let y; assume y in proj2 [:X,Y:]; then ex x st [x,y] in [:X,Y:] by XTUPLE_0:def 13; hence thesis by ZFMISC_1:87; end; theorem Th11: Z c= [:X,Y:] implies proj1 Z c= X & proj2 Z c= Y proof assume Z c= [:X,Y:]; then A1: proj1 Z c= proj1 [:X,Y:] & proj2 Z c= proj2 [:X,Y:] by XTUPLE_0:8,9; proj1 [:X,Y:] c= X & proj2 [:X,Y:] c= Y by Th10; hence thesis by A1,XBOOLE_1:1; end; theorem Th12: proj1 {[x,y]} = {x} & proj2 {[x,y]} = {y} proof thus proj1 {[x,y]} c= {x} proof let z; assume z in proj1 {[x,y]}; then consider t such that A1: [z,t] in {[x,y]} by XTUPLE_0:def 12; [z,t] = [x,y] by A1,TARSKI:def 1; then z = x by XTUPLE_0:1; hence thesis by TARSKI:def 1; end; thus {x} c= proj1 {[x,y]} proof let z; assume z in {x}; then z = x by TARSKI:def 1; then [z,y] in {[x,y]} by TARSKI:def 1; hence thesis by XTUPLE_0:def 12; end; thus proj2 {[x,y]} c= {y} proof let z; assume z in proj2 {[x,y]}; then consider t such that A2: [t,z] in {[x,y]} by XTUPLE_0:def 13; [t,z] = [x,y] by A2,TARSKI:def 1; then z = y by XTUPLE_0:1; hence thesis by TARSKI:def 1; end; thus {y} c= proj2 {[x,y]} proof let z; assume z in {y}; then z = y by TARSKI:def 1; then [x,z] in {[x,y]} by TARSKI:def 1; hence thesis by XTUPLE_0:def 13; end; end; theorem proj1 {[x,y],[z,t]} = {x,z} & proj2 {[x,y],[z,t]} = {y,t} proof A1: proj2 {[x,y]} = {y} & proj2 {[z,t]} = {t} by Th12; {[x,y],[z,t]} = {[x,y]} \/ {[z,t]} by ENUMSET1:1; then A2: proj1 {[x,y],[z,t]} = proj1 {[x,y]} \/ proj1 {[z,t]} & proj2 {[x,y],[z,t ]} = proj2 {[x,y]} \/ proj2 {[z,t]} by XTUPLE_0:23,27; proj1 {[x,y]} = {x} & proj1 {[z,t]} = {z} by Th12; hence thesis by A2,A1,ENUMSET1:1; end; theorem Th14: not (ex x,y st [x,y] in X) implies proj1 X = {} & proj2 X = {} proof set x = the Element of proj2 X; assume A1: not (ex x,y st [x,y] in X); hereby set x = the Element of proj1 X; assume proj1 X <> {}; then ex y st [x,y] in X by XTUPLE_0:def 12; hence contradiction by A1; end; assume proj2 X <> {}; then ex y st [y,x] in X by XTUPLE_0:def 13; hence thesis by A1; end; theorem proj1 X = {} or proj2 X = {} implies not ex x,y st [x,y] in X by XTUPLE_0:def 12,def 13; theorem proj1 X = {} iff proj2 X = {} proof proj1 X = {} or proj2 X = {} implies not ex x,y st [x,y] in X by XTUPLE_0:def 12,def 13; hence thesis by Th14; end; theorem Th17: proj1 dom f = proj2 dom ~f & proj2 dom f = proj1 dom ~f proof thus proj1 dom f c= proj2 dom ~f proof let x; assume x in proj1 dom f; then consider y such that A1: [x,y] in dom f by XTUPLE_0:def 12; [y,x] in dom ~f by A1,FUNCT_4:42; hence thesis by XTUPLE_0:def 13; end; thus proj2 dom ~f c= proj1 dom f proof let y; assume y in proj2 dom ~f; then consider x such that A2: [x,y] in dom ~f by XTUPLE_0:def 13; [y,x] in dom f by A2,FUNCT_4:42; hence thesis by XTUPLE_0:def 12; end; thus proj2 dom f c= proj1 dom ~f proof let y; assume y in proj2 dom f; then consider x such that A3: [x,y] in dom f by XTUPLE_0:def 13; [y,x] in dom ~f by A3,FUNCT_4:42; hence thesis by XTUPLE_0:def 12; end; thus proj1 dom ~f c= proj2 dom f proof let x; assume x in proj1 dom ~f; then consider y such that A4: [x,y] in dom ~f by XTUPLE_0:def 12; [y,x] in dom f by A4,FUNCT_4:42; hence thesis by XTUPLE_0:def 13; end; end; theorem for f being Relation holds proj1 f = dom f & proj2 f = rng f; definition let f; func curry f -> Function means :Def1: dom it = proj1 dom f & for x st x in proj1 dom f ex g st it.x = g & dom g = proj2 (dom f /\ [:{x},proj2 dom f:]) & for y st y in dom g holds g.y = f.(x,y); existence proof defpred F[set,Function] means dom $2 = proj2 (dom f /\ [:{$1},proj2 dom f :]) & for y st y in dom $2 holds $2.y = f.($1,y); defpred P[set,set] means ex g st $2 = g & F[ $1,g]; A1: for x,y,z st x in proj1 dom f & P[x,y] & P[x,z] holds y = z proof let x,y,z such that x in proj1 dom f; given g1 being Function such that A2: y = g1 and A3: F[x,g1]; given g2 being Function such that A4: z = g2 and A5: F[x,g2]; now let t be set; assume A6: t in proj2 (dom f /\ [:{x},proj2 dom f:]); then g1.t = f.(x,t) by A3; hence g1.t = g2.t by A5,A6; end; hence thesis by A2,A3,A4,A5,FUNCT_1:2; end; A7: for x st x in proj1 dom f ex y st P[x,y] proof let x such that x in proj1 dom f; deffunc F(set) = f.[x,$1]; consider g such that A8: dom g = proj2 (dom f /\ [:{x},proj2 dom f:]) & for y st y in proj2 (dom f /\ [:{x},proj2 dom f:]) holds g.y = F(y) from FUNCT_1:sch 3; reconsider y = g as set; take y,g; thus thesis by A8; end; ex g being Function st dom g = proj1 dom f & for x st x in proj1 dom f holds P[x,g.x] from FUNCT_1:sch 2(A1,A7); hence thesis; end; uniqueness proof let f1,f2 be Function such that A9: dom f1 = proj1 dom f and A10: for x st x in proj1 dom f ex g st f1.x = g & dom g = proj2 (dom f /\ [:{x},proj2 dom f:]) & for y st y in dom g holds g.y = f.(x,y) and A11: dom f2 = proj1 dom f and A12: for x st x in proj1 dom f ex g st f2.x = g & dom g = proj2 (dom f /\ [:{x},proj2 dom f:]) & for y st y in dom g holds g.y = f.(x,y); now let x; assume A13: x in proj1 dom f; then consider g1 being Function such that A14: f1.x = g1 and A15: dom g1 = proj2 (dom f /\ [:{x},proj2 dom f:]) and A16: for y st y in dom g1 holds g1.y = f.(x,y) by A10; consider g2 being Function such that A17: f2.x = g2 and A18: dom g2 = proj2 (dom f /\ [:{x},proj2 dom f:]) and A19: for y st y in dom g2 holds g2.y = f.(x,y) by A12,A13; now let y; assume A20: y in proj2 (dom f /\ [:{x},proj2 dom f:]); then g1.y = f.(x,y) by A15,A16; hence g1.y = g2.y by A18,A19,A20; end; hence f1.x = f2.x by A14,A15,A17,A18,FUNCT_1:2; end; hence thesis by A9,A11,FUNCT_1:2; end; func uncurry f -> Function means : Def2: (for t holds t in dom it iff ex x,g ,y st t = [x,y] & x in dom f & g = f.x & y in dom g) & for x,g st x in dom it & g = f.x`1 holds it.x = g.x`2; existence proof defpred P[set,set] means ex g st g = f.$1`1 & $2 = g.$1`2; deffunc F(Function) = dom $1; defpred P[set] means f.$1 is Function; consider X such that A21: x in X iff x in dom f & P[ x ] from XBOOLE_0:sch 1; defpred P[set] means for g1 st g1 = f.$1`1 holds $1`2 in dom g1; consider g such that A22: dom g = f.:X & for g1 st g1 in f.:X holds g.g1 = F(g1) from LambdaFS; consider Y such that A23: x in Y iff x in [:X,union rng g:] & P[ x ] from XBOOLE_0:sch 1; A24: for x st x in Y ex y st P[x,y] proof let x; assume x in Y; then x in [:X,union rng g:] by A23; then x`1 in X by MCART_1:10; then reconsider h = f.x`1 as Function by A21; take h.x`2,h; thus thesis; end; A25: for x,x1,x2 st x in Y & P[x,x1] & P[x,x2] holds x1 = x2; consider F being Function such that A26: dom F = Y & for x st x in Y holds P[x,F.x] from FUNCT_1:sch 2(A25 ,A24); take F; thus for t holds t in dom F iff ex x,g,y st t = [x,y] & x in dom f & g = f .x & y in dom g proof let t; thus t in dom F implies ex x,g,y st t = [x,y] & x in dom f & g = f.x & y in dom g proof assume A27: t in dom F; take x = t`1; t in [:X,union rng g:] by A23,A26,A27; then A29: x in X by MCART_1:10; then reconsider h = f.x as Function by A21; take h, t`2; thus thesis by A21,A23,A26,A27,A29,MCART_1:21; end; given x be set, h be Function, y be set such that A30: t = [x,y] and A31: x in dom f and A32: h = f.x and A33: y in dom h; A34: x in X by A21,A31,A32; then h in f.:X by A31,A32,FUNCT_1:def 6; then g.h = dom h & g.h in rng g by A22,FUNCT_1:def 3; then dom h c= union rng g by ZFMISC_1:74; then A35: t in [:X,union rng g:] by A30,A33,A34,ZFMISC_1:87; t`1 = x by A30,MCART_1:7; then for g1 st g1 = f.t`1 holds t`2 in dom g1 by A30,A32,A33,MCART_1:7; hence thesis by A23,A26,A35; end; let x; let h be Function; assume that A36: x in dom F and A37: h = f.x`1; ex g st g = f.x`1 & F.x = g.x`2 by A26,A36; hence thesis by A37; end; uniqueness proof defpred P[set] means ex x,g,y st $1 = [x,y] & x in dom f & g = f.x & y in dom g; let f1,f2; assume that A38: t in dom f1 iff P[t] and A39: for x,g st x in dom f1 & g = f.x`1 holds f1.x = g.x`2 and A40: t in dom f2 iff P[t] and A41: for x,g st x in dom f2 & g = f.x`1 holds f2.x = g.x`2; A42: dom f1 = dom f2 from XBOOLE_0:sch 2(A38,A40); now let x; assume A43: x in dom f1; then consider z,g,y such that A44: x = [z,y] and z in dom f and A45: g = f.z and y in dom g by A38; A46: z = x`1 & y = x`2 by A44,MCART_1:7; then f1.x = g.y by A39,A43,A45; hence f1.x = f2.x by A41,A42,A43,A45,A46; end; hence thesis by A42,FUNCT_1:2; end; end; definition let f; func curry' f -> Function equals curry ~f; correctness; func uncurry' f -> Function equals ~(uncurry f); correctness; end; theorem Th19: [x,y] in dom f implies x in dom curry f & (curry f).x is Function proof assume [x,y] in dom f; then A1: x in proj1 dom f by XTUPLE_0:def 12; hence x in dom curry f by Def1; ex g st (curry f).x = g & dom g = proj2 (dom f /\ [:{x},proj2 dom f:]) & for y st y in dom g holds g.y = f.(x,y) by A1,Def1; hence thesis; end; theorem Th20: [x,y] in dom f & g = (curry f).x implies y in dom g & g.y = f.(x ,y) proof assume that A1: [x,y] in dom f and A2: g = (curry f).x; x in proj1 dom f by A1,XTUPLE_0:def 12; then A3: ex h st (curry f).x = h & dom h = proj2 (dom f /\ [:{x},proj2 dom f :]) & for y st y in dom h holds h.y = f.(x,y) by Def1; y in proj2 dom f by A1,XTUPLE_0:def 13; then [x,y] in [:{x},proj2 dom f:] by ZFMISC_1:105; then [x,y] in dom f /\ [:{x},proj2 dom f:] by A1,XBOOLE_0:def 4; hence y in dom g by A2,A3,XTUPLE_0:def 13; hence thesis by A2,A3; end; theorem [x,y] in dom f implies y in dom curry' f & (curry' f).y is Function proof assume [x,y] in dom f; then [y,x] in dom ~f by FUNCT_4:42; hence thesis by Th19; end; theorem Th22: [x,y] in dom f & g = (curry' f).y implies x in dom g & g.x = f.(x,y) proof assume [x,y] in dom f; then A1: [y,x] in dom ~f by FUNCT_4:42; assume A2: g = (curry' f).y; then g.x = (~f).(y,x) by A1,Th20; hence thesis by A1,A2,Th20,FUNCT_4:43; end; theorem dom curry' f = proj2 dom f proof dom curry ~f = proj1 dom ~f by Def1; hence thesis by Th17; end; theorem Th24: [:X,Y:] <> {} & dom f = [:X,Y:] implies dom curry f = X & dom curry' f = Y proof assume that A1: [:X,Y:] <> {} and A2: dom f = [:X,Y:]; dom curry f = proj1 dom f by Def1; hence dom curry f = X by A1,A2,Th9; thus dom curry' f = proj1 dom ~f by Def1 .= proj1 [:Y,X:] by A2,FUNCT_4:46 .= Y by A1,Th9; end; theorem Th25: dom f c= [:X,Y:] implies dom curry f c= X & dom curry' f c= Y proof assume A1: dom f c= [:X,Y:]; dom curry f = proj1 dom f by Def1; hence dom curry f c= X by A1,Th11; A2: dom curry' f = proj1 dom ~f by Def1; dom ~f c= [:Y,X:] by A1,FUNCT_4:45; hence thesis by A2,Th11; end; theorem Th26: rng f c= Funcs(X,Y) implies dom uncurry f = [:dom f,X:] & dom uncurry' f = [:X,dom f:] proof defpred P[set] means ex x,g,y st $1 = [x,y] & x in dom f & g = f.x & y in dom g; assume A1: rng f c= Funcs(X,Y); A2: t in [:dom f,X:] iff P[t] proof thus t in [:dom f,X:] implies ex x,g,y st t = [x,y] & x in dom f & g = f.x & y in dom g proof assume A3: t in [:dom f,X:]; then t`1 in dom f by MCART_1:10; then f.t`1 in rng f by FUNCT_1:def 3; then consider g such that A4: f.t`1 = g & dom g = X and rng g c= Y by A1,FUNCT_2:def 2; take t`1, g, t`2; thus thesis by A3,A4,MCART_1:10,21; end; given x,g,y such that A5: t = [x,y] and A6: x in dom f and A7: g = f.x and A8: y in dom g; g in rng f by A6,A7,FUNCT_1:def 3; then ex g1 st g = g1 & dom g1 = X & rng g1 c= Y by A1,FUNCT_2:def 2; hence thesis by A5,A6,A8,ZFMISC_1:87; end; A9: t in dom uncurry f iff P[t] by Def2; thus dom uncurry f = [:dom f,X:] from XBOOLE_0:sch 2(A9,A2); hence thesis by FUNCT_4:46; end; theorem not (ex x,y st [x,y] in dom f) implies curry f = {} & curry' f = {} proof assume A1: not ex x,y st [x,y] in dom f; then proj1 dom f = {} by Th14; then dom curry f = {} by Def1; hence curry f = {}; now let x,y; assume [x,y] in dom ~f; then [y,x] in dom f by FUNCT_4:42; hence contradiction by A1; end; then proj1 dom ~f = {} by Th14; then dom curry ~f = {} by Def1; hence thesis; end; theorem not (ex x st x in dom f & f.x is Function) implies uncurry f = {} & uncurry' f = {} proof assume A1: not (ex x st x in dom f & f.x is Function); A2: now set t = the Element of dom uncurry f; assume dom uncurry f <> {}; then ex x,g,y st t = [x,y] & x in dom f & g = f.x & y in dom g by Def2; hence contradiction by A1; end; hence uncurry f = {}; thus thesis by A2,Th1,RELAT_1:41; end; theorem Th29: [:X,Y:] <> {} & dom f = [:X,Y:] & x in X implies ex g st (curry f).x = g & dom g = Y & rng g c= rng f & for y st y in Y holds g.y = f.(x,y) proof assume that A1: [:X,Y:] <> {} and A2: dom f = [:X,Y:] and A3: x in X; {x} c= X by A3,ZFMISC_1:31; then A4: [:{x},Y:] /\ dom f = [:{x},Y:] by A2,ZFMISC_1:101; x in proj1 dom f by A1,A2,A3,Th9; then consider g such that A5: (curry f).x = g and A6: dom g = proj2 (dom f /\ [:{x},proj2 dom f:]) & for y st y in dom g holds g.y = f.(x,y) by Def1; take g; A7: proj2 [:{x},Y:] = Y by Th9; A8: proj2 dom f = Y by A2,A3,Th9; rng g c= rng f proof let z; assume z in rng g; then consider y such that A9: y in dom g & z = g.y by FUNCT_1:def 3; [x,y] in dom f & z = f.(x,y) by A2,A3,A6,A8,A4,A7,A9,ZFMISC_1:87; hence thesis by FUNCT_1:def 3; end; hence thesis by A5,A6,A8,A4,A7; end; theorem Th30: x in dom curry f implies (curry f).x is Function proof assume A1: x in dom curry f; dom curry f = proj1 dom f by Def1; then ex g st (curry f).x = g & dom g = proj2 (dom f /\ [:{x},proj2 dom f:] ) & for y st y in dom g holds g.y = f.(x,y) by A1,Def1; hence thesis; end; theorem Th31: x in dom curry f & g = (curry f).x implies dom g = proj2 (dom f /\ [:{x},proj2 dom f:]) & dom g c= proj2 dom f & rng g c= rng f & for y st y in dom g holds g.y = f.(x,y) & [x,y] in dom f proof assume that A1: x in dom curry f and A2: g = (curry f).x; dom curry f = proj1 dom f by Def1; then consider h such that A3: (curry f).x = h and A4: dom h = proj2 (dom f /\ [:{x},proj2 dom f:]) and A5: for y st y in dom h holds h.y = f.(x,y) by A1,Def1; thus dom g = proj2 (dom f /\ [:{x},proj2 dom f:]) by A2,A3,A4; dom f /\ [:{x},proj2 dom f:] c= dom f by XBOOLE_1:17; hence dom g c= proj2 dom f by A2,A3,A4,XTUPLE_0:9; thus rng g c= rng f proof let y; assume y in rng g; then consider z such that A6: z in dom g and A7: y = g.z by FUNCT_1:def 3; consider t such that A8: [t,z] in dom f /\ [:{x},proj2 dom f:] by A2,A3,A4,A6,XTUPLE_0:def 13; [t,z] in dom f & [t,z] in [:{x},proj2 dom f:] by A8,XBOOLE_0:def 4; then A9: [x,z] in dom f by ZFMISC_1:105; h.z = f.(x,z) by A2,A3,A5,A6; hence thesis by A2,A3,A7,A9,FUNCT_1:def 3; end; let y; assume A10: y in dom g; then consider t such that A11: [t,y] in dom f /\ [:{x},proj2 dom f:] by A2,A3,A4,XTUPLE_0:def 13; [t,y] in dom f & [t,y] in [:{x},proj2 dom f:] by A11,XBOOLE_0:def 4; hence thesis by A2,A3,A5,A10,ZFMISC_1:105; end; theorem Th32: [:X,Y:] <> {} & dom f = [:X,Y:] & y in Y implies ex g st (curry' f).y = g & dom g = X & rng g c= rng f & for x st x in X holds g.x = f.(x,y) proof assume that A1: [:X,Y:] <> {} and A2: dom f = [:X,Y:] and A3: y in Y; A4: dom ~f = [:Y,X:] by A2,FUNCT_4:46; X <> {} by A1,ZFMISC_1:90; then consider g such that A5: (curry ~f).y = g & dom g = X & rng g c= rng ~f and A6: for x st x in X holds g.x = (~f).(y,x) by A3,A4,Th29; take g; rng ~f c= rng f by FUNCT_4:41; hence (curry' f).y = g & dom g = X & rng g c= rng f by A5,XBOOLE_1:1; let x; assume A7: x in X; then A8: g.x = (~f).(y,x) by A6; [y,x] in dom ~f by A3,A4,A7,ZFMISC_1:87; hence thesis by A8,FUNCT_4:43; end; theorem x in dom curry' f implies (curry' f).x is Function by Th30; theorem x in dom curry' f & g = (curry' f).x implies dom g = proj1 (dom f /\ [:proj1 dom f,{x}:]) & dom g c= proj1 dom f & rng g c= rng f & for y st y in dom g holds g.y = f.(y,x) & [y,x] in dom f proof A1: rng ~f c= rng f by FUNCT_4:41; assume A2: x in dom curry' f & g = (curry' f).x; then dom g = proj2 (dom ~f /\ [:{x},proj2 dom ~f:]) by Th31; then A3: dom g = proj2 (dom ~f /\ [:{x},proj1 dom f:]) by Th17; thus A4: dom g c= proj1 (dom f /\ [:proj1 dom f,{x}:]) proof let z; assume z in dom g; then consider y such that A5: [y,z] in dom ~f /\ [:{x},proj1 dom f:] by A3,XTUPLE_0:def 13; [y,z] in [:{x},proj1 dom f:] by A5,XBOOLE_0:def 4; then A6: [z,y] in [:proj1 dom f,{x}:] by ZFMISC_1:88; [y,z] in dom ~f by A5,XBOOLE_0:def 4; then [z,y] in dom f by FUNCT_4:42; then [z,y] in dom f /\ [:proj1 dom f,{x}:] by A6,XBOOLE_0:def 4; hence thesis by XTUPLE_0:def 12; end; thus proj1 (dom f /\ [:proj1 dom f,{x}:]) c= dom g proof let z; assume z in proj1 (dom f /\ [:proj1 dom f,{x}:]); then consider y such that A7: [z,y] in dom f /\ [:proj1 dom f,{x}:] by XTUPLE_0:def 12; [z,y] in [:proj1 dom f,{x}:] by A7,XBOOLE_0:def 4; then A8: [y,z] in [:{x},proj1 dom f:] by ZFMISC_1:88; [z,y] in dom f by A7,XBOOLE_0:def 4; then [y,z] in dom ~f by FUNCT_4:42; then [y,z] in dom ~f /\ [:{x},proj1 dom f:] by A8,XBOOLE_0:def 4; hence thesis by A3,XTUPLE_0:def 13; end; dom g c= proj2 dom ~f & rng g c= rng ~f by A2,Th31; hence dom g c= proj1 dom f & rng g c= rng f by A1,Th17,XBOOLE_1:1; let y; assume A9: y in dom g; then consider z such that A10: [y,z] in dom f /\ [:proj1 dom f,{x}:] by A4,XTUPLE_0:def 12; [y,z] in [:proj1 dom f,{x}:] by A10,XBOOLE_0:def 4; then A11: z = x by ZFMISC_1:106; [y,z] in dom f by A10,XBOOLE_0:def 4; then [z,y] in dom ~f by FUNCT_4:42; then (~f).(x,y) = f.(y,x) by A11,FUNCT_4:43; hence thesis by A2,A9,A10,A11,Th31,XBOOLE_0:def 4; end; theorem Th35: dom f = [:X,Y:] implies rng curry f c= Funcs(Y,rng f) & rng curry' f c= Funcs(X,rng f) proof assume A1: dom f = [:X,Y:]; A2: now assume A3: [:X,Y:] <> {}; then A4: dom curry f = X by A1,Th24; thus rng curry f c= Funcs(Y,rng f) proof let z; assume z in rng curry f; then consider x such that A5: x in dom curry f and A6: z = (curry f).x by FUNCT_1:def 3; ex g st (curry f).x = g & dom g = Y & rng g c= rng f & for y st y in Y holds g.y = f.(x,y) by A1,A3,A4,A5,Th29; hence thesis by A6,FUNCT_2:def 2; end; A7: dom curry' f = Y by A1,A3,Th24; thus rng curry' f c= Funcs(X,rng f) proof let z; assume z in rng curry' f; then consider y such that A8: y in dom curry' f and A9: z = (curry' f).y by FUNCT_1:def 3; ex g st (curry' f).y = g & dom g = X & rng g c= rng f & for x st x in X holds g.x = f.(x,y) by A1,A3,A7,A8,Th32; hence thesis by A9,FUNCT_2:def 2; end; end; now assume A10: dom f = {}; then X = {} or Y = {} by A1; then A11: [:Y,X:] = {} by ZFMISC_1:90; {} = dom curry f by A10,Def1,Th8; then A12: rng curry f = {} by RELAT_1:42; dom ~f = [:Y,X:] & dom curry ~f = proj1 dom ~f by A1,Def1,FUNCT_4:46; then rng curry' f = {} by A11,Th8,RELAT_1:42; hence thesis by A12,XBOOLE_1:2; end; hence thesis by A1,A2; end; theorem rng curry f c= PFuncs(proj2 dom f,rng f) & rng curry' f c= PFuncs( proj1 dom f,rng f) proof A1: rng ~f c= rng f by FUNCT_4:41; thus rng curry f c= PFuncs(proj2 dom f,rng f) proof let t; assume t in rng curry f; then consider z such that A2: z in dom curry f and A3: t = (curry f).z by FUNCT_1:def 3; dom curry f = proj1 dom f by Def1; then consider g such that A4: (curry f).z = g and dom g = proj2 (dom f /\ [:{z},proj2 dom f:]) and for y st y in dom g holds g.y = f.(z,y) by A2,Def1; dom g c= proj2 dom f & rng g c= rng f by A2,A4,Th31; hence thesis by A3,A4,PARTFUN1:def 3; end; let t; assume t in rng curry' f; then consider z such that A5: z in dom curry' f and A6: t = (curry' f).z by FUNCT_1:def 3; dom curry ~f = proj1 dom ~f by Def1; then consider g such that A7: (curry ~f).z = g and dom g = proj2 (dom ~f /\ [:{z},proj2 dom ~f:]) and for y st y in dom g holds g.y = (~f).(z,y) by A5,Def1; rng g c= rng ~f by A5,A7,Th31; then A8: rng g c= rng f by A1,XBOOLE_1:1; dom g c= proj2 dom ~f by A5,A7,Th31; then dom g c= proj1 dom f by Th17; hence thesis by A6,A7,A8,PARTFUN1:def 3; end; theorem Th37: rng f c= PFuncs(X,Y) implies dom uncurry f c= [:dom f,X:] & dom uncurry' f c= [:X,dom f:] proof assume A1: rng f c= PFuncs(X,Y); thus A2: dom uncurry f c= [:dom f,X:] proof let x; assume x in dom uncurry f; then consider y,g,z such that A3: x = [y,z] and A4: y in dom f and A5: g = f.y and A6: z in dom g by Def2; g in rng f by A4,A5,FUNCT_1:def 3; then g is PartFunc of X,Y by A1,PARTFUN1:46; then dom g c= X by RELAT_1:def 18; hence thesis by A3,A4,A6,ZFMISC_1:87; end; let x; assume x in dom uncurry' f; then ex y,z st x = [z,y] & [y,z] in dom uncurry f by FUNCT_4:def 2; hence thesis by A2,ZFMISC_1:88; end; theorem Th38: x in dom f & g = f.x & y in dom g implies [x,y] in dom uncurry f & (uncurry f).(x,y) = g.y & g.y in rng uncurry f proof assume that A1: x in dom f and A2: g = f.x and A3: y in dom g; thus A4: [x,y] in dom uncurry f by A1,A2,A3,Def2; [x,y]`1 = x & [x,y]`2 = y; hence (uncurry f).(x,y) = g.y by A2,A4,Def2; hence thesis by A4,FUNCT_1:def 3; end; theorem x in dom f & g = f.x & y in dom g implies [y,x] in dom uncurry' f & ( uncurry' f).(y,x) = g.y & g.y in rng uncurry' f proof assume A1: x in dom f & g = f.x & y in dom g; then [x,y] in dom uncurry f by Th38; hence A2: [y,x] in dom uncurry' f by FUNCT_4:42; (uncurry f).(x,y) = g.y by A1,Th38; hence (uncurry' f).(y,x) = g.y by A2,FUNCT_4:43; hence thesis by A2,FUNCT_1:def 3; end; theorem Th40: rng f c= PFuncs(X,Y) implies rng uncurry f c= Y & rng uncurry' f c= Y proof assume A1: rng f c= PFuncs(X,Y); thus A2: rng uncurry f c= Y proof let x; assume x in rng uncurry f; then consider y such that A3: y in dom uncurry f and A4: x = (uncurry f).y by FUNCT_1:def 3; consider z,g,t such that A5: y = [z,t] and A6: z in dom f & g = f.z and A7: t in dom g by A3,Def2; g in rng f by A6,FUNCT_1:def 3; then A8: ex g1 st g = g1 & dom g1 c= X & rng g1 c= Y by A1,PARTFUN1:def 3; (uncurry f).(z,t) = g.t & g.t in rng g by A6,A7,Th38,FUNCT_1:def 3; hence thesis by A4,A5,A8; end; rng uncurry' f c= rng uncurry f by FUNCT_4:41; hence thesis by A2,XBOOLE_1:1; end; theorem Th41: rng f c= Funcs(X,Y) implies rng uncurry f c= Y & rng uncurry' f c= Y proof A1: Funcs(X,Y) c= PFuncs(X,Y) by FUNCT_2:72; assume rng f c= Funcs(X,Y); then rng f c= PFuncs(X,Y) by A1,XBOOLE_1:1; hence thesis by Th40; end; theorem Th42: curry {} = {} & curry' {} = {} proof A1: dom curry {} = proj1 dom {} by Def1; hence curry {} = {}; thus thesis by A1,Th1; end; theorem Th43: uncurry {} = {} & uncurry' {} = {} proof A1: now set t = the Element of dom uncurry {}; assume dom uncurry {} <> {}; then ex x,g,y st t = [x,y] & x in dom {} & g = {} .x & y in dom g by Def2; hence contradiction; end; hence uncurry {} = {}; thus thesis by A1,Th1,RELAT_1:41; end; theorem Th44: dom f1 = [:X,Y:] & dom f2 = [:X,Y:] & curry f1 = curry f2 implies f1 = f2 proof assume that A1: dom f1 = [:X,Y:] and A2: dom f2 = [:X,Y:] and A3: curry f1 = curry f2; A4: now assume [:X,Y:] <> {}; now let z; assume A5: z in [:X,Y:]; then consider g1 being Function such that A6: (curry f1).z`1 = g1 and dom g1 = Y and rng g1 c= rng f1 and A7: for y st y in Y holds g1.y = f1.(z`1,y) by A1,Th29,MCART_1:10; A8: z = [z`1,z`2] by A5,MCART_1:21; A9: z`2 in Y by A5,MCART_1:10; then A10: f1.(z`1,z`2) = g1.z`2 by A7; ex g2 being Function st (curry f2).z`1 = g2 & dom g2 = Y & rng g2 c= rng f2 & for y st y in Y holds g2.y = f2.(z`1,y) by A2,A5,Th29,MCART_1:10; then f2.(z`1,z`2) = g1.z`2 by A3,A9,A6; hence f1.z = f2.z by A8,A10; end; hence thesis by A1,A2,FUNCT_1:2; end; [:X,Y:] = {} implies f1 = {} & f2 = {} by A1,A2; hence thesis by A4; end; theorem Th45: dom f1 = [:X,Y:] & dom f2 = [:X,Y:] & curry' f1 = curry' f2 implies f1 = f2 proof assume that A1: dom f1 = [:X,Y:] and A2: dom f2 = [:X,Y:] and A3: curry' f1 = curry' f2; dom ~f1 = [:Y,X:] & dom ~f2 = [:Y,X:] by A1,A2,FUNCT_4:46; then A4: ~f1 = ~f2 by A3,Th44; ~~f1 = f1 by A1,FUNCT_4:52; hence thesis by A2,A4,FUNCT_4:52; end; theorem Th46: rng f1 c= Funcs(X,Y) & rng f2 c= Funcs(X,Y) & X <> {} & uncurry f1 = uncurry f2 implies f1 = f2 proof assume that A1: rng f1 c= Funcs(X,Y) and A2: rng f2 c= Funcs(X,Y) and A3: X <> {} and A4: uncurry f1 = uncurry f2; A5: dom uncurry f1 = [:dom f1,X:] & dom uncurry f2 = [:dom f2,X:] by A1,A2,Th26 ; then dom f1 = {} implies dom f1 = dom f2 by A3,A4,ZFMISC_1:90; then A6: dom f1 = dom f2 by A3,A4,A5,ZFMISC_1:110; now let x; assume A7: x in dom f1; then f1.x in rng f1 by FUNCT_1:def 3; then consider g1 such that A8: f1.x = g1 and A9: dom g1 = X and rng g1 c= Y by A1,FUNCT_2:def 2; f2.x in rng f2 by A6,A7,FUNCT_1:def 3; then consider g2 such that A10: f2.x = g2 and A11: dom g2 = X and rng g2 c= Y by A2,FUNCT_2:def 2; now let y; A12: [x,y]`1 = x & [x,y]`2 = y; assume A13: y in X; then A14: [x,y] in dom uncurry f2 by A4,A7,A8,A9,Def2; [x,y] in dom uncurry f1 by A7,A8,A9,A13,Def2; then (uncurry f1).[x,y] = g1.y by A8,A12,Def2; hence g1.y = g2.y by A4,A10,A14,A12,Def2; end; hence f1.x = f2.x by A8,A9,A10,A11,FUNCT_1:2; end; hence thesis by A6,FUNCT_1:2; end; theorem rng f1 c= Funcs(X,Y) & rng f2 c= Funcs(X,Y) & X <> {} & uncurry' f1 = uncurry' f2 implies f1 = f2 proof assume that A1: rng f1 c= Funcs(X,Y) and A2: rng f2 c= Funcs(X,Y) and A3: X <> {} & uncurry' f1 = uncurry' f2; dom uncurry f1 = [:dom f1,X:] by A1,Th26; then A4: uncurry f1 = ~~(uncurry f1) by FUNCT_4:52; dom uncurry f2 = [:dom f2,X:] by A2,Th26; hence thesis by A1,A2,A3,A4,Th46,FUNCT_4:52; end; theorem Th48: rng f c= Funcs(X,Y) & X <> {} implies curry uncurry f = f & curry' uncurry' f = f proof assume that A1: rng f c= Funcs(X,Y) and A2: X <> {}; A3: dom uncurry f = [:dom f,X:] by A1,Th26; A4: now A5: now let x; assume A6: x in dom f; then consider h such that A7: (curry uncurry f).x = h & dom h = X & rng h c= rng uncurry f and A8: y in X implies h.y = (uncurry f).(x,y) by A2,A3,Th29; f.x in rng f by A6,FUNCT_1:def 3; then consider g such that A9: f.x = g & dom g = X and rng g c= Y by A1,FUNCT_2:def 2; now let y; assume A10: y in X; then (uncurry f).(x,y) = g.y by A6,A9,Th38; hence g.y = h.y by A8,A10; end; hence f.x = (curry uncurry f).x by A9,A7,FUNCT_1:2; end; assume dom f <> {}; then dom curry uncurry f = dom f by A2,A3,Th24; hence curry uncurry f = f by A5,FUNCT_1:2; end; A11: now assume dom f = {}; then dom uncurry f = {} & f = {} by A3,ZFMISC_1:90; hence curry uncurry f = f by Th42,RELAT_1:41; end; hence curry uncurry f = f by A4; thus thesis by A3,A11,A4,FUNCT_4:52; end; theorem dom f = [:X,Y:] implies uncurry curry f = f & uncurry' curry' f = f proof assume A1: dom f = [:X,Y:]; A2: now A3: rng curry' f c= Funcs(X,rng f) by A1,Th35; assume A4: dom f <> {}; then X <> {} by A1,ZFMISC_1:90; then A5: curry' uncurry' curry' f = curry' f by A3,Th48; dom curry' f = Y by A1,A4,Th24; then A6: dom uncurry' curry' f = [:X,Y:] by A3,Th26; A7: rng curry f c= Funcs(Y,rng f) by A1,Th35; Y <> {} by A1,A4,ZFMISC_1:90; then A8: curry uncurry curry f = curry f by A7,Th48; dom curry f = X by A1,A4,Th24; then dom uncurry curry f = [:X,Y:] by A7,Th26; hence thesis by A1,A8,A5,A6,Th44,Th45; end; now assume dom f = {}; then f = {}; hence thesis by Th42,Th43; end; hence thesis by A2; end; theorem Th50: dom f c= [:X,Y:] implies uncurry curry f = f & uncurry' curry' f = f proof assume A1: dom f c= [:X,Y:]; A2: now let X,Y,f such that A3: dom f c= [:X,Y:]; A4: dom uncurry curry f = dom f proof thus dom uncurry curry f c= dom f proof let x; assume x in dom uncurry curry f; then ex y,g,z st x = [y,z] & y in dom curry f & g = (curry f).y & z in dom g by Def2; hence thesis by Th31; end; let x; assume A5: x in dom f; then A6: x = [x`1,x`2] by A3,MCART_1:21; then reconsider g = (curry f).x`1 as Function by A5,Th19; x`2 in dom g & x`1 in dom curry f by A5,A6,Th19,Th20; hence thesis by A6,Th38; end; now let x; assume A7: x in dom f; then A8: x = [x`1,x`2] by A3,MCART_1:21; then reconsider g = (curry f).x`1 as Function by A7,Th19; (uncurry curry f).x = g.x`2 by A4,A7,Def2; then f.(x`1,x`2) = (uncurry curry f).(x`1,x`2) by A7,A8,Th20; hence f.x = (uncurry curry f).x by A8; end; hence uncurry curry f = f by A4,FUNCT_1:2; end; hence uncurry curry f = f by A1; dom ~f c= [:Y,X:] by A1,FUNCT_4:45; then uncurry curry ~f = ~f by A2; hence thesis by A1,FUNCT_4:52; end; theorem Th51: rng f c= PFuncs(X,Y) & not {} in rng f implies curry uncurry f = f & curry' uncurry' f = f proof assume that A1: rng f c= PFuncs(X,Y) and A2: not {} in rng f; A3: dom curry uncurry f = dom f proof dom uncurry f c= [:dom f,X:] by A1,Th37; hence dom curry uncurry f c= dom f by Th25; let x; assume A4: x in dom f; then f.x in rng f by FUNCT_1:def 3; then consider g such that A5: f.x = g and dom g c= X and rng g c= Y by A1,PARTFUN1:def 3; set y = the Element of dom g; g <> {} by A2,A4,A5,FUNCT_1:def 3; then A6: [x,y] in dom uncurry f by A4,A5,Th38; dom curry uncurry f = proj1 dom uncurry f by Def1; hence thesis by A6,XTUPLE_0:def 12; end; now let x; assume A7: x in dom f; then reconsider h = (curry uncurry f).x as Function by A3,Th30; f.x in rng f by A7,FUNCT_1:def 3; then consider g such that A8: f.x = g and dom g c= X and rng g c= Y by A1,PARTFUN1:def 3; A9: dom h = proj2 (dom uncurry f /\ [:{x},proj2 dom uncurry f:]) by A3,A7,Th31; A10: dom h = dom g proof thus dom h c= dom g proof let z; assume z in dom h; then consider t such that A11: [t,z] in dom uncurry f /\ [:{x},proj2 dom uncurry f:] by A9, XTUPLE_0:def 13; [t,z] in [:{x},proj2 dom uncurry f:] by A11,XBOOLE_0:def 4; then A12: t = x by ZFMISC_1:105; [t,z] in dom uncurry f by A11,XBOOLE_0:def 4; then consider x1,g1,x2 such that A13: [t,z] = [x1,x2] and x1 in dom f and A14: g1 = f.x1 & x2 in dom g1 by Def2; t = x1 by A13,XTUPLE_0:1; hence thesis by A8,A13,A14,A12,XTUPLE_0:1; end; let y; assume y in dom g; then [x,y] in dom uncurry f by A7,A8,Th38; hence thesis by Th20; end; now let y; assume A15: y in dom h; hence h.y = (uncurry f).(x,y) by A3,A7,Th31 .= g.y by A7,A8,A10,A15,Th38; end; hence f.x = (curry uncurry f).x by A8,A10,FUNCT_1:2; end; hence A16: curry uncurry f = f by A3,FUNCT_1:2; dom uncurry f c= [:dom f,X:] by A1,Th37; hence thesis by A16,FUNCT_4:52; end; theorem dom f1 c= [:X,Y:] & dom f2 c= [:X,Y:] & curry f1 = curry f2 implies f1 = f2 proof assume that A1: dom f1 c= [:X,Y:] and A2: dom f2 c= [:X,Y:]; uncurry curry f1 = f1 by A1,Th50; hence thesis by A2,Th50; end; theorem dom f1 c= [:X,Y:] & dom f2 c= [:X,Y:] & curry' f1 = curry' f2 implies f1 = f2 proof assume that A1: dom f1 c= [:X,Y:] and A2: dom f2 c= [:X,Y:]; uncurry' curry' f1 = f1 by A1,Th50; hence thesis by A2,Th50; end; theorem rng f1 c= PFuncs(X,Y) & rng f2 c= PFuncs(X,Y) & not {} in rng f1 & not {} in rng f2 & uncurry f1 = uncurry f2 implies f1 = f2 proof assume that A1: rng f1 c= PFuncs(X,Y) and A2: rng f2 c= PFuncs(X,Y) and A3: not {} in rng f1 and A4: not {} in rng f2; curry uncurry f1 = f1 by A1,A3,Th51; hence thesis by A2,A4,Th51; end; theorem rng f1 c= PFuncs(X,Y) & rng f2 c= PFuncs(X,Y) & not {} in rng f1 & not {} in rng f2 & uncurry' f1 = uncurry' f2 implies f1 = f2 proof assume that A1: rng f1 c= PFuncs(X,Y) and A2: rng f2 c= PFuncs(X,Y) and A3: not {} in rng f1 and A4: not {} in rng f2; curry' uncurry' f1 = f1 by A1,A3,Th51; hence thesis by A2,A4,Th51; end; theorem Th56: X c= Y implies Funcs(Z,X) c= Funcs(Z,Y) proof assume A1: X c= Y; let x; assume x in Funcs(Z,X); then consider f such that A2: x = f & dom f = Z and A3: rng f c= X by FUNCT_2:def 2; rng f c= Y by A1,A3,XBOOLE_1:1; hence thesis by A2,FUNCT_2:def 2; end; theorem Th57: Funcs({},X) = {{}} proof thus Funcs({},X) c= {{}} proof let x; assume x in Funcs({},X); then ex f st x = f & dom f = {} & rng f c= X by FUNCT_2:def 2; then x = {}; hence thesis by TARSKI:def 1; end; let x; A1: {} c= X by XBOOLE_1:2; assume x in {{}}; then A2: x = {} by TARSKI:def 1; dom {} = {} & rng {} = {}; hence thesis by A2,A1,FUNCT_2:def 2; end; theorem X,Funcs({x},X) are_equipotent & card X = card Funcs({x},X) proof deffunc F(set) = {x} --> $1; consider f such that A1: dom f = X & for y st y in X holds f.y = F(y) from FUNCT_1:sch 3; A2: x in {x} by TARSKI:def 1; thus X,Funcs({x},X) are_equipotent proof take f; thus f is one-to-one proof let y,z; assume y in dom f & z in dom f; then A3: f.y = {x} --> y & f.z = {x} --> z by A1; ({x} --> y).x = y by A2,FUNCOP_1:7; hence thesis by A2,A3,FUNCOP_1:7; end; thus dom f = X by A1; thus rng f c= Funcs({x},X) proof let y; assume y in rng f; then consider z such that A4: z in dom f & y = f.z by FUNCT_1:def 3; A5: dom({x} --> z) = {x} & rng({x} --> z) = {z} by FUNCOP_1:8,13; y = {x} --> z & {z} c= X by A1,A4,ZFMISC_1:31; hence thesis by A5,FUNCT_2:def 2; end; let y; assume y in Funcs({x},X); then consider g such that A6: y = g and A7: dom g = {x} and A8: rng g c= X by FUNCT_2:def 2; A9: g.x in {g.x} by TARSKI:def 1; A10: rng g = {g.x} by A7,FUNCT_1:4; then g = {x} --> (g.x) by A7,FUNCOP_1:9; then f.(g.x) = g by A1,A8,A10,A9; hence thesis by A1,A6,A8,A10,A9,FUNCT_1:def 3; end; hence thesis by CARD_1:5; end; theorem Th59: Funcs(X,{x}) = {X --> x} proof thus Funcs(X,{x}) c= {X --> x} proof let y; assume y in Funcs(X,{x}); then consider f such that A1: y = f and A2: dom f = X and A3: rng f c= {x} by FUNCT_2:def 2; A4: now set z = the Element of X; A5: X <> {} implies z in X; A6: dom({} --> x) = {}; assume for z holds not z in X; hence f = X --> x by A2,A5,A6; end; now given z such that A7: z in X; f.z in rng f by A2,A7,FUNCT_1:def 3; then f.z = x & {f.z} c= rng f by A3,TARSKI:def 1,ZFMISC_1:31; then rng f = {x} by A3,XBOOLE_0:def 10; hence f = X --> x by A2,FUNCOP_1:9; end; hence thesis by A1,A4,TARSKI:def 1; end; let y; assume y in {X --> x}; then A8: y = X --> x by TARSKI:def 1; dom(X --> x) = X & rng(X --> x) c= {x} by FUNCOP_1:13; hence thesis by A8,FUNCT_2:def 2; end; theorem Th60: X1,Y1 are_equipotent & X2,Y2 are_equipotent implies Funcs(X1,X2) ,Funcs(Y1,Y2) are_equipotent & card Funcs(X1,X2) = card Funcs(Y1,Y2) proof assume that A1: X1,Y1 are_equipotent and A2: X2,Y2 are_equipotent; consider f1 such that A3: f1 is one-to-one and A4: dom f1 = Y1 and A5: rng f1 = X1 by A1,WELLORD2:def 4; consider f2 such that A6: f2 is one-to-one and A7: dom f2 = X2 and A8: rng f2 = Y2 by A2,WELLORD2:def 4; Funcs(X1,X2),Funcs(Y1,Y2) are_equipotent proof A9: rng(f1") = Y1 by A3,A4,FUNCT_1:33; deffunc F(Function) = f2*($1*f1); consider F being Function such that A10: dom F = Funcs(X1,X2) & for g st g in Funcs(X1,X2) holds F.g = F(g ) from LambdaFS; take F; thus F is one-to-one proof let x,y; assume that A11: x in dom F and A12: y in dom F and A13: F.x = F.y; consider g1 being Function such that A14: x = g1 and A15: dom g1 = X1 and A16: rng g1 c= X2 by A10,A11,FUNCT_2:def 2; A17: F.x = f2*(g1*f1) by A10,A11,A14; A18: rng(g1*f1) c= X2 & dom(g1*f1) = Y1 by A4,A5,A15,A16,RELAT_1:27,28; consider g2 being Function such that A19: y = g2 and A20: dom g2 = X1 and A21: rng g2 c= X2 by A10,A12,FUNCT_2:def 2; A22: rng(g2*f1) c= X2 & dom(g2*f1) = Y1 by A4,A5,A20,A21,RELAT_1:27,28; F.x = f2*(g2*f1) by A10,A12,A13,A19; then A23: g1*f1 = g2*f1 by A6,A7,A17,A18,A22,FUNCT_1:27; now let z; assume z in X1; then consider z9 being set such that A24: z9 in Y1 & f1.z9 = z by A4,A5,FUNCT_1:def 3; thus g1.z = (g1*f1).z9 by A4,A24,FUNCT_1:13 .= g2.z by A4,A23,A24,FUNCT_1:13; end; hence thesis by A14,A15,A19,A20,FUNCT_1:2; end; thus dom F = Funcs(X1,X2) by A10; thus rng F c= Funcs(Y1,Y2) proof let x; assume x in rng F; then consider y such that A25: y in dom F and A26: x = F.y by FUNCT_1:def 3; consider g such that A27: y = g and A28: dom g = X1 & rng g c= X2 by A10,A25,FUNCT_2:def 2; dom(g*f1) = Y1 & rng(g*f1) c= X2 by A4,A5,A28,RELAT_1:27,28; then A29: dom(f2*(g*f1)) = Y1 by A7,RELAT_1:27; A30: rng(f2*(g*f1)) c= Y2 by A8,RELAT_1:26; x = f2*(g*f1) by A10,A25,A26,A27; hence thesis by A29,A30,FUNCT_2:def 2; end; let x; assume x in Funcs(Y1,Y2); then consider g such that A31: x = g and A32: dom g = Y1 and A33: rng g c= Y2 by FUNCT_2:def 2; A34: f2*((f2"*g*(f1"))*f1) = f2*(f2"*g*(f1"*f1)) by RELAT_1:36 .= f2*(f2"*g)*(f1"*f1) by RELAT_1:36 .= f2*(f2")*g*(f1"*f1) by RELAT_1:36 .= (id Y2)*g*(f1"*f1) by A6,A8,FUNCT_1:39 .= (id Y2)*g*(id Y1) by A3,A4,FUNCT_1:39 .= g*(id Y1) by A33,RELAT_1:53 .= x by A31,A32,RELAT_1:52; dom(f2") = Y2 by A6,A8,FUNCT_1:33; then A35: dom(f2"*g) = Y1 by A32,A33,RELAT_1:27; rng(f2") = X2 by A6,A7,FUNCT_1:33; then rng(f2"*g) c= X2 by RELAT_1:26; then A36: rng(f2"*g*(f1")) c= X2 by A9,A35,RELAT_1:28; dom(f1") = X1 by A3,A5,FUNCT_1:33; then dom(f2"*g*(f1")) = X1 by A9,A35,RELAT_1:27; then A37: f2"*g*(f1") in dom F by A10,A36,FUNCT_2:def 2; then F.(f2"*g*(f1")) = f2*((f2"*g*(f1"))*f1) by A10; hence thesis by A37,A34,FUNCT_1:def 3; end; hence thesis by CARD_1:5; end; theorem card X1 = card Y1 & card X2 = card Y2 implies card Funcs(X1,X2) = card Funcs(Y1,Y2) proof assume card X1 = card Y1 & card X2 = card Y2; then X1,Y1 are_equipotent & X2,Y2 are_equipotent by CARD_1:5; hence thesis by Th60; end; theorem X1 misses X2 implies Funcs(X1 \/ X2,X),[:Funcs(X1,X),Funcs(X2,X):] are_equipotent & card Funcs(X1 \/ X2,X) = card [:Funcs(X1,X),Funcs(X2,X):] proof deffunc F(Function) = [ $1|X1,$1|X2]; consider f such that A1: dom f = Funcs(X1 \/ X2,X) & for g st g in Funcs(X1 \/ X2,X) holds f. g = F(g) from LambdaFS; assume A2: X1 misses X2; thus Funcs(X1 \/ X2,X),[:Funcs(X1,X),Funcs(X2,X):] are_equipotent proof take f; thus f is one-to-one proof let x,y; assume that A3: x in dom f and A4: y in dom f; consider g2 being Function such that A5: y = g2 and A6: dom g2 = X1 \/ X2 and rng g2 c= X by A1,A4,FUNCT_2:def 2; A7: f.y = [g2|X1,g2|X2] by A1,A4,A5; assume A8: f.x = f.y; consider g1 being Function such that A9: x = g1 and A10: dom g1 = X1 \/ X2 and rng g1 c= X by A1,A3,FUNCT_2:def 2; A11: f.x = [g1|X1,g1|X2] by A1,A3,A9; now let x; assume x in X1 \/ X2; then x in X1 or x in X2 by XBOOLE_0:def 3; then g1.x = g1|X1.x & g2.x = g2|X1.x or g1.x = g1|X2.x & g2.x = g2|X2. x by FUNCT_1:49; hence g1.x = g2.x by A11,A7,A8,XTUPLE_0:1; end; hence thesis by A9,A10,A5,A6,FUNCT_1:2; end; thus dom f = Funcs(X1 \/ X2,X) by A1; thus rng f c= [:Funcs(X1,X),Funcs(X2,X):] proof let x; assume x in rng f; then consider y such that A12: y in dom f and A13: x = f.y by FUNCT_1:def 3; consider g such that A14: y = g and A15: dom g = X1 \/ X2 and A16: rng g c= X by A1,A12,FUNCT_2:def 2; rng(g|X2) c= rng g by RELAT_1:70; then A17: rng(g|X2) c= X by A16,XBOOLE_1:1; rng(g|X1) c= rng g by RELAT_1:70; then A18: rng(g|X1) c= X by A16,XBOOLE_1:1; dom(g|X2) = X2 by A15,RELAT_1:62,XBOOLE_1:7; then A19: g|X2 in Funcs(X2,X) by A17,FUNCT_2:def 2; dom(g|X1) = X1 by A15,RELAT_1:62,XBOOLE_1:7; then g|X1 in Funcs(X1,X) by A18,FUNCT_2:def 2; then [g|X1,g|X2] in [:Funcs(X1,X),Funcs(X2,X):] by A19,ZFMISC_1:87; hence thesis by A1,A12,A13,A14; end; let x; assume A20: x in [:Funcs(X1,X),Funcs(X2,X):]; then A21: x = [x`1,x`2] by MCART_1:21; x`1 in Funcs(X1,X) by A20,MCART_1:10; then consider g1 being Function such that A22: x`1 = g1 and A23: dom g1 = X1 and A24: rng g1 c= X by FUNCT_2:def 2; x`2 in Funcs(X2,X) by A20,MCART_1:10; then consider g2 being Function such that A25: x`2 = g2 and A26: dom g2 = X2 and A27: rng g2 c= X by FUNCT_2:def 2; rng(g1+*g2) c= rng g1 \/ rng g2 & rng g1 \/ rng g2 c= X \/ X by A24,A27, FUNCT_4:17,XBOOLE_1:13; then A28: rng(g1+*g2) c= X by XBOOLE_1:1; dom(g1+*g2) = X1 \/ X2 by A23,A26,FUNCT_4:def 1; then A29: g1+*g2 in dom f by A1,A28,FUNCT_2:def 2; then f.(g1+*g2) = [(g1+*g2)|X1,(g1+*g2)|X2] by A1 .= [(g1+*g2)|X1,g2] by A26,FUNCT_4:23 .= x by A2,A21,A22,A23,A25,A26,FUNCT_4:33; hence thesis by A29,FUNCT_1:def 3; end; hence thesis by CARD_1:5; end; theorem Funcs([:X,Y:],Z),Funcs(X,Funcs(Y,Z)) are_equipotent & card Funcs([:X,Y :],Z) = card Funcs(X,Funcs(Y,Z)) proof deffunc F(Function) = curry $1; consider f such that A1: dom f = Funcs([:X,Y:],Z) & for g st g in Funcs([:X,Y:],Z) holds f.g = F(g) from LambdaFS; A2: now assume A3: [:X,Y:] <> {}; thus Funcs([:X,Y:],Z),Funcs(X,Funcs(Y,Z)) are_equipotent proof take f; thus f is one-to-one proof let x1,x2; assume that A4: x1 in dom f and A5: x2 in dom f and A6: f.x1 = f.x2; consider g2 such that A7: x2 = g2 and A8: dom g2 = [:X,Y:] and rng g2 c= Z by A1,A5,FUNCT_2:def 2; A9: f.x2 = curry g2 by A1,A5,A7; consider g1 such that A10: x1 = g1 and A11: dom g1 = [:X,Y:] and rng g1 c= Z by A1,A4,FUNCT_2:def 2; f.x1 = curry g1 by A1,A4,A10; hence thesis by A6,A10,A11,A7,A8,A9,Th44; end; thus dom f = Funcs([:X,Y:],Z) by A1; thus rng f c= Funcs(X,Funcs(Y,Z)) proof let y; assume y in rng f; then consider x such that A12: x in dom f and A13: y = f.x by FUNCT_1:def 3; consider g such that A14: x = g and A15: dom g = [:X,Y:] and A16: rng g c= Z by A1,A12,FUNCT_2:def 2; A17: dom curry g = X by A3,A15,Th24; rng curry g c= Funcs(Y,rng g) & Funcs(Y,rng g) c= Funcs(Y,Z) by A15,A16 ,Th35,Th56; then A18: rng curry g c= Funcs(Y,Z) by XBOOLE_1:1; y = curry g by A1,A12,A13,A14; hence thesis by A17,A18,FUNCT_2:def 2; end; let y; assume y in Funcs(X,Funcs(Y,Z)); then consider g such that A19: y = g and A20: dom g = X and A21: rng g c= Funcs(Y,Z) by FUNCT_2:def 2; dom uncurry g = [:X,Y:] & rng uncurry g c= Z by A20,A21,Th26,Th41; then A22: uncurry g in Funcs([:X,Y:],Z) by FUNCT_2:def 2; Y <> {} by A3,ZFMISC_1:90; then curry uncurry g = g by A21,Th48; then f.(uncurry g) = y by A1,A19,A22; hence thesis by A1,A22,FUNCT_1:def 3; end; hence card Funcs([:X,Y:],Z) = card Funcs(X,Funcs(Y,Z)) by CARD_1:5; end; now assume A23: [:X,Y:] = {}; then A24: Funcs([:X,Y:],Z) = {{}} by Th57; A25: now assume Y = {}; then Funcs(Y,Z) = {{}} by Th57; then Funcs(X,Funcs(Y,Z)) = {X --> {}} by Th59; hence Funcs([:X,Y:],Z),Funcs(X,Funcs(Y,Z)) are_equipotent by A24, CARD_1:28; end; X = {} or Y = {} by A23; hence Funcs([:X,Y:],Z),Funcs(X,Funcs(Y,Z)) are_equipotent by A24,A25,Th57; X = {} implies Funcs(X,Funcs(Y,Z)) = {{}} by Th57; hence card Funcs([:X,Y:],Z) = card Funcs(X,Funcs(Y,Z)) by A23,A25,Th57, CARD_1:5; end; hence thesis by A2; end; theorem Funcs(Z,[:X,Y:]),[:Funcs(Z,X),Funcs(Z,Y):] are_equipotent & card Funcs (Z,[:X,Y:]) = card [:Funcs(Z,X),Funcs(Z,Y):] proof deffunc F(Function) = [pr1(X,Y)*$1,pr2(X,Y)*$1]; consider f such that A1: dom f = Funcs(Z,[:X,Y:]) & for g st g in Funcs(Z,[:X,Y:]) holds f.g = F(g) from LambdaFS; thus Funcs(Z,[:X,Y:]),[:Funcs(Z,X),Funcs(Z,Y):] are_equipotent proof take f; thus f is one-to-one proof let x1,x2; assume that A2: x1 in dom f and A3: x2 in dom f and A4: f.x1 = f.x2; consider g1 such that A5: x1 = g1 and A6: dom g1 = Z and A7: rng g1 c= [:X,Y:] by A1,A2,FUNCT_2:def 2; consider g2 such that A8: x2 = g2 and A9: dom g2 = Z and A10: rng g2 c= [:X,Y:] by A1,A3,FUNCT_2:def 2; [pr1(X,Y)*g1,pr2(X,Y)*g1] = f.x1 by A1,A2,A5 .= [pr1(X,Y)*g2,pr2(X,Y)*g2] by A1,A3,A4,A8; then A11: pr1(X,Y)*g1 = pr1(X,Y)*g2 & pr2(X,Y)*g1 = pr2(X,Y)*g2 by XTUPLE_0:1; now let x; assume A12: x in Z; then A13: (pr2(X,Y)*g1).x = pr2(X,Y).(g1.x) by A6,FUNCT_1:13; A14: g2.x in rng g2 by A9,A12,FUNCT_1:def 3; then A15: g2.x = [(g2.x)`1,(g2.x)`2] by A10,MCART_1:21; A16: g1.x in rng g1 by A6,A12,FUNCT_1:def 3; then A17: g1.x = [(g1.x)`1,(g1.x)`2] by A7,MCART_1:21; (g2.x)`1 in X & (g2.x)`2 in Y by A10,A14,MCART_1:10; then A18: pr1(X,Y).((g2.x)`1,(g2.x)`2) = (g2.x)`1 & pr2(X,Y).((g2.x)`1,(g2. x)`2) = (g2 .x)`2 by FUNCT_3:def 4,def 5; (g1.x)`1 in X & (g1.x)`2 in Y by A7,A16,MCART_1:10; then A19: pr1(X,Y).((g1.x)`1,(g1.x)`2) = (g1.x)`1 & pr2(X,Y).((g1.x)`1,(g1. x)`2) = (g1 .x)`2 by FUNCT_3:def 4,def 5; (pr1(X,Y)*g1).x = pr1(X,Y).(g1.x) & (pr1(X,Y)*g2).x = pr1(X,Y).( g2.x) by A6,A9,A12,FUNCT_1:13; hence g1.x = g2.x by A9,A11,A12,A13,A17,A15,A19,A18,FUNCT_1:13; end; hence thesis by A5,A6,A8,A9,FUNCT_1:2; end; thus dom f = Funcs(Z,[:X,Y:]) by A1; thus rng f c= [:Funcs(Z,X),Funcs(Z,Y):] proof let x; assume x in rng f; then consider y such that A20: y in dom f and A21: x = f.y by FUNCT_1:def 3; consider g such that A22: y = g and A23: dom g = Z & rng g c= [:X,Y:] by A1,A20,FUNCT_2:def 2; A24: rng(pr1(X,Y)*g) c= X; A25: rng(pr2(X,Y)*g) c= Y; dom pr2(X,Y) = [:X,Y:] by FUNCT_3:def 5; then dom(pr2(X,Y)*g) = Z by A23,RELAT_1:27; then A26: pr2(X,Y)*g in Funcs(Z,Y) by A25,FUNCT_2:def 2; dom pr1(X,Y) = [:X,Y:] by FUNCT_3:def 4; then dom(pr1(X,Y)*g) = Z by A23,RELAT_1:27; then A27: pr1(X,Y)*g in Funcs(Z,X) by A24,FUNCT_2:def 2; x = [pr1(X,Y)*g,pr2(X,Y)*g] by A1,A20,A21,A22; hence thesis by A27,A26,ZFMISC_1:87; end; let x; assume A28: x in [:Funcs(Z,X),Funcs(Z,Y):]; then A29: x = [x`1,x`2] by MCART_1:21; x`2 in Funcs(Z,Y) by A28,MCART_1:10; then consider g2 such that A30: x`2 = g2 and A31: dom g2 = Z and A32: rng g2 c= Y by FUNCT_2:def 2; x`1 in Funcs(Z,X) by A28,MCART_1:10; then consider g1 such that A33: x`1 = g1 and A34: dom g1 = Z and A35: rng g1 c= X by FUNCT_2:def 2; rng <:g1,g2:> c= [:rng g1,rng g2:] & [:rng g1,rng g2:] c= [:X,Y:] by A35 ,A32,FUNCT_3:51,ZFMISC_1:96; then A36: rng <:g1,g2:> c= [:X,Y:] by XBOOLE_1:1; dom <:g1,g2:> = Z /\ Z by A34,A31,FUNCT_3:def 7; then A37: <:g1,g2:> in Funcs(Z,[:X,Y:]) by A36,FUNCT_2:def 2; pr1(X,Y)*<:g1,g2:> = g1 & pr2(X,Y)*<:g1,g2:> = g2 by A34,A35,A31,A32, FUNCT_3:52; then f.<:g1,g2:> = [g1,g2] by A1,A37; hence thesis by A1,A29,A33,A30,A37,FUNCT_1:def 3; end; hence thesis by CARD_1:5; end; theorem x <> y implies Funcs(X,{x,y}),bool X are_equipotent & card Funcs(X,{x, y}) = card bool X proof deffunc F(Function) = $1"{x}; consider f such that A1: dom f = Funcs(X,{x,y}) & for g st g in Funcs(X,{x,y}) holds f.g = F( g) from LambdaFS; assume A2: x <> y; thus Funcs(X,{x,y}),bool X are_equipotent proof deffunc F(set) = x; take f; thus f is one-to-one proof let x1,x2; assume that A3: x1 in dom f and A4: x2 in dom f and A5: f.x1 = f.x2; consider g2 being Function such that A6: x2 = g2 and A7: dom g2 = X and A8: rng g2 c= {x,y} by A1,A4,FUNCT_2:def 2; A9: f.x2 = g2"{x} by A1,A4,A6; consider g1 being Function such that A10: x1 = g1 and A11: dom g1 = X and A12: rng g1 c= {x,y} by A1,A3,FUNCT_2:def 2; A13: f.x1 = g1"{x} by A1,A3,A10; now let z such that A14: z in X; A15: now assume A16: not g1.z in {x}; then A17: g1.z <> x by TARSKI:def 1; not z in g2"{x} by A5,A13,A9,A16,FUNCT_1:def 7; then not g2.z in {x} by A7,A14,FUNCT_1:def 7; then A18: g2.z <> x by TARSKI:def 1; g1.z in rng g1 by A11,A14,FUNCT_1:def 3; then A19: g1.z = y by A12,A17,TARSKI:def 2; g2.z in rng g2 by A7,A14,FUNCT_1:def 3; hence g1.z = g2.z by A8,A18,A19,TARSKI:def 2; end; now assume A20: g1.z in {x}; then z in g2"{x} by A5,A11,A13,A9,A14,FUNCT_1:def 7; then g2.z in {x} by FUNCT_1:def 7; then g2.z = x by TARSKI:def 1; hence g1.z = g2.z by A20,TARSKI:def 1; end; hence g1.z = g2.z by A15; end; hence thesis by A10,A11,A6,A7,FUNCT_1:2; end; thus dom f = Funcs(X,{x,y}) by A1; thus rng f c= bool X proof let z; assume z in rng f; then consider t being set such that A21: t in dom f and A22: z = f.t by FUNCT_1:def 3; consider g such that A23: t = g and A24: dom g = X and rng g c= {x,y} by A1,A21,FUNCT_2:def 2; A25: g"{x} c= X by A24,RELAT_1:132; z = g"{x} by A1,A21,A22,A23; hence thesis by A25; end; deffunc G(set) = y; let z; defpred P[set] means $1 in z; consider g such that A26: dom g = X & for t st t in X holds (P[t] implies g.t = F(t)) & ( not P[t] implies g.t = G(t)) from PARTFUN1:sch 1; assume A27: z in bool X; A28: g"{x} = z proof thus g"{x} c= z proof let t; assume A29: t in g"{x}; then g.t in {x} by FUNCT_1:def 7; then A30: g.t = x by TARSKI:def 1; t in dom g by A29,FUNCT_1:def 7; hence thesis by A2,A26,A30; end; let t; assume A31: t in z; then g.t = x by A27,A26; then g.t in {x} by TARSKI:def 1; hence thesis by A27,A26,A31,FUNCT_1:def 7; end; rng g c= {x,y} proof let t; assume t in rng g; then ex v being set st v in dom g & t = g.v by FUNCT_1:def 3; then t = x or t = y by A26; hence thesis by TARSKI:def 2; end; then A32: g in Funcs(X,{x,y}) by A26,FUNCT_2:def 2; then f.g = g"{x} by A1; hence thesis by A1,A32,A28,FUNCT_1:def 3; end; hence thesis by CARD_1:5; end; theorem x <> y implies Funcs({x,y},X),[:X,X:] are_equipotent & card Funcs({x,y },X) = card [:X,X:] proof deffunc F(Function) = [ $1.x,$1.y]; consider f such that A1: dom f = Funcs({x,y},X) & for g st g in Funcs({x,y},X) holds f.g = F( g) from LambdaFS; assume A2: x <> y; thus Funcs({x,y},X),[:X,X:] are_equipotent proof defpred P[set] means $1 = x; take f; thus f is one-to-one proof let x1,x2; assume that A3: x1 in dom f and A4: x2 in dom f and A5: f.x1 = f.x2; consider g2 such that A6: x2 = g2 and A7: dom g2 = {x,y} and rng g2 c= X by A1,A4,FUNCT_2:def 2; consider g1 such that A8: x1 = g1 and A9: dom g1 = {x,y} and rng g1 c= X by A1,A3,FUNCT_2:def 2; A10: [g1.x,g1.y] = f.x1 by A1,A3,A8 .= [g2.x,g2.y] by A1,A4,A5,A6; now let z; assume z in {x,y}; then z = x or z = y by TARSKI:def 2; hence g1.z = g2.z by A10,XTUPLE_0:1; end; hence thesis by A8,A9,A6,A7,FUNCT_1:2; end; thus dom f = Funcs({x,y},X) by A1; thus rng f c= [:X,X:] proof let z; assume z in rng f; then consider t such that A11: t in dom f and A12: z = f.t by FUNCT_1:def 3; consider g such that A13: t = g and A14: dom g = {x,y} and A15: rng g c= X by A1,A11,FUNCT_2:def 2; x in {x,y} by TARSKI:def 2; then A16: g.x in rng g by A14,FUNCT_1:def 3; y in {x,y} by TARSKI:def 2; then A17: g.y in rng g by A14,FUNCT_1:def 3; z = [g.x,g.y] by A1,A11,A12,A13; hence thesis by A15,A16,A17,ZFMISC_1:87; end; let z; deffunc F(set) = z`1; deffunc G(set) = z`2; consider g such that A18: dom g = {x,y} & for t st t in {x,y} holds (P[t] implies g.t = F(t )) & (not P[t] implies g.t = G(t)) from PARTFUN1:sch 1; x in {x,y} by TARSKI:def 2; then A19: g.x = z`1 by A18; y in {x,y} by TARSKI:def 2; then A20: g.y = z`2 by A2,A18; assume A21: z in [:X,X:]; then A22: z = [z`1,z`2] by MCART_1:21; A23: z`1 in X & z`2 in X by A21,MCART_1:10; rng g c= X proof let t; assume t in rng g; then ex a being set st a in dom g & t = g.a by FUNCT_1:def 3; hence thesis by A23,A18; end; then A24: g in Funcs({x,y},X) by A18,FUNCT_2:def 2; then f.g = [g.x,g.y] by A1; hence thesis by A1,A22,A24,A19,A20,FUNCT_1:def 3; end; hence thesis by CARD_1:5; end; begin notation synonym op0 for 0; end; definition redefine func op0 -> Element of 1; coherence by CARD_1:49,TARSKI:def 1; end; definition func op1 equals 0 .--> 0; coherence; func op2 equals (0,0) :-> 0; coherence; end; definition redefine func op1 -> UnOp of 1; coherence by CARD_1:49; redefine func op2 -> BinOp of 1; coherence by CARD_1:49; end; reserve C,D,E for non empty set; reserve c for Element of C, d for Element of D; definition let D,X,E; let F be FUNCTION_DOMAIN of X,E; let f be Function of D,F; let d be Element of D; redefine func f.d -> Element of F; coherence proof thus f.d is Element of F; end; end; reserve f for Function of [:C,D:],E; theorem Th1: curry f is Function of C,Funcs(D,E) proof A1: dom f = [:C,D:] by FUNCT_2:def 1; A2: rng curry f c= Funcs(D,E) proof A3: rng curry f c= Funcs(D,rng f) by A1,Th35; let x be set; assume x in rng curry f; then consider g being Function such that A4: x = g and A5: dom g = D and A6: rng g c= rng f by A3,FUNCT_2:def 2; rng g c= E by A6,XBOOLE_1:1; then g is Function of D,E by A5,FUNCT_2:def 1,RELSET_1:4; hence thesis by A4,FUNCT_2:8; end; dom curry f = C by A1,Th24; hence thesis by A2,FUNCT_2:def 1,RELSET_1:4; end; theorem Th2: curry' f is Function of D,Funcs(C,E) proof A1: dom f = [:C,D:] by FUNCT_2:def 1; A2: rng curry' f c= Funcs(C,E) proof A3: rng curry' f c= Funcs(C,rng f) by A1,Th35; let x be set; assume x in rng curry' f; then consider g being Function such that A4: x = g and A5: dom g = C and A6: rng g c= rng f by A3,FUNCT_2:def 2; rng g c= E by A6,XBOOLE_1:1; then g is Function of C,E by A5,FUNCT_2:def 1,RELSET_1:4; hence thesis by A4,FUNCT_2:8; end; dom curry' f = D by A1,Th24; hence thesis by A2,FUNCT_2:def 1,RELSET_1:4; end; definition let C,D,E,f; redefine func curry f -> Function of C,Funcs(D,E); coherence by Th1; redefine func curry' f -> Function of D,Funcs(C,E); coherence by Th2; end; theorem f.(c,d) = ((curry f).c).d proof [c,d] in [:C,D:]; then [c,d] in dom f by FUNCT_2:def 1; hence thesis by Th20; end; theorem f.(c,d) = ((curry' f).d).c proof [c,d] in [:C,D:]; then [c,d] in dom f by FUNCT_2:def 1; hence thesis by Th22; end; definition let A,B,C be non empty set; let f be Function of A, Funcs(B,C); redefine func uncurry f -> Function of [:A,B:],C; coherence proof A1: rng f c= Funcs(B,C); then A2: rng uncurry f c= C by Th41; dom uncurry f = [:dom f,B:] by A1,Th26 .= [:A,B:] by FUNCT_2:def 1; hence thesis by A2,FUNCT_2:def 1,RELSET_1:4; end; end; theorem for A,B,C being non empty set, f being Function of A,Funcs(B,C) holds curry uncurry f = f proof let A,B,C be non empty set, f be Function of A,Funcs(B,C); rng f c= Funcs(B,C); hence thesis by Th48; end; theorem for A,B,C being non empty set, f being Function of A, Funcs(B,C) for a being Element of A, b being Element of B holds (uncurry f).(a,b) = f.a.b proof let A,B,C be non empty set, f be Function of A, Funcs(B,C); let a be Element of A, b be Element of B; dom f = A & dom(f.a) = B by FUNCT_2:def 1; hence thesis by Th38; end; begin reserve x,y,X,Y for set; reserve C,D,E for non empty set; reserve SC for Subset of C; reserve SD for Subset of D; reserve SE for Subset of E; reserve c,c1,c2 for Element of C; reserve d,d1,d2 for Element of D; reserve e for Element of E; reserve f,f1,g for PartFunc of C,D; reserve t for PartFunc of D,C; reserve s for PartFunc of D,E; reserve h for PartFunc of C,E; reserve F for PartFunc of D,D; theorem Th1: dom f = dom g & (for c st c in dom f holds f/.c = g/.c) implies f = g proof assume that A1: dom f = dom g and A2: for c st c in dom f holds f/.c = g/.c; now let x; assume A3: x in dom f; then reconsider y=x as Element of C; f/.y=g/.y by A2,A3; then (f qua Function).y = g/.y by A3,PARTFUN1:def 6; hence (f qua Function).x = (g qua Function).x by A1,A3,PARTFUN1:def 6; end; hence thesis by A1,FUNCT_1:2; end; theorem Th2: y in rng f iff ex c st c in dom f & y = f/.c proof thus y in rng f implies ex c st c in dom f & y = f/.c proof assume y in rng f; then consider x such that A1: x in dom f and A2: y = (f qua Function).x by FUNCT_1:def 3; reconsider x as Element of C by A1; take x; thus thesis by A1,A2,PARTFUN1:def 6; end; given c such that A3: c in dom f and A4: y = f/.c; (f qua Function).c in rng f by A3,FUNCT_1:def 3; hence thesis by A3,A4,PARTFUN1:def 6; end; theorem Th3: h = s*f iff (for c holds c in dom h iff c in dom f & f/.c in dom s) & for c st c in dom h holds h/.c = s/.(f/.c) proof thus h = s*f implies (for c holds c in dom h iff c in dom f & f/.c in dom s) & for c st c in dom h holds h/.c = s/.(f/.c) proof assume A1: h = s*f; A2: now let c; thus c in dom h implies c in dom f & f/.c in dom s proof assume c in dom h; then c in dom f & (f qua Function).c in dom s by A1,FUNCT_1:11; hence thesis by PARTFUN1:def 6; end; assume that A3: c in dom f and A4: f/.c in dom s; (f qua Function).c in dom s by A3,A4,PARTFUN1:def 6; hence c in dom h by A1,A3,FUNCT_1:11; end; hence for c holds c in dom h iff c in dom f & f/.c in dom s; let c; assume A5: c in dom h; then (h qua Function).c = (s qua Function).((f qua Function).c) by A1, FUNCT_1:12; then A6: h/.c = (s qua Function).((f qua Function).c) by A5,PARTFUN1:def 6; c in dom f by A2,A5; then A7: h/.c = (s qua Function).(f/.c) by A6,PARTFUN1:def 6; f/.c in dom s by A2,A5; hence thesis by A7,PARTFUN1:def 6; end; assume that A8: for c holds c in dom h iff c in dom f & f/.c in dom s and A9: for c st c in dom h holds h/.c = s/.(f/.c); A10: now let x; thus x in dom h implies x in dom f & (f qua Function).x in dom s proof assume A11: x in dom h; then reconsider y=x as Element of C; y in dom f & f/.y in dom s by A8,A11; hence thesis by PARTFUN1:def 6; end; thus x in dom f & (f qua Function).x in dom s implies x in dom h proof assume that A12: x in dom f and A13: (f qua Function).x in dom s; reconsider y=x as Element of C by A12; f/.y in dom s by A12,A13,PARTFUN1:def 6; hence thesis by A8,A12; end; end; now let x; assume A14: x in dom h; then reconsider y=x as Element of C; h/.y = s/.(f/.y) by A9,A14; then A15: (h qua Function).y = s/.(f/.y) by A14,PARTFUN1:def 6; f/.y in dom s by A8,A14; then A16: (h qua Function).x = (s qua Function).(f/.y) by A15,PARTFUN1:def 6; y in dom f by A8,A14; hence (h qua Function).x = (s qua Function).((f qua Function).x) by A16, PARTFUN1:def 6; end; hence thesis by A10,FUNCT_1:10; end; theorem Th4: c in dom f & f/.c in dom s implies (s*f)/.c = s/.(f/.c) proof assume c in dom f & f/.c in dom s; then c in dom (s*f) by Th3; hence thesis by Th3; end; theorem rng f c= dom s & c in dom f implies (s*f)/.c = s/.(f/.c) proof assume that A1: rng f c= dom s and A2: c in dom f; f/.c in rng f by A2,Th2; hence thesis by A1,A2,Th4; end; definition let D; let SD; redefine func id SD -> PartFunc of D,D; coherence proof dom id SD = SD & rng id SD = SD by RELAT_1:45; hence thesis by RELSET_1:4; end; end; theorem Th6: F = id SD iff dom F = SD & for d st d in SD holds F/.d = d proof thus F = id SD implies dom F = SD & for d st d in SD holds F/.d = d proof assume A1: F = id SD; hence A2: dom F = SD by RELAT_1:45; let d; assume A3: d in SD; then (F qua Function).d = d by A1,FUNCT_1:18; hence thesis by A2,A3,PARTFUN1:def 6; end; assume that A4: dom F = SD and A5: for d st d in SD holds F/.d = d; now let x; assume A6: x in SD; then reconsider x1=x as Element of D; F/.x1=x1 by A5,A6; hence (F qua Function).x = x by A4,A6,PARTFUN1:def 6; end; hence thesis by A4,FUNCT_1:17; end; theorem d in dom F /\ SD implies F/.d = (F*id SD)/.d proof assume A1: d in dom F /\ SD; then A2: d in dom F by XBOOLE_0:def 4; (F qua Function).d = ((F*(id SD)) qua Function).d by A1,FUNCT_1:20; then A3: F/.d = ((F*(id SD)) qua Function).d by A2,PARTFUN1:def 6; A4: d in SD by A1,XBOOLE_0:def 4; then A5: d in dom id SD by RELAT_1:45; (id SD)/.d in dom F by A2,A4,Th6; then d in dom (F*(id SD)) by A5,Th3; hence thesis by A3,PARTFUN1:def 6; end; theorem d in dom((id SD)*F) iff d in dom F & F/.d in SD proof thus d in dom((id SD)*F) implies d in dom F & F/.d in SD proof assume A1: d in dom((id SD)*F); then F/.d in dom (id SD) by Th3; hence thesis by A1,Th3,RELAT_1:45; end; assume that A2: d in dom F and A3: F/.d in SD; F/.d in dom (id SD) by A3,RELAT_1:45; hence thesis by A2,Th3; end; theorem (for c1,c2 st c1 in dom f & c2 in dom f & f/.c1 = f/.c2 holds c1 = c2) implies f is one-to-one proof assume A1: for c1,c2 st c1 in dom f & c2 in dom f & f/.c1 = f/.c2 holds c1 = c2; now let x,y; assume that A2: x in dom f and A3: y in dom f and A4: (f qua Function).x = (f qua Function).y; reconsider y1 = y as Element of C by A3; reconsider x1 = x as Element of C by A2; f/.x1 = (f qua Function).y1 by A2,A4,PARTFUN1:def 6; then f/.x1 = f/.y1 by A3,PARTFUN1:def 6; hence x=y by A1,A2,A3; end; hence thesis by FUNCT_1:def 4; end; theorem f is one-to-one & x in dom f & y in dom f & f/.x = f/.y implies x = y proof assume that A1: f is one-to-one and A2: x in dom f and A3: y in dom f; assume f/.x = f/.y; then f.x = f/.y by A2,PARTFUN1:def 6 .= f.y by A3,PARTFUN1:def 6; hence thesis by A1,A2,A3,FUNCT_1:def 4; end; definition let X,Y; let f be one-to-one PartFunc of X,Y; redefine func f" -> PartFunc of Y,X; coherence by PARTFUN1:9; end; theorem Th11: for f being one-to-one PartFunc of C,D holds for g be PartFunc of D,C holds g = f" iff dom g = rng f & for d,c holds d in rng f & c = g/.d iff c in dom f & d = f/.c proof let f be one-to-one PartFunc of C,D; let g be PartFunc of D,C; thus g = f" implies dom g = rng f & for d,c holds d in rng f & c = g/.d iff c in dom f & d = f/.c proof assume A1: g = f"; hence dom g = rng f by FUNCT_1:32; let d,c; A2: dom g = rng f by A1,FUNCT_1:32; thus d in rng f & c = g/.d implies c in dom f & d = f/.c proof assume that A3: d in rng f and A4: c = g/.d; c = (g qua Function).d by A2,A3,A4,PARTFUN1:def 6; then c in dom f & d = (f qua Function).c by A1,A3,FUNCT_1:32; hence thesis by PARTFUN1:def 6; end; assume that A5: c in dom f and A6: d = f/.c; d = (f qua Function).c by A5,A6,PARTFUN1:def 6; then d in rng f & c = (g qua Function).d by A1,A5,FUNCT_1:32; hence thesis by A2,PARTFUN1:def 6; end; assume that A7: dom g = rng f and A8: for d,c holds d in rng f & c = g/.d iff c in dom f & d = f/.c and A9: g <> f"; now per cases by A9,Th1; suppose dom (f") <> dom g; hence contradiction by A7,FUNCT_1:33; end; suppose ex d st d in dom (f") & f"/.d <> g/.d; then consider d such that A10: d in dom (f") and A11: f"/.d <> g/.d; f"/.d in rng (f") by A10,Th2; then A12: f"/.d in dom f by FUNCT_1:33; d in rng f by A10,FUNCT_1:33; then d = (f qua Function).(((f") qua Function).d) by FUNCT_1:35; then d = (f qua Function).(f"/.d) by A10,PARTFUN1:def 6; then d = f/.(f"/.d) by A12,PARTFUN1:def 6; hence contradiction by A8,A11,A12; end; end; hence contradiction; end; theorem for f being one-to-one PartFunc of C,D st c in dom f holds c = f"/.(f /.c) & c = (f"*f)/.c proof let f be one-to-one PartFunc of C,D; assume A1: c in dom f; hence A2: c = f"/.(f/.c) by Th11; f" = f"; then f/.c in rng f by A1,Th11; then f/.c in dom (f") by FUNCT_1:33; hence thesis by A1,A2,Th4; end; theorem for f being one-to-one PartFunc of C,D st d in rng f holds d = f/.(f" /.d) & d = (f*(f"))/.d proof let f be one-to-one PartFunc of C,D; assume A1: d in rng f; then d = ((f*f") qua Function).d & d in dom (f*f") by FUNCT_1:35,37; hence thesis by A1,Th11,PARTFUN1:def 6; end; theorem f is one-to-one & dom f = rng t & rng f = dom t & (for c,d st c in dom f & d in dom t holds f/.c = d iff t/.d = c) implies t = f" proof assume that A1: f is one-to-one & dom f = rng t & rng f = dom t and A2: for c,d st c in dom f & d in dom t holds f/.c = d iff t/.d = c; now let x,y; assume that A3: x in dom f and A4: y in dom t; reconsider y1=y as Element of D by A4; reconsider x1=x as Element of C by A3; thus (f qua Function).x = y implies (t qua Function).y = x proof assume (f qua Function).x = y; then f/.x1 = y1 by A3,PARTFUN1:def 6; then t/.y1 = x1 by A2,A3,A4; hence thesis by A4,PARTFUN1:def 6; end; assume (t qua Function).y = x; then t/.y1 = x1 by A4,PARTFUN1:def 6; then f/.x1 = y1 by A2,A3,A4; hence (f qua Function).x = y by A3,PARTFUN1:def 6; end; hence thesis by A1,FUNCT_1:38; end; theorem Th15: g = f|X iff dom g = dom f /\ X & for c st c in dom g holds g/.c = f/.c proof thus g = f|X implies dom g = dom f /\ X & for c st c in dom g holds g/.c = f /.c proof assume A1: g = f|X; hence dom g = dom f /\ X by RELAT_1:61; let c; assume A2: c in dom g; then (g qua Function).c = (f qua Function).c by A1,FUNCT_1:47; then A3: g/.c = (f qua Function).c by A2,PARTFUN1:def 6; dom g = dom f /\ X by A1,RELAT_1:61; then c in dom f by A2,XBOOLE_0:def 4; hence thesis by A3,PARTFUN1:def 6; end; assume that A4: dom g = dom f /\ X and A5: for c st c in dom g holds g/.c = f/.c; now let x; assume A6: x in dom g; then reconsider y=x as Element of C; g/.y = f/.y by A5,A6; then A7: (g qua Function).y = f/.y by A6,PARTFUN1:def 6; x in dom f by A4,A6,XBOOLE_0:def 4; hence (g qua Function).x = (f qua Function).x by A7,PARTFUN1:def 6; end; hence thesis by A4,FUNCT_1:46; end; theorem Th16: c in dom f /\ X implies f|X/.c = f/.c proof assume c in dom f /\ X; then c in dom (f|X) by RELAT_1:61; hence thesis by Th15; end; theorem c in dom f & c in X implies f|X/.c = f/.c proof assume c in dom f & c in X; then c in dom f /\ X by XBOOLE_0:def 4; hence thesis by Th16; end; theorem c in dom f & c in X implies f/.c in rng (f|X) proof assume that A1: c in dom f and A2: c in X; (f qua Function).c in rng (f|X) by A1,A2,FUNCT_1:50; hence thesis by A1,PARTFUN1:def 6; end; definition let C,D; let X,f; redefine func X|`f -> PartFunc of C,D; coherence by PARTFUN1:13; end; theorem Th19: g = X|`f iff (for c holds c in dom g iff c in dom f & f/.c in X) & for c st c in dom g holds g/.c = f/.c proof thus g = X|`f implies (for c holds c in dom g iff c in dom f & f/.c in X) & for c st c in dom g holds g/.c = f/.c proof assume A1: g = X|`f; now let c; thus c in dom g implies c in dom f & f/.c in X proof assume c in dom g; then c in dom f & (f qua Function).c in X by A1,FUNCT_1:54; hence thesis by PARTFUN1:def 6; end; assume that A2: c in dom f and A3: f/.c in X; (f qua Function).c in X by A2,A3,PARTFUN1:def 6; hence c in dom g by A1,A2,FUNCT_1:54; end; hence for c holds c in dom g iff c in dom f & f/.c in X; let c; assume A4: c in dom g; then (g qua Function).c = (f qua Function).c by A1,FUNCT_1:55; then A5: g/.c = (f qua Function).c by A4,PARTFUN1:def 6; c in dom f by A1,A4,FUNCT_1:54; hence thesis by A5,PARTFUN1:def 6; end; assume that A6: for c holds c in dom g iff c in dom f & f/.c in X and A7: for c st c in dom g holds g/.c = f/.c; A8: now let x; thus x in dom g implies x in dom f & (f qua Function).x in X proof assume A9: x in dom g; then reconsider x1=x as Element of C; x1 in dom f & f/.x1 in X by A6,A9; hence thesis by PARTFUN1:def 6; end; assume that A10: x in dom f and A11: (f qua Function).x in X; reconsider x1=x as Element of C by A10; f/.x1 in X by A10,A11,PARTFUN1:def 6; hence x in dom g by A6,A10; end; now let x; assume A12: x in dom g; then reconsider x1=x as Element of C; g/.x1 = f/.x1 by A7,A12; then A13: (g qua Function).x1 = f/.x1 by A12,PARTFUN1:def 6; x1 in dom f by A6,A12; hence (g qua Function).x = (f qua Function).x by A13,PARTFUN1:def 6; end; hence thesis by A8,FUNCT_1:53; end; theorem c in dom (X|`f) iff c in dom f & f/.c in X by Th19; theorem c in dom (X|`f) implies X|`f/.c = f/.c by Th19; theorem Th22: SD = f.: X iff for d holds d in SD iff ex c st c in dom f & c in X & d = f/.c proof thus SD = f.:X implies for d holds d in SD iff ex c st c in dom f & c in X & d = f/.c proof assume A1: SD = f.:X; let d; thus d in SD implies ex c st c in dom f & c in X & d = f/.c proof assume d in SD; then consider x such that A2: x in dom f and A3: x in X and A4: d = (f qua Function).x by A1,FUNCT_1:def 6; reconsider x as Element of C by A2; take x; thus x in dom f & x in X by A2,A3; thus thesis by A2,A4,PARTFUN1:def 6; end; given c such that A5: c in dom f and A6: c in X & d = f/.c; f/.c = (f qua Function).c by A5,PARTFUN1:def 6; hence thesis by A1,A5,A6,FUNCT_1:def 6; end; assume that A7: for d holds d in SD iff ex c st c in dom f & c in X & d = f/.c and A8: SD <> f.:X; consider x such that A9: not (x in SD iff x in f.:X) by A8,TARSKI:1; now per cases by A9; suppose A10: x in SD & not x in f.:X; then reconsider x as Element of D; consider c such that A11: c in dom f and A12: c in X and A13: x = f/.c by A7,A10; x = (f qua Function).c by A11,A13,PARTFUN1:def 6; hence contradiction by A10,A11,A12,FUNCT_1:def 6; end; suppose A14: x in f.:X & not x in SD; then consider y such that A15: y in dom f and A16: y in X and A17: x = (f qua Function).y by FUNCT_1:def 6; reconsider y as Element of C by A15; x = f/.y by A15,A17,PARTFUN1:def 6; hence contradiction by A7,A14,A15,A16; end; end; hence contradiction; end; theorem d in (f qua Relation of C,D).:X iff ex c st c in dom f & c in X & d = f/.c by Th22; theorem c in dom f implies Im(f,c) = {f/.c} proof assume A1: c in dom f; hence Im(f,c) = {(f qua Function).c} by FUNCT_1:59 .= {f/.c} by A1,PARTFUN1:def 6; end; theorem c1 in dom f & c2 in dom f implies f.:{c1,c2} = {f/.c1,f/.c2} proof assume that A1: c1 in dom f and A2: c2 in dom f; thus f.:{c1,c2} = {(f qua Function).c1,(f qua Function).c2} by A1,A2, FUNCT_1:60 .= {f/.c1,(f qua Function).c2} by A1,PARTFUN1:def 6 .= {f/.c1,f/.c2} by A2,PARTFUN1:def 6; end; theorem Th26: SC = f"X iff for c holds c in SC iff c in dom f & f/.c in X proof thus SC = f"X implies for c holds c in SC iff c in dom f & f/.c in X proof assume A1: SC = f"X; let c; thus c in SC implies c in dom f & f/.c in X proof assume c in SC; then c in dom f & (f qua Function).c in X by A1,FUNCT_1:def 7; hence thesis by PARTFUN1:def 6; end; assume that A2: c in dom f and A3: f/.c in X; (f qua Function).c in X by A2,A3,PARTFUN1:def 6; hence thesis by A1,A2,FUNCT_1:def 7; end; assume A4: for c holds c in SC iff c in dom f & f/.c in X; now let x; thus x in SC implies x in dom f & (f qua Function).x in X proof assume A5: x in SC; then reconsider x1=x as Element of C; x1 in dom f & f/.x1 in X by A4,A5; hence thesis by PARTFUN1:def 6; end; assume that A6: x in dom f and A7: (f qua Function).x in X; reconsider x1=x as Element of C by A6; f/.x1 in X by A6,A7,PARTFUN1:def 6; hence x in SC by A4,A6; end; hence thesis by FUNCT_1:def 7; end; theorem for f ex g being Function of C,D st for c st c in dom f holds g.c = f /.c proof let f; consider g being Function of C,D such that A1: for x st x in dom f holds g.x = (f qua Function).x by FUNCT_2:71; take g; let c; assume A2: c in dom f; then g.c = (f qua Function).c by A1; hence thesis by A2,PARTFUN1:def 6; end; theorem f tolerates g iff for c st c in dom f /\ dom g holds f/.c = g/.c proof thus f tolerates g implies for c st c in dom f /\ dom g holds f/.c = g/.c proof assume A1: f tolerates g; let c; assume A2: c in dom f /\ dom g; then A3: c in dom f by XBOOLE_0:def 4; (f qua Function).c = (g qua Function).c by A1,A2,PARTFUN1:def 4; then A4: f/.c = (g qua Function).c by A3,PARTFUN1:def 6; c in dom g by A2,XBOOLE_0:def 4; hence thesis by A4,PARTFUN1:def 6; end; assume A5: for c st c in dom f /\ dom g holds f/.c = g/.c; now let x; assume A6: x in dom f /\ dom g; then reconsider x1=x as Element of C; x in dom f & f/.x1 = g/.x1 by A5,A6,XBOOLE_0:def 4; then A7: (f qua Function).x = g/.x1 by PARTFUN1:def 6; x in dom g by A6,XBOOLE_0:def 4; hence (f qua Function).x = (g qua Function).x by A7,PARTFUN1:def 6; end; hence thesis by PARTFUN1:def 4; end; scheme PartFuncExD{D,C()->non empty set, P[set,set]}: ex f being PartFunc of D(),C( ) st (for d be Element of D() holds d in dom f iff (ex c be Element of C() st P [d,c])) & for d be Element of D() st d in dom f holds P[d,f/.d] proof defpred R[set] means ex c be Element of C() st P[$1,c]; set x = the Element of C(); defpred Q[set,set] means ((ex c be Element of C() st P[$1,c]) implies P[$1, $2]) & ((for c be Element of C() holds not P[$1,c]) implies $2=x); consider X be set such that A1: for x holds x in X iff x in D() & R[x] from XBOOLE_0:sch 1; for x holds x in X implies x in D() by A1; then reconsider X as Subset of D() by TARSKI:def 3; A2: for d be Element of D() ex z be Element of C() st Q[d,z] proof let d be Element of D(); (for c be Element of C() holds not P[d,c]) implies ex z be Element of C() st ((ex c be Element of C() st P[d,c]) implies P[d,z]) & ((for c be Element of C() holds not P[d,c]) implies z=x); hence thesis; end; consider g being Function of D(),C() such that A3: for d be Element of D() holds Q[d,g.d] from FUNCT_2:sch 3(A2); reconsider f=g|X as PartFunc of D(),C(); take f; A4: dom g = D() by FUNCT_2:def 1; thus for d be Element of D() holds d in dom f iff ex c be Element of C() st P[d,c] proof let d be Element of D(); dom f c= X by RELAT_1:58; hence d in dom f implies ex c be Element of C() st P[d,c] by A1; assume ex c be Element of C() st P[d,c]; then d in X by A1; then d in dom g /\ X by A4,XBOOLE_0:def 4; hence thesis by RELAT_1:61; end; let d be Element of D(); assume A5: d in dom f; dom f c= X by RELAT_1:58; then ex c be Element of C() st P[d,c] by A1,A5; then P[d,g.d] by A3; then P[d,(f qua Function).d] by A5,FUNCT_1:47; hence thesis by A5,PARTFUN1:def 6; end; scheme LambdaPFD{D,C()->non empty set, F(set)->Element of C(), P[set]}: ex f being PartFunc of D(),C() st (for d be Element of D() holds d in dom f iff P[d]) & for d be Element of D() st d in dom f holds f/.d = F(d) proof defpred Q[set,set] means P[$1] & $2 = F($1); consider f being PartFunc of D(),C() such that A1: for d be Element of D() holds d in dom f iff ex c be Element of C() st Q[d,c] and A2: for d be Element of D() st d in dom f holds Q[d,f/.d] from PartFuncExD; take f; thus for d be Element of D() holds d in dom f iff P[d] proof let d be Element of D(); thus d in dom f implies P[d] proof assume d in dom f; then ex c be Element of C() st P[d] & c = F(d) by A1; hence thesis; end; assume P[d]; then ex c be Element of C() st P[d] & c = F(d); hence thesis by A1; end; thus thesis by A2; end; scheme UnPartFuncD{C,D()->non empty set, X()->set, F(set)->Element of D()}: for f,g being PartFunc of C(),D() st (dom f=X() & for c be Element of C() st c in dom f holds f/.c = F(c)) & (dom g=X() & for c be Element of C() st c in dom g holds g /.c = F(c)) holds f = g proof let f,g be PartFunc of C(),D(); assume that A1: dom f=X() and A2: for c be Element of C() st c in dom f holds f/.c = F(c) and A3: dom g=X() and A4: for c be Element of C() st c in dom g holds g/.c = F(c); now let c be Element of C(); assume A5: c in dom f; hence f/.c = F(c) by A2 .= g/.c by A1,A3,A4,A5; end; hence thesis by A1,A3,Th1; end; definition let C,D; let SC,d; redefine func SC --> d -> PartFunc of C,D; coherence proof dom (SC --> d) = SC by FUNCOP_1:13; hence thesis by RELSET_1:7; end; end; theorem Th29: c in SC implies (SC --> d)/.c = d proof assume A1: c in SC; then dom (SC --> d) = SC & ((SC --> d) qua Function).c = d by FUNCOP_1:7,13; hence thesis by A1,PARTFUN1:def 6; end; theorem (for c st c in dom f holds f/.c = d) implies f = dom f --> d proof assume A1: for c st c in dom f holds f/.c = d; now let x; assume A2: x in dom f; then reconsider x1=x as Element of C; f/.x1 = d by A1,A2; hence ( f qua Function).x = d by A2,PARTFUN1:def 6; end; hence thesis by FUNCOP_1:11; end; theorem c in dom f implies f*(SE --> c) = SE --> f/.c proof assume A1: c in dom f; then f*(SE --> c) = SE --> (f qua Function).c by FUNCOP_1:17; hence thesis by A1,PARTFUN1:def 6; end; theorem (id SC) is total iff SC = C proof thus (id SC) is total implies SC = C proof assume (id SC) is total; then dom (id SC) = C by PARTFUN1:def 2; hence thesis by RELAT_1:45; end; assume SC = C; then dom (id SC) = C by RELAT_1:45; hence thesis by PARTFUN1:def 2; end; theorem (SC --> d) is total implies SC <> {} proof assume that A1: (SC --> d) is total and A2: SC = {}; dom (SC --> d) = C by A1,PARTFUN1:def 2; hence contradiction by A2,FUNCOP_1:10; end; theorem (SC --> d) is total iff SC = C proof thus (SC --> d) is total implies SC = C proof assume (SC --> d) is total; then dom (SC --> d) = C by PARTFUN1:def 2; hence thesis by FUNCOP_1:13; end; assume SC = C; then dom (SC --> d) = C by FUNCOP_1:13; hence thesis by PARTFUN1:def 2; end; definition let C,D,f; redefine attr f is constant means ex d st for c st c in dom f holds f.c = d; compatibility proof thus f is constant implies ex d st for c st c in dom f holds f.c = d proof assume A1: f is constant; per cases; suppose A2: dom f = {}; set d = the Element of D; take d; thus thesis by A2; end; suppose dom f <> {}; then consider c0 being set such that A3: c0 in dom f by XBOOLE_0:def 1; reconsider c0 as Element of C by A3; take d = f/.c0; let c; assume c in dom f; hence f.c = f.c0 by A1,A3,FUNCT_1:def 10 .= d by A3,PARTFUN1:def 6; end; end; given d such that A4: for c st c in dom f holds f.c = d; let x,y be set such that A5: x in dom f and A6: y in dom f; thus f.x = d by A4,A5 .=f.y by A4,A6; end; end; theorem Th35: f|X is constant iff ex d st for c st c in X /\ dom f holds f/.c = d proof thus f|X is constant implies ex d st for c st c in X /\ dom f holds f/.c = d proof given d such that A1: for c st c in dom(f|X) holds (f|X).c = d; take d; let c; assume A2: c in X /\ dom f; then A3: c in dom(f|X) by RELAT_1:61; c in dom f by A2,XBOOLE_0:def 4; hence f/.c = f.c by PARTFUN1:def 6 .= (f|X).c by A3,FUNCT_1:47 .= d by A1,A3; end; given d such that A4: for c st c in X /\ dom f holds f/.c = d; take d; let c; assume A5: c in dom(f|X); then A6: c in X /\ dom f by RELAT_1:61; then A7: c in dom f by XBOOLE_0:def 4; thus (f|X).c = f.c by A5,FUNCT_1:47 .= f/.c by A7,PARTFUN1:def 6 .= d by A4,A6; end; theorem f|X is constant iff for c1,c2 st c1 in X /\ dom f & c2 in X /\ dom f holds f/.c1=f/.c2 proof thus f|X is constant implies for c1,c2 st c1 in X /\ dom f & c2 in X /\ dom f holds f/.c1=f/.c2 proof assume f|X is constant; then consider d such that A1: for c st c in X /\ dom f holds f/.c = d by Th35; let c1,c2; assume that A2: c1 in X /\ dom f and A3: c2 in X /\ dom f; f/.c1 = d by A1,A2; hence thesis by A1,A3; end; assume A4: for c1,c2 st c1 in X /\ dom f & c2 in X /\ dom f holds f/.c1=f/.c2; now per cases; suppose A5: X /\ dom f = {}; now set d = the Element of D; take d; let c; thus c in X /\ dom f implies f/.c = d by A5; end; hence thesis by Th35; end; suppose A6: X /\ dom f <> {}; set x = the Element of X /\ dom f; x in dom f by A6,XBOOLE_0:def 4; then reconsider x as Element of C; for c holds c in X /\ dom f implies f/.c = f/.x by A4; hence thesis by Th35; end; end; hence thesis; end; theorem X meets dom f implies (f|X is constant iff ex d st rng (f|X) = {d}) proof assume A1: X /\ dom f <> {}; thus f|X is constant implies ex d st rng (f|X) = {d} proof assume f|X is constant; then consider d such that A2: for c st c in X /\ dom f holds f/.c = d by Th35; take d; thus rng (f|X) c= {d} proof let x; assume x in rng (f|X); then consider y such that A3: y in dom (f|X) and A4: ((f|X) qua Function).y = x by FUNCT_1:def 3; reconsider y as Element of C by A3; dom (f|X) = X /\ dom f by RELAT_1:61; then d = f/.y by A2,A3 .= f|X/.y by A3,Th15 .= x by A3,A4,PARTFUN1:def 6; hence thesis by TARSKI:def 1; end; thus {d} c= rng (f|X) proof set y = the Element of X /\ dom f; y in dom f by A1,XBOOLE_0:def 4; then reconsider y as Element of C; let x such that A5: x in {d}; A6: dom (f|X) = X /\ dom f by RELAT_1:61; then f|X/.y = f/.y by A1,Th15 .= d by A1,A2 .= x by A5,TARSKI:def 1; hence thesis by A1,A6,Th2; end; end; given d such that A7: rng (f|X) = {d}; take d; let c; assume A8: c in dom (f|X); then f|X/.c in {d} by A7,Th2; then (f|X).c in {d} by A8,PARTFUN1:def 6; hence thesis by TARSKI:def 1; end; theorem f|X is constant & Y c= X implies f|Y is constant proof assume that A1: f|X is constant and A2: Y c= X; consider d such that A3: for c st c in X /\ dom f holds f/.c = d by A1,Th35; now let c; assume c in Y /\ dom f; then c in Y & c in dom f by XBOOLE_0:def 4; then c in X /\ dom f by A2,XBOOLE_0:def 4; hence f/.c = d by A3; end; hence thesis by Th35; end; theorem Th39: X misses dom f implies f|X is constant proof assume A1: X /\ dom f = {}; now set d = the Element of D; take d; let c; thus c in X /\ dom f implies f/.c = d by A1; end; hence thesis by Th35; end; theorem f|SC = dom (f|SC) --> d implies f|SC is constant proof assume A1: f|SC = dom (f|SC) --> d; now let c; assume c in SC /\ dom f; then A2: c in dom (f|SC) by RELAT_1:61; then f|SC/.c = d by A1,Th29; hence f/.c = d by A2,Th15; end; hence thesis by Th35; end; theorem f|{x} is constant proof now per cases; suppose {x} /\ dom f = {}; then {x} misses dom f by XBOOLE_0:def 7; hence thesis by Th39; end; suppose A1: {x} /\ dom f <> {}; set y = the Element of {x} /\ dom f; y in {x} & y in dom f by A1,XBOOLE_0:def 4; then reconsider x1=x as Element of C by TARSKI:def 1; now take d = f/.x1; let c; assume c in {x} /\ dom f; then c in {x} by XBOOLE_0:def 4; hence f/.c = f/.x1 by TARSKI:def 1; end; hence thesis by Th35; end; end; hence thesis; end; theorem f|X is constant & f|Y is constant & X /\ Y meets dom f implies f|(X \/ Y) is constant proof assume that A1: f|X is constant and A2: f|Y is constant and A3: X /\ Y /\ dom f <> {}; consider d1 such that A4: for c st c in X /\ dom f holds f/.c = d1 by A1,Th35; set x = the Element of X /\ Y /\ dom f; A5: x in X /\ Y by A3,XBOOLE_0:def 4; A6: x in dom f by A3,XBOOLE_0:def 4; then reconsider x as Element of C; x in Y by A5,XBOOLE_0:def 4; then A7: x in Y /\ dom f by A6,XBOOLE_0:def 4; consider d2 such that A8: for c st c in Y /\ dom f holds f/.c = d2 by A2,Th35; x in X by A5,XBOOLE_0:def 4; then x in X /\ dom f by A6,XBOOLE_0:def 4; then f/.x = d1 by A4; then A9: d1 = d2 by A8,A7; take d1; let c; assume A10: c in dom(f|(X \/ Y)); then A11: c in (X \/ Y) /\ dom f by RELAT_1:61; then A12: c in dom f by XBOOLE_0:def 4; A13: c in X \/ Y by A11,XBOOLE_0:def 4; now per cases by A13,XBOOLE_0:def 3; suppose c in X; then c in X /\ dom f by A12,XBOOLE_0:def 4; hence f/.c = d1 by A4; end; suppose c in Y; then c in Y /\ dom f by A12,XBOOLE_0:def 4; hence f/.c = d1 by A8,A9; end; end; then (f|(X \/ Y))/.c = d1 by A11,Th16; hence thesis by A10,PARTFUN1:def 6; end; theorem f|Y is constant implies f|X|Y is constant proof assume f|Y is constant; then consider d such that A1: for c st c in Y /\ dom f holds f/.c = d by Th35; take d; let c; assume A2: c in dom (f|X|Y); then A3: c in Y /\ dom (f|X) by RELAT_1:61; then A4: c in Y by XBOOLE_0:def 4; A5: c in dom (f|X) by A3,XBOOLE_0:def 4; then c in dom f /\ X by RELAT_1:61; then c in dom f by XBOOLE_0:def 4; then c in Y /\ dom f by A4,XBOOLE_0:def 4; then f/.c = d by A1; then (f|X)/.c = d by A5,Th15; then (f|X|Y)/.c = d by A3,Th16; hence thesis by A2,PARTFUN1:def 6; end; theorem (SC --> d)|SC is constant proof take d; let c; assume A1: c in dom((SC --> d)|SC); then A2: c in SC /\ dom (SC --> d) by RELAT_1:61; then c in SC by XBOOLE_0:def 4; then (SC --> d)/.c = d by Th29; then ((SC --> d)|SC)/.c = d by A2,Th16; hence thesis by A1,PARTFUN1:def 6; end; theorem dom f c= dom g & (for c st c in dom f holds f/.c = g/.c) implies f c= g proof assume that A1: dom f c= dom g and A2: for c st c in dom f holds f/.c = g/.c; now let x; assume A3: x in dom f; then reconsider x1=x as Element of C; f/.x1 = g/.x1 by A2,A3; then (f qua Function).x = g/.x1 by A3,PARTFUN1:def 6; hence (f qua Function).x = (g qua Function).x by A1,A3,PARTFUN1:def 6; end; hence thesis by A1,GRFUNC_1:2; end; theorem Th46: c in dom f & d = f/.c iff [c,d] in f proof thus c in dom f & d = f/.c implies [c,d] in f proof assume that A1: c in dom f and A2: d = f/.c; d = (f qua Function).c by A1,A2,PARTFUN1:def 6; hence thesis by A1,FUNCT_1:1; end; assume [c,d] in f; then c in dom f & d = (f qua Function).c by FUNCT_1:1; hence thesis by PARTFUN1:def 6; end; theorem [c,e] in (s*f) implies [c,f/.c] in f & [f/.c,e] in s proof assume A1: [c,e] in (s*f); then A2: [(f qua Function).c,e] in s by GRFUNC_1:4; A3: [c,(f qua Function).c] in f by A1,GRFUNC_1:4; then c in dom f by FUNCT_1:1; hence thesis by A3,A2,PARTFUN1:def 6; end; theorem f = {[c,d]} implies f/.c = d proof assume A1: f = {[c,d]}; then [c,d] in f by TARSKI:def 1; then A2: c in dom f by FUNCT_1:1; (f qua Function).c = d by A1,GRFUNC_1:6; hence thesis by A2,PARTFUN1:def 6; end; theorem dom f = {c} implies f = {[c,f/.c]} proof assume dom f = {c}; then c in dom f & f = {[c,(f qua Function).c]} by GRFUNC_1:7,TARSKI:def 1; hence thesis by PARTFUN1:def 6; end; theorem f1 = f /\ g & c in dom f1 implies f1/.c = f/.c & f1/.c = g/.c proof assume that A1: f1 = f /\ g and A2: c in dom f1; (f1 qua Function).c = (g qua Function).c by A1,A2,GRFUNC_1:11; then A3: f1/.c = (g qua Function).c by A2,PARTFUN1:def 6; A4: [c,(f1 qua Function).c] in f1 by A2,FUNCT_1:1; then [c,(f1 qua Function).c] in f by A1,XBOOLE_0:def 4; then A5: c in dom f by FUNCT_1:1; [c,(f1 qua Function).c] in g by A1,A4,XBOOLE_0:def 4; then A6: c in dom g by FUNCT_1:1; (f1 qua Function).c = (f qua Function).c by A1,A2,GRFUNC_1:11; then f1/.c = (f qua Function).c by A2,PARTFUN1:def 6; hence thesis by A5,A6,A3,PARTFUN1:def 6; end; theorem c in dom f & f1 = f \/ g implies f1/.c = f/.c proof assume that A1: c in dom f and A2: f1 = f \/ g; [c,(f qua Function).c] in f by A1,FUNCT_1:1; then [c,(f qua Function).c] in f1 by A2,XBOOLE_0:def 3; then A3: c in dom f1 by FUNCT_1:1; (f1 qua Function).c = (f qua Function).c by A1,A2,GRFUNC_1:15; then f1/.c = (f qua Function).c by A3,PARTFUN1:def 6; hence thesis by A1,PARTFUN1:def 6; end; theorem c in dom g & f1 = f \/ g implies f1/.c = g/.c proof assume that A1: c in dom g and A2: f1 = f \/ g; [c,(g qua Function).c] in g by A1,FUNCT_1:1; then [c,(g qua Function).c] in f1 by A2,XBOOLE_0:def 3; then A3: c in dom f1 by FUNCT_1:1; (f1 qua Function).c = (g qua Function).c by A1,A2,GRFUNC_1:15; then f1/.c = (g qua Function).c by A3,PARTFUN1:def 6; hence thesis by A1,PARTFUN1:def 6; end; theorem c in dom f1 & f1 = f \/ g implies f1/.c = f/.c or f1/.c = g/.c proof assume that A1: c in dom f1 and A2: f1 = f \/ g; [c,f1/.c] in f1 by A1,Th46; then A3: [c,f1/.c] in f or [c,f1/.c] in g by A2,XBOOLE_0:def 3; now per cases by A3,FUNCT_1:1; suppose c in dom f; then [c,f/.c] in f by Th46; then [c,f/.c] in f1 by A2,XBOOLE_0:def 3; hence thesis by Th46; end; suppose c in dom g; then [c,g/.c] in g by Th46; then [c,g/.c] in f1 by A2,XBOOLE_0:def 3; hence thesis by Th46; end; end; hence thesis; end; theorem c in dom f & c in SC iff [c,f/.c] in (f|SC) proof thus c in dom f & c in SC implies [c,f/.c] in (f|SC) proof assume that A1: c in dom f and A2: c in SC; [c,(f qua Function).c] in (f|SC) by A1,A2,GRFUNC_1:22; hence thesis by A1,PARTFUN1:def 6; end; assume [c,f/.c] in (f|SC); then c in dom (f|SC) by FUNCT_1:1; then c in dom f /\ SC by RELAT_1:61; hence thesis by XBOOLE_0:def 4; end; theorem c in dom f & f/.c in SD iff [c,f/.c] in (SD|`f) proof thus c in dom f & f/.c in SD implies [c,f/.c] in (SD|`f) proof assume that A1: c in dom f and A2: f/.c in SD; (f qua Function).c in SD by A1,A2,PARTFUN1:def 6; then [c,(f qua Function).c] in (SD|`f) by A1,GRFUNC_1:24; hence thesis by A1,PARTFUN1:def 6; end; assume [c,f/.c] in (SD|`f); then c in dom (SD|`f) by FUNCT_1:1; then c in dom f & (f qua Function).c in SD by FUNCT_1:54; hence thesis by PARTFUN1:def 6; end; theorem c in f"SD iff [c,f/.c] in f & f/.c in SD proof thus c in f"SD implies [c,f/.c] in f & f/.c in SD proof assume A1: c in f"SD; then A2: (f qua Function).c in SD by GRFUNC_1:26; A3: [c,(f qua Function).c] in f by A1,GRFUNC_1:26; then c in dom f by FUNCT_1:1; hence thesis by A3,A2,PARTFUN1:def 6; end; assume that A4: [c,f/.c] in f and A5: f/.c in SD; c in dom f by A4,Th46; hence thesis by A5,Th26; end; theorem Th57: f|X is constant iff ex d st for c st c in X /\ dom f holds f.c = d proof hereby assume f|X is constant; then consider d such that A1: for c st c in X /\ dom f holds f/.c = d by Th35; take d; let c; assume A2: c in X /\ dom f; then c in dom f by XBOOLE_0:def 4; hence f.c = f/.c by PARTFUN1:def 6 .= d by A1,A2; end; given d such that A3: for c st c in X /\ dom f holds f.c = d; take d; let c; assume A4: c in dom(f|X); then A5: c in X /\ dom f by RELAT_1:61; then A6: c in dom f by XBOOLE_0:def 4; thus (f|X).c = (f|X)/.c by A4,PARTFUN1:def 6 .= f/.c by A5,Th16 .= f.c by A6,PARTFUN1:def 6 .= d by A3,A5; end; theorem f|X is constant iff for c1,c2 st c1 in X /\ dom f & c2 in X /\ dom f holds f.c1=f.c2 proof thus f|X is constant implies for c1,c2 st c1 in X /\ dom f & c2 in X /\ dom f holds f.c1=f.c2 proof assume f|X is constant; then consider d such that A1: for c st c in X /\ dom f holds f.c = d by Th57; let c1,c2; assume that A2: c1 in X /\ dom f and A3: c2 in X /\ dom f; f.c1 = d by A1,A2; hence thesis by A1,A3; end; assume A4: for c1,c2 st c1 in X /\ dom f & c2 in X /\ dom f holds f.c1=f.c2; now per cases; suppose A5: X /\ dom f = {}; now set d = the Element of D; take d; let c; thus c in X /\ dom f implies f.c = d by A5; end; hence thesis by Th57; end; suppose A6: X /\ dom f <> {}; set x = the Element of X /\ dom f; now let c; A7: x in dom f by A6,XBOOLE_0:def 4; assume c in X /\ dom f; hence f.c = f.x by A4,A7 .= f/.x by A7,PARTFUN1:def 6; end; hence thesis by Th57; end; end; hence thesis; end; theorem d in f.:X implies ex c st c in dom f & c in X & d = f.c proof assume d in f.:X; then consider x such that A1: x in dom f and A2: x in X & d = (f qua Function).x by FUNCT_1:def 6; reconsider x as Element of C by A1; take x; thus thesis by A1,A2; end; theorem f is one-to-one implies (d in rng f & c = (f").d iff c in dom f & d = f.c) proof A1: f" = (f qua Function)"; assume f is one-to-one; hence thesis by A1,FUNCT_1:32; end; theorem for Y for f,g be Y-valued Function st f c= g for x st x in dom f holds f/.x = g/.x proof let Y; let f,g be Y-valued Function; assume A1: f c= g; then A2: dom f c= dom g by GRFUNC_1:2; let x; assume A3: x in dom f; then f.x = g.x by A1,GRFUNC_1:2; then f/.x = (g qua Function).x by A3,PARTFUN1:def 6; hence thesis by A2,A3,PARTFUN1:def 6; end; begin reserve W,X,Y,Z for set, f,g for Function, a,x,y,z for set; definition let B be set; attr B is subset-closed means :Def1: for X,Y holds X in B & Y c= X implies Y in B; end; definition let B be set; attr B is Tarski means :Def2: B is subset-closed & (for X holds X in B implies bool X in B) & for X holds X c= B implies X,B are_equipotent or X in B; end; definition let A,B be set; pred B is_Tarski-Class_of A means :Def3: A in B & B is Tarski; end; definition let A be set; func Tarski-Class A -> set means :Def4: it is_Tarski-Class_of A & for D being set st D is_Tarski-Class_of A holds it c= D; existence proof consider Big being set such that A1: A in Big and A2: for X,Y holds X in Big & Y c= X implies Y in Big and A3: ( for X holds X in Big implies bool X in Big)& for X holds X c= Big implies X, Big are_equipotent or X in Big by ZFMISC_1:112; Big is subset-closed by A2,Def1; then A4: Big is Tarski by A3,Def2; defpred P[set] means $1 is_Tarski-Class_of A; consider Classes being set such that A5: X in Classes iff X in bool Big & P[X] from XBOOLE_0:sch 1; set IT = meet Classes; A6: Big in bool Big & Big is_Tarski-Class_of A by A1,A4,Def3,ZFMISC_1:def 1; then A7: Big in Classes by A5; A8: Classes <> {} by A5,A6; A9: now let X; assume X in Classes; then X is_Tarski-Class_of A by A5; hence A in X by Def3; end; then A10: A in IT by A8,SETFAM_1:def 1; take IT; thus A in IT by A8,A9,SETFAM_1:def 1; thus A11: X in IT & Y c= X implies Y in IT proof assume that A12: X in IT and A13: Y c= X; now let Z; assume A14: Z in Classes; then Z is_Tarski-Class_of A by A5; then Z is Tarski by Def3; then A15: Z is subset-closed by Def2; X in Z by A12,A14,SETFAM_1:def 1; hence Y in Z by A13,A15,Def1; end; hence thesis by A8,SETFAM_1:def 1; end; thus A16: X in IT implies bool X in IT proof assume A17: X in IT; now let Z; assume A18: Z in Classes; then Z is_Tarski-Class_of A by A5; then A19: Z is Tarski by Def3; X in Z by A17,A18,SETFAM_1:def 1; hence bool X in Z by A19,Def2; end; hence thesis by A8,SETFAM_1:def 1; end; thus A20: X c= IT implies X,IT are_equipotent or X in IT proof assume that A21: X c= IT and A22: not X,IT are_equipotent; now let Z; assume A23: Z in Classes; then Z is_Tarski-Class_of A by A5; then A24: Z is Tarski by Def3; A25: IT c= Z by A23,SETFAM_1:3; then X c= Z by A21,XBOOLE_1:1; then X,Z are_equipotent or X in Z by A24,Def2; hence X in Z by A21,A22,A25,CARD_1:24; end; hence thesis by A8,SETFAM_1:def 1; end; let D be set; assume A26: D is_Tarski-Class_of A; then A27: A in D by Def3; A28: D is Tarski by A26,Def3; then A29: D is subset-closed by Def2; A30: IT /\ D is_Tarski-Class_of A proof thus A in IT /\ D by A10,A27,XBOOLE_0:def 4; thus X in IT /\ D & Y c= X implies Y in IT /\ D proof assume that A31: X in IT /\ D and A32: Y c= X; A33: X in IT by A31,XBOOLE_0:def 4; A34: X in D by A31,XBOOLE_0:def 4; A35: Y in IT by A11,A32,A33; Y in D by A29,A32,A34,Def1; hence thesis by A35,XBOOLE_0:def 4; end; thus X in IT /\ D implies bool X in IT /\ D proof assume A36: X in IT /\ D; then A37: X in IT by XBOOLE_0:def 4; A38: X in D by A36,XBOOLE_0:def 4; A39: bool X in IT by A16,A37; bool X in D by A28,A38,Def2; hence thesis by A39,XBOOLE_0:def 4; end; let X such that A40: X c= IT /\ D and A41: not X,IT /\ D are_equipotent; A42: IT /\ D c= IT by XBOOLE_1:17; A43: IT /\ D c= D by XBOOLE_1:17; A44: not X,IT are_equipotent by A40,A41,A42,CARD_1:24; A45: X c= D & not X,D are_equipotent by A40,A41,A43,CARD_1:24,XBOOLE_1:1 ; A46: X in IT by A20,A40,A42,A44,XBOOLE_1:1; X in D by A28,A45,Def2; hence thesis by A46,XBOOLE_0:def 4; end; IT /\ D c= Big proof let x; assume x in IT /\ D; then x in IT by XBOOLE_0:def 4; hence thesis by A7,SETFAM_1:def 1; end; then IT /\ D in Classes by A5,A30; then A47: IT c= IT /\ D by SETFAM_1:3; IT /\ D c= D by XBOOLE_1:17; hence thesis by A47,XBOOLE_1:1; end; uniqueness proof let D1,D2 be set such that A48: ( D1 is_Tarski-Class_of A & for D being set st D is_Tarski-Class_of A holds D1 c= D )&( D2 is_Tarski-Class_of A & for D being set st D is_Tarski-Class_of A holds D2 c= D ); thus D1 c= D2 & D2 c= D1 by A48; end; end; registration let A be set; cluster Tarski-Class A -> non empty; coherence proof Tarski-Class A is_Tarski-Class_of A by Def4; hence thesis by Def3; end; end; theorem W is Tarski iff W is subset-closed & (for X st X in W holds bool X in W) & for X st X c= W & card X in card W holds X in W proof hereby assume A1: W is Tarski; hence W is subset-closed & for X st X in W holds bool X in W by Def2; let X; assume that A2: X c= W and A3: card X in card W; card X <> card W by A3; then not X,W are_equipotent by CARD_1:5; hence X in W by A1,A2,Def2; end; now assume A4: for X st X c= W & card X in card W holds X in W; let X; assume X c= W; then card X c= card W & not card X in card W or X in W by A4,CARD_1:11; then card X = card W or X in W by CARD_1:3; hence X,W are_equipotent or X in W by CARD_1:5; end; hence thesis by Def2; end; theorem Th2: X in Tarski-Class X proof Tarski-Class X is_Tarski-Class_of X by Def4; hence thesis by Def3; end; theorem Th3: Y in Tarski-Class X & Z c= Y implies Z in Tarski-Class X proof Tarski-Class X is_Tarski-Class_of X by Def4; then Tarski-Class X is Tarski by Def3; then Tarski-Class X is subset-closed by Def2; hence thesis by Def1; end; theorem Th4: Y in Tarski-Class X implies bool Y in Tarski-Class X proof Tarski-Class X is_Tarski-Class_of X by Def4; then Tarski-Class X is Tarski by Def3; hence thesis by Def2; end; theorem Th5: Y c= Tarski-Class X implies Y,Tarski-Class X are_equipotent or Y in Tarski-Class X proof Tarski-Class X is_Tarski-Class_of X by Def4; then Tarski-Class X is Tarski by Def3; hence thesis by Def2; end; theorem Y c= Tarski-Class X & card Y in card Tarski-Class X implies Y in Tarski-Class X proof assume that A1: Y c= Tarski-Class X and A2: card Y in card Tarski-Class X; card Y <> card Tarski-Class X by A2; then not Y,Tarski-Class X are_equipotent by CARD_1:5; hence thesis by A1,Th5; end; reserve u,v for Element of Tarski-Class(X), A,B,C for Ordinal, L for T-Sequence; definition let X,A; func Tarski-Class(X,A) means :Def5: ex L st it = last L & dom L = succ A & L.{} = { X } & (for C st succ C in succ A holds L.succ C = { u : ex v st v in L.C & u c= v } \/ { bool v : v in L.C } \/ bool(L.C) /\ Tarski-Class X) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = (union rng(L|C)) /\ Tarski-Class X; correctness proof deffunc C(Ordinal,set) = { u : ex v st v in $2 & u c= v } \/ { bool v : v in $2 } \/ bool $2 /\ Tarski-Class X; deffunc D(Ordinal,T-Sequence) = (union rng $2) /\ Tarski-Class X; thus (ex x,L st x = last L & dom L = succ A & L.{} = {X} & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) ) & for x1,x2 being set st (ex L st x1 = last L & dom L = succ A & L.{} = {X} & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) ) & (ex L st x2 = last L & dom L = succ A & L.{} = {X} & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) ) holds x1 = x2 from ORDINAL2:sch 7; end; end; Lm1: now let X; deffunc F(Ordinal) = Tarski-Class(X,$1); deffunc C(Ordinal,set) = { u : ex v st v in $2 & u c= v } \/ { bool v : v in $2 } \/ bool $2 /\ Tarski-Class X; deffunc D(Ordinal,T-Sequence) = (union rng $2) /\ Tarski-Class X; A1: for A,x holds x = F(A) iff ex L st x = last L & dom L = succ A & L.{} = { X } & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) by Def5; thus F({}) = { X } from ORDINAL2:sch 8(A1); thus for A holds F(succ A) = C(A,F(A)) from ORDINAL2:sch 9(A1); thus A <> {} & A is limit_ordinal & dom L = A & (for B st B in A holds L.B = Tarski-Class(X,B)) implies Tarski-Class(X,A) = (union rng L) /\ Tarski-Class X proof assume that A2: A <> {} & A is limit_ordinal and A3: dom L = A and A4: for B st B in A holds L.B = F(B); thus F(A) = D(A,L) from ORDINAL2:sch 10(A1,A2,A3,A4); end; end; definition let X,A; redefine func Tarski-Class(X,A) -> Subset of Tarski-Class X; coherence proof defpred P[Ordinal] means Tarski-Class(X,$1) is Subset of Tarski-Class X; { X } c= Tarski-Class X proof let x; assume x in { X }; then x = X by TARSKI:def 1; hence thesis by Th2; end; then A1: P[{}] by Lm1; A2: P[B] implies P[succ B] proof assume Tarski-Class(X,B) is Subset of Tarski-Class X; then reconsider S = Tarski-Class(X,B) as Subset of Tarski-Class X; set Y = Tarski-Class(X,succ B); Y c= Tarski-Class X proof let x; assume x in Y; then x in { u : ex v st v in S & u c= v } \/ { bool v : v in S } \/ bool S /\ Tarski-Class X by Lm1; then A3: x in { u : ex v st v in S & u c= v } \/ { bool v : v in S } or x in bool S /\ Tarski-Class X by XBOOLE_0:def 3; A4: now assume x in { u : ex v st v in S & u c= v }; then ex u st x = u & ex v st v in S & u c= v; hence thesis; end; now assume x in { bool v : v in S }; then ex v st x = bool v & v in S; hence thesis by Th4; end; hence thesis by A3,A4,XBOOLE_0:def 3,def 4; end; hence thesis; end; A5: for B st B <> {} & B is limit_ordinal & for C st C in B holds P[C] holds P[B] proof let B such that A6: B <> {} & B is limit_ordinal and for C st C in B holds Tarski-Class(X,C) is Subset of Tarski-Class X; deffunc f(Ordinal) = Tarski-Class(X,$1); consider L such that A7: dom L = B & for C st C in B holds L.C = f(C) from ORDINAL2:sch 2; Tarski-Class(X,B) = (union rng L) /\ Tarski-Class X by A6,A7,Lm1; hence thesis by XBOOLE_1:17; end; for A holds P[A] from ORDINAL2:sch 1(A1,A2,A5); hence thesis; end; end; theorem Tarski-Class(X,{}) = { X } by Lm1; theorem Tarski-Class(X,succ A) = { u : ex v st v in Tarski-Class(X,A) & u c= v } \/ { bool v : v in Tarski-Class(X,A) } \/ bool Tarski-Class(X,A) /\ Tarski-Class X by Lm1; theorem Th9: A <> {} & A is limit_ordinal implies Tarski-Class(X,A) = { u : ex B st B in A & u in Tarski-Class(X,B) } proof assume A1: A <> {} & A is limit_ordinal; deffunc f(Ordinal) = Tarski-Class(X,$1); consider L such that A2: dom L = A & for B st B in A holds L.B = f(B) from ORDINAL2:sch 2; A3: Tarski-Class(X,A) = (union rng L) /\ Tarski-Class X by A1,A2,Lm1; thus Tarski-Class(X,A) c= { u : ex B st B in A & u in Tarski-Class(X,B) } proof let x; assume x in Tarski-Class(X,A); then x in union rng L by A3,XBOOLE_0:def 4; then consider Y such that A4: x in Y and A5: Y in rng L by TARSKI:def 4; consider y such that A6: y in dom L and A7: Y = L.y by A5,FUNCT_1:def 3; reconsider y as Ordinal by A6; Y = Tarski-Class(X,y) by A2,A6,A7; hence thesis by A2,A4,A6; end; let x; assume x in { u : ex B st B in A & u in Tarski-Class(X,B) }; then consider u such that A8: x = u and A9: ex B st B in A & u in Tarski-Class(X,B); consider B such that A10: B in A and A11: u in Tarski-Class(X,B) by A9; L.B = Tarski-Class(X,B) by A2,A10; then Tarski-Class(X,B) in rng L by A2,A10,FUNCT_1:def 3; then u in union rng L by A11,TARSKI:def 4; hence thesis by A3,A8,XBOOLE_0:def 4; end; theorem Th10: Y in Tarski-Class(X,succ A) iff Y c= Tarski-Class(X,A) & Y in Tarski-Class X or ex Z st Z in Tarski-Class(X,A) & (Y c= Z or Y = bool Z) proof set T1 = { u : ex v st v in Tarski-Class(X,A) & u c= v }; set T2 = { bool v : v in Tarski-Class(X,A) }; set T3 = bool Tarski-Class(X,A) /\ Tarski-Class X; A1: Tarski-Class(X,succ A) = T1 \/ T2 \/ T3 by Lm1; thus Y in Tarski-Class(X,succ A) implies Y c= Tarski-Class(X,A) & Y in Tarski-Class X or ex Z st Z in Tarski-Class(X,A) & (Y c= Z or Y = bool Z) proof assume Y in Tarski-Class(X,succ A); then A2: Y in T1 \/ T2 or Y in T3 by A1,XBOOLE_0:def 3; A3: now assume Y in T1; then ex u st Y = u & ex v st v in Tarski-Class(X,A) & u c= v; hence ex Z st Z in Tarski-Class(X,A) & (Y c= Z or Y = bool Z); end; A4: now assume Y in T2; then ex v st Y = bool v & v in Tarski-Class(X,A); hence ex Z st Z in Tarski-Class(X,A) & (Y c= Z or Y = bool Z); end; Y in T3 implies thesis by XBOOLE_0:def 4; hence thesis by A2,A3,A4,XBOOLE_0:def 3; end; assume A5: Y c= Tarski-Class(X,A) & Y in Tarski-Class X or ex Z st Z in Tarski-Class(X,A) & (Y c= Z or Y = bool Z); A6: now assume Y c= Tarski-Class(X,A) & Y in Tarski-Class X; then Y in T3 by XBOOLE_0:def 4; hence thesis by A1,XBOOLE_0:def 3; end; now given Z such that A7: Z in Tarski-Class(X,A) and A8: Y c= Z or Y = bool Z; reconsider Z as Element of Tarski-Class X by A7; reconsider y = Y as Element of Tarski-Class X by A7,A8,Th3,Th4; A9: now assume Y c= Z; then y in T1 by A7; then Y in T1 \/ T2 by XBOOLE_0:def 3; hence thesis by A1,XBOOLE_0:def 3; end; now assume Y = bool Z; then y in T2 by A7; then Y in T1 \/ T2 by XBOOLE_0:def 3; hence thesis by A1,XBOOLE_0:def 3; end; hence thesis by A8,A9; end; hence thesis by A5,A6; end; theorem Y c= Z & Z in Tarski-Class(X,A) implies Y in Tarski-Class(X,succ A) by Th10; theorem Y in Tarski-Class(X,A) implies bool Y in Tarski-Class(X,succ A) by Th10; theorem Th13: A <> {} & A is limit_ordinal implies (x in Tarski-Class(X,A) iff ex B st B in A & x in Tarski-Class(X,B)) proof assume A1: A <> {} & A is limit_ordinal; then A2: Tarski-Class(X,A) = { u : ex B st B in A & u in Tarski-Class(X,B) } by Th9; thus x in Tarski-Class(X,A) implies ex B st B in A & x in Tarski-Class(X,B) proof assume x in Tarski-Class(X,A); then ex u st x = u & ex B st B in A & u in Tarski-Class(X,B) by A2; hence thesis; end; given B such that A3: B in A and A4: x in Tarski-Class(X,B); reconsider u = x as Element of Tarski-Class X by A4; u in { v : ex B st B in A & v in Tarski-Class(X,B) } by A3,A4; hence thesis by A1,Th9; end; theorem A <> {} & A is limit_ordinal & Y in Tarski-Class(X,A) & (Z c= Y or Z = bool Y) implies Z in Tarski-Class(X,A) proof assume that A1: A <> {} and A2: A is limit_ordinal and A3: Y in Tarski-Class(X,A); consider B such that A4: B in A and A5: Y in Tarski-Class(X,B) by A1,A2,A3,Th13; A6: bool Y in Tarski-Class(X,succ B) by A5,Th10; A7: Z c= Y implies Z in Tarski-Class(X,succ B) by A5,Th10; A8: succ B in A by A2,A4,ORDINAL1:28; assume Z c= Y or Z = bool Y; hence thesis by A2,A6,A7,A8,Th13; end; theorem Th15: Tarski-Class(X,A) c= Tarski-Class(X,succ A) proof let x; assume x in Tarski-Class(X,A); then x in { u : ex v st v in Tarski-Class(X,A) & u c= v }; then A1: x in { u : ex v st v in Tarski-Class(X,A) & u c= v } \/ { bool v : v in Tarski-Class(X,A) } by XBOOLE_0:def 3; Tarski-Class (X,succ A) = { u : ex v st v in Tarski-Class(X,A) & u c= v } \/ { bool v : v in Tarski-Class(X,A) } \/ bool Tarski-Class(X,A) /\ Tarski-Class X by Lm1; hence thesis by A1,XBOOLE_0:def 3; end; theorem Th16: A c= B implies Tarski-Class(X,A) c= Tarski-Class(X,B) proof defpred OnP[Ordinal] means A c= $1 implies Tarski-Class(X,A) c= Tarski-Class(X,$1); A1: for B st for C st C in B holds OnP[C] holds OnP[B] proof let B such that A2: for C st C in B holds OnP[C] and A3: A c= B; let x; assume A4: x in Tarski-Class(X,A); now assume A5: A <> B; then A c< B by A3,XBOOLE_0:def 8; then A6: A in B by ORDINAL1:11; A7: B <> {} by A3,A5; A8: now given C such that A9: B = succ C; A c= C & C in B by A6,A9,ORDINAL1:22; then A10: Tarski-Class(X,A) c= Tarski-Class(X,C) by A2; Tarski-Class(X,C) c= Tarski-Class(X,B) by A9,Th15; then Tarski-Class(X,A) c= Tarski-Class(X,B) by A10,XBOOLE_1:1; hence thesis by A4; end; now assume for C holds B <> succ C; then B is limit_ordinal by ORDINAL1:29; then Tarski-Class(X,B) = { v : ex C st C in B & v in Tarski-Class(X,C) } by A7,Th9; hence thesis by A4,A6; end; hence thesis by A8; end; hence thesis by A4; end; for B holds OnP[B] from ORDINAL1:sch 2(A1); hence thesis; end; theorem Th17: ex A st Tarski-Class(X,A) = Tarski-Class(X,succ A) proof assume A1: for A holds Tarski-Class(X,A) <> Tarski-Class(X,succ A); defpred P[set] means ex A st $1 in Tarski-Class(X,A); consider Z such that A2: x in Z iff x in Tarski-Class X & P[x] from XBOOLE_0:sch 1; defpred P[set,set] means ex A st $2 = A & $1 in Tarski-Class(X,succ A) & not $1 in Tarski-Class(X,A); A3: for x,y,z st P[x,y] & P[x,z] holds y = z proof let x,y,z; given A such that A4: y = A and A5: x in Tarski-Class(X,succ A) and A6: not x in Tarski-Class(X,A); given B such that A7: z = B and A8: x in Tarski-Class(X,succ B) and A9: not x in Tarski-Class(X,B); assume A10: y <> z; A c= B or B c= A; then A11: A c< B or B c< A by A4,A7,A10,XBOOLE_0:def 8; now assume A c< B; then A in B by ORDINAL1:11; then succ A c= B by ORDINAL1:21; then Tarski-Class(X,succ A) c= Tarski-Class(X,B) by Th16; hence contradiction by A5,A9; end; then B in A by A11,ORDINAL1:11; then succ B c= A by ORDINAL1:21; then Tarski-Class(X,succ B) c= Tarski-Class(X,A) by Th16; hence contradiction by A6,A8; end; consider Y such that A12: x in Y iff ex y st y in Z & P[y,x] from TARSKI:sch 1(A3); now let A; A13: Tarski-Class(X,A) <> Tarski-Class(X,succ A) by A1; A14: Tarski-Class(X,A) c= Tarski-Class(X,succ A) by Th15; consider x such that A15: not (x in Tarski-Class(X,A) iff x in Tarski-Class(X,succ A)) by A13, TARSKI:1; x in Z by A2,A15; hence A in Y by A12,A14,A15; end; hence contradiction by ORDINAL1:26; end; theorem Th18: Tarski-Class(X,A) = Tarski-Class(X,succ A) implies Tarski-Class(X,A) = Tarski-Class X proof assume A1: Tarski-Class(X,A) = Tarski-Class(X,succ A); {} c= A; then A2: Tarski-Class(X,{}) c= Tarski-Class(X,A) by Th16; A3: Tarski-Class(X,{}) = { X } & X in { X } by Lm1,TARSKI:def 1; Tarski-Class(X,A) is_Tarski-Class_of X proof thus X in Tarski-Class(X,A) by A2,A3; A4: Tarski-Class(X,succ A) = { u : ex v st v in Tarski-Class(X,A) & u c= v } \/ { bool v : v in Tarski-Class(X,A) } \/ bool Tarski-Class(X,A) /\ Tarski-Class X by Lm1; Tarski-Class X is_Tarski-Class_of X by Def4; then A5: Tarski-Class X is Tarski by Def3; thus for Z,Y being set st Z in Tarski-Class(X,A) & Y c= Z holds Y in Tarski-Class(X,A) proof let Z, Y be set; assume A6: Z in Tarski-Class(X,A) & Y c= Z; Tarski-Class X is_Tarski-Class_of X by Def4; then Tarski-Class X is Tarski by Def3; then Tarski-Class X is subset-closed by Def2; then reconsider y = Y as Element of Tarski-Class X by A6,Def1; ex v st v in Tarski-Class(X,A) & y c= v by A6; then Y in { u : ex v st v in Tarski-Class(X,A) & u c= v }; then Y in { u : ex v st v in Tarski-Class(X,A) & u c= v } \/ { bool v : v in Tarski-Class(X,A) } by XBOOLE_0:def 3; hence thesis by A1,A4,XBOOLE_0:def 3; end; thus Y in Tarski-Class(X,A) implies bool Y in Tarski-Class(X,A) proof assume Y in Tarski-Class(X,A); then bool Y in { bool u : u in Tarski-Class(X,A) }; then bool Y in { u : ex v st v in Tarski-Class(X,A) & u c= v } \/ { bool v : v in Tarski-Class(X,A) } by XBOOLE_0:def 3; hence thesis by A1,A4,XBOOLE_0:def 3; end; let Y; assume that A7: Y c= Tarski-Class(X,A) and A8: not Y,Tarski-Class(X,A) are_equipotent; Y c= Tarski-Class X by A7,XBOOLE_1:1; then Y,Tarski-Class X are_equipotent or Y in Tarski-Class X by A5,Def2; hence thesis by A1,A7,A8,Th10,CARD_1:24; end; hence Tarski-Class(X,A) c= Tarski-Class X & Tarski-Class X c= Tarski-Class(X,A) by Def4; end; theorem Th19: ex A st Tarski-Class(X,A) = Tarski-Class X proof consider A such that A1: Tarski-Class(X,A) = Tarski-Class(X,succ A) by Th17; take A; thus thesis by A1,Th18; end; theorem ex A st Tarski-Class(X,A) = Tarski-Class X & for B st B in A holds Tarski-Class(X,B) <> Tarski-Class X proof defpred P[Ordinal] means Tarski-Class(X,$1) = Tarski-Class X; A1: ex A st P[A] by Th19; consider A such that A2: P[A] & for B st P[B] holds A c= B from ORDINAL1:sch 1(A1); take A; thus Tarski-Class(X,A) = Tarski-Class X by A2; let B; assume B in A; hence thesis by A2,ORDINAL1:5; end; theorem Y <> X & Y in Tarski-Class X implies ex A st not Y in Tarski-Class(X,A) & Y in Tarski-Class(X,succ A) proof assume that A1: Y <> X and A2: Y in Tarski-Class X; defpred P[Ordinal] means Y in Tarski-Class(X,$1); ex A st Tarski-Class(X,A) = Tarski-Class X by Th19; then A3: ex A st P[A] by A2; consider A such that A4: P[A] & for B st P[B] holds A c= B from ORDINAL1:sch 1(A3); A5: not Y in { X } by A1,TARSKI:def 1; A6: Tarski-Class(X,{}) = { X } by Lm1; now assume A is limit_ordinal; then ex B st B in A & Y in Tarski-Class(X,B) by A4,A5,A6,Th13; hence contradiction by A4,ORDINAL1:5; end; then consider B such that A7: A = succ B by ORDINAL1:29; take B; not A c= B by A7,ORDINAL1:5,6; hence thesis by A4,A7; end; theorem Th22: X is epsilon-transitive implies for A st A <> {} holds Tarski-Class(X,A) is epsilon-transitive proof assume A1: Y in X implies Y c= X; defpred OnP[Ordinal] means $1 <> {} implies Tarski-Class(X,$1) is epsilon-transitive; A2: for A st for B st B in A holds OnP[B] holds OnP[A] proof let A such that A3: for B st B in A holds OnP[B] and A4: A <> {}; let Y such that A5: Y in Tarski-Class(X,A); A6: now given B such that A7: A = succ B; B in A by A7,ORDINAL1:6; then A8: B c= A by ORDINAL1:def 2; A9: OnP[B] by A3,A7,ORDINAL1:6; A10: Tarski-Class(X,B) c= Tarski-Class(X,A) by A8,Th16; now assume not Y c= Tarski-Class(X,B); then consider Z such that A11: Z in Tarski-Class(X,B) and A12: Y c= Z or Y = bool Z by A5,A7,Th10; A13: now assume A14: Y = bool Z; thus thesis proof let x; assume x in Y; hence thesis by A7,A11,A14,Th10; end; end; now assume A15: Y c= Z; thus thesis proof let x; assume A16: x in Y; then A17: x in Z by A15; A18: now assume B = {}; then Tarski-Class(X,B) = { X } by Lm1; then A19: Z = X by A11,TARSKI:def 1; then x c= X by A1,A15,A16; hence thesis by A7,A11,A19,Th10; end; now assume B <> {}; then Z c= Tarski-Class(X,B) by A9,A11,ORDINAL1:def 2; then x in Tarski-Class(X,B) by A17; hence thesis by A10; end; hence thesis by A18; end; end; hence thesis by A12,A13; end; hence thesis by A10,XBOOLE_1:1; end; now assume A20: for B holds A <> succ B; then A is limit_ordinal by ORDINAL1:29; then consider B such that A21: B in A and A22: Y in Tarski-Class(X,B) by A4,A5,Th13; A23: succ B c= A by A21,ORDINAL1:21; A24: succ B <> A by A20; A25: Tarski-Class(X,B) c= Tarski-Class(X,succ B) by Th15; A26: succ B c< A by A23,A24,XBOOLE_0:def 8; A27: Tarski-Class(X,succ B) c= Tarski-Class(X,A) by A23,Th16; Tarski-Class(X,succ B) is epsilon-transitive by A3,A26,ORDINAL1:11; then Y c= Tarski-Class(X,succ B) by A22,A25,ORDINAL1:def 2; hence thesis by A27,XBOOLE_1:1; end; hence thesis by A6; end; thus for A holds OnP[A] from ORDINAL1:sch 2(A2); end; theorem Th23: X is epsilon-transitive implies Tarski-Class X is epsilon-transitive proof consider A such that A1: Tarski-Class(X,A) = Tarski-Class X by Th19; Tarski-Class(X,A) c= Tarski-Class(X,succ A) by Th15; then A2: Tarski-Class(X,A) = Tarski-Class(X,succ A) by A1,XBOOLE_0:def 10; assume X is epsilon-transitive; hence thesis by A1,A2,Th22; end; theorem Th24: Y in Tarski-Class X implies card Y in card Tarski-Class X proof assume A1: Y in Tarski-Class X; bool Y c= Tarski-Class X proof let x; assume x in bool Y; hence thesis by A1,Th3; end; then card Y in card bool Y & card bool Y c= card Tarski-Class X by CARD_1:11,14; hence thesis; end; theorem Th25: Y in Tarski-Class X implies not Y,Tarski-Class X are_equipotent proof assume Y in Tarski-Class X; then card Y in card Tarski-Class X by Th24; then card Y <> card Tarski-Class X; hence thesis by CARD_1:5; end; theorem Th26: x in Tarski-Class X & y in Tarski-Class X implies {x} in Tarski-Class X & {x,y} in Tarski-Class X proof assume that A1: x in Tarski-Class X and A2: y in Tarski-Class X; bool x in Tarski-Class X by A1,Th4; thus then A3: {x} in Tarski-Class X by Th3,ZFMISC_1:68; bool {x} = {{},{x}} by ZFMISC_1:24; then A4: not {{},{x}},Tarski-Class X are_equipotent by A3,Th4,Th25; now assume A5: x <> y; {{},{x}},{x,y} are_equipotent proof defpred C[set] means $1 = {}; deffunc f(set) = x; deffunc g(set) = y; consider f such that A6: dom f = {{},{x}} & for z st z in {{},{x}} holds (C[z] implies f.z = f(z)) & (not C[z] implies f.z = g(z)) from PARTFUN1:sch 1; take f; thus f is one-to-one proof let x1,x2 be set; assume that A7: x1 in dom f and A8: x2 in dom f; A9: x2 = {} or x2 = {x} by A6,A8,TARSKI:def 2; A10: x1 = {} implies f.x1 = x by A6,A7; x1 <> {} implies f.x1 = y by A6,A7; hence thesis by A5,A6,A7,A8,A9,A10,TARSKI:def 2; end; thus dom f = {{},{x}} by A6; thus rng f c= {x,y} proof let z; assume z in rng f; then ex u being set st u in dom f & z = f.u by FUNCT_1:def 3; then z = x or z = y by A6; hence thesis by TARSKI:def 2; end; let z; assume z in {x,y}; then A11: z = x or z = y by TARSKI:def 2; A12: {} in dom f by A6,TARSKI:def 2; A13: {x} in dom f by A6,TARSKI:def 2; A14: f.{} = x by A6,A12; f.{x} = y by A6,A13; hence thesis by A11,A12,A13,A14,FUNCT_1:def 3; end; then A15: not {x,y},Tarski-Class X are_equipotent by A4,WELLORD2:15; {x,y} c= Tarski-Class X by A1,A2,ZFMISC_1:32; hence thesis by A15,Th5; end; hence thesis by A3,ENUMSET1:29; end; theorem Th27: x in Tarski-Class X & y in Tarski-Class X implies [x,y] in Tarski-Class X proof assume x in Tarski-Class X & y in Tarski-Class X; then {x,y} in Tarski-Class X & {x} in Tarski-Class X by Th26; hence thesis by Th26; end; theorem Y c= Tarski-Class X & Z c= Tarski-Class X implies [:Y,Z:] c= Tarski-Class X proof assume A1: Y c= Tarski-Class X & Z c= Tarski-Class X; let x,y; assume [x,y] in [:Y,Z:]; then x in Y & y in Z by ZFMISC_1:87; hence thesis by A1,Th27; end; definition let A; func Rank(A) means :Def6: ex L st it = last L & dom L = succ A & L.{} = {} & (for C st succ C in succ A holds L.succ C = bool(L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = union rng(L|C); correctness proof deffunc C(Ordinal,set) = bool $2; deffunc D(Ordinal,T-Sequence) = union rng $2; thus (ex x,L st x = last L & dom L = succ A & L.{} = {} & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) ) & for x1,x2 being set st (ex L st x1 = last L & dom L = succ A & L.{} = {} & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) ) & (ex L st x2 = last L & dom L = succ A & L.{} = {} & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) ) holds x1 = x2 from ORDINAL2:sch 7; end; end; deffunc F(Ordinal) = Rank $1; Lm2: now deffunc C(Ordinal,set) = bool $2; deffunc D(Ordinal,T-Sequence) = union rng $2; A1: for A,x holds x = F(A) iff ex L st x = last L & dom L = succ A & L.{} = {} & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) by Def6; thus F({}) = {} from ORDINAL2:sch 8(A1); thus for A holds F(succ A) = C(A,F(A)) from ORDINAL2:sch 9(A1); thus A <> {} & A is limit_ordinal & dom L = A & (for B st B in A holds L.B = Rank B) implies Rank A = union rng L proof assume that A2: A <> {} & A is limit_ordinal and A3: dom L = A and A4: for B st B in A holds L.B = F(B); thus F(A) = D(A,L) from ORDINAL2:sch 10(A1,A2,A3,A4); end; end; theorem Rank {} = {} by Lm2; theorem Rank succ A = bool Rank A by Lm2; theorem Th31: A <> {} & A is limit_ordinal implies for x holds x in Rank A iff ex B st B in A & x in Rank B proof assume A1: A <> {} & A is limit_ordinal; consider L such that A2: dom L = A & for B st B in A holds L.B = F(B) from ORDINAL2:sch 2; A3: Rank A = union rng L by A1,A2,Lm2; let x; thus x in Rank A implies ex B st B in A & x in Rank B proof assume x in Rank A; then consider Y such that A4: x in Y and A5: Y in rng L by A3,TARSKI:def 4; consider y such that A6: y in dom L and A7: Y = L.y by A5,FUNCT_1:def 3; reconsider y as Ordinal by A6; take y; thus thesis by A2,A4,A6,A7; end; given B such that A8: B in A and A9: x in Rank B; L.B = Rank B by A2,A8; then Rank B in rng L by A2,A8,FUNCT_1:def 3; hence thesis by A3,A9,TARSKI:def 4; end; theorem Th32: X c= Rank A iff X in Rank succ A proof thus X c= Rank A implies X in Rank succ A proof assume X c= Rank A; then X in bool Rank A; hence thesis by Lm2; end; assume X in Rank succ A; then X in bool Rank A by Lm2; hence thesis; end; registration let A; cluster Rank A -> epsilon-transitive; coherence proof defpred P[Ordinal] means X in Rank $1 implies X c= Rank $1; A1: for A st for B st B in A holds P[B] holds P[A] proof let A such that A2: for B st B in A holds P[B]; let X such that A3: X in Rank A; let x such that A4: x in X; A5: now assume A6: A is limit_ordinal; then consider B such that A7: B in A and A8: X in Rank B by A3,Lm2,Th31; X c= Rank B by A2,A7,A8; hence thesis by A4,A6,A7,Th31; end; now assume not A is limit_ordinal; then consider B such that A9: A = succ B by ORDINAL1:29; X c= Rank B by A3,A9,Th32; then x c= Rank B by A2,A4,A9,ORDINAL1:6; hence thesis by A9,Th32; end; hence thesis by A5; end; for A holds P[A] from ORDINAL1:sch 2(A1); hence P[A]; end; end; theorem Rank A c= Rank succ A proof Rank A in bool Rank A by ZFMISC_1:def 1; then Rank A in Rank succ A by Lm2; hence thesis by ORDINAL1:def 2; end; theorem Th34: union Rank A c= Rank A proof let x; assume x in union Rank A; then consider X such that A1: x in X and A2: X in Rank A by TARSKI:def 4; X c= Rank A by A2,ORDINAL1:def 2; hence thesis by A1; end; theorem X in Rank A implies union X in Rank A proof assume A1: X in Rank A; A2: now given B such that A3: A = succ B; X c= Rank B by A1,A3,Th32; then A4: union X c= union Rank B by ZFMISC_1:77; union Rank B c= Rank B by Th34; then union X c= Rank B by A4,XBOOLE_1:1; hence thesis by A3,Th32; end; now assume that A5: A <> {} and A6: for B holds A <> succ B; A7: A is limit_ordinal by A6,ORDINAL1:29; then consider B such that A8: B in A and A9: X in Rank B by A1,A5,Th31; X c= Rank B by A9,ORDINAL1:def 2; then A10: union X c= union Rank B by ZFMISC_1:77; union Rank B c= Rank B by Th34; then A11: union X c= Rank B by A10,XBOOLE_1:1; A12: succ B c= A by A8,ORDINAL1:21; succ B <> A by A6; then A13: succ B c< A by A12,XBOOLE_0:def 8; A14: union X in Rank succ B by A11,Th32; succ B in A by A13,ORDINAL1:11; hence thesis by A7,A14,Th31; end; hence thesis by A1,A2,Lm2; end; theorem Th36: A in B iff Rank A in Rank B proof defpred OnP[Ordinal,Ordinal] means $1 in $2 implies Rank $1 in Rank $2; A1: now let A; defpred P[Ordinal] means OnP[A,$1]; A2: for B st for C st C in B holds P[C] holds P[B] proof let B such that A3: for C st C in B holds OnP[A,C] and A4: A in B; A5: now given C such that A6: B = succ C; A7: A in C implies Rank A in Rank C by A3,A6,ORDINAL1:6; now assume A8: not A in C; A c= C & A <> C iff A c< C by XBOOLE_0:def 8; hence Rank A = Rank C by A4,A6,A8,ORDINAL1:11,22; end; then Rank A c= Rank C by A7,ORDINAL1:def 2; hence thesis by A6,Th32; end; now assume A9: for C holds B <> succ C; then A10: B is limit_ordinal by ORDINAL1:29; A11: B <> succ A by A9; succ A c= B by A4,ORDINAL1:21; then succ A c< B by A11,XBOOLE_0:def 8; then A12: succ A in B by ORDINAL1:11; Rank A in Rank succ A by Th32; hence thesis by A10,A12,Th31; end; hence thesis by A5; end; thus for B holds P[B] from ORDINAL1:sch 2(A2); end; hence OnP[A,B]; assume that A13: Rank A in Rank B and A14: not A in B; B in A or B = A by A14,ORDINAL1:14; hence contradiction by A1,A13; end; theorem Th37: A c= B iff Rank A c= Rank B proof thus A c= B implies Rank A c= Rank B proof A1: A c< B iff A c= B & A <> B by XBOOLE_0:def 8; assume A c= B; then A = B or A in B by A1,ORDINAL1:11; then Rank A = Rank B or Rank A in Rank B by Th36; hence thesis by ORDINAL1:def 2; end; assume that A2: Rank A c= Rank B and A3: not A c= B; B in A by A3,ORDINAL1:16; then Rank B in Rank A by Th36; hence contradiction by A2,ORDINAL1:5; end; theorem Th38: A c= Rank A proof defpred P[Ordinal] means $1 c= Rank $1; A1: P[{}] by XBOOLE_1:2; A2: P[B] implies P[succ B] proof assume B c= Rank B; then B in Rank succ B by Th32; then B c= Rank succ B & {B} c= Rank succ B by ORDINAL1:def 2,ZFMISC_1:31; hence thesis by XBOOLE_1:8; end; A3: for A st A <> {} & A is limit_ordinal & for B st B in A holds P[B] holds P[A] proof let A such that A <> {} and A4: A is limit_ordinal and A5: for B st B in A holds B c= Rank B; let x; assume A6: x in A; then reconsider B = x as Ordinal; A7: succ B in A by A4,A6,ORDINAL1:28; A8: B c= Rank B by A5,A6; A9: succ B c= A by A7,ORDINAL1:def 2; A10: B in Rank succ B by A8,Th32; Rank succ B c= Rank A by A9,Th37; hence thesis by A10; end; for B holds P[B] from ORDINAL2:sch 1(A1,A2,A3); hence thesis; end; theorem for A,X st X in Rank A holds not X,Rank A are_equipotent & card X in card Rank A proof defpred OnP[Ordinal] means for X st X in Rank $1 holds not X,Rank $1 are_equipotent; A1: for A st for B st B in A holds OnP[B] holds OnP[A] proof let A such that A2: for B st B in A holds OnP[B]; let X; assume A3: X in Rank A; A4: now given B such that A5: A = succ B; B in A by A5,ORDINAL1:6; then A6: B c= A by ORDINAL1:def 2; A7: Rank succ B = bool Rank B by Lm2; then A8: not Rank B,Rank A are_equipotent by A5,CARD_1:13; Rank B c= Rank A by A6,Th37; hence thesis by A3,A5,A7,A8,CARD_1:24; end; now assume that A9: A <> {} and A10: for B holds A <> succ B; A is limit_ordinal by A10,ORDINAL1:29; then consider B such that A11: B in A and A12: X in Rank B by A3,A9,Th31; A13: Rank B in Rank A by A11,Th36; A14: ( not X,Rank B are_equipotent)& X c= Rank B by A2,A11,A12,ORDINAL1:def 2; Rank B c= Rank A by A13,ORDINAL1:def 2; hence thesis by A14,CARD_1:24; end; hence thesis by A3,A4,Lm2; end; A15: for A holds OnP[A] from ORDINAL1:sch 2(A1); let A,X; assume A16: X in Rank A; then A17: X c= Rank A by ORDINAL1:def 2; A18: not X,Rank A are_equipotent by A15,A16; A19: card X c= card Rank A by A17,CARD_1:11; card X <> card Rank A by A18,CARD_1:5; hence thesis by A15,A16,A19,CARD_1:3; end; theorem X c= Rank A iff bool X c= Rank succ A proof thus X c= Rank A implies bool X c= Rank succ A proof assume A1: X c= Rank A; let x; assume x in bool X; then A2: x c= Rank A by A1,XBOOLE_1:1; Rank succ A = bool Rank A by Lm2; hence thesis by A2; end; assume A3: bool X c= Rank succ A; let x; assume x in X; then { x } c= X by ZFMISC_1:31; then A4: { x } in bool X; Rank succ A = bool Rank A & x in { x } by Lm2,TARSKI:def 1; hence thesis by A3,A4; end; theorem Th41: X c= Y & Y in Rank A implies X in Rank A proof assume that A1: X c= Y and A2: Y in Rank A; A3: now given B such that A4: A = succ B; A5: Rank succ B = bool Rank B by Lm2; then X c= Rank B by A1,A2,A4,XBOOLE_1:1; hence thesis by A4,A5; end; now assume for B holds A <> succ B; then A6: A is limit_ordinal by ORDINAL1:29; then consider B such that A7: B in A and A8: Y in Rank B by A2,Lm2,Th31; Y c= Rank B by A8,ORDINAL1:def 2; then A9: X c= Rank B by A1,XBOOLE_1:1; A10: bool Rank B = Rank succ B by Lm2; succ B in A by A6,A7,ORDINAL1:28; hence thesis by A6,A9,A10,Th31; end; hence thesis by A3; end; theorem Th42: X in Rank A iff bool X in Rank succ A proof thus X in Rank A implies bool X in Rank succ A proof assume A1: X in Rank A; bool X c= Rank A proof let x; assume x in bool X; hence thesis by A1,Th41; end; hence thesis by Th32; end; assume bool X in Rank succ A; then X in bool X & bool X c= Rank A by Th32,ZFMISC_1:def 1; hence thesis; end; theorem Th43: x in Rank A iff {x} in Rank succ A proof x in Rank A iff {x} c= Rank A by ZFMISC_1:31; hence thesis by Th32; end; theorem Th44: x in Rank A & y in Rank A iff {x,y} in Rank succ A proof x in Rank A & y in Rank A iff {x,y} c= Rank A by ZFMISC_1:32; hence thesis by Th32; end; theorem x in Rank A & y in Rank A iff [x,y] in Rank succ succ A proof A1: x in Rank A iff {x} in Rank succ A by Th43; x in Rank A & y in Rank A iff {x,y} in Rank succ A by Th44; hence thesis by A1,Th44; end; theorem Th46: X is epsilon-transitive & Rank A /\ Tarski-Class X = Rank succ A /\ Tarski-Class X implies Tarski-Class X c= Rank A proof assume that A1: X is epsilon-transitive and A2: Rank A /\ Tarski-Class X = Rank succ A /\ Tarski-Class X; given x such that A3: x in Tarski-Class X & not x in Rank A; x in (Tarski-Class X) \ Rank A by A3,XBOOLE_0:def 5; then consider Y such that A4: Y in (Tarski-Class X) \ Rank A and A5: not ex x st x in (Tarski-Class X) \ Rank A & x in Y by TARSKI:2; Tarski-Class X is epsilon-transitive by A1,Th23; then A6: Y c= Tarski-Class X by A4,ORDINAL1:def 2; Y c= Rank A proof let x; assume A7: x in Y; then not x in (Tarski-Class X) \ Rank A by A5; hence thesis by A6,A7,XBOOLE_0:def 5; end; then Y in Rank succ A by Th32; then A8: Y in Rank succ A /\ Tarski-Class X by A4,XBOOLE_0:def 4; not Y in Rank A by A4,XBOOLE_0:def 5; hence contradiction by A2,A8,XBOOLE_0:def 4; end; theorem Th47: X is epsilon-transitive implies ex A st Tarski-Class X c= Rank A proof assume A1: X is epsilon-transitive; assume A2: not Tarski-Class X c= Rank A; defpred P[set] means ex A st $1 in Rank A; consider Power being set such that A3: x in Power iff x in Tarski-Class X & P[x] from XBOOLE_0:sch 1; defpred P[set,set] means ex A st $2 = A & not $1 in Rank A & $1 in Rank succ A; A4: for x,y,z st P[x,y] & P[x,z] holds y = z proof let x,y,z; given A1 being Ordinal such that A5: y = A1 and A6: not x in Rank A1 and A7: x in Rank succ A1; given A2 being Ordinal such that A8: z = A2 and A9: not x in Rank A2 and A10: x in Rank succ A2; assume y <> z; then A1 in A2 or A2 in A1 by A5,A8,ORDINAL1:14; then A11: succ A1 c= A2 or succ A2 c= A1 by ORDINAL1:21; now assume succ A1 c= A2; then Rank succ A1 c= Rank A2 by Th37; hence contradiction by A7,A9; end; then Rank succ A2 c= Rank A1 by A11,Th37; hence contradiction by A6,A10; end; consider Y such that A12: x in Y iff ex y st y in Power & P[y,x] from TARSKI:sch 1(A4); now let A; Rank A /\ Tarski-Class X <> Rank succ A /\ Tarski-Class X by A1,A2,Th46; then consider y such that A13: not (y in Rank A /\ Tarski-Class X iff y in Rank succ A /\ Tarski-Class X) by TARSKI:1; A in succ A by ORDINAL1:6; then A c= succ A by ORDINAL1:def 2; then A14: Rank A c= Rank succ A by Th37; then Rank A /\ Tarski-Class X c= Rank succ A /\ Tarski-Class X by XBOOLE_1:26; then A15: y in Rank succ A by A13,XBOOLE_0:def 4; A16: y in Tarski-Class X by A13,XBOOLE_0:def 4; A17: not y in Rank A or not y in Tarski-Class X by A13,A14,XBOOLE_0:def 4; y in Power by A3,A15,A16; hence A in Y by A12,A13,A15,A17,XBOOLE_0:def 4; end; hence contradiction by ORDINAL1:26; end; theorem Th48: X is epsilon-transitive implies union X c= X proof assume A1: Y in X implies Y c= X; let x; assume x in union X; then consider Y such that A2: x in Y and A3: Y in X by TARSKI:def 4; Y c= X by A1,A3; hence thesis by A2; end; theorem Th49: X is epsilon-transitive & Y is epsilon-transitive implies X \/ Y is epsilon-transitive proof assume that A1: ( Z in X implies Z c= X) and A2: ( Z in Y implies Z c= Y); let Z; assume Z in X \/ Y; then Z in X or Z in Y by XBOOLE_0:def 3; then A3: Z c= X or Z c= Y by A1,A2; X c= X \/ Y & Y c= X \/ Y by XBOOLE_1:7; hence thesis by A3,XBOOLE_1:1; end; theorem X is epsilon-transitive & Y is epsilon-transitive implies X /\ Y is epsilon-transitive proof assume that A1: Z in X implies Z c= X and A2: Z in Y implies Z c= Y; let Z; assume A3: Z in X /\ Y; then A4: Z in X by XBOOLE_0:def 4; A5: Z in Y by A3,XBOOLE_0:def 4; A6: Z c= X by A1,A4; Z c= Y by A2,A5; hence thesis by A6,XBOOLE_1:19; end; reserve n for Element of omega; deffunc f(set,set) = union $2; definition let X; func the_transitive-closure_of X -> set means :Def7: x in it iff ex f,n st x in f.n & dom f = omega & f.0 = X & for k being Nat holds f.(succ k) = union(f.k); existence proof consider f such that A1: dom f = omega & f.0 = X & for n being Nat holds f.(succ n) = f(n,f.n) from ORDINAL2:sch 18; take UNI = union rng f; let x; thus x in UNI implies ex f,n st x in f.n & dom f = omega & f.0 = X & for k being Nat holds f.(succ k) = union(f.k) proof assume x in UNI; then consider Y such that A2: x in Y and A3: Y in rng f by TARSKI:def 4; consider y such that A4: y in dom f and A5: Y = f.y by A3,FUNCT_1:def 3; reconsider y as Element of omega by A1,A4; take f,y; thus thesis by A1,A2,A5; end; deffunc f(set,set) = union $2; given g,n such that A6: x in g.n and A7: dom g = omega and A8: g.0 = X and A9: for k being Nat holds g.(succ k) = f(k,g.k); A10: dom f = omega by A1; A11: f.0 = X by A1; A12: for n being Nat holds f.(succ n) = f(n,f.n) by A1; g = f from ORDINAL2:sch 20(A7,A8,A9,A10,A11,A12); then g.n in rng f by A1,FUNCT_1:def 3; hence thesis by A6,TARSKI:def 4; end; uniqueness proof defpred P[set] means ex f,n st $1 in f.n & dom f = omega & f.0 = X & for k being Nat holds f.(succ k) = union(f.k); let U1,U2 be set such that A13: x in U1 iff P[x] and A14: x in U2 iff P[x]; thus U1 = U2 from XBOOLE_0:sch 2(A13,A14); end; end; theorem Th51: the_transitive-closure_of X is epsilon-transitive proof let Y; assume Y in the_transitive-closure_of X; then consider f,n such that A1: Y in f.n and A2: dom f = omega & f.0 = X and A3: for k being Nat holds f.(succ k) = union(f.k) by Def7; A4: f.(succ n) = union(f.n) by A3; let x; assume x in Y; then A5: x in union(f.n) by A1,TARSKI:def 4; reconsider m = succ n as Element of omega by ORDINAL1:def 12; x in f.m by A4,A5; hence x in the_transitive-closure_of X by A2,A3,Def7; end; theorem Th52: X c= the_transitive-closure_of X proof let x such that A1: x in X; consider f such that A2: dom f = omega and A3: f.0 = X and A4: for n being Nat holds f.(succ n) = f(n,f.n) from ORDINAL2:sch 18; reconsider z = 0 as Element of omega by ORDINAL1:def 12; x in f.z by A1,A3; hence x in the_transitive-closure_of X by A2,A3,A4,Def7; end; theorem Th53: X c= Y & Y is epsilon-transitive implies the_transitive-closure_of X c= Y proof assume that A1: X c= Y and A2: Y is epsilon-transitive; let x; assume x in the_transitive-closure_of X; then consider f,n such that A3: x in f.n and dom f = omega and A4: f.0 = X and A5: for k being Nat holds f.(succ k) = union(f.k) by Def7; defpred P[Nat] means f.$1 c= Y; A6: P[0] by A1,A4; A7: for k being Nat st P[k] holds P[succ k] proof let k be Nat; assume f.k c= Y; then A8: union (f.k) c= union Y by ZFMISC_1:77; f.(succ k) = union (f.k) & union Y c= Y by A2,A5,Th48; hence thesis by A8,XBOOLE_1:1; end; P[n] from ORDINAL2:sch 17(A6,A7); then f.n c= Y; hence thesis by A3; end; theorem Th54: (for Z st X c= Z & Z is epsilon-transitive holds Y c= Z) & X c= Y & Y is epsilon-transitive implies the_transitive-closure_of X = Y proof assume A1: for Z st X c= Z & Z is epsilon-transitive holds Y c= Z; assume X c= Y & Y is epsilon-transitive; hence the_transitive-closure_of X c= Y by Th53; the_transitive-closure_of X is epsilon-transitive by Th51; hence thesis by A1,Th52; end; theorem Th55: X is epsilon-transitive implies the_transitive-closure_of X = X proof for Z st X c= Z & Z is epsilon-transitive holds X c= Z; hence thesis by Th54; end; theorem the_transitive-closure_of {} = {} by Th55; theorem the_transitive-closure_of A = A by Th55; theorem Th58: X c= Y implies the_transitive-closure_of X c= the_transitive-closure_of Y proof assume A1: X c= Y; Y c= the_transitive-closure_of Y by Th52; then X c= the_transitive-closure_of Y by A1,XBOOLE_1:1; hence thesis by Th51,Th53; end; theorem the_transitive-closure_of the_transitive-closure_of X = the_transitive-closure_of X by Th51,Th55; theorem the_transitive-closure_of (X \/ Y) = the_transitive-closure_of X \/ the_transitive-closure_of Y proof X c= the_transitive-closure_of X & Y c= the_transitive-closure_of Y by Th52; then A1: X \/ Y c= the_transitive-closure_of X \/ the_transitive-closure_of Y by XBOOLE_1:13; A2: the_transitive-closure_of X is epsilon-transitive & the_transitive-closure_of Y is epsilon-transitive by Th51; the_transitive-closure_of (X \/ Y) c= the_transitive-closure_of ( the_transitive-closure_of X \/ the_transitive-closure_of Y) by A1,Th58; hence the_transitive-closure_of (X \/ Y) c= the_transitive-closure_of X \/ the_transitive-closure_of Y by A2,Th49,Th55 ; the_transitive-closure_of X c= the_transitive-closure_of (X \/ Y) & the_transitive-closure_of Y c= the_transitive-closure_of (X \/ Y) by Th58, XBOOLE_1:7; hence thesis by XBOOLE_1:8; end; theorem the_transitive-closure_of (X /\ Y) c= the_transitive-closure_of X /\ the_transitive-closure_of Y proof the_transitive-closure_of (X /\ Y) c= the_transitive-closure_of X & the_transitive-closure_of (X /\ Y) c= the_transitive-closure_of Y by Th58, XBOOLE_1:17; hence thesis by XBOOLE_1:19; end; theorem Th62: ex A st X c= Rank A proof consider A such that A1: Tarski-Class the_transitive-closure_of X c= Rank A by Th47,Th51; take A; the_transitive-closure_of X in Tarski-Class the_transitive-closure_of X by Th2; then X in Tarski-Class the_transitive-closure_of X by Th3,Th52; hence thesis by A1,ORDINAL1:def 2; end; definition let X; func the_rank_of X -> Ordinal means :Def8: X c= Rank it & for B st X c= Rank B holds it c= B; existence proof defpred P[Ordinal] means X c= Rank $1; A1: ex A st P[A] by Th62; thus ex A st P[A] & for B st P[B] holds A c= B from ORDINAL1:sch 1( A1); end; uniqueness proof let A1,A2 be Ordinal such that A2: ( X c= Rank A1 & for B st X c= Rank B holds A1 c= B )&( X c= Rank A2 & for B st X c= Rank B holds A2 c= B ); thus A1 c= A2 & A2 c= A1 by A2; end; end; theorem Th63: the_rank_of bool X = succ the_rank_of X proof A1: X c= Rank the_rank_of X by Def8; A2: bool X c= Rank succ the_rank_of X proof let x; assume x in bool X; then A3: x c= Rank the_rank_of X by A1,XBOOLE_1:1; bool Rank the_rank_of X = Rank succ the_rank_of X by Lm2; hence thesis by A3; end; for A st bool X c= Rank A holds succ the_rank_of X c= A proof let A such that A4: bool X c= Rank A; defpred P[Ordinal] means X in Rank $1; A5: X in bool X by ZFMISC_1:def 1; then A6: ex A st P[A] by A4; consider B such that A7: P[B] & for C st P[C] holds B c= C from ORDINAL1:sch 1(A6); now assume for C holds B <> succ C; then B is limit_ordinal by ORDINAL1:29; then ex C st C in B & X in Rank C by A7,Lm2,Th31; hence contradiction by A7,ORDINAL1:5; end; then consider C such that A8: B = succ C; X c= Rank C by A7,A8,Th32; then the_rank_of X c= C by Def8; then A9: the_rank_of X in B by A8,ORDINAL1:22; B c= A by A4,A5,A7; hence thesis by A9,ORDINAL1:21; end; hence thesis by A2,Def8; end; theorem the_rank_of Rank A = A proof for B st Rank A c= Rank B holds A c= B by Th37; hence thesis by Def8; end; theorem Th65: X c= Rank A iff the_rank_of X c= A proof thus X c= Rank A implies the_rank_of X c= A by Def8; assume the_rank_of X c= A; then A1: Rank the_rank_of X c= Rank A by Th37; X c= Rank the_rank_of X by Def8; hence thesis by A1,XBOOLE_1:1; end; theorem Th66: X in Rank A iff the_rank_of X in A proof thus X in Rank A implies the_rank_of X in A proof assume X in Rank A; then bool X in Rank succ A by Th42; then A1: bool X c= Rank A by Th32; the_rank_of bool X = succ the_rank_of X by Th63; then A2: the_rank_of X in the_rank_of bool X by ORDINAL1:6; the_rank_of bool X c= A by A1,Def8; hence thesis by A2; end; assume the_rank_of X in A; then A3: succ the_rank_of X c= A by ORDINAL1:21; X c= Rank the_rank_of X by Def8; then A4: X in Rank succ the_rank_of X by Th32; Rank succ the_rank_of X c= Rank A by A3,Th37; hence thesis by A4; end; theorem X c= Y implies the_rank_of X c= the_rank_of Y proof assume A1: X c= Y; Y c= Rank the_rank_of Y by Def8; then X c= Rank the_rank_of Y by A1,XBOOLE_1:1; hence thesis by Def8; end; theorem Th68: X in Y implies the_rank_of X in the_rank_of Y proof assume A1: X in Y; Y c= Rank the_rank_of Y by Def8; hence thesis by A1,Th66; end; theorem Th69: the_rank_of X c= A iff for Y st Y in X holds the_rank_of Y in A proof set R = the_rank_of X; A1: X c= Rank R by Def8; thus the_rank_of X c= A implies for Y st Y in X holds the_rank_of Y in A proof assume A2: the_rank_of X c= A; let Y; assume Y in X; then A3: Y in Rank R by A1; Rank R c= Rank A by A2,Th37; hence thesis by A3,Th66; end; assume A4: for Y st Y in X holds the_rank_of Y in A; X c= Rank A proof let x; assume x in X; then the_rank_of x in A by A4; hence thesis by Th66; end; hence thesis by Def8; end; theorem Th70: A c= the_rank_of X iff for B st B in A ex Y st Y in X & B c= the_rank_of Y proof thus A c= the_rank_of X implies for B st B in A ex Y st Y in X & B c= the_rank_of Y proof assume A1: A c= the_rank_of X; let B; assume B in A; then not the_rank_of X c= B by A1,ORDINAL1:5; then not X c= Rank B by Def8; then A2: X \ Rank B <> {} by XBOOLE_1:37; set x = the Element of X \ Rank B; take x; A3: not x in Rank B by A2,XBOOLE_0:def 5; thus x in X by A2,XBOOLE_0:def 5; not the_rank_of x in B by A3,Th66; hence thesis by ORDINAL1:16; end; assume A4: for B st B in A ex Y st Y in X & B c= the_rank_of Y; let x; assume A5: x in A; then reconsider x as Ordinal; consider Y such that A6: Y in X and A7: x c= the_rank_of Y by A4,A5; the_rank_of Y in the_rank_of X by A6,Th68; hence thesis by A7,ORDINAL1:12; end; theorem the_rank_of X = {} iff X = {} proof thus the_rank_of X = {} implies X = {} proof assume the_rank_of X = {}; then X c= Rank {} by Def8; hence thesis by Lm2; end; assume X = {}; then for Y st Y in X holds the_rank_of Y in {}; hence the_rank_of X c= {} by Th69; thus {} c= the_rank_of X; end; theorem Th72: the_rank_of X = succ A implies ex Y st Y in X & the_rank_of Y = A proof assume A1: the_rank_of X = succ A; A in succ A by ORDINAL1:6; then consider Y such that A2: Y in X and A3: A c= the_rank_of Y by A1,Th70; take Y; the_rank_of Y in the_rank_of X by A2,Th68; then the_rank_of Y c= A by A1,ORDINAL1:22; hence thesis by A2,A3,XBOOLE_0:def 10; end; theorem the_rank_of A = A proof A c= Rank A by Th38; hence the_rank_of A c= A by Th65; defpred P[Ordinal] means $1 c= the_rank_of $1; A1: for A st for B st B in A holds P[B] holds P[A] proof let A such that A2: for B st B in A holds B c= the_rank_of B; now let B such that A3: B in A; reconsider Y = B as set; take Y; thus Y in A & B c= the_rank_of Y by A2,A3; end; hence thesis by Th70; end; P[B] from ORDINAL1:sch 2(A1); hence thesis; end; theorem the_rank_of Tarski-Class X <> {} & the_rank_of Tarski-Class X is limit_ordinal proof A1: Tarski-Class X c= Rank the_rank_of Tarski-Class X by Def8; thus the_rank_of Tarski-Class X <> {} proof assume the_rank_of Tarski-Class X = {}; then Tarski-Class X c= {} by Def8,Lm2; hence contradiction; end; assume not thesis; then consider A such that A2: the_rank_of Tarski-Class X = succ A by ORDINAL1:29; consider Y such that A3: Y in Tarski-Class X and A4: the_rank_of Y = A by A2,Th72; A5: bool Y in Tarski-Class X by A3,Th4; A6: the_rank_of bool Y = succ A by A4,Th63; bool Y c= Rank A by A1,A2,A5,Th32; then succ A c= A by A6,Def8; then A in A by ORDINAL1:21; hence contradiction; end; begin reserve e,u for set; scheme NonUniqFuncEx { X() -> set, P[set,set] }: ex f being Function st dom f = X() & for e st e in X() holds P[e,f.e] provided A1: for e st e in X() ex u st P[e,u] proof per cases; suppose X() = {}; then A2: for e st e in X() ex u st u in {} & P[e,u]; ex f being Function st dom f = X() & rng f c= {} & for e st e in X() holds P[e,f.e] from FUNCT_1:sch 5(A2); hence thesis; end; suppose X() <> {}; then reconsider D = X() as non empty set; defpred Q[set,Ordinal] means ex u st u in Rank $2 & P[$1,u]; A3: for e being Element of D ex A st Q[e,A] proof let e be Element of D; consider u such that A4: P[e,u] by A1; u c= Rank the_rank_of u by Def8; then u in Rank succ the_rank_of u by Th32; hence thesis by A4; end; consider F be Function such that A5: dom F = D & for d being Element of D ex A st A = F.d & Q[d,A] & for B st Q[d,B] holds A c= B from ORDINAL1:sch 6(A3); A6: for e st e in X() ex u st u in Rank sup rng F & P[e,u] proof let e; assume A7: e in X(); then consider A such that A8: A = F.e and A9: ex u st u in Rank A & P[e,u] and for B st ex u st u in Rank B & P[e,u] holds A c= B by A5; consider u such that A10: u in Rank A & P[e,u] by A9; take u; A in rng F by A5,A7,A8,FUNCT_1:def 3; then A in sup rng F by ORDINAL2:19; then A c= sup rng F by ORDINAL1:def 2; then Rank A c= Rank sup rng F by Th37; hence thesis by A10; end; ex f being Function st dom f = X() & rng f c= Rank sup rng F & for e st e in X() holds P[e, f.e] from FUNCT_1:sch 5(A6); hence thesis; end; end; definition let F,G be Relation; pred F,G are_fiberwise_equipotent means :Def9: for x be set holds card Coim(F,x) = card Coim(G,x); reflexivity; symmetry; end; Lm3: for F be Function, x be set st not x in rng F holds Coim(F,x) = {} proof let F be Function,x; assume A1: not x in rng F; now assume rng F meets {x}; then ex y being set st y in rng F & y in {x} by XBOOLE_0:3; hence contradiction by A1,TARSKI:def 1; end; hence thesis by RELAT_1:138; end; theorem Th75: for F,G be Function st F,G are_fiberwise_equipotent holds rng F = rng G proof let F,G be Function; assume A1: F,G are_fiberwise_equipotent; thus rng F c= rng G proof let x; assume that A2: x in rng F and A3: not x in rng G; card Coim(F,x) = card Coim(G,x) by A1,Def9; then A4: Coim(F,x), Coim(G,x) are_equipotent by CARD_1:5; A5: ex y st y in dom F & F.y = x by A2,FUNCT_1:def 3; Coim(G,x) = {} by A3,Lm3; then x in {x} & F"{x} = {} by A4,CARD_1:26,TARSKI:def 1; hence contradiction by A5,FUNCT_1:def 7; end; let x; assume that A6: x in rng G and A7: not x in rng F; card Coim(G,x) = card Coim(F,x) by A1,Def9; then A8: G"{x},F"{x} are_equipotent by CARD_1:5; A9: ex y st y in dom G & G.y = x by A6,FUNCT_1:def 3; Coim(F,x) = {} by A7,Lm3; then x in {x} & Coim(G,x) = {} by A8,CARD_1:26,TARSKI:def 1; hence contradiction by A9,FUNCT_1:def 7; end; theorem for F,G,H be Function st F,G are_fiberwise_equipotent & F,H are_fiberwise_equipotent holds G,H are_fiberwise_equipotent proof let F,G,H be Function; assume that A1: F,G are_fiberwise_equipotent and A2: F,H are_fiberwise_equipotent; let x; thus card Coim(G,x) = card Coim(F,x) by A1,Def9 .= card Coim(H,x) by A2,Def9; end; theorem Th77: for F,G be Function holds F,G are_fiberwise_equipotent iff ex H be Function st dom H = dom F & rng H = dom G & H is one-to-one & F = G*H proof let F,G be Function; thus F,G are_fiberwise_equipotent implies ex H be Function st dom H = dom F & rng H = dom G & H is one-to-one & F = G*H proof assume A1: F,G are_fiberwise_equipotent; defpred P[set,set] means $2 is Function & for f be Function st $2 = f holds dom f = F"{$1} & rng f = G"{$1} & f is one-to-one; A2: for x st x in rng F ex y st P[x,y] proof let x; assume x in rng F; card Coim(F,x) = card Coim(G,x) by A1,Def9; then F"{x},G"{x} are_equipotent by CARD_1:5; then consider H be Function such that A3: H is one-to-one & dom H = F"{x} & rng H = G"{x} by WELLORD2:def 4; take H; thus H is Function; let g be Function; assume g = H; hence thesis by A3; end; consider W be Function such that A4: dom W = rng F & for x st x in rng F holds P[x,W.x] from NonUniqFuncEx(A2); defpred Q[set,set] means for H be Function st H = W.(F.$1) holds $2 = H.$1; set df = dom F, dg = dom G; A5: for x st x in df ex y st y in dg & Q[x,y] proof let x; assume A6: x in df; then A7: F.x in rng F by FUNCT_1:def 3; then reconsider f = W.(F.x) as Function by A4; A8: dom f = F"{F.x} & rng f = G"{F.x} by A4,A7; take y = f.x; F.x in {F.x} by TARSKI:def 1; then x in F"{F.x} by A6,FUNCT_1:def 7; then f.x in G"{F.x} by A8,FUNCT_1:def 3; hence y in dg by FUNCT_1:def 7; let g be Function; assume g = W.(F.x); hence thesis; end; consider IT be Function such that A9: dom IT = df & rng IT c= dg & for x st x in df holds Q[x,IT.x] from FUNCT_1:sch 5(A5); take IT; thus dom IT = df by A9; dom G c= rng IT proof let x; assume A10: x in dg; then A11: G.x in rng G by FUNCT_1:def 3; A12: rng F = rng G by A1,Th75; then reconsider f = W.(G.x) as Function by A4,A11; A13: dom f = F"{G.x} by A4,A11,A12; A14: rng f = G"{G.x} by A4,A11,A12; G.x in {G.x} by TARSKI:def 1; then x in rng f by A10,A14,FUNCT_1:def 7; then consider z be set such that A15: z in dom f and A16: f.z = x by FUNCT_1:def 3; A17: z in df by A13,A15,FUNCT_1:def 7; F.z in {G.x} by A13,A15,FUNCT_1:def 7; then F.z = G.x by TARSKI:def 1; then IT.z = x by A9,A16,A17; hence thesis by A9,A17,FUNCT_1:def 3; end; hence rng IT = dg by A9,XBOOLE_0:def 10; now let x,y; assume that A18: x in dom IT and A19: y in dom IT and A20: IT.x = IT.y; A21: F.x in rng F by A9,A18,FUNCT_1:def 3; A22: F.y in rng F by A9,A19,FUNCT_1:def 3; then reconsider f1 = W.(F.x), f2 = W.(F.y) as Function by A4,A21; A23: IT.x = f1.x & IT.y = f2.y by A9,A18,A19; A24: dom f1 = F"{F.x} by A4,A21; A25: rng f1 = G"{F.x} by A4,A21; A26: f1 is one-to-one by A4,A21; A27: dom f2 = F"{F.y} by A4,A22; A28: rng f2 = G"{F.y} by A4,A22; A29: F.x in {F.x} by TARSKI:def 1; A30: F.y in {F.y} by TARSKI:def 1; A31: x in F"{F.x} by A9,A18,A29,FUNCT_1:def 7; A32: y in F"{F.y} by A9,A19,A30,FUNCT_1:def 7; A33: f1.x in rng f1 by A24,A31,FUNCT_1:def 3; f2.y in rng f2 by A27,A32,FUNCT_1:def 3; then f1.x in G"{F.x} /\ G"{F.y} by A20,A23,A25,A28,A33,XBOOLE_0:def 4; then f1.x in G"({F.x} /\ {F.y}) by FUNCT_1:68; then A34: G.(f1.x) in {F.x} /\ {F.y} by FUNCT_1:def 7; then A35: G.(f1.x) in {F.x} by XBOOLE_0:def 4; A36: G.(f1.x) in {F.y} by A34,XBOOLE_0:def 4; A37: G.(f1.x) = F.x by A35,TARSKI:def 1; G.(f1.x) = F.y by A36,TARSKI:def 1; hence x = y by A20,A23,A24,A26,A31,A32,A37,FUNCT_1:def 4; end; hence IT is one-to-one by FUNCT_1:def 4; A38: dom(G*IT) = df by A9,RELAT_1:27; now let x; assume A39: x in df; then A40: F.x in rng F by FUNCT_1:def 3; then reconsider f = W.(F.x) as Function by A4; A41: dom f = F"{F.x} & rng f = G"{F.x} by A4,A40; F.x in {F.x} by TARSKI:def 1; then x in F"{F.x} by A39,FUNCT_1:def 7; then f.x in G"{F.x} by A41,FUNCT_1:def 3; then G.(f.x) in {F.x} by FUNCT_1:def 7; then A42: G.(f.x) = F.x by TARSKI:def 1; IT.x = f.x by A9,A39; hence F.x = (G*IT).x by A9,A39,A42,FUNCT_1:13; end; hence thesis by A38,FUNCT_1:2; end; given H be Function such that A43: dom H = dom F and A44: rng H = dom G and A45: H is one-to-one and A46: F = G*H; let x; set t = H|(F"{x}); A47: t is one-to-one by A45,FUNCT_1:52; A48: dom t = F"{x} by A43,RELAT_1:62,132; rng t = G"{x} proof thus rng t c= G"{x} proof let z be set; assume z in rng t; then consider y such that A49: y in dom t and A50: t.y = z by FUNCT_1:def 3; F.y in {x} by A48,A49,FUNCT_1:def 7; then A51: F.y = x by TARSKI:def 1; A52: z = H.y by A49,A50,FUNCT_1:47; dom t = dom H /\ F"{x} by RELAT_1:61; then A53: y in dom H by A49,XBOOLE_0:def 4; then A54: z in dom G by A44,A52,FUNCT_1:def 3; x = G.z by A46,A51,A52,A53,FUNCT_1:13; then G.z in {x} by TARSKI:def 1; hence thesis by A54,FUNCT_1:def 7; end; let z be set; assume A55: z in G"{x}; then A56: z in dom G by FUNCT_1:def 7; G.z in {x} by A55,FUNCT_1:def 7; then A57: G.z = x by TARSKI:def 1; consider y such that A58: y in dom H and A59: H.y = z by A44,A56,FUNCT_1:def 3; F.y = x by A46,A57,A58,A59,FUNCT_1:13; then F.y in {x} by TARSKI:def 1; then A60: y in dom t by A43,A48,A58,FUNCT_1:def 7; then t.y in rng t by FUNCT_1:def 3; hence thesis by A59,A60,FUNCT_1:47; end; then F"{x},G"{x} are_equipotent by A47,A48,WELLORD2:def 4; hence thesis by CARD_1:5; end; theorem Th78: for F,G be Function holds F,G are_fiberwise_equipotent iff for X be set holds card (F"X) = card (G"X) proof let F,G be Function; thus F,G are_fiberwise_equipotent implies for X be set holds card(F"X) = card(G"X) proof assume F,G are_fiberwise_equipotent; then consider H be Function such that A1: dom H = dom F and A2: rng H = dom G and A3: H is one-to-one and A4: F = G*H by Th77; let X be set; set t = H|(F"X); A5: t is one-to-one by A3,FUNCT_1:52; A6: dom t = F"X by A1,RELAT_1:62,132; rng t = G"X proof thus rng t c= G"X proof let z be set; assume z in rng t; then consider y such that A7: y in dom t and A8: t.y = z by FUNCT_1:def 3; A9: F.y in X by A6,A7,FUNCT_1:def 7; A10: z = H.y by A7,A8,FUNCT_1:47; dom t = dom H /\ F"X by RELAT_1:61; then A11: y in dom H by A7,XBOOLE_0:def 4; then A12: z in dom G by A2,A10,FUNCT_1:def 3; G.z in X by A4,A9,A10,A11,FUNCT_1:13; hence thesis by A12,FUNCT_1:def 7; end; let z be set; assume A13: z in G"X; then A14: z in dom G by FUNCT_1:def 7; A15: G.z in X by A13,FUNCT_1:def 7; consider y such that A16: y in dom H and A17: H.y = z by A2,A14,FUNCT_1:def 3; F.y in X by A4,A15,A16,A17,FUNCT_1:13; then A18: y in dom t by A1,A6,A16,FUNCT_1:def 7; then t.y in rng t by FUNCT_1:def 3; hence thesis by A17,A18,FUNCT_1:47; end; then F"X,G"X are_equipotent by A5,A6,WELLORD2:def 4; hence thesis by CARD_1:5; end; assume for X be set holds card(F"X) = card(G"X); hence for x holds card Coim(F,x) = card Coim(G,x); end; theorem for D be non empty set, F,G be Function st rng F c= D & rng G c= D & for d be Element of D holds card Coim(F,d) = card Coim(G,d) holds F,G are_fiberwise_equipotent proof let D be non empty set, F,G be Function; assume that A1: rng F c= D and A2: rng G c= D; assume A3: for d be Element of D holds card Coim(F,d) = card Coim(G,d); let x; per cases; suppose not x in rng F; then A4: Coim(F,x) = {} by Lm3; now assume A5: x in rng G; then reconsider d = x as Element of D by A2; card Coim(G,d) = card Coim(F,d) by A3; then G"{d},F"{d} are_equipotent by CARD_1:5; then A6: G"{x} = {} by A4,CARD_1:26; consider y such that A7: y in dom G and A8: G.y = x by A5,FUNCT_1:def 3; G.y in {x} by A8,TARSKI:def 1; hence contradiction by A6,A7,FUNCT_1:def 7; end; hence thesis by A4,Lm3; end; suppose x in rng F; then reconsider d = x as Element of D by A1; card Coim(F,d) = card Coim(G,d) by A3; hence thesis; end; end; theorem Th80: for F,G be Function st dom F = dom G holds F,G are_fiberwise_equipotent iff ex P be Permutation of dom F st F = G*P proof let F,G be Function; assume A1: dom F = dom G; thus F,G are_fiberwise_equipotent implies ex P be Permutation of dom F st F = G*P proof assume F,G are_fiberwise_equipotent; then consider I be Function such that A2: dom I = dom F and A3: rng I = dom G and A4: I is one-to-one and A5: F = G*I by Th77; reconsider I as Function of dom F,dom F by A1,A2,A3,FUNCT_2:2; reconsider I as Permutation of dom F by A1,A3,A4,FUNCT_2:57; take I; thus thesis by A5; end; given P be Permutation of dom F such that A6: F = G*P; P is Function of dom F,dom F & dom F = {} implies dom F ={}; then rng P = dom F & dom P = dom F by FUNCT_2:def 1,def 3; hence thesis by A1,A6,Th77; end; theorem for F,G be Function st F,G are_fiberwise_equipotent holds card dom F = card dom G proof let F,G be Function; assume F,G are_fiberwise_equipotent; then card(F"(rng F)) = card(G"(rng F)) & rng F = rng G by Th75,Th78; hence card(dom F) = card(G"(rng G)) by RELAT_1:134 .= card(dom G) by RELAT_1:134; end; theorem for f being set, p being Relation for x being set st x in rng p holds the_rank_of x in the_rank_of [p,f] proof let f be set; let p be Relation; let y be set; assume y in rng p; then consider x being set such that A1: [x,y] in p by XTUPLE_0:def 13; A2: p in {p,f} by TARSKI:def 2; A3: {p,f} in {{p,f},{p}} by TARSKI:def 2; A4: y in {x,y} by TARSKI:def 2; A5: {x,y} in {{x,y},{x}} by TARSKI:def 2; A6: the_rank_of y in the_rank_of {x,y} by A4,Th68; A7: the_rank_of {x,y} in the_rank_of [x,y] by A5,Th68; A8: the_rank_of p in the_rank_of {p,f} by A2,Th68; A9: the_rank_of {p,f} in the_rank_of [p,f] by A3,Th68; A10: the_rank_of y in the_rank_of [x,y] by A6,A7,ORDINAL1:10; A11: the_rank_of [x,y] in the_rank_of p by A1,Th68; A12: the_rank_of p in the_rank_of [p,f] by A8,A9,ORDINAL1:10; the_rank_of y in the_rank_of p by A10,A11,ORDINAL1:10; hence thesis by A12,ORDINAL1:10; end; theorem for f, g, h being Function st dom f = dom g & rng f c= dom h & rng g c= dom h & f, g are_fiberwise_equipotent holds h*f, h*g are_fiberwise_equipotent proof let f, g, h be Function such that A1: dom f = dom g and A2: rng f c= dom h and A3: rng g c= dom h and A4: f, g are_fiberwise_equipotent; consider p being Permutation of dom f such that A5: f = g*p by A1,A4,Th80; A6: dom (h*f) = dom f by A2,RELAT_1:27; A7: dom (h*g) = dom g by A3,RELAT_1:27; h*f = h*g*p by A5,RELAT_1:36; hence thesis by A1,A6,A7,Th80; end; begin reserve i,j,e,u for set; theorem for f being Function st f is non-empty holds rng f is with_non-empty_elements; theorem for f being Function holds f is empty-yielding iff f = {} or rng f = { {} } proof let f be Function; hereby assume that A1: f is empty-yielding and A2: f <> {}; thus rng f = { {} } proof hereby let i; assume i in rng f; then ex e st e in dom f & f.e = i by FUNCT_1:def 3; then i = {} by A1; hence i in { {} } by TARSKI:def 1; end; set e = the Element of dom f; let i; assume i in { {} }; then A3: i = {} by TARSKI:def 1; A4: dom f <> {} by A2,RELAT_1:41; f.e is empty by A1; hence thesis by A4,A3,FUNCT_1:def 3; end; end; assume A5: f = {} or rng f = { {} }; per cases by A5; suppose f = {}; hence for i st i in dom f holds f.i is empty by RELAT_1:38; end; suppose A6: rng f = { {} }; let i; assume i in dom f; then f.i in rng f by FUNCT_1:def 3; hence thesis by A6,TARSKI:def 1; end; end; reserve I for set; registration let I; cluster total for I-defined Function; existence proof take I --> {}; thus thesis; end; end; definition let I; mode ManySortedSet of I is total I-defined Function; end; reserve x,X,Y,Z,V for ManySortedSet of I; scheme KuratowskiFunction{A()-> set, F(set) -> set}: ex f being ManySortedSet of A() st for e st e in A() holds f.e in F(e) provided A1: for e st e in A() holds F(e) <> {} proof defpred P[set,set] means $2 in F($1); A2: now let e; set fe = the Element of F(e); assume A3: e in A(); reconsider fe as set; take fe; F(e) <> {} by A1,A3; hence P[e,fe]; end; consider f being Function such that A4: dom f = A() and A5: for e st e in A() holds P[e,f.e] from CLASSES1:sch 1(A2); reconsider f as ManySortedSet of A() by A4,PARTFUN1:def 2,RELAT_1:def 18; take f; thus thesis by A5; end; definition let I,X,Y; pred X in Y means :Def1: for i st i in I holds X.i in Y.i; pred X c= Y means :Def2: for i st i in I holds X.i c= Y.i; reflexivity; end; definition let I be non empty set,X,Y be ManySortedSet of I; redefine pred X in Y; asymmetry proof let X,Y be ManySortedSet of I; assume A1: for i st i in I holds X.i in Y.i; not for i st i in I holds Y.i in X.i proof assume A2: for i st i in I holds Y.i in X.i; consider i such that A3: i in I by XBOOLE_0:def 1; X.i in Y.i by A1,A3; hence thesis by A2,A3; end; hence thesis by Def1; end; end; scheme PSeparation { I()-> set, A() -> ManySortedSet of I(), P[set,set] } : ex X being ManySortedSet of I() st for i being set st i in I() for e holds e in X.i iff e in A().i & P[i,e] proof defpred R[set,set] means for e holds e in $2 iff e in A().$1 & P[ $1,e]; A1: now let i such that i in I(); defpred Q[set] means P[i,$1]; ex u st for e holds e in u iff e in A().i & Q[e] from XBOOLE_0:sch 1; hence ex u st R[i,u]; end; consider f being Function such that A2: dom f = I() and A3: for i st i in I() holds R[i,f.i] from CLASSES1:sch 1(A1); f is ManySortedSet of I() by A2,PARTFUN1:def 2,RELAT_1:def 18; hence thesis by A3; end; theorem Th3: (for i st i in I holds X.i = Y.i) implies X = Y proof dom X = I & dom Y = I by PARTFUN1:def 2; hence thesis by FUNCT_1:2; end; definition let I; func [[0]]I -> ManySortedSet of I equals I --> {}; coherence; correctness; let X,Y; func X \/ Y -> ManySortedSet of I means :Def4: for i st i in I holds it.i = X.i \/ Y.i; existence proof deffunc F(set) = X.$1 \/ Y.$1; consider f being Function such that A1: dom f = I and A2: for i st i in I holds f.i = F(i) from FUNCT_1:sch 3; f is ManySortedSet of I by A1,PARTFUN1:def 2,RELAT_1:def 18; hence thesis by A2; end; uniqueness proof let A1, A2 be ManySortedSet of I such that A3: for i st i in I holds A1.i = X.i \/ Y.i and A4: for i st i in I holds A2.i = X.i \/ Y.i; now let i; assume A5: i in I; hence A1.i = X.i \/ Y.i by A3 .= A2.i by A4,A5; end; hence thesis by Th3; end; commutativity; idempotence; func X /\ Y -> ManySortedSet of I means :Def5: for i st i in I holds it.i = X.i /\ Y.i; existence proof deffunc F(set) = X.$1 /\ Y.$1; consider f being Function such that A6: dom f = I and A7: for i st i in I holds f.i = F(i) from FUNCT_1:sch 3; f is ManySortedSet of I by A6,PARTFUN1:def 2,RELAT_1:def 18; hence thesis by A7; end; uniqueness proof let A1, A2 be ManySortedSet of I such that A8: for i st i in I holds A1.i = X.i /\ Y.i and A9: for i st i in I holds A2.i = X.i /\ Y.i; now let i; assume A10: i in I; hence A1.i = X.i /\ Y.i by A8 .= A2.i by A9,A10; end; hence thesis by Th3; end; commutativity; idempotence; func X \ Y -> ManySortedSet of I means :Def6: for i st i in I holds it.i = X.i \ Y.i; existence proof deffunc F(set) = X.$1 \ Y.$1; consider f being Function such that A11: dom f = I and A12: for i st i in I holds f.i = F(i) from FUNCT_1:sch 3; f is ManySortedSet of I by A11,PARTFUN1:def 2,RELAT_1:def 18; hence thesis by A12; end; uniqueness proof let A1, A2 be ManySortedSet of I such that A13: for i st i in I holds A1.i = X.i \ Y.i and A14: for i st i in I holds A2.i = X.i \ Y.i; now let i; assume A15: i in I; hence A1.i = X.i \ Y.i by A13 .= A2.i by A14,A15; end; hence thesis by Th3; end; pred X overlaps Y means :Def7: for i st i in I holds X.i meets Y.i; symmetry; pred X misses Y means :Def8: for i st i in I holds X.i misses Y.i; symmetry; end; notation let I; let X,Y; antonym X meets Y for X misses Y; end; definition let I,X,Y; func X \+\ Y -> ManySortedSet of I equals (X \ Y) \/ (Y \ X); correctness; commutativity; end; theorem Th4: for i st i in I holds (X \+\ Y).i = X.i \+\ Y.i proof let i such that A1: i in I; thus (X \+\ Y).i = (X \ Y).i \/ (Y \ X).i by A1,Def4 .= X.i \ Y.i \/ (Y \ X).i by A1,Def6 .= X.i \+\ Y.i by A1,Def6; end; theorem Th5: [[0]]I.i = {} proof per cases; suppose i in I; hence thesis by FUNCOP_1:7; end; suppose not i in I; then not i in dom [[0]]I by FUNCOP_1:13; hence thesis by FUNCT_1:def 2; end; end; theorem Th6: (for i st i in I holds X.i = {}) implies X = [[0]]I proof assume A1: for i st i in I holds X.i = {}; now let i; assume i in I; hence X.i = {} by A1 .= [[0]]I.i by Th5; end; hence thesis by Th3; end; theorem Th7: x in X or x in Y implies x in X \/ Y proof assume A1: x in X or x in Y; let i; assume A2: i in I; then x.i in X.i or x.i in Y.i by A1,Def1; then x.i in X.i \/ Y.i by XBOOLE_0:def 3; hence thesis by A2,Def4; end; theorem Th8: x in X /\ Y iff x in X & x in Y proof hereby assume A1: x in X /\ Y; thus x in X proof let i; assume A2: i in I; then x.i in (X /\ Y).i by A1,Def1; then x.i in X.i /\ Y.i by A2,Def5; hence thesis by XBOOLE_0:def 4; end; thus x in Y proof let i; assume A3: i in I; then x.i in (X /\ Y).i by A1,Def1; then x.i in X.i /\ Y.i by A3,Def5; hence thesis by XBOOLE_0:def 4; end; end; assume A4: x in X & x in Y; let i; assume A5: i in I; then x.i in X.i & x.i in Y.i by A4,Def1; then x.i in X.i /\ Y.i by XBOOLE_0:def 4; hence thesis by A5,Def5; end; theorem Th9: x in X & X c= Y implies x in Y proof assume A1: x in X & X c= Y; let i; assume i in I; then x.i in X.i & X.i c= Y.i by A1,Def1,Def2; hence thesis; end; theorem Th10: x in X & x in Y implies X overlaps Y proof assume A1: x in X & x in Y; let i; assume i in I; then x.i in X.i & x.i in Y.i by A1,Def1; hence thesis by XBOOLE_0:3; end; theorem Th11: X overlaps Y implies ex x st x in X & x in Y proof deffunc F(set) = X.$1 /\ Y.$1; assume A1: X overlaps Y; A2: now let i; assume i in I; then X.i meets Y.i by A1,Def7; hence F(i) <> {} by XBOOLE_0:def 7; end; consider x being ManySortedSet of I such that A3: for i st i in I holds x.i in F(i) from KuratowskiFunction(A2); take x; now let i; assume i in I; then x.i in X.i /\ Y.i by A3; hence x.i in X.i by XBOOLE_0:def 4; end; hence x in X by Def1; now let i; assume i in I; then x.i in X.i /\ Y.i by A3; hence x.i in Y.i by XBOOLE_0:def 4; end; hence thesis by Def1; end; theorem x in X \ Y implies x in X proof assume A1: x in X \ Y; thus x in X proof let i; assume A2: i in I; then x.i in (X \ Y).i by A1,Def1; then x.i in X.i \ Y.i by A2,Def6; hence thesis; end; end; begin Lm1: X c= Y & Y c= X implies X = Y proof assume A1: X c= Y & Y c= X; now let i; assume i in I; then X.i c= Y.i & Y.i c= X.i by A1,Def2; hence X.i = Y.i by XBOOLE_0:def 10; end; hence thesis by Th3; end; definition let I,X,Y; redefine pred X = Y means for i st i in I holds X.i = Y.i; compatibility by Th3; end; theorem Th13: X c= Y & Y c= Z implies X c= Z proof assume that A1: X c= Y and A2: Y c= Z; let i such that A3: i in I; let e; assume A4: e in X.i; X.i c= Y.i by A1,A3,Def2; then A5: e in Y.i by A4; Y.i c= Z.i by A2,A3,Def2; hence thesis by A5; end; theorem Th14: X c= X \/ Y proof let i such that A1: i in I; let e; assume e in X.i; then e in X.i \/ Y.i by XBOOLE_0:def 3; hence thesis by A1,Def4; end; theorem Th15: X /\ Y c= X proof let i such that A1: i in I; let e; assume e in (X /\ Y).i; then e in X.i /\ Y.i by A1,Def5; hence thesis by XBOOLE_0:def 4; end; theorem Th16: X c= Z & Y c= Z implies X \/ Y c= Z proof assume A1: X c= Z & Y c= Z; let i; assume A2: i in I; then X.i c= Z.i & Y.i c= Z.i by A1,Def2; then X.i \/ Y.i c= Z.i by XBOOLE_1:8; hence thesis by A2,Def4; end; theorem Th17: Z c= X & Z c= Y implies Z c= X /\ Y proof assume A1: Z c= X & Z c= Y; let i; assume A2: i in I; then Z.i c= X.i & Z.i c= Y.i by A1,Def2; then Z.i c= X.i /\ Y.i by XBOOLE_1:19; hence thesis by A2,Def5; end; theorem X c= Y implies X \/ Z c= Y \/ Z proof assume A1: X c= Y; A2: Z c= Y \/ Z by Th14; Y c= Y \/ Z by Th14; then X c= Y \/ Z by A1,Th13; hence X \/ Z c= Y \/ Z by A2,Th16; end; theorem Th19: X c= Y implies X /\ Z c= Y /\ Z proof assume A1: X c= Y; A2: X /\ Z c= Z by Th15; X /\ Z c= X by Th15; then X /\ Z c= Y by A1,Th13; hence X /\ Z c= Y /\ Z by A2,Th17; end; theorem Th20: X c= Y & Z c= V implies X \/ Z c= Y \/ V proof assume that A1: X c= Y and A2: Z c= V; V c= Y \/ V by Th14; then A3: Z c= Y \/ V by A2,Th13; Y c= Y \/ V by Th14; then X c= Y \/ V by A1,Th13; hence thesis by A3,Th16; end; theorem X c= Y & Z c= V implies X /\ Z c= Y /\ V proof assume that A1: X c= Y and A2: Z c= V; X /\ Z c= Z by Th15; then A3: X /\ Z c= V by A2,Th13; X /\ Z c= X by Th15; then X /\ Z c= Y by A1,Th13; hence thesis by A3,Th17; end; theorem Th22: X c= Y implies X \/ Y = Y proof assume X c= Y; then A1: X \/ Y c= Y by Th16; Y c= X \/ Y by Th14; hence thesis by A1,Lm1; end; theorem Th23: X c= Y implies X /\ Y = X proof assume A1: X c= Y; A2: X /\ Y c= X by Th15; X c= X /\ Y by A1,Th17; hence thesis by A2,Lm1; end; theorem X /\ Y c= X \/ Z proof X /\ Y c= X & X c= X \/ Z by Th14,Th15; hence thesis by Th13; end; theorem X c= Z implies X \/ Y /\ Z = (X \/ Y) /\ Z proof assume A1: X c= Z; let i; assume A2: i in I; then A3: X.i c= Z.i by A1,Def2; thus (X \/ Y /\ Z).i = X.i \/ (Y /\ Z).i by A2,Def4 .= X.i \/ Y.i /\ Z.i by A2,Def5 .= (X.i \/ Y.i) /\ Z.i by A3,XBOOLE_1:30 .= (X \/ Y).i /\ Z.i by A2,Def4 .= ((X \/ Y) /\ Z).i by A2,Def5; end; theorem X = Y \/ Z iff Y c= X & Z c= X & for V st Y c= V & Z c= V holds X c= V proof thus X = Y \/ Z implies Y c= X & Z c= X & for V st Y c= V & Z c= V holds X c= V by Th14,Th16; assume that A1: Y c= X & Z c= X and A2: Y c= V & Z c= V implies X c= V; Y c= Y \/ Z & Z c= Y \/ Z by Th14; then A3: X c= Y \/ Z by A2; Y \/ Z c= X by A1,Th16; hence thesis by A3,Lm1; end; theorem X = Y /\ Z iff X c= Y & X c= Z & for V st V c= Y & V c= Z holds V c= X proof thus X = Y /\ Z implies X c= Y & X c= Z & for V st V c= Y & V c= Z holds V c= X by Th15,Th17; assume that A1: X c= Y & X c= Z and A2: V c= Y & V c= Z implies V c= X; A3: X c= Y /\ Z by A1,Th17; Y /\ Z c= Y & Y /\ Z c= Z implies Y /\ Z c= X by A2; hence thesis by A3,Lm1,Th15; end; theorem Th28: (X \/ Y) \/ Z = X \/ (Y \/ Z) proof let i; assume A1: i in I; hence (X \/ Y \/ Z).i = (X \/ Y).i \/ Z.i by Def4 .= X.i \/ Y.i \/ Z.i by A1,Def4 .= X.i \/ (Y.i \/ Z.i) by XBOOLE_1:4 .= X.i \/ (Y \/ Z).i by A1,Def4 .= (X \/ (Y \/ Z)).i by A1,Def4; end; theorem Th29: (X /\ Y) /\ Z = X /\ (Y /\ Z) proof let i; assume A1: i in I; hence (X /\ Y /\ Z).i = (X /\ Y).i /\ Z.i by Def5 .= X.i /\ Y.i /\ Z.i by A1,Def5 .= X.i /\ (Y.i /\ Z.i) by XBOOLE_1:16 .= X.i /\ (Y /\ Z).i by A1,Def5 .= (X /\ (Y /\ Z)).i by A1,Def5; end; theorem Th30: X /\ (X \/ Y) = X proof X c= X \/ Y by Th14; then A1: X c= X /\ (X \/ Y) by Th17; X /\ (X \/ Y) c= X by Th15; hence X /\ (X \/ Y) = X by A1,Lm1; end; theorem Th31: X \/ (X /\ Y) = X proof X /\ Y c= X by Th15; then A1: X \/ (X /\ Y) c= X by Th16; X c= X \/ (X /\ Y) by Th14; hence X \/ (X /\ Y) = X by A1,Lm1; end; theorem Th32: X /\ (Y \/ Z) = X /\ Y \/ X /\ Z proof let i; assume A1: i in I; hence (X /\ (Y \/ Z)).i = X.i /\ (Y \/ Z).i by Def5 .= X.i /\ (Y.i \/ Z.i) by A1,Def4 .= X.i /\ Y.i \/ X.i /\ Z.i by XBOOLE_1:23 .= (X /\ Y).i \/ X.i /\ Z.i by A1,Def5 .= (X /\ Y).i \/ (X /\ Z).i by A1,Def5 .= (X /\ Y \/ X /\ Z).i by A1,Def4; end; theorem Th33: X \/ Y /\ Z = (X \/ Y) /\ (X \/ Z) proof thus X \/ Y /\ Z = X \/ X /\ Z \/ Y /\ Z by Th31 .= X \/ (X /\ Z \/ Y /\ Z) by Th28 .= X \/ (X \/ Y) /\ Z by Th32 .= (X \/ Y) /\ X \/ (X \/ Y) /\ Z by Th30 .= (X \/ Y) /\ (X \/ Z) by Th32; end; theorem (X /\ Y) \/ (X /\ Z) = X implies X c= Y \/ Z proof assume (X /\ Y) \/ (X /\ Z) = X; then X = X /\ (Y \/ Z) by Th32; hence thesis by Th15; end; theorem (X \/ Y) /\ (X \/ Z) = X implies Y /\ Z c= X proof assume (X \/ Y) /\ (X \/ Z) = X; then X = X \/ (Y /\ Z) by Th33; hence thesis by Th14; end; theorem (X /\ Y) \/ (Y /\ Z) \/ (Z /\ X) = (X \/ Y) /\ (Y \/ Z) /\ (Z \/ X) proof thus X /\ Y \/ Y /\ Z \/ Z /\ X = (X /\ Y \/ Y /\ Z \/ Z) /\ (X /\ Y \/ Y /\ Z \/ X) by Th33 .= (X /\ Y \/ (Y /\ Z \/ Z)) /\ (X /\ Y \/ Y /\ Z \/ X) by Th28 .= (X /\ Y \/ Z) /\ (X /\ Y \/ Y /\ Z \/ X) by Th31 .= (X /\ Y \/ Z) /\ (X /\ Y \/ X \/ Y /\ Z) by Th28 .= (X /\ Y \/ Z) /\ (X \/ Y /\ Z) by Th31 .= (X \/ Z) /\ (Y \/ Z) /\ (X \/ Y /\ Z) by Th33 .= (X \/ Z) /\ (Y \/ Z) /\ ((X \/ Y) /\ (X \/ Z)) by Th33 .= (X \/ Y) /\ ((Y \/ Z) /\ (X \/ Z) /\ (X \/ Z)) by Th29 .= (X \/ Y) /\ ((Y \/ Z) /\ ((X \/ Z) /\ (X \/ Z))) by Th29 .= (X \/ Y) /\ (Y \/ Z) /\ (Z \/ X) by Th29; end; theorem X \/ Y c= Z implies X c= Z proof X c= X \/ Y by Th14; hence thesis by Th13; end; theorem X c= Y /\ Z implies X c= Y proof Y /\ Z c= Y by Th15; hence thesis by Th13; end; theorem X \/ Y \/ Z = (X \/ Z) \/ (Y \/ Z) proof thus X \/ Y \/ Z = X \/ (Y \/ (Z \/ Z)) by Th28 .= X \/ (Z \/ Y \/ Z) by Th28 .= (X \/ Z) \/ (Y \/ Z) by Th28; end; theorem X /\ Y /\ Z = (X /\ Z) /\ (Y /\ Z) proof thus X /\ Y /\ Z = X /\ (Y /\ (Z /\ Z)) by Th29 .= X /\ (Z /\ Y /\ Z) by Th29 .= (X /\ Z) /\ (Y /\ Z) by Th29; end; theorem X \/ (X \/ Y) = X \/ Y proof thus X \/ (X \/ Y) = X \/ X \/ Y by Th28 .= X \/ Y; end; theorem X /\ (X /\ Y) = X /\ Y proof thus X /\ (X /\ Y) = X /\ X /\ Y by Th29 .= X /\ Y; end; begin theorem Th43: [[0]]I c= X proof let i such that A1: i in I; let e; assume e in [[0]]I.i; hence thesis by A1,FUNCOP_1:7; end; theorem Th44: X c= [[0]]I implies X = [[0]]I proof assume X c= [[0]]I; then X c= [[0]]I & [[0]]I c= X by Th43; hence thesis by Lm1; end; theorem X c= Y & X c= Z & Y /\ Z = [[0]]I implies X = [[0]]I by Th17,Th44; theorem X c= Y & Y /\ Z = [[0]]I implies X /\ Z = [[0]]I by Th44,Th19; theorem X \/ [[0]]I = X & [[0]]I \/ X = X by Th22,Th43; theorem X \/ Y = [[0]]I implies X = [[0]]I by Th44,Th14; theorem X /\ [[0]]I = [[0]]I by Th23,Th43; theorem X c= (Y \/ Z) & X /\ Z = [[0]]I implies X c= Y proof assume that A1: X c= (Y \/ Z) and A2: X /\ Z = [[0]]I; X /\ (Y \/ Z)= X by A1,Th23; then Y /\ X \/ [[0]]I = X by A2,Th32; then Y /\ X = X by Th22,Th43; hence thesis by Th15; end; theorem Y c= X & X /\ Y = [[0]]I implies Y = [[0]]I by Th23; begin theorem Th52: X \ Y = [[0]]I iff X c= Y proof hereby assume A1: X \ Y = [[0]]I; now let i; assume i in I; then X.i \ Y.i = (X \ Y).i by Def6 .= {} by A1,Th5; hence X.i c= Y.i by XBOOLE_1:37; end; hence X c= Y by Def2; end; assume A2: X c= Y; now let i; assume A3: i in I; then A4: X.i c= Y.i by A2,Def2; thus (X \ Y).i = X.i \ Y.i by A3,Def6 .= {} by A4,XBOOLE_1:37; end; hence thesis by Th6; end; theorem Th53: X c= Y implies X \ Z c= Y \ Z proof assume A1: X c= Y; now let i; assume A2: i in I; then A3: (X \ Z).i = X.i \ Z.i & (Y \ Z).i = Y.i \ Z.i by Def6; X.i c= Y.i by A1,A2,Def2; hence (X \ Z).i c= (Y \ Z).i by A3,XBOOLE_1:33; end; hence thesis by Def2; end; theorem Th54: X c= Y implies Z \ Y c= Z \ X proof assume A1: X c= Y; now let i; assume A2: i in I; then A3: (Z \ X).i = Z.i \ X.i & (Z \ Y).i = Z.i \ Y.i by Def6; X.i c= Y.i by A1,A2,Def2; hence (Z \ Y).i c= (Z \ X).i by A3,XBOOLE_1:34; end; hence thesis by Def2; end; theorem X c= Y & Z c= V implies X \ V c= Y \ Z proof assume X c= Y & Z c= V; then X \ V c= Y \ V & Y \ V c= Y \ Z by Th53,Th54; hence thesis by Th13; end; theorem Th56: X \ Y c= X proof now let i such that A1: i in I; X.i \ Y.i c= X.i; hence (X \ Y).i c= X.i by A1,Def6; end; hence thesis by Def2; end; theorem X c= Y \ X implies X = [[0]]I proof assume A1: X c= Y \ X; let i; assume A2: i in I; then X.i c= (Y \ X).i by A1,Def2; then X.i c= Y.i \ X.i by A2,Def6; hence X.i = {} by XBOOLE_1:38 .= [[0]]I.i by Th5; end; theorem X \ X = [[0]]I by Th52; theorem Th59: X \ [[0]]I = X proof let i; assume i in I; hence (X \ [[0]]I).i = X.i \ [[0]]I.i by Def6 .= X.i \ {} by Th5 .= X.i; end; theorem Th60: [[0]]I \ X = [[0]]I proof [[0]]I c= X by Th43; hence thesis by Th52; end; theorem X \ (X \/ Y) = [[0]]I proof X c= X \/ Y by Th14; hence thesis by Th52; end; theorem Th62: X /\ (Y \ Z) = (X /\ Y) \ Z proof let i; assume A1: i in I; hence (X /\ (Y \ Z)).i = X.i /\ (Y \ Z).i by Def5 .= X.i /\ (Y.i \ Z.i) by A1,Def6 .= X.i /\ Y.i \ Z.i by XBOOLE_1:49 .= (X /\ Y).i \ Z.i by A1,Def5 .= ((X /\ Y) \ Z).i by A1,Def6; end; theorem Th63: (X \ Y) /\ Y = [[0]]I proof A1: Y /\ X c= Y by Th15; thus (X \ Y) /\ Y = (Y /\ X) \ Y by Th62 .= [[0]]I by A1,Th52; thus thesis; end; theorem Th64: X \ (Y \ Z) = (X \ Y) \/ X /\ Z proof let i; assume A1: i in I; hence (X \ (Y \ Z)).i = X.i \ (Y \ Z).i by Def6 .= X.i \ (Y.i \ Z.i) by A1,Def6 .= X.i \ Y.i \/ X.i /\ Z.i by XBOOLE_1:52 .= X.i \ Y.i \/ (X /\ Z).i by A1,Def5 .= (X \ Y).i \/ (X /\ Z).i by A1,Def6 .= ((X \ Y) \/ X /\ Z).i by A1,Def4; end; theorem Th65: (X \ Y) \/ X /\ Y = X proof thus X \ Y \/ X /\ Y = X \ (Y \ Y) by Th64 .= X \ [[0]]I by Th52 .= X by Th59; end; theorem X c= Y implies Y = X \/ (Y \ X) proof assume A1: X c= Y; thus Y = (Y \ X) \/ Y /\ X by Th65 .= X \/ (Y \ X) by A1,Th23; end; theorem Th67: X \/ (Y \ X) = X \/ Y proof thus X \/ (Y \ X) = X \/ Y /\ X \/ (Y \ X) by Th31 .= X \/ (Y /\ X \/ (Y \ X)) by Th28 .= X \/ Y by Th65; end; theorem Th68: X \ (X \ Y) = X /\ Y proof thus X \ (X \ Y) = (X \ X) \/ X /\ Y by Th64 .= [[0]]I \/ X /\ Y by Th52 .= X /\ Y by Th22,Th43; end; theorem Th69: X \ (Y /\ Z) = (X \ Y) \/ (X \ Z) proof let i; assume A1: i in I; hence (X \ (Y /\ Z)).i = X.i \ (Y /\ Z).i by Def6 .= X.i \ Y.i /\ Z.i by A1,Def5 .= X.i \ Y.i \/ (X.i \ Z.i) by XBOOLE_1:54 .= X.i \ Y.i \/ (X \ Z).i by A1,Def6 .= (X \ Y).i \/ (X \ Z).i by A1,Def6 .= ((X \ Y) \/ (X \ Z)).i by A1,Def4; end; theorem Th70: X \ X /\ Y = X \ Y proof thus X \ X /\ Y = (X \ X) \/ (X \ Y) by Th69 .= [[0]]I \/ (X \ Y) by Th52 .= X \ Y by Th22,Th43; end; theorem X /\ Y = [[0]]I iff X \ Y = X proof hereby assume A1: X /\ Y = [[0]]I; thus X \ Y = X \ X /\ Y by Th70 .= X by A1,Th59; end; thus thesis by Th63; end; theorem Th72: (X \/ Y) \ Z = (X \ Z) \/ (Y \ Z) proof let i; assume A1: i in I; hence ((X \/ Y) \ Z).i = (X \/ Y).i \ Z.i by Def6 .= X.i \/ Y.i \ Z.i by A1,Def4 .= X.i \ Z.i \/ (Y.i \ Z.i) by XBOOLE_1:42 .= X.i \ Z.i \/ (Y \ Z).i by A1,Def6 .= (X \ Z).i \/ (Y \ Z).i by A1,Def6 .= ((X \ Z) \/ (Y \ Z)).i by A1,Def4; end; theorem Th73: (X \ Y) \ Z = X \ (Y \/ Z) proof let i; assume A1: i in I; hence ((X \ Y) \ Z).i = (X \ Y).i \ Z.i by Def6 .= X.i \ Y.i \ Z.i by A1,Def6 .= X.i \ (Y.i \/ Z.i) by XBOOLE_1:41 .= X.i \ (Y \/ Z).i by A1,Def4 .= (X \ (Y \/ Z)).i by A1,Def6; end; theorem (X /\ Y) \ Z = (X \ Z) /\ (Y \ Z) proof A1: X \ Z c= X by Th56; thus (X /\ Y) \ Z = (X \ Z) /\ Y by Th62 .= (X \ Z) \ ((X \ Z) \ Y) by Th68 .= (X \ Z) \ (X \ (Z \/ Y)) by Th73 .= ((X \ Z) \ X) \/ ((X \ Z) /\ (Z \/ Y)) by Th64 .= [[0]]I \/ ((X \ Z) /\ (Z \/ Y)) by A1,Th52 .= (X \ Z) /\ (Y \/ Z) by Th22,Th43 .= (X \ Z) /\ ((Y \ Z) \/ Z) by Th67 .= (X \ Z) /\ (Y \ Z) \/ (X \ Z) /\ Z by Th32 .= (X \ Z) /\ (Y \ Z) \/ [[0]]I by Th63 .= (X \ Z) /\ (Y \ Z) by Th22,Th43; end; theorem Th75: (X \/ Y) \ Y = X \ Y proof thus (X \/ Y) \ Y = X \ Y \/ (Y \ Y) by Th72 .= X \ Y \/ [[0]]I by Th52 .= X \ Y by Th22,Th43; end; theorem X c= Y \/ Z implies X \ Y c= Z & X \ Z c= Y proof assume A1: X c= Y \/ Z; then X \ Y c= Z \/ Y \ Y by Th53; then A2: X \ Y c= Z \ Y by Th75; Z \ Y c= Z by Th56; hence X \ Y c= Z by A2,Th13; X \ Z c= Y \/ Z \ Z by A1,Th53; then A3: X \ Z c= Y \ Z by Th75; Y \ Z c= Y by Th56; hence thesis by A3,Th13; end; theorem Th77: (X \/ Y) \ (X /\ Y) = (X \ Y) \/ (Y \ X) proof thus (X \/ Y) \ (X /\ Y) = X \ (X /\ Y) \/ (Y \ (X /\ Y)) by Th72 .= X \ Y \/ (Y \ (X /\ Y)) by Th70 .= (X \ Y) \/ (Y \ X) by Th70; end; theorem Th78: (X \ Y) \ Y = X \ Y proof thus (X \ Y) \ Y = X \ (Y \/ Y) by Th73 .= X \ Y; end; theorem X \ (Y \/ Z) = (X \ Y) /\ (X \ Z) proof thus X \ (Y \/ Z) = X \ Y \ Z by Th73 .= (X \ Y) /\ X \ Z by Th56,Th23 .= (X \ Y) /\ (X \ Z) by Th62; end; theorem X \ Y = Y \ X implies X = Y proof assume X \ Y = Y \ X; hence X = Y \ X \/ Y /\ X by Th65 .= Y by Th65; end; theorem X /\ (Y \ Z) = X /\ Y \ X /\ Z proof A1: X /\ Y c= X by Th15; X /\ Y \ X /\ Z = ((X /\ Y) \ X) \/ ((X /\ Y) \ Z) by Th69 .= [[0]]I \/ ((X /\ Y) \ Z) by A1,Th52 .= (X /\ Y) \ Z by Th22,Th43; hence thesis by Th62; end; theorem X \ Y c= Z implies X c= Y \/ Z proof assume A1: X \ Y c= Z; X /\ Y c= Y by Th15; then X /\ Y \/ (X \ Y) c= Y \/ Z by A1,Th20; hence thesis by Th65; end; theorem X \ Y c= X \+\ Y by Th14; theorem X \+\ [[0]]I = X proof thus X \+\ [[0]]I = X \/ ([[0]]I \ X) by Th59 .= X \/ [[0]]I by Th60 .= X by Th22,Th43; end; theorem X \+\ X = [[0]]I by Th52; theorem X \/ Y = (X \+\ Y) \/ X /\ Y proof thus X \/ Y = ((X \ Y) \/ X /\ Y) \/ Y by Th65 .= (X \ Y) \/ (X /\ Y \/ Y) by Th28 .= (X \ Y) \/ Y by Th31 .= (X \ Y) \/ ((Y \ X) \/ (Y /\ X)) by Th65 .= (X \+\ Y) \/ X /\ Y by Th28; end; theorem Th87: X \+\ Y = (X \/ Y) \ X /\ Y proof thus X \+\ Y = (X \ X /\ Y) \/ (Y \ X) by Th70 .= (X \ X /\ Y) \/ (Y \ X /\ Y) by Th70 .= (X \/ Y) \ X /\ Y by Th72; end; theorem (X \+\ Y) \ Z = (X \ (Y \/ Z)) \/ (Y \ (X \/ Z)) proof thus (X \+\ Y) \ Z = (X \ Y \ Z) \/ (Y \ X \ Z) by Th72 .= (X \ (Y \/ Z)) \/ (Y \ X \ Z) by Th73 .= (X \ (Y \/ Z)) \/ (Y \ (X \/ Z)) by Th73; end; theorem X \ (Y \+\ Z) = X \ (Y \/ Z) \/ X /\ Y /\ Z proof thus X \ (Y \+\ Z) = X \ ((Y \/ Z) \ Y /\ Z) by Th87 .= X \ (Y \/ Z) \/ X /\ (Y /\ Z) by Th64 .= X \ (Y \/ Z) \/ X /\ Y /\ Z by Th29; end; theorem Th90: (X \+\ Y) \+\ Z = X \+\ (Y \+\ Z) proof set S1 = X \ (Y \/ Z), S2 = Y \ (X \/ Z), S3 = Z \ (X \/ Y), S4 = X /\ Y /\ Z; thus (X \+\ Y) \+\ Z = (((X \ Y) \ Z) \/ ((Y \ X) \ Z)) \/ (Z \ ((X \ Y) \/ (Y \ X))) by Th72 .= ( S1 \/ ((Y \ X) \ Z)) \/ (Z \ ((X \ Y) \/ (Y \ X))) by Th73 .= ( S1 \/ S2) \/ (Z \ ((X \ Y) \/ (Y \ X))) by Th73 .= ( S1 \/ S2) \/ (Z \ ((X \/ Y) \ (X /\ Y))) by Th77 .= (S1 \/ S2) \/ (S4 \/ S3) by Th64 .= (S1 \/ S2 \/ S4) \/ S3 by Th28 .= (S1 \/ S4 \/ S2) \/ S3 by Th28 .= (S1 \/ S4) \/ (S2 \/ S3) by Th28 .= (S1 \/ X /\ (Y /\ Z)) \/ (S2 \/ S3) by Th29 .= X \ ((Y \/ Z) \ (Y /\ Z)) \/ (S2 \/ S3) by Th64 .= X \ ((Y \ Z) \/ (Z \ Y)) \/ (S2 \/ (Z \ (Y \/ X))) by Th77 .= X \ ((Y \ Z) \/ (Z \ Y)) \/ ((Y \ (Z \/ X)) \/ (Z \ Y \ X)) by Th73 .= X \ ((Y \ Z) \/ (Z \ Y)) \/ ((Y \ Z \ X) \/ (Z \ Y \ X)) by Th73 .= X \+\ (Y \+\ Z) by Th72; end; theorem X \ Y c= Z & Y \ X c= Z implies X \+\ Y c= Z by Th16; theorem Th92: X \/ Y = X \+\ (Y \ X) proof thus X \/ Y = Y \/ (X \/ X) .= X \/ Y \/ X by Th28 .= (X \ Y) \/ Y \/ X by Th67 .= (X \ Y) \/ (X \/ Y) by Th28 .= (X \ Y) \/ (X \/ (Y \ X)) by Th67 .= (X \ Y) \/ X /\ X \/ (Y \ X) by Th28 .= (X \ (Y \ X)) \/ (Y \ X) by Th64 .= X \+\ (Y \ X) by Th78; end; theorem Th93: X /\ Y = X \+\ (X \ Y) proof A1: X \ Y c= X by Th56; thus X /\ Y = X \ (X \ Y) by Th68 .= (X \ (X \ Y)) \/ [[0]]I by Th22,Th43 .= X \+\ (X \ Y) by A1,Th52; end; theorem Th94: X \ Y = X \+\ (X /\ Y) proof A1: X /\ Y c= X by Th15; thus X \ Y = X \ (X /\ Y) by Th70 .= (X \ (X /\ Y)) \/ [[0]]I by Th22,Th43 .= X \+\ (X /\ Y) by A1,Th52; end; theorem Th95: Y \ X = X \+\ (X \/ Y) proof A1: X c= Y \/ X by Th14; thus Y \ X = ((Y \/ X) \ X) by Th75 .= [[0]]I \/ ((Y \/ X) \ X) by Th22,Th43 .= X \+\ (X \/ Y) by A1,Th52; end; theorem X \/ Y = X \+\ Y \+\ X /\ Y proof thus X \/ Y = X \+\ (Y \ X) by Th92 .= X \+\ (Y \+\ X /\ Y) by Th94 .= X \+\ Y \+\ X /\ Y by Th90; end; theorem X /\ Y = X \+\ Y \+\ (X \/ Y) proof thus X /\ Y = X \+\ (X \ Y) by Th93 .= X \+\ (Y \+\ (X \/ Y)) by Th95 .= X \+\ Y \+\ (X \/ Y) by Th90; end; begin theorem X overlaps Y or X overlaps Z implies X overlaps Y \/ Z proof assume A1: X overlaps Y or X overlaps Z; per cases by A1; suppose X overlaps Y; then consider x such that A2: x in X and A3: x in Y by Th11; x in Y \/ Z by A3,Th7; hence thesis by A2,Th10; end; suppose X overlaps Z; then consider x such that A4: x in X and A5: x in Z by Th11; x in Y \/ Z by A5,Th7; hence thesis by A4,Th10; end; end; theorem Th99: X overlaps Y & Y c= Z implies X overlaps Z proof assume that A1: X overlaps Y and A2: Y c= Z; consider x such that A3: x in X and A4: x in Y by A1,Th11; x in Z by A2,A4,Th9; hence thesis by A3,Th10; end; theorem Th100: X overlaps Y & X c= Z implies Z overlaps Y proof assume that A1: X overlaps Y and A2: X c= Z; consider x such that A3: x in X and A4: x in Y by A1,Th11; x in Z by A2,A3,Th9; hence thesis by A4,Th10; end; theorem Th101: X c= Y & Z c= V & X overlaps Z implies Y overlaps V proof assume that A1: X c= Y and A2: Z c= V; assume X overlaps Z; then Y overlaps Z by A1,Th100; hence thesis by A2,Th99; end; theorem X overlaps Y /\ Z implies X overlaps Y & X overlaps Z proof assume X overlaps Y /\ Z; then consider x such that A1: x in X and A2: x in Y /\ Z by Th11; x in Y & x in Z by A2,Th8; hence thesis by A1,Th10; end; theorem X overlaps Z & X c= V implies X overlaps Z /\ V proof assume that A1: X overlaps Z and A2: X c= V; consider x such that A3: x in X and A4: x in Z by A1,Th11; x in V by A2,A3,Th9; then x in Z /\ V by A4,Th8; hence thesis by A3,Th10; end; theorem X overlaps Y \ Z implies X overlaps Y by Th56,Th99; theorem Y does not overlap Z implies X /\ Y does not overlap X /\ Z proof assume A1: Y does not overlap Z; X /\ Y c= Y & X /\ Z c= Z by Th15; hence thesis by A1,Th101; end; theorem X overlaps Y \ Z implies Y overlaps X \ Z proof assume A1: X overlaps Y \ Z; let i; assume A2: i in I; then X.i meets (Y \ Z).i by A1,Def7; then X.i meets Y.i \ Z.i by A2,Def6; then Y.i meets X.i \ Z.i by XBOOLE_1:81; hence thesis by A2,Def6; end; theorem Th107: X meets Y & Y c= Z implies X meets Z proof assume that A1: X meets Y and A2: Y c= Z; consider i such that A3: i in I and A4: X.i meets Y.i by A1,Def8; take i; Y.i c= Z.i by A2,A3,Def2; hence thesis by A3,A4,XBOOLE_1:63; end; theorem Th108: Y misses X \ Y proof now let i; assume i in I; then (X \ Y).i = X.i \ Y.i by Def6; hence Y.i misses (X \ Y).i by XBOOLE_1:79; end; hence thesis by Def8; end; theorem X /\ Y misses X \ Y proof X /\ Y c= Y & X \ Y misses Y by Th15,Th108; hence thesis by Th107; end; theorem X /\ Y misses X \+\ Y proof now let i; assume i in I; then (X /\ Y).i = X.i /\ Y.i & (X \+\ Y).i = X.i \+\ Y.i by Def5,Th4; hence (X /\ Y).i misses (X \+\ Y).i by XBOOLE_1:103; end; hence thesis by Def8; end; theorem Th111: X misses Y implies X /\ Y = [[0]]I proof assume A1: X misses Y; now let i; assume A2: i in I; then A3: X.i misses Y.i by A1,Def8; thus (X /\ Y).i = X.i /\ Y.i by A2,Def5 .= {} by A3,XBOOLE_0:def 7; end; hence thesis by Th6; end; theorem X <> [[0]]I implies X meets X proof X = X /\ X; hence thesis by Th111; end; theorem X c= Y & X c= Z & Y misses Z implies X = [[0]]I proof assume A1: X c= Y & X c= Z; assume Y misses Z; then Y /\ Z = [[0]]I by Th111; hence thesis by A1,Th17,Th44; end; theorem Z \/ V = X \/ Y & X misses Z & Y misses V implies X = V & Y = Z proof assume A1: Z \/ V = X \/ Y; assume X misses Z & Y misses V; then A2: X /\ Z = [[0]]I & Y /\ V = [[0]]I by Th111; thus X = X /\ (Z \/ V) by Th23,A1,Th14 .= X /\ Z \/ X /\ V by Th32 .= (X \/ Y) /\ V by A2,Th32 .= V by A1,Th14,Th23; thus Y = Y /\ (Z \/ V) by Th23,A1,Th14 .= Y /\ Z \/ Y /\ V by Th32 .= (X \/ Y) /\ Z by A2,Th32 .= Z by A1,Th14,Th23; end; theorem Th115: X misses Y implies X \ Y = X proof assume A1: X misses Y; let i; assume A2: i in I; then A3: (X \ Y).i = X.i \ Y.i by Def6; X.i misses Y.i by A1,A2,Def8; hence (X \ Y).i = X.i by A3,XBOOLE_1:83; end; theorem X misses Y implies (X \/ Y) \ Y = X proof (X \/ Y) \ Y = X \ Y by Th75; hence thesis by Th115; end; theorem X \ Y = X implies X misses Y proof assume A1: X \ Y = X; let i; assume i in I; then X.i \ Y.i = X.i by A1,Def6; hence thesis by XBOOLE_1:83; end; theorem X \ Y misses Y \ X proof let i; assume i in I; then (X \ Y).i = X.i \ Y.i & (Y \ X).i = Y.i \ X.i by Def6; hence thesis by XBOOLE_1:82; end; begin definition let I,X,Y; pred X [= Y means :Def11: for x st x in X holds x in Y; reflexivity; end; theorem X c= Y implies X [= Y proof assume A1: X c= Y; let x such that A2: x in X; let i; assume A3: i in I; then A4: X.i c= Y.i by A1,Def2; x.i in X.i by A2,A3,Def1; hence thesis by A4; end; theorem X [= Y & Y [= Z implies X [= Z proof assume that A1: X [= Y and A2: Y [= Z; let x; assume x in X; then x in Y by A1,Def11; hence thesis by A2,Def11; end; begin theorem [[0]]{} in [[0]]{} proof let i; thus thesis; end; theorem for X being ManySortedSet of {} holds X = {} proof let X be ManySortedSet of {}; dom X = {} by PARTFUN1:def 2; hence thesis by RELAT_1:41; end; reserve I for non empty set, x,X,Y for ManySortedSet of I; theorem X overlaps Y implies X meets Y proof set i = the Element of I; assume X overlaps Y; then X.i meets Y.i by Def7; hence thesis by Def8; end; theorem Th124: not ex x st x in [[0]]I proof set i = the Element of I; given x such that A1: x in [[0]]I; x.i in [[0]]I.i by A1,Def1; hence contradiction by FUNCOP_1:7; end; theorem x in X & x in Y implies X /\ Y <> [[0]]I proof assume x in X & x in Y; then x in X /\ Y by Th8; hence thesis by Th124; end; theorem X does not overlap [[0]]I proof assume X overlaps [[0]]I; then ex x st x in X & x in [[0]]I by Th11; hence contradiction by Th124; end; theorem Th127: X /\ Y = [[0]]I implies X does not overlap Y proof assume A1: X /\ Y = [[0]]I; assume X overlaps Y; then consider x such that A2: x in X & x in Y by Th11; x in X /\ Y by A2,Th8; hence contradiction by A1,Th124; end; theorem X overlaps X implies X <> [[0]]I proof X = X /\ X; hence thesis by Th127; end; begin reserve I for set, x,X,Y,Z for ManySortedSet of I; definition let I be set; let X be ManySortedSet of I; redefine attr X is empty-yielding means for i st i in I holds X.i is empty; compatibility proof dom X = I by PARTFUN1:def 2; hence thesis by FUNCT_1:def 8; end; redefine attr X is non-empty means :Def13: for i st i in I holds X.i is non empty; compatibility proof dom X = I by PARTFUN1:def 2; hence thesis by FUNCT_1:def 9; end; end; registration let I be set; cluster empty-yielding for ManySortedSet of I; existence proof take [[0]]I; let i; assume i in I; thus thesis by Th5; end; cluster non-empty for ManySortedSet of I; existence proof set e = the set; reconsider M = I --> {e} as ManySortedSet of I; take M; let i; assume i in I; hence thesis by FUNCOP_1:7; end; end; registration let I be non empty set; cluster non-empty -> non empty-yielding for ManySortedSet of I; coherence proof set i = the Element of I; let M be ManySortedSet of I; assume A1: M is non-empty; take i; thus i in I; thus thesis by A1,Def13; end; cluster empty-yielding -> non non-empty for ManySortedSet of I; coherence; end; theorem X is empty-yielding iff X = [[0]]I proof hereby assume X is empty-yielding; then for i st i in I holds X.i = {}; hence X = [[0]]I by Th6; end; assume A1: X = [[0]]I; let i; assume i in I; thus thesis by A1,Th5; end; theorem Y is empty-yielding & X c= Y implies X is empty-yielding proof assume A1: Y is empty-yielding & X c= Y; let i; assume i in I; then X.i c= Y.i & Y.i is empty by A1,Def2; hence thesis by XBOOLE_1:3; end; theorem Th131: X is non-empty & X c= Y implies Y is non-empty proof assume A1: X is non-empty & X c= Y; let i; assume i in I; then X.i c= Y.i & X.i is non empty by A1,Def2,Def13; hence thesis by XBOOLE_1:3; end; theorem Th132: X is non-empty & X [= Y implies X c= Y proof assume that A1: X is non-empty and A2: X [= Y; deffunc F(set) = X.$1; A3: for i st i in I holds F(i) <> {} by A1,Def13; consider f being ManySortedSet of I such that A4: for i st i in I holds f.i in F(i) from KuratowskiFunction(A3); let i such that A5: i in I; let e; deffunc G(set) = IFEQ(i,$1,e,f.$1); consider g being Function such that A6: dom g = I and A7: for u st u in I holds g.u = G(u) from FUNCT_1:sch 3; reconsider g as ManySortedSet of I by A6,PARTFUN1:def 2,RELAT_1:def 18; A8: g.i = IFEQ(i,i,e,f.i) by A5,A7 .= e by FUNCOP_1:def 8; assume A9: e in X.i; g in X proof let u such that A10: u in I; per cases; suppose u = i; hence thesis by A8,A9; end; suppose A11: u <> i; g.u = IFEQ(i,u,e,f.u) by A7,A10 .= f.u by A11,FUNCOP_1:def 8; hence thesis by A4,A10; end; end; then g in Y by A2,Def11; hence thesis by A5,A8,Def1; end; theorem X is non-empty & X [= Y implies Y is non-empty proof assume A1: X is non-empty; assume X [= Y; then X c= Y by A1,Th132; hence thesis by A1,Th131; end; reserve X for non-empty ManySortedSet of I; theorem ex x st x in X proof deffunc F(set) = X.$1; A1: for i st i in I holds F(i) <> {} by Def13; consider f being ManySortedSet of I such that A2: for i st i in I holds f.i in F(i) from KuratowskiFunction(A1); take f; let i; thus thesis by A2; end; theorem Th135: (for x holds x in X iff x in Y) implies X = Y proof deffunc F(set) = X.$1; A1: for i st i in I holds F(i) <> {} by Def13; consider f being ManySortedSet of I such that A2: for i st i in I holds f.i in F(i) from KuratowskiFunction(A1); assume A3: for x holds x in X iff x in Y; now let i such that A4: i in I; now let e; deffunc G(set) = IFEQ(i,$1,e,f.$1); consider g being Function such that A5: dom g = I and A6: for u st u in I holds g.u = G(u) from FUNCT_1:sch 3; reconsider g as ManySortedSet of I by A5,PARTFUN1:def 2,RELAT_1:def 18; A7: g.i = IFEQ(i,i,e,f.i) by A4,A6 .= e by FUNCOP_1:def 8; hereby assume A8: e in X.i; g in X proof let u such that A9: u in I; per cases; suppose u = i; hence thesis by A7,A8; end; suppose A10: u <> i; g.u = IFEQ(i,u,e,f.u) by A6,A9 .= f.u by A10,FUNCOP_1:def 8; hence thesis by A2,A9; end; end; then g in Y by A3; hence e in Y.i by A4,A7,Def1; end; assume A11: e in Y.i; g in Y proof let u such that A12: u in I; per cases; suppose u = i; hence thesis by A7,A11; end; suppose A13: u <> i; f in X by A2,Def1; then A14: f in Y by A3; g.u = IFEQ(i,u,e,f.u) by A6,A12 .= f.u by A13,FUNCOP_1:def 8; hence thesis by A12,A14,Def1; end; end; then g in X by A3; hence e in X.i by A4,A7,Def1; end; hence X.i = Y.i by TARSKI:1; end; hence thesis by Th3; end; theorem (for x holds x in X iff x in Y & x in Z) implies X = Y /\ Z proof assume A1: for x holds x in X iff x in Y & x in Z; now let x; hereby assume x in X; then x in Y & x in Z by A1; hence x in Y /\ Z by Th8; end; assume x in Y /\ Z; then x in Y & x in Z by Th8; hence x in X by A1; end; hence thesis by Th135; end; begin scheme MSSEx { I() -> set, P[set,set] }: ex f being ManySortedSet of I() st for i st i in I() holds P[i,f.i] provided A1: for i st i in I() ex j st P[i,j] proof A2: for i st i in I() ex j st P[i,j] by A1; consider f being Function such that A3: dom f = I() and A4: for i st i in I() holds P[i,f.i] from CLASSES1:sch 1(A2); reconsider f as ManySortedSet of I() by A3,PARTFUN1:def 2,RELAT_1:def 18; take f; thus thesis by A4; end; scheme MSSLambda { I() -> set, F(set) -> set }: ex f being ManySortedSet of I() st for i st i in I() holds f.i = F(i) proof consider f being Function such that A1: dom f = I() and A2: for i st i in I() holds f.i = F(i) from FUNCT_1:sch 3; reconsider f as ManySortedSet of I() by A1,PARTFUN1:def 2,RELAT_1:def 18; take f; thus thesis by A2; end; registration let I be set; cluster Function-yielding for ManySortedSet of I; existence proof set f = the Function; reconsider F = I --> f as ManySortedSet of I; take F; let x be set; assume x in dom F; thus thesis; end; end; definition let I be set; mode ManySortedFunction of I is Function-yielding ManySortedSet of I; end; theorem not ex M being non-empty ManySortedSet of I st {} in rng M proof let M be non-empty ManySortedSet of I; A1: dom M = I by PARTFUN1:def 2; assume {} in rng M; then ex i st i in I & M.i = {} by A1,FUNCT_1:def 3; hence contradiction by Def13; end; definition let I be set; let M be ManySortedSet of I; mode Component of M is Element of rng M; end; theorem for I being non empty set for M being ManySortedSet of I, A being Component of M ex i st i in I & A = M.i proof let I be non empty set; let M be ManySortedSet of I, A be Component of M; A1: dom M = I by PARTFUN1:def 2; then rng M <> {} by RELAT_1:42; hence thesis by A1,FUNCT_1:def 3; end; theorem for M being ManySortedSet of I, i st i in I holds M.i is Component of M proof let M be ManySortedSet of I, i; assume A1: i in I; dom M = I by PARTFUN1:def 2; hence thesis by A1,FUNCT_1:def 3; end; definition let I; let B be ManySortedSet of I; mode Element of B -> ManySortedSet of I means for i st i in I holds it.i is Element of B.i; existence proof defpred Q[set,set] means $2 is Element of B.$1; A1: for i st i in I ex j st Q[i,j] proof let i such that i in I; set j = the Element of B.i; reconsider j as set; take j; thus thesis; end; thus ex f being ManySortedSet of I st for i st i in I holds Q[i,f.i] from MSSEx(A1); end; end; begin definition let I; let A be ManySortedSet of I, B be ManySortedSet of I; mode ManySortedFunction of A,B -> ManySortedSet of I means :Def15: for i st i in I holds it.i is Function of A.i, B.i; correctness proof defpred P[set,set] means $2 is Function of A.$1,B.$1; A1: for i st i in I ex j st P[i,j] proof let i such that i in I; set j = the Function of A.i,B.i; reconsider j as set; take j; thus thesis; end; consider f being ManySortedSet of I such that A2: for i st i in I holds P[i,f.i] from MSSEx(A1); f is Function-yielding proof let i; assume i in dom f; then i in I by PARTFUN1:def 2; hence thesis by A2; end; then reconsider f as ManySortedFunction of I; take f; let i; assume i in I; hence thesis by A2; end; end; registration let I; let A be ManySortedSet of I, B be ManySortedSet of I; cluster ->Function-yielding for ManySortedFunction of A,B; coherence proof let f be ManySortedFunction of A,B; let i be set; assume i in dom f; then i in I by PARTFUN1:def 2; hence thesis by Def15; end; end; registration let I be set; let J be non empty set; let O be Function of I,J; let F be ManySortedSet of J; cluster F*O -> total for I-defined Function; coherence proof A1: dom F = J by PARTFUN1:def 2; rng O c= J & dom O = I by FUNCT_2:def 1,RELAT_1:def 19; then dom(F*O) = I by A1,RELAT_1:27; hence thesis by PARTFUN1:def 2; end; end; reserve D for non empty set, n for Nat; scheme LambdaDMS {D()->non empty set, F(set)->set}: ex X be ManySortedSet of D() st for d be Element of D() holds X.d = F(d) proof consider f be Function such that A1: dom f = D() and A2: for d be Element of D() holds f.d = F(d) from FUNCT_1:sch 4; f is ManySortedSet of D() by A1,PARTFUN1:def 2,RELAT_1:def 18; hence thesis by A2; end; registration let J be non empty set, B be non-empty ManySortedSet of J, j be Element of J; cluster B.j -> non empty; coherence by Def13; end; reserve X,Y for ManySortedSet of I; definition let I, X,Y; func [|X,Y|] -> ManySortedSet of I means for i st i in I holds it.i = [:X.i,Y.i:]; existence proof deffunc F(set) = [:X.$1,Y.$1:]; consider f be Function such that A1: dom f = I & for i st i in I holds f.i = F(i) from FUNCT_1:sch 3; reconsider f as ManySortedSet of I by A1,PARTFUN1:def 2,RELAT_1:def 18; take f; thus thesis by A1; end; uniqueness proof let f,g be ManySortedSet of I; assume that A2: for i st i in I holds f.i = [:X.i,Y.i:] and A3: for i st i in I holds g.i = [:X.i,Y.i:]; for x be set st x in I holds f.x = g.x proof let x be set; assume A4: x in I; then f.x = [:X.x,Y.x:] by A2; hence thesis by A3,A4; end; hence thesis by Th3; end; end; definition let I, X, Y; deffunc F(set) = Funcs(X.$1,Y.$1); func (Funcs) (X,Y) -> ManySortedSet of I means for i be set st i in I holds it.i = Funcs(X.i,Y.i); existence proof thus ex M being ManySortedSet of I st for i be set st i in I holds M.i = F (i) from MSSLambda; end; uniqueness proof let F1, F2 be ManySortedSet of I such that A1: for i be set st i in I holds F1.i = Funcs(X.i, Y.i) and A2: for i be set st i in I holds F2.i = Funcs(X.i, Y.i); now let i be set; assume A3: i in I; hence F1.i = Funcs(X.i, Y.i) by A1 .= F2.i by A2,A3; end; hence thesis by Th3; end; end; definition let I be set, M be ManySortedSet of I; mode ManySortedSubset of M -> ManySortedSet of I means :Def18: it c= M; existence; end; registration let I be set, M be non-empty ManySortedSet of I; cluster non-empty for ManySortedSubset of M; existence proof reconsider N= M as ManySortedSubset of M by Def18; take N; thus thesis; end; end; definition let F,G be Function-yielding Function; func G**F -> Function means :Def19: dom it = (dom F) /\ (dom G) & for i be set st i in dom it holds it.i = (G.i)*(F.i); existence proof defpred P[set,set] means $2 = (G.$1)*(F.$1); A1: for i be set st i in dom F /\ dom G ex u be set st P[i,u]; ex H being Function st dom H = dom F /\ dom G & for i be set st i in dom F /\ dom G holds P[i,H.i] from CLASSES1:sch 1(A1); hence thesis; end; uniqueness proof let H1,H2 be Function; assume that A2: dom H1 = dom F /\ dom G and A3: for i be set st i in dom H1 holds H1.i = (G.i)*(F.i) and A4: dom H2 = dom F /\ dom G and A5: for i be set st i in dom H2 holds H2.i = (G.i)*(F.i); now let i be set; reconsider f = F.i as Function; reconsider g = G.i as Function; assume A6: i in dom F /\ dom G; then H1.i = g*f by A2,A3; hence H1.i = H2.i by A4,A5,A6; end; hence thesis by A2,A4,FUNCT_1:2; end; end; registration let F,G be Function-yielding Function; cluster G**F -> Function-yielding; coherence proof set H = G**F; let x be set; reconsider f = F.x as Function; reconsider g = G.x as Function; assume x in dom H; then H.x = g*f by Def19; hence thesis; end; end; definition let I be set, A be ManySortedSet of I, F be ManySortedFunction of I; func F.:.:A -> ManySortedSet of I means for i be set st i in I holds it.i = (F.i).:(A.i); existence proof defpred P[set,set] means $2 = (F.$1).:(A.$1); A1: for i be set st i in I ex u be set st P[i,u]; consider g being Function such that A2: dom g = I & for i be set st i in I holds P[i,g.i] from CLASSES1: sch 1( A1); reconsider g as ManySortedSet of I by A2,PARTFUN1:def 2,RELAT_1:def 18; take g; thus thesis by A2; end; uniqueness proof let B,B1 be ManySortedSet of I; assume that A3: for i be set st i in I holds B.i = (F.i).:(A.i) and A4: for i be set st i in I holds B1.i = (F.i).:(A.i); now let i be set; reconsider f = F.i as Function; assume A5: i in I; then B.i = f.:(A.i) by A3; hence B.i = B1.i by A4,A5; end; hence thesis by Th3; end; end; registration let I; cluster [[0]]I -> empty-yielding; coherence proof rng [[0]]I c= {{}} by FUNCOP_1:13; hence thesis by RELAT_1:def 15; end; end; scheme MSSExD { I() -> non empty set, P[set,set] }: ex f being ManySortedSet of I() st for i being Element of I() holds P[i,f.i] provided A1: for i being Element of I() ex j being set st P[i,j] proof defpred Z[set,set] means P[ $1,$2]; A2: for i being set st i in I() ex j being set st Z[i,j] by A1; consider f being ManySortedSet of I() such that A3: for i being set st i in I() holds Z[i,f.i] from MSSEx(A2); take f; let i be Element of I(); thus thesis by A3; end; registration let A be non empty set; cluster non-empty -> non empty-yielding for ManySortedSet of A; coherence; end; registration let X be non empty set; cluster -> non empty for ManySortedSet of X; coherence proof set x = the Element of X; let f be ManySortedSet of X; dom f = X by PARTFUN1:def 2; then [x,f.x] in f by FUNCT_1:def 2; hence thesis; end; end; theorem for F, G, H be Function-yielding Function holds (H ** G) ** F = H ** (G ** F) proof let F, G, H be Function-yielding Function; set f = (H ** G) ** F, g = H ** (G ** F); now A1: dom f = (dom (H ** G)) /\ dom F by Def19 .= (dom H) /\ (dom G) /\ (dom F) by Def19; then A2: dom f = (dom H) /\ ((dom G) /\ dom F) by XBOOLE_1:16; hence A3: dom f = (dom H) /\ (dom (G ** F)) by Def19 .= dom g by Def19; let x be set; assume A4: x in dom f; then x in (dom H) /\ (dom G) by A1,XBOOLE_0:def 4; then A5: x in dom (H ** G) by Def19; x in (dom G) /\ (dom F) by A2,A4,XBOOLE_0:def 4; then A6: x in dom (G ** F) by Def19; thus f.x = ((H**G).x) * (F.x) by A4,Def19 .= (H.x)*(G.x)*(F.x) by A5,Def19 .= (H.x)*((G.x)*(F.x)) by RELAT_1:36 .= (H.x)*((G**F).x) by A6,Def19 .= g.x by A3,A4,Def19; end; hence thesis by FUNCT_1:2; end; registration let I be set, f be non-empty ManySortedSet of I; cluster total for I-defined f-compatible Function; existence proof deffunc F(set) = f.$1; A1: for e st e in I holds F(e) <> {}; consider g being ManySortedSet of I such that A2: for e st e in I holds g.e in F(e) from KuratowskiFunction(A1); g is f-compatible proof let x be set; assume x in dom g; then x in I by PARTFUN1:def 2; hence g.x in f.x by A2; end; then reconsider g as I-defined f-compatible Function; take g; thus g is total; end; end; theorem for I being set, f being non-empty ManySortedSet of I for p being f-compatible I-defined Function ex s being f-compatible ManySortedSet of I st p c= s proof let I be set, f being non-empty ManySortedSet of I; let p be f-compatible I-defined Function; set h = the (f)-compatible ManySortedSet of I; take h+*p; thus p c= h+*p by FUNCT_4:25; end; theorem for I,A be set for s,ss being ManySortedSet of I holds (ss +* s | A) | A = s | A proof let I,A be set; let s,ss be ManySortedSet of I; dom s = I by PARTFUN1:def 2 .= dom ss by PARTFUN1:def 2; then A /\ dom ss c= A /\ dom s; hence thesis by FUNCT_4:88; end; registration let X be non empty set, Y be set; cluster X-valued for ManySortedSet of Y; existence proof take M = Y --> the Element of X; A1: {the Element of X} c= X by ZFMISC_1:31; rng M c= {the Element of X} by FUNCOP_1:13; hence rng M c= X by A1,XBOOLE_1:1; end; end; theorem for I,Y being non empty set, M be Y-valued ManySortedSet of I, x be Element of I holds M.x = M/.x proof let I,Y be non empty set, M be Y-valued ManySortedSet of I, x be Element of I; dom M = I by PARTFUN1:def 2; hence M.x = M/.x by PARTFUN1:def 6; end; theorem for f being Function, M being ManySortedSet of I holds (f+*M)|I = M proof let f be Function, M be ManySortedSet of I; A1: dom(f|I) c= I by RELAT_1:58; A2: dom M = I by PARTFUN1:def 2; thus (f+*M)|I = f|I +* M|I by FUNCT_4:71 .= f|I +* M by A2,RELAT_1:69 .= M by A1,A2,FUNCT_4:19; end; theorem for I being set, Y being non empty set for p being Y-valued I-defined Function ex s being Y-valued ManySortedSet of I st p c= s proof let I be set, Y being non empty set; let p be Y-valued I-defined Function; set h = the Y-valued ManySortedSet of I; take h+*p; thus p c= h+*p by FUNCT_4:25; end; theorem X c= Y & Y c= X implies X = Y by Lm1; definition let I be non empty set, A,B be ManySortedSet of I; redefine pred A = B means for i being Element of I holds A.i = B.i; compatibility proof thus A = B implies for i being Element of I holds A.i = B.i; assume for i being Element of I holds A.i = B.i; then for i being set st i in I holds A.i = B.i; hence thesis by Th3; end; end; begin reserve A,B,C for Ordinal, K,L,M,N for Cardinal, x,y,y1,y2,z,u,X,Y,Z,Z1,Z2 for set, n for Nat, f,f1,g,h for Function, Q,R for Relation; definition let IT be Function; attr IT is Cardinal-yielding means :Def1: for x st x in dom IT holds IT.x is Cardinal; end; registration cluster empty -> Cardinal-yielding for Function; coherence proof let f such that A1: f is empty; let x; thus thesis by A1; end; end; registration cluster Cardinal-yielding for Function; existence proof take {}; thus thesis; end; end; definition mode Cardinal-Function is Cardinal-yielding Function; end; reserve ff for Cardinal-Function; registration let ff,X; cluster ff|X -> Cardinal-yielding; coherence proof ff|X is Cardinal-yielding proof let x; assume A1: x in dom(ff|X); then A2: (ff|X).x = ff.x by FUNCT_1:47; dom(ff|X) = dom ff /\ X by RELAT_1:61; then x in dom ff by A1,XBOOLE_0:def 4; hence thesis by A2,Def1; end; hence thesis; end; end; registration let X,K; cluster X --> K -> Cardinal-yielding; coherence proof let x; assume x in dom(X --> K); hence thesis by FUNCOP_1:7; end; end; registration let X,K; cluster X .--> K -> Cardinal-yielding; coherence; end; scheme CFLambda { A()->set, F(set)->Cardinal } : ex ff st dom ff = A() & for x st x in A() holds ff.x = F(x) proof consider f such that A1: dom f = A() & for x st x in A() holds f.x = F(x) from FUNCT_1:sch 3; f is Cardinal-yielding proof let x; assume x in dom f; then f.x = F(x) by A1; hence thesis; end; then reconsider f as Cardinal-Function; take f; thus thesis by A1; end; definition let f; func Card f -> Cardinal-Function means : Def2: dom it = dom f & for x st x in dom f holds it.x = card(f.x); existence proof deffunc f(set) = card (f.$1); thus ex g being Cardinal-Function st dom g = dom f & for x st x in dom f holds g.x = f(x) from CFLambda; end; uniqueness proof let a1,a2 be Cardinal-Function such that A1: dom a1 = dom f and A2: for x st x in dom f holds a1.x = card(f.x) and A3: dom a2 = dom f and A4: for x st x in dom f holds a2.x = card(f.x); now let x; assume A5: x in dom f; then a1.x = card(f.x) by A2; hence a1.x = a2.x by A4,A5; end; hence thesis by A1,A3,FUNCT_1:2; end; func disjoin f -> Function means : Def3: dom it = dom f & for x st x in dom f holds it.x = [:f.x,{x}:]; existence proof deffunc f(set) = [:f.$1,{$1}:]; thus ex g being Function st dom g = dom f & for x st x in dom f holds g.x = f(x) from FUNCT_1:sch 3; end; uniqueness proof let a1,a2 be Function such that A6: dom a1 = dom f and A7: for x st x in dom f holds a1.x = [:f.x,{x}:] and A8: dom a2 = dom f and A9: for x st x in dom f holds a2.x = [:f.x,{x}:]; now let x; assume A10: x in dom f; then a1.x = [:f.x,{x}:] by A7; hence a1.x = a2.x by A9,A10; end; hence thesis by A6,A8,FUNCT_1:2; end; func Union f -> set equals union rng f; correctness; defpred P[set] means ex g st $1 = g & dom g = dom f & for x st x in dom f holds g.x in f.x; func product f -> set means : Def5: x in it iff ex g st x = g & dom g = dom f & for y st y in dom f holds g.y in f.y; existence proof consider X such that A11: x in X iff x in Funcs(dom f, union rng f) & P[x] from XBOOLE_0:sch 1; take X; let x; thus x in X implies ex g st x = g & dom g = dom f & for x st x in dom f holds g.x in f.x by A11; given g such that A12: x = g and A13: dom g = dom f and A14: for x st x in dom f holds g.x in f.x; rng g c= union rng f proof let y; assume y in rng g; then consider z such that A15: z in dom g and A16: y = g.z by FUNCT_1:def 3; A17: y in f.z by A13,A14,A15,A16; f.z in rng f by A13,A15,FUNCT_1:def 3; hence thesis by A17,TARSKI:def 4; end; then x in Funcs(dom f, union rng f) by A12,A13,FUNCT_2:def 2; hence thesis by A11,A12,A13,A14; end; uniqueness proof let X1,X2 be set such that A18: x in X1 iff P[x] and A19: x in X2 iff P[x]; thus thesis from XBOOLE_0:sch 2(A18,A19); end; end; theorem Th1: Card ff = ff proof now let x; assume x in dom ff; then reconsider M = ff.x as Cardinal by Def1; card M = M by CARD_1:def 2; hence ff.x = card (ff.x); end; hence thesis by Def2; end; theorem Card (X --> Y) = X --> card Y proof A1: dom Card (X --> Y) = dom(X --> Y) by Def2; then A2: dom Card (X --> Y) = X by FUNCOP_1:13; A3: dom (X --> card Y) = X by FUNCOP_1:13; now let x; assume A4: x in X; then A5: Card (X --> Y).x = card ((X --> Y).x) by A1,A2,Def2; (X --> card Y).x = card Y by A4,FUNCOP_1:7; hence Card (X --> Y).x = (X --> card Y).x by A4,A5,FUNCOP_1:7; end; hence thesis by A2,A3,FUNCT_1:2; end; theorem disjoin {} = {} proof dom disjoin {} = {} by Def3,RELAT_1:38; hence thesis; end; theorem Th4: disjoin (x .--> X) = x .--> [:X,{x}:] proof A1: dom disjoin ({x} --> X) = dom ({x} --> X) by Def3; A2: dom ({x} --> X) = {x} by FUNCOP_1:13; A3: dom ({x} --> [:X,{x}:]) = {x} by FUNCOP_1:13; now let y; assume A4: y in {x}; then A5: disjoin ({x} --> X).y = [:({x} --> X).y,{y}:] by A2,Def3; A6: ({x} --> X).y = X by A4,FUNCOP_1:7; ({x} --> [:X,{x}:]).y = [:X,{x}:] by A4,FUNCOP_1:7; hence disjoin ({x} --> X).y = ({x} --> [:X,{x}:]).y by A4,A5,A6, TARSKI:def 1; end; hence thesis by A1,A2,A3,FUNCT_1:2; end; theorem x in dom f & y in dom f & x <> y implies (disjoin f).x misses (disjoin f).y proof assume that A1: x in dom f and A2: y in dom f and A3: x <> y; set z = the Element of ((disjoin f).x) /\ ((disjoin f).y); assume A4: ((disjoin f).x) /\ ((disjoin f).y) <> {}; A5: (disjoin f).x = [:f.x,{x}:] by A1,Def3; A6: (disjoin f).y = [:f.y,{y}:] by A2,Def3; A7: z in (disjoin f).x by A4,XBOOLE_0:def 4; A8: z in (disjoin f).y by A4,XBOOLE_0:def 4; A9: z`2 in {x} by A5,A7,MCART_1:10; A10: z`2 in {y} by A6,A8,MCART_1:10; z`2 = x by A9,TARSKI:def 1; hence contradiction by A3,A10,TARSKI:def 1; end; theorem Th6: Union (X --> Y) c= Y proof let x; assume x in Union (X --> Y); then consider Z such that A1: x in Z and A2: Z in rng (X --> Y) by TARSKI:def 4; ex z st z in dom (X --> Y) & Z = (X --> Y).z by A2,FUNCT_1:def 3; hence thesis by A1,FUNCOP_1:7; end; theorem Th7: X <> {} implies Union (X --> Y) = Y proof assume A1: X <> {}; set x = the Element of X; thus Union (X --> Y) c= Y by Th6; A2: dom (X --> Y) = X by FUNCOP_1:13; (X --> Y).x = Y by A1,FUNCOP_1:7; then Y in rng (X --> Y) by A1,A2,FUNCT_1:def 3; hence thesis by ZFMISC_1:74; end; theorem Union (x .--> Y) = Y by Th7; theorem Th9: g in product f iff dom g = dom f & for x st x in dom f holds g.x in f.x proof thus g in product f implies dom g = dom f & for x st x in dom f holds g.x in f.x proof assume g in product f; then ex h being Function st g = h & dom h = dom f & for x st x in dom f holds h.x in f.x by Def5; hence thesis; end; thus thesis by Def5; end; theorem Th10: product {} = {{}} proof thus product {} c= {{}} proof let x; assume x in product {}; then ex g st x = g & dom g = dom {} & for y st y in dom {} holds g.y in {} .y by Def5; then x = {}; hence thesis by TARSKI:def 1; end; let x; assume x in {{}}; then A1: x = {} by TARSKI:def 1; for y st y in dom {} holds {} .y in {} .y; hence thesis by A1,Th9; end; theorem Th11: Funcs(X,Y) = product (X --> Y) proof set f = (X --> Y); A1: dom f = X by FUNCOP_1:13; thus Funcs(X,Y) c= product f proof let x; assume x in Funcs(X,Y); then consider g such that A2: x = g and A3: dom g = X and A4: rng g c= Y by FUNCT_2:def 2; now let y; assume A5: y in dom f; then A6: f.y = Y by FUNCOP_1:7; g.y in rng g by A3,A5,FUNCT_1:def 3; hence g.y in f.y by A4,A6; end; hence thesis by A1,A2,A3,Def5; end; let x; assume x in product f; then consider g such that A7: x = g and A8: dom g = dom f and A9: for x st x in dom f holds g.x in f.x by Def5; rng g c= Y proof let y; assume y in rng g; then consider z such that A10: z in dom g and A11: y = g.z by FUNCT_1:def 3; y in f.z by A8,A9,A10,A11; hence thesis by A8,A10,FUNCOP_1:7; end; hence thesis by A1,A7,A8,FUNCT_2:def 2; end; defpred P[set] means $1 is Function; definition let x,X; defpred R[set,set] means ex g st $1 = g & $2 = g.x; func pi(X,x) -> set means : Def6: y in it iff ex f st f in X & y = f.x; existence proof consider Y such that A1: y in Y iff y in X & P[y] from XBOOLE_0:sch 1; A2: for y st y in Y ex z st R[y,z] proof let y; assume y in Y; then reconsider y as Function by A1; take y.x, y; thus thesis; end; consider f such that A3: dom f = Y & for y st y in Y holds R[y,f.y] from CLASSES1:sch 1(A2); take rng f; let y; thus y in rng f implies ex f st f in X & y = f.x proof assume y in rng f; then consider z such that A4: z in dom f and A5: y = f.z by FUNCT_1:def 3; consider g such that A6: z = g and A7: f.z = g.x by A3,A4; take g; thus thesis by A1,A3,A4,A5,A6,A7; end; given g such that A8: g in X and A9: y = g.x; A10: g in Y by A1,A8; then ex f1 st g = f1 & f.g = f1.x by A3; hence thesis by A3,A9,A10,FUNCT_1:def 3; end; uniqueness proof defpred Z[set] means ex f st f in X & $1 = f.x; let X1,X2 be set such that A11: y in X1 iff Z[y] and A12: y in X2 iff Z[y]; thus thesis from XBOOLE_0:sch 2(A11,A12); end; end; theorem x in dom f & product f <> {} implies pi(product f,x) = f.x proof assume that A1: x in dom f and A2: product f <> {}; A3: pi(product f,x) c= f.x proof let y; assume y in pi(product f,x); then ex g st g in product f & y = g.x by Def6; hence thesis by A1,Th9; end; f.x c= pi(product f,x) proof set z = the Element of product f; consider g such that z = g and A4: dom g = dom f and A5: for x st x in dom f holds g.x in f.x by A2,Def5; let y; deffunc f(set) = y; deffunc g(set) = g.$1; defpred C[set] means x = $1; consider h being Function such that A6: dom h = dom g & for z st z in dom g holds (C[z] implies h.z = f(z)) & (not C[z] implies h.z = g(z)) from PARTFUN1:sch 1; assume A7: y in f.x; now let z; assume A8: z in dom f; then x <> z implies g.z = h.z by A4,A6; hence h.z in f.z by A4,A5,A6,A7,A8; end; then A9: h in product f by A4,A6,Th9; h.x = y by A1,A4,A6; hence thesis by A9,Def6; end; hence thesis by A3,XBOOLE_0:def 10; end; theorem pi({},x) = {} proof set y = the Element of pi({},x); assume not thesis; then ex f st f in {} & y = f.x by Def6; hence contradiction; end; theorem pi({g},x) = {g.x} proof thus pi({g},x) c= {g.x} proof let y; assume y in pi({g},x); then consider f such that A1: f in {g} and A2: y = f.x by Def6; f = g by A1,TARSKI:def 1; hence thesis by A2,TARSKI:def 1; end; let y; assume A3: y in {g.x}; A4: g in {g} by TARSKI:def 1; y = g.x by A3,TARSKI:def 1; hence thesis by A4,Def6; end; theorem pi({f,g},x) = {f.x,g.x} proof thus pi({f,g},x) c= {f.x,g.x} proof let y; assume y in pi({f,g},x); then consider f1 such that A1: f1 in {f,g} and A2: y = f1.x by Def6; f1 = f or f1 = g by A1,TARSKI:def 2; hence thesis by A2,TARSKI:def 2; end; let y; assume A3: y in {f.x,g.x}; A4: f in {f,g} by TARSKI:def 2; A5: g in {f,g} by TARSKI:def 2; y = g.x or y = f.x by A3,TARSKI:def 2; hence thesis by A4,A5,Def6; end; theorem Th16: pi(X \/ Y,x) = pi(X,x) \/ pi(Y,x) proof thus pi(X \/ Y,x) c= pi(X,x) \/ pi(Y,x) proof let y; assume y in pi(X \/ Y,x); then consider f such that A1: f in X \/ Y and A2: y = f.x by Def6; f in X or f in Y by A1,XBOOLE_0:def 3; then y in pi(X,x) or y in pi(Y,x) by A2,Def6; hence thesis by XBOOLE_0:def 3; end; let y; assume y in pi(X,x) \/ pi(Y,x); then A3: y in pi(X,x) or y in pi(Y,x) by XBOOLE_0:def 3; A4: now assume y in pi(X,x); then consider f such that A5: f in X and A6: y = f.x by Def6; f in X \/ Y by A5,XBOOLE_0:def 3; hence thesis by A6,Def6; end; now assume not y in pi(X,x); then consider f such that A7: f in Y and A8: y = f.x by A3,Def6; f in X \/ Y by A7,XBOOLE_0:def 3; hence thesis by A8,Def6; end; hence thesis by A4; end; theorem pi(X /\ Y,x) c= pi(X,x) /\ pi(Y,x) proof let y; assume y in pi(X /\ Y,x); then consider f such that A1: f in X /\ Y and A2: y = f.x by Def6; A3: f in X by A1,XBOOLE_0:def 4; A4: f in Y by A1,XBOOLE_0:def 4; A5: y in pi(X,x) by A2,A3,Def6; y in pi(Y,x) by A2,A4,Def6; hence thesis by A5,XBOOLE_0:def 4; end; theorem Th18: pi(X,x) \ pi(Y,x) c= pi(X \ Y,x) proof let y; assume A1: y in pi(X,x) \ pi(Y,x); then consider f such that A2: f in X and A3: y = f.x by Def6; not y in pi(Y,x) by A1,XBOOLE_0:def 5; then not f in Y by A3,Def6; then f in X \ Y by A2,XBOOLE_0:def 5; hence thesis by A3,Def6; end; theorem pi(X,x) \+\ pi(Y,x) c= pi(X \+\ Y,x) proof A1: pi(X,x) \ pi(Y,x) c= pi(X\Y,x) by Th18; A2: pi(Y,x) \ pi(X,x) c= pi(Y\X,x) by Th18; pi(X\Y,x) \/ pi(Y\X,x) = pi((X\Y) \/ (Y\X),x) by Th16; hence thesis by A1,A2,XBOOLE_1:13; end; theorem Th20: card pi(X,x) c= card X proof consider Y such that A1: y in Y iff y in X & P[y] from XBOOLE_0:sch 1; defpred R[set,set] means ex g st $1 = g & $2 = g.x; A2: for y st y in Y ex z st R[y,z] proof let y; assume y in Y; then reconsider y as Function by A1; take y.x, y; thus thesis; end; consider f such that A3: dom f = Y & for y st y in Y holds R[y,f.y] from CLASSES1:sch 1(A2); now let y; thus y in rng f implies ex f st f in X & y = f.x proof assume y in rng f; then consider z such that A4: z in dom f and A5: y = f.z by FUNCT_1:def 3; consider g such that A6: z = g and A7: f.z = g.x by A3,A4; take g; thus thesis by A1,A3,A4,A5,A6,A7; end; given g such that A8: g in X and A9: y = g.x; A10: g in Y by A1,A8; then ex f1 st g = f1 & f.g = f1.x by A3; hence y in rng f by A3,A9,A10,FUNCT_1:def 3; end; then rng f = pi(X,x) by Def6; then A11: card pi(X,x) c= card Y by A3,CARD_1:12; Y c= X proof let x; thus thesis by A1; end; then card Y c= card X by CARD_1:11; hence thesis by A11,XBOOLE_1:1; end; theorem Th21: x in Union disjoin f implies ex y,z st x = [y,z] proof assume x in Union disjoin f; then consider X such that A1: x in X and A2: X in rng disjoin f by TARSKI:def 4; consider y such that A3: y in dom disjoin f and A4: X = (disjoin f).y by A2,FUNCT_1:def 3; y in dom f by A3,Def3; then X = [:f.y,{y}:] by A4,Def3; hence thesis by A1,RELAT_1:def 1; end; theorem Th22: x in Union disjoin f iff x`2 in dom f & x`1 in f.(x`2) & x = [x`1,x`2] proof thus x in Union disjoin f implies x`2 in dom f & x`1 in f.(x`2) & x = [x`1,x`2] proof assume x in Union disjoin f; then consider X such that A1: x in X and A2: X in rng disjoin f by TARSKI:def 4; consider y such that A3: y in dom disjoin f and A4: X = (disjoin f).y by A2,FUNCT_1:def 3; A5: y in dom f by A3,Def3; then A6: X = [:f.y,{y}:] by A4,Def3; then A7: x`1 in f.y by A1,MCART_1:10; x`2 in {y} by A1,A6,MCART_1:10; hence thesis by A1,A5,A6,A7,MCART_1:21,TARSKI:def 1; end; assume that A8: x`2 in dom f and A9: x`1 in f.(x`2) and A10: x = [x`1,x`2]; A11: (disjoin f).(x`2) = [:f.(x`2),{x`2}:] by A8,Def3; A12: dom f = dom disjoin f by Def3; x`2 in {x`2} by TARSKI:def 1; then A13: x in [:f.(x`2),{x`2}:] by A9,A10,ZFMISC_1:87; [:f.(x`2),{x`2}:] in rng disjoin f by A8,A11,A12,FUNCT_1:def 3; hence thesis by A13,TARSKI:def 4; end; theorem Th23: f c= g implies disjoin f c= disjoin g proof assume A1: f c= g; then A2: dom f c= dom g by GRFUNC_1:2; A3: dom disjoin f = dom f by Def3; A4: dom disjoin g = dom g by Def3; now let x; assume A5: x in dom disjoin f; then A6: (disjoin f).x = [:f.x,{x}:] by A3,Def3; f.x = g.x by A1,A3,A5,GRFUNC_1:2; hence (disjoin f).x = (disjoin g).x by A2,A3,A5,A6,Def3; end; hence thesis by A2,A3,A4,GRFUNC_1:2; end; theorem Th24: f c= g implies Union f c= Union g proof assume A1: f c= g; then A2: dom f c= dom g by GRFUNC_1:2; let x; assume x in Union f; then consider X such that A3: x in X and A4: X in rng f by TARSKI:def 4; consider y such that A5: y in dom f and A6: X = f.y by A4,FUNCT_1:def 3; f.y = g.y by A1,A5,GRFUNC_1:2; then X in rng g by A2,A5,A6,FUNCT_1:def 3; hence thesis by A3,TARSKI:def 4; end; theorem Union disjoin (Y --> X) = [:X,Y:] proof set f = Y --> X; A1: dom f = Y by FUNCOP_1:13; thus Union disjoin f c= [:X,Y:] proof let x; assume x in Union disjoin f; then consider Z such that A2: x in Z and A3: Z in rng disjoin f by TARSKI:def 4; consider y such that A4: y in dom disjoin f and A5: Z = (disjoin f).y by A3,FUNCT_1:def 3; A6: y in Y by A1,A4,Def3; then A7: Z = [:f.y,{y}:] by A1,A5,Def3; A8: f.y = X by A6,FUNCOP_1:7; {y} c= Y by A6,ZFMISC_1:31; then Z c= [:X,Y:] by A7,A8,ZFMISC_1:95; hence thesis by A2; end; let x1,x2 be set; assume A9: [x1,x2] in [:X,Y:]; then A10: x1 in X by ZFMISC_1:87; A11: x2 in Y by A9,ZFMISC_1:87; then A12: f.x2 = X by FUNCOP_1:7; A13: (disjoin f).(x2) = [:f.x2,{x2}:] by A1,A11,Def3; A14: x2 in dom disjoin f by A1,A11,Def3; x2 in {x2} by TARSKI:def 1; then A15: [x1,x2] in [:f.x2,{x2}:] by A10,A12,ZFMISC_1:87; [:f.x2,{x2}:] in rng disjoin f by A13,A14,FUNCT_1:def 3; hence thesis by A15,TARSKI:def 4; end; theorem Th26: product f = {} iff {} in rng f proof thus product f = {} implies {} in rng f proof assume that A1: product f = {} and A2: not {} in rng f; A3: now assume dom f = {}; then for x st x in dom f holds f.x in f.x; hence thesis by A1,Def5; end; now assume dom f <> {}; then reconsider M = rng f as non empty set by RELAT_1:42; X in M implies X <> {} by A2; then consider f1 such that dom f1 = M and A4: for X st X in M holds f1.X in X by FUNCT_1:111; deffunc g(set) = f1.(f.$1); consider g such that A5: dom g = dom f & for x st x in dom f holds g.x = g(x) from FUNCT_1:sch 3; now let x; assume A6: x in dom f; then A7: f.x in M by FUNCT_1:def 3; g.x = f1.(f.x) by A5,A6; hence g.x in f.x by A4,A7; end; hence thesis by A1,A5,Def5; end; hence thesis by A3; end; assume {} in rng f; then A8: ex x st ( x in dom f)&( {} = f.x) by FUNCT_1:def 3; assume A9: product f <> {}; set y = the Element of product f; ex g st ( y = g)&( dom g = dom f)&( for x st x in dom f holds g.x in f.x) by A9,Def5; hence contradiction by A8; end; theorem Th27: dom f = dom g & (for x st x in dom f holds f.x c= g.x) implies product f c= product g proof assume that A1: dom f = dom g and A2: for x st x in dom f holds f.x c= g.x; let x; assume x in product f; then consider f1 such that A3: x = f1 and A4: dom f1 = dom f and A5: for x st x in dom f holds f1.x in f.x by Def5; now let x; assume A6: x in dom g; then A7: f1.x in f.x by A1,A5; f.x c= g.x by A1,A2,A6; hence f1.x in g.x by A7; end; hence thesis by A1,A3,A4,Def5; end; reserve F,G for Cardinal-Function; theorem for x st x in dom F holds card (F.x) = F.x proof let x; assume x in dom F; then reconsider M = F.x as Cardinal by Def1; card M = M by CARD_1:def 2; hence thesis; end; theorem Th29: for x st x in dom F holds card ((disjoin F).x) = F.x proof let x; assume A1: x in dom F; then reconsider M = F.x as Cardinal by Def1; M,[:M,{x}:] are_equipotent by CARD_1:69; then M = card [:M,{x}:] by CARD_1:def 2; hence thesis by A1,Def3; end; definition let F; func Sum F -> Cardinal equals card Union disjoin F; correctness; func Product F -> Cardinal equals card product F; correctness; end; theorem dom F = dom G & (for x st x in dom F holds F.x c= G.x) implies Sum F c= Sum G proof assume that A1: dom F = dom G and A2: for x st x in dom F holds F.x c= G.x; Union disjoin F c= Union disjoin G proof let x; assume x in Union disjoin F; then consider X such that A3: x in X and A4: X in rng disjoin F by TARSKI:def 4; consider y such that A5: y in dom disjoin F and A6: X = (disjoin F).y by A4,FUNCT_1:def 3; A7: y in dom F by A5,Def3; then A8: F.y c= G.y by A2; A9: X = [:F.y,{y}:] by A6,A7,Def3; A10: (disjoin G).y = [:G.y,{y}:] by A1,A7,Def3; A11: y in dom disjoin G by A1,A7,Def3; A12: X c= [:G.y,{y}:] by A8,A9,ZFMISC_1:95; [:G.y,{y}:] in rng disjoin G by A10,A11,FUNCT_1:def 3; hence thesis by A3,A12,TARSKI:def 4; end; hence thesis by CARD_1:11; end; theorem {} in rng F iff Product F = 0 proof thus {} in rng F implies Product F = 0 by Th26,CARD_1:27; assume Product F = 0; then product F = {}; hence thesis by Th26; end; theorem dom F = dom G & (for x st x in dom F holds F.x c= G.x) implies Product F c= Product G by Th27,CARD_1:11; theorem F c= G implies Sum F c= Sum G proof assume F c= G; then disjoin F c= disjoin G by Th23; hence thesis by Th24,CARD_1:11; end; theorem F c= G & not 0 in rng G implies Product F c= Product G proof assume A1: F c= G; then A2: dom F c= dom G by GRFUNC_1:2; assume A3: not 0 in rng G; deffunc f(Function) = $1|dom F; consider f such that A4: dom f = product G & for g st g in product G holds f.g = f(g) from FUNCT_5:sch 1; product F c= rng f proof let x; assume x in product F; then consider g such that A5: x = g and A6: dom g = dom F and A7: for x st x in dom F holds g.x in F.x by Def5; A8: product G <> {} by A3,Th26; set y = the Element of product G; consider h such that y = h and dom h = dom G and A9: for x st x in dom G holds h.x in G.x by A8,Def5; deffunc f(set) = g.$1; deffunc g(set) = h.$1; defpred C[set] means $1 in dom F; consider f1 such that A10: dom f1 = dom G & for x st x in dom G holds (C[x] implies f1.x = f(x)) & (not C[x] implies f1.x = g(x)) from PARTFUN1:sch 1; now let z such that A11: z in dom G; A12: now assume A13: z in dom F; then A14: f1.z = g.z by A10,A11; g.z in F.z by A7,A13; hence f1.z in G.z by A1,A13,A14,GRFUNC_1:2; end; not z in dom F implies f1.z = h.z by A10,A11; hence f1.z in G.z by A9,A11,A12; end; then A15: f1 in product G by A10,Def5; then A16: f.f1 = f1|dom F by A4; A17: dom(f1|dom F) = dom F by A2,A10,RELAT_1:62; now let z; assume A18: z in dom F; then (f1|dom F).z = f1.z by A17,FUNCT_1:47; hence (f1|dom F).z = g.z by A2,A10,A18; end; then f.f1 = g by A6,A16,A17,FUNCT_1:2; hence thesis by A4,A5,A15,FUNCT_1:def 3; end; hence thesis by A4,CARD_1:12; end; theorem Sum({} --> K) = 0 proof dom ({} --> K) = {}; then dom disjoin ({} --> K) = {} by Def3; hence thesis by CARD_1:27,RELAT_1:42,ZFMISC_1:2; end; theorem Product ({} --> K) = 1 by Th10,CARD_1:30; theorem Sum(x .--> K) = K proof thus Sum(x .--> K) = card Union (x .--> [:K,{x}:]) by Th4 .= card [:K,{x}:] by Th7 .= card K by CARD_1:69 .= K by CARD_1:def 2; end; theorem Product(x .--> K) = K proof thus Product(x .--> K) = card Funcs({x},K) by Th11 .= card K by FUNCT_5:58 .= K by CARD_1:def 2; end; theorem Th39: card Union f c= Sum Card f proof A1: now assume dom f = {}; then {} = Union f by RELAT_1:42,ZFMISC_1:2; hence thesis; end; now assume A2: dom f <> {}; defpred P[set,set] means x in $2 iff x in Funcs(card $1,$1) & ex g st x = g & rng g = $1; defpred W[set,set] means P[f.$1,$2]; A3: for x st x in dom f ex y st W[x,y] proof let x such that x in dom f; defpred A[set] means ex g st $1 = g & rng g = f.x; consider Y such that A4: z in Y iff z in Funcs(card (f.x),f.x) & A[z] from XBOOLE_0:sch 1; take Y; thus thesis by A4; end; consider k being Function such that A5: dom k = dom f & for x st x in dom f holds W[x,k.x] from CLASSES1:sch 1 (A3); reconsider M = rng k as non empty set by A2,A5,RELAT_1:42; now let X; assume X in M; then consider x such that A6: x in dom k and A7: X = k.x by FUNCT_1:def 3; card(f.x),f.x are_equipotent by CARD_1:def 2; then consider g such that g is one-to-one and A8: dom g = card(f.x) and A9: rng g = f.x by WELLORD2:def 4; g in Funcs(card(f.x),f.x) by A8,A9,FUNCT_2:def 2; hence X <> {} by A5,A6,A7,A9; end; then consider FF being Function such that dom FF = M and A10: for X st X in M holds FF.X in X by FUNCT_1:111; set DD = union rng disjoin Card f; defpred S[set,set] means ex g st g = FF.(k.$1`2) & $2 = g.$1`1; A11: for x st x in DD ex y st S[x,y] proof let x; assume x in DD; then consider X such that A12: x in X and A13: X in rng disjoin Card f by TARSKI:def 4; consider y such that A14: y in dom disjoin Card f and A15: X = (disjoin Card f).y by A13,FUNCT_1:def 3; A16: dom disjoin Card f = dom Card f by Def3; A17: dom Card f = dom f by Def2; X = [:(Card f).y,{y}:] by A14,A15,A16,Def3; then x`2 in {y} by A12,MCART_1:10; then A18: x`2 in dom f by A14,A16,A17,TARSKI:def 1; then k.x`2 in M by A5,FUNCT_1:def 3; then FF.(k.x`2) in k.x`2 by A10; then FF.(k.x`2) in Funcs(card (f.x`2),f.x`2) by A5,A18; then consider g such that A19: FF.(k.x`2) = g and dom g = card (f.x`2) and rng g c= f.x`2 by FUNCT_2:def 2; take g.x`1, g; thus thesis by A19; end; consider t being Function such that A20: dom t = DD & for x st x in DD holds S[x,t.x] from CLASSES1:sch 1 (A11); union rng f c= rng t proof let x; assume x in union rng f; then consider X such that A21: x in X and A22: X in rng f by TARSKI:def 4; consider y such that A23: y in dom f and A24: X = f.y by A22,FUNCT_1:def 3; k.y in M by A5,A23,FUNCT_1:def 3; then A25: FF.(k.y) in k.y by A10; then FF.(k.y) in Funcs(card(f.y),f.y) by A5,A23; then consider g such that A26: FF.(k.y) = g and A27: dom g = card(f.y) and rng g c= f.y by FUNCT_2:def 2; ex g st FF.(k.y) = g & rng g = f.y by A5,A23,A25; then consider z such that A28: z in dom g and A29: x = g.z by A21,A24,A26,FUNCT_1:def 3; A30: (Card f).y = card(f.y) by A23,Def2; A31: dom Card f = dom f by Def2; then A32: (disjoin Card f).y = [:dom g,{y}:] by A23,A27,A30,Def3; A33: y in {y} by TARSKI:def 1; A34: dom disjoin Card f = dom f by A31,Def3; A35: [z,y] in [:dom g,{y}:] by A28,A33,ZFMISC_1:87; [:dom g,{y}:] in rng disjoin Card f by A23,A32,A34,FUNCT_1:def 3; then A36: [z,y] in DD by A35,TARSKI:def 4; A37: [z,y]`1 = z; [z,y]`2 = y; then ex g st g = FF.(k.y) & t.[z,y] = g.z by A20,A36,A37; hence thesis by A20,A26,A29,A36,FUNCT_1:def 3; end; hence thesis by A20,CARD_1:12; end; hence thesis by A1; end; theorem card Union F c= Sum F proof Card F = F by Th1; hence thesis by Th39; end; theorem dom F = dom G & (for x st x in dom F holds F.x in G.x) implies Sum F in Product G proof assume that A1: dom F = dom G and A2: for x st x in dom F holds F.x in G.x; deffunc f(set) = (G.$1)\(F.$1); consider f such that A3: dom f = dom F & for x st x in dom F holds f.x = f(x) from FUNCT_1:sch 3; now assume {} in rng f; then consider x such that A4: x in dom f and A5: {} = f.x by FUNCT_1:def 3; reconsider Fx = F.x, Gx = G.x as Cardinal by A1,A3,A4,Def1; A6: Fx in Gx by A2,A3,A4; not Fx in Fx; then Fx in Gx \ Fx by A6,XBOOLE_0:def 5; hence contradiction by A3,A4,A5; end; then A7: product f <> {} by Th26; set a = the Element of product f; consider h being Function such that a = h and dom h = dom f and A8: for x st x in dom f holds h.x in f.x by A7,Def5; defpred P[set,Function] means dom $2 = dom F & for x st x in dom F holds ($1`2 = x implies $2.x = $1`1) & ($1`2 <> x implies $2.x = h.x); defpred R[set,set] means ex g st $2 = g & P[$1,g]; A9: for x st x in Union disjoin F ex y st R[x,y] proof let x such that x in Union disjoin F; deffunc f(set) = x`1; deffunc g(set) = h.$1; defpred C[set] means $1 = x`2; consider g such that A10: dom g = dom F & for u st u in dom F holds (C[u] implies g.u = f(u)) & (not C[u] implies g.u = g(u)) from PARTFUN1:sch 1; reconsider y = g as set; take y,g; thus thesis by A10; end; consider f1 such that A11: dom f1 = Union disjoin F & for x st x in Union disjoin F holds R[x,f1.x] from CLASSES1:sch 1(A9); A12: f1 is one-to-one proof let x,y; assume that A13: x in dom f1 and A14: y in dom f1 and A15: f1.x = f1.y and A16: x <> y; consider g1 being Function such that A17: f1.x = g1 and A18: P[x,g1] by A11,A13; consider g2 being Function such that A19: f1.y = g2 and A20: P[y,g2] by A11,A14; A21: x`2 in dom F by A11,A13,Th22; A22: y`2 in dom F by A11,A14,Th22; A23: y`1 in F.(y`2) by A11,A14,Th22; A24: ex x1,x2 being set st x = [x1,x2] by A11,A13,Th21; A25: ex x1,x2 being set st y = [x1,x2] by A11,A14,Th21; A26: x = [x`1,x`2] by A24,MCART_1:8; A27: y = [y`1,y`2] by A25,MCART_1:8; A28: now assume A29: x`1 = y`1; A30: g2.(y`2) = y`1 by A20,A22; A31: g1.(y`2) = h.(y`2) by A16,A18,A22,A26,A27,A29; A32: f.(y`2) = (G.(y`2))\(F.(y`2)) by A3,A22; h.(y`2) in f.(y`2) by A3,A8,A22; hence contradiction by A15,A17,A19,A23,A30,A31,A32,XBOOLE_0:def 5; end; A33: x`2 = y`2 implies g1.(x`2) = x`1 & g2.(x`2) = y`1 by A18,A20,A21; A34: g1.(y`2) = y`1 by A15,A17,A19,A20,A22; A35: g1.(y`2) = h.(y`2) by A15,A17,A18,A19,A22,A28,A33; A36: f.(y`2) = (G.(y`2))\(F.(y`2) ) by A3,A22; h.(y`2) in f.(y`2) by A3,A8,A22; hence contradiction by A23,A34,A35,A36,XBOOLE_0:def 5; end; rng f1 c= product G proof let x; assume x in rng f1; then consider y such that A37: y in dom f1 and A38: x = f1.y by FUNCT_1:def 3; consider g such that A39: f1.y = g and A40: P[y,g] by A11,A37; now let x; assume A41: x in dom G; then reconsider Gx = G.x, Fx = F.x as Cardinal by A1,Def1; A42: Fx in Gx by A1,A2,A41; A43: y`2 = x implies g.x = y`1 by A1,A40,A41; A44: y`2 <> x implies g.x = h.x by A1,A40,A41; A45: h.x in f.x by A1,A3,A8,A41; A46: f.x = Gx \ Fx by A1,A3,A41; A47: y`1 in F.(y`2) by A11,A37,Th22; Fx c= Gx by A42,CARD_1:3; hence g.x in G.x by A43,A44,A45,A46,A47; end; hence thesis by A1,A38,A39,A40,Def5; end; then A48: Sum F c= Product G by A11,A12,CARD_1:10; now assume Sum F = Product G; then Union disjoin F,product G are_equipotent by CARD_1:5; then consider f such that f is one-to-one and A49: dom f = Union disjoin F and A50: rng f = product G by WELLORD2:def 4; deffunc f(set) = G.$1 \ pi(f.:((disjoin F).$1),$1); consider K being Function such that A51: dom K = dom F & for x st x in dom F holds K.x = f(x) from FUNCT_1:sch 3; now assume {} in rng K; then consider x such that A52: x in dom F and A53: {} = K.x by A51,FUNCT_1:def 3; A54: K.x = G.x \ pi(f.:((disjoin F).x),x) by A51,A52; reconsider Fx = F.x, Gx = G.x as Cardinal by A1,A52,Def1; A55: card pi(f.:((disjoin F).x),x) c= card (f.:((disjoin F).x)) by Th20; A56: card (f.:((disjoin F).x)) c= card ((disjoin F).x) by CARD_1:67; card ((disjoin F).x) = Fx by A52,Th29; then A57: card pi(f.:((disjoin F).x),x) c= Fx by A55,A56,XBOOLE_1:1; A58: Fx in Gx by A2,A52; card Gx = Gx by CARD_1:def 2; hence contradiction by A53,A54,A57,A58,CARD_1:68,ORDINAL1:12; end; then A59: product K <> {} by Th26; set t = the Element of product K; consider g such that A60: t = g and dom g = dom K and A61: for x st x in dom K holds g.x in K.x by A59,Def5; now let x; assume x in dom K; then K.x = G.x \ pi(f.:((disjoin F).x),x) by A51; hence K.x c= G.x; end; then product K c= product G by A1,A51,Th27; then t in product G by A59,TARSKI:def 3; then consider y such that A62: y in dom f and A63: t = f.y by A50,FUNCT_1:def 3; consider X such that A64: y in X and A65: X in rng disjoin F by A49,A62,TARSKI:def 4; consider x such that A66: x in dom disjoin F and A67: X = (disjoin F).x by A65,FUNCT_1:def 3; g in f.:X by A60,A62,A63,A64,FUNCT_1:def 6; then A68: g.x in pi(f.:((disjoin F).x),x) by A67,Def6; A69: x in dom F by A66,Def3; A70: not g.x in G.x \ pi(f.:((disjoin F).x),x) by A68,XBOOLE_0:def 5; g.x in (K.x) by A51,A61,A69; hence contradiction by A51,A69,A70; end; hence thesis by A48,CARD_1:3; end; scheme FuncSeparation { X()->set, F(set)->set, P[set,set] }: ex f st dom f = X() & for x st x in X() for y holds y in f.x iff y in F(x) & P[x,y] proof defpred Q[set,set] means y in $2 iff y in F($1) & P[$1,y]; A1: for x st x in X() ex y st Q[x,y] proof let x such that x in X(); defpred R[set] means P[x,$1]; consider Y such that A2: y in Y iff y in F(x) & R[y] from XBOOLE_0:sch 1; take Y; thus thesis by A2; end; thus ex f st dom f = X() & for x st x in X() holds Q[x,f.x] from CLASSES1:sch 1(A1); end; Lm1: x in field R implies ex y st [x,y] in R or [y,x] in R proof assume x in field R; then x in dom R or x in rng R by XBOOLE_0:def 3; hence thesis by XTUPLE_0:def 12,def 13; end; theorem Th42: X is finite implies card X in card omega proof assume X is finite; then ex n being Nat st ( card X = card n) by CARD_1:48; hence thesis by CARD_1:47; end; theorem Th43: card A in card B implies A in B proof assume that A1: card A in card B and A2: not A in B; not card B c= card A by A1,CARD_1:4; hence contradiction by A2,CARD_1:11,ORDINAL1:16; end; theorem Th44: card A in M implies A in M proof card M = M by CARD_1:def 2; hence thesis by Th43; end; theorem Th45: X is c=-linear implies ex Y st Y c= X & union Y = union X & for Z st Z c= Y & Z <> {} ex Z1 st Z1 in Z & for Z2 st Z2 in Z holds Z1 c= Z2 proof assume A1: X is c=-linear; consider R such that A2: R well_orders X by WELLORD2:17; A3: R|_2 X is well-ordering by A2,WELLORD2:16; A4: field(R|_2 X) = X by A2,WELLORD2:16; R|_2 X, RelIncl order_type_of R|_2 X are_isomorphic by A3,WELLORD2:def 2; then RelIncl order_type_of R|_2 X, R|_2 X are_isomorphic by WELLORD1:40; then consider f such that A5: f is_isomorphism_of RelIncl order_type_of R|_2 X, R|_2 X by WELLORD1:def 8; field RelIncl order_type_of R|_2 X = order_type_of R|_2 X by WELLORD2:def 1; then A6: dom f = order_type_of R|_2 X by A5,WELLORD1:def 7; A7: rng f = X by A4,A5,WELLORD1:def 7; defpred P[set] means for A,B st B in A & $1 = A holds f.B c= f.A; consider Y such that A8: x in Y iff x in dom f & P[x] from XBOOLE_0:sch 1; take Z = f.:Y; thus Z c= X by A7,RELAT_1:111; thus union Z c= union X by A7,RELAT_1:111,ZFMISC_1:77; thus union X c= union Z proof let x; assume x in union X; then consider Z1 such that A9: x in Z1 and A10: Z1 in X by TARSKI:def 4; consider y such that A11: y in dom f and A12: Z1 = f.y by A7,A10,FUNCT_1:def 3; reconsider y as Ordinal by A6,A11; defpred P[Ordinal] means $1 c= y & x in f.$1; A13: ex A st P[A] by A9,A12; consider A such that A14: P[A] & for B st P[B] holds A c= B from ORDINAL1:sch 1(A13); A15: A in dom f by A6,A11,A14,ORDINAL1:12; now let B,C; assume that A16: C in B and A17: A = B; A18: C in dom f by A6,A11,A14,A16,A17,ORDINAL1:10; A19: not C c= y or not x in f.C by A14,A16,A17,ORDINAL1:5; A20: f.A in X by A7,A15,FUNCT_1:def 3; f.C in X by A7,A18,FUNCT_1:def 3; then f.C,f.A are_c=-comparable by A1,A20,ORDINAL1:def 8; then f.C c= f.A or f.A c= f.C by XBOOLE_0:def 9; hence f.C c= f.B by A14,A16,A17,A19,ORDINAL1:def 2; end; then A in Y by A8,A15; then f.A in Z by A15,FUNCT_1:def 6; hence thesis by A14,TARSKI:def 4; end; let V be set; assume that A21: V c= Z and A22: V <> {}; set x = the Element of V; x in Z by A21,A22,TARSKI:def 3; then consider y such that A23: y in dom f and A24: y in Y and A25: x = f.y by FUNCT_1:def 6; reconsider y as Ordinal by A6,A23; defpred P[Ordinal] means $1 in Y & f.$1 in V; y = y; then A26: ex A st P[A] by A22,A24,A25; consider A such that A27: P[A] & for B st P[B] holds A c= B from ORDINAL1:sch 1(A26); take Z1 = f.A; thus Z1 in V by A27; let Z2; assume A28: Z2 in V; then consider y such that A29: y in dom f and A30: y in Y and A31: Z2 = f.y by A21,FUNCT_1:def 6; reconsider y as Ordinal by A6,A29; A c< y iff A c= y & A <> y by XBOOLE_0:def 8; then A = y or A in y by A27,A28,A30,A31,ORDINAL1:11; hence thesis by A8,A30,A31; end; theorem (for Z st Z in X holds card Z in M) & X is c=-linear implies card union X c= M proof assume that A1: Z in X implies card Z in M and A2: X is c=-linear; consider XX being set such that A3: XX c= X and A4: union XX = union X and A5: for Z st Z c= XX & Z <> {} ex Z1 st Z1 in Z & for Z2 st Z2 in Z holds Z1 c= Z2 by A2,Th45; A6: now let Z1,Z2; assume that A7: Z1 in XX and A8: Z2 in XX; Z1,Z2 are_c=-comparable by A2,A3,A7,A8,ORDINAL1:def 8; hence Z1 c= Z2 or Z2 c= Z1 by XBOOLE_0:def 9; end; consider R such that A9: R well_orders union X by WELLORD2:17; A10: R is_reflexive_in union X by A9,WELLORD1:def 5; A11: R is_transitive_in union X by A9,WELLORD1:def 5; A12: R is_antisymmetric_in union X by A9,WELLORD1:def 5; A13: R is_connected_in union X by A9,WELLORD1:def 5; defpred P[set,set] means ((ex Z1 st Z1 in XX & $1 in Z1 & not $2 in Z1) or (for Z1 st Z1 in XX holds $1 in Z1 iff $2 in Z1) & [$1,$2] in R); consider Q such that A14: [x,y] in Q iff x in union X & y in union X & P[x,y] from RELAT_1:sch 1; A15: field Q = union X proof thus field Q c= union X proof let x; assume x in field Q; then ex y st [x,y] in Q or [y,x] in Q by Lm1; hence thesis by A14; end; let x; assume A16: x in union X; then A17: [x,x] in R by A10,RELAT_2:def 1; for Z1 st Z1 in XX holds x in Z1 iff x in Z1; then [x,x] in Q by A14,A16,A17; hence thesis by RELAT_1:15; end; A18: Q is reflexive proof let x; assume A19: x in field Q; then A20: [x,x] in R by A10,A15,RELAT_2:def 1; for Z1 st Z1 in XX holds x in Z1 iff x in Z1; hence thesis by A14,A15,A19,A20; end; A21: Q is transitive proof let x,y,z such that A22: x in field Q and A23: y in field Q and A24: z in field Q and A25: [x,y] in Q and A26: [y,z] in Q; A27: now given Z1 such that A28: Z1 in XX and A29: x in Z1 and A30: not y in Z1; given Z2 such that A31: Z2 in XX and A32: y in Z2 and A33: not z in Z2; Z1 c= Z2 or Z2 c= Z1 by A6,A28,A31; hence thesis by A14,A15,A22,A24,A29,A30,A31,A32,A33; end; A34: now given Z1 such that A35: Z1 in XX and A36: x in Z1 and A37: not y in Z1; assume that A38: for Z1 st Z1 in XX holds y in Z1 iff z in Z1 and [y,z] in R; not z in Z1 by A35,A37,A38; hence thesis by A14,A15,A22,A24,A35,A36; end; A39: now given Z1 such that A40: Z1 in XX and A41: y in Z1 and A42: not z in Z1; assume that A43: for Z1 st Z1 in XX holds x in Z1 iff y in Z1 and [x,y] in R; x in Z1 by A40,A41,A43; hence thesis by A14,A15,A22,A24,A40,A42; end; now assume that A44: for Z1 st Z1 in XX holds x in Z1 iff y in Z1 and A45: [x,y] in R and A46: for Z1 st Z1 in XX holds y in Z1 iff z in Z1 and A47: [y,z] in R; A48: [x,z] in R by A11,A15,A22,A23,A24,A45,A47,RELAT_2:def 8; now let Z; assume A49: Z in XX; then x in Z iff y in Z by A44; hence x in Z iff z in Z by A46,A49; end; hence thesis by A14,A15,A22,A24,A48; end; hence thesis by A14,A25,A26,A27,A34,A39; end; A50: Q is antisymmetric proof let x,y; assume that A51: x in field Q and A52: y in field Q and A53: [x,y] in Q and A54: [y,x] in Q; A55: (ex Z1 st Z1 in XX & x in Z1 & not y in Z1) or (for Z1 st Z1 in XX holds x in Z1 iff y in Z1) & [x,y] in R by A14,A53; A56: (ex Z1 st Z1 in XX & y in Z1 & not x in Z1) or (for Z1 st Z1 in XX holds y in Z1 iff x in Z1) & [y,x] in R by A14,A54; now given Z1 such that A57: Z1 in XX and A58: x in Z1 and A59: not y in Z1; given Z2 such that A60: Z2 in XX and A61: y in Z2 and A62: not x in Z2; Z1 c= Z2 or Z2 c= Z1 by A6,A57,A60; hence thesis by A58,A59,A61,A62; end; hence thesis by A12,A15,A51,A52,A55,A56,RELAT_2:def 4; end; A63: Q is connected proof let x,y such that A64: x in field Q and A65: y in field Q and A66: x <> y; now assume A67: for Z st Z in XX holds x in Z iff y in Z; A68: [x,y] in R or [y,x] in R by A13,A15,A64,A65,A66,RELAT_2:def 6; for Z st Z in XX holds y in Z iff x in Z by A67; hence thesis by A14,A15,A64,A65,A67,A68; end; hence thesis by A14,A15,A64,A65; end; Q is well_founded proof let Y such that A69: Y c= field Q and A70: Y <> {}; defpred P[set] means $1 /\ Y <> {}; consider Z such that A71: x in Z iff x in XX & P[x] from XBOOLE_0:sch 1; A72: Z c= XX proof let x; thus thesis by A71; end; set x = the Element of Y; x in union XX by A4,A15,A69,A70,TARSKI:def 3; then consider Z1 such that A73: x in Z1 and A74: Z1 in XX by TARSKI:def 4; Z1 /\ Y <> {} by A70,A73,XBOOLE_0:def 4; then Z <> {} by A71,A74; then consider Z1 such that A75: Z1 in Z and A76: for Z2 st Z2 in Z holds Z1 c= Z2 by A5,A72; A77: Z1 in XX by A71,A75; A78: Z1 /\ Y c= Z1 by XBOOLE_1:17; A79: Z1 c= union X by A3,A77,ZFMISC_1:74; Z1 /\ Y <> {} by A71,A75; then consider x such that A80: x in Z1 /\ Y and A81: for y st y in Z1 /\ Y holds [x,y] in R by A9,A78,A79,WELLORD1:5,XBOOLE_1:1; take x; thus x in Y by A80,XBOOLE_0:def 4; assume A82: Q-Seg x /\ Y <> {}; set y = the Element of Q-Seg x /\ Y; A83: x in Z1 by A80,XBOOLE_0:def 4; A84: y in Q-Seg x by A82,XBOOLE_0:def 4; A85: y in Y by A82,XBOOLE_0:def 4; A86: y <> x by A84,WELLORD1:1; A87: [y,x] in Q by A84,WELLORD1:1; A88: now given Z2 such that A89: Z2 in XX and A90: y in Z2 and A91: not x in Z2; Z2 /\ Y <> {} by A85,A90,XBOOLE_0:def 4; then Z2 in Z by A71,A89; then Z1 c= Z2 by A76; hence contradiction by A83,A91; end; then A92: y in Z1 by A14,A77,A83,A87; A93: [y,x] in R by A14,A87,A88; y in Z1 /\ Y by A85,A92,XBOOLE_0:def 4; then A94: [x,y] in R by A81; A95: x in union X by A14,A87; y in union X by A14,A87; hence contradiction by A12,A86,A93,A94,A95,RELAT_2:def 4; end; then Q is well-ordering by A18,A21,A50,A63,WELLORD1:def 4; then Q,RelIncl order_type_of Q are_isomorphic by WELLORD2:def 2; then RelIncl order_type_of Q,Q are_isomorphic by WELLORD1:40; then consider g such that A96: g is_isomorphism_of RelIncl order_type_of Q,Q by WELLORD1:def 8; A97: field RelIncl order_type_of Q = order_type_of Q by WELLORD2:def 1; then A98: dom g = order_type_of Q by A96,WELLORD1:def 7; A99: rng g = union X by A15,A96,WELLORD1:def 7; A100: g is one-to-one by A96,WELLORD1:def 7; A101: for Z,x st Z in XX & x in Z holds Q-Seg x c= Z proof let Z,x such that A102: Z in XX and A103: x in Z; let y; assume y in Q-Seg x; then A104: [y,x] in Q by WELLORD1:1; now given Z1 such that A105: Z1 in XX and A106: y in Z1 and A107: not x in Z1; Z1 c= Z or Z c= Z1 by A6,A102,A105; hence thesis by A103,A106,A107; end; hence thesis by A14,A102,A103,A104; end; A108: for A st A in order_type_of Q holds card A = card (Q-Seg(g.A)) proof let A such that A109: A in order_type_of Q; A,Q-Seg(g.A) are_equipotent proof take f = g|A; A c= dom g by A98,A109,ORDINAL1:def 2; hence A110: f is one-to-one & dom f = A by A100,FUNCT_1:52,RELAT_1:62; thus rng f c= Q-Seg(g.A) proof let x; assume x in rng f; then consider y such that A111: y in dom f and A112: x = f.y by FUNCT_1:def 3; reconsider B = y as Ordinal by A110,A111; A113: B in order_type_of Q by A109,A110,A111,ORDINAL1:10; B c= A by A110,A111,ORDINAL1:def 2; then A114: [B,A] in RelIncl order_type_of Q by A109,A113,WELLORD2:def 1; A115: x = g.B by A111,A112,FUNCT_1:47; A116: A <> B by A110,A111; A117: [x,g.A] in Q by A96,A114,A115,WELLORD1:def 7; x <> g.A by A98,A100,A109,A113,A115,A116,FUNCT_1:def 4; hence thesis by A117,WELLORD1:1; end; let x; assume A118: x in Q-Seg(g.A); then A119: [x,g.A] in Q by WELLORD1:1; then x in union X by A14; then consider y such that A120: y in dom g and A121: x = g.y by A99,FUNCT_1:def 3; reconsider B = y as Ordinal by A98,A120; [B,A] in RelIncl order_type_of Q by A96,A97,A98,A109,A119,A120,A121, WELLORD1:def 7; then A122: B c= A by A98,A109,A120,WELLORD2:def 1; B <> A by A118,A121,WELLORD1:1; then B c< A by A122,XBOOLE_0:def 8; hence thesis by A120,A121,FUNCT_1:50,ORDINAL1:11; end; hence thesis by CARD_1:5; end; A123: order_type_of Q c= M proof let x be Ordinal; assume A124: x in order_type_of Q; reconsider A = x as Ordinal; g.x in union X by A98,A99,A124,FUNCT_1:def 3; then consider Z such that A125: g.x in Z and A126: Z in XX by A4,TARSKI:def 4; A127: card (Q-Seg(g.x)) c= card Z by A101,A125,A126,CARD_1:11; A128: card (Q-Seg(g.x)) = card A by A108,A124; card (Q-Seg(g.x)) in M by A1,A3,A126,A127,ORDINAL1:12; hence thesis by A128,Th44; end; order_type_of Q,union X are_equipotent by A98,A99,A100,WELLORD2:def 4; then A129: card order_type_of Q = card union X by CARD_1:5; card M = M by CARD_1:def 2; hence thesis by A123,A129,CARD_1:11; end; begin registration let f be Function; cluster product f -> functional; coherence proof set d = product f; let x be set; assume x in d; then ex g being Function st x = g & dom g= dom f & for x being set st x in dom f holds g.x in f.x by Def5; hence thesis; end; end; registration let A be set; let B be with_non-empty_elements set; cluster -> non-empty for Function of A,B; coherence proof let f be Function of A,B; thus not {} in rng f; end; end; registration let f be non-empty Function; cluster product f -> non empty; coherence proof not {} in rng f; hence thesis by Th26; end; end; theorem for a,b,c,d being set st a <> b holds product (a,b) --> ({c},{d}) = { (a,b) --> (c,d) } proof let a,b,c,d be set such that A1: a <> b; set X = { (a,b) --> (c,d) }, f = (a,b) --> ({c},{d}); A2: dom f = {a,b} by FUNCT_4:62; now let x; thus x in X implies ex g being Function st x = g & dom g = dom f & for x st x in dom f holds g.x in f.x proof assume A3: x in X; take g = (a,b) --> (c,d); thus x = g by A3,TARSKI:def 1; thus dom g = dom f by A2,FUNCT_4:62; let x; assume x in dom f; then A4: x = a or x = b by A2,TARSKI:def 2; A5: g.a = c by A1,FUNCT_4:63; A6: f.a = {c} by A1,FUNCT_4:63; A7: g.b = d by FUNCT_4:63; f.b = {d} by FUNCT_4:63; hence thesis by A4,A5,A6,A7,TARSKI:def 1; end; given g being Function such that A8: x = g and A9: dom g = dom f and A10: for x st x in dom f holds g.x in f.x; A11: a in dom f by A2,TARSKI:def 2; A12: b in dom f by A2,TARSKI:def 2; A13: g.a in f.a by A10,A11; A14: g.b in f.b by A10,A12; A15: f.a = {c} by A1,FUNCT_4:63; A16: f.b = {d} by FUNCT_4:63; A17: g.a = c by A13,A15,TARSKI:def 1; g.b = d by A14,A16,TARSKI:def 1; then g = (a,b) --> (c,d) by A2,A9,A17,FUNCT_4:66; hence x in X by A8,TARSKI:def 1; end; hence thesis by Def5; end; theorem x in product f implies x is Function; begin reserve A,B for set; definition let f be Function; func sproduct f -> set means :Def9: x in it iff ex g st x = g & dom g c= dom f & for x st x in dom g holds g.x in f.x; existence proof defpred P[set] means ex g st $1 = g & dom g c= dom f & for x st x in dom g holds g.x in f.x; consider A being set such that A1: x in A iff x in PFuncs(dom f, union rng f) & P[x] from XBOOLE_0:sch 1; now let x; thus x in A implies ex g st x = g & dom g c= dom f & for x st x in dom g holds g.x in f.x by A1; given g such that A2: x = g and A3: dom g c= dom f and A4: for x st x in dom g holds g.x in f.x; rng g c= union rng f proof let y be set; assume y in rng g; then consider z being set such that A5: z in dom g and A6: y = g.z by FUNCT_1:def 3; A7: g.z in f.z by A4,A5; f.z in rng f by A3,A5,FUNCT_1:def 3; hence thesis by A6,A7,TARSKI:def 4; end; then x in PFuncs(dom f, union rng f) by A2,A3,PARTFUN1:def 3; hence x in A by A1,A2,A3,A4; end; hence thesis; end; uniqueness proof defpred P[set] means ex g st $1 = g & dom g c= dom f & for x st x in dom g holds g.x in f.x; let A,B be set such that A8: x in A iff P[x] and A9: x in B iff P[x]; thus thesis from XBOOLE_0:sch 2(A8,A9); end; end; registration let f be Function; cluster sproduct f -> functional non empty; coherence proof defpred P[set] means ex g st $1 = g & dom g c= dom f & for x st x in dom g holds g.x in f.x; consider A being set such that A1: x in A iff x in PFuncs(dom f, union rng f) & P[x] from XBOOLE_0:sch 1; {} is PartFunc of dom f, union rng f by RELSET_1:12; then A2: {} in PFuncs(dom f, union rng f) by PARTFUN1:45; A3: dom {} c= dom f by XBOOLE_1:2; A4: for x st x in dom {} holds {} .x in f.x; now let x be set; assume x in A; then ex g st x = g & dom g c= dom f & for x st x in dom g holds g.x in f.x by A1; hence x is Function; end; then reconsider A as functional non empty set by A1,A2,A3,A4,FUNCT_1:def 13 ; now let x; thus x in A implies ex g st x = g & dom g c= dom f & for x st x in dom g holds g.x in f.x by A1; given g such that A5: x = g and A6: dom g c= dom f and A7: for x st x in dom g holds g.x in f.x; rng g c= union rng f proof let y be set; assume y in rng g; then consider z being set such that A8: z in dom g and A9: y = g.z by FUNCT_1:def 3; A10: g.z in f.z by A7,A8; f.z in rng f by A6,A8,FUNCT_1:def 3; hence thesis by A9,A10,TARSKI:def 4; end; then x in PFuncs(dom f, union rng f) by A5,A6,PARTFUN1:def 3; hence x in A by A1,A5,A6,A7; end; hence thesis by Def9; end; end; theorem Th49: g in sproduct f implies dom g c= dom f & for x st x in dom g holds g.x in f.x proof assume g in sproduct f; then ex h st g = h & dom h c= dom f & for x st x in dom h holds h.x in f.x by Def9; hence thesis; end; theorem Th50: {} in sproduct f proof A1: dom {} c= dom f by XBOOLE_1:2; for x st x in dom {} holds {} .x in f.x; hence thesis by A1,Def9; end; registration let f; cluster empty for Element of sproduct f; existence proof {} in sproduct f by Th50; hence thesis; end; end; theorem Th51: product f c= sproduct f proof let x; assume x in product f; then ex g st x = g & dom g = dom f & for x st x in dom f holds g.x in f.x by Def5; hence thesis by Def9; end; theorem Th52: x in sproduct f implies x is PartFunc of dom f, union rng f proof assume x in sproduct f; then consider g such that A1: x = g and A2: dom g c= dom f and A3: for x st x in dom g holds g.x in f.x by Def9; rng g c= union rng f proof let y be set; assume y in rng g; then consider z being set such that A4: z in dom g and A5: y = g.z by FUNCT_1:def 3; A6: g.z in f.z by A3,A4; f.z in rng f by A2,A4,FUNCT_1:def 3; hence thesis by A5,A6,TARSKI:def 4; end; hence thesis by A1,A2,RELSET_1:4; end; theorem Th53: g in product f & h in sproduct f implies g +* h in product f proof assume A1: g in product f; then A2: dom g = dom f by Th9; assume A3: h in sproduct f; then A4: dom g \/ dom h = dom f by A2,Th49,XBOOLE_1:12; then A5: dom(g +* h) = dom f by FUNCT_4:def 1; now let x; assume A6: x in dom f; A7: (dom g \ dom h) \/ dom h = dom f by A4,XBOOLE_1:39; now per cases by A6,A7,XBOOLE_0:def 3; case A8: x in dom g \ dom h; then not x in dom h by XBOOLE_0:def 5; hence x in dom f & (g +* h).x = g.x by A2,A8,FUNCT_4:11; end; case x in dom h; hence (g +* h).x = h.x by FUNCT_4:13; end; end; hence (g +* h).x in f.x by A1,A3,Th9,Th49; end; hence thesis by A5,Th9; end; theorem product f <> {} implies (g in sproduct f iff ex h st h in product f & g c= h) proof assume A1: product f <> {}; thus g in sproduct f implies ex h st h in product f & g c= h proof assume A2: g in sproduct f; set k = the Element of product f; reconsider k as Function; take k +* g; thus k +* g in product f by A1,A2,Th53; thus thesis by FUNCT_4:25; end; given h such that A3: h in product f and A4: g c= h; A5: dom h = dom f by A3,Th9; A6: dom g c= dom h by A4,RELAT_1:11; now let x; assume A7: x in dom g; then g.x = h.x by A4,GRFUNC_1:2; hence g.x in f.x by A3,A5,A6,A7,Th9; end; hence thesis by A5,A6,Def9; end; theorem Th55: sproduct f c= PFuncs(dom f,union rng f) proof let x; assume x in sproduct f; then x is PartFunc of dom f, union rng f by Th52; hence thesis by PARTFUN1:45; end; theorem Th56: f c= g implies sproduct f c= sproduct g proof assume A1: f c= g; then A2: dom f c= dom g by GRFUNC_1:2; let y; assume y in sproduct f; then consider h such that A3: y = h and A4: dom h c= dom f and A5: for x st x in dom h holds h.x in f.x by Def9; A6: dom h c= dom g by A2,A4,XBOOLE_1:1; now let x; assume A7: x in dom h; then f.x = g.x by A1,A4,GRFUNC_1:2; hence h.x in g.x by A5,A7; end; hence thesis by A3,A6,Def9; end; theorem Th57: sproduct {} = {{}} proof sproduct {} c= PFuncs({},{}) by Th55,RELAT_1:38,ZFMISC_1:2; hence sproduct {} c= {{}} by PARTFUN1:48; let x be set; assume x in {{}}; then x = {} by TARSKI:def 1; hence thesis by Th50; end; theorem PFuncs(A,B) = sproduct (A --> B) proof now per cases; case A1: A = {}; then A --> B = {} --> B; hence thesis by A1,Th57,PARTFUN1:48; end; case A <> {}; then A2: rng (A --> B) = { B } by FUNCOP_1:8; A3: dom(A --> B) = A by FUNCOP_1:13; A4: B = union rng (A --> B) by A2,ZFMISC_1:25; thus PFuncs(A,B) c= sproduct (A --> B) proof let x; assume x in PFuncs(A,B); then consider f being Function such that A5: x = f and A6: dom f c= A and A7: rng f c= B by PARTFUN1:def 3; A8: dom f c= dom (A --> B) by A6,FUNCOP_1:13; now let x; assume A9: x in dom f; then f.x in rng f by FUNCT_1:def 3; then f.x in B by A7; hence f.x in (A --> B).x by A6,A9,FUNCOP_1:7; end; hence thesis by A5,A8,Def9; end; thus sproduct (A --> B) c= PFuncs(A,B) by A3,A4,Th55; end; end; hence thesis by XBOOLE_0:def 10; end; theorem for A, B being non empty set for f being Function of A,B holds sproduct f = sproduct(f|{x where x is Element of A: f.x <> {} }) proof let A, B be non empty set; let f be Function of A,B; set X = {x where x is Element of A: f.x <> {} }; thus sproduct f c= sproduct(f|X) proof let x; assume x in sproduct f; then consider g such that A1: x = g and A2: dom g c= dom f and A3: for x st x in dom g holds g.x in f.x by Def9; A4: now let x; assume A5: x in dom g; then reconsider a = x as Element of A by A2,FUNCT_2:def 1; f.a <> {} by A3,A5; hence x in X; end; A6: now let x; assume A7: x in dom g; then x in X by A4; hence x in (dom f)/\ X by A2,A7,XBOOLE_0:def 4; end; A8: dom g c= dom(f|X) proof let x; assume x in dom g; then x in (dom f)/\ X by A6; hence thesis by RELAT_1:61; end; now let x; assume A9: x in dom g; then g.x in f.x by A3; hence g.x in (f|X).x by A6,A9,FUNCT_1:48; end; hence thesis by A1,A8,Def9; end; thus thesis by Th56,RELAT_1:59; end; theorem Th60: x in dom f & y in f.x implies x .--> y in sproduct f proof assume that A1: x in dom f and A2: y in f.x; dom(x .--> y) = {x} by FUNCOP_1:13; then A3: dom(x .--> y) c= dom f by A1,ZFMISC_1:31; now let z; assume z in dom(x .--> y); then z = x by TARSKI:def 1; hence (x .--> y).z in f.z by A2,FUNCOP_1:72; end; hence thesis by A3,Def9; end; theorem sproduct f = {{}} iff for x st x in dom f holds f.x = {} proof thus sproduct f = {{}} implies for x st x in dom f holds f.x = {} proof assume A1: sproduct f = {{}}; let x; assume A2: x in dom f; assume A3: f.x <> {}; set y = the Element of f.x; x .--> y in sproduct f by A2,A3,Th60; hence contradiction by A1,TARSKI:def 1; end; assume A4: for x st x in dom f holds f.x = {}; now let x; thus x in sproduct f implies x = {} proof assume x in sproduct f; then consider g such that A5: x = g and A6: dom g c= dom f and A7: for y st y in dom g holds g.y in f.y by Def9; assume A8: x <> {}; set y = the Element of dom g; A9: f.y <> {} by A5,A7,A8; y in dom f by A5,A6,A8,TARSKI:def 3; hence contradiction by A4,A9; end; thus x = {} implies x in sproduct f by Th50; end; hence thesis by TARSKI:def 1; end; theorem Th62: A c= sproduct f & (for h1,h2 being Function st h1 in A & h2 in A holds h1 tolerates h2) implies union A in sproduct f proof assume that A1: A c= sproduct f and A2: for h1,h2 being Function st h1 in A & h2 in A holds h1 tolerates h2; reconsider g = union A as Function by A1,A2,PARTFUN1:78; A3: dom g c= dom f proof let x; assume x in dom g; then consider y such that A4: [x,y] in g by XTUPLE_0:def 12; consider h being set such that A5: [x,y] in h and A6: h in A by A4,TARSKI:def 4; reconsider h as Function by A1,A6; A7: x in dom h by A5,XTUPLE_0:def 12; dom h c= dom f by A1,A6,Th49; hence thesis by A7; end; now let x; assume x in dom g; then consider y such that A8: [x,y] in g by XTUPLE_0:def 12; consider h being set such that A9: [x,y] in h and A10: h in A by A8,TARSKI:def 4; reconsider h as Function by A1,A10; A11: x in dom h by A9,XTUPLE_0:def 12; h.x = y by A9,FUNCT_1:1 .= g.x by A8,FUNCT_1:1; hence g.x in f.x by A1,A10,A11,Th49; end; hence thesis by A3,Def9; end; theorem g tolerates h & g in sproduct f & h in sproduct f implies g \/ h in sproduct f proof assume that A1: g tolerates h and A2: g in sproduct f and A3: h in sproduct f; A4: {g,h} c= sproduct f by A2,A3,ZFMISC_1:32; A5: now let h1,h2 be Function; assume that A6: h1 in {g,h} and A7: h2 in {g,h}; A8: h1 = g or h1 = h by A6,TARSKI:def 2; h2 = g or h2 = h by A7,TARSKI:def 2; hence h1 tolerates h2 by A1,A8; end; union {g,h} = g \/ h by ZFMISC_1:75; hence thesis by A4,A5,Th62; end; theorem Th64: x c= h & h in sproduct f implies x in sproduct f proof assume that A1: x c= h and A2: h in sproduct f; reconsider g = x as Function by A1; A3: dom g c= dom h by A1,GRFUNC_1:2; dom h c= dom f by A2,Th49; then A4: dom g c= dom f by A3,XBOOLE_1:1; now let x; assume A5: x in dom g; then h.x in f.x by A2,A3,Th49; hence g.x in f.x by A1,A5,GRFUNC_1:2; end; hence thesis by A4,Def9; end; theorem Th65: g in sproduct f implies g|A in sproduct f by Th64,RELAT_1:59; theorem Th66: g in sproduct f implies g|A in sproduct f|A proof A1: dom(g|A) = dom g /\ A by RELAT_1:61; A2: dom(f|A) = dom f /\ A by RELAT_1:61; assume A3: g in sproduct f; then A4: dom(g|A) c= dom(f|A) by A1,A2,Th49,XBOOLE_1:26; now let x; assume A5: x in dom(g|A); then A6: (g|A).x = g.x by FUNCT_1:47; A7: (f|A).x = f.x by A4,A5,FUNCT_1:47; x in dom g by A1,A5,XBOOLE_0:def 4; hence (g|A).x in (f|A).x by A3,A6,A7,Th49; end; hence thesis by A4,Def9; end; theorem h in sproduct(f+*g) implies ex f9,g9 being Function st f9 in sproduct f & g9 in sproduct g & h = f9+*g9 proof assume A1: h in sproduct(f+*g); take h|(dom f \ dom g), h|dom g; A2: h|(dom f \ dom g) in sproduct (f +* g)|(dom f \ dom g) by A1,Th66; sproduct (f +* g)|(dom f \ dom g) c= sproduct f by Th56,FUNCT_4:24; hence h|(dom f \ dom g) in sproduct f by A2; (f +* g)|dom g = g by FUNCT_4:23; hence h|dom g in sproduct g by A1,Th66; dom h c= dom(f+*g) by A1,Th49; then dom h c= dom f \/ dom g by FUNCT_4:def 1; then dom h c= (dom f \ dom g) \/ dom g by XBOOLE_1:39; hence thesis by FUNCT_4:70; end; theorem Th68: for f9,g9 being Function st dom g misses dom f9 \ dom g9 & f9 in sproduct f & g9 in sproduct g holds f9+*g9 in sproduct(f+*g) proof let f9,g9 be Function such that A1: dom g misses dom f9 \ dom g9 and A2: f9 in sproduct f and A3: g9 in sproduct g; set h = f9+*g9; A4: dom f9 c= dom f by A2,Th49; A5: dom g9 c= dom g by A3,Th49; then A6: dom f9 \/ dom g9 c= dom f \/ dom g by A4,XBOOLE_1:13; A7: dom h = dom f9 \/ dom g9 by FUNCT_4:def 1; then A8: dom h c= dom(f+*g) by A6,FUNCT_4:def 1; x in dom h implies h.x in (f+*g).x proof assume A9: x in dom h; then x in dom(f+*g) by A8; then A10: x in dom f \/ dom g by FUNCT_4:def 1; x in dom f9 \ dom g9 \/ dom g9 by A7,A9,XBOOLE_1:39; then A11: x in dom f9 \ dom g9 or x in dom g9 by XBOOLE_0:def 3; now per cases; case A12: x in dom g; then h.x = g9.x by A1,A7,A9,A11,FUNCT_4:def 1,XBOOLE_0:3; hence h.x in g.x by A1,A3,A11,A12,Th49,XBOOLE_0:3; end; case not x in dom g; then A13: not x in dom g9 by A5; then A14: h.x = f9.x by A7,A9,FUNCT_4:def 1; x in dom f9 by A7,A9,A13,XBOOLE_0:def 3; hence h.x in f.x by A2,A14,Th49; end; end; hence thesis by A10,FUNCT_4:def 1; end; hence thesis by A8,Def9; end; theorem for f9,g9 being Function st dom f9 misses dom g \ dom g9 & f9 in sproduct f & g9 in sproduct g holds f9+*g9 in sproduct(f+*g) proof let f9,g9 be Function; assume dom f9 misses dom g \ dom g9; then dom g misses dom f9 \ dom g9 by XBOOLE_1:81; hence thesis by Th68; end; theorem Th70: g in sproduct f & h in sproduct f implies g +* h in sproduct f proof assume that A1: g in sproduct f and A2: h in sproduct f; A3: dom g c= dom f by A1,Th49; dom h c= dom f by A2,Th49; then dom g \/ dom h c= dom f by A3,XBOOLE_1:8; then A4: dom(g+*h) c= dom f by FUNCT_4:def 1; now let x; assume x in dom(g+*h); then x in dom g \/ dom h by FUNCT_4:def 1; then A5: x in (dom g \ dom h \/ dom h) by XBOOLE_1:39; now per cases by A5,XBOOLE_0:def 3; suppose A6: x in dom h; then h.x in f.x by A2,Th49; hence (g+*h).x in f.x by A6,FUNCT_4:13; end; suppose A7: x in dom g \ dom h; then A8: g.x in f.x by A1,Th49; not x in dom h by A7,XBOOLE_0:def 5; hence (g+*h).x in f.x by A8,FUNCT_4:11; end; end; hence (g+*h).x in f.x; end; hence thesis by A4,Def9; end; theorem for x1,x2,y1,y2 being set holds x1 in dom f & y1 in f.x1 & x2 in dom f & y2 in f.x2 implies (x1,x2)-->(y1,y2) in sproduct f proof let x1,x2,y1,y2 be set; assume that A1: x1 in dom f and A2: y1 in f.x1; A3: x1 .--> y1 in sproduct f by A1,A2,Th60; assume that A4: x2 in dom f and A5: y2 in f.x2; A6: x2 .--> y2 in sproduct f by A4,A5,Th60; (x1,x2)-->(y1,y2) = (x1 .--> y1) +* (x2 .--> y2) by FUNCT_4:def 4; hence thesis by A3,A6,Th70; end; begin definition let IT be set; attr IT is with_common_domain means :Def10: for f,g be Function st f in IT & g in IT holds dom f = dom g; end; registration cluster with_common_domain functional non empty for set; existence proof set h = the Function; take A = {h}; for f,g be Function st f in A & g in A holds dom f = dom g proof let f,g be Function; assume that A1: f in A and A2: g in A; f = h by A1,TARSKI:def 1; hence thesis by A2,TARSKI:def 1; end; hence A is with_common_domain by Def10; thus A is functional; thus thesis; end; end; registration let f; cluster {f} -> with_common_domain; coherence proof let g,h be Function; assume g in {f}; then g = f by TARSKI:def 1; hence thesis by TARSKI:def 1; end; end; definition let X be functional set; func DOM X -> set equals meet { dom f where f is Element of X: not contradiction }; coherence; end; LmX: for X being functional with_common_domain set for f being Function st f in X holds dom f = DOM X proof let X be functional with_common_domain set; set A = { dom f where f is Element of X: not contradiction }; let f be Function; assume Z: f in X; then dom f in A; then X: { dom f } c= A by ZFMISC_1:31; A c= { dom f } proof let e be set; assume e in A; then consider g being Element of X such that W: e = dom g; e = dom f by W,Def10,Z; hence e in { dom f } by TARSKI:def 1; end; then A = { dom f } by X,XBOOLE_0:def 10; hence dom f = DOM X by SETFAM_1:10; end; theorem Th72: for X be with_common_domain functional set st X = {{}} holds DOM X = {} proof let X be with_common_domain functional set; assume A1: X = {{}}; {} in {{}} by TARSKI:def 1; hence thesis by A1,LmX,RELAT_1:38; end; registration let X be empty set; cluster DOM X -> empty; coherence proof set A = { dom f where f is Element of X: not contradiction }; X: A c= {{}} proof let e be set; assume e in A; then ex f being Element of X st e = dom f; then e = dom {} by SUBSET_1:def 1; hence thesis by TARSKI:def 1; end; {{}} c= A proof let e be set; assume e in {{}}; then e = {} by TARSKI:def 1; then e = dom {}; then e = dom the Element of X by SUBSET_1:def 1; hence thesis; end; then A = {{}} by X,XBOOLE_0:def 10; hence thesis by SETFAM_1:10; end; end; begin definition let S be functional set; func product" S -> Function means :Def12: dom it = DOM S & for i being set st i in dom it holds it.i = pi(S,i); existence proof per cases; suppose S: S = {}; take {}; thus thesis by S; end; suppose S <> {}; then reconsider S1 = S as non empty functional set; set D = {dom f where f is Element of S1: not contradiction}; defpred P[set,set] means $2 = pi(S,$1); A1: for e being set st e in meet D ex u being set st P[e,u]; consider g being Function such that A2: dom g = meet D and A3: for e being set st e in meet D holds P[e,g.e] from CLASSES1:sch 1( A1); take g; thus thesis by A2,A3; end; end; uniqueness proof let f, g be Function such that Z1: dom f = DOM S and Z2: for i being set st i in dom f holds f.i = pi(S,i) and Z3: dom g = DOM S and Z4: for i being set st i in dom g holds g.i = pi(S,i); for x st x in dom f holds f.x = g.x proof let x; assume Z: x in dom f; hence f.x = pi(S,x) by Z2 .= g.x by Z1,Z3,Z,Z4; end; hence f = g by Z1,Z3,FUNCT_1:def 11; end; end; canceled; theorem Th74: for S being non empty functional set, i being set st i in dom product" S holds (product" S).i = {f.i where f is Element of S: not contradiction} proof let S be non empty functional set, i be set; assume A1: i in dom product" S; hereby let x be set; assume x in (product" S).i; then x in pi(S,i) by A1,Def12; then ex f being Function st f in S & x = f.i by Def6; hence x in {f.i where f is Element of S: not contradiction}; end; let x be set; assume x in {f.i where f is Element of S: not contradiction}; then ex f being Element of S st x = f.i & not contradiction; then x in pi(S,i) by Def6; hence thesis by A1,Def12; end; definition let S be set; attr S is product-like means :Def13: ex f being Function st S = product f; end; registration let f be Function; cluster product f -> product-like; coherence by Def13; end; registration cluster product-like -> functional with_common_domain for set; coherence proof let S be set; given f being Function such that A1: S = product f; thus S is functional by A1; let h, g be Function such that A2: h in S and A3: g in S; thus dom h = dom f by A1,A2,Th9 .= dom g by A1,A3,Th9; end; end; registration cluster product-like non empty for set; existence proof set B = the with_non-empty_elements set,f = the Function of 0,B; take product f; thus thesis; end; end; canceled 2; theorem Th77: for S being functional with_common_domain set holds S c= product product" S proof let S be functional with_common_domain set; let f be set; assume A1: f in S; then reconsider f as Element of S; A2: dom f = DOM S by A1,LmX .= dom product" S by Def12; for i being set st i in dom product" S holds f.i in (product" S).i proof let i be set; assume i in dom product" S; then (product" S).i = pi(S,i) by Def12; hence thesis by A1,Def6; end; hence thesis by A2,Th9; end; theorem for S being non empty product-like set holds S = product product" S proof let S be non empty product-like set; thus S c= product product" S by Th77; let x be set; assume x in product product" S; then consider g being Function such that A1: x = g and A2: dom g = dom product" S and A3: for z being set st z in dom product" S holds g.z in (product" S).z by Def5; consider p being Function such that A4: S = product p by Def13; set s = the Element of S; A5: dom g = DOM S by A2,Def12 .= dom s by LmX .= dom p by A4,Th9; for z being set st z in dom p holds g.z in p.z proof let z be set; assume A6: z in dom p; then g.z in (product" S).z by A2,A3,A5; then g.z in pi(S,z) by A2,A5,A6,Def12; then ex f being Function st f in S & g.z = f.z by Def6; hence thesis by A4,A6,Th9; end; hence thesis by A1,A4,A5,Th9; end; theorem for f being Function for s, t being Element of product f, A be set holds s +* t|A is Element of product f proof let f be Function; let s, t be Element of product f, A be set; per cases; suppose f is non-empty; then product f <> {}; then A1: t in product f; product f c= sproduct f by Th51; hence thesis by A1,Th53,Th65; end; suppose f is not non-empty; then {} in rng f by RELAT_1:def 9; then A2: product f = {} by Th26; then A3: s = {} by SUBSET_1:def 1; t = {} by A2,SUBSET_1:def 1; then t|A = {}; hence thesis by A3; end; end; theorem for f being non-empty Function for p being Element of sproduct f ex s being Element of product f st p c= s proof let f be non-empty Function, p be Element of sproduct f; set h = the Element of product f; reconsider s = h +* p as Element of product f by Th53; take s; thus thesis by FUNCT_4:25; end; theorem Th81: g in product f implies g|A in sproduct f proof A1: product f c= sproduct f by Th51; assume g in product f; hence thesis by A1,Th64,RELAT_1:59; end; definition let f be non-empty Function; let g be Element of product f; let X; redefine func g|X -> Element of sproduct f; coherence by Th81; end; theorem for f being non-empty Function for s,ss being Element of product f, A being set holds (ss +* s | A) | A = s | A proof let f be non-empty Function; let s,ss be Element of product f; let A be set; dom s = dom f by Th9 .= dom ss by Th9; then A /\ dom ss c= A /\ dom s; hence thesis by FUNCT_4:88; end; theorem for M,x, g being Function st x in product M holds x * g in product (M * g) proof let M, x, g be Function; assume A1: x in product M; set xg = x * g; set Mg = M * g; A2: ex gg being Function st ( x = gg)&( dom gg = dom M)&( for x being set st x in dom M holds gg.x in M.x) by A1,Def5; then A3: dom xg = dom Mg by RELAT_1:163; now let y be set; assume A4: y in dom Mg; then A5: y in dom g by FUNCT_1:11; A6: g.y in dom M by A4,FUNCT_1:11; A7: xg.y = x.(g.y) by A5,FUNCT_1:13; Mg.y = M.(g.y) by A5,FUNCT_1:13; hence xg.y in Mg.y by A2,A6,A7; end; hence thesis by A3,Def5; end; theorem X is finite iff card X in omega by Th42,CARD_1:47; reserve A,B for Ordinal; theorem Th85: A is infinite iff omega c= A proof omega c= A iff not A in omega by ORDINAL1:16; hence thesis; end; theorem N is finite & not M is finite implies N in M & N c= M proof assume that A1: N is finite and A2: not M is finite; A3: N in omega by A1,CARD_1:61; omega c= M by A2,Th85; hence N in M by A3; thus thesis by A1,A2; end; theorem not X is finite iff ex Y st Y c= X & card Y = omega proof thus not X is finite implies ex Y st Y c= X & card Y = omega proof assume not X is finite; then not card X in omega; then A1: omega c= card X by CARD_1:4; card X,X are_equipotent by CARD_1:def 2; then consider f such that A2: f is one-to-one and A3: dom f = card X and A4: rng f = X by WELLORD2:def 4; take Y = f.:(omega); thus Y c= X by A4,RELAT_1:111; omega,Y are_equipotent proof take f|(omega); thus thesis by A1,A2,A3,FUNCT_1:52,RELAT_1:62,115; end; hence thesis by CARD_1:def 2; end; given Y such that A5: Y c= X and A6: card Y = omega; thus thesis by A5,A6; end; theorem Th88: card X = card Y iff nextcard X = nextcard Y proof thus card X = card Y implies nextcard X = nextcard Y by CARD_1:16; assume that A1: nextcard X = nextcard Y and A2: card X <> card Y; card X in card Y or card Y in card X by A2,ORDINAL1:14; then nextcard X c= card Y & card Y in nextcard Y or nextcard Y c= card X & card X in nextcard X by CARD_1:def 3; hence thesis by A1,ORDINAL1:12; end; theorem nextcard N = nextcard M implies M = N proof A1: card N = N by CARD_1:def 2; card M = M by CARD_1:def 2; hence thesis by A1,Th88; end; theorem Th90: N in M iff nextcard N c= M proof A1: N in nextcard N by CARD_1:18; card N = N by CARD_1:def 2; hence thesis by A1,CARD_1:def 3; end; theorem N in nextcard M iff N c= M proof A1: not N c= M iff M in N by CARD_1:4; N in nextcard M iff not nextcard M c= N by CARD_1:4; hence thesis by A1,Th90; end; theorem M is finite & (N c= M or N in M) implies N is finite proof assume that A1: M is finite and A2: N c= M or N in M; N c= M by A2,CARD_1:3; hence thesis by A1; end; reserve n,k for Nat; definition let X; attr X is countable means : Def14: card X c= omega; attr X is denumerable means card X = omega; end; registration cluster denumerable -> countable infinite for set; coherence proof let X be set; assume A1: card X = omega; hence card X c= omega; thus thesis by A1; end; cluster countable infinite -> denumerable for set; coherence proof let X be set; assume A2: card X c= omega; assume X is infinite; then omega c= card X by Th85; hence card X = omega by A2,XBOOLE_0:def 10; end; end; registration cluster finite -> countable for set; coherence proof let X be set; assume X is finite; then consider n being Nat such that A1: X,n are_equipotent by CARD_1:43; card n = card X by A1,CARD_1:5; hence card X c= omega; end; end; registration cluster omega -> denumerable; coherence proof thus card omega = omega by CARD_1:47; end; end; registration cluster denumerable for set; existence proof take omega; thus thesis; end; end; theorem Th93: X is countable iff ex f st dom f = omega & X c= rng f proof thus X is countable implies ex f st dom f = omega & X c= rng f proof assume card X c= omega; hence thesis by CARD_1:12,47; end; assume ex f st dom f = omega & X c= rng f; hence card X c= omega by CARD_1:12,47; end; registration let X be countable set; cluster -> countable for Subset of X; coherence proof let Y be Subset of X; A1: card Y c= card X by CARD_1:11; card X c= omega by Def14; hence card Y c= omega by A1,XBOOLE_1:1; end; end; Lm2: Y c= X & X is countable implies Y is countable; theorem X is countable implies X /\ Y is countable by Lm2,XBOOLE_1:17; theorem X is countable implies X \ Y is countable; theorem for A being non empty countable set ex f being Function of omega, A st rng f = A proof let A be non empty countable set; consider f being Function such that A1: dom f = omega and A2: A c= rng f by Th93; consider x being set such that A3: x in A by XBOOLE_0:def 1; set F = f|(f"A) +* (omega \ f"A --> x); A4: rng F = A & dom F = omega proof A5: f"A c= omega by A1,RELAT_1:132; A6: dom(f|(f"A)) = omega /\ (f"A) by A1,RELAT_1:61; per cases; suppose A7: omega = f"A; then A8: omega \ f"A = {} by XBOOLE_1:37; then dom(f|(f"A)) /\ dom(omega \ f"A --> x) = {}; then dom(f|(f"A)) misses dom(omega \ f"A --> x) by XBOOLE_0:def 7; then F = (f|(f"A)) \/ (omega \ f"A --> x) by FUNCT_4:31; hence rng F = rng(f|(f"A)) \/ rng(omega \ f"A --> x) by RELAT_1:12 .= rng(f|(f"A)) \/ {} by A8 .= f.:(f"A) by RELAT_1:115 .= A by A2,FUNCT_1:77; thus dom F = dom(f|(f"A)) \/ dom(omega \ f"A --> x) by FUNCT_4:def 1 .= dom(f|(f"A)) \/ {} by A8 .= omega by A6,A7; end; suppose A9: omega <> f"A; A10: now assume omega \ f"A is empty; then omega c= f"A by XBOOLE_1:37; hence contradiction by A5,A9,XBOOLE_0:def 10; end; dom(omega \ f"A --> x) = omega \ f"A by FUNCOP_1:13; then F = (f|(f"A)) \/ (omega \ f"A --> x) by A6,FUNCT_4:31,XBOOLE_1:89; hence rng F = rng(f|(f"A)) \/ rng(omega \ f"A --> x) by RELAT_1:12 .= rng(f|(f"A)) \/ {x} by A10,FUNCOP_1:8 .= f.:(f"A) \/ {x} by RELAT_1:115 .= A \/ {x} by A2,FUNCT_1:77 .= A by A3,ZFMISC_1:40; thus dom F = dom(f|(f"A)) \/ dom(omega \ f"A --> x) by FUNCT_4:def 1 .= omega /\ (f"A) \/ (omega \ f"A) by A6,FUNCOP_1:13 .= omega by XBOOLE_1:51; end; end; then reconsider F as Function of omega, A by FUNCT_2:def 1,RELSET_1:4; take F; thus thesis by A4; end; theorem for f,g being non-empty Function, x being Element of product f, y being Element of product g holds x+*y in product (f+*g) proof let f,g be non-empty Function, x be Element of product f; let y be Element of product g; A1: dom x = dom f by Th9; A2: dom y = dom g by Th9; then A3: dom (x+*y) = dom f \/ dom g by A1,FUNCT_4:def 1; A4: dom (f+*g) = dom f \/ dom g by FUNCT_4:def 1; now let z be set; assume A5: z in dom (f+*g); then z in dom g or not z in dom g & z in dom f by A4,XBOOLE_0:def 3; then (x+*y).z = x.z & (f+*g).z = f.z & x.z in f.z or (x+*y).z = y.z & (f+*g).z = g.z & y.z in g.z by A1,A2,A4,A5,Th9,FUNCT_4:def 1; hence (x+*y).z in (f+*g).z; end; hence thesis by A3,A4,Th9; end; theorem for f,g being non-empty Function for x being Element of product (f+*g) holds x|dom g in product g proof let f,g be non-empty Function; let x be Element of product (f+*g); A1: dom x = dom (f+*g) by Th9; A2: dom (f+*g) = dom f \/ dom g by FUNCT_4:def 1; then A3: dom g c= dom x by A1,XBOOLE_1:7; A4: dom (x|dom g) = dom g by A1,A2,RELAT_1:62,XBOOLE_1:7; now let z be set; assume A5: z in dom (x|dom g); then A6: (x|dom g).z = x.z by FUNCT_1:47; (f+*g).z = g.z by A4,A5,FUNCT_4:13; hence (x|dom g).z in g.z by A1,A3,A4,A5,A6,Th9; end; hence thesis by A4,Th9; end; theorem for f,g being non-empty Function st f tolerates g for x being Element of product (f+*g) holds x|dom f in product f proof let f,g be non-empty Function such that A1: f tolerates g; let x be Element of product (f+*g); A2: dom x = dom (f+*g) by Th9; A3: dom (f+*g) = dom f \/ dom g by FUNCT_4:def 1; then A4: dom f c= dom x by A2,XBOOLE_1:7; A5: dom (x|dom f) = dom f by A2,A3,RELAT_1:62,XBOOLE_1:7; now let z be set; assume A6: z in dom (x|dom f); then A7: (x|dom f).z = x.z by FUNCT_1:47; (f+*g).z = f.z by A1,A5,A6,FUNCT_4:15; hence (x|dom f).z in f.z by A2,A4,A5,A6,A7,Th9; end; hence thesis by A5,Th9; end; theorem Th100: for S being with_common_domain functional set, f be Function st f in S holds dom f = dom product" S proof let S be with_common_domain functional set, f be Function such that A1: f in S; thus dom f = DOM S by A1,LmX .= dom product" S by Def12; end; theorem Th101: for S being functional set, f be Function, i be set st f in S & i in dom product" S holds f.i in (product" S).i proof let S being functional set, F be Function, i be set such that A1: F in S; assume i in dom product" S; then (product" S).i = {f.i where f is Element of S: not contradiction} by A1,Th74; hence F.i in (product" S).i by A1; end; theorem for S being with_common_domain functional set, f be Function, i be set st f in S & i in dom f holds f.i in (product" S).i proof let S be with_common_domain functional set, f be Function, i be set; assume that A1: f in S and A2: i in dom f; dom f = dom(product" S) by A1,Th100; hence f.i in (product" S).i by A1,A2,Th101; end; registration let X be with_common_domain set; cluster -> with_common_domain for Subset of X; coherence proof let Y be Subset of X; let f,g be Function; thus thesis by Def10; end; end; definition let f be Function, x be set; func proj(f,x) -> Function means :Def16: dom it = product f & for y being Function st y in dom it holds it.y = y.x; existence proof defpred P[set,set] means for g be Function st $1 = g holds $2 = g.x; A1: now let q be set; assume q in product f; then reconsider q1 = q as Function; take y = q1.x; thus P[q,y]; end; consider F be Function such that A2: dom F = product f & for a being set st a in product f holds P[a,F. a] from CLASSES1:sch 1(A1); take F; thus thesis by A2; end; uniqueness proof let F,G be Function such that A3: dom F = product f and A4: for y being Function st y in dom F holds F.y = y.x and A5: dom G = product f and A6: for y being Function st y in dom G holds G.y = y.x; now let y be set; assume A7: y in product f; then reconsider x1 = y as Function; thus F.y = x1.x by A3,A4,A7 .= G.y by A5,A6,A7; end; hence thesis by A3,A5,FUNCT_1:2; end; end; registration let f be Function, x be set; cluster proj(f,x) -> (product f)-defined; coherence proof dom proj(f,x) = product f by Def16; hence thesis by RELAT_1:def 18; end; end; registration let f be Function, x be set; cluster proj(f,x) -> total; coherence proof dom proj(f,x) = product f by Def16; hence thesis by PARTFUN1:def 2; end; end; registration let f be non-empty Function; cluster -> f-compatible for Element of product f; coherence proof let e be Element of product f; let x; assume x in dom e; then x in dom f by Th9; hence e.x in f.x by Th9; end; end; registration let I be set; let f be I-defined non-empty Function; cluster -> I-defined for Element of product f; coherence; end; registration let f be Function; cluster -> f-compatible for Element of sproduct f; coherence proof let e be Element of sproduct f; let x; thus thesis by Th49; end; end; registration let I be set; let f be I-defined Function; cluster -> I-defined for Element of sproduct f; coherence; end; registration let I be set; let f be total I-defined non-empty Function; cluster -> total for Element of product f; coherence proof let e be Element of product f; thus dom e = dom f by Th9 .= I by PARTFUN1:def 2; end; end; theorem Th103: for I being set, f being non-empty I-defined Function for p being f-compatible I-defined Function holds p in sproduct f proof let I be set, f be non-empty I-defined Function; let p be f-compatible I-defined Function; A1: dom p c= dom f by FUNCT_1:105; for x being set st x in dom p holds p.x in f.x by FUNCT_1:def 14; hence p in sproduct f by A1,Def9; end; theorem for I being set, f being non-empty I-defined Function for p being f-compatible I-defined Function ex s being Element of product f st p c= s proof let I be set; let f be non-empty I-defined Function, p be f-compatible I-defined Function; reconsider p as Element of sproduct f by Th103; set h = the Element of product f; reconsider s = h +* p as Element of product f by Th53; take s; thus thesis by FUNCT_4:25; end; registration let X be infinite set, a be set; cluster X --> a -> infinite; coherence; end; registration cluster infinite for Function; existence proof take omega --> 0; thus thesis; end; end; registration let R be infinite Relation; cluster field R -> infinite; coherence by ORDERS_1:86; end; registration let X be infinite set; cluster RelIncl X -> infinite; coherence by CARD_1:63; end; theorem for R,S being Relation st R,S are_isomorphic & R is finite holds S is finite proof let R,S be Relation; given F being Function such that A1: F is_isomorphism_of R,S; assume R is finite; then field R is finite; then dom F is finite by A1,WELLORD1:def 7; then rng F is finite by FINSET_1:8; then field S is finite by A1,WELLORD1:def 7; hence thesis; end; theorem product" {{}} = {} proof dom product" {{}} = DOM {{}} by Def12 .= {} by Th72; hence thesis; end; theorem Th107: for I being set, f being non-empty ManySortedSet of I for s being f-compatible ManySortedSet of I holds s in product f proof let I be set, f be non-empty ManySortedSet of I; let s be f-compatible ManySortedSet of I; A1: dom s = I by PARTFUN1:def 2 .= dom f by PARTFUN1:def 2; then for x being set st x in dom f holds s.x in f.x by FUNCT_1:def 14; hence s in product f by A1,Th9; end; registration let I be set, f be non-empty ManySortedSet of I; cluster -> total for Element of product f; coherence; end; definition let I be set, f be non-empty ManySortedSet of I; let M be f-compatible ManySortedSet of I; func down M -> Element of product f equals M; coherence by Th107; end; theorem for X being functional with_common_domain set for f being Function st f in X holds dom f = DOM X by LmX; theorem for X being non empty functional set st for f being Function st f in X holds x in dom f holds x in DOM X proof let X be non empty functional set such that Z: for f being Function st f in X holds x in dom f; set A = { dom f where f is Element of X: not contradiction }; consider Y being set such that W: Y in X by XBOOLE_0:def 1; reconsider Y as Function by W; S: dom Y in A by W; for Y holds Y in A implies x in Y proof let Y; assume Y in A; then ex f being Element of X st Y = dom f; hence x in Y by Z; end; hence x in DOM X by S,SETFAM_1:def 1; end; begin reserve x,y,y1,y2,z,a,b,X,Y,Z,V1,V2 for set, f,g,h,h9,f1,f2 for Function, i for Nat, P for Permutation of X, D,D1,D2,D3 for non empty set, d1 for Element of D1, d2 for Element of D2, d3 for Element of D3; theorem Th1: product f c= Funcs(dom f, Union f) proof let x; assume x in product f; then consider g such that A1: x = g and A2: dom g = dom f and A3: for x st x in dom f holds g.x in f.x by CARD_3:def 5; rng g c= Union f proof let y; A4: Union f = union rng f by CARD_3:def 4; assume y in rng g; then consider z such that A5: z in dom g & y = g.z by FUNCT_1:def 3; y in f.z & f.z in rng f by A2,A3,A5,FUNCT_1:def 3; hence thesis by A4,TARSKI:def 4; end; hence thesis by A1,A2,FUNCT_2:def 2; end; begin theorem Th2: x in dom ~f implies ex y,z st x = [y,z] proof assume A1: x in dom ~f; ex X,Y st dom ~f c= [:X,Y:] by FUNCT_4:44; hence thesis by A1,RELAT_1:def 1; end; theorem Th3: ~([:X,Y:] --> z) = [:Y,X:] --> z proof A1: dom ([:X,Y:] --> z) = [:X,Y:] by FUNCOP_1:13; then A2: dom ~([:X,Y:] --> z) = [:Y,X:] by FUNCT_4:46; A3: now let x; assume A4: x in [:Y,X:]; then consider y1,y2 such that A5: x = [y2,y1] and A6: [y1,y2] in [:X,Y:] by A1,A2,FUNCT_4:def 2; A7: ([:X,Y:] --> z).(y1,y2) = z by A6,FUNCOP_1:7; ([:Y,X:] --> z).(y2,y1) = z by A4,A5,FUNCOP_1:7; then (~([:X,Y:] --> z)).(y2,y1) = ([:Y,X:] --> z).(y2,y1) by A1,A6,A7, FUNCT_4:def 2; hence (~([:X,Y:] --> z)).x = ([:Y,X:] --> z).x by A5; end; dom ([:Y,X:] --> z) = [:Y,X:] by FUNCOP_1:13; hence thesis by A2,A3,FUNCT_1:2; end; theorem Th4: curry f = curry' ~f & uncurry f = ~uncurry' f proof A1: dom curry ~~f = proj1 dom ~~f by FUNCT_5:def 1; A2: dom curry f = proj1 dom f by FUNCT_5:def 1; A3: dom curry ~~f = dom curry f proof thus dom curry ~~f c= dom curry f proof let x; assume x in dom curry ~~f; then consider y such that A4: [x,y] in dom ~~f by A1,XTUPLE_0:def 12; [y,x] in dom ~f by A4,FUNCT_4:42; then [x,y] in dom f by FUNCT_4:42; hence thesis by A2,XTUPLE_0:def 12; end; let x; assume x in dom curry f; then consider y such that A5: [x,y] in dom f by A2,XTUPLE_0:def 12; [y,x] in dom ~f by A5,FUNCT_4:42; then [x,y] in dom ~~f by FUNCT_4:42; hence thesis by A1,XTUPLE_0:def 12; end; A6: curry' ~f = curry ~~f by FUNCT_5:def 3; now let x; assume A7: x in dom curry f; then reconsider g = (curry f).x, h = (curry' ~f).x as Function by A6,A3, FUNCT_5:30; A8: dom g = proj2 (dom f /\ [:{x},proj2 dom f:]) by A7,FUNCT_5:31; A9: dom h = proj1 (dom ~f /\ [:proj1 dom ~f,{x}:]) by A6,A3,A7,FUNCT_5:34; A10: dom g = dom h proof thus dom g c= dom h proof let a; assume a in dom g; then consider b such that A11: [b,a] in dom f /\ [:{x},proj2 dom f:] by A8,XTUPLE_0:def 13; [b,a] in [:{x},proj2 dom f:] by A11,XBOOLE_0:def 4; then A12: [a,b] in [:proj2 dom f,{x}:] by ZFMISC_1:88; [b,a] in dom f by A11,XBOOLE_0:def 4; then A13: [a,b] in dom ~f by FUNCT_4:42; proj2 dom f = proj1 dom ~f by FUNCT_5:17; then [a,b] in dom ~f /\ [:proj1 dom ~f,{x}:] by A13,A12,XBOOLE_0:def 4; hence thesis by A9,XTUPLE_0:def 12; end; let a; assume a in dom h; then consider b such that A14: [a,b] in dom ~f /\ [:proj1 dom ~f,{x}:] by A9,XTUPLE_0:def 12; [a,b] in [:proj1 dom ~f,{x}:] by A14,XBOOLE_0:def 4; then A15: [b,a] in [:{x},proj1 dom ~f:] by ZFMISC_1:88; [a,b] in dom ~f by A14,XBOOLE_0:def 4; then A16: [b,a] in dom f by FUNCT_4:42; proj2 dom f = proj1 dom ~f by FUNCT_5:17; then [b,a] in dom f /\ [:{x},proj2 dom f:] by A16,A15,XBOOLE_0:def 4; hence thesis by A8,XTUPLE_0:def 13; end; now let a; assume A17: a in dom g; then A18: [x,a] in dom f & g.a = f.(x,a) by A7,FUNCT_5:31; h.a = (~f).(a,x) by A6,A3,A7,A10,A17,FUNCT_5:34; hence g.a = h.a by A18,FUNCT_4:def 2; end; hence (curry f).x = (curry' ~f).x by A10,FUNCT_1:2; end; hence curry f = curry' ~f by A6,A3,FUNCT_1:2; A19: dom uncurry f = dom ~~uncurry f proof thus dom uncurry f c= dom ~~uncurry f proof let a; assume A20: a in dom uncurry f; then consider x,g,y such that A21: a = [x,y] and x in dom f and g = f.x and y in dom g by FUNCT_5:def 2; [y,x] in dom ~uncurry f by A20,A21,FUNCT_4:42; hence thesis by A21,FUNCT_4:42; end; let a; assume a in dom ~~uncurry f; then ex x,y st a = [y,x] & [x,y] in dom ~uncurry f by FUNCT_4:def 2; hence thesis by FUNCT_4:42; end; A22: now let a; assume a in dom ~~uncurry f; then consider x,y such that A23: a = [y,x] and A24: [x,y] in dom ~uncurry f by FUNCT_4:def 2; (~uncurry f).(x,y) = (uncurry f).(y,x) & (~uncurry f).(x,y) = (~~ uncurry f). (y,x) by A24,FUNCT_4:43,def 2; hence (uncurry f).a = (~~uncurry f).a by A23; end; uncurry' f = ~uncurry f by FUNCT_5:def 4; hence thesis by A19,A22,FUNCT_1:2; end; theorem [:X,Y:] <> {} implies curry ([:X,Y:] --> z) = X --> (Y --> z) & curry' ([:X,Y:] --> z) = Y --> (X --> z) proof assume A1: [:X,Y:] <> {}; A2: dom ([:X,Y:] --> z) = [:X,Y:] by FUNCOP_1:13; A3: dom (X --> z) = X by FUNCOP_1:13; A4: now let x; assume A5: x in Y; then consider f such that A6: (curry' ([:X,Y:] --> z)).x = f & dom f = X and rng f c= rng ([:X,Y:] --> z) and A7: for y st y in X holds f.y = ([:X,Y:] --> z).(y,x) by A1,A2,FUNCT_5:32; A8: now let y; assume A9: y in X; then A10: f.y = ([:X,Y:] --> z).(y,x) by A7; (X --> z).y = z & [y,x] in [:X,Y:] by A5,A9,FUNCOP_1:7,ZFMISC_1:87; hence f.y = (X --> z).y by A10,FUNCOP_1:7; end; (Y --> (X --> z)).x = X --> z by A5,FUNCOP_1:7; hence (curry' ([:X,Y:] --> z)).x = (Y --> (X --> z)).x by A3,A6,A8, FUNCT_1:2; end; A11: dom (Y --> z) = Y by FUNCOP_1:13; A12: now let x; assume A13: x in X; then consider f such that A14: (curry ([:X,Y:] --> z)).x = f & dom f = Y and rng f c= rng ([:X,Y:] --> z) and A15: for y st y in Y holds f.y = ([:X,Y:] --> z).(x,y) by A1,A2,FUNCT_5:29; A16: now let y; assume A17: y in Y; then A18: f.y = ([:X,Y:] --> z).(x,y) by A15; (Y --> z).y = z & [x,y] in [:X,Y:] by A13,A17,FUNCOP_1:7,ZFMISC_1:87; hence f.y = (Y --> z).y by A18,FUNCOP_1:7; end; (X --> (Y --> z)).x = Y --> z by A13,FUNCOP_1:7; hence (curry ([:X,Y:] --> z)).x = (X --> (Y --> z)).x by A11,A14,A16, FUNCT_1:2; end; dom (X --> (Y --> z)) = X & dom curry ([:X,Y:] --> z) = X by A1,A2, FUNCOP_1:13,FUNCT_5:24; hence curry ([:X,Y:] --> z) = X --> (Y --> z) by A12,FUNCT_1:2; dom (Y --> (X --> z)) = Y & dom curry' ([:X,Y:] --> z) = Y by A1,A2, FUNCOP_1:13,FUNCT_5:24; hence thesis by A4,FUNCT_1:2; end; theorem uncurry (X --> (Y --> z)) = [:X,Y:] --> z & uncurry' (X --> (Y --> z)) = [:Y,X:] --> z proof A1: dom (X --> (Y --> z)) = X by FUNCOP_1:13; A2: dom (Y --> z) = Y by FUNCOP_1:13; rng (Y --> z) c= {z} by FUNCOP_1:13; then (Y --> z) in Funcs (Y,{z}) by A2,FUNCT_2:def 2; then rng (X --> (Y --> z)) c= {Y --> z} & {(Y --> z)} c= Funcs (Y,{z}) by FUNCOP_1:13,ZFMISC_1:31; then rng (X --> (Y --> z)) c= Funcs (Y,{z}) by XBOOLE_1:1; then A3: dom uncurry (X --> (Y --> z)) = [:X,Y:] by A1,FUNCT_5:26; A4: now let x; assume A5: x in [:X,Y:]; then consider y1,g,y2 such that A6: x = [y1,y2] and A7: y1 in X & g = (X --> (Y --> z)).y1 and A8: y2 in dom g by A1,A3,FUNCT_5:def 2; A9: g = Y --> z by A7,FUNCOP_1:7; then (Y --> z).y2 = z by A2,A8,FUNCOP_1:7; then z = (uncurry (X --> (Y --> z))).(y1,y2) by A1,A7,A8,A9,FUNCT_5:38; hence (uncurry (X --> (Y --> z))).x = ([:X,Y:] --> z).x by A5,A6,FUNCOP_1:7 ; end; dom ([:X,Y:] --> z) = [:X,Y:] by FUNCOP_1:13; hence uncurry (X --> (Y --> z)) = [:X,Y:] --> z by A3,A4,FUNCT_1:2; then ~uncurry (X --> (Y --> z)) = [:Y,X:] --> z by Th3; hence thesis by FUNCT_5:def 4; end; theorem Th7: x in dom f & g = f.x implies rng g c= rng uncurry f & rng g c= rng uncurry' f proof assume A1: x in dom f & g = f.x; thus rng g c= rng uncurry f proof let y; assume y in rng g; then ex z st z in dom g & y = g.z by FUNCT_1:def 3; hence thesis by A1,FUNCT_5:38; end; let y; assume y in rng g; then ex z st z in dom g & y = g.z by FUNCT_1:def 3; hence thesis by A1,FUNCT_5:39; end; theorem Th8: dom uncurry (X --> f) = [:X,dom f:] & rng uncurry (X --> f) c= rng f & dom uncurry' (X --> f) = [:dom f,X:] & rng uncurry' (X --> f) c= rng f proof f in Funcs(dom f, rng f) by FUNCT_2:def 2; then rng (X --> f) c= {f} & {f} c= Funcs(dom f, rng f) by FUNCOP_1:13 ,ZFMISC_1:31; then dom (X --> f) = X & rng (X --> f) c= Funcs(dom f, rng f) by FUNCOP_1:13 ,XBOOLE_1:1; hence thesis by FUNCT_5:26,41; end; theorem X <> {} implies rng uncurry (X --> f) = rng f & rng uncurry' (X --> f) = rng f proof set x = the Element of X; assume A1: X <> {}; then dom (X --> f) = X & (X --> f).x = f by FUNCOP_1:7,13; hence rng uncurry (X --> f) c= rng f & rng f c= rng uncurry (X --> f) & rng uncurry' (X --> f) c= rng f & rng f c= rng uncurry' (X --> f) by A1,Th7,Th8 ; end; theorem Th10: [:X,Y:] <> {} & f in Funcs([:X,Y:],Z) implies curry f in Funcs(X ,Funcs(Y,Z)) & curry' f in Funcs(Y,Funcs(X,Z)) proof assume A1: [:X,Y:] <> {}; assume f in Funcs([:X,Y:],Z); then A2: ex g st f = g & dom g = [:X,Y:] & rng g c= Z by FUNCT_2:def 2; then rng curry f c= Funcs(Y,rng f) & Funcs(Y,rng f) c= Funcs(Y,Z) by FUNCT_5:35,56; then A3: rng curry f c= Funcs(Y,Z) by XBOOLE_1:1; rng curry' f c= Funcs(X,rng f) & Funcs(X,rng f) c= Funcs(X,Z) by A2, FUNCT_5:35,56; then A4: rng curry' f c= Funcs(X,Z) by XBOOLE_1:1; dom curry f = X & dom curry' f = Y by A1,A2,FUNCT_5:24; hence thesis by A3,A4,FUNCT_2:def 2; end; theorem Th11: f in Funcs(X,Funcs(Y,Z)) implies uncurry f in Funcs([:X,Y:],Z) & uncurry' f in Funcs([:Y,X:],Z) proof assume f in Funcs(X,Funcs(Y,Z)); then A1: ex g st f = g & dom g = X & rng g c= Funcs(Y,Z) by FUNCT_2:def 2; then A2: dom uncurry f = [:X,Y:] & dom uncurry' f = [:Y,X:] by FUNCT_5:26; rng uncurry f c= Z & rng uncurry' f c= Z by A1,FUNCT_5:41; hence thesis by A2,FUNCT_2:def 2; end; theorem (curry f in Funcs(X,Funcs(Y,Z)) or curry' f in Funcs(Y,Funcs(X,Z))) & dom f c= [:V1,V2:] implies f in Funcs([:X,Y:],Z) proof assume curry f in Funcs(X,Funcs(Y,Z)) or curry' f in Funcs(Y,Funcs(X,Z)); then A1: uncurry curry f in Funcs([:X,Y:],Z) or uncurry' curry' f in Funcs([:X,Y :],Z) by Th11; assume dom f c= [:V1,V2:]; hence thesis by A1,FUNCT_5:50; end; theorem (uncurry f in Funcs([:X,Y:],Z) or uncurry' f in Funcs([:Y,X:],Z)) & rng f c= PFuncs(V1,V2) & dom f = X implies f in Funcs(X,Funcs(Y,Z)) proof assume that A1: uncurry f in Funcs([:X,Y:],Z) or uncurry' f in Funcs([:Y,X:],Z) and A2: rng f c= PFuncs(V1,V2) and A3: dom f = X; A4: uncurry' f = ~uncurry f by FUNCT_5:def 4; A5: (ex g st uncurry f = g & dom g = [:X,Y:] & rng g c= Z) or ex g st uncurry' f = g & dom g = [:Y,X:] & rng g c= Z by A1,FUNCT_2:def 2; then A6: dom uncurry' f = [:Y,X:] by A4,FUNCT_4:46; rng f c= Funcs(Y,Z) proof let y; assume A7: y in rng f; then consider x such that A8: x in dom f and A9: y = f.x by FUNCT_1:def 3; ex g st y = g & dom g c= V1 & rng g c= V2 by A2,A7,PARTFUN1:def 3; then reconsider h = y as Function; A10: dom h = Y proof thus dom h c= Y proof let z; assume z in dom h; then [z,x] in dom uncurry' f by A8,A9,FUNCT_5:39; hence thesis by A6,ZFMISC_1:87; end; let z; assume z in Y; then [z,x] in [:Y,X:] by A3,A8,ZFMISC_1:87; then [x,z] in dom uncurry f by A4,A6,FUNCT_4:42; then consider y1,f1,y2 such that A11: [x,z] = [y1,y2] and y1 in dom f and A12: f1 = f.y1 & y2 in dom f1 by FUNCT_5:def 2; x = y1 by A11,XTUPLE_0:1; hence thesis by A9,A11,A12,XTUPLE_0:1; end; rng h c= Z proof let z; assume z in rng h; then ex y1 st y1 in dom h & z = h.y1 by FUNCT_1:def 3; then z in rng uncurry f & z in rng uncurry' f by A8,A9,FUNCT_5:38,39; hence thesis by A5; end; hence thesis by A10,FUNCT_2:def 2; end; hence thesis by A3,FUNCT_2:def 2; end; theorem f in PFuncs([:X,Y:],Z) implies curry f in PFuncs(X,PFuncs(Y,Z)) & curry' f in PFuncs(Y,PFuncs(X,Z)) proof assume f in PFuncs([:X,Y:],Z); then A1: ex g st f = g & dom g c= [:X,Y:] & rng g c= Z by PARTFUN1:def 3; then proj1 [:X,Y:] c= X & proj1 dom f c= proj1 [:X,Y:] by FUNCT_5:10 ,XTUPLE_0:8; then proj1 dom f c= X by XBOOLE_1:1; then A2: PFuncs(proj1 dom f,rng f) c= PFuncs(X,Z) by A1,PARTFUN1:50; proj2 [:X,Y:] c= Y & proj2 dom f c= proj2 [:X,Y:] by A1,FUNCT_5:10,XTUPLE_0:9 ; then proj2 dom f c= Y by XBOOLE_1:1; then rng curry f c= PFuncs(proj2 dom f,rng f) & PFuncs(proj2 dom f,rng f) c= PFuncs(Y,Z) by A1,FUNCT_5:36,PARTFUN1:50; then A3: rng curry f c= PFuncs(Y,Z) by XBOOLE_1:1; rng curry' f c= PFuncs(proj1 dom f,rng f) by FUNCT_5:36; then A4: rng curry' f c= PFuncs(X,Z) by A2,XBOOLE_1:1; dom curry f c= X & dom curry' f c= Y by A1,FUNCT_5:25; hence thesis by A3,A4,PARTFUN1:def 3; end; theorem Th15: f in PFuncs(X,PFuncs(Y,Z)) implies uncurry f in PFuncs([:X,Y:],Z ) & uncurry' f in PFuncs([:Y,X:],Z) proof assume f in PFuncs(X,PFuncs(Y,Z)); then A1: ex g st f = g & dom g c= X & rng g c= PFuncs(Y,Z) by PARTFUN1:def 3; then dom uncurry f c= [:dom f,Y:] & [:dom f,Y:] c= [:X,Y:] by FUNCT_5:37 ,ZFMISC_1:96; then A2: dom uncurry f c= [:X,Y:] by XBOOLE_1:1; dom uncurry' f c= [:Y,dom f:] & [:Y,dom f:] c= [:Y,X:] by A1,FUNCT_5:37 ,ZFMISC_1:96; then A3: dom uncurry' f c= [:Y,X:] by XBOOLE_1:1; rng uncurry f c= Z & rng uncurry' f c= Z by A1,FUNCT_5:40; hence thesis by A2,A3,PARTFUN1:def 3; end; theorem (curry f in PFuncs(X,PFuncs(Y,Z)) or curry' f in PFuncs(Y,PFuncs(X,Z)) ) & dom f c= [:V1,V2:] implies f in PFuncs([:X,Y:],Z) proof assume curry f in PFuncs(X,PFuncs(Y,Z)) or curry' f in PFuncs(Y,PFuncs(X,Z) ); then A1: uncurry curry f in PFuncs([:X,Y:],Z) or uncurry' curry' f in PFuncs([:X, Y:],Z) by Th15; assume dom f c= [:V1,V2:]; hence thesis by A1,FUNCT_5:50; end; theorem (uncurry f in PFuncs([:X,Y:],Z) or uncurry' f in PFuncs([:Y,X:],Z)) & rng f c= PFuncs(V1,V2) & dom f c= X implies f in PFuncs(X,PFuncs(Y,Z)) proof assume that A1: uncurry f in PFuncs([:X,Y:],Z) or uncurry' f in PFuncs([:Y,X:],Z) and A2: rng f c= PFuncs(V1,V2) and A3: dom f c= X; A4: (ex g st uncurry f = g & dom g c= [:X,Y:] & rng g c= Z) or ex g st uncurry' f = g & dom g c= [:Y,X:] & rng g c= Z by A1,PARTFUN1:def 3; uncurry' f = ~uncurry f by FUNCT_5:def 4; then A5: dom uncurry' f c= [:Y,X:] by A4,FUNCT_4:45; rng f c= PFuncs(Y,Z) proof let y; assume A6: y in rng f; then consider x such that A7: x in dom f & y = f.x by FUNCT_1:def 3; ex g st y = g & dom g c= V1 & rng g c= V2 by A2,A6,PARTFUN1:def 3; then reconsider h = y as Function; A8: rng h c= Z proof let z; assume z in rng h; then ex y1 st y1 in dom h & z = h.y1 by FUNCT_1:def 3; then z in rng uncurry f & z in rng uncurry' f by A7,FUNCT_5:38,39; hence thesis by A4; end; dom h c= Y proof let z; assume z in dom h; then [z,x] in dom uncurry' f by A7,FUNCT_5:39; hence thesis by A5,ZFMISC_1:87; end; hence thesis by A8,PARTFUN1:def 3; end; hence thesis by A3,PARTFUN1:def 3; end; begin definition let X be set; func SubFuncs X means :Def1: x in it iff x in X & x is Function; existence proof defpred P[set] means $1 is Function; ex Y being set st for x being set holds x in Y iff x in X & P[x] from XBOOLE_0:sch 1; hence thesis; end; uniqueness proof defpred P[set] means $1 in X & $1 is Function; let X1,X2 be set such that A1: for x being set holds x in X1 iff P[x] and A2: for x being set holds x in X2 iff P[x]; thus X1 = X2 from XBOOLE_0:sch 2(A1,A2); end; end; theorem Th18: SubFuncs X c= X proof let x; thus thesis by Def1; end; theorem Th19: x in f"SubFuncs rng f iff x in dom f & f.x is Function proof f.x in rng f & f.x is Function iff f.x in SubFuncs rng f by Def1; hence thesis by FUNCT_1:def 3,def 7; end; Lm1: (for x st x in X holds x is Function) implies SubFuncs X = X proof assume x in X implies x is Function; then x in X iff x in X & x is Function; hence thesis by Def1; end; theorem SubFuncs {} = {} & SubFuncs {f} = {f} & SubFuncs {f,g} = {f,g} & SubFuncs {f,g,h} = {f,g,h} proof thus SubFuncs {} = {} by Th18,XBOOLE_1:3; for x st x in {f} holds x is Function; hence SubFuncs {f} = {f} by Lm1; for x st x in {f,g} holds x is Function; hence SubFuncs {f,g} = {f,g} by Lm1; for x st x in {f,g,h} holds x is Function by ENUMSET1:def 1; hence thesis by Lm1; end; theorem Y c= SubFuncs X implies SubFuncs Y = Y proof assume Y c= SubFuncs X; then for x st x in Y holds x is Function by Def1; hence thesis by Lm1; end; definition let f be Function; func doms f -> Function means : Def2: dom it = f"SubFuncs rng f & for x st x in f"SubFuncs rng f holds it.x = proj1 (f.x); existence proof deffunc F(set) = proj1 (f.$1); ex F be Function st dom F = f"SubFuncs rng f & for x st x in f" SubFuncs rng f holds F.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let f1,f2 be Function such that A1: dom f1 = f"SubFuncs rng f and A2: for x st x in f"SubFuncs rng f holds f1.x = proj1 (f.x) and A3: dom f2 = f"SubFuncs rng f and A4: for x st x in f"SubFuncs rng f holds f2.x = proj1 (f.x); now let x; assume A5: x in f"SubFuncs rng f; then f1.x = proj1 (f.x) by A2; hence f1.x = f2.x by A4,A5; end; hence thesis by A1,A3,FUNCT_1:2; end; func rngs f -> Function means : Def3: dom it = f"SubFuncs rng f & for x st x in f"SubFuncs rng f holds it.x = proj2 (f.x); existence proof deffunc F(set) = proj2 (f.$1); ex F be Function st dom F = f"SubFuncs rng f & for x st x in f" SubFuncs rng f holds F.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let f1,f2 be Function such that A6: dom f1 = f"SubFuncs rng f and A7: for x st x in f"SubFuncs rng f holds f1.x = proj2 (f.x) and A8: dom f2 = f"SubFuncs rng f and A9: for x st x in f"SubFuncs rng f holds f2.x = proj2 (f.x); now let x; assume A10: x in f"SubFuncs rng f; then f1.x = proj2 (f.x) by A7; hence f1.x = f2.x by A9,A10; end; hence thesis by A6,A8,FUNCT_1:2; end; func meet f equals meet rng f; correctness; end; theorem Th22: x in dom f & g = f.x implies x in dom doms f & (doms f).x = dom g & x in dom rngs f & (rngs f).x = rng g proof assume that A1: x in dom f and A2: g = f.x; g in rng f by A1,A2,FUNCT_1:def 3; then g in SubFuncs rng f by Def1; then x in f"SubFuncs rng f by A1,A2,FUNCT_1:def 7; hence thesis by A2,Def2,Def3; end; theorem doms {} = {} & rngs {} = {} proof dom doms {} = {}"SubFuncs {} & dom rngs {} = {}"SubFuncs {} by Def2,Def3, RELAT_1:38; hence thesis; end; theorem Th24: doms (X --> f) = X --> dom f & rngs (X --> f) = X --> rng f proof A1: dom (X --> dom f) = X & dom doms (X --> f) = (X --> f)"SubFuncs rng (X --> f ) by Def2,FUNCOP_1:13; A2: rng (X --> f) c= {f} by FUNCOP_1:13; A3: SubFuncs rng (X --> f) = rng (X --> f) proof thus SubFuncs rng (X --> f) c= rng (X --> f) by Th18; let x; assume x in rng (X --> f); hence thesis by A2,Def1; end; A4: dom (X --> f) = X & (X --> f)"rng (X --> f) = dom (X --> f) by FUNCOP_1:13 ,RELAT_1:134; now let x; assume A5: x in X; then (X --> f).x = f & (X --> dom f).x = dom f by FUNCOP_1:7; hence (doms (X --> f)).x = (X --> dom f).x by A4,A3,A5,Def2; end; hence doms (X --> f) = X --> dom f by A1,A4,A3,FUNCT_1:2; A6: now let x; assume A7: x in X; then (X --> f).x = f & (X --> rng f).x = rng f by FUNCOP_1:7; hence (rngs (X --> f)).x = (X --> rng f).x by A4,A3,A7,Def3; end; dom (X --> rng f) = X & dom rngs (X --> f) = (X --> f)"SubFuncs rng (X --> f ) by Def3,FUNCOP_1:13; hence thesis by A4,A3,A6,FUNCT_1:2; end; theorem Th25: f <> {} implies (x in meet f iff for y st y in dom f holds x in f.y) proof assume A1: f <> {}; thus x in meet f implies for y st y in dom f holds x in f.y proof assume A2: x in meet f; let y; assume y in dom f; then f.y in rng f by FUNCT_1:def 3; then meet f c= f.y by SETFAM_1:3; hence thesis by A2; end; assume A3: for y st y in dom f holds x in f.y; now let z; assume z in rng f; then ex y st y in dom f & z = f.y by FUNCT_1:def 3; hence x in z by A3; end; hence thesis by A1,SETFAM_1:def 1; end; theorem Union ({} --> Y) = {} & meet ({} --> Y) = {} proof union rng ({} --> Y) = {} by ZFMISC_1:2; hence thesis by CARD_3:def 4,SETFAM_1:def 1; end; theorem Th27: X <> {} implies Union (X --> Y) = Y & meet (X --> Y) = Y proof assume X <> {}; then A1: rng (X --> Y) = {Y} by FUNCOP_1:8; then union rng (X --> Y) = Y by ZFMISC_1:25; hence thesis by A1,CARD_3:def 4,SETFAM_1:10; end; definition let f be Function, x, y be set; func f..(x,y) -> set equals (uncurry f).(x,y); correctness; end; theorem x in X & y in dom f implies (X --> f)..(x,y) = f.y proof A1: x in X implies (X --> f).x = f by FUNCOP_1:7; dom (X --> f) = X by FUNCOP_1:13; hence thesis by A1,FUNCT_5:38; end; begin definition let f be Function; func <:f:> -> Function equals curry ((uncurry' f)|([:meet doms f, dom f:] qua set)); correctness; end; theorem Th29: dom <:f:> = meet doms f & rng <:f:> c= product rngs f proof set f9 = (uncurry' f)|([:meet doms f, dom f:] qua set); dom ((uncurry' f)|([:meet doms f, dom f:] qua set)) c= [:meet doms f, dom f:] by RELAT_1:58; hence A1: dom <:f:> c= meet doms f by FUNCT_5:25; A2: dom doms f = f"SubFuncs rng f by Def2; thus meet doms f c= dom <:f:> proof set y = the Element of rng doms f; let x; assume A3: x in meet doms f; then A4: rng doms f <> {} by SETFAM_1:def 1; then A5: x in y by A3,SETFAM_1:def 1; consider z such that A6: z in dom doms f and A7: y = (doms f).z by A4,FUNCT_1:def 3; f.z in SubFuncs rng f by A2,A6,FUNCT_1:def 7; then reconsider g = f.z as Function by Def1; A8: z in dom f by A2,A6,FUNCT_1:def 7; then y = dom g by A7,Th22; then A9: [x,z] in dom uncurry' f by A8,A5,FUNCT_5:39; [x,z] in [:meet doms f, dom f:] by A3,A8,ZFMISC_1:87; then [x,z] in dom (uncurry' f) /\ [:meet doms f, dom f:] by A9, XBOOLE_0:def 4; then [x,z] in dom ((uncurry' f)|([:meet doms f, dom f:] qua set)) by RELAT_1:61; then x in proj1 dom ((uncurry' f)|([:meet doms f, dom f:] qua set)) by XTUPLE_0:def 12; hence thesis by FUNCT_5:def 1; end; A10: dom rngs f = f"SubFuncs rng f by Def3; thus rng <:f:> c= product rngs f proof let y; A11: dom f9 = dom (uncurry' f) /\ [:meet doms f, dom f:] by RELAT_1:61; A12: uncurry' f = ~(uncurry f) by FUNCT_5:def 4; assume y in rng <:f:>; then consider x such that A13: x in dom <:f:> and A14: y = <:f:>.x by FUNCT_1:def 3; reconsider g = y as Function by A13,A14,FUNCT_5:30; A15: dom g = proj2 (dom f9 /\ [:{x},proj2 dom f9:]) by A13,A14,FUNCT_5:31; A16: dom g = dom rngs f proof thus dom g c= dom rngs f proof let z; assume z in dom g; then [x,z] in dom f9 by A13,A14,FUNCT_5:31; then [x,z] in dom uncurry' f by A11,XBOOLE_0:def 4; then [z,x] in dom uncurry f by A12,FUNCT_4:42; then consider y1, h, y2 such that A17: [z,x] = [y1,y2] and A18: y1 in dom f and A19: h = f.y1 and y2 in dom h by FUNCT_5:def 2; A20: z = y1 by A17,XTUPLE_0:1; h in rng f by A18,A19,FUNCT_1:def 3; then f.z in SubFuncs rng f by A19,A20,Def1; hence thesis by A10,A18,A20,FUNCT_1:def 7; end; let z; A21: x in {x} by TARSKI:def 1; assume A22: z in dom rngs f; then f.z in SubFuncs rng f by A10,FUNCT_1:def 7; then reconsider h = f.z as Function by Def1; A23: z in dom f by A10,A22,FUNCT_1:def 7; then dom h = (doms f).z by Th22; then dom h in rng doms f by A2,A10,A22,FUNCT_1:def 3; then x in dom h by A1,A13,SETFAM_1:def 1; then [z,x] in dom uncurry f by A23,FUNCT_5:def 2; then A24: [x,z] in dom uncurry' f by A12,FUNCT_4:42; [x,z] in [:meet doms f, dom f:] by A1,A13,A23,ZFMISC_1:87; then A25: [x,z] in dom f9 by A11,A24,XBOOLE_0:def 4; then z in proj2 dom f9 by XTUPLE_0:def 13; then [x,z] in [:{x},proj2 dom f9:] by A21,ZFMISC_1:87; then [x,z] in dom f9 /\ [:{x},proj2 dom f9:] by A25,XBOOLE_0:def 4; hence thesis by A15,XTUPLE_0:def 13; end; now let z; assume A26: z in dom rngs f; then f.z in SubFuncs rng f by A10,FUNCT_1:def 7; then reconsider h = f.z as Function by Def1; A27: z in dom f by A10,A26,FUNCT_1:def 7; then dom h = (doms f).z by Th22; then dom h in rng doms f by A2,A10,A26,FUNCT_1:def 3; then A28: x in dom h by A1,A13,SETFAM_1:def 1; then A29: h.x in rng h by FUNCT_1:def 3; g.z = f9.(x,z) & [x,z] in dom f9 by A13,A14,A16,A26,FUNCT_5:31; then (uncurry' f).(x,z) = g.z by FUNCT_1:47; then g.z = h.x by A27,A28,FUNCT_5:39; hence g.z in (rngs f).z by A27,A29,Th22; end; hence thesis by A16,CARD_3:def 5; end; end; theorem Th30: x in dom <:f:> implies <:f:>.x is Function proof assume x in dom <:f:>; then A1: <:f:>.x in rng <:f:> by FUNCT_1:def 3; rng <:f:> c= product rngs f by Th29; then ex g st <:f:>.x = g & dom g = dom rngs f & for x st x in dom rngs f holds g.x in (rngs f).x by A1,CARD_3:def 5; hence thesis; end; theorem Th31: x in dom <:f:> & g = <:f:>.x implies dom g = f"SubFuncs rng f & for y st y in dom g holds [y,x] in dom uncurry f & g.y = (uncurry f).(y,x) proof A1: rng <:f:> c= product rngs f & dom rngs f = f"SubFuncs rng f by Def3,Th29; assume A2: x in dom <:f:> & g = <:f:>.x; then g in rng <:f:> by FUNCT_1:def 3; hence dom g = f"SubFuncs rng f by A1,CARD_3:9; let y such that A3: y in dom g; A4: [x,y] in dom ((uncurry' f)|([:meet doms f, dom f:] qua set)) by A2,A3, FUNCT_5:31; then [x,y] in dom (uncurry' f) /\ [:meet doms f, dom f:] by RELAT_1:61; then A5: [x,y] in dom uncurry' f by XBOOLE_0:def 4; g.y = ((uncurry' f)|([:meet doms f, dom f:] qua set)).(x,y) by A2,A3, FUNCT_5:31; then A6: g.y = (uncurry' f).(x,y) by A4,FUNCT_1:47; ~(uncurry f) = uncurry' f by FUNCT_5:def 4; hence thesis by A6,A5,FUNCT_4:42,43; end; theorem Th32: x in dom <:f:> implies for g st g in rng f holds x in dom g proof assume A1: x in dom <:f:>; let g; assume g in rng f; then consider y such that A2: y in dom f & g = f.y by FUNCT_1:def 3; y in dom doms f & (doms f).y = dom g by A2,Th22; then dom g in rng doms f by FUNCT_1:def 3; then A3: meet rng doms f c= dom g by SETFAM_1:3; meet doms f = dom <:f:> by Th29; hence thesis by A1,A3; end; theorem g in rng f & (for g st g in rng f holds x in dom g) implies x in dom <:f :> proof assume that A1: g in rng f and A2: for g st g in rng f holds x in dom g; ex y st y in dom f & g = f.y by A1,FUNCT_1:def 3; then A3: doms f <> {} by Th22,RELAT_1:38; A4: now let y; assume y in dom doms f; then A5: y in f"SubFuncs rng f by Def2; then f.y in SubFuncs rng f by FUNCT_1:def 7; then reconsider g = f.y as Function by Def1; A6: y in dom f by A5,FUNCT_1:def 7; then g in rng f by FUNCT_1:def 3; then x in dom g by A2; hence x in (doms f).y by A6,Th22; end; dom <:f:> = meet doms f by Th29; hence thesis by A3,A4,Th25; end; theorem Th34: x in dom f & g = f.x & y in dom <:f:> & h = <:f:>.y implies g.y = h.x proof assume that A1: x in dom f & g = f.x and A2: y in dom <:f:> and A3: h = <:f:>.y; dom h = f"SubFuncs rng f by A2,A3,Th31; then x in dom h by A1,Th19; then A4: h.x = (uncurry f).(x,y) by A2,A3,Th31; g in rng f by A1,FUNCT_1:def 3; then y in dom g by A2,Th32; hence thesis by A1,A4,FUNCT_5:38; end; theorem x in dom f & f.x is Function & y in dom <:f:> implies f..(x,y) = <:f:> ..( y, x ) proof assume that A1: x in dom f and A2: f.x is Function and A3: y in dom <:f:>; reconsider g = f.x, h = <:f:>.y as Function by A2,A3,Th30; A4: dom h = f"SubFuncs rng f by A3,Th31; A5: g in rng f by A1,FUNCT_1:def 3; then g in SubFuncs rng f by Def1; then A6: x in dom h by A1,A4,FUNCT_1:def 7; y in dom g by A3,A5,Th32; hence f..(x,y) = g.y by A1,FUNCT_5:38 .= h.x by A1,A3,Th34 .= <:f:>..(y,x) by A3,A6,FUNCT_5:38; end; definition let f be Function; func Frege f -> Function means : Def7: dom it = product doms f & for g st g in product doms f ex h st it.g = h & dom h = f"SubFuncs rng f & for x st x in dom h holds h.x = (uncurry f).(x,g.x); existence proof defpred P[set,set] means ex g,h st $1 = g & $2 = h & dom h = f"SubFuncs rng f & for z st z in dom h holds h.z = (uncurry f).(z,g.z); A1: for x st x in product doms f ex y st P[x,y] proof let x; assume x in product doms f; then consider g such that A2: x = g and dom g = dom doms f and for x st x in dom doms f holds g.x in (doms f).x by CARD_3:def 5; deffunc F(set) = (uncurry f).[$1,g.$1]; consider h such that A3: dom h = f"SubFuncs rng f & for z st z in f"SubFuncs rng f holds h.z = F(z) from FUNCT_1:sch 3; reconsider y = h as set; take y, g, h; thus thesis by A2,A3; end; consider F being Function such that A4: dom F = product doms f & for x st x in product doms f holds P[x,F. x] from CLASSES1:sch 1(A1); take F; thus dom F = product doms f by A4; let g; assume g in product doms f; then ex g1,h being Function st g = g1 & F.g = h & dom h = f"SubFuncs rng f & for z st z in dom h holds h.z = (uncurry f).(z,g1.z) by A4; hence thesis; end; uniqueness proof let f1,f2 be Function such that A5: dom f1 = product doms f and A6: for g st g in product doms f ex h st f1.g = h & dom h = f"SubFuncs rng f & for x st x in dom h holds h.x = (uncurry f).(x,g.x) and A7: dom f2 = product doms f and A8: for g st g in product doms f ex h st f2.g = h & dom h = f" SubFuncs rng f & for x st x in dom h holds h.x = (uncurry f).(x,g.x); now let x; assume A9: x in product doms f; then consider g such that A10: x = g and dom g = dom doms f and for x st x in dom doms f holds g.x in (doms f).x by CARD_3:def 5; consider h2 being Function such that A11: f2.g = h2 and A12: dom h2 = f"SubFuncs rng f and A13: for y st y in dom h2 holds h2.y = (uncurry f).(y,g.y) by A8,A9,A10; consider h1 being Function such that A14: f1.g = h1 and A15: dom h1 = f"SubFuncs rng f and A16: for y st y in dom h1 holds h1.y = (uncurry f).(y,g.y) by A6,A9,A10; now let z; assume A17: z in f"SubFuncs rng f; then h1.z = (uncurry f).(z,g.z) by A15,A16; hence h1.z = h2.z by A12,A13,A17; end; hence f1.x = f2.x by A10,A14,A15,A11,A12,FUNCT_1:2; end; hence thesis by A5,A7,FUNCT_1:2; end; end; theorem g in product doms f & x in dom g implies (Frege f)..(g,x) = f..(x,g.x) proof assume that A1: g in product doms f and A2: x in dom g; A3: dom g = dom doms f by A1,CARD_3:9; A4: dom doms f = f"SubFuncs rng f by Def2; consider h such that A5: (Frege f).g = h and A6: dom h = f"SubFuncs rng f and A7: for x st x in dom h holds h.x = (uncurry f).(x,g.x) by A1,Def7; dom Frege f = product doms f by Def7; hence (Frege f)..(g,x) = h.x by A1,A2,A5,A6,A3,A4,FUNCT_5:38 .= f..(x,g.x) by A2,A6,A7,A3,A4; end; Lm2: rng Frege f c= product rngs f proof let x; assume x in rng Frege f; then consider y such that A1: y in dom Frege f and A2: x = (Frege f).y by FUNCT_1:def 3; A3: dom Frege f = product doms f by Def7; then consider g such that A4: y = g and dom g = dom doms f and A5: for z st z in dom doms f holds g.z in (doms f).z by A1,CARD_3:def 5; consider h such that A6: (Frege f).g = h and A7: dom h = f"SubFuncs rng f and A8: for z st z in dom h holds h.z = (uncurry f).(z,g.z) by A1,A3,A4,Def7; A9: dom rngs f = f"SubFuncs rng f by Def3; A10: dom doms f = f"SubFuncs rng f by Def2; now let z; assume A11: z in dom rngs f; then f.z in SubFuncs rng f by A9,FUNCT_1:def 7; then reconsider t = f.z as Function by Def1; A12: g.z in (doms f). z by A5,A9,A10,A11; A13: z in dom f by A9,A11,FUNCT_1:def 7; then A14: (rngs f).z = rng t by Th22; A15: (doms f).z = dom t by A13,Th22; then A16: t.(g.z) in rng t by A12,FUNCT_1:def 3; t.(g.z) = (uncurry f).(z,g.z) by A13,A12,A15,FUNCT_5:38; hence h.z in (rngs f).z by A7,A8,A9,A11,A14,A16; end; hence thesis by A2,A4,A6,A7,A9,CARD_3:def 5; end; theorem x in dom f & g = f.x & h in product doms f & h9 = (Frege f).h implies h.x in dom g & h9.x = g.(h.x) & h9 in product rngs f proof assume that A1: x in dom f & g = f.x and A2: h in product doms f and A3: h9 = (Frege f).h; A4: x in f"SubFuncs rng f by A1,Th19; A5: dom doms f = f"SubFuncs rng f by Def2; ( ex f2 st h = f2 & dom f2 = dom doms f & for x st x in dom doms f holds f2.x in (doms f).x)& (doms f).x = dom g by A1,A2,Th22,CARD_3:def 5; hence A6: h.x in dom g by A5,A4; ex f1 st (Frege f).h = f1 & dom f1 = f"SubFuncs rng f & for x st x in dom f1 holds f1.x = (uncurry f).(x,h.x) by A2,Def7; hence h9.x = (uncurry f).(x,h.x) by A3,A4 .= g.(h.x) by A1,A6,FUNCT_5:38; A7: rng Frege f c= product rngs f by Lm2; dom Frege f = product doms f by Def7; then h9 in rng Frege f by A2,A3,FUNCT_1:def 3; hence thesis by A7; end; Lm3: product rngs f c= rng Frege f proof let x; deffunc F(set) = (doms f).$1; assume x in product rngs f; then consider g such that A1: x = g and A2: dom g = dom rngs f and A3: for y st y in dom rngs f holds g.y in (rngs f).y by CARD_3:def 5; defpred P[set,set] means ex f1 st f1 = f.$1 & f1.$2 = g.$1; consider h such that A4: dom h = f"SubFuncs rng f & for x st x in f"SubFuncs rng f for y holds y in h.x iff y in F(x) & P[x,y] from CARD_3:sch 2; A5: product doms f = dom Frege f by Def7; A6: dom doms f = f"SubFuncs rng f by Def2; A7: dom rngs f = f"SubFuncs rng f by Def3; A8: now let X; assume X in rng h; then consider x such that A9: x in dom h and A10: X = h.x by FUNCT_1:def 3; f.x in SubFuncs rng f by A4,A9,FUNCT_1:def 7; then reconsider fx = f.x as Function by Def1; A11: x in dom f by A4,A9,FUNCT_1:def 7; then A12: (rngs f).x = rng fx by Th22; g.x in (rngs f).x by A3,A7,A4,A9; then A13: ex y st y in dom fx & g.x = fx.y by A12,FUNCT_1:def 3; (doms f).x = dom fx by A11,Th22; hence X <> {} by A4,A9,A10,A13; end; A14: now assume f"SubFuncs rng f <> {}; then reconsider D = rng h as non empty set by A4,RELAT_1:42; consider Ch being Function such that A15: dom Ch = D and A16: for x st x in D holds Ch.x in x by A8,FUNCT_1:111; A17: dom (Ch*h) = dom h by A15,RELAT_1:27; now let y; assume A18: y in dom doms f; then (Ch*h).y = Ch.(h.y) & h.y in rng h by A6,A4,A17,FUNCT_1:12,def 3; then (Ch*h).y in h.y by A16; hence (Ch*h).y in (doms f).y by A6,A4,A18; end; then A19: Ch*h in product doms f by A6,A4,A17,CARD_3:def 5; then consider h1 being Function such that A20: (Frege f).(Ch*h) = h1 and A21: dom h1 = f"SubFuncs rng f and A22: for x st x in dom h1 holds h1.x = (uncurry f).(x,(Ch*h).x) by Def7; now let z; assume A23: z in f"SubFuncs rng f; then A24: h1.z = (uncurry f).(z,(Ch*h).z) by A21,A22; (Ch*h).z = Ch.( h.z ) & h.z in rng h by A4,A17,A23,FUNCT_1:12,def 3; then A25: (Ch*h).z in h.z by A16; then consider f1 such that A26: f1 = f.z and A27: f1.((Ch*h).z) = g.z by A4,A23; A28: (Ch*h).z in (doms f).z by A4,A23,A25; A29: z in dom f by A23,FUNCT_1:def 7; then (doms f).z = dom f1 by A26,Th22; hence h1.z = g.z by A29,A24,A26,A27,A28,FUNCT_5:38; end; then x = h1 by A1,A2,A7,A21,FUNCT_1:2; hence thesis by A5,A19,A20,FUNCT_1:def 3; end; now assume A30: f"SubFuncs rng f = {}; then A31: g = {} by A2,Def3; dom Frege f = {{}} by A6,A5,A30,CARD_3:10,RELAT_1:41; then A32: {} in dom Frege f by TARSKI:def 1; then consider h such that A33: (Frege f).{} = h and A34: dom h = f"SubFuncs rng f and for x st x in dom h holds h.x = (uncurry f).(x,{} .x) by A5,Def7; h = {} by A30,A34; hence thesis by A1,A31,A32,A33,FUNCT_1:def 3; end; hence thesis by A14; end; theorem Th38: rng Frege f = product rngs f proof thus rng Frege f c= product rngs f & product rngs f c= rng Frege f by Lm2,Lm3 ; end; theorem Th39: not {} in rng f implies (Frege f is one-to-one iff for g st g in rng f holds g is one-to-one) proof set h0 = the Element of product doms f; A1: dom doms f = f"SubFuncs rng f by Def2; assume A2: not {} in rng f; now assume {} in rng doms f; then consider x such that A3: x in dom doms f and A4: {} = (doms f).x by FUNCT_1:def 3; A5: x in f"SubFuncs rng f by A3,Def2; then f.x in SubFuncs rng f by FUNCT_1:def 7; then reconsider g = f.x as Function by Def1; A6: x in dom f by A5,FUNCT_1:def 7; then A7: g in rng f by FUNCT_1:def 3; {} = dom g by A4,A6,Th22; hence contradiction by A2,A7,RELAT_1:41; end; then product doms f <> {} by CARD_3:26; then consider h such that h0 = h and dom h = dom doms f and A8: for x st x in dom doms f holds h.x in (doms f).x by CARD_3:def 5; A9: dom Frege f = product doms f by Def7; thus Frege f is one-to-one implies for g st g in rng f holds g is one-to-one proof deffunc G(set) = h.$1; assume A10: for x,y st x in dom Frege f & y in dom Frege f & (Frege f).x = ( Frege f).y holds x = y; let g; assume g in rng f; then consider z such that A11: z in dom f & g = f.z by FUNCT_1:def 3; defpred P[set] means $1 = z; let x,y; deffunc F(set) = x; consider h1 being Function such that A12: dom h1 = f"SubFuncs rng f & for a st a in f"SubFuncs rng f holds (P[a] implies h1.a = F(a)) & (not P[a] implies h1.a = G(a)) from PARTFUN1:sch 1 ; assume that A13: x in dom g and A14: y in dom g and A15: g.x = g.y; now let a; assume A16: a in dom doms f; then A17: a <> z implies h1.a = h.a by A1,A12; a = z implies h1.a = x by A1,A12,A16; hence h1.a in (doms f).a by A8,A11,A13,A16,A17,Th22; end; then A18: h1 in product doms f by A1,A12,CARD_3:def 5; then consider g1 being Function such that A19: (Frege f).h1 = g1 and A20: dom g1 = f"SubFuncs rng f and A21: for x st x in dom g1 holds g1.x = (uncurry f).(x,h1.x) by Def7; defpred P[set] means $1 = z; deffunc G(set) = h.$1; deffunc F(set) = y; consider h2 being Function such that A22: dom h2 = f"SubFuncs rng f & for a st a in f"SubFuncs rng f holds (P[a] implies h2.a = F(a)) & (not P[a] implies h2.a = G(a)) from PARTFUN1:sch 1 ; now let a; assume A23: a in dom doms f; then A24: a <> z implies h2.a = h.a by A1,A22; a = z implies h2.a = y by A1,A22,A23; hence h2.a in (doms f).a by A8,A11,A14,A23,A24,Th22; end; then A25: h2 in product doms f by A1,A22,CARD_3:def 5; then consider g2 being Function such that A26: (Frege f).h2 = g2 and A27: dom g2 = f"SubFuncs rng f and A28: for x st x in dom g2 holds g2.x = (uncurry f).(x,h2.x) by Def7; now let a; assume A29: a in f"SubFuncs rng f; then A30: g2.a = (uncurry f).(a,h2.a) by A27,A28; A31: g1.a = (uncurry f).(a,h1.a) by A20,A21,A29; per cases; suppose A32: a <> z; then h1.a = h.a by A12,A29; hence g1.a = g2.a by A22,A29,A30,A31,A32; end; suppose A33: a = z; then h1.a = x by A12,A29; then A34: g1.a = g.x by A11,A13,A31,A33,FUNCT_5:38; h2.a = y by A22,A29,A33; hence g1.a = g2.a by A11,A14,A15,A30,A33,A34,FUNCT_5:38; end; end; then g1 = g2 by A20,A27,FUNCT_1:2; then A35: h1 = h2 by A9,A10,A18,A19,A25,A26; g in rng f by A11,FUNCT_1:def 3; then g in SubFuncs rng f by Def1; then A36: z in f"SubFuncs rng f by A11,FUNCT_1:def 7; then h1.z = x by A12; hence thesis by A36,A22,A35; end; assume A37: for g st g in rng f holds g is one-to-one; let x,y; assume that A38: x in dom Frege f and A39: y in dom Frege f and A40: (Frege f).x = (Frege f).y; consider g2 being Function such that A41: y = g2 and A42: dom g2 = dom doms f and A43: for x st x in dom doms f holds g2.x in (doms f).x by A9,A39,CARD_3:def 5; consider g1 being Function such that A44: x = g1 and A45: dom g1 = dom doms f and A46: for x st x in dom doms f holds g1.x in (doms f).x by A9,A38,CARD_3:def 5; consider h2 being Function such that A47: (Frege f).g2 = h2 and A48: dom h2 = f"SubFuncs rng f & for x st x in dom h2 holds h2.x = ( uncurry f).(x,g2.x) by A9,A39,A41,Def7; consider h1 being Function such that A49: (Frege f).g1 = h1 and A50: dom h1 = f"SubFuncs rng f & for x st x in dom h1 holds h1.x = ( uncurry f).(x,g1.x) by A9,A38,A44,Def7; now let a; assume A51: a in f"SubFuncs rng f; then f.a in SubFuncs rng f by FUNCT_1:def 7; then reconsider g = f.a as Function by Def1; A52: a in dom f by A51,FUNCT_1:def 7; then A53: dom g = (doms f).a by Th22; then A54: g2.a in dom g by A1,A43,A51; A55: g1.a in dom g by A1,A46,A51,A53; h2.a = (uncurry f).(a,g2.a) by A48,A51; then A56: h2.a = g.(g2.a) by A52,A54,FUNCT_5:38; g in rng f by A52,FUNCT_1:def 3; then A57: g is one-to-one by A37; h1.a = (uncurry f).(a,g1.a) by A50,A51; then h1.a = g.(g1.a) by A52,A55,FUNCT_5:38; hence g1.a = g2.a by A40,A44,A41,A49,A47,A55,A54,A56,A57,FUNCT_1:def 4; end; hence thesis by A1,A44,A45,A41,A42,FUNCT_1:2; end; begin theorem <:{}:> = {} & Frege{} = {} .--> {} proof A1: dom doms {} = {}"SubFuncs {} by Def2,RELAT_1:38; then A2: product doms {} = {{}} by CARD_3:10,RELAT_1:41; A3: now let x; assume A4: x in {{}}; then A5: x = {} by TARSKI:def 1; then ex h st (Frege{}).{} = h & dom h = {}"SubFuncs rng {} & for x st x in dom h holds h.x = (uncurry {}).(x,{} .x) by A2,A4,Def7; hence (Frege{}).x = {} by A5; end; A6: meet({} qua set) = {} by SETFAM_1:def 1; rng doms {} = {} by A1,RELAT_1:38,41; then dom <:{}:> = {} by A6,Th29; hence <:{}:> = {}; dom Frege{} = product doms {} by Def7; hence thesis by A2,A3,FUNCOP_1:11; end; theorem X <> {} implies dom <:X --> f:> = dom f & for x st x in dom f holds <: X --> f:>.x = X --> f.x proof assume A1: X <> {}; thus A2: dom <:X --> f:> = meet doms (X --> f) by Th29 .= meet (X --> dom f) by Th24 .= dom f by A1,Th27; A3: rng <:X --> f:> c= product rngs (X --> f) & rngs (X --> f) = X --> rng f by Th24,Th29; let x; assume A4: x in dom f; then <:X --> f:>.x in rng <:X --> f:> by A2,FUNCT_1:def 3; then consider g such that A5: <:X --> f:>.x = g and A6: dom g = dom (X --> rng f) and for y st y in dom (X --> rng f) holds g.y in (X --> rng f).y by A3, CARD_3:def 5; A7: dom g = X by A6,FUNCOP_1:13; A8: dom (X --> f) = X by FUNCOP_1:13; A9: now let y; assume A10: y in X; then g.y = (uncurry (X --> f)).(y,x) & (X --> f).y = f by A2,A4,A5,A7,Th31, FUNCOP_1:7; then g.y = f.x by A4,A8,A10,FUNCT_5:38; hence g.y = (X --> f.x).y by A10,FUNCOP_1:7; end; dom (X --> f.x) = X by FUNCOP_1:13; hence thesis by A5,A7,A9,FUNCT_1:2; end; theorem dom Frege(X-->f) = Funcs(X,dom f) & rng Frege(X-->f) = Funcs(X,rng f) & for g st g in Funcs(X,dom f) holds (Frege(X-->f)).g = f*g proof A1: product (X --> dom f) = Funcs(X, dom f) by CARD_3:11; A2: doms (X --> f) = X --> dom f by Th24; rngs (X --> f) = X --> rng f & product (X --> rng f) = Funcs(X, rng f) by Th24,CARD_3:11; hence dom Frege(X-->f) = Funcs(X,dom f) & rng Frege(X-->f) = Funcs(X,rng f) by A2,A1,Def7,Th38; let g; assume A3: g in Funcs(X,dom f); then consider h such that A4: (Frege(X-->f)).g = h and A5: dom h = (X --> f)"SubFuncs rng (X --> f) and A6: for x st x in dom h holds h.x = (uncurry (X --> f)).(x,g.x) by A2,A1,Def7; dom (X --> dom f) = X by FUNCOP_1:13; then A7: dom h = X by A2,A5,Def2; A8: ex g9 being Function st g = g9 & dom g9 = X & rng g9 c= dom f by A3, FUNCT_2:def 2; then A9: dom (f*g) = X by RELAT_1:27; A10: dom (X --> f) = X by FUNCOP_1:13; now let x; assume A11: x in X; then A12: h.x = (uncurry (X --> f)).(x,g.x) & (X --> f).x = f by A6,A7,FUNCOP_1:7; g.x in rng g & (f*g).x = f.(g.x) by A8,A9,A11,FUNCT_1:12,def 3; hence (f*g).x = h.x by A8,A10,A11,A12,FUNCT_5:38; end; hence thesis by A4,A7,A9,FUNCT_1:2; end; theorem Th43: dom f = X & dom g = X & (for x st x in X holds f.x,g.x are_equipotent) implies product f,product g are_equipotent proof assume that A1: dom f = X and A2: dom g = X and A3: for x st x in X holds f.x,g.x are_equipotent; defpred P[set,set] means ex f1 st $2 = f1 & f1 is one-to-one & dom f1 = f.$1 & rng f1 = g.$1; A4: for x st x in X ex y st P[x,y] proof let x; assume x in X; then f.x,g.x are_equipotent by A3; then ex h st h is one-to-one & dom h = f.x & rng h = g.x by WELLORD2:def 4; hence thesis; end; consider h such that A5: dom h = X & for x st x in X holds P[x,h.x] from CLASSES1:sch 1(A4); A6: now let x; assume A7: x in X; then ex f1 st h.x = f1 & f1 is one-to-one & dom f1 = f.x & rng f1 = g.x by A5; hence (rngs h).x = g.x by A5,A7,Th22; end; now let x; assume x in rng h; then consider a such that A8: a in X & x = h.a by A5,FUNCT_1:def 3; ex f1 st x = f1 & f1 is one-to-one & dom f1 = f.a & rng f1 = g.a by A5,A8; hence x is Function; end; then SubFuncs rng h = rng h by Lm1; then A9: h"SubFuncs rng h = X by A5,RELAT_1:134; then dom rngs h = X by Def3; then A10: rngs h = g by A2,A6,FUNCT_1:2; A11: now let x; assume A12: x in X; then ex f1 st h.x = f1 & f1 is one-to-one & dom f1 = f.x & rng f1 = g.x by A5; hence (doms h).x = f.x by A5,A12,Th22; end; dom doms h = X by A9,Def2; then A13: doms h = f by A1,A11,FUNCT_1:2; now per cases; suppose {} in rng h; then consider x such that A14: x in X and A15: {} = h.x by A5,FUNCT_1:def 3; A16: ex f1 st {} = f1 & f1 is one-to-one & dom f1 = f.x & rng f1 = g.x by A5,A14,A15; then {} in rng f by A1,A14,FUNCT_1:def 3,RELAT_1:38; then A17: product f = {} by CARD_3:26; {} in rng g by A2,A14,A16,FUNCT_1:def 3,RELAT_1:38; hence thesis by A17,CARD_3:26; end; suppose A18: not {} in rng h; A19: now let f1; assume f1 in rng h; then consider x such that A20: x in X and A21: f1 = h.x by A5,FUNCT_1:def 3; ex f1 st h.x = f1 & f1 is one-to-one & dom f1 = f.x & rng f1 = g. x by A5,A20; hence f1 is one-to-one by A21; end; thus thesis proof take Frege h; thus thesis by A13,A10,A18,A19,Def7,Th38,Th39; end; end; end; hence thesis; end; theorem Th44: dom f = dom h & dom g = rng h & h is one-to-one & (for x st x in dom h holds f.x, g.(h.x) are_equipotent) implies product f,product g are_equipotent proof set X = dom f; assume that A1: dom f = dom h and A2: dom g = rng h and A3: h is one-to-one and A4: for x st x in dom h holds f.x,g.(h.x) are_equipotent; A5: h*(h") = id dom g by A2,A3,FUNCT_1:39; A6: dom (g*h) = dom f by A1,A2,RELAT_1:27; now let x; assume A7: x in dom f; then f.x,g.(h.x) are_equipotent by A1,A4; hence f.x,(g*h).x are_equipotent by A6,A7,FUNCT_1:12; end; then A8: product f,product (g*h) are_equipotent by A6,Th43; defpred P[set,set] means ex f1 st $1 = f1 & $2 = f1*(h"); A9: for x st x in product (g*h) ex y st P[x,y] proof let x; assume x in product (g*h); then ex f1 st x = f1 & dom f1 = dom (g*h) & for y st y in dom (g*h) holds f1.y in (g*h).y by CARD_3:def 5; then consider f1 such that A10: x = f1; f1*(h") = f1*(h"); hence thesis by A10; end; consider F being Function such that A11: dom F = product (g*h) & for x st x in product (g*h) holds P[x,F.x] from CLASSES1:sch 1(A9); A12: rng (h") = X by A1,A3,FUNCT_1:33; A13: F is one-to-one proof let x,y; assume that A14: x in dom F and A15: y in dom F and A16: F.x = F.y; consider g2 being Function such that A17: y = g2 and A18: F.y = g2*(h") by A11,A15; A19: dom g2 = X by A6,A11,A15,A17,CARD_3:9; consider g1 being Function such that A20: x = g1 and A21: F.x = g1*(h") by A11,A14; dom g1 = X by A6,A11,A14,A20,CARD_3:9; hence thesis by A12,A16,A20,A21,A17,A18,A19,FUNCT_1:86; end; A22: (g*h)*(h") = g*(h*(h")) & g*id dom g = g by RELAT_1:36,52; A23: product g c= rng F proof let x; assume x in product g; then consider f1 such that A24: x = f1 and A25: dom f1 = dom g and A26: for z st z in dom g holds f1.z in g.z by CARD_3:def 5; A27: dom (f1*h) = X by A1,A2,A25,RELAT_1:27; now let z; assume A28: z in X; then A29: h.z in dom g by A1,A2,FUNCT_1:def 3; A30: (h").(h.z) = z by A1,A3,A28,FUNCT_1:34; (f1*h).z = f1.(h.z) by A27,A28,FUNCT_1:12; then (f1*h).z in ((g*h)*(h")).(h.z) by A5,A22,A26,A29; hence (f1*h).z in (g*h).z by A5,A22,A29,A30,FUNCT_1:12; end; then A31: f1*h in product (g*h) by A6,A27,CARD_3:def 5; then ex f2 st f1*h = f2 & F.(f1*h) = f2*(h") by A11; then F.(f1*h) = f1*id dom g by A5,RELAT_1:36 .= x by A24,A25,RELAT_1:51; hence thesis by A11,A31,FUNCT_1:def 3; end; A32: dom (h") = rng h by A3,FUNCT_1:33; rng F c= product g proof let x; assume x in rng F; then consider y such that A33: y in dom F and A34: x = F.y by FUNCT_1:def 3; consider f1 such that A35: y = f1 and A36: dom f1 = X and A37: for z st z in X holds f1.z in (g*h).z by A6,A11,A33,CARD_3:def 5; A38: dom (f1*(h")) = dom g by A2,A12,A32,A36,RELAT_1:27; A39: now let z; assume A40: z in dom g; then A41: (h").z in X by A2,A12,A32,FUNCT_1:def 3; g.z = (g*h).((h").z) & (f1*(h")).z = f1.((h").z) by A5,A22,A38,A40, FUNCT_1:12; hence (f1*(h")).z in g.z by A37,A41; end; ex f1 st y = f1 & F.y = f1*(h") by A11,A33; hence thesis by A34,A35,A38,A39,CARD_3:def 5; end; then rng F = product g by A23,XBOOLE_0:def 10; then product (g*h),product g are_equipotent by A11,A13,WELLORD2:def 4; hence thesis by A8,WELLORD2:15; end; theorem dom f = X implies product f,product (f*P) are_equipotent proof assume A1: dom f = X; A2: rng P = X by FUNCT_2:def 3; dom P = X by FUNCT_2:52; then A3: dom (f*P) = X by A1,A2,RELAT_1:27; A4: rng (P") = X by FUNCT_2:def 3; A5: dom (P") = X by FUNCT_2:52; now let x; assume A6: x in dom (P"); then P".x in X by A4,FUNCT_1:def 3; then (f*P).(P".x) = f.(P.(P".x)) by A3,FUNCT_1:12 .= f.x by A5,A2,A6,FUNCT_1:35; hence f.x,(f*P).(P".x) are_equipotent; end; hence thesis by A1,A5,A4,A3,Th44; end; begin definition let f,X; func Funcs(f,X) -> Function means :Def8: dom it = dom f & for x st x in dom f holds it.x = Funcs(f.x,X); existence proof deffunc F(set) = Funcs(f.$1,X); ex F be Function st dom F = dom f & for x st x in dom f holds F.x = F( x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let f1,f2 such that A1: dom f1 = dom f and A2: for x st x in dom f holds f1.x = Funcs(f.x,X) and A3: dom f2 = dom f and A4: for x st x in dom f holds f2.x = Funcs(f.x,X); now let x; assume A5: x in dom f; then f1.x = Funcs(f.x,X) by A2; hence f1.x = f2.x by A4,A5; end; hence thesis by A1,A3,FUNCT_1:2; end; end; theorem not {} in rng f implies Funcs(f,{}) = dom f --> {} proof assume A1: not {} in rng f; A2: now let x; assume A3: x in dom f; then A4: f.x <> {} by A1,FUNCT_1:def 3; thus (dom f --> {}).x = {} by A3,FUNCOP_1:7 .= Funcs(f.x,{}) by A4; end; dom (dom f --> {}) = dom f by FUNCOP_1:13; hence thesis by A2,Def8; end; theorem Funcs({},X) = {} proof dom Funcs({},X) = dom {} by Def8; hence thesis; end; theorem Funcs(X --> Y, Z) = X --> Funcs(Y,Z) proof A1: X = dom (X --> Y) by FUNCOP_1:13; A2: now let x; assume A3: x in X; then Funcs(X --> Y, Z).x = Funcs((X --> Y).x,Z) by A1,Def8; hence Funcs(X --> Y, Z).x = Funcs(Y,Z) by A3,FUNCOP_1:7; end; dom Funcs(X --> Y, Z) = dom (X --> Y) by Def8; hence thesis by A1,A2,FUNCOP_1:11; end; Lm4: [x,y] in dom f & g = (curry f).x & z in dom g implies [x,z] in dom f proof assume [x,y] in dom f; then x in proj1 dom f by XTUPLE_0:def 12; then A1: ex g9 being Function st (curry f).x = g9 & dom g9 = proj2 (dom f /\ [:{x },proj2 dom f:]) & for y st y in dom g9 holds g9.y = f.(x,y) by FUNCT_5:def 1 ; assume g = (curry f).x & z in dom g; then consider y such that A2: [y,z] in dom f /\ [:{x}, proj2 dom f:] by A1,XTUPLE_0:def 13; [y,z] in [:{x}, proj2 dom f:] by A2,XBOOLE_0:def 4; then A3: y in {x} by ZFMISC_1:87; [y,z] in dom f by A2,XBOOLE_0:def 4; hence thesis by A3,TARSKI:def 1; end; theorem Funcs(Union disjoin f,X),product Funcs(f,X) are_equipotent proof defpred P[set,set] means ex g,h st $1 = g & $2 = h & dom h = dom f & for y st y in dom f holds (f.y = {} implies h.y = {}) & (f.y <> {} implies h.y = ( curry' g).y); A1: for x st x in Funcs(Union disjoin f, X) ex z st P[x,z] proof defpred P[set] means f.$1 = {}; deffunc F(set) = {}; let x; assume x in Funcs(Union disjoin f, X); then consider g such that A2: x = g and dom g = Union disjoin f and rng g c= X by FUNCT_2:def 2; deffunc G(set) = (curry' g).$1; ex h st dom h = dom f & for y st y in dom f holds (P[y] implies h.y = F(y)) & (not P[y] implies h.y = G(y)) from PARTFUN1:sch 1; hence thesis by A2; end; consider F being Function such that A3: dom F = Funcs(Union disjoin f, X) & for x st x in Funcs(Union disjoin f, X) holds P[x,F.x] from CLASSES1:sch 1(A1); take F; thus F is one-to-one proof let x,y; assume that A4: x in dom F and A5: y in dom F and A6: F.x = F.y; A7: ex f2 being Function st y = f2 & dom f2 = Union disjoin f & rng f2 c= X by A3,A5,FUNCT_2:def 2; consider g1,h1 being Function such that A8: x = g1 and A9: F.x = h1 and dom h1 = dom f and A10: for y st y in dom f holds (f.y = {} implies h1.y = {}) & (f.y <> {} implies h1.y = (curry' g1).y) by A3,A4; consider g2,h2 being Function such that A11: y = g2 and A12: F.y = h2 and dom h2 = dom f and A13: for y st y in dom f holds (f.y = {} implies h2.y = {}) & (f.y <> {} implies h2.y = (curry' g2).y) by A3,A5; A14: ex f1 being Function st x = f1 & dom f1 = Union disjoin f & rng f1 c= X by A3,A4,FUNCT_2:def 2; now let z; assume A15: z in Union disjoin f; then A16: z = [z`1,z`2] by CARD_3:22; A17: z`2 in dom f & z`1 in f.(z`2) by A15,CARD_3:22; then A18: h2.z`2 = (curry' g2).z`2 by A13; then reconsider g91 = h1.z`2, g92 = h2.z`2 as Function by A6,A7,A9,A11,A12,A15,A16, FUNCT_5:21; A19: g2.(z`1,z`2) = g92.z`1 by A7,A11,A15,A16,A18,FUNCT_5:22; h1.z`2 = (curry' g1).z`2 by A10,A17; then g1.(z`1,z`2) = g91.z`1 by A14,A8,A15,A16,FUNCT_5:22; hence g1.z = g2.z by A6,A9,A12,A16,A19; end; hence thesis by A14,A7,A8,A11,FUNCT_1:2; end; thus dom F = Funcs(Union disjoin f, X) by A3; thus rng F c= product Funcs(f,X) proof let y; assume y in rng F; then consider x such that A20: x in dom F and A21: y = F.x by FUNCT_1:def 3; consider g,h such that A22: x = g and A23: F.x = h and A24: dom h = dom f and A25: for y st y in dom f holds (f.y = {} implies h.y = {}) & (f.y <> {} implies h.y = (curry' g).y) by A3,A20; A26: ex f1 being Function st x = f1 & dom f1 = Union disjoin f & rng f1 c= X by A3,A20,FUNCT_2:def 2; A27: now let z; assume z in dom Funcs(f,X); then A28: z in dom f by Def8; then A29: Funcs(f,X).z = Funcs(f.z,X) by Def8; A30: now set a = the Element of f.z; assume A31: f.z <> {}; [a,z]`1 = a & [a,z]`2 = z; then A32: [a,z] in Union disjoin f by A28,A31,CARD_3:22; then reconsider k = (curry' g).z as Function by A22,A26,FUNCT_5:21; A33: z in dom curry' g by A22,A26,A32,FUNCT_5:21; then rng k c= rng g by FUNCT_5:34; then A34: rng k c= X by A22,A26,XBOOLE_1:1; A35: dom k = proj1 (dom g /\ [:proj1 dom g,{z}:]) by A33,FUNCT_5:34; A36: dom k = f.z proof thus dom k c= f.z proof let b be set; assume b in dom k; then consider c being set such that A37: [b,c] in dom g /\ [:proj1 dom g,{z}:] by A35,XTUPLE_0:def 12; [b,c] in [:proj1 dom g,{z}:] by A37,XBOOLE_0:def 4; then A38: c in {z} by ZFMISC_1:87; A39: [b,c]`1 = b & [b,c]`2 = c; [b,c] in dom g by A37,XBOOLE_0:def 4; then b in f.c by A22,A26,A39,CARD_3:22; hence thesis by A38,TARSKI:def 1; end; let b be set such that A40: b in f.z; A41: z in {z} by TARSKI:def 1; [b,z]`1 = b & [b,z]`2 = z; then A42: [b,z] in dom g by A22,A26,A28,A40,CARD_3:22; then b in proj1 dom g by XTUPLE_0:def 12; then [b,z] in [:proj1 dom g,{z}:] by A41,ZFMISC_1:87; then [b,z] in dom g /\ [:proj1 dom g,{z}:] by A42,XBOOLE_0:def 4; hence thesis by A35,XTUPLE_0:def 12; end; h.z = k by A25,A28,A31; hence h.z in Funcs(f,X).z by A29,A34,A36,FUNCT_2:def 2; end; now assume f.z = {}; then h.z = {} & Funcs(f,X).z = {{}} by A25,A28,A29,FUNCT_5:57; hence h.z in Funcs(f,X).z by TARSKI:def 1; end; hence h.z in Funcs(f,X).z by A30; end; dom h = dom Funcs(f,X) by A24,Def8; hence thesis by A21,A23,A27,CARD_3:def 5; end; let x; assume x in product Funcs(f,X); then consider s being Function such that A43: x = s and A44: dom s = dom Funcs(f,X) and A45: for z st z in dom Funcs(f,X) holds s.z in Funcs(f,X).z by CARD_3:def 5; A46: dom s = dom f by A44,Def8; A47: uncurry' s = ~uncurry s by FUNCT_5:def 4; A48: dom uncurry' s = Union disjoin f proof thus dom uncurry' s c= Union disjoin f proof let z; assume A49: z in dom uncurry' s; then consider z1, z2 being set such that A50: z = [z1,z2] by A47,Th2; A51: z`1 = z1 & z`2 = z2 by A50,MCART_1:7; [z2,z1] in dom uncurry s by A47,A49,A50,FUNCT_4:42; then consider a being set, u being Function, b being set such that A52: [z2,z1] = [a,b] and A53: a in dom s and A54: u = s.a and A55: b in dom u by FUNCT_5:def 2; A56: [a,b]`1 = a & [z2,z1]`1 = z2; u in Funcs(f,X).a & Funcs(f,X).a = Funcs(f.a,X) by A44,A45,A46,A53,A54 ,Def8; then A57: ex j being Function st u = j & dom j = f.z2 & rng j c= X by A52,A56, FUNCT_2:def 2; [a,b]`2 = b & [z2,z1]`2 = z1; hence thesis by A46,A50,A52,A53,A55,A51,A56,A57,CARD_3:22; end; let z; assume A58: z in Union disjoin f; then A59: z`1 in f.z`2 & z = [z`1,z`2] by CARD_3:22; A60: z`2 in dom f by A58,CARD_3:22; then s.z`2 in Funcs(f,X).z`2 & Funcs(f,X).z`2 = Funcs(f.z`2,X) by A44,A45,A46 ,Def8; then ex j being Function st s.z`2 = j & dom j = f.z`2 & rng j c= X by FUNCT_2:def 2; hence thesis by A46,A60,A59,FUNCT_5:39; end; rng uncurry' s c= X proof let d be set; assume d in rng uncurry' s; then consider z such that A61: z in dom uncurry' s and A62: d = (uncurry' s).z by FUNCT_1:def 3; consider z1, z2 being set such that A63: z = [z1,z2] by A47,A61,Th2; [z2,z1] in dom uncurry s by A47,A61,A63,FUNCT_4:42; then consider a being set, u being Function, b being set such that A64: [z2,z1] = [a,b] and A65: a in dom s & u = s.a and A66: b in dom u by FUNCT_5:def 2; A67: [a,b]`1 = a & [z2,z1]`1 = z2; u in Funcs(f,X).a & Funcs(f,X).a = Funcs(f.a,X) by A44,A45,A46,A65,Def8; then A68: ex j being Function st u = j & dom j = f.z2 & rng j c= X by A64,A67, FUNCT_2:def 2; A69: [a,b]`2 = b & [z2,z1]`2 = z1; (uncurry' s).(b,a) = u.b by A65,A66,FUNCT_5:39; then d in rng u by A62,A63,A64,A66,A67,A69,FUNCT_1:def 3; hence thesis by A68; end; then A70: uncurry' s in dom F by A3,A48,FUNCT_2:def 2; then consider g,h such that A71: uncurry' s = g and A72: F.uncurry' s = h and A73: dom h = dom f and A74: for y st y in dom f holds (f.y = {} implies h.y = {}) & (f.y <> {} implies h.y = (curry' g).y) by A3; now let z; assume A75: z in dom f; then s.z in Funcs(f,X).z & Funcs(f,X).z = Funcs(f.z,X) by A44,A45,A46,Def8; then consider v being Function such that A76: s.z = v and A77: dom v = f.z and rng v c= X by FUNCT_2:def 2; A78: now set a = the Element of f.z; assume A79: f.z <> {}; then A80: [a,z] in dom uncurry' s by A46,A75,A76,A77,FUNCT_5:39; then reconsider j = (curry' uncurry' s).z as Function by FUNCT_5:21; A81: j = (curry ~uncurry' s).z by FUNCT_5:def 3; A82: ~uncurry' s = uncurry s by Th4; then A83: [z,a] in dom uncurry s by A80,FUNCT_4:42; A84: dom j = dom v proof thus dom j c= dom v proof let b be set; assume b in dom j; then [z,b] in dom uncurry s by A81,A82,A83,Lm4; then consider a1 being set, g1 being Function, a2 being set such that A85: [z,b] = [a1,a2] and a1 in dom s and A86: g1 = s.a1 & a2 in dom g1 by FUNCT_5:def 2; z = a1 by A85,XTUPLE_0:1; hence thesis by A76,A85,A86,XTUPLE_0:1; end; let b be set; assume b in dom v; then [z,b] in dom uncurry s by A46,A75,A76,FUNCT_5:38; hence thesis by A81,A82,FUNCT_5:20; end; now let b be set; assume b in f.z; then A87: [z,b] in dom uncurry s by A77,A81,A82,A83,A84,Lm4; then consider a1 being set, g1 being Function, a2 being set such that A88: [z,b] = [a1,a2] and A89: a1 in dom s & g1 = s.a1 & a2 in dom g1 by FUNCT_5:def 2; A90: j.b = (uncurry s).(z,b) by A81,A82,A87,FUNCT_5:20; z = a1 & b = a2 by A88,XTUPLE_0:1; hence j.b = v.b by A76,A89,A90,FUNCT_5:38; end; then v = j by A77,A84,FUNCT_1:2; hence s.z = h.z by A71,A74,A75,A76,A79; end; f.z = {} implies s.z = {} & h.z = {} by A74,A75,A76,A77; hence s.z = h.z by A78; end; then h = s by A46,A73,FUNCT_1:2; hence thesis by A43,A70,A72,FUNCT_1:def 3; end; definition let X,f; func Funcs(X,f) -> Function means : Def9: dom it = dom f & for x st x in dom f holds it.x = Funcs(X,f.x); existence proof deffunc F(set) = Funcs(X,f.$1); ex F be Function st dom F = dom f & for x st x in dom f holds F.x = F( x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let f1,f2 such that A1: dom f1 = dom f and A2: for x st x in dom f holds f1.x = Funcs(X,f.x) and A3: dom f2 = dom f and A4: for x st x in dom f holds f2.x = Funcs(X,f.x); now let x; assume A5: x in dom f; then f1.x = Funcs(X,f.x) by A2; hence f1.x = f2.x by A4,A5; end; hence thesis by A1,A3,FUNCT_1:2; end; end; Lm5: f <> {} & X <> {} implies product Funcs(X,f),Funcs(X,product f) are_equipotent proof defpred P[set,set] means ex g st $1 = g & $2 = <:g:>; assume that A1: f <> {} and A2: X <> {}; A3: for x st x in product Funcs(X,f) ex y st P[x,y] proof let x; assume x in product Funcs(X,f); then ex g st x = g & dom g = dom Funcs(X,f) & for x st x in dom Funcs(X,f) holds g.x in Funcs(X,f).x by CARD_3:def 5; then reconsider g = x as Function; reconsider y = <:g:> as set; take y, g; thus thesis; end; consider F being Function such that A4: dom F = product Funcs(X,f) & for x st x in product Funcs(X,f) holds P[x,F.x] from CLASSES1:sch 1(A3); take F; A5: g in product Funcs(X,f) implies dom <:g:> = X & SubFuncs rng g = rng g & rng <:g:> c= product f proof A6: g"rng g = dom g by RELAT_1:134; A7: dom Funcs(X,f) = dom f by Def9; assume A8: g in product Funcs(X,f); then A9: dom g = dom Funcs(X,f) by CARD_3:9; A10: now let a be set; assume a in rng g; then consider z such that A11: z in dom g and A12: a = g.z by FUNCT_1:def 3; g.z in Funcs(X,f).z & Funcs(X,f).z = Funcs(X,f.z) by A8,A9,A7,A11,Def9, CARD_3:9; hence a is Function by A12; end; then A13: SubFuncs rng g = rng g by Lm1; A14: now let z; assume A15: z in dom f; then g.z in Funcs(X,f).z & Funcs(X,f).z = Funcs(X,f.z) by A8,A7,Def9, CARD_3:9; then ex h st g.z = h & dom h = X & rng h c= f.z by FUNCT_2:def 2; hence (dom f --> X).z = proj1 (g.z) by A15,FUNCOP_1:7; end; dom (dom f --> X) = dom f by FUNCOP_1:13; then doms g = dom f --> X by A9,A7,A13,A6,A14,Def2; then meet doms g = X by A1,Th27; hence A16: dom <:g:> = X & SubFuncs rng g = rng g by A10,Lm1,Th29; let y; assume y in rng <:g:>; then consider x such that A17: x in dom <:g:> and A18: y = <:g:>.x by FUNCT_1:def 3; reconsider h = y as Function by A17,A18,Th30; A19: dom h = dom f by A9,A7,A13,A6,A17,A18,Th31; now let z; assume A20: z in dom f; then A21: (uncurry g).(z,x) = h.z by A17,A18,A19,Th31; g.z in Funcs(X,f).z & Funcs(X,f).z = Funcs(X,f.z) by A8,A7,A20,Def9, CARD_3:9; then consider j being Function such that A22: g.z = j and A23: dom j = X and A24: rng j c= f.z by FUNCT_2:def 2; A25: j.x in rng j by A16,A17,A23,FUNCT_1:def 3; (uncurry g).(z,x) = j.x by A9,A7,A16,A17,A20,A22,A23,FUNCT_5:38; hence h.z in f.z by A24,A21,A25; end; hence thesis by A19,CARD_3:def 5; end; thus F is one-to-one proof let x,y; assume that A26: x in dom F and A27: y in dom F and A28: F.x = F.y and A29: x <> y; consider gy being Function such that A30: y = gy and A31: F.y = <:gy:> by A4,A27; consider gx being Function such that A32: x = gx and A33: F.x = <:gx:> by A4,A26; A34: dom gx = dom Funcs(X,f) by A4,A26,A32,CARD_3:9; A35: dom Funcs(X,f) = dom f by Def9; A36: dom gy = dom Funcs(X,f) by A4,A27,A30,CARD_3:9; now let z; assume A37: z in dom f; then A38: Funcs(X,f).z = Funcs(X,f.z) by Def9; gy.z in Funcs(X,f).z by A4,A27,A30,A35,A37,CARD_3:9; then consider hy being Function such that A39: gy.z = hy & dom hy = X and rng hy c= f.z by A38,FUNCT_2:def 2; gx.z in Funcs(X,f).z by A4,A26,A32,A35,A37,CARD_3:9; then consider hx being Function such that A40: gx.z = hx & dom hx = X and rng hx c= f.z by A38,FUNCT_2:def 2; A41: dom <:gx:> = X by A4,A5,A26,A32; A42: SubFuncs rng gx = rng gx & gx"rng gx = dom gx by A4,A5,A26,A32, RELAT_1:134; now let b be set; assume A43: b in X; then reconsider fx = <:gx:>.b as Function by A41,Th30; A44: (uncurry gx).(z,b) = hx.b & (uncurry gy).(z,b) = hy.b by A34,A36,A35 ,A37,A40,A39,A43,FUNCT_5:38; A45: dom fx = dom gx by A41,A42,A43,Th31; then fx.z = (uncurry gx).(z,b) by A34,A35,A37,A41,A43,Th31; hence hx.b = hy.b by A28,A33,A31,A34,A35,A37,A41,A43,A45,A44,Th31; end; hence gx.z = gy.z by A40,A39,FUNCT_1:2; end; hence thesis by A29,A32,A30,A34,A36,A35,FUNCT_1:2; end; thus dom F = product Funcs(X,f) by A4; thus rng F c= Funcs(X, product f) proof let y; assume y in rng F; then consider x such that A46: x in dom F and A47: y = F.x by FUNCT_1:def 3; consider g such that A48: x = g and A49: y = <:g:> by A4,A46,A47; dom <:g:> = X & rng <:g:> c= product f by A4,A5,A46,A48; hence thesis by A49,FUNCT_2:def 2; end; let y; assume y in Funcs(X, product f); then consider h such that A50: y = h and A51: dom h = X and A52: rng h c= product f by FUNCT_2:def 2; set g = <:h:>; A53: h"rng h = dom h by RELAT_1:134; A54: now let z; assume A55: z in X; then h.z in rng h by A51,FUNCT_1:def 3; then A56: ex j being Function st h.z = j & dom j = dom f & for x st x in dom f holds j.x in f.x by A52,CARD_3:def 5; thus (X --> dom f).z = dom f by A55,FUNCOP_1:7 .= (doms h).z by A51,A55,A56,Th22; end; A57: meet doms h = dom g by Th29; now let z; assume z in rng h; then ex j being Function st z = j & dom j = dom f & for x st x in dom f holds j.x in f.x by A52,CARD_3:def 5; hence z is Function; end; then A58: SubFuncs rng h = rng h by Lm1; dom doms h = h"SubFuncs rng h & dom (dom h --> dom f) = dom h by Def2, FUNCOP_1:13; then X --> dom f = doms h by A51,A58,A53,A54,FUNCT_1:2; then A59: dom g = dom f by A2,A57,Th27; A60: now let z; assume A61: z in dom f; then reconsider i = g.z as Function by A59,Th30; A62: dom i = X by A51,A58,A53,A59,A61,Th31; rng i c= f.z proof let x; assume x in rng i; then consider a being set such that A63: a in dom i and A64: x = i.a by FUNCT_1:def 3; h.a in rng h by A51,A62,A63,FUNCT_1:def 3; then consider j being Function such that A65: h.a = j & dom j = dom f and A66: for x st x in dom f holds j.x in f.x by A52,CARD_3:def 5; i.a = (uncurry h).(a,z) by A59,A61,A63,Th31 .= j.z by A51,A61,A62,A63,A65,FUNCT_5:38; hence thesis by A61,A64,A66; end; then g.z in Funcs(X,f.z) by A62,FUNCT_2:def 2; hence g.z in Funcs(X,f).z by A61,Def9; end; A67: meet doms g = dom <:g:> by Th29; product f c= Funcs(dom f, Union f) by Th1; then A68: rng h c= Funcs(dom f, Union f) by A52,XBOOLE_1:1; then A69: dom uncurry h = [:dom h, dom f:] by FUNCT_5:26; dom f = dom Funcs(X,f) by Def9; then A70: g in product Funcs(X,f) by A59,A60,CARD_3:def 5; then A71: ex g9 being Function st g = g9 & F.g = <:g9:> by A4; dom uncurry' h = [:dom f, dom h:] by A68,FUNCT_5:26; then A72: (uncurry' h)|([:meet doms h, dom h:] qua set) = uncurry' h by A57,A59, RELAT_1:68; A73: uncurry' h = ~uncurry h & curry ~uncurry h = curry' uncurry h by FUNCT_5:def 3,def 4; dom <:g:> = X by A5,A70; then A74: (uncurry h)|([:meet doms g, dom g:] qua set) = uncurry h by A51,A59,A69 ,A67,RELAT_1:68; uncurry' curry' uncurry h = uncurry h by A69,FUNCT_5:49; then <:g:> = h by A1,A68,A72,A74,A73,FUNCT_5:48; hence thesis by A4,A50,A70,A71,FUNCT_1:def 3; end; theorem Th50: Funcs({},f) = dom f --> {{}} proof A1: now let x; assume x in dom f; hence Funcs({},f).x = Funcs({} qua set,f.x) by Def9 .= {{}} by FUNCT_5:57; end; dom Funcs({},f) = dom f by Def9; hence thesis by A1,FUNCOP_1:11; end; theorem Th51: Funcs(X,{}) = {} proof dom Funcs(X,{}) = dom {} by Def9; hence thesis; end; theorem Funcs(X, Y --> Z) = Y --> Funcs(X,Z) proof A1: Y = dom (Y --> Z) by FUNCOP_1:13; A2: now let x; assume A3: x in Y; then Funcs(X, Y --> Z).x = Funcs(X, (Y --> Z).x) by A1,Def9; hence Funcs(X, Y --> Z).x = Funcs(X,Z) by A3,FUNCOP_1:7; end; dom Funcs(X, Y --> Z) = dom (Y --> Z) by Def9; hence thesis by A1,A2,FUNCOP_1:11; end; theorem product Funcs(X,f),Funcs(X, product f) are_equipotent proof A1: Funcs(X, product {}) = {X --> {}} by CARD_3:10,FUNCT_5:59; A2: product Funcs({},f) = product (dom f --> {{}}) by Th50 .= Funcs(dom f, {{}}) by CARD_3:11 .= {dom f --> {}} by FUNCT_5:59; A3: Funcs({} qua set, product f) = {{}} & product Funcs(X,{}) = {{}} by Th51, CARD_3:10,FUNCT_5:57; X <> {} & f <> {} implies thesis by Lm5; hence thesis by A2,A3,A1,CARD_1:28; end; begin definition let f be Function; func commute f -> Function-yielding Function equals curry' uncurry f; coherence proof set g = curry' uncurry f; for x st x in dom g holds g.x is Function by FUNCT_5:33; hence thesis by FUNCOP_1:def 6; end; end; theorem for f be Function, x be set st x in dom (commute f) holds (commute f). x is Function; theorem Th55: for A,B,C be set, f be Function st A <> {} & B <> {} & f in Funcs(A,Funcs(B,C)) holds commute f in Funcs(B,Funcs(A,C)) proof let A,B,C be set, f be Function; assume A <> {} & B <> {} & f in Funcs(A,Funcs(B,C)); then [:A,B:] <> {} & uncurry f in Funcs([:A,B:],C) by Th11,ZFMISC_1:90; hence thesis by Th10; end; theorem for A,B,C be set, f be Function st A <> {} & B <> {} & f in Funcs(A, Funcs(B,C)) for g,h be Function, x,y be set st x in A & y in B & f.x = g & ( commute f).y = h holds h.x = g.y & dom h = A & dom g = B & rng h c= C & rng g c= C proof let A,B,C be set, f be Function; assume that A1: A <> {} & B <> {} and A2: f in Funcs(A,Funcs(B,C)); set uf = uncurry f; set cf = commute f; let g,h be Function, x,y be set; assume that A3: x in A and A4: y in B and A5: f.x = g and A6: (commute f).y = h; commute f in Funcs(B,Funcs(A,C)) by A1,A2,Th55; then A7: ex g be Function st g = cf & dom g = B & rng g c= Funcs(A,C) by FUNCT_2:def 2; then cf.y in rng cf by A4,FUNCT_1:def 3; then A8: ex t be Function st t = h & dom t = A & rng t c= C by A6,A7,FUNCT_2:def 2; A9: ex g be Function st g = f & dom g = A & rng g c= Funcs(B,C) by A2, FUNCT_2:def 2; then f.x in rng f by A3,FUNCT_1:def 3; then A10: ex t be Function st t = g & dom t = B & rng t c= C by A5,A9,FUNCT_2:def 2; then [x,y] in dom uf & uf.(x,y) = g.y by A3,A4,A5,A9,FUNCT_5:38; hence thesis by A6,A10,A8,FUNCT_5:22; end; theorem for A,B,C be set, f be Function st A <> {} & B <> {} & f in Funcs(A, Funcs(B,C)) holds commute commute f = f proof let A,B,C be set, f be Function; assume that A1: A <> {} & B <> {} and A2: f in Funcs(A,Funcs(B,C)); A3: ex g be Function st g = f & dom g = A & rng g c= Funcs(B,C) by A2, FUNCT_2:def 2; set cf = commute f; A4: commute f in Funcs(B,Funcs(A,C)) by A1,A2,Th55; then commute cf in Funcs(A,Funcs(B,C)) by A1,Th55; then A5: ex h be Function st h = commute cf & dom h = A & rng h c= Funcs(B,C) by FUNCT_2:def 2; A6: ex g be Function st g = cf & dom g = B & rng g c= Funcs(A,C) by A4, FUNCT_2:def 2; for x st x in A holds f.x = (commute cf).x proof set ccf = commute cf, uf = uncurry f, ucf = uncurry cf; let x; assume A7: x in A; then f.x in rng f by A3,FUNCT_1:def 3; then consider g be Function such that A8: g = f.x & dom g = B and rng g c= C by A3,FUNCT_2:def 2; ccf.x in rng ccf by A5,A7,FUNCT_1:def 3; then consider h be Function such that A9: h = ccf.x and A10: dom h = B and rng h c= C by A5,FUNCT_2:def 2; A11: for y st y in B for h be Function st h = cf.y holds x in dom h & h.x = g.y proof let y; assume y in B; then A12: [x,y] in dom uf & uf.(x,y) = g.y by A3,A7,A8,FUNCT_5:38; let h be Function; assume h = cf.y; hence thesis by A12,FUNCT_5:22; end; A13: for y st y in B holds [y,x] in dom ucf & ucf.(y,x) = g.y proof let y; reconsider h = cf.y as Function; assume A14: y in B; then x in dom h & h.x = g.y by A11; hence thesis by A6,A14,FUNCT_5:38; end; for y st y in B holds h.y = g.y proof let y; assume y in B; then [y,x] in dom ucf & ucf.(y,x) = g.y by A13; hence thesis by A9,FUNCT_5:22; end; hence thesis by A8,A9,A10,FUNCT_1:2; end; hence thesis by A3,A5,FUNCT_1:2; end; theorem commute {} = {} by FUNCT_5:42,43; theorem for f be Function-yielding Function holds dom doms f = dom f proof let f be Function-yielding Function; thus dom doms f c= dom f proof let i be set; dom doms f = f"SubFuncs rng f by Def2; hence thesis by Th19; end; thus dom f c= dom doms f proof let i be set; assume A1: i in dom f; f.i is Function & dom doms f = f"SubFuncs rng f by Def2; hence thesis by A1,Th19; end; end; theorem for f be Function-yielding Function holds dom rngs f = dom f proof let f be Function-yielding Function; thus dom rngs f c= dom f proof let i be set; dom rngs f = f"SubFuncs rng f by Def3; hence thesis by Th19; end; thus dom f c= dom rngs f proof let i be set; assume A1: i in dom f; f.i is Function & dom rngs f = f"SubFuncs rng f by Def3; hence thesis by A1,Th19; end; end; begin reserve A,B,C for Ordinal; Lm1: {} in omega by ORDINAL1:def 11; Lm2: 1 in omega; definition func one equals 1; correctness; end; begin definition let a,b be Ordinal; pred a,b are_relative_prime means :Def2: for c,d1,d2 being Ordinal st a = c *^ d1 & b = c *^ d2 holds c = 1; symmetry; end; theorem not {},{} are_relative_prime proof take {}, {}, {}; thus thesis by ORDINAL2:35; end; theorem Th2: 1,A are_relative_prime proof let c,d1,d2 be Ordinal; thus thesis by ORDINAL3:37; end; theorem Th3: {},A are_relative_prime implies A = 1 proof A1: {} = A*^{} & A = A*^1 by ORDINAL2:38,39; assume {},A are_relative_prime & A <> 1; hence contradiction by A1,Def2; end; reserve a,b,c,d for natural Ordinal; defpred PP[set] means ex B st B c= $1 & $1 in omega & $1 <> {} & not ex c,d1, d2 being natural Ordinal st d1,d2 are_relative_prime & $1 = c *^ d1 & B = c *^ d2; theorem a <> {} or b <> {} implies ex c,d1,d2 being natural Ordinal st d1,d2 are_relative_prime & a = c *^ d1 & b = c *^ d2 proof assume that A1: a <> {} or b <> {} and A2: not ex c,d1,d2 being natural Ordinal st d1,d2 are_relative_prime & a = c *^ d1 & b = c *^ d2; A3: ex A st PP[A] proof per cases; suppose A4: a c= b; take A = b, B = a; thus B c= A & A in omega & A <> {} by A1,A4,ORDINAL1:def 12; thus thesis by A2; end; suppose A5: b c= a; take A = a, B = b; thus B c= A & A in omega & A <> {} by A1,A5,ORDINAL1:def 12; thus thesis by A2; end; end; consider A such that A6: PP[A] and A7: for C st PP[C] holds A c= C from ORDINAL1:sch 1(A3); consider B such that A8: B c= A and A9: A in omega and A10: A <> {} and A11: not ex c,d1,d2 being natural Ordinal st d1,d2 are_relative_prime & A = c *^ d1 & B = c *^ d2 by A6; reconsider A,B as Element of omega by A8,A9,ORDINAL1:12; A = 1 *^ A & B = 1 *^ B by ORDINAL2:39; then not A,B are_relative_prime by A11; then consider c,d1,d2 being Ordinal such that A12: A = c *^ d1 and A13: B = c *^ d2 and A14: c <> 1 by Def2; A15: c <> {} by A10,A12,ORDINAL2:35; then A16: d1 c= A & d2 c= B by A12,A13,ORDINAL3:36; A17: d1 <> {} by A10,A12,ORDINAL2:38; then c c= A by A12,ORDINAL3:36; then reconsider c,d1,d2 as Element of omega by A16,ORDINAL1:12; 1 in c or c in 1 by A14,ORDINAL1:14; then 1*^d1 in A by A12,A17,A15,ORDINAL3:14,19; then A18: d1 in A by ORDINAL2:39; A19: now let c9,d19,d29 be natural Ordinal; assume that A20: d19,d29 are_relative_prime and A21: d1 = c9 *^ d19 & d2 = c9 *^ d29; A = c*^c9*^d19 & B = c*^c9*^d29 by A12,A13,A21,ORDINAL3:50; hence contradiction by A11,A20; end; A = d1*^c & B = d2*^c by A12,A13; then d2 c= d1 by A8,A15,ORDINAL3:35; hence contradiction by A7,A17,A19,A18,ORDINAL1:5; end; reserve l,m,n for natural Ordinal; registration let m,n; cluster m div^ n -> natural; coherence proof A1: n = {} implies m div^ n = {} & {}*^1 = {} by ORDINAL2:35,ORDINAL3:def 6; n in 1 or 1 c= n by ORDINAL1:16; then (m div^ n)*^1 c= (m div^ n)*^n by A1,ORDINAL3:14,20; then A2: m div^ n c= (m div^ n)*^n by ORDINAL2:39; (m div^ n)*^n c= m & m in omega by ORDINAL1:def 12,ORDINAL3:64; hence m div^ n in omega by A2,ORDINAL1:12,XBOOLE_1:1; end; cluster m mod^ n -> natural; coherence proof (m div^ n)*^n+^(m mod^ n) = m by ORDINAL3:65; then A3: m mod^ n c= m by ORDINAL3:24; m in omega by ORDINAL1:def 12; hence m mod^ n in omega by A3,ORDINAL1:12; end; end; definition let k,n be Ordinal; pred k divides n means : Def3: ex a being Ordinal st n = k*^a; reflexivity proof let n be Ordinal; take 1; thus thesis by ORDINAL2:39; end; end; theorem Th5: a divides b iff ex c st b = a*^c proof thus a divides b implies ex c st b = a*^c proof given c being Ordinal such that A1: b = a*^c; per cases; suppose b = {}; then b = a*^{} by ORDINAL2:38; hence thesis; end; suppose b <> {}; then c is Element of omega by A1,ORDINAL3:75; hence thesis by A1; end; end; thus thesis by Def3; end; theorem Th6: for m,n st {} in m holds n mod^ m in m proof let m,n; assume {} in m; then A1: ex C st n = (n div^ m)*^m+^C & C in m by ORDINAL3:def 6; n mod^ m = n-^(n div^ m)*^m by ORDINAL3:def 7; hence thesis by A1,ORDINAL3:52; end; theorem Th7: for n,m holds m divides n iff n = m *^ (n div^ m) proof let n,m; assume A1: not thesis; then consider a such that A2: n = m*^a by Th5; {}*^a = {} by ORDINAL2:35; then {} <> m by A1,A2,ORDINAL2:35; then A3: {} in m by ORDINAL3:8; n = a*^m+^{} by A2,ORDINAL2:27; hence thesis by A1,A2,A3,Def3,ORDINAL3:def 6; end; theorem Th8: for n,m st n divides m & m divides n holds n = m proof let n,m; assume that A1: n divides m and A2: m divides n; A3: m = n *^ (m div^ n) by A1,Th7; A4: (m div^ n) *^ (n div^ m) = 1 implies n = m proof assume (m div^ n) *^ (n div^ m) = 1; then m div^ n = 1 by ORDINAL3:37; hence thesis by A3,ORDINAL2:39; end; n = m *^ (n div^ m) by A2,Th7; then A5: n *^ 1 = n & n = n *^ ((m div^ n) *^ (n div^ m)) by A3,ORDINAL2:39 ,ORDINAL3:50; n = {} implies n = m by A3,ORDINAL2:35; hence thesis by A5,A4,ORDINAL3:33; end; theorem Th9: n divides {} & 1 divides n proof {} = n *^ {} by ORDINAL2:35; hence n divides {} by Def3; n = 1 *^ n by ORDINAL2:39; hence thesis by Def3; end; theorem Th10: for n,m st {} in m & n divides m holds n c= m proof let n,m such that A1: {} in m; given a being Ordinal such that A2: m = n*^a; a <> {} by A1,A2,ORDINAL2:38; hence thesis by A2,ORDINAL3:36; end; theorem Th11: for n,m,l st n divides m & n divides m +^ l holds n divides l proof let n,m,l; assume n divides m; then consider a such that A1: m = n*^a by Th5; assume n divides m +^ l; then consider b such that A2: m +^ l = n*^b by Th5; assume A3: not n divides l; l = n*^b -^ n*^a by A1,A2,ORDINAL3:52 .= (b-^a)*^n by ORDINAL3:63; hence thesis by A3,Def3; end; Lm3: 1 = succ {}; definition let k,n be natural Ordinal; func k lcm n -> Element of omega means : Def4: k divides it & n divides it & for m st k divides m & n divides m holds it divides m; existence proof per cases; suppose A1: k = {} or n = {}; reconsider w = {} as Element of omega by ORDINAL1:def 12; take w; thus k divides w & n divides w by Th9; let m; assume k divides m & n divides m; hence thesis by A1; end; suppose A2: k <> {} & n <> {}; {} c= k; then {} c< k by A2,XBOOLE_0:def 8; then A3: {} in k by ORDINAL1:11; {} c= n; then {} c< n by A2,XBOOLE_0:def 8; then {} in n by ORDINAL1:11; then A4: 1 c= n by Lm3,ORDINAL1:21; defpred P[Ordinal] means ex m st $1 = m & k divides m & n divides m & k c= m; A5: k*^1 = k by ORDINAL2:39; k divides k *^ n & n divides k *^ n by Def3; then A6: ex A st P[A] by A4,A5,ORDINAL2:41; consider A such that A7: P[A] and A8: for B st P[B] holds A c= B from ORDINAL1:sch 1(A6); consider l such that A9: A = l and A10: k divides l and A11: n divides l and A12: k c= l by A7; reconsider l as Element of omega by ORDINAL1:def 12; take l; thus k divides l & n divides l by A10,A11; let m such that A13: k divides m and A14: n divides m; A15: m = l*^(m div^ l)+^(m mod^ l) by ORDINAL3:65; l = k*^(l div^ k) by A10,Th7; then l*^(m div^ l) = k*^((l div^ k)*^(m div^ l)) by ORDINAL3:50; then k divides l*^(m div^ l) by Def3; then A16: k divides m mod^ l by A13,A15,Th11; l = n*^(l div^ n) by A11,Th7; then l*^(m div^ l) = n*^((l div^ n)*^(m div^ l)) by ORDINAL3:50; then n divides l*^(m div^ l) by Def3; then A17: n divides m mod^ l by A14,A15,Th11; now A18: {} c= m mod^ l; assume m mod^ l <> {}; then {} c< m mod^ l by A18,XBOOLE_0:def 8; then k c= m mod^ l by A16,Th10,ORDINAL1:11; then l c= m mod^ l by A8,A9,A16,A17; hence contradiction by A12,A3,Th6,ORDINAL1:5; end; then m = l*^(m div^ l) by A15,ORDINAL2:27; hence thesis by Th7; end; end; uniqueness proof let m1,m2 be Element of omega; assume k divides m1 & n divides m1 & ( for m st k divides m & n divides m holds m1 divides m)& k divides m2 &( n divides m2 & for m st k divides m & n divides m holds m2 divides m ); then m1 divides m2 & m2 divides m1; hence thesis by Th8; end; commutativity; end; theorem Th12: m lcm n divides m*^n proof m divides m*^n & n divides m*^n by Def3; hence thesis by Def4; end; theorem Th13: n <> {} implies (m*^n) div^ (m lcm n) divides m proof assume A1: n <> {}; take ((m lcm n) div^ n); n divides m lcm n by Def4; then A2: m lcm n = n*^((m lcm n) div^ n) by Th7; m lcm n divides m*^n by Th12; then m*^n = (m lcm n)*^ ((m*^n) div^ (m lcm n)) by Th7; then n*^m = n*^(((m lcm n) div^ n)*^ ((m*^n) div^ (m lcm n))) by A2, ORDINAL3:50; hence m = ((m*^n) div^ (m lcm n))*^((m lcm n) div^ n) by A1,ORDINAL3:33; end; definition let k,n be natural Ordinal; func k hcf n -> Element of omega means : Def5: it divides k & it divides n & for m st m divides k & m divides n holds m divides it; existence proof per cases; suppose A1: k = {} or n = {}; then reconsider m = k \/ n as Element of omega by ORDINAL1:def 12; take m; thus m divides k & m divides n by A1,Th9; thus thesis by A1; end; suppose A2: k <> {} & n <> {}; reconsider l = (k*^n) div^ (k lcm n) as Element of omega by ORDINAL1:def 12; take l; thus l divides k & l divides n by A2,Th13; let m; assume that A3: m divides k and A4: m divides n; A5: n = m*^(n div^ m) by A4,Th7; then A6: n div^ m <> {} by A2,ORDINAL2:35; m*^(k div^ m)*^(n div^ m) = n*^(k div^ m) by A5,ORDINAL3:50; then A7: n divides m*^(k div^ m)*^(n div^ m) by Def3; set mm = m*^((k div^ m)*^(n div^ m)); A8: mm = m*^(k div^ m)*^(n div^ m) by ORDINAL3:50; A9: k = m*^(k div^ m) by A3,Th7; then k div^ m <> {} by A2,ORDINAL2:35; then A10: (k div^ m)*^(n div^ m) <> {} by A6,ORDINAL3:31; k divides m*^(k div^ m)*^(n div^ m) by A9,Def3; then k lcm n divides m*^(k div^ m)*^(n div^ m) by A7,Def4; then A11: mm = (k lcm n)*^(mm div^ (k lcm n)) by A8,Th7; m <> {} by A2,A9,ORDINAL2:35; then k lcm n <> {} by A11,A10,ORDINAL2:35,ORDINAL3:31; then A12: k*^n = k*^n+^{} & {} in k lcm n by ORDINAL2:27,ORDINAL3:8; mm*^m = (k lcm n)*^(m*^(mm div^ (k lcm n))) by A11,ORDINAL3:50; then k*^n = (k lcm n)*^(m*^(mm div^ (k lcm n))) by A9,A5,A8,ORDINAL3:50; then l = m*^(mm div^ (k lcm n)) by A12,ORDINAL3:66; hence thesis by Def3; end; end; uniqueness proof let m1,m2 be Element of omega; assume m1 divides k & m1 divides n & ( for m st m divides k & m divides n holds m divides m1)& m2 divides k &( m2 divides n & for m st m divides k & m divides n holds m divides m2 ); then m1 divides m2 & m2 divides m1; hence thesis by Th8; end; commutativity; end; theorem Th14: a hcf {} = a & a lcm {} = {} proof reconsider e = a, c = {} as Element of omega by ORDINAL1:def 12; A1: for b st a divides b & {} divides b holds c divides b; ( for n st n divides a & n divides {} holds n divides e)& a divides c by Th9 ; hence thesis by A1,Def4,Def5; end; theorem Th15: a hcf b = {} implies a = {} proof a hcf b divides a by Def5; then a = (a hcf b)*^(a div^ (a hcf b)) by Th7; hence thesis by ORDINAL2:35; end; theorem Th16: a hcf a = a & a lcm a = a proof reconsider c = a as Element of omega by ORDINAL1:def 12; for b st b divides a & b divides a holds b divides c; hence a hcf a = a by Def5; for b st a divides b & a divides b holds c divides b; hence thesis by Def4; end; theorem Th17: (a*^c) hcf (b*^c) = (a hcf b)*^c proof per cases; suppose A1: c = {}; then A2: (a hcf b)*^c = {} by ORDINAL2:35; a*^c = {} & b*^c = {} by A1,ORDINAL2:35; hence thesis by A2,Th16; end; suppose A3: c <> {} & a <> {}; reconsider d = (a hcf b)*^c as Element of omega by ORDINAL1:def 12; set e = ((a*^c) hcf (b*^c)) div^ d; a hcf b divides b by Def5; then b = (a hcf b)*^(b div^ (a hcf b)) by Th7; then b*^c = d*^(b div^ (a hcf b)) by ORDINAL3:50; then A4: d divides b*^c by Def3; a hcf b divides a by Def5; then a = (a hcf b)*^(a div^ (a hcf b)) by Th7; then a*^c = d*^(a div^ (a hcf b)) by ORDINAL3:50; then d divides a*^c by Def3; then d divides (a*^c) hcf (b*^c) by A4,Def5; then A5: (a*^c) hcf (b*^c) = d*^e by Th7 .= (a hcf b)*^e*^c by ORDINAL3:50; then (a hcf b)*^e*^c divides b*^c by Def5; then (a hcf b)*^e*^c*^((b*^c)div^((a hcf b)*^e*^c)) = b*^c by Th7; then (a hcf b)*^e*^((b*^c)div^((a hcf b)*^e*^c))*^c = b*^c by ORDINAL3:50; then (a hcf b)*^e*^((b*^c)div^((a hcf b)*^e*^c)) = b by A3,ORDINAL3:33; then A6: (a hcf b)*^e divides b by Def3; (a hcf b)*^e*^c divides a*^c by A5,Def5; then (a hcf b)*^e*^c*^((a*^c)div^((a hcf b)*^e*^c)) = a*^c by Th7; then (a hcf b)*^e*^((a*^c)div^((a hcf b)*^e*^c))*^c = a*^c by ORDINAL3:50; then (a hcf b)*^e*^((a*^c)div^((a hcf b)*^e*^c)) = a by A3,ORDINAL3:33; then (a hcf b)*^e divides a by Def3; then (a hcf b)*^e divides a hcf b by A6,Def5; then (a hcf b)*^e*^((a hcf b) div^ ((a hcf b)*^e)) = a hcf b by Th7; then (a hcf b)*^(e*^((a hcf b) div^ ((a hcf b)*^e))) = a hcf b by ORDINAL3:50 .= (a hcf b)*^1 by ORDINAL2:39; then a hcf b = {} or e*^((a hcf b) div^ ((a hcf b)*^e)) = 1 by ORDINAL3:33; then e = 1 by A3,Th15,ORDINAL3:37; hence thesis by A5,ORDINAL2:39; end; suppose a = {}; then a hcf b = b & a*^c = {} by Th14,ORDINAL2:35; hence thesis by Th14; end; end; theorem Th18: b <> {} implies a hcf b <> {} & b div^ (a hcf b) <> {} proof a hcf b divides b by Def5; then b = (a hcf b)*^(b div^ (a hcf b)) by Th7; hence thesis by ORDINAL2:35; end; theorem Th19: a <> {} or b <> {} implies a div^ (a hcf b), b div^ (a hcf b) are_relative_prime proof assume A1: a <> {} or b <> {}; set ab = a hcf b; A2: 1*^a = a & 1*^b = b by ORDINAL2:39; per cases; suppose a = {} or b = {}; then ab = b & b div^ b = 1 or ab = a & a div^ a = 1 by A1,A2,Th14, ORDINAL3:68; hence thesis by Th2; end; suppose A3: a <> {} & b <> {}; ab divides b by Def5; then A4: b = ab*^(b div^ ab) by Th7; then A5: b div^ ab <> {} by A3,ORDINAL2:35; let c,d1,d2 be Ordinal such that A6: a div^ (a hcf b) = c *^ d1 and A7: b div^ (a hcf b) = c *^ d2; ab divides a by Def5; then A8: a = ab*^(a div^ ab) by Th7; then a div^ ab <> {} by A3,ORDINAL2:35; then reconsider c,d1,d2 as Element of omega by A6,A7,A5,ORDINAL3:75; b = ab*^c*^d2 by A4,A7,ORDINAL3:50; then A9: ab*^c divides b by Def3; a = ab*^c*^d1 by A8,A6,ORDINAL3:50; then ab*^c divides a by Def3; then ab*^c divides ab by A9,Def5; then ab = (ab*^c)*^(ab div^ (ab*^c)) by Th7; then ab = ab*^(c*^(ab div^ (ab*^c))) by ORDINAL3:50; then A10: ab*^1 = ab*^(c*^(ab div^ (ab*^c))) by ORDINAL2:39; ab <> {} by A3,A8,ORDINAL2:35; then 1 = c*^(ab div^ (ab*^c)) by A10,ORDINAL3:33; hence thesis by ORDINAL3:37; end; end; theorem Th20: a,b are_relative_prime iff a hcf b = 1 proof a hcf b divides b by Def5; then A1: b = (a hcf b)*^(b div^ (a hcf b)) by Th7; a hcf b divides a by Def5; then a = (a hcf b)*^(a div^ (a hcf b)) by Th7; hence a,b are_relative_prime implies a hcf b = 1 by A1,Def2; assume A2: a hcf b = 1; let c,d1,d2 be Ordinal such that A3: a = c*^d1 & b = c*^d2; a <> {} or b <> {} by A2,Th14; then reconsider c as Element of omega by A3,ORDINAL3:75; c divides a & c divides b by A3,Def3; then c divides 1 by A2,Def5; then ex d st 1 = c*^d by Th5; hence thesis by ORDINAL3:37; end; definition let a,b be natural Ordinal; func RED(a,b) -> Element of omega equals a div^ (a hcf b); coherence by ORDINAL1:def 12; end; theorem Th21: RED(a,b)*^(a hcf b) = a proof a hcf b divides a by Def5; hence thesis by Th7; end; theorem a <> {} or b <> {} implies RED(a,b), RED(b,a) are_relative_prime by Th19; theorem Th23: a,b are_relative_prime implies RED(a,b) = a proof assume a,b are_relative_prime; then a hcf b = 1 by Th20; hence thesis by ORDINAL3:71; end; theorem Th24: RED(a,1) = a & RED(1,a) = 1 proof a,1 are_relative_prime by Th2; then a hcf 1 = 1 by Th20; hence thesis by ORDINAL3:71; end; theorem b <> {} implies RED(b,a) <> {} by Th18; theorem Th26: RED({},a) = {} & (a <> {} implies RED(a,{}) = 1) proof thus RED({},a) = {} by ORDINAL3:70; assume A1: a <> {}; thus RED(a,{}) = a div^ a by Th14 .= a*^1 div^ a by ORDINAL2:39 .= 1 by A1,ORDINAL3:68; end; theorem Th27: a <> {} implies RED(a,a) = 1 proof assume A1: a <> {}; thus RED(a,a) = a div^ a by Th16 .= a*^1 div^ a by ORDINAL2:39 .= 1 by A1,ORDINAL3:68; end; theorem Th28: c <> {} implies RED(a*^c, b*^c) = RED(a, b) proof assume A1: c <> {}; a <> {} implies a hcf b <> {} by Th18; then A2: a <> {} implies (a hcf b)*^c <> {} by A1,ORDINAL3:31; A3: RED({},b) = {} & {}*^((a hcf b)*^c) = {} by ORDINAL2:35,ORDINAL3:70; A4: a hcf b divides a by Def5; thus RED(a*^c, b*^c) = (a*^c)div^((a hcf b)*^c) by Th17 .= (((a div^(a hcf b))*^(a hcf b))*^c)div^((a hcf b)*^c) by A4,Th7 .= (RED(a,b)*^((a hcf b)*^c))div^((a hcf b)*^c) by ORDINAL3:50 .= RED(a, b) by A2,A3,ORDINAL3:68,70; end; set RATplus = {[a,b] where a,b is Element of omega: a,b are_relative_prime & b <> {}}; 1,1 are_relative_prime by Th2; then [1,1] in RATplus; then reconsider RATplus as non empty set; Lm4: [a,b] in RATplus implies a,b are_relative_prime & b <> {} proof assume [a,b] in RATplus; then consider c,d being Element of omega such that A1: [a,b] = [c,d] and A2: c,d are_relative_prime & d <> {}; a = c by A1,XTUPLE_0:1; hence thesis by A1,A2,XTUPLE_0:1; end; begin reserve i,j,k for Element of omega; definition func RAT+ equals ({[i,j]: i,j are_relative_prime & j <> {}} \ {[k,1]: not contradiction}) \/ omega; correctness; end; Lm5: omega c= RAT+ by XBOOLE_1:7; reserve x,y,z for Element of RAT+; registration cluster RAT+ -> non empty; coherence; end; registration cluster non empty ordinal for Element of RAT+; existence by Lm2,Lm5; end; theorem Th29: x in omega or ex i,j st x = [i,j] & i,j are_relative_prime & j <> {} & j <> 1 proof assume not x in omega; then A1: x in RATplus \ {[k,1]: not contradiction} by XBOOLE_0:def 3; then A2: not x in {[k,1]: not contradiction} by XBOOLE_0:def 5; x in RATplus by A1; then consider a,b being Element of omega such that A3: x = [a,b] & a,b are_relative_prime & b <> {}; [a,1] in {[k,1]: not contradiction}; hence thesis by A2,A3; end; theorem Th30: not ex i,j being set st [i,j] is Ordinal proof given i,j being set such that A1: [i,j] is Ordinal; {} in [i,j] by A1,ORDINAL3:8; hence thesis by TARSKI:def 2; end; theorem Th31: A in RAT+ implies A in omega proof assume A in RAT+ & not A in omega; then ex i,j st A = [i,j] & i,j are_relative_prime & j <> {} & j <> 1 by Th29; hence thesis by Th30; end; registration cluster -> natural for ordinal Element of RAT+; coherence proof let x be ordinal Element of RAT+; assume not x in omega; then A1: ex i,j st x = [i,j] & i,j are_relative_prime & j <> {} & j <> 1 by Th29; then {} in x by ORDINAL3:8; hence thesis by A1,TARSKI:def 2; end; end; theorem Th32: not ex i,j being set st [i,j] in omega proof given i,j being set such that A1: [i,j] in omega; reconsider a = [i,j] as Element of omega by A1; {} in a by ORDINAL3:8; hence thesis by TARSKI:def 2; end; theorem Th33: [i,j] in RAT+ iff i,j are_relative_prime & j <> {} & j <> 1 proof A1: not [i,j] in omega by Th32; hereby assume [i,j] in RAT+; then A2: [i,j] in RATplus \ {[k,1]: not contradiction} by A1,XBOOLE_0:def 3; hence i,j are_relative_prime & j <> {} by Lm4; not [i,j] in {[k,1]: not contradiction} by A2,XBOOLE_0:def 5; hence j <> 1; end; assume i,j are_relative_prime & j <> {}; then A3: [i,j] in RATplus; assume j <> 1; then not ex k st [i,j] = [k,1] by XTUPLE_0:1; then not [i,j] in {[k,1]: not contradiction}; then [i,j] in RATplus \ {[k,1]: not contradiction} by A3,XBOOLE_0:def 5; hence thesis by XBOOLE_0:def 3; end; definition let x be Element of RAT+; func numerator x -> Element of omega means :Def8: it = x if x in omega otherwise ex a st x = [it,a]; existence proof thus x in omega implies ex a being Element of omega st a = x; assume not x in omega; then x in RATplus \ {[k,1]: not contradiction} by XBOOLE_0:def 3; then x in RATplus; then consider a,b being Element of omega such that A1: x = [a,b] and a,b are_relative_prime and b <> {}; take a,b; thus thesis by A1; end; correctness by XTUPLE_0:1; func denominator x -> Element of omega means : Def9: it = 1 if x in omega otherwise ex a st x = [a,it]; existence proof thus x in omega implies ex a being Element of omega st a = 1; assume not x in omega; then x in RATplus \ {[k,1]: not contradiction} by XBOOLE_0:def 3; then x in RATplus; then consider a,b being Element of omega such that A2: x = [a,b] and a,b are_relative_prime and b <> {}; take b,a; thus thesis by A2; end; correctness by XTUPLE_0:1; end; theorem Th34: numerator x, denominator x are_relative_prime proof per cases; suppose x in omega; then denominator x = 1 by Def9; hence thesis by Th2; end; suppose A1: not x in omega; then consider i,j such that A2: x = [i,j] and A3: i,j are_relative_prime and j <> {} and j <> 1 by Th29; i = numerator x by A1,A2,Def8; hence thesis by A1,A2,A3,Def9; end; end; theorem Th35: denominator x <> {} proof per cases; suppose x in omega; hence thesis by Def9; end; suppose A1: not x in omega; then ex i,j st x = [i,j] & i,j are_relative_prime & j <> {} & j <> 1 by Th29; hence thesis by A1,Def9; end; end; theorem Th36: not x in omega implies x = [numerator x, denominator x] & denominator x <> 1 proof assume A1: not x in omega; then consider i,j such that A2: x = [i,j] and i,j are_relative_prime and j <> {} and A3: j <> 1 by Th29; i = numerator x by A1,A2,Def8; hence thesis by A1,A2,A3,Def9; end; theorem Th37: x <> {} iff numerator x <> {} proof hereby assume that A1: x <> {} and A2: numerator x = {}; A3: not x in omega by A1,A2,Def8; then consider i,j such that A4: x = [i,j] and A5: i,j are_relative_prime and j <> {} and A6: j <> 1 by Th29; i = {} by A2,A3,A4,Def8; hence contradiction by A5,A6,Th3; end; {} in omega by ORDINAL1:def 11; hence thesis by Def8; end; theorem x in omega iff denominator x = 1 by Def9,Th36; definition let i,j be natural Ordinal; func i/j -> Element of RAT+ equals :Def10: {} if j = {}, RED(i,j) if RED(j,i ) = 1 otherwise [RED(i,j), RED(j,i)]; coherence proof A1: now assume j <> {}; then RED(i,j), RED(j,i) are_relative_prime & RED(j,i) <> {} by Th18,Th19; hence RED(j,i) <> 1 implies [RED(i,j), RED(j,i)] in RAT+ by Th33; end; RED(i,j) in omega; hence thesis by A1,Lm1,Lm5; end; consistency by Th26; end; notation let i,j be natural Ordinal; synonym quotient(i,j) for i/j; end; theorem Th39: (numerator x)/(denominator x) = x proof A1: denominator x <> {} by Th35; A2: RED(numerator x, denominator x) = numerator x by Th23,Th34; numerator x, denominator x are_relative_prime by Th34; then A3: RED(denominator x, numerator x) = denominator x by Th23; per cases; suppose A4: denominator x = 1; then x in omega by Th36; then numerator x = x by Def8; hence thesis by A2,A3,A4,Def10; end; suppose A5: denominator x <> 1; then not x in omega by Def9; then x = [numerator x, denominator x] by Th36; hence thesis by A1,A2,A3,A5,Def10; end; end; theorem Th40: {}/b = {} & a/1 = a proof A1: b <> {} implies RED(b,{}) = 1 by Th26; RED({},b) = {} by Th26; hence {}/b = {} by A1,Def10; RED(1,a) = 1 & RED(a,1) = a by Th24; hence thesis by Def10; end; theorem Th41: a <> {} implies a/a = 1 proof assume a <> {}; then RED(a,a) = 1 by Th27; hence thesis by Def10; end; theorem Th42: b <> {} implies numerator (a/b) = RED(a,b) & denominator (a/b) = RED(b,a) proof assume A1: b <> {}; per cases; suppose A2: RED(b,a) = 1; then a/b = RED(a,b) by Def10; hence thesis by A2,Def8,Def9; end; suppose A3: RED(b,a) <> 1; A4: not [RED(a,b), RED(b,a)] in omega by Th32; a/b = [RED(a,b), RED(b,a)] by A1,A3,Def10; hence thesis by A4,Def8,Def9; end; end; theorem Th43: i,j are_relative_prime & j <> {} implies numerator (i/j) = i & denominator (i/j) = j proof assume i,j are_relative_prime; then RED(i,j) = i & RED(j,i) = j by Th23; hence thesis by Th42; end; theorem Th44: c <> {} implies (a*^c)/(b*^c) = a/b proof assume A1: c <> {}; per cases; suppose b = {}; then a/b = {} & b*^c = {} by Def10,ORDINAL2:35; hence thesis by Def10; end; suppose A2: b <> {}; then A3: b*^c <> {} by A1,ORDINAL3:31; then A4: denominator ((a*^c)/(b*^c)) = RED(b*^c,a*^c) by Th42 .= RED(b,a) by A1,Th28 .= denominator (a/b) by A2,Th42; numerator ((a*^c)/(b*^c)) = RED(a*^c,b*^c) by A3,Th42 .= RED(a,b) by A1,Th28 .= numerator (a/b) by A2,Th42; hence (a*^c)/(b*^c) = (numerator (a/b))/denominator (a/b) by A4,Th39 .= a/b by Th39; end; end; reserve i,j,k for natural Ordinal; theorem Th45: j <> {} & l <> {} implies (i/j = k/l iff i*^l = j*^k) proof assume that A1: j <> {} and A2: l <> {}; set x = i/j, y = k/l; set ny = numerator y, dy = denominator y; A3: ny = RED(k,l) by A2,Th42; set nx = numerator x, dx = denominator x; A4: dx = RED(j,i) by A1,Th42; A5: dy = RED(l,k) by A2,Th42; A6: nx = RED(i,j) by A1,Th42; hereby assume i/j = k/l; then i = ny*^(i hcf j) & l = dx*^(l hcf k) by A6,A5,Th21; hence i*^l = ny*^(i hcf j)*^dx*^(l hcf k) by ORDINAL3:50 .= ny*^((i hcf j)*^dx)*^(l hcf k) by ORDINAL3:50 .= ny*^j*^(l hcf k) by A4,Th21 .= j*^(ny*^(l hcf k)) by ORDINAL3:50 .= j*^k by A3,Th21; end; assume A7: i*^l = j*^k; then dx = RED(j*^l,j*^k) by A2,A4,Th28; then A8: dx = dy by A1,A5,Th28; nx = RED(j*^k,j*^l) by A2,A6,A7,Th28; then nx = ny by A1,A3,Th28; then x = ny/dy by A8,Th39; hence thesis by Th39; end; definition let x,y be Element of RAT+; func x+y -> Element of RAT+ equals ((numerator x)*^(denominator y)+^( numerator y)*^(denominator x)) / ((denominator x)*^(denominator y)); coherence; commutativity; func x*'y -> Element of RAT+ equals ((numerator x)*^(numerator y)) / (( denominator x)*^(denominator y)); coherence; commutativity; end; theorem Th46: j <> {} & l <> {} implies (i/j)+(k/l) = (i*^l+^j*^k)/(j*^l) proof assume that A1: j <> {} and A2: l <> {}; A3: denominator (k/l) = RED(l,k) & denominator (i/j) = RED(j,i) by A1,A2,Th42; numerator (k/l) = RED(k,l) & numerator (i/j) = RED(i,j) by A1,A2,Th42; hence (i/j)+(k/l) = (RED(i,j)*^RED(l,k)+^RED(j,i)*^RED(k,l))*^(i hcf j) /(RED (j,i)*^RED(l,k)*^(i hcf j)) by A1,A3,Th15,Th44 .= (RED(i,j)*^RED(l,k)+^RED(j,i)*^RED(k,l))*^(i hcf j) /(RED(l,k)*^(RED( j,i)*^(i hcf j))) by ORDINAL3:50 .= (RED(i,j)*^RED(l,k)+^RED(j,i)*^RED(k,l))*^(i hcf j)/(RED(l,k)*^j) by Th21 .= (RED(i,j)*^RED(l,k)*^(i hcf j)+^RED(j,i)*^RED(k,l)*^(i hcf j)) /(RED( l,k)*^j) by ORDINAL3:46 .= (RED(l,k)*^(RED(i,j)*^(i hcf j))+^RED(j,i)*^RED(k,l)*^(i hcf j)) /( RED(l,k)*^j) by ORDINAL3:50 .= (RED(l,k)*^i+^RED(j,i)*^RED(k,l)*^(i hcf j))/(RED(l,k)*^j) by Th21 .= (RED(l,k)*^i+^RED(k,l)*^(RED(j,i)*^(i hcf j)))/(RED(l,k)*^j) by ORDINAL3:50 .= (RED(l,k)*^i+^RED(k,l)*^j)/(RED(l,k)*^j) by Th21 .= ((RED(l,k)*^i+^RED(k,l)*^j)*^(k hcf l))/(RED(l,k)*^j*^(k hcf l)) by A2 ,Th15,Th44 .= ((RED(l,k)*^i+^RED(k,l)*^j)*^(k hcf l))/(j*^(RED(l,k)*^(k hcf l))) by ORDINAL3:50 .= ((RED(l,k)*^i+^RED(k,l)*^j)*^(k hcf l))/(j*^l) by Th21 .= (RED(l,k)*^i*^(k hcf l)+^RED(k,l)*^j*^(k hcf l))/(j*^l) by ORDINAL3:46 .= (i*^(RED(l,k)*^(k hcf l))+^RED(k,l)*^j*^(k hcf l))/(j*^l) by ORDINAL3:50 .= (i*^l+^RED(k,l)*^j*^(k hcf l))/(j*^l) by Th21 .= (i*^l+^j*^(RED(k,l)*^(k hcf l)))/(j*^l) by ORDINAL3:50 .= (i*^l+^j*^k)/(j*^l) by Th21; end; theorem Th47: k <> {} implies (i/k)+(j/k) = (i+^j)/k proof assume A1: k <> {}; hence (i/k)+(j/k) = (i*^k+^j*^k)/(k*^k) by Th46 .= ((i+^j)*^k)/(k*^k) by ORDINAL3:46 .= (i+^j)/k by A1,Th44; end; registration cluster empty for Element of RAT+; existence by Lm1,Lm5; end; definition redefine func {} -> Element of RAT+; coherence by Lm1,Lm5; redefine func one -> non empty ordinal Element of RAT+; coherence by Lm2,Lm5; end; theorem Th48: x*'{} = {} proof numerator {} = {} & (numerator x)*^{} = {} by Def8,Lm1,ORDINAL2:35; hence thesis by Th40; end; theorem Th49: (i/j)*'(k/l) = (i*^k)/(j*^l) proof per cases; suppose A1: j <> {} & l <> {}; then A2: denominator (k/l) = RED(l,k) & denominator (i/j) = RED(j,i) by Th42; numerator (k/l) = RED(k,l) & numerator (i/j) = RED(i,j) by A1,Th42; hence (i/j)*'(k/l) = (RED(i,j)*^RED(k,l)*^(i hcf j))/(RED(j,i)*^RED(l,k)*^( i hcf j)) by A1,A2,Th15,Th44 .= (RED(k,l)*^(RED(i,j)*^(i hcf j)))/(RED(j,i)*^RED(l,k)*^(i hcf j)) by ORDINAL3:50 .= (RED(k,l)*^i)/(RED(j,i)*^RED(l,k)*^(i hcf j)) by Th21 .= (RED(k,l)*^i)/(RED(l,k)*^(RED(j,i)*^(i hcf j))) by ORDINAL3:50 .= (RED(k,l)*^i)/(RED(l,k)*^j) by Th21 .= (RED(k,l)*^i*^(l hcf k))/(RED(l,k)*^j*^(l hcf k)) by A1,Th15,Th44 .= (i*^(RED(k,l)*^(l hcf k)))/(RED(l,k)*^j*^(l hcf k)) by ORDINAL3:50 .= (i*^k)/(RED(l,k)*^j*^(l hcf k)) by Th21 .= (i*^k)/(j*^(RED(l,k)*^(l hcf k))) by ORDINAL3:50 .= (i*^k)/(j*^l) by Th21; end; suppose A3: j = {} or l = {}; then i/j = {} or k/l = {} by Def10; then A4: (i/j)*'(k/l) = {} by Th48; j*^l = {} by A3,ORDINAL2:35; hence thesis by A4,Def10; end; end; theorem Th50: x+{} = x proof A1: (numerator x)*^1 = numerator x & {}*^(denominator x) = {} by ORDINAL2:35,39 ; A2: (denominator x)*^1 = denominator x & (numerator x)+^{} = numerator x by ORDINAL2:27,39; denominator {} = 1 & numerator {} = {} by Def8,Def9,Lm1; hence thesis by A1,A2,Th39; end; theorem Th51: (x+y)+z = x+(y+z) proof set nx = numerator x, ny = numerator y, nz = numerator z; set dx = denominator x, dy = denominator y, dz = denominator z; A1: dy <> {} by Th35; A2: dz <> {} by Th35; then A3: dy*^dz <> {} by A1,ORDINAL3:31; A4: dx <> {} by Th35; then A5: dx*^dy <> {} by A1,ORDINAL3:31; thus x+y+z = (nx*^dy+^dx*^ny)/(dx*^dy)+nz/dz by Th39 .= ((nx*^dy+^dx*^ny)*^dz+^(dx*^dy)*^nz)/(dx*^dy*^dz) by A2,A5,Th46 .= (nx*^dy*^dz+^dx*^ny*^dz+^dx*^dy*^nz)/(dx*^dy*^dz) by ORDINAL3:46 .= (nx*^(dy*^dz)+^dx*^ny*^dz+^dx*^dy*^nz)/(dx*^dy*^dz) by ORDINAL3:50 .= (nx*^(dy*^dz)+^dx*^(ny*^dz)+^dx*^dy*^nz)/(dx*^dy*^dz) by ORDINAL3:50 .= (nx*^(dy*^dz)+^dx*^(ny*^dz)+^dx*^(dy*^nz))/(dx*^dy*^dz) by ORDINAL3:50 .= (nx*^(dy*^dz)+^(dx*^(ny*^dz)+^dx*^(dy*^nz)))/(dx*^dy*^dz) by ORDINAL3:30 .= (nx*^(dy*^dz)+^dx*^(ny*^dz+^dy*^nz))/(dx*^dy*^dz) by ORDINAL3:46 .= (nx*^(dy*^dz)+^dx*^(ny*^dz+^dy*^nz))/(dx*^(dy*^dz)) by ORDINAL3:50 .= (ny*^dz+^dy*^nz)/(dy*^dz)+nx/dx by A4,A3,Th46 .= x+(y+z) by Th39; end; theorem Th52: (x*'y)*'z = x*'(y*'z) proof set nx = numerator x, ny = numerator y, nz = numerator z; set dx = denominator x, dy = denominator y, dz = denominator z; A1: x = nx/dx by Th39; z = nz/dz by Th39; hence (x*'y)*'z = (nx*^ny*^nz)/(dx*^dy*^dz) by Th49 .= (nx*^(ny*^nz))/(dx*^dy*^dz) by ORDINAL3:50 .= (nx*^(ny*^nz))/(dx*^(dy*^dz)) by ORDINAL3:50 .= x*'(y*'z) by A1,Th49; end; theorem Th53: x*'one = x proof set y = one; A1: (numerator x)*^1 = numerator x & (denominator x)*^1 = denominator x by ORDINAL2:39; numerator y = 1 & denominator y = 1 by Def8,Def9; hence thesis by A1,Th39; end; theorem Th54: x <> {} implies ex y st x*'y = 1 proof set nx = numerator x, dx = denominator x; A1: dx <> {} by Th35; assume x <> {}; then A2: nx <> {} by Th37; take y = dx/nx; nx, dx are_relative_prime by Th34; then denominator y = nx & numerator y = dx by A2,Th43; hence thesis by A2,A1,Th41,ORDINAL3:31; end; theorem Th55: x <> {} implies ex z st y = x*'z proof reconsider o = one as Element of RAT+; assume x <> {}; then consider z such that A1: x*'z = 1 by Th54; take z*'y; thus y = y*'o by Th53 .= x*'(z*'y) by A1,Th52; end; theorem Th56: x <> {} & x*'y = x*'z implies y = z proof assume x <> {}; then consider r being Element of RAT+ such that A1: x*'r = 1 by Th54; r*'(x*'y) = one*'y by A1,Th52; then A2: r*'(x*'y) = y by Th53; r*'(x*'z) = one*'z by A1,Th52; hence thesis by A2,Th53; end; theorem Th57: x*'(y+z) = x*'y+x*'z proof set nx = numerator x, ny = numerator y, nz = numerator z; set dx = denominator x, dy = denominator y, dz = denominator z; A1: dx <> {} by Th35; dz <> {} by Th35; then A2: dx*^dz <> {} by A1,ORDINAL3:31; dy <> {} by Th35; then A3: dx*^dy <> {} by A1,ORDINAL3:31; x = nx/dx by Th39; hence x*'(y+z) = (nx*^(ny*^dz+^dy*^nz))/(dx*^(dy*^dz)) by Th49 .= (nx*^(ny*^dz)+^nx*^(dy*^nz))/(dx*^(dy*^dz)) by ORDINAL3:46 .= (nx*^ny*^dz+^nx*^(dy*^nz))/(dx*^(dy*^dz)) by ORDINAL3:50 .= (nx*^ny*^dz+^dy*^(nx*^nz))/(dx*^(dy*^dz)) by ORDINAL3:50 .= (nx*^ny*^dz+^dy*^(nx*^nz))/(dy*^(dx*^dz)) by ORDINAL3:50 .= (dx*^((nx*^ny)*^dz+^(dy*^(nx*^nz))))/(dx*^(dy*^(dx*^dz))) by Th35,Th44 .= (dx*^((nx*^ny)*^dz)+^dx*^(dy*^(nx*^nz)))/(dx*^(dy*^(dx*^dz))) by ORDINAL3:46 .= (dx*^((nx*^ny)*^dz)+^(dx*^dy)*^(nx*^nz))/(dx*^(dy*^(dx*^dz))) by ORDINAL3:50 .= ((nx*^ny)*^(dx*^dz)+^(dx*^dy)*^(nx*^nz))/(dx*^(dy*^(dx*^dz))) by ORDINAL3:50 .= ((nx*^ny)*^(dx*^dz)+^(dx*^dy)*^(nx*^nz))/((dx*^dy)*^(dx*^dz)) by ORDINAL3:50 .= x*'y+x*'z by A2,A3,Th46; end; theorem Th58: for i,j being ordinal Element of RAT+ holds i+j = i+^j proof let i,j be ordinal Element of RAT+; set ni = numerator i, nj = numerator j; A1: j in omega by ORDINAL1:def 12; then A2: denominator j = 1 by Def9; A3: i in omega by ORDINAL1:def 12; then denominator i = 1 by Def9; hence i+j = (ni*^1+^1*^nj)/1 by A2,ORDINAL2:39 .= (ni+^1*^nj)/1 by ORDINAL2:39 .= (ni+^nj)/1 by ORDINAL2:39 .= ni+^nj by Th40 .= i+^nj by A3,Def8 .= i+^j by A1,Def8; end; theorem for i,j being ordinal Element of RAT+ holds i*'j = i*^j proof let i,j be ordinal Element of RAT+; set ni = numerator i, nj = numerator j; A1: j in omega by ORDINAL1:def 12; then A2: denominator j = 1 by Def9; A3: i in omega by ORDINAL1:def 12; then denominator i = 1 by Def9; hence i*'j = (ni*^nj)/1 by A2,ORDINAL2:39 .= ni*^nj by Th40 .= i*^nj by A3,Def8 .= i*^j by A1,Def8; end; theorem Th60: ex y st x = y+y proof set 02 = one+one; 02 = 1+^1 by Th58; then 02 <> {} by ORDINAL3:26; then consider z such that A1: 02*'z = 1 by Th54; take y = z*'x; thus x = one*'x by Th53 .= 02*'y by A1,Th52 .= one*'y+one*'y by Th57 .= y+one*'y by Th53 .= y+y by Th53; end; definition let x,y be Element of RAT+; pred x <=' y means : Def13: ex z being Element of RAT+ st y = x+z; connectedness proof let x,y be Element of RAT+; set nx = numerator x, ny = numerator y; set dx = denominator x, dy = denominator y; A1: dx <> {} & dy <> {} by Th35; A2: nx/dx = x & ny/dy = y by Th39; nx*^dy c= ny*^dx or ny*^dx c= nx*^dy; then A3: ny*^dx = nx*^dy+^(ny*^dx -^ nx*^dy) or nx*^dy = ny*^dx+^(nx*^dy -^ ny *^dx) by ORDINAL3:def 5; nx*^dy/(dx*^dy) = nx/dx & ny*^dx/(dx*^dy) = ny/dy by Th35,Th44; then x = y+((nx*^dy -^ ny*^dx)/(dx*^dy)) or y = x+((ny*^dx -^ nx*^dy)/(dx *^dy)) by A1,A2,A3,Th47,ORDINAL3:31; hence thesis; end; end; notation let x,y be Element of RAT+; antonym y < x for x <=' y; end; reserve r,s,t for Element of RAT+; theorem not ex y being set st [{},y] in RAT+ proof given y being set such that A1: [{},y] in RAT+; consider i,j being Element of omega such that A2: [{},y] = [i,j] and A3: i,j are_relative_prime and j <> {} and A4: j <> 1 by A1,Th29,Th32; i = {} by A2,XTUPLE_0:1; hence thesis by A3,A4,Th3; end; theorem Th62: s + t = r + t implies s = r proof assume A1: s + t = r + t; set r1 = numerator r, r2 = denominator r; set t1 = numerator t, t2 = denominator t; set s1 = numerator s, s2 = denominator s; A2: t2 <> {} by Th35; A3: s2 <> {} by Th35; then A4: s2*^t2 <> {} by A2,ORDINAL3:31; A5: r2 <> {} by Th35; then r2*^t2 <> {} by A2,ORDINAL3:31; then (s1*^t2+^s2*^t1)*^(r2*^t2) = (r1*^t2+^r2*^t1)*^(s2*^t2) by A1,A4,Th45 .= (r1*^t2+^r2*^t1)*^s2*^t2 by ORDINAL3:50; then (s1*^t2+^s2*^t1)*^r2*^t2 = (r1*^t2+^r2*^t1)*^s2*^t2 by ORDINAL3:50; then (s1*^t2+^s2*^t1)*^r2 = (r1*^t2+^r2*^t1)*^s2 by A2,ORDINAL3:33 .= r1*^t2*^s2+^r2*^t1*^s2 by ORDINAL3:46; then s1*^t2*^r2+^s2*^t1*^r2 = r1*^t2*^s2+^r2*^t1*^s2 by ORDINAL3:46 .= r1*^t2*^s2+^s2*^t1*^r2 by ORDINAL3:50; then s1*^t2*^r2 = r1*^t2*^s2 by ORDINAL3:21 .= r1*^s2*^t2 by ORDINAL3:50; then s1*^r2*^t2 = r1*^s2*^t2 by ORDINAL3:50; then s1*^r2 = r1*^s2 by A2,ORDINAL3:33; then s1/s2 = r1/r2 by A3,A5,Th45 .= r by Th39; hence thesis by Th39; end; theorem Th63: r+s = {} implies r = {} proof set nr = numerator r, dr = denominator r; set ns = numerator s, ds = denominator s; assume A1: r+s = {}; denominator {} = 1 & numerator {} = {} by Def8,Def9,Lm1; then A2: (nr*^ds+^ns*^dr)/(dr*^ds) = {}/1 by A1,Th39; A3: ds <> {} by Th35; dr <> {} by Th35; then dr*^ds <> {} by A3,ORDINAL3:31; then (nr*^ds+^ns*^dr)*^1 = (dr*^ds)*^{} by A2,Th45 .= {} by ORDINAL2:35; then nr*^ds+^ns*^dr = {} by ORDINAL3:31; then nr*^ds = {} by ORDINAL3:26; then nr = {} by A3,ORDINAL3:31; hence thesis by Th37; end; theorem Th64: {} <=' s proof take s; thus thesis by Th50; end; theorem s <=' {} implies s = {} proof assume ex r st {} = s+r; hence thesis by Th63; end; theorem Th66: r <=' s & s <=' r implies r = s proof given x such that A1: s = r+x; given y such that A2: r = s+y; r+{} = r by Th50 .= r+(x+y) by A1,A2,Th51; then x = {} by Th62,Th63; hence thesis by A1,Th50; end; theorem Th67: r <=' s & s <=' t implies r <=' t proof given x such that A1: s = r+x; given y such that A2: t = s+y; take x+y; thus thesis by A1,A2,Th51; end; theorem r < s iff r <=' s & r <> s by Th66; theorem r < s & s <=' t or r <=' s & s < t implies r < t by Th67; theorem r < s & s < t implies r < t by Th67; theorem Th71: x in omega & x+y in omega implies y in omega proof assume that A1: x in omega and A2: x+y in omega; A3: denominator (x+y) = 1 by A2,Def9; set nx = numerator x, dx = denominator x; A4: dx = 1 by A1,Def9; set ny = numerator y, dy = denominator y; A5: x+y = numerator (x+y)/denominator (x+y) & (nx*^dy+^ny*^dx)*^1 = nx*^dy+^ ny*^ dx by Th39,ORDINAL2:39; dy <> {} by Th35; then dx*^dy <> {} by A4,ORDINAL3:31; then nx*^dy+^ny*^dx = dx*^dy*^numerator (x+y) by A3,A5,Th45 .= dy*^numerator (x+y) by A4,ORDINAL2:39; then nx*^dy+^ny = dy*^numerator (x+y) by A4,ORDINAL2:39; then ny = (dy*^numerator (x+y))-^nx*^dy by ORDINAL3:52; then ny = dy*^((numerator (x+y))-^nx) by ORDINAL3:63; then A6: dy divides ny by Def3; A7: ny,dy are_relative_prime by Th34; for m being natural Ordinal st m divides dy & m divides ny holds m divides dy; then dy hcf ny = dy by A6,Def5; then A8: dy = 1 by A7,Th20; y = ny/dy by Th39; then y = ny by A8,Th40; hence thesis; end; theorem Th72: for i being ordinal Element of RAT+ st i < x & x < i+one holds not x in omega proof let i be ordinal Element of RAT+; assume that A1: i < x and A2: x < i+one and A3: x in omega; consider z such that A4: i+one = x+z by A2,Def13; i+one = i+^1 by Th58; then i+one in omega by Th31; then reconsider z9 = z as Element of omega by A3,A4,Th71; consider y such that A5: x = i+y by A1,Def13; i in omega by Th31; then reconsider y9 = y as Element of omega by A3,A5,Th71; i+one = i+(y+z) by A5,A4,Th51; then 1 = y+z by Th62 .= y9+^z9 by Th58; then y9 c= 1 by ORDINAL3:24; then y = {} or y = 1 by ORDINAL3:16; then i = x or i+one = x by A5,Th50; hence contradiction by A1,A2; end; theorem Th73: t <> {} implies ex r st r < t & not r in omega proof assume A1: t <> {}; A2: 1+^1 = succ 1 by ORDINAL2:31; per cases; suppose A3: one <=' t; consider r such that A4: one = r+r by Th60; take r; r <=' one & r <> 1 by A2,A4,Def13,Th58; then r < one by Th66; hence r < t by A3,Th67; A5: 1*^1 = 1 by ORDINAL2:39; assume r in omega; then A6: denominator r = 1 by Def9; then (numerator r)*^denominator r = numerator r by ORDINAL2:39; then A7: 1 = (numerator r)+^numerator r by A4,A6,A5,Th40; then numerator r c= 1 by ORDINAL3:24; then numerator r = {} or numerator r = 1 by ORDINAL3:16; hence contradiction by A2,A7,ORDINAL2:27; end; suppose A8: t < one; consider r such that A9: t = r+r by Th60; A10: {} <=' r by Th64; r <> {} by A1,A9,Th50; then A11: {} < r by A10,Th66; take r; A12: 1 = {}+one by Th50; A13: r <=' t by A9,Def13; now assume r = t; then t+{} = t+t by A9,Th50; hence contradiction by A1,Th62; end; hence r < t by A13,Th66; r < one by A8,A13,Th67; hence thesis by A11,A12,Th72; end; end; theorem {s: s < t} in RAT+ iff t = {} proof hereby assume A1: {s: s < t} in RAT+ & t <> {}; then consider r such that A2: r < t and A3: not r in omega by Th73; {} <=' t by Th64; then {} < t by A1,Th66; then A4: {} in {s: s < t}; r in {s: s < t} by A2; then {s: s < t} in omega implies r is Ordinal; then ex i,j being Element of omega st {s: s < t} = [i,j] & i,j are_relative_prime & j <> {} & j <> 1 by A1,A3,Th29,Th31; hence contradiction by A4,TARSKI:def 2; end; assume A5: t = {}; {s: s < t} c= {} proof let a be set; assume a in {s: s < t}; then ex s st a = s & s < t; hence thesis by A5,Th64; end; then {s: s < t} = {}; hence thesis; end; theorem for A being Subset of RAT+ st (ex t st t in A & t <> {}) & for r,s st r in A & s <=' r holds s in A ex r1,r2,r3 being Element of RAT+ st r1 in A & r2 in A & r3 in A & r1 <> r2 & r2 <> r3 & r3 <> r1 proof let A be Subset of RAT+; given t such that A1: t in A and A2: t <> {}; assume A3: for r,s st r in A & s <=' r holds s in A; consider x such that A4: t = x+x by Th60; take {}, x, t; x <=' t by A4,Def13; hence {} in A & x in A & t in A by A1,A3,Th64; thus {} <> x by A2,A4,Th50; hereby assume x = t; then t+{} = t+t by A4,Th50; hence contradiction by A2,Th62; end; thus thesis by A2; end; theorem Th76: s + t <=' r + t iff s <=' r proof thus s + t <=' r + t implies s <=' r proof given z such that A1: r+t = s+t+z; take z; r+t = s+z+t by A1,Th51; hence thesis by Th62; end; given z such that A2: r = s+z; take z; thus thesis by A2,Th51; end; theorem s <=' s + t proof take t; thus thesis; end; theorem r*'s = {} implies r = {} or s = {} proof set nr = numerator r, dr = denominator r; set ns = numerator s, ds = denominator s; assume A1: r*'s = {}; dr <> {} & ds <> {} by Th35; then A2: dr*^ds <> {} by ORDINAL3:31; denominator {} = 1 & numerator {} = {} by Def8,Def9,Lm1; then (nr*^ns)/(dr*^ds) = {}/1 by A1,Th39; then (nr*^ns)*^1 = (dr*^ds)*^{} by A2,Th45 .= {} by ORDINAL2:35; then nr*^ns = {} by ORDINAL3:31; then nr = {} or ns = {} by ORDINAL3:31; hence thesis by Th37; end; theorem Th79: r <=' s *' t implies ex t0 being Element of RAT+ st r = s *' t0 & t0 <=' t proof given x such that A1: s*'t = r+x; per cases; suppose A2: s = {}; take t; s*'t = {} by A2,Th48; hence thesis by A1,Th63; end; suppose A3: s <> {}; then consider t1 being Element of RAT+ such that A4: x = s*'t1 by Th55; consider t0 being Element of RAT+ such that A5: r = s*'t0 by A3,Th55; take t0; thus r = s*'t0 by A5; take t1; s*'t = s*'(t0+t1) by A1,A5,A4,Th57; hence thesis by A3,Th56; end; end; theorem t <> {} & s *' t <=' r *' t implies s <=' r proof assume that A1: t <> {} and A2: s *' t <=' r *' t; ex x st s*'t = t*'x & x <=' r by A2,Th79; hence thesis by A1,Th56; end; theorem for r1,r2,s1,s2 being Element of RAT+ st r1+r2 = s1+s2 holds r1 <=' s1 or r2 <=' s2 proof let r1,r2,s1,s2 be Element of RAT+ such that A1: r1+r2 = s1+s2; assume that A2: s1 < r1 and A3: s2 < r2; s1+s2 < r1+s2 by A2,Th76; hence thesis by A1,A3,Th76; end; theorem Th82: s <=' r implies s *' t <=' r *' t proof given x such that A1: r = s+x; take x*'t; thus thesis by A1,Th57; end; theorem for r1,r2,s1,s2 being Element of RAT+ st r1*'r2 = s1*'s2 holds r1 <=' s1 or r2 <=' s2 proof let r1,r2,s1,s2 be Element of RAT+ such that A1: r1*'r2 = s1*'s2; A2: {} <=' s1 by Th64; assume that A3: s1 < r1 and A4: s2 < r2; s2 <> r2 & s1*'s2 <=' r1*'s2 by A3,A4,Th82; then s1*'s2 < r1*'s2 by A1,A3,A2,Th56,Th66; hence thesis by A1,A4,Th82; end; theorem r = {} iff r + s = s proof s+{} = s by Th50; hence thesis by Th62; end; theorem for s1,t1,s2,t2 being Element of RAT+ st s1 + t1 = s2 + t2 & s1 <=' s2 holds t2 <=' t1 proof let s1,t1,s2,t2 be Element of RAT+ such that A1: s1 + t1 = s2 + t2; given x such that A2: s2 = s1+x; take x; s1+t1 = s1+(x+t2) by A1,A2,Th51; hence thesis by Th62; end; theorem Th86: r <=' s & s <=' r + t implies ex t0 being Element of RAT+ st s = r + t0 & t0 <=' t proof given t0 being Element of RAT+ such that A1: s = r+t0; assume s <=' r+t; then t0 <=' t by A1,Th76; hence thesis by A1; end; theorem r <=' s + t implies ex s0,t0 being Element of RAT+ st r = s0 + t0 & s0 <=' s & t0 <=' t proof assume A1: r <=' s + t; per cases; suppose s <=' r; then s <=' s & ex t0 being Element of RAT+ st r = s + t0 & t0 <=' t by A1,Th86; hence thesis; end; suppose A2: r <=' s; r = r+{} & {} <=' t by Th50,Th64; hence thesis by A2; end; end; theorem r < s & r < t implies ex t0 being Element of RAT+ st t0 <=' s & t0 <=' t & r < t0 proof s <=' t & s <=' s or t <=' s & t <=' t; hence thesis; end; theorem r <=' s & s <=' t & s <> t implies r <> t by Th66; theorem s < r + t & t <> {} implies ex r0,t0 being Element of RAT+ st s = r0 + t0 & r0 <=' r & t0 <=' t & t0 <> t proof assume that A1: s < r + t and A2: t <> {}; per cases; suppose r <=' s; then consider t0 being Element of RAT+ such that A3: s = r + t0 & t0 <=' t by A1,Th86; take r,t0; thus thesis by A1,A3; end; suppose A4: s <=' r; s = s+{} & {} <=' t by Th50,Th64; hence thesis by A2,A4; end; end; theorem for A being non empty Subset of RAT+ st A in RAT+ ex s st s in A & for r st r in A holds r <=' s proof let A be non empty Subset of RAT+; A1: now given i,j being Element of omega such that A2: A = [i,j] and A3: i,j are_relative_prime and j <> {} and A4: j <> 1; A5: now assume {i} in omega; then {} in {i} by ORDINAL3:8; then {} = i by TARSKI:def 1; hence contradiction by A3,A4,Th3; end; {i} in A by A2,TARSKI:def 2; then consider i1,j1 being Element of omega such that A6: {i} = [i1,j1] and A7: i1,j1 are_relative_prime and j1 <> {} and A8: j1 <> 1 by A5,Th29; {i1,j1} in {i} by A6,TARSKI:def 2; then A9: i = {i1,j1} by TARSKI:def 1; {i1} in {i} by A6,TARSKI:def 2; then i = {i1} by TARSKI:def 1; then j1 in {i1} by A9,TARSKI:def 2; then A10: j1 = i1 by TARSKI:def 1; j1 = j1*^1 by ORDINAL2:39; hence contradiction by A7,A8,A10,Def2; end; assume A in RAT+; then reconsider B = A as Element of omega by A1,Th29; A11: {} in B by ORDINAL3:8; now assume B is limit_ordinal; then omega c= B by A11,ORDINAL1:def 11; hence contradiction by ORDINAL1:5; end; then consider C such that A12: B = succ C by ORDINAL1:29; C in B by A12,ORDINAL1:6; then reconsider C as ordinal Element of RAT+; take C; thus C in A by A12,ORDINAL1:6; let r; assume A13: r in A; then r in B; then reconsider r as ordinal Element of RAT+; C-^r in omega by ORDINAL1:def 12; then reconsider x = C-^r as ordinal Element of RAT+ by Lm5; r c= C by A12,A13,ORDINAL1:22; then C = r+^x by ORDINAL3:def 5 .= r+x by Th58; hence thesis by Def13; end; theorem ex t st r + t = s or s + t = r proof r <=' s or s <=' r; hence thesis by Def13; end; theorem r < s implies ex t st r < t & t < s proof assume A1: r < s; then consider x such that A2: s = r+x by Def13; consider y such that A3: x = y+y by Th60; take t = r+y; A4: s = t+y by A2,A3,Th51; then A5: t <=' s by Def13; r <=' t by Def13; hence r < t by A1,A4,Th66; r <> s by A1; then s <> t by A4,Th62; hence thesis by A5,Th66; end; theorem ex s st r < s proof take s = r+one; s+{} = s by Th50; then A1: r <> s by Th62; r <=' s by Def13; hence thesis by A1,Th66; end; theorem t <> {} implies ex s st s in omega & r <=' s *' t proof set y=((numerator r)*^(((numerator t)*^denominator r)-^1))/denominator r; A1: denominator r <> {} by Th35; (denominator t)*^(numerator r) in omega by ORDINAL1:def 12; then reconsider s = (denominator t)*^(numerator r) as ordinal Element of RAT+ by Lm5; assume t <> {}; then numerator t <> {} by Th37; then {} in (numerator t)*^denominator r by A1,ORDINAL3:8,31; then one c= (numerator t)*^denominator r by Lm3,ORDINAL1:21; then (numerator t)*^denominator r = 1+^(((numerator t)*^denominator r)-^ 1) by ORDINAL3:def 5; then s*^((numerator t)*^denominator r) = (denominator t)*^ ((numerator r)*^(1 +^(((numerator t)*^denominator r)-^1))) by ORDINAL3:50 .= (denominator t)*^((numerator r)*^1+^ (numerator r)*^(((numerator t)*^ denominator r)-^1)) by ORDINAL3:46; then A2: s*^(numerator t)*^denominator r = (denominator t)*^((numerator r)*^1+^ (numerator r)*^(((numerator t)*^denominator r)-^1)) by ORDINAL3:50; take s; thus s in omega by ORDINAL1:def 12; take y; denominator t <> {} by Th35; then (s*^(numerator t))/denominator t = ((numerator r)*^1+^ (numerator r)*^( ((numerator t)*^denominator r)-^1))/denominator r by A1,A2,Th45 .= (((numerator r)*^1)/denominator r)+y by Th35,Th47 .= ((numerator r)/denominator r)+y by ORDINAL2:39 .= r+y by Th39; then r+y = (s*^(numerator t))/(1*^denominator t) by ORDINAL2:39 .= (s/1)*'((numerator t)/denominator t) by Th49 .= s*'((numerator t)/denominator t) by Th40; hence thesis by Th39; end; scheme DisNat { n0,n1,n2() -> Element of RAT+, P[set] }: ex s st s in omega & P[s] & not P[s + n1()] provided A1: n1() = 1 and A2: n0() = {} and A3: n2() in omega and A4: P[n0()] and A5: not P[n2()] proof defpred P1[Ordinal] means not P[$1] & $1 in omega; A6: ex A st P1[A] by A3,A5; consider A such that A7: P1[A] and A8: for B st P1[B] holds A c= B from ORDINAL1:sch 1(A6); A9: {} in A by A2,A4,A7,ORDINAL3:8; now assume A is limit_ordinal; then omega c= A by A9,ORDINAL1:def 11; then A in A by A7; hence contradiction; end; then consider B being Ordinal such that A10: A = succ B by ORDINAL1:29; A11: B in A by A10,ORDINAL1:8; then A12: B in omega by A7,ORDINAL1:10; then reconsider s = B as ordinal Element of RAT+ by Lm5; take s; thus s in omega & P[s] by A8,A11,A12,ORDINAL1:5; A = B+^1 by A10,ORDINAL2:31; hence thesis by A1,A7,Th58; end; begin reserve r,s,t,x9,y9,z9,p,q for Element of RAT+; definition func DEDEKIND_CUTS -> Subset-Family of RAT+ equals { A where A is Subset of RAT+: r in A implies (for s st s <=' r holds s in A) & ex s st s in A & r < s } \ { RAT+}; coherence proof set C = { A where A is Subset of RAT+: r in A implies (for s st s <=' r holds s in A) & ex s st s in A & r < s }; C c= bool RAT+ proof let e be set; assume e in C; then ex A being Subset of RAT+ st e = A & for r holds r in A implies (for s st s <=' r holds s in A) & ex s st s in A & r < s; hence thesis; end; hence thesis by XBOOLE_1:1; end; end; registration cluster DEDEKIND_CUTS -> non empty; coherence proof set X = { s: s < one }; A1: X c= RAT+ proof let e be set; assume e in X; then ex s st s = e & s < one; hence thesis; end; now assume one in X; then ex s st s = one & s < one; hence contradiction; end; then A2: X <> RAT+; {} <=' one by ARYTM_3:64; then {} < one by ARYTM_3:68; then {} in X; then reconsider X as non empty Subset of RAT+ by A1; r in X implies (for s st s <=' r holds s in X) & ex s st s in X & r < s proof assume r in X; then A3: ex s st s = r & s < one; thus for s st s <=' r holds s in X proof let s; assume s <=' r; then s < one by A3,ARYTM_3:67; hence thesis; end; consider s such that A4: r < s and A5: s < one by A3,ARYTM_3:93; take s; thus s in X by A5; thus thesis by A4; end; then X in { A where A is Subset of RAT+: r in A implies (for s st s <=' r holds s in A) & ex s st s in A & r < s }; hence thesis by A2,ZFMISC_1:56; end; end; definition func REAL+ equals RAT+ \/ DEDEKIND_CUTS \ {{ s: s < t}: t <> {}}; coherence; end; reserve x,y,z for Element of REAL+; set IR = { A where A is Subset of RAT+: r in A implies (for s st s <=' r holds s in A) & ex s st s in A & r < s}, RA = {{ s: s < t}: t <> {}}; Lm1: not ex x,y being set st [x,y] in IR proof given x,y being set such that A1: [x,y] in IR; consider A being Subset of RAT+ such that A2: [x,y] = A and A3: r in A implies (for s st s <=' r holds s in A) & ex s st s in A & r < s by A1; {x} in A & for r,s st r in A & s <=' r holds s in A by A2,A3,TARSKI:def 2; then consider r1,r2,r3 being Element of RAT+ such that A4: r1 in A and A5: r2 in A and A6: r3 in A & r1 <> r2 & r2 <> r3 & r3 <> r1 by ARYTM_3:75; A7: r2 = { x,y } or r2 = { x } by A2,A5,TARSKI:def 2; r1 = { x,y } or r1 = { x } by A2,A4,TARSKI:def 2; hence contradiction by A2,A6,A7,TARSKI:def 2; end; Lm2: RAT+ misses RA proof assume RAT+ meets RA; then consider e be set such that A1: e in RAT+ and A2: e in RA by XBOOLE_0:3; consider t such that A3: e = { s: s < t } and A4: t <> {} by A2; {} <=' t by ARYTM_3:64; then {} < t by A4,ARYTM_3:68; then A5: {} in e by A3; e c= RAT+ proof let u be set; assume u in e; then ex s st s = u & s < t by A3; hence thesis; end; then reconsider e as non empty Subset of RAT+ by A5; consider s such that A6: s in e and A7: for r st r in e holds r <=' s by A1,ARYTM_3:91; ex r st r = s & r < t by A3,A6; then consider r such that A8: s < r and A9: r < t by ARYTM_3:93; r in e by A3,A9; hence contradiction by A7,A8; end; theorem Th1: RAT+ c= REAL+ by Lm2,XBOOLE_1:7,86; RAT+ \/ DEDEKIND_CUTS c= RAT+ \/ IR by XBOOLE_1:9; then Lm3: REAL+ c= RAT+ \/ IR by XBOOLE_1:1; REAL+ = RAT+ \/ (IR \ { RAT+} \ RA) by Lm2,XBOOLE_1:87; then Lm4: DEDEKIND_CUTS \ RA c= REAL+ by XBOOLE_1:7; Lm5: omega c= ({[c,d] where c,d is Element of omega: c,d are_relative_prime & d <> {}} \ {[k,1] where k is Element of omega: not contradiction}) \/ omega by XBOOLE_1:7; theorem omega c= REAL+ by Lm5,Th1,XBOOLE_1:1; registration cluster REAL+ -> non empty; coherence by Th1; end; definition let x; func DEDEKIND_CUT x -> Element of DEDEKIND_CUTS means :Def3: ex r st x = r & it = { s : s < r } if x in RAT+ otherwise it = x; existence proof thus x in RAT+ implies ex IT being Element of DEDEKIND_CUTS, r st x = r & IT = { s : s < r } proof assume x in RAT+; then reconsider r = x as Element of RAT+; set IT = { s : s < r }; A1: IT c= RAT+ proof let e be set; assume e in IT; then ex s st s = e & s < r; hence thesis; end; not ex s st s= r & s < r; then not r in IT; then A2: IT <> RAT+; reconsider IT as Subset of RAT+ by A1; t in IT implies (for s st s <=' t holds s in IT) & ex s st s in IT & t < s proof assume t in IT; then A3: ex s st t = s & s < r; then consider s0 being Element of RAT+ such that A4: t < s0 and A5: s0 < r by ARYTM_3:93; thus for s st s <=' t holds s in IT proof let s; assume s <=' t; then s < r by A3,ARYTM_3:69; hence thesis; end; take s0; thus s0 in IT by A5; thus thesis by A4; end; then IT in IR; then reconsider IT as Element of DEDEKIND_CUTS by A2,ZFMISC_1:56; take IT,r; thus thesis; end; A6: x in REAL+; assume not x in RAT+; then x in DEDEKIND_CUTS by A6,XBOOLE_0:def 3; hence thesis; end; uniqueness; consistency; end; theorem not ex y being set st [{},y] in REAL+ proof given y being set such that A1: [{},y] in REAL+; per cases by A1,Lm3,XBOOLE_0:def 3; suppose [{},y] in RAT+; hence contradiction by ARYTM_3:61; end; suppose [{},y] in IR; hence contradiction by Lm1; end; end; Lm6: (for r holds r < s iff r < t) implies s = t proof assume A1: for r holds r < s iff r < t; s <=' s; then A2: t <=' s by A1; t <=' t; then s <=' t by A1; hence thesis by A2,ARYTM_3:66; end; definition let x be Element of DEDEKIND_CUTS; func GLUED x -> Element of REAL+ means :Def4: ex r st it = r & for s holds s in x iff s < r if ex r st for s holds s in x iff s < r otherwise it = x; uniqueness proof let IT1,IT2 be Element of REAL+; hereby assume ex r st for s holds s in x iff s < r; given r1 being Element of RAT+ such that A1: IT1 = r1 and A2: for s holds s in x iff s < r1; given r2 being Element of RAT+ such that A3: IT2 = r2 and A4: for s holds s in x iff s < r2; for s holds s < r1 iff s < r2 proof let s; s in x iff s < r1 by A2; hence thesis by A4; end; hence IT1 = IT2 by A1,A3,Lm6; end; thus thesis; end; existence proof hereby given r such that A5: for s holds s in x iff s < r; r in RAT+; then reconsider y = r as Element of REAL+ by Th1; take y,r; thus y = r; thus for s holds s in x iff s < r by A5; end; assume A6: not ex r st for s holds s in x iff s < r; now assume x in RA; then consider t such that A7: x = { s: s < t} and t <> {}; for s holds s in x iff s < t proof let s; hereby assume s in x; then ex r st s = r & r < t by A7; hence s < t; end; thus thesis by A7; end; hence contradiction by A6; end; then x in DEDEKIND_CUTS \ RA by XBOOLE_0:def 5; then reconsider y = x as Element of REAL+ by Lm4; take y; thus thesis; end; consistency; end; Lm7: for B being set st B in DEDEKIND_CUTS & r in B ex s st s in B & r < s proof let B be set; assume B in DEDEKIND_CUTS; then B in IR; then ex A being Subset of RAT+ st B = A & for t st t in A holds (for s st s <=' t holds s in A) & ex s st s in A & t < s; hence thesis; end; Lm8: {} in DEDEKIND_CUTS proof reconsider B = {} as Subset of RAT+ by XBOOLE_1:2; r in B implies (for s st s <=' r holds s in B) & ex s st s in B & r < s; then {} in { A where A is Subset of RAT+: r in A implies (for s st s <=' r holds s in A) & ex s st s in A & r < s }; hence thesis by ZFMISC_1:56; end; Lm9: DEDEKIND_CUTS /\ RAT+ = {{}} proof now let e be set; thus e in DEDEKIND_CUTS /\ RAT+ implies e = {} proof assume that A1: e in DEDEKIND_CUTS /\ RAT+ and A2: e <> {}; reconsider A = e as non empty Subset of RAT+ by A1,A2; A in RAT+ by A1,XBOOLE_0:def 4; then A3: ex s st s in A & for r st r in A holds r <=' s by ARYTM_3:91; e in DEDEKIND_CUTS by A1,XBOOLE_0:def 4; hence contradiction by A3,Lm7; end; thus e = {} implies e in DEDEKIND_CUTS /\ RAT+ by Lm8,XBOOLE_0:def 4; end; hence thesis by TARSKI:def 1; end; Lm10: DEDEKIND_CUT x = {} iff x = {} proof A1: not ex e being set st e in { s : s < {} } proof given e being set such that A2: e in { s : s < {} }; ex s st s = e & s < {} by A2; hence contradiction by ARYTM_3:64; end; thus DEDEKIND_CUT x = {} implies x = {} proof assume A3: DEDEKIND_CUT x = {}; per cases; suppose A4: x in RAT+; assume A5: x <> {}; consider r such that A6: x = r and A7: DEDEKIND_CUT x = { s : s < r } by A4,Def3; {} <=' r by ARYTM_3:64; then {} < r by A6,A5,ARYTM_3:68; then {} in DEDEKIND_CUT x by A7; hence contradiction by A3; end; suppose not x in RAT+; hence thesis by A3,Def3; end; end; assume x = {}; then ex r st {} = r & DEDEKIND_CUT x = { s : s < r } by Def3; hence thesis by A1,XBOOLE_0:def 1; end; Lm11: for A being Element of DEDEKIND_CUTS holds GLUED A = {} iff A = {} proof let A be Element of DEDEKIND_CUTS; thus GLUED A = {} implies A = {} proof assume A1: GLUED A = {}; per cases; suppose A2: ex r st for s holds s in A iff s < r; assume A <> {}; then consider r such that A3: r in A by SUBSET_1:4; ex r st GLUED A = r & for s holds s in A iff s < r by A2,Def4; then r < {} by A1,A3; hence contradiction by ARYTM_3:64; end; suppose not ex r st for s holds s in A iff s < r; hence thesis by A1,Def4; end; end; assume A4: A = {}; then for s holds s in A iff s < {} by ARYTM_3:64; then consider r such that A5: GLUED A = r and A6: for s holds s in A iff s < r by Def4; assume A7: GLUED A <> {}; {} <=' r by ARYTM_3:64; then {} < r by A5,A7,ARYTM_3:68; hence contradiction by A4,A6; end; Lm12: for A being Element of DEDEKIND_CUTS holds DEDEKIND_CUT GLUED A = A proof let A be Element of DEDEKIND_CUTS; per cases; suppose ex r st for s holds s in A iff s < r; then consider r such that A1: r = GLUED A and A2: for s holds s in A iff s < r by Def4; consider s such that A3: r = s and A4: DEDEKIND_CUT GLUED A = { t : t < s } by A1,Def3; thus DEDEKIND_CUT GLUED A c= A proof let e be set; assume e in DEDEKIND_CUT GLUED A; then ex t st t = e & t < s by A4; hence thesis by A2,A3; end; let e be set; assume A5: e in A; then reconsider s = e as Element of RAT+; s < r by A2,A5; hence thesis by A3,A4; end; suppose A6: A = {}; then GLUED A = {} by Lm11; hence thesis by A6,Lm10; end; suppose that A7: A <> {} and A8: not ex r st for s holds s in A iff s < r; A9: GLUED A = A by A8,Def4; now assume GLUED A in RAT+; then GLUED A in RAT+ /\ DEDEKIND_CUTS by A9,XBOOLE_0:def 4; then GLUED A = {} by Lm9,TARSKI:def 1; hence contradiction by A7,Lm11; end; hence thesis by A9,Def3; end; end; Lm13: for x,y be set st x in IR & y in IR holds x c= y or y c= x proof let x,y be set; assume x in IR; then A1: ex A9 being Subset of RAT+ st x = A9 & for r holds r in A9 implies (for s st s <=' r holds s in A9) & ex s st s in A9 & r < s; assume y in IR; then A2: ex B9 being Subset of RAT+ st y = B9 & for r holds r in B9 implies (for s st s <=' r holds s in B9) & ex s st s in B9 & r < s; assume not x c= y; then consider s being set such that A3: s in x and A4: not s in y by TARSKI:def 3; reconsider s as Element of RAT+ by A1,A3; let e be set; assume A5: e in y; then reconsider r = e as Element of RAT+ by A2; r <=' s by A2,A4,A5; hence thesis by A1,A3; end; definition let x,y be Element of REAL+; pred x <=' y means :Def5: ex x9,y9 st x = x9 & y = y9 & x9 <=' y9 if x in RAT+ & y in RAT+, x in y if x in RAT+ & not y in RAT+, not y in x if not x in RAT+ & y in RAT+ otherwise x c= y; consistency; connectedness proof let x,y; assume A1: not(x in RAT+ & y in RAT+ implies ex x9,y9 st x = x9 & y = y9 & x9 <=' y9) or not(x in RAT+ & not y in RAT+ implies x in y) or not(not x in RAT+ & y in RAT+ implies not y in x) or not(not(x in RAT+ & y in RAT+ or x in RAT+ & not y in RAT+ or not x in RAT+ & y in RAT+) implies x c= y); thus y in RAT+ & x in RAT+ implies ex y9,x9 st y = y9 & x = x9 & y9 <=' x9 proof assume y in RAT+ & x in RAT+; then reconsider y9 = y, x9 = x as Element of RAT+; y9 <=' x9 by A1; hence thesis; end; thus y in RAT+ & not x in RAT+ implies y in x by A1; thus not y in RAT+ & x in RAT+ implies not x in y by A1; assume A2: not(y in RAT+ & x in RAT+ or y in RAT+ & not x in RAT+ or not y in RAT+ & x in RAT+); y in REAL+; then A3: y in IR by A2,Lm3,XBOOLE_0:def 3; x in REAL+; then x in IR by A2,Lm3,XBOOLE_0:def 3; hence thesis by A1,A2,A3,Lm13; end; end; notation let x,y be Element of REAL+; antonym y < x for x <=' y; end; Lm14: x = x9 & y = y9 implies (x <=' y iff x9 <=' y9) proof assume A1: x = x9 & y = y9; hereby assume x <=' y; then ex x9,y9 st x = x9 & y = y9 & x9 <=' y9 by A1,Def5; hence x9 <=' y9 by A1; end; thus thesis by A1,Def5; end; Lm15: for B being set st B in DEDEKIND_CUTS & B <> {} ex r st r in B & r <> {} proof let B be set such that A1: B in DEDEKIND_CUTS and A2: B <> {}; B in IR by A1; then consider A being Subset of RAT+ such that A3: B = A and A4: r in A implies (for s st s <=' r holds s in A) & ex s st s in A & r < s; reconsider A as non empty Subset of RAT+ by A2,A3; consider r0 being Element of RAT+ such that A5: r0 in A by SUBSET_1:4; consider r1 being Element of RAT+ such that A6: r1 in A and A7: r0 < r1 by A4,A5; A8: r1 <> {} or r0 <> {} by A7; for r,s st r in A & s <=' r holds s in A by A4; then consider r1,r2,r3 being Element of RAT+ such that A9: r1 in A & r2 in A and r3 in A and A10: r1 <> r2 and r2 <> r3 and r3 <> r1 by A5,A6,A8,ARYTM_3:75; r1 <> {} or r2 <> {} by A10; hence thesis by A3,A9; end; Lm16: for B being set holds B in DEDEKIND_CUTS & r in B & s <=' r implies s in B proof let B be set such that A1: B in DEDEKIND_CUTS and A2: r in B & s <=' r; B in IR by A1; then ex A being Subset of RAT+ st B = A & for t st t in A holds (for s st s <=' t holds s in A) & ex s st s in A & t < s; hence thesis by A2; end; Lm17: for B being set st B in DEDEKIND_CUTS & B <> {} holds {} in B proof let B be set such that A1: B in DEDEKIND_CUTS and A2: B <> {}; reconsider B as non empty Subset of RAT+ by A1,A2; ex r st r in B by SUBSET_1:4; hence thesis by A1,Lm16,ARYTM_3:64; end; Lm18: for B being set st B in DEDEKIND_CUTS \ RA & not r in B & B <> {} ex s st not s in B & s < r proof let B be set such that A1: B in DEDEKIND_CUTS \ RA and A2: not r in B and A3: B <> {}; A4: B in DEDEKIND_CUTS by A1,XBOOLE_0:def 5; assume A5: for s st not s in B holds not s < r; A6: B = { s: s < r} proof thus B c= { s: s < r} proof let e be set; assume A7: e in B; reconsider B as Element of DEDEKIND_CUTS by A1,XBOOLE_0:def 5; B c= RAT+; then reconsider t = e as Element of RAT+ by A7; not r <=' t by A2,A4,A7,Lm16; hence thesis; end; let e be set; assume e in { s: s < r}; then ex s st s = e & s < r; hence thesis by A5; end; r <> {} by A2,A3,A4,Lm17; then B in RA by A6; hence contradiction by A1,XBOOLE_0:def 5; end; Lm19: DEDEKIND_CUT x in RA implies x in RAT+ proof assume A1: DEDEKIND_CUT x in RA; assume not x in RAT+; then DEDEKIND_CUT x = x by Def3; hence contradiction by A1,XBOOLE_0:def 5; end; Lm20: DEDEKIND_CUT x c= DEDEKIND_CUT y implies x <=' y proof assume A1: DEDEKIND_CUT x c= DEDEKIND_CUT y; per cases; suppose that A2: x = {} and A3: not y in RAT+; DEDEKIND_CUT y = y & y <> {} by A3,Def3; then x in y by A2,Lm17; hence thesis by A2,A3,Def5; end; suppose A4: y = {}; then DEDEKIND_CUT y = {} by Lm10; then DEDEKIND_CUT x = {} by A1; then x = {} by Lm10; hence thesis by A4; end; suppose that A5: x in RAT+ and A6: y in RAT+; consider ry being Element of RAT+ such that A7: y = ry and A8: DEDEKIND_CUT y = { s : s < ry } by A6,Def3; consider rx being Element of RAT+ such that A9: x = rx and A10: DEDEKIND_CUT x = { s : s < rx } by A5,Def3; assume y < x; then ry < rx by A9,A7,Lm14; then ry in DEDEKIND_CUT x by A10; then ry in DEDEKIND_CUT y by A1; then ex s st s = ry & s < ry by A8; hence contradiction; end; suppose that A11: x in RAT+ and A12: not y in RAT+ and A13: x <> {}; A14: DEDEKIND_CUT y = y by A12,Def3; consider rx being Element of RAT+ such that A15: x = rx and A16: DEDEKIND_CUT x = { s : s < rx } by A11,Def3; DEDEKIND_CUT x in RA by A13,A15,A16; then DEDEKIND_CUT x <> y by A12,A14,Lm19; then not DEDEKIND_CUT y c= DEDEKIND_CUT x by A1,A14,XBOOLE_0:def 10; then consider r0 being Element of RAT+ such that A17: r0 in y and A18: not r0 in DEDEKIND_CUT x by A14,SUBSET_1:2; rx <=' r0 by A16,A18; then x in y by A15,A14,A17,Lm16; hence thesis by A11,A12,Def5; end; suppose that A19: not x in RAT+ and A20: y in RAT+ and A21: y <> {}; consider ry being Element of RAT+ such that A22: y = ry and A23: DEDEKIND_CUT y = { s : s < ry } by A20,Def3; A24: DEDEKIND_CUT y in RA by A21,A22,A23; A25: DEDEKIND_CUT x = x by A19,Def3; then not x in RA by A19,Lm19; then not DEDEKIND_CUT y c= DEDEKIND_CUT x by A1,A24,A25,XBOOLE_0:def 10; then consider r0 being Element of RAT+ such that A26: r0 in DEDEKIND_CUT y and A27: not r0 in x by A25,SUBSET_1:2; ex s st s = r0 & s < ry by A23,A26; then not y in x by A22,A25,A27,Lm16; hence thesis by A19,A20,Def5; end; suppose that A28: ( not x in RAT+)& not y in RAT+; x = DEDEKIND_CUT x & y = DEDEKIND_CUT y by A28,Def3; hence thesis by A1,A28,Def5; end; end; Lm21: x <=' y & y <=' x implies x = y proof assume that A1: x <=' y and A2: y <=' x; per cases; suppose x in RAT+ & y in RAT+; then reconsider x9 = x, y9 = y as Element of RAT+; x9 <=' y9 & y9 <=' x9 by A1,A2,Lm14; hence thesis by ARYTM_3:66; end; suppose that A3: x in RAT+ & not y in RAT+; x in y by A1,A3,Def5; hence thesis by A2,A3,Def5; end; suppose that A4: ( not x in RAT+)& y in RAT+; y in x by A2,A4,Def5; hence thesis by A1,A4,Def5; end; suppose ( not x in RAT+)& not y in RAT+; then x c= y & y c= x by A1,A2,Def5; hence thesis by XBOOLE_0:def 10; end; end; Lm22: DEDEKIND_CUT x = DEDEKIND_CUT y implies x = y proof assume DEDEKIND_CUT x = DEDEKIND_CUT y; then x <=' y & y <=' x by Lm20; hence thesis by Lm21; end; Lm23: GLUED DEDEKIND_CUT x = x proof DEDEKIND_CUT GLUED DEDEKIND_CUT x = DEDEKIND_CUT x by Lm12; hence thesis by Lm22; end; definition let A,B be Element of DEDEKIND_CUTS; func A + B -> Element of DEDEKIND_CUTS equals :Def6: { r + s : r in A & s in B}; coherence proof { r + s : r in A & s in B} in DEDEKIND_CUTS proof set C = { s + t: s in A & t in B}; C c= RAT+ proof let e be set; assume e in C; then ex s,t st e = s + t & s in A & t in B; hence thesis; end; then reconsider C as Subset of RAT+; A <> RAT+ by ZFMISC_1:56; then consider a0 being Element of RAT+ such that A1: not a0 in A by SUBSET_1:28; r in C implies (for s st s <=' r holds s in C) & ex s st s in C & r < s proof assume r in C; then consider s0,t0 being Element of RAT+ such that A2: r = s0 + t0 and A3: s0 in A and A4: t0 in B; thus for s st s <=' r holds s in C proof let s; assume s <=' r; then consider s1,t1 being Element of RAT+ such that A5: s = s1 + t1 and A6: s1 <=' s0 & t1 <=' t0 by A2,ARYTM_3:87; s1 in A & t1 in B by A3,A4,A6,Lm16; hence thesis by A5; end; consider s1 being Element of RAT+ such that A7: s1 in A and A8: s0 < s1 by A3,Lm7; take t2 = s1 + t0; thus t2 in C by A4,A7; thus thesis by A2,A8,ARYTM_3:76; end; then A9: C in IR; B <> RAT+ by ZFMISC_1:56; then consider b0 being Element of RAT+ such that A10: not b0 in B by SUBSET_1:28; now assume a0 + b0 in C; then consider s,t such that A11: a0 + b0 = s + t and A12: s in A & t in B; a0 <=' s or b0 <=' t by A11,ARYTM_3:81; hence contradiction by A1,A10,A12,Lm16; end; then C <> RAT+; hence thesis by A9,ZFMISC_1:56; end; hence thesis; end; commutativity proof let IT,A,B be Element of DEDEKIND_CUTS; set C = { r + s : r in A & s in B}, D = { r + s : r in B & s in A}; A13: D c= C proof let e be set; assume e in D; then ex r,s st e = r + s & r in B & s in A; hence thesis; end; C c= D proof let e be set; assume e in C; then ex r,s st e = r + s & r in A & s in B; hence thesis; end; hence thesis by A13,XBOOLE_0:def 10; end; end; Lm24: for B being set st B in DEDEKIND_CUTS ex r st not r in B proof let B be set; assume A1: B in DEDEKIND_CUTS; then reconsider B as Subset of RAT+; B <> RAT+ by A1,ZFMISC_1:56; hence thesis by SUBSET_1:28; end; definition let A,B be Element of DEDEKIND_CUTS; func A *' B -> Element of DEDEKIND_CUTS equals { r *' s : r in A & s in B}; coherence proof per cases; suppose A1: A = {}; not ex e being set st e in { r *' s : r in A & s in B} proof given e being set such that A2: e in { r *' s : r in A & s in B}; ex r,s st e = r *' s & r in A & s in B by A2; hence contradiction by A1; end; hence thesis by Lm8,XBOOLE_0:def 1; end; suppose A3: A <> {}; set C = { r *' s : r in A & s in B}; C c= RAT+ proof let e be set; assume e in C; then ex r,s st r*'s = e & r in A & s in B; hence thesis; end; then reconsider C as Subset of RAT+; r in C implies (for s st s <=' r holds s in C) & ex s st s in C & r < s proof assume r in C; then consider r0,s0 being Element of RAT+ such that A4: r = r0 *' s0 and A5: r0 in A and A6: s0 in B; thus for s st s <=' r holds s in C proof let s; assume s <=' r; then consider t0 being Element of RAT+ such that A7: s = r0 *' t0 and A8: t0 <=' s0 by A4,ARYTM_3:79; t0 in B by A6,A8,Lm16; hence thesis by A5,A7; end; consider t0 being Element of RAT+ such that A9: t0 in B and A10: s0 < t0 by A6,Lm7; per cases; suppose A11: r0 = {}; consider r1 being Element of RAT+ such that A12: r1 in A and A13: r1 <> {} by A3,Lm15; take r1 *' t0; thus r1 *' t0 in C by A9,A12; t0 <> {} by A10,ARYTM_3:64; then A14: r1 *' t0 <> {} by A13,ARYTM_3:78; A15: r = {} by A4,A11,ARYTM_3:48; then r <=' r1 *' t0 by ARYTM_3:64; hence thesis by A15,A14,ARYTM_3:68; end; suppose A16: r0 <> {}; s0 <> t0 by A10; then A17: r <> r0 *' t0 by A4,A16,ARYTM_3:56; take r0 *' t0; thus r0 *' t0 in C by A5,A9; r <=' r0 *' t0 by A4,A10,ARYTM_3:82; hence thesis by A17,ARYTM_3:68; end; end; then A18: C in IR; consider r0 being Element of RAT+ such that A19: not r0 in A by Lm24; consider s0 being Element of RAT+ such that A20: not s0 in B by Lm24; now assume r0 *' s0 in C; then consider r1,s1 being Element of RAT+ such that A21: r0 *' s0 = r1 *' s1 and A22: r1 in A & s1 in B; r0 <=' r1 or s0 <=' s1 by A21,ARYTM_3:83; hence contradiction by A19,A20,A22,Lm16; end; then C <> RAT+; hence thesis by A18,ZFMISC_1:56; end; end; commutativity proof let D,A,B be Element of DEDEKIND_CUTS; assume A23: D = { r *' s : r in A & s in B}; now let e be set; e in D iff ex r,s st e = r*'s & r in A & s in B by A23; then e in D iff ex r,s st e = r*'s & r in B & s in A; hence e in D iff e in { r *' s : r in B & s in A}; end; hence thesis by TARSKI:1; end; end; definition let x,y be Element of REAL+; func x + y -> Element of REAL+ equals :Def8: x if y = {}, y if x = {} otherwise GLUED(DEDEKIND_CUT x + DEDEKIND_CUT y); coherence; consistency; commutativity; func x *' y -> Element of REAL+ equals GLUED(DEDEKIND_CUT x *' DEDEKIND_CUT y); coherence; commutativity; end; theorem Th4: x = {} implies x *' y = {} proof set A = DEDEKIND_CUT x, B = DEDEKIND_CUT y; assume A1: x = {}; not ex e being set st e in { r *' s : r in A & s in B} proof given e being set such that A2: e in { r *' s : r in A & s in B}; ex r,s st e = r *' s & r in A & s in B by A2; hence contradiction by A1,Lm10; end; then { r *' s : r in A & s in B} = {} by XBOOLE_0:def 1; hence thesis by Lm11; end; theorem Th5: x + y = {} implies x = {} proof assume A1: x + y = {}; per cases; suppose y = {}; hence thesis by A1,Def8; end; suppose A2: y <> {}; then DEDEKIND_CUT y <> {} by Lm10; then consider s0 being Element of RAT+ such that A3: s0 in DEDEKIND_CUT y by SUBSET_1:4; assume A4: x <> {}; then DEDEKIND_CUT x <> {} by Lm10; then consider r0 being Element of RAT+ such that A5: r0 in DEDEKIND_CUT x by SUBSET_1:4; A6: r0 + s0 in { r + s : r in DEDEKIND_CUT x & s in DEDEKIND_CUT y } by A5,A3; GLUED(DEDEKIND_CUT x + DEDEKIND_CUT y) = {} by A1,A2,A4,Def8; hence contradiction by A6,Lm11; end; end; Lm25: for A,B,C being Element of DEDEKIND_CUTS holds A + (B + C) c= A + B + C proof let A,B,C be Element of DEDEKIND_CUTS; let e be set; assume e in A + (B + C); then consider r0,s0 being Element of RAT+ such that A1: e = r0 + s0 & r0 in A and A2: s0 in B + C; consider r1,s1 being Element of RAT+ such that A3: s0 = r1 + s1 & r1 in B and A4: s1 in C by A2; e = r0 + r1 + s1 & r0 + r1 in A + B by A1,A3,ARYTM_3:51; hence thesis by A4; end; Lm26: for A,B,C being Element of DEDEKIND_CUTS holds A + (B + C) = A + B + C proof let A,B,C be Element of DEDEKIND_CUTS; A + (B + C) c= A + B + C & A + B + C c= A + (B + C) by Lm25; hence thesis by XBOOLE_0:def 10; end; Lm27: for A,B being Element of DEDEKIND_CUTS st A + B = {} holds A = {} or B = {} proof let A,B be Element of DEDEKIND_CUTS such that A1: A + B = {}; assume A <> {}; then consider r0 being Element of RAT+ such that A2: r0 in A by SUBSET_1:4; assume B <> {}; then consider s0 being Element of RAT+ such that A3: s0 in B by SUBSET_1:4; r0 + s0 in { r + s : r in A & s in B} by A2,A3; hence contradiction by A1; end; theorem Th6: x + (y + z) = (x + y) + z proof per cases; suppose A1: x = {}; hence x + (y + z) = y + z by Def8 .= (x + y) + z by A1,Def8; end; suppose A2: y = {}; hence x + (y + z) = x + z by Def8 .= (x + y) + z by A2,Def8; end; suppose A3: z = {}; hence x + (y + z) = x + y by Def8 .= (x + y) + z by A3,Def8; end; suppose that A4: x <> {} and A5: y <> {} and A6: z <> {}; A7: now assume GLUED(DEDEKIND_CUT y + DEDEKIND_CUT z) = {}; then DEDEKIND_CUT y + DEDEKIND_CUT z = {} by Lm11; then DEDEKIND_CUT y = {} or DEDEKIND_CUT z = {} by Lm27; hence contradiction by A5,A6,Lm10; end; A8: now assume GLUED(DEDEKIND_CUT x + DEDEKIND_CUT y) = {}; then DEDEKIND_CUT x + DEDEKIND_CUT y = {} by Lm11; then DEDEKIND_CUT x = {} or DEDEKIND_CUT y = {} by Lm27; hence contradiction by A4,A5,Lm10; end; thus x + (y + z) = x + GLUED(DEDEKIND_CUT y + DEDEKIND_CUT z) by A5,A6,Def8 .= GLUED(DEDEKIND_CUT x + DEDEKIND_CUT GLUED(DEDEKIND_CUT y + DEDEKIND_CUT z)) by A4,A7,Def8 .= GLUED(DEDEKIND_CUT x + (DEDEKIND_CUT y + DEDEKIND_CUT z)) by Lm12 .= GLUED((DEDEKIND_CUT x + DEDEKIND_CUT y) + DEDEKIND_CUT z) by Lm26 .= GLUED(DEDEKIND_CUT GLUED(DEDEKIND_CUT x + DEDEKIND_CUT y) + DEDEKIND_CUT z) by Lm12 .= GLUED(DEDEKIND_CUT x + DEDEKIND_CUT y) + z by A6,A8,Def8 .= (x + y) + z by A4,A5,Def8; end; end; theorem { A where A is Subset of RAT+: r in A implies (for s st s <=' r holds s in A) & ex s st s in A & r < s} is c=-linear proof set IR = { A where A is Subset of RAT+: r in A implies (for s st s <=' r holds s in A) & ex s st s in A & r < s}; let x,y be set; assume x in IR; then A1: ex A9 being Subset of RAT+ st x = A9 & for r holds r in A9 implies (for s st s <=' r holds s in A9) & ex s st s in A9 & r < s; assume y in IR; then A2: ex B9 being Subset of RAT+ st y = B9 & for r holds r in B9 implies (for s st s <=' r holds s in B9) & ex s st s in B9 & r < s; assume not x c= y; then consider s being set such that A3: s in x and A4: not s in y by TARSKI:def 3; reconsider s as Element of RAT+ by A1,A3; let e be set; assume A5: e in y; then reconsider r = e as Element of RAT+ by A2; r <=' s by A2,A4,A5; hence thesis by A1,A3; end; Lm28: for e being set st e in REAL+ holds e <> RAT+ proof let e be set; assume e in REAL+; then e in RAT+ or e in DEDEKIND_CUTS by XBOOLE_0:def 3; hence thesis by ZFMISC_1:56; end; Lm29: for B being set holds B in IR & r in B & s <=' r implies s in B proof let B be set such that A1: B in IR and A2: r in B & s <=' r; ex A being Subset of RAT+ st B = A & for t st t in A holds (for s st s <=' t holds s in A) & ex s st s in A & t < s by A1; hence thesis by A2; end; Lm30: y < x implies ex z st z in RAT+ & z < x & y < z proof assume A1: y < x; per cases; suppose x in RAT+ & y in RAT+; then reconsider x9 = x, y9 = y as Element of RAT+; y9 < x9 by A1,Lm14; then consider z9 being Element of RAT+ such that A2: y9 < z9 & z9 < x9 by ARYTM_3:93; z9 in RAT+; then reconsider z = z9 as Element of REAL+ by Th1; take z; thus thesis by A2,Lm14; end; suppose that A3: not x in RAT+ and A4: y in RAT+; reconsider y9 = y as Element of RAT+ by A4; x in REAL+; then x in IR by A3,Lm3,XBOOLE_0:def 3; then consider A being Subset of RAT+ such that A5: x = A and A6: r in A implies (for s st s <=' r holds s in A) & ex s st s in A & r < s; y9 in x by A1,A3,Def5; then consider s such that A7: s in A and A8: y9 < s by A5,A6; s in RAT+; then reconsider z = s as Element of REAL+ by Th1; take z; thus z in RAT+; thus z < x by A3,A5,A7,Def5; thus thesis by A8,Lm14; end; suppose that A9: x in RAT+ and A10: not y in RAT+; reconsider x9 = x as Element of RAT+ by A9; A11: not x9 in y by A1,A10,Def5; y in REAL+; then y in IR by A10,Lm3,XBOOLE_0:def 3; then consider B being Subset of RAT+ such that A12: y = B and A13: r in B implies (for s st s <=' r holds s in B) & ex s st s in B & r < s; B <> {} by A10,A12; then consider y1 being Element of RAT+ such that A14: y1 in B by SUBSET_1:4; {} <=' y1 by ARYTM_3:64; then A15: x9 <> {} by A12,A13,A11,A14; ex z9 st z9 < x9 & not z9 in y proof set C = { s: s < x9 }; assume A16: not ex z9 st z9 < x9 & not z9 in y; y = C proof thus y c= C proof let e be set; assume A17: e in y; then reconsider z9 = e as Element of RAT+ by A12; not x9 <=' z9 by A12,A13,A11,A17; hence thesis; end; let e be set; assume e in C; then ex s st e = s & s < x9; hence thesis by A16; end; then y in RA by A15; hence contradiction by XBOOLE_0:def 5; end; then consider z9 such that A18: z9 < x9 and A19: not z9 in y; z9 in RAT+; then reconsider z = z9 as Element of REAL+ by Th1; take z; thus z in RAT+; thus z < x by A18,Lm14; thus thesis by A10,A19,Def5; end; suppose that A20: not x in RAT+ and A21: not y in RAT+; y in REAL+; then y in IR by A21,Lm3,XBOOLE_0:def 3; then consider B being Subset of RAT+ such that A22: y = B and r in B implies (for s st s <=' r holds s in B) & ex s st s in B & r < s; x in REAL+; then x in IR by A20,Lm3,XBOOLE_0:def 3; then consider A being Subset of RAT+ such that A23: x = A and r in A implies (for s st s <=' r holds s in A) & ex s st s in A & r < s; not x c= y by A1,A20,A21,Def5; then consider z9 being Element of RAT+ such that A24: z9 in A and A25: not z9 in B by A23,A22,SUBSET_1:2; z9 in RAT+; then reconsider z = z9 as Element of REAL+ by Th1; take z; thus z in RAT+; thus z < x by A20,A23,A24,Def5; thus thesis by A21,A22,A25,Def5; end; end; Lm31: x <=' y & y <=' z implies x <=' z proof assume that A1: x <=' y and A2: y <=' z; per cases; suppose that A3: x in RAT+ and A4: y in RAT+ and A5: z in RAT+; reconsider z9 = z as Element of RAT+ by A5; reconsider y9 = y as Element of RAT+ by A4; reconsider x9 = x as Element of RAT+ by A3; x9 <=' y9 & y9 <=' z9 by A1,A2,Lm14; then x9 <=' z9 by ARYTM_3:67; hence thesis by Lm14; end; suppose that A6: x in RAT+ and A7: y in RAT+ and A8: not z in RAT+; reconsider y9 = y as Element of RAT+ by A7; reconsider x9 = x as Element of RAT+ by A6; A9: x9 <=' y9 by A1,Lm14; z in REAL+; then z in IR by A8,Lm3,XBOOLE_0:def 3; then consider C being Subset of RAT+ such that A10: z = C and A11: r in C implies (for s st s <=' r holds s in C) & ex s st s in C & r < s; y in C by A2,A7,A8,A10,Def5; then x9 in C by A11,A9; hence thesis by A8,A10,Def5; end; suppose that A12: x in RAT+ and A13: not y in RAT+ and A14: z in RAT+; reconsider z9 = z as Element of RAT+ by A14; reconsider x9 = x as Element of RAT+ by A12; y in REAL+; then y in IR by A13,Lm3,XBOOLE_0:def 3; then consider B being Subset of RAT+ such that A15: y = B and A16: r in B implies (for s st s <=' r holds s in B) & ex s st s in B & r < s; x9 in B & not z9 in B by A1,A2,A13,A15,Def5; then x9 <=' z9 by A16; hence thesis by Lm14; end; suppose that A17: x in RAT+ and A18: not y in RAT+ and A19: not z in RAT+; reconsider x9 = x as Element of RAT+ by A17; y in REAL+; then y in IR by A18,Lm3,XBOOLE_0:def 3; then consider B being Subset of RAT+ such that A20: y = B and r in B implies (for s st s <=' r holds s in B) & ex s st s in B & r < s; A21: x9 in B by A1,A18,A20,Def5; z in REAL+; then z in IR by A19,Lm3,XBOOLE_0:def 3; then consider C being Subset of RAT+ such that A22: z = C and r in C implies (for s st s <=' r holds s in C) & ex s st s in C & r < s; B c= C by A2,A18,A19,A20,A22,Def5; hence thesis by A19,A22,A21,Def5; end; suppose that A23: not x in RAT+ and A24: y in RAT+ and A25: z in RAT+; reconsider z9 = z as Element of RAT+ by A25; reconsider y9 = y as Element of RAT+ by A24; A26: y9 <=' z9 by A2,Lm14; x in REAL+; then x in IR by A23,Lm3,XBOOLE_0:def 3; then consider A being Subset of RAT+ such that A27: x = A and A28: r in A implies (for s st s <=' r holds s in A) & ex s st s in A & r < s; not y9 in A by A1,A23,A27,Def5; then not z9 in A by A28,A26; hence thesis by A23,A27,Def5; end; suppose that A29: not x in RAT+ and A30: y in RAT+ and A31: not z in RAT+; x in REAL+; then x in IR by A29,Lm3,XBOOLE_0:def 3; then consider A being Subset of RAT+ such that A32: x = A and A33: r in A implies (for s st s <=' r holds s in A) & ex s st s in A & r < s; A34: not y in A by A1,A29,A32,Def5; reconsider y9 = y as Element of RAT+ by A30; z in REAL+; then z in IR by A31,Lm3,XBOOLE_0:def 3; then consider C being Subset of RAT+ such that A35: z = C and A36: r in C implies (for s st s <=' r holds s in C) & ex s st s in C & r < s; A37: y in C by A2,A30,A31,A35,Def5; A c= C proof let e be set; assume A38: e in A; then reconsider x9 = e as Element of RAT+; x9 <=' y9 by A33,A34,A38; hence thesis by A36,A37; end; hence thesis by A29,A31,A32,A35,Def5; end; suppose that A39: not x in RAT+ and A40: not y in RAT+ and A41: z in RAT+; reconsider z9 = z as Element of RAT+ by A41; x in REAL+; then x in IR by A39,Lm3,XBOOLE_0:def 3; then consider A being Subset of RAT+ such that A42: x = A and r in A implies (for s st s <=' r holds s in A) & ex s st s in A & r < s; y in REAL+; then y in IR by A40,Lm3,XBOOLE_0:def 3; then consider B being Subset of RAT+ such that A43: y = B and r in B implies (for s st s <=' r holds s in B) & ex s st s in B & r < s; A c= B by A1,A39,A40,A42,A43,Def5; then not z9 in A by A2,A40,A43,Def5; hence thesis by A39,A42,Def5; end; suppose that A44: not x in RAT+ and A45: not y in RAT+ and A46: not z in RAT+; z in REAL+; then z in IR by A46,Lm3,XBOOLE_0:def 3; then consider C being Subset of RAT+ such that A47: z = C and r in C implies (for s st s <=' r holds s in C) & ex s st s in C & r < s; y in REAL+; then y in IR by A45,Lm3,XBOOLE_0:def 3; then consider B being Subset of RAT+ such that A48: y = B and r in B implies (for s st s <=' r holds s in B) & ex s st s in B & r < s; A49: B c= C by A2,A45,A46,A48,A47,Def5; x in REAL+; then x in IR by A44,Lm3,XBOOLE_0:def 3; then consider A being Subset of RAT+ such that A50: x = A and r in A implies (for s st s <=' r holds s in A) & ex s st s in A & r < s; A c= B by A1,A44,A45,A50,A48,Def5; then A c= C by A49,XBOOLE_1:1; hence thesis by A44,A46,A50,A47,Def5; end; end; theorem for X,Y being Subset of REAL+ st (ex x st x in Y) & for x,y st x in X & y in Y holds x <=' y ex z st for x,y st x in X & y in Y holds x <=' z & z <=' y proof let X,Y be Subset of REAL+; given x1 being Element of REAL+ such that A1: x1 in Y; set Z = {z9 : ex x,z st z = z9 & x in X & z < x}; assume A2: for x,y st x in X & y in Y holds x <=' y; per cases; suppose ex z9 st for x9 holds x9 in Z iff x9 < z9; then consider z9 such that A3: for x9 holds x9 in Z iff x9 < z9; z9 in RAT+; then reconsider z = z9 as Element of REAL+ by Th1; take z; let x,y such that A4: x in X and A5: y in Y; thus x <=' z proof assume z < x; then consider x0 being Element of REAL+ such that A6: x0 in RAT+ and A7: x0 < x & z < x0 by Lm30; reconsider x9 = x0 as Element of RAT+ by A6; z9 < x9 & x9 in Z by A4,A7,Lm14; hence contradiction by A3; end; assume y < z; then consider y0 being Element of REAL+ such that A8: y0 in RAT+ and A9: y0 < z and A10: y < y0 by Lm30; reconsider y9 = y0 as Element of RAT+ by A8; y9 < z9 by A9,Lm14; then y9 in Z by A3; then ex y99 being Element of RAT+ st y9 = y99 & ex x,z st z = y99 & x in X & z < x; then consider x1,y1 being Element of REAL+ such that A11: y1 = y9 and A12: x1 in X and A13: y1 < x1; y < x1 by A10,A11,A13,Lm31; hence contradiction by A2,A5,A12; end; suppose A14: not ex z9 st for x9 holds x9 in Z iff x9 < z9; A15: now assume Z in RA; then consider t such that A16: Z = { s: s < t } and t <> {}; for x9 holds x9 in Z iff x9 < t proof let x9; hereby assume x9 in Z; then ex s st s = x9 & s < t by A16; hence x9 < t; end; thus thesis by A16; end; hence contradiction by A14; end; A17: Z c= RAT+ proof let e be set; assume e in Z; then ex z9 st e = z9 & ex x,z st z = z9 & x in X & z < x; hence thesis; end; now assume Z = {}; then A18: for x9 st x9 in Z holds x9 < {}; for x9 st x9 < {} holds x9 in Z by ARYTM_3:64; hence contradiction by A14,A18; end; then reconsider Z as non empty Subset of RAT+ by A17; A19: now assume A20: Z = RAT+; per cases; suppose x1 in RAT+; then reconsider x9 = x1 as Element of RAT+; x9 in Z by A20; then ex z9 st x9 = z9 & ex x,z st z = z9 & x in X & z < x; hence contradiction by A1,A2; end; suppose A21: not x1 in RAT+; x1 in REAL+; then x1 in IR by A21,Lm3,XBOOLE_0:def 3; then consider A being Subset of RAT+ such that A22: x1 = A and r in A implies (for s st s <=' r holds s in A) & ex s st s in A & r < s; x1 <> RAT+ by Lm28; then consider x9 being Element of RAT+ such that A23: not x9 in A by A22,SUBSET_1:28; x9 in RAT+; then reconsider x2 = x9 as Element of REAL+ by Th1; x2 in Z by A20; then ex z9 st x9 = z9 & ex x,z st z = z9 & x in X & z < x; then consider x such that A24: x in X and A25: x2 < x; x1 < x2 by A21,A22,A23,Def5; then x1 < x by A25,Lm31; hence contradiction by A1,A2,A24; end; end; t in Z implies (for s st s <=' t holds s in Z) & ex s st s in Z & t < s proof t in RAT+; then reconsider y0 = t as Element of REAL+ by Th1; assume t in Z; then ex z9 st z9 = t & ex x,z st z = z9 & x in X & z < x; then consider x0 being Element of REAL+ such that A26: x0 in X and A27: y0 < x0; thus for s st s <=' t holds s in Z proof let s; s in RAT+; then reconsider z = s as Element of REAL+ by Th1; assume s <=' t; then z <=' y0 by Lm14; then z < x0 by A27,Lm31; hence thesis by A26; end; consider z such that A28: z in RAT+ and A29: z < x0 and A30: y0 < z by A27,Lm30; reconsider z9 = z as Element of RAT+ by A28; take z9; thus z9 in Z by A26,A29; thus thesis by A30,Lm14; end; then Z in IR; then A31: Z in IR \ {RAT+} by A19,ZFMISC_1:56; then Z in IR \ {RAT+} \ RA by A15,XBOOLE_0:def 5; then reconsider z = Z as Element of REAL+ by Lm4; take z; let x,y such that A32: x in X and A33: y in Y; A34: now assume z in RAT+; then z in {{}} by A31,Lm9,XBOOLE_0:def 4; hence contradiction by TARSKI:def 1; end; hereby assume z < x; then consider x0 being Element of REAL+ such that A35: x0 in RAT+ and A36: x0 < x and A37: z < x0 by Lm30; reconsider x9 = x0 as Element of RAT+ by A35; x9 in z by A32,A36; hence contradiction by A34,A37,Def5; end; assume y < z; then consider y0 being Element of REAL+ such that A38: y0 in RAT+ and A39: y0 < z and A40: y < y0 by Lm30; reconsider y9 = y0 as Element of RAT+ by A38; y9 in z by A34,A39,Def5; then ex z9 st y9 = z9 & ex x,z st z = z9 & x in X & z < x; then consider x0 being Element of REAL+ such that A41: x0 in X and A42: y0 < x0; y < x0 by A40,A42,Lm31; hence contradiction by A2,A33,A41; end; end; Lm32: one = 1; Lm33: {} = {}; Lm34: for A,B being Element of DEDEKIND_CUTS st A + B = A & A <> {} holds B = {} proof let A,B be Element of DEDEKIND_CUTS such that A1: A + B = A and A2: A <> {} and A3: B <> {}; A4: ex A0 being Element of RAT+ st A0 in A by A2,SUBSET_1:4; consider y9 such that A5: y9 in B and A6: y9 <> {} by A3,Lm15; defpred P[Element of RAT+] means $1 *' y9 in A; {} *' y9 = {} by ARYTM_3:48; then A7: P[{}] by A4,Lm16,ARYTM_3:64; A <> RAT+ by ZFMISC_1:56; then consider r such that A8: not r in A by SUBSET_1:28; consider n being Element of RAT+ such that A9: n in omega and A10: r <=' n *' y9 by A6,ARYTM_3:95; A11: not P[n] by A8,A10,Lm16; consider n0 being Element of RAT+ such that n0 in omega and A12: ( P[n0])& not P[n0 + one] from ARYTM_3:sch 1(Lm32,Lm33,A9,A7,A11); (n0 + one) *' y9 = n0 *' y9 + one *' y9 by ARYTM_3:57 .= n0 *' y9 + y9 by ARYTM_3:53; hence contradiction by A1,A5,A12; end; Lm35: x + y = x implies y = {} proof assume that A1: x + y = x and A2: y <> {}; A3: x <> {} by A1,A2,Th5; then A4: DEDEKIND_CUT x <> {} by Lm10; DEDEKIND_CUT x = DEDEKIND_CUT GLUED(DEDEKIND_CUT x + DEDEKIND_CUT y) by A1,A2 ,A3,Def8 .= DEDEKIND_CUT x + DEDEKIND_CUT y by Lm12; then DEDEKIND_CUT y = {} by A4,Lm34; hence contradiction by A2,Lm10; end; Lm36: for A,B being Element of DEDEKIND_CUTS st A <> {} & A c= B & A <> B ex C being Element of DEDEKIND_CUTS st A + C = B proof let A,B be Element of DEDEKIND_CUTS such that A1: A <> {} and A2: A c= B & A <> B; not B c= A by A2,XBOOLE_0:def 10; then consider s1 being Element of RAT+ such that A3: s1 in B & not s1 in A by SUBSET_1:2; set DIF = { t : ex r,s st not r in A & s in B & r + t = s}; A4: DIF c= RAT+ proof let e be set; assume e in DIF; then ex t st t = e & ex r,s st not r in A & s in B & r + t = s; hence thesis; end; s1 + {} = s1 by ARYTM_3:84; then A5: {} in DIF by A3; then reconsider DIF as non empty Subset of RAT+ by A4; t in DIF implies (for s st s <=' t holds s in DIF) & ex s st s in DIF & t < s proof assume t in DIF; then ex x9 st x9 = t & ex r,s st not r in A & s in B & r + x9 = s; then consider r0,s0 being Element of RAT+ such that A6: not r0 in A and A7: s0 in B and A8: r0 + t = s0; thus for s st s <=' t holds s in DIF proof let s; assume s <=' t; then consider p such that A9: s + p = t by ARYTM_3:def 13; A10: t <=' s0 by A8,ARYTM_3:77; p <=' t by A9,ARYTM_3:77; then p <=' s0 by A10,ARYTM_3:67; then consider q such that A11: p + q = s0 by ARYTM_3:def 13; r0 + s + p = q + p by A8,A9,A11,ARYTM_3:51; then A12: r0 + s = q by ARYTM_3:62; q in B by A7,A11,Lm16,ARYTM_3:77; hence thesis by A6,A12; end; consider s1 being Element of RAT+ such that A13: s1 in B and A14: s0 < s1 by A7,Lm7; consider q such that A15: s0 + q = s1 by A14,ARYTM_3:def 13; take t + q; A16: r0 + (t + q) = s1 by A8,A15,ARYTM_3:51; hence t + q in DIF by A6,A13; t <=' t + q & t <> t + q by A8,A14,A16,ARYTM_3:77; hence thesis by ARYTM_3:68; end; then A17: DIF in IR; B <> RAT+ by ZFMISC_1:56; then consider s2 being Element of RAT+ such that A18: not s2 in B by SUBSET_1:28; now assume s2 in DIF; then ex t st t = s2 & ex r,s st not r in A & s in B & r + t = s; hence contradiction by A18,Lm16,ARYTM_3:77; end; then DIF <> RAT+; then reconsider DIF as Element of DEDEKIND_CUTS by A17,ZFMISC_1:56; take DIF; set C = { r + t : r in A & t in DIF}; B = C proof thus B c= C proof let e be set; assume A19: e in B; then reconsider y9 = e as Element of RAT+; per cases; suppose A20: y9 in A; y9 = y9 + {} by ARYTM_3:84; hence thesis by A5,A20; end; suppose A21: not y9 in A; consider s0 being Element of RAT+ such that A22: s0 in B and A23: y9 < s0 by A19,Lm7; set Z = { r : ex x9 st not x9 in A & x9 + r = s0 }; A24: not s0 in A by A21,A23,Lm16; A25: s0 + {} = s0 by ARYTM_3:84; for r2 being Element of RAT+ st r2 < s0 ex s,t st s in A & t in Z & r2 = s + t proof let r2 be Element of RAT+; assume A26: r2 < s0; then A27: r2 <> s0; per cases; suppose A28: r2 in A; take r2,{}; thus r2 in A by A28; thus {} in Z by A24,A25; thus thesis by ARYTM_3:84; end; suppose A29: not r2 in A; consider q being Element of RAT+ such that A30: r2 + q = s0 by A26,ARYTM_3:def 13; defpred P[Element of RAT+] means $1 *' q in A; {} *' q = {} by ARYTM_3:48; then A31: P[{}] by A1,Lm17; q <> {} by A27,A30,ARYTM_3:84; then consider n being Element of RAT+ such that A32: n in omega and A33: s0 <=' n *' q by ARYTM_3:95; A34: not P[n] by A24,A33,Lm16; consider n0 being Element of RAT+ such that n0 in omega and A35: P[n0] and A36: not P[n0 + one] from ARYTM_3:sch 1(Lm32,Lm33,A32,A31,A34); n0 *' q <=' r2 by A29,A35,Lm16; then n0 *' q + q <=' s0 by A30,ARYTM_3:76; then consider t such that A37: n0 *' q + q + t = s0 by ARYTM_3:def 13; take n0 *' q, t; thus n0 *' q in A by A35; (n0 + one) *' q = n0 *' q + one *' q by ARYTM_3:57 .= n0 *' q + q by ARYTM_3:53; hence t in Z by A36,A37; n0 *' q + t + q = r2 + q by A30,A37,ARYTM_3:51; hence thesis by ARYTM_3:62; end; end; then consider s,t such that A38: s in A and A39: t in Z and A40: y9 = s + t by A23; ex r st t= r & ex x9 st not x9 in A & x9 + r = s0 by A39; then t in DIF by A22; hence thesis by A38,A40; end; end; let e be set; assume e in C; then consider s3,t3 being Element of RAT+ such that A41: e = s3 + t3 and A42: s3 in A and A43: t3 in DIF; ex t st t3 = t & ex r,s st not r in A & s in B & r + t = s by A43; then consider r4,s4 being Element of RAT+ such that A44: not r4 in A and A45: s4 in B and A46: r4 + t3 = s4; s3 <=' r4 by A42,A44,Lm16; then s3 + t3 <=' s4 by A46,ARYTM_3:76; hence thesis by A41,A45,Lm16; end; hence thesis; end; Lm37: x <=' y implies DEDEKIND_CUT x c= DEDEKIND_CUT y proof assume A1: x <=' y; assume A2: not DEDEKIND_CUT x c= DEDEKIND_CUT y; DEDEKIND_CUT x in IR & DEDEKIND_CUT y in IR by XBOOLE_0:def 5; then DEDEKIND_CUT y c= DEDEKIND_CUT x by A2,Lm13; then y <=' x by Lm20; hence thesis by A1,A2,Lm21; end; theorem Th9: x <=' y implies ex z st x + z = y proof assume A1: x <=' y; per cases; suppose A2: x = {}; take y; thus thesis by A2,Def8; end; suppose A3: x = y; {} in RAT+; then reconsider z = {} as Element of REAL+ by Th1; take z; thus thesis by A3,Def8; end; suppose that A4: x <> {} and A5: x <> y; A6: DEDEKIND_CUT x <> {} by A4,Lm10; DEDEKIND_CUT x <> DEDEKIND_CUT y by A5,Lm22; then consider C being Element of DEDEKIND_CUTS such that A7: DEDEKIND_CUT x + C = DEDEKIND_CUT y by A1,A6,Lm36,Lm37; take GLUED C; now assume A8: C = {}; not ex e being set st e in { r + s : r in C & s in DEDEKIND_CUT x} proof given e being set such that A9: e in { r + s : r in C & s in DEDEKIND_CUT x}; ex r,s st e = r + s & r in C & s in DEDEKIND_CUT x by A9; hence contradiction by A8; end; then { r + s : r in C & s in DEDEKIND_CUT x} = {} by XBOOLE_0:def 1; then DEDEKIND_CUT y = {} by A7,Def6; hence contradiction by A1,A6,Lm37,XBOOLE_1:3; end; then GLUED C <> {} by Lm11; hence x + GLUED C = GLUED(DEDEKIND_CUT x + DEDEKIND_CUT GLUED C) by A4,Def8 .= GLUED DEDEKIND_CUT y by A7,Lm12 .= y by Lm23; end; end; theorem Th10: ex z st x + z = y or y + z = x proof x <=' y or y <=' x; hence thesis by Th9; end; theorem Th11: x + y = x + z implies y = z proof assume A1: x + y = x + z; consider q being Element of REAL+ such that A2: z + q = y or y + q = z by Th10; per cases by A2; suppose A3: z + q = y; then x + y = x + y + q by A1,Th6; then q = {} by Lm35; hence thesis by A3,Def8; end; suppose A4: y + q = z; then x + z = x + z + q by A1,Th6; then q = {} by Lm35; hence thesis by A4,Def8; end; end; Lm38: for A,B,C being Element of DEDEKIND_CUTS holds A *' (B *' C) c= A *' B *' C proof let A,B,C be Element of DEDEKIND_CUTS; let e be set; assume e in A *' (B *' C); then consider r0,s0 being Element of RAT+ such that A1: e = r0 *' s0 & r0 in A and A2: s0 in B *' C; consider r1,s1 being Element of RAT+ such that A3: s0 = r1 *' s1 & r1 in B and A4: s1 in C by A2; e = r0 *' r1 *' s1 & r0 *' r1 in A *' B by A1,A3,ARYTM_3:52; hence thesis by A4; end; Lm39: for A,B,C being Element of DEDEKIND_CUTS holds A *' (B *' C) = A *' B *' C proof let A,B,C be Element of DEDEKIND_CUTS; A *' (B *' C) c= A *' B *' C & A *' B *' C c= A *' (B *' C) by Lm38; hence thesis by XBOOLE_0:def 10; end; theorem x *' (y *' z) = x *' y *' z proof thus x *' (y *' z) = GLUED(DEDEKIND_CUT x *' (DEDEKIND_CUT y *' DEDEKIND_CUT z)) by Lm12 .= GLUED((DEDEKIND_CUT x *' DEDEKIND_CUT y) *' DEDEKIND_CUT z) by Lm39 .= x *' y *' z by Lm12; end; Lm40: x *' y = {} implies x = {} or y = {} proof assume A1: x *' y = {}; DEDEKIND_CUT x = {} or DEDEKIND_CUT y = {} proof assume DEDEKIND_CUT x <> {}; then consider r0 being Element of RAT+ such that A2: r0 in DEDEKIND_CUT x by SUBSET_1:4; assume DEDEKIND_CUT y <> {}; then consider s0 being Element of RAT+ such that A3: s0 in DEDEKIND_CUT y by SUBSET_1:4; r0 *' s0 in { r *' s: r in DEDEKIND_CUT x & s in DEDEKIND_CUT y} by A2,A3; hence contradiction by A1,Lm11; end; hence thesis by Lm10; end; Lm41: for A,B,C being Element of DEDEKIND_CUTS holds A *' (B + C) = A *' B + A *' C proof let A,B,C be Element of DEDEKIND_CUTS; thus A *' (B + C) c= A *' B + A *' C proof let e be set; assume e in A *' (B + C); then consider r0, v0 being Element of RAT+ such that A1: e = r0 *' v0 and A2: r0 in A and A3: v0 in B + C; consider s0,t0 being Element of RAT+ such that A4: v0 = s0 + t0 and A5: s0 in B & t0 in C by A3; A6: e = r0 *' s0 + r0 *' t0 by A1,A4,ARYTM_3:57; r0 *' s0 in A *' B & r0 *' t0 in A *' C by A2,A5; hence thesis by A6; end; let e be set; assume e in A *' B + A *' C; then consider s1,t1 being Element of RAT+ such that A7: e = s1 + t1 and A8: s1 in A *' B and A9: t1 in A *' C; consider r0,s0 being Element of RAT+ such that A10: s1 = r0 *' s0 and A11: r0 in A and A12: s0 in B by A8; consider r09,t0 being Element of RAT+ such that A13: t1 = r09 *' t0 and A14: r09 in A and A15: t0 in C by A9; per cases; suppose r0 <=' r09; then r0 *' s0 <=' r09 *' s0 by ARYTM_3:82; then consider s09 being Element of RAT+ such that A16: r0 *' s0 = r09 *' s09 and A17: s09 <=' s0 by ARYTM_3:79; s09 in B by A12,A17,Lm16; then A18: s09 + t0 in B + C by A15; e = r09 *' (s09 + t0) by A7,A10,A13,A16,ARYTM_3:57; hence thesis by A14,A18; end; suppose r09 <=' r0; then r09 *' t0 <=' r0 *' t0 by ARYTM_3:82; then consider t09 being Element of RAT+ such that A19: r09 *' t0 = r0 *' t09 and A20: t09 <=' t0 by ARYTM_3:79; t09 in C by A15,A20,Lm16; then A21: s0 + t09 in B + C by A12; e = r0 *' (s0 + t09) by A7,A10,A13,A19,ARYTM_3:57; hence thesis by A11,A21; end; end; theorem x *' (y + z) = (x *' y) + (x *' z) proof per cases; suppose A1: x = {}; hence x *' (y + z) = x by Th4 .= x + x by A1,Def8 .= x + (x *' z) by A1,Th4 .= (x *' y) + (x *' z) by A1,Th4; end; suppose A2: y = {}; hence x *' (y + z) = x *' z by Def8 .= y + x *' z by A2,Def8 .= (x *' y) + (x *' z) by A2,Th4; end; suppose A3: z = {}; hence x *' (y + z) = x *' y by Def8 .= x *' y + z by A3,Def8 .= (x *' y) + (x *' z) by A3,Th4; end; suppose that A4: x <> {} and A5: y <> {} & z <> {}; A6: x *' y <> {} & x *' z <> {} by A4,A5,Lm40; thus x *' (y + z) = GLUED(DEDEKIND_CUT x *' DEDEKIND_CUT GLUED( DEDEKIND_CUT y + DEDEKIND_CUT z)) by A5,Def8 .= GLUED(DEDEKIND_CUT x *' (DEDEKIND_CUT y + DEDEKIND_CUT z)) by Lm12 .= GLUED((DEDEKIND_CUT x *' DEDEKIND_CUT y) + (DEDEKIND_CUT x *' DEDEKIND_CUT z)) by Lm41 .= GLUED((DEDEKIND_CUT x *' DEDEKIND_CUT y) + DEDEKIND_CUT (x*'z)) by Lm12 .= GLUED(DEDEKIND_CUT(x*'y) + DEDEKIND_CUT (x*'z)) by Lm12 .= (x *' y) + (x *' z) by A6,Def8; end; end; one in RAT+; then reconsider rone = one as Element of REAL+ by Th1; Lm42: for B being set st B in IR & B <> {} ex r st r in B & r <> {} proof let B be set such that A1: B in IR and A2: B <> {}; consider A being Subset of RAT+ such that A3: B = A and A4: r in A implies (for s st s <=' r holds s in A) & ex s st s in A & r < s by A1; consider r0 being Element of RAT+ such that A5: r0 in A by A2,A3,SUBSET_1:4; consider r1 being Element of RAT+ such that A6: r1 in A and A7: r0 < r1 by A4,A5; A8: r1 <> {} or r0 <> {} by A7; for r,s st r in A & s <=' r holds s in A by A4; then consider r1,r2,r3 being Element of RAT+ such that A9: r1 in A & r2 in A and r3 in A and A10: r1 <> r2 and r2 <> r3 and r3 <> r1 by A5,A6,A8,ARYTM_3:75; r1 <> {} or r2 <> {} by A10; hence thesis by A3,A9; end; Lm43: for A being Element of DEDEKIND_CUTS st A <> {} ex B being Element of DEDEKIND_CUTS st A *' B = DEDEKIND_CUT rone proof let A be Element of DEDEKIND_CUTS such that A1: A <> {}; per cases; suppose A in RA; then consider r0 being Element of RAT+ such that A2: A = { s: s < r0} and A3: r0 <> {}; consider s0 being Element of RAT+ such that A4: r0 *' s0 = one by A3,ARYTM_3:54; set B = { s : s < s0 }; B c= RAT+ proof let e be set; assume e in B; then ex s st s = e & s < s0; hence thesis; end; then reconsider B as Subset of RAT+; r in B implies (for s st s <=' r holds s in B) & ex s st s in B & r < s proof assume r in B; then A5: ex s st s = r & s < s0; then consider t such that A6: r < t and A7: t < s0 by ARYTM_3:93; thus for s st s <=' r holds s in B proof let s; assume s <=' r; then s < s0 by A5,ARYTM_3:69; hence thesis; end; take t; thus t in B by A7; thus thesis by A6; end; then A8: B in IR; not ex s st s = s0 & s < s0; then not s0 in B; then B <> RAT+; then reconsider B as Element of DEDEKIND_CUTS by A8,ZFMISC_1:56; A9: A *' B = { s : s < r0 *' s0 } proof thus A *' B c= { s : s < r0 *' s0 } proof let e be set; assume e in A *' B; then consider r1,s1 being Element of RAT+ such that A10: e = r1 *' s1 and A11: r1 in A and A12: s1 in B; ex s st s = r1 & s < r0 by A2,A11; then A13: r1 *' s1 <=' r0 *' s1 by ARYTM_3:82; A14: ex s st s = s1 & s < s0 by A12; then s1 <> s0; then A15: r0 *' s1 <> r0 *' s0 by A3,ARYTM_3:56; r0 *' s1 <=' r0 *' s0 by A14,ARYTM_3:82; then r0 *' s1 < r0 *' s0 by A15,ARYTM_3:68; then r1 *' s1 < r0 *' s0 by A13,ARYTM_3:69; hence thesis by A10; end; let e be set; assume e in { s : s < r0 *' s0 }; then consider s1 being Element of RAT+ such that A16: e = s1 and A17: s1 < r0 *' s0; consider t0 being Element of RAT+ such that A18: s1 = r0 *' t0 and A19: t0 <=' s0 by A17,ARYTM_3:79; t0 <> s0 by A17,A18; then t0 < s0 by A19,ARYTM_3:68; then t0 in B; then consider t1 being Element of RAT+ such that A20: t1 in B and A21: t0 < t1 by Lm7; r0 *' t0 <=' t1 *' r0 by A21,ARYTM_3:82; then consider r1 being Element of RAT+ such that A22: r0 *' t0 = t1 *' r1 and A23: r1 <=' r0 by ARYTM_3:79; t0 <> t1 by A21; then r1 <> r0 by A3,A22,ARYTM_3:56; then r1 < r0 by A23,ARYTM_3:68; then r1 in A by A2; hence thesis by A16,A18,A20,A22; end; ex t0 being Element of RAT+ st t0 = rone & DEDEKIND_CUT rone = { s : s < t0 } by Def3; hence thesis by A4,A9; end; suppose A24: not A in RA; set B = { y9 : ex x9 st not x9 in A & x9 *' y9 <=' one }; A25: B c= RAT+ proof let e be set; assume e in B; then ex y9 st y9 = e & ex x9 st not x9 in A & x9 *' y9 <=' one; hence thesis; end; A26: A <> RAT+ by ZFMISC_1:56; then consider x0 being Element of RAT+ such that A27: not x0 in A by SUBSET_1:28; x0 *' {} = {} by ARYTM_3:48; then x0 *' {} <=' one by ARYTM_3:64; then A28: {} in B by A27; then reconsider B as non empty Subset of RAT+ by A25; A29: A in IR by ZFMISC_1:56; ex x9 st x9 in A by A1,SUBSET_1:4; then A30: {} in A by A29,Lm29,ARYTM_3:64; r in B implies (for s st s <=' r holds s in B) & ex s st s in B & r < s proof assume r in B; then ex y9 st r = y9 & ex x9 st not x9 in A & x9 *' y9 <=' one; then consider x9 such that A31: not x9 in A and A32: x9 *' r <=' one; thus for s st s <=' r holds s in B proof let s; assume s <=' r; then x9 *' s <=' x9 *' r by ARYTM_3:82; then x9 *' s <=' one by A32,ARYTM_3:67; hence thesis by A31; end; A in DEDEKIND_CUTS \ RA by A24,XBOOLE_0:def 5; then consider x99 being Element of RAT+ such that A33: not x99 in A and A34: x99 < x9 by A1,A31,Lm18; consider s such that A35: one = x99 *' s by A30,A33,ARYTM_3:55; take s; x99 *' s <=' one by A35; hence s in B by A33; A36: s <> {} by A35,ARYTM_3:48; x99 *' r <=' x9 *' r by A34,ARYTM_3:82; then x99 *' r <=' x99 *' s by A32,A35,ARYTM_3:67; then A37: r <=' s by A30,A33,ARYTM_3:80; x99 <> x9 & x99 *' s <=' x9 *' s by A34,ARYTM_3:82; then r <> s by A32,A35,A36,ARYTM_3:56,66; hence thesis by A37,ARYTM_3:68; end; then A38: B in IR; consider x9 such that A39: x9 in A and A40: x9 <> {} by A1,A29,Lm42; consider y9 such that A41: x9 *' y9 = one by A40,ARYTM_3:55; now assume y9 in B; then A42: ex s st s = y9 & ex x9 st not x9 in A & x9 *' s <=' one; y9 <> {} by A41,ARYTM_3:48; hence contradiction by A29,A39,A41,A42,Lm29,ARYTM_3:80; end; then B <> RAT+; then not B in {RAT+} by TARSKI:def 1; then reconsider B as Element of DEDEKIND_CUTS by A38,XBOOLE_0:def 5; take B; for r holds r in A *' B iff r < one proof let r; hereby assume r in A *' B; then consider s,t such that A43: r = s *' t and A44: s in A and A45: t in B; ex z9 st z9 = t & ex x9 st not x9 in A & x9 *' z9 <=' one by A45; then consider x9 such that A46: not x9 in A and A47: x9 *' t <=' one; s <=' x9 by A29,A44,A46,Lm29; then A48: s *' t <=' x9 *' t by ARYTM_3:82; A49: now assume A50: r = one; then t <> {} by A43,ARYTM_3:48; hence contradiction by A43,A44,A46,A47,A48,A50,ARYTM_3:56,66; end; r <=' one by A43,A47,A48,ARYTM_3:67; hence r < one by A49,ARYTM_3:68; end; assume A51: r < one; then A52: r <> one; per cases; suppose r = {}; then r = {}*'{} by ARYTM_3:48; hence thesis by A28,A30; end; suppose r <> {}; then consider r9 being Element of RAT+ such that A53: r *' r9 = one by ARYTM_3:55; { r *' s : s in A } c= RAT+ proof let e be set; assume e in { r *' s : s in A }; then ex s st e = r *' s & s in A; hence thesis; end; then reconsider rA = { r *' s : s in A } as Subset of RAT+; consider dr being Element of RAT+ such that A54: r + dr = one by A51,ARYTM_3:def 13; consider xx being Element of RAT+ such that A55: not xx in A by A26,SUBSET_1:28; set rr = x9 *' dr; dr <> {} by A52,A54,ARYTM_3:50; then consider n0 being Element of RAT+ such that A56: n0 in omega and A57: xx <=' n0 *' rr by A40,ARYTM_3:78,95; defpred P[Element of RAT+] means $1 *' rr in A; A58: P[{}] by A30,ARYTM_3:48; A59: not P[n0] by A29,A55,A57,Lm29; consider n1 being Element of RAT+ such that n1 in omega and A60: P[n1] and A61: not P[n1 + one] from ARYTM_3:sch 1(Lm32,Lm33,A56,A58,A59); set s0 = n1 *' rr; A62: now assume n1 *' rr in rA; then consider s0 being Element of RAT+ such that A63: r *' s0 = n1 *' rr and A64: s0 in A; A65: (n1 + one) *' rr = n1 *' rr + one *' rr by ARYTM_3:57 .= r *' s0 + dr *' x9 by A63,ARYTM_3:53; s0 <=' x9 or x9 <=' s0; then consider s1 being Element of RAT+ such that A66: s1 = s0 & x9 <=' s1 or s1 = x9 & s0 <=' s1; dr *' x9 <=' dr *' s1 by A66,ARYTM_3:82; then A67: r *' s1 + dr *' x9 <=' r *' s1 + dr *' s1 by ARYTM_3:76; r *' s0 <=' r *' s1 by A66,ARYTM_3:82; then A68: r *' s0 + dr *' x9 <=' r *' s1 + dr *' x9 by ARYTM_3:76; r *' s1 + dr *' s1 = (r + dr) *' s1 by ARYTM_3:57 .= s1 by A54,ARYTM_3:53; hence contradiction by A29,A39,A61,A64,A65,A66,A68,A67,Lm29; end; A69: now assume A70: s0 *' r9 in A; r *' (s0 *' r9) = one *' s0 by A53,ARYTM_3:52 .= s0 by ARYTM_3:53; hence contradiction by A62,A70; end; r *' {} = {} by ARYTM_3:48; then {} in rA by A30; then consider s9 being Element of RAT+ such that A71: s0 *' s9 = one by A62,ARYTM_3:55; A72: s0 *' (r *' s9) = s0 *' s9 *' r by ARYTM_3:52 .= r by A71,ARYTM_3:53; s0 *' r9 *' (r *' s9) = s0 *' r9 *' r *' s9 by ARYTM_3:52 .= s0 *' one *' s9 by A53,ARYTM_3:52 .= one by A71,ARYTM_3:53; then s0 *' r9 *' (r *' s9) <=' one; then r *' s9 in B by A69; hence thesis by A60,A72; end; end; then DEDEKIND_CUT GLUED(A *' B) = DEDEKIND_CUT rone by Def4; hence thesis by Lm12; end; end; theorem x <> {} implies ex y st x *' y = one proof assume x <> {}; then DEDEKIND_CUT x <> {} by Lm10; then consider B being Element of DEDEKIND_CUTS such that A1: DEDEKIND_CUT x *' B = DEDEKIND_CUT rone by Lm43; take y = GLUED B; thus x *' y = GLUED DEDEKIND_CUT rone by A1,Lm12 .= one by Lm23; end; Lm44: for A,B being Element of DEDEKIND_CUTS st A = { r: r < one } holds A *' B = B proof let A,B be Element of DEDEKIND_CUTS such that A1: A = { r: r < one }; thus A *' B c= B proof let e be set; assume e in A *' B; then consider r,s such that A2: e = r *' s and A3: r in A and A4: s in B; ex t st t = r & t < one by A1,A3; then r *' s <=' one *' s by ARYTM_3:82; then r *' s <=' s by ARYTM_3:53; hence thesis by A2,A4,Lm16; end; let e be set; assume A5: e in B; then reconsider s = e as Element of RAT+; consider s1 being Element of RAT+ such that A6: s1 in B and A7: s < s1 by A5,Lm7; s1 <> {} by A7,ARYTM_3:64; then consider s2 being Element of RAT+ such that A8: s1 *' s2 = s by ARYTM_3:55; A9: now assume s2 = one; then s = s1 by A8,ARYTM_3:53; hence contradiction by A7; end; one *' s = s2 *' s1 by A8,ARYTM_3:53; then s2 <=' one by A7,ARYTM_3:83; then s2 < one by A9,ARYTM_3:68; then s2 in A by A1; hence thesis by A6,A8; end; theorem x = one implies x *' y = y proof assume A1: x = one; then ex r st x = r & DEDEKIND_CUT x = { s : s < r } by Def3; hence x *' y = GLUED DEDEKIND_CUT y by A1,Lm44 .= y by Lm23; end; Lm45: for i,j being Element of omega, x9,y9 st i = x9 & j = y9 holds i +^ j = x9 + y9 proof let i,j be Element of omega, x9,y9; set a = (denominator x9)*^(denominator y9), b = (numerator x9)*^(denominator y9)+^(numerator y9)*^(denominator x9); assume A1: i = x9; then A2: denominator x9 = one by ARYTM_3:def 9; assume A3: j = y9; then A4: denominator y9 = one by ARYTM_3:def 9; then A5: a = one by A2,ORDINAL2:39; then A6: RED(a,b) = one by ARYTM_3:24; b = (numerator x9)*^one+^(numerator y9) by A2,A4,ORDINAL2:39 .= (numerator x9)+^(numerator y9) by ORDINAL2:39 .= i+^(numerator y9) by A1,ARYTM_3:def 8 .= i +^ j by A3,ARYTM_3:def 8; hence i +^ j = RED(b,a) by A5,ARYTM_3:24 .= x9 + y9 by A6,ARYTM_3:def 10; end; Lm46: z9 < x9 + y9 & x9 <> {} & y9 <> {} implies ex r,s st z9 = r + s & r < x9 & s < y9 proof assume that A1: z9 < x9 + y9 and A2: x9 <> {} and A3: y9 <> {}; consider r0,t0 being Element of RAT+ such that A4: z9 = r0 + t0 and A5: r0 <=' x9 and A6: t0 <=' y9 & t0 <> y9 by A1,A3,ARYTM_3:90; per cases; suppose A7: r0 = {}; take {},t0; thus z9 = {} + t0 by A4,A7; {} <=' x9 by ARYTM_3:64; hence {} < x9 by A2,ARYTM_3:68; thus thesis by A6,ARYTM_3:68; end; suppose A8: r0 <> {}; t0 < y9 by A6,ARYTM_3:68; then consider t1 being Element of RAT+ such that A9: t0 < t1 and A10: t1 < y9 by ARYTM_3:93; z9 < t1 + r0 by A4,A9,ARYTM_3:76; then consider t2,r1 being Element of RAT+ such that A11: z9 = t2 + r1 and A12: t2 <=' t1 and A13: r1 <=' r0 & r1 <> r0 by A8,ARYTM_3:90; take r1,t2; thus z9 = r1 + t2 by A11; r1 < r0 by A13,ARYTM_3:68; hence r1 < x9 by A5,ARYTM_3:69; thus thesis by A10,A12,ARYTM_3:69; end; end; Lm47: x in RAT+ & y in RAT+ implies ex x9,y9 st x = x9 & y = y9 & x + y = x9 + y9 proof assume that A1: x in RAT+ and A2: y in RAT+; per cases; suppose A3: x = {}; reconsider y9 = y as Element of RAT+ by A2; take {},y9; thus x = {} by A3; thus y = y9; thus x + y = y by A3,Def8 .= {} + y9 by ARYTM_3:50; end; suppose A4: y = {}; reconsider x9 = x as Element of RAT+ by A1; take x9,{}; thus x = x9; thus y = {} by A4; thus x + y = x by A4,Def8 .= x9 + {} by ARYTM_3:50; end; suppose that A5: y <> {} & x <> {}; set A = DEDEKIND_CUT x, B = DEDEKIND_CUT y; consider x9 such that A6: x = x9 and A7: DEDEKIND_CUT x = { s : s < x9 } by A1,Def3; consider y9 such that A8: y = y9 and A9: DEDEKIND_CUT y = { s : s < y9 } by A2,Def3; A10: for s holds s in DEDEKIND_CUT x + DEDEKIND_CUT y iff s < x9 + y9 proof let s2 be Element of RAT+; thus s2 in A + B implies s2 < x9 + y9 proof assume s2 in A + B; then consider r1,s1 being Element of RAT+ such that A11: s2 = r1 + s1 and A12: r1 in A and A13: s1 in B; ex s st s = r1 & s < x9 by A7,A12; then A14: r1 + s1 <=' x9 + s1 by ARYTM_3:76; ex s st s = s1 & s < y9 by A9,A13; then x9 + s1 < x9 + y9 by ARYTM_3:76; hence thesis by A11,A14,ARYTM_3:69; end; assume s2 < x9 + y9; then consider t2,t0 being Element of RAT+ such that A15: s2 = t2 + t0 and A16: t2 < x9 & t0 < y9 by A5,A6,A8,Lm46; t0 in B & t2 in A by A7,A9,A16; hence thesis by A15; end; then consider r such that A17: GLUED(DEDEKIND_CUT x + DEDEKIND_CUT y) = r and A18: for s holds s in DEDEKIND_CUT x + DEDEKIND_CUT y iff s < r by Def4; A19: for s holds s < x9 + y9 iff s < r proof let s; s in DEDEKIND_CUT x + DEDEKIND_CUT y iff s < x9 + y9 by A10; hence thesis by A18; end; take x9,y9; thus x = x9 & y = y9 by A6,A8; thus x + y = GLUED(DEDEKIND_CUT x + DEDEKIND_CUT y) by A5,Def8 .= x9 + y9 by A17,A19,Lm6; end; end; theorem x in omega & y in omega implies y + x in omega proof assume A1: x in omega & y in omega; then reconsider x0 = x, y0 = y as Element of omega; consider x9,y9 being Element of RAT+ such that A2: x = x9 & y = y9 and A3: x + y = x9 + y9 by A1,Lm5,Lm47; x9 + y9 = x0 +^ y0 by A2,Lm45; hence thesis by A3,ORDINAL1:def 12; end; theorem for A being Subset of REAL+ st {} in A & for x,y st x in A & y = one holds x + y in A holds omega c= A proof let A be Subset of REAL+; defpred P[set] means $1 in A; assume that A1: P[{}] and A2: for x,y st x in A & y = one holds x + y in A; let e be set; assume e in omega; then reconsider a = e as natural Ordinal; A3: for a being natural Ordinal st P[a] holds P[succ a] proof one in RAT+; then reconsider rone = one as Element of REAL+ by Th1; let a be natural Ordinal; assume A4: a in A; reconsider i = a as Element of omega by ORDINAL1:def 12; A5: a in omega by ORDINAL1:def 12; then a in RAT+ by Lm5; then reconsider x = a as Element of REAL+ by Th1; consider x9, y9 being Element of RAT+ such that A6: x = x9 & rone = y9 and A7: x + rone = x9 + y9 by A5,Lm5,Lm47; x9 + y9 = i +^ 1 by A6,Lm45 .= succ i by ORDINAL2:31; hence thesis by A2,A4,A7; end; P[a] from ORDINAL2:sch 17(A1,A3); hence thesis; end; theorem for x st x in omega holds for y holds y in x iff y in omega & y <> x & y <=' x proof let x; assume A1: x in omega; then reconsider m = x as Element of omega; reconsider x9 = x as Element of RAT+ by A1,Lm5; let y; A2: x c= omega by A1,ORDINAL1:def 2; hereby assume A3: y in x; then reconsider n = y as Element of omega by A2; thus y in omega by A2,A3; then reconsider y9 = y as Element of RAT+ by Lm5; thus y <> x by A3; n c= m by A3,ORDINAL1:def 2; then consider C being Ordinal such that A4: m = n +^ C by ORDINAL3:27; C c= m by A4,ORDINAL3:24; then reconsider C as Element of omega by ORDINAL1:12; C in omega; then reconsider z9 = C as Element of RAT+ by Lm5; x9 = y9 + z9 by A4,Lm45; then y9 <=' x9 by ARYTM_3:def 13; hence y <=' x by Lm14; end; assume A5: y in omega; then reconsider y9 = y as Element of RAT+ by Lm5; reconsider n = y as Element of omega by A5; assume A6: y <> x; assume y <=' x; then y9 <=' x9 by Lm14; then consider z9 such that A7: y9 + z9 = x9 by ARYTM_3:def 13; reconsider k = z9 as Element of omega by A1,A5,A7,ARYTM_3:71; n +^ k = m by A7,Lm45; then n c= m by ORDINAL3:24; then n c< m by A6,XBOOLE_0:def 8; hence thesis by ORDINAL1:11; end; theorem x = y + z implies z <=' x proof {} in RAT+; then reconsider zz = {} as Element of REAL+ by Th1; assume A1: x = y + z; assume A2: not z <=' x; then consider y0 being Element of REAL+ such that A3: x + y0 = z by Th9; x = x + (y + y0) by A1,A3,Th6; then x + zz = x + (y + y0) by Def8; then y0 = {} by Th5,Th11; then z = x by A3,Def8; hence thesis by A2; end; theorem {} in REAL+ & one in REAL+ proof {} in RAT+ & one in RAT+; hence thesis by Th1; end; theorem x in RAT+ & y in RAT+ implies ex x9,y9 st x = x9 & y = y9 & x *' y = x9 *' y9 proof assume that A1: x in RAT+ and A2: y in RAT+; per cases; suppose A3: x = {}; reconsider y9 = y as Element of RAT+ by A2; take {},y9; thus x = {} by A3; thus y = y9; thus x *' y = {} by A3,Th4 .= {} *' y9 by ARYTM_3:48; end; suppose A4: y = {}; reconsider x9 = x as Element of RAT+ by A1; take x9,{}; thus x = x9; thus y = {} by A4; thus x *' y = {} by A4,Th4 .= x9 *' {} by ARYTM_3:48; end; suppose that y <> {} and A5: x <> {}; consider y9 such that A6: y = y9 and A7: DEDEKIND_CUT y = { s : s < y9 } by A2,Def3; set A = DEDEKIND_CUT x, B = DEDEKIND_CUT y; consider x9 such that A8: x = x9 and A9: DEDEKIND_CUT x = { s : s < x9 } by A1,Def3; A10: for s holds s in DEDEKIND_CUT x *' DEDEKIND_CUT y iff s < x9 *' y9 proof let s2 be Element of RAT+; thus s2 in A *' B implies s2 < x9 *' y9 proof assume s2 in A *' B; then consider r1,s1 being Element of RAT+ such that A11: s2 = r1 *' s1 and A12: r1 in A and A13: s1 in B; ex s st s = r1 & s < x9 by A9,A12; then A14: r1 *' s1 <=' x9 *' s1 by ARYTM_3:82; A15: ex s st s = s1 & s < y9 by A7,A13; then s1 <> y9; then A16: x9 *' s1 <> x9 *' y9 by A5,A8,ARYTM_3:56; x9 *' s1 <=' x9 *' y9 by A15,ARYTM_3:82; then x9 *' s1 < x9 *' y9 by A16,ARYTM_3:68; hence thesis by A11,A14,ARYTM_3:69; end; assume A17: s2 < x9 *' y9; then consider t0 being Element of RAT+ such that A18: s2 = x9 *' t0 and A19: t0 <=' y9 by ARYTM_3:79; t0 <> y9 by A17,A18; then t0 < y9 by A19,ARYTM_3:68; then consider t1 being Element of RAT+ such that A20: t0 < t1 and A21: t1 < y9 by ARYTM_3:93; s2 <=' t1 *' x9 by A18,A20,ARYTM_3:82; then consider t2 being Element of RAT+ such that A22: s2 = t1 *' t2 and A23: t2 <=' x9 by ARYTM_3:79; now assume t2 = x9; then t0 = t1 by A5,A8,A18,A22,ARYTM_3:56; hence contradiction by A20; end; then t2 < x9 by A23,ARYTM_3:68; then A24: t2 in A by A9; t1 in B by A7,A21; hence thesis by A22,A24; end; then consider r such that A25: GLUED(DEDEKIND_CUT x *' DEDEKIND_CUT y) = r and A26: for s holds s in DEDEKIND_CUT x *' DEDEKIND_CUT y iff s < r by Def4; take x9,y9; thus x = x9 & y = y9 by A8,A6; for s holds s < x9 *' y9 iff s < r proof let s; s in DEDEKIND_CUT x *' DEDEKIND_CUT y iff s < x9 *' y9 by A10; hence thesis by A26; end; hence thesis by A25,Lm6; end; end; begin reserve x,y,z for Element of REAL+; theorem Th1: x + y = y implies x = {} proof reconsider o = {} as Element of REAL+ by ARYTM_2:20; assume x + y = y; then x + y = y + o by ARYTM_2:def 8; hence thesis by ARYTM_2:11; end; reconsider u = one as Element of REAL+ by ARYTM_2:20; Lm1: x *' y = x *' z & x <> {} implies y = z proof assume A1: x *' y = x *' z; assume x <> {}; then consider x1 being Element of REAL+ such that A2: x *' x1 = one by ARYTM_2:14; thus y = x *' x1 *' y by A2,ARYTM_2:15 .= x1 *' (x *' z) by A1,ARYTM_2:12 .= x *' x1 *' z by ARYTM_2:12 .= z by A2,ARYTM_2:15; end; theorem x *' y = {} implies x = {} or y = {} proof assume A1: x *' y = {}; assume x <> {}; then consider x1 being Element of REAL+ such that A2: x *' x1 = one by ARYTM_2:14; thus y = x *' x1 *' y by A2,ARYTM_2:15 .= x *' y *' x1 by ARYTM_2:12 .= {} by A1,ARYTM_2:4; end; theorem Th3: x <=' y & y <=' z implies x <=' z proof assume x <=' y; then consider z1 being Element of REAL+ such that A1: x + z1 = y by ARYTM_2:9; assume y <=' z; then consider z2 being Element of REAL+ such that A2: y + z2 = z by ARYTM_2:9; z = x + (z1 + z2) by A1,A2,ARYTM_2:6; hence thesis by ARYTM_2:19; end; theorem Th4: x <=' y & y <=' x implies x = y proof assume x <=' y; then consider z1 being Element of REAL+ such that A1: x + z1 = y by ARYTM_2:9; assume y <=' x; then consider z2 being Element of REAL+ such that A2: y + z2 = x by ARYTM_2:9; x = x + (z1 + z2) by A1,A2,ARYTM_2:6; then z1 = {} by Th1,ARYTM_2:5; hence thesis by A1,ARYTM_2:def 8; end; theorem Th5: x <=' y & y = {} implies x = {} proof assume x <=' y; then ex z being Element of REAL+ st x + z = y by ARYTM_2:9; hence thesis by ARYTM_2:5; end; theorem Th6: x = {} implies x <=' y proof assume x = {}; then x + y = y by ARYTM_2:def 8; hence thesis by ARYTM_2:19; end; theorem Th7: x <=' y iff x + z <=' y + z proof thus x <=' y implies x + z <=' y + z proof assume x <=' y; then consider z0 being Element of REAL+ such that A1: x + z0 = y by ARYTM_2:9; x + z + z0 = y + z by A1,ARYTM_2:6; hence thesis by ARYTM_2:19; end; assume x + z <=' y + z; then consider z0 being Element of REAL+ such that A2: x + z + z0 = y + z by ARYTM_2:9; y + z = x + z0 + z by A2,ARYTM_2:6; hence thesis by ARYTM_2:11,19; end; theorem Th8: x <=' y implies x *' z <=' y *' z proof assume x <=' y; then consider z0 being Element of REAL+ such that A1: x + z0 = y by ARYTM_2:9; y *' z = x *' z + z0 *' z by A1,ARYTM_2:13; hence thesis by ARYTM_2:19; end; Lm2: x *' y <=' x *' z & x <> {} implies y <=' z proof assume x *' y <=' x *' z; then consider z0 being Element of REAL+ such that A1: x *' y + z0 = x *' z by ARYTM_2:9; assume A2: x <> {}; then consider x1 being Element of REAL+ such that A3: x *' x1 = one by ARYTM_2:14; x *' z = x *' y + u *' z0 by A1,ARYTM_2:15 .= x *' y + x *' (x1 *' z0) by A3,ARYTM_2:12 .= x *' (y + x1 *' z0) by ARYTM_2:13; hence thesis by A2,Lm1,ARYTM_2:19; end; definition let x,y be Element of REAL+; func x -' y -> Element of REAL+ means :Def1: it + y = x if y <=' x otherwise it = {}; existence proof hereby assume y <=' x; then ex IT being Element of REAL+ st y + IT = x by ARYTM_2:9; hence ex IT being Element of REAL+ st IT + y = x; end; thus thesis by ARYTM_2:20; end; correctness by ARYTM_2:11; end; Lm3: x -' x = {} proof x <=' x; then x -' x + x = x by Def1; hence thesis by Th1; end; theorem Th9: x <=' y or x -' y <> {} proof assume A1: not x <=' y; assume A2: x -' y = {}; x -' y + y = x by A1,Def1; then x = y by A2,ARYTM_2:def 8; hence contradiction by A1; end; theorem x <=' y & y -' x = {} implies x = y proof assume A1: x <=' y; assume y -' x = {}; then y <=' x by Th9; hence thesis by A1,Th4; end; theorem Th11: x -' y <=' x proof per cases; suppose y <=' x; then x -' y + y = x by Def1; hence thesis by ARYTM_2:19; end; suppose not y <=' x; then x -' y = {} by Def1; hence thesis by Th6; end; end; Lm4: x = {} implies y -' x = y proof assume A1: x = {}; then A2: x <=' y by Th6; thus y -' x = y -' x + x by A1,ARYTM_2:def 8 .= y by A2,Def1; end; Lm5: x + y -' y = x proof y <=' x + y by ARYTM_2:19; hence thesis by Def1; end; Lm6: x <=' y implies y -' (y -' x) = x proof assume A1: x <=' y; y -' x <=' y by Th11; then y -' (y -' x) + (y -' x) = y by Def1 .= y -' x + x by A1,Def1; hence thesis by ARYTM_2:11; end; Lm7: z -' y <=' x iff z <=' x + y proof per cases; suppose y <=' z; then z -' y + y = z by Def1; hence thesis by Th7; end; suppose A1: not y <=' z; A2: y <=' x + y by ARYTM_2:19; z -' y = {} by A1,Def1; hence thesis by A1,A2,Th3,Th6; end; end; Lm8: y <=' x implies (z + y <=' x iff z <=' x -' y) proof assume y <=' x; then x -' y + y = x by Def1; hence thesis by Th7; end; Lm9: z -' y -' x = z -' (x + y) proof per cases; suppose A1: x + y <=' z; y <=' x + y by ARYTM_2:19; then A2: y <=' z by A1,Th3; then A3: x <=' z -' y by A1,Lm8; z -' y -' x + (x + y) = z -' y -' x + x + y by ARYTM_2:6 .= z -' y + y by A3,Def1 .= z by A2,Def1; hence thesis by A1,Def1; end; suppose A4: x = {}; hence z -' y -' x = z -' y by Lm4 .= z -' (x + y) by A4,ARYTM_2:def 8; end; suppose that A5: not y <=' z and A6: x <> {}; y <=' y + x by ARYTM_2:19; then A7: not x + y <=' z by A5,Th3; now assume A8: x <=' z -' y; z -' y = {} by A5,Def1; hence contradiction by A6,A8,Th5; end; hence z -' y -' x = {} by Def1 .= z -' (x + y) by A7,Def1; end; suppose that A9: not x + y <=' z and A10: y <=' z; not x <=' z -' y by A9,A10,Lm8; hence z -' y -' x = {} by Def1 .= z -' (x + y) by A9,Def1; end; end; Lm10: y -' z -' x = y -' x -' z proof thus y -' z -' x = y -' (x + z) by Lm9 .= y -' x -' z by Lm9; end; theorem y <=' x & y <=' z implies x + (z -' y) = x -' y + z proof assume that A1: y <=' x and A2: y <=' z; x + (z -' y) + y = x + ((z -' y) + y) by ARYTM_2:6 .= x + z by A2,Def1 .= x -' y + y + z by A1,Def1 .= x -' y + z + y by ARYTM_2:6; hence thesis by ARYTM_2:11; end; theorem Th13: z <=' y implies x + (y -' z) = x + y -' z proof assume A1: z <=' y; y <=' x + y by ARYTM_2:19; then A2: z <=' x + y by A1,Th3; x + (y -' z) + z = x + ((y -' z) + z) by ARYTM_2:6 .= x + y by A1,Def1 .= x + y -' z + z by A2,Def1; hence thesis by ARYTM_2:11; end; Lm11: y <=' z implies x -' (z -' y) = x + y -' z proof assume A1: y <=' z; per cases; suppose A2: z -' y <=' x; then A3: z <=' x + y by Lm7; x -' (z -' y) + (z -' y) = x by A2,Def1 .= (x + z) -' z by Lm5 .= (x + (y + (z -' y))) -' z by A1,Def1 .= (x + y + (z -' y)) -' z by ARYTM_2:6 .= x + y -' z + (z -' y) by A3,Th13; hence thesis by ARYTM_2:11; end; suppose A4: not z -' y <=' x; then A5: not z <=' x + y by Lm7; thus x -' (z -' y) = {} by A4,Def1 .= x + y -' z by A5,Def1; end; end; Lm12: z <=' x & y <=' z implies x -' (z -' y) = x -' z + y proof assume that A1: z <=' x and A2: y <=' z; thus x -' (z -' y) = x + y -' z by A2,Lm11 .= x -' z + y by A1,Th13; end; Lm13: x <=' z & y <=' z implies x -' (z -' y) = y -' (z -' x) proof assume that A1: x <=' z and A2: y <=' z; thus x -' (z -' y) = x + y -' z by A2,Lm11 .= y -' (z -' x) by A1,Lm11; end; theorem z <=' x & y <=' z implies x -' z + y = x -' (z -' y) proof assume that A1: z <=' x and A2: y <=' z; thus x -' (z -' y) = x + y -' z by A2,Lm11 .= x -' z + y by A1,Th13; end; theorem y <=' x & y <=' z implies z -' y + x = x -' y + z proof assume that A1: y <=' x and A2: y <=' z; z -' y + x + y = z -' y + y + x by ARYTM_2:6 .= z + x by A2,Def1 .= x -' y + y + z by A1,Def1 .= x -' y + z + y by ARYTM_2:6; hence thesis by ARYTM_2:11; end; theorem x <=' y implies z -' y <=' z -' x proof assume A1: x <=' y; per cases; suppose A2: y <=' z; z -' y + x <=' z -' y + y by A1,Th7; then A3: z -' y + x <=' z by A2,Def1; x <=' z by A1,A2,Th3; then z -' y + x <=' z -' x + x by A3,Def1; hence thesis by Th7; end; suppose not y <=' z; then z -' y = {} by Def1; hence thesis by Th6; end; end; theorem x <=' y implies x -' z <=' y -' z proof assume A1: x <=' y; per cases; suppose A2: z <=' x; then z <=' y by A1,Th3; then A3: y -' z + z = y by Def1; x -' z + z = x by A2,Def1; hence thesis by A1,A3,Th7; end; suppose not z <=' x; then x -' z = {} by Def1; hence thesis by Th6; end; end; Lm14: x *' (y -' z) = (x *' y) -' (x *' z) proof per cases; suppose A1: z <=' y; then A2: x *' z <=' x *' y by Th8; x *' (y -' z) + (x *' z) = x *' (y -' z + z) by ARYTM_2:13 .= x *' y by A1,Def1 .= (x *' y) -' (x *' z) + (x *' z) by A2,Def1; hence thesis by ARYTM_2:11; end; suppose A3: x = {}; then x *' y = {} by ARYTM_2:4; hence x *' (y -' z) = x *' y by A3,ARYTM_2:4 .= (x *' y) -' (x *' z) by A3,Lm4,ARYTM_2:4; end; suppose A4: not z <=' y & x <> {}; then A5: not x *' z <=' x *' y by Lm2; y -' z = {} by A4,Def1; hence x *' (y -' z) = {} by ARYTM_2:4 .= (x *' y) -' (x *' z) by A5,Def1; end; end; definition let x,y be Element of REAL+; func x - y equals :Def2: x -' y if y <=' x otherwise [{},y -' x]; correctness; end; theorem x - x = {} proof x <=' x; then x - x = x -' x by Def2; hence thesis by Lm3; end; theorem x = {} & y <> {} implies x - y = [{},y] proof assume that A1: x = {} and A2: y <> {}; x <=' y by A1,Th6; then not y <=' x by A1,A2,Th4; hence x - y =[{},y -' x] by Def2 .= [{},y] by A1,Lm4; end; theorem z <=' y implies x + (y -' z) = x + y - z proof assume A1: z <=' y; y <=' x + y by ARYTM_2:19; then z <=' x + y by A1,Th3; then x + y - z = x + y -' z by Def2; hence thesis by A1,Th13; end; theorem not z <=' y implies x - (z -' y) = x + y - z proof assume A1: not z <=' y; per cases; suppose A2: z -' y <=' x; then z <=' x + y by Lm7; then A3: x + y - z = x + y -' z by Def2; x - (z -' y) = x -' (z -' y) by A2,Def2; hence thesis by A1,A3,Lm11; end; suppose A4: not z -' y <=' x; then A5: not z <=' x + y by Lm7; (z -' y) -' x = z -' (x + y) by Lm9; hence x - (z -' y) = [{},z -' (x + y)] by A4,Def2 .= x + y - z by A5,Def2; end; end; theorem y <=' x & not y <=' z implies x - (y -' z) = x -' y + z proof assume that A1: y <=' x and A2: not y <=' z; y -' z <=' y by Th11; then y -' z <=' x by A1,Th3; then x - (y -' z) = x -' (y -' z) by Def2; hence thesis by A1,A2,Lm12; end; theorem not y <=' x & not y <=' z implies x - (y -' z) = z - (y -' x) proof assume A1: ( not y <=' x)& not y <=' z; per cases; suppose A2: y <=' x + z; then y -' x <=' z by Lm7; then A3: z - (y -' x) = z -' (y -' x) by Def2; y -' z <=' x by A2,Lm7; then x - (y -' z) = x -' (y -' z) by Def2; hence thesis by A1,A3,Lm13; end; suppose A4: not y <=' x + z; then A5: not y -' x <=' z by Lm7; A6: y -' z -' x = y -' x -' z by Lm10; not y -' z <=' x by A4,Lm7; hence x - (y -' z) = [{},y -' x -' z] by A6,Def2 .= z - (y -' x) by A5,Def2; end; end; theorem y <=' x implies x - (y + z) = x -' y - z proof assume A1: y <=' x; per cases; suppose A2: y + z <=' x; then z <=' x -' y by A1,Lm8; then A3: x -' y - z = x -' y -' z by Def2; x - (y + z) = x -' (y + z) by A2,Def2; hence thesis by A3,Lm9; end; suppose that A4: not y + z <=' x and A5: x <=' y; A6: not z <=' x -' y by A1,A4,Lm8; A7: (x + z) -' x = z by Lm5 .= z -' (x -' x) by Lm3,Lm4; x = y by A1,A5,Th4; hence x - (y + z) = [{},z -' (x -' y)] by A4,A7,Def2 .= x -' y - z by A6,Def2; end; suppose that A8: not y + z <=' x and A9: not x <=' y; A10: not z <=' x -' y by A1,A8,Lm8; y + z -' x = z -' (x -' y) by A9,Lm11; hence x - (y + z) = [{},z -' (x -' y)] by A8,Def2 .= x -' y - z by A10,Def2; end; end; theorem x <=' y & z <=' y implies y -' z - x = y -' x - z proof assume that A1: x <=' y and A2: z <=' y; per cases; suppose A3: x + z <=' y; then z <=' y -' x by A1,Lm8; then A4: y -' x -' z = y -' x - z by Def2; x <=' y -' z by A2,A3,Lm8; then y -' z -' x = y -' z - x by Def2; hence thesis by A4,Lm10; end; suppose that A5: not x + z <=' y and A6: y <=' x; A7: not x <=' y -' z by A2,A5,Lm8; A8: not z <=' y -' x by A1,A5,Lm8; A9: x = y by A1,A6,Th4; then x -' (x -' z) = z by A2,Lm6 .= z -' (x -' x) by Lm3,Lm4; hence y -' z - x = [{},z -' (y -' x)] by A7,A9,Def2 .= y -' x - z by A8,Def2; end; suppose that A10: not x + z <=' y and A11: y <=' z; A12: not x <=' y -' z by A2,A10,Lm8; A13: not z <=' y -' x by A1,A10,Lm8; A14: z = y by A2,A11,Th4; x -' (z -' z) = x by Lm3,Lm4 .= z -' (z -' x) by A1,A14,Lm6; hence y -' z - x = [{},z -' (y -' x)] by A12,A14,Def2 .= y -' x - z by A13,Def2; end; suppose that A15: not x + z <=' y and A16: not y <=' x & not y <=' z; A17: not z <=' y -' x by A1,A15,Lm8; ( not x <=' y -' z)& x -' (y -' z) = z -' (y -' x) by A15,A16,Lm8,Lm13; hence y -' z - x = [{},z -' (y -' x)] by Def2 .= y -' x - z by A17,Def2; end; end; theorem z <=' y implies x *' (y -' z) = (x *' y) - (x *' z) proof assume z <=' y; then x *' z <=' x *' y by Th8; then (x *' y) - (x *' z) = (x *' y) -' (x *' z) by Def2; hence thesis by Lm14; end; theorem Th27: not z <=' y & x <> {} implies [{},x *' (z -' y)] = (x *' y) - (x *' z) proof assume ( not z <=' y)& x <> {}; then A1: not x *' z <=' x *' y by Lm2; thus [{},x *' (z -' y)] = [{},(x *' z) -' (x *' y)] by Lm14 .= (x *' y) - (x *' z) by A1,Def2; end; theorem y -' z <> {} & z <=' y & x <> {} implies (x *' z) - (x *' y) = [{},x *' (y -' z)] proof assume y -' z <> {}; then A1: y <> z by Lm3; assume z <=' y; then not y <=' z by A1,Th4; hence thesis by Th27; end; begin Lm1: omega c= ({[c,d] where c,d is Element of omega: c,d are_relative_prime & d <> {}} \ {[k,1] where k is Element of omega: not contradiction}) \/ omega by XBOOLE_1:7; notation synonym NAT for omega; synonym 0 for {}; end; Lm2: 1 = succ 0; definition func REAL equals REAL+ \/ [:{0},REAL+:] \ {[0,0]}; coherence; end; Lm3: REAL+ c= REAL proof REAL+ c= REAL+ \/ [:{0},REAL+:] by XBOOLE_1:7; hence thesis by ARYTM_2:3,ZFMISC_1:34; end; registration cluster REAL -> non empty; coherence by Lm3,XBOOLE_1:3; end; definition func COMPLEX equals Funcs({0,1},REAL) \ { x where x is Element of Funcs({0,1 },REAL): x.1 = 0} \/ REAL; coherence; func RAT equals RAT+ \/ [:{0},RAT+:] \ {[0,0]}; coherence; func INT equals NAT \/ [:{0},NAT:] \ {[0,0]}; coherence; redefine func NAT -> Subset of REAL; coherence by Lm3,ARYTM_2:2,XBOOLE_1:1; end; Lm4: RAT+ c= RAT proof RAT+ c= RAT+ \/ [:{0},RAT+:] by XBOOLE_1:7; hence thesis by ARYTM_3:61,ZFMISC_1:34; end; Lm5: NAT c= INT proof NAT c= NAT \/ [:{0},NAT:] by XBOOLE_1:7; hence thesis by ARYTM_3:32,ZFMISC_1:34; end; registration cluster COMPLEX -> non empty; coherence; cluster RAT -> non empty; coherence by Lm4,XBOOLE_1:3; cluster INT -> non empty; coherence by Lm5,XBOOLE_1:3; end; reserve i,j,k for Element of NAT; reserve a,b for Element of REAL; Lm6: for x,y,z being set st [x,y] = {z} holds z = {x} & x = y proof let x,y,z be set; assume A1: [x,y] = {z}; then {x} in {z} by TARSKI:def 2; hence A2: z = {x} by TARSKI:def 1; {x,y} in {z} by A1,TARSKI:def 2; then {x,y} = z by TARSKI:def 1; hence thesis by A2,ZFMISC_1:5; end; Lm7: not (0,one)-->(a,b) in REAL proof set IR = { A where A is Subset of RAT+: for r being Element of RAT+ st r in A holds (for s being Element of RAT+ st s <=' r holds s in A) & ex s being Element of RAT+ st s in A & r < s}; set f = (0,one)-->(a,b); A1: now f = {[0,a],[one,b]} by FUNCT_4:67; then A2: [one,b] in f by TARSKI:def 2; assume f in [:{{}},REAL+:]; then consider x,y being set such that A3: x in {{}} and y in REAL+ and A4: f = [x,y] by ZFMISC_1:84; A5: x = 0 by A3,TARSKI:def 1; per cases by A4,A5,A2,TARSKI:def 2; suppose {{one,b},{one}} = {0}; then 0 in {{one,b},{one}} by TARSKI:def 1; hence contradiction by TARSKI:def 2; end; suppose {{one,b},{one}} = {0,y}; then 0 in {{one,b},{one}} by TARSKI:def 2; hence contradiction by TARSKI:def 2; end; end; A6: f = {[0,a],[one,b]} by FUNCT_4:67; now assume f in {[i,j]: i,j are_relative_prime & j <> {}}; then consider i,j such that A7: f = [i,j] and i,j are_relative_prime and j <> {}; A8: {i} in f & {i,j} in f by A7,TARSKI:def 2; A9: now assume i = j; then {i} = {i,j} by ENUMSET1:29; then A10: [i,j] = {{i}} by ENUMSET1:29; then [one,b] in {{i}} by A6,A7,TARSKI:def 2; then A11: [one,b] = {i} by TARSKI:def 1; [0,a] in {{i}} by A6,A7,A10,TARSKI:def 2; then [0,a] = {i} by TARSKI:def 1; hence contradiction by A11,XTUPLE_0:1; end; per cases by A6,A8,TARSKI:def 2; suppose {i,j} = [0,a] & {i} = [0,a]; hence contradiction by A9,ZFMISC_1:5; end; suppose that A12: {i,j} = [0,a] and A13: {i} = [one,b]; i in [0,a] by A12,TARSKI:def 2; then i = {0,a} or i = {0} by TARSKI:def 2; then A14: 0 in i by TARSKI:def 1,def 2; i = {one} by A13,Lm6; hence contradiction by A14,TARSKI:def 1; end; suppose that A15: {i,j} = [one,b] and A16: {i} = [0,a]; i in [one,b] by A15,TARSKI:def 2; then i = {one,b} or i = {one} by TARSKI:def 2; then A17: one in i by TARSKI:def 1,def 2; i = {0} by A16,Lm6; hence contradiction by A17,TARSKI:def 1; end; suppose {i,j} = [one,b] & {i} = [one,b]; hence contradiction by A9,ZFMISC_1:5; end; end; then A18: not f in {[i,j]: i,j are_relative_prime & j <> {}} \ {[k,one]: not contradiction}; not ex x,y being set st {[0,x],[one,y]} in IR proof given x,y being set such that A19: {[0,x],[one,y]} in IR; consider A being Subset of RAT+ such that A20: {[0,x],[one,y]} = A and A21: for r being Element of RAT+ st r in A holds (for s being Element of RAT+ st s <=' r holds s in A) & ex s being Element of RAT+ st s in A & r < s by A19; [0,x] in A & for r,s being Element of RAT+ st r in A & s <=' r holds s in A by A20,A21,TARSKI:def 2; then consider r1,r2,r3 being Element of RAT+ such that A22: r1 in A and A23: r2 in A and A24: r3 in A & r1 <> r2 & r2 <> r3 & r3 <> r1 by ARYTM_3:75; A25: r2 = [0,x] or r2 = [one,y] by A20,A23,TARSKI:def 2; r1 = [0,x] or r1 = [one,y] by A20,A22,TARSKI:def 2; hence contradiction by A20,A24,A25,TARSKI:def 2; end; then A26: not f in DEDEKIND_CUTS by A6,ARYTM_2:def 1; now assume f in omega; then {} in f by ORDINAL3:8; hence contradiction by A6,TARSKI:def 2; end; then not f in RAT+ by A18,XBOOLE_0:def 3; then not f in REAL+ by A26,ARYTM_2:def 2,XBOOLE_0:def 3; hence thesis by A1,XBOOLE_0:def 3; end; definition redefine func 0 -> Element of NAT; coherence by ORDINAL1:def 11; end; theorem Th1: REAL c< COMPLEX proof set X = { x where x is Element of Funcs({0,one},REAL): x.one = 0}; thus REAL c= COMPLEX by XBOOLE_1:7; A1: now assume (0,1) --> (0,1) in X; then ex x being Element of Funcs({0,one},REAL) st x = (0,1) --> (0,1) & x. one = 0; hence contradiction by FUNCT_4:63; end; REAL+ c= REAL+ \/ [:{{}},REAL+:] by XBOOLE_1:7; then A2: REAL+ c= REAL by ARYTM_2:3,ZFMISC_1:34; then reconsider z = 0, j = 1 as Element of REAL by ARYTM_2:20; A3: not (0,1) --> (z,j) in REAL by Lm7; rng (0,1) --> (0,1) c= {0,1} & {0,1} c= REAL by A2,ARYTM_2:20,FUNCT_4:62 ,ZFMISC_1:32; then dom (0,1) --> (0,1) = {0,1} & rng (0,1) --> (0,1) c= REAL by FUNCT_4:62 ,XBOOLE_1:1; then (0,1) --> (0,1) in Funcs({0,one},REAL) by FUNCT_2:def 2; then (0,1) --> (0,1) in Funcs({0,one},REAL) \ X by A1,XBOOLE_0:def 5; hence thesis by A3,XBOOLE_0:def 3; end; Lm8: RAT c= REAL proof [:{0},RAT+:] c= [:{0},REAL+:] by ARYTM_2:1,ZFMISC_1:95; then RAT+ \/ [:{0},RAT+:] c= REAL+ \/ [:{0},REAL+:] by ARYTM_2:1,XBOOLE_1:13; hence thesis by XBOOLE_1:33; end; reserve r,s,t for Element of RAT+; reserve i,j,k for Element of omega; Lm9: for i,j being ordinal Element of RAT+ st i in j holds i < j proof let i,j be ordinal Element of RAT+; A1: j in omega by ARYTM_3:31; i in omega by ARYTM_3:31; then reconsider x = i, y = j as Element of REAL+ by A1,ARYTM_2:2; assume A2: i in j; then x <=' y by A1,ARYTM_2:18; then A3: ex x9,y9 being Element of RAT+ st x = x9 & y = y9 & x9 <=' y9 by ARYTM_2:def 5; i <> j by A2; hence thesis by A3,ARYTM_3:66; end; Lm10: for i,j being ordinal Element of RAT+ st i c= j holds i <='j proof let i,j be ordinal Element of RAT+; assume i c= j; then consider C being ordinal number such that A1: j = i+^C by ORDINAL3:27; C in omega by A1,ORDINAL3:74; then reconsider C as Element of RAT+ by Lm1; j = i + C by A1,ARYTM_3:58; hence thesis by ARYTM_3:def 13; end; Lm11: 2 = succ 1 .= succ 0 \/ {1} by ORDINAL1:def 1 .= 0 \/ {0} \/ {1} by ORDINAL1:def 1 .= {0,1} by ENUMSET1:1; Lm12: for i,k being natural Ordinal st i *^ i = 2 *^ k ex k being natural Ordinal st i = 2 *^ k proof let i,k be natural Ordinal; assume A1: i *^ i = 2 *^ k; set id2 = i div^ 2; {} in 2 by ORDINAL1:14; then A2: i mod^ 2 in 2 by ARYTM_3:6; per cases by A2,Lm11,TARSKI:def 2; suppose A3: i mod^ 2 = 0; take k = id2; thus i = k*^2+^0 by A3,ORDINAL3:65 .= 2 *^ k by ORDINAL2:27; end; suppose i mod^ 2 = 1; then i = id2*^2+^1 by ORDINAL3:65; then A4: i *^ i = id2*^2*^ (id2*^2+^1) +^ one *^ (id2*^2+^1) by ORDINAL3:46 .= id2*^2*^ (id2*^2+^1) +^ (one *^(id2*^2)+^one *^1) by ORDINAL3:46 .= id2*^2*^ (id2*^2+^1) +^ (one *^(id2*^2)+^ 1)by ORDINAL2:39 .= id2*^2*^ (id2*^2+^1) +^ one *^(id2*^2)+^ 1 by ORDINAL3:30 .= id2*^2*^ (id2*^2+^1 +^ one) +^ 1 by ORDINAL3:46 .= id2*^ (id2*^2+^1 +^ one)*^2 +^ 1 by ORDINAL3:50; A5: 1 divides 2 by ARYTM_3:9; 2 divides id2*^ (id2*^2+^1 +^ one)*^2 & 2 divides i *^ i by A1, ARYTM_3:def 3; then 2 divides 1 by A4,ARYTM_3:11; hence thesis by A5,ARYTM_3:8; end; end; 1 in omega; then reconsider a9 = 1 as Element of RAT+ by Lm1; 2 in omega; then reconsider two = 2 as ordinal Element of RAT+ by Lm1; Lm13: one + one = two proof 1 +^ 1 = succ(1 +^ {}) by Lm2,ORDINAL2:28 .= succ 1 by ORDINAL2:27 .= two; hence thesis by ARYTM_3:58; end; Lm14: for i being Element of RAT+ holds i + i = two *' i proof let i be Element of RAT+; thus i + i = one *' i + i by ARYTM_3:53 .= one *' i + one *' i by ARYTM_3:53 .= two *' i by Lm13,ARYTM_3:57; end; theorem Th2: RAT c< REAL proof defpred P[Element of RAT+] means $1 *' $1 < two; set X = { s : P[s] }; reconsider X as Subset of RAT+ from DOMAIN_1:sch 7; A1: 2 *^ 2 = two *' two & 1*^2 = 2 by ARYTM_3:59,ORDINAL2:39; 2 = succ 1 .= 1 \/ {1} by ORDINAL1:def 1; then A2: a9 <=' two by Lm10,XBOOLE_1:7; then A3: a9 < two by ARYTM_3:68; A4: a9 *' a9 = a9 by ARYTM_3:53; then A5: 1 in X by A3; A6: for r,t st r in X & t <=' r holds t in X proof let r,t; assume r in X; then A7: ex s st r = s & s *' s < two; assume t <=' r; then t *' t <=' t *' r & t *' r <=' r *' r by ARYTM_3:82; then t *' t <=' r *' r by ARYTM_3:67; then t *' t < two by A7,ARYTM_3:69; hence thesis; end; then A8: 0 in X by A5,ARYTM_3:64; now assume X = [0,0]; then X = {{0}, {0}} by ENUMSET1:29 .= {{0}} by ENUMSET1:29; hence contradiction by A8,TARSKI:def 1; end; then A9: not X in {[0,0]} by TARSKI:def 1; reconsider 09 = 0 as Element of RAT+ by Lm1; set DD = { A where A is Subset of RAT+: r in A implies (for s st s <=' r holds s in A) & ex s st s in A & r < s }; consider half being Element of RAT+ such that A10: a9 = two*'half by ARYTM_3:55; A11: one <=' two by Lm13,ARYTM_3:def 13; then A12: one < two by ARYTM_3:68; A13: now assume X in {{ s: s < t}: t <> 0}; then consider t0 being Element of RAT+ such that A14: X = { s: s < t0} and A15: t0 <> 0; set n = numerator t0, d = denominator t0; now assume A16: t0 *' t0 <> two; per cases by A16,ARYTM_3:66; suppose t0 *' t0 < two; then t0 in X; then ex s st s = t0 & s < t0 by A14; hence contradiction; end; suppose A17: two < t0 *' t0; consider es being Element of RAT+ such that A18: two + es = t0 *' t0 or t0 *' t0 + es = two by ARYTM_3:92; A19: now assume 09 = es; then two + es = two by ARYTM_3:50; hence contradiction by A17,A18,ARYTM_3:def 13; end; 09 <=' es by ARYTM_3:64; then 09 < es by A19,ARYTM_3:68; then consider s such that A20: 09 < s and A21: s < es by ARYTM_3:93; now per cases; suppose A22: s < one; A23: s <> 0 by A20; then s *' s < s *' one by A22,ARYTM_3:80; then A24: s *' s < s by ARYTM_3:53; A25: now assume A26: t0 <=' one; then t0 *' t0 <=' t0 *' one by ARYTM_3:82; then t0 *' t0 <=' t0 by ARYTM_3:53; then t0 *' t0 <=' one by A26,ARYTM_3:67; hence contradiction by A11,A17,ARYTM_3:69; end; then A27: one *' one < one *' t0 by ARYTM_3:80; one *' t0 < two *' t0 by A12,A15,ARYTM_3:80; then A28: one *' one < two *' t0 by A27,ARYTM_3:70; consider t02s2 being Element of RAT+ such that A29: s *' s + t02s2 = t0 *' t0 or t0 *' t0 + t02s2 = s *' s by ARYTM_3:92; s < t0 by A22,A25,ARYTM_3:70; then A30: s *' s < t0 by A24,ARYTM_3:70; consider 2t9 being Element of RAT+ such that A31: (two *' t0) *' 2t9 = one by A15,ARYTM_3:55,78; set x = s *' s *' 2t9; consider t0x being Element of RAT+ such that A32: x + t0x = t0 or t0 + t0x = x by ARYTM_3:92; x *' (two *' t0) = s *' s *' one by A31,ARYTM_3:52; then x <=' s *' s or two *' t0 <=' one by ARYTM_3:83; then A33: x < t0 by A28,A30,ARYTM_3:53,69; then A34: t0x <=' t0 by A32,ARYTM_3:def 13; A35: x *' t0x + x *' t0 + x *' x = x *' t0x + x *' x + x *' t0 by ARYTM_3:51 .= x *' t0 + x *' t0 by A32,A33,ARYTM_3:57,def 13 .= x *' t0 *' one + x *' t0 by ARYTM_3:53 .= x *' t0 *' one + x *' t0 *' one by ARYTM_3:53 .= t0 *' x *' two by Lm13,ARYTM_3:57 .= x *' (t0 *' two) by ARYTM_3:52 .= s *' s *' one by A31,ARYTM_3:52 .= s *' s by ARYTM_3:53; es <=' t0 *' t0 by A17,A18,ARYTM_3:def 13; then s < t0 *' t0 by A21,ARYTM_3:69; then A36: s *' s < t0 *' t0 by A24,ARYTM_3:70; then t02s2 + x *' x + s *' s = (t0x + x) *' t0 + x *' x by A29,A32 ,A33,ARYTM_3:51,def 13 .= t0x *' (t0x + x) + x *' t0 + x *' x by A32,A33,ARYTM_3:57 ,def 13 .= t0x *' t0x + x *' t0x + x *' t0 + x *' x by ARYTM_3:57 .= t0x *' t0x + x *' t0x + (x *' t0 + x *' x) by ARYTM_3:51 .= t0x *' t0x + (x *' t0x + (x *' t0 + x *' x)) by ARYTM_3:51 .= t0x *' t0x + s *' s by A35,ARYTM_3:51; then t0x *' t0x = t02s2 + x *' x by ARYTM_3:62; then A37: t02s2 <=' t0x *' t0x by ARYTM_3:def 13; now assume A38: x = 0; per cases by A38,ARYTM_3:78; suppose s *' s = 0; hence contradiction by A23,ARYTM_3:78; end; suppose 2t9 = 0; hence contradiction by A31,ARYTM_3:48; end; end; then t0x <> t0 by A32,A33,ARYTM_3:84,def 13; then t0x < t0 by A34,ARYTM_3:68; then t0x in X by A14; then A39: ex s st s = t0x & s *' s < two; s *' s < es by A21,A24,ARYTM_3:70; then two + s *' s < two + es by ARYTM_3:76; then two < t02s2 by A17,A18,A29,A36,ARYTM_3:76,def 13; hence contradiction by A37,A39,ARYTM_3:69; end; suppose A40: one <=' s; half *' two = one *' one by A10,ARYTM_3:53; then A41: half <=' one by A12,ARYTM_3:83; half <> one by A10,ARYTM_3:53; then A42: half < one by A41,ARYTM_3:68; then half < s by A40,ARYTM_3:69; then A43: half < es by A21,ARYTM_3:70; one <=' two by Lm13,ARYTM_3:def 13; then one < two by ARYTM_3:68; then A44: one *' t0 < two *' t0 by A15,ARYTM_3:80; A45: now assume A46: t0 <=' one; then t0 *' t0 <=' t0 *' one by ARYTM_3:82; then t0 *' t0 <=' t0 by ARYTM_3:53; then t0 *' t0 <=' one by A46,ARYTM_3:67; hence contradiction by A11,A17,ARYTM_3:69; end; then one *' one < one *' t0 by ARYTM_3:80; then A47: one *' one < two *' t0 by A44,ARYTM_3:70; set s = half; consider t02s2 being Element of RAT+ such that A48: s *' s + t02s2 = t0 *' t0 or t0 *' t0 + t02s2 = s *' s by ARYTM_3:92; A49: half <> 0 by A10,ARYTM_3:48; then half *' half < half *' one by A42,ARYTM_3:80; then A50: half *' half < half by ARYTM_3:53; s < t0 by A42,A45,ARYTM_3:70; then A51: s *' s < t0 by A50,ARYTM_3:70; consider 2t9 being Element of RAT+ such that A52: (two *' t0) *' 2t9 = one by A15,ARYTM_3:55,78; set x = s *' s *' 2t9; consider t0x being Element of RAT+ such that A53: x + t0x = t0 or t0 + t0x = x by ARYTM_3:92; x *' (two *' t0) = s *' s *' one by A52,ARYTM_3:52; then x <=' s *' s or two *' t0 <=' one by ARYTM_3:83; then A54: x < t0 by A47,A51,ARYTM_3:53,69; then A55: t0x <=' t0 by A53,ARYTM_3:def 13; A56: x *' t0x + x *' t0 + x *' x = x *' t0x + x *' x + x *' t0 by ARYTM_3:51 .= x *' t0 + x *' t0 by A53,A54,ARYTM_3:57,def 13 .= x *' t0 *' one + x *' t0 by ARYTM_3:53 .= x *' t0 *' one + x *' t0 *' one by ARYTM_3:53 .= t0 *' x *' two by Lm13,ARYTM_3:57 .= x *' (t0 *' two) by ARYTM_3:52 .= s *' s *' one by A52,ARYTM_3:52 .= s *' s by ARYTM_3:53; es <=' t0 *' t0 by A17,A18,ARYTM_3:def 13; then s < t0 *' t0 by A43,ARYTM_3:69; then A57: s *' s < t0 *' t0 by A50,ARYTM_3:70; then t02s2 + x *' x + s *' s = t0 *' t0 + x *' x by A48,ARYTM_3:51 ,def 13 .= t0x *' (t0x + x) + x *' t0 + x *' x by A53,A54,ARYTM_3:57 ,def 13 .= t0x *' t0x + x *' t0x + x *' t0 + x *' x by ARYTM_3:57 .= t0x *' t0x + x *' t0x + (x *' t0 + x *' x) by ARYTM_3:51 .= t0x *' t0x + (x *' t0x + (x *' t0 + x *' x)) by ARYTM_3:51 .= t0x *' t0x + s *' s by A56,ARYTM_3:51; then t0x *' t0x = t02s2 + x *' x by ARYTM_3:62; then A58: t02s2 <=' t0x *' t0x by ARYTM_3:def 13; now assume A59: x = 0; per cases by A59,ARYTM_3:78; suppose s *' s = 0; hence contradiction by A49,ARYTM_3:78; end; suppose 2t9 = 0; hence contradiction by A52,ARYTM_3:48; end; end; then t0x <> t0 by A53,A54,ARYTM_3:84,def 13; then t0x < t0 by A55,ARYTM_3:68; then t0x in X by A14; then A60: ex s st s = t0x & s *' s < two; s *' s < es by A50,A43,ARYTM_3:70; then two + s *' s < two + es by ARYTM_3:76; then two < t02s2 by A17,A18,A48,A57,ARYTM_3:76,def 13; hence contradiction by A58,A60,ARYTM_3:69; end; end; hence contradiction; end; end; then A61: two/1 = (n *^ n)/(d *^ d) by ARYTM_3:40; d <> 0 by ARYTM_3:35; then d *^ d <> {} by ORDINAL3:31; then A62: two*^(d *^ d) = 1*^(n *^ n) by A61,ARYTM_3:45 .= n *^ n by ORDINAL2:39; then consider k being natural Ordinal such that A63: n = 2 *^ k by Lm12; two*^(d *^ d) = 2 *^ (k *^ (2 *^ k)) by A62,A63,ORDINAL3:50; then d *^ d = k *^ (2 *^ k) by ORDINAL3:33 .= 2 *^ (k *^ k)by ORDINAL3:50; then A64: ex p being natural Ordinal st d = 2 *^ p by Lm12; n, d are_relative_prime by ARYTM_3:34; hence contradiction by A63,A64,ARYTM_3:def 2; end; 2 = succ 1; then 1 in 2 by ORDINAL1:6; then A65: 1 *^ 2 in 2 *^ 2 by ORDINAL3:19; A66: 09 <=' a9 by ARYTM_3:64; now let r; assume A67: r in X; then A68: ex s st r = s & s *' s < two; thus for t st t <=' r holds t in X by A6,A67; per cases; suppose A69: r = 0; take a9; thus a9 in X by A4,A3; thus r < a9 by A66,A69,ARYTM_3:68; end; suppose A70: r <> 0; then consider 3r9 being Element of RAT+ such that A71: (r + r + r) *' 3r9 = one by ARYTM_3:54,63; consider rr being Element of RAT+ such that A72: r *' r + rr = two or two + rr = r *' r by ARYTM_3:92; set eps = rr *' 3r9; A73: now assume A74: eps = 0; per cases by A74,ARYTM_3:78; suppose rr = 09; then r *' r = two by A72,ARYTM_3:50; hence contradiction by A68; end; suppose 3r9 = 09; hence contradiction by A71,ARYTM_3:48; end; end; now per cases; suppose eps < r; then eps *' eps < r *' eps by A73,ARYTM_3:80; then A75: r *' eps + eps *' r + eps *' eps < r *' eps + eps *' r + r *' eps by ARYTM_3:76; take t = r + eps; A76: t *' t = r *' t + eps *' t by ARYTM_3:57 .= r *' r + r *' eps + eps *' t by ARYTM_3:57 .= r *' r + r *' eps + (eps *' r + eps *' eps) by ARYTM_3:57 .= r *' r + (r *' eps + (eps *' r + eps *' eps)) by ARYTM_3:51 .= r *' r + (r *' eps + eps *' r + eps *' eps) by ARYTM_3:51; r *' eps + eps *' r + r *' eps = eps *' (r + r) + r *' eps by ARYTM_3:57 .= eps *' (r + r + r) by ARYTM_3:57 .= rr *' one by A71,ARYTM_3:52 .= rr by ARYTM_3:53; then t *' t < two by A68,A72,A75,A76,ARYTM_3:76,def 13; hence t in X; 09 <=' eps by ARYTM_3:64; then 09 < eps by A73,ARYTM_3:68; then r + 09 < r + eps by ARYTM_3:76; hence r < t by ARYTM_3:50; end; suppose A77: r <=' eps; eps *' (r + r + r) = rr *' one by A71,ARYTM_3:52 .= rr by ARYTM_3:53; then A78: r *' (r + r + r) <=' rr by A77,ARYTM_3:82; take t = (a9 + half) *' r; a9 < two *' one by A3,ARYTM_3:53; then half < one by A10,ARYTM_3:82; then one + half < two by Lm13,ARYTM_3:76; then A79: t < two *' r by A70,ARYTM_3:80; then A80: two *' r *' t < two *' r *' (two *' r) by A70,ARYTM_3:78,80; a9 + half <> 0 by ARYTM_3:63; then t *' t < two *' r *' t by A70,A79,ARYTM_3:78,80; then A81: t *' t < two *' r *' (two *' r) by A80,ARYTM_3:70; r *' (r + r + r) + r *' r = r *' (r + r) + r *' r + r *' r by ARYTM_3:57 .= r *' (r + r) + (r *' r + r *' r) by ARYTM_3:51 .= r *' (two *' r) + (r *' r + r *' r) by Lm14 .= r *' (two *' r) + two *' (r *' r) by Lm14 .= two *' (r *' r) + two *' (r *' r) by ARYTM_3:52 .= two *' (two *' (r *' r)) by Lm14 .= two *' (two *' r *' r) by ARYTM_3:52 .= (two *' r) *' (two *' r) by ARYTM_3:52; then two *' r *' (two *' r) <=' two by A68,A72,A78,ARYTM_3:76,def 13; then t *' t < two by A81,ARYTM_3:69; hence t in X; 09 <> half & 09 <=' half by A10,ARYTM_3:48,64; then 09 < half by ARYTM_3:68; then one + 09 < one + half by ARYTM_3:76; then one < one + half by ARYTM_3:50; then one *' r < t by A70,ARYTM_3:80; hence r < t by ARYTM_3:53; end; end; hence ex t st t in X & r < t; end; end; then A82: X in DD; a9 *' half = half by ARYTM_3:53; then A83: half in X by A10,A6,A2,A5,ARYTM_3:82; A84: now assume A85: X in RAT; per cases by A85,XBOOLE_0:def 3; suppose A86: X in RAT+; now per cases by A86,XBOOLE_0:def 3; suppose X in {[i,j]: i,j are_relative_prime & j <> {}} \ {[k,one]: not contradiction}; then X in {[i,j]: i,j are_relative_prime & j <> {}}; then ex i,j st X = [i,j] & i,j are_relative_prime & j <> {}; hence contradiction by A8,TARSKI:def 2; end; suppose A87: X in omega; 2 c= X by A5,A8,Lm11,ZFMISC_1:32; then A88: not X in 2 by ORDINAL1:5; now per cases by A87,A88,ORDINAL1:14; suppose X = two; then half = 0 or half = 1 by A83,Lm11,TARSKI:def 2; hence contradiction by A10,ARYTM_3:48,53; end; suppose two in X; then ex s st s = two & s *' s < two; hence contradiction by A1,A65,Lm9; end; end; hence contradiction; end; end; hence contradiction; end; suppose X in [:{0},RAT+:]; then ex x,y being set st X = [x,y] by RELAT_1:def 1; hence contradiction by A8,TARSKI:def 2; end; end; now assume two in X; then ex s st two = s & s *' s < two; hence contradiction by A1,A65,Lm9; end; then X <> RAT+; then not X in {RAT+} by TARSKI:def 1; then X in DEDEKIND_CUTS by A82,ARYTM_2:def 1,XBOOLE_0:def 5; then X in RAT+ \/ DEDEKIND_CUTS by XBOOLE_0:def 3; then X in REAL+ by A13,ARYTM_2:def 2,XBOOLE_0:def 5; then X in REAL+ \/ [:{0},REAL+:] by XBOOLE_0:def 3; then X in REAL by A9,XBOOLE_0:def 5; hence thesis by A84,Lm8,XBOOLE_0:def 8; end; theorem Th3: RAT c< COMPLEX by Th1,Th2,XBOOLE_1:56; Lm15: INT c= RAT proof [:{0},NAT:] c= [:{0},RAT+:] by Lm1,ZFMISC_1:95; then NAT \/ [:{0},NAT:] c= RAT+ \/ [:{0},RAT+:] by Lm1,XBOOLE_1:13; hence thesis by XBOOLE_1:33; end; theorem Th4: INT c< RAT proof 1,2 are_relative_prime proof let c,d1,d2 be Ordinal such that A1: 1 = c *^ d1 and 2 = c *^ d2; thus thesis by A1,ORDINAL3:37; end; then A2: [1,2] in RAT+ by ARYTM_3:33; not 1 in {0} by TARSKI:def 1; then ( not [1,2] in NAT)& not [1,2] in [:{0},NAT:] by ARYTM_3:32,ZFMISC_1:87 ; then not [1,2] in NAT \/ [:{0},NAT:] by XBOOLE_0:def 3; then INT <> RAT by A2,Lm4,XBOOLE_0:def 5; hence thesis by Lm15,XBOOLE_0:def 8; end; theorem Th5: INT c< REAL by Th2,Th4,XBOOLE_1:56; theorem Th6: INT c< COMPLEX by Th1,Th5,XBOOLE_1:56; theorem Th7: NAT c< INT proof 0 in {0} by TARSKI:def 1; then [0,1] in [:{0},NAT:] by ZFMISC_1:87; then A1: [0,1] in NAT \/ [:{0},NAT:] by XBOOLE_0:def 3; A2: not [0,1] in NAT by ARYTM_3:32; [0,1] <> [0,0] by XTUPLE_0:1; then not [0,1] in {[0,0]} by TARSKI:def 1; then [0,1] in INT by A1,XBOOLE_0:def 5; hence thesis by A2,Lm5,XBOOLE_0:def 8; end; theorem Th8: NAT c< RAT by Th4,Th7,XBOOLE_1:56; theorem Th9: NAT c< REAL by Th2,Th8,XBOOLE_1:56; theorem Th10: NAT c< COMPLEX by Th1,Th9,XBOOLE_1:56; begin theorem REAL c= COMPLEX by Th1,XBOOLE_0:def 8; theorem RAT c= REAL by Th2,XBOOLE_0:def 8; theorem RAT c= COMPLEX by Th3,XBOOLE_0:def 8; theorem INT c= RAT by Th4,XBOOLE_0:def 8; theorem INT c= REAL by Th5,XBOOLE_0:def 8; theorem INT c= COMPLEX by Th6,XBOOLE_0:def 8; theorem NAT c= INT by Lm5; theorem Th18: NAT c= RAT by Th8,XBOOLE_0:def 8; theorem Th19: NAT c= REAL; theorem Th20: NAT c= COMPLEX by Th10,XBOOLE_0:def 8; theorem REAL <> COMPLEX by Th1; theorem RAT <> REAL by Th2; theorem RAT <> COMPLEX by Th1,Th2; theorem INT <> RAT by Th4; theorem INT <> REAL by Th2,Th4; theorem INT <> COMPLEX by Th1,Th2,Th4,XBOOLE_1:56; theorem NAT <> INT by Th7; theorem NAT <> RAT by Th4,Th7; theorem NAT <> REAL by Th2,Th4,Th7,XBOOLE_1:56; theorem NAT <> COMPLEX by Th1,Th2,Th8,XBOOLE_1:56; definition func ExtREAL equals REAL \/ { REAL, [0,REAL] }; coherence; end; registration cluster ExtREAL -> non empty; coherence; end; theorem Th31: REAL c= ExtREAL by XBOOLE_1:7; theorem Th32: REAL <> ExtREAL proof REAL in { REAL, [0,REAL] } by TARSKI:def 2; then REAL in ExtREAL by XBOOLE_0:def 3; hence thesis; end; theorem REAL c< ExtREAL by Th31,Th32,XBOOLE_0:def 8; registration cluster INT -> infinite; coherence by Lm5,FINSET_1:1; cluster RAT -> infinite; coherence by Th18,FINSET_1:1; cluster REAL -> infinite; coherence by Th19,FINSET_1:1; cluster COMPLEX -> infinite; coherence by Th20,FINSET_1:1; end; begin Lm1: {} in {{}} by TARSKI:def 1; theorem Th1: REAL+ c= REAL proof REAL+ c= REAL+ \/ [:{{}},REAL+:] by XBOOLE_1:7; hence thesis by ARYTM_2:3,NUMBERS:def 1,ZFMISC_1:34; end; theorem Th2: for x being Element of REAL+ st x <> {} holds [{},x] in REAL proof let x be Element of REAL+ such that A1: x <> {}; A2: now assume [{},x] in {[{},{}]}; then [{},x] = [{},{}] by TARSKI:def 1; hence contradiction by A1,XTUPLE_0:1; end; {} in {{}} by TARSKI:def 1; then [{},x] in [:{{}},REAL+:] by ZFMISC_1:87; then [{},x] in REAL+ \/ [:{{}},REAL+:] by XBOOLE_0:def 3; hence thesis by A2,NUMBERS:def 1,XBOOLE_0:def 5; end; theorem Th3: for y being set st [{},y] in REAL holds y <> {} proof let y be set such that A1: [{},y] in REAL and A2: y = {}; [{},y] in {[{},{}]} by A2,TARSKI:def 1; hence contradiction by A1,NUMBERS:def 1,XBOOLE_0:def 5; end; theorem Th4: for x,y being Element of REAL+ holds x - y in REAL proof let x,y be Element of REAL+; per cases; suppose y <=' x; then x - y = x -' y by ARYTM_1:def 2; then x - y in REAL+; hence thesis by Th1; end; suppose A1: not y <=' x; then x - y = [{},y -' x] by ARYTM_1:def 2; hence thesis by A1,Th2,ARYTM_1:9; end; end; theorem Th5: REAL+ misses [:{{}},REAL+:] proof assume REAL+ meets [:{{}},REAL+:]; then consider x being set such that A1: x in REAL+ and A2: x in [:{{}},REAL+:] by XBOOLE_0:3; consider x1,x2 being set such that A3: x1 in {{}} and x2 in REAL+ and A4: x = [x1,x2] by A2,ZFMISC_1:84; x1 = {} by A3,TARSKI:def 1; hence contradiction by A1,A4,ARYTM_2:3; end; begin theorem Th6: for x,y being Element of REAL+ st x - y = {} holds x = y proof let x,y be Element of REAL+; assume A1: x - y = {}; {} <> [{},y -' x]; then y <=' x & x -' y = {} by A1,ARYTM_1:def 2; hence thesis by ARYTM_1:10; end; Lm2: not ex a,b being set st 1 = [a,b] proof let a,b be set; assume 1 = [a,b]; then A1: {{}} = {{a,b},{a}} by ORDINAL3:15,TARSKI:def 5; {a} in {{a,b},{a}} by TARSKI:def 2; hence contradiction by A1,TARSKI:def 1; end; theorem Th7: for x,y,z being Element of REAL+ st x <> {} & x *' y = x *' z holds y = z proof let x,y,z be Element of REAL+; assume that A1: x <> {} and A2: x *' y = x *' z; per cases; suppose A3: z <=' y; then x *' (y -' z) = (x *' y) - (x *' z) by ARYTM_1:26 .= {} by A2,ARYTM_1:18; then {} = y -' z by A1,ARYTM_1:2 .= y - z by A3,ARYTM_1:def 2; hence thesis by Th6; end; suppose A4: y <=' z; then x *' (z -' y) = x *' z - x *' y by ARYTM_1:26 .= {} by A2,ARYTM_1:18; then {} = z -' y by A1,ARYTM_1:2 .= z - y by A4,ARYTM_1:def 2; hence thesis by Th6; end; end; begin definition let x,y be Element of REAL; func +(x,y) -> Element of REAL means :Def1: ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & it = x9 + y9 if x in REAL+ & y in REAL+, ex x9,y9 being Element of REAL+ st x = x9 & y = [0,y9] & it = x9 - y9 if x in REAL+ & y in [:{ 0},REAL+:], ex x9,y9 being Element of REAL+ st x = [0,x9] & y = y9 & it = y9 - x9 if y in REAL+ & x in [:{0},REAL+:] otherwise ex x9,y9 being Element of REAL+ st x = [0,x9] & y = [0,y9] & it = [0,x9+y9]; existence proof hereby assume x in REAL+ & y in REAL+; then reconsider x9=x, y9=y as Element of REAL+; x9 + y9 in REAL+; then reconsider IT = x9 + y9 as Element of REAL by Th1; take IT,x9,y9; thus x = x9 & y = y9 & IT = x9 + y9; end; A1: y in REAL+ \/ [:{0},REAL+:] by NUMBERS:def 1,XBOOLE_0:def 5; hereby assume x in REAL+; then reconsider x9=x as Element of REAL+; assume y in [:{0},REAL+:]; then consider z,y9 being set such that A2: z in{0} and A3: y9 in REAL+ and A4: y = [z,y9] by ZFMISC_1:84; reconsider y9 as Element of REAL+ by A3; reconsider IT = x9 - y9 as Element of REAL by Th4; take IT,x9,y9; thus x = x9 & y = [0,y9] & IT = x9 - y9 by A2,A4,TARSKI:def 1; end; hereby assume y in REAL+; then reconsider y9=y as Element of REAL+; assume x in [:{0},REAL+:]; then consider z,x9 being set such that A5: z in{0} and A6: x9 in REAL+ and A7: x = [z,x9] by ZFMISC_1:84; reconsider x9 as Element of REAL+ by A6; reconsider IT = y9 - x9 as Element of REAL by Th4; take IT,x9,y9; thus x = [0,x9] & y = y9 & IT = y9 - x9 by A5,A7,TARSKI:def 1; end; assume that A8: not(x in REAL+ & y in REAL+) and A9: not(x in REAL+ & y in [:{0},REAL+:]) and A10: not(y in REAL+ & x in [:{0},REAL+:]); A11: x in REAL+ \/ [:{0},REAL+:] by NUMBERS:def 1,XBOOLE_0:def 5; then x in REAL+ or x in [:{0},REAL+:] by XBOOLE_0:def 3; then consider z1,x9 being set such that A12: z1 in{0} and A13: x9 in REAL+ and A14: x = [z1,x9] by A1,A8,A9,XBOOLE_0:def 3,ZFMISC_1:84; y in REAL+ or y in [:{0},REAL+:] by A1,XBOOLE_0:def 3; then consider z2,y9 being set such that A15: z2 in{0} and A16: y9 in REAL+ and A17: y = [z2,y9] by A11,A8,A10,XBOOLE_0:def 3,ZFMISC_1:84; reconsider x9 as Element of REAL+ by A13; reconsider y9 as Element of REAL+ by A16; x = [0,x9] by A12,A14,TARSKI:def 1; then x9 + y9 <> 0 by Th3,ARYTM_2:5; then reconsider IT = [0,y9 + x9] as Element of REAL by Th2; take IT,x9,y9; thus thesis by A12,A14,A15,A17,TARSKI:def 1; end; uniqueness proof let IT1,IT2 be Element of REAL; thus x in REAL+ & y in REAL+ & (ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & IT1 = x9 + y9) & (ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & IT2 = x9 + y9) implies IT1 = IT2; thus x in REAL+ & y in [:{0},REAL+:] & (ex x9,y9 being Element of REAL+ st x = x9 & y = [0,y9] &IT1 = x9 - y9) & (ex x99,y99 being Element of REAL+ st x = x99 & y = [0,y99] & IT2 = x99 - y99) implies IT1 = IT2 by XTUPLE_0:1; thus y in REAL+ & x in [:{0},REAL+:] & (ex x9,y9 being Element of REAL+ st x = [0,x9] & y = y9 & IT1 = y9 - x9) & (ex x99,y99 being Element of REAL+ st x = [0,x99] & y = y99 & IT2 = y99 - x99) implies IT1 = IT2 by XTUPLE_0:1; assume that not(x in REAL+ & y in REAL+) and not(x in REAL+ & y in [:{0},REAL+:]) and not(y in REAL+ & x in [:{0},REAL+:]); given x9,y9 being Element of REAL+ such that A18: x = [0,x9] and A19: y = [0,y9] & IT1 = [0,x9+y9]; given x99,y99 being Element of REAL+ such that A20: x = [0,x99] and A21: y = [0,y99] & IT2 = [0,x99+y99]; x9 = x99 by A18,A20,XTUPLE_0:1; hence thesis by A19,A21,XTUPLE_0:1; end; consistency by Th5,XBOOLE_0:3; commutativity; func *(x,y) -> Element of REAL means :Def2: ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & it = x9 *' y9 if x in REAL+ & y in REAL+, ex x9,y9 being Element of REAL+ st x = x9 & y = [0,y9] & it = [0,x9 *' y9] if x in REAL+ & y in [:{0},REAL+:] & x <> 0, ex x9,y9 being Element of REAL+ st x = [0,x9] & y = y9 & it = [0,y9 *' x9] if y in REAL+ & x in [:{0},REAL+:] & y <> 0, ex x9,y9 being Element of REAL+ st x = [0,x9] & y = [0,y9] & it = y9 *' x9 if x in [:{0} ,REAL+:] & y in [:{0},REAL+:] otherwise it = 0; existence proof hereby assume x in REAL+ & y in REAL+; then reconsider x9=x, y9=y as Element of REAL+; x9 *' y9 in REAL+; then reconsider IT = x9 *' y9 as Element of REAL by Th1; take IT,x9,y9; thus x = x9 & y = y9 & IT = x9 *' y9; end; hereby assume x in REAL+; then reconsider x9=x as Element of REAL+; assume y in [:{0},REAL+:]; then consider z,y9 being set such that A22: z in{0} and A23: y9 in REAL+ and A24: y = [z,y9] by ZFMISC_1:84; reconsider y9 as Element of REAL+ by A23; y = [0,y9] by A22,A24,TARSKI:def 1; then A25: y9 <> 0 by Th3; assume x <> 0; then reconsider IT = [0,x9 *' y9] as Element of REAL by A25,Th2,ARYTM_1:2 ; take IT,x9,y9; thus x = x9 & y = [0,y9] & IT = [0,x9 *' y9] by A22,A24,TARSKI:def 1; end; hereby assume y in REAL+; then reconsider y9=y as Element of REAL+; assume x in [:{0},REAL+:]; then consider z,x9 being set such that A26: z in{0} and A27: x9 in REAL+ and A28: x = [z,x9] by ZFMISC_1:84; reconsider x9 as Element of REAL+ by A27; x = [0,x9] by A26,A28,TARSKI:def 1; then A29: x9 <> 0 by Th3; assume y <> 0; then reconsider IT = [0,y9 *' x9] as Element of REAL by A29,Th2,ARYTM_1:2 ; take IT,x9,y9; thus x = [0,x9] & y = y9 & IT = [0,y9 *' x9] by A26,A28,TARSKI:def 1; end; hereby assume x in [:{0},REAL+:]; then consider z1,x9 being set such that A30: z1 in{0} and A31: x9 in REAL+ and A32: x = [z1,x9] by ZFMISC_1:84; reconsider x9 as Element of REAL+ by A31; assume y in [:{0},REAL+:]; then consider z2,y9 being set such that A33: z2 in{0} and A34: y9 in REAL+ and A35: y = [z2,y9] by ZFMISC_1:84; reconsider y9 as Element of REAL+ by A34; x9 *' y9 in REAL+; then reconsider IT = y9 *' x9 as Element of REAL by Th1; take IT,x9,y9; thus x = [0,x9] & y = [0,y9] & IT = y9 *' x9 by A30,A32,A33,A35, TARSKI:def 1; end; thus thesis; end; uniqueness proof let IT1,IT2 be Element of REAL; thus x in REAL+ & y in REAL+ & (ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & IT1 = x9 *' y9) & (ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & IT2 = x9 *' y9) implies IT1 = IT2; thus x in REAL+ & y in [:{0},REAL+:] & x <> 0 & (ex x9,y9 being Element of REAL+ st x = x9 & y = [0,y9] & IT1 = [0,x9 *' y9]) & (ex x99,y99 being Element of REAL+ st x = x99 & y = [0,y99] & IT2 = [0,x99 *' y99]) implies IT1 = IT2 by XTUPLE_0:1; thus y in REAL+ & x in [:{0},REAL+:] & y <> 0 & (ex x9,y9 being Element of REAL+ st x = [0,x9] & y = y9 & IT1 = [0,y9 *' x9]) & (ex x99,y99 being Element of REAL+ st x = [0,x99] & y = y99 & IT2 = [0,y99 *' x99]) implies IT1 = IT2 by XTUPLE_0:1; hereby assume that x in [:{0},REAL+:] and y in [:{0},REAL+:]; given x9,y9 being Element of REAL+ such that A36: x = [0,x9] and A37: y = [0,y9] & IT1 = y9 *' x9; given x99,y99 being Element of REAL+ such that A38: x = [0,x99] and A39: y = [0,y99] & IT2 = y99 *' x99; x9 = x99 by A36,A38,XTUPLE_0:1; hence IT1 = IT2 by A37,A39,XTUPLE_0:1; end; thus thesis; end; consistency by Th5,XBOOLE_0:3; commutativity; end; reserve x,y for Element of REAL; definition let x be Element of REAL; func opp x -> Element of REAL means :Def3: +(x,it) = 0; existence proof reconsider z9 = 0 as Element of REAL+ by ARYTM_2:20; A1: x in REAL+ \/ [:{0},REAL+:] by NUMBERS:def 1,XBOOLE_0:def 5; per cases by A1,XBOOLE_0:def 3; suppose A2: x = 0; then reconsider x9 = x as Element of REAL+ by ARYTM_2:20; take x; x9 + x9 = 0 by A2,ARYTM_2:def 8; hence thesis by Def1; end; suppose that A3: x in REAL+ and A4: x <> 0; A5: [0,x] <> [0,0] by A4,XTUPLE_0:1; 0 in {0} by TARSKI:def 1; then A6: [0,x] in [:{0},REAL+:] by A3,ZFMISC_1:87; then [0,x] in REAL+ \/ [:{0},REAL+:] by XBOOLE_0:def 3; then reconsider y = [0,x] as Element of REAL by A5,NUMBERS:def 1 ,ZFMISC_1:56; reconsider x9 = x as Element of REAL+ by A3; A7: x9 <=' x9; take y; z9 + x9 = x9 by ARYTM_2:def 8; then z9 = x9 -' x9 by A7,ARYTM_1:def 1; then 0 = x9 - x9 by A7,ARYTM_1:def 2; hence thesis by A6,Def1; end; suppose A8: x in [:{0},REAL+:]; then consider a,b being set such that A9: a in {0} and A10: b in REAL+ and A11: x = [a,b] by ZFMISC_1:84; reconsider y = b as Element of REAL by A10,Th1; take y; now per cases; case x in REAL+ & y in REAL+; hence ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & 0 = x9 + y9 by A8,Th5,XBOOLE_0:3; end; case x in REAL+ & y in [:{0},REAL+:]; hence ex x9,y9 being Element of REAL+ st x = x9 & y = [0,y9] & 0 = x9 - y9 by A10,Th5,XBOOLE_0:3; end; case y in REAL+ & x in [:{0},REAL+:]; reconsider x9 = b, y9 = y as Element of REAL+ by A10; take x9, y9; thus x = [0,x9] by A9,A11,TARSKI:def 1; thus y = y9; thus 0 = y9 - x9 by ARYTM_1:18; end; case not(x in REAL+ & y in REAL+) & not(x in REAL+ & y in [:{0}, REAL+:]) & not (y in REAL+ & x in [:{0},REAL+:]); hence ex x9,y9 being Element of REAL+ st x = [0,x9] & y = [0,y9] & 0 = [0,y9+x9] by A8,A10; end; end; hence thesis by Def1; end; end; uniqueness proof let y,z be Element of REAL such that A12: +(x,y) = 0 and A13: +(x,z) = 0; per cases; suppose x in REAL+ & y in REAL+ & z in REAL+; then ( ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & 0 = x9 + y9) & ex x9,y9 being Element of REAL+ st x = x9 & z = y9 & 0 = x9 + y9 by A12,A13 ,Def1; hence thesis by ARYTM_2:11; end; suppose that A14: x in REAL+ and A15: y in REAL+ and A16: z in [:{0},REAL+:]; consider x99,y99 being Element of REAL+ such that A17: x = x99 and A18: z = [0,y99] & 0 = x99 - y99 by A13,A14,A16,Def1; ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & 0 = x9 + y9 by A12 ,A14,A15,Def1; then A19: x99 = 0 by A17,ARYTM_2:5; [0,0] in {[0,0]} by TARSKI:def 1; then A20: not [0,0] in REAL by NUMBERS:def 1,XBOOLE_0:def 5; z in REAL; hence thesis by A18,A19,A20,ARYTM_1:19; end; suppose that A21: x in REAL+ and A22: z in REAL+ and A23: y in [:{0},REAL+:]; consider x99,y9 being Element of REAL+ such that A24: x = x99 and A25: y = [0,y9] & 0 = x99 - y9 by A12,A21,A23,Def1; ex x9,z9 being Element of REAL+ st x = x9 & z = z9 & 0 = x9 + z9 by A13 ,A21,A22,Def1; then A26: x99 = 0 by A24,ARYTM_2:5; [0,0] in {[0,0]} by TARSKI:def 1; then A27: not [0,0] in REAL by NUMBERS:def 1,XBOOLE_0:def 5; y in REAL; hence thesis by A25,A26,A27,ARYTM_1:19; end; suppose that A28: x in REAL+ and A29: y in [:{0},REAL+:] and A30: z in [:{0},REAL+:]; consider x99,z9 being Element of REAL+ such that A31: x = x99 and A32: z = [0,z9] and A33: 0 = x99 - z9 by A13,A28,A30,Def1; consider x9,y9 being Element of REAL+ such that A34: x = x9 and A35: y = [0,y9] and A36: 0 = x9 - y9 by A12,A28,A29,Def1; y9 = x9 by A36,Th6 .= z9 by A34,A31,A33,Th6; hence thesis by A35,A32; end; suppose that A37: z in REAL+ and A38: y in REAL+ and A39: x in [:{0},REAL+:]; consider x99,z9 being Element of REAL+ such that A40: x = [0,x99] and A41: z = z9 and A42: 0 = z9 - x99 by A13,A37,A39,Def1; consider x9,y9 being Element of REAL+ such that A43: x = [0,x9] and A44: y = y9 and A45: 0 = y9 - x9 by A12,A38,A39,Def1; x9 = x99 by A43,A40,XTUPLE_0:1; then z9 = x9 by A42,Th6 .= y9 by A45,Th6; hence thesis by A44,A41; end; suppose not(x in REAL+ & y in REAL+) & not(x in REAL+ & y in [:{0}, REAL+:]) & not(y in REAL+ & x in [:{0},REAL+:]); then ex x9,y9 being Element of REAL+ st x = [0,x9] & y = [0,y9] & 0 = [0 ,x9+y9] by A12,Def1; hence thesis; end; suppose not(x in REAL+ & z in REAL+) & not(x in REAL+ & z in [:{0}, REAL+:]) & not(z in REAL+ & x in [:{0},REAL+:]); then ex x9,z9 being Element of REAL+ st x = [0,x9] & z = [0,z9] & 0 = [0 ,x9+z9] by A13,Def1; hence thesis; end; end; involutiveness; func inv x -> Element of REAL means :Def4: *(x,it) = 1 if x <> 0 otherwise it = 0; existence proof thus x <> 0 implies ex y st *(x,y) = 1 proof A46: x in REAL+ \/ [:{0},REAL+:] by NUMBERS:def 1,XBOOLE_0:def 5; assume A47: x <> 0; per cases by A46,XBOOLE_0:def 3; suppose x in REAL+; then reconsider x9 = x as Element of REAL+; consider y9 being Element of REAL+ such that A48: x9 *' y9 = 1 by A47,ARYTM_2:14; y9 in REAL+; then reconsider y = y9 as Element of REAL by Th1; take y; thus thesis by A48,Def2; end; suppose A49: x in [:{0},REAL+:]; not x in {[0,0]} by NUMBERS:def 1,XBOOLE_0:def 5; then A50: x <> [0,0] by TARSKI:def 1; consider x1,x2 being set such that x1 in {0} and A51: x2 in REAL+ and A52: x = [x1,x2] by A49,ZFMISC_1:84; reconsider x2 as Element of REAL+ by A51; x1 in {0} by A49,A52,ZFMISC_1:87; then x2 <> 0 by A52,A50,TARSKI:def 1; then consider y2 being Element of REAL+ such that A53: x2 *' y2 = 1 by ARYTM_2:14; A54: now assume [0,y2] in {[0,0]}; then [0,y2] = [0,0] by TARSKI:def 1; then y2 = 0 by XTUPLE_0:1; hence contradiction by A53,ARYTM_2:4; end; A55: [0,y2] in [:{0},REAL+:] by Lm1,ZFMISC_1:87; then [0,y2] in REAL+ \/ [:{0},REAL+:] by XBOOLE_0:def 3; then reconsider y = [0,y2] as Element of REAL by A54,NUMBERS:def 1 ,XBOOLE_0:def 5; take y; consider x9,y9 being Element of REAL+ such that A56: x = [0,x9] and A57: y = [0,y9] and A58: *(x,y) = y9 *' x9 by A49,A55,Def2; y9 = y2 by A57,XTUPLE_0:1; hence thesis by A52,A53,A56,A58,XTUPLE_0:1; end; end; thus thesis; end; uniqueness proof let y,z be Element of REAL; thus x <> 0 & *(x,y) = 1 & *(x,z) = 1 implies y = z proof assume that A59: x <> 0 and A60: *(x,y) = 1 and A61: *(x,z) = 1; A62: for x,y being Element of REAL st *(x,y) =1 holds x <> 0 proof let x,y be Element of REAL such that A63: *(x,y) =1 and A64: x = 0; A65: not x in [:{0},REAL+:] by A64,Th5,ARYTM_2:20,XBOOLE_0:3; A66: y in REAL+ \/ [:{0},REAL+:] by NUMBERS:def 1,XBOOLE_0:def 5; per cases by A66,XBOOLE_0:def 3; suppose y in REAL+; then ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & 1 = x9 *' y9 by A63,A64,Def2,ARYTM_2:20; hence contradiction by A64,ARYTM_2:4; end; suppose y in [:{0},REAL+:]; then not y in REAL+ by Th5,XBOOLE_0:3; hence contradiction by A63,A64,A65,Def2; end; end; then A67: y <> 0 by A60; A68: z <> 0 by A61,A62; per cases; suppose x in REAL+ & y in REAL+ & z in REAL+; then ( ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & 1 = x9 *' y9)& ex x9,y9 being Element of REAL+ st x = x9 & z = y9 & 1 = x9 *' y9 by A60 ,A61,Def2; hence thesis by A59,Th7; end; suppose that A69: x in [:{0},REAL+:] and A70: y in [:{0},REAL+:] and A71: z in [:{0},REAL+:]; consider x9,y9 being Element of REAL+ such that A72: x = [0,x9] and A73: y = [0,y9] & 1 = y9 *' x9 by A60,A69,A70,Def2; consider x99,z9 being Element of REAL+ such that A74: x = [0,x99] and A75: z = [0,z9] & 1 = z9 *' x99 by A61,A69,A71,Def2; x9 = x99 by A72,A74,XTUPLE_0:1; hence thesis by A72,A73,A75,Th3,Th7; end; suppose x in REAL+ & y in [:{0},REAL+:]; then ex x9,y9 being Element of REAL+ st x = x9 & y = [0,y9] & 1 = [0, x9 *' y9] by A59,A60,Def2; hence thesis by Lm2; end; suppose x in [:{0},REAL+:] & y in REAL+; then ex x9,y9 being Element of REAL+ st x = [0,x9] & y = y9 & 1 = [0, y9 *' x9] by A60,A67,Def2; hence thesis by Lm2; end; suppose x in [:{0},REAL+:] & z in REAL+; then ex x9,z9 being Element of REAL+ st x = [0,x9] & z = z9 & 1 = [0, z9 *' x9] by A61,A68,Def2; hence thesis by Lm2; end; suppose x in REAL+ & z in [:{0},REAL+:]; then ex x9,z9 being Element of REAL+ st x = x9 & z = [0,z9] & 1 = [0, x9 *' z9] by A59,A61,Def2; hence thesis by Lm2; end; suppose not (x in REAL+ & y in REAL+) & not (x in REAL+ & y in [:{0} ,REAL+:] & x <> 0) & not (y in REAL+ & x in [:{0},REAL+:] & y <> 0) & not (x in [:{0},REAL+:] & y in [:{0},REAL+:]); hence thesis by A60,Def2; end; suppose not (x in REAL+ & z in REAL+) & not (x in REAL+ & z in [:{0} ,REAL+:] & x <> 0) & not (z in REAL+ & x in [:{0},REAL+:] & z <> 0) & not (x in [:{0},REAL+:] & z in [:{0},REAL+:]); hence thesis by A61,Def2; end; end; thus thesis; end; consistency; involutiveness proof let x,y be Element of REAL; assume that A76: y <> 0 implies *(y,x) = 1 and A77: y = 0 implies x = 0; thus x <> 0 implies *(x,y) = 1 by A76,A77; assume A78: x = 0; A79: y in REAL+ \/ [:{0},REAL+:] by NUMBERS:def 1,XBOOLE_0:def 5; assume A80: y <> 0; per cases by A79,XBOOLE_0:def 3; suppose y in REAL+; then ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & 1 = x9 *' y9 by A76,A78,A80,Def2,ARYTM_2:20; hence contradiction by A78,ARYTM_2:4; end; suppose A81: y in [:{0},REAL+:]; A82: not x in [:{0},REAL+:] by A78,Th5,ARYTM_2:20,XBOOLE_0:3; not y in REAL+ by A81,Th5,XBOOLE_0:3; hence contradiction by A76,A78,A80,A82,Def2; end; end; end; begin Lm3: for x,y,z being set st [x,y] = {z} holds z = {x} & x = y proof let x,y,z be set; assume [x,y] = {z}; then A1: {{x,y},{x}} = {z} by TARSKI:def 5; then {x} in {z} by TARSKI:def 2; hence A2: z = {x} by TARSKI:def 1; {x,y} in {z} by A1,TARSKI:def 2; then {x,y} = z by TARSKI:def 1; hence thesis by A2,ZFMISC_1:5; end; reserve i,j,k for Element of NAT; reserve a,b for Element of REAL; theorem Th8: not (0,1)-->(a,b) in REAL proof set IR = { A where A is Subset of RAT+: for r being Element of RAT+ st r in A holds (for s being Element of RAT+ st s <=' r holds s in A) & ex s being Element of RAT+ st s in A & r < s}; set f = (0,1)-->(a,b); A1: now f = {[0,a],[1,b]} by FUNCT_4:67; then A2: [1,b] in f by TARSKI:def 2; assume f in [:{{}},REAL+:]; then consider x,y being set such that A3: x in {{}} and y in REAL+ and A4: f = [x,y] by ZFMISC_1:84; x = 0 by A3,TARSKI:def 1; then f = {{0,y},{0}} by A4,TARSKI:def 5; then A5: [1,b] = {0} or [1,b] = {0,y} by A2,TARSKI:def 2; per cases by A5,TARSKI:def 5; suppose {{1,b},{1}} = {0}; then 0 in {{1,b},{1}} by TARSKI:def 1; hence contradiction by TARSKI:def 2; end; suppose {{1,b},{1}} = {0,y}; then 0 in {{1,b},{1}} by TARSKI:def 2; hence contradiction by TARSKI:def 2; end; end; A6: f = {[0,a],[1,b]} by FUNCT_4:67; now assume f in {[i,j]: i,j are_relative_prime & j <> {}}; then consider i,j such that A7: f = [i,j] and i,j are_relative_prime and j <> {}; A8: f = {{i,j},{i}} by A7,TARSKI:def 5; then A9: {i} in f & {i,j} in f by TARSKI:def 2; A10: now assume i = j; then {i} = {i,j} by ENUMSET1:29; then A11: [i,j] = {{i}} by A7,A8,ENUMSET1:29; then [1,b] in {{i}} by A6,A7,TARSKI:def 2; then A12: [1,b] = {i} by TARSKI:def 1; [0,a] in {{i}} by A6,A7,A11,TARSKI:def 2; then [0,a] = {i} by TARSKI:def 1; hence contradiction by A12,XTUPLE_0:1; end; A13: [1,b] = {{1,b},{1}} by TARSKI:def 5; A14: [0,a] = {{0,a},{0}} by TARSKI:def 5; per cases by A6,A9,TARSKI:def 2; suppose {i,j} = [0,a] & {i} = [0,a]; hence contradiction by A10,ZFMISC_1:5; end; suppose that A15: {i,j} = [0,a] and A16: {i} = [1,b]; i in [0,a] by A15,TARSKI:def 2; then i = {0,a} or i = {0} by A14,TARSKI:def 2; then A17: 0 in i by TARSKI:def 1,def 2; i = {1} by A16,Lm3; hence contradiction by A17,TARSKI:def 1; end; suppose that A18: {i,j} = [1,b] and A19: {i} = [0,a]; i in [1,b] by A18,TARSKI:def 2; then i = {1,b} or i = {1} by A13,TARSKI:def 2; then A20: 1 in i by TARSKI:def 1,def 2; i = {0} by A19,Lm3; hence contradiction by A20,TARSKI:def 1; end; suppose {i,j} = [1,b] & {i} = [1,b]; hence contradiction by A10,ZFMISC_1:5; end; end; then A21: not f in {[i,j]: i,j are_relative_prime & j <> {}} \ {[k,1]: not contradiction}; not ex x,y being set st {[0,x],[1,y]} in IR proof given x,y being set such that A22: {[0,x],[1,y]} in IR; consider A being Subset of RAT+ such that A23: {[0,x],[1,y]} = A and A24: for r being Element of RAT+ st r in A holds (for s being Element of RAT+ st s <=' r holds s in A) & ex s being Element of RAT+ st s in A & r < s by A22; [0,x] in A & for r,s being Element of RAT+ st r in A & s <=' r holds s in A by A23,A24,TARSKI:def 2; then consider r1,r2,r3 being Element of RAT+ such that A25: r1 in A and A26: r2 in A and A27: r3 in A & r1 <> r2 & r2 <> r3 & r3 <> r1 by ARYTM_3:75; A28: r2 = [0,x] or r2 = [1,y] by A23,A26,TARSKI:def 2; r1 = [0,x] or r1 = [1,y] by A23,A25,TARSKI:def 2; hence contradiction by A23,A27,A28,TARSKI:def 2; end; then A29: not f in DEDEKIND_CUTS by A6,ARYTM_2:def 1; now assume f in omega; then {} in f by ORDINAL3:8; hence contradiction by A6,TARSKI:def 2; end; then not f in RAT+ by A21,XBOOLE_0:def 3; then not f in REAL+ by A29,ARYTM_2:def 2,XBOOLE_0:def 3; hence thesis by A1,NUMBERS:def 1,XBOOLE_0:def 3; end; definition let x,y be Element of REAL; func [*x,y*] -> Element of COMPLEX equals :Def5: x if y = 0 otherwise (0,1) --> (x,y); consistency; coherence proof set z = (0,1)-->(x,y); thus y = 0 implies x is Element of COMPLEX by NUMBERS:def 2,XBOOLE_0:def 3; assume A1: y <> 0; A2: now assume z in { r where r is Element of Funcs({0,1},REAL): r.1 = 0 }; then ex r being Element of Funcs({0,1},REAL) st z = r & r.1 = 0; hence contradiction by A1,FUNCT_4:63; end; z in Funcs({0,1},REAL) by FUNCT_2:8; then z in Funcs({0,1},REAL) \ { r where r is Element of Funcs({0,1},REAL): r.1 = 0} by A2,XBOOLE_0:def 5; hence thesis by NUMBERS:def 2,XBOOLE_0:def 3; end; end; theorem for c being Element of COMPLEX ex r,s being Element of REAL st c = [*r ,s*] proof let c be Element of COMPLEX; per cases; suppose c in REAL; then reconsider r=c, z=0 as Element of REAL; take r,z; thus thesis by Def5; end; suppose not c in REAL; then A1: c in Funcs({0,1},REAL) \ { x where x is Element of Funcs({0,1},REAL): x.1 = 0} by NUMBERS:def 2,XBOOLE_0:def 3; then consider f being Function such that A2: c = f and A3: dom f = {0,1} and A4: rng f c= REAL by FUNCT_2:def 2; 1 in {0,1} by TARSKI:def 2; then A5: f.1 in rng f by A3,FUNCT_1:3; 0 in {0,1} by TARSKI:def 2; then f.0 in rng f by A3,FUNCT_1:3; then reconsider r = f.0, s = f.1 as Element of REAL by A4,A5; take r,s; A6: c = (0,1)-->(r,s) by A2,A3,FUNCT_4:66; now assume s = 0; then (0,1)-->(r,s).1 = 0 by FUNCT_4:63; then c in { x where x is Element of Funcs({0,1},REAL): x.1 = 0} by A1,A6; hence contradiction by A1,XBOOLE_0:def 5; end; hence thesis by A6,Def5; end; end; theorem for x1,x2,y1,y2 being Element of REAL st [*x1,x2*] = [*y1,y2*] holds x1 = y1 & x2 = y2 proof let x1,x2,y1,y2 be Element of REAL such that A1: [*x1,x2*] = [*y1,y2*]; per cases; suppose A2: x2 = 0; then A3: [*x1,x2*] = x1 by Def5; A4: now assume y2 <> 0; then x1 = (0,1) --> (y1,y2) by A1,A3,Def5; hence contradiction by Th8; end; hence x1 = y1 by A1,A3,Def5; thus thesis by A2,A4; end; suppose x2 <> 0; then A5: [*y1,y2*] = (0,1) --> (x1,x2) by A1,Def5; now assume y2 = 0; then [*y1,y2*] = y1 by Def5; hence contradiction by A5,Th8; end; then [*y1,y2*] = (0,1) --> (y1,y2) by Def5; hence thesis by A5,FUNCT_4:68; end; end; set RR = [:{0},REAL+:] \ {[0,0]}; reconsider o = 0 as Element of REAL; theorem Th11: for x,o being Element of REAL st o = 0 holds +(x,o) = x proof reconsider y9 = 0 as Element of REAL+ by ARYTM_2:20; let x,o being Element of REAL such that A1: o = 0; per cases; suppose x in REAL+; then reconsider x9 = x as Element of REAL+; x9 = x9 + y9 by ARYTM_2:def 8; hence thesis by A1,Def1; end; suppose A2: not x in REAL+; x in REAL+ \/ [:{{}},REAL+:] by NUMBERS:def 1,XBOOLE_0:def 5; then A3: x in [:{{}},REAL+:] by A2,XBOOLE_0:def 3; then consider x1,x2 being set such that A4: x1 in {{}} and A5: x2 in REAL+ and A6: x = [x1,x2] by ZFMISC_1:84; reconsider x9 = x2 as Element of REAL+ by A5; A7: x1 = 0 by A4,TARSKI:def 1; then x = y9 - x9 by A6,Th3,ARYTM_1:19; hence thesis by A1,A3,A6,A7,Def1; end; end; theorem Th12: for x,o being Element of REAL st o = 0 holds *(x,o) = 0 proof let x,o being Element of REAL such that A1: o = 0; per cases; suppose x in REAL+; then reconsider x9 = x, y9 = 0 as Element of REAL+ by ARYTM_2:20; 0 = x9 *' y9 by ARYTM_2:4; hence thesis by A1,Def2; end; suppose A2: not x in REAL+; not o in [:{{}},REAL+:] by A1,Th5,ARYTM_2:20,XBOOLE_0:3; hence thesis by A1,A2,Def2; end; end; theorem Th13: for x,y,z being Element of REAL holds *(x,*(y,z)) = *(*(x,y),z) proof let x,y,z be Element of REAL; per cases; suppose that A1: x in REAL+ and A2: y in REAL+ and A3: z in REAL+; A4: ex x99,y99 being Element of REAL+ st x = x99 & y = y99 & *(x,y) = x99 *' y99 by A1,A2,Def2; then A5: ex xy99,z99 being Element of REAL+ st *(x,y) = xy99 & z = z99 & *(*(x,y ),z) = xy99 *' z99 by A3,Def2; A6: ex y9,z9 being Element of REAL+ st y = y9 & z = z9 & *( y,z) = y9 *' z9 by A2,A3,Def2; then ex x9,yz9 being Element of REAL+ st x = x9 & *(y,z) = yz9 & *(x,*(y,z)) = x9 *' yz9 by A1,Def2; hence thesis by A6,A4,A5,ARYTM_2:12; end; suppose that A7: x in REAL+ & x <> 0 and A8: y in RR and A9: z in REAL+ & z <> 0; consider y9,z9 being Element of REAL+ such that A10: y = [0,y9] and A11: z = z9 and A12: *(y,z) = [0,z9 *' y9] by A8,A9,Def2; *(y,z) in [:{0},REAL+:] by A12,Lm1,ZFMISC_1:87; then consider x9,yz9 being Element of REAL+ such that A13: x = x9 and A14: *(y,z) = [0,yz9] & *(x,*(y,z) ) = [0,x9 *' yz9] by A7,Def2; consider x99,y99 being Element of REAL+ such that A15: x = x99 and A16: y = [0,y99] and A17: *(x,y) = [0,x99 *' y99] by A7,A8,Def2; A18: y9 = y99 by A10,A16,XTUPLE_0:1; *(x,y) in [:{0},REAL+:] by A17,Lm1,ZFMISC_1:87; then consider xy99,z99 being Element of REAL+ such that A19: *(x,y) = [0,xy99] and A20: z = z99 and A21: *(*(x,y),z) = [0,z99 *' xy99] by A9,Def2; thus *(x,*(y,z)) = [0,x9 *' (y9 *' z9)] by A12,A14,XTUPLE_0:1 .= [0,(x99 *' y99) *' z99] by A11,A13,A15,A20,A18,ARYTM_2:12 .= *(*(x,y),z) by A17,A19,A21,XTUPLE_0:1; end; suppose that A22: x in RR and A23: y in REAL+ & y <> 0 and A24: z in REAL+ & z <> 0; consider y9,z9 being Element of REAL+ such that A25: y = y9 & z = z9 and A26: *(y,z) = y9 *' z9 by A23,A24,Def2; y9 *' z9 <> 0 by A23,A24,A25,ARYTM_1:2; then consider x9,yz9 being Element of REAL+ such that A27: x = [0,x9] and A28: *(y,z) = yz9 & *(x,*(y,z)) = [0,yz9 *' x9] by A22,A26,Def2; consider x99,y99 being Element of REAL+ such that A29: x = [0,x99] and A30: y = y99 and A31: *(x,y) = [0,y99 *' x99] by A22,A23,Def2; *(x,y) in [:{0},REAL+:] by A31,Lm1,ZFMISC_1:87; then consider xy99,z99 being Element of REAL+ such that A32: *(x,y) = [0,xy99] and A33: z = z99 and A34: *(*(x,y),z) = [0,z99 *' xy99] by A24,Def2; x9 = x99 by A27,A29,XTUPLE_0:1; hence *(x,*(y,z)) = [0,(x99 *' y99) *' z99] by A25,A26,A28,A30,A33, ARYTM_2:12 .= *(*(x,y),z) by A31,A32,A34,XTUPLE_0:1; end; suppose that A35: x in RR and A36: y in RR and A37: z in REAL+ & z <> 0; consider x99,y99 being Element of REAL+ such that A38: x = [0,x99] and A39: y = [0,y99] and A40: *(x,y) = y99 *' x99 by A35,A36,Def2; consider y9,z9 being Element of REAL+ such that A41: y = [0,y9] and A42: z = z9 and A43: *(y,z) = [0,z9 *' y9] by A36,A37,Def2; A44: y9 = y99 by A41,A39,XTUPLE_0:1; *(y,z) in [:{0},REAL+:] by A43,Lm1,ZFMISC_1:87; then consider x9,yz9 being Element of REAL+ such that A45: x = [0,x9] and A46: *(y,z) = [0,yz9] & *(x,*(y,z)) = yz9 *' x9 by A35,Def2; A47: x9 = x99 by A45,A38,XTUPLE_0:1; A48: ex xy99,z99 being Element of REAL+ st *(x,y) = xy99 & z = z99 & *(*(x, y),z) = xy99 *' z99 by A37,A40,Def2; thus *(x,*(y,z)) = x9 *' (y9 *' z9) by A43,A46,XTUPLE_0:1 .= *(*(x,y),z) by A42,A40,A48,A47,A44,ARYTM_2:12; end; suppose that A49: x in REAL+ & x <> 0 and A50: y in REAL+ & y <> 0 and A51: z in RR; A52: ex x99,y99 being Element of REAL+ st x = x99 & y = y99 & *(x,y) = x99 *' y99 by A49,A50,Def2; then *(x,y) <> 0 by A49,A50,ARYTM_1:2; then consider xy99,z99 being Element of REAL+ such that A53: *(x,y) = xy99 and A54: z = [0,z99] and A55: *(*(x,y),z) = [0,xy99 *' z99] by A51,A52,Def2; consider y9,z9 being Element of REAL+ such that A56: y = y9 and A57: z = [0,z9] and A58: *(y,z) = [0,y9 *' z9] by A50,A51,Def2; A59: z9 = z99 by A57,A54,XTUPLE_0:1; *(y,z) in [:{0},REAL+:] by A58,Lm1,ZFMISC_1:87; then consider x9,yz9 being Element of REAL+ such that A60: x = x9 and A61: *(y,z) = [0,yz9] & *(x,*(y,z)) = [0,x9 *' yz9] by A49,Def2; thus *(x,*(y,z)) = [0,x9 *' (y9 *' z9)] by A58,A61,XTUPLE_0:1 .= *(*(x,y),z) by A56,A60,A52,A53,A55,A59,ARYTM_2:12; end; suppose that A62: x in REAL+ & x <> 0 and A63: y in RR and A64: z in RR; consider y9,z9 being Element of REAL+ such that A65: y = [0,y9] and A66: z = [0,z9] and A67: *(y,z) = z9 *' y9 by A63,A64,Def2; A68: ex x9,yz9 being Element of REAL+ st x = x9 & *(y,z) = yz9 & *(x,*(y,z) ) = x9 *' yz9 by A62,A67,Def2; consider x99,y99 being Element of REAL+ such that A69: x = x99 and A70: y = [0,y99] and A71: *(x,y) = [0,x99 *' y99] by A62,A63,Def2; A72: y9 = y99 by A65,A70,XTUPLE_0:1; *(x,y) in [:{0},REAL+:] by A71,Lm1,ZFMISC_1:87; then consider xy99,z99 being Element of REAL+ such that A73: *(x,y) = [0,xy99] and A74: z = [0,z99] and A75: *(*(x,y),z) = z99 *' xy99 by A64,Def2; z9 = z99 by A66,A74,XTUPLE_0:1; hence *(x,*(y,z)) = (x99 *' y99) *' z99 by A67,A68,A69,A72,ARYTM_2:12 .= *(*(x,y),z) by A71,A73,A75,XTUPLE_0:1; end; suppose that A76: y in REAL+ & y <> 0 and A77: x in RR and A78: z in RR; consider x99,y99 being Element of REAL+ such that A79: x = [0,x99] and A80: y = y99 and A81: *(x,y) = [0,y99 *' x99] by A76,A77,Def2; consider y9,z9 being Element of REAL+ such that A82: y = y9 and A83: z = [0,z9] and A84: *(y,z) = [0,y9 *' z9] by A76,A78,Def2; [0,y9 *' z9] in [:{0},REAL+:] by Lm1,ZFMISC_1:87; then consider x9,yz9 being Element of REAL+ such that A85: x = [0,x9] and A86: *(y,z) = [0,yz9] & *(x,*(y,z)) = yz9 *' x9 by A77,A84,Def2; A87: x9 = x99 by A85,A79,XTUPLE_0:1; *(x,y) in [:{0},REAL+:] by A81,Lm1,ZFMISC_1:87; then consider xy99,z99 being Element of REAL+ such that A88: *(x,y) = [0,xy99] and A89: z = [0,z99] and A90: *(*(x,y),z) = z99 *' xy99 by A78,Def2; A91: z9 = z99 by A83,A89,XTUPLE_0:1; thus *(x,*(y,z)) = x9 *' (y9 *' z9) by A84,A86,XTUPLE_0:1 .= (x99 *' y99) *' z99 by A82,A80,A87,A91,ARYTM_2:12 .= *(*(x,y),z) by A81,A88,A90,XTUPLE_0:1; end; suppose that A92: x in RR and A93: y in RR and A94: z in RR; consider y9,z9 being Element of REAL+ such that A95: y = [0,y9] and A96: z = [0,z9] and A97: *(y,z) = z9 *' y9 by A93,A94,Def2; not y in {[0,0]} by A93,XBOOLE_0:def 5; then A98: y9 <> 0 by A95,TARSKI:def 1; not z in {[0,0]} by A94,XBOOLE_0:def 5; then z9 <> 0 by A96,TARSKI:def 1; then *(z,y) <> 0 by A97,A98,ARYTM_1:2; then consider x9,yz9 being Element of REAL+ such that A99: x = [0,x9] and A100: *(y,z) = yz9 & *(x,*(y,z)) = [0,yz9 *' x9] by A92,A97,Def2; consider x99,y99 being Element of REAL+ such that A101: x = [0,x99] and A102: y = [0,y99] and A103: *(x,y) = y99 *' x99 by A92,A93,Def2; A104: x9 = x99 by A99,A101,XTUPLE_0:1; A105: y9 = y99 by A95,A102,XTUPLE_0:1; not y in {[0,0]} by A93,XBOOLE_0:def 5; then A106: y9 <> 0 by A95,TARSKI:def 1; not x in {[0,0]} by A92,XBOOLE_0:def 5; then x9 <> 0 by A99,TARSKI:def 1; then *(x,y) <> 0 by A103,A104,A105,A106,ARYTM_1:2; then consider xy99,z99 being Element of REAL+ such that A107: *(x,y) = xy99 and A108: z = [0,z99] and A109: *(*(x,y),z) = [0,xy99 *' z99] by A94,A103,Def2; z9 = z99 by A96,A108,XTUPLE_0:1; hence thesis by A97,A100,A103,A104,A105,A107,A109,ARYTM_2:12; end; suppose A110: x = 0; hence *(x,*(y,z)) = 0 by Th12 .= *(o,z) by Th12 .= *(*(x,y),z) by A110,Th12; end; suppose A111: y = 0; hence *(x,*(y,z)) = *(x,o) by Th12 .= 0 by Th12 .= *(o,z) by Th12 .= *(*(x,y),z) by A111,Th12; end; suppose A112: z = 0; hence *(x,*(y,z)) = *(x,o) by Th12 .= 0 by Th12 .= *(*(x,y),z) by A112,Th12; end; suppose A113: not( x in REAL+ & y in REAL+ & z in REAL+) & not(x in REAL+ & y in RR & z in REAL+) & not(y in REAL+ & x in RR & z in REAL+) & not(x in RR & y in RR & z in REAL+) & not( x in REAL+ & y in REAL+ & z in RR) & not(x in REAL+ & y in RR & z in RR) & not(y in REAL+ & x in RR & z in RR) & not(x in RR & y in RR & z in RR); A114: not [0,0] in REAL+ by ARYTM_2:3; REAL = (REAL+ \ {[{},{}]}) \/ ([:{{}},REAL+:] \ {[{},{}]}) by NUMBERS:def 1 ,XBOOLE_1:42 .= REAL+ \/ RR by A114,ZFMISC_1:57; hence thesis by A113,XBOOLE_0:def 3; end; end; theorem Th14: for x,y,z being Element of REAL holds *(x,+(y,z)) = +(*(x,y),*(x ,z)) proof let x,y,z be Element of REAL; per cases; suppose A1: x = 0; hence *(x,+(y,z)) = 0 by Th12 .= +(o,o) by Th11 .= +(*(x,y),o) by A1,Th12 .= +(*(x,y),*(x,z)) by A1,Th12; end; suppose that A2: x in REAL+ and A3: y in REAL+ & z in REAL+; A4: (ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & *( x,y) = x9 *' y9 )& ex x99,z9 being Element of REAL+ st x = x99 & z = z9 & *(x,z) = x99 *' z9 by A2,A3,Def2; then A5: ex xy9,xz9 being Element of REAL+ st *(x,y) = xy9 & *(x, z) = xz9 & +(* (x,y),*(x,z)) = xy9 + xz9 by Def1; A6: ex y99,z99 being Element of REAL+ st y = y99 & z = z99 & +(y,z) = y99 + z99 by A3,Def1; then ex x999,yz9 being Element of REAL+ st x = x999 & +(y,z) = yz9 & *(x,+(y ,z)) = x999 *' yz9 by A2,Def2; hence thesis by A4,A5,A6,ARYTM_2:13; end; suppose that A7: x in REAL+ & x <> 0 and A8: y in REAL+ and A9: z in RR; consider y99,z99 being Element of REAL+ such that A10: y = y99 and A11: z = [0,z99] and A12: +(y,z) = y99 - z99 by A8,A9,Def1; consider x9,y9 being Element of REAL+ such that A13: x = x9 & y = y9 and A14: *(x,y) = x9 *' y9 by A7,A8,Def2; consider x99,z9 being Element of REAL+ such that A15: x = x99 and A16: z = [0,z9] and A17: *(x,z) = [0,x99 *' z9] by A7,A9,Def2; *(x,z) in [:{0},REAL+:] by A17,Lm1,ZFMISC_1:87; then A18: ex xy9,xz9 being Element of REAL+ st *(x,y) = xy9 & *(x, z) = [0,xz9] & +(*(x,y),*(x,z)) = xy9 - xz9 by A14,Def1; A19: z9 = z99 by A16,A11,XTUPLE_0:1; now per cases; suppose A20: z99 <=' y99; then A21: +(y,z) = y99 -' z99 by A12,ARYTM_1:def 2; then ex x999,yz9 being Element of REAL+ st x = x999 & +(y,z) = yz9 & *( x,+(y,z)) = x999 *' yz9 by A7,Def2; hence *(x,+(y,z)) = (x9 *' y9) - (x99 *' z9) by A13,A15,A10,A19,A20,A21, ARYTM_1:26 .= +(*(x,y),*(x,z)) by A14,A17,A18,XTUPLE_0:1; end; suppose A22: not z99 <=' y99; then A23: +(y,z) = [0,z99 -' y99] by A12,ARYTM_1:def 2; then +(y,z) in [:{0},REAL+:] by Lm1,ZFMISC_1:87; then consider x999,yz9 being Element of REAL+ such that A24: x = x999 and A25: +(y,z) = [0,yz9] & *(x,+(y,z)) = [0,x999 *' yz9] by A7,Def2; thus *(x,+(y,z)) = [0,x999 *' (z99 -' y99)] by A23,A25,XTUPLE_0:1 .= (x9 *' y9) - (x99 *' z9) by A7,A13,A15,A10,A19,A22,A24,ARYTM_1:27 .= +(*(x,y),*(x,z)) by A14,A17,A18,XTUPLE_0:1; end; end; hence thesis; end; suppose that A26: x in REAL+ & x <> 0 and A27: z in REAL+ and A28: y in RR; consider z99,y99 being Element of REAL+ such that A29: z = z99 and A30: y = [0,y99] and A31: +(z,y) = z99 - y99 by A27,A28,Def1; consider x9,z9 being Element of REAL+ such that A32: x = x9 & z = z9 and A33: *(x,z) = x9 *' z9 by A26,A27,Def2; consider x99,y9 being Element of REAL+ such that A34: x = x99 and A35: y = [0,y9] and A36: *(x,y) = [0,x99 *' y9] by A26,A28,Def2; *(x,y) in [:{0},REAL+:] by A36,Lm1,ZFMISC_1:87; then A37: ex xz9,xy9 being Element of REAL+ st *(x,z) = xz9 & *(x, y) = [0,xy9] & +(*(x,z),*(x,y)) = xz9 - xy9 by A33,Def1; A38: y9 = y99 by A35,A30,XTUPLE_0:1; now per cases; suppose A39: y99 <=' z99; then A40: +(z,y) = z99 -' y99 by A31,ARYTM_1:def 2; then ex x999,zy9 being Element of REAL+ st x = x999 & +(z,y) = zy9 & *( x,+(z,y)) = x999 *' zy9 by A26,Def2; hence *(x,+(z,y)) = (x9 *' z9) - (x99 *' y9) by A32,A34,A29,A38,A39,A40, ARYTM_1:26 .= +(*(x,z),*(x,y)) by A33,A36,A37,XTUPLE_0:1; end; suppose A41: not y99 <=' z99; then A42: +(z,y) = [0,y99 -' z99] by A31,ARYTM_1:def 2; then +(z,y) in [:{0},REAL+:] by Lm1,ZFMISC_1:87; then consider x999,zy9 being Element of REAL+ such that A43: x = x999 and A44: +(z,y) = [0,zy9] & *(x,+(z,y)) = [0,x999 *' zy9] by A26,Def2; thus *(x,+(z,y)) = [0,x999 *' (y99 -' z99)] by A42,A44,XTUPLE_0:1 .= (x9 *' z9) - (x99 *' y9) by A26,A32,A34,A29,A38,A41,A43,ARYTM_1:27 .= +(*(x,z),*(x,y)) by A33,A36,A37,XTUPLE_0:1; end; end; hence thesis; end; suppose that A45: x in REAL+ & x <> 0 and A46: y in RR and A47: z in RR; ( not(y in REAL+ & z in [:{0},REAL+:]))& not(y in [:{0},REAL+:] & z in REAL+) by A46,A47,Th5,XBOOLE_0:3; then consider y99,z99 being Element of REAL+ such that A48: y = [0,y99] and A49: z = [0,z99] and A50: +(y,z) = [0,y99 + z99] by A46,Def1; +(y,z) in [:{0},REAL+:] by A50,Lm1,ZFMISC_1:87; then consider x999,yz9 being Element of REAL+ such that A51: x = x999 and A52: +(y,z) = [0,yz9] & *(x,+(y,z)) = [0,x999 *' yz9] by A45,Def2; consider x9,y9 being Element of REAL+ such that A53: x = x9 and A54: y = [0,y9] and A55: *(x,y) = [0,x9 *' y9] by A45,A46,Def2; A56: y9 = y99 by A54,A48,XTUPLE_0:1; consider x99,z9 being Element of REAL+ such that A57: x = x99 and A58: z = [0,z9] and A59: *(x,z) = [0,x99 *' z9] by A45,A47,Def2; *(x,z) in [:{0},REAL+:] by A59,Lm1,ZFMISC_1:87; then A60: not(*(x,y) in [:{0},REAL+:] & *(x,z) in REAL+) by Th5,XBOOLE_0:3; *(x,y) in [:{0},REAL+:] by A55,Lm1,ZFMISC_1:87; then not(*(x,y) in REAL+ & *(x,z) in [:{0},REAL+:]) by Th5,XBOOLE_0:3; then consider xy9,xz9 being Element of REAL+ such that A61: *(x,y) = [0,xy9] and A62: *(x,z) = [0,xz9] & +(*(x,y),*(x,z)) = [0,xy9 + xz9] by A55,A60,Def1,Lm1, ZFMISC_1:87; A63: xy9 = x9 *' y9 by A55,A61,XTUPLE_0:1; A64: z9 = z99 by A58,A49,XTUPLE_0:1; thus *(x,+(y,z)) = [0,x999 *' (y99 + z99)] by A50,A52,XTUPLE_0:1 .= [0,(x9 *' y9) + (x9 *' z9)] by A53,A51,A56,A64,ARYTM_2:13 .= +(*(x,y),*(x,z)) by A53,A57,A59,A62,A63,XTUPLE_0:1; end; suppose that A65: x in RR and A66: y in REAL+ and A67: z in REAL+; consider y99,z99 being Element of REAL+ such that A68: y = y99 and A69: z = z99 and A70: +(y,z) = y99 + z99 by A66,A67,Def1; now per cases; suppose that A71: y <> 0 and A72: z <> 0; consider x99,z9 being Element of REAL+ such that A73: x = [0,x99] and A74: z = z9 and A75: *(x,z) = [0,z9 *' x99] by A65,A67,A72,Def2; y99 + z99 <> 0 by A69,A72,ARYTM_2:5; then consider x999,yz9 being Element of REAL+ such that A76: x = [0,x999] and A77: +(y,z) = yz9 & *(x,+(y,z)) = [0,yz9 *' x999] by A65,A70,Def2; consider x9,y9 being Element of REAL+ such that A78: x = [0,x9] and A79: y = y9 and A80: *(x,y) = [0,y9 *' x9] by A65,A66,A71,Def2; A81: x99 = x999 by A73,A76,XTUPLE_0:1; *(x,z) in [:{0},REAL+:] by A75,Lm1,ZFMISC_1:87; then A82: not(*(x,y) in [:{0},REAL+:] & *(x,z) in REAL+) by Th5,XBOOLE_0:3; *(x,y) in [:{0},REAL+:] by A80,Lm1,ZFMISC_1:87; then not(*(x,y) in REAL+ & *(x,z) in [:{0},REAL+:]) by Th5,XBOOLE_0:3; then consider xy9,xz9 being Element of REAL+ such that A83: *(x,y) = [0,xy9] and A84: *(x,z) = [0,xz9] & +(*(x,y),*(x,z)) = [0,xy9 + xz9] by A80,A82,Def1,Lm1 ,ZFMISC_1:87; A85: xy9 = x9 *' y9 by A80,A83,XTUPLE_0:1; x9 = x99 by A78,A73,XTUPLE_0:1; hence *(x,+(y,z)) = [0,(x9 *' y9) + (x99 *' z9)] by A68,A69,A70,A79,A74 ,A77,A81,ARYTM_2:13 .= +(*(x,y),*(x,z)) by A75,A84,A85,XTUPLE_0:1; end; suppose A86: x = 0; hence *(x,+(y,z)) = 0 by Th12 .= +(o,o) by Th11 .= +(*(x,y),o) by A86,Th12 .= +(*(x,y),*(x,z)) by A86,Th12; end; suppose A87: z = 0; hence *(x,+(y,z)) = *(x,y) by Th11 .= +(*(x,y),*(x,z)) by A87,Th11,Th12; end; suppose A88: y = 0; hence *(x,+(y,z)) = *(x,z) by Th11 .= +(*(x,y),*(x,z)) by A88,Th11,Th12; end; end; hence thesis; end; suppose that A89: x in RR and A90: y in REAL+ and A91: z in RR; consider x99,z9 being Element of REAL+ such that A92: x = [0,x99] and A93: z = [0,z9] and A94: *(x,z) = z9 *' x99 by A89,A91,Def2; now per cases; suppose y <> 0; then consider x9,y9 being Element of REAL+ such that A95: x = [0,x9] and A96: y = y9 and A97: *(x,y) = [0,y9 *' x9] by A89,A90,Def2; *(x,y) in [:{0},REAL+:] by A97,Lm1,ZFMISC_1:87; then consider xy9,xz9 being Element of REAL+ such that A98: *(x,y) = [0,xy9] and A99: *(x,z) = xz9 & +(*(x,y),*(x,z)) = xz9 - xy9 by A94,Def1; consider y99,z99 being Element of REAL+ such that A100: y = y99 and A101: z = [0,z99] and A102: +(y,z) = y99 - z99 by A91,A96,Def1; A103: z9 = z99 by A93,A101,XTUPLE_0:1; now per cases; suppose A104: z99 <=' y99; then A105: +(y,z) = y99 -' z99 by A102,ARYTM_1:def 2; now per cases; suppose A106: +(y,z) <> 0; then consider x999,yz9 being Element of REAL+ such that A107: x = [0,x999] and A108: +(y,z) = yz9 & *(x,+(y,z)) = [0,yz9 *' x999] by A89,A105,Def2; not x in {[0,0]} by NUMBERS:def 1,XBOOLE_0:def 5; then A109: x999 <> 0 by A107,TARSKI:def 1; A110: z9 = z99 by A93,A101,XTUPLE_0:1; A111: x9 = x99 by A92,A95,XTUPLE_0:1; x99 = x999 by A92,A107,XTUPLE_0:1; hence *(x,+(y,z)) = (x9 *' z9) - (x9 *' y9) by A96,A100,A104 ,A105,A106,A108,A111,A110,A109,ARYTM_1:28 .= +(*(x,y),*(x,z)) by A94,A97,A98,A99,A111,XTUPLE_0:1; end; suppose A112: +(y,z) = 0; then A113: y99 = z99 by A104,A105,ARYTM_1:10; A114: xy9 = x9 *' y9 & x9 = x99 by A92,A95,A97,A98,XTUPLE_0:1; thus *(x,+(y,z)) = 0 by A112,Th12 .= +(*(x,y),*(x,z)) by A94,A96,A100,A99,A103,A113,A114, ARYTM_1:18; end; end; hence thesis; end; suppose A115: not z99 <=' y99; then A116: +(y,z) = [0,z99 -' y99] by A102,ARYTM_1:def 2; then +(y,z) in [:{0},REAL+:] by Lm1,ZFMISC_1:87; then consider x999,yz9 being Element of REAL+ such that A117: x = [0,x999] and A118: +(y,z) = [0,yz9] & *(x,+(y,z)) = yz9 *' x999 by A89,Def2; A119: x99 = x999 by A92,A117,XTUPLE_0:1; A120: x9 = x99 by A92,A95,XTUPLE_0:1; thus *(x,+(y,z)) = x999 *' (z99 -' y99) by A116,A118,XTUPLE_0:1 .= (x99 *' z9) - (x9 *' y9) by A96,A100,A103,A115,A120,A119, ARYTM_1:26 .= +(*(x,y),*(x,z)) by A94,A97,A98,A99,XTUPLE_0:1; end; end; hence thesis; end; suppose A121: y = 0; hence *(x,+(y,z)) = *(x,z) by Th11 .= +(*(x,y),*(x,z)) by A121,Th11,Th12; end; end; hence thesis; end; suppose that A122: x in RR and A123: z in REAL+ and A124: y in RR; consider x99,y9 being Element of REAL+ such that A125: x = [0,x99] and A126: y = [0,y9] and A127: *(x,y) = y9 *' x99 by A122,A124,Def2; now per cases; suppose z <> 0; then consider x9,z9 being Element of REAL+ such that A128: x = [0,x9] and A129: z = z9 and A130: *(x,z) = [0,z9 *' x9] by A122,A123,Def2; *(x,z) in [:{0},REAL+:] by A130,Lm1,ZFMISC_1:87; then consider xz9,xy9 being Element of REAL+ such that A131: *(x,z) = [0,xz9] and A132: *(x,y) = xy9 & +(*(x,z),*(x,y)) = xy9 - xz9 by A127,Def1; consider z99,y99 being Element of REAL+ such that A133: z = z99 and A134: y = [0,y99] and A135: +(z,y) = z99 - y99 by A124,A129,Def1; A136: y9 = y99 by A126,A134,XTUPLE_0:1; now per cases; suppose A137: y99 <=' z99; then A138: +(z,y) = z99 -' y99 by A135,ARYTM_1:def 2; now per cases; suppose A139: +(z,y) <> 0; then consider x999,zy9 being Element of REAL+ such that A140: x = [0,x999] and A141: +(z,y) = zy9 & *(x,+(z,y)) = [0,zy9 *' x999] by A122,A138,Def2; not x in {[0,0]} by NUMBERS:def 1,XBOOLE_0:def 5; then A142: x999 <> 0 by A140,TARSKI:def 1; A143: y9 = y99 by A126,A134,XTUPLE_0:1; A144: x9 = x99 by A125,A128,XTUPLE_0:1; x99 = x999 by A125,A140,XTUPLE_0:1; hence *(x,+(z,y)) = (x9 *' y9) - (x9 *' z9) by A129,A133,A137 ,A138,A139,A141,A144,A143,A142,ARYTM_1:28 .= +(*(x,z),*(x,y)) by A127,A130,A131,A132,A144,XTUPLE_0:1; end; suppose A145: +(z,y) = 0; then A146: z99 = y99 by A137,A138,ARYTM_1:10; A147: xz9 = x9 *' z9 & x9 = x99 by A125,A128,A130,A131,XTUPLE_0:1; thus *(x,+(z,y)) = 0 by A145,Th12 .= +(*(x,z),*(x,y)) by A127,A129,A133,A132,A136,A146,A147, ARYTM_1:18; end; end; hence thesis; end; suppose A148: not y99 <=' z99; then A149: +(z,y) = [0,y99 -' z99] by A135,ARYTM_1:def 2; then +(z,y) in [:{0},REAL+:] by Lm1,ZFMISC_1:87; then consider x999,zy9 being Element of REAL+ such that A150: x = [0,x999] and A151: +(z,y) = [0,zy9] & *(x,+(z,y)) = zy9 *' x999 by A122,Def2; A152: x99 = x999 by A125,A150,XTUPLE_0:1; A153: x9 = x99 by A125,A128,XTUPLE_0:1; thus *(x,+(y,z)) = x999 *' (y99 -' z99) by A149,A151,XTUPLE_0:1 .= (x99 *' y9) - (x9 *' z9) by A129,A133,A136,A148,A153,A152, ARYTM_1:26 .= +(*(x,y),*(x,z)) by A127,A130,A131,A132,XTUPLE_0:1; end; end; hence thesis; end; suppose A154: z = 0; hence *(x,+(y,z)) = *(x,y) by Th11 .= +(*(x,y),*(x,z)) by A154,Th11,Th12; end; end; hence thesis; end; suppose that A155: x in RR and A156: y in RR and A157: z in RR; ( not(y in REAL+ & z in [:{0},REAL+:]))& not(y in [:{0},REAL+:] & z in REAL+) by A156,A157,Th5,XBOOLE_0:3; then consider y99,z99 being Element of REAL+ such that A158: y = [0,y99] and A159: z = [0,z99] and A160: +(y,z) = [0,y99 + z99] by A156,Def1; consider x99,z9 being Element of REAL+ such that A161: x = [0,x99] and A162: z = [0,z9] and A163: *(x,z) = z9 *' x99 by A155,A157,Def2; A164: z9 = z99 by A162,A159,XTUPLE_0:1; consider x9,y9 being Element of REAL+ such that A165: x = [0,x9] and A166: y = [0,y9] and A167: *(x,y) = y9 *' x9 by A155,A156,Def2; A168: y9 = y99 by A166,A158,XTUPLE_0:1; +(y,z) in [:{0},REAL+:] by A160,Lm1,ZFMISC_1:87; then consider x999,yz9 being Element of REAL+ such that A169: x = [0,x999] and A170: +(y,z) = [0,yz9] & *(x,+(y,z)) = yz9 *' x999 by A155,Def2; A171: x9 = x999 by A165,A169,XTUPLE_0:1; A172: (ex xy9,xz9 being Element of REAL+ st *(x,y) = xy9 & *(x, z) = xz9 & +(*(x, y),*(x,z)) = xy9 + xz9 )& x9 = x99 by A165,A167,A161,A163,Def1, XTUPLE_0:1; thus *(x,+(y,z)) = x999 *' (y99 + z99) by A160,A170,XTUPLE_0:1 .= +(*(x,y),*(x,z)) by A167,A163,A172,A171,A168,A164,ARYTM_2:13; end; suppose A173: not(x in REAL+ & y in REAL+ & z in REAL+) & not(x in REAL+ & y in REAL+ & z in RR) & not(x in REAL+ & y in RR & z in REAL+) & not(x in REAL+ & y in RR & z in RR) & not(x in RR & y in REAL+ & z in REAL+) & not(x in RR & y in REAL+ & z in RR) & not(x in RR & y in RR & z in REAL+) & not(x in RR & y in RR & z in RR); A174: not [0,0] in REAL+ by ARYTM_2:3; REAL = (REAL+ \ {[0,0]}) \/ ([:{0},REAL+:] \ {[0,0]}) by NUMBERS:def 1 ,XBOOLE_1:42 .= REAL+ \/ RR by A174,ZFMISC_1:57; hence thesis by A173,XBOOLE_0:def 3; end; end; theorem for x,y being Element of REAL holds *(opp x,y) = opp *(x,y) proof let x,y be Element of REAL; +(*(opp x,y),*(x,y)) = *(+(opp x,x), y) by Th14 .= *(o,y) by Def3 .= 0 by Th12; hence thesis by Def3; end; theorem Th16: for x being Element of REAL holds *(x,x) in REAL+ proof let x be Element of REAL; A1: x in REAL+ \/ [:{{}},REAL+:] by NUMBERS:def 1,XBOOLE_0:def 5; per cases by A1,XBOOLE_0:def 3; suppose x in REAL+; then ex x9,y9 being Element of REAL+ st x = x9 & x = y9 & *(x,x) = x9 *' y9 by Def2; hence thesis; end; suppose x in [:{0},REAL+:]; then ex x9,y9 being Element of REAL+ st x = [0,x9] & x = [0,y9] & *(x,x) = y9 *' x9 by Def2; hence thesis; end; end; theorem for x,y st +(*(x,x),*(y,y)) = 0 holds x = 0 proof let x,y such that A1: +(*(x,x),*(y,y)) = 0; *(x,x) in REAL+ & *(y,y) in REAL+ by Th16; then consider x9,y9 being Element of REAL+ such that A2: *(x,x) = x9 and *(y,y) = y9 and A3: 0 = x9 + y9 by A1,Def1; A4: x9 = 0 by A3,ARYTM_2:5; A5: x in REAL+ \/ [:{{}},REAL+:] by NUMBERS:def 1,XBOOLE_0:def 5; per cases by A5,XBOOLE_0:def 3; suppose x in REAL+; then ex x9,y9 being Element of REAL+ st x = x9 & x = y9 & 0 = x9 *' y9 by A2,A4,Def2; hence thesis by ARYTM_1:2; end; suppose x in [:{0},REAL+:]; then consider x9,y9 being Element of REAL+ such that A6: x = [0,x9] and A7: x = [0,y9] and A8: 0 = y9 *' x9 by A2,A4,Def2; x9 = y9 by A6,A7,XTUPLE_0:1; then x9 = 0 by A8,ARYTM_1:2; then x in {[0,0]} by A6,TARSKI:def 1; hence thesis by NUMBERS:def 1,XBOOLE_0:def 5; end; end; theorem Th18: for x,y,z being Element of REAL st x <> 0 & *(x,y) = 1 & *(x,z) = 1 holds y = z proof let x,y,z be Element of REAL; assume that A1: x <> 0 and A2: *(x,y) = 1 and A3: *(x,z) = 1; thus y = inv x by A1,A2,Def4 .= z by A1,A3,Def4; end; theorem Th19: for x,y st y = 1 holds *(x,y) = x proof let x,y such that A1: y = 1; per cases; suppose x = 0; hence thesis by Th12; end; suppose A2: x <> 0; A3: now assume A4: inv x = 0; thus 1 = *(x, inv x) by A2,Def4 .= 0 by A4,Th12; end; A5: ex x9,y9 being Element of REAL+ st y = x9 & y = y9 & *(y,y) = x9 *' y9 by A1,Def2,ARYTM_2:20; A6: *(x,inv x) = 1 by A2,Def4; *(*(x,y), inv x) = *(*(x,inv x), y) by Th13 .= *(y,y) by A1,A2,Def4 .= 1 by A1,A5,ARYTM_2:15; hence thesis by A3,A6,Th18; end; end; reconsider j = 1 as Element of REAL; theorem for x,y st y <> 0 holds *(*(x,y),inv y) = x proof let x,y such that A1: y <> 0; thus *(*(x,y),inv y) = *(x,*(y,inv y)) by Th13 .= *(x,j) by A1,Def4 .= x by Th19; end; theorem Th21: for x,y st *(x,y) = 0 holds x = 0 or y = 0 proof let x,y such that A1: *(x,y) = 0 and A2: x <> 0; A3: *(x, inv x) = 1 by A2,Def4; thus y = *(j,y) by Th19 .= *(*(x,y),inv x) by A3,Th13 .= 0 by A1,Th12; end; theorem for x,y holds inv *(x,y) = *(inv x, inv y) proof let x,y; per cases; suppose A1: x = 0 or y = 0; then A2: inv x = 0 or inv y = 0 by Def4; *(x,y) = 0 by A1,Th12; hence inv *(x,y) = 0 by Def4 .= *(inv x, inv y) by A2,Th12; end; suppose that A3: x <> 0 and A4: y <> 0; A5: *(x,y) <> 0 by A3,A4,Th21; A6: *(x,inv x) = 1 by A3,Def4; A7: *(y,inv y) = 1 by A4,Def4; *(*(x,y),*(inv x, inv y)) = *(*(*(x,y),inv x), inv y) by Th13 .= *(*(j,y), inv y) by A6,Th13 .= 1 by A7,Th19; hence thesis by A5,Def4; end; end; theorem Th23: for x,y,z being Element of REAL holds +(x,+(y,z)) = +(+(x,y),z) proof let x,y,z be Element of REAL; A1: x in REAL+ \/ [:{0},REAL+:] & y in REAL+ \/ [:{0},REAL+:] by NUMBERS:def 1 ,XBOOLE_0:def 5; A2: z in REAL+ \/ [:{0},REAL+:] by NUMBERS:def 1,XBOOLE_0:def 5; per cases by A1,A2,XBOOLE_0:def 3; suppose that A3: x in REAL+ and A4: y in REAL+ and A5: z in REAL+; A6: ex x99,y99 being Element of REAL+ st x = x99 & y = y99 & +(x,y) = x99 + y99 by A3,A4,Def1; then A7: ex xy99,z99 being Element of REAL+ st +(x,y) = xy99 & z = z99 & +(+(x, y),z) = xy99 + z99 by A5,Def1; A8: ex y9,z9 being Element of REAL+ st y = y9 & z = z9 & +( y,z) = y9 + z9 by A4,A5,Def1; then ex x9,yz9 being Element of REAL+ st x = x9 & +(y,z) = yz9 & +(x,+(y,z)) = x9 + yz9 by A3,Def1; hence thesis by A8,A6,A7,ARYTM_2:6; end; suppose that A9: x in REAL+ and A10: y in REAL+ and A11: z in [:{0},REAL+:]; A12: ex x99,y99 being Element of REAL+ st x = x99 & y = y99 & +(x,y) = x99 + y99 by A9,A10,Def1; then consider xy99,z99 being Element of REAL+ such that A13: +(x,y) = xy99 and A14: z = [0,z99] and A15: +(+(x,y),z) = xy99 - z99 by A11,Def1; consider y9,z9 being Element of REAL+ such that A16: y = y9 and A17: z = [0,z9] and A18: +(y,z) = y9 - z9 by A10,A11,Def1; A19: z9 = z99 by A17,A14,XTUPLE_0:1; now per cases; suppose A20: z9 <=' y9; then A21: +(y,z) = y9 -' z9 by A18,ARYTM_1:def 2; then ex x9,yz9 being Element of REAL+ st x = x9 & +(y,z) = yz9 & +(x,+( y,z)) = x9 + yz9 by A9,Def1; hence thesis by A16,A12,A13,A15,A19,A20,A21,ARYTM_1:20; end; suppose A22: not z9 <=' y9; then A23: +(y,z) = [0,z9 -' y9] by A18,ARYTM_1:def 2; then +(y,z) in [:{0},REAL+:] by Lm1,ZFMISC_1:87; then consider x9,yz9 being Element of REAL+ such that A24: x = x9 and A25: +(y,z) = [0,yz9] & +(x,+(y,z)) = x9 - yz9 by A9,Def1; thus +(x,+(y,z)) = x9 - (z9 -' y9) by A23,A25,XTUPLE_0:1 .= +(+(x,y),z) by A16,A12,A13,A15,A19,A22,A24,ARYTM_1:21; end; end; hence thesis; end; suppose that A26: x in REAL+ and A27: y in [:{0},REAL+:] and A28: z in REAL+; consider x99,y99 being Element of REAL+ such that A29: x = x99 and A30: y = [0,y99] and A31: +(x,y) = x99 - y99 by A26,A27,Def1; consider z9,y9 being Element of REAL+ such that A32: z = z9 and A33: y = [0,y9] and A34: +(y,z) = z9 - y9 by A27,A28,Def1; A35: y9 = y99 by A33,A30,XTUPLE_0:1; now per cases; suppose that A36: y9 <=' x99 and A37: y9 <=' z9; A38: +(y,z) = z9 -' y9 by A34,A37,ARYTM_1:def 2; then consider x9,yz9 being Element of REAL+ such that A39: x = x9 and A40: +(y,z) = yz9 & +(x,+(y,z)) = x9 + yz9 by A26,Def1; A41: +(x,y) = x9 -' y9 by A29,A31,A35,A36,A39,ARYTM_1:def 2; then ex z99,xy99 being Element of REAL+ st z = z99 & +(x,y) = xy99 & +( z,+(x,y)) = z99 + xy99 by A28,Def1; hence thesis by A32,A29,A36,A37,A38,A39,A40,A41,ARYTM_1:12; end; suppose that A42: y9 <=' x99 and A43: not y9 <=' z9; A44: +(x,y) = x99 -' y9 by A31,A35,A42,ARYTM_1:def 2; then A45: ex z99,xy99 being Element of REAL+ st z = z99 & +(x,y) = xy99 & +( z,+(x,y)) = z99 + xy99 by A28,Def1; A46: +(y,z) = [0,y9 -' z9] by A34,A43,ARYTM_1:def 2; then +(y,z) in [:{0},REAL+:] by Lm1,ZFMISC_1:87; then consider x9,yz9 being Element of REAL+ such that A47: x = x9 and A48: +(y,z) = [0,yz9] & +(x,+(y,z)) = x9 - yz9 by A26,Def1; thus +(x,+(y,z)) = x9 - (y9 -' z9) by A46,A48,XTUPLE_0:1 .= +(+(x,y),z) by A32,A29,A42,A43,A47,A44,A45,ARYTM_1:22; end; suppose that A49: not y9 <=' x99 and A50: y9 <=' z9; A51: +(y,x) = [0,y9 -' x99] by A31,A35,A49,ARYTM_1:def 2; then +(y,x) in [:{0},REAL+:] by Lm1,ZFMISC_1:87; then consider z99,yx99 being Element of REAL+ such that A52: z = z99 and A53: +(y,x) = [0,yx99] & +(z,+(y,x)) = z99 - yx99 by A28,Def1; A54: +(z,y) = z9 -' y9 by A34,A50,ARYTM_1:def 2; then ex x9,zy99 being Element of REAL+ st x = x9 & +(z,y) = zy99 & +(x, +(z,y)) = x9 + zy99 by A26,Def1; hence +(x,+(y,z)) = z99 - (y9 -' x99) by A32,A29,A49,A50,A52,A54, ARYTM_1:22 .= +(+(x,y),z) by A51,A53,XTUPLE_0:1; end; suppose that A55: not y9 <=' x99 and A56: not y9 <=' z9; A57: +(y,z) = [0,y9 -' z9] by A34,A56,ARYTM_1:def 2; then +(y,z) in [:{0},REAL+:] by Lm1,ZFMISC_1:87; then consider x9,yz9 being Element of REAL+ such that A58: x = x9 and A59: +(y,z) = [0,yz9] & +(x,+(y,z)) = x9 - yz9 by A26,Def1; A60: +(y,x) = [0,y9 -' x99] by A31,A35,A55,ARYTM_1:def 2; then +(y,x) in [:{0},REAL+:] by Lm1,ZFMISC_1:87; then consider z99,yx99 being Element of REAL+ such that A61: z = z99 and A62: +(y,x) = [0,yx99] & +(z,+(y,x)) = z99 - yx99 by A28,Def1; thus +(x,+(y,z)) = x9 - (y9 -' z9) by A57,A59,XTUPLE_0:1 .= z99 - (y9 -' x99) by A32,A29,A55,A56,A61,A58,ARYTM_1:23 .= +(+(x,y),z) by A60,A62,XTUPLE_0:1; end; end; hence thesis; end; suppose that A63: x in REAL+ and A64: y in [:{0},REAL+:] and A65: z in [:{0},REAL+:]; ( not(z in REAL+ & y in [:{0},REAL+:]))& not(y in REAL+ & z in [:{0}, REAL+:]) by A64,A65,Th5,XBOOLE_0:3; then consider y9,z9 being Element of REAL+ such that A66: y = [0,y9] and A67: z = [0,z9] and A68: +(y,z) = [0,y9 + z9] by A64,Def1; +(y,z) in [:{0},REAL+:] by A68,Lm1,ZFMISC_1:87; then consider x9,yz9 being Element of REAL+ such that A69: x = x9 and A70: +(y,z) = [0,yz9] and A71: +(x,+(y,z)) = x9 - yz9 by A63,Def1; consider x99,y99 being Element of REAL+ such that A72: x = x99 and A73: y = [0,y99] and A74: +(x,y) = x99 - y99 by A63,A64,Def1; A75: y9 = y99 by A66,A73,XTUPLE_0:1; now per cases; suppose A76: y99 <=' x99; then A77: +(x,y) = x99 -' y99 by A74,ARYTM_1:def 2; then consider xy99,z99 being Element of REAL+ such that A78: +(x,y) = xy99 and A79: z = [0,z99] and A80: +(+(x,y),z) = xy99 - z99 by A65,Def1; A81: z9 = z99 by A67,A79,XTUPLE_0:1; thus +(x,+(y,z)) = x9 - (y9 + z9) by A68,A70,A71,XTUPLE_0:1 .= +(+(x,y),z) by A72,A69,A75,A76,A77,A78,A80,A81,ARYTM_1:24; end; suppose A82: not y99 <=' x99; A83: not(z in REAL+ & +(x,y) in [:{0},REAL+:]) by A65,Th5,XBOOLE_0:3; A84: +(x,y) = [0,y99 -' x99] by A74,A82,ARYTM_1:def 2; then +(x,y) in [:{0},REAL+:] by Lm1,ZFMISC_1:87; then not(+(x,y) in REAL+ & z in [:{0},REAL+:]) by Th5,XBOOLE_0:3; then consider xy99,z99 being Element of REAL+ such that A85: +(x,y) = [0,xy99] and A86: z = [0,z99] and A87: +(+(x,y),z) = [0,xy99 + z99] by A84,A83,Def1,Lm1,ZFMISC_1:87; A88: z9 = z99 by A67,A86,XTUPLE_0:1; A89: yz9 = z9 + y9 by A68,A70,XTUPLE_0:1; then y99 <=' yz9 by A75,ARYTM_2:19; then not yz9 <=' x9 by A72,A69,A82,ARYTM_1:3; hence +(x,+(y,z)) = [0,z9 + y9 -' x9] by A71,A89,ARYTM_1:def 2 .= [0,z99 + (y99 -' x99)] by A72,A69,A75,A82,A88,ARYTM_1:13 .= +(+(x,y),z) by A84,A85,A87,XTUPLE_0:1; end; end; hence thesis; end; suppose that A90: z in REAL+ and A91: y in REAL+ and A92: x in [:{0},REAL+:]; A93: ex z99,y99 being Element of REAL+ st z = z99 & y = y99 & +(z,y) = z99 + y99 by A90,A91,Def1; then consider zy99,x99 being Element of REAL+ such that A94: +(z,y) = zy99 and A95: x = [0,x99] and A96: +(+(z,y),x) = zy99 - x99 by A92,Def1; consider y9,x9 being Element of REAL+ such that A97: y = y9 and A98: x = [0,x9] and A99: +(y,x) = y9 - x9 by A91,A92,Def1; A100: x9 = x99 by A98,A95,XTUPLE_0:1; now per cases; suppose A101: x9 <=' y9; then A102: +(y,x) = y9 -' x9 by A99,ARYTM_1:def 2; then ex z9,yx9 being Element of REAL+ st z = z9 & +(y,x) = yx9 & +(z,+ (y,x)) = z9 + yx9 by A90,Def1; hence +(z,+(y,x)) = +(+(z,y),x) by A97,A93,A94,A96,A100,A101,A102, ARYTM_1:20; end; suppose A103: not x9 <=' y9; then A104: +(y,x) = [0,x9 -' y9] by A99,ARYTM_1:def 2; then +(y,x) in [:{0},REAL+:] by Lm1,ZFMISC_1:87; then consider z9,yx9 being Element of REAL+ such that A105: z = z9 and A106: +(y,x) = [0,yx9] & +(z,+(y,x)) = z9 - yx9 by A90,Def1; thus +(z,+(y,x)) = z9 - (x9 -' y9) by A104,A106,XTUPLE_0:1 .= +(+(z,y),x) by A97,A93,A94,A96,A100,A103,A105,ARYTM_1:21; end; end; hence thesis; end; suppose that A107: x in [:{0},REAL+:] and A108: y in REAL+ and A109: z in [:{0},REAL+:]; consider y9,z9 being Element of REAL+ such that A110: y = y9 and A111: z = [0,z9] and A112: +(y,z) = y9 - z9 by A108,A109,Def1; consider x99,y99 being Element of REAL+ such that A113: x = [0,x99] and A114: y = y99 and A115: +(x,y) = y99 - x99 by A107,A108,Def1; now per cases; suppose that A116: x99 <=' y99 and A117: z9 <=' y9; A118: +(y,z) = y9 -' z9 by A112,A117,ARYTM_1:def 2; then consider x9,yz9 being Element of REAL+ such that A119: x = [0,x9] and A120: +(y,z) = yz9 & +(x,+(y,z)) = yz9 - x9 by A107,Def1; A121: x9 = x99 by A113,A119,XTUPLE_0:1; then A122: +(x,y) = y9 -' x9 by A110,A114,A115,A116,ARYTM_1:def 2; then consider z99,xy99 being Element of REAL+ such that A123: z = [0,z99] and A124: +(x,y) = xy99 & +(z,+(x,y)) = xy99 - z99 by A109,Def1; z9 = z99 by A111,A123,XTUPLE_0:1; hence thesis by A110,A114,A116,A117,A118,A120,A121,A122,A124,ARYTM_1:25 ; end; suppose that A125: not x99 <=' y99 and A126: z9 <=' y9; A127: not(z in REAL+ & +(x,y) in [:{0},REAL+:]) by A109,Th5,XBOOLE_0:3; A128: +(y,x) = [0,x99 -' y99] by A115,A125,ARYTM_1:def 2; then +(y,x) in [:{0},REAL+:] by Lm1,ZFMISC_1:87; then not(+(x,y) in REAL+ & z in [:{0},REAL+:]) by Th5,XBOOLE_0:3; then consider z99,yx9 being Element of REAL+ such that A129: z = [0,z99] and A130: +(y,x) = [0,yx9] & +(z,+(y,x)) = [0,z99 + yx9] by A128,A127,Def1,Lm1, ZFMISC_1:87; A131: z9 = z99 by A111,A129,XTUPLE_0:1; A132: +(y,z) = y9 -' z9 by A112,A126,ARYTM_1:def 2; then consider x9,yz9 being Element of REAL+ such that A133: x = [0,x9] and A134: +(y,z) = yz9 and A135: +(x,+(y,z)) = yz9 - x9 by A107,Def1; A136: x9 = x99 by A113,A133,XTUPLE_0:1; yz9 <=' y9 by A132,A134,ARYTM_1:11; then not x9 <=' yz9 by A110,A114,A125,A136,ARYTM_1:3; hence +(x,+(y,z)) = [0,x9 -' (y9 -' z9)] by A132,A134,A135, ARYTM_1:def 2 .= [0,x99 -' y99 + z99] by A110,A114,A125,A126,A136,A131,ARYTM_1:14 .= +(+(x,y),z) by A128,A130,XTUPLE_0:1; end; suppose that A137: not z9 <=' y9 and A138: x99 <=' y99; A139: not(x in REAL+ & +(z,y) in [:{0},REAL+:]) by A107,Th5,XBOOLE_0:3; A140: +(y,z) = [0,z9 -' y9] by A112,A137,ARYTM_1:def 2; then +(y,z) in [:{0},REAL+:] by Lm1,ZFMISC_1:87; then not(+(z,y) in REAL+ & x in [:{0},REAL+:]) by Th5,XBOOLE_0:3; then consider x9,yz99 being Element of REAL+ such that A141: x = [0,x9] and A142: +(y,z) = [0,yz99] & +(x,+(y,z)) = [0,x9 + yz99] by A140,A139,Def1,Lm1, ZFMISC_1:87; A143: x99 = x9 by A113,A141,XTUPLE_0:1; A144: +(y,x) = y99 -' x99 by A115,A138,ARYTM_1:def 2; then consider z99,yx99 being Element of REAL+ such that A145: z = [0,z99] and A146: +(y,x) = yx99 and A147: +(z,+(y,x)) = yx99 - z99 by A109,Def1; A148: z99 = z9 by A111,A145,XTUPLE_0:1; yx99 <=' y99 by A144,A146,ARYTM_1:11; then A149: not z99 <=' yx99 by A110,A114,A137,A148,ARYTM_1:3; thus +(x,+(y,z)) = [0,z9 -' y9 + x9] by A140,A142,XTUPLE_0:1 .= [0,z99 -' (y99 -' x99)] by A110,A114,A137,A138,A148,A143, ARYTM_1:14 .= +(+(x,y),z) by A144,A146,A147,A149,ARYTM_1:def 2; end; suppose that A150: not x99 <=' y99 and A151: not z9 <=' y9; A152: not(x in REAL+ & +(z,y) in [:{0},REAL+:]) by A107,Th5,XBOOLE_0:3; A153: not(z in REAL+ & +(x,y) in [:{0},REAL+:]) by A109,Th5,XBOOLE_0:3; A154: +(y,x) = [0,x99 -' y99] by A115,A150,ARYTM_1:def 2; then +(y,x) in [:{0},REAL+:] by Lm1,ZFMISC_1:87; then not(+(x,y) in REAL+ & z in [:{0},REAL+:]) by Th5,XBOOLE_0:3; then consider z99,yx9 being Element of REAL+ such that A155: z = [0,z99] and A156: +(y,x) = [0,yx9] & +(z,+(y,x)) = [0,z99 + yx9] by A154,A153,Def1,Lm1, ZFMISC_1:87; A157: z9 = z99 by A111,A155,XTUPLE_0:1; A158: +(y,z) = [0,z9 -' y9] by A112,A151,ARYTM_1:def 2; then +(y,z) in [:{0},REAL+:] by Lm1,ZFMISC_1:87; then not(+(z,y) in REAL+ & x in [:{0},REAL+:]) by Th5,XBOOLE_0:3; then consider x9,yz99 being Element of REAL+ such that A159: x = [0,x9] and A160: +(y,z) = [0,yz99] & +(x,+(y,z)) = [0,x9 + yz99] by A158,A152,Def1,Lm1, ZFMISC_1:87; A161: x9 = x99 by A113,A159,XTUPLE_0:1; thus +(x,+(y,z)) = [0,z9 -' y9 + x9] by A158,A160,XTUPLE_0:1 .= [0,x99 -' y99 + z99] by A110,A114,A150,A151,A157,A161,ARYTM_1:15 .= +(+(x,y),z) by A154,A156,XTUPLE_0:1; end; end; hence thesis; end; suppose that A162: z in REAL+ and A163: y in [:{0},REAL+:] and A164: x in [:{0},REAL+:]; ( not(x in REAL+ & y in [:{0},REAL+:]))& not(y in REAL+ & x in [:{0} ,REAL+:]) by A163,A164,Th5,XBOOLE_0:3; then consider y9,x9 being Element of REAL+ such that A165: y = [0,y9] and A166: x = [0,x9] and A167: +(y,x) = [0,y9 + x9] by A163,Def1; +(y,x) in [:{0},REAL+:] by A167,Lm1,ZFMISC_1:87; then consider z9,yx9 being Element of REAL+ such that A168: z = z9 and A169: +(y,x) = [0,yx9] and A170: +(z,+(y,x)) = z9 - yx9 by A162,Def1; consider z99,y99 being Element of REAL+ such that A171: z = z99 and A172: y = [0,y99] and A173: +(z,y) = z99 - y99 by A162,A163,Def1; A174: y9 = y99 by A165,A172,XTUPLE_0:1; now per cases; suppose A175: y99 <=' z99; then A176: +(z,y) = z99 -' y99 by A173,ARYTM_1:def 2; then consider zy99,x99 being Element of REAL+ such that A177: +(z,y) = zy99 and A178: x = [0,x99] and A179: +(+(z,y),x) = zy99 - x99 by A164,Def1; A180: x9 = x99 by A166,A178,XTUPLE_0:1; thus +(z,+(y,x)) = z9 - (y9 + x9) by A167,A169,A170,XTUPLE_0:1 .= +(+(z,y),x) by A171,A168,A174,A175,A176,A177,A179,A180,ARYTM_1:24; end; suppose A181: not y99 <=' z99; A182: not(x in REAL+ & +(z,y) in [:{0},REAL+:]) by A164,Th5,XBOOLE_0:3; A183: +(z,y) = [0,y99 -' z99] by A173,A181,ARYTM_1:def 2; then +(z,y) in [:{0},REAL+:] by Lm1,ZFMISC_1:87; then not(+(z,y) in REAL+ & x in [:{0},REAL+:]) by Th5,XBOOLE_0:3; then consider zy99,x99 being Element of REAL+ such that A184: +(z,y) = [0,zy99] and A185: x = [0,x99] and A186: +(+(z,y),x) = [0,zy99 + x99] by A183,A182,Def1,Lm1,ZFMISC_1:87; A187: x9 = x99 by A166,A185,XTUPLE_0:1; A188: yx9 = x9 + y9 by A167,A169,XTUPLE_0:1; then y99 <=' yx9 by A174,ARYTM_2:19; then not yx9 <=' z9 by A171,A168,A181,ARYTM_1:3; hence +(z,+(y,x)) = [0,x9 + y9 -' z9] by A170,A188,ARYTM_1:def 2 .= [0,x99 + (y99 -' z99)] by A171,A168,A174,A181,A187,ARYTM_1:13 .= +(+(z,y),x) by A183,A184,A186,XTUPLE_0:1; end; end; hence thesis; end; suppose that A189: x in [:{0},REAL+:] and A190: y in [:{0},REAL+:] and A191: z in [:{0},REAL+:]; A192: not(x in REAL+ & +(z,y) in [:{0},REAL+:]) by A189,Th5,XBOOLE_0:3; ( not(z in REAL+ & y in [:{0},REAL+:]))& not(y in REAL+ & z in [:{0} ,REAL+:]) by A190,A191,Th5,XBOOLE_0:3; then consider y9,z9 being Element of REAL+ such that A193: y = [0,y9] and A194: z = [0,z9] and A195: +(y,z) = [0,y9 + z9] by A190,Def1; +(z,y) in [:{0},REAL+:] by A195,Lm1,ZFMISC_1:87; then not(+(z,y) in REAL+ & x in [:{0},REAL+:]) by Th5,XBOOLE_0:3; then consider x9,yz9 being Element of REAL+ such that A196: x = [0,x9] and A197: +(y,z) = [0,yz9] & +(x,+(y,z)) = [0,x9 + yz9] by A195,A192,Def1,Lm1, ZFMISC_1:87; A198: not(z in REAL+ & +(x,y) in [:{0},REAL+:]) by A191,Th5,XBOOLE_0:3; ( not(x in REAL+ & y in [:{0},REAL+:]))& not(y in REAL+ & x in [:{0} ,REAL+:]) by A189,A190,Th5,XBOOLE_0:3; then consider x99,y99 being Element of REAL+ such that A199: x = [0,x99] and A200: y = [0,y99] and A201: +(x,y) = [0,x99 + y99] by A189,Def1; A202: x9 = x99 by A199,A196,XTUPLE_0:1; +(x,y) in [:{0},REAL+:] by A201,Lm1,ZFMISC_1:87; then not(+(x,y) in REAL+ & z in [:{0},REAL+:]) by Th5,XBOOLE_0:3; then consider xy99,z99 being Element of REAL+ such that A203: +(x,y) = [0,xy99] and A204: z = [0,z99] and A205: +(+(x,y),z) = [0,xy99 + z99] by A201,A198,Def1,Lm1,ZFMISC_1:87; A206: z9 = z99 by A194,A204,XTUPLE_0:1; A207: y9 = y99 by A193,A200,XTUPLE_0:1; thus +(x,+(y,z)) = [0,z9 + y9 + x9] by A195,A197,XTUPLE_0:1 .= [0,z99 + (y99 + x99)] by A206,A202,A207,ARYTM_2:6 .= +(+(x,y),z) by A201,A203,A205,XTUPLE_0:1; end; end; theorem [*x,y*] in REAL implies y = 0 proof assume A1: [*x,y*] in REAL; assume y <> 0; then [*x,y*] = (0,1) --> (x,y) by Def5; hence contradiction by A1,Th8; end; theorem for x,y being Element of REAL holds opp +(x,y) = +(opp x, opp y) proof let x,y be Element of REAL; +(+(x,y),+(opp x, opp y)) = +(x,+(y,+(opp x, opp y))) by Th23 .= +(x,+(opp x,+(y, opp y))) by Th23 .= +(x,+(opp x,o)) by Def3 .= +(x,opp x) by Th11 .= 0 by Def3; hence thesis by Def3; end; begin definition func equals (0,1) --> (0,1); coherence; let c be number; attr c is complex means :Def2: c in COMPLEX; end; registration cluster -> complex; coherence proof set X = { x where x is Element of Funcs({0,1},REAL): x.1 = 0}; A1: now assume in X; then ex x being Element of Funcs({0,1},REAL) st = x & x.1 = 0; hence contradiction by FUNCT_4:63; end; in Funcs({0,1},REAL) by FUNCT_2:8; then in Funcs({0,1},REAL) \ X by A1,XBOOLE_0:def 5; hence in COMPLEX by NUMBERS:def 2,XBOOLE_0:def 3; end; end; registration cluster complex for number; existence proof take ; thus thesis; end; end; registration sethood of complex number proof take COMPLEX; thus thesis by Def2; end; end; notation let x be complex number; synonym x is zero for x is empty; end; definition let x be complex number; redefine attr x is zero means x = 0; compatibility; end; definition let x,y be complex number; x in COMPLEX by Def2; then consider x1,x2 being Element of REAL such that A1: x = [*x1,x2*] by ARYTM_0:9; y in COMPLEX by Def2; then consider y1,y2 being Element of REAL such that A2: y = [*y1,y2*] by ARYTM_0:9; func x+y means :Def4: ex x1,x2,y1,y2 being Element of REAL st x = [*x1,x2*] & y = [*y1,y2*] & it = [*+(x1,y1),+(x2,y2)*]; existence proof take [*+(x1,y1),+(x2,y2)*]; thus thesis by A1,A2; end; uniqueness proof let c1,c2 be number; given x1,x2,y1,y2 being Element of REAL such that A3: x = [*x1,x2*] and A4: y = [*y1,y2*] and A5: c1 = [*+(x1,y1),+(x2,y2)*]; given x19,x29,y19,y29 being Element of REAL such that A6: x = [*x19,x29*] and A7: y = [*y19,y29*] and A8: c2 = [*+(x19,y19),+(x29,y29)*]; A9: x1 = x19 & x2 = x29 by A3,A6,ARYTM_0:10; y1 = y19 by A4,A7,ARYTM_0:10; hence thesis by A4,A5,A7,A8,A9,ARYTM_0:10; end; commutativity; func x*y means :Def5: ex x1,x2,y1,y2 being Element of REAL st x = [*x1,x2*] & y = [*y1,y2*] & it = [* +(*(x1,y1),opp*(x2,y2)), +(*(x1,y2),*(x2,y1)) *]; existence proof take [* +(*(x1,y1),opp*(x2,y2)), +(*(x1,y2),*(x2,y1)) *]; thus thesis by A1,A2; end; uniqueness proof let c1,c2 be number; given x1,x2,y1,y2 being Element of REAL such that A10: x = [*x1,x2*] and A11: y = [*y1,y2*] and A12: c1 = [*+(*(x1,y1),opp*(x2,y2)), +(*(x1,y2),*(x2,y1))*]; given x19,x29,y19,y29 being Element of REAL such that A13: x = [*x19,x29*] and A14: y = [*y19,y29*] and A15: c2 = [*+(*(x19,y19),opp*(x29,y29)), +(*(x19,y29),*(x29,y19))*]; A16: x1 = x19 & x2 = x29 by A10,A13,ARYTM_0:10; y1 = y19 & y2 = y29 by A11,A14,ARYTM_0:10; hence thesis by A12,A15,A16; end; commutativity; end; Lm1: 0 = [*0,0*] by ARYTM_0:def 5; reconsider j = 1 as Element of REAL; Lm2: for x,y,z being Element of REAL st +(x,y) = 0 & +(x,z) = 0 holds y = z proof let x,y,z be Element of REAL such that A1: +(x,y) = 0 and A2: +(x,z) = 0; per cases; suppose x in REAL+ & y in REAL+ & z in REAL+; then ( ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & 0 = x9 + y9)& ex x9,y9 being Element of REAL+ st x = x9 & z = y9 & 0 = x9 + y9 by A1,A2, ARYTM_0:def 1; hence thesis by ARYTM_2:11; end; suppose that A3: x in REAL+ and A4: y in REAL+ and A5: z in [:{0},REAL+:]; A6: ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & 0 = x9 + y9 by A1,A3,A4,ARYTM_0:def 1; consider x99,y99 being Element of REAL+ such that A7: x = x99 and A8: z = [0,y99] & 0 = x99 - y99 by A2,A3,A5,ARYTM_0:def 1; A9: x99 = 0 by A6,A7,ARYTM_2:5; [{},{}] in {[{},{}]} by TARSKI:def 1; then A10: not [{},{}] in REAL by NUMBERS:def 1,XBOOLE_0:def 5; z in REAL; hence thesis by A8,A9,A10,ARYTM_1:19; end; suppose that A11: x in REAL+ and A12: z in REAL+ and A13: y in [:{0},REAL+:]; A14: ex x9,z9 being Element of REAL+ st x = x9 & z = z9 & 0 = x9 + z9 by A2,A11,A12,ARYTM_0:def 1; consider x99,y9 being Element of REAL+ such that A15: x = x99 and A16: y = [0,y9] & 0 = x99 - y9 by A1,A11,A13,ARYTM_0:def 1; A17: x99 = 0 by A14,A15,ARYTM_2:5; [0,0] in {[0,0]} by TARSKI:def 1; then A18: not [0,0] in REAL by NUMBERS:def 1,XBOOLE_0:def 5; y in REAL; hence thesis by A16,A17,A18,ARYTM_1:19; end; suppose that A19: x in REAL+ and A20: y in [:{0},REAL+:] and A21: z in [:{0},REAL+:]; consider x9,y9 being Element of REAL+ such that A22: x = x9 and A23: y = [0,y9] and A24: 0 = x9 - y9 by A1,A19,A20,ARYTM_0:def 1; consider x99,z9 being Element of REAL+ such that A25: x = x99 and A26: z = [0,z9] and A27: 0 = x99 - z9 by A2,A19,A21,ARYTM_0:def 1; y9 = x9 by A24,ARYTM_0:6 .= z9 by A22,A25,A27,ARYTM_0:6; hence thesis by A23,A26; end; suppose that A28: z in REAL+ and A29: y in REAL+ and A30: x in [:{0},REAL+:]; consider x9,y9 being Element of REAL+ such that A31: x = [0,x9] and A32: y = y9 and A33: 0 = y9 - x9 by A1,A29,A30,ARYTM_0:def 1; consider x99,z9 being Element of REAL+ such that A34: x = [0,x99] and A35: z = z9 and A36: 0 = z9 - x99 by A2,A28,A30,ARYTM_0:def 1; x9 = x99 by A31,A34,XTUPLE_0:1; then z9 = x9 by A36,ARYTM_0:6 .= y9 by A33,ARYTM_0:6; hence thesis by A32,A35; end; suppose not(x in REAL+ & y in REAL+) & not(x in REAL+ & y in [:{0},REAL+:]) & not(y in REAL+ & x in [:{0},REAL+:]); then ex x9,y9 being Element of REAL+ st x = [0,x9] & y = [0,y9] & 0 = [0,x9+y9] by A1,ARYTM_0:def 1; hence thesis; end; suppose not(x in REAL+ & z in REAL+) & not(x in REAL+ & z in [:{0},REAL+:]) & not(z in REAL+ & x in [:{0},REAL+:]); then ex x9,z9 being Element of REAL+ st x = [0,x9] & z = [0,z9] & 0 = [0,x9+z9] by A2,ARYTM_0:def 1; hence thesis; end; end; registration let z,z9 be complex number; cluster z+z9 -> complex; coherence proof ex x1,x2,y1,y2 being Element of REAL st z = [*x1,x2*] & z9 = [*y1,y2*] & z+z9 = [*+(x1,y1),+(x2,y2)*] by Def4; hence z+z9 in COMPLEX; end; cluster z*z9 -> complex; coherence proof ex x1,x2,y1,y2 being Element of REAL st z = [*x1,x2*] & z9 = [*y1,y2*] & z*z9 = [* +(*(x1,y1),opp*(x2,y2)), +(*(x1,y2),*(x2,y1)) *] by Def5; hence z*z9 in COMPLEX; end; end; definition let z be complex number; z in COMPLEX by Def2; then consider x,y being Element of REAL such that A1: z = [*x,y*] by ARYTM_0:9; func -z -> complex number means :Def6: z + it = 0; existence proof reconsider z9 = [*opp x, opp y*] as complex number by Def2; take z9; 0 = +(x,opp x) & 0 = +(y,opp y) by ARYTM_0:def 3; hence thesis by A1,Def4,Lm1; end; uniqueness proof let c1,c2 be complex number such that A2: z+c1 = 0 and A3: z+c2 = 0; consider x1,x2,y1,y2 being Element of REAL such that A4: z = [*x1,x2*] and A5: c1 = [*y1,y2*] and A6: 0 = [*+(x1,y1),+(x2,y2)*] by A2,Def4; consider x19,x29,y19,y29 being Element of REAL such that A7: z = [*x19,x29*] and A8: c2 = [*y19,y29*] and A9: 0 = [*+(x19,y19),+(x29,y29)*] by A3,Def4; A10: x1 = x19 by A4,A7,ARYTM_0:10; A11: x2 = x29 by A4,A7,ARYTM_0:10; A12: +(x1,y1) = 0 by A6,Lm1,ARYTM_0:10; +(x1,y19) = 0 by A9,A10,Lm1,ARYTM_0:10; then A13: y1 = y19 by A12,Lm2; A14: +(x2,y2) = 0 by A6,Lm1,ARYTM_0:10; +(x2,y29) = 0 by A9,A11,Lm1,ARYTM_0:10; hence thesis by A5,A8,A13,A14,Lm2; end; involutiveness; func z" -> complex number means :Def7: z*it = 1 if z <> 0 otherwise it = 0; existence proof thus z <> 0 implies ex z9 being complex number st z*z9 = 1 proof set y1 = *(x,inv +(*(x,x),*(y,y))), y2 = *(opp y,inv +(*(x,x),*(y,y))); set z9 = [* y1, y2 *]; reconsider z9 as complex number by Def2; assume A15: z <> 0; take z9; A16: opp *(y,y2) = opp *(y,opp *(y,inv +(*(x,x),*(y,y)))) by ARYTM_0:15 .= opp opp *(y,*(y,inv +(*(x,x),*(y,y)))) by ARYTM_0:15 .= *(*(y,y),inv +(*(x,x),*(y,y))) by ARYTM_0:13; A17: *(x,y1) = *(*(x,x),inv +(*(x,x),*(y,y))) by ARYTM_0:13; A18: now assume +(*(x,x),*(y,y)) = 0; then x = 0 & y = 0 by ARYTM_0:17; hence contradiction by A1,A15,ARYTM_0:def 5; end; *(x,y2) = *(opp y,y1) by ARYTM_0:13 .= opp *(y,y1) by ARYTM_0:15; then +(*(x,y2),*(y,y1)) = 0 by ARYTM_0:def 3; then [* +(*(x,y1),opp*(y,y2)), +(*(x,y2),*(y,y1)) *] = +(*(x,y1),opp*(y,y2)) by ARYTM_0:def 5 .=*(+(*(x,x),*(y,y)),inv +(*(x,x),*(y,y))) by A16,A17,ARYTM_0:14 .= 1 by A18,ARYTM_0:def 4; hence thesis by A1,Def5; end; assume z = 0; hence thesis; end; uniqueness proof let c1,c2 be complex number; thus z <> 0 & z*c1 = 1 & z*c2 = 1 implies c1 = c2 proof assume that A19: z <> 0 and A20: z*c1 = 1 and A21: z*c2 = 1; A22: for z9 being complex number st z*z9 = 1 holds z9 = [* *(x,inv +(*(x,x),*(y,y))) , *(opp y,inv +(*(x,x),*(y,y))) *] proof let z9 being complex number such that A23: z*z9 = 1; consider x1,x2,x9,y9 being Element of REAL such that A24: z = [*x1,x2*] and A25: z9 = [*x9,y9*] and A26: 1 = [* +(*(x1,x9),opp*(x2,y9)), +(*(x1,y9),*(x2,x9)) *] by A23,Def5; A27: x = x1 & y = x2 by A1,A24,ARYTM_0:10; per cases by A1,A19,ARYTM_0:def 5; suppose that A28: x = 0 and A29: y <> 0; +(y, opp y) = 0 by ARYTM_0:def 3; then A30: opp y <> 0 by A29,ARYTM_0:11; *(x,y9) = 0 & *(x,x9) = 0 by A28,ARYTM_0:12; then A31: 1 = [* opp*(y,y9), +(0,*(y,x9)) *] by A26,A27,ARYTM_0:11 .= [* opp*(y,y9), *(y,x9) *] by ARYTM_0:11; A32: 1 = [*j,0*] by ARYTM_0:def 5; *(opp y,y9) = opp*(y,y9) by ARYTM_0:15 .= 1 by A31,A32,ARYTM_0:10; then A33: y9 = inv opp y by A30,ARYTM_0:def 4; A34: *(x,x) = 0 by A28,ARYTM_0:12; *(opp y,opp inv y) = opp *(y,opp inv y) by ARYTM_0:15 .= opp opp *(y,inv y) by ARYTM_0:15 .= 1 by A29,ARYTM_0:def 4; then A35: inv opp y = opp inv y by A30,ARYTM_0:def 4; *(y,x9) = 0 by A31,A32,ARYTM_0:10; hence z9 = [*0,inv opp y*] by A25,A29,A33,ARYTM_0:21 .= [* 0 , opp *(j,inv y) *] by A35,ARYTM_0:19 .= [* 0 , opp *(*(y,inv y),inv y) *] by A29,ARYTM_0:def 4 .= [* 0 , opp *(y,*(inv y,inv y)) *] by ARYTM_0:13 .= [* 0 , *(opp y,*(inv y,inv y)) *] by ARYTM_0:15 .= [* 0 , *(opp y,inv *(y,y)) *] by ARYTM_0:22 .= [* 0 , *(opp y,inv +(0,*(y,y))) *] by ARYTM_0:11 .= [* *(x,inv +(*(x,x),*(y,y))) , *(opp y,inv +(*(x,x),*(y,y))) *] by A28,A34,ARYTM_0:12; end; suppose that A36: opp y = 0 and A37: x <> 0; +(y,opp y) = 0 by ARYTM_0:def 3; then A38: y = 0 by A36,ARYTM_0:11; then A39: *(y,x9) = 0 by ARYTM_0:12; opp*(y,y9) = *(opp y,y9) by ARYTM_0:15 .= 0 by A36,ARYTM_0:12; then A40: 1 = [* *(x,x9), +(*(x,y9),0) *] by A26,A27,A39,ARYTM_0:11 .= [* *(x,x9), *(x,y9) *] by ARYTM_0:11; A41: 1 = [*j,0*] by ARYTM_0:def 5; then *(x,x9) = 1 by A40,ARYTM_0:10; then A42: x9 = inv x by A37,ARYTM_0:def 4; *(x,y9) = 0 by A40,A41,ARYTM_0:10; then A43: y9 = 0 by A37,ARYTM_0:21; A44: *(y,y) = 0 by A38,ARYTM_0:12; x9 = *(j,inv x) by A42,ARYTM_0:19 .= *(*(x,inv x),inv x) by A37,ARYTM_0:def 4 .= *(x,*(inv x,inv x)) by ARYTM_0:13 .= *(x,inv *(x,x)) by ARYTM_0:22 .= *(x,inv +(*(x,x),0)) by ARYTM_0:11; hence thesis by A25,A36,A43,A44,ARYTM_0:12; end; suppose that A45: opp y <> 0 and A46: x <> 0; A47: now assume +(*(*(x,x), inv opp y),opp y) = 0; then +(*(*(x,x), inv opp y),*(opp y,j)) = 0 by ARYTM_0:19; then +(*(*(x,x), inv opp y),*(opp y,*(opp y, inv opp y))) = 0 by A45,ARYTM_0:def 4; then +(*(*(x,x), inv opp y),*(*(opp y,opp y), inv opp y)) = 0 by ARYTM_0:13; then A48: *(inv opp y, +(*(x,x),*(opp y,opp y))) = 0 by ARYTM_0:14; +(*(x,x),*(opp y,opp y)) <> 0 by A46,ARYTM_0:17; then A49: inv opp y = 0 by A48,ARYTM_0:21; *(opp y,inv opp y) = 1 by A45,ARYTM_0:def 4; hence contradiction by A49,ARYTM_0:12; end; reconsider j = 1 as Element of REAL; A50: 1 = [*j,0*] by ARYTM_0:def 5; then +(*(x1,y9),*(x2,x9)) = 0 by A26,ARYTM_0:10; then *(x,y9) = opp*(y,x9) by A27,ARYTM_0:def 3; then *(x,y9) = *(opp y,x9) by ARYTM_0:15; then A51: x9 = *(*(x,y9), inv opp y) by A45,ARYTM_0:20 .= *(x,*(y9, inv opp y)) by ARYTM_0:13; then + (*(x,*(x,*(y9, inv opp y))),opp*(y,y9)) = 1 by A26,A27,A50,ARYTM_0:10; then +(*(*(x,x),*(y9, inv opp y)),opp*(y,y9)) = 1 by ARYTM_0:13; then +(*(*(x,x),*(y9, inv opp y)),*(opp y,y9)) = 1 by ARYTM_0:15; then +(*(y9,*(*(x,x), inv opp y)),*(opp y,y9)) = 1 by ARYTM_0:13; then *(y9,+(*(*(x,x), inv opp y),opp y)) = 1 by ARYTM_0:14; then A52: y9 = inv +(*(*(x,x), inv opp y),opp y) by A47,ARYTM_0:def 4; then A53: x9 = *(x,inv *(+(*(*(x,x), inv opp y),opp y), opp y)) by A51, ARYTM_0:22 .= *(x,inv +(*(*(*(x,x), inv opp y),opp y),*(opp y, opp y))) by ARYTM_0:14 .= *(x,inv +(*(*(*(x,x), inv opp y),opp y),opp*(y, opp y))) by ARYTM_0:15 .= *(x,inv +(*(*(*(x,x), inv opp y),opp y),opp opp*(y,y))) by ARYTM_0:15 .= *(x,inv +(*(*(x,x), *(inv opp y,opp y)),*(y,y))) by ARYTM_0:13 .= *(x,inv +(*(*(x,x), j),*(y,y))) by A45,ARYTM_0:def 4 .= *(x,inv +(*(x,x),*(y,y))) by ARYTM_0:19; y9 = *(j,inv +(*(*(x,x), inv opp y),opp y)) by A52,ARYTM_0:19 .= *(*(opp y, inv opp y),inv +(*(*(x,x), inv opp y),opp y)) by A45,ARYTM_0:def 4 .= *(opp y, *(inv opp y,inv +(*(*(x,x), inv opp y),opp y))) by ARYTM_0:13 .= *(opp y, inv *(opp y,+(*(*(x,x), inv opp y),opp y))) by ARYTM_0:22 .= *(opp y, inv +(*(opp y,*(*(x,x), inv opp y)),*(opp y,opp y))) by ARYTM_0:14 .= *(opp y, inv +(*(*(x,x),*(opp y, inv opp y)),*(opp y,opp y))) by ARYTM_0:13 .= *(opp y, inv +(*(*(x,x),j),*(opp y,opp y))) by A45,ARYTM_0:def 4 .= *(opp y, inv +(*(x,x),*(opp y,opp y))) by ARYTM_0:19 .= *(opp y, inv +(*(x,x),opp *(y,opp y))) by ARYTM_0:15 .= *(opp y, inv +(*(x,x),opp opp *(y,y))) by ARYTM_0:15 .= *(opp y, inv +(*(x,x),*(y,y))); hence thesis by A25,A53; end; end; thus then c1 = [* *(x,inv +(*(x,x),*(y,y))) , *(opp y,inv +(*(x,x),*(y,y))) *] by A20 .= c2 by A21,A22; end; thus thesis; end; consistency; involutiveness proof let z,z9 be complex number; assume that A54: z9 <> 0 implies z9*z = 1 and A55: z9 = 0 implies z = 0; thus z <> 0 implies z*z9 = 1 by A54,A55; assume A56: z = 0; assume z9 <> 0; then consider x1,x2,y1,y2 being Element of REAL such that A57: z = [*x1,x2*] and z9 = [*y1,y2*] and A58: 1 = [*+(*(x1,y1),opp*(x2,y2)), +(*(x1,y2),*(x2,y1))*] by A54,Def5; A59: z = [*0,0*] by A56,ARYTM_0:def 5; then A60: x1 = 0 by A57,ARYTM_0:10; A61: x2 = 0 by A57,A59,ARYTM_0:10; A62: *(x1,y1) = 0 by A60,ARYTM_0:12; *(x2,y2) = 0 by A61,ARYTM_0:12; then A63: +(*(x1,y1),opp*(x2,y2)) = 0 by A62,ARYTM_0:def 3; A64: *(x1,y2) = 0 by A60,ARYTM_0:12; *(x2,y1) = 0 by A61,ARYTM_0:12; then +(*(x1,y2),*(x2,y1)) = 0 by A64,ARYTM_0:11; hence contradiction by A58,A63,ARYTM_0:def 5; end; end; definition let x,y be complex number; func x-y equals x+(-y); coherence; func x/y equals x * y"; coherence; end; registration let x,y be complex number; cluster x-y -> complex; coherence; cluster x/y -> complex; coherence; end; Lm3: for x, y, z being complex number holds x * (y * z) = (x * y) * z proof let x, y, z be complex number; consider x1,x2,y1,y2 being Element of REAL such that A1: x = [*x1,x2*] and A2: y = [*y1,y2*] and A3: x*y = [* +(*(x1,y1),opp*(x2,y2)), +(*(x1,y2),*(x2,y1)) *] by Def5; consider y3,y4,z1,z2 being Element of REAL such that A4: y = [*y3,y4*] and A5: z = [*z1,z2*] and A6: y*z = [* +(*(y3,z1),opp*(y4,z2)), +(*(y3,z2),*(y4,z1)) *] by Def5; A7: y1 = y3 by A2,A4,ARYTM_0:10; A8: y2 = y4 by A2,A4,ARYTM_0:10; consider x3,x4,yz1,yz2 being Element of REAL such that A9: x = [*x3,x4*] and A10: y*z = [*yz1,yz2*] and A11: x*(y*z) = [* +(*(x3,yz1),opp*(x4,yz2)), +(*(x3,yz2),*(x4,yz1)) *] by Def5; A12: x1 = x3 by A1,A9,ARYTM_0:10; A13: x2 = x4 by A1,A9,ARYTM_0:10; consider xy1,xy2,z3,z4 being Element of REAL such that A14: x*y = [*xy1,xy2*] and A15: z = [*z3,z4*] and A16: (x*y)*z = [* +(*(xy1,z3),opp*(xy2,z4)), +(*(xy1,z4),*(xy2,z3)) *] by Def5; A17: z1 = z3 by A5,A15,ARYTM_0:10; A18: z2 = z4 by A5,A15,ARYTM_0:10; A19: xy1 = +(*(x1,y1),opp*(x2,y2)) by A3,A14,ARYTM_0:10; A20: xy2 = +(*(x1,y2),*(x2,y1)) by A3,A14,ARYTM_0:10; A21: yz1 = +(*(y3,z1),opp*(y4,z2)) by A6,A10,ARYTM_0:10; A22: yz2 = +(*(y3,z2),*(y4,z1)) by A6,A10,ARYTM_0:10; +(*(opp x4,*(y3,z2)),*(opp x4,*(y4,z1))) = +(*(opp x4,*(y4,z1)),*(*(opp x2,y1),z4)) by A7,A13,A18,ARYTM_0:13 .= +(*(*(opp x2,y2),z3),*(*(opp x2,y1),z4)) by A8,A13,A17,ARYTM_0:13; then A23: +(*(x3,*(opp y4,z2)),+(*(opp x4,*(y3,z2)),*(opp x4,*(y4,z1)) )) = +(*(*(x1,opp y2),z4), +(*(*(opp x2,y2),z3),*(*(opp x2,y1),z4))) by A8,A12,A18,ARYTM_0:13 .= +(*(opp *(x1,y2),z4), +(*(*(opp x2,y2),z3),*(*(opp x2,y1),z4))) by ARYTM_0:15 .= +(*(*(opp x1,y2),z4), +(*(*(opp x2,y2),z3),*(*(opp x2,y1),z4))) by ARYTM_0:15 .= +(*(*(opp x2,y2),z3), +(*(*(opp x1,y2),z4),*(*(opp x2,y1),z4))) by ARYTM_0:23; A24: +(*(x3,yz1),opp*(x4,yz2)) = +(*(x3,yz1),*(opp x4,yz2)) by ARYTM_0:15 .= +(*(x3,+(*(y3,z1),*(opp y4,z2))),*(opp x4,yz2)) by A21,ARYTM_0:15 .= +(+(*(x3,*(y3,z1)),*(x3,*(opp y4,z2))), *(opp x4,+(*(y3,z2),*(y4,z1)))) by A22,ARYTM_0:14 .= +(+(*(x3,*(y3,z1)),*(x3,*(opp y4,z2))), +(*(opp x4,*(y3,z2)),*(opp x4,*(y4,z1)))) by ARYTM_0:14 .= +(*(x3,*(y3,z1)),+(*(*(opp x2,y2),z3), +(*(*(opp x1,y2),z4),*(*(opp x2,y1),z4)))) by A23,ARYTM_0:23 .= +(+(*(x3,*(y3,z1)),*(*(opp x2,y2),z3)), +(*(*(opp x1,y2),z4),*(*(opp x2,y1),z4))) by ARYTM_0:23 .= +(+(*(*(x1,y1),z3),*(*(opp x2,y2),z3)), +(*(*(opp x1,y2),z4),*(*(opp x2,y1),z4))) by A7,A12,A17,ARYTM_0:13 .= +(*(+(*(x1,y1),*(opp x2,y2)),z3), +(*(*(opp x1,y2),z4),*(*(opp x2,y1),z4))) by ARYTM_0:14 .= +(*(+(*(x1,y1),*(opp x2,y2)),z3), +(*(*(opp x1,y2),z4),*(opp *(x2,y1),z4))) by ARYTM_0:15 .= +(*(+(*(x1,y1),*(opp x2,y2)),z3), +(*(*(opp x1,y2),z4),opp *(*(x2,y1),z4))) by ARYTM_0:15 .= +(*(+(*(x1,y1),*(opp x2,y2)),z3), +(*(opp *(x1,y2),z4),opp *(*(x2,y1),z4))) by ARYTM_0:15 .= +(*(+(*(x1,y1),*(opp x2,y2)),z3), +(opp *(*(x1,y2),z4),opp *(*(x2,y1),z4))) by ARYTM_0:15 .= +(*(+(*(x1,y1),*(opp x2,y2)),z3), opp +(*(*(x1,y2),z4),*(*(x2,y1),z4))) by ARYTM_0:25 .= +(*(+(*(x1,y1),*(opp x2,y2)),z3), opp*( +(*(x1,y2),*(x2,y1)),z4)) by ARYTM_0:14 .= +(*(+(*(x1,y1),*(opp x2,y2)),z3),*(opp xy2,z4)) by A20,ARYTM_0:15 .= +(*(xy1,z3),*(opp xy2,z4)) by A19,ARYTM_0:15 .= +(*(xy1,z3),opp*(xy2,z4)) by ARYTM_0:15; A25: +(*(opp*(x2,y2),z4),*(*(x2,y1),z3)) = +(opp*(*(x2,y2),z4),*(*(x2,y1),z3)) by ARYTM_0:15 .= +(*(x4,*(y3,z1)),opp*(*(x2,y2),z4)) by A7,A13,A17,ARYTM_0:13 .= +(*(x4,*(y3,z1)),opp*(x4,*(y4,z2))) by A8,A13,A18,ARYTM_0:13 .= +(*(x4,*(y3,z1)),*(x4,opp*(y4,z2))) by ARYTM_0:15; A26: +(*(opp*(x2,y2),z4),*(xy2,z3)) = +(*(opp*(x2,y2),z4),+(*(*(x1,y2),z3),*(*(x2,y1),z3))) by A20,ARYTM_0:14 .= +(*(*(x1,y2),z3),+(*(opp*(x2,y2),z4),*(*(x2,y1),z3))) by ARYTM_0:23 .= +(*(x3,*(y4,z1)),+(*(x4,*(y3,z1)),*(x4,opp*(y4,z2)))) by A8,A12,A17,A25,ARYTM_0:13 .= +(*(x3,*(y4,z1)),*(x4,yz1)) by A21,ARYTM_0:14; +(*(xy1,z4),*(xy2,z3)) = +(+(*(*(x1,y1),z4),*(opp*(x2,y2),z4)),*(xy2,z3)) by A19,ARYTM_0:14 .= +(*(*(x1,y1),z4),+(*(opp*(x2,y2),z4),*(xy2,z3))) by ARYTM_0:23 .= +(*(x3,*(y3,z2)),+(*(x3,*(y4,z1)),*(x4,yz1))) by A7,A12,A18,A26,ARYTM_0:13 .= +(+(*(x3,*(y3,z2)),*(x3,*(y4,z1))),*(x4,yz1)) by ARYTM_0:23 .= +(*(x3,yz2),*(x4,yz1)) by A22,ARYTM_0:14; hence thesis by A11,A16,A24; end; registration cluster non zero for complex number; existence proof REAL c= COMPLEX & 1 in REAL by NUMBERS:def 2,XBOOLE_1:7; then 1 is complex number by Def2; hence thesis; end; end; Lm4: REAL c= COMPLEX by NUMBERS:def 2,XBOOLE_1:7; registration let x be non zero complex number; cluster -x -> non zero; coherence proof assume A1: -x = 0; x + -x = 0 by Def6; then consider x1,x2,y1,y2 being Element of REAL such that A2: x = [*x1,x2*] and A3: -x = [*y1,y2*] and A4: 0 = [*+(x1,y1),+(x2,y2)*] by Def4; A5: +(x2,y2) = 0 by A4,ARYTM_0:24; then A6: +(x1,y1) = 0 by A4,ARYTM_0:def 5; y2 = 0 by A1,A3,ARYTM_0:24; then A7: y1 = 0 by A1,A3,ARYTM_0:def 5; x2 = 0 by A1,A3,A5,ARYTM_0:11,24; then x = x1 by A2,ARYTM_0:def 5 .= 0 by A6,A7,ARYTM_0:11; hence contradiction; end; cluster x" -> non zero; coherence proof assume A8: x" = 0; x*x" = 1 by Def7; then consider x1,x2,y1,y2 being Element of REAL such that x = [*x1,x2*] and A9: x" = [*y1,y2*] and A10: 1 = [* +(*(x1,y1),opp*(x2,y2)), +(*(x1,y2),*(x2,y1)) *] by Def5; y2 = 0 by A8,A9,ARYTM_0:24; then A11: y1 = 0 by A8,A9,ARYTM_0:def 5; +(*(x1,y2),*(x2,y1)) = 0 by A10,ARYTM_0:24; then 1 = +(*(x1,y1),opp*(x2,y2)) by A10,ARYTM_0:def 5 .= +(*(x1,y1),*(opp x2,y2)) by ARYTM_0:15 .= *(opp x2,y2) by A11,ARYTM_0:11,12; hence contradiction by A8,A9,ARYTM_0:12,24; end; let y be non zero complex number; cluster x*y -> non zero; coherence proof 1 in REAL; then reconsider j =1 as complex number by Def2,Lm4; consider u1,u2,v1,v2 being Element of REAL such that A12: j = [*u1,u2*] and A13: y = [*v1,v2*] & j*y = [* +(*(u1,v1),opp*(u2,v2)), +(*(u1,v2),*(u2,v1)) *] by Def5; A14: u2 = 0 by A12,ARYTM_0:24; then A15: +(*(u1,v2),*(u2,v1)) = *(u1,v2) by ARYTM_0:11,12; A16: u1 = 1 by A12,A14,ARYTM_0:def 5; +(0,opp 0) = 0 by ARYTM_0:def 3; then A17: opp 0 = 0 by ARYTM_0:11; A18: +(*(u1,v1),opp*(u2,v2)) = +(v1,opp*(u2,v2)) by A16,ARYTM_0:19 .= +(v1,*(opp u2,v2)) by ARYTM_0:15 .= +(v1,*(0,v2)) by A12,A17,ARYTM_0:24 .= v1 by ARYTM_0:11,12; 0 in REAL; then reconsider z =0 as complex number by Def2,Lm4; consider u1,u2,v1,v2 being Element of REAL such that x" = [*u1,u2*] and A19: z = [*v1,v2*] and A20: x"*z = [* +(*(u1,v1),opp*(u2,v2)), +(*(u1,v2),*(u2,v1)) *] by Def5; v2 = 0 by A19,ARYTM_0:24; then A21: v1 = 0 by A19,ARYTM_0:def 5; then A22: +(*(u1,v1),opp*(u2,v2)) = opp*(u2,v2) by ARYTM_0:11,12 .= 0 by A17,A19,ARYTM_0:12,24; A23: +(*(u1,v2),*(u2,v1)) = +(0,*(u2,v1)) by A19,ARYTM_0:12,24 .= *(u2,v1) by ARYTM_0:11 .= 0 by A21,ARYTM_0:12; assume A24: x*y = 0; A25: x"*x*y = x"*(x*y) by Lm3 .= 0 by A20,A22,A23,A24,ARYTM_0:def 5; x"*x*y = j * y by Def7 .= y by A13,A15,A16,A18,ARYTM_0:19; hence contradiction by A25; end; end; registration let x,y be non zero complex number; cluster x/y -> non zero; coherence; end; registration cluster -> complex for Element of REAL; coherence proof let n be Element of REAL; n in REAL; hence thesis by Def2,Lm4; end; end; registration cluster natural -> complex for number; coherence proof let n be set; assume n is natural; then n in NAT by ORDINAL1:def 12; hence thesis; end; end; registration cluster -> complex for Element of COMPLEX; coherence by Def2; end; begin reserve x for complex number; theorem Th1: x + 0 = x proof x in COMPLEX by XCMPLX_0:def 2; then consider x1,x2 being Element of REAL such that A1: x = [*x1,x2*] by ARYTM_0:9; 0 = [*0,0*] by ARYTM_0:def 5; then x + 0 = [*+(x1,0),+(x2,0)*] by A1,XCMPLX_0:def 4 .= [* x1,+(x2,0)*] by ARYTM_0:11 .= x by A1,ARYTM_0:11; hence thesis; end; Lm1: -0 = 0 proof 0 + -0 = -0 by Th1; hence thesis by XCMPLX_0:def 6; end; Lm2: opp 0 = 0 proof +(0,0) = 0 by ARYTM_0:11; hence thesis by ARYTM_0:def 3; end; theorem Th2: x * 0 = 0 proof x in COMPLEX by XCMPLX_0:def 2; then consider x1,x2 being Element of REAL such that A1: x = [*x1,x2*] by ARYTM_0:9; 0 = [*0,0*] by ARYTM_0:def 5; then x * 0 = [* +(*(x1,0),opp*(x2,0)), +(*(x1,0),*(x2,0)) *] by A1, XCMPLX_0:def 5 .= [* +(*(x1,0),opp 0), +(*(x1,0),*(x2,0)) *] by ARYTM_0:12 .= [* +(*(x1,0),opp 0), +(*(x1,0),0) *] by ARYTM_0:12 .= [* +(0,opp 0), +(*(x1,0),0) *] by ARYTM_0:12 .= [* +(0,opp 0), +(0,0) *] by ARYTM_0:12 .= [* +(0,opp 0), 0 *] by ARYTM_0:11 .= [* opp 0, 0 *] by ARYTM_0:11 .= 0 by Lm2,ARYTM_0:def 5; hence thesis; end; theorem Th3: 1 * x = x proof x in COMPLEX by XCMPLX_0:def 2; then consider x1,x2 being Element of REAL such that A1: x = [*x1,x2*] by ARYTM_0:9; 1 = [*1,0*] by ARYTM_0:def 5; then x * 1 = [* +(*(x1,1),opp*(x2,0)), +(*(x1,0),*(x2,1)) *] by A1, XCMPLX_0:def 5 .= [* +(*(x1,1),opp 0), +(*(x1,0),*(x2,1)) *] by ARYTM_0:12 .= [* +(x1,opp 0), +(*(x1,0),*(x2,1)) *] by ARYTM_0:19 .= [* +(x1,opp 0), +(*(x1,0),x2) *] by ARYTM_0:19 .= [* +(x1,0), +(0,x2) *] by Lm2,ARYTM_0:12 .= [* x1, +(0,x2) *] by ARYTM_0:11 .= x by A1,ARYTM_0:11; hence thesis; end; theorem x - 0 = x proof x - 0 = x + 0 by Lm1,XCMPLX_0:def 8; hence thesis by Th1; end; theorem 0 / x = 0 proof 0 / x = 0 * x" by XCMPLX_0:def 9; hence thesis by Th2; end; Lm3: 1" = 1 proof 1 * 1" = 1" by Th3; hence thesis by XCMPLX_0:def 7; end; theorem x / 1 = x proof x / 1 = x * 1 by Lm3,XCMPLX_0:def 9; hence thesis by Th3; end; begin reserve x for set; definition let x; attr x is ext-real means :Def1: x in ExtREAL; end; registration cluster ext-real for number; existence proof take 0; thus 0 in ExtREAL by XBOOLE_0:def 3; end; cluster -> ext-real for Element of ExtREAL; coherence by Def1; end; registration sethood of ext-real number proof take ExtREAL; thus thesis by Def1; end; end; definition func +infty equals REAL; coherence; func -infty equals [0,REAL]; coherence; end; definition redefine func ExtREAL equals REAL \/ {+infty,-infty}; compatibility; end; registration cluster +infty -> ext-real; coherence proof +infty in {REAL,[0,REAL]} by TARSKI:def 2; then +infty in ExtREAL by XBOOLE_0:def 3; hence thesis; end; cluster -infty -> ext-real; coherence proof -infty in {REAL,[0,REAL]} by TARSKI:def 2; then -infty in ExtREAL by XBOOLE_0:def 3; hence thesis; end; end; definition let x,y be ext-real number; pred x <= y means :Def5: ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & x9 <=' y9 if x in REAL+ & y in REAL+, ex x9,y9 being Element of REAL+ st x = [0,x9] & y = [0,y9] & y9 <=' x9 if x in [:{0},REAL+:] & y in [:{0},REAL+:] otherwise y in REAL+ & x in [:{0},REAL+:] or x = -infty or y = +infty; consistency by ARYTM_0:5,XBOOLE_0:3; reflexivity proof let x be ext-real number such that A1: not((x in REAL+ & x in REAL+ implies ex x9,y9 being Element of REAL+ st x = x9 & x = y9 & x9 <=' y9) & (x in [:{0},REAL+:] & x in [:{0},REAL+ :] implies ex x9,y9 being Element of REAL+ st x = [0,x9] & x = [0,y9] & y9 <=' x9) & (not(x in REAL+ & x in REAL+) & not(x in [:{0},REAL+:] & x in [:{0},REAL+ :]) implies x in REAL+ & x in [:{0},REAL+:] or x = -infty or x = +infty)); x in ExtREAL by Def1; then A2: x in REAL+ \/ [:{0},REAL+:] \ {[0,0]} or x in {+infty,-infty} by XBOOLE_0:def 3; per cases by A1; suppose that A3: x in REAL+ and A4: not ex x9,y9 being Element of REAL+ st x = x9 & x = y9 & x9 <=' y9; reconsider x9 = x as Element of REAL+ by A3; not x9 <=' x9 by A4; hence thesis; end; suppose that A5: x in [:{0},REAL+:] and A6: not ex x9,y9 being Element of REAL+ st x = [0,x9] & x = [0,y9] & y9 <=' x9; consider z,x9 being set such that A7: z in {0} and A8: x9 in REAL+ and A9: x = [z,x9] by A5,ZFMISC_1:84; reconsider x9 as Element of REAL+ by A8; x = [0,x9] by A7,A9,TARSKI:def 1; then not x9 <=' x9 by A6; hence thesis; end; suppose not(not x in REAL+ & not x in [:{0},REAL+:] implies x in REAL+ & x in [:{0},REAL+:] or x = -infty or x = +infty); hence thesis by A2,TARSKI:def 2,XBOOLE_0:def 3; end; end; connectedness proof let x,y be ext-real number such that A10: not((x in REAL+ & y in REAL+ implies ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & x9 <=' y9) & (x in [:{0},REAL+:] & y in [:{0},REAL+ :] implies ex x9,y9 being Element of REAL+ st x = [0,x9] & y = [0,y9] & y9 <=' x9) & (not(x in REAL+ & y in REAL+) & not(x in [:{0},REAL+:] & y in [:{0},REAL+ :]) implies y in REAL+ & x in [:{0},REAL+:] or x = -infty or y = +infty)); x in ExtREAL by Def1; then A11: x in REAL+ \/ [:{0},REAL+:] \ {[0,0]} or x in {+infty,-infty} by XBOOLE_0:def 3; y in ExtREAL by Def1; then A12: y in REAL+ \/ [:{0},REAL+:] \ {[0,0]} or y in {+infty,-infty} by XBOOLE_0:def 3; per cases by A10; suppose that A13: x in REAL+ & y in REAL+ and A14: not ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & x9 <=' y9; hereby assume y in REAL+ & x in REAL+; then reconsider x9 = x, y9 = y as Element of REAL+; take y9,x9; thus y = y9 & x = x9; thus y9 <=' x9 by A14; end; thus thesis by A13,ARYTM_0:5,XBOOLE_0:3; end; suppose that A15: x in [:{0},REAL+:] & y in [:{0},REAL+:] and A16: not ex x9,y9 being Element of REAL+ st x = [0,x9] & y = [0,y9] & y9 <=' x9; now assume y in [:{0},REAL+:]; then consider z,y9 being set such that A17: z in {0} and A18: y9 in REAL+ and A19: y = [z,y9] by ZFMISC_1:84; A20: z = 0 by A17,TARSKI:def 1; assume x in [:{0},REAL+:]; then consider z,x9 being set such that A21: z in {0} and A22: x9 in REAL+ and A23: x = [z,x9] by ZFMISC_1:84; reconsider x9,y9 as Element of REAL+ by A18,A22; take y9,x9; thus y = [0,y9] & x = [0,x9] by A17,A19,A21,A23,TARSKI:def 1; z = 0 by A21,TARSKI:def 1; hence x9 <=' y9 by A16,A19,A20,A23; end; hence thesis by A15,ARYTM_0:5,XBOOLE_0:3; end; suppose not(not(x in REAL+ & y in REAL+) & not(x in [:{0},REAL+:] & y in [:{0},REAL+:]) implies y in REAL+ & x in [:{0},REAL+:] or x = -infty or y = +infty); hence thesis by A11,A12,TARSKI:def 2,XBOOLE_0:def 3; end; end; end; reserve a,b,c,d for ext-real number; notation let a,b; synonym b >= a for a <= b; antonym b < a for a <= b; antonym a > b for a <= b; end; Lm1: +infty <> [0,0] proof assume +infty = [0,0]; then +infty = {{0},{0}} by ENUMSET1:29 .= {{0}} by ENUMSET1:29; hence contradiction by TARSKI:def 1; end; Lm2: not +infty in REAL+ by ARYTM_0:1,ORDINAL1:5; Lm3: not -infty in REAL+ proof A1: {0,REAL} in -infty & REAL in {0,REAL} by TARSKI:def 2; assume -infty in REAL+; hence contradiction by A1,ARYTM_0:1,XREGULAR:7; end; Lm4: not +infty in [:{0},REAL+:] proof assume +infty in [:{0},REAL+:]; then +infty in REAL+ \/ [:{0},REAL+:] by XBOOLE_0:def 3; then +infty in REAL by Lm1,ZFMISC_1:56; hence contradiction; end; Lm5: not -infty in [:{0},REAL+:] proof assume -infty in [:{0},REAL+:]; then REAL in REAL+ by ZFMISC_1:87; hence contradiction by ARYTM_0:1,ORDINAL1:5; end; Lm6: -infty < +infty proof -infty <> +infty by TARSKI:def 2; hence thesis by Def5,Lm3,Lm5; end; theorem Th1: a <= b & b <= a implies a = b proof assume that A1: a <= b and A2: b <= a; per cases; suppose a in REAL+ & b in REAL+; then (ex a9,b9 being Element of REAL+ st a = a9 & b = b9 & a9 <=' b9 )& ex b99, a99 being Element of REAL+ st b = b99 & a = a99 & b99 <=' a99 by A1,A2 ,Def5; hence thesis by ARYTM_1:4; end; suppose A3: a in REAL+ & b in [:{0},REAL+:]; then ( not b in REAL+)& not a in [:{0},REAL+:] by ARYTM_0:5,XBOOLE_0:3; hence thesis by A1,A3,Def5,Lm3,Lm4; end; suppose A4: b in REAL+ & a in [:{0},REAL+:]; then ( not a in REAL+)& not b in [:{0},REAL+:] by ARYTM_0:5,XBOOLE_0:3; hence thesis by A2,A4,Def5,Lm3,Lm4; end; suppose that A5: a in [:{0},REAL+:] & b in [:{0},REAL+:]; consider a9,b9 being Element of REAL+ such that A6: a = [0,a9] & b = [0,b9] and A7: b9 <=' a9 by A1,A5,Def5; consider b99,a99 being Element of REAL+ such that A8: b = [0,b99] & a = [0,a99] and A9: a99 <=' b99 by A2,A5,Def5; a9 = a99 & b9 = b99 by A6,A8,XTUPLE_0:1; hence thesis by A7,A8,A9,ARYTM_1:4; end; suppose (a = -infty or a = +infty) & (b = -infty or b = +infty); hence thesis by A1,A2,Lm6; end; suppose that A10: ( not(a in REAL+ & b in REAL+))& not(a in [:{0},REAL+:] & b in [: {0},REAL+:]) and A11: not(b in REAL+ & a in [:{0},REAL+:]) and A12: not(a in REAL+ & b in [:{0},REAL+:]); a = -infty or b = +infty by A1,A10,A11,Def5; hence thesis by A2,A10,A12,Def5,Lm6; end; end; Lm7: -infty >= a implies a = -infty proof a >= -infty by Def5,Lm3,Lm5; hence thesis by Th1; end; Lm8: +infty <= a implies a = +infty proof a <= +infty by Def5,Lm2,Lm4; hence thesis by Th1; end; theorem Th2: a <= b & b <= c implies a <= c proof assume that A1: a <= b and A2: b <= c; per cases; suppose that A3: a in REAL+ and A4: b in REAL+ and A5: c in REAL+; consider b99,c9 being Element of REAL+ such that A6: b = b99 and A7: c = c9 and A8: b99 <=' c9 by A2,A4,A5,Def5; consider a9,b9 being Element of REAL+ such that A9: a = a9 and A10: b = b9 & a9 <=' b9 by A1,A3,A4,Def5; a9 <=' c9 by A10,A6,A8,ARYTM_1:3; hence thesis by A5,A9,A7,Def5; end; suppose A11: a in REAL+ & b in [:{0},REAL+:]; then ( not(a in REAL+ & b in REAL+))& not(a in [:{0},REAL+:] & b in [:{0}, REAL+:]) by ARYTM_0:5,XBOOLE_0:3; hence thesis by A1,A11,Def5,Lm3,Lm4; end; suppose A12: b in REAL+ & c in [:{0},REAL+:]; then ( not(c in REAL+ & b in REAL+))& not(c in [:{0},REAL+:] & b in [:{0}, REAL+:]) by ARYTM_0:5,XBOOLE_0:3; hence thesis by A2,A12,Def5,Lm3,Lm4; end; suppose that A13: a in [:{0},REAL+:] & c in REAL+; ( not(a in REAL+ & c in REAL+))& not(a in [:{0},REAL+:] & c in [:{0}, REAL+:]) by A13,ARYTM_0:5,XBOOLE_0:3; hence thesis by A13,Def5; end; suppose that A14: a in [:{0},REAL+:] and A15: b in [:{0},REAL+:] and A16: c in [:{0},REAL+:]; consider b99,c9 being Element of REAL+ such that A17: b = [0,b99] and A18: c = [0,c9] and A19: c9 <=' b99 by A2,A15,A16,Def5; consider a9,b9 being Element of REAL+ such that A20: a = [0,a9] and A21: b = [0,b9] and A22: b9 <=' a9 by A1,A14,A15,Def5; b9 = b99 by A21,A17,XTUPLE_0:1; then c9 <=' a9 by A22,A19,ARYTM_1:3; hence thesis by A14,A16,A20,A18,Def5; end; suppose that A23: not(a in REAL+ & b in REAL+ & c in REAL+) and A24: not(a in REAL+ & b in [:{0},REAL+:]) and A25: not(b in REAL+ & c in [:{0},REAL+:]) and A26: not(a in [:{0},REAL+:] & c in REAL+) and A27: not(a in [:{0},REAL+:] & b in [:{0},REAL+:] & c in [:{0},REAL+:]); A28: b = +infty implies c = +infty by A2,Lm8; A29: b = -infty implies a = -infty by A1,Lm7; a = -infty or b = +infty or b = -infty or c = +infty by A1,A2,A23,A25,A26 ,A27,Def5; hence thesis by A1,A2,A23,A24,A25,A27,A28,A29,Def5; end; end; theorem a <= +infty by Def5,Lm2,Lm4; theorem +infty <= a implies a = +infty by Lm8; theorem a >= -infty by Def5,Lm3,Lm5; theorem -infty >= a implies a = -infty by Lm7; theorem -infty < +infty by Lm6; theorem not +infty in REAL; Lm9: a in REAL or a = +infty or a = -infty proof a in ExtREAL by Def1; then a in REAL or a in { +infty, -infty } by XBOOLE_0:def 3; hence thesis by TARSKI:def 2; end; theorem Th9: a in REAL implies +infty > a proof assume a in REAL; then A1: a <> +infty; +infty >= a by Def5,Lm2,Lm4; hence thesis by A1,Th1; end; theorem Th10: a in REAL & b >= a implies b in REAL or b = +infty proof assume that A1: a in REAL and A2: b >= a; assume A3: not b in REAL; b = -infty implies a = -infty by A2,Lm7; hence thesis by A1,A3,Lm9; end; theorem Th11: not -infty in REAL proof A1: {0,REAL} in {{0,REAL},{0}} & REAL in {0,REAL} by TARSKI:def 2; assume -infty in REAL; hence contradiction by A1,XREGULAR:7; end; theorem Th12: a in REAL implies -infty < a proof -infty <= a by Def5,Lm3,Lm5; hence thesis by Th1,Th11; end; theorem Th13: a in REAL & b <= a implies b in REAL or b = -infty proof assume that A1: a in REAL and A2: b <= a; assume A3: not b in REAL; b = +infty implies a = +infty by A2,Lm8; hence thesis by A1,A3,Lm9; end; theorem a in REAL or a = +infty or a = -infty by Lm9; begin registration cluster natural -> ext-real for number; coherence proof let a be number; assume a is natural; then a in NAT by ORDINAL1:def 12; hence a in ExtREAL by XBOOLE_0:def 3; end; end; notation let a be number; synonym a is zero for a is empty; end; definition let a be ext-real number; attr a is positive means a > 0; attr a is negative means a < 0; redefine attr a is zero means a = 0; compatibility; end; registration cluster positive -> non negative non zero for ext-real number; coherence proof let r be ext-real number; assume r > 0; hence r >= 0 & r <> 0; end; cluster non negative non zero -> positive for ext-real number; coherence proof let r be ext-real number; assume r >= 0 & r <> 0; hence r > 0 by Th1; end; cluster negative -> non positive non zero for ext-real number; coherence proof let r be ext-real number; assume r < 0; hence r <= 0 & r <> {}; end; cluster non positive non zero -> negative for ext-real number; coherence; cluster zero -> non negative non positive for ext-real number; coherence; cluster non negative non positive -> zero for ext-real number; coherence; end; registration cluster +infty -> positive; coherence proof thus 0 < +infty by Th9; end; cluster -infty -> negative; coherence proof thus 0 > -infty by Th12; end; end; registration cluster positive for ext-real number; existence proof take +infty; thus thesis; end; cluster negative for ext-real number; existence proof take -infty; thus thesis; end; cluster zero for ext-real number; existence proof reconsider z = 0 as ext-real number; take z; thus z = 0; end; end; begin definition let a,b; func min(a,b) equals :Def9: a if a <= b otherwise b; correctness; commutativity by Th1; idempotence; func max(a,b) equals :Def10: a if b <= a otherwise b; correctness; commutativity by Th1; idempotence; end; theorem min(a,b) = a or min(a,b) = b by Def9; theorem max(a,b) = a or max(a,b) = b by Def10; registration let a,b; cluster min(a,b) -> ext-real; coherence by Def9; cluster max(a,b) -> ext-real; coherence by Def10; end; theorem Th17: min(a,b) <= a proof a <= b or not a <= b; hence thesis by Def9; end; theorem Th18: a <= b & c <= d implies min(a,c) <= min(b,d) proof assume that A1: a <= b and A2: c <= d; min(a,c) <= c by Th17; then A3: min(a,c) <= d by A2,Th2; min(a,c) <= a by Th17; then min(a,c) <= b by A1,Th2; hence thesis by A3,Def9; end; theorem a < b & c < d implies min(a,c) < min(b,d) proof assume that A1: a < b and A2: c < d; min(a,c) <= c by Th17; then A3: min(a,c) < d by A2,Th2; min(a,c) <= a by Th17; then min(a,c) < b by A1,Th2; hence thesis by A3,Def9; end; theorem a <= b & a <= c implies a <= min(b,c) by Def9; theorem a < b & a < c implies a < min(b,c) by Def9; theorem a <= min(b,c) implies a <= b proof min(b,c) <= b by Th17; hence thesis by Th2; end; theorem a < min(b,c) implies a < b proof min(b,c) <= b by Th17; hence thesis by Th2; end; theorem c <= a & c <= b & (for d st d <= a & d <= b holds d <= c) implies c = min(a,b) proof assume that A1: c <= a & c <= b and A2: for d st d <= a & d <= b holds d <= c; min(a,b) <= a & min(a,b) <= b by Th17; then A3: min(a,b) <= c by A2; c <= min(a,b) by A1,Def9; hence thesis by A3,Th1; end; theorem Th25: a <= max(a,b) proof a <= b or not a <= b; hence thesis by Def10; end; theorem Th26: a <= b & c <= d implies max(a,c) <= max(b,d) proof assume that A1: a <= b and A2: c <= d; d <= max(b,d) by Th25; then A3: c <= max(b,d) by A2,Th2; b <= max(b,d) by Th25; then a <= max(b,d) by A1,Th2; hence thesis by A3,Def10; end; theorem a < b & c < d implies max(a,c) < max(b,d) proof assume that A1: a < b and A2: c < d; d <= max(b,d) by Th25; then A3: c < max(b,d) by A2,Th2; b <= max(b,d) by Th25; then a < max(b,d) by A1,Th2; hence thesis by A3,Def10; end; theorem b <= a & c <= a implies max(b,c) <= a by Def10; theorem b < a & c < a implies max(b,c) < a by Def10; theorem max(b,c) <= a implies b <= a proof b <= max(b,c) by Th25; hence thesis by Th2; end; theorem max(b,c) < a implies b < a proof b <= max(b,c) by Th25; hence thesis by Th2; end; theorem a <= c & b <= c & (for d st a <= d & b <= d holds c <= d) implies c = max(a,b) proof assume that A1: a <= c & b <= c and A2: for d st a <= d & b <= d holds c <= d; a <= max(a,b) & b <= max(a,b) by Th25; then A3: c <= max(a,b) by A2; max(a,b) <= c by A1,Def10; hence thesis by A3,Th1; end; theorem min(min(a,b),c) = min(a,min(b,c)) proof per cases by Th2; suppose a <= b & a <= c; then min(a,b) = a & min(a,c) = a by Def9; hence thesis by Def9; end; suppose b <= a & b <= c; then min(a,b) = b & min(b,c) = b by Def9; hence thesis; end; suppose c <= b & c <= a; then min(b,c) = c & min(a,c) = c by Def9; hence thesis by Def9; end; end; theorem max(max(a,b),c) = max(a,max(b,c)) proof per cases by Th2; suppose A1: a <= b & a <= c; A2: max(b,c) = b or max(b,c) = c by Def10; max(a,b) = b by A1,Def10; hence thesis by A1,A2,Def10; end; suppose A3: b <= a & b <= c; then max(a,b) = a by Def10; hence thesis by A3,Def10; end; suppose A4: c <= b & c <= a; A5: max(a,b) = b or max(a,b) = a by Def10; max(b,c) = b by A4,Def10; hence thesis by A4,A5,Def10; end; end; theorem min(max(a,b),b) = b proof b <= max(a,b) by Th25; hence thesis by Def9; end; theorem max(min(a,b),b) = b proof min(a,b) <= b by Th17; hence thesis by Def10; end; theorem Th37: a <= c implies max(a,min(b,c)) = min(max(a,b),c) proof assume A1: a <= c; per cases; suppose A2: a <= b; then a <= min(b,c) by A1,Def9; hence max(a,min(b,c)) = min(b,c) by Def10 .= min(max(a,b),c) by A2,Def10; end; suppose A3: b <= a; then b <= c by A1,Th2; hence max(a,min(b,c)) = max(a,b) by Def9 .= a by A3,Def10 .= min(a,c) by A1,Def9 .= min(max(a,b),c) by A3,Def10; end; end; theorem min(a,max(b,c)) = max(min(a,b),min(a,c)) proof per cases; suppose A1: b <= c; then A2: min(a,b) <= min(a,c) by Th18; thus min(a,max(b,c)) = min(a,c) by A1,Def10 .= max(min(a,b),min(a,c)) by A2,Def10; end; suppose A3: c <= b; then A4: min(a,c) <= min(a,b) by Th18; thus min(a,max(b,c)) = min(a,b) by A3,Def10 .= max(min(a,b),min(a,c)) by A4,Def10; end; end; theorem max(a,min(b,c)) = min(max(a,b),max(a,c)) proof per cases; suppose A1: b <= c; then A2: max(a,b) <= max(a,c) by Th26; thus max(a,min(b,c)) = max(a,b) by A1,Def9 .= min(max(a,b),max(a,c)) by A2,Def9; end; suppose A3: c <= b; then A4: max(a,c) <= max(a,b) by Th26; thus max(a,min(b,c)) = max(a,c) by A3,Def9 .= min(max(a,b),max(a,c)) by A4,Def9; end; end; theorem max(max(min(a,b),min(b,c)),min(c,a)) = min(min(max(a,b),max(b,c)),max( c,a)) proof per cases; suppose A1: a <= c; then A2: max(a,b) <= max(b,c) by Th26; min(a,b) <= min(b,c) by A1,Th18; hence max(max(min(a,b),min(b,c)),min(c,a)) = max(min(b,c),min(c,a)) by Def10 .= max(min(b,c),a) by A1,Def9 .= min(max(a,b),c) by A1,Th37 .= min(max(a,b),max(c,a)) by A1,Def10 .= min(min(max(a,b),max(b,c)),max(c,a)) by A2,Def9; end; suppose A3: c <= a; then A4: max(a,b) >= max(b,c) by Th26; min(a,b) >= min(b,c) by A3,Th18; hence max(max(min(a,b),min(b,c)),min(c,a)) = max(min(a,b),min(c,a)) by Def10 .= max(min(a,b),c) by A3,Def9 .= min(max(c,b),a) by A3,Th37 .= min(max(c,b),max(c,a)) by A3,Def10 .= min(min(max(a,b),max(b,c)),max(c,a)) by A4,Def9; end; end; theorem max(a,+infty) = +infty proof a <= +infty by Def5,Lm2,Lm4; hence thesis by Def10; end; theorem min(a,+infty) = a proof a <= +infty by Def5,Lm2,Lm4; hence thesis by Def9; end; theorem max(a,-infty) = a proof a >= -infty by Def5,Lm3,Lm5; hence thesis by Def10; end; theorem min(a,-infty) = -infty proof a >= -infty by Def5,Lm3,Lm5; hence thesis by Def9; end; begin theorem a in REAL & c in REAL & a <= b & b <= c implies b in REAL proof assume that A1: a in REAL and A2: c in REAL and A3: a <= b and A4: b <= c; b in REAL or b = +infty by A1,A3,Th10; hence thesis by A2,A4,Th13; end; theorem a in REAL & a <= b & b < c implies b in REAL proof assume that A1: a in REAL & a <= b and A2: b < c; b in REAL or b = +infty by A1,Th10; hence thesis by A2,Lm8; end; theorem c in REAL & a < b & b <= c implies b in REAL proof assume that A1: c in REAL and A2: a < b and A3: b <= c; b in REAL or b = -infty by A1,A3,Th13; hence thesis by A2,Lm7; end; theorem a < b & b < c implies b in REAL proof assume A1: a < b & b < c; b in REAL or b = +infty or b = -infty by Lm9; hence thesis by A1,Lm7,Lm8; end; definition let x,y be ext-real number, a,b be set; func IFGT(x,y,a,b) equals :Def11: a if x > y otherwise b; correctness; end; registration let x,y be ext-real number, a,b be Nat; cluster IFGT(x,y,a,b) -> natural; coherence by Def11; end; theorem max(a,b) <= a implies max(a,b) = a proof assume max(a,b) <= a; then max(a,b) < a or max(a,b) = a by Th1; hence thesis by Th25; end; theorem a <= min(a,b) implies min(a,b) = a proof assume min(a,b) >= a; then min(a,b) > a or min(a,b) = a by Th1; hence thesis by Th17; end; begin definition let r be number; attr r is real means :Def1: r in REAL; end; registration cluster -> real for Element of REAL; coherence proof let r be Element of REAL; thus r in REAL; end; end; registration cluster -infty -> non real; coherence proof A1: {0,REAL} in {{0,REAL},{0}} & REAL in {0,REAL} by TARSKI:def 2; assume -infty in REAL; hence contradiction by A1,XREGULAR:7; end; cluster +infty -> non real; coherence proof thus not +infty in REAL; end; end; registration cluster natural -> real for number; coherence proof let x be number; assume x is natural; then x in NAT by ORDINAL1:def 12; hence x in REAL; end; cluster real -> complex for number; coherence proof let x be number; assume x is real; then x in REAL by Def1; hence x in COMPLEX by NUMBERS:def 2,XBOOLE_0:def 3; end; end; registration cluster real for number; existence proof take 0; thus 0 in REAL; end; cluster real -> ext-real for number; coherence proof let n be number; assume n in REAL; hence n in ExtREAL by XBOOLE_0:def 3; end; end; Lm1: for x being real number, x1,x2 being Element of REAL st x = [*x1,x2*] holds x2 = 0 & x = x1 proof let x be real number, x1,x2 being Element of REAL; assume A1: x = [*x1,x2*]; A2: x in REAL by Def1; thus now assume x2 <> 0; then x = (0,1) --> (x1,x2) by A1,ARYTM_0:def 5; hence contradiction by A2,ARYTM_0:8; end; hence thesis by A1,ARYTM_0:def 5; end; registration let x be real number; cluster -x -> real; coherence proof x + -x = 0; then consider x1,x2,y1,y2 being Element of REAL such that A1: x = [*x1,x2*] and A2: -x = [*y1,y2*] and A3: 0 = [*+(x1,y1),+(x2,y2)*] by XCMPLX_0:def 4; +(x2,y2) = 0 & x2 = 0 by A1,A3,Lm1; then y2 = 0 by ARYTM_0:11; hence thesis by A2,ARYTM_0:def 5; end; cluster x" -> real; coherence proof per cases; suppose x = 0; hence thesis by XCMPLX_0:def 7; end; suppose A4: x <> 0; then x * x" = 1 by XCMPLX_0:def 7; then consider x1,x2,y1,y2 being Element of REAL such that A5: x = [*x1,x2*] and A6: x" = [*y1,y2*] and A7: 1 = [* +(*(x1,y1),opp*(x2,y2)), +(*(x1,y2),*(x2,y1)) *] by XCMPLX_0:def 5 ; +(*(x1,y2),*(x2,y1)) = 0 & x2 = 0 by A5,A7,Lm1; then 0 = *(x1,y2) by ARYTM_0:11,12; then x1 = 0 or y2 = 0 by ARYTM_0:21; hence thesis by A4,A5,A6,Lm1,ARYTM_0:def 5; end; end; let y be real number; cluster x + y -> real; coherence proof consider x1,x2,y1,y2 being Element of REAL such that A8: x = [*x1,x2*] & y = [*y1,y2*] and A9: x+y = [*+(x1,y1),+(x2,y2)*] by XCMPLX_0:def 4; x2 = 0 & y2 = 0 by A8,Lm1; then +(x2,y2) = 0 by ARYTM_0:11; hence thesis by A9,ARYTM_0:def 5; end; cluster x * y -> real; coherence proof consider x1,x2,y1,y2 being Element of REAL such that A10: x = [*x1,x2*] and A11: y = [*y1,y2*] and A12: x*y = [* +(*(x1,y1),opp*(x2,y2)), +(*(x1,y2),*(x2,y1)) *] by XCMPLX_0:def 5; x2 = 0 by A10,Lm1; then A13: *(x2,y1) = 0 by ARYTM_0:12; A14: y2 = 0 by A11,Lm1; then *(opp x2,y2) = 0 by ARYTM_0:12; then A15: opp*(x2,y2) = 0 by ARYTM_0:15; *(x1,y2) = 0 by A14,ARYTM_0:12; then +(*(x1,y2),*(x2,y1)) = 0 by A13,ARYTM_0:11; then x * y = +(*(x1,y1),0) by A12,A15,ARYTM_0:def 5 .= *(x1,y1) by ARYTM_0:11; hence thesis; end; end; registration let x,y be real number; cluster x-y -> real; coherence; cluster x/y -> real; coherence; end; begin reserve r,s,t for real number; Lm2: (r in REAL+ & s in REAL+ & ex x9,y9 being Element of REAL+ st r = x9 & s = y9 & x9 <=' y9) or (r in [:{0},REAL+:] & s in [:{0},REAL+:] & ex x9,y9 being Element of REAL+ st r = [0,x9] & s = [0,y9] & y9 <=' x9) or s in REAL+ & r in [:{0},REAL+:] implies r <= s proof assume A1: (r in REAL+ & s in REAL+ & ex x9,y9 being Element of REAL+ st r = x9 & s = y9 & x9 <=' y9) or (r in [:{0},REAL+:] & s in [:{0},REAL+:] & ex x9,y9 being Element of REAL+ st r = [0,x9] & s = [0,y9] & y9 <=' x9) or s in REAL+ & r in [:{0},REAL+:]; per cases; case r in REAL+ & s in REAL+; hence thesis by A1,ARYTM_0:5,XBOOLE_0:3; end; case r in [:{0},REAL+:] & s in [:{0},REAL+:]; hence thesis by A1,ARYTM_0:5,XBOOLE_0:3; end; case not(r in REAL+ & s in REAL+) & not (r in [:{0},REAL+:] & s in [:{0 },REAL+:]); hence thesis by A1; end; end; Lm3: {} in {{}} by TARSKI:def 1; Lm4: r <= s & s <= r implies r = s proof assume that A1: r <= s and A2: s <= r; A3: r in REAL & s in REAL by Def1; per cases by A3,NUMBERS:def 1,XBOOLE_0:def 3; suppose r in REAL+ & s in REAL+; then (ex r9,s9 being Element of REAL+ st r = r9 & s = s9 & r9 <=' s9 )& ex s99, r99 being Element of REAL+ st s = s99 & r = r99 & s99 <=' r99 by A1,A2, XXREAL_0:def 5; hence thesis by ARYTM_1:4; end; suppose A4: r in REAL+ & s in [:{0},REAL+:]; then ( not(r in REAL+ & s in REAL+))& not(r in [:{0},REAL+:] & s in [:{0}, REAL+:]) by ARYTM_0:5,XBOOLE_0:3; hence thesis by A1,A4,XXREAL_0:def 5; end; suppose A5: s in REAL+ & r in [:{0},REAL+:]; then ( not(r in REAL+ & s in REAL+))& not(r in [:{0},REAL+:] & s in [:{0}, REAL+:]) by ARYTM_0:5,XBOOLE_0:3; hence thesis by A2,A5,XXREAL_0:def 5; end; suppose that A6: r in [:{0},REAL+:] & s in [:{0},REAL+:]; consider r9,s9 being Element of REAL+ such that A7: r = [0,r9] & s = [0,s9] and A8: s9 <=' r9 by A1,A6,XXREAL_0:def 5; consider s99,r99 being Element of REAL+ such that A9: s = [0,s99] & r = [0,r99] and A10: r99 <=' s99 by A2,A6,XXREAL_0:def 5; r9 = r99 & s9 = s99 by A7,A9,XTUPLE_0:1; hence thesis by A8,A9,A10,ARYTM_1:4; end; end; Lm5: r <= s implies r + t <= s + t proof reconsider x1=r, y1=s, z1=t as Element of REAL by Def1; A1: for x9 being Element of REAL, r st x9 = r holds +(x9,z1) = r + t proof let x9 be Element of REAL, r such that A2: x9 = r; consider x1,x2,y1,y2 being Element of REAL such that A3: r = [* x1,x2 *] & t = [*y1,y2*] and A4: r+t = [*+(x1,y1),+(x2,y2)*] by XCMPLX_0:def 4; x2 = 0 & y2 = 0 by A3,Lm1; then A5: +(x2,y2) = 0 by ARYTM_0:11; r = x1 & t = y1 by A3,Lm1; hence thesis by A2,A4,A5,ARYTM_0:def 5; end; then A6: +(y1,z1) = s + t; A7: +(x1,z1) = r + t by A1; assume A8: r <= s; per cases by A8,XXREAL_0:def 5; suppose that A9: r in REAL+ and A10: s in REAL+ and A11: t in REAL+; consider s9,t99 being Element of REAL+ such that A12: s = s9 & t = t99 and A13: +(y1,z1) = s9 + t99 by A10,A11,ARYTM_0:def 1; consider x9,t9 being Element of REAL+ such that A14: r = x9 & t = t9 and A15: +(x1,z1) = x9 + t9 by A9,A11,ARYTM_0:def 1; ex x99,s99 being Element of REAL+ st r = x99 & s = s99 & x99 <=' s99 by A8,A9,A10,XXREAL_0:def 5; then x9 + t9 <=' s9 + t99 by A14,A12,ARYTM_1:7; hence thesis by A6,A7,A15,A13,Lm2; end; suppose that A16: r in [:{0},REAL+:] and A17: s in REAL+ and A18: t in REAL+; consider s9,t99 being Element of REAL+ such that s = s9 and A19: t = t99 and A20: +(y1,z1) = s9 + t99 by A17,A18,ARYTM_0:def 1; consider x9,t9 being Element of REAL+ such that r = [0,x9] and A21: t = t9 and A22: +(x1,z1) = t9 - x9 by A16,A18,ARYTM_0:def 1; now per cases; suppose A23: x9 <=' t9; t9 -' x9 <=' t9 & t9 <=' s9 + t99 by A21,A19,ARYTM_1:11,ARYTM_2:19; then A24: t9 -' x9 <=' s9 + t99 by ARYTM_1:3; t9 - x9 = t9 -' x9 by A23,ARYTM_1:def 2; hence thesis by A6,A7,A22,A20,A24,Lm2; end; suppose not x9 <=' t9; then t9 - x9 = [0,x9 -' t9] by ARYTM_1:def 2; then t9 - x9 in [:{0},REAL+:] by Lm3,ZFMISC_1:87; then A25: not r + t in REAL+ by A7,A22,ARYTM_0:5,XBOOLE_0:3; not s + t in [:{0},REAL+:] by A6,A20,ARYTM_0:5,XBOOLE_0:3; hence thesis by A25,XXREAL_0:def 5; end; end; hence thesis; end; suppose that A26: r in [:{0},REAL+:] and A27: s in [:{0},REAL+:] and A28: t in REAL+; consider s9,t99 being Element of REAL+ such that A29: s = [0,s9] and A30: t = t99 and A31: +(y1,z1) = t99 - s9 by A27,A28,ARYTM_0:def 1; consider x99,s99 being Element of REAL+ such that A32: r = [0,x99] and A33: s = [0,s99] and A34: s99 <=' x99 by A8,A26,A27,XXREAL_0:def 5; consider x9,t9 being Element of REAL+ such that A35: r = [0,x9] and A36: t = t9 and A37: +(x1,z1) = t9 - x9 by A26,A28,ARYTM_0:def 1; A38: x9 = x99 by A32,A35,XTUPLE_0:1; A39: s9 = s99 by A33,A29,XTUPLE_0:1; now per cases; suppose A40: x9 <=' t9; then s9 <=' t9 by A34,A38,A39,ARYTM_1:3; then A41: t9 - s9 = t9 -' s9 by ARYTM_1:def 2; A42: t9 - x9 = t9 -' x9 by A40,ARYTM_1:def 2; t9 -' x9 <=' t99 -' s9 by A34,A36,A30,A38,A39,ARYTM_1:16; hence thesis by A6,A7,A36,A37,A30,A31,A42,A41,Lm2; end; suppose not x9 <=' t9; then A43: +(x1,z1) = [0,x9 -' t9] by A37,ARYTM_1:def 2; then A44: +(x1,z1) in [:{0},REAL+:] by Lm3,ZFMISC_1:87; now per cases; suppose s9 <=' t9; then t9 - s9 = t9 -' s9 by ARYTM_1:def 2; then A45: not +(y1,z1) in [:{0},REAL+:] by A36,A30,A31,ARYTM_0:5,XBOOLE_0:3; not +(x1,z1) in REAL+ by A44,ARYTM_0:5,XBOOLE_0:3; hence thesis by A6,A7,A45,XXREAL_0:def 5; end; suppose A46: not s9 <=' t9; A47: s9 -' t9 <=' x9 -' t9 by A34,A38,A39,ARYTM_1:17; A48: +(y1,z1) = [0,s9 -' t9] by A36,A30,A31,A46,ARYTM_1:def 2; then +(y1,z1) in [:{0},REAL+:] by Lm3,ZFMISC_1:87; hence thesis by A6,A7,A43,A44,A48,A47,Lm2; end; end; hence thesis; end; end; hence thesis; end; suppose that A49: r in REAL+ and A50: s in REAL+ and A51: t in [:{0},REAL+:]; consider s9,t99 being Element of REAL+ such that A52: s = s9 and A53: t = [0,t99] and A54: +(y1,z1) = s9 - t99 by A50,A51,ARYTM_0:def 1; consider x9,t9 being Element of REAL+ such that A55: r = x9 and A56: t = [0,t9] and A57: +(x1,z1) = x9 - t9 by A49,A51,ARYTM_0:def 1; A58: t9 = t99 by A56,A53,XTUPLE_0:1; A59: ex x99,s99 being Element of REAL+ st r = x99 & s = s99 & x99 <=' s99 by A8,A49,A50,XXREAL_0:def 5; now per cases; suppose A60: t9 <=' x9; then t9 <=' s9 by A59,A55,A52,ARYTM_1:3; then A61: s9 - t9 = s9 -' t9 by ARYTM_1:def 2; A62: x9 - t9 = x9 -' t9 by A60,ARYTM_1:def 2; x9 -' t9 <=' s9 -' t99 by A59,A55,A52,A58,ARYTM_1:17; hence thesis by A6,A7,A57,A54,A58,A62,A61,Lm2; end; suppose not t9 <=' x9; then A63: +(x1,z1) = [0,t9 -' x9] by A57,ARYTM_1:def 2; then A64: +(x1,z1) in [:{0},REAL+:] by Lm3,ZFMISC_1:87; now per cases; suppose t9 <=' s9; then s9 - t9 = s9 -' t9 by ARYTM_1:def 2; then A65: not +(y1,z1) in [:{0},REAL+:] by A54,A58,ARYTM_0:5,XBOOLE_0:3; not +(x1,z1) in REAL+ by A64,ARYTM_0:5,XBOOLE_0:3; hence thesis by A6,A7,A65,XXREAL_0:def 5; end; suppose A66: not t9 <=' s9; A67: t9 -' s9 <=' t9 -' x9 by A59,A55,A52,ARYTM_1:16; A68: +(y1,z1) = [0,t9 -' s9] by A54,A58,A66,ARYTM_1:def 2; then +(y1,z1) in [:{0},REAL+:] by Lm3,ZFMISC_1:87; hence thesis by A6,A7,A63,A64,A68,A67,Lm2; end; end; hence thesis; end; end; hence thesis; end; suppose that A69: r in [:{0},REAL+:] and A70: s in REAL+ and A71: t in [:{0},REAL+:]; ( not r in REAL+)& not t in REAL+ by A69,A71,ARYTM_0:5,XBOOLE_0:3; then consider x9,t9 being Element of REAL+ such that r = [0,x9] and A72: t = [0,t9] and A73: +(x1,z1) = [0,x9 + t9] by ARYTM_0:def 1; A74: +(x1,z1) in [:{0},REAL+:] by A73,Lm3,ZFMISC_1:87; consider s9,t99 being Element of REAL+ such that s = s9 and A75: t = [0,t99] and A76: +(y1,z1) = s9 - t99 by A70,A71,ARYTM_0:def 1; A77: t9 = t99 by A72,A75,XTUPLE_0:1; now per cases; suppose t9 <=' s9; then s9 - t99 = s9 -' t99 by A77,ARYTM_1:def 2; then A78: not +(y1,z1) in [:{0},REAL+:] by A76,ARYTM_0:5,XBOOLE_0:3; not +(x1,z1) in REAL+ by A74,ARYTM_0:5,XBOOLE_0:3; hence thesis by A6,A7,A78,XXREAL_0:def 5; end; suppose A79: not t9 <=' s9; t9 -' s9 <=' t9 & t9 <=' t9 + x9 by ARYTM_1:11,ARYTM_2:19; then A80: t9 -' s9 <=' t9 + x9 by ARYTM_1:3; A81: +(y1,z1) = [0,t9 -' s9] by A76,A77,A79,ARYTM_1:def 2; then +(y1,z1) in [:{0},REAL+:] by Lm3,ZFMISC_1:87; hence thesis by A6,A7,A73,A74,A81,A80,Lm2; end; end; hence thesis; end; suppose that A82: r in [:{0},REAL+:] and A83: s in [:{0},REAL+:] and A84: t in [:{0},REAL+:]; ( not s in REAL+)& not t in REAL+ by A83,A84,ARYTM_0:5,XBOOLE_0:3; then consider s9,t99 being Element of REAL+ such that A85: s = [0,s9] and A86: t = [0,t99] and A87: +(y1,z1) = [0,s9 + t99] by ARYTM_0:def 1; A88: +(y1,z1) in [:{0},REAL+:] by A87,Lm3,ZFMISC_1:87; ( not r in REAL+)& not t in REAL+ by A82,A84,ARYTM_0:5,XBOOLE_0:3; then consider x9,t9 being Element of REAL+ such that A89: r = [0,x9] and A90: t = [0,t9] and A91: +(x1,z1) = [0,x9 + t9] by ARYTM_0:def 1; A92: +(x1,z1) in [:{0},REAL+:] by A91,Lm3,ZFMISC_1:87; A93: t9 = t99 by A90,A86,XTUPLE_0:1; consider x99,s99 being Element of REAL+ such that A94: r = [0,x99] and A95: s = [0,s99] and A96: s99 <=' x99 by A8,A82,A83,XXREAL_0:def 5; A97: s9 = s99 by A95,A85,XTUPLE_0:1; x9 = x99 by A94,A89,XTUPLE_0:1; then s9 + t9 <=' x9 + t99 by A96,A97,A93,ARYTM_1:7; hence thesis by A6,A7,A91,A87,A93,A92,A88,Lm2; end; end; Lm6: r <= s & s <= t implies r <= t proof assume that A1: r <= s and A2: s <= t; A3: r in REAL & s in REAL by Def1; A4: t in REAL by Def1; per cases by A3,A4,NUMBERS:def 1,XBOOLE_0:def 3; suppose that A5: r in REAL+ and A6: s in REAL+ and A7: t in REAL+; consider s99,t9 being Element of REAL+ such that A8: s = s99 and A9: t = t9 and A10: s99 <=' t9 by A2,A6,A7,XXREAL_0:def 5; consider x9,s9 being Element of REAL+ such that A11: r = x9 and A12: s = s9 & x9 <=' s9 by A1,A5,A6,XXREAL_0:def 5; x9 <=' t9 by A12,A8,A10,ARYTM_1:3; hence thesis by A11,A9,Lm2; end; suppose A13: r in REAL+ & s in [:{0},REAL+:]; then ( not(r in REAL+ & s in REAL+))& not(r in [:{0},REAL+:] & s in [:{0}, REAL+:]) by ARYTM_0:5,XBOOLE_0:3; hence thesis by A1,A13,XXREAL_0:def 5; end; suppose A14: s in REAL+ & t in [:{0},REAL+:]; then ( not(t in REAL+ & s in REAL+))& not(t in [:{0},REAL+:] & s in [:{0}, REAL+:]) by ARYTM_0:5,XBOOLE_0:3; hence thesis by A2,A14,XXREAL_0:def 5; end; suppose that A15: r in [:{0},REAL+:] and A16: t in REAL+; ( not(r in REAL+ & t in REAL+))& not(r in [:{0},REAL+:] & t in [:{0}, REAL+:]) by A15,A16,ARYTM_0:5,XBOOLE_0:3; hence thesis by A16,XXREAL_0:def 5; end; suppose that A17: r in [:{0},REAL+:] and A18: s in [:{0},REAL+:] and A19: t in [:{0},REAL+:]; consider s99,t9 being Element of REAL+ such that A20: s = [0,s99] and A21: t = [0,t9] and A22: t9 <=' s99 by A2,A18,A19,XXREAL_0:def 5; consider x9,s9 being Element of REAL+ such that A23: r = [0,x9] and A24: s = [0,s9] and A25: s9 <=' x9 by A1,A17,A18,XXREAL_0:def 5; s9 = s99 by A24,A20,XTUPLE_0:1; then t9 <=' x9 by A25,A22,ARYTM_1:3; hence thesis by A17,A19,A23,A21,Lm2; end; end; reconsider z = 0 as Element of REAL+ by ARYTM_2:20; Lm7: not 0 in [:{0},REAL+:] by ARYTM_0:5,ARYTM_2:20,XBOOLE_0:3; reconsider j = 1 as Element of REAL+ by ARYTM_2:20; z <=' j by ARYTM_1:6; then Lm8: 0 <= 1 by Lm2; 1 + -1 = 0; then consider x1,x2,y1,y2 being Element of REAL such that Lm9: 1 = [*x1,x2*] and Lm10: -1 = [*y1,y2*] & 0 = [*+(x1,y1),+(x2,y2)*] by XCMPLX_0:def 4; Lm11: x1 = 1 by Lm1,Lm9; Lm12: y1 = -1 & +(x1,y1) = 0 by Lm1,Lm10; Lm13: now assume -1 in REAL+; then ex x9,y9 being Element of REAL+ st x1 = x9 & y1 = y9 & z = x9 + y9 by Lm11,Lm12,ARYTM_0:def 1,ARYTM_2:20; hence contradiction by Lm11,ARYTM_2:5; end; Lm14: r >= 0 & s > 0 implies r + s > 0 proof assume r >= 0; then r + s >= 0 + s by Lm5; hence thesis by Lm6; end; Lm15: r <= 0 & s < 0 implies r + s < 0 proof assume r <= 0; then r + s <= 0 + s by Lm5; hence thesis by Lm6; end; reconsider o = 0 as Element of REAL+ by ARYTM_2:20; Lm16: r <= s & 0 <= t implies r * t <= s * t proof reconsider x1=r, y1=s, z1=t as Element of REAL by Def1; assume that A1: r <= s and A2: 0 <= t; not o in [:{0},REAL+:] by ARYTM_0:5,XBOOLE_0:3; then A3: t in REAL+ by A2,XXREAL_0:def 5; for x9 being Element of REAL, r st x9 = r holds *(x9,z1) = r * t proof let x9 be Element of REAL, r such that A4: x9 = r; consider x1,x2,y1,y2 being Element of REAL such that A5: r = [* x1,x2 *] and A6: t = [*y1,y2*] and A7: r*t = [* +(*(x1,y1),opp*(x2,y2)), +(*(x1,y2),*(x2,y1)) *] by XCMPLX_0:def 5 ; x2 = 0 by A5,Lm1; then A8: *(x2,y1) = 0 by ARYTM_0:12; A9: y2 = 0 by A6,Lm1; then *(x1,y2) = 0 by ARYTM_0:12; then A10: +(*(x1,y2),*(x2,y1)) = 0 by A8,ARYTM_0:11; r = x1 & t = y1 by A5,A6,Lm1; hence *(x9,z1) = +(*(x1,y1),*(opp x2,y2)) by A4,A9,ARYTM_0:11,12 .= +(*(x1,y1),opp*(x2,y2)) by ARYTM_0:15 .= r * t by A7,A10,ARYTM_0:def 5; end; then A11: *(y1,z1) = s * t & *(x1,z1) = r * t; assume A12: not thesis; then A13: t <> 0; per cases by A1,XXREAL_0:def 5; suppose that A14: r in REAL+ and A15: s in REAL+; consider s9,t99 being Element of REAL+ such that A16: s = s9 and A17: t = t99 & *(y1,z1) = s9 *' t99 by A3,A15,ARYTM_0:def 2; consider x9,t9 being Element of REAL+ such that A18: r = x9 and A19: t = t9 & *(x1,z1) = x9 *' t9 by A3,A14,ARYTM_0:def 2; ex x99,s99 being Element of REAL+ st r = x99 & s = s99 & x99 <=' s99 by A1,A14,A15,XXREAL_0:def 5; then x9 *' t9 <=' s9 *' t9 by A18,A16,ARYTM_1:8; hence contradiction by A11,A12,A19,A17,Lm2; end; suppose that A20: r in [:{0},REAL+:] and A21: s in REAL+; ex x9,t9 being Element of REAL+ st r = [0,x9] & t = t9 & *(x1,z1) = [0 ,t9 *' x9] by A3,A13,A20,ARYTM_0:def 2; then *(x1,z1) in [:{0},REAL+:] by Lm3,ZFMISC_1:87; then A22: not *(x1,z1) in REAL+ by ARYTM_0:5,XBOOLE_0:3; ex s9,t99 being Element of REAL+ st s = s9 & t = t99 & * (y1,z1) = s9 *' t99 by A3,A21,ARYTM_0:def 2; then not *(y1,z1) in [:{0},REAL+:] by ARYTM_0:5,XBOOLE_0:3; hence contradiction by A11,A12,A22,XXREAL_0:def 5; end; suppose that A23: r in [:{0},REAL+:] and A24: s in [:{0},REAL+:]; consider s9,t99 being Element of REAL+ such that A25: s = [0,s9] and A26: t = t99 and A27: *(y1,z1) = [0,t99 *' s9] by A3,A13,A24,ARYTM_0:def 2; A28: *(y1,z1) in [:{0},REAL+:] by A27,Lm3,ZFMISC_1:87; consider x99,s99 being Element of REAL+ such that A29: r = [0,x99] and A30: s = [0,s99] and A31: s99 <=' x99 by A1,A23,A24,XXREAL_0:def 5; A32: s9 = s99 by A30,A25,XTUPLE_0:1; consider x9,t9 being Element of REAL+ such that A33: r = [0,x9] and A34: t = t9 and A35: *(x1,z1) = [0,t9 *' x9] by A3,A13,A23,ARYTM_0:def 2; A36: *(x1,z1) in [:{0},REAL+:] by A35,Lm3,ZFMISC_1:87; x9 = x99 by A29,A33,XTUPLE_0:1; then s9 *' t9 <=' x9 *' t9 by A31,A32,ARYTM_1:8; hence contradiction by A11,A12,A34,A35,A26,A27,A36,A28,Lm2; end; end; Lm17: r > 0 & s > 0 implies r*s > 0 proof assume A1: r > 0 & s > 0; then r * s >= 0 * s by Lm16; hence thesis by A1,Lm4; end; Lm18: r > 0 & s < 0 implies r*s < 0 proof assume A1: r > 0 & s < 0; then r * s <= r * 0 by Lm16; hence thesis by A1,Lm4; end; Lm19: s<=t implies -t<=-s proof assume s<=t; then s-t<=t-t by Lm5; then s-t-s<=0-s by Lm5; hence thesis; end; Lm20: r <= 0 & s >= 0 implies r*s <= 0 proof assume A1: r <= 0 & s >= 0; per cases by A1,Lm4; suppose r = 0 or s = 0; hence thesis; end; suppose r < 0 & s > 0; hence thesis by Lm18; end; end; registration cluster positive for real number; existence proof take r = 1; thus 0 < r by Lm4,Lm8; end; cluster negative for real number; existence proof take r = -1; thus 0 > r by Lm7,Lm13,XXREAL_0:def 5; end; cluster zero for real number; existence proof take 0; thus thesis; end; end; registration let r,s be non negative real number; cluster r + s -> non negative; coherence proof A1: s >= 0 by XXREAL_0:def 7; A2: r >= 0 by XXREAL_0:def 7; per cases by A2,Lm4; suppose r = 0; hence r + s >= 0 by XXREAL_0:def 7; end; suppose r > 0; hence r+s >= 0 by A1,Lm14; end; end; end; registration let r,s be non positive real number; cluster r + s -> non positive; coherence proof A1: s <= 0 by XXREAL_0:def 6; A2: r <= 0 by XXREAL_0:def 6; per cases by A2,Lm4; suppose r = 0; hence r + s <= 0 by XXREAL_0:def 6; end; suppose r < 0; hence r + s <= 0 by A1,Lm15; end; end; end; registration let r be positive real number; let s be non negative real number; cluster r + s -> positive; coherence proof r > 0 & s >= 0 by XXREAL_0:def 6; hence r+s > 0 by Lm14; end; cluster s + r -> positive; coherence; end; registration let r be negative real number; let s be non positive real number; cluster r + s -> negative; coherence proof r < 0 & s <= 0 by XXREAL_0:def 7; hence r+s < 0 by Lm15; end; cluster s + r -> negative; coherence; end; registration let r be non positive real number; cluster -r -> non negative; coherence proof assume A1: -r < 0; --r <= 0 by XXREAL_0:def 6; then -r+--r < 0 by A1,Lm15; hence contradiction; end; end; registration let r be non negative real number; cluster -r -> non positive; coherence proof assume A1: -r > 0; --r >= 0 by XXREAL_0:def 7; then -r+--r > 0 by A1,Lm14; hence contradiction; end; end; registration let r be non negative real number, s be non positive real number; cluster r - s -> non negative; coherence; cluster s - r -> non positive; coherence; end; registration let r be positive real number; let s be non positive real number; cluster r - s -> positive; coherence; cluster s - r -> negative; coherence; end; registration let r be negative real number; let s be non negative real number; cluster r - s -> negative; coherence; cluster s - r -> positive; coherence; end; registration let r be non positive real number, s be non negative real number; cluster r*s -> non positive; coherence proof r <= 0 & s >= 0 by XXREAL_0:def 6; hence r*s <= 0 by Lm20; end; cluster s*r -> non positive; coherence; end; registration let r,s be non positive real number; cluster r*s -> non negative; coherence proof A1: r <= 0 & s <= 0 by XXREAL_0:def 6; per cases by A1,Lm4; suppose r = 0 or s = 0; hence r * s >= 0; end; suppose A2: --r < --0 & s < 0; then 0<-r by Lm19; then s*(-r)<=0*(-r) by A2,Lm16; then s*(-r)<0*(-r) by A2,Lm4; then --0*r<--s*r by Lm19; hence r * s >= 0; end; end; end; registration let r,s be non negative real number; cluster r*s -> non negative; coherence proof A1: r >= 0 & s >= 0 by XXREAL_0:def 7; per cases by A1,Lm4; suppose r = 0 or s = 0; hence r * s >= 0; end; suppose r > 0 & s > 0; hence r * s >= 0 by Lm17; end; end; end; registration let r be positive real number; cluster r" -> positive; coherence proof assume A1: r" <= 0; r"" > 0 by XXREAL_0:def 6; then r"*r"" = 1 & r"*r"" <= 0 by A1,Lm20,XCMPLX_0:def 7; hence contradiction by Lm4,Lm8; end; end; registration let r be non positive real number; cluster r" -> non positive; coherence proof A1: r"" <= 0 by XXREAL_0:def 6; assume A2: r" > 0; per cases by A1,Lm4; suppose r"" = 0; hence contradiction by A2; end; suppose A3: r"" < 0; r"*r"" = 1 by A2,XCMPLX_0:def 7; hence contradiction by A2,A3,Lm8,Lm18; end; end; end; registration let r be negative real number; cluster r" -> negative; coherence; end; registration let r be non negative real number; cluster r" -> non negative; coherence proof A1: r"" >= 0 by XXREAL_0:def 7; assume A2: r" < 0; per cases by A1,Lm4; suppose r"" = 0; hence contradiction by A2; end; suppose A3: r"" > 0; r"*r"" = 1 by A2,XCMPLX_0:def 7; hence contradiction by A2,A3,Lm8,Lm18; end; end; end; registration let r be non negative real number, s be non positive real number; cluster r/s -> non positive; coherence; cluster s/r -> non positive; coherence; end; registration let r,s be non negative real number; cluster r/s -> non negative; coherence; end; registration let r,s be non positive real number; cluster r/s -> non negative; coherence; end; begin registration let r,s; cluster min(r,s) -> real; coherence by XXREAL_0:15; cluster max(r,s) -> real; coherence by XXREAL_0:16; end; definition let r,s be real number; func r -' s equals :Def2: r - s if r -s >= 0 otherwise 0; correctness; end; registration let r,s be real number; cluster r -' s -> real; coherence proof r -' s = r - s or r -' s = 0 by Def2; hence thesis; end; end; registration let r,s be real number; cluster r -' s -> non negative for real number; coherence proof r -' s = r - s & r - s >= 0 or r -' s = 0 by Def2; hence thesis by XXREAL_0:def 7; end; end; begin reserve x, y, z for real number; Lm1: x <= y & y <= x implies x = y proof assume that A1: x <= y and A2: y <= x; A3: x in REAL & y in REAL by XREAL_0:def 1; per cases by A3,NUMBERS:def 1,XBOOLE_0:def 3; suppose x in REAL+ & y in REAL+; then (ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & x9 <=' y9 )& ex y99, x99 being Element of REAL+ st y = y99 & x = x99 & y99 <=' x99 by A1,A2, XXREAL_0:def 5; hence thesis by ARYTM_1:4; end; suppose A4: x in REAL+ & y in [:{0},REAL+:]; then ( not(x in REAL+ & y in REAL+))& not(x in [:{0},REAL+:] & y in [:{0}, REAL+:]) by ARYTM_0:5,XBOOLE_0:3; hence thesis by A1,A4,XXREAL_0:def 5; end; suppose A5: y in REAL+ & x in [:{0},REAL+:]; then ( not(x in REAL+ & y in REAL+))& not(x in [:{0},REAL+:] & y in [:{0}, REAL+:]) by ARYTM_0:5,XBOOLE_0:3; hence thesis by A2,A5,XXREAL_0:def 5; end; suppose that A6: x in [:{0},REAL+:] & y in [:{0},REAL+:]; consider x9,y9 being Element of REAL+ such that A7: x = [0,x9] & y = [0,y9] and A8: y9 <=' x9 by A1,A6,XXREAL_0:def 5; consider y99,x99 being Element of REAL+ such that A9: y = [0,y99] & x = [0,x99] and A10: x99 <=' y99 by A2,A6,XXREAL_0:def 5; x9 = x99 & y9 = y99 by A7,A9,XTUPLE_0:1; hence thesis by A8,A9,A10,ARYTM_1:4; end; end; Lm2: x <= y & y <= z implies x <= z proof assume that A1: x <= y and A2: y <= z; A3: x in REAL & y in REAL by XREAL_0:def 1; A4: z in REAL by XREAL_0:def 1; per cases by A3,A4,NUMBERS:def 1,XBOOLE_0:def 3; suppose that A5: x in REAL+ and A6: y in REAL+ and A7: z in REAL+; consider y99,z9 being Element of REAL+ such that A8: y = y99 and A9: z = z9 and A10: y99 <=' z9 by A2,A6,A7,XXREAL_0:def 5; consider x9,y9 being Element of REAL+ such that A11: x = x9 and A12: y = y9 & x9 <=' y9 by A1,A5,A6,XXREAL_0:def 5; x9 <=' z9 by A12,A8,A10,ARYTM_1:3; hence thesis by A11,A9,XXREAL_0:def 5; end; suppose A13: x in REAL+ & y in [:{0},REAL+:]; then ( not(x in REAL+ & y in REAL+))& not(x in [:{0},REAL+:] & y in [:{0}, REAL+:]) by ARYTM_0:5,XBOOLE_0:3; hence thesis by A1,A13,XXREAL_0:def 5; end; suppose A14: y in REAL+ & z in [:{0},REAL+:]; then ( not(z in REAL+ & y in REAL+))& not(z in [:{0},REAL+:] & y in [:{0}, REAL+:]) by ARYTM_0:5,XBOOLE_0:3; hence thesis by A2,A14,XXREAL_0:def 5; end; suppose that A15: x in [:{0},REAL+:] and A16: z in REAL+; ( not(x in REAL+ & z in REAL+))& not(x in [:{0},REAL+:] & z in [:{0}, REAL+:]) by A15,A16,ARYTM_0:5,XBOOLE_0:3; hence thesis by A16,XXREAL_0:def 5; end; suppose that A17: x in [:{0},REAL+:] and A18: y in [:{0},REAL+:] and A19: z in [:{0},REAL+:]; consider y99,z9 being Element of REAL+ such that A20: y = [0,y99] and A21: z = [0,z9] and A22: z9 <=' y99 by A2,A18,A19,XXREAL_0:def 5; consider x9,y9 being Element of REAL+ such that A23: x = [0,x9] and A24: y = [0,y9] and A25: y9 <=' x9 by A1,A17,A18,XXREAL_0:def 5; y9 = y99 by A24,A20,XTUPLE_0:1; then z9 <=' x9 by A25,A22,ARYTM_1:3; hence thesis by A17,A19,A23,A21,XXREAL_0:def 5; end; end; theorem x <= y & x is positive implies y is positive proof assume that A1: x <= y and A2: x is positive; x > 0 by A2,XXREAL_0:def 6; then y > 0 by A1,Lm2; hence thesis by XXREAL_0:def 6; end; theorem x <= y & y is negative implies x is negative proof assume that A1: x <= y and A2: y is negative; y < 0 by A2,XXREAL_0:def 7; then x < 0 by A1,Lm2; hence thesis by XXREAL_0:def 7; end; theorem x <= y & x is non negative implies y is non negative proof assume that A1: x <= y and A2: x is non negative and A3: y is negative; y < 0 by A3,XXREAL_0:def 7; then x < 0 by A1,Lm2; hence thesis by A2,XXREAL_0:def 7; end; theorem x <= y & y is non positive implies x is non positive proof assume that A1: x <= y and A2: y is non positive and A3: x is positive; x > 0 by A3,XXREAL_0:def 6; then y > 0 by A1,Lm2; hence thesis by A2,XXREAL_0:def 6; end; theorem x <= y & y is non zero & x is non negative implies y is positive proof assume that A1: x <= y and A2: y is non zero and A3: x is non negative and A4: y is non positive; y <= 0 by A4,XXREAL_0:def 6; then A5: y < 0 by A2,Lm1; x >= 0 by A3,XXREAL_0:def 7; hence thesis by A1,A5,Lm2; end; theorem x <= y & x is non zero & y is non positive implies x is negative proof assume that A1: x <= y and A2: x is non zero and A3: y is non positive and A4: x is non negative; x >= 0 by A4,XXREAL_0:def 7; then A5: x > 0 by A2,Lm1; y <= 0 by A3,XXREAL_0:def 6; hence thesis by A1,A5,Lm2; end; theorem not x <= y & x is non positive implies y is negative proof assume that A1: x > y and A2: x is non positive & y is non negative; x <= 0 & y >= 0 by A2,XXREAL_0:def 6,def 7; hence thesis by A1,Lm2; end; theorem not x <= y & y is non negative implies x is positive proof assume that A1: x > y and A2: y is non negative & x is non positive; x <= 0 & y >= 0 by A2,XXREAL_0:def 6,def 7; hence thesis by A1,Lm2; end; begin reserve a, b, c, d, e for complex number; theorem a + (b + c) = (a + b) + c; theorem a + c = b + c implies a = b; theorem a = a + b implies b = 0; theorem Th4: a * (b * c) = (a * b) * c; theorem c <> 0 & a * c = b * c implies a = b proof assume A1: c<>0; assume a * c = b * c; then a * (c * c") = b * c * c" by Th4; then a * 1 = b * c * c" by A1,XCMPLX_0:def 7; then a = b * (c * c"); then a = b * 1 by A1,XCMPLX_0:def 7; hence thesis; end; theorem a*b=0 implies a=0 or b=0; theorem Th7: b <> 0 & a * b = b implies a = 1 proof assume that A1: b<>0 and A2: a*b=b; a*b*b"=1 by A1,A2,XCMPLX_0:def 7; then a*1=1 by A2,Th4; hence thesis; end; theorem a * (b + c) = a * b + a * c; theorem (a + b + c) * d = a * d + b * d + c * d; theorem (a + b) * (c + d) = a * c + a * d + b * c + b * d; theorem 2 * a = a + a; theorem 3 * a = a + a + a; theorem 4 * a = a + a + a + a; theorem a - a = 0; theorem a - b = 0 implies a = b; theorem b - a = b implies a = 0; theorem a = a - (b - b); theorem a - (a - b) = b; theorem a - c = b - c implies a = b; theorem c - a = c - b implies a = b; theorem a - b - c = a - c - b; theorem a - c = (a - b) - (c - b); theorem (c - a) - (c - b) = b - a; theorem a - b = c - d implies a - c = b - d; Lm1: a"*b"=(a*b)" proof per cases; suppose A1: a = 0 or b = 0; then a" = 0 or b" = 0; hence thesis by A1; end; suppose that A2: a<>0 and A3: b<>0; thus a"*b"=a"*b"*1 .=a"*b"*((a*b)*(a*b)") by A2,A3,XCMPLX_0:def 7 .=a"*a*(b"*b)*(a*b)" .=1*(b"*b)*(a*b)" by A2,XCMPLX_0:def 7 .=1*(a*b)" by A3,XCMPLX_0:def 7 .=(a*b)"; end; end; Lm2: a/(b/c)=(a*c)/b proof thus a/(b/c)=a/(b*c") by XCMPLX_0:def 9 .=a*(b*c")" by XCMPLX_0:def 9 .=a*(b"*c"") by Lm1 .=a*c*b" .=(a*c)/b by XCMPLX_0:def 9; end; Lm3: b<>0 implies a/b*b=a proof assume A1: b<>0; thus a/b*b=a*b"*b by XCMPLX_0:def 9 .=a*(b"*b) .=a*1 by A1,XCMPLX_0:def 7 .=a; end; Lm4: 1/a=a" proof thus 1/a= 1 * a" by XCMPLX_0:def 9 .=a"; end; Lm5: a<>0 implies a/a = 1 proof assume A1: a<>0; thus a/a=a*a" by XCMPLX_0:def 9 .=1 by A1,XCMPLX_0:def 7; end; theorem a = a + (b - b); theorem a = a + b - b; theorem a = a - b + b; theorem a + c = a + b + (c - b); theorem a + b - c = a - c + b; theorem a - b + c = c - b + a; theorem a + c = a + b - (b - c); theorem a - c = a + b - (c + b); theorem a + b = c + d implies a - c = d - b; theorem a - c = d - b implies a + b = c + d; theorem a + b = c - d implies a + d = c - b; theorem a - (b + c) = a - b - c; theorem a - (b - c) = a - b + c; theorem a - (b - c) = a + (c - b); theorem a - c = (a - b) + (b - c); theorem a * (b - c) = a * b - a * c; theorem (a - b) * (c - d) = (b - a) * (d - c); theorem (a - b - c) * d = a * d - b * d - c * d; theorem (a + b - c) * d = a * d + b * d - c * d; theorem (a - b + c) * d = a * d - b * d + c * d; theorem (a + b) * (c - d) = a * c - a * d + b * c - b * d; theorem (a - b) * (c + d) = a * c + a * d - b * c - b * d; theorem (a - b) * (e - d) = a * e - a * d - b * e + b * d; theorem a / b / c = a / c / b proof thus a/b/c =a*b"/c by XCMPLX_0:def 9 .=a*b"*c" by XCMPLX_0:def 9 .=a*c"*b" .=a/c*b" by XCMPLX_0:def 9 .=a/c/b by XCMPLX_0:def 9; end; theorem Th49: a / 0 = 0 proof thus a/0 = a*0" by XCMPLX_0:def 9 .= 0; end; theorem a <> 0 & b <> 0 implies a / b <> 0; theorem b <> 0 implies a = a / (b / b) proof A1: a=a/1; assume b<>0; hence thesis by A1,Lm5; end; Lm6: (a/b) * (c/d) = (a*c)/(b*d) proof thus (a/b) * (c/d) =(a*b")*(c/d) by XCMPLX_0:def 9 .=(a*b")*(c*d") by XCMPLX_0:def 9 .=(a*c)*(b"*d") .=(a*c)*(b*d)" by Lm1 .=(a*c)/(b*d) by XCMPLX_0:def 9; end; Lm7: (a/b)"=b/a proof per cases; suppose A1: a = 0; hence (a/b)" =b*0" .=b/a by A1,XCMPLX_0:def 9; end; suppose A2: b = 0; hence (a/b)" =(a*0")" by XCMPLX_0:def 9 .=b/a by A2; end; suppose A3: a<>0 & b<>0; (a/b) * (b/a) =(a*b)/(a*b) by Lm6; then (a/b)*(b/a) = 1 by A3,Lm5; hence thesis by A3,XCMPLX_0:def 7; end; end; Lm8: a*(b/c) = (a*b)/c proof thus a*(b/c) = (a/1)*(b/c) .= (a*b)/(1*c) by Lm6 .= (a*b)/c; end; theorem a <> 0 implies a / (a / b) = b proof assume A1: a <> 0; thus a/(a/b) = a * (a/b)" by XCMPLX_0:def 9 .= a * (b/a) by Lm7 .= a*b/a by Lm8 .= a/a*b by Lm8 .= 1 * b by A1,Lm5 .= b; end; theorem c <> 0 & a / c = b / c implies a = b proof assume that A1: c<>0 and A2: a/c =b/c; a=b/c*c by A1,A2,Lm3; hence thesis by A1,Lm3; end; Lm9: b<>0 implies a=a*b/b proof A1: a=a*1; assume b<>0; then a=a*(b/b) by A1,Lm5; then a=a*(b*b") by XCMPLX_0:def 9; then a=a*b*b"; hence thesis by XCMPLX_0:def 9; end; theorem a / b <> 0 implies b = a / (a / b) proof assume A1: a/b<>0; then b<>0 by Th49; then a/b*b = a by Lm3; hence thesis by A1,Lm9; end; Lm10: c<>0 implies a/b=(a*c)/(b*c) proof assume A1: c<>0; thus a/b =a*b"*1 by XCMPLX_0:def 9 .=a*b"*(c*c") by A1,XCMPLX_0:def 7 .=(a*c)*(b"*c") .=(a*c)*(b*c)" by Lm1 .=(a*c)/(b*c) by XCMPLX_0:def 9; end; theorem c <> 0 implies a / b = (a / c) / (b / c) proof assume c<>0; hence a/b=(a*c")/(b*c") by Lm10 .=(a/c)/(b*c") by XCMPLX_0:def 9 .=(a/c)/(b/c) by XCMPLX_0:def 9; end; theorem 1 / (1 / a) = a proof thus 1/(1/a) = (1*a) /1 by Lm2 .= a; end; Lm11: (a*b")"=a"*b proof thus (a*b")"=a"*b"" by Lm1 .=a"*b; end; theorem 1 / (a / b) = b / a proof thus 1/(a/b)=1/(a*b") by XCMPLX_0:def 9 .=(a*b")" by Lm4 .=b*a" by Lm11 .=b/a by XCMPLX_0:def 9; end; theorem Th58: a / b = 1 implies a = b proof assume A1: a/b = 1; then b <> 0 by Th49; then a=1*b by A1,Lm3; hence thesis; end; Lm12: a"=b" implies a=b proof assume a"=b"; then a=b""; hence thesis; end; theorem Th59: 1 / a = 1 / b implies a = b proof assume 1/a=1/b; then a"=1/b by Lm4; then a" = b" by Lm4; hence thesis by Lm12; end; theorem a <> 0 implies a / a = 1 by Lm5; theorem b <> 0 & b / a = b implies a = 1 proof assume that A1: b<>0 and A2: b/a=b; a <> 0 by A1,A2,Th49; then b=b*a by A2,Lm3; hence thesis by A1,Th7; end; theorem Th62: a / c + b / c = (a + b) / c proof thus a/c + b/c =a*c" + b/c by XCMPLX_0:def 9 .= a*c" + b*c" by XCMPLX_0:def 9 .= (a+b)*c" .= (a+b)/c by XCMPLX_0:def 9; end; theorem (a + b + e) / d = a / d + b / d + e / d proof thus (a+b+e)/d=(a+b)/d+e/d by Th62 .=a/d+b/d+e/d by Th62; end; theorem (a + a) / 2 = a; theorem a/2 + a/2 = a; theorem a = (a + b) / 2 implies a = b; theorem (a + a + a)/3 = a; theorem a/3 + a/3 + a/3 = a; theorem (a + a + a + a) / 4 = a; theorem a/4 + a/4 + a/4 + a/4 = a; theorem a / 4 + a / 4 = a / 2; theorem (a + a) / 4 = a / 2; theorem a * b = 1 implies a = 1 / b proof assume A1: a*b=1; then b<>0; then a*1=1*b" by A1,XCMPLX_0:def 7; hence thesis by Lm4; end; theorem a * (b / c) = (a * b) / c by Lm8; theorem a / b * e = e / b * a proof thus a/b*e=a*e/b by Lm8 .=e/b*a by Lm8; end; theorem (a / b) * (c / d) = (a * c) / (b * d) by Lm6; theorem a / (b / c) = (a * c) / b by Lm2; Lm13: (a/b)/(c/d)=(a*d)/(b*c) proof thus (a/b)/(c/d) = (a/b) * (c/d)" by XCMPLX_0:def 9 .=(a/b) * (d/c) by Lm7 .=(a*d)/(b*c) by Lm6; end; theorem Th78: a / (b * c) = a / b / c proof thus a/(b*c) = a*1/(b*c) .= a/b/(c/1) by Lm13 .= a/b/c; end; theorem a / (b / c) = a * (c / b) proof thus a/(b/c)=(a*c)/b by Lm2 .=a*c*b" by XCMPLX_0:def 9 .=a*(c*b") .=a*(c/b) by XCMPLX_0:def 9; end; theorem a / (b / c) = c / b * a proof a/(b/c)=(a*c)/b by Lm2 .=a*c*b" by XCMPLX_0:def 9 .=a*(c*b") .=a*(c/b) by XCMPLX_0:def 9; hence thesis; end; theorem Th81: a / (b / e) = e * (a / b) proof thus a/(b/e)=(a*e)/b by Lm2 .=e*a*b" by XCMPLX_0:def 9 .=e*(a*b") .=e*(a/b) by XCMPLX_0:def 9; end; theorem a / (b / c) = a / b * c proof a/(b/c)=(a*c)/b by Lm2 .=c*a*b" by XCMPLX_0:def 9 .=c*(a*b") .=c*(a/b) by XCMPLX_0:def 9; hence thesis; end; Lm14: a*(1/b)=a/b proof thus a/b=a*b" by XCMPLX_0:def 9 .=a*(1/b) by Lm4; end; Lm15: 1/c*(a/b)=a/(b*c) proof a/b/c =c"*(a/b) by XCMPLX_0:def 9 .=1/c*(a/b) by Lm4; hence thesis by Th78; end; theorem (a * b) / (c * d) = (a / c * b) / d proof thus a*b/(c*d)=1/c*(a*b/d) by Lm15 .=1/c*(a*b)/d by Lm8 .=1/c*a*b/d .=a/c*b/d by Lm14; end; theorem (a / b) / (c / d) = (a * d) / (b * c) by Lm13; theorem (a / c) * (b / d) = (a / d) * (b / c) proof thus a/c*(b/d)=a*b/(d*c) by Lm6 .=a/d*(b/c) by Lm6; end; theorem a / (b * c * (d / e)) = (e / c) * (a / (b * d)) proof thus a/(b*c*(d/e)) = a/(b*c*(d*e")) by XCMPLX_0:def 9 .= a/(c*(b*d*e")) .= a/(c*((b*d)/e)) by XCMPLX_0:def 9 .= a/((b*d)/(e/c)) by Th81 .= (e/c)*(a/(b*d)) by Th81; end; theorem b <> 0 implies a / b * b = a by Lm3; theorem b <> 0 implies a = a * (b / b) proof A1: a=a*1; assume b<>0; hence thesis by A1,Lm5; end; theorem b <> 0 implies a = a * b / b by Lm9; theorem b <> 0 implies a * c = a * b * (c / b) proof assume A1: b<>0; thus a*c =a*1*c .=a*(b*b")*c by A1,XCMPLX_0:def 7 .=a*b*(b"*c) .=a*b*(c/b) by XCMPLX_0:def 9; end; theorem c <> 0 implies a / b = (a * c) / (b * c) by Lm10; theorem c <> 0 implies a / b = a / (b * c) * c proof assume A1: c<>0; c*(a/(b*c))=c*((a*1)/(b*c)) .=c*(1/c*(a/b)) by Lm6 .=1/c*c*(a/b) .=1*(a/b) by A1,Lm3 .=a/b; hence thesis; end; theorem b <> 0 implies a * c = a * b / (b / c) proof assume A1: b<>0; thus a*c =a*1*c .=a*(b*b")*c by A1,XCMPLX_0:def 7 .=a*b*(b"*c) .=a*b*(b*c")" by Lm11 .=a*b/(b*c") by XCMPLX_0:def 9 .=a*b/(b/c) by XCMPLX_0:def 9; end; theorem Th94: c <> 0 & d <> 0 & a * c = b * d implies a / d = b / c proof assume that A1: c<>0 and A2: d<>0; assume a*c = b*d; then a=b*d/c by A1,Lm9; then a=d*(b/c) by Lm8; hence thesis by A2,Lm9; end; theorem Th95: c <> 0 & d<>0 & a/d=b/c implies a*c = b*d proof assume that A1: c<>0 and A2: d<>0 and A3: a/d=b/c; c*(a/d)=b by A1,A3,Lm3; then a*c/d=b by Lm8; hence thesis by A2,Lm3; end; theorem c <> 0 & d <> 0 & a * c = b / d implies a * d = b / c proof assume that A1: c<>0 and A2: d<>0; assume a*c =b/d; then a*c*d=b by A2,Lm3; then a*d*c =b; hence thesis by A1,Lm9; end; theorem c <> 0 implies a / b = c * (a / c / b) proof assume A1: c<>0; thus a/b=a*b" by XCMPLX_0:def 9 .=c*(a/c)*b" by A1,Lm3 .=c*(a/c*b") .=c*(a/c/b) by XCMPLX_0:def 9; end; theorem c <> 0 implies a / b = a / c * (c / b) proof assume A1: c<>0; thus a/b=a*b" by XCMPLX_0:def 9 .=a/c*c*b" by A1,Lm3 .=a/c*(c*b") .=a/c*(c/b) by XCMPLX_0:def 9; end; theorem a * (1 / b) = a / b by Lm14; Lm16: 1/a"=a proof 1/a"=a"" by Lm4 .=a; hence thesis; end; theorem a / (1 / b) = a * b proof thus a/(1/b)=a/b" by Lm4 .=a*(1/b") by Lm14 .=a*b by Lm16; end; theorem a / b * c = 1 / b * c * a proof a/b*c = 1/b*a*c by Lm14; hence thesis; end; theorem (1 / a) * (1 / b) = 1 / (a * b) proof thus (1/a)*(1/b)=a"*(1/b) by Lm4 .=a"*b" by Lm4 .=(a*b)" by Lm1 .=1/(a*b) by Lm4; end; theorem 1 / c * (a / b) = a / (b * c) by Lm15; theorem a / b / c = 1 / b * (a / c) proof a/b/c =a*b"/c by XCMPLX_0:def 9 .=a*b"*c" by XCMPLX_0:def 9 .=a*c"*b" .=a/c*b" by XCMPLX_0:def 9 .=a/c/b by XCMPLX_0:def 9; hence a/b/c =b"*(a/c) by XCMPLX_0:def 9 .=1/b*(a/c) by Lm4; end; theorem a / b / c = 1 / c * (a / b) proof thus a/b/c =c"*(a/b) by XCMPLX_0:def 9 .=1/c*(a/b) by Lm4; end; theorem Th106: a <> 0 implies a * (1 / a) = 1 proof assume A1: a<>0; thus a*(1/a)=a*a" by Lm4 .=1 by A1,XCMPLX_0:def 7; end; theorem b <> 0 implies a = a * b * (1 / b) proof A1: a=a*1; assume b<>0; then a=a*(b/b) by A1,Lm5; then a=a*(b*b") by XCMPLX_0:def 9 .=a*(b*(1/b)) by Lm4; hence thesis; end; theorem b <> 0 implies a = a * (1 / b * b) proof assume A1: b<>0; thus a=a*1 .=a*(1/b*b) by A1,Lm3; end; theorem b <> 0 implies a = a * (1 / b) * b proof assume A1: b<>0; a=a*1 .=a*(1/b*b) by A1,Lm3; hence thesis; end; theorem b <> 0 implies a = a / (b * (1 / b)) proof assume A1: b<>0; thus a=a/1 .=a/(b*(1/b)) by A1,Th106; end; theorem a <> 0 & b <> 0 implies 1 / (a * b) <> 0; theorem a <> 0 & b <> 0 implies (a / b) * (b / a) = 1 proof assume A1: a<>0 & b<>0; (b/a)=(a/b)" by Lm7; hence thesis by A1,XCMPLX_0:def 7; end; theorem Th113: b <> 0 implies a / b + c = (a + b * c) / b proof assume A1: b<>0; a/b+c =a/b+1*c .=a/b+b*b"*c by A1,XCMPLX_0:def 7 .=a/b+b*c*b" .=a/b+c*b/b by XCMPLX_0:def 9 .=(a+c*b)/b by Th62; hence thesis; end; theorem Th114: c <> 0 implies a + b = c * (a / c + b / c) proof assume A1: c<>0; hence a+b=c*(a/c)+b by Lm3 .=c*(a/c)+c*(b/c) by A1,Lm3 .=c*(a/c+b/c); end; theorem Th115: c <> 0 implies a + b = (a * c + b * c) / c proof assume A1: c<>0; hence a+b=a*c/c+b by Lm9 .=a*c/c+b*c/c by A1,Lm9 .=(a*c+b*c)/c by Th62; end; theorem Th116: b <> 0 & d <> 0 implies a / b + c / d =(a * d + c * b) / (b * d ) proof assume A1: b<>0; assume d<>0; hence a/b + c/d=(a*d)/(b*d) + c/d by Lm10 .=(a*d)/(b*d) + (c*b)/(b*d) by A1,Lm10 .=(a*d + c*b)/(b*d) by Th62; end; theorem Th117: a <> 0 implies a + b = a * (1 + b / a) proof assume A1: a<>0; hence a+b=a*(a/a+b/a) by Th114 .=a*(1+b/a) by A1,Lm5; end; theorem a / (2 * b) + a / (2 * b) = a / b proof thus a/(2*b)+a/(2*b)=(a+a)/(2*b) by Th62 .=2*a/(2*b) .=a/b by Lm10; end; theorem a / (3 * b) + a / (3 * b) + a / (3 * b) = a / b proof thus a/(3*b)+a/(3*b)+a/(3*b)=(a+a)/(3*b)+a/(3*b) by Th62 .=(a+a+a)/(3*b) by Th62 .=3*a/(3*b) .=a/b by Lm10; end; Lm17: -a/b=(-a)/b proof thus -a/b=-(a*b") by XCMPLX_0:def 9 .=(-a)*b" .=(-a)/b by XCMPLX_0:def 9; end; theorem Th120: a / c - b / c = (a - b) / c proof thus a/c - b/c = a/c+ -b/c .=a/c+(-b)/c by Lm17 .=(a+ -b)/c by Th62 .=(a-b)/c; end; theorem a - a / 2 = a / 2; theorem (a - b - c) / d = a / d - b / d - c / d proof thus (a-b-c)/d=(a-b)/d-c/d by Th120 .=a/d-b/d-c/d by Th120; end; theorem b <> 0 & d <> 0 & b <> d & a / b = e / d implies a / b = (a - e) / (b - d ) proof assume that A1: b<>0 and A2: d<>0 and A3: b<>d and A4: a/b=e/d; a*d=e*b by A1,A2,A4,Th95; then A5: a*(b-d)=(a-e)*b; b-d<>0 by A3; hence thesis by A1,A5,Th94; end; theorem (a + b - e) / d = a / d + b / d - e / d proof thus (a+b-e)/d=(a+b)/d-e/d by Th120 .=a/d+b/d-e/d by Th62; end; theorem (a - b + e) / d = a / d - b / d + e / d proof thus (a-b+e)/d=(a-b)/d+e/d by Th62 .=a/d-b/d+e/d by Th120; end; theorem Th126: b <> 0 implies a / b - e = (a - e * b) / b proof assume A1: b<>0; thus a/b-e=a/b+-e .=(a+(-e)*b)/b by A1,Th113 .=(a-e*b)/b; end; theorem b <> 0 implies c - a / b = (c * b - a) / b proof assume A1: b<>0; thus c-a/b = -(a/b-c) .=-(a-c*b)/b by A1,Th126 .=(-(a-c*b))/b by Lm17 .=(c*b-a)/b; end; theorem c <> 0 implies a - b = c * (a / c - b / c) proof assume A1: c<>0; hence a-b=c*(a/c)-b by Lm3 .=c*(a/c)-c*(b/c) by A1,Lm3 .=c*(a/c-b/c); end; theorem c <> 0 implies a - b = (a * c - b * c) / c proof assume A1: c<>0; thus a-b=a+-b .=(a*c+(-b)*c)/c by A1,Th115 .=(a*c-b*c)/c; end; theorem b <> 0 & d <> 0 implies a / b - c / d = (a * d - c * b) / (b * d) proof assume A1: b<>0; assume A2: d<>0; thus a/b - c/d =a/b + -c/d .=a/b + (-c)/d by Lm17 .=(a*d + (-c)*b)/(b*d) by A1,A2,Th116 .=(a*d - c*b)/(b*d); end; theorem a <> 0 implies a - b = a * (1 - b / a) proof assume A1: a<>0; thus a-b=a+-b .=a*(1+(-b)/a) by A1,Th117 .=a*(1+-b/a) by Lm17 .=a*(1-b/a); end; theorem a <> 0 implies c = (a * c + b - b) / a by Lm9; theorem -a = -b implies a = b; theorem -a = 0 implies a = 0; theorem a + -b = 0 implies a = b; theorem a = a + b + -b; theorem a = a + (b + -b); theorem a = (- b + a) + b; theorem - (a + b) = -a + -b; theorem - (-a + b) = a + -b; theorem a+b=-(-a+-b); theorem -(a - b) = b - a; theorem - a - b = - b - a; theorem a = - b - (- a - b); theorem - a - b - c = - a - c - b; theorem - a - b - c = - b - c - a; theorem - a - b - c = - c - b - a; theorem (c - a) - (c - b) = - (a - b); theorem 0 - a = - a; theorem a + b = a - - b; theorem a = a - (b + -b); theorem a - c = b + - c implies a = b; theorem c - a = c + - b implies a = b; theorem a + b - c = - c + a + b; theorem a - b + c = - b + c + a; theorem a - (- b - c) = a + b + c; theorem a - b - c = - b - c + a; theorem a - b - c = - c + a - b; theorem a - b - c = - c - b + a; theorem - (a + b) = - b - a; theorem - (a - b) = - a + b; theorem -(-a+b)=a-b; theorem a + b = -(- a - b); theorem - a + b - c = - c + b - a; theorem - a + b - c = - c - a + b; theorem - (a + b + c) = - a - b - c; theorem - (a + b - c) = - a - b + c; theorem - (a - b + c) = - a + b - c; theorem - (a - b - c) = - a + b + c; theorem - (- a + b + c) = a - b - c; theorem - (- a + b - c) = a - b + c; theorem - (- a - b + c) = a + b - c; theorem - (- a - b - c) = a + b + c; theorem (- a) * b = -(a * b); theorem (- a) * b = a * (- b); theorem (- a) * (- b) = a * b; theorem - a * (- b) = a * b; theorem -(-a) * b = a * b; theorem (-1) * a = -a; theorem (- a) * (- 1) = a; theorem Th181: b<>0 & a*b=-b implies a=-1 proof assume that A1: b<>0 and A2: a*b=-b; a*(b*b")=(-b)*b" by A2,Th4; then a*1=(-b)*b" by A1,XCMPLX_0:def 7; hence a=-b*b" .=-1 by A1,XCMPLX_0:def 7; end; theorem Th182: a * a = 1 implies a = 1 or a = -1 proof assume a*a=1; then (a-1)*(a+1) =0; then a-1=0 or a+1=0; hence thesis; end; theorem -a + 2 * a = a; theorem (a - b) * c = (b - a) * (- c); theorem (a - b) * c = - (b - a) * c; theorem a - 2 * a = -a; theorem -a / b = (-a) / b by Lm17; theorem Th188: a / (- b) = -a / b proof a/(-b)=(a*(-1))/((-b)*(-1)) by Lm10; then a/(-b)= (-a)/((-(-b))*1) .= -a/b by Lm17; hence thesis; end; theorem - a / (- b) = a / b proof thus -a/(-b)=--a/b by Th188 .=a/b; end; theorem Th190: -(- a) / b = a / b proof thus -(-a)/b=--a/b by Lm17 .=a/b; end; theorem (- a) / (- b) = a / b proof -(-a)/b=a/b by Th190; hence thesis by Th188; end; theorem (-a) / b = a / (-b) proof thus (-a)/b=-a/b by Lm17 .=a/(-b) by Th188; end; theorem -a = a / (-1); theorem a = (- a) / (-1); theorem a / b = - 1 implies a = - b & b = - a proof assume A1: a/b=-1; then b <> 0 by Th49; then a=(-1)*b by A1,Lm3; hence thesis; end; theorem b <> 0 & b / a = - b implies a = -1 proof assume that A1: b<>0 and A2: b/a=-b; a <> 0 by A1,A2,Th49; then b=(-b)*a by A2,Lm3; then b=-b*a; hence thesis by A1,A2,Th181; end; theorem a <> 0 implies (-a) / a = -1 proof assume A1: a<>0; thus (-a)/a=-a/a by Lm17 .=-1 by A1,Lm5; end; theorem a <> 0 implies a / (- a) = -1 proof assume A1: a<>0; thus a/(-a)=-a/a by Th188 .=-1 by A1,Lm5; end; Lm18: a<>0 & a=a" implies a=1 or a=-1 proof assume A1: a<>0; assume a=a"; then a*a=1 by A1,XCMPLX_0:def 7; hence thesis by Th182; end; theorem a <> 0 & a = 1 / a implies a = 1 or a = -1 proof assume a<>0; then a=a" implies a=1 or a=-1 by Lm18; hence thesis by Lm4; end; theorem b <> 0 & d <> 0 & b <> -d & a / b = e / d implies a / b = (a + e) / (b + d ) proof assume that A1: b<>0 and A2: d<>0 and A3: b<>-d and A4: a/b=e/d; a*d=e*b by A1,A2,A4,Th95; then A5: a*(b+d)=(a+e)*b; b+d<>0 by A3; hence thesis by A1,A5,Th94; end; theorem a" = b" implies a = b by Lm12; theorem 0" = 0; theorem b <> 0 implies a = a*b*b" proof A1: a*(b*b") = a*b*b"; assume b <> 0; then a*1 = a*b*b" by A1,XCMPLX_0:def 7; hence thesis; end; theorem a" * b" = (a * b)" by Lm1; theorem (a * b")" = a" * b by Lm11; theorem (a" * b")" = a * b proof thus (a"*b")"=a""*b"" by Lm1 .=a*b; end; theorem a <> 0 & b <> 0 implies a * b" <> 0; theorem a <> 0 & b <> 0 implies a" * b" <> 0; theorem a * b" = 1 implies a = b proof assume a*b"=1; then a/b = 1 by XCMPLX_0:def 9; hence thesis by Th58; end; theorem a * b = 1 implies a = b" proof assume A1: a*b=1; then b<>0; hence thesis by A1,XCMPLX_0:def 7; end; theorem Th211: a <> 0 & b <> 0 implies a" + b" = (a + b)*(a*b)" proof assume that A1: a <> 0 and A2: b <> 0; b" = b"*1; then b" = b"*(a"*a) by A1,XCMPLX_0:def 7; then b" = (a"*b")*a; then A3: b" = (a*b)"*a by Lm1; a" = a"*1; then a" = a"*(b"*b) by A2,XCMPLX_0:def 7; then a" = (a"*b")*b; then a" = (a*b)"*b by Lm1; hence thesis by A3; end; Lm19: (- a)" = -a" proof thus (-a)"=1/(-a) by Lm4 .=-1/a by Th188 .=-a" by Lm4; end; theorem a <> 0 & b <> 0 implies a" - b" = (b - a)*(a*b)" proof assume A1: a <> 0 & b <> 0; thus a" - b" = a" + -(b") .= a" + (-b)" by Lm19 .= (a + -b)*(a*-b)" by A1,Th211 .= (a + -b)*(-a*b)" .= (a + -b)*-((a*b)") by Lm19 .= (b - a)*(a*b)"; end; theorem (a / b)" = b / a by Lm7; theorem (a"/b") = b/a proof thus (a"/b") = a"*b"" by XCMPLX_0:def 9 .= b/a by XCMPLX_0:def 9; end; theorem 1 / a = a" by Lm4; theorem 1 / a" = a by Lm16; theorem (1 / a)" = a proof 1/a=a" implies (1/a)"=a; hence thesis by Lm4; end; theorem 1 / a = b" implies a = b proof 1/a=1/b implies a=b by Th59; hence thesis by Lm4; end; theorem a/b" = a*b proof thus a/b" = a*b"" by XCMPLX_0:def 9 .= a*b; end; theorem a"*(c/b) = c/(a*b) proof thus a"*(c/b) = a"*(c*b") by XCMPLX_0:def 9 .= c*(a"*b") .= c*(a*b)" by Lm1 .= c/(a*b) by XCMPLX_0:def 9; end; theorem a"/b = (a*b)" proof thus a"/b = a"*b" by XCMPLX_0:def 9 .= (a*b)" by Lm1; end; theorem (- a)" = -a" by Lm19; theorem a <> 0 & a = a" implies a = 1 or a = -1 by Lm18; begin theorem a+b+c-b=a+c; theorem a-b+c+b=a+c; theorem a+b-c-b=a-c; theorem a-b-c+b=a-c; theorem a-a-b=-b; theorem -a+a-b=-b; theorem a-b-a=-b; theorem -a-b+a=-b; begin theorem for a,b st b<>0 ex e st a=b/e proof let a,b; assume A1: b<>0; per cases; suppose A2: a = 0; take 0; b/0 = b*0" by XCMPLX_0:def 9; hence thesis by A2; end; suppose A3: a <> 0; take e=b/a; thus a=a*1 .=a*(e*e") by A1,A3,XCMPLX_0:def 7 .=a*e*e" .=a*(a"*b)*e" by XCMPLX_0:def 9 .=a*a"*b*e" .=1*b*e" by A3,XCMPLX_0:def 7 .=b/e by XCMPLX_0:def 9; end; end; theorem a/(b*c*(d/e))=(e/c)*(a/(b*d)) proof thus a/(b*c*(d/e)) = a/(b*c*(d*e")) by XCMPLX_0:def 9 .= a/(c*(b*d*e")) .= a/(c*((b*d)/e)) by XCMPLX_0:def 9 .= a/((b*d)/(e/c)) by Th81 .= (e/c)*(a/(b*d)) by Th81; end; theorem ((d - c)/b) * a + c = (1 - a/b)*c + (a/b) * d proof per cases; suppose A1: b = 0; A2: a/b = a*b" by XCMPLX_0:def 9 .= a*0 by A1; thus ((d - c)/b) * a + c = ((d - c)*b") * a + c by XCMPLX_0:def 9 .= ((d - c)*0) * a + c by A1 .= (1 - (a/b))*c + (a/b) * d by A2; end; suppose A3: b <> 0; ((d - c)/b) * a + c = ((d - c)/b) * a + c*1 .= ((d - c)/b) * a + c*(b/b) by A3,Lm5 .= ((d - c)/b) * a + c*b/b by Lm8 .= (d - c) * a / b + c*b/b by Lm8 .= ((d-c)*a + c*b)/ b by Th62 .= ((b-a)*c + a * d) / b .= (b-a)*c/b + a*d/b by Th62 .= (b-a)*c/b + (a/b) * d by Lm8 .= ((b - a)/b)*c + (a/b) * d by Lm8 .= (b/b - a/b)*c + (a/b) * d by Th120 .= (1 - a/b)*c + (a/b) * d by A3,Lm5; hence thesis; end; end; theorem a <> 0 implies a * b + c = a * (b + (c/a)) proof assume a <> 0; hence a * b + c = a * b + a*(c/a) by Lm3 .= a * (b + (c/a)); end; begin reserve a,b,c,d for real number; reserve r,s for real number; Lm1: (r in REAL+ & s in REAL+ & ex x9,y9 being Element of REAL+ st r = x9 & s = y9 & x9 <=' y9) or (r in [:{0},REAL+:] & s in [:{0},REAL+:] & ex x9,y9 being Element of REAL+ st r = [0,x9] & s = [0,y9] & y9 <=' x9) or s in REAL+ & r in [:{0},REAL+:] implies r <= s proof assume A1: (r in REAL+ & s in REAL+ & ex x9,y9 being Element of REAL+ st r = x9 & s = y9 & x9 <=' y9) or (r in [:{0},REAL+:] & s in [:{0},REAL+:] & ex x9,y9 being Element of REAL+ st r = [0,x9] & s = [0,y9] & y9 <=' x9) or s in REAL+ & r in [:{0},REAL+:]; per cases; case r in REAL+ & s in REAL+; hence thesis by A1,ARYTM_0:5,XBOOLE_0:3; end; case r in [:{0},REAL+:] & s in [:{0},REAL+:]; hence thesis by A1,ARYTM_0:5,XBOOLE_0:3; end; case not(r in REAL+ & s in REAL+) & not (r in [:{0},REAL+:] & s in [:{0 },REAL+:]); hence thesis by A1; end; end; Lm2: for x1,x2 being Element of REAL st a = [*x1,x2*] holds x2 = 0 & a = x1 proof let x1,x2 being Element of REAL; assume A1: a = [*x1,x2*]; A2: a in REAL by XREAL_0:def 1; thus now assume x2 <> 0; then a = (0,1) --> (x1,x2) by A1,ARYTM_0:def 5; hence contradiction by A2,ARYTM_0:8; end; hence thesis by A1,ARYTM_0:def 5; end; Lm3: for a9,b9 being Element of REAL, a,b st a9 = a & b9 = b holds +(a9,b9) = a + b proof let a9,b9 be Element of REAL, a,b such that A1: a9 = a and A2: b9 = b; consider x1,x2,y1,y2 being Element of REAL such that A3: a = [* x1,x2 *] and A4: b = [*y1,y2*] and A5: a+b = [*+(x1,y1),+(x2,y2)*] by XCMPLX_0:def 4; A6: y2 = 0 by A4,Lm2; x2 = 0 by A3,Lm2; then A7: +(x2,y2) = 0 by A6,ARYTM_0:11; A8: b = y1 by A4,Lm2; a = x1 by A3,Lm2; hence thesis by A1,A2,A5,A8,A7,ARYTM_0:def 5; end; Lm4: {} in {{}} by TARSKI:def 1; Lm5: a <= b implies a + c <= b + c proof reconsider x1=a, y1=b, z1=c as Element of REAL by XREAL_0:def 1; A1: +(y1,z1) = b + c by Lm3; A2: +(x1,z1) = a + c by Lm3; assume A3: a <= b; per cases by A3,XXREAL_0:def 5; suppose that A4: a in REAL+ and A5: b in REAL+ and A6: c in REAL+; consider b9,c99 being Element of REAL+ such that A7: b = b9 and A8: c = c99 and A9: +(y1,z1) = b9 + c99 by A5,A6,ARYTM_0:def 1; consider a9,c9 being Element of REAL+ such that A10: a = a9 and A11: c = c9 and A12: +(x1,z1) = a9 + c9 by A4,A6,ARYTM_0:def 1; ex a99,b99 being Element of REAL+ st a = a99 & b = b99 & a99 <=' b99 by A3,A4,A5,XXREAL_0:def 5; then a9 + c9 <=' b9 + c99 by A10,A11,A7,A8,ARYTM_1:7; hence thesis by A1,A2,A12,A9,Lm1; end; suppose that A13: a in [:{0},REAL+:] and A14: b in REAL+ and A15: c in REAL+; consider b9,c99 being Element of REAL+ such that b = b9 and A16: c = c99 and A17: +(y1,z1) = b9 + c99 by A14,A15,ARYTM_0:def 1; consider a9,c9 being Element of REAL+ such that a = [0,a9] and A18: c = c9 and A19: +(x1,z1) = c9 - a9 by A13,A15,ARYTM_0:def 1; now per cases; suppose A20: a9 <=' c9; A21: c9 -' a9 <=' c9 by ARYTM_1:11; c9 <=' b9 + c99 by A18,A16,ARYTM_2:19; then A22: c9 -' a9 <=' b9 + c99 by A21,ARYTM_1:3; c9 - a9 = c9 -' a9 by A20,ARYTM_1:def 2; hence thesis by A1,A2,A19,A17,A22,Lm1; end; suppose not a9 <=' c9; then c9 - a9 = [0,a9 -' c9] by ARYTM_1:def 2; then c9 - a9 in [:{0},REAL+:] by Lm4,ZFMISC_1:87; then A23: not a + c in REAL+ by A2,A19,ARYTM_0:5,XBOOLE_0:3; not b + c in [:{0},REAL+:] by A1,A17,ARYTM_0:5,XBOOLE_0:3; hence thesis by A23,XXREAL_0:def 5; end; end; hence thesis; end; suppose that A24: a in [:{0},REAL+:] and A25: b in [:{0},REAL+:] and A26: c in REAL+; consider b9,c99 being Element of REAL+ such that A27: b = [0,b9] and A28: c = c99 and A29: +(y1,z1) = c99 - b9 by A25,A26,ARYTM_0:def 1; consider a99,b99 being Element of REAL+ such that A30: a = [0,a99] and A31: b = [0,b99] and A32: b99 <=' a99 by A3,A24,A25,XXREAL_0:def 5; consider a9,c9 being Element of REAL+ such that A33: a = [0,a9] and A34: c = c9 and A35: +(x1,z1) = c9 - a9 by A24,A26,ARYTM_0:def 1; A36: a9 = a99 by A30,A33,XTUPLE_0:1; A37: b9 = b99 by A31,A27,XTUPLE_0:1; now per cases; suppose A38: a9 <=' c9; then b9 <=' c9 by A32,A36,A37,ARYTM_1:3; then A39: c9 - b9 = c9 -' b9 by ARYTM_1:def 2; A40: c9 - a9 = c9 -' a9 by A38,ARYTM_1:def 2; c9 -' a9 <=' c99 -' b9 by A32,A34,A28,A36,A37,ARYTM_1:16; hence thesis by A1,A2,A34,A35,A28,A29,A40,A39,Lm1; end; suppose not a9 <=' c9; then A41: +(x1,z1) = [0,a9 -' c9] by A35,ARYTM_1:def 2; then A42: +(x1,z1) in [:{0},REAL+:] by Lm4,ZFMISC_1:87; now per cases; suppose b9 <=' c9; then c9 - b9 = c9 -' b9 by ARYTM_1:def 2; then A43: not +(y1,z1) in [:{0},REAL+:] by A34,A28,A29,ARYTM_0:5,XBOOLE_0:3; not +(x1,z1) in REAL+ by A42,ARYTM_0:5,XBOOLE_0:3; hence thesis by A1,A2,A43,XXREAL_0:def 5; end; suppose A44: not b9 <=' c9; A45: b9 -' c9 <=' a9 -' c9 by A32,A36,A37,ARYTM_1:17; A46: +(y1,z1) = [0,b9 -' c9] by A34,A28,A29,A44,ARYTM_1:def 2; then +(y1,z1) in [:{0},REAL+:] by Lm4,ZFMISC_1:87; hence thesis by A1,A2,A41,A42,A46,A45,Lm1; end; end; hence thesis; end; end; hence thesis; end; suppose that A47: a in REAL+ and A48: b in REAL+ and A49: c in [:{0},REAL+:]; consider b9,c99 being Element of REAL+ such that A50: b = b9 and A51: c = [0,c99] and A52: +(y1,z1) = b9 - c99 by A48,A49,ARYTM_0:def 1; consider a9,c9 being Element of REAL+ such that A53: a = a9 and A54: c = [0,c9] and A55: +(x1,z1) = a9 - c9 by A47,A49,ARYTM_0:def 1; A56: c9 = c99 by A54,A51,XTUPLE_0:1; A57: ex a99,b99 being Element of REAL+ st a = a99 & b = b99 & a99 <=' b99 by A3,A47,A48,XXREAL_0:def 5; now per cases; suppose A58: c9 <=' a9; then c9 <=' b9 by A57,A53,A50,ARYTM_1:3; then A59: b9 - c9 = b9 -' c9 by ARYTM_1:def 2; A60: a9 - c9 = a9 -' c9 by A58,ARYTM_1:def 2; a9 -' c9 <=' b9 -' c99 by A57,A53,A50,A56,ARYTM_1:17; hence thesis by A1,A2,A55,A52,A56,A60,A59,Lm1; end; suppose not c9 <=' a9; then A61: +(x1,z1) = [0,c9 -' a9] by A55,ARYTM_1:def 2; then A62: +(x1,z1) in [:{0},REAL+:] by Lm4,ZFMISC_1:87; now per cases; suppose c9 <=' b9; then b9 - c9 = b9 -' c9 by ARYTM_1:def 2; then A63: not +(y1,z1) in [:{0},REAL+:] by A52,A56,ARYTM_0:5,XBOOLE_0:3; not +(x1,z1) in REAL+ by A62,ARYTM_0:5,XBOOLE_0:3; hence thesis by A1,A2,A63,XXREAL_0:def 5; end; suppose A64: not c9 <=' b9; A65: c9 -' b9 <=' c9 -' a9 by A57,A53,A50,ARYTM_1:16; A66: +(y1,z1) = [0,c9 -' b9] by A52,A56,A64,ARYTM_1:def 2; then +(y1,z1) in [:{0},REAL+:] by Lm4,ZFMISC_1:87; hence thesis by A1,A2,A61,A62,A66,A65,Lm1; end; end; hence thesis; end; end; hence thesis; end; suppose that A67: a in [:{0},REAL+:] and A68: b in REAL+ and A69: c in [:{0},REAL+:]; A70: not c in REAL+ by A69,ARYTM_0:5,XBOOLE_0:3; not a in REAL+ by A67,ARYTM_0:5,XBOOLE_0:3; then consider a9,c9 being Element of REAL+ such that a = [0,a9] and A71: c = [0,c9] and A72: +(x1,z1) = [0,a9 + c9] by A70,ARYTM_0:def 1; A73: +(x1,z1) in [:{0},REAL+:] by A72,Lm4,ZFMISC_1:87; consider b9,c99 being Element of REAL+ such that b = b9 and A74: c = [0,c99] and A75: +(y1,z1) = b9 - c99 by A68,A69,ARYTM_0:def 1; A76: c9 = c99 by A71,A74,XTUPLE_0:1; now per cases; suppose c9 <=' b9; then b9 - c99 = b9 -' c99 by A76,ARYTM_1:def 2; then A77: not +(y1,z1) in [:{0},REAL+:] by A75,ARYTM_0:5,XBOOLE_0:3; not +(x1,z1) in REAL+ by A73,ARYTM_0:5,XBOOLE_0:3; hence thesis by A1,A2,A77,XXREAL_0:def 5; end; suppose A78: not c9 <=' b9; A79: c9 <=' c9 + a9 by ARYTM_2:19; c9 -' b9 <=' c9 by ARYTM_1:11; then A80: c9 -' b9 <=' c9 + a9 by A79,ARYTM_1:3; A81: +(y1,z1) = [0,c9 -' b9] by A75,A76,A78,ARYTM_1:def 2; then +(y1,z1) in [:{0},REAL+:] by Lm4,ZFMISC_1:87; hence thesis by A1,A2,A72,A73,A81,A80,Lm1; end; end; hence thesis; end; suppose that A82: a in [:{0},REAL+:] and A83: b in [:{0},REAL+:] and A84: c in [:{0},REAL+:]; A85: not c in REAL+ by A84,ARYTM_0:5,XBOOLE_0:3; A86: not c in REAL+ by A84,ARYTM_0:5,XBOOLE_0:3; not a in REAL+ by A82,ARYTM_0:5,XBOOLE_0:3; then consider a9,c9 being Element of REAL+ such that A87: a = [0,a9] and A88: c = [0,c9] and A89: +(x1,z1) = [0,a9 + c9] by A86,ARYTM_0:def 1; A90: +(x1,z1) in [:{0},REAL+:] by A89,Lm4,ZFMISC_1:87; not b in REAL+ by A83,ARYTM_0:5,XBOOLE_0:3; then consider b9,c99 being Element of REAL+ such that A91: b = [0,b9] and A92: c = [0,c99] and A93: +(y1,z1) = [0,b9 + c99] by A85,ARYTM_0:def 1; A94: +(y1,z1) in [:{0},REAL+:] by A93,Lm4,ZFMISC_1:87; A95: c9 = c99 by A88,A92,XTUPLE_0:1; consider a99,b99 being Element of REAL+ such that A96: a = [0,a99] and A97: b = [0,b99] and A98: b99 <=' a99 by A3,A82,A83,XXREAL_0:def 5; A99: b9 = b99 by A97,A91,XTUPLE_0:1; a9 = a99 by A96,A87,XTUPLE_0:1; then b9 + c9 <=' a9 + c99 by A98,A99,A95,ARYTM_1:7; hence thesis by A1,A2,A89,A93,A95,A90,A94,Lm1; end; end; Lm6: a <= b & c <= d implies a+c <= b+d proof assume a<=b; then A1: a+c <= b+c by Lm5; assume c <= d; then b+c <= b+d by Lm5; hence thesis by A1,XXREAL_0:2; end; Lm7: a <= b implies a-c <= b-c proof a <= b implies a + -c <= b + -c by Lm5; hence thesis; end; Lm8: a < b & c <= d implies a+c < b+d proof assume that A1: a b+d proof a+c <= d+a by A4,Lm5; then A6: a+c-d<=a+d-d by Lm7; assume a+c = b+d; hence contradiction by A3,A6; end; a+c <= b+d by A3,A4,Lm6; hence thesis by A5,XXREAL_0:1; end; hence thesis by A1,A2; end; Lm9: 0 < a implies b < b+a proof assume 0 0; per cases by A1,XXREAL_0:def 5; suppose that A8: a in REAL+ and A9: b in REAL+; consider b9,c99 being Element of REAL+ such that A10: b = b9 and A11: c = c99 and A12: *(y1,z1) = b9 *' c99 by A3,A9,ARYTM_0:def 2; consider a9,c9 being Element of REAL+ such that A13: a = a9 and A14: c = c9 and A15: *(x1,z1) = a9 *' c9 by A3,A8,ARYTM_0:def 2; ex a99,b99 being Element of REAL+ st a = a99 & b = b99 & a99 <=' b99 by A1,A8,A9,XXREAL_0:def 5; then a9 *' c9 <=' b9 *' c9 by A13,A10,ARYTM_1:8; hence contradiction by A4,A5,A6,A14,A15,A11,A12,Lm1; end; suppose that A16: a in [:{0},REAL+:] and A17: b in REAL+; ex a9,c9 being Element of REAL+ st a = [0,a9] & c = c9 & *(x1,z1) = [0,c9 *' a9] by A3,A7,A16,ARYTM_0:def 2; then *(x1,z1) in [:{0},REAL+:] by Lm4,ZFMISC_1:87; then A18: not *(x1,z1) in REAL+ by ARYTM_0:5,XBOOLE_0:3; ex b9,c99 being Element of REAL+ st b = b9 & c = c99 & * (y1,z1) = b9 *' c99 by A3,A17,ARYTM_0:def 2; then not *(y1,z1) in [:{0},REAL+:] by ARYTM_0:5,XBOOLE_0:3; hence contradiction by A4,A5,A6,A18,XXREAL_0:def 5; end; suppose that A19: a in [:{0},REAL+:] and A20: b in [:{0},REAL+:]; consider b9,c99 being Element of REAL+ such that A21: b = [0,b9] and A22: c = c99 and A23: *(y1,z1) = [0,c99 *' b9] by A3,A7,A20,ARYTM_0:def 2; A24: *(y1,z1) in [:{0},REAL+:] by A23,Lm4,ZFMISC_1:87; consider a99,b99 being Element of REAL+ such that A25: a = [0,a99] and A26: b = [0,b99] and A27: b99 <=' a99 by A1,A19,A20,XXREAL_0:def 5; A28: b9 = b99 by A26,A21,XTUPLE_0:1; consider a9,c9 being Element of REAL+ such that A29: a = [0,a9] and A30: c = c9 and A31: *(x1,z1) = [0,c9 *' a9] by A3,A7,A19,ARYTM_0:def 2; A32: *(x1,z1) in [:{0},REAL+:] by A31,Lm4,ZFMISC_1:87; a9 = a99 by A25,A29,XTUPLE_0:1; then b9 *' c9 <=' a9 *' c9 by A27,A28,ARYTM_1:8; hence contradiction by A4,A5,A6,A30,A31,A22,A23,A32,A24,Lm1; end; end; Lm13: 0 < c & a < b implies a*c < b*c proof assume A1: 0 b*c proof assume a*c = b*c; then a*(c*c")=b*c*c" by XCMPLX_1:4; then a*1=b*(c*c") by A1,XCMPLX_0:def 7; then a=b*1 by A1,XCMPLX_0:def 7; hence contradiction by A2; end; a*c <= b*c by A1,A2,Lm12; hence thesis by A3,XXREAL_0:1; end; theorem Th5: a < b implies ex c st a < c & c < b proof assume A1: a=c-b; then -(c-a)<=-(c-b) by Lm14; then a-c <= b-c; hence thesis by Th9; end; Lm16: a+b <= c implies a <= c-b proof assume a+b<=c; then a+b-b<=c-b by Lm7; hence thesis; end; Lm17: a <= b-c implies a+c <= b proof assume a <= b-c; then a+c <= b - c + c by Lm5; hence thesis; end; Lm18: a <= b+c implies a-b <= c proof assume a<=b+c; then a-b <= c+b-b by Lm7; hence thesis; end; Lm19: a-b <= c implies a <= b+c proof assume a-b <= c; then a + -b <= c; then a <= c - -b by Lm16; hence thesis; end; theorem a <= b-c implies c <= b-a proof assume a<=b-c; then a+c <= b by Lm17; hence thesis by Lm16; end; theorem a-b <= c implies a-c <= b proof assume c>=a-b; then c+b>=a by Lm19; hence thesis by Lm18; end; theorem Th13: a <= b & c <= d implies a-d <= b-c proof assume that A1: a <= b and A2: c <= d; -d <= -c by A2,Lm14; then a+ -d <= b+ -c by A1,Lm6; hence thesis; end; theorem Th14: a < b & c <= d implies a-d < b-c proof assume that A1: a < b and A2: c <= d; - d <= - c by A2,Lm14; then a+ -d < b+ -c by A1,Lm8; hence thesis; end; theorem Th15: a <= b & c < d implies a-d < b-c proof assume that A1: a <= b and A2: c < d; c-b < d-a by A1,A2,Th14; then -(d-a) < -(c-b) by Lm15; hence thesis; end; Lm20: a+b<=c+d implies a-c <= d-b proof assume a+b<=c+d; then a<=c+d-b by Lm16; then a<=c+(d-b); hence thesis by Lm18; end; theorem a-b <= c-d implies a-c <= b-d proof assume a-b<=c-d; then a-b+d<=c by Lm17; then a+d-b<=c; then a+d<=c+b by Lm19; hence thesis by Lm20; end; theorem a-b <= c-d implies d-b <= c-a proof assume a-b<=c-d; then a-b+d<=c by Lm17; then a+d-b<=c; then a+d<=c+b by Lm19; hence thesis by Lm20; end; theorem a-b <= c-d implies d-c <= b-a proof assume a-b<=c-d; then a-b+d<=c by Lm17; then a+d-b<=c; then a+d<=c+b by Lm19; hence thesis by Lm20; end; begin theorem a+b <= c iff a <= c-b by Lm16,Lm17; theorem a <= b+c iff a-b <= c by Lm18,Lm19; theorem a+b<=c+d iff a-c <= d-b proof thus a+b<=c+d implies a-c <= d-b by Lm20; assume A1: a-c <= d-b; assume c+d=a-b; per cases by A1; suppose c+d>=a-b; then c+d+b>=a by Lm19; then c+b+d>=a; hence thesis by Lm18; end; suppose d+c>=a-b; then c+d+b>=a by Lm19; then c+b+d>=a; hence thesis by Lm18; end; end; begin theorem a<=b iff -b<=-a by Lm14,Lm15; Lm21: a < b implies 0 < b-a proof assume a < b; then a + 0 < b; hence thesis by Lm19; end; theorem Th25: a<=-b implies b<=-a proof assume a<=-b; then a+b<=-b+b by Lm5; then b--a<=0; hence thesis by Lm21; end; Lm22: a <= b implies 0 <= b-a proof assume a <= b; then a - a <= b - a by Lm7; hence thesis; end; theorem Th26: -b<=a implies -a<=b proof assume A1: -b<=a; assume b<-a; then b+a<-a+a by Lm10; then a--b<0; hence thesis by A1,Lm22; end; begin theorem 0 <= a & 0 <= b & a+b = 0 implies a = 0; theorem a <= 0 & b <= 0 & a+b = 0 implies a = 0; begin theorem 0 < a implies b < b+a by Lm9; theorem a < 0 implies a+b < b proof assume a<0; then b+a<0+b by Lm10; hence thesis; end; Lm23: a < b implies a-b < 0 proof assume A1: a < b; assume a-b>=0; then a-b+b>=0+b by Lm5; hence thesis by A1; end; theorem 0 <= a implies b <= a+b proof assume A1: 0 <= a; assume A2: a+bb; then b+-a-b>0 by Lm21; hence thesis by A1; end; end; theorem a <= 0 implies a+b <= b proof assume a<=0; then b+a<=0+b by Lm6; hence thesis; end; begin theorem 0 <= a & 0 <= b implies 0 <= a+b; theorem 0 <= a & 0 < b implies 0 < a+b; theorem Th35: a <= 0 & c <= b implies c+a <= b proof assume that A1: a <= 0 and A2: c <= b; a+c <= 0+b by A1,A2,Lm6; hence thesis; end; theorem Th36: a <= 0 & c < b implies c+a < b proof assume that A1: a <= 0 and A2: c < b; a+c < 0+b by A1,A2,Lm8; hence thesis; end; theorem Th37: a < 0 & c <= b implies c+a < b proof assume that A1: a < 0 and A2: c <= b; a+c < 0+b by A1,A2,Lm8; hence thesis; end; theorem Th38: 0 <= a & b <= c implies b <= a+c proof assume that A1: 0 <= a and A2: b <= c; b+0 <= a+c by A1,A2,Lm6; hence thesis; end; theorem Th39: 0 < a & b <= c implies b < a+c proof assume that A1: 0 < a and A2: b <= c; b+0 < a+c by A1,A2,Lm8; hence thesis; end; theorem Th40: 0 <= a & b < c implies b < a+c proof assume that A1: 0 <= a and A2: b < c; b+0 < a+c by A1,A2,Lm8; hence thesis; end; Lm24: c < 0 & a < b implies b*c < a*c proof assume A1: c < 0; assume a0 holds c <= b+a) implies c <= b proof assume A1: for a st a>0 holds b+a>=c; set d=c-b; assume bc-b by Lm23; then (-d)/2<-d by Lm27; then c+-d/20; then a-b+b>0+b by Lm10; hence thesis by A1; end; theorem Th48: a <= b implies 0 <= b-a proof assume a <= b; then a - a <= b - a by Lm7; hence thesis; end; theorem a < b implies a-b < 0 by Lm23; theorem a < b implies 0 < b-a by Lm21; theorem 0 <= a & b < c implies b-a < c proof assume that A1: 0 <= a and A2: b < c; b+0 < a+c by A1,A2,Th40; hence thesis by Lm17; end; theorem a <= 0 & b <= c implies b <= c-a proof assume that A1: a <= 0 and A2: b <= c; b+a <= c by A1,A2,Th35; hence thesis by Lm16; end; theorem a <= 0 & b < c implies b < c-a proof assume that A1: a <= 0 and A2: b < c; b+a < c by A1,A2,Th36; hence thesis by Lm19; end; theorem a < 0 & b <= c implies b < c-a proof assume that A1: a < 0 and A2: b <= c; a+b < c by A1,A2,Th37; hence thesis by Lm19; end; theorem a <> b implies 0 < a-b or 0 < b-a proof assume A1: a <> b; per cases by A1,XXREAL_0:1; suppose a < b; then 0 + a < b; hence thesis by Lm19; end; suppose b < a; then 0 + b < a; hence thesis by Lm19; end; end; begin theorem (for a being real number st a<0 holds c <= b-a) implies b>=c proof assume A1: for a st a<0 holds b-a>=c; set d=b-c; assume bb-c by Lm23; then (-d)/2<-d by Lm27; then b+-d/20 holds b-a <= c) implies b<=c proof assume A1: for a st a>0 holds b-a<=c; set d=b-c; assume b>c; then A2: 0=-a; then b+a>=-a+a by Lm5; hence thesis; end; theorem a < -b implies a+b < 0 proof assume a<-b; then a+b<-b+b by Lm10; hence thesis; end; theorem -b < a implies 0 < a+b proof assume a>-b; then a+b>-b+b by Lm10; hence thesis; end; Lm28: a <= b & c <= 0 implies b*c <= a*c proof assume A1: a<=b; assume c <= 0; then a*(-c)<=b*(-c) by A1,Lm12; then -(a*c)<=-(b*c); hence thesis by Lm15; end; begin theorem 0 <= a*a proof per cases; suppose 0 <= a; hence thesis; end; suppose not 0 <= a; hence thesis; end; end; theorem a <= b & 0 <= c implies a*c <= b*c by Lm12; theorem a <= b & c <= 0 implies b*c <= a*c by Lm28; theorem Th66: 0 <= a & a <= b & 0 <= c & c <= d implies a*c <= b*d proof assume that A1: 0<=a and A2: a<=b and A3: 0<=c and A4: c <= d; A5: a*c <= b*c by A2,A3,Lm12; b*c <= b*d by A1,A2,A4,Lm12; hence thesis by A5,XXREAL_0:2; end; theorem a <= 0 & b <= a & c <= 0 & d <= c implies a*c <= b*d proof assume that A1: 0>=a and A2: a>=b and A3: 0>=c and A4: c>=d; A5: -c <= -d by A4,Lm14; -a<=-b by A2,Lm14; then (-a)*(-c)<=(-b)*(-d) by A1,A3,A5,Th66; hence thesis; end; theorem 0 < c & a < b implies a*c < b*c by Lm13; theorem c < 0 & a < b implies b*c < a*c by Lm24; theorem a < 0 & b <= a & c < 0 & d < c implies a*c < b*d proof assume that A1: 0>a and A2: a>=b and A3: 0>c and A4: c>d; A5: a*c < a*d by A1,A4,Lm24; a*d<=b*d by A2,A3,A4,Lm28; hence thesis by A5,XXREAL_0:2; end; begin theorem 0 <= a & 0 <= b & 0 <= c & 0 <= d & a*c+b*d = 0 implies a = 0 or c = 0; Lm29: c < 0 & a < b implies b/c < a/c proof assume that A1: c < 0 and A2: a < b; a/(-c)b and A3: a1*(b") by A2,Lm24; then b"*b*(a")>1*(b"); then 1*(a")>1*(b") by A2,XCMPLX_0:def 7; hence thesis; end; begin theorem Th77: 0 < b & a*b <= c implies a <= c/b proof assume that A1: b>0 and A2: a*b<=c; a*b/b<=c/b by A1,A2,Lm25; hence thesis by A1,XCMPLX_1:89; end; theorem Th78: b < 0 & a*b <= c implies c/b <= a proof assume that A1: b<0 and A2: a*b<=c; a*b/b>=c/b by A1,A2,Lm30; hence thesis by A1,XCMPLX_1:89; end; theorem Th79: 0 < b & c <= a*b implies c/b <= a proof assume that A1: b>0 and A2: a*b>=c; a*b/b>=c/b by A1,A2,Lm25; hence thesis by A1,XCMPLX_1:89; end; theorem Th80: b < 0 & c <= a*b implies a <= c/b proof assume that A1: b<0 and A2: a*b>=c; a*b/b<=c/b by A1,A2,Lm30; hence thesis by A1,XCMPLX_1:89; end; theorem Th81: 0 < b & a*b < c implies a< c/b proof assume that A1: b>0 and A2: a*bc/b by A1,A2,Lm29; hence thesis by A1,XCMPLX_1:89; end; theorem Th83: 0 < b & c < a*b implies c/b < a proof assume that A1: b>0 and A2: a*b>c; a*b/b>c/b by A1,A2,Lm26; hence thesis by A1,XCMPLX_1:89; end; theorem Th84: b < 0 & c < a*b implies a < c/b proof assume that A1: b<0 and A2: a*b>c; a*b/bb and A2: a<=b; b*(a")<=a*(a") by A1,A2,Lm28; then b*(a")<=1 by A1,A2,XCMPLX_0:def 7; then b"*(b*(a"))>=1*(b") by A1,Lm28; then b"*b*a">=1*b"; then 1*a">=1*b" by A1,XCMPLX_0:def 7; hence thesis; end; begin theorem 0 < a & a <= b implies b" <= a" by Lm32; theorem b < 0 & a <= b implies b" <= a" by Lm33; theorem b < 0 & a < b implies b" < a" by Lm31; Lm34: 0 < a & a < b implies b" < a" proof A1: b" = 1/b by XCMPLX_1:215; assume that A2: 00 and A2: a">=b"; a""<=b"" by A1,A2,Lm32; hence thesis; end; theorem a" < 0 & b" <= a" implies a <= b proof assume that A1: a"<0 and A2: a">=b"; a""<=b"" by A1,A2,Lm33; hence thesis; end; theorem 0 < b" & b" < a" implies a < b proof assume that A1: b">0 and A2: a">b"; a""b"; a""=0 and A2: (b-a)*(b+a)<=0; b+0<=b+a by A1,Lm6; then b+a>=0 by A1,A2; then A3: b>=0-a by Lm18; b-a>=0 & b+a<=0 or b-a<=0 & b+a>=0 by A2; then b<=a+0 by A1,Lm19; hence thesis by A3; end; theorem 0 <= a & (b-a)*(b+a) < 0 implies -a < b & b < a proof assume that A1: a>=0 and A2: (b-a)*(b+a)<0; A3: b-a>0 & b+a<0 or b-a<0 & b+a>0 by A2,Lm35; then A4: b0-a by A1,A3,Lm17; hence thesis by A4; end; theorem 0 <= (b-a)*(b+a) implies b <= -a or a <= b proof assume (b-a)*(b+a)>=0; then b-a>=0 & b+a>=0 or b-a<=0 & b+a<=0; then b-a+a>=0+a or b+a<=0 by Lm6; then b>=0+a or b+a-a<=0-a by Lm7; hence thesis; end; theorem 0 <= a & 0 <= c & a < b & c < d implies a*c < b*d proof assume that A1: 0<=a and A2: 0<=c and A3: a0 and A2: b<0 and A3: ab" by A2,A3,Lm31; then a"*c>b"*c by A1,Lm13; then c/a>b"*c by XCMPLX_0:def 9; hence thesis by XCMPLX_0:def 9; end; theorem c < 0 & 0 < a & a < b implies c/a < c/b proof assume that A1: c < 0 and A2: a>0 and A3: ab" by A2,A3,Lm34; then a"*c < b"*c by A1,Lm24; then c/ab" by A2,A3,Lm31; then a"*c < b"*c by A1,Lm24; then c/a0 and A2: d>0 and A3: a*d<=c*b; a*d/b<=c by A1,A3,Th79; then a/b*d<=c by XCMPLX_1:74; hence thesis by A2,Th77; end; theorem b < 0 & d < 0 & a*d <= c*b implies a/b <= c/d proof assume that A1: b<0 and A2: d<0 and A3: a*d<=c*b; a*d/b>=c by A1,A3,Th80; then a/b*d>=c by XCMPLX_1:74; hence thesis by A2,Th80; end; theorem 0 < b & d < 0 & a*d <= c*b implies c/d <= a/b proof assume that A1: b>0 and A2: d<0 and A3: a*d<=c*b; a*d/b<=c by A1,A3,Th79; then a/b*d<=c by XCMPLX_1:74; hence thesis by A2,Th78; end; theorem b < 0 & 0 < d & a*d <= c*b implies c/d <= a/b proof assume that A1: b<0 and A2: d>0 and A3: a*d<=c*b; a*d/b>=c by A1,A3,Th80; then a/b*d>=c by XCMPLX_1:74; hence thesis by A2,Th79; end; theorem 0 < b & 0 < d & a*d < c*b implies a/b < c/d proof assume that A1: b>0 and A2: d>0 and A3: a*dc by A1,A3,Th84; then a/b*d>c by XCMPLX_1:74; hence thesis by A2,Th84; end; theorem 0 < b & d < 0 & a*d < c*b implies c/d < a/b proof assume that A1: b>0 and A2: d<0 and A3: a*d0 and A3: a*dc by A1,A3,Th84; then a/b*d>c by XCMPLX_1:74; hence thesis by A2,Th83; end; theorem b < 0 & d < 0 & a*b < c/d implies a*d < c/b proof assume that A1: b<0 and A2: d<0; assume a*bc by A2,Th78; then a*d*b>c; hence thesis by A1,Th84; end; theorem 0 < b & 0 < d & a*b < c/d implies a*d < c/b proof assume that A1: b>0 and A2: d>0; assume a*bc/d; then a*b*d0 and A2: d>0; assume a*b>c/d; then a*b*d>c by A2,Th77; then a*d*b>c; hence thesis by A1,Th83; end; theorem b < 0 & 0 < d & a*b < c/d implies c/b < a*d proof assume that A1: b<0 and A2: d>0; assume a*b0 and A2: d<0; assume a*bc by A2,Th78; then a*d*b>c; hence thesis by A1,Th83; end; theorem b < 0 & 0 < d & c/d < a*b implies a*d < c/b proof assume that A1: b<0 and A2: d>0; assume a*b>c/d; then a*b*d>c by A2,Th77; then a*d*b>c; hence thesis by A1,Th84; end; theorem 0 < b & d < 0 & c/d < a*b implies a*d < c/b proof assume that A1: b>0 and A2: d<0; assume a*b>c/d; then a*b*d=0 and A2: b<0 and A3: a<=b; a">=b" by A2,A3,Lm33; then a"*c>=b"*c by A1,Lm12; then c/a>=b"*c by XCMPLX_0:def 9; hence thesis by XCMPLX_0:def 9; end; theorem c <= 0 & 0 < a & a <= b implies c/a <= c/b proof assume A1: c <= 0; assume that A2: a>0 and A3: a<=b; a">=b" by A2,A3,Lm32; then a"*c <= b"*c by A1,Lm28; then c/a<=b"*c by XCMPLX_0:def 9; hence thesis by XCMPLX_0:def 9; end; theorem c <= 0 & b < 0 & a <= b implies c/a <= c/b proof assume that A1: c <= 0 and A2: b<0 and A3: a<=b; a">=b" by A2,A3,Lm33; then a"*c <= b"*c by A1,Lm28; then c/a<=b"*c by XCMPLX_0:def 9; hence thesis by XCMPLX_0:def 9; end; theorem 0 < a iff 0 < a"; theorem a < 0 iff a" < 0; theorem Th124: a < 0 & 0 < b implies a" < b" proof assume that A1: a<0 and A2: b>0; a"<0 by A1; hence thesis by A2; end; theorem a" < 0 & 0 < b" implies a < b proof assume that A1: a"<0 and A2: b">0; a""0 & b<0 or a<0 & b>0 proof assume A1: a*b<0; then A2: b <> 0; a <> 0 by A1; hence thesis by A1,A2; end; theorem a*b>0 implies a>0 & b>0 or a<0 & b<0 proof assume A1: a*b>0; then A2: b <> 0; a <> 0 by A1; hence thesis by A1,A2; end; theorem a <= 0 & b <= 0 implies 0 <= a/b; theorem 0 <= a & 0 <= b implies 0 <= a/b; theorem 0 <= a & b <= 0 implies a/b <= 0; theorem a <= 0 & 0 <= b implies a/b <= 0; theorem 0 < a & 0 < b implies 0 < a/b; theorem a < 0 & b < 0 implies 0 < a/b; theorem a < 0 & 0 < b implies a/b < 0; theorem a < 0 & 0 < b implies b/a < 0; theorem a/b<0 implies b<0 & a>0 or b>0 & a<0 proof assume A1: a/b<0; then A2: a <> 0; a/b = a*b" by XCMPLX_0:def 9; then b" <> 0 by A1; hence thesis by A1,A2; end; theorem a/b>0 implies b>0 & a>0 or b<0 & a<0 proof assume A1: a/b>0; then A2: a <> 0; a/b = a*b" by XCMPLX_0:def 9; then b" <> 0 by A1; hence thesis by A1,A2; end; begin theorem a <= b implies a < b+1 proof assume a<=b; then A1: a-1<=b-1 by Lm7; b-10 by Lm21; begin theorem a <= 1 & 0 <= b & b <= 1 & a*b = 1 implies a=1 proof assume that A1: a<=1 and A2: 0<=b and A3: b<=1 and A4: a*b=1; now per cases by A2; case b=0; hence contradiction by A4; end; case A5: b>0; then a=b" by A4,XCMPLX_0:def 7; then a>=1" by A3,A5,Lm32; hence thesis by A1,XXREAL_0:1; end; end; hence thesis; end; theorem 0 <= a & 1 <= b implies a <= a*b proof assume that A1: a>=0 and A2: b>=1; a*b>=a*1 by A1,A2,Lm12; hence thesis; end; theorem a <= 0 & b <= 1 implies a <= a*b proof assume that A1: a<=0 and A2: b<=1; a*b>=a*1 by A1,A2,Lm28; hence thesis; end; theorem 0 <= a & b <= 1 implies a*b <= a proof assume that A1: a>=0 and A2: b<=1; a*b<=a*1 by A1,A2,Lm12; hence thesis; end; theorem a <= 0 & 1 <= b implies a*b <= a proof assume that A1: a<=0 and A2: b>=1; a*b<=a*1 by A1,A2,Lm28; hence thesis; end; theorem Th155: 0 < a & 1 < b implies a < a*b proof assume that A1: a>0 and A2: b>1; a*b>a*1 by A1,A2,Lm13; hence thesis; end; theorem a < 0 & b < 1 implies a < a*b proof assume that A1: a<0 and A2: b<1; a*b>a*1 by A1,A2,Lm24; hence thesis; end; theorem 0 < a & b < 1 implies a*b < a proof assume that A1: a>0 and A2: b<1; a*b1; a*b=1 and A2: b>=1; a*b>=b*1 by A1,A2,Lm12; hence thesis by A2,XXREAL_0:2; end; theorem 0 <= a & a <= 1 & b <= 1 implies a*b <= 1 proof assume that A1: 0<=a and A2: a<=1 and A3: b<=1; a*b<=1*a by A1,A3,Lm12; hence thesis by A2,XXREAL_0:2; end; theorem 1 < a & 1 <= b implies 1 < a*b proof assume that A1: a>1 and A2: b>=1; a*b>b*1 by A1,A2,Lm13; hence thesis by A2,XXREAL_0:2; end; theorem 0 <= a & a < 1 & b <= 1 implies a*b < 1 proof assume that A1: 0<=a and A2: a<1 and A3: b<=1; a*b<=1*a by A1,A3,Lm12; hence thesis by A2,XXREAL_0:2; end; theorem a <= -1 & b <= -1 implies 1 <= a*b proof assume that A1: a<=-1 and A2: b<=-1; A3: -b>=--1 by A2,Lm14; a*b>=b*(-1) by A1,A2,Lm28; hence thesis by A3,XXREAL_0:2; end; theorem a < -1 & b <= -1 implies 1 < a*b proof assume that A1: a<-1 and A2: b<=-1; A3: -b>=--1 by A2,Lm14; a*b>b*(-1) by A1,A2,Lm24; hence thesis by A3,XXREAL_0:2; end; theorem a <= 0 & -1 <= a & -1 <= b implies a*b <= 1 proof assume that A1: 0>=a and A2: a>=-1 and A3: b>=-1; A4: -a<=--1 by A2,Lm14; a*b<=(-1)*a by A1,A3,Lm28; hence thesis by A4,XXREAL_0:2; end; theorem a <= 0 & -1 < a & -1 <= b implies a*b < 1 proof assume that A1: 0>=a and A2: a>-1 and A3: b>=-1; A4: -a<--1 by A2,Lm15; a*b<=(-1)*a by A1,A3,Lm28; hence thesis by A4,XXREAL_0:2; end; begin theorem Th167: (for a st 1 < a holds c <= b*a) implies c <= b proof assume A1: for a st a>1 holds b*a>=c; assume A2: not thesis; A3: b>=0 proof A4: c <= b*2 by A1; assume b<0; then A5: b*2<0; then c < 0 by A1; then b/c>c/c by A2,Lm29; then b/c>1 by A5,A4,XCMPLX_1:60; then A6: b*(b/c)>=c by A1; b*(b/c)0; then b/b=c by A1; hence contradiction by A2,A10; end; end; Lm36: 1 < a implies a" < 1 proof assume A1: 11; then b*(d")<=c by A1,Lm36; then b/d<=c by XCMPLX_0:def 9; hence b<=c*d by A2,Th81; end; hence thesis by Th167; end; Lm37: a <= b & 0 <= a implies a/b <= 1 proof assume A1: a <= b; assume A2: 0 <= a; per cases by A2; suppose a = 0; hence thesis; end; suppose A3: a > 0; then a/b<=b/b by A1,Lm25; hence thesis by A1,A3,XCMPLX_1:60; end; end; Lm38: b <= a & 0 <= a implies b/a <= 1 proof assume A1: b <= a; assume A2: a>=0; per cases by A2; suppose a = 0; then a" = 0; then b*a" < 1; hence thesis by XCMPLX_0:def 9; end; suppose A3: a > 0; assume b/a>1; then b/a*a>1*a by A3,Lm13; hence thesis by A1,A3,XCMPLX_1:87; end; end; theorem (for a st 0 < a & a < 1 holds b <= a*c) implies b <= 0 proof assume that A1: for a st 0 < a & a < 1 holds b <= a*c and A2: b > 0; A3: b*2 > b by A2,Th155; then A4: b > b/2 by Th83; per cases; suppose c <= 0; then 1/2*c <= 0; hence contradiction by A1,A2; end; suppose that A5: c <= b and A6: c > 0; set a = c/(2*b); c/b*2 > c/b by A2,A6,Th155; then c/b > c/b/2 by Th83; then A7: c/b > c/(b*2) by XCMPLX_1:78; c/b <= 1 by A5,A6,Lm37; then a < 1 by A7,XXREAL_0:2; then A8: a*c >= b by A1,A2,A6; per cases; suppose c >= b; then b = c by A5,XXREAL_0:1; then a*c = b/2 by A6,XCMPLX_1:92; hence contradiction by A2,A8,Th83,Th155; end; suppose A9: c < b; then a*c < c/(2*b)*b by A6,Th98; then A10: a*c < c/2 by A2,XCMPLX_1:92; c/2 < b/2 by A9,Lm26; then a*c < b/2 by A10,XXREAL_0:2; hence contradiction by A4,A8,XXREAL_0:2; end; end; suppose that A11: b <= c and A12: c > 0; set a = b/(2*c); b/c*2 > b/c by A2,A12,Th155; then b/c > b/c/2 by Th83; then A13: b/c > b/(c*2) by XCMPLX_1:78; b/c <= 1 by A11,A12,Lm38; then a < 1 by A13,XXREAL_0:2; then A14: a*c >= b by A1,A2,A12; a*c = b/2 by A12,XCMPLX_1:92; hence contradiction by A3,A14,Th83; end; end; theorem 0 <= d & d <= 1 & 0 <= a & 0 <= b & d*a+(1-d)*b=0 implies d=0 & b=0 or d=1 & a=0 or a=0 & b=0 proof assume that A1: 0<=d and A2: d<=1 and A3: a>=0 and A4: b>=0 and A5: d*a+(1-d)*b=0; d-d<=1-d by A2,Lm7; then 1-d=0 or b=0 by A1,A3,A4,A5; hence thesis by A5; end; theorem 0 <= d & a <= b implies a <= (1-d)*a+d*b proof assume that A1: 0<=d and A2: a<=b; d*a<=d*b by A1,A2,Lm12; then (1-d)*a+d*a<=(1-d)*a+d*b by Lm6; hence thesis; end; theorem d <= 1 & a <= b implies (1-d)*a+d*b <= b proof assume that A1: d<=1 and A2: a<=b; 1-d>=0 by A1,Th48; then (1-d)*a<=(1-d)*b by A2,Lm12; then (1-d)*a+d*b<=(1-d)*b+d*b by Lm6; hence thesis; end; theorem 0 <= d & d <= 1 & a <= b & a <= c implies a <= (1-d)*b+d*c proof assume that A1: 0<=d and A2: d<=1 and A3: a<=b and A4: a<=c; 1-d>=0 by A2,Th48; then A5: (1-d)*a<=(1-d)*b by A3,Lm12; A6: (1-d)*a+d*a = a; d*a<=d*c by A1,A4,Lm12; hence thesis by A5,A6,Lm6; end; theorem 0 <= d & d <= 1 & b <= a & c <= a implies (1-d)*b+d*c <= a proof assume that A1: 0<=d and A2: d<=1 and A3: a>=b and A4: a>=c; 1-d>=0 by A2,Th48; then A5: (1-d)*a>=(1-d)*b by A3,Lm12; A6: (1-d)*a+d*a = a; d*a>=d*c by A1,A4,Lm12; hence thesis by A5,A6,Lm6; end; theorem 0 <= d & d <= 1 & a < b & a < c implies a < (1-d)*b+d*c proof assume that A1: 0 <= d and A2: d <= 1 and A3: a0 by Lm21; then A6: (1-d)*a<(1-d)*b by A3,Lm13; A7: (1-d)*a+d*a=a; d*ab and A4: a>c; per cases; suppose d=0; hence thesis by A3; end; suppose d=1; hence thesis by A4; end; suppose A5: not(d=0 or d=1); then d<1 by A2,XXREAL_0:1; then 1-d>0 by Lm21; then A6: (1-d)*a>(1-d)*b by A3,Lm13; A7: (1-d)*a+d*a=a; d*a>d*c by A1,A4,A5,Lm13; hence thesis by A6,A7,Lm8; end; end; theorem 0 < d & d < 1 & a <= b & a < c implies a < (1-d)*b+d*c proof assume that A1: 0 < d and A2: d < 1 and A3: a <= b and A4: a < c; 1-d > 0 by A2,Lm21; then A5: (1-d)*a <= (1-d)*b by A3,Lm12; A6: (1-d)*a+d*a = a; d*a < d*c by A1,A4,Lm13; hence thesis by A5,A6,Lm8; end; theorem 0 < d & d < 1 & b < a & c <= a implies (1-d)*b+d*c < a proof assume that A1: 0 < d and A2: d < 1 and A3: a > b and A4: a >= c; 1-d > 0 by A2,Lm21; then A5: (1-d)*a > (1-d)*b by A3,Lm13; A6: (1-d)*a+d*a = a; d*a >= d*c by A1,A4,Lm12; hence thesis by A5,A6,Lm8; end; theorem 0 <= d & d <= 1 & a <= (1-d)*a+d*b & b < (1-d)*a+d*b implies d = 0 proof assume that A1: d >= 0 and A2: d <= 1 and A3: a <= (1-d)*a + d*b and A4: b < (1-d)*a + d*b; set s = (1-d)*a + d*b; assume d <> 0; then A5: d*b < d*s by A1,A4,Lm13; 1-d >= 0 by A2,Th48; then A6: (1-d)*a <= (1-d)*s by A3,Lm12; 1*s = (1-d)*s + d*s; hence contradiction by A5,A6,Lm8; end; theorem 0 <= d & d <= 1 & (1-d)*a+d*b <= a & (1-d)*a+d*b < b implies d = 0 proof assume that A1: d >= 0 and A2: d <= 1 and A3: a >= (1-d)*a + d*b and A4: b > (1-d)*a + d*b; set s = (1-d)*a + d*b; assume d <> 0; then A5: d*b > d*s by A1,A4,Lm13; 1-d >= 0 by A2,Th48; then A6: (1-d)*a >= (1-d)*s by A3,Lm12; 1*s = (1-d)*s + d*s; hence contradiction by A5,A6,Lm8; end; begin theorem 0 < a & a <= b implies 1 <= b/a proof assume that A1: 0=a/a by A1,A2,Lm25; hence thesis by A1,XCMPLX_1:60; end; theorem a < 0 & b <= a implies 1 <= b/a proof assume that A1: a < 0 and A2: b<=a; b/a>=a/a by A1,A2,Lm30; hence thesis by A1,XCMPLX_1:60; end; theorem 0 <= a & a <= b implies a/b <= 1 by Lm37; theorem b <= a & a <= 0 implies a/b <= 1 proof assume A1: b <= a; assume A2: a <= 0; per cases by A2; suppose a = 0; hence thesis; end; suppose A3: a < 0; then a/b<=b/b by A1,Lm30; hence thesis by A1,A3,XCMPLX_1:60; end; end; theorem 0 <= a & b <= a implies b/a <= 1 by Lm38; theorem a <= 0 & a <= b implies b/a <= 1 proof assume A1: a<=0; per cases by A1; suppose a = 0; then a" = 0; then b*a" = 0; hence thesis by XCMPLX_0:def 9; end; suppose A2: a<0; assume A3: a <= b; assume b/a>1; then b/a*a<1*a by A2,Lm24; hence thesis by A2,A3,XCMPLX_1:87; end; end; theorem 0 < a & a < b implies 1 < b/a proof assume A1: a>0; assume A2: a < b; assume b/a<=1; then b/a*a<=1*a by A1,Lm12; hence thesis by A1,A2,XCMPLX_1:87; end; theorem a < 0 & b < a implies 1 < b/a proof assume that A1: a < 0 and A2: ba/a by A1,A2,Lm29; hence thesis by A1,XCMPLX_1:60; end; theorem 0 <= a & a < b implies a/b < 1 proof assume that A1: 0 <= a and A2: a < b; a/b 0; assume A2: b < a; assume b/a>=1; then b/a*a>=1*a by A1,Lm12; hence thesis by A1,A2,XCMPLX_1:87; end; theorem a < 0 & a < b implies b/a < 1 proof assume A1: a<0; assume A2: a < b; assume b/a>=1; then b/a*a<=1*a by A1,Lm28; hence thesis by A1,A2,XCMPLX_1:87; end; begin theorem 0 <= b & -b <= a implies -1 <= a/b proof assume A1: b>=0; per cases by A1; suppose b = 0; then b" = 0; then a*b" = 0; hence thesis by XCMPLX_0:def 9; end; suppose A2: b>0; assume A3: -b <= a; assume a/b<-1; then a/b*b<(-1)*b by A2,Lm13; hence thesis by A2,A3,XCMPLX_1:87; end; end; theorem 0 <= b & -a <= b implies -1 <= a/b proof assume A1: b >= 0; per cases by A1; suppose b = 0; then b" = 0; then a*b" = 0; hence thesis by XCMPLX_0:def 9; end; suppose A2: b > 0; assume A3: -a <= b; assume a/b<-1; then a/b*b<(-1)*b by A2,Lm13; then a<-b by A2,XCMPLX_1:87; hence thesis by A3,Th26; end; end; theorem b <= 0 & a <= -b implies -1 <= a/b proof assume A1: b<=0; per cases by A1; suppose b=0; then b" =0; then a*b" = 0; hence thesis by XCMPLX_0:def 9; end; suppose A2: b < 0; assume A3: a <= -b; assume a/b<-1; then a/b*b>(-1)*b by A2,Lm24; hence thesis by A2,A3,XCMPLX_1:87; end; end; theorem b <= 0 & b <= -a implies -1 <= a/b proof assume A1: b<=0; per cases by A1; suppose b = 0; then b" =0; then a*b" = 0; hence thesis by XCMPLX_0:def 9; end; suppose A2: b < 0; assume A3: b <= -a; assume a/b<-1; then a/b*b>(-1)*b by A2,Lm24; then a>-b by A2,XCMPLX_1:87; hence thesis by A3,Th25; end; end; theorem 0 < b & -b < a implies -1 < a/b proof assume A1: b>0; assume A2: -b < a; assume a/b<=-1; then a/b*b<=(-1)*b by A1,Lm12; hence thesis by A1,A2,XCMPLX_1:87; end; theorem 0 < b & -a < b implies -1 < a/b proof assume A1: b>0; assume A2: -a < b; assume a/b<=-1; then a/b*b<=(-1)*b by A1,Lm12; then a<=-b by A1,XCMPLX_1:87; hence thesis by A2,Th25; end; theorem b < 0 & a < -b implies -1 < a/b proof assume A1: b<0; assume A2: a < -b; assume a/b<=-1; then a/b*b>=(-1)*b by A1,Lm28; hence thesis by A1,A2,XCMPLX_1:87; end; theorem b < 0 & b < -a implies -1 < a/b proof assume A1: b<0; assume A2: b < -a; assume a/b<=-1; then a/b*b>=(-1)*b by A1,Lm28; then a>=-b by A1,XCMPLX_1:87; hence thesis by A2,Th26; end; theorem 0 < b & a <= -b implies a/b <= -1 proof assume A1: b>0; assume A2: a <= -b; assume a/b>-1; then a/b*b>(-1)*b by A1,Lm13; hence thesis by A1,A2,XCMPLX_1:87; end; theorem 0 < b & b <= -a implies a/b <= -1 proof assume A1: b>0; assume A2: b <= -a; assume a/b>-1; then a/b*b>(-1)*b by A1,Lm13; then a>-b by A1,XCMPLX_1:87; hence thesis by A2,Th25; end; theorem b < 0 & -b <= a implies a/b <= -1 proof assume A1: b<0; assume A2: -b <= a; assume a/b>-1; then a/b*b<(-1)*b by A1,Lm24; hence thesis by A1,A2,XCMPLX_1:87; end; theorem b < 0 & -a <= b implies a/b <= -1 proof assume A1: b<0; assume A2: -a <= b; assume a/b>-1; then a/b*b<(-1)*b by A1,Lm24; then a<-b by A1,XCMPLX_1:87; hence thesis by A2,Th26; end; theorem 0 < b & a < -b implies a/b < -1 proof assume A1: b>0; assume A2: a < -b; assume a/b>=-1; then a/b*b>=(-1)*b by A1,Lm12; hence thesis by A1,A2,XCMPLX_1:87; end; theorem 0 < b & b < -a implies a/b < -1 proof assume A1: b>0; assume A2: b < -a; assume a/b>=-1; then a/b*b>=(-1)*b by A1,Lm12; then a>=-b by A1,XCMPLX_1:87; hence thesis by A2,Th26; end; theorem b < 0 & -b < a implies a/b < -1 proof assume A1: b<0; assume A2: -b < a; assume a/b>=-1; then a/b*b<=(-1)*b by A1,Lm28; hence thesis by A1,A2,XCMPLX_1:87; end; theorem b < 0 & -a < b implies a/b < -1 proof assume A1: b<0; assume A2: -a < b; assume a/b>=-1; then a/b*b<=(-1)*b by A1,Lm28; then a<=-b by A1,XCMPLX_1:87; hence thesis by A2,Th25; end; begin theorem Th209: (for a being real number st 0 < a & a < 1 holds c <= b/a) implies c <= b proof assume A1: for a st a>0 & a<1 holds b/a>=c; now let d; assume d>1; then A2: b/(d")>=c by A1,Lm36; d" = 1/d by XCMPLX_1:215; then b*d/1>=c by A2,XCMPLX_1:77; hence b*d>=c; end; hence thesis by Th167; end; theorem (for a being real number st 1 < a holds b/a <= c) implies b <= c proof (for a st a>1 holds b/a<=c) implies b<=c proof assume A1: for a st a>1 holds b/a<=c; now let d; A2: d" = 1/d by XCMPLX_1:215; assume that A3: 01" by A3,A4,Lm34; then b/(d")<=c by A1; then b*d/1<=c by A2,XCMPLX_1:77; hence b<=c/d by A3,Th77; end; hence thesis by Th209; end; hence thesis; end; theorem 1 <= a implies a" <= 1 proof 1 <= a implies a" <= 1" by Lm32; hence thesis; end; theorem 1 < a implies a" < 1 by Lm36; theorem a <= -1 implies -1 <= a" proof a <= -1 implies (-1)" <= a" by Lm33; hence thesis; end; theorem a < -1 implies -1 < a" proof a < -1 implies (-1)" < a" by Lm31; hence thesis; end; begin theorem 0 < a implies 0 < a/2; theorem 0 < a implies a/2 < a by Lm27; theorem a <= 1/2 implies 2 * a - 1 <= 0 proof assume a <= 1/2; then 2 * a <= 2 * (1/2) by Lm12; then 2 * a <= 1 + 0; hence thesis by Lm18; end; theorem a <= 1/2 implies 0 <= 1 - 2 * a proof assume a <= 1/2; then 2 * a <= 2 * (1/2) by Lm12; then 2 * a + 0 <= 1; hence thesis by Lm16; end; theorem a >= 1/2 implies 2 * a - 1 >= 0 proof assume a >= 1/2; then 2 * a >= 2 * (1/2) by Lm12; then 2 * a >= 1 + 0; hence thesis by Lm16; end; theorem a >= 1/2 implies 0 >= 1 - 2 * a proof assume a >= 1/2; then 2 * a >= 2 * (1/2) by Lm12; then 2 * a + 0 >= 1; hence thesis by Lm18; end; begin theorem 0 < a implies a/3 < a proof assume A1: 00 ex c st a=b/c proof let a,b; assume A1: b<>0; then consider c being complex number such that A2: a=b/c by XCMPLX_1:232; per cases; suppose c = 0; hence thesis by A2; end; suppose c <> 0; then c = b/a by A1,A2,XCMPLX_1:54; then reconsider c as real number; take c; thus thesis by A2; end; end; begin theorem r ext-real for Element of REAL; coherence; end; reserve p,q,r,s,t for ext-real number; theorem Th227: r < t implies ex s st r < s & s < t proof assume A1: r < t; then A2: r <> +infty by XXREAL_0:3; A3: t <> -infty by A1,XXREAL_0:5; per cases by A2,A3,XXREAL_0:14; suppose that A4: r = -infty and A5: t = +infty; take 0; thus thesis by A4,A5; end; suppose that A6: r = -infty and A7: t in REAL; reconsider t as real number by A7; consider s being real number such that A8: s < t by Th2; take s; s in REAL by XREAL_0:def 1; hence r < s by A6,XXREAL_0:12; thus thesis by A8; end; suppose that A9: r in REAL and A10: t = +infty; reconsider r9 = r as real number by A9; consider s being real number such that A11: r9 < s by Th1; take s; thus r < s by A11; s in REAL by XREAL_0:def 1; hence thesis by A10,XXREAL_0:9; end; suppose that A12: r in REAL and A13: t in REAL; reconsider r,t as real number by A12,A13; consider s being real number such that A14: r < s and A15: s < t by A1,Th5; take s; thus thesis by A14,A15; end; end; theorem r < s & (for q st r < q & q < s holds t <= q) implies t <= r proof assume that A1: r < s and A2: for q st r < q & q < s holds t <= q; for q st r < q holds t <= q proof let q such that A3: r < q; per cases; suppose q < s; hence thesis by A2,A3; end; suppose A4: s <= q; consider p such that A5: r < p and A6: p < s by A1,Th227; t <= p by A2,A5,A6; then t <= s by A6,XXREAL_0:2; hence thesis by A4,XXREAL_0:2; end; end; hence thesis by Th227; end; theorem r < s & (for q st r < q & q < s holds q <= t) implies s <= t proof assume that A1: r < s and A2: for q st r < q & q < s holds q <= t; for q st t < q holds s <= q proof let q such that A3: t < q and A4: q < s; per cases; suppose r < q; hence thesis by A2,A3,A4; end; suppose A5: q <= r; consider p such that A6: r < p and A7: p < s by A1,Th227; p <= t by A2,A6,A7; then r <= t by A6,XXREAL_0:2; hence thesis by A3,A5,XXREAL_0:2; end; end; hence thesis by Th227; end; theorem 0 <= a & b <= c implies b-a <= c proof assume that A1: 0 <= a and A2: b <= c; b+0 <= a+c by A1,A2,Th38; hence thesis by Lm18; end; theorem 0 < a & b <= c implies b-a < c proof assume that A1: 0 < a and A2: b <= c; b+0 < a+c by A1,A2,Th39; hence thesis by Lm17; end; begin theorem a -' a = 0 proof a-a = 0; hence thesis by XREAL_0:def 2; end; theorem Th233: b <= a implies a -' b = a - b proof assume a >= b; then a - b >= 0 by Th48; hence thesis by XREAL_0:def 2; end; theorem c <= a & c <= b & a -' c = b -' c implies a = b proof assume that A1: a >= c and A2: b >= c and A3: a -' c = b -' c; a - c >= 0 by A1,Th48; then A4: a -' c = a - c by XREAL_0:def 2; b - c >= 0 by A2,Th48; then a + (-c) = b + (-c) by A3,A4,XREAL_0:def 2; hence thesis; end; theorem a >= b implies a -' b + b = a proof assume a >= b; then a - b = a -' b by Th233; hence thesis; end; theorem a <= b & c < a implies b -' a < b -' c proof assume that A1: a <= b and A2: c < a; A3: b - a < b - c by A2,Th15; b -' c = b - c by A1,A2,Th233,XXREAL_0:2; hence thesis by A1,A3,Th233; end; theorem 1 <= a implies a -' 1 < a proof assume 1 <= a; then a -' 1 = a - 1 by Th233; hence a -' 1 < a by Th44; end; begin reserve r,s for real number; Lm1: (r in REAL+ & s in REAL+ & ex x9,y9 being Element of REAL+ st r = x9 & s = y9 & x9 <=' y9) or (r in [:{0},REAL+:] & s in [:{0},REAL+:] & ex x9,y9 being Element of REAL+ st r = [0,x9] & s = [0,y9] & y9 <=' x9) or s in REAL+ & r in [:{0},REAL+:] implies r <= s proof assume A1: (r in REAL+ & s in REAL+ & ex x9,y9 being Element of REAL+ st r = x9 & s = y9 & x9 <=' y9) or (r in [:{0},REAL+:] & s in [:{0},REAL+:] & ex x9,y9 being Element of REAL+ st r = [0,x9] & s = [0,y9] & y9 <=' x9) or s in REAL+ & r in [:{0},REAL+:]; per cases; case r in REAL+ & s in REAL+; hence thesis by A1,ARYTM_0:5,XBOOLE_0:3; end; case r in [:{0},REAL+:] & s in [:{0},REAL+:]; hence thesis by A1,ARYTM_0:5,XBOOLE_0:3; end; case not(r in REAL+ & s in REAL+) & not (r in [:{0},REAL+:] & s in [:{0 },REAL+:]); hence thesis by A1; end; end; reserve x,y,z for real number, k for Nat, i for Element of NAT; Lm2: for x being real number, x1,x2 being Element of REAL st x = [*x1,x2*] holds x2 = 0 & x = x1 proof let x be real number, x1,x2 being Element of REAL; assume A1: x = [*x1,x2*]; A2: x in REAL by XREAL_0:def 1; thus now assume x2 <> 0; then x = (0,1) --> (x1,x2) by A1,ARYTM_0:def 5; hence contradiction by A2,ARYTM_0:8; end; hence thesis by A1,ARYTM_0:def 5; end; Lm3: for x9,y9 being Element of REAL, x,y st x9 = x & y9 = y holds +(x9,y9) = x + y proof let x9,y9 be Element of REAL, x,y such that A1: x9 = x & y9 = y; consider x1,x2,y1,y2 being Element of REAL such that A2: x = [* x1,x2 *] & y = [*y1,y2*] and A3: x+y = [*+(x1,y1),+(x2,y2)*] by XCMPLX_0:def 4; x2 = 0 & y2 = 0 by A2,Lm2; then A4: +(x2,y2) = 0 by ARYTM_0:11; x = x1 & y = y1 by A2,Lm2; hence thesis by A1,A3,A4,ARYTM_0:def 5; end; Lm4: {} in {{}} by TARSKI:def 1; reconsider o = 0 as Element of REAL+ by ARYTM_2:20; reserve r,r1,r2 for Element of REAL+; theorem for X,Y being Subset of REAL st for x,y st x in X & y in Y holds x <= y ex z st for x,y st x in X & y in Y holds x <= z & z <= y proof let X,Y be Subset of REAL; assume A1: for x,y st x in X & y in Y holds x <= y; per cases; suppose A2: X = 0 or Y = 0; take 1; thus thesis by A2; end; suppose that A3: X <> 0 and A4: Y <> 0; consider x1 being Element of REAL such that A5: x1 in X by A3,SUBSET_1:4; A6: X c= REAL+ \/ [:{0},REAL+:] by NUMBERS:def 1,XBOOLE_1:1; A7: Y c= REAL+ \/ [:{0},REAL+:] by NUMBERS:def 1,XBOOLE_1:1; A8: ex x2 being Element of REAL st x2 in Y by A4,SUBSET_1:4; thus thesis proof per cases; suppose that A9: X misses REAL+ and A10: Y misses [:{0},REAL+:]; take z = 0; let x,y such that A11: x in X and A12: y in Y; ( not z in [:{0},REAL+:])& not x in REAL+ by A9,A11,ARYTM_0:5 ,ARYTM_2:20,XBOOLE_0:3; hence x <= z by XXREAL_0:def 5; Y c= REAL+ by A7,A10,XBOOLE_1:73; then reconsider y9 = y as Element of REAL+ by A12; o <=' y9 by ARYTM_1:6; hence thesis by Lm1; end; suppose A13: Y meets [:{0},REAL+:]; {r: [0,r] in X} c= REAL+ proof let u be set; assume u in {r: [0,r] in X}; then ex r st u = r & [0,r] in X; hence thesis; end; then reconsider X9 = {r: [0,r] in X} as Subset of REAL+; {r: [0,r] in Y} c= REAL+ proof let u be set; assume u in {r: [0,r] in Y}; then ex r st u = r & [0,r] in Y; hence thesis; end; then reconsider Y9 = {r : [0,r] in Y} as Subset of REAL+; consider e being set such that A14: e in Y and A15: e in [:{0},REAL+:] by A13,XBOOLE_0:3; consider u,y1 being set such that A16: u in {0} and A17: y1 in REAL+ and A18: e = [u,y1] by A15,ZFMISC_1:84; reconsider y1 as Element of REAL+ by A17; e in REAL by A14; then A19: [0,y1] in REAL by A16,A18,TARSKI:def 1; then reconsider y0 = [0,y1] as real number; A20: y0 in Y by A14,A16,A18,TARSKI:def 1; then A21: y1 in Y9; A22: y0 in [:{0},REAL+:] by Lm4,ZFMISC_1:87; A23: X c= [:{0},REAL+:] proof let u be set; assume A24: u in X; then reconsider x = u as real number; now assume x in REAL+; then A25: not x in [:{0},REAL+:] by ARYTM_0:5,XBOOLE_0:3; x <= y0 & not y0 in REAL+ by A1,A22,A20,A24,ARYTM_0:5,XBOOLE_0:3; hence contradiction by A25,XXREAL_0:def 5; end; hence thesis by A6,A24,XBOOLE_0:def 3; end; then consider e,x3 being set such that A26: e in {0} and A27: x3 in REAL+ and A28: x1 = [e,x3] by A5,ZFMISC_1:84; reconsider x3 as Element of REAL+ by A27; x1 = [0,x3] by A26,A28,TARSKI:def 1; then A29: x3 in X9 by A5; for y9,x9 being Element of REAL+ st y9 in Y9 & x9 in X9 holds y9 <=' x9 proof let y9,x9 be Element of REAL+; assume y9 in Y9; then A30: ex r1 st y9 = r1 & [0,r1] in Y; assume x9 in X9; then A31: ex r2 st x9 = r2 & [0,r2] in X; then reconsider x = [0,x9], y = [0,y9] as real number by A30; A32: x in [:{0},REAL+:] & y in [:{0},REAL+:] by Lm4,ZFMISC_1:87; x <= y by A1,A30,A31; then consider x99,y99 being Element of REAL+ such that A33: x = [0,x99] and A34: y = [0,y99] & y99 <=' x99 by A32,XXREAL_0:def 5; x9 = x99 by A33,XTUPLE_0:1; hence thesis by A34,XTUPLE_0:1; end; then consider z9 being Element of REAL+ such that A35: for y9,x9 being Element of REAL+ st y9 in Y9 & x9 in X9 holds y9 <=' z9 & z9 <=' x9 by A29,ARYTM_2:8; A36: y1 <> 0 by A19,ARYTM_0:3; y1 <=' z9 by A21,A29,A35; then [0,z9] in REAL by A36,ARYTM_0:2,ARYTM_1:5; then reconsider z = [0,z9] as real number; take z; let x,y such that A37: x in X and A38: y in Y; consider e,x9 being set such that A39: e in {0} and A40: x9 in REAL+ and A41: x = [e,x9] by A23,A37,ZFMISC_1:84; reconsider x9 as Element of REAL+ by A40; A42: z in [:{0},REAL+:] by Lm4,ZFMISC_1:87; A43: x = [0,x9] by A39,A41,TARSKI:def 1; then A44: x9 in X9 by A37; now per cases by A7,A38,XBOOLE_0:def 3; suppose A45: y in REAL+; z9 <=' x9 by A21,A35,A44; hence x <= z by A23,A42,A37,A43,Lm1; A46: not y in [:{0},REAL+:] by A45,ARYTM_0:5,XBOOLE_0:3; not z in REAL+ by A42,ARYTM_0:5,XBOOLE_0:3; hence z <= y by A46,XXREAL_0:def 5; end; suppose A47: y in [:{0},REAL+:]; then consider e,y9 being set such that A48: e in {0} and A49: y9 in REAL+ and A50: y = [e,y9] by ZFMISC_1:84; reconsider y9 as Element of REAL+ by A49; A51: y = [0,y9] by A48,A50,TARSKI:def 1; then y9 in Y9 by A38; then y9 <=' z9 & z9 <=' x9 by A35,A44; hence thesis by A23,A42,A37,A43,A47,A51,Lm1; end; end; hence thesis; end; suppose A52: X meets REAL+; reconsider X9 = X /\ REAL+ as Subset of REAL+ by XBOOLE_1:17; consider x1 being set such that A53: x1 in X and A54: x1 in REAL+ by A52,XBOOLE_0:3; reconsider x1 as Element of REAL+ by A54; x1 in REAL+; then reconsider x0 = x1 as real number by ARYTM_0:1; A55: Y c= REAL+ proof let u be set; assume A56: u in Y; then reconsider y = u as real number; now assume y in [:{0},REAL+:]; then A57: not y in REAL+ by ARYTM_0:5,XBOOLE_0:3; x0 <= y & not x0 in [:{0},REAL+:] by A1,A53,A56,ARYTM_0:5 ,XBOOLE_0:3; hence contradiction by A57,XXREAL_0:def 5; end; hence thesis by A7,A56,XBOOLE_0:def 3; end; then reconsider Y9 = Y as Subset of REAL+; for x9,y9 being Element of REAL+ st x9 in X9 & y9 in Y9 holds x9 <=' y9 proof let x9,y9 be Element of REAL+; A58: X9 c= X by XBOOLE_1:17; x9 in REAL+ & y9 in REAL+; then reconsider x = x9, y = y9 as real number by ARYTM_0:1 ; assume x9 in X9 & y9 in Y9; then x <= y by A1,A58; then ex x9,y9 being Element of REAL+ st x = x9 & y = y9 & x9 <=' y9 by XXREAL_0:def 5; hence thesis; end; then consider z9 being Element of REAL+ such that A59: for x9,y9 being Element of REAL+ st x9 in X9 & y9 in Y9 holds x9 <=' z9 & z9 <=' y9 by A8,ARYTM_2:8; z9 in REAL+; then reconsider z = z9 as real number by ARYTM_0:1; take z; let x,y such that A60: x in X and A61: y in Y; reconsider y9 = y as Element of REAL+ by A55,A61; A62: x0 in X9 by A53,XBOOLE_0:def 4; now per cases by A6,A60,XBOOLE_0:def 3; suppose x in REAL+; then reconsider x9 = x as Element of REAL+; x9 in X9 by A60,XBOOLE_0:def 4; then x9 <=' z9 & z9 <=' y9 by A59,A61; hence thesis by Lm1; end; suppose A63: x in [:{0},REAL+:]; A64: not z in [:{0},REAL+:] by ARYTM_0:5,XBOOLE_0:3; not x in REAL+ by A63,ARYTM_0:5,XBOOLE_0:3; hence x <= z by A64,XXREAL_0:def 5; z9 <=' y9 by A62,A59,A61; hence z <= y by Lm1; end; end; hence thesis; end; end; end; end; theorem x in NAT & y in NAT implies x + y in NAT proof reconsider x1 = x, y1 = y as Element of REAL by XREAL_0:def 1; A1: +(x1,y1) = x + y by Lm3; assume A2: x in NAT & y in NAT; then ex x9,y9 being Element of REAL+ st x1 = x9 & y1 = y9 & +(x1,y1) = x9 + y9 by ARYTM_0:def 1,ARYTM_2:2; hence thesis by A1,A2,ARYTM_2:16; end; theorem for A being Subset of REAL st 0 in A & for x st x in A holds x + 1 in A holds NAT c= A proof let A be Subset of REAL such that A1: 0 in A and A2: for x st x in A holds x + 1 in A; reconsider B = A /\ REAL+ as Subset of REAL+ by XBOOLE_1:17; A3: B c= A by XBOOLE_1:17; A4: for x9,y9 being Element of REAL+ st x9 in B & y9 = 1 holds x9 + y9 in B proof let x9,y9 be Element of REAL+ such that A5: x9 in B and A6: y9 = 1; x9 in REAL+; then reconsider x = x9 as Element of REAL by ARYTM_0:1; reconsider xx = x as real number; xx+1 in A by A2,A3,A5; then (ex x99,y99 being Element of REAL+ st x = x99 & 1 = y99 & +(x,1) = x99 + y99 )& +(x,1) in A by Lm3,ARYTM_0:def 1,ARYTM_2:20; hence thesis by A6,XBOOLE_0:def 4; end; 0 in B by A1,ARYTM_2:20,XBOOLE_0:def 4; then NAT c= B by A4,ARYTM_2:17; hence thesis by A3,XBOOLE_1:1; end; theorem k = { i: i < k } proof A1: k in NAT by ORDINAL1:def 12; thus k c= { i: i < k } proof reconsider k9 = k as Element of NAT by ORDINAL1:def 12; let e be set; assume A2: e in k; A3: k9 c= NAT by ORDINAL1:def 2; then reconsider j = e as Element of NAT by A2; e in NAT by A3,A2; then reconsider y9 = e as Element of REAL+ by ARYTM_2:2; k9 in NAT; then reconsider x9 = k9 as Element of REAL+ by ARYTM_2:2; y9 <=' x9 by A2,ARYTM_2:18; then A4: j <= k by Lm1; y9 <> x9 by A2; then j < k by A4,XXREAL_0:1; hence thesis; end; let e be set; assume e in { i: i < k }; then consider i be Element of NAT such that A5: e = i and A6: not k <= i; i in NAT; then reconsider x9 = e, y9 = k as Element of REAL+ by A5,A1,ARYTM_2:2; not y9 <=' x9 by A5,A6,Lm1; hence thesis by A5,A6,A1,ARYTM_2:18; end; begin registration cluster -> real for Element of REAL; coherence; end; definition mode Real is Element of REAL; end; registration cluster positive for Real; existence proof take 1; thus thesis; end; end; definition let x be Real; redefine func -x -> Real; coherence by XREAL_0:def 1; redefine func x" -> Real; coherence by XREAL_0:def 1; end; definition let x be real number, y be Real; redefine func x+y -> Real; coherence by XREAL_0:def 1; redefine func x*y -> Real; coherence by XREAL_0:def 1; redefine func x-y -> Real; coherence by XREAL_0:def 1; redefine func x/y -> Real; coherence by XREAL_0:def 1; end; definition let x be Real, y be real number; redefine func x+y -> Real; coherence by XREAL_0:def 1; redefine func x*y -> Real; coherence by XREAL_0:def 1; redefine func x-y -> Real; coherence by XREAL_0:def 1; redefine func x/y -> Real; coherence by XREAL_0:def 1; end; reserve s,t for Element of RAT+; theorem REAL+ = { r where r is Real: 0 <= r} proof set RP = { r where r is Real: 0 <= r}; thus REAL+ c= RP proof let e be set; assume A1: e in REAL+; then reconsider r = e as Real by ARYTM_0:1; reconsider o = 0, s = r as Element of REAL+ by ARYTM_2:20,A1; o <=' s by ARYTM_1:6; then 0 <= r by ARYTM_2:20,XXREAL_0:def 5; hence e in RP; end; let e be set; assume e in RP; then A2: ex r being Real st e = r & 0 <= r; not 0 in [:{0},REAL+:] by ARYTM_0:5,XBOOLE_0:3,ARYTM_2:20; hence e in REAL+ by A2,XXREAL_0:def 5; end; begin reserve a,b,c,x,y,z for real number; scheme RealContinuity { P[set], Q[set] } : ex z st for x,y st P[x] & Q[y] holds x <= z & z <= y provided A1: for x,y st P[x] & Q[y] holds x <= y proof set Y = { z where z is Element of REAL : Q[z] }; set X = { z where z is Element of REAL : P[z] }; A2: X c= REAL proof let x be set; assume x in X; then ex z being Element of REAL st z = x & P[z]; hence thesis; end; Y c= REAL proof let x be set; assume x in Y; then ex z being Element of REAL st z = x & Q[z]; hence thesis; end; then reconsider X, Y as Subset of REAL by A2; for x,y being real number st x in X & y in Y holds x <= y proof let x,y be real number; assume that A3: x in X and A4: y in Y; A5: ex z being Element of REAL st z = y & Q[z] by A4; ex z being Element of REAL st z = x & P[z] by A3; hence thesis by A1,A5; end; then consider z being real number such that A6: for x,y being real number st x in X & y in Y holds x <= z & z <= y by AXIOMS:1; take z; let x,y; assume that A7: P[x] and A8: Q[y]; y is Element of REAL by XREAL_0:def 1; then A9: y in Y by A8; x is Element of REAL by XREAL_0:def 1; then x in X by A7; hence thesis by A6,A9; end; definition let x,y be Element of REAL; redefine func min(x,y) -> Element of REAL; coherence by XREAL_0:def 1; redefine func max(x,y) -> Element of REAL; coherence by XREAL_0:def 1; end; theorem min(x,y) + max(x,y) = x + y proof per cases; suppose A1: x <= y; then min(x,y) = x by XXREAL_0:def 9; hence thesis by A1,XXREAL_0:def 10; end; suppose A2: x > y; then min(x,y) = y by XXREAL_0:def 9; hence thesis by A2,XXREAL_0:def 10; end; end; theorem for x,y being real number st 0 <= x & 0 <= y holds max(x,y) <= x + y proof let x,y be real number; assume that A1: 0 <= x and A2: 0 <= y; now per cases by XXREAL_0:16; suppose A3: max(x,y) = x; x + 0 <= x + y by A2,XREAL_1:7; hence thesis by A3; end; suppose A4: max(x,y) = y; y + 0 <= y + x by A1,XREAL_1:7; hence thesis by A4; end; end; hence thesis; end; definition let x be complex number; func x^2 equals x * x; correctness; end; registration let x be complex number; cluster x^2 -> complex; coherence; end; registration let x; cluster x^2 -> real; coherence; end; definition let x be Element of COMPLEX; redefine func x^2 -> Element of COMPLEX; coherence by XCMPLX_0:def 2; end; definition let x be Element of REAL; redefine func x^2 -> Element of REAL; coherence by XREAL_0:def 1; end; theorem for a being complex number holds a^2 = (-a)^2; theorem for a, b being complex number holds (a + b)^2 = a^2 + 2*a*b + b^2; theorem for a, b being complex number holds (a - b)^2 = a^2 - 2*a*b + b^2; theorem for a being complex number holds (a + 1)^2 = a^2 + 2*a + 1; theorem for a being complex number holds (a - 1)^2 = a^2 - 2*a + 1; theorem for a, b being complex number holds (a - b)*(a + b) = a^2 - b^2; theorem for a, b being complex number holds (a*b)^2 = a^2*b^2; theorem Th10: for a, b being complex number st a^2 - b^2 <> 0 holds 1/(a+b) = (a-b)/(a^2-b^2) proof let a, b be complex number; assume a^2-b^2 <> 0; then (a-b) <> 0; hence 1/(a+b) = (1*(a-b))/((a+b)*(a-b)) by XCMPLX_1:91 .= (a-b)/(a^2-b^2); end; theorem Th11: for a, b being complex number st a^2-b^2 <> 0 holds 1/(a-b) = (a+b)/(a^2-b^2) proof let a, b be complex number; assume a^2-b^2 <> 0; then (a+b)*(a-b) <> 0; then (a+b) <> 0; hence 1/(a-b) = (1*(a+b))/((a-b)*(a+b)) by XCMPLX_1:91 .= (a+b)/(a^2-b^2); end; theorem 0 <> a implies 0 < a^2 by XREAL_1:63; theorem Th13: 0 < a & a < 1 implies a^2 < a proof assume that A1: 0 < a and A2: a < 1; a*a < a*1 by A1,A2,XREAL_1:68; hence thesis; end; theorem Th14: 1 < a implies a < a^2 proof assume 1 < a; then a*1 < a*a by XREAL_1:68; hence thesis; end; Lm1: 0 < a implies ex x st 0 < x & x^2 < a proof assume A1: 0 < a; per cases; suppose A2: 1 <= a; reconsider x = 2" as real number; take x; thus 0 < x; thus thesis by A2,XXREAL_0:2; end; suppose A3: a < 1; take x = a; thus 0 < x by A1; thus thesis by A1,A3,Th13; end; end; theorem Th15: 0 <= x & x <= y implies x^2 <= y^2 proof assume that A1: 0 <= x and A2: x <= y; A3: x*y <= y*y by A1,A2,XREAL_1:64; x*x <= x*y by A1,A2,XREAL_1:64; hence thesis by A3,XXREAL_0:2; end; theorem Th16: 0 <= x & x < y implies x^2 < y^2 proof assume that A1: 0 <= x and A2: x < y; A3: x*y < y*y by A1,A2,XREAL_1:68; x*x <= x*y by A1,A2,XREAL_1:64; hence thesis by A3,XXREAL_0:2; end; Lm2: 0 <= x & 0 <= y & x^2 = y^2 implies x = y proof assume that A1: 0 <= x and A2: 0 <= y; assume A3: x^2 = y ^2; then A4: y <= x by A1,Th16; x <= y by A2,A3,Th16; hence thesis by A4,XXREAL_0:1; end; definition let a; assume A1: 0 <= a; func sqrt a -> real number means :Def2: 0 <= it & it^2 = a; existence proof defpred Y[real number] means 0 <= $1 & a <= $1^2; defpred X[real number] means $1 <= 0 or $1^2 <= a; a <= a + 1 by XREAL_1:29; then A2: 0 + a <= a^2 + a + (a + 1) by A1,XREAL_1:7; A3: now let x,y such that A4: X[x] and A5: Y[y]; per cases; suppose x <= 0; hence x <= y by A5; end; suppose not x <= 0; then x^2 <= y^2 by A4,A5,XXREAL_0:2; hence x <= y by A5,Th16; end; end; consider z such that A6: for x,y st X[x] & Y[y] holds x <= z & z <= y from RealContinuity(A3); take z; A7: (a + 1)^2 = a^2 + a + (a + 1); hence 0 <= z by A1,A2,A6; assume A8: z^2 <> a; now per cases by A8,XXREAL_0:1; suppose A9: z <= 0; then z = 0 by A1,A7,A2,A6; then ex c st 0 < c & c^2 < a by A1,A8,Lm1; hence contradiction by A1,A7,A2,A6,A9; end; suppose A10: z^2 < a & not z <= 0; set b = a - z^2; A11: 0 < b by A10,XREAL_1:50; then consider c such that A12: 0 < c and A13: c^2 < b/2 by Lm1; set eps = min(c, b/(4*z)); A14: 0 < eps by A10,A11,A12,XXREAL_0:15; then A15: z < z + eps by XREAL_1:29; eps*(2*z) <= b/(2*(2*z))*(2*z) by A10,XREAL_1:64,XXREAL_0:17; then eps*(2*z) <= b/2/(2*z)*(2*z) by XCMPLX_1:78; then A16: 2*z*eps <= b/2 by A10,XCMPLX_1:87; eps^2 <= c^2 by A14,Th15,XXREAL_0:17; then eps^2 <= b/2 by A13,XXREAL_0:2; then A17: 2*z*eps + eps^2 <= b/2 + b/2 by A16,XREAL_1:7; A18: (z + eps)^2 = z^2 + (2*z*eps + eps^2); a = z^2 + b; then (z + eps)^2 <= a by A18,A17,XREAL_1:6; hence contradiction by A1,A7,A2,A6,A15; end; suppose A19: a < z^2 & not z <= 0; set b = z^2 - a; set eps = min(b/(2*z),z); A20: (z - eps)^2 = z^2 - (2*z*eps - eps^2); 0 < b by A19,XREAL_1:50; then 0 < eps by A19,XXREAL_0:15; then A21: z - eps < z by XREAL_1:44; 0 <= eps^2 by XREAL_1:63; then A22: 2*z*eps - eps^2 <= 2*z*eps - 0 by XREAL_1:13; eps*(2*z) <= b/(2*z)*(2*z) by A19,XREAL_1:64,XXREAL_0:17; then 2*z*eps <= b by A19,XCMPLX_1:87; then A23: 2*z*eps - eps^2 <= b by A22,XXREAL_0:2; A24: 0 <= z - eps by XREAL_1:48,XXREAL_0:17; a = z^2 - b; then a <= (z - eps)^2 by A20,A23,XREAL_1:13; hence contradiction by A6,A24,A21; end; end; hence contradiction; end; uniqueness by Lm2; end; definition let a be Element of REAL; redefine func sqrt a -> Element of REAL; coherence by XREAL_0:def 1; end; theorem Th17: sqrt 0 = 0 proof sqrt 0^2 = 0 by Def2; hence thesis; end; theorem Th18: sqrt 1 = 1 proof sqrt 1^2 = 1 by Def2; hence thesis; end; Lm3: 0 <= x & x < y implies sqrt x < sqrt y proof assume that A1: 0 <= x and A2: x < y; A3: (sqrt y)^2 = y by A1,A2,Def2; A4: (sqrt x)^2 = x by A1,Def2; 0 <= sqrt y by A1,A2,Def2; hence thesis by A2,A4,A3,Th15; end; theorem 1 < sqrt 2 by Lm3,Th18; Lm4: 2^2 = 2*2; theorem Th20: sqrt 4 = 2 by Def2,Lm4; theorem sqrt 2 < 2 by Lm3,Th20; theorem Th22: 0 <= a implies sqrt a^2 = a by Def2; theorem a <= 0 implies sqrt a^2 = -a proof A1: a^2 = (-a)^2; assume a <= 0; hence thesis by A1,Def2; end; theorem Th24: 0 <= a & sqrt a = 0 implies a = 0 proof 0 <= a & sqrt a = 0 implies a = 0^2 by Def2; hence thesis; end; theorem Th25: 0 < a implies 0 < sqrt a proof assume A1: 0 < a; then sqrt a <> 0^2 by Def2; hence thesis by A1,Def2; end; theorem Th26: 0 <= x & x <= y implies sqrt x <= sqrt y proof per cases; suppose x = y; hence thesis; end; suppose A1: x <> y; assume A2: 0 <= x; assume x <= y; then x < y by A1,XXREAL_0:1; hence thesis by A2,Lm3; end; end; theorem 0 <= x & x < y implies sqrt x < sqrt y by Lm3; theorem Th28: 0 <= x & 0 <= y & sqrt x = sqrt y implies x = y proof assume that A1: 0 <= x and A2: 0 <= y and A3: sqrt x = sqrt y; assume x <> y; then x < y or y < x by XXREAL_0:1; hence contradiction by A1,A2,A3,Lm3; end; theorem Th29: 0 <= a & 0 <= b implies sqrt (a*b) = sqrt a * sqrt b proof assume that A1: 0 <= a and A2: 0 <= b; A3: 0 <= sqrt a by A1,Def2; A4: 0 <= sqrt b by A2,Def2; (sqrt(a*b))^2 = a*b by A1,A2,Def2 .= (sqrt a)^2*b by A1,Def2 .= (sqrt a)^2*(sqrt b)^2 by A2,Def2 .= (sqrt a*sqrt b)^2; hence sqrt(a*b) = sqrt(sqrt a*sqrt b)^2 by A1,A2,Def2 .= sqrt a*sqrt b by A3,A4,Def2; end; theorem Th30: 0 <= a & 0 <= b implies sqrt (a/b) = sqrt a/sqrt b proof assume that A1: 0 <= a and A2: 0 <= b; A3: (sqrt b)^2 = b by A2,Def2; (sqrt a)^2 = a by A1,Def2; then A4: (sqrt a/sqrt b)^2 = a/b by A3,XCMPLX_1:76; A5: 0 <= sqrt b by A2,Def2; 0 <= sqrt a by A1,Def2; hence thesis by A5,A4,Def2; end; theorem for a,b being real number st 0 <= a & 0 <= b holds sqrt(a + b) = 0 iff a = 0 & b = 0 by Th17,Th24; theorem 0 < a implies sqrt (1/a) = 1/sqrt a by Th18,Th30; theorem 0 < a implies sqrt a/a = 1/sqrt a proof assume A1: 0 < a; then sqrt a <> 0^2 by Def2; hence sqrt a/a = (sqrt a)^2/(a*sqrt a) by XCMPLX_1:91 .= (1*a)/(sqrt a*a) by A1,Def2 .= 1/sqrt a by A1,XCMPLX_1:91; end; theorem 0 < a implies a / sqrt a = sqrt a proof assume A1: 0 < a; then sqrt a <> 0^2 by Def2; hence a /sqrt a = (a*sqrt a) /(sqrt a)^2 by XCMPLX_1:91 .= (sqrt a*a) /(1*a) by A1,Def2 .= sqrt a/1 by A1,XCMPLX_1:91 .= sqrt a; end; theorem 0 <= a & 0 <= b implies (sqrt a - sqrt b)*(sqrt a + sqrt b) = a - b proof assume that A1: 0 <= a and A2: 0 <= b; thus (sqrt a - sqrt b)*(sqrt a + sqrt b) = (sqrt a)^2 - (sqrt b)^2 .= a - (sqrt b)^2 by A1,Def2 .= a - b by A2,Def2; end; Lm5: 0 <= a & 0 <= b & a <> b implies (sqrt a)^2-(sqrt b)^2 <> 0 proof assume that A1: 0 <= a and A2: 0 <= b and A3: a <> b; A4: 0 <= sqrt a by A1,Def2; A5: 0 <= sqrt b by A2,Def2; sqrt a <> sqrt b by A1,A2,A3,Th28; hence thesis by A4,A5,Lm2; end; theorem 0 <= a & 0 <= b & a <>b implies 1/(sqrt a+sqrt b) = (sqrt a - sqrt b)/ (a-b) proof assume that A1: 0 <= a and A2: 0 <= b and A3: a <>b; thus 1/(sqrt a+sqrt b) = (sqrt a - sqrt b)/((sqrt a)^2-(sqrt b)^2) by A1,A2 ,A3,Lm5,Th10 .= (sqrt a - sqrt b)/(a-(sqrt b)^2) by A1,Def2 .= (sqrt a - sqrt b)/(a-b) by A2,Def2; end; theorem 0 <= b & b < a implies 1/(sqrt a+sqrt b) = (sqrt a - sqrt b)/(a-b) proof assume that A1: 0 <= b and A2: b < a; thus 1/(sqrt a+sqrt b) = (sqrt a - sqrt b)/((sqrt a)^2-(sqrt b)^2) by A1,A2 ,Lm5,Th10 .= (sqrt a - sqrt b)/(a-(sqrt b)^2) by A1,A2,Def2 .= (sqrt a - sqrt b)/(a-b) by A1,Def2; end; theorem 0 <= a & 0 <= b implies 1/(sqrt a-sqrt b) = (sqrt a + sqrt b)/(a-b) proof assume that A1: 0 <= a and A2: 0 <= b; per cases; suppose a <> b; hence 1/(sqrt a-sqrt b) = (sqrt a + sqrt b)/((sqrt a)^2-(sqrt b)^2) by A1 ,A2,Lm5,Th11 .= (sqrt a + sqrt b)/(a-(sqrt b)^2) by A1,Def2 .= (sqrt a + sqrt b)/(a-b) by A2,Def2; end; suppose A3: a = b; then 1/(sqrt a-sqrt b) = 0; hence thesis by A3; end; end; theorem 0 <= b & b < a implies 1/(sqrt a-sqrt b) = (sqrt a + sqrt b)/(a-b) proof assume that A1: 0 <= b and A2: b < a; thus 1/(sqrt a-sqrt b) = (sqrt a + sqrt b)/((sqrt a)^2-(sqrt b)^2) by A1,A2 ,Lm5,Th11 .= (sqrt a + sqrt b)/(a-(sqrt b)^2) by A1,A2,Def2 .= (sqrt a + sqrt b)/(a-b) by A1,Def2; end; theorem for x,y being complex number st x^2=y^2 holds x=y or x=-y proof let x,y be complex number; assume x^2=y^2; then (x-y)*(x+y)=0; then x-y=0 or x+y=0; hence thesis; end; theorem for x being complex number st x^2=1 holds x=1 or x=-1 proof let x be complex number; assume x^2=1; then (x-1)*(x+1)=0; then x-1=0 or x+1=0; hence thesis; end; theorem 0<=x & x<=1 implies x^2<=x proof assume that A1: 0<=x and A2: x<=1; per cases by A1; suppose 0=x; hence thesis; end; suppose A3: 0 a^2 proof assume that A1: a<=0 and A2: x-a by A2,XREAL_1:24; then (-x)^2>(-a)^2 by A1,Th16; hence thesis; end; theorem -1 >= a implies -a <= a^2 proof assume -1 >= a; then --1<=-a by XREAL_1:24; then -a<= (-a)^2 by XREAL_1:151; hence thesis; end; theorem -1 > a implies -a < a^2 proof assume -1 > a; then --1< -a by XREAL_1:24; then -a< (-a)^2 by Th14; hence thesis; end; theorem b^2 <= a^2 & a >= 0 implies -a <= b & b <= a proof assume that A1: b^2<= a^2 and A2: a>=0; now assume A3: -a>b or b>a; now per cases by A3; case -a>b; then --a<-b by XREAL_1:24; then a^2<(-b)^2 by A2,Th16; hence contradiction by A1; end; case b>a; hence contradiction by A1,A2,Th16; end; end; hence contradiction; end; hence thesis; end; theorem b^2 < a^2 & a >= 0 implies -a < b & b < a proof assume that A1: b^2< a^2 and A2: a>=0; now assume A3: -a>=b or b>=a; now per cases by A3; case -a>=b; then --a<= -b by XREAL_1:24; then a^2<=(-b)^2 by A2,Th15; hence contradiction by A1; end; case b>=a; hence contradiction by A1,A2,Th15; end; end; hence contradiction; end; hence thesis; end; theorem Th49: -a <= b & b <= a implies b^2 <= a^2 proof assume that A1: -a<=b and A2: b<=a; per cases; suppose b>=0; hence thesis by A2,Th15; end; suppose A3: b<0; --a>=-b by A1,XREAL_1:24; then (-b)^2<= a^2 by A3,Th15; hence thesis; end; end; theorem -a < b & b < a implies b^2 < a^2 proof assume that A1: -a=0; hence thesis by A2,Th16; end; suppose A3: b<0; --a>-b by A1,XREAL_1:24; then (-b)^2< a^2 by A3,Th16; hence thesis; end; end; theorem a^2 <= 1 implies -1 <= a & a <= 1 proof assume a^2<=1; then a^2-1^2<=1^2-1^2 by XREAL_1:9; then (a-1)*(a+1)<=0; hence thesis by XREAL_1:93; end; theorem a^2 < 1 implies -1 < a & a < 1 proof assume a^2<1; then a^2-1^2<1^2-1^2 by XREAL_1:9; then (a-1)*(a+1)<0; hence thesis by XREAL_1:94; end; theorem Th53: -1 <= a & a <= 1 & -1 <= b & b <= 1 implies a^2*b^2 <= 1 proof assume that A1: -1<=a and A2: a<=1 and A3: -1<=b and A4: b<=1; A5: 0<=b^2 by XREAL_1:63; a^2<=1^2 by A1,A2,Th49; then A6: a^2*b^2 <= 1*b^2 by A5,XREAL_1:64; b^2<=1^2 by A3,A4,Th49; hence thesis by A6,XXREAL_0:2; end; theorem Th54: a >= 0 & b >= 0 implies a*sqrt(b) = sqrt(a^2*b) proof assume that A1: a>=0 and A2: b>=0; sqrt(a^2)=a by A1,Def2; hence thesis by A1,A2,Th29; end; Lm6: -1<=a & a<=1 & -1<=b & b<=1 implies (1+a^2)*b^2<=1+b^2 proof assume that A1: -1<=a and A2: a<=1 and A3: -1<=b and A4: b<=1; a^2*b^2<=1 by A1,A2,A3,A4,Th53; then 1*b^2+a^2*b^2<=1+b^2 by XREAL_1:7; hence thesis; end; theorem Th55: -1 <= a & a <= 1 & -1 <= b & b <= 1 implies (-b)*sqrt(1+a^2) <= sqrt(1+b^2) & -sqrt(1+b^2) <= b*sqrt(1+a^2) proof assume that A1: -1<=a and A2: a<=1 and A3: -1<=b and A4: b<=1; A5: a^2>=0 by XREAL_1:63; then A6: 1+a^2>=1+0 by XREAL_1:7; b^2>=0 by XREAL_1:63; then A7: sqrt(1+b^2)>=0 by Def2; A8: sqrt(1+a^2)>=0 by A5,Def2; A9: now per cases; suppose b>=0; hence (-b)*sqrt(1+a^2)<=sqrt(1+b^2) by A8,A7; end; suppose A10: b<0; A11: (-b)^2>=0 by XREAL_1:63; (-b)*sqrt(1+a^2)=sqrt((-b)^2*(1+a^2)) by A5,A10,Th54; hence (-b)*sqrt(1+a^2)<=sqrt(1+b^2) by A1,A2,A3,A4,A6,A11,Lm6,Th26; end; end; then -((-b)*sqrt(1+a^2)) >= - sqrt(1+b^2) by XREAL_1:24; hence thesis by A9; end; theorem -1 <= a & a <= 1 & -1 <= b & b <= 1 implies b*sqrt(1+a^2) <= sqrt(1+b^2) proof assume that A1: -1<=a and A2: a<=1 and A3: -1<=b and A4: b<=1; A5: -1<=-b by A4,XREAL_1:24; --1>=-b by A3,XREAL_1:24; then (--b)*sqrt(1+a^2)<=sqrt(1+(-b)^2) by A1,A2,A5,Th55; hence thesis; end; Lm7: b<=0 & a<=b implies a*sqrt(1+b^2)<= b*sqrt(1+a^2) proof assume that A1: b<=0 and A2: a<=b; A3: (-a)*sqrt(1+b^2)=sqrt((-a)^2*(1+b^2)) by A1,A2,Th54; a=0 by XREAL_1:63; A6: a^2>=0 by XREAL_1:63; then (-b)*sqrt(1+a^2)=sqrt((-b)^2*(1+a^2)) by A1,Th54; then -(a*sqrt(1+b^2))>= -(b*sqrt(1+a^2)) by A6,A3,A4,A5,Th26; hence thesis by XREAL_1:24; end; Lm8: for a,b being real number st a<=0 & a<=b holds a*sqrt(1+b^2)<= b*sqrt(1+a ^2) proof let a,b be real number; assume that A1: a<=0 and A2: a<=b; now per cases; case b<=0; hence thesis by A2,Lm7; end; case A3: b>0; (b)^2 >=0 by XREAL_1:63; then sqrt(1+(b)^2)>0 by Th25; then A4: a*sqrt(1+b^2)<=0 by A1; (a)^2 >=0 by XREAL_1:63; then sqrt(1+(a)^2)>0 by Th25; hence thesis by A3,A4; end; end; hence thesis; end; Lm9: for a,b being real number st a>=0 & a>=b holds a*sqrt(1+b^2)>= b*sqrt(1+a ^2) proof let a,b be real number; assume that A1: a>=0 and A2: a>=b; -a <= -b by A2,XREAL_1:24; then (-a)*sqrt(1+(-b)^2)<= (-b)*sqrt(1+(-a)^2) by A1,Lm8; then -(a*sqrt(1+(b)^2))<= -(b*sqrt(1+(a)^2)); hence thesis by XREAL_1:24; end; theorem a >= b implies a*sqrt(1+b^2) >= b*sqrt(1+a^2) proof assume A1: a>=b; per cases; suppose a>=0; hence thesis by A1,Lm9; end; suppose a<0; hence thesis by A1,Lm7; end; end; theorem a >= 0 implies sqrt(a+b^2) >= b proof assume A1: a >= 0; per cases; suppose b < 0; hence thesis by A1,Def2; end; suppose A2: b >= 0; A3: b^2 >= 0 by XREAL_1:63; a+b^2 >= 0+b^2 by A1,XREAL_1:6; then sqrt(a+b^2) >= sqrt(b^2) by A3,Th26; hence sqrt(a+b^2) >= b by A2,Def2; end; end; theorem 0 <= a & 0 <= b implies sqrt(a+b) <= sqrt a + sqrt b proof assume that A1: 0 <= a and A2: 0 <= b; A3: 0 <= sqrt a by A1,Def2; 0 <= sqrt(a*b) by A1,A2,Def2; then 0 <= sqrt a*sqrt b by A1,A2,Th29; then 0 <= 2*(sqrt a*sqrt b); then a + 0 <= a + 2*sqrt a*sqrt b by XREAL_1:6; then A4: a + b <= a + 2*sqrt a*sqrt b + b by XREAL_1:6; A5: 0 <= sqrt b by A2,Def2; sqrt(a + 2*sqrt a*sqrt b + b) = sqrt((sqrt a)^2 + 2*sqrt a*sqrt b + b) by A1,Def2 .= sqrt((sqrt a)^2 + 2*sqrt a*sqrt b + (sqrt b)^2) by A2,Def2 .= sqrt((sqrt a + sqrt b)^2) .= sqrt a + sqrt b by A3,A5,Th22; hence thesis by A1,A2,A4,Th26; end; begin reserve x for Real, p,k,l,m,n,s,h,i,j,k1,t,t1 for Nat, X for Subset of REAL; theorem Th1: for X st 0 in X & for x st x in X holds x + 1 in X for n holds n in X proof let A be Subset of REAL such that A1: 0 in A; assume x in A implies x + 1 in A; then for x being real number st x in A holds x + 1 in A; then A2: NAT c= A by A1,AXIOMS:3; let n; n in NAT by ORDINAL1:def 12; hence thesis by A2; end; registration let n,k be Nat; cluster n + k -> natural; coherence proof defpred P[Real] means ex k st $1 = k & n + k is natural; consider X such that A1: x in X iff P[x] from SUBSET_1:sch 3; A2: now let x; assume x in X; then consider k such that A3: x = k and A4: n + k is natural by A1; A5: (n + k) + 1 = n + (k + 1); reconsider k as Element of NAT by ORDINAL1:def 12; n + k is Element of NAT by A4,ORDINAL1:def 12; then k + 1 is Element of NAT & (n + k) + 1 is Element of NAT by AXIOMS:2 ; hence x + 1 in X by A1,A3,A5; end; n + 0 = n; then 0 in X by A1; then k in X by A2,Th1; then ex m st k = m & n + m is natural by A1; hence thesis; end; end; definition let n be Nat, k be Element of NAT; redefine func n + k -> Element of NAT; coherence by ORDINAL1:def 12; end; definition let n be Element of NAT, k be Nat; redefine func n + k -> Element of NAT; coherence by ORDINAL1:def 12; end; scheme Ind { P[Nat] } : for k being Element of NAT holds P[k] provided A1: P[0] and A2: for k being Element of NAT st P[k] holds P[k + 1] proof let k; defpred P1[Real] means ex k st P[k] & k = $1; consider X such that A3: x in X iff P1[x] from SUBSET_1:sch 3; A4: for x st x in X holds x + 1 in X proof let x; assume x in X; then consider k such that A5: P[k] and A6: k = x by A3; reconsider k as Element of NAT by ORDINAL1:def 12; P[k + 1] by A2,A5; hence thesis by A3,A6; end; 0 in X by A1,A3; then k in X by A4,Th1; then ex n st P[n] & n = k by A3; hence thesis; end; scheme NatInd { P[Nat] } : for k being Nat holds P[k] provided A1: P[0] and A2: for k be Nat st P[k] holds P[k + 1] proof A3: for k be Element of NAT st P[k] holds P[k + 1] by A2; let k be Nat; A4: k is Element of NAT by ORDINAL1:def 12; A5: P[0] by A1; for k be Element of NAT holds P[k] from Ind(A5,A3); hence thesis by A4; end; registration let n,k be Nat; cluster n * k -> natural; coherence proof defpred P[Nat] means n*$1 is natural; A1: for m be Nat holds P[m] implies P[m+1] proof let m be Nat; assume P[m]; then reconsider k = n * m as Nat; k + n is Nat; hence thesis; end; A2: P[0]; for m be Nat holds P[m] from NatInd(A2,A1); hence thesis; end; end; definition let n be Nat, k be Element of NAT; redefine func n * k -> Element of NAT; coherence by ORDINAL1:def 12; end; definition let n be Element of NAT, k be Nat; redefine func n * k -> Element of NAT; coherence by ORDINAL1:def 12; end; theorem Th2: 0 <= i proof defpred P[Nat] means 0 <= $1; A1: for n st P[n] holds P[n+1]; A2: P[0]; for k holds P[k] from NatInd(A2,A1); hence thesis; end; theorem 0 <> i implies 0 < i by Th2; theorem i <= j implies i * h <= j * h proof assume A1: i <= j; 0 <= h by Th2; hence thesis by A1,XREAL_1:64; end; theorem 0 < i + 1 proof assume A1: 0 >= i + 1; 0 <= i by Th2; hence contradiction by A1; end; theorem Th6: i = 0 or ex k st i = k + 1 proof defpred P[Nat] means $1 = 0 or ex k st $1 = k + 1; A1: P[h] implies P[h + 1]; A2: P[0]; for i holds P[i] from NatInd(A2,A1); hence thesis; end; theorem Th7: i + j = 0 implies i = 0 & j = 0 proof assume A1: i + j = 0; 0 <= i & 0 <= j by Th2; hence thesis by A1; end; registration cluster non zero for Nat; existence proof take 1; thus thesis; end; end; registration let m be Nat, n be non zero Nat; cluster m + n -> non zero; coherence by Th7; cluster n + m -> non zero; coherence; end; scheme DefbyInd { N()->Nat, F(Nat,Nat)->Nat, P[Nat,Nat] } : (for k being Nat ex n being Nat st P[k,n]) & for k,n,m being Nat st P[k,n] & P[k,m] holds n = m provided A1: for k,n being Nat holds P[k,n] iff k = 0 & n = N() or ex m,l being Nat st k = m + 1 & P[m,l] & n = F(k,l) proof reconsider N = N() as Element of NAT by ORDINAL1:def 12; defpred P[Nat] means ex n being Nat st P[$1,n]; A2: for k being Nat holds P[k] implies P[k+1] proof let k be Nat; given n being Nat such that A3: P[k,n]; reconsider F = F(k+1,n) as Element of NAT by ORDINAL1:def 12; take F; thus thesis by A1,A3; end; P[0,N] by A1; then A4: P[0]; thus for k being Nat holds P[k] from NatInd(A4,A2); defpred P[Nat] means for n,m being Nat st P[$1,n] & P[$1,m] holds n = m; A5: for k being Nat st P[k] holds P[k+1] proof let k be Nat such that A6: for n,m being Nat st P[k,n] & P[k,m] holds n = m; let n,m be Nat; assume ( P[k+1,n])& P[k+1,m]; then (ex l,u being Nat st k + 1 = l + 1 &( P[l,u])& n = F(k + 1 ,u) )& ex v,w being Nat st k + 1 = v + 1 & P[v,w] & m = F(k + 1,w) by A1; hence thesis by A6; end; A7: P[0] proof let n,m be Nat such that A8: P[0,n] and A9: P[0,m]; not ex m,l being Nat st 0 = m + 1 & P[m,l] & n = F(0,l); then ( not ex n,l being Nat st 0 = n + 1 & P[n,l] & m = F(0,l))& n = N() by A1,A8; hence thesis by A1,A9; end; thus for k being Nat holds P[k] from NatInd(A7,A5); end; theorem Th8: i <= j + 1 implies i <= j or i = j + 1 proof defpred P[Nat] means for j holds $1 <= j + 1 implies $1 <= j or $1 = j+1; A1: for i st P[i] holds P[i+1] proof let i such that A2: for j holds i <= j + 1 implies i <= j or i = j + 1; let j; assume A3: i + 1 <= j + 1; A4: now given k such that A5: j = k + 1; i <= k + 1 by A3,A5,XREAL_1:6; then i <= k or i = k + 1 by A2; hence thesis by A5,XREAL_1:6; end; now A6: 0 <= i by Th2; assume A7: j = 0; then i <= 0 by A3,XREAL_1:6; hence thesis by A7,A6; end; hence thesis by A4,Th6; end; A8: P[0] by Th2; for i holds P[i] from NatInd(A8,A1); hence thesis; end; theorem Th9: i <= j & j <= i + 1 implies i = j or j = i + 1 proof assume that A1: i <= j and A2: j <= i + 1; j <= i or j = i + 1 by A2,Th8; hence thesis by A1,XXREAL_0:1; end; theorem Th10: i <= j implies ex k st j = i + k proof defpred P[Nat] means i <= $1 implies ex k st $1 = i + k; A1: for j st P[j] holds P[j+1] proof let j such that A2: i <= j implies ex k st j = i + k; A3: now assume i <= j; then consider k such that A4: j = i + k by A2; i + k + 1 = i + (k + 1); hence thesis by A4; end; A5: now assume i = j + 1; then j + 1 = i + 0; hence thesis; end; assume i <= j + 1; hence thesis by A3,A5,Th8; end; A6: P[0] proof assume A7: i <= 0; take 0; thus thesis by A7,Th2; end; for j holds P[j] from NatInd(A6,A1); hence thesis; end; theorem Th11: i <= i + j proof 0 + i = i & 0 <= j by Th2; hence thesis by XREAL_1:7; end; scheme CompInd { P[Nat] } : for k being Nat holds P[k] provided A1: for k being Nat st for n being Nat st n < k holds P[n] holds P[k] proof let k be Nat; defpred P1[Nat] means for n being Nat st n < $1 holds P[n]; A2: for k be Nat holds P1[k] implies P1[k+1] proof let k be Nat; assume A3: for n being Nat st n < k holds P[n]; let n be Nat; assume n < k + 1; then n <= k by Th8; then n < k or n = k & n <= k by XXREAL_0:1; hence thesis by A1,A3; end; A4: P1[0] by Th2; for k being Nat holds P1[k] from NatInd(A4,A2); then for n being Nat st n < k holds P[n]; hence thesis by A1; end; scheme Min { P[Nat] } : ex k being Nat st P[k] & for n being Nat st P[n] holds k <= n provided A1: ex k being Nat st P[k] proof defpred P1[Nat] means not P[$1]; assume A2: not thesis; A3: for k being Nat st for n being Nat st n < k holds P1[n] holds P1[k] proof let k be Nat; assume A4: for n being Nat st n < k holds not P[n]; not (ex n being Nat st P[n] & not k <= n) implies not P[k] by A2; hence thesis by A4; end; for k be Nat holds P1[k] from CompInd(A3); hence contradiction by A1; end; scheme Max { P[Nat], N()->Nat } : ex k being Nat st P[k] & for n being Nat st P[n] holds n <= k provided A1: for k being Nat st P[k] holds k <= N() and A2: ex k being Nat st P[k] proof defpred P1[Nat] means for n being Nat st P[n] holds n <= $1; A3: ex k being Nat st P1[k] by A1; consider k being Nat such that A4: P1[k] and A5: for m being Nat st P1[m] holds k <= m from Min(A3); take k; thus P[k] proof consider n being Nat such that A6: P[n] by A2; A7: n <= k by A4,A6; assume A8: not P[k]; then n <> k by A6; then k <> 0 by A7,Th2; then consider m such that A9: k = m + 1 by Th6; for n being Nat st P[n] holds n <= m by A4,A8,A9,Th8; then A10: k <= m by A5; -m + m + 1 = -m + (m + 1); hence contradiction by A9,A10,XREAL_1:6; end; thus thesis by A4; end; theorem Th12: i <= j implies i <= j + h proof assume i <= j; then A1: i + h <= j + h by XREAL_1:7; 0 <= h by Th2; then i + 0 <= i + h by XREAL_1:7; hence thesis by A1,XXREAL_0:2; end; theorem Th13: i < j + 1 iff i <= j proof thus i < j + 1 implies i <= j by Th8; assume A1: i <= j; A2: now A3: j + (- j) = 0 & j + 1 + (- j) = 1; assume i = j + 1; hence contradiction by A1,A3,XREAL_1:6; end; i <= j + 1 by A1,Th12; hence thesis by A2,XXREAL_0:1; end; theorem Th14: j < 1 implies j = 0 proof assume j < 1; then j < 0 + 1; then A1: j <= 0 by Th13; assume j <> 0; hence thesis by A1,Th2; end; theorem i * j = 1 implies i = 1 proof assume A1: i * j = 1; then i <> 0; then consider m such that A2: i = m + 1 by Th6; j <> 0 by A1; then consider l such that A3: j = l + 1 by Th6; A4: m * l + m + l + 1 = 0 + 1 by A1,A2,A3; then m * l + m = 0; hence thesis by A2,A4; end; theorem Th16: k <> 0 implies n < n + k proof assume k <> 0; then A1: n <> n + k; n <= n + k by Th12; hence thesis by A1,XXREAL_0:1; end; scheme Regr { P[Nat] } : P[0] provided A1: ex k being Nat st P[k] and A2: for k being Nat st k <> 0 & P[k] ex n being Nat st n < k & P[n] proof consider k being Nat such that A3: P[k] & for n being Nat st P[n] holds k <= n from Min(A1); now assume k <> 0; then ex n being Nat st n < k & P[n] by A2,A3; hence contradiction by A3; end; hence thesis by A3; end; theorem 0 < m implies for n ex k,t st n = (m*k)+t & t < m proof defpred P[Nat] means ex k,t st $1 = (m*k)+t & t < m; assume A1: 0 < m; A2: for n st P[n] holds P[n+1] proof let n; given k1,t1 such that A3: n = (m*k1)+t1 and A4: t1 < m; A5: t1+1 < m implies ex k,t st n+1 = (m*k)+t & t < m proof assume A6: t1+1 < m; take k = k1, t = t1+1; thus n+1 = m*k+t by A3; thus thesis by A6; end; A7: t1+1 = m implies ex k,t st n+1 = (m*k)+t & t < m proof assume A8: t1+1 = m; take k = k1+1 , t = 0; thus n+1 = m*k+t by A3,A8; thus thesis by A1; end; t1+1 <= m by A4,Th13; hence thesis by A5,A7,XXREAL_0:1; end; 0 = m*0+0; then A9: P[0] by A1; thus for n holds P[n] from NatInd(A9,A2); end; theorem n = m*k+t & t < m & n = m*k1+t1 & t1 < m implies k = k1 & t = t1 proof assume that A1: n = m*k+t and A2: t < m and A3: n = m*k1+t1 and A4: t1 < m; A5: now assume k1 <= k; then consider u being Nat such that A6: k = k1 + u by Th10; m * (k1 + u) + t = m * k1 + (m * u + t); then A7: m * u + t = t1 by A1,A3,A6,XCMPLX_1:2; now given w being Nat such that A8: u = w + 1; m * u + t = m + (m * w + t) by A8; hence contradiction by A4,A7,Th11; end; then A9: u = 0 by Th6; hence k = k1 by A6; thus t = t1 by A1,A3,A6,A9,XCMPLX_1:2; end; now assume k <= k1; then consider u being Nat such that A10: k1 = k + u by Th10; m * (k + u) + t1 = m * k + (m * u + t1); then A11: m * u + t1 = t by A1,A3,A10,XCMPLX_1:2; now given w being Nat such that A12: u = w + 1; m * u + t1 = m + (m * w + t1) by A12; hence contradiction by A2,A11,Th11; end; then A13: u = 0 by Th6; hence k = k1 by A10; thus t = t1 by A1,A3,A10,A13,XCMPLX_1:2; end; hence thesis by A5; end; registration cluster -> ordinal for Nat; coherence; end; registration cluster non empty ordinal for Subset of REAL; existence proof take NAT; thus thesis; end; end; theorem k < k + n iff 1 <= n proof thus k < k + n implies 1 <= n proof assume A1: k < k + n; assume not 1 <= n; then n = 0 by Th14; hence thesis by A1; end; assume 1 <= n; hence thesis by Th16; end; theorem k < n implies n - 1 is Element of NAT proof assume k < n; then k + 1 <= n by Th13; then consider j being Nat such that A1: n = k + 1 + j by Th10; n - 1 = k + j by A1; hence thesis by ORDINAL1:def 12; end; theorem k <= n implies n - k is Element of NAT proof assume A1: k <= n; per cases by A1,XXREAL_0:1; suppose k < n; then k + 1 <= n by Th13; then consider j being Nat such that A2: n = k + 1 + j by Th10; reconsider j as Element of NAT by ORDINAL1:def 12; n - k = 1 + j by A2; hence thesis; end; suppose k = n; then n - k = 0; hence thesis; end; end; begin theorem Th22: m < n+1 implies m < n or m = n proof assume m non negative for Element of NAT; coherence by Th2; end; registration cluster -> non negative for Nat; coherence by Th2; end; theorem i <> 0 & h = j*i implies j <= h proof assume i<>0; then consider k such that A1: i = k+1 by Th6; assume h=j*i; then h=j*k+j*1 by A1; hence thesis by Th11; end; scheme Ind1{M() -> Nat, P[Nat]} : for i being Nat st M() <= i holds P[i] provided A1: P[M()] and A2: for j being Nat st M() <= j holds P[j] implies P[j+1] proof reconsider M = M() as Element of NAT by ORDINAL1:def 12; defpred Q[Nat] means P[M() + $1]; A3: now let m be Element of NAT; assume Q[m]; then P[M+m+1] by A2,Th11; hence Q[m+1]; end; let i; assume M() <= i; then consider m being Nat such that A4: i = M() + m by Th10; A5: Q[0] by A1; A6: for m being Element of NAT holds Q[m] from Ind(A5,A3); m in NAT by ORDINAL1:def 12; hence thesis by A6,A4; end; scheme CompInd1 { a() -> Nat, P[Nat] } : for k being Nat st k >= a() holds P[k] provided A1: for k being Nat st k>=a() & (for n being Nat st n>=a() & n=a() & n<$1) holds P[n]; A2: for k being Nat st k>=a() holds P1[k] implies P1[k+1] proof let k be Nat; assume k>=a(); assume A3: for n being Nat st n>=a() & n=a() and A5: n=a(); A7: P1[a()]; for k being Nat st k>=a() holds P1[k] from Ind1(A7,A2); then for n being Nat st n>=a() & n Element of NAT means :Def1: it in A & for k st k in A holds it <= k if A is non empty Subset of NAT otherwise it = 0; existence proof A is non empty Subset of NAT implies ex i st i in A & for k be Nat st k in A holds i <= k proof defpred P[Nat] means $1 in A; set x = the Element of A; assume A1: A is non empty Subset of NAT; then x is Element of NAT by TARSKI:def 3; then A2: ex k be Nat st P[k] by A1; ex k be Nat st P[k] & for i be Nat st P[i] holds k <= i from Min( A2 ); hence thesis; end; hence thesis; end; uniqueness proof let i,n be Element of NAT; A is non empty Subset of NAT & (i in A & for k st k in A holds i <= k) & (n in A & for k st k in A holds n <= k) implies i = n proof assume that A is non empty Subset of NAT and A3: i in A & ( for k st k in A holds i <= k)& n in A & for k st k in A holds n <= k; i <= n & n <= i by A3; hence thesis by XXREAL_0:1; end; hence thesis; end; consistency; end; reserve x,X,Y,Z for set; theorem Th38: for n being Nat holds succ n = n + 1 proof let n be Nat; A1: n+1 = {L where L is Element of NAT: L < n+1} by AXIOMS:4; A2: n = {K where K is Element of NAT: K < n} by AXIOMS:4; thus succ n c= n+1 proof let x such that A3: x in succ n; per cases by A3,ORDINAL1:8; suppose x in n; then consider K being Element of NAT such that A4: x = K and A5: K < n by A2; K < n+1 by A5,Th13; hence thesis by A1,A4; end; suppose A6: x = n; reconsider n as Element of NAT by ORDINAL1:def 12; n < n+1 by Th13; hence thesis by A1,A6; end; end; let x; assume x in n+1; then consider K being Element of NAT such that A7: x = K and A8: K < n+1 by A1; K <= n by A8,Th13; then K = n or K < n by XXREAL_0:1; then x = n or x in n by A2,A7; hence thesis by ORDINAL1:8; end; theorem Th39: n <= m iff n c= m proof defpred P[Nat] means for m holds $1 <= m iff $1 c= m; A1: for n st P[n] holds P[n+1] proof let n such that A2: P[n]; let m; thus n+1 <= m implies (n+1) c= m proof assume n+1 <= m; then consider k being Nat such that A3: m = n+1+k by Th10; reconsider k as Element of NAT by ORDINAL1:def 12; n <= n+k by Th11; then n c= (n+k) by A2; then A4: succ n c= succ (n+k) by ORDINAL2:1; (n+k+1) = succ (n+k) by Th38; hence thesis by A3,A4,Th38; end; assume A5: (n+1) c= m; (n+1) = succ n by Th38; then A6: n in m by A5,ORDINAL1:21; then n c= m by ORDINAL1:def 2; then A7: n <= m by A2; n <> m by A6; then n < m by A7,XXREAL_0:1; hence thesis by Th13; end; A8: P[0]; for n holds P[n] from NatInd(A8,A1); hence thesis; end; theorem Th40: card n c= card m iff n <= m proof reconsider n,m as Element of NAT by ORDINAL1:def 12; card n = n & card m = m by CARD_1:def 2; hence thesis by Th39; end; theorem Th41: card n in card m iff n < m proof A1: n <= m & n <> m iff n < m by XXREAL_0:1; card n c< card m iff card n c= card m & card n <> card m by XBOOLE_0:def 8; hence thesis by A1,Th40,ORDINAL1:11,def 2; end; reserve M,N for Cardinal; theorem nextcard card n = card(n+1) proof reconsider n as Element of NAT by ORDINAL1:def 12; A1: for M st card card n in M holds card(n+1) c= M proof A2: card n = n by CARD_1:def 2; let M; assume card card n in M; then A3: succ n c= M by A2,ORDINAL1:21; (n+1) = succ n by Th38; hence thesis by A3,CARD_1:def 2; end; n < n+1 by Th13; then card card n in card(n+1) by Th41; hence thesis by A1,CARD_1:def 3; end; definition let n be Nat; redefine func succ n equals n+1; compatibility by Th38; end; theorem for X,Y being finite set holds X c= Y implies card X <= card Y proof let X,Y be finite set; assume X c= Y; then card X c= card Y by CARD_1:11; hence thesis by Th39; end; reserve l for Element of NAT; theorem k in n iff k < n proof hereby assume k in n; then k in { l : l < n } by AXIOMS:4; then ex l st k = l & l < n; hence k < n; end; assume A1: k < n; reconsider k as Element of NAT by ORDINAL1:def 12; k in { l : l < n } by A1; hence thesis by AXIOMS:4; end; theorem n in n+1 proof reconsider n as Element of NAT by ORDINAL1:def 12; n set,G(set,set) -> set}: ex f being Function st dom f = NAT & f.0 = A() & for n being Nat holds f.(n+1) = G(n,f.n) proof deffunc D(set,set) = {}; consider L being T-Sequence such that A1: dom L = NAT and A2: {} in NAT implies L.{} = A() and A3: for A being Ordinal st succ A in NAT holds L.(succ A) = G(A,L.A) and for A being Ordinal st A in NAT & A <> {} & A is limit_ordinal holds L.A = D(A,L|A) from ORDINAL2:sch 5; take L; thus dom L = NAT by A1; thus L.0 = A() by A2; let n be Nat; succ n in NAT; hence thesis by A3; end; scheme LambdaRecExD{D() -> non empty set, A() -> Element of D(), G(set,set) -> Element of D()}: ex f being Function of NAT,D() st f.0 = A() & for n being Nat holds f.(n+1) = G(n,f.n) proof consider f being Function such that A1: dom f = NAT and A2: f.0 = A() and A3: for n being Nat holds f.(n+1) = G(n,f.n) from LambdaRecEx; for x being set st x in NAT holds f.x in D() proof let x be set; assume x in NAT; then reconsider n = x as Nat; per cases by Th6; suppose n = 0; hence thesis by A2; end; suppose ex k st n = k + 1; then consider k such that A4: n = k+1; f.n = G(k,f.k) by A3,A4; hence thesis; end; end; then reconsider f as Function of NAT,D() by A1,FUNCT_2:3; take f; thus thesis by A2,A3; end; scheme RecUn{A() -> set, F, G() -> Function, P[set,set,set]}: F() = G() provided A1: dom F() = NAT and A2: F().0 = A() and A3: for n holds P[n,F().n,F().(n+1)] and A4: dom G() = NAT and A5: G().0 = A() and A6: for n holds P[n,G().n,G().(n+1)] and A7: for n for x,y1,y2 being set st P[n,x,y1] & P[n,x,y2] holds y1 = y2 proof defpred P[Nat] means F().$1 = G().$1; A8: for n st P[n] holds P[n+1] proof let n; assume F().n = G().n; then A9: P[n,F().n,G().(n+1)] by A6; P[n,F().n,F().(n+1)] by A3; hence thesis by A7,A9; end; A10: P[0] by A2,A5; for n holds P[n] from NatInd(A10,A8); then for x st x in NAT holds F().x = G().x; hence thesis by A1,A4,FUNCT_1:2; end; scheme RecUnD{D() -> non empty set,A() -> Element of D(), P[set,set,set], F, G() -> Function of NAT,D()} : F() = G() provided A1: F().0 = A() and A2: for n holds P[n,F().n,F().(n+1)] and A3: G().0 = A() and A4: for n holds P[n,G().n,G().(n+1)] and A5: for n being Nat,x,y1,y2 being Element of D() st P[n,x,y1] & P[n,x,y2 ] holds y1=y2 proof defpred Q[Nat] means F().$1 <> G().$1; A6: dom F() = NAT & dom G() = NAT by FUNCT_2:def 1; assume F() <> G(); then ex x st x in NAT & F().x <> G().x by A6,FUNCT_1:2; then A7: ex k be Nat st Q[k]; consider m be Nat such that A8: Q[m] & for n be Nat st Q[n] holds m <= n from Min(A7); now assume m<>0; then consider k being Nat such that A9: m=k+1 by Th6; reconsider k as Element of NAT by ORDINAL1:def 12; k < m by A9,Th13; then A10: F().k = G().k by A8; ( P[k,F().k,F().(k+1)])& P[k,G().k,G().(k+1)] by A2,A4; hence contradiction by A5,A8,A9,A10; end; hence contradiction by A1,A3,A8; end; scheme LambdaRecUn{A() -> set, RecFun(set,set) -> set, F, G() -> Function}: F() = G () provided A1: dom F() = NAT and A2: F().0 = A() and A3: for n holds F().(n+1) = RecFun(n,F().n) and A4: dom G() = NAT and A5: G().0 = A() and A6: for n holds G().(n+1) = RecFun(n,G().n) proof defpred P[Nat,set,set] means $3=RecFun($1,$2); A7: for n holds P[n,G().n,G().(n+1)] by A6; A8: for n being Nat,x,y1,y2 being set st P[n,x,y1] & P[n,x,y2] holds y1=y2; A9: for n holds P[n,F().n,F().(n+1)] by A3; thus F() = G() from RecUn(A1,A2,A9,A4,A5,A7,A8); end; scheme LambdaRecUnD{D() -> non empty set,A() -> Element of D(), RecFun(set,set) -> Element of D(), F, G() -> Function of NAT,D()}: F() = G() provided A1: F().0 = A() and A2: for n holds F().(n+1) = RecFun(n,F().n) and A3: G().0 = A() and A4: for n holds G().(n+1) = RecFun(n,G().n) proof defpred P[Nat,set,set] means $3=RecFun($1,$2); A5: for n holds P[n,G().n,G().(n+1)] by A4; A6: for n being Nat,x,y1,y2 being Element of D() st P[n,x,y1] & P[n,x,y2] holds y1=y2; A7: for n holds P[n,F().n,F().(n+1)] by A2; thus F() = G() from RecUnD(A1,A7,A3,A5,A6); end; registration let x,y be Nat; cluster min(x,y) -> natural; coherence by XXREAL_0:15; cluster max(x,y) -> natural; coherence by XXREAL_0:16; end; definition let x,y be Element of NAT; redefine func min(x,y) -> Element of NAT; coherence by XXREAL_0:15; redefine func max(x,y) -> Element of NAT; coherence by XXREAL_0:16; end; scheme MinIndex { F(Nat)->Nat} : ex k st F(k)=0 & for n st F(n)=0 holds k <= n provided A1: for k holds (F(k+1) < F(k) or F(k) = 0) proof defpred X[Nat] means F($1)=0; defpred P[Nat] means ex n being Nat st $1 = F(n); A2: for k be Nat st k <> 0 & P[k] ex m be Nat st m < k & P[m] proof let k be Nat; assume that A3: k <> 0 and A4: P[k]; consider n being Nat such that A5: k = F(n) by A4; take F(n + 1); thus thesis by A1,A3,A5; end; F(0) is Nat; then A6: ex k be Nat st P[k]; P[0] from Regr(A6,A2); then A7: ex k be Nat st X[k]; consider k be Nat such that A8: ( X[k])& for n be Nat st X[n] holds k <= n from Min(A7); take k; thus thesis by A8; end; definition let D be set, f be Function of NAT,D; let n be Nat; redefine func f.n -> Element of D; coherence proof reconsider n as Element of NAT by ORDINAL1:def 12; f.n is Element of D; hence thesis; end; end; definition let X be set; mode sequence of X is Function of NAT, X; end; definition let s be ManySortedSet of NAT, k be Nat; func s ^\ k -> ManySortedSet of NAT means :Def3: for n being Nat holds it.n=s.(n+k); existence proof defpred P[set,set] means ex n being Element of NAT st n=$1 & $2=s.(n+k); A1: for i being set st i in NAT ex j being set st P[i,j] proof let i be set; assume i in NAT; then reconsider n=i as Element of NAT; take j = s.(n+k); thus P[i,j]; end; consider f being ManySortedSet of NAT such that A2: for i being set st i in NAT holds P[i,f.i] from PBOOLE:sch 3(A1); take f; let n be Nat; n in NAT by ORDINAL1:def 12; then P[n,f.n] by A2; hence thesis; end; uniqueness proof let s1,s2 be ManySortedSet of NAT; assume that A3: for n holds s1.n=s.(n+k) and A4: for n holds s2.n=s.(n+k); now let n be set; assume n in NAT; then reconsider nn = n as Element of NAT; thus s1.n=s.(nn+k) by A3 .=s2.n by A4; end; hence s1=s2 by PBOOLE:3; end; end; Lm1: for s be ManySortedSet of NAT, k be Nat holds rng(s ^\ k) c= rng s proof let s be ManySortedSet of NAT, k be Nat; let i be set; assume i in rng(s ^\ k); then consider u being set such that A1: u in dom(s ^\ k) and A2: i = (s ^\ k).u by FUNCT_1:def 3; reconsider n = u as Element of NAT by A1,PARTFUN1:def 2; A3: dom s = NAT by PARTFUN1:def 2; i = s.(n+k) by A2,Def3; hence i in rng s by A3,FUNCT_1:3; end; registration let X be non empty set, s be X-valued ManySortedSet of NAT, k be Nat; cluster s ^\ k -> X-valued; coherence proof A1: rng(s ^\ k) c= rng s by Lm1; rng s c= X by RELAT_1:def 19; hence rng(s ^\ k) c= X by A1,XBOOLE_1:1; end; end; definition let X be non empty set, s be sequence of X, k be Nat; redefine func s ^\ k -> sequence of X; coherence proof rng(s ^\ k) c= X & dom(s ^\ k) = NAT by PARTFUN1:def 2,RELAT_1:def 19; hence s ^\ k is sequence of X by RELSET_1:4; end; end; reserve X for non empty set, s for sequence of X, k,m for Nat; theorem s^\0 =s proof now let n be Element of NAT; thus (s ^\0).n=s.(n+0) by Def3 .=s.n; end; hence thesis by FUNCT_2:63; end; theorem Th48: s ^\k^\m = s^\(k+m) proof now let n be Element of NAT; thus (s ^\k^\m).n=(s ^\k).(n+m) by Def3 .=s.(n+m+k) by Def3 .=s.(n+(k+m)) .=(s ^\(k+m)).n by Def3; end; hence thesis by FUNCT_2:63; end; theorem s^\k^\m = s^\m^\k proof thus s^\k^\m = s^\(k+m) by Th48 .= s^\m^\k by Th48; end; registration let N be sequence of NAT; let X,s; cluster s * N -> Function-like NAT-defined X-valued; coherence; end; registration let N be sequence of NAT; let X,s; cluster s * N -> total; coherence; end; theorem for N being sequence of NAT holds (s * N) ^\k = s * (N ^\k) proof let N be sequence of NAT; now let n be Element of NAT; thus ((s * N) ^\k).n = (s * N).(n + k) by Def3 .= s.(N.(n + k)) by FUNCT_2:15 .= s.((N ^\k).n) by Def3 .= (s * (N ^\k)).n by FUNCT_2:15; end; hence thesis by FUNCT_2:63; end; theorem s.n in rng s proof n in NAT by ORDINAL1:def 12; then n in dom s by FUNCT_2:def 1; hence thesis by FUNCT_1:3; end; theorem (for n holds s.n in Y) implies rng s c= Y proof assume A1: for n holds s.n in Y; let y be set; assume y in rng s; then consider x such that A2: x in dom s and A3: y = s.x by FUNCT_1:def 3; x in NAT by A2,FUNCT_2:def 1; hence thesis by A1,A3; end; theorem for n being Nat holds n is non zero implies n = 1 or n > 1 proof let n be Nat; assume n is non zero; then 0+1 <= n by Th13; hence n = 1 or n > 1 by XXREAL_0:1; end; theorem succ n = {l : l <= n} proof defpred P[Nat] means $1 <= n; defpred Q[Nat] means $1 < n+1; deffunc F(Nat) = $1; A1: for l holds Q[l] iff P[l] by Th13; thus succ n = n+1 .= {F(l) : Q[l]} by AXIOMS:4 .= {F(l) : P[l]} from FRAENKEL:sch 3(A1); end; scheme MinPred { F(Element of NAT) -> Element of NAT, P[set]} : ex k be Element of NAT st P[k] & for n be Element of NAT st P[n] holds k <= n provided A1: for k be Element of NAT holds F(k+1) < F(k) or P[k] proof now consider f being Function of NAT, NAT such that A2: for k be Element of NAT holds f.k = F(k) from FUNCT_2:sch 4; A3: f.0 in rng f by FUNCT_2:4; rng f c= NAT proof let x be set; assume x in rng f; then consider y being set such that A4: y in dom f & x = f.y by FUNCT_1:def 3; reconsider y1 = y as Element of NAT by A4,FUNCT_2:def 1; x = F(y1) by A4,A2; hence thesis; end; then reconsider rf = rng f as non empty Subset of NAT by A3; set m = min* rf; m in rf by Def1; then consider x being set such that A5: x in dom f and A6: m = f.x by FUNCT_1:def 3; reconsider x as Element of NAT by A5,FUNCT_2:def 1; f.x = F(x) & f.(x+1) = F(x+1) by A2; then A7: f.(x+1) < f.x or P[x] by A1; assume A8: for k holds not P[k]; f.(x+1) in rf by FUNCT_2:4; hence contradiction by Def1,A8,A6,A7; end; then A9: ex k be Nat st P[k]; consider k be Nat such that A10: P[k] and A11: for n be Nat st P[n] holds k <= n from Min(A9); k in NAT & for n be Element of NAT st P[n] holds k <= n by A11,ORDINAL1:def 12; hence thesis by A10; end; registration let k be Ordinal, x be set; cluster k --> x -> T-Sequence-like; coherence proof dom(k --> x) = k by FUNCOP_1:13; hence thesis by ORDINAL1:def 7; end; end; theorem for s be ManySortedSet of NAT, k be Nat holds rng(s ^\ k) c= rng s by Lm1; theorem Th56: for n,m st n<=m & m<=n+2 holds m=n or m=n+1 or m=n+2 proof let n,m; assume that A1: n<=m and A2: m<=n+2; per cases; suppose m<=n+1; hence thesis by A1,Th9; end; suppose m>n+1; then m=n+1 or m=n+1+1 by A2,Th9; hence thesis; end; end; theorem Th57: for n,m st n<=m & m<=n+3 holds m=n or m=n+1 or m=n+2 or m=n+3 proof let n,m; assume that A1: n<=m and A2: m<=n+3; per cases; suppose m<=n+2; hence thesis by A1,Th56; end; suppose m>n+2; then m=n+2 or m=n+2+1 by A2,Th9; hence thesis; end; end; theorem for n,m st n<=m & m<=n+4 holds m=n or m=n+1 or m=n+2 or m=n+3 or m=n+4 proof let n,m; assume that A1: n<=m and A2: m<=n+4; per cases; suppose m<=n+3; hence thesis by A1,Th57; end; suppose m>n+3; then m=n+3 or m=n+3+1 by A2,Th9; hence thesis; end; end; theorem for X being finite set st 1 < card X holds ex x1,x2 being set st x1 in X & x2 in X & x1 <> x2 proof let X be finite set; set x1 = choose X; assume A1: 1 < card X; then X <> {}; then A2: x1 in X; now assume A3: for x2 being set st x2 in X holds x2 = x1; now let x be set; hereby assume x in X; then x = x1 by A3; hence x in {x1} by TARSKI:def 1; end; assume x in {x1}; hence x in X by A2,TARSKI:def 1; end; then X = {x1} by TARSKI:1; hence contradiction by A1,CARD_1:30; end; hence thesis; end; theorem n <= 14 implies n = 0 or n = 1 or n = 2 or n = 3 or n = 4 or n = 5 or n = 6 or n = 7 or n = 8 or n = 9 or n = 10 or n = 11 or n = 12 or n = 13 or n = 14 proof assume n <= 14; then n <= 13+1; hence thesis by Th8,Th37; end; begin reserve X,x,y,z for set, k,l,n for Element of NAT, r for real number; Lm1: z in [:{0},NAT:] \ {[0,0]} implies ex k st z = -k proof A1: [:{0},NAT:] c= [:{0},REAL+:] by ARYTM_2:2,ZFMISC_1:95; assume A2: z in [:{0},NAT:] \ {[0,0]}; then A3: not z in {[0,0]} by XBOOLE_0:def 5; z in NAT \/ [:{0},NAT:] by A2,XBOOLE_0:def 3; then z in INT by A3,NUMBERS:def 4,XBOOLE_0:def 5; then reconsider z9 = z as Element of REAL by NUMBERS:15; consider x,y such that x in {0} and A4: y in NAT and A5: z = [x,y] by A2,ZFMISC_1:84; reconsider y as Element of NAT by A4; z in [:{0},NAT:] by A2; then consider x9,y9 being Element of REAL+ such that A6: z9 = [0,x9] and A7: y = y9 and A8: +(z9,y) = y9 - x9 by A4,A1,ARYTM_0:def 1,ARYTM_2:2; x9 = y9 by A5,A6,A7,XTUPLE_0:1; then A9: y9 - x9 = 0 by ARYTM_1:18; take y; consider x1,x2,y1,y2 being Element of REAL such that A10: z9 = [*x1,x2*] and A11: y = [*y1,y2*] and A12: z9 + y = [*+(x1,y1),+(x2,y2)*] by XCMPLX_0:def 4; A13: x2 = 0 by A10,ARYTM_0:24; then A14: +(x2,y2) = 0 by A11,ARYTM_0:11,24; y2 = 0 by A11,ARYTM_0:24; then A15: y = y1 by A11,ARYTM_0:def 5; z9 = x1 by A10,A13,ARYTM_0:def 5; then z9 + y = 0 by A12,A15,A8,A9,A14,ARYTM_0:def 5; hence thesis; end; Lm2: for k st x = -k & k <> x holds x in [:{0},NAT:] \ {[0,0]} proof let k such that A1: x = -k and A2: k <> x; reconsider r = x as Element of REAL by A1; r + k = 0 by A1; then consider x1,x2,y1,y2 being Element of REAL such that A3: r = [*x1,x2*] and A4: k = [*y1,y2*] and A5: 0 = [*+(x1,y1),+(x2,y2)*] by XCMPLX_0:def 4; A6: y2 = 0 by A4,ARYTM_0:24; then A7: y1 = k by A4,ARYTM_0:def 5; +(x2,y2) = 0 by A5,ARYTM_0:24; then A8: +(x1,y1) = 0 by A5,ARYTM_0:def 5; A9: k in omega; A10: now assume x1 in REAL+; then consider x9,y9 being Element of REAL+ such that A11: x1 = x9 and A12: y1 = y9 and A13: 0 = x9 + y9 by A9,A7,A8,ARYTM_0:def 1,ARYTM_2:2; A14: y9 = 0 by A13,ARYTM_2:5; x9 = 0 by A13,ARYTM_2:5; hence contradiction by A2,A3,A4,A6,A11,A12,A14,ARYTM_0:24; end; x2 = 0 by A3,ARYTM_0:24; then A15: x1 = r by A3,ARYTM_0:def 5; r in REAL+ \/ [:{0},REAL+:] by NUMBERS:def 1,XBOOLE_0:def 5; then x in [:{0},REAL+:] by A15,A10,XBOOLE_0:def 3; then consider x9,y9 being Element of REAL+ such that A16: x1 = [0,x9] and A17: y1 = y9 and A18: 0 = y9 - x9 by A9,A15,A7,A8,ARYTM_0:def 1,ARYTM_2:2; A19: 0 in {0} by TARSKI:def 1; A20: not r in {[0,0]} by NUMBERS:def 1,XBOOLE_0:def 5; x9 = y9 by A18,ARYTM_0:6; then x in [:{0},NAT:] by A15,A7,A16,A17,A19,ZFMISC_1:87; hence thesis by A20,XBOOLE_0:def 5; end; definition redefine func INT means :Def1: x in it iff ex k st x = k or x = - k; compatibility proof let I be set; thus I = INT implies for x holds x in I iff ex k st x = k or x = - k proof assume A1: I = INT; let x; thus x in I implies ex k st x = k or x = - k proof assume A2: x in I; then A3: not x in {[0,0]} by A1,NUMBERS:def 4,XBOOLE_0:def 5; per cases by A1,A2,NUMBERS:def 4,XBOOLE_0:def 3; suppose x in NAT; hence thesis; end; suppose x in [:{0},NAT:]; then x in [:{0},NAT:] \ {[0,0]} by A3,XBOOLE_0:def 5; hence thesis by Lm1; end; end; given k such that A4: x = k or x = - k; per cases by A4; suppose A5: x = k; then A6: not x in {[0,0]} by NUMBERS:def 1,XBOOLE_0:def 5; x in NAT \/ [:{0},NAT:] by A5,XBOOLE_0:def 3; hence thesis by A1,A6,NUMBERS:def 4,XBOOLE_0:def 5; end; suppose x = -k & k <> x; then A7: x in [:{0},NAT:] \ {[0,0]} by Lm2; then A8: not x in {[0,0]} by XBOOLE_0:def 5; x in NAT \/ [:{0},NAT:] by A7,XBOOLE_0:def 3; hence thesis by A1,A8,NUMBERS:def 4,XBOOLE_0:def 5; end; end; assume A9: for x holds x in I iff ex k st x = k or x = - k; thus I c= INT proof let x; assume x in I; then consider k such that A10: x = k or x = - k by A9; per cases by A10; suppose A11: x = k; then A12: not x in {[0,0]} by NUMBERS:def 1,XBOOLE_0:def 5; x in NAT \/ [:{0},NAT:] by A11,XBOOLE_0:def 3; hence thesis by A12,NUMBERS:def 4,XBOOLE_0:def 5; end; suppose x = -k & k <> x; then A13: x in [:{0},NAT:] \ {[0,0]} by Lm2; then A14: not x in {[0,0]} by XBOOLE_0:def 5; x in NAT \/ [:{0},NAT:] by A13,XBOOLE_0:def 3; hence thesis by A14,NUMBERS:def 4,XBOOLE_0:def 5; end; end; let x; assume A15: x in INT; then A16: not x in {[0,0]} by NUMBERS:def 4,XBOOLE_0:def 5; per cases by A15,NUMBERS:def 4,XBOOLE_0:def 3; suppose x in NAT; hence thesis by A9; end; suppose x in [:{0},NAT:]; then x in [:{0},NAT:] \ {[0,0]} by A16,XBOOLE_0:def 5; then ex k st x = k or x = - k by Lm1; hence thesis by A9; end; end; end; definition let i be number; attr i is integer means :Def2: i in INT; end; registration cluster integer for Real; existence proof take 0; thus 0 in INT by Def1; end; cluster integer for number; existence proof take 0; thus 0 in INT by Def1; end; cluster -> integer for Element of INT; coherence by Def2; end; definition mode Integer is integer number; end; theorem Th1: for k being Nat st r = k or r = -k holds r is Integer proof let k be Nat; assume A1: r = k or r = -k; k in NAT by ORDINAL1:def 12; then r in INT by A1,Def1; hence thesis; end; theorem Th2: r is Integer implies ex k st r = k or r = - k proof assume r is Integer; then r is Element of INT by Def2; hence thesis by Def1; end; registration cluster natural -> integer for number; coherence by Th1; end; Lm3: x in INT implies x in REAL by NUMBERS:15; registration cluster integer -> real for number; coherence proof let n be number; assume n is integer; then n is Element of INT by Def2; then reconsider n as Element of REAL by Lm3; n is real; hence thesis; end; end; reserve i,i0,i1,i2,i3,i4,i5,i8,i9,j for Integer; registration let i1,i2 be Integer; cluster i1 + i2 -> integer; coherence proof consider l such that A1: i2 = l or i2 = - l by Th2; consider k such that A2: i1 = k or i1 = - k by Th2; A3: now A4: now assume l - k <= 0; then l <= 0 + k by XREAL_1:20; then consider z being Nat such that A5: k = l + z by NAT_1:10; - z = - k + l by A5; hence l - k is Integer by Th1; end; assume that A6: i1 = - k and A7: i2 = l; now assume 0 <= l - k; then 0 + k <= l by XREAL_1:19; then ex z being Nat st l = k + z by NAT_1:10; hence l - k is Integer; end; hence i1 + i2 is Integer by A6,A7,A4; end; A8: now A9: now assume k - l <= 0; then k <= 0 + l by XREAL_1:20; then consider z being Nat such that A10: l = k + z by NAT_1:10; - z = - l + k by A10; hence k - l is Integer by Th1; end; assume that A11: i1 = k and A12: i2 = - l; now assume 0 <= k - l; then 0 + l <= k by XREAL_1:19; then ex z being Nat st k = l + z by NAT_1:10; hence k - l is Integer; end; hence i1 + i2 is Integer by A11,A12,A9; end; now assume that A13: i1 = - k and A14: i2 = - l; i1 + i2 = - (k + l) by A13,A14; hence i1 + i2 is Integer by Th1; end; hence thesis by A2,A1,A8,A3; end; cluster i1 * i2 -> integer; coherence proof consider l such that A15: i2 = l or i2 = - l by Th2; consider k such that A16: i1 = k or i1 = - k by Th2; A17: now assume that A18: i1 = - k and A19: i2 = - l; i1 * i2 = k * l by A18,A19; hence i1 * i2 is Integer; end; now assume i1 = - k & i2 = l or i1 = k & i2 = - l; then i1 * i2 = - (k * l); hence i1 * i2 is Integer by Th1; end; hence thesis by A16,A15,A17; end; end; registration let i0 be Integer; cluster - i0 -> integer; coherence proof ex k st i0 = k or i0 = - k by Th2; hence thesis by Th1; end; end; registration let i1,i2 be Integer; cluster i1 - i2 -> integer; coherence proof i1 - i2 = i1 + (- i2); hence thesis; end; end; theorem Th3: 0 <= i0 implies i0 in NAT proof consider k such that A1: i0 = k or i0 = - k by Th2; assume 0 <= i0; then i0 = - k implies i0 is Element of NAT; hence thesis by A1; end; theorem r is Integer implies r + 1 is Integer & r - 1 is Integer; theorem Th5: i2 <= i1 implies i1 - i2 in NAT proof assume i2 <= i1; then i2 - i2 <= i1 - i2 by XREAL_1:9; hence thesis by Th3; end; theorem Th6: i1 + k = i2 implies i1 <= i2 proof reconsider i0 = k as Integer; assume i1 + k = i2; then 0 + (i1 + k) <= k + i2 by XREAL_1:6; then i1 + i0 - i0 <= i2 + i0 - i0 by XREAL_1:9; hence thesis; end; Lm4: for j being Element of NAT holds j < 1 implies j = 0 proof let j be Element of NAT; assume j < 1; then j < 0 + 1; hence thesis by NAT_1:13; end; Lm5: 0 < i1 implies 1 <= i1 proof assume A1: 0 < i1; then reconsider i2 = i1 as Element of NAT by Th3; 0 <> i2 by A1; hence thesis by Lm4; end; theorem Th7: i0 < i1 implies i0 + 1 <= i1 proof assume i0 < i1; then i0 + (- i0) < i1 + (- i0) by XREAL_1:6; then 1 <= i1 + (- i0) by Lm5; then 1 + i0 <= i1 + (- i0) + i0 by XREAL_1:6; hence thesis; end; theorem Th8: i1 < 0 implies i1 <= - 1 proof assume i1 < 0; then 0 < - i1 by XREAL_1:58; then 1 <= - i1 by Lm5; then - - i1 <= - 1 by XREAL_1:24; hence thesis; end; theorem Th9: i1 * i2 = 1 iff i1 = 1 & i2 = 1 or i1 = - 1 & i2 = - 1 proof thus i1 * i2 = 1 implies i1 = 1 & i2 = 1 or i1 = - 1 & i2 = - 1 proof assume A1: i1 * i2 = 1; then A2: not i2 = 0; A3: now A4: (- i1) * (- i2) = i1 * i2; assume that A5: i1 < 0 and A6: i2 < 0; A7: -i2 is Element of NAT by A6,Th3; -i1 is Element of NAT by A5,Th3; then - (- i1) = - 1 by A1,A7,A4,NAT_1:15; hence i1 = - 1 & i2 = - 1 by A1; end; A8: now assume that A9: 0 < i1 and A10: 0 < i2; A11: i2 is Element of NAT by A10,Th3; i1 is Element of NAT by A9,Th3; hence i1 = 1 & i2 = 1 by A1,A11,NAT_1:15; end; not i1 = 0 by A1; hence thesis by A1,A2,A8,A3; end; thus thesis; end; theorem i1 * i2 = - 1 iff i1 = - 1 & i2 = 1 or i1 = 1 & i2 = - 1 proof thus i1 * i2 = - 1 implies i1 = - 1 & i2 = 1 or i1 = 1 & i2 = - 1 proof assume i1 * i2 = - 1; then (- i1) * i2 = 1; then - (- i1) = - 1 & i2 = 1 or - i1 = - 1 & i2 = - 1 by Th9; hence thesis; end; assume i1 = - 1 & i2 = 1 or i1 = 1 & i2 = - 1; hence thesis; end; Lm6: i0 <= i1 implies ex k st i0 + k = i1 proof assume i0 <= i1; then reconsider k = i1 - i0 as Element of NAT by Th5; i0 + k = i1; hence thesis; end; Lm7: i0 <= i1 implies ex k st i1 - k = i0 proof assume i0 <= i1; then reconsider k = i1 - i0 as Element of NAT by Th5; i1 - k = i0; hence thesis; end; scheme SepInt { P[Integer] } : ex X being Subset of INT st for x being Integer holds x in X iff P[x] proof defpred P1[set] means ex i0 st i0 = $1 & P[i0]; consider X such that A1: for y holds y in X iff y in INT & P1[y] from XBOOLE_0:sch 1; y in X implies y in INT by A1; then reconsider X as Subset of INT by TARSKI:def 3; take X; let i0; A2: i0 in X implies P[i0] proof assume i0 in X; then ex i1 st i0 = i1 & P[i1] by A1; hence thesis; end; P[i0] implies i0 in X proof assume A3: P[i0]; i0 in INT by Def2; hence thesis by A1,A3; end; hence thesis by A2; end; scheme IntIndUp { F() -> Integer, P[Integer] } : for i0 st F() <= i0 holds P[i0] provided A1: P[F()] and A2: for i2 st F() <= i2 holds P[i2] implies P[i2 + 1] proof defpred Q[Nat] means for i2 st $1 = i2 - F() holds P[i2]; A3: for k st Q[k] holds Q[k + 1] proof let k; reconsider i8 = k as Integer; assume A4: Q[k]; let i2; assume A5: k + 1 = i2 - F(); then i2 - 1 = i8 + F(); then A6: F() <= i2 - 1 by Th6; k = i2 - 1 - F() by A5; then P[i2 - 1 + 1] by A2,A4,A6; hence thesis; end; let i0; assume F() <= i0; then reconsider l = i0 - F() as Element of NAT by Th5; A7: l = i0 - F(); A8: Q[0] by A1; for k holds Q[k] from NAT_1:sch 1(A8,A3); hence thesis by A7; end; scheme IntIndDown { F() -> Integer, P[Integer] } : for i0 st i0 <= F() holds P[i0] provided A1: P[F()] and A2: for i2 st i2 <= F() holds P[i2] implies P[i2 - 1] proof defpred Q[Integer] means for i2 st $1 = - i2 holds P[i2]; A3: for i2 st - F() <= i2 holds Q[i2] implies Q[i2 + 1] proof let i2; assume that A4: - F() <= i2 and A5: Q[i2]; let i3; assume A6: i2 + 1 = - i3; then A7: i2 = - (i3 + 1); - (- i3 - 1) <= - (- F()) by A4,A6,XREAL_1:24; then P[i3 + 1 - 1] by A2,A5,A7; hence thesis; end; let i0; assume i0 <= F(); then A8: - F() <= - i0 by XREAL_1:24; A9: Q[- F()] by A1; for i2 st - F() <= i2 holds Q[i2] from IntIndUp(A9,A3); hence thesis by A8; end; scheme IntIndFull { F() -> Integer, P[Integer] } : for i0 holds P[i0] provided A1: P[F()] and A2: for i2 holds P[i2] implies P[i2 - 1] & P[i2 + 1] proof let i0; A3: P[F()] by A1; A4: now A5: for i2 st i2 <= F() holds P[i2] implies P[i2 - 1] by A2; A6: for i2 st i2 <= F() holds P[i2] from IntIndDown(A3,A5); assume i0 <= F(); hence thesis by A6; end; now A7: for i2 st F() <= i2 holds P[i2] implies P[i2 + 1] by A2; A8: for i2 st F() <= i2 holds P[i2] from IntIndUp(A3,A7); assume F() <= i0; hence thesis by A8; end; hence thesis by A4; end; scheme IntMin { F() -> Integer, P[Integer] } : ex i0 st P[i0] & for i1 st P[i1] holds i0 <= i1 provided A1: for i1 st P[i1] holds F() <= i1 and A2: ex i1 st P[i1] proof defpred Q[Nat] means P[F() + $1]; consider i1 such that A3: P[i1] by A2; ex k st F() + k = i1 by A1,A3,Lm6; then A4: ex k be Nat st Q[k] by A3; consider l be Nat such that A5: Q[l] & for n be Nat st Q[n] holds l <= n from NAT_1:sch 5(A4); take i0 = F() + l; for i1 st P[i1] holds i0 <= i1 proof let i1; assume A6: P[i1]; then ex n st F() + n = i1 by A1,Lm6; then i0 - F() <= i1 - F() by A5,A6; hence thesis by XREAL_1:9; end; hence thesis by A5; end; scheme IntMax { F() -> Integer, P[Integer] } : ex i0 st P[i0] & for i1 st P[i1] holds i1 <= i0 provided A1: for i1 st P[i1] holds i1 <= F() and A2: ex i1 st P[i1] proof defpred Q[Nat] means P[F() - $1]; consider i1 such that A3: P[i1] by A2; ex k st i1 = F() - k by A1,A3,Lm7; then A4: ex k be Nat st Q[k] by A3; consider l be Nat such that A5: Q[l] & for n be Nat st Q[n] holds l <= n from NAT_1:sch 5(A4); take i0 = F() - l; for i1 st P[i1] holds i1 <= i0 proof let i1; assume A6: P[i1]; then consider n such that A7: F() - n = i1 by A1,Lm7; l <= n by A5,A6,A7; then F() + (- i0) - F() <= F() - i1 - F() by A7,XREAL_1:9; then - i0 <= F() + (- i1) - F(); hence thesis by XREAL_1:24; end; hence thesis by A5; end; definition let i1,i2 be Integer; pred i1 divides i2 means :Def3: ex i3 st i2 = i1 * i3; reflexivity proof let a be Integer; take 1; thus thesis; end; end; definition let i1,i2,i3 be Integer; pred i1,i2 are_congruent_mod i3 means i3 divides i1 - i2; end; definition let i1,i2,i3 be Integer; redefine pred i1,i2 are_congruent_mod i3 means :Def5: ex i4 st i3 * i4 = i1 - i2; compatibility proof thus i1,i2 are_congruent_mod i3 implies ex i4 st i3 * i4 = i1 - i2 proof assume i3 divides i1-i2; hence thesis by Def3; end; given i4 such that A1: i3 * i4 = i1 - i2; take i4; thus thesis by A1; end; end; theorem i1,i1 are_congruent_mod i2 proof i2 * 0 = i1 - i1; hence thesis by Def5; end; theorem i1,0 are_congruent_mod i1 & 0,i1 are_congruent_mod i1 proof A1: i1 * (- 1) = 0 - i1; i1 * 1 = i1 - 0; hence thesis by A1,Def5; end; theorem i1,i2 are_congruent_mod 1 proof i1 - i2 = 1 * (i1 - i2); hence thesis by Def5; end; theorem i1,i2 are_congruent_mod i3 implies i2,i1 are_congruent_mod i3 proof assume i1,i2 are_congruent_mod i3; then consider i0 such that A1: (i1 - i2) = i3 * i0 by Def5; i2 - i1 = i3 * (- i0) by A1; hence thesis by Def5; end; theorem i1,i2 are_congruent_mod i5 & i2,i3 are_congruent_mod i5 implies i1,i3 are_congruent_mod i5 proof assume that A1: i1,i2 are_congruent_mod i5 and A2: i2,i3 are_congruent_mod i5; consider i8 such that A3: i5 * i8 = i1 - i2 by A1,Def5; consider i9 such that A4: i5 * i9 = i2 - i3 by A2,Def5; i5 * (i8 + i9) = i1 - i3 by A3,A4; hence thesis by Def5; end; theorem i1,i2 are_congruent_mod i5 & i3,i4 are_congruent_mod i5 implies (i1 + i3),(i2 + i4) are_congruent_mod i5 proof assume that A1: i1,i2 are_congruent_mod i5 and A2: i3,i4 are_congruent_mod i5; consider i8 such that A3: i5 * i8 = i1 - i2 by A1,Def5; consider i9 such that A4: i5 * i9 = i3 - i4 by A2,Def5; i5 * (i8 + i9) = (i1 + i3) - (i2 + i4) by A3,A4; hence thesis by Def5; end; theorem i1,i2 are_congruent_mod i5 & i3,i4 are_congruent_mod i5 implies (i1 - i3),(i2 - i4) are_congruent_mod i5 proof assume that A1: i1,i2 are_congruent_mod i5 and A2: i3,i4 are_congruent_mod i5; consider i8 such that A3: i5 * i8 = i1 - i2 by A1,Def5; consider i9 such that A4: i5 * i9 = i3 - i4 by A2,Def5; (i1 - i3) - (i2 - i4) = i5 * (i8 - i9) by A3,A4; hence thesis by Def5; end; theorem i1,i2 are_congruent_mod i5 & i3,i4 are_congruent_mod i5 implies (i1 * i3),(i2 * i4) are_congruent_mod i5 proof assume that A1: i1,i2 are_congruent_mod i5 and A2: i3,i4 are_congruent_mod i5; consider i8 such that A3: i5 * i8 = i1 - i2 by A1,Def5; consider i9 such that A4: i5 * i9 = i3 - i4 by A2,Def5; (i1 * i3) - (i2 * i4) = (i1 - i2) * i3 + (i3 - i4) * i2 .= (i5 * i8) * i3 + (i5 * i9) * i2 by A3,A4 .= i5 * ((i8 * i3) + (i9 * i2)); hence thesis by Def5; end; theorem (i1 + i2),i3 are_congruent_mod i5 iff i1, (i3 - i2) are_congruent_mod i5 proof thus (i1 + i2),i3 are_congruent_mod i5 implies i1,(i3 - i2) are_congruent_mod i5 proof assume (i1 + i2),i3 are_congruent_mod i5; then A1: ex i0 st i5 * i0 = (i1 + i2) - i3 by Def5; (i1 + i2) - i3 = i1 - (i3 - i2); hence thesis by A1,Def5; end; assume i1, (i3 - i2) are_congruent_mod i5; then A2: ex i0 st i5 * i0 = i1 - (i3 - i2) by Def5; i1 - (i3 - i2) = (i1 + i2) - i3; hence thesis by A2,Def5; end; theorem i4 * i5 = i3 implies (i1,i2 are_congruent_mod i3 implies i1,i2 are_congruent_mod i4) proof assume A1: i4 * i5 = i3; assume i1,i2 are_congruent_mod i3; then consider i0 such that A2: i3 * i0 = i1 - i2 by Def5; i1 - i2 = i4 * (i5 * i0) by A1,A2; hence thesis by Def5; end; theorem i1,i2 are_congruent_mod i5 iff (i1 + i5),i2 are_congruent_mod i5 proof thus i1,i2 are_congruent_mod i5 implies (i1 + i5),i2 are_congruent_mod i5 proof assume i1,i2 are_congruent_mod i5; then consider i0 such that A1: i5 * i0 = i1 - i2 by Def5; i5 * (i0 + 1) = (i1 + i5) - i2 by A1; hence thesis by Def5; end; assume (i1 + i5),i2 are_congruent_mod i5; then consider i0 such that A2: i5 * i0 = (i1 + i5) - i2 by Def5; i5 * (i0 - 1) = i1 - i2 by A2; hence thesis by Def5; end; theorem i1,i2 are_congruent_mod i5 iff (i1 - i5),i2 are_congruent_mod i5 proof thus i1,i2 are_congruent_mod i5 implies (i1 - i5),i2 are_congruent_mod i5 proof assume i1,i2 are_congruent_mod i5; then consider i0 such that A1: i5 * i0 = i1 - i2 by Def5; i5 * (i0 - 1) = (i1 - i5) - i2 by A1; hence thesis by Def5; end; assume (i1 - i5),i2 are_congruent_mod i5; then consider i0 such that A2: i5 * i0 = (i1 - i5) - i2 by Def5; i5 * (i0 + 1) = i1 - i2 by A2; hence thesis by Def5; end; theorem Th23: i1 <= r & r - 1 < i1 & i2 <= r & r - 1 < i2 implies i1 = i2 proof assume that A1: i1 <= r and A2: r - 1 < i1 and A3: i2 <= r and A4: r - 1 < i2; i2 = i1 + (i2 - i1); then consider i0 such that A5: i2 = i1 + i0; A6: now assume that A7: 0 < i0 and i1 <> i2; 1 <= i0 by A7,Lm5; then r - 1 + 1 < i1 + i0 by A2,XREAL_1:8; hence contradiction by A3,A5; end; A8: now assume that A9: i0 < 0 and i1 <> i2; i0 <= - 1 by A9,Th8; then i1 + i0 <= r + (- 1) by A1,XREAL_1:7; hence contradiction by A4,A5; end; i0 = 0 implies i2 = i1 by A5; hence thesis by A8,A6; end; theorem Th24: r <= i1 & i1 < r + 1 & r <= i2 & i2 < r + 1 implies i1 = i2 proof assume that A1: r <= i1 and A2: i1 < r + 1 and A3: r <= i2 and A4: i2 < r + 1; i2 = i1 + (i2 - i1); then consider i0 such that A5: i2 = i1 + i0; A6: now assume that A7: i0 < 0 and i1 <> i2; i0 <= - 1 by A7,Th8; then i1 + i0 < r + 1 + (- 1) by A2,XREAL_1:8; hence contradiction by A3,A5; end; A8: now assume that A9: 0 < i0 and i1 <> i2; 1 <= i0 by A9,Lm5; hence contradiction by A1,A4,A5,XREAL_1:7; end; i0 = 0 implies i2 = i1 by A5; hence thesis by A6,A8; end; reserve r1,p,p1,g,g1,g2 for real number, Y for Subset of REAL; Lm8: for r ex n st r Integer means :Def6: it <= r & r - 1 < it; existence proof defpred P[Integer] means r < $1; consider n such that A1: - r < n by Lm8; A2: - n < -- r by A1,XREAL_1:24; A3: for i1 st P[i1] holds -n <= i1 proof let i1; assume r < i1; then r + -n < i1 + r by A2,XREAL_1:8; hence thesis by XREAL_1:6; end; ex n st r < n by Lm8; then A4: ex i0 st P[i0]; consider i1 such that A5: P[i1] & for i2 st P[i2] holds i1 <= i2 from IntMin(A3,A4); A6: r - 1 < i1 - 1 by A5,XREAL_1:9; r < i1 - 1 implies i1 <= i1-1 by A5; hence thesis by A6,XREAL_1:146; end; uniqueness by Th23; projectivity by XREAL_1:44; end; theorem Th25: [\ r /] = r iff r is integer proof r is Integer implies [\ r /] = r proof r + 0 < r + 1 by XREAL_1:6; then A1: r - 1 < r + 1 - 1 by XREAL_1:9; assume r is Integer; hence thesis by A1,Def6; end; hence thesis; end; theorem Th26: [\ r /] < r iff r is not integer proof now assume A1: not r is Integer; [\ r /] <= r by Def6; hence [\ r /] < r by A1,XXREAL_0:1; end; hence thesis by Th25; end; theorem [\ r /] - 1 < r & [\ r /] < r + 1 proof [\ r /] <= r by Def6; then A1: [\ r /] + 0 < r + 1 by XREAL_1:8; then [\ r /] + (- 1) < r + 1 + (- 1) by XREAL_1:6; hence thesis by A1; end; theorem Th28: [\ r /] + i0 = [\ r + i0 /] proof r - 1 < [\ r /] by Def6; then r - 1 + i0 < [\ r /] + i0 by XREAL_1:6; then A1: r + i0 - 1 < [\ r /] + i0; [\ r /] <= r by Def6; then [\ r /] + i0 <= r + i0 by XREAL_1:6; hence thesis by A1,Def6; end; theorem Th29: r < [\ r /] + 1 proof r - 1 < [\ r /] by Def6; then r - 1 + 1 < [\ r /] + 1 by XREAL_1:6; hence thesis; end; definition let r be real number; func [/ r \] -> Integer means :Def7: r <= it & it < r + 1; existence proof A1: now A2: r + 0 < r + 1 by XREAL_1:6; assume r is Integer; hence r <= [\ r /] & [\ r /] < r + 1 by A2,Th25; end; now assume not r is Integer; then [\ r /] < r by Th26; hence r <= [\ r /] + 1 & [\ r /] + 1 < r + 1 by Th29,XREAL_1:6; end; hence thesis by A1; end; uniqueness by Th24; projectivity by XREAL_1:29; end; theorem Th30: [/ r \] = r iff r is integer proof r + 0 < r + 1 by XREAL_1:6; hence thesis by Def7; end; theorem Th31: r < [/ r \] iff r is not integer proof now assume A1: not r is Integer; r <= [/ r \] by Def7; hence r < [/ r \] by A1,XXREAL_0:1; end; hence thesis by Th30; end; theorem r - 1 < [/ r \] & r < [/ r \] + 1 proof r <= [/ r \] by Def7; then A1: r + 0 < [/ r \] + 1 by XREAL_1:8; then r + (- 1) < [/ r \] + 1 + (- 1) by XREAL_1:6; hence thesis by A1; end; theorem [/ r \] + i0 = [/ r + i0 \] proof [/ r \] < r + 1 by Def7; then [/ r \] + i0 < r + 1 + i0 by XREAL_1:6; then A1: [/ r \] + i0 < r + i0 + 1; r <= [/ r \] by Def7; then r + i0 <= [/ r \] + i0 by XREAL_1:6; hence thesis by A1,Def7; end; theorem Th34: [\ r /] = [/ r \] iff r is integer proof A1: now assume A2: not r is Integer; then [\ r /] < r by Th26; hence [\ r /] <> [/ r \] by A2,Th31; end; now assume r is Integer; hence [\ r /] = r & r = [/ r \] by Th25,Th30; hence [\ r /] = [/ r \]; end; hence thesis by A1; end; theorem Th35: [\ r /] < [/ r \] iff r is not integer proof now assume A1: not r is Integer; then A2: r < [/ r \] by Th31; [\ r /] < r by A1,Th26; hence [\ r /] < [/ r \] by A2,XXREAL_0:2; end; hence thesis by Th34; end; theorem [\ r /] <= [/ r \] proof A1: r <= [/ r \] by Def7; [\ r /] <= r by Def6; hence thesis by A1,XXREAL_0:2; end; theorem [\ ([/ r \]) /] = [/ r \] by Th25; canceled 2; theorem [/ ([\ r /]) \] = [\ r /] by Th30; theorem [\ r /] = [/ r \] iff not [\ r /] + 1 = [/ r \] proof set Diff = [/ r \] + (- [\ r /]); A1: now assume not r is Integer; then [\ r /] < [/ r \] by Th35; then [\ r /] + (- [\ r /]) < Diff by XREAL_1:6; then A2: 1 <= Diff by Lm5; r - 1 < [\ r /] by Def6; then A3: - [\ r /] < - (r - 1) by XREAL_1:24; [/ r \] < r + 1 by Def7; then Diff < r + 1 + (- (r - 1)) by A3,XREAL_1:8; then Diff + 1 + (- 1) <= 1 + 1 + (- 1) by Th7; then [\ r /] + 1 = [\ r /] + Diff by A2,XXREAL_0:1; hence [\ r /] + 1 = [/ r \] & [\ r /] <> [/ r \]; end; now assume r is Integer; then [\ r /] = [/ r \] by Th34; hence [\ r /] = [/ r \] & [\ r /] + 1 <> [/ r \]; end; hence thesis by A1; end; definition let r be real number; func frac r equals r - [\ r /]; coherence; end; registration let r be real number; cluster frac r -> real; coherence; end; definition let r be real number; redefine func frac r -> Real; coherence by XREAL_0:def 1; end; theorem r = [\ r /] + frac r; theorem Th43: frac r < 1 & 0 <= frac r proof r - 1 < [\ r /] by Def6; then frac r + (r - 1) < r - [\ r /] + [\ r /] by XREAL_1:6; then frac r + (- 1) + r - r < r - r by XREAL_1:9; then A1: frac r - 1 + 1 < 0 + 1 by XREAL_1:6; [\ r /] <= r by Def6; then [\ r /] + (r - [\ r /]) <= r + frac r by XREAL_1:6; then r - r <= r + frac r - r by XREAL_1:9; hence thesis by A1; end; theorem [\ frac r /] = 0 proof [\ frac r /] = [\ (r + (- [\ r /])) /] .= [\ r /] + (- [\ r /]) by Th28 .= 0; hence thesis; end; theorem Th45: frac r = 0 iff r is integer proof now assume r is Integer; then r = [\ r /] by Th25; hence frac r = 0; end; hence thesis; end; theorem 0 < frac r iff r is not integer proof now assume not r is Integer; then 0 <> frac r; hence 0 < frac r by Th43; end; hence thesis by Th45; end; definition let i1,i2 be Integer; func i1 div i2 -> Integer equals [\ i1 / i2 /]; correctness; end; definition let i1,i2 be Integer; func i1 mod i2 -> Integer equals :Def10: i1 - (i1 div i2) * i2 if i2 <> 0 otherwise 0; correctness; end; theorem Th47: for r being real number st r <> 0 holds [\ r / r /] = 1 proof let r be real number; assume r <> 0; hence [\ r / r /] = [\ 1 /] by XCMPLX_1:60 .= 1 by Th25; end; theorem for i being Integer holds i div 0 = 0 proof let i be Integer; A1: i / 0 = i * 0" by XCMPLX_0:def 9 .= i * 0; 0 - 1 < 0; hence thesis by A1,Def6; end; theorem for i being Integer st i <> 0 holds i div i = 1 by Th47; theorem for i being Integer holds i mod i = 0 proof let i be Integer; per cases; suppose i = 0; hence thesis by Def10; end; suppose A1: i <> 0; hence i mod i = i - (i div i) * i by Def10 .= i - 1 * i by A1,Th47 .= 0; end; end; begin theorem for k, i being Integer holds k < i implies ex j being Element of NAT st j = i-k & 1 <= j proof let k,i be Integer; assume k < i; then A1: k - k < i - k by XREAL_1:9; then reconsider j = i - k as Element of NAT by Th3; reconsider j9 = j, 09 = 0 as Integer; take j; thus j = i - k; 09 + 1 <= j9 by A1,Th7; hence thesis; end; theorem Th52: for a,b being Integer st a < b holds a <= b - 1 proof let a,b be Integer; assume a < b; then a - 1 < b - 1 by XREAL_1:9; then a - 1 + 1 <= b - 1 by Th7; hence thesis; end; theorem for r being real number st r>=0 holds [/ r \]>=0 & [\ r /]>=0 & [/ r \] is Element of NAT & [\ r /] is Element of NAT proof let r be real number; assume A1: r>=0; A2: r<=[/ r \] by Def7; r-1<[\ r /] by Def6; then r-1+1<[\ r /]+1 by XREAL_1:6; then 0-1<[\ r /]+1-1 by A1,XREAL_1:9; then [\ r /]>=0 by Th8; hence thesis by A1,A2,Th3; end; theorem Th54: for i being Integer, r being real number st i <= r holds i <= [\ r /] proof let i be Integer; let r be real number; assume i <= r; then A1: i-1 <= r-1 by XREAL_1:9; r-1 < [\ r /] by Def6; then i-1 < [\ r /] by A1,XXREAL_0:2; then i-1+1 <= [\ r /] by Th7; hence thesis; end; theorem for m,n being Nat holds 0 <= m qua Integer div n by Th54; theorem 0 < i & 1 < j implies i div j < i proof assume that A1: 0 < i and A2: 1 < j; assume A3: i <= i div j; i div j <= i/j by Def6; then j * (i div j) <= j * (i/j) by A2,XREAL_1:64; then j * (i div j) <= i by A2,XCMPLX_1:87; then j * (i div j) <= i div j by A3,XXREAL_0:2; then j * (i div j) * (i div j)" <= (i div j) * (i div j)" by A1,A3,XREAL_1:64 ; then j * ((i div j) * (i div j)") <= (i div j) * (i div j)"; then j * 1 <= (i div j) * (i div j)" by A1,A3,XCMPLX_0:def 7; hence contradiction by A1,A2,A3,XCMPLX_0:def 7; end; theorem i2 >= 0 implies i1 mod i2 >= 0 proof assume A1: i2 >= 0; per cases by A1; suppose A2: i2 > 0; [\ i1/i2 /] <= i1/i2 by Def6; then (i1 div i2)*i2 <= (i1/i2)*i2 by A2,XREAL_1:64; then (i1 div i2)*i2 <= i1 by A2,XCMPLX_1:87; then i1 - (i1 div i2)*i2 >= 0 by XREAL_1:48; hence thesis by Def10; end; suppose i2 = 0; hence thesis by Def10; end; end; theorem i2 > 0 implies i1 mod i2 < i2 proof assume A1: i2 > 0; i1/i2 -1 < [\ i1/i2 /] by Def6; then (i1/i2 -1)*i2 < (i1 div i2)*i2 by A1,XREAL_1:68; then i1/i2*i2 -1*i2 < (i1 div i2)*i2; then i1 -i2 < (i1 div i2)*i2-0 by A1,XCMPLX_1:87; then i1 -(i1 div i2)*i2 < i2-0 by XREAL_1:17; hence thesis by A1,Def10; end; theorem i2 <> 0 implies i1 = (i1 div i2) * i2 + (i1 mod i2) proof assume i2 <> 0; then (i1 div i2) * i2 +(i1 mod i2) = (i1 div i2 )*i2 + (i1 - ( i1 div i2 )*i2 ) by Def10 .= i1; hence thesis; end; theorem for m,j being Integer holds m*j, 0 are_congruent_mod m proof let m,j be Integer; take j; thus m*j = m*j - 0; end; theorem i >= 0 & j >= 0 implies i div j >= 0 proof assume that A1: i >= 0 and A2: j >= 0; A3: i / j - 1 < [\ i / j /] by Def6; i / j - 1 >= 0-1 by A1,A2,XREAL_1:9; then - 1 < [\ i / j /] by A3,XXREAL_0:2; hence thesis by Th8; end; theorem for n being Nat st n > 0 for a being Integer holds a mod n = 0 iff n divides a proof let n be Nat; assume A1: n > 0; let a be Integer; A2: now A3: a mod n = a - (a div n) * n by A1,Def10 .= a - ([\ a/n /]) * n; assume n divides a; then consider k being Integer such that A4: n * k = a by Def3; -n <> 0 by A1; then -n + a < 0 + a by XREAL_1:6; then (-n + a) * n" < (n * k) * n" by A1,A4,XREAL_1:68; then (-n) * n" + a * n" < (n * k) * n"; then (-n) * n" + a/n < (n * n") * k by XCMPLX_0:def 9; then (-n) * n" + a/n < 1 * k by A1,XCMPLX_0:def 7; then -n * n" + a/n < k; then -1 + a/n < k by A1,XCMPLX_0:def 7; then A5: a/n - 1 < k; k <= a/n proof assume k > a/n; then k * n > a/n * n by A1,XREAL_1:68; then k * n > (a * n") * n by XCMPLX_0:def 9; then k * n > a * (n" * n); then n * k > a * 1 by A1,XCMPLX_0:def 7; hence thesis by A4; end; then ([\ a/n /]) = k by A5,Def6; hence a mod n = 0 by A4,A3; end; now assume a mod n = 0; then 0 = a - (a div n) * n by A1,Def10; hence n divides a by Def3; end; hence thesis by A2; end; reserve r, s for real number; theorem r/s is not Integer implies - [\ r/s /] = [\ (-r) / s /] + 1 proof r/s - 1 < [\ r/s /] by Def6; then - (r/s - 1) > - [\ r/s /] by XREAL_1:24; then -r/s + 1 > - [\ r/s /]; then - [\ r/s /] <= (-r) / s + 1 by XCMPLX_1:187; then A1: - [\ r/s /] - 1 <= (-r) / s + 1 - 1 by XREAL_1:9; assume r/s is not Integer; then [\ r/s /] < r/s by Th26; then -r/s < - [\ r/s /] by XREAL_1:24; then -r/s - 1 < - [\ r/s /] - 1 by XREAL_1:9; then (-r)/s - 1 < - [\ r/s /] - 1 by XCMPLX_1:187; then - [\ r/s /] - 1 + 1 = [\ (-r) / s /] + 1 by A1,Def6; hence thesis; end; theorem r/s is Integer implies - [\ r/s /] = [\ (-r) / s /] proof assume r/s is Integer; then A1: [\ r/s /] = r/s by Th25; A2: -r/s = (-r)/s by XCMPLX_1:187; then (-r) / s - 1 < - [\ r/s /] - 0 by A1,XREAL_1:15; hence thesis by A1,A2,Def6; end; theorem r <= i implies [/ r \] <= i proof assume r <= i; then A1: r+1 <= i+1 by XREAL_1:6; [/ r \] < r+1 by Def7; then [/ r \] < i+1 by A1,XXREAL_0:2; then [/ r \] <= i+1-1 by Th52; hence thesis; end; scheme FinInd{M, N() -> Element of NAT, P[Nat]} : for i being Element of NAT st M() <= i & i <= N() holds P[i] provided A1: P[M()] and A2: for j being Element of NAT st M() <= j & j < N() holds P[j] implies P[j+1] proof defpred Q[Nat] means M() <= $1 & $1 <= N() & not(P[$1]); assume not(for i being Element of NAT st M() <= i & i <= N() holds P[i]); then A3: ex i being Nat st Q[i]; consider k being Nat such that A4: Q[k] & for k9 being Nat st Q[k9] holds k <= k9 from NAT_1:sch 5(A3); per cases; suppose k = M(); hence thesis by A1,A4; end; suppose k <> M(); then M() < k by A4,XXREAL_0:1; then M() + 1 <= k by NAT_1:13; then A5: (M() + 1) - 1 <= k - 1 by XREAL_1:9; then reconsider k9 = k - 1 as Element of NAT by Th3; A6: k9 <> k9 + 1; k9 <= k9 + 1 by NAT_1:11; then A7: k9 < k by A6,XXREAL_0:1; then A8: k9 < N() by A4,XXREAL_0:2; A9: (k - 1) + 1 = k + 0; not(Q[k9]) by A4,A7; hence thesis by A2,A4,A5,A9,A8; end; end; scheme FinInd2{M,N() -> Element of NAT, P[Nat]} : for i being Element of NAT st M() <= i & i <= N() holds P[i] provided A1: P[M()] and A2: for j being Element of NAT st M() <= j & j < N() holds (for j9 being Element of NAT st M() <= j9 & j9 <= j holds P[j9]) implies P[j+1] proof defpred Q[Element of NAT] means for j being Element of NAT st M() <= j & j <= ($1) holds P[j]; A3: for j being Element of NAT st M() <= j & j < N() holds Q[j] implies Q[j+ 1] proof let j be Element of NAT; assume that A4: M() <= j and A5: j < N(); assume A6: Q[j]; thus Q[j+1] proof let i be Element of NAT; assume that A7: M() <= i and A8: i <= j + 1; per cases; suppose i = j + 1; hence thesis by A2,A4,A5,A6; end; suppose i <> j + 1; then i < j + 1 by A8,XXREAL_0:1; then i <= j by NAT_1:13; hence thesis by A6,A7; end; end; end; A9: Q[M()] by A1,XXREAL_0:1; for i being Element of NAT st M() <= i & i <= N() holds Q[i] from FinInd(A9,A3); hence thesis; end; reserve i for Integer, a, b, r, s for real number; theorem frac(r+i) = frac r proof thus frac(r+i) = r+i-[\r+i/] .= r+i-([\r/]+i) by Th28 .= r-[\r/]+i-i .= frac r; end; theorem Th67: r <= a & a < [\r/]+1 implies [\a/] = [\r/] proof assume A1: r <= a; assume a < [\r/]+1; then A2: a-1 < [\r/]+1-1 by XREAL_1:9; [\r/] <= r by Def6; then [\r/] <= a by A1,XXREAL_0:2; hence thesis by A2,Def6; end; theorem Th68: r <= a & a < [\r/]+1 implies frac r <= frac a proof assume A1: r <= a; assume a < [\r/]+1; then [\a/] = [\r/] by A1,Th67; hence thesis by A1,XREAL_1:9; end; theorem r < a & a < [\r/]+1 implies frac r < frac a proof assume A1: r < a; assume a < [\r/]+1; then [\a/] = [\r/] by A1,Th67; hence thesis by A1,XREAL_1:9; end; theorem Th70: a >= [\r/]+1 & a <= r+1 implies [\a/] = [\r/]+1 proof assume A1: a >= [\r/]+1; assume a <= r+1; then a-1 <= r+1-1 by XREAL_1:9; then a-1 < [\r/]+1 by Th29,XXREAL_0:2; hence thesis by A1,Def6; end; theorem Th71: a >= [\r/]+1 & a < r+1 implies frac a < frac r proof assume A1: a >= [\r/]+1; assume A2: a < r+1; then a-1 < r by XREAL_1:19; then A3: frac a = a-[\a/] & a-1-[\r/] < r-[\r/] by XREAL_1:14; [\a/] = [\r/]+1 by A1,A2,Th70; hence thesis by A3; end; theorem r <= a & a < r+1 & r <= b & b < r+1 & frac a = frac b implies a = b proof assume that A1: r <= a and A2: a < r+1 and A3: r <= b and A4: b < r+1 and A5: frac a = frac b; A6: [\r/] <= r by Def6; then A7: [\r/] <= a by A1,XXREAL_0:2; A8: [\r/] <= b by A3,A6,XXREAL_0:2; per cases; suppose A9: a < [\r/]+1 & b >= [\r/]+1; then frac a >= frac r by A1,Th68; hence thesis by A4,A5,A9,Th71; end; suppose A10: a >= [\r/]+1 & b < [\r/]+1; then frac a < frac r by A2,Th71; hence thesis by A3,A5,A10,Th68; end; suppose A11: a < [\r/]+1 & b < [\r/]+1; then b-1 < [\r/]+1-1 by XREAL_1:9; then A12: [\b/] = [\r/] by A8,Def6; a-1 < [\r/]+1-1 by A11,XREAL_1:9; then [\a/] = [\r/] by A7,Def6; hence thesis by A5,A12; end; suppose a >= [\r/]+1 & b >= [\r/]+1; then [\a/] = [\r/]+1 & [\b/] = [\r/]+1 by A2,A4,Th70; hence thesis by A5; end; end; begin reserve x for set, a,b for real number, k,k1,l,l1 for Element of NAT, m,m1,n, n1 for Integer; reserve i1,j1 for Element of NAT; Lm1: omega c= ({[c,d] where c,d is Element of omega: c,d are_relative_prime & d <> {}} \ {[k,1] where k is Element of omega: not contradiction}) \/ omega by XBOOLE_1:7; Lm2: quotient(i1,j1) = i1/j1 proof set x = quotient(i1,j1); per cases; suppose A1: j1 = {}; hence x = {} by ARYTM_3:def 10 .= i1/j1 by A1; end; suppose A2: j1 <> 0; +(0,opp 0) = 0 by ARYTM_0:def 3; then A3: opp 0 = 0 by ARYTM_0:11; j1 * j1" = 1 by A2,XCMPLX_0:def 7; then consider x1,x2,y1,y2 being Real such that A4: j1 = [*x1,x2*] and A5: j1" = [*y1,y2*] and A6: 1 = [* +(*(x1,y1),opp*(x2,y2)), +(*(x1,y2),*(x2,y1)) *] by XCMPLX_0:def 5; +(*(x1,y2),*(x2,y1)) = 0 by A6,ARYTM_0:24; then A7: 1 = +(*(x1,y1),opp*(x2,y2)) by A6,ARYTM_0:def 5 .= +(*(x1,y1),opp 0) by A4,ARYTM_0:12,24 .= *(x1,y1) by A3,ARYTM_0:11; x2 = 0 by A4,ARYTM_0:24; then A8: j1 = x1 by A4,ARYTM_0:def 5; then x1 in omega; then reconsider xx = x1 as Element of RAT+ by Lm1; consider yy being Element of RAT+ such that A9: xx *' yy = one by A2,A8,ARYTM_3:54; A10: xx in RAT+; yy in RAT+; then reconsider xx1 = xx, yy1 = yy as Element of REAL+ by A10,ARYTM_2:1; A11: ex x9,y9 being Element of RAT+ st xx1 = x9 & yy1 = y9 & xx1 *' yy1 = x9 *' y9 by ARYTM_2:21; yy1 in REAL+; then reconsider xx1, yy1 as Element of REAL by ARYTM_0:1; ex x9,y9 being Element of REAL+ st xx1 = x9 & yy1 = y9 & *(xx1,yy1) = x9 *' y9 by ARYTM_0:def 2; then A12: yy = y1 by A2,A8,A7,A9,A11,ARYTM_0:18; then A13: y1 in RAT+; y2 = 0 by A5,ARYTM_0:24; then A14: j1" = y1 by A5,ARYTM_0:def 5; A15: j1 in omega; then reconsider a = x, b = j1 as Element of RAT+ by Lm1; consider x91,x92,y91,y92 being Real such that A16: i1 = [*x91,x92*] and A17: j1" = [*y91,y92*] and A18: i1*j1" = [* +(*(x91,y91),opp*(x92,y92)), +(*(x91,y92),*(x92,y91)) *] by XCMPLX_0:def 5; A19: +(*(x91,y92),*(x92,y91)) = 0 by A18,ARYTM_0:24; x1 in omega by A8; then consider x19,y19 being Element of REAL+ such that A20: x1 = x19 and A21: y1 = y19 and A22: *(x1,y1) = x19 *' y19 by A13,ARYTM_0:def 2,ARYTM_2:1,2; A23: ex x199,y199 being Element of RAT+ st x19 = x199 & y19 = y199 & x19 *' y19 = x199 *' y199 by A8,A12,A15,A20,A21,Lm1,ARYTM_2:21; A24: y92 = 0 by A17,ARYTM_0:24; then j1" = y91 by A17,ARYTM_0:def 5; then A25: i1*j1" = +(*(x91,y1),opp*(x92,0)) by A14,A18,A24,A19,ARYTM_0:def 5 .= +(*(x91,y1),0) by A3,ARYTM_0:12 .= *(x91,y1) by ARYTM_0:11; x92 = 0 by A16,ARYTM_0:24; then A26: i1 = x91 by A16,ARYTM_0:def 5; then A27: x91 in omega; then x91 in RAT+ by Lm1; then consider x9,y9 being Element of REAL+ such that A28: x91 = x9 and A29: y1 = y9 and A30: i1 * j1" = x9 *' y9 by A25,A13,ARYTM_0:def 2,ARYTM_2:1; consider x99,y99 being Element of RAT+ such that A31: x9 = x99 and A32: y9 = y99 and A33: i1 * j1" = x99 *' y99 by A27,A12,A28,A29,A30,Lm1,ARYTM_2:21; a *' b = quotient(i1,j1) *' quotient(j1,one) by ARYTM_3:40 .= quotient(i1*^j1,j1*^one) by ARYTM_3:49 .= quotient(i1,one) *' quotient(j1,j1) by ARYTM_3:49 .= quotient(i1,one) *' one by A2,ARYTM_3:41 .= quotient(i1,one) by ARYTM_3:53 .= i1 by ARYTM_3:40 .= x99 *' one by A26,A28,A31,ARYTM_3:53 .= x99 *' y99 *' b by A8,A7,A29,A32,A20,A21,A22,A23,ARYTM_3:52; hence thesis by A2,A33,ARYTM_3:56; end; end; 0 in omega; then reconsider 09 = 0 as Element of REAL+ by ARYTM_2:2; Lm3: for x9 being Element of REAL+ st x9 = a holds 09 - x9 = -a proof let xx being Element of REAL+ such that A1: xx = a; per cases; suppose xx = 0; hence thesis by A1,ARYTM_1:18; end; suppose A2: xx <> 0; set b = 09 - xx; A3: 09 <=' xx by ARYTM_1:6; then not xx <=' 09 by A2,ARYTM_1:4; then A4: b = [{},xx -' 09] by ARYTM_1:def 2; now assume b = [0,0]; then xx -' 09 = 0 by A4,XTUPLE_0:1; hence contradiction by A2,A3,ARYTM_1:10; end; then A5: not b in {[0,0]} by TARSKI:def 1; A6: xx -' 09 = xx -' 09 + 09 by ARYTM_2:def 8 .= xx by A3,ARYTM_1:def 1; 0 in {0} by TARSKI:def 1; then A7: b in [:{0},REAL+:] by A4,ZFMISC_1:87; then b in REAL+ \/ [:{0},REAL+:] by XBOOLE_0:def 3; then reconsider b as Element of REAL by A5,NUMBERS:def 1,XBOOLE_0:def 5; consider x1,x2,y1,y2 being Element of REAL such that A8: a = [*x1,x2*] and A9: b = [*y1,y2*] and A10: a+b = [*+(x1,y1),+(x2,y2)*] by XCMPLX_0:def 4; +(x2,y2) = 0 by A10,ARYTM_0:24; then A11: a+b = +(x1,y1) by A10,ARYTM_0:def 5; a in REAL by XREAL_0:def 1; then x2 = 0 by A8,ARYTM_0:24; then A12: a = x1 by A8,ARYTM_0:def 5; y2 = 0 by A9,ARYTM_0:24; then A13: b = y1 by A9,ARYTM_0:def 5; then consider x9,y9 being Element of REAL+ such that A14: x1 = x9 and A15: y1 = [0,y9] and A16: +(x1,y1) = x9 - y9 by A1,A7,A12,ARYTM_0:def 1; y9 = xx -' 09 by A4,A13,A15,XTUPLE_0:1; then a + b = 0 by A1,A12,A11,A14,A16,A6,ARYTM_1:18; hence thesis; end; end; Lm4: x in RAT implies ex m,n st x = m/n proof assume A1: x in RAT; per cases by A1,NUMBERS:def 3,XBOOLE_0:def 3; suppose x in RAT+; then reconsider x as Element of RAT+; take numerator x,denominator x; quotient(numerator x,denominator x) = x by ARYTM_3:39; hence thesis by Lm2; end; suppose A2: x in [:{0},RAT+:]; A3: not x in {[0,0]} by A1,NUMBERS:def 3,XBOOLE_0:def 5; consider x1,x2 being set such that A4: x1 in {0} and A5: x2 in RAT+ and A6: x = [x1,x2] by A2,ZFMISC_1:84; reconsider x2 as Element of RAT+ by A5; reconsider x9 = x2 as Element of REAL+ by A5,ARYTM_2:1; x = [0,x9] by A4,A6,TARSKI:def 1; then A7: x2 <> 0 by A3,TARSKI:def 1; take m = -numerator x2, n = denominator x2; A8: x2 = quotient(numerator x2,denominator x2) by ARYTM_3:39 .= numerator x2/n by Lm2; x1 = 0 by A4,TARSKI:def 1; hence x = 09 - x9 by A6,A7,ARYTM_1:19 .= -numerator x2/n by A8,Lm3 .= m/n; end; end; Lm5: x = m/l implies x in RAT proof A1: m is Element of INT by INT_1:def 2; assume A2: x = m/l; then A3: not x in {[0,0]} by NUMBERS:def 1,XBOOLE_0:def 5; per cases; suppose l = 0; then x = m * 0" by A2 .= 0; then x in RAT+ \/ [:{0},RAT+:] by Lm1,XBOOLE_0:def 3; hence thesis by A3,NUMBERS:def 3,XBOOLE_0:def 5; end; suppose ex k st m = k; then consider k such that A4: m = k; x = quotient(k,l) by A2,A4,Lm2; then x in RAT+ \/ [:{0},RAT+:] by XBOOLE_0:def 3; hence thesis by A3,NUMBERS:def 3,XBOOLE_0:def 5; end; suppose that A5: l <> 0 and A6: for k holds m <> k; consider k such that A7: m = -k by A1,A6,INT_1:def 1; A8: k/l = quotient(k,l) by Lm2; then k/l in RAT+; then reconsider x9 = k/l as Element of REAL+ by ARYTM_2:1; A9: 0 in {0} by TARSKI:def 1; A10: x = -k/l by A2,A7; m <> 0 by A6; then A11: x9 <> 0 by A2,A5,A10,XCMPLX_1:50; x = 09 - x9 by A10,Lm3 .= [0,x9] by A11,ARYTM_1:19; then x in [:{0},RAT+:] by A8,A9,ZFMISC_1:87; then x in RAT+ \/ [:{0},RAT+:] by XBOOLE_0:def 3; hence thesis by A3,NUMBERS:def 3,XBOOLE_0:def 5; end; end; Lm6: x = m/n implies x in RAT proof assume A1: x = m/n; n is Element of INT by INT_1:def 2; then consider k such that A2: n = k or n = -k by INT_1:def 1; per cases by A2; suppose n = k; hence thesis by A1,Lm5; end; suppose n = -k; then x = (-m)/k by A1,XCMPLX_1:192; hence thesis by Lm5; end; end; definition redefine func RAT means :Def1: x in it iff ex m,n st x = m/n; compatibility proof let R be set; thus R = RAT implies for x holds x in R iff ex m,n st x = m/n by Lm4,Lm6; assume A1: for x holds x in R iff ex m,n st x = m/n; thus R c= RAT proof let x; assume x in R; then ex m,n st x = m/n by A1; hence thesis by Lm6; end; let x; assume x in RAT; then ex m,n st x = m/n by Lm4; hence thesis by A1; end; end; definition let r be number; attr r is rational means :Def2: r in RAT; end; registration cluster rational for Real; existence proof reconsider a = 0, b = 1 as Integer; take x=a/b; thus x is Real; thus x in RAT by Def1; end; end; registration cluster rational for number; existence proof reconsider a = 0, b = 1 as Integer; take x=a/b; thus x in RAT by Def1; end; end; definition mode Rational is rational number; end; theorem Th1: x in RAT implies ex m,n st n<>0 & x = m/n proof assume A1: x in RAT; per cases; suppose x = 0; then x = 0/1; hence thesis; end; suppose A2: x <> 0; consider m,n such that A3: x = m/n by A1,Def1; take m,n; hereby assume n = 0; then n" = 0; hence contradiction by A2,A3; end; thus thesis by A3; end; end; theorem Th2: x is Rational implies ex m,n st n<>0 & x = m/n proof assume x is Rational; then x in RAT by Def2; hence thesis by Th1; end; registration cluster rational -> real for number; coherence proof let n be number; assume n in RAT; hence n in REAL by NUMBERS:12; end; end; theorem Th3: m/n is rational proof set x = m/n; x is Rational iff x in RAT by Def2; hence thesis by Def1; end; registration cluster integer -> rational for number; coherence proof let x be number; assume x is integer; then reconsider x as Integer; x = x/1; hence thesis by Th3; end; end; reserve p,q for Rational; registration let p,q; cluster p*q -> rational; coherence proof consider m2,n2 being Integer such that n2<>0 and A1: q = m2/n2 by Th2; consider m1,n1 being Integer such that n1<>0 and A2: p = m1/n1 by Th2; p*q=(m1*m2)/(n1*n2) by A2,A1,XCMPLX_1:76; hence thesis by Th3; end; cluster p+q -> rational; coherence proof consider m2,n2 being Integer such that A3: n2<>0 and A4: q = m2/n2 by Th2; consider m1,n1 being Integer such that A5: n1<>0 and A6: p = m1/n1 by Th2; p+q=(m1*n2+m2*n1)/(n1*n2) by A5,A6,A3,A4,XCMPLX_1:116; hence thesis by Th3; end; cluster p-q -> rational; coherence proof consider m2,n2 being Integer such that A7: n2<>0 and A8: q = m2/n2 by Th2; consider m1,n1 being Integer such that A9: n1<>0 and A10: p = m1/n1 by Th2; p-q=(m1*n2-m2*n1)/(n1*n2) by A9,A10,A7,A8,XCMPLX_1:130; hence thesis by Th3; end; cluster p/q -> rational; coherence proof consider m1,n1 being Integer such that n1<>0 and A11: p = m1/n1 by Th2; consider m2,n2 being Integer such that n2<>0 and A12: q = m2/n2 by Th2; p/q = p*(1/(m2/n2)) by A12 .= p*((1*n2)/m2) by XCMPLX_1:77 .= (m1*n2)/(n1*m2) by A11,XCMPLX_1:76; hence thesis by Th3; end; end; registration let p; cluster -p -> rational; coherence proof consider m,n such that n<>0 and A1: p=m/n by Th2; -p = (-m)/n by A1; hence thesis; end; cluster p" -> rational; coherence proof p" = 1/p; hence thesis; end; end; canceled 3; theorem am by A1,INT_1:29; m*a-1<[\m*a/] by INT_1:def 6; then m*a<[\m*a/]+1 by XREAL_1:19; then m"*(m*a)0 & p=m/k proof consider m,n such that A1: n<>0 and A2: p=m/n by Th2; per cases by A1; suppose 00 by A1; -n is Element of NAT by A3,INT_1:3; hence thesis by A4,A5; end; end; theorem Th9: ex m,k st k<>0 & p=m/k & for n,l st l<>0 & p=n/l holds k<=l proof defpred P[Nat] means ($1<>0 & ex m1 st p=m1/$1); ex m,k st k<>0 & p=m/k by Th8; then A1: ex l be Nat st P[l]; ex k1 be Nat st P[k1] & for l1 be Nat st P[l1] holds k1<=l1 from NAT_1: sch 5(A1); then consider k1 be Nat such that A2: k1<>0 and A3: ex m1 st p=m1/k1 and A4: for l1 be Nat st (l1<>0 & ex n1 st p=n1/l1) holds k1<=l1; reconsider k1 as Element of NAT by ORDINAL1:def 12; consider m1 such that A5: p=m1/k1 and A6: for l1 be Nat st (l1<>0 & ex n1 st p=n1/l1) holds k1<=l1 by A3,A4; take m1, k1; thus k1<>0 by A2; thus m1/k1=p by A5; thus thesis by A6; end; definition let p; func denominator(p) -> Element of NAT means :Def3: it<>0 & (ex m st p=m/it) & for n,k st k<>0 & p=n/k holds it<=k; existence proof consider m,k such that A1: k<>0 and A2: p=m/k and A3: for n,l st l<>0 & p=n/l holds k<=l by Th9; take k; thus thesis by A1,A2,A3; end; uniqueness proof let k,l such that A4: k<>0 and A5: ex m st p=m/k and A6: for m1,k1 st k1<>0 & p=m1/k1 holds k<=k1 and A7: l<>0 and A8: ex n st p=n/l and A9: for n1,l1 st l1<>0 & p=n1/l1 holds l<=l1; A10: l<=k by A4,A5,A9; k<=l by A6,A7,A8; hence thesis by A10,XXREAL_0:1; end; end; definition let p; func numerator(p) -> Integer equals denominator(p)*p; coherence proof A1: denominator(p)<>0 by Def3; ex m st p=m/denominator(p) by Def3; hence thesis by A1,XCMPLX_1:87; end; end; theorem Th10: 0 denominator p by Def3; hence thesis; end; theorem Th11: 1<=denominator(p) proof 0=denominator(p)" proof A1: 1*denominator(p)"<=denominator(p)*denominator(p)" by Th11,XREAL_1:64; 0<>denominator(p) by Def3; hence thesis by A1,XCMPLX_0:def 7; end; theorem Th14: numerator(p)=0 iff p=0 proof denominator(p)<>0 by Def3; hence thesis by XCMPLX_1:6; end; theorem Th15: p=numerator(p)/denominator(p) & p=numerator(p)*denominator(p)" & p=denominator(p)"*numerator(p) proof set x=denominator(p); A1: x<>0 by Def3; thus A2: numerator(p)/denominator(p)=p*(x*x") .=p*1 by A1,XCMPLX_0:def 7 .=p; hence p=numerator(p)*denominator(p)"; thus thesis by A2; end; theorem p<>0 implies denominator(p)=numerator(p)/p proof A1: (p"*p)*denominator(p)=p"*numerator(p); assume p<>0; then 1*denominator(p)=p"*numerator(p) by A1,XCMPLX_0:def 7; hence thesis; end; theorem Th17: p is Integer implies denominator(p)=1 & numerator(p)=p proof assume p is Integer; then reconsider m=p as Integer; p =m/1; then A1: denominator(p)<=1 by Def3; 1<=denominator(p) by Th11; hence denominator(p)=1 by A1,XXREAL_0:1; hence thesis; end; theorem Th18: (numerator(p)=p or denominator(p)=1) implies p is Integer proof assume A1: numerator(p)=p or denominator(p)=1; per cases by A1; suppose numerator(p)=p; hence thesis; end; suppose denominator(p)=1; then numerator(p)=p; hence thesis; end; end; theorem numerator(p)=p iff denominator(p)=1 by Th17; theorem (numerator(p)=p or denominator(p)=1) & 0<=p implies p is Element of NAT proof assume that A1: numerator(p)=p or denominator(p)=1 and A2: 0<=p; p is Integer by A1,Th18; hence thesis by A2,INT_1:3; end; theorem 1=1 by Th11; hence denominator(p)>1 by A1,Th18,XXREAL_0:1; end; hence thesis by Th17; end; Lm7: 1"=1; theorem 1>denominator(p)" iff p is not integer proof A1: denominator(p)"<=1 by Th13; now assume not p is Integer; then denominator(p)" <> 1 by Lm7,Th18; hence denominator(p)"<1 by A1,XXREAL_0:1; end; hence thesis by Lm7,Th17; end; theorem Th23: numerator(p)=denominator(p) iff p=1 proof A1: denominator(p)<>0 by Def3; now assume numerator(p)=denominator(p); then numerator(p)/denominator(p)=1 by A1,XCMPLX_1:60; hence p=1 by Th15; end; hence thesis; end; theorem Th24: numerator(p)=-denominator(p) iff p=-1 proof A1: 0<>denominator(p) by Def3; now assume numerator(p)=-denominator(p); hence p=(-denominator(p))/denominator(p) by Th15 .=-denominator(p)/denominator(p) .=-1 by A1,XCMPLX_1:60; end; hence thesis; end; theorem -numerator(p)=denominator(p) iff p=-1 proof -numerator(p)=denominator(p) iff numerator(p)=-denominator(p); hence thesis by Th24; end; theorem Th26: m<>0 implies p=(numerator(p)*m)/(denominator(p)*m) proof assume m<>0; then numerator(p)/denominator(p)=(numerator(p)*m)/(denominator(p)*m) by XCMPLX_1:91; hence thesis by Th15; end; theorem Th27: k<>0 & p=m/k implies ex l st m=numerator(p)*l & k=denominator(p) *l proof assume that A1: k<>0 and A2: p=m/k; A3: p*k=m by A1,A2,XCMPLX_1:87; defpred P[Nat] means $1*denominator(p)<=k; A4: denominator(p)<>0 by Def3; A5: for l be Nat st P[l] holds l<=k proof 0+1<=denominator(p) by A4,NAT_1:13; then A6: k*1<=k*denominator(p) by NAT_1:4; let l be Nat such that A7: l*denominator(p)<=k; assume not thesis; then k*denominator(p)l by A8,A11; then A13: l*denominator(p)<>0 by A4,XCMPLX_1:6; A14: now assume A15: l*denominator(p)x by A15; m/k=(numerator(p)*l)/(l*denominator(p)) by A2,A12,Th26; then p=(m-numerator(p)*l)/x by A2,A13,A15,XCMPLX_1:123; then denominator(p)<=k-l*denominator(p) by A16,Def3; then l*denominator(p)+1*denominator(p)<=k by XREAL_1:19; then (l+1)*denominator(p)<=k; then l+1<=l by A11; hence contradiction by NAT_1:13; end; then k=denominator(p)*l by A10,XXREAL_0:1; hence m=numerator(p)/denominator(p)*(denominator(p)*l) by A3,Th15 .=(numerator(p)/denominator(p)*denominator(p))*l .=numerator(p)*l by A4,XCMPLX_1:87; thus thesis by A10,A14,XXREAL_0:1; end; theorem p=m/n & n<>0 implies ex m1 st m=numerator(p)*m1 & n=denominator(p)*m1 proof assume that A1: p=m/n and A2: n<>0; per cases by A2; suppose n<0; then reconsider x=-n as Element of NAT by INT_1:3; A3: p=-(-m)/n by A1 .=(-m)/x by XCMPLX_1:188; x<>0 by A2; then consider k such that A4: -m=numerator(p)*k and A5: x=denominator(p)*k by A3,Th27; take y=-k; thus m=-numerator(p)*k by A4 .=numerator(p)*y; thus n=-denominator(p)*k by A5 .=denominator(p)*y; end; suppose 00 by A4,Def3; then k*10 & not ex l st 10 and A3: not ex l st 1denominator(p) by Def3; A2: 0denominator(p) by Def3; A2: 0denominator(p) by Def3; A3: now assume a*denominator(p)0 by Def3; A2: now assume A3: a*denominator(p)<=numerator(p); per cases by A3,XXREAL_0:1; suppose a*denominator(p)=numerator(p); then p=(a*denominator(p))/(1*denominator(p)) by Th15 .=(a/1)*(denominator(p)/denominator(p)) .=a by A1,XCMPLX_1:60; hence a<=p; end; suppose a*denominator(p)=a*denominator(p); end; suppose a0 by Def3; A2: p=-(-p) .=-numerator(-p)/denominator(-p) by Th15 .=(-numerator(-p))/denominator(-p); denominator(-p)<>0 by Def3; then consider l such that -numerator(-p)=numerator(p)*l and A3: denominator(-p)=denominator(p)*l by A2,Th27; -p=-numerator(p)/denominator(p) by Th15 .=(-numerator(p))/denominator(p); then consider k such that A4: -numerator(p)=numerator(-p)*k and A5: denominator(p)=denominator(-p)*k by A1,Th27; denominator p = denominator(p)*l*k by A5,A3 .= denominator(p)*(l*k); then A6: k = 1 by A1,NAT_1:15,XCMPLX_1:7; hence denominator(p)=denominator(-p) by A5; thus thesis by A4,A6; end; theorem Th44: 0

numerator(p) by A2,Th38; hence numerator(p)=denominator(q) & denominator(p)=numerator(q) by A4,A5 ,Th30; end; now assume that A10: numerator(q)=denominator(p) and A11: denominator(q)=numerator(p); thus 0

integer-membered for set; coherence proof let X; assume A1: X is natural-membered; let x; assume x in X; then x is natural by A1,Def6; then x in omega by ORDINAL1:def 12; hence x in INT by NUMBERS:17; end; cluster integer-membered -> rational-membered for set; coherence proof let X; assume A2: X is integer-membered; let x; assume x in X; then x is integer by A2,Def5; then x in INT by INT_1:def 2; hence x in RAT by NUMBERS:14; end; cluster rational-membered -> real-membered for set; coherence proof let X; assume A3: X is rational-membered; let x; assume x in X; then x is rational by A3,Def4; then x in RAT by RAT_1:def 2; hence x in REAL by NUMBERS:12; end; cluster real-membered -> ext-real-membered for set; coherence proof let X; assume A4: X is real-membered; let x; assume x in X; then x is real by A4,Def3; then x in REAL by XREAL_0:def 1; hence x in ExtREAL by NUMBERS:31; end; cluster real-membered -> complex-membered for set; coherence proof let X; assume A5: X is real-membered; let x; assume x in X; then x is real by A5,Def3; then x in REAL by XREAL_0:def 1; hence x in COMPLEX by NUMBERS:11; end; end; registration cluster non empty natural-membered for set; existence proof take 1; thus 1 is non empty; let x; assume x in 1; hence thesis by CARD_1:49,TARSKI:def 1; end; end; registration cluster -> complex-membered for Subset of COMPLEX; coherence proof let S be Subset of COMPLEX; let x; thus thesis; end; cluster -> ext-real-membered for Subset of ExtREAL; coherence proof let S be Subset of ExtREAL; let x; thus thesis by XXREAL_0:def 1; end; cluster -> real-membered for Subset of REAL; coherence proof let S be Subset of REAL; let x; thus thesis; end; cluster -> rational-membered for Subset of RAT; coherence proof let S be Subset of RAT; let x; thus thesis by RAT_1:def 2; end; cluster -> integer-membered for Subset of INT; coherence proof let S be Subset of INT; let x; thus thesis; end; cluster -> natural-membered for Subset of NAT; coherence proof let S be Subset of NAT; let x; thus thesis; end; end; registration cluster COMPLEX -> complex-membered; coherence proof let x; thus thesis; end; cluster ExtREAL -> ext-real-membered; coherence proof let x; thus thesis by XXREAL_0:def 1; end; cluster REAL -> real-membered; coherence proof let x; thus thesis; end; cluster RAT -> rational-membered; coherence proof let x; thus thesis by RAT_1:def 2; end; cluster INT -> integer-membered; coherence proof let x; thus thesis; end; cluster NAT -> natural-membered; coherence proof let x; thus thesis; end; end; theorem Th1: X is complex-membered implies X c= COMPLEX proof assume A1: X is complex-membered; let x; assume x in X; then x is complex by A1,Def1; hence thesis by XCMPLX_0:def 2; end; theorem Th2: X is ext-real-membered implies X c= ExtREAL proof assume A1: X is ext-real-membered; let x; assume x in X; then x is ext-real by A1,Def2; hence thesis by XXREAL_0:def 1; end; theorem Th3: X is real-membered implies X c= REAL proof assume A1: X is real-membered; let x; assume x in X; then x is real by A1,Def3; hence thesis by XREAL_0:def 1; end; theorem Th4: X is rational-membered implies X c= RAT proof assume A1: X is rational-membered; let x; assume x in X; then x is rational by A1,Def4; hence thesis by RAT_1:def 2; end; theorem Th5: X is integer-membered implies X c= INT proof assume A1: X is integer-membered; let x; assume x in X; then x is integer by A1,Def5; hence thesis by INT_1:def 2; end; theorem Th6: X is natural-membered implies X c= NAT proof assume A1: X is natural-membered; let x; assume x in X; then x is natural by A1,Def6; hence thesis by ORDINAL1:def 12; end; registration let X be complex-membered set; cluster -> complex for Element of X; coherence proof let e be Element of X; per cases; suppose X is empty; hence thesis by SUBSET_1:def 1; end; suppose X is non empty; hence thesis by Def1; end; end; end; registration let X be ext-real-membered set; cluster -> ext-real for Element of X; coherence proof let e be Element of X; per cases; suppose X is empty; hence thesis by SUBSET_1:def 1; end; suppose X is non empty; hence thesis by Def2; end; end; end; registration let X be real-membered set; cluster -> real for Element of X; coherence proof let e be Element of X; per cases; suppose X is empty; hence thesis by SUBSET_1:def 1; end; suppose X is non empty; hence thesis by Def3; end; end; end; registration let X be rational-membered set; cluster -> rational for Element of X; coherence proof let e be Element of X; per cases; suppose X is empty; hence thesis by SUBSET_1:def 1; end; suppose X is non empty; hence thesis by Def4; end; end; end; registration let X be integer-membered set; cluster -> integer for Element of X; coherence proof let e be Element of X; per cases; suppose X is empty; hence thesis by SUBSET_1:def 1; end; suppose X is non empty; hence thesis by Def5; end; end; end; registration let X be natural-membered set; cluster -> natural for Element of X; coherence proof let e be Element of X; per cases; suppose X is empty; hence thesis by SUBSET_1:def 1; end; suppose X is non empty; hence thesis by Def6; end; end; end; reserve c, c1, c2, c3 for complex number, e, e1, e2, e3 for ext-real number, r , r1, r2, r3 for real number, w, w1, w2, w3 for rational number, i, i1, i2, i3 for integer number, n, n1, n2, n3 for Nat; theorem for X being non empty complex-membered set ex c st c in X proof let X be non empty complex-membered set; ex x being set st x in X by XBOOLE_0:def 1; hence thesis; end; theorem for X being non empty ext-real-membered set ex e st e in X proof let X be non empty ext-real-membered set; ex x being set st x in X by XBOOLE_0:def 1; hence thesis; end; theorem for X being non empty real-membered set ex r st r in X proof let X be non empty real-membered set; ex x being set st x in X by XBOOLE_0:def 1; hence thesis; end; theorem for X being non empty rational-membered set ex w st w in X proof let X be non empty rational-membered set; ex x being set st x in X by XBOOLE_0:def 1; hence thesis; end; theorem for X being non empty integer-membered set ex i st i in X proof let X be non empty integer-membered set; ex x being set st x in X by XBOOLE_0:def 1; hence thesis; end; theorem for X being non empty natural-membered set ex n st n in X proof let X be non empty natural-membered set; ex x being set st x in X by XBOOLE_0:def 1; hence thesis; end; theorem for X being complex-membered set st for c holds c in X holds X = COMPLEX proof let X be complex-membered set such that A1: for c holds c in X; thus X c= COMPLEX by Th1; let e be set; assume e in COMPLEX; hence thesis by A1; end; theorem for X being ext-real-membered set st for e holds e in X holds X = ExtREAL proof let X be ext-real-membered set such that A1: for e holds e in X; thus X c= ExtREAL by Th2; let e be set; assume e in ExtREAL; hence thesis by A1; end; theorem for X being real-membered set st for r holds r in X holds X = REAL proof let X be real-membered set such that A1: for r holds r in X; thus X c= REAL by Th3; let e be set; assume e in REAL; hence thesis by A1; end; theorem for X being rational-membered set st for w holds w in X holds X = RAT proof let X be rational-membered set such that A1: for w holds w in X; thus X c= RAT by Th4; let e be set; assume e in RAT; hence thesis by A1; end; theorem for X being integer-membered set st for i holds i in X holds X = INT proof let X be integer-membered set such that A1: for i holds i in X; thus X c= INT by Th5; let e be set; assume e in INT; hence thesis by A1; end; theorem for X being natural-membered set st for n holds n in X holds X = NAT proof let X be natural-membered set such that A1: for n holds n in X; thus X c= NAT by Th6; let e be set; assume e in NAT; hence thesis by A1; end; theorem Th19: for Y being complex-membered set st X c= Y holds X is complex-membered proof let Y be complex-membered set such that A1: X c= Y; let x; thus thesis by A1; end; theorem Th20: for Y being ext-real-membered set st X c= Y holds X is ext-real-membered proof let Y be ext-real-membered set such that A1: X c= Y; let x; thus thesis by A1; end; theorem Th21: for Y being real-membered set st X c= Y holds X is real-membered proof let Y be real-membered set such that A1: X c= Y; let x; thus thesis by A1; end; theorem Th22: for Y being rational-membered set st X c= Y holds X is rational-membered proof let Y be rational-membered set such that A1: X c= Y; let x; thus thesis by A1; end; theorem Th23: for Y being integer-membered set st X c= Y holds X is integer-membered proof let Y be integer-membered set such that A1: X c= Y; let x; thus thesis by A1; end; theorem Th24: for Y being natural-membered set st X c= Y holds X is natural-membered proof let Y be natural-membered set such that A1: X c= Y; let x; thus thesis by A1; end; registration cluster empty -> natural-membered for set; coherence proof let X be set such that A1: X is empty; let x; thus thesis by A1; end; end; registration let c; cluster {c} -> complex-membered; coherence proof let e be set; thus thesis by TARSKI:def 1; end; end; registration let e; cluster {e} -> ext-real-membered; coherence proof let e be set; thus thesis by TARSKI:def 1; end; end; registration let r; cluster {r} -> real-membered; coherence proof let e be set; thus thesis by TARSKI:def 1; end; end; registration let w; cluster {w} -> rational-membered; coherence proof let e be set; thus thesis by TARSKI:def 1; end; end; registration let i; cluster {i} -> integer-membered; coherence proof let e be set; thus thesis by TARSKI:def 1; end; end; registration let n; cluster {n} -> natural-membered; coherence proof let e be set; thus thesis by TARSKI:def 1; end; end; registration let c1,c2; cluster {c1,c2} -> complex-membered; coherence proof let e be set; thus thesis by TARSKI:def 2; end; end; registration let e1,e2; cluster {e1,e2} -> ext-real-membered; coherence proof let e be set; thus thesis by TARSKI:def 2; end; end; registration let r1,r2; cluster {r1,r2} -> real-membered; coherence proof let e be set; thus thesis by TARSKI:def 2; end; end; registration let w1,w2; cluster {w1,w2} -> rational-membered; coherence proof let e be set; thus thesis by TARSKI:def 2; end; end; registration let i1,i2; cluster {i1,i2} -> integer-membered; coherence proof let e be set; thus thesis by TARSKI:def 2; end; end; registration let n1,n2; cluster {n1,n2} -> natural-membered; coherence proof let e be set; thus thesis by TARSKI:def 2; end; end; registration let c1,c2,c3; cluster {c1,c2,c3} -> complex-membered; coherence proof let e be set; thus thesis by ENUMSET1:def 1; end; end; registration let e1,e2,e3; cluster {e1,e2,e3} -> ext-real-membered; coherence proof let e be set; thus thesis by ENUMSET1:def 1; end; end; registration let r1,r2,r3; cluster {r1,r2,r3} -> real-membered; coherence proof let e be set; thus thesis by ENUMSET1:def 1; end; end; registration let w1,w2,w3; cluster {w1,w2,w3} -> rational-membered; coherence proof let e be set; thus thesis by ENUMSET1:def 1; end; end; registration let i1,i2,i3; cluster {i1,i2,i3} -> integer-membered; coherence proof let e be set; thus thesis by ENUMSET1:def 1; end; end; registration let n1,n2,n3; cluster {n1,n2,n3} -> natural-membered; coherence proof let e be set; thus thesis by ENUMSET1:def 1; end; end; registration let X be complex-membered set; cluster -> complex-membered for Subset of X; coherence proof let S be Subset of X, x; thus thesis; end; end; registration let X be ext-real-membered set; cluster -> ext-real-membered for Subset of X; coherence proof let S be Subset of X, x; thus thesis; end; end; registration let X be real-membered set; cluster -> real-membered for Subset of X; coherence proof let S be Subset of X, x; thus thesis; end; end; registration let X be rational-membered set; cluster -> rational-membered for Subset of X; coherence proof let S be Subset of X, x; thus thesis; end; end; registration let X be integer-membered set; cluster -> integer-membered for Subset of X; coherence proof let S be Subset of X, x; thus thesis; end; end; registration let X be natural-membered set; cluster -> natural-membered for Subset of X; coherence proof let S be Subset of X, x; thus thesis; end; end; registration let X,Y be complex-membered set; cluster X \/ Y -> complex-membered; coherence proof let x; assume x in X \/ Y; then x in X or x in Y by XBOOLE_0:def 3; hence thesis; end; end; registration let X,Y be ext-real-membered set; cluster X \/ Y -> ext-real-membered; coherence proof let x; assume x in X \/ Y; then x in X or x in Y by XBOOLE_0:def 3; hence thesis; end; end; registration let X,Y be real-membered set; cluster X \/ Y -> real-membered; coherence proof let x; assume x in X \/ Y; then x in X or x in Y by XBOOLE_0:def 3; hence thesis; end; end; registration let X,Y be rational-membered set; cluster X \/ Y -> rational-membered; coherence proof let x; assume x in X \/ Y; then x in X or x in Y by XBOOLE_0:def 3; hence thesis; end; end; registration let X,Y be integer-membered set; cluster X \/ Y -> integer-membered; coherence proof let x; assume x in X \/ Y; then x in X or x in Y by XBOOLE_0:def 3; hence thesis; end; end; registration let X,Y be natural-membered set; cluster X \/ Y -> natural-membered; coherence proof let x; assume x in X \/ Y; then x in X or x in Y by XBOOLE_0:def 3; hence thesis; end; end; registration let X be complex-membered set, Y be set; cluster X /\ Y -> complex-membered; coherence by Th19,XBOOLE_1:17; cluster Y /\ X -> complex-membered; coherence; end; registration let X be ext-real-membered set, Y be set; cluster X /\ Y -> ext-real-membered; coherence by Th20,XBOOLE_1:17; cluster Y /\ X -> ext-real-membered; coherence; end; registration let X be real-membered set, Y be set; cluster X /\ Y -> real-membered; coherence by Th21,XBOOLE_1:17; cluster Y /\ X -> real-membered; coherence; end; registration let X be rational-membered set, Y be set; cluster X /\ Y -> rational-membered; coherence by Th22,XBOOLE_1:17; cluster Y /\ X -> rational-membered; coherence; end; registration let X be integer-membered set, Y be set; cluster X /\ Y -> integer-membered; coherence by Th23,XBOOLE_1:17; cluster Y /\ X -> integer-membered; coherence; end; registration let X be natural-membered set, Y be set; cluster X /\ Y -> natural-membered; coherence by Th24,XBOOLE_1:17; cluster Y /\ X -> natural-membered; coherence; end; registration let X be complex-membered set, Y be set; cluster X \ Y -> complex-membered; coherence; end; registration let X be ext-real-membered set, Y be set; cluster X \ Y -> ext-real-membered; coherence; end; registration let X be real-membered set, Y be set; cluster X \ Y -> real-membered; coherence; end; registration let X be rational-membered set, Y be set; cluster X \ Y -> rational-membered; coherence; end; registration let X be integer-membered set, Y be set; cluster X \ Y -> integer-membered; coherence; end; registration let X be natural-membered set, Y be set; cluster X \ Y -> natural-membered; coherence; end; registration let X,Y be complex-membered set; cluster X \+\ Y -> complex-membered; coherence; end; registration let X,Y be ext-real-membered set; cluster X \+\ Y -> ext-real-membered; coherence; end; registration let X,Y be real-membered set; cluster X \+\ Y -> real-membered; coherence; end; registration let X,Y be rational-membered set; cluster X \+\ Y -> rational-membered; coherence; end; registration let X,Y be integer-membered set; cluster X \+\ Y -> integer-membered; coherence; end; registration let X,Y be natural-membered set; cluster X \+\ Y -> natural-membered; coherence; end; definition let X be complex-membered set, Y be set; redefine pred X c= Y means :Def7: c in X implies c in Y; compatibility proof thus X c= Y implies for c st c in X holds c in Y; assume A1: c in X implies c in Y; let x; assume x in X; hence thesis by A1; end; end; definition let X be ext-real-membered set, Y be set; redefine pred X c= Y means :Def8: e in X implies e in Y; compatibility proof thus X c= Y implies for e st e in X holds e in Y; assume A1: e in X implies e in Y; let x; assume x in X; hence thesis by A1; end; end; definition let X be real-membered set, Y be set; redefine pred X c= Y means :Def9: r in X implies r in Y; compatibility proof thus X c= Y implies for r st r in X holds r in Y; assume A1: r in X implies r in Y; let e; assume e in X; hence thesis by A1; end; end; definition let X be rational-membered set, Y be set; redefine pred X c= Y means :Def10: w in X implies w in Y; compatibility proof thus X c= Y implies for w st w in X holds w in Y; assume A1: w in X implies w in Y; let r; assume r in X; hence thesis by A1; end; end; definition let X be integer-membered set, Y be set; redefine pred X c= Y means :Def11: i in X implies i in Y; compatibility proof thus X c= Y implies for i st i in X holds i in Y; assume A1: i in X implies i in Y; let w; assume w in X; hence thesis by A1; end; end; definition let X be natural-membered set, Y be set; redefine pred X c= Y means :Def12: n in X implies n in Y; compatibility proof thus X c= Y implies for n st n in X holds n in Y; assume A1: n in X implies n in Y; let i; assume i in X; hence thesis by A1; end; end; definition let X,Y be complex-membered set; redefine pred X = Y means c in X iff c in Y; compatibility proof thus X = Y implies for c holds c in X iff c in Y; assume c in X iff c in Y; hence X c= Y & Y c= X by Def7; end; end; definition let X,Y be ext-real-membered set; redefine pred X = Y means e in X iff e in Y; compatibility proof thus X = Y implies for e holds e in X iff e in Y; assume e in X iff e in Y; then X c= Y & Y c= X by Def8; hence thesis by XBOOLE_0:def 10; end; end; definition let X,Y be real-membered set; redefine pred X = Y means r in X iff r in Y; compatibility proof thus X = Y implies for r holds r in X iff r in Y; assume r in X iff r in Y; then X c= Y & Y c= X by Def9; hence thesis by XBOOLE_0:def 10; end; end; definition let X,Y be rational-membered set; redefine pred X = Y means w in X iff w in Y; compatibility proof thus X = Y implies for w holds w in X iff w in Y; assume w in X iff w in Y; then X c= Y & Y c= X by Def10; hence thesis by XBOOLE_0:def 10; end; end; definition let X,Y be integer-membered set; redefine pred X = Y means i in X iff i in Y; compatibility proof thus X = Y implies for i holds i in X iff i in Y; assume i in X iff i in Y; then X c= Y & Y c= X by Def11; hence thesis by XBOOLE_0:def 10; end; end; definition let X,Y be natural-membered set; redefine pred X = Y means n in X iff n in Y; compatibility proof thus X = Y implies for n holds n in X iff n in Y; assume n in X iff n in Y; then X c= Y & Y c= X by Def12; hence thesis by XBOOLE_0:def 10; end; end; definition let X,Y be complex-membered set; redefine pred X meets Y means ex c st c in X & c in Y; compatibility proof thus X misses Y implies not ex c st c in X & c in Y by XBOOLE_0:3; assume A1: not ex c st c in X & c in Y; assume X meets Y; then ex x st x in X & x in Y by XBOOLE_0:3; hence thesis by A1; end; end; definition let X,Y be ext-real-membered set; redefine pred X meets Y means ex e st e in X & e in Y; compatibility proof thus X misses Y implies not ex e st e in X & e in Y by XBOOLE_0:3; assume A1: not ex e st e in X & e in Y; assume X meets Y; then ex x st x in X & x in Y by XBOOLE_0:3; hence thesis by A1; end; end; definition let X,Y be real-membered set; redefine pred X meets Y means ex r st r in X & r in Y; compatibility proof thus X misses Y implies not ex r st r in X & r in Y by XBOOLE_0:3; assume A1: not ex r st r in X & r in Y; assume X meets Y; then ex x st x in X & x in Y by XBOOLE_0:3; hence thesis by A1; end; end; definition let X,Y be rational-membered set; redefine pred X meets Y means ex w st w in X & w in Y; compatibility proof thus X misses Y implies not ex w st w in X & w in Y by XBOOLE_0:3; assume A1: not ex w st w in X & w in Y; assume X meets Y; then ex x st x in X & x in Y by XBOOLE_0:3; hence thesis by A1; end; end; definition let X,Y be integer-membered set; redefine pred X meets Y means ex i st i in X & i in Y; compatibility proof thus X misses Y implies not ex i st i in X & i in Y by XBOOLE_0:3; assume A1: not ex i st i in X & i in Y; assume X meets Y; then ex x st x in X & x in Y by XBOOLE_0:3; hence thesis by A1; end; end; definition let X,Y be natural-membered set; redefine pred X meets Y means ex n st n in X & n in Y; compatibility proof thus X misses Y implies not ex n st n in X & n in Y by XBOOLE_0:3; assume A1: not ex n st n in X & n in Y; assume X meets Y; then ex x st x in X & x in Y by XBOOLE_0:3; hence thesis by A1; end; end; theorem (for X st X in F holds X is complex-membered) implies union F is complex-membered proof assume A1: for X st X in F holds X is complex-membered; let x; assume x in union F; then consider X such that A2: x in X and A3: X in F by TARSKI:def 4; X is complex-membered by A1,A3; hence thesis by A2; end; theorem (for X st X in F holds X is ext-real-membered) implies union F is ext-real-membered proof assume A1: for X st X in F holds X is ext-real-membered; let x; assume x in union F; then consider X such that A2: x in X and A3: X in F by TARSKI:def 4; X is ext-real-membered by A1,A3; hence thesis by A2; end; theorem (for X st X in F holds X is real-membered) implies union F is real-membered proof assume A1: for X st X in F holds X is real-membered; let x; assume x in union F; then consider X such that A2: x in X and A3: X in F by TARSKI:def 4; X is real-membered by A1,A3; hence thesis by A2; end; theorem (for X st X in F holds X is rational-membered) implies union F is rational-membered proof assume A1: for X st X in F holds X is rational-membered; let x; assume x in union F; then consider X such that A2: x in X and A3: X in F by TARSKI:def 4; X is rational-membered by A1,A3; hence thesis by A2; end; theorem (for X st X in F holds X is integer-membered) implies union F is integer-membered proof assume A1: for X st X in F holds X is integer-membered; let x; assume x in union F; then consider X such that A2: x in X and A3: X in F by TARSKI:def 4; X is integer-membered by A1,A3; hence thesis by A2; end; theorem (for X st X in F holds X is natural-membered) implies union F is natural-membered proof assume A1: for X st X in F holds X is natural-membered; let x; assume x in union F; then consider X such that A2: x in X and A3: X in F by TARSKI:def 4; X is natural-membered by A1,A3; hence thesis by A2; end; theorem for X st X in F & X is complex-membered holds meet F is complex-membered by Th19,SETFAM_1:3; theorem for X st X in F & X is ext-real-membered holds meet F is ext-real-membered by Th20,SETFAM_1:3; theorem for X st X in F & X is real-membered holds meet F is real-membered by Th21, SETFAM_1:3; theorem for X st X in F & X is rational-membered holds meet F is rational-membered by Th22,SETFAM_1:3; theorem for X st X in F & X is integer-membered holds meet F is integer-membered by Th23,SETFAM_1:3; theorem for X st X in F & X is natural-membered holds meet F is natural-membered by Th24,SETFAM_1:3; scheme CMSeparation {P[set]}: ex X being complex-membered set st for c holds c in X iff P[c] proof consider X being set such that A1: x in X iff x in COMPLEX & P[x] from XBOOLE_0:sch 1; X is complex-membered proof let x; assume x in X; then x in COMPLEX by A1; hence thesis; end; then reconsider X as complex-membered set; take X; let c; c in COMPLEX by XCMPLX_0:def 2; hence thesis by A1; end; scheme EMSeparation {P[set]}: ex X being ext-real-membered set st for e holds e in X iff P[e] proof consider X being set such that A1: x in X iff x in ExtREAL & P[x] from XBOOLE_0:sch 1; X is ext-real-membered proof let x; assume x in X; then x in ExtREAL by A1; hence thesis; end; then reconsider X as ext-real-membered set; take X; let e; e in ExtREAL by XXREAL_0:def 1; hence thesis by A1; end; scheme RMSeparation {P[set]}: ex X being real-membered set st for r holds r in X iff P[r] proof consider X being set such that A1: x in X iff x in REAL & P[x] from XBOOLE_0:sch 1; X is real-membered proof let x; assume x in X; then x in REAL by A1; hence thesis; end; then reconsider X as real-membered set; take X; let r; r in REAL by XREAL_0:def 1; hence thesis by A1; end; scheme WMSeparation {P[set]}: ex X being rational-membered set st for w holds w in X iff P[w] proof consider X being set such that A1: x in X iff x in RAT & P[x] from XBOOLE_0:sch 1; X is rational-membered proof let x; assume x in X; then x in RAT by A1; hence thesis; end; then reconsider X as rational-membered set; take X; let w; w in RAT by RAT_1:def 2; hence thesis by A1; end; scheme IMSeparation {P[set]}: ex X being integer-membered set st for i holds i in X iff P[i] proof consider X being set such that A1: x in X iff x in INT & P[x] from XBOOLE_0:sch 1; X is integer-membered proof let x; assume x in X; then x in INT by A1; hence thesis; end; then reconsider X as integer-membered set; take X; let i; i in INT by INT_1:def 2; hence thesis by A1; end; scheme NMSeparation {P[set]}: ex X being natural-membered set st for n holds n in X iff P[n] proof consider X being set such that A1: x in X iff x in NAT & P[x] from XBOOLE_0:sch 1; X is natural-membered proof let x; assume x in X; then x in NAT by A1; hence thesis; end; then reconsider X as natural-membered set; take X; let n; n in NAT by ORDINAL1:def 12; hence thesis by A1; end; registration cluster non empty natural-membered for set; existence proof set X = the non empty natural-membered set; take X; thus thesis; end; end; registration cluster -> natural-membered for Element of NAT; coherence proof let n be Element of NAT; let x be set; n c= omega by ORDINAL1:def 2; hence thesis; end; end; reserve a,b,d for real number; theorem for X,Y being real-membered set st X<>{} & Y<>{} & for a,b st a in X & b in Y holds a<=b holds ex d st (for a st a in X holds a<=d) & for b st b in Y holds d<=b proof let X,Y be real-membered set; set x = the Element of X; reconsider a=x as real number; set y = the Element of Y; reconsider b=y as real number; assume X<>{} & Y<>{}; then A1: a in X & b in Y; A2: X c= REAL & Y c= REAL by Th3; assume for a,b st a in X & b in Y holds a<=b; then consider d being real number such that A3: for a,b being real number st a in X & b in Y holds a<=d & d<=b by A2, AXIOMS:1; reconsider d as real number; take d; thus thesis by A1,A3; end; definition let X be set; attr X is add-closed means for x, y being complex number st x in X & y in X holds x+y in X; end; registration cluster empty -> add-closed for set; coherence proof let X be set such that A1: X is empty; let x be complex number; thus thesis by A1; end; cluster COMPLEX -> add-closed; coherence proof let x be complex number; thus thesis by XCMPLX_0:def 2; end; cluster REAL -> add-closed; coherence proof let x be complex number; thus thesis by XREAL_0:def 1; end; cluster RAT -> add-closed; coherence proof let x be complex number; thus thesis by RAT_1:def 2; end; cluster INT -> add-closed; coherence proof let x be complex number; thus thesis by INT_1:def 2; end; cluster NAT -> add-closed; coherence proof let x be complex number; thus thesis by ORDINAL1:def 12; end; cluster non empty add-closed natural-membered for set; existence proof take NAT; thus thesis; end; end; begin definition let f be Relation; attr f is complex-valued means :Def1: rng f c= COMPLEX; attr f is ext-real-valued means :Def2: rng f c= ExtREAL; attr f is real-valued means :Def3: rng f c= REAL; canceled 2; attr f is natural-valued means :Def6: rng f c= NAT; end; registration cluster natural-valued -> INT-valued for Relation; coherence proof let R be Relation; assume rng R c= NAT; hence rng R c= INT by NUMBERS:17,XBOOLE_1:1; end; cluster INT-valued -> RAT-valued for Relation; coherence proof let R be Relation; assume rng R c= INT; hence rng R c= RAT by NUMBERS:14,XBOOLE_1:1; end; cluster INT-valued -> real-valued for Relation; coherence proof let R be Relation; assume rng R c= INT; hence rng R c= REAL by XBOOLE_1:1,NUMBERS:15; end; cluster RAT-valued -> real-valued for Relation; coherence proof let R be Relation; assume rng R c= RAT; hence rng R c= REAL by NUMBERS:12,XBOOLE_1:1; end; cluster real-valued -> ext-real-valued for Relation; coherence proof let R be Relation; assume rng R c= REAL; hence rng R c= ExtREAL by NUMBERS:31,XBOOLE_1:1; end; cluster real-valued -> complex-valued for Relation; coherence proof let R be Relation; assume rng R c= REAL; hence rng R c= COMPLEX by NUMBERS:11,XBOOLE_1:1; end; cluster natural-valued -> RAT-valued for Relation; coherence proof let R be Relation; assume rng R c= NAT; hence rng R c= RAT by NUMBERS:18,XBOOLE_1:1; end; cluster natural-valued -> real-valued for Relation; coherence proof let R be Relation; assume rng R c= NAT; hence rng R c= REAL by XBOOLE_1:1; end; end; registration cluster empty -> natural-valued for Relation; coherence proof let R be Relation; assume R is empty; hence rng R c= NAT by RELAT_1:38,XBOOLE_1:2; end; end; registration cluster natural-valued for Function; existence proof take {}; thus thesis; end; end; registration let R be complex-valued Relation; cluster rng R -> complex-membered; coherence proof rng R c= COMPLEX by Def1; hence thesis; end; end; registration let R be ext-real-valued Relation; cluster rng R -> ext-real-membered; coherence proof rng R c= ExtREAL by Def2; hence thesis; end; end; registration let R be real-valued Relation; cluster rng R -> real-membered; coherence proof rng R c= REAL by Def3; hence thesis; end; end; registration let R be RAT-valued Relation; cluster rng R -> rational-membered; coherence; end; registration let R be INT-valued Relation; cluster rng R -> integer-membered; coherence; end; registration let R be natural-valued Relation; cluster rng R -> natural-membered; coherence proof rng R c= NAT by Def6; hence thesis; end; end; reserve x,y,X for set, f for Function, R,S for Relation; theorem Th1: for S being complex-valued Relation st R c= S holds R is complex-valued proof let S be complex-valued Relation; assume R c= S; then A1: rng R c= rng S by RELAT_1:11; rng S c= COMPLEX by Def1; hence rng R c= COMPLEX by A1,XBOOLE_1:1; end; theorem Th2: for S being ext-real-valued Relation st R c= S holds R is ext-real-valued proof let S be ext-real-valued Relation; assume R c= S; then A1: rng R c= rng S by RELAT_1:11; rng S c= ExtREAL by Def2; hence rng R c= ExtREAL by A1,XBOOLE_1:1; end; theorem Th3: for S being real-valued Relation st R c= S holds R is real-valued proof let S be real-valued Relation; assume R c= S; then A1: rng R c= rng S by RELAT_1:11; rng S c= REAL by Def3; hence rng R c= REAL by A1,XBOOLE_1:1; end; theorem for S being RAT-valued Relation st R c= S holds R is RAT-valued; theorem for S being INT-valued Relation st R c= S holds R is INT-valued; theorem Th6: for S being natural-valued Relation st R c= S holds R is natural-valued proof let S be natural-valued Relation; assume R c= S; then A1: rng R c= rng S by RELAT_1:11; rng S c= NAT by Def6; hence rng R c= NAT by A1,XBOOLE_1:1; end; registration let R be complex-valued Relation; cluster -> complex-valued for Subset of R; coherence by Th1; end; registration let R be ext-real-valued Relation; cluster -> ext-real-valued for Subset of R; coherence by Th2; end; registration let R be real-valued Relation; cluster -> real-valued for Subset of R; coherence by Th3; end; registration let R be RAT-valued Relation; cluster -> RAT-valued for Subset of R; coherence; end; registration let R be INT-valued Relation; cluster -> INT-valued for Subset of R; coherence; end; registration let R be natural-valued Relation; cluster -> natural-valued for Subset of R; coherence by Th6; end; registration let R,S be complex-valued Relation; cluster R \/ S -> complex-valued; coherence proof A1: rng(R \/ S) = rng R \/ rng S by RELAT_1:12; rng R c= COMPLEX & rng S c= COMPLEX by Def1; hence rng(R \/ S) c= COMPLEX by A1,XBOOLE_1:8; end; end; registration let R,S be ext-real-valued Relation; cluster R \/ S -> ext-real-valued; coherence proof A1: rng(R \/ S) = rng R \/ rng S by RELAT_1:12; rng R c= ExtREAL & rng S c= ExtREAL by Def2; hence rng(R \/ S) c= ExtREAL by A1,XBOOLE_1:8; end; end; registration let R,S be real-valued Relation; cluster R \/ S -> real-valued; coherence proof A1: rng(R \/ S) = rng R \/ rng S by RELAT_1:12; rng R c= REAL & rng S c= REAL by Def3; hence rng(R \/ S) c= REAL by A1,XBOOLE_1:8; end; end; registration let R,S be RAT-valued Relation; cluster R \/ S -> RAT-valued; coherence; end; registration let R,S be INT-valued Relation; cluster R \/ S -> INT-valued; coherence; end; registration let R,S be natural-valued Relation; cluster R \/ S -> natural-valued; coherence proof A1: rng(R \/ S) = rng R \/ rng S by RELAT_1:12; rng R c= NAT & rng S c= NAT by Def6; hence rng(R \/ S) c= NAT by A1,XBOOLE_1:8; end; end; registration let R be complex-valued Relation; let S; cluster R /\ S -> complex-valued; coherence proof R /\ S c= R by XBOOLE_1:17; then A1: rng(R /\ S) c= rng R by RELAT_1:11; rng R c= COMPLEX by Def1; hence rng(R /\ S) c= COMPLEX by A1,XBOOLE_1:1; end; cluster R \ S -> complex-valued; coherence; end; registration let R be ext-real-valued Relation; let S; cluster R /\ S -> ext-real-valued; coherence proof R /\ S c= R by XBOOLE_1:17; then A1: rng(R /\ S) c= rng R by RELAT_1:11; rng R c= ExtREAL by Def2; hence rng(R /\ S) c= ExtREAL by A1,XBOOLE_1:1; end; cluster R \ S -> ext-real-valued; coherence; end; registration let R be real-valued Relation; let S; cluster R /\ S -> real-valued; coherence proof R /\ S c= R by XBOOLE_1:17; then A1: rng(R /\ S) c= rng R by RELAT_1:11; rng R c= REAL by Def3; hence rng(R /\ S) c= REAL by A1,XBOOLE_1:1; end; cluster R \ S -> real-valued; coherence; end; registration let R be RAT-valued Relation; let S; cluster R /\ S -> RAT-valued; coherence; cluster R \ S -> RAT-valued; coherence; end; registration let R be INT-valued Relation; let S; cluster R /\ S -> INT-valued; coherence; cluster R \ S -> INT-valued; coherence; end; registration let R be natural-valued Relation; let S; cluster R /\ S -> natural-valued; coherence proof R /\ S c= R by XBOOLE_1:17; then A1: rng(R /\ S) c= rng R by RELAT_1:11; rng R c= NAT by Def6; hence rng(R /\ S) c= NAT by A1,XBOOLE_1:1; end; cluster R \ S -> natural-valued; coherence; end; registration let R,S be complex-valued Relation; cluster R \+\ S -> complex-valued; coherence; end; registration let R,S be ext-real-valued Relation; cluster R \+\ S -> ext-real-valued; coherence; end; registration let R,S be real-valued Relation; cluster R \+\ S -> real-valued; coherence; end; registration let R,S be RAT-valued Relation; cluster R \+\ S -> RAT-valued; coherence; end; registration let R,S be INT-valued Relation; cluster R \+\ S -> INT-valued; coherence; end; registration let R,S be natural-valued Relation; cluster R \+\ S -> natural-valued; coherence; end; registration let R be complex-valued Relation; let X; cluster R.:X -> complex-membered; coherence proof R.:X c= rng R by RELAT_1:111; hence thesis; end; end; registration let R be ext-real-valued Relation; let X; cluster R.:X -> ext-real-membered; coherence proof R.:X c= rng R by RELAT_1:111; hence thesis; end; end; registration let R be real-valued Relation; let X; cluster R.:X -> real-membered; coherence proof R.:X c= rng R by RELAT_1:111; hence thesis; end; end; registration let R be RAT-valued Relation; let X; cluster R.:X -> rational-membered; coherence proof R.:X c= rng R by RELAT_1:111; hence thesis; end; end; registration let R be INT-valued Relation; let X; cluster R.:X -> integer-membered; coherence proof R.:X c= rng R by RELAT_1:111; hence thesis; end; end; registration let R be natural-valued Relation; let X; cluster R.:X -> natural-membered; coherence proof R.:X c= rng R by RELAT_1:111; hence thesis; end; end; registration let R be complex-valued Relation; let x; cluster Im(R,x) -> complex-membered; coherence; end; registration let R be ext-real-valued Relation; let x; cluster Im(R,x) -> ext-real-membered; coherence; end; registration let R be real-valued Relation; let x; cluster Im(R,x) -> real-membered; coherence; end; registration let R be RAT-valued Relation; let x; cluster Im(R,x) -> rational-membered; coherence; end; registration let R be INT-valued Relation; let x; cluster Im(R,x) -> integer-membered; coherence; end; registration let R be natural-valued Relation; let x; cluster Im(R,x) -> natural-membered; coherence; end; registration let R be complex-valued Relation; let X; cluster R|X -> complex-valued; coherence proof rng R c= COMPLEX & rng(R|X) c= rng R by Def1,RELAT_1:70; hence rng(R|X) c= COMPLEX by XBOOLE_1:1; end; end; registration let R be ext-real-valued Relation; let X; cluster R|X -> ext-real-valued; coherence proof rng R c= ExtREAL & rng(R|X) c= rng R by Def2,RELAT_1:70; hence rng(R|X) c= ExtREAL by XBOOLE_1:1; end; end; registration let R be real-valued Relation; let X; cluster R|X -> real-valued; coherence proof rng R c= REAL & rng(R|X) c= rng R by Def3,RELAT_1:70; hence rng(R|X) c= REAL by XBOOLE_1:1; end; end; registration let R be RAT-valued Relation; let X; cluster R|X -> RAT-valued; coherence; end; registration let R be INT-valued Relation; let X; cluster R|X -> INT-valued; coherence; end; registration let R be natural-valued Relation; let X; cluster R|X -> natural-valued; coherence proof rng R c= NAT & rng(R|X) c= rng R by Def6,RELAT_1:70; hence rng(R|X) c= NAT by XBOOLE_1:1; end; end; registration let X be complex-membered set; cluster id X -> complex-valued; coherence proof thus rng id X c= COMPLEX by MEMBERED:1; end; end; registration let X be ext-real-membered set; cluster id X -> ext-real-valued; coherence proof thus rng id X c= ExtREAL by MEMBERED:2; end; end; registration let X be real-membered set; cluster id X -> real-valued; coherence proof thus rng id X c= REAL by MEMBERED:3; end; end; registration let X be rational-membered set; cluster id X -> RAT-valued; coherence proof thus rng id X c= RAT by MEMBERED:4; end; end; registration let X be integer-membered set; cluster id X -> INT-valued; coherence proof thus rng id X c= INT by MEMBERED:5; end; end; registration let X be natural-membered set; cluster id X -> natural-valued; coherence proof thus rng id X c= NAT by MEMBERED:6; end; end; registration let R; let S be complex-valued Relation; cluster R*S -> complex-valued; coherence proof rng S c= COMPLEX & rng(R*S) c= rng S by Def1,RELAT_1:26; hence rng(R*S) c= COMPLEX by XBOOLE_1:1; end; end; registration let R; let S be ext-real-valued Relation; cluster R*S -> ext-real-valued; coherence proof rng S c= ExtREAL & rng(R*S) c= rng S by Def2,RELAT_1:26; hence rng(R*S) c= ExtREAL by XBOOLE_1:1; end; end; registration let R; let S be real-valued Relation; cluster R*S -> real-valued; coherence proof rng S c= REAL & rng(R*S) c= rng S by Def3,RELAT_1:26; hence rng(R*S) c= REAL by XBOOLE_1:1; end; end; registration let R; let S be RAT-valued Relation; cluster R*S -> RAT-valued; coherence; end; registration let R; let S be INT-valued Relation; cluster R*S -> INT-valued; coherence; end; registration let R; let S be natural-valued Relation; cluster R*S -> natural-valued; coherence proof rng S c= NAT & rng(R*S) c= rng S by Def6,RELAT_1:26; hence rng(R*S) c= NAT by XBOOLE_1:1; end; end; definition let f be Function; redefine attr f is complex-valued means :Def7: for x st x in dom f holds f.x is complex; compatibility proof thus f is complex-valued implies for x st x in dom f holds f.x is complex proof assume A1: f is complex-valued; let x; assume A2: x in dom f; reconsider f as complex-valued Function by A1; f.x in rng f by A2,FUNCT_1:3; hence thesis; end; assume A3: for x st x in dom f holds f.x is complex; let y; assume y in rng f; then ex x st x in dom f & y = f.x by FUNCT_1:def 3; then y is complex by A3; hence thesis by XCMPLX_0:def 2; end; redefine attr f is ext-real-valued means :Def8: for x st x in dom f holds f.x is ext-real; compatibility proof thus f is ext-real-valued implies for x st x in dom f holds f.x is ext-real proof assume A4: f is ext-real-valued; let x; assume A5: x in dom f; reconsider f as ext-real-valued Function by A4; f.x in rng f by A5,FUNCT_1:3; hence thesis; end; assume A6: for x st x in dom f holds f.x is ext-real; let y; assume y in rng f; then ex x st x in dom f & y = f.x by FUNCT_1:def 3; then y is ext-real by A6; hence thesis by XXREAL_0:def 1; end; redefine attr f is real-valued means :Def9: for x st x in dom f holds f.x is real; compatibility proof thus f is real-valued implies for x st x in dom f holds f.x is real proof assume A7: f is real-valued; let x; assume A8: x in dom f; reconsider f as real-valued Function by A7; f.x in rng f by A8,FUNCT_1:3; hence thesis; end; assume A9: for x st x in dom f holds f.x is real; let y; assume y in rng f; then ex x st x in dom f & y = f.x by FUNCT_1:def 3; then y is real by A9; hence thesis by XREAL_0:def 1; end; canceled 2; redefine attr f is natural-valued means :Def12: for x st x in dom f holds f.x is natural; compatibility proof thus f is natural-valued implies for x st x in dom f holds f.x is natural proof assume A10: f is natural-valued; let x; assume A11: x in dom f; reconsider f as natural-valued Function by A10; f.x in rng f by A11,FUNCT_1:3; hence thesis; end; assume A12: for x st x in dom f holds f.x is natural; let y; assume y in rng f; then ex x st x in dom f & y = f.x by FUNCT_1:def 3; then y is natural by A12; hence thesis by ORDINAL1:def 12; end; end; theorem Th7: f is complex-valued iff for x holds f.x is complex proof hereby assume A1: f is complex-valued; let x; per cases; suppose x in dom f; hence f.x is complex by A1,Def7; end; suppose not x in dom f; hence f.x is complex by FUNCT_1:def 2; end; end; assume for x holds f.x is complex; then for x st x in dom f holds f.x is complex; hence thesis by Def7; end; theorem Th8: f is ext-real-valued iff for x holds f.x is ext-real proof hereby assume A1: f is ext-real-valued; let x; per cases; suppose x in dom f; hence f.x is ext-real by A1,Def8; end; suppose not x in dom f; hence f.x is ext-real by FUNCT_1:def 2; end; end; assume for x holds f.x is ext-real; then for x st x in dom f holds f.x is ext-real; hence thesis by Def8; end; theorem Th9: f is real-valued iff for x holds f.x is real proof hereby assume A1: f is real-valued; let x; per cases; suppose x in dom f; hence f.x is real by A1,Def9; end; suppose not x in dom f; hence f.x is real by FUNCT_1:def 2; end; end; assume for x holds f.x is real; then for x st x in dom f holds f.x is real; hence thesis by Def9; end; theorem Th10: f is RAT-valued iff for x holds f.x is rational proof hereby assume A1: f is RAT-valued; let x; per cases; suppose x in dom f; then f.x in rng f by FUNCT_1:def 3; hence f.x is rational by A1; end; suppose not x in dom f; hence f.x is rational by FUNCT_1:def 2; end; end; assume A2: for x holds f.x is rational; let y be set; assume y in rng f; then consider x such that x in dom f and A3: f.x = y by FUNCT_1:def 3; f.x is rational by A2; hence thesis by A3,RAT_1:def 2; end; theorem Th11: f is INT-valued iff for x holds f.x is integer proof hereby assume A1: f is INT-valued; let x; per cases; suppose x in dom f; then f.x in rng f by FUNCT_1:def 3; hence f.x is integer by A1; end; suppose not x in dom f; hence f.x is integer by FUNCT_1:def 2; end; end; assume A2: for x holds f.x is integer; let y be set; assume y in rng f; then consider x such that x in dom f and A3: f.x = y by FUNCT_1:def 3; f.x is integer by A2; hence thesis by A3,INT_1:def 2; end; theorem Th12: f is natural-valued iff for x holds f.x is natural proof hereby assume A1: f is natural-valued; let x; per cases; suppose x in dom f; hence f.x is natural by A1,Def12; end; suppose not x in dom f; hence f.x is natural by FUNCT_1:def 2; end; end; assume for x holds f.x is natural; then for x st x in dom f holds f.x is natural; hence thesis by Def12; end; registration let f be complex-valued Function; let x; cluster f.x -> complex; coherence by Th7; end; registration let f be ext-real-valued Function; let x; cluster f.x -> ext-real; coherence by Th8; end; registration let f be real-valued Function; let x; cluster f.x -> real; coherence by Th9; end; registration let f be RAT-valued Function; let x; cluster f.x -> rational; coherence by Th10; end; registration let f be INT-valued Function; let x; cluster f.x -> integer; coherence by Th11; end; registration let f be natural-valued Function; let x; cluster f.x -> natural; coherence by Th12; end; registration let X; let x be complex number; cluster X --> x -> complex-valued; coherence proof rng(X --> x) c= COMPLEX by MEMBERED:1; hence thesis by Def1; end; end; registration let X; let x be ext-real number; cluster X --> x -> ext-real-valued; coherence proof rng(X --> x) c= ExtREAL by MEMBERED:2; hence thesis by Def2; end; end; registration let X; let x be real number; cluster X --> x -> real-valued; coherence proof rng(X --> x) c= REAL by MEMBERED:3; hence thesis by Def3; end; end; registration let X; let x be rational number; cluster X --> x -> RAT-valued; coherence proof rng(X --> x) c= RAT by MEMBERED:4; hence thesis by RELAT_1:def 19; end; end; registration let X; let x be integer number; cluster X --> x -> INT-valued; coherence proof rng(X --> x) c= INT by MEMBERED:5; hence thesis by RELAT_1:def 19; end; end; registration let X; let x be Nat; cluster X --> x -> natural-valued; coherence proof rng(X --> x) c= NAT by MEMBERED:6; hence thesis by Def6; end; end; registration let f,g be complex-valued Function; cluster f +* g -> complex-valued; coherence proof rng(f +* g) c= rng f \/ rng g by FUNCT_4:17; then rng(f +* g) c= COMPLEX by MEMBERED:1; hence thesis by Def1; end; end; registration let f,g be ext-real-valued Function; cluster f +* g -> ext-real-valued; coherence proof rng(f +* g) c= rng f \/ rng g by FUNCT_4:17; then rng(f +* g) c= ExtREAL by MEMBERED:2; hence thesis by Def2; end; end; registration let f,g be real-valued Function; cluster f +* g -> real-valued; coherence proof rng(f +* g) c= rng f \/ rng g by FUNCT_4:17; then rng(f +* g) c= REAL by MEMBERED:3; hence thesis by Def3; end; end; registration let f,g be RAT-valued Function; cluster f +* g -> RAT-valued; coherence proof rng(f +* g) c= rng f \/ rng g by FUNCT_4:17; then rng(f +* g) c= RAT by MEMBERED:4; hence thesis by RELAT_1:def 19; end; end; registration let f,g be INT-valued Function; cluster f +* g -> INT-valued; coherence proof rng(f +* g) c= rng f \/ rng g by FUNCT_4:17; then rng(f +* g) c= INT by MEMBERED:5; hence thesis by RELAT_1:def 19; end; end; registration let f,g be natural-valued Function; cluster f +* g -> natural-valued; coherence proof rng(f +* g) c= rng f \/ rng g by FUNCT_4:17; then rng(f +* g) c= NAT by MEMBERED:6; hence thesis by Def6; end; end; registration let x; let y be complex number; cluster x .--> y -> complex-valued; coherence; end; registration let x; let y be ext-real number; cluster x .--> y -> ext-real-valued; coherence; end; registration let x; let y be real number; cluster x .--> y -> real-valued; coherence; end; registration let x; let y be rational number; cluster x .--> y -> RAT-valued; coherence; end; registration let x; let y be integer number; cluster x .--> y -> INT-valued; coherence; end; registration let x; let y be Nat; cluster x .--> y -> natural-valued; coherence; end; registration let X; let Y be complex-membered set; cluster -> complex-valued for Relation of X,Y; coherence proof let R be Relation of X,Y; thus rng R c= COMPLEX by MEMBERED:1; end; end; registration let X; let Y be ext-real-membered set; cluster -> ext-real-valued for Relation of X,Y; coherence proof let R be Relation of X,Y; thus rng R c= ExtREAL by MEMBERED:2; end; end; registration let X; let Y be real-membered set; cluster -> real-valued for Relation of X,Y; coherence proof let R be Relation of X,Y; thus rng R c= REAL by MEMBERED:3; end; end; registration let X; let Y be rational-membered set; cluster -> RAT-valued for Relation of X,Y; coherence proof let R be Relation of X,Y; thus rng R c= RAT by MEMBERED:4; end; end; registration let X; let Y be integer-membered set; cluster -> INT-valued for Relation of X,Y; coherence proof let R be Relation of X,Y; thus rng R c= INT by MEMBERED:5; end; end; registration let X; let Y be natural-membered set; cluster -> natural-valued for Relation of X,Y; coherence proof let R be Relation of X,Y; thus rng R c= NAT by MEMBERED:6; end; end; registration let X; let Y be complex-membered set; cluster [:X,Y:] -> complex-valued; coherence proof rng [:X,Y:] c= Y by RELAT_1:159; hence rng [:X,Y:] c= COMPLEX by MEMBERED:1; end; end; registration let X; let Y be ext-real-membered set; cluster [:X,Y:] -> ext-real-valued; coherence proof rng [:X,Y:] c= Y by RELAT_1:159; hence rng [:X,Y:] c= ExtREAL by MEMBERED:2; end; end; registration let X; let Y be real-membered set; cluster [:X,Y:] -> real-valued; coherence proof rng [:X,Y:] c= Y by RELAT_1:159; hence rng [:X,Y:] c= REAL by MEMBERED:3; end; end; registration let X; let Y be rational-membered set; cluster [:X,Y:] -> RAT-valued; coherence proof rng [:X,Y:] c= Y by RELAT_1:159; hence rng [:X,Y:] c= RAT by MEMBERED:4; end; end; registration let X; let Y be integer-membered set; cluster [:X,Y:] -> INT-valued; coherence proof rng [:X,Y:] c= Y by RELAT_1:159; hence rng [:X,Y:] c= INT by MEMBERED:5; end; end; registration let X; let Y be natural-membered set; cluster [:X,Y:] -> natural-valued; coherence proof rng [:X,Y:] c= Y by RELAT_1:159; hence rng [:X,Y:] c= NAT by MEMBERED:6; end; end; notation let f be ext-real-valued Relation; synonym f is non-zero for f is non-empty; end; registration cluster non empty constant natural-valued INT-valued RAT-valued for Function; existence proof take 1 .--> 1; thus thesis; end; end; theorem for f being non empty constant complex-valued Function ex r being complex number st for x st x in dom f holds f.x = r proof let f be non empty constant complex-valued Function; consider r being set such that A1: for x st x in dom f holds f.x = r by FUNCOP_1:78; consider x being set such that A2: x in dom f by XBOOLE_0:def 1; r = f.x by A1,A2; hence thesis by A1; end; theorem for f being non empty constant ext-real-valued Function ex r being ext-real number st for x st x in dom f holds f.x = r proof let f be non empty constant ext-real-valued Function; consider r being set such that A1: for x st x in dom f holds f.x = r by FUNCOP_1:78; consider x being set such that A2: x in dom f by XBOOLE_0:def 1; r = f.x by A1,A2; hence thesis by A1; end; theorem for f being non empty constant real-valued Function ex r being real number st for x st x in dom f holds f.x = r proof let f be non empty constant real-valued Function; consider r being set such that A1: for x st x in dom f holds f.x = r by FUNCOP_1:78; consider x being set such that A2: x in dom f by XBOOLE_0:def 1; r = f.x by A1,A2; hence thesis by A1; end; theorem for f being non empty constant RAT-valued Function ex r being rational number st for x st x in dom f holds f.x = r proof let f be non empty constant RAT-valued Function; consider r being set such that A1: for x st x in dom f holds f.x = r by FUNCOP_1:78; consider x being set such that A2: x in dom f by XBOOLE_0:def 1; r = f.x by A1,A2; hence thesis by A1; end; theorem for f being non empty constant INT-valued Function ex r being integer number st for x st x in dom f holds f.x = r proof let f be non empty constant INT-valued Function; consider r being set such that A1: for x st x in dom f holds f.x = r by FUNCOP_1:78; consider x being set such that A2: x in dom f by XBOOLE_0:def 1; r = f.x by A1,A2; hence thesis by A1; end; theorem for f being non empty constant natural-valued Function ex r being Nat st for x st x in dom f holds f.x = r proof let f be non empty constant natural-valued Function; consider r being set such that A1: for x st x in dom f holds f.x = r by FUNCOP_1:78; consider x being set such that A2: x in dom f by XBOOLE_0:def 1; r = f.x by A1,A2; hence thesis by A1; end; begin reserve e1,e2 for ext-real number; definition let f be ext-real-valued Function; attr f is increasing means :Def13: for e1,e2 st e1 in dom f & e2 in dom f & e1 < e2 holds f.e1 < f.e2; attr f is decreasing means :Def14: for e1,e2 st e1 in dom f & e2 in dom f & e1 < e2 holds f.e1 > f.e2; attr f is non-decreasing means :Def15: for e1,e2 st e1 in dom f & e2 in dom f & e1 <= e2 holds f.e1 <= f.e2; attr f is non-increasing means :Def16: for e1,e2 st e1 in dom f & e2 in dom f & e1 <= e2 holds f.e1 >= f.e2; end; registration cluster trivial -> increasing decreasing for ext-real-valued Function; coherence proof let f be ext-real-valued Function; assume A1: f is trivial; thus f is increasing proof let e1,e2; assume e1 in dom f & e2 in dom f; hence thesis by A1,ZFMISC_1:def 10; end; let e1,e2; assume e1 in dom f & e2 in dom f; hence thesis by A1,ZFMISC_1:def 10; end; end; registration cluster increasing -> non-decreasing for ext-real-valued Function; coherence proof let f be ext-real-valued Function; assume A1: f is increasing; let e1,e2 such that A2: e1 in dom f & e2 in dom f and A3: e1 <= e2; per cases by A3,XXREAL_0:1; suppose e1 = e2; hence thesis; end; suppose e1 < e2; hence thesis by A1,A2,Def13; end; end; cluster decreasing -> non-increasing for ext-real-valued Function; coherence proof let f be ext-real-valued Function; assume A4: f is decreasing; let e1,e2 such that A5: e1 in dom f & e2 in dom f and A6: e1 <= e2; per cases by A6,XXREAL_0:1; suppose e1 = e2; hence thesis; end; suppose e1 < e2; hence thesis by A4,A5,Def14; end; end; end; registration let f,g be increasing ext-real-valued Function; cluster g*f -> increasing; coherence proof let e1,e2; assume that A1: e1 in dom(g*f) and A2: e2 in dom (g*f); A3: e1 in dom f by A1,FUNCT_1:11; then A4: (g*f).e1 = g.(f.e1) by FUNCT_1:13; A5: e2 in dom f by A2,FUNCT_1:11; then A6: (g*f).e2 = g.(f.e2) by FUNCT_1:13; assume e1 < e2; then A7: f.e1 < f.e2 by A3,A5,Def13; f.e1 in dom g & f.e2 in dom g by A1,A2,FUNCT_1:11; hence thesis by A4,A6,A7,Def13; end; end; registration let f,g be non-decreasing ext-real-valued Function; cluster g*f -> non-decreasing; coherence proof let e1,e2; assume that A1: e1 in dom(g*f) and A2: e2 in dom (g*f); A3: e1 in dom f by A1,FUNCT_1:11; then A4: (g*f).e1 = g.(f.e1) by FUNCT_1:13; A5: e2 in dom f by A2,FUNCT_1:11; then A6: (g*f).e2 = g.(f.e2) by FUNCT_1:13; assume e1 <= e2; then A7: f.e1 <= f.e2 by A3,A5,Def15; f.e1 in dom g & f.e2 in dom g by A1,A2,FUNCT_1:11; hence thesis by A4,A6,A7,Def15; end; end; registration let f,g be decreasing ext-real-valued Function; cluster g*f -> increasing; coherence proof let e1,e2; assume that A1: e1 in dom(g*f) and A2: e2 in dom (g*f); A3: e1 in dom f by A1,FUNCT_1:11; then A4: (g*f).e1 = g.(f.e1) by FUNCT_1:13; A5: e2 in dom f by A2,FUNCT_1:11; then A6: (g*f).e2 = g.(f.e2) by FUNCT_1:13; assume e1 < e2; then A7: f.e1 > f.e2 by A3,A5,Def14; f.e1 in dom g & f.e2 in dom g by A1,A2,FUNCT_1:11; hence thesis by A4,A6,A7,Def14; end; end; registration let f,g be non-increasing ext-real-valued Function; cluster g*f -> non-decreasing; coherence proof let e1,e2; assume that A1: e1 in dom(g*f) and A2: e2 in dom (g*f); A3: e1 in dom f by A1,FUNCT_1:11; then A4: (g*f).e1 = g.(f.e1) by FUNCT_1:13; A5: e2 in dom f by A2,FUNCT_1:11; then A6: (g*f).e2 = g.(f.e2) by FUNCT_1:13; assume e1 <= e2; then A7: f.e1 >= f.e2 by A3,A5,Def16; f.e1 in dom g & f.e2 in dom g by A1,A2,FUNCT_1:11; hence thesis by A4,A6,A7,Def16; end; end; registration let f be decreasing ext-real-valued Function; let g be increasing ext-real-valued Function; cluster g*f -> decreasing; coherence proof let e1,e2; assume that A1: e1 in dom(g*f) and A2: e2 in dom (g*f); A3: e1 in dom f by A1,FUNCT_1:11; then A4: (g*f).e1 = g.(f.e1) by FUNCT_1:13; A5: e2 in dom f by A2,FUNCT_1:11; then A6: (g*f).e2 = g.(f.e2) by FUNCT_1:13; assume e1 < e2; then A7: f.e1 > f.e2 by A3,A5,Def14; f.e1 in dom g & f.e2 in dom g by A1,A2,FUNCT_1:11; hence thesis by A4,A6,A7,Def13; end; cluster f*g -> decreasing; coherence proof let e1,e2; assume that A8: e1 in dom(f*g) and A9: e2 in dom (f*g); A10: e1 in dom g by A8,FUNCT_1:11; then A11: (f*g).e1 = f.(g.e1) by FUNCT_1:13; A12: e2 in dom g by A9,FUNCT_1:11; then A13: (f*g).e2 = f.(g.e2) by FUNCT_1:13; assume e1 < e2; then A14: g.e1 < g.e2 by A10,A12,Def13; g.e1 in dom f & g.e2 in dom f by A8,A9,FUNCT_1:11; hence thesis by A11,A13,A14,Def14; end; end; registration let f be non-increasing ext-real-valued Function; let g be non-decreasing ext-real-valued Function; cluster g*f -> non-increasing; coherence proof let e1,e2; assume that A1: e1 in dom(g*f) and A2: e2 in dom (g*f); A3: e1 in dom f by A1,FUNCT_1:11; then A4: (g*f).e1 = g.(f.e1) by FUNCT_1:13; A5: e2 in dom f by A2,FUNCT_1:11; then A6: (g*f).e2 = g.(f.e2) by FUNCT_1:13; assume e1 <= e2; then A7: f.e1 >= f.e2 by A3,A5,Def16; f.e1 in dom g & f.e2 in dom g by A1,A2,FUNCT_1:11; hence thesis by A4,A6,A7,Def15; end; cluster f*g -> non-increasing; coherence proof let e1,e2; assume that A8: e1 in dom(f*g) and A9: e2 in dom (f*g); A10: e1 in dom g by A8,FUNCT_1:11; then A11: (f*g).e1 = f.(g.e1) by FUNCT_1:13; A12: e2 in dom g by A9,FUNCT_1:11; then A13: (f*g).e2 = f.(g.e2) by FUNCT_1:13; assume e1 <= e2; then A14: g.e1 <= g.e2 by A10,A12,Def15; g.e1 in dom f & g.e2 in dom f by A8,A9,FUNCT_1:11; hence thesis by A11,A13,A14,Def16; end; end; registration let X be ext-real-membered set; cluster id X -> increasing for Function of X,X; coherence proof id X is increasing proof let e1,e2; assume that A1: e1 in dom id X and A2: e2 in dom id X; (id X).e1 = e1 by A1,FUNCT_1:18; hence thesis by A2,FUNCT_1:18; end; hence thesis; end; end; registration cluster increasing for sequence of NAT; existence proof take id NAT; thus thesis; end; end; definition let s be ManySortedSet of NAT; mode subsequence of s -> ManySortedSet of NAT means :Def17: ex N being increasing sequence of NAT st it = s * N; existence proof take s,id NAT; dom s = NAT by PARTFUN1:def 2; hence thesis by RELAT_1:52; end; end; Lm1: for x being non empty set, M be ManySortedSet of NAT, s be subsequence of M holds rng s c= rng M proof let x be non empty set, M be ManySortedSet of NAT, s be subsequence of M; ex N being increasing sequence of NAT st s = M * N by Def17; hence rng s c= rng M by RELAT_1:26; end; registration let X be non empty set, s be X-valued ManySortedSet of NAT; cluster -> X-valued for subsequence of s; coherence proof let ss be subsequence of s; rng ss c= rng s by Lm1; hence rng ss c= X by XBOOLE_1:1; end; end; definition let X be non empty set, s be sequence of X; redefine mode subsequence of s -> sequence of X; coherence proof let ss be subsequence of s; rng ss c= X & dom ss = NAT by PARTFUN1:def 2; hence ss is sequence of X by RELSET_1:4; end; end; definition let X be non empty set, s be sequence of X, k be Nat; redefine func s ^\ k -> subsequence of s; coherence proof set N = (id NAT)^\k; N is increasing proof let e1,e2; assume e1 in dom N & e2 in dom N; then reconsider i=e1, j=e2 as Element of NAT; A1: N.j = (id NAT).(j+k) by NAT_1:def 3 .= j+k by FUNCT_1:18; assume A2: e1 < e2; N.i = (id NAT).(i+k) by NAT_1:def 3 .= i+k by FUNCT_1:18; hence thesis by A1,A2,XREAL_1:6; end; then reconsider N as increasing sequence of NAT; thus s ^\ k is subsequence of s proof take N; thus s^\k = (s* id NAT)^\k by FUNCT_2:17 .= s * N by NAT_1:50; end; end; end; reserve s,s1,s2,s3 for sequence of X; reserve XX for non empty set, ss,ss1,ss2,ss3 for sequence of XX; theorem ss is subsequence of ss proof take id NAT; thus thesis by FUNCT_2:17; end; theorem ss1 is subsequence of ss2 & ss2 is subsequence of ss3 implies ss1 is subsequence of ss3 proof given N1 being increasing sequence of NAT such that A1: ss1 = ss2*N1; given N2 being increasing sequence of NAT such that A2: ss2 = ss3*N2; take N2*N1; thus thesis by A1,A2,RELAT_1:36; end; registration let X; cluster constant for sequence of X; existence proof per cases; suppose X = {}; then reconsider s = {} as sequence of X by FUNCT_2:def 1,RELSET_1:12; take s; thus thesis; end; suppose X <> {}; then consider x such that A1: x in X by XBOOLE_0:def 1; reconsider s = NAT --> x as sequence of X by A1,FUNCOP_1:45; take s; thus thesis; end; end; end; theorem Th21: for ss1 being subsequence of ss holds rng ss1 c= rng ss proof let ss1 be subsequence of ss; let x; consider N being increasing sequence of NAT such that A1: ss1 = ss * N by Def17; assume x in rng ss1; then consider n being set such that A2: n in NAT and A3: x = ss1.n by FUNCT_2:11; A4: N.n in NAT by A2,FUNCT_2:5; x = ss.(N.n) by A1,A2,A3,FUNCT_2:15; hence thesis by A4,FUNCT_2:4; end; registration let X be non empty set; let s be constant sequence of X; cluster -> constant for subsequence of s; coherence proof let s1 be subsequence of s; rng s1 c= rng s by Th21; hence thesis; end; end; definition let X be non empty set, N be increasing sequence of NAT, s be sequence of X; redefine func s*N -> subsequence of s; correctness by Def17; end; reserve X,Y for non empty set, Z for set; reserve s,s1 for sequence of X, h,h1 for PartFunc of X,Y, h2 for PartFunc of Y ,Z, x for Element of X, N for increasing sequence of NAT; theorem rng s c= dom h & s1 is subsequence of s implies h/*s1 is subsequence of h/*s proof assume that A1: rng s c= dom h and A2: s1 is subsequence of s; consider N such that A3: s1=s*N by A2,Def17; take N; thus thesis by A1,A3,FUNCT_2:110; end; registration let X be with_non-empty_element set; cluster non-empty for sequence of X; existence proof consider x being non empty set such that A1: x in X by SETFAM_1:def 10; reconsider s = NAT --> x as sequence of X by A1,FUNCOP_1:45; take s; thus thesis; end; end; registration let X be with_non-empty_element set, s be non-empty sequence of X; cluster -> non-empty for subsequence of s; coherence proof let s1 be subsequence of s; rng s1 c= rng s by Th21; hence not {} in rng s1; end; end; reserve i,j for Nat; definition let X be non empty set, s be sequence of X; redefine attr s is constant means ex x being Element of X st for n being Nat holds s.n=x; compatibility proof hereby assume s is constant; then consider x being Element of X such that A1: for n being Element of NAT st n in dom s holds s.n = x by PARTFUN2:def 1; take x; let n be Nat; dom s = NAT & n in NAT by FUNCT_2:def 1,ORDINAL1:def 12; hence s.n = x by A1; end; given x be Element of X such that A2: for n being Nat holds s.n=x; take x; thus thesis by A2; end; end; theorem Th23: for X being set for s being constant sequence of X holds s.i = s.j proof let X be set; let s be constant sequence of X; per cases; suppose A1: X is empty; then s.i = {}; hence thesis by A1; end; suppose X is not empty; then dom s = NAT by FUNCT_2:def 1; then i in dom s & j in dom s by ORDINAL1:def 12; hence thesis by FUNCT_1:def 10; end; end; theorem Th24: (for i,j holds s.i = s.j) implies s is constant proof assume for i,j holds s.i = s.j; then for x,y being set st x in dom s & y in dom s holds s.x = s.y; hence thesis by FUNCT_1:def 10; end; theorem (for i holds s.i = s.(i+1)) implies s is constant proof assume A1: for i holds s.i = s.(i+1); now let i,j; A2: now let i,j such that A3: i <= j; defpred P[Nat] means i <= $1 implies s.i = s.$1; A4: for j being Nat st P[j] holds P[j+1] proof let j being Nat such that A5: P[j]; assume i <= j+1; then i < j+1 or i = j+1 by XXREAL_0:1; hence thesis by A1,A5,NAT_1:13; end; A6: P[0] by NAT_1:3; for j being Nat holds P[j] from NAT_1:sch 2(A6,A4); hence s.i = s.j by A3; end; i <= j or j <= i; hence s.i = s.j by A2; end; hence thesis by Th24; end; theorem s is constant & s1 is subsequence of s implies s = s1 proof assume that A1: s is constant and A2: s1 is subsequence of s; let n be Element of NAT; consider N such that A3: s1=s*N by A2,Def17; thus s1.n=s.(N.n) by A3,FUNCT_2:15 .=s.n by A1,Th23; end; reserve n for Nat; theorem Th27: rng s c= dom h implies (h/*s)^\n=h/*(s^\n) proof assume A1: rng s c= dom h; let m be Element of NAT; A2: rng (s^\n) c= rng s by Th21; thus ((h/*s)^\n).m = (h/*s).(m+n) by NAT_1:def 3 .= h.(s.(m+n)) by A1,FUNCT_2:108 .= h.((s^\n).m) by NAT_1:def 3 .= (h/*(s^\n)).m by A1,A2,FUNCT_2:108,XBOOLE_1:1; end; theorem Th28: s.n in rng s proof n in NAT by ORDINAL1:def 12; hence thesis by FUNCT_2:112; end; theorem h is total implies h/*(s^\n) = (h/*s)^\n proof assume h is total; then dom h = X by PARTFUN1:def 2; then rng s c= dom h; hence thesis by Th27; end; theorem Th30: rng s c= dom h implies h.:(rng s) = rng (h/*s) proof assume A1: rng s c= dom h; now let r be Element of Y; thus r in h.:(rng s) implies r in rng (h/*s) proof assume r in h.:(rng s); then consider p being Element of X such that p in dom h and A2: p in rng s and A3: r=h.p by PARTFUN2:59; consider n being Element of NAT such that A4: p=s.n by A2,FUNCT_2:113; r = (h/*s).n by A1,A3,A4,FUNCT_2:108; hence thesis by Th28; end; assume r in rng (h/*s); then consider n being Element of NAT such that A5: (h/*s).n=r by FUNCT_2:113; A6: s.n in rng s by Th28; r = h.(s.n) by A1,A5,FUNCT_2:108; hence r in h.:(rng s) by A1,A6,FUNCT_1:def 6; end; hence thesis by SUBSET_1:3; end; theorem rng s c= dom (h2*h1) implies h2/*(h1/*s) = (h2*h1)/*s proof assume A1: rng s c= dom (h2*h1); now let n be Element of NAT; A2: rng s c= dom h1 by A1,FUNCT_1:101; h1.:(rng s) c= dom h2 by A1,FUNCT_1:101; then A3: rng (h1/*s) c= dom h2 by A2,Th30; s.n in rng s by Th28; then A4: s.n in dom h1 by A1,FUNCT_1:11; thus ((h2*h1)/*s).n = (h2*h1).(s.n) by A1,FUNCT_2:108 .= h2.(h1.(s.n)) by A4,FUNCT_1:13 .= h2.((h1/*s).n) by A2,FUNCT_2:108 .= (h2/*(h1/*s)).n by A3,FUNCT_2:108; end; hence thesis by FUNCT_2:63; end; definition let f be ext-real-valued Function; attr f is zeroed means f.{} = 0; end; registration cluster COMPLEX-valued -> complex-valued for Relation; coherence proof let R be Relation; assume R is COMPLEX-valued; hence rng R c= COMPLEX by RELAT_1:def 19; end; cluster ExtREAL-valued -> ext-real-valued for Relation; coherence proof let R be Relation; assume R is ExtREAL-valued; hence rng R c= ExtREAL by RELAT_1:def 19; end; cluster REAL-valued -> real-valued for Relation; coherence proof let R be Relation; assume R is REAL-valued; hence rng R c= REAL by RELAT_1:def 19; end; cluster NAT-valued -> natural-valued for Relation; coherence proof let R be Relation; assume R is NAT-valued; hence rng R c= NAT by RELAT_1:def 19; end; end; definition let s be ManySortedSet of NAT; redefine attr s is constant means ex x being set st for n being Nat holds s.n=x; compatibility proof A1: dom s = NAT by PARTFUN1:def 2; hereby assume A2: s is constant; take x = s.0; let n be Nat; 0 in dom s & n in dom s by A1,ORDINAL1:def 12; hence s.n = x by A2,FUNCT_1:def 10; end; given x being set such that A3: for n being Nat holds s.n=x; let n1,n2 be set; assume A4: n1 in dom s & n2 in dom s; hence s.n1 = x by A3 .= s.n2 by A3,A4; end; end; theorem for x being non empty set, M be ManySortedSet of NAT, s be subsequence of M holds rng s c= rng M by Lm1; registration let X be set; cluster natural-valued for ManySortedSet of X; existence proof take X --> 0; thus thesis; end; end; begin reserve a,b,c,d for real number; theorem Th1: a^2 + b^2 = 0 implies a = 0 proof 0 <= a^2 & 0 <= b^2 by XREAL_1:63; hence thesis; end; Lm1: 0 <= a^2 + b^2 proof 0<=a^2 & 0<=b^2 by XREAL_1:63; hence thesis; end; definition let z be complex number; func Re z means :Def1: it = z if z in REAL otherwise ex f being Function of 2,REAL st z = f & it = f.0; existence proof thus z in REAL implies ex IT being set st IT = z; A1: z in COMPLEX by XCMPLX_0:def 2; assume not z in REAL; then z in Funcs(2,REAL) \ { x where x is Element of Funcs(2,REAL): x.1 = 0 } by A1,CARD_1:50,NUMBERS:def 2,XBOOLE_0:def 3; then reconsider f = z as Function of 2, REAL by FUNCT_2:66; take f.0, f; thus thesis; end; uniqueness; consistency; func Im z means :Def2: it = 0 if z in REAL otherwise ex f being Function of 2,REAL st z = f & it = f.1; existence proof thus z in REAL implies ex IT being set st IT = 0; A2: z in COMPLEX by XCMPLX_0:def 2; assume not z in REAL; then z in Funcs(2,REAL) \ { x where x is Element of Funcs(2,REAL): x.1 = 0 } by A2,CARD_1:50,NUMBERS:def 2,XBOOLE_0:def 3; then reconsider f = z as Function of 2, REAL by FUNCT_2:66; take f.1, f; thus thesis; end; uniqueness; consistency; end; registration let z be complex number; cluster Re z -> real; coherence proof per cases; suppose z in REAL; hence thesis by Def1; end; suppose not z in REAL; then consider f being Function of 2,REAL such that z = f and A1: Re z = f.0 by Def1; 0 in 2 by CARD_1:50,TARSKI:def 2; then f.0 in REAL by FUNCT_2:5; hence thesis by A1; end; end; cluster Im z -> real; coherence proof per cases; suppose z in REAL; hence thesis by Def2; end; suppose not z in REAL; then consider f being Function of 2,REAL such that z = f and A2: Im z = f.1 by Def2; 1 in 2 by CARD_1:50,TARSKI:def 2; then f.1 in REAL by FUNCT_2:5; hence thesis by A2; end; end; end; definition let z be complex number; redefine func Re z -> Real; coherence by XREAL_0:def 1; redefine func Im z -> Real; coherence by XREAL_0:def 1; end; theorem Th2: for f being Function of 2,REAL ex a,b being Element of REAL st f = (0,1)-->(a,b) proof let f be Function of 2,REAL; 0 in 2 & 1 in 2 by CARD_1:50,TARSKI:def 2; then reconsider a = f.0, b = f.1 as Element of REAL by FUNCT_2:5; take a,b; dom f = {0,1} by CARD_1:50,FUNCT_2:def 1; hence thesis by FUNCT_4:66; end; Lm2: for a, b being Element of REAL holds Re [*a,b*] = a & Im [*a,b*] = b proof let a, b be Element of REAL; reconsider a9 =a, b9 = b as Element of REAL; thus Re [*a,b*] = a proof per cases; suppose b = 0; then [*a,b*] = a by ARYTM_0:def 5; hence thesis by Def1; end; suppose b <> 0; then A1: [*a,b*] = (0,1)-->(a9,b9) by ARYTM_0:def 5; then reconsider f = [*a,b*] as Function of 2, REAL by CARD_1:50; ( not [*a,b*] in REAL)& f.0 = a by A1,ARYTM_0:8,FUNCT_4:63; hence thesis by Def1; end; end; per cases; suppose A2: b = 0; then [*a,b*] = a by ARYTM_0:def 5; hence thesis by A2,Def2; end; suppose b <> 0; then A3: [*a,b*] = (0,1)-->(a9,b9) by ARYTM_0:def 5; then reconsider f = [*a,b*] as Function of 2, REAL by CARD_1:50; ( not [*a,b*] in REAL)& f.1 = b by A3,ARYTM_0:8,FUNCT_4:63; hence thesis by Def2; end; end; reserve z,z1,z2 for complex number; Lm3: [*Re z, Im z*] = z proof A1: z in COMPLEX by XCMPLX_0:def 2; per cases; suppose A2: z in REAL; then Im z = 0 by Def2; hence [*Re z, Im z*] = Re z by ARYTM_0:def 5 .= z by A2,Def1; end; suppose A3: not z in REAL; then A4: ex f being Function of 2,REAL st z = f & Im z = f.1 by Def2; then consider a,b being Element of REAL such that A5: z = (0,1)-->(a,b) by Th2; reconsider f = z as Element of Funcs(2,REAL) by A5,CARD_1:50,FUNCT_2:8; z in Funcs(2,REAL) \ { x where x is Element of Funcs(2,REAL): x.1 = 0 } by A1,A3,CARD_1:50,NUMBERS:def 2,XBOOLE_0:def 3; then not z in { x where x is Element of Funcs(2,REAL): x.1 = 0} by XBOOLE_0:def 5; then f.1 <> 0; then A6: b <> 0 by A5,FUNCT_4:63; ex f being Function of 2,REAL st z = f & Re z = f.0 by A3,Def1; then A7: Re z = a by A5,FUNCT_4:63; Im z = b by A4,A5,FUNCT_4:63; hence thesis by A5,A7,A6,ARYTM_0:def 5; end; end; theorem Th3: Re z1 = Re z2 & Im z1 = Im z2 implies z1 = z2 proof assume Re z1 = Re z2 & Im z1 = Im z2; hence z1 = [*Re z2,Im z2*] by Lm3 .= z2 by Lm3; end; definition let z1,z2 be complex number; redefine pred z1 = z2 means Re z1 = Re z2 & Im z1 = Im z2; compatibility by Th3; end; notation synonym 0c for 0; end; definition redefine func 0c -> Element of COMPLEX; correctness by XCMPLX_0:def 2; end; definition func 1r -> Element of COMPLEX equals 1; correctness by XCMPLX_0:def 2; redefine func -> Element of COMPLEX; coherence by XCMPLX_0:def 2; end; Lm4: 0 = [*0,0*] by ARYTM_0:def 5; Lm5: 1r = [*1,0*] by ARYTM_0:def 5; theorem Th4: Re 0 = 0 & Im 0 = 0 by Lm2,Lm4; theorem Th5: z = 0 iff (Re z)^2 + (Im z)^2 = 0 proof set r = Re z, i = Im z; thus z=0 implies r^2 + i^2 = 0 by Th4; assume 0 = r^2+i^2; then r = 0 & i = 0 by Th1; hence thesis by Th3,Th4; end; theorem Th6: Re(1r) = 1 & Im(1r) = 0 by Lm2,Lm5; Lm6: = [*0,1*] by ARYTM_0:def 5,XCMPLX_0:def 1; theorem Th7: Re() = 0 & Im() = 1 by Lm2,Lm6; Lm7: for x being real number, x1,x2 being Element of REAL st x = [*x1,x2*] holds x2 = 0 & x = x1 proof let x be real number, x1,x2 being Element of REAL; assume A1: x = [*x1,x2*]; A2: x in REAL by XREAL_0:def 1; hereby assume x2 <> 0; then x = (0,1) --> (x1,x2) by A1,ARYTM_0:def 5; hence contradiction by A2,ARYTM_0:8; end; hence thesis by A1,ARYTM_0:def 5; end; Lm8: for x9,y9 being Element of REAL, x,y being real number st x9 = x & y9 = y holds +(x9,y9) = x + y proof let x9,y9 be Element of REAL, x,y be real number such that A1: x9 = x & y9 = y; consider x1,x2,y1,y2 being Element of REAL such that A2: x = [* x1,x2 *] & y = [*y1,y2*] and A3: x+y = [*+(x1,y1),+(x2,y2)*] by XCMPLX_0:def 4; x2 = 0 & y2 = 0 by A2,Lm7; then A4: +(x2,y2) = 0 by ARYTM_0:11; x = x1 & y = y1 by A2,Lm7; hence thesis by A1,A3,A4,ARYTM_0:def 5; end; Lm9: for x being Element of REAL holds opp x = -x proof let x be Element of REAL; +(x,opp x) = 0 by ARYTM_0:def 3; then x + opp x = 0 by Lm8; hence thesis; end; Lm10: for x9,y9 being Element of REAL, x,y being real number st x9 = x & y9 = y holds *(x9,y9) = x * y proof let x9,y9 be Element of REAL, x,y be real number such that A1: x9 = x & y9 = y; consider x1,x2,y1,y2 being Element of REAL such that A2: x = [* x1,x2 *] and A3: y = [*y1,y2*] and A4: x*y = [* +(*(x1,y1),opp*(x2,y2)), +(*(x1,y2),*(x2,y1)) *] by XCMPLX_0:def 5 ; x2 = 0 by A2,Lm7; then A5: *(x2,y1) = 0 by ARYTM_0:12; A6: y2 = 0 by A3,Lm7; then *(x1,y2) = 0 by ARYTM_0:12; then A7: +(*(x1,y2),*(x2,y1)) = 0 by A5,ARYTM_0:11; x = x1 & y = y1 by A2,A3,Lm7; hence *(x9,y9) = +(*(x1,y1),*(opp x2,y2)) by A1,A6,ARYTM_0:11,12 .= +(*(x1,y1),opp*(x2,y2)) by ARYTM_0:15 .= x * y by A4,A7,ARYTM_0:def 5; end; Lm11: for x,y,z being complex number st z = x + y holds Re z = Re x + Re y proof let x,y,z be complex number such that A1: z = x + y; consider x1,x2,y1,y2 being Element of REAL such that A2: x = [*x1,x2*] & y = [*y1,y2*] and A3: x + y = [*+(x1,y1),+(x2,y2)*] by XCMPLX_0:def 4; A4: Re x = x1 & Re y = y1 by A2,Lm2; thus Re z = +(x1,y1) by A1,A3,Lm2 .= Re x + Re y by A4,Lm8; end; Lm12: for x,y,z being complex number st z = x+y holds Im z = Im x + Im y proof let x,y,z be complex number such that A1: z = x+y; consider x1,x2,y1,y2 being Element of REAL such that A2: x = [*x1,x2*] & y = [*y1,y2*] and A3: x + y = [*+(x1,y1),+(x2,y2)*] by XCMPLX_0:def 4; A4: Im x = x2 & Im y = y2 by A2,Lm2; thus Im z = +(x2,y2) by A1,A3,Lm2 .= Im x + Im y by A4,Lm8; end; Lm13: for x,y,z being complex number st z = x * y holds Re z = Re x * Re y - Im x * Im y proof let x,y,z be complex number such that A1: z = x * y; consider x1,x2,y1,y2 being Element of REAL such that A2: x = [*x1,x2*] & y = [*y1,y2*] and A3: x * y = [* +(*(x1,y1),opp*(x2,y2)), +(*(x1,y2),*(x2,y1)) *] by XCMPLX_0:def 5; A4: Re x = x1 & Re y = y1 by A2,Lm2; A5: Im x = x2 & Im y = y2 by A2,Lm2; thus Re z = +(*(x1,y1),opp*(x2,y2)) by A1,A3,Lm2 .= *(x1,y1) + opp*(x2,y2) by Lm8 .= x1*y1 + opp*(x2,y2) by Lm10 .= x1*y1 + -*(x2,y2) by Lm9 .= x1*y1 - *(x2,y2) .= Re x * Re y - Im x * Im y by A4,A5,Lm10; end; Lm14: for x,y,z being complex number st z = x*y holds Im z = Re x * Im y + Im x * Re y proof let x,y,z be complex number such that A1: z = x*y; consider x1,x2,y1,y2 being Element of REAL such that A2: x = [*x1,x2*] & y = [*y1,y2*] and A3: x * y = [* +(*(x1,y1),opp*(x2,y2)), +(*(x1,y2),*(x2,y1)) *] by XCMPLX_0:def 5; A4: Im x = x2 & Im y = y2 by A2,Lm2; A5: Re x = x1 & Re y = y1 by A2,Lm2; thus Im z = +(*(x1,y2),*(x2,y1)) by A1,A3,Lm2 .= *(x1,y2) + *(x2,y1) by Lm8 .= x1*y2 + *(x2,y1) by Lm10 .= Re x * Im y + Im x * Re y by A4,A5,Lm10; end; Lm15: z1+z2 = [* Re z1 + Re z2, Im z1 + Im z2 *] proof set z = [* Re z1 + Re z2, Im z1 + Im z2 *]; reconsider z9 = z1 + z2 as Element of COMPLEX by XCMPLX_0:def 2; A1: Im z = Im z1 + Im z2 by Lm2 .= Im z9 by Lm12; Re z = Re z1 + Re z2 by Lm2 .= Re z9 by Lm11; hence thesis by A1,Th3; end; Lm16: z1 * z2 = [* Re z1 * Re z2 - Im z1 * Im z2, Re z1 * Im z2 + Re z2 * Im z1 *] proof set z = [* Re z1 * Re z2 - Im z1 * Im z2, Re z1 * Im z2 + Re z2 * Im z1 *]; reconsider z9 = z1 * z2 as Element of COMPLEX by XCMPLX_0:def 2; A1: Im z = Re z1 * Im z2 + Re z2 * Im z1 by Lm2 .= Im z9 by Lm14; Re z = Re z1 * Re z2 - Im z1 * Im z2 by Lm2 .= Re z9 by Lm13; hence thesis by A1,Th3; end; Lm17: Re(z1 * z2) = Re z1 * Re z2 - Im z1 * Im z2 & Im(z1 * z2) = Re z1 * Im z2 + Re z2 * Im z1 proof z1 * z2 = [*Re z1 * Re z2 - Im z1 * Im z2, Re z1 * Im z2 + Re z2 * Im z1 *] by Lm16; hence thesis by Lm2; end; Lm18: Re(z1 + z2) = Re z1 + Re z2 & Im(z1 + z2) = Im z1 + Im z2 proof (z1 + z2) = [* Re z1 + Re z2, Im z1 + Im z2 *] by Lm15; hence thesis by Lm2; end; Lm19: for x being Real holds Re (x*) = 0 proof let x be Real; thus Re (x*) = Re x * Re () - Im x * Im () by Lm17 .= Re x * 0 - 0 * Im () by Def2,Th7 .= 0; end; Lm20: for x being Real holds Im (x*) = x proof let x be Real; thus Im (x*) = Re x * Im () + Im x * Re () by Lm17 .= x by Def1,Th7; end; Lm21: for x, y being Real holds [*x,y*] = x + y * proof let x, y be Real; A1: Im (x + y*) = Im x + Im (y*) by Lm18 .= 0 + Im (y*) by Def2 .= y by Lm20; Re (x + y*) = Re x + Re (y*) by Lm18 .= Re x + 0 by Lm19 .= x by Def1; hence thesis by A1,Lm3; end; definition let z1,z2 be Element of COMPLEX; redefine func z1 + z2 -> Element of COMPLEX equals Re z1 + Re z2 + (Im z1 + Im z2)*; coherence by XCMPLX_0:def 2; compatibility proof z1 + z2 = [* Re z1 + Re z2, Im z1 + Im z2 *] by Lm15; hence thesis by Lm21; end; end; theorem Th8: Re(z1 + z2) = Re z1 + Re z2 & Im(z1 + z2) = Im z1 + Im z2 proof (z1 + z2) = [* Re z1 + Re z2, Im z1 + Im z2 *] by Lm15; hence thesis by Lm2; end; definition let z1,z2 be Element of COMPLEX; redefine func z1 * z2 -> Element of COMPLEX equals Re z1 * Re z2 - Im z1 * Im z2+(Re z1 * Im z2 + Re z2 * Im z1)*; coherence by XCMPLX_0:def 2; compatibility proof z1 * z2 = [* Re z1 * Re z2 - Im z1 * Im z2, Re z1 * Im z2 + Re z2 * Im z1 *] by Lm16; hence thesis by Lm21; end; end; theorem Th9: Re(z1 * z2) = Re z1 * Re z2 - Im z1 * Im z2 & Im(z1 * z2) = Re z1 * Im z2 + Re z2 * Im z1 proof z1 * z2 = [*Re z1 * Re z2 - Im z1 * Im z2, Re z1 * Im z2 + Re z2 * Im z1 *] by Lm16; hence thesis by Lm2; end; theorem Re (a*) = 0 proof A1: a in REAL by XREAL_0:def 1; thus Re (a*) = Re a * Re () - Im a * Im () by Th9 .= Re a * 0 - 0 * Im () by Def2,Th7,A1 .= 0; end; theorem Im (a*) = a proof A1: a in REAL by XREAL_0:def 1; thus Im (a*) = Re a * Im () + Im a * Re () by Th9 .= a by Def1,Th7,A1; end; theorem Th12: Re(a+b*) = a & Im(a+b*) = b proof reconsider a,b as Real by XREAL_0:def 1; (a+b*) = [*a,b*] by Lm21; hence thesis by Lm2; end; theorem Th13: Re z+(Im z)* = z proof [*Re z, Im z*] = z by Lm3; hence thesis by Lm21; end; theorem Th14: Im z1 = 0 & Im z2 = 0 implies Re(z1*z2) = Re z1 * Re z2 & Im(z1*z2) = 0 proof assume that A1: Im z1 = 0 and A2: Im z2 = 0; thus Re(z1*z2) = Re z1 * Re z2 - Im z1 * Im z2 by Th9 .= Re z1 * Re z2 by A1; thus Im(z1*z2) = Re z1 * Im z2 + Re z2 * Im z1 by Th9 .= 0 by A1,A2; end; theorem Th15: Re z1 = 0 & Re z2 = 0 implies Re(z1*z2) = - Im z1 * Im z2 & Im(z1*z2) = 0 proof assume that A1: Re z1 = 0 and A2: Re z2 = 0; thus Re(z1*z2) = Re z1 * Re z2 - Im z1 * Im z2 by Th9 .= - Im z1 * Im z2 by A1; thus Im(z1*z2) = Re z1 * Im z2 + Re z2 * Im z1 by Th9 .= 0 by A1,A2; end; theorem Re(z*z) = (Re z)^2 - (Im z)^2 & Im(z*z) = 2*(Re z *Im z) proof thus Re(z*z) = (Re z)^2 - (Im z)^2 by Th9; thus Im(z*z) = Re z *Im z + Re z *Im z by Th9 .= 2*(Re z *Im z); end; definition let z be Element of COMPLEX; redefine func -z -> Element of COMPLEX equals :Def7: -Re z+(-Im z)*; coherence by XCMPLX_0:def 2; compatibility proof set z9 = [* -Re z, -Im z *]; z9 + z = [* Re z9 + Re z, Im z9 + Im z *] by Lm15 .= [* -Re z + Re z, Im z9 + Im z *] by Lm2 .= [* 0, -Im z + Im z *] by Lm2 .= 0 by ARYTM_0:def 5; hence thesis by Lm21; end; end; theorem Th17: Re(-z) = -(Re z) & Im(-z) = -(Im z) proof z in COMPLEX by XCMPLX_0:def 2; then -z = -Re z+(-Im z)* by Def7; hence thesis by Th12; end; theorem * = -1r; definition let z1,z2 be Element of COMPLEX; redefine func z1 - z2 -> Element of COMPLEX equals :Def8: Re z1 - Re z2 + (Im z1 - Im z2)*; coherence by XCMPLX_0:def 2; compatibility proof A1: z1 = Re z1 + (Im z1)* by Th13; z1 - z2 = z1 + -z2 .= z1 + (-Re z2+(-Im z2)*) by Def7 .= Re z1 - Re z2 + (Im z1 - Im z2)* by A1; hence thesis; end; end; theorem Th19: Re(z1 - z2) = Re z1 - Re z2 & Im(z1 - z2) = Im z1 - Im z2 proof A1: z1 in COMPLEX & z2 in COMPLEX by XCMPLX_0:def 2; hence Re(z1 - z2) = Re(Re z1 - Re z2 + (Im z1 - Im z2)*) by Def8 .= Re z1 - Re z2 by Th12; thus Im(z1 - z2) = Im(Re z1 - Re z2 + (Im z1 - Im z2)*) by A1,Def8 .= Im z1 - Im z2 by Th12; end; definition let z be Element of COMPLEX; redefine func z" -> Element of COMPLEX equals :Def9: Re z / ((Re z)^2+(Im z )^2)+((- Im z) / ((Re z)^2+(Im z)^2))*; coherence by XCMPLX_0:def 2; compatibility proof reconsider z9 =Re z / ((Re z)^2+(Im z)^2)+((- Im z) / ((Re z)^2+(Im z)^2)) * as Element of COMPLEX by XCMPLX_0:def 2; per cases; suppose z = 0; hence thesis by Th4; end; suppose A1: z <> 0; then A2: (Re z)^2+(Im z)^2 <> 0 by Th5; A3: Im z9 = (-Im z) / ((Re z)^2+(Im z)^2) by Th12; then A4: Re z * Im z9 + Re z9 * Im z = (Re z)/1 * ((-Im z) / ((Re z)^2+(Im z) ^2)) + Re z / ((Re z)^2+(Im z)^2) * Im z by Th12 .= Re z * (-Im z) / (1*((Re z)^2+(Im z)^2)) + Re z / ((Re z)^2+(Im z )^2) * (Im z)/1 by XCMPLX_1:76 .= Re z * (-Im z) / (1*((Re z)^2+(Im z)^2)) + (Im z)/1 * Re z / ((Re z)^2+(Im z)^2) by XCMPLX_1:76 .= (- Re z * Im z + Re z * Im z) / ((Re z)^2+(Im z)^2) by XCMPLX_1:62 .= 0; A5: Re z * Re z9 - Im z * Im z9 = (Re z)/1 * (Re z / ((Re z)^2+(Im z)^2) ) - Im z *((-Im z)/((Re z)^2+(Im z)^2)) by A3,Th12 .= Re z * Re z / (1*((Re z)^2+(Im z)^2)) - (Im z)/1 *((-Im z)/((Re z )^2+(Im z)^2)) by XCMPLX_1:76 .= (Re z)^2 / ((Re z)^2+(Im z)^2) - Im z *(-Im z)/(1*((Re z)^2+(Im z )^2)) by XCMPLX_1:76 .= (Re z)^2 / ((Re z)^2+(Im z)^2) - (-((Im z)^2))/(1*((Re z)^2+(Im z )^2)) .= (Re z)^2 / ((Re z)^2+(Im z)^2) - -((Im z)^2)/((Re z)^2+(Im z)^2) by XCMPLX_1:187 .= (Re z)^2 / ((Re z)^2+(Im z)^2) + (Im z)^2/(1*((Re z)^2+(Im z)^2)) .= ((Re z)^2 + (Im z)^2)/((Re z)^2+(Im z)^2) by XCMPLX_1:62 .= 1 by A2,XCMPLX_1:60; z * z9= [*Re z * Re z9 - Im z * Im z9,Re z * Im z9 + Re z9 * Im z*] by Lm16 .= 1 by A5,A4,ARYTM_0:def 5; hence thesis by A1,XCMPLX_0:def 7; end; end; end; theorem Th20: Re(z") = Re z / ((Re z)^2+(Im z)^2) & Im(z") = (- Im z) / ((Re z)^2+(Im z)^2) proof z in COMPLEX by XCMPLX_0:def 2; then z" = Re z / ((Re z)^2+(Im z)^2)+((- Im z) / ((Re z)^2+(Im z)^2))* by Def9; hence thesis by Th12; end; theorem " = -; theorem Th22: Re z <> 0 & Im z = 0 implies Re(z") = (Re z)" & Im(z") = 0 proof assume that A1: Re z <> 0 and A2: Im z = 0; Re(z") = Re z / ((Re z)^2+(Im z)^2) by Th20; hence Re(z") = (1*Re z) / (Re z * Re z) by A2 .= 1/Re z by A1,XCMPLX_1:91 .= (Re z)" by XCMPLX_1:215; Im(z") = (- Im z) / ((Re z)^2+(Im z)^2) by Th20; hence thesis by A2; end; theorem Th23: Re z = 0 & Im z <> 0 implies Re(z") = 0 & Im(z") = -(Im z)" proof assume that A1: Re z = 0 and A2: Im z <> 0; Re(z") = Re z / ((Re z)^2+(Im z)^2) by Th20; hence Re(z") = 0 by A1; Im(z") = (- Im z) / ((Re z)^2+(Im z)^2) by Th20; hence Im(z") = -(1*Im z / (Im z * Im z)) by A1,XCMPLX_1:187 .= -(1 / Im z) by A2,XCMPLX_1:91 .= - (Im z)" by XCMPLX_1:215; end; definition let z1,z2 be complex number; redefine func z1 / z2 -> Element of COMPLEX equals :Def10: (Re z1 * Re z2 + Im z1 * Im z2) / ((Re z2)^2 + (Im z2)^2) + ((Re z2 * Im z1 - Re z1 * Im z2) / ((Re z2)^2 + (Im z2)^2))*; coherence by XCMPLX_0:def 2; compatibility proof reconsider z1,z2 as Element of COMPLEX by XCMPLX_0:def 2; set k = (Re z2)^2 + (Im z2)^2; A1: Re[*Re z2/k,(-Im z2)/k*] = Re(Re z2/k+(-Im z2)/k*) by Lm21 .= Re z2/k by Th12; A2: Im[*Re z2/k,(-Im z2)/k*] = Im(Re z2/k+(-Im z2)/k*) by Lm21 .= (-Im z2)/k by Th12; z1 / z2 = z1 * z2" by XCMPLX_0:def 9 .= z1*[* Re z2/k, (-Im z2)/k *] by Lm21 .= [* (Re z1)/1 * (Re z2/k) - Im z1 * ((-Im z2)/k), Re z1 * ((-Im z2)/ k) + (Re z2/k) * Im z1 *] by A1,A2,Lm16 .= (Re z1)/1 * (Re z2/k) - Im z1 * ((-Im z2)/k)+ (Re z1 * ((-Im z2)/k) + (Re z2/k) * Im z1)* by Lm21 .= Re z1 * Re z2/(1*k) - (Im z1)/1 * ((-Im z2)/k)+ (Re z1 * ((-Im z2)/ k) + (Re z2/k) * Im z1)* by XCMPLX_1:76 .= Re z1 * Re z2/k - Im z1 * (-Im z2)/(1*k)+ ((Re z1)/1 * ((-Im z2)/k) + (Re z2/k) * Im z1)* by XCMPLX_1:76 .= Re z1 * Re z2/k - Im z1 * (-Im z2)/k+ (Re z1 * (-Im z2)/(1*k) + (Re z2/k) * ((Im z1)/1))* by XCMPLX_1:76 .= Re z1 * Re z2/k - Im z1 * (-Im z2)/k+ (Re z1 * (-Im z2)/k + Im z1 * Re z2/(1*k))* by XCMPLX_1:76 .= (Re z1 * Re z2 - Im z1 * (-Im z2))/k+ (Re z1 * (-Im z2)/k + Im z1 * Re z2/(1*k))* by XCMPLX_1:120 .= (Re z1 * Re z2 + Im z1 * Im z2)/k+ ((-Re z1 * Im z2 + Im z1 * Re z2 )/k)* by XCMPLX_1:62 .= (Re z1 * Re z2 + Im z1 * Im z2) / ((Re z2)^2 + (Im z2)^2) + ((Re z2 * Im z1 - Re z1 * Im z2) / ((Re z2)^2 + (Im z2)^2))*; hence thesis; end; end; theorem Re(z1 / z2) = (Re z1 * Re z2 + Im z1 * Im z2) / ((Re z2)^2 + (Im z2)^2) & Im(z1 / z2) = (Re z2 * Im z1 - Re z1 * Im z2) / ((Re z2)^2 + (Im z2)^2) proof thus Re(z1 / z2) = Re((Re z1 * Re z2 + Im z1 * Im z2) / ((Re z2)^2 + (Im z2) ^2) + ((Re z2 * Im z1 - Re z1 * Im z2) / ((Re z2)^2 + (Im z2)^2))*) by Def10 .= (Re z1 * Re z2 + Im z1 * Im z2) / ((Re z2)^2 + (Im z2)^2) by Th12; thus Im(z1 / z2) = Im((Re z1 * Re z2 + Im z1 * Im z2) / ((Re z2)^2 + (Im z2) ^2) + ((Re z2 * Im z1 - Re z1 * Im z2) / ((Re z2)^2 + (Im z2)^2))*) by Def10 .= (Re z2 * Im z1 - Re z1 * Im z2) / ((Re z2)^2 + (Im z2)^2) by Th12; end; theorem Im z1 = 0 & Im z2 = 0 & Re z2 <> 0 implies Re(z1/z2) = (Re z1)/(Re z2) & Im(z1/z2) = 0 proof assume that A1: Im z1 = 0 and A2: Im z2 = 0 & Re z2 <> 0; A3: z1/z2 = z1*z2" & Im(z2") = 0 by A2,Th22,XCMPLX_0:def 9; hence Re(z1/z2) = (Re z1)*Re(z2") by A1,Th14 .= (Re z1)*(Re z2)" by A2,Th22 .= (Re z1)/(Re z2) by XCMPLX_0:def 9; thus thesis by A1,A3,Th14; end; theorem Re z1 = 0 & Re z2 = 0 & Im z2 <> 0 implies Re(z1/z2) = (Im z1)/(Im z2) & Im(z1/z2) = 0 proof assume that A1: Re z1 = 0 and A2: Re z2 = 0 & Im z2 <> 0; A3: z1/z2 = z1*z2" & Re(z2") = 0 by A2,Th23,XCMPLX_0:def 9; hence Re(z1/z2) = -(Im z1)*Im(z2") by A1,Th15 .= -(Im z1)*-(Im z2)" by A2,Th23 .= --(Im z1)*(Im z2)" .= (Im z1)/(Im z2) by XCMPLX_0:def 9; thus thesis by A1,A3,Th15; end; definition let z be complex number; func z*' -> complex number equals Re z-(Im z)*; correctness; involutiveness proof let z,z9 be complex number; assume z = Re z9-(Im z9)*; then z = Re z9+(-Im z9)*; then Re z = Re z9 & -Im z = --Im z9 by Th12; hence z9= Re z+(-Im z)* by Th13 .= Re z-(Im z)*; end; end; definition let z be complex number; redefine func z*' -> Element of COMPLEX; coherence by XCMPLX_0:def 2; end; theorem Th27: Re (z*') = Re z & Im (z*') = -Im z proof z*' = Re z+(-Im z)*; hence thesis by Th12; end; theorem 0*' = 0 by Th4; theorem z*' = 0 implies z = 0 proof assume z*' = 0; then 0 = Re z+(-Im z)*; hence Re z = Re 0 & Im z = Im 0 by Th4,Th12; end; theorem 1r*' = 1r by Th6; theorem *' = - by Th7; theorem Th32: (z1 + z2)*' = z1*' + z2*' proof thus Re ((z1 + z2)*') = Re(z1 + z2) by Th27 .= Re z1 + Re z2 by Th8 .= Re (z1*') + Re z2 by Th27 .= Re (z1*') + Re (z2*') by Th27 .= Re (z1*'+ z2*') by Th8; thus Im ((z1 + z2)*') = -Im(z1 + z2) by Th27 .= -(Im z1 + --Im z2) by Th8 .= -Im z1 + -Im z2 .= Im (z1*') + -Im z2 by Th27 .= Im (z1*') + Im (z2*') by Th27 .= Im (z1*' + z2*') by Th8; end; theorem Th33: (-z)*' = -(z*') proof thus Re ((-z)*') = Re -z by Th27 .= - Re z by Th17 .= - Re (z*') by Th27 .= Re -(z*') by Th17; thus Im ((-z)*') = -Im -z by Th27 .= - -Im z by Th17 .= - Im (z*') by Th27 .= Im -(z*') by Th17; end; theorem (z1 - z2)*' = z1*' - z2*' proof thus (z1 - z2)*' = (z1 + -z2)*' .= z1*' + (-z2)*' by Th32 .= z1*' + -(z2*') by Th33 .= z1*' - z2*'; end; theorem Th35: (z1*z2)*' = z1*'*z2*' proof A1: Re(z1*') = Re z1 & Re(z2*') = Re z2 by Th27; A2: Im(z1*') = -Im z1 & Im(z2*') = -Im z2 by Th27; thus Re((z1*z2)*') = Re(z1*z2) by Th27 .= (Re (z1*') * Re (z2*')) - (-Im (z1*')) * -Im (z2*') by A1,A2,Th9 .= (Re (z1*') * Re (z2*')) - --(Im (z1*') * Im (z2*')) .= Re(z1*'*z2*') by Th9; thus Im((z1*z2)*') = -Im(z1*z2) by Th27 .= -((Re (z1*') * -Im (z2*')) + (Re (z2*') * -Im (z1*'))) by A1,A2,Th9 .= (Re (z2*') * Im (z1*'))+--(Re (z1*') * Im (z2*')) .= Im(z1*'*z2*') by Th9; end; theorem Th36: z"*' = z*'" proof A1: Re z = Re (z*') & -Im z = Im (z*') by Th27; thus Re(z"*') = Re(z") by Th27 .= Re z / ((Re z)^2+(Im z)^2) by Th20 .= Re(z*'") by A1,Th20; thus Im(z"*') = -Im(z") by Th27 .= -((- Im z) / ((Re z)^2+(Im z)^2)) by Th20 .= (-Im (z*'))/((Re (z*'))^2+(Im (z*'))^2) by A1,XCMPLX_1:187 .= Im(z*'") by Th20; end; theorem (z1/z2)*' = (z1*')/(z2*') proof thus (z1/z2)*' = (z1*z2")*' by XCMPLX_0:def 9 .= (z1*'*z2"*') by Th35 .= (z1*'*z2*'") by Th36 .= (z1*')/(z2*') by XCMPLX_0:def 9; end; theorem Im z = 0 implies z*' = z proof Re (z*') = Re z & Im (z*') = -Im z by Th27; hence thesis by Th3; end; theorem Re z = 0 implies z*' = -z proof A1: z in COMPLEX by XCMPLX_0:def 2; assume A2: Re z = 0; hence z*' = -0+(-Im z)* .= -z by A1,A2,Def7; end; theorem Re(z*z*') = (Re z)^2 + (Im z)^2 & Im(z*z*') = 0 proof thus Re(z*(z*')) = Re z * Re (z*') - Im z * Im (z*') by Th9 .= Re z * Re z - Im z * Im (z*') by Th27 .= Re z * Re z - Im z * -Im z by Th27 .= (Re z)^2 + (Im z)^2; thus Im(z*(z*')) = Re z * Im (z*') + Re (z*') * Im z by Th9 .= Re z * -Im z + Re (z*') * Im z by Th27 .= -Re z * Im z + Re z * Im z by Th27 .= 0; end; theorem Re(z + z*') = 2*Re z & Im(z + z*') = 0 proof thus Re(z + z*') = Re z + Re (z*') by Th8 .= Re z + Re z by Th27 .= 2*Re z; thus Im(z + (z*')) = Im z + Im (z*') by Th8 .= Im z + -Im z by Th27 .= 0; end; theorem Re(z - z*') = 0 & Im(z - z*') = 2*Im z proof thus Re(z - z*') = Re z - Re (z*') by Th19 .= Re z - Re z by Th27 .= 0; thus Im(z - z*') = Im z - Im (z*') by Th19 .= Im z - -Im z by Th27 .= 2*Im z; end; definition let z be complex number; func |.z.| -> real number equals sqrt ((Re z)^2 + (Im z)^2); coherence; projectivity proof let r be real number; let z be complex number; assume A1: r = sqrt ((Re z)^2 + (Im z)^2); then A2: Im r = 0 by Def2; (Re z)^2 >= 0 & (Im z)^2 >= 0 by XREAL_1:63; then r >= 0 by A1,SQUARE_1:def 2; then A3: Re r >= 0 by A1,Def1; thus r = Re r by A1,Def1 .= sqrt ((Re r)^2 + (Im r)^2) by A3,A2,SQUARE_1:22; end; end; definition let z; redefine func |.z.| -> Real; coherence; end; theorem Th43: a >= 0 implies |.a.| = a proof A1: a in REAL by XREAL_0:def 1; then A2: Im a = 0 by Def2; assume a >= 0; then Re a >= 0 by A1,Def1; hence |.a.| = Re a by A2,SQUARE_1:22 .= a by A1,Def1; end; registration cluster |.0.| -> zero; coherence by Th4,SQUARE_1:17; end; theorem |.0.| = 0; registration let z be non zero complex number; cluster |.z.| -> non zero; coherence proof assume |.z.| is zero; then (Re z)^2 + (Im z)^2 = 0 by Lm1,SQUARE_1:24; hence thesis by Th5; end; end; theorem |.z.| = 0 implies z = 0; registration let z; cluster |.z.| -> non negative; coherence proof 0 <= (Re z)^2 + (Im z)^2 by Lm1; hence thesis by SQUARE_1:def 2; end; end; theorem 0 <= |.z.|; theorem z <> 0 iff 0 < |.z.|; theorem Th48: |.1r.| = 1 by Th6,SQUARE_1:18; theorem |..| = 1 by Th7,SQUARE_1:18; Lm22: |.-z.| = |.z.| proof thus |.-z.| = sqrt ((-Re z)^2 + (Im -z)^2) by Th17 .= sqrt ((-Re z)^2 + (-Im z)^2) by Th17 .= |.z.|; end; Lm23: a <= 0 implies |.a.| = -a proof assume a <= 0; then |.-a.| = -a by Th43; hence thesis by Lm22; end; Lm24: sqrt a^2 = |.a.| proof per cases; suppose A1: 0 <= a; then sqrt a^2 = a by SQUARE_1:22; hence thesis by A1,Th43; end; suppose A2: not 0 <= a; then |.a.| = -a by Lm23; hence thesis by A2,SQUARE_1:23; end; end; theorem Im z = 0 implies |.z.| = |.Re z.| by Lm24; theorem Re z = 0 implies |.z.| = |.Im z.| by Lm24; theorem |.-z.| = |.z.| by Lm22; theorem Th53: |.z*'.| = |.z.| proof thus |.z*'.| = sqrt ((Re z)^2 + (Im (z*'))^2) by Th27 .= sqrt ((Re z)^2 + (-Im z)^2) by Th27 .= |.z.|; end; Lm25: -|.a.| <= a & a <= |.a.| proof a < 0 implies -|.a.| <= a & a <= |.a.| proof assume a < 0; then |.a.| = -a by Lm23; hence thesis; end; hence thesis by Th43; end; theorem Re z <= |.z.| proof 0<=(Im z)^2 by XREAL_1:63; then A1: (Re z)^2+0 <= ((Re z)^2 + (Im z)^2) by XREAL_1:7; 0<=(Re z)^2 by XREAL_1:63; then sqrt (Re z)^2 <= |.z.| by A1,SQUARE_1:26; then A2: |.Re z.| <= |.z.| by Lm24; Re z <= |.Re z.| by Lm25; hence thesis by A2,XXREAL_0:2; end; theorem Im z <= |.z.| proof 0<=(Re z)^2 by XREAL_1:63; then A1: (Im z)^2+0 <= ((Re z)^2 + (Im z)^2) by XREAL_1:7; 0<=(Im z)^2 by XREAL_1:63; then sqrt (Im z)^2 <= |.z.| by A1,SQUARE_1:26; then A2: |.Im z.| <= |.z.| by Lm24; Im z <= |.Im z.| by Lm25; hence thesis by A2,XXREAL_0:2; end; theorem Th56: |.z1 + z2.| <= |.z1.| + |.z2.| proof set r1 = Re z1, r2 = Re z2, i1 = Im z1, i2 = Im z2; A1: (Im(z1 + z2))^2 = (i1 + i2)^2 by Th8 .= i1^2 + 2*i1*i2 + i2^2; A2: 0 <= r1^2+i1^2 by Lm1; (r1^2+i1^2)*(r2^2+i2^2)-(r1*r2+i1*i2)^2 = (r1*i2-i1*r2)^2; then 0 <= (r1^2+i1^2)*(r2^2+i2^2)-(r1*r2+i1*i2)^2 by XREAL_1:63; then A3: (r1*r2+i1*i2)^2+0 <= (r1^2+i1^2)*(r2^2+i2^2) by XREAL_1:19; r1*r2+i1*i2 <= |.r1*r2+i1*i2.| by Lm25; then A4: r1*r2+i1*i2 <= sqrt (r1*r2+i1*i2)^2 by Lm24; A5: 0 <= r2^2+i2^2 by Lm1; then A6: (sqrt (r2^2+i2^2))^2 = r2^2+i2^2 by SQUARE_1:def 2; 0<=(r1*r2+i1*i2)^2 by XREAL_1:63; then sqrt (r1*r2+i1*i2)^2 <= sqrt ((r1^2+i1^2)*(r2^2+i2^2)) by A3,SQUARE_1:26 ; then sqrt (r1*r2+i1*i2)^2 <= sqrt (r1^2+i1^2)*sqrt (r2^2+i2^2) by A2,A5, SQUARE_1:29; then A7: r1*r2 + i1*i2 <= sqrt (r1^2+i1^2)*sqrt (r2^2+i2^2) by A4,XXREAL_0:2; (2*r1*r2 + 2*i1*i2) = 2*(r1*r2 + i1*i2); then (2*r1*r2 + 2*i1*i2) <= 2*(sqrt (r1^2+i1^2)*sqrt (r2^2+i2^2)) by A7, XREAL_1:64; then A8: (r1^2 + i1^2)+(2*r1*r2+2*i1*i2) <= (r1^2+i1^2)+2*sqrt (r1^2+i1^2)*sqrt (r2^2+i2^2) by XREAL_1:7; (Re(z1 + z2))^2 = (r1+ r2)^2 by Th8 .= r1^2 + 2*r1*r2 + r2^2; then (Re(z1+z2))^2+(Im(z1+z2))^2 = r1^2 + i1^2 + (2*r1*r2 + 2*i1*i2) + (r2^2 + i2^2) by A1; then A9: (Re(z1+z2))^2+(Im(z1+z2))^2 <= (r1^2+i1^2)+2*sqrt (r1^2+i1^2)*sqrt (r2 ^2+i2^2)+(r2^2+i2^2) by A8,XREAL_1:7; A10: 0 <= (Re(z1 + z2))^2 + (Im(z1 + z2))^2 by Lm1; (sqrt (r1^2+i1^2))^2 = r1^2+i1^2 by A2,SQUARE_1:def 2; then sqrt ((Re(z1 + z2))^2 + (Im(z1 + z2))^2) <= sqrt ((sqrt (r1^2+i1^2) + sqrt (r2^2+i2^2))^2) by A6,A9,A10,SQUARE_1:26; hence thesis by SQUARE_1:22; end; theorem Th57: |.z1 - z2.| <= |.z1.| + |.z2.| proof |.z1 - z2.| = |.z1 + - z2.|; then |.z1 - z2.| <= |.z1.| + |.-z2.| by Th56; hence thesis by Lm22; end; theorem |.z1.| - |.z2.| <= |.z1 + z2.| proof z1 = z1 + z2 - z2; then |.z1.| <= |.z1 + z2.| + |.z2.| by Th57; hence thesis by XREAL_1:20; end; theorem Th59: |.z1.| - |.z2.| <= |.z1 - z2.| proof z1 = z1 - z2 + z2; then |.z1.| <= |.z1 - z2.| + |.z2.| by Th56; hence thesis by XREAL_1:20; end; theorem Th60: |.z1 - z2.| = |.z2 - z1.| proof thus |.z1 - z2.| = |.-(z2 - z1).| .= |.z2 - z1.| by Lm22; end; theorem Th61: |.z1 - z2.| = 0 iff z1 = z2 proof thus |.z1 - z2.| = 0 implies z1 = z2 proof assume |.z1 - z2.| = 0; then z1 - z2 = 0; hence thesis; end; thus thesis; end; theorem z1 <> z2 iff 0 < |.z1 - z2.| proof thus z1 <> z2 implies 0 < |.z1 - z2.| proof assume z1 <> z2; then |.z1 - z2.| <> 0 by Th61; hence thesis; end; thus thesis; end; theorem |.z1 - z2.| <= |.z1 - z.| + |.z - z2.| proof |.z1 - z2.| = |.(z1 - z) + (z - z2).|; hence thesis by Th56; end; Lm26: -b <= a & a <= b iff |.a.| <= b proof A1: |.a.| <= b implies -b <= a & a <= b proof assume A2: |.a.| <= b; a < -0 implies -b <= a & a <= b proof assume A3: a < -0; then -a <= b by A2,Lm23; then -b <= -(-a) by XREAL_1:24; hence thesis by A3; end; hence thesis by A2,Th43; end; -b <= a & a <= b implies |.a.| <= b proof assume that A4: -b <= a and A5: a <= b; -a <= -(-b) by A4,XREAL_1:24; then a < 0 implies |.a.| <= b by Lm23; hence thesis by A5,Th43; end; hence thesis by A1; end; theorem |.|.z1.| - |.z2.|.| <= |.z1 - z2.| proof |.z2.| - |.z1.| <= |.z2 - z1.| by Th59; then -(|.z1.| - |.z2.|) <= |.z1 - z2.| by Th60; then A1: -|.z1 - z2.| <= --(|.z1.| - |.z2.|) by XREAL_1:24; |.z1.| - |.z2.| <= |.z1 - z2.| by Th59; hence thesis by A1,Lm26; end; theorem Th65: |.z1*z2.| = |.z1.|*|.z2.| proof set r1 = Re z1, r2 = Re z2, i1 = Im z1, i2 = Im z2; A1: 0<=r1^2 + i1^2 & 0<=r2^2 + i2^2 by Lm1; A2: (Im(z1*z2))^2 = (r1*i2 + r2*i1)^2 by Th9 .= 2*(r1*r2)*(i1*i2) + ((r1*i2)^2 + (r2*i1)^2); (Re(z1*z2))^2 = (r1*r2 - i1*i2)^2 by Th9 .= (r1*r2)^2 + (i1*i2)^2 + - 2*(r1*r2)*(i1*i2); then (Re(z1*z2))^2+(Im(z1*z2))^2 = (r1^2 + i1^2)*(r2^2 + i2^2) by A2; hence thesis by A1,SQUARE_1:29; end; theorem Th66: |.z".| = |.z.|" proof per cases; suppose A1: z <> 0; set r2i2 = (Re z)^2+(Im z)^2; A2: r2i2 <> 0 by A1,Th5; A3: 0 <= r2i2 by Lm1; thus |.z".| = sqrt ((Re z / r2i2)^2 + (Im(z"))^2) by Th20 .= sqrt ((Re z / r2i2)^2 + ((-Im z) / r2i2)^2) by Th20 .= sqrt ((Re z)^2 / r2i2^2 + ((-Im z) / r2i2)^2) by XCMPLX_1:76 .= sqrt ((Re z)^2 / r2i2^2 + (-Im z)^2 / r2i2^2) by XCMPLX_1:76 .= sqrt ((1*r2i2) / (r2i2*r2i2)) by XCMPLX_1:62 .= sqrt (1 / r2i2) by A2,XCMPLX_1:91 .= 1 / |.z.| by A3,SQUARE_1:18,30 .= |.z.|" by XCMPLX_1:215; end; suppose A4: z = 0; hence |.z".| = 0" .= |.z.|" by A4; end; end; theorem Th67: |.z1.| / |.z2.| = |.z1/z2.| proof thus |.z1.|/|.z2.| = |.z1.|*|.z2.|" by XCMPLX_0:def 9 .= |.z1.|*|.z2".| by Th66 .= |.z1*z2".| by Th65 .= |.z1/z2.| by XCMPLX_0:def 9; end; theorem |.z*z.| = (Re z)^2 + (Im z)^2 proof 0<=(Re z)^2 + (Im z)^2 & |.z*z.| = |.z.|*|.z.| by Lm1,Th65; then |.z*z.| = sqrt (((Re z)^2 + (Im z)^2)^2) by SQUARE_1:29; hence thesis by Lm1,SQUARE_1:22; end; theorem |.z*z.| = |.z*z*'.| proof thus |.z*z.| = |.z.|*|.z.| by Th65 .= |.z.|*|.z*'.| by Th53 .= |.z*z*'.| by Th65; end; theorem a <= 0 implies |.a.| = -a by Lm23; theorem Th71: |.a.| = a or |.a.| = -a proof a >= 0 or a < 0; hence thesis by Lm23,Th43; end; theorem sqrt a^2 = |.a.| by Lm24; theorem min(a,b) = (a + b - |.a - b.|) / 2 proof per cases; suppose A1: a <= b; |.a - b.| = |.-(b - a).| .= |.b - a.| by Lm22 .= b - a by A1,Th43,XREAL_1:48; hence thesis by A1,XXREAL_0:def 9; end; suppose A2: b <= a; hence min(a,b) = ((a+b)- (a - b))/2 by XXREAL_0:def 9 .= ((a+b)-|.a-b.|)/2 by A2,Th43,XREAL_1:48; end; end; theorem max(a,b) = (a + b + |.a - b.|) / 2 proof per cases; suppose A1: b <= a; hence max(a,b) = ((a+b)+ (a - b))/2 by XXREAL_0:def 10 .= ((a+b)+|.a-b.|)/2 by A1,Th43,XREAL_1:48; end; suppose A2: a <= b; then A3: 0 <= b - a by XREAL_1:48; thus max(a,b) = ((a+b)+ -(a - b))/2 by A2,XXREAL_0:def 10 .= ((a+b)+|.-(a-b).|)/2 by A3,Th43 .= ((a+b)+|.a-b.|)/2 by Lm22; end; end; theorem Th75: |.a.|^2 = a^2 proof |.a.| = a or |.a.| = -a by Th71; hence thesis; end; theorem -|.a.| <= a & a <= |.a.| by Lm25; notation let z be complex number; synonym abs z for |.z.|; end; definition let z be complex number; redefine func abs z -> Real; coherence; end; theorem a+b* = c+d* implies a = c & b = d proof assume A1: a+b* = c+d*; then a-c+(b-d)* = 0; then a-c = 0 by Th4,Th12; hence thesis by A1; end; theorem sqrt(a^2+b^2) <= abs(a)+abs(b) proof A1: (sqrt(a^2+b^2))^2>=0 by XREAL_1:63; a^2>=0 & b^2>=0 by XREAL_1:63; then A2: (sqrt(a^2+b^2))^2=a^2+b^2 by SQUARE_1:def 2; (abs(a)+abs(b))^2=(abs(a))^2+2*(abs(a))*(abs(b))+(abs(b))^2 & (abs (a) )^2=a^2 by Th75; then (abs(a)+abs(b))^2 - (sqrt(a^2+b^2))^2= a^2+2*(abs(a))*(abs(b))+b ^2-(a^2+b^2) by A2,Th75 .=2*(abs(a))*(abs(b)); then (abs(a)+abs(b))^2>= (sqrt(a^2+b^2))^2 by XREAL_1:49; then sqrt((abs(a)+abs(b))^2)>=sqrt((sqrt(a^2+b^2))^2) by A1,SQUARE_1:26; hence thesis by A2,SQUARE_1:22; end; theorem abs(a) <= sqrt(a^2+b^2) proof a^2>=0 & a^2+0<= a^2+b^2 by XREAL_1:6,63; then sqrt(a^2)<= sqrt(a^2+b^2) by SQUARE_1:26; hence thesis by Lm24; end; theorem |. 1/z1 .| = 1 / |.z1.| by Th48,Th67; begin reserve x, y, z, s, t for real number; definition let x be real number; redefine func |.x.| equals :Def1: x if 0 <= x otherwise -x; correctness by COMPLEX1:43,70; end; theorem abs x = x or abs x = -x by Def1; theorem Th2: x = 0 iff abs x = 0 by Def1,COMPLEX1:47; theorem abs x = -x & x <> 0 implies x < 0 by Def1; theorem -abs x <= x & x <= abs x proof per cases; suppose A1: x < 0; then abs x = -x by Def1; hence thesis by A1; end; suppose A2: 0 <= x; then -x <= -0; hence thesis by A2,Def1; end; end; theorem -y <= x & x <= y iff abs x <= y proof hereby assume that A1: -y <= x and A2: x <= y; -x <= --y by A1,XREAL_1:24; hence abs x <= y by A2,Def1; end; assume A3: abs x <= y; then A4: 0 <= y by COMPLEX1:46; per cases; suppose 0 < x; hence thesis by A3,A4,Def1; end; suppose A5: x < 0; then -x <= y by A3,Def1; then -y <= --x by XREAL_1:24; hence thesis by A5; end; suppose x = -0; hence thesis by A4; end; end; theorem x <> 0 implies abs(x) * abs(1/x) = 1 proof assume x <> 0; then abs x * abs(1/x) = abs(x * (1/x)) & abs(x * (1/x)) = abs 1 by COMPLEX1:65,XCMPLX_1:106; hence thesis by Def1; end; theorem abs(1/x) = 1/abs(x) by COMPLEX1:80; theorem 0 <= x*y implies sqrt (x*y) = sqrt abs(x)*sqrt abs(y) proof assume 0 <= x*y; then abs(x*y) = x*y by Def1; then A1: abs(x)*abs(y) = x*y by COMPLEX1:65; 0 <= abs(x) & 0 <= abs(y) by COMPLEX1:46; hence thesis by A1,SQUARE_1:29; end; theorem abs x <= z & abs y <= t implies abs(x+y) <= z + t proof assume abs(x) <= z & abs(y) <= t; then abs(x+y) <= abs(x) + abs(y) & abs(x) + abs(y) <= z + t by COMPLEX1:56 ,XREAL_1:7; hence thesis by XXREAL_0:2; end; theorem 0 < x/y implies sqrt (x/y) = sqrt abs(x) / sqrt abs(y) proof assume 0 < x/y; then x/y = abs(x/y) by Def1; then A1: x/y = abs(x)/abs(y) by COMPLEX1:67; 0 <= abs(x) & 0 <= abs(y) by COMPLEX1:46; hence thesis by A1,SQUARE_1:30; end; theorem 0 <= x * y implies abs (x+y) = abs(x) + abs(y) proof assume A1: 0 <= x * y; per cases by A1; suppose A2: x * y = 0; per cases by A2,XCMPLX_1:6; suppose A3: x = 0; then abs(x) + abs(y) = 0 + abs(y) by Def1 .= abs(y); hence thesis by A3; end; suppose A4: y = 0; then abs(x) + abs(y) = abs(x) + 0 by Def1 .= abs(x); hence thesis by A4; end; end; suppose A5: 0 < x * y; then A6: x <> 0 & y <> 0; per cases by A5,A6; suppose that A7: 0 < x & 0 < y; abs x = x & abs y = y by A7,Def1; hence thesis by A7,Def1; end; suppose that A8: x < 0 and A9: y < 0; abs(x) = -x by A8,Def1; then abs(x) + abs(y) = (-1) * x + -(1 * y) by A9,Def1 .= - ( x + y ); hence thesis by A8,A9,Def1; end; end; end; theorem abs(x+y) = abs(x) + abs(y) implies 0 <= x * y proof A1: x * y < 0 implies x < 0 & 0 < y or 0 < x & y < 0 proof assume A2: x * y < 0; then x <> 0 & y <> 0; hence thesis by A2; end; A3: x < 0 & 0 < y & x + y < 0 implies abs(x+y) <> abs(x) + abs(y) proof assume that A4: x < 0 and A5: 0 < y and A6: x + y < 0; -(1 * x) + -y < -x + y by A5,XREAL_1:6; then A7: -( 1 * ( x + y ) ) < -x + y; abs x = -x & abs y = y by A4,A5,Def1; hence thesis by A6,A7,Def1; end; A8: 0 < x & y < 0 & x + y < 0 implies abs(x+y) <> abs(x) + abs(y) proof assume that A9: 0 < x and A10: y < 0 and A11: x + y < 0; -(1 * x) + -y < x + -y by A9,XREAL_1:6; then A12: - (1 * ( x + y )) < x + -y; abs x = x & abs y = -y by A9,A10,Def1; hence thesis by A11,A12,Def1; end; A13: 0 < x & y < 0 & 0 <= x + y implies abs(x+y) <> abs(x) + abs(y) proof assume that A14: 0 < x and A15: y < 0 and A16: 0 <= x + y; A17: abs y = -y by A15,Def1; x + y < x + -y & abs x = x by A14,A15,Def1,XREAL_1:6; hence thesis by A16,A17,Def1; end; A18: x < 0 & 0 < y & 0 <= x + y implies abs(x+y) <> abs(x) + abs(y) proof assume that A19: x < 0 and A20: 0 < y and A21: 0 <= x + y; A22: abs y = y by A20,Def1; x + y < -x + y & abs x = -x by A19,Def1,XREAL_1:6; hence thesis by A21,A22,Def1; end; assume abs(x+y) = abs(x) + abs(y) & 0 > x * y; hence contradiction by A1,A3,A18,A8,A13; end; theorem abs(x + y)/(1 + abs(x+y)) <= abs(x)/(1 + abs(x)) + abs(y)/(1 + abs(y)) proof A1: s <= t & 0 < 1 + s & 0 < 1 + t implies s/(1 + s) <= t/(1 + t) proof assume that A2: s <= t and A3: 0 < 1 + s and A4: 0 < 1 + t; s * 1 + s * t <= t + s * t by A2,XREAL_1:6; then s * (1 + t) * (1 + s)" <= t * (1 + s) * (1 + s)" by A3,XREAL_1:64; then s * (1 + t) * (1 + s)" <= t * ((1 + s) * (1 + s)"); then s * (1 + t) * (1 + s)" <= t * 1 by A3,XCMPLX_0:def 7; then (s * (1 + s)") * (1 + t) * (1 + t)" <= t * (1 + t)" by A4,XREAL_1:64; then (s * (1 + s)") * ((1 + t) * (1 + t)") <= t * (1 + t)"; then (s * (1 + s)") * 1 <= t * (1 + t)" by A4,XCMPLX_0:def 7; then s/(1 + s) <= t * (1 + t)" by XCMPLX_0:def 9; hence thesis by XCMPLX_0:def 9; end; set a = abs x, b = abs y, c = abs (x+y); A5: 0 <= a by COMPLEX1:46; A6: 0 <= b by COMPLEX1:46; A7: 0 + 0 < 1 + a by COMPLEX1:46,XREAL_1:8; A8: 0 < 1 + a & 0 < 1 + a + b implies a/(1 + a + b) <= a/(1 + a) proof assume that A9: 0 < 1 + a and A10: 0 < 1 + a + b; 0 + a <= a * b + a by A5,A6,XREAL_1:6; then a * 1 + a * a <= a * (1 + b) + a * a by XREAL_1:6; then a * (1 + a) * (1 + a)" <= a * (1 + a + b) * (1 + a)" by A9,XREAL_1:64; then a * ((1 + a) * (1 + a)") <= a * (1 + a + b) * (1 + a)"; then a * 1 <= a * (1 + a + b) * (1 + a)" by A7,XCMPLX_0:def 7; then a * (1 + a + b)" <= (a * (1 + a)") * (1 + a + b) * (1 + a + b)" by A10 ,XREAL_1:64; then a * (1 + a + b)" <= (a * (1 + a)") * ((1 + a + b) * (1 + a + b)"); then a * (1 + a + b)" <= (a * (1 + a)") * 1 by A5,A6,XCMPLX_0:def 7; then a/(1 + a + b) <= a * (1 + a)" by XCMPLX_0:def 9; hence thesis by XCMPLX_0:def 9; end; A11: 0 + 0 < 1 + b by COMPLEX1:46,XREAL_1:8; A12: 0 < 1 + b & 0 < 1 + a + b implies b/(1 + a + b) <= b/(1 + b) proof assume that A13: 0 < 1 + b and A14: 0 < 1 + a + b; 0 + b <= a * b + b by A5,A6,XREAL_1:6; then b * 1 + b * b <= (1 + a) * b + b * b by XREAL_1:6; then (b * (1 + b)) * (1 + b)" <= (b * (1 + a + b)) * (1 + b)" by A13, XREAL_1:64; then b * ((1 + b) * (1 + b)") <= (b * (1 + a + b)) * (1 + b)"; then b * 1 <= (b * (1 + a + b)) * (1 + b)" by A11,XCMPLX_0:def 7; then b * (1 + a + b)" <= ((b * (1 + b)") * (1 + a + b )) * (1 + a + b)" by A14, XREAL_1:64; then b * (1 + a + b)" <= (b * (1 + b)") * ((1 + a + b) *(1 + a + b)"); then b * (1 + a + b)" <= (b * (1 + b)") * 1 by A5,A6,XCMPLX_0:def 7; then b/(1 + a + b) <= b * (1 + b)" by XCMPLX_0:def 9; hence thesis by XCMPLX_0:def 9; end; 0 + 0 < 1 + c by COMPLEX1:46,XREAL_1:8; then A15: c/(1 + c) <= (a + b)/(1 + (a + b)) by A5,A6,A1,COMPLEX1:56; (a + b)/(1 + a + b) = a/(1 + a + b) + b/(1 + a + b) by XCMPLX_1:62; then (a + b)/(1 + a + b) <= a/(1 + a) + b/(1 + b) by A6,A7,A8,A12,XREAL_1:7; hence thesis by A15,XXREAL_0:2; end; definition let x; func sgn x -> real number equals :Def2: 1 if 0 < x, -1 if x < 0 otherwise 0; coherence; consistency; projectivity; end; registration let x; cluster sgn x -> integer; coherence proof x = 0 or x > 0 or x < 0; hence thesis by Def2; end; end; definition let x be Real; redefine func sgn x -> Real; coherence by XREAL_0:def 1; end; theorem sgn x = 1 implies 0 < x proof assume that A1: sgn x = 1 and A2: 0 >= x; x < 0 or x = 0 by A2; hence contradiction by A1,Def2; end; theorem sgn x = -1 implies x < 0 proof assume that A1: sgn x = -1 and A2: x >= 0; 0 < x or x = 0 by A2; hence contradiction by A1,Def2; end; theorem Th16: sgn x = 0 implies x = 0 proof assume that A1: sgn x = 0 and A2: x <> 0; 0 < x or x < 0 by A2; hence contradiction by A1,Def2; end; theorem x = abs(x) * sgn x proof A1: 0 < x implies x = abs(x) * sgn x proof assume A2: 0 < x; then abs(x) = x by Def1; then abs(x) * sgn x = x * 1 by A2,Def2; hence thesis; end; A3: x < 0 implies x = abs(x) * sgn x proof assume A4: x < 0; then abs(x) = -x by Def1; then abs(x) * sgn x = (-x) * (-1) by A4,Def2 .= x; hence thesis; end; x = 0 implies x = abs(x) * sgn x proof assume A5: x = 0; then sgn x = 0 by Def2; hence thesis by A5; end; hence thesis by A1,A3; end; theorem Th18: sgn (x * y) = sgn x * sgn y proof A1: 0 < x & 0 < y implies sgn (x * y) = sgn x * sgn y proof assume that A2: 0 < x and A3: 0 < y; A4: sgn y = 1 by A3,Def2; 0 * y < x * y & sgn x = 1 by A2,A3,Def2,XREAL_1:68; hence thesis by A4,Def2; end; A5: 0 < x & y < 0 implies sgn (x * y) = sgn x * sgn y proof assume that A6: 0 < x and A7: y < 0; sgn y = -1 by A7,Def2; then A8: sgn x * sgn y = 1 * (-1) by A6,Def2 .= -1; x * y < 0 * y by A6,A7,XREAL_1:69; hence thesis by A8,Def2; end; A9: x < 0 & y < 0 implies sgn (x * y) = sgn x * sgn y proof assume that A10: x < 0 and A11: y < 0; sgn y = -1 by A11,Def2; then A12: sgn x * sgn y = (-1) * (-1) by A10,Def2 .= 1; x * 0 < x * y by A10,A11,XREAL_1:69; hence thesis by A12,Def2; end; A13: x < 0 & 0 < y implies sgn (x * y) = sgn x * sgn y proof assume that A14: x < 0 and A15: 0 < y; sgn y = 1 by A15,Def2; then A16: sgn x * sgn y = -1 by A14,Def2; x * y < 0 * y by A14,A15,XREAL_1:68; hence thesis by A16,Def2; end; x = 0 or y = 0 implies sgn (x * y) = sgn x * sgn y proof assume A17: x = 0 or y = 0; then sgn x = 0 or sgn y = 0 by Def2; hence thesis by A17; end; hence thesis by A1,A5,A13,A9; end; canceled; theorem sgn (x + y) <= sgn x + sgn y + 1 proof A1: y = 0 implies sgn (x + y) <= sgn x + sgn y + 1 proof assume A2: y = 0; then sgn x + sgn y + 1 = sgn x + 0 + 1 by Def2 .= sgn x + 1; hence thesis by A2,XREAL_1:29; end; A3: 0 < x & 0 < y implies sgn (x + y) <= sgn x + sgn y + 1 proof sgn x < sgn x + 1 by XREAL_1:29; then A4: sgn x + 0 < sgn x + 1 + 1 by XREAL_1:8; assume A5: 0 < x & 0 < y; then sgn x = 1 & sgn y = 1 by Def2; hence thesis by A5,A4,Def2; end; A6: x < 0 & 0 < y implies sgn (x + y) <= sgn x + sgn y + 1 proof assume that A7: x < 0 and A8: 0 < y; sgn x = -1 by A7,Def2; then A9: sgn x + sgn y + 1 = 1 by A8,Def2; x + y < 0 or x + y = 0 or 0 < x + y; hence thesis by A9,Def2; end; A10: 0 < x & y < 0 implies sgn (x + y) <= sgn x + sgn y +1 proof assume that A11: 0 < x and A12: y < 0; sgn x = 1 by A11,Def2; then A13: sgn x + sgn y + 1 = 1 + -1 + 1 by A12,Def2 .= 1; x + y < 0 or x + y = 0 or 0 < x + y; hence thesis by A13,Def2; end; A14: x < 0 & y < 0 implies sgn (x + y) <= sgn x + sgn y + 1 proof assume that A15: x < 0 and A16: y < 0; sgn y = -1 by A16,Def2; then sgn x + sgn y + 1 = -1 by A15,Def2; hence thesis by A15,A16,Def2; end; x = 0 implies sgn (x + y) <= sgn x + sgn y + 1 proof assume A17: x = 0; then sgn x + sgn y + 1 = 0 + sgn y + 1 by Def2 .= sgn y + 1; hence thesis by A17,XREAL_1:29; end; hence thesis by A3,A10,A6,A14,A1; end; theorem Th21: x <> 0 implies sgn x * sgn (1/x) = 1 proof assume x <> 0; then sgn ( x * (1/x) ) = sgn 1 by XCMPLX_1:106; then sgn ( x * (1/x) ) = 1 by Def2; hence thesis by Th18; end; theorem Th22: 1/(sgn x) = sgn (1/x) proof per cases; suppose A1: x = 0; hence 1/(sgn x) = 1/0 by Def2 .= sgn (1/x) by A1,Def2; end; suppose A2: x <> 0; then (sgn x * sgn (1/x)) * (1/(sgn x)) = 1 * (1/(sgn x)) by Th21; then sgn (1/x) * (sgn x * (1/(sgn x))) = 1/(sgn x); then sgn (1/x) * 1 = 1 /(sgn x) by A2,Th16,XCMPLX_1:106; hence thesis; end; end; theorem sgn x + sgn y - 1 <= sgn ( x + y ) proof A1: x = 0 or y = 0 implies sgn x + sgn y - 1 <= sgn (x + y) proof A2: y = 0 implies sgn x + sgn y - 1 <= sgn (x + y) proof A3: sgn x - 1 < sgn x + -1 + 1 by XREAL_1:29; assume A4: y = 0; then sgn x + sgn y - 1 = sgn x + 0 - 1 by Def2 .= sgn x - 1; hence thesis by A4,A3; end; A5: x = 0 implies sgn x + sgn y - 1 <= sgn (x + y) proof A6: sgn y - 1 < sgn y + -1 + 1 by XREAL_1:29; assume A7: x = 0; then sgn x + sgn y - 1 = 0 + sgn y - 1 by Def2 .= sgn y - 1; hence thesis by A7,A6; end; assume x = 0 or y = 0; hence thesis by A5,A2; end; A8: x < 0 & y < 0 implies sgn x + sgn y - 1 <= sgn (x + y) proof assume that A9: x < 0 and A10: y < 0; sgn x = -1 by A9,Def2; then A11: sgn x = sgn (x + y) by A9,A10,Def2; A12: sgn (x + y) + -1 - 1 < sgn (x + y) + -1 - 1 + 1 & sgn (x + y) + -1 < sgn (x + y) + -1 + 1 by XREAL_1:29; sgn y = -1 by A10,Def2; hence thesis by A11,A12,XXREAL_0:2; end; A13: 0 < x & y < 0 implies sgn x + sgn y - 1 <= sgn (x + y) proof assume that A14: 0 < x and A15: y < 0; sgn x = 1 by A14,Def2; then A16: sgn x + sgn y = 1 + -1 by A15,Def2 .= 0; x + y < 0 or x + y = 0 or 0 < x + y; hence thesis by A16,Def2; end; A17: x < 0 & 0 < y implies sgn x + sgn y - 1 <= sgn (x + y) proof assume that A18: x < 0 and A19: 0 < y; sgn x = -1 by A18,Def2; then A20: sgn x + sgn y = -1 + 1 by A19,Def2 .= 0; x + y < 0 or x + y = 0 or 0 < x + y; hence thesis by A20,Def2; end; 0 < x & 0 < y implies sgn x + sgn y - 1 <= sgn (x + y) proof assume that A21: 0 < x and A22: 0 < y; sgn y = 1 by A22,Def2; then sgn x + sgn y - 1 = 1 by A21,Def2; hence thesis by A21,A22,Def2; end; hence thesis by A8,A17,A13,A1; end; theorem sgn x = sgn (1/x) proof A1: 0 < x implies sgn x = sgn (1/x) proof assume A2: 0 < x; sgn (1/x) = 1/(sgn x) by Th22; then sgn (1/x) = 1/1 by A2,Def2 .= 1; hence thesis by A2,Def2; end; x < 0 implies sgn x = sgn (1/x) proof assume A3: x < 0; then sgn x = -1 by Def2; then sgn (1/x) = 1/(-1) by Th22; hence thesis by A3,Def2; end; hence thesis by A1; end; theorem sgn (x/y) = (sgn x)/(sgn y) proof per cases; suppose A1: y = 0; hence sgn (x/y) = sgn (x*0") by XCMPLX_0:def 9 .= (sgn x)*0" by Def2 .= (sgn x)/0 by XCMPLX_0:def 9 .= (sgn x)/(sgn y) by A1,Def2; end; suppose A2: y <> 0; x/y = (x/y) * 1 .= (x/y) * (y * (1/y)) by A2,XCMPLX_1:106 .= ((x/y) * y) * (1/y) .= x * (1/y) by A2,XCMPLX_1:87; then sgn (x/y) = sgn x * sgn (1/y) by Th18 .= ((sgn x)/1) * (1/(sgn y)) by Th22 .= (sgn x * 1)/(1 * sgn y) by XCMPLX_1:76 .= (sgn x)/(1 * sgn y); hence thesis; end; end; reserve r, s for real number; theorem 0 <= r + abs(r) proof A1: 0 <= abs(r) by COMPLEX1:46; abs(r) + abs(r) = r + abs(r) or abs(r) + r = -r + r by Def1; hence thesis by A1; end; theorem 0 <= -r + abs(r) proof r <= abs(r) by COMPLEX1:76; then -r >= -abs(r) by XREAL_1:24; then -r+abs(r) >= -abs(r)+abs(r) by XREAL_1:7; hence thesis; end; theorem abs(r) = abs(s) implies r = s or r = -s proof assume A1: abs(r) = abs(s); assume A2: r <> s; per cases by Def1; suppose abs(r) = r & abs(s) = s; hence thesis by A1,A2; end; suppose abs(r) = r & abs(s) = -s; hence thesis by A1; end; suppose abs(r) = -r & abs(s) = s; hence thesis by A1; end; suppose abs(r) = -r & abs(s) = -s; hence thesis by A1,A2; end; end; theorem for m being Nat holds m = abs m proof let m be Nat; m >= 0 by NAT_1:2; hence abs m= m by Def1; end; theorem r<=0 implies abs(r)=-r proof assume A1: r<=0; per cases by A1; suppose r<0; hence thesis by Def1; end; suppose r=0; hence thesis by Th2; end; end; begin definition let a be integer number; redefine func abs a -> Element of NAT; coherence proof per cases; suppose A1: a >= 0; then abs a = a by ABSVALUE:def 1; hence thesis by A1,INT_1:3; end; suppose a < 0; then abs a = -a & -a > 0 by ABSVALUE:def 1,XREAL_1:58; hence thesis by INT_1:3; end; end; end; reserve a,b,c for Integer; theorem Th1: a divides b & a divides b + c implies a divides c proof given u being Integer such that A1: b = a * u; given t being Integer such that A2: b + c = a * t; c = a*(t - u) by A1,A2; hence thesis by INT_1:def 3; end; theorem Th2: a divides b implies a divides b * c proof assume a divides b; then consider l being Integer such that A1: b = a * l by INT_1:def 3; a * l * c = a * (l * c); hence thesis by A1,INT_1:def 3; end; theorem Th3: 0 divides a iff a = 0 proof 0 divides a implies a = 0 proof assume 0 divides a; then ex b being Integer st a = 0*b by INT_1:def 3; hence thesis; end; hence thesis; end; Lm1: a divides -a & -a divides a proof -a = a*(-1); hence a divides -a by INT_1:def 3; a = (-a)*(-1); hence thesis by INT_1:def 3; end; Lm2: a divides b & b divides c implies a divides c proof assume that A1: a divides b and A2: b divides c; consider k being Integer such that A3: b = a*k by A1,INT_1:def 3; consider l being Integer such that A4: c = b*l by A2,INT_1:def 3; c = a*(k*l) by A3,A4; hence thesis by INT_1:def 3; end; Lm3: a divides b iff a divides -b proof thus a divides b implies a divides -b proof assume A1: a divides b; b divides -b by Lm1; hence thesis by A1,Lm2; end; assume A2: a divides -b; -b divides b by Lm1; hence thesis by A2,Lm2; end; Lm4: a divides b iff -a divides b proof thus a divides b implies -a divides b proof assume A1: a divides b; -a divides a by Lm1; hence thesis by A1,Lm2; end; assume A2: -a divides b; a divides -a by Lm1; hence thesis by A2,Lm2; end; Lm5: a divides 0 & 1 divides a & -1 divides a proof 0 = a*0; hence a divides 0 by INT_1:def 3; a = 1*a; hence 1 divides a by INT_1:def 3; a = (-1)*(-a); hence thesis by INT_1:def 3; end; Lm6: a divides b & a divides c implies a divides b mod c proof assume that A1: a divides b and A2: a divides c; A3: now assume c <> 0; then A4: b = c * (b div c) + (b mod c) by INT_1:59; a divides c * (b div c) by A2,Th2; hence thesis by A1,A4,Th1; end; now assume c = 0; then b mod c = 0 by INT_1:def 10; hence thesis by Lm5; end; hence thesis by A3; end; reserve i,j,k,l for Nat; Lm7: k divides l iff ex t being Nat st l = k * t proof hereby assume A1: k divides l; thus ex t being Nat st l = k * t proof A2: k >= 0 by NAT_1:2; consider t being Integer such that A3: l = k * t by A1,INT_1:def 3; per cases by NAT_1:3; suppose 0 < l; then 0 <= t by A3,A2,XREAL_1:131; then reconsider t as Element of NAT by INT_1:3; take t; thus l = k * t by A3; end; suppose A4: l = 0; take 0; thus l = k*0 by A4; end; end; end; assume ex t being Nat st l = k * t; hence thesis by INT_1:def 3; end; Lm8: i divides j & j divides i implies i = j proof assume i divides j; then consider a such that A1: j = i*a by INT_1:def 3; assume j divides i; then consider b such that A2: i = j*b by INT_1:def 3; i<>0 implies i = j proof A3: i >= 0 by NAT_1:2; assume A4: i<>0; 1*i = i*(a*b) by A1,A2; then a*b = 1 by A4,XCMPLX_1:5; then i = j*1 or i = j*(-1) by A2,INT_1:9; hence thesis by A4,A3; end; hence thesis by A1; end; definition let a,b be Integer; func a lcm b -> Nat means :Def1: a divides it & b divides it & for m being Integer st a divides m & b divides m holds it divides m; existence proof per cases; suppose A1: a = 0 or b = 0; take 0; thus a divides 0 & b divides 0 by Lm5; thus thesis by A1; end; suppose A2: a <> 0 & b <> 0; defpred P[Nat] means a divides $1 & b divides $1 & $1 <> 0; a*b in INT by INT_1:def 2; then consider k being Element of NAT such that A3: a*b = k or a*b = -k by INT_1:def 1; b divides a*b by INT_1:def 3; then A4: b divides k by A3,Lm3; a divides a*b by INT_1:def 3; then A5: a divides k by A3,Lm3; k <> 0 by A2,A3,XCMPLX_1:6; then A6: ex k being Nat st P[k] by A5,A4; consider k being Nat such that A7: P[k] and A8: for n being Nat st P[n] holds k <= n from NAT_1:sch 5(A6); take k; thus a divides k & b divides k by A7; let m be Integer; m in INT by INT_1:def 2; then consider n being Element of NAT such that A9: m = n or m = - n by INT_1:def 1; assume that A10: a divides m and A11: b divides m; b divides n by A9,A11,Lm3; then A12: b divides n mod k by A7,Lm6; A13: k > 0 by A7,NAT_1:3; then n mod k in NAT by INT_1:3,57; then reconsider i = n mod k as Nat; assume A14: not k divides m; A15: now assume i = 0; then n - (n div k) * k = 0 by A7,INT_1:def 10; then k divides n by INT_1:def 3; hence contradiction by A9,A14,Lm3; end; a divides n by A9,A10,Lm3; then a divides n mod k by A7,Lm6; then k divides n by A8,A13,A12,A15,INT_1:58; hence contradiction by A9,A14,Lm3; end; end; uniqueness proof let IT1,IT2 be Nat; assume a divides IT1 & b divides IT1 & ( for m being Integer st a divides m & b divides m holds IT1 divides m) & a divides IT2 & ( b divides IT2 & for m being Integer st a divides m & b divides m holds IT2 divides m ); then IT1 divides IT2 & IT2 divides IT1; hence thesis by Lm8; end; commutativity; end; theorem Th4: a = 0 or b = 0 iff a lcm b = 0 proof A1: b = 0 implies (a lcm b) = 0 proof assume b = 0; then 0 divides (a lcm b) by Def1; hence thesis by Th3; end; A2: (a lcm b) = 0 implies a = 0 or b = 0 proof A3: b divides b implies b divides b*a by Th2; assume A4: a lcm b = 0; a divides a implies a divides a*b by Th2; then 0 divides a*b by A4,A3,Def1; then a*b = 0 by Th3; hence thesis by XCMPLX_1:6; end; a = 0 implies a lcm b = 0 proof assume a = 0; then 0 divides (a lcm b) by Def1; hence thesis by Th3; end; hence thesis by A1,A2; end; Lm9: 0 < j & i divides j implies i <= j proof assume that A1: 0 < j and A2: i divides j; consider l such that A3: j = i * l by A2,Lm7; l <> 0 by A1,A3; then consider k such that A4: l = k + 1 by NAT_1:6; i * (k + 1) = i + i * k; hence thesis by A3,A4,NAT_1:11; end; definition let a,b be Integer; func a gcd b -> Nat means :Def2: it divides a & it divides b & for m being Integer st m divides a & m divides b holds m divides it; existence proof per cases; suppose A1: a = 0; b in INT by INT_1:def 2; then consider k being Element of NAT such that A2: b = k or b = -k by INT_1:def 1; take k; thus k divides a & k divides b by A1,A2,Lm4,Lm5; let m be Integer; assume that m divides a and A3: m divides b; thus thesis by A2,A3,Lm3; end; suppose A4: b = 0; a in INT by INT_1:def 2; then consider k being Element of NAT such that A5: a = k or a = -k by INT_1:def 1; take k; thus k divides a & k divides b by A4,A5,Lm4,Lm5; let m be Integer; assume that A6: m divides a and m divides b; thus thesis by A5,A6,Lm3; end; suppose A7: a <> 0 & b <> 0; defpred P[Nat] means $1 divides a & $1 divides b & $1 <> 0; A8: a divides a*b by INT_1:def 3; a*b in INT by INT_1:def 2; then consider k being Element of NAT such that A9: a*b = k or a*b = -k by INT_1:def 1; k <> 0 by A7,A9,XCMPLX_1:6; then A10: k > 0 by NAT_1:3; A11: for i being Nat st P[i] holds i <= k proof let i be Nat; assume P[i]; then i divides a*b by A8,Lm2; then i divides k by A9,Lm3; hence thesis by A10,Lm9; end; 1 divides a & 1 divides b by Lm5; then A12: ex k being Nat st P[k]; consider k being Nat such that A13: P[k] and A14: for n being Nat st P[n] holds n <= k from NAT_1:sch 6(A11,A12); take k; thus k divides a & k divides b by A13; let m be Integer; assume that A15: m divides a and A16: m divides b; m in INT by INT_1:def 2; then consider n being Element of NAT such that A17: m = n or m = - n by INT_1:def 1; set i = n lcm k; A18: k divides i by Def1; A19: now assume i = 0; then n = 0 or k = 0 by Th4; hence contradiction by A7,A13,A17,A15,Th3; end; then 0 < i by NAT_1:3; then A20: k <= i by A18,Lm9; n divides b by A17,A16,Lm4; then A21: n lcm k divides b by A13,Def1; n divides a by A17,A15,Lm4; then n lcm k divides a by A13,Def1; then k >= n lcm k by A14,A21,A19; then k = i by A20,XXREAL_0:1; then A22: n divides k by Def1; assume not m divides k; hence contradiction by A17,A22,Lm4; end; end; uniqueness proof let IT1,IT2 be Nat; assume IT1 divides a & IT1 divides b & ( for m being Integer st m divides a & m divides b holds m divides IT1) & IT2 divides a & ( IT2 divides b & for m being Integer st m divides a & m divides b holds m divides IT2 ); then IT1 divides IT2 & IT2 divides IT1; hence thesis by Lm8; end; commutativity; end; theorem Th5: a = 0 & b = 0 iff a gcd b = 0 proof 0 divides 0 gcd 0 by Def2; hence a = 0 & b = 0 implies a gcd b = 0 by Th3; assume a gcd b = 0; then 0 divides a & 0 divides b by Def2; hence thesis by Th3; end; reserve n for Nat; reserve a,b,c,d,a1,b1,a2,b2,k,l for Integer; theorem Th6: -n is Element of NAT iff n = 0 proof thus -n is Element of NAT implies n = 0 proof assume -n is Element of NAT; then -n>=0 & n+(-n)>=0+n by NAT_1:2; hence thesis; end; thus thesis; end; registration let n be non zero Nat; cluster -n -> non natural; coherence proof not -n is Element of NAT by Th6; hence thesis by ORDINAL1:def 12; end; end; theorem not -1 is Element of NAT; theorem a divides -a & -a divides a by Lm1; theorem a divides b & b divides c implies a divides c by Lm2; theorem Th10: (a divides b iff a divides -b) & (a divides b iff -a divides b) & (a divides b iff -a divides -b) & (a divides -b iff -a divides b) proof A1: a divides b implies a divides -b proof assume A2: a divides b; b divides -b by Lm1; hence thesis by A2,Lm2; end; A3: a divides -b implies a divides b proof assume A4: a divides -b; -b divides b by Lm1; hence thesis by A4,Lm2; end; hence a divides b iff a divides -b by A1; A5: -a divides b implies a divides b proof assume A6: -a divides b; a divides -a by Lm1; hence thesis by A6,Lm2; end; A7: -a divides -b implies a divides b proof assume A8: -a divides -b; -b divides b by Lm1; hence thesis by A5,A8,Lm2; end; A9: a divides b implies -a divides b proof assume A10: a divides b; -a divides a by Lm1; hence thesis by A10,Lm2; end; hence a divides b iff -a divides b by A5; a divides b implies -a divides -b proof assume A11: a divides b; -a divides a by Lm1; hence thesis by A1,A11,Lm2; end; hence a divides b iff -a divides -b by A7; thus thesis by A1,A3,A9,A5; end; theorem a divides b & b divides a implies a = b or a = -b proof assume that A1: a divides b and A2: b divides a; consider a1 such that A3: b = a*a1 by A1,INT_1:def 3; consider b1 such that A4: a = b*b1 by A2,INT_1:def 3; a<>0 implies a = b or a = -b proof assume A5: a<>0; 1*a = a*(a1*b1) by A3,A4; then a1*b1 = 1 by A5,XCMPLX_1:5; then a = b*1 or a = b*(-1) by A4,INT_1:9; hence thesis; end; hence thesis by A1,Th3; end; theorem a divides 0 & 1 divides a & -1 divides a by Lm5; theorem Th13: a divides 1 or a divides -1 implies a = 1 or a = -1 proof A1: a divides 1 implies a = 1 or a = -1 proof assume a divides 1; then ex b st 1 = a*b by INT_1:def 3; hence thesis by INT_1:9; end; A2: a divides -1 implies a = 1 or a = -1 proof assume a divides -1; then ex b st -1 = a*b by INT_1:def 3; hence thesis by INT_1:10; end; assume a divides 1 or a divides -1; hence thesis by A1,A2; end; theorem a = 1 or a = -1 implies a divides 1 & a divides -1 by Lm5; theorem a,b are_congruent_mod c iff c divides (a-b) proof thus a,b are_congruent_mod c implies c divides (a-b) proof assume a,b are_congruent_mod c; then ex d st (a-b) = c*d by INT_1:def 5; hence thesis by INT_1:def 3; end; assume c divides (a-b); then ex d st (a-b) = c*d by INT_1:def 3; hence thesis by INT_1:def 5; end; theorem a divides b iff (abs a) divides (abs b) proof thus a divides b implies (abs a) divides (abs b) proof assume a divides b; then consider c such that A1: b = a*c by INT_1:def 3; abs(b) = abs(a)*abs(c) by A1,COMPLEX1:65; hence thesis by INT_1:def 3; end; assume (abs a) divides (abs b); then consider m being Integer such that A2: abs(b) = abs(a)*m by INT_1:def 3; A3: a>=0 implies a divides b proof assume a>=0; then A4: abs(b) = a*m by A2,ABSVALUE:def 1; per cases; suppose b<0; then -b = a*m by A4,ABSVALUE:def 1; then b = a*(-m); hence thesis by INT_1:def 3; end; suppose b>=0; then b = a*m by A4,ABSVALUE:def 1; hence thesis by INT_1:def 3; end; end; a<0 implies a divides b proof assume a<0; then A5: abs(b) = (-a)*m by A2,ABSVALUE:def 1; per cases; suppose b<0; then -b = -(a*m) by A5,ABSVALUE:def 1; hence thesis by INT_1:def 3; end; suppose b>=0; then b = a*(-m) by A5,ABSVALUE:def 1; hence thesis by INT_1:def 3; end; end; hence thesis by A3; end; theorem a lcm b is Element of NAT by ORDINAL1:def 12; theorem a divides a lcm b by Def1; theorem for c st a divides c & b divides c holds a lcm b divides c by Def1; theorem a gcd b is Element of NAT by ORDINAL1:def 12; theorem Th21: a gcd b divides a by Def2; theorem for c st c divides a & c divides b holds c divides (a gcd b) by Def2; definition let a,b; pred a,b are_relative_prime means :Def3: a gcd b = 1; symmetry; end; theorem a<>0 or b<>0 implies ex a1,b1 st a = (a gcd b)*a1 & b = (a gcd b)*b1 & a1,b1 are_relative_prime proof assume a<>0 or b<>0; then A1: a gcd b <>0 by Th5; (a gcd b) divides a by Def2; then consider a1 such that A2: a = (a gcd b)*a1 by INT_1:def 3; (a gcd b) divides b by Def2; then consider b1 such that A3: b = (a gcd b)*b1 by INT_1:def 3; (a1 gcd b1) divides b1 by Def2; then consider b2 such that A4: b1 = (a1 gcd b1)*b2 by INT_1:def 3; b = ((a gcd b)*(a1 gcd b1))*b2 by A3,A4; then A5: (a gcd b)*(a1 gcd b1) divides b by INT_1:def 3; (a1 gcd b1) divides a1 by Def2; then consider a2 such that A6: a1 = (a1 gcd b1)*a2 by INT_1:def 3; a = ((a gcd b)*(a1 gcd b1))*a2 by A2,A6; then (a gcd b)*(a1 gcd b1) divides a by INT_1:def 3; then (a gcd b)*(a1 gcd b1) divides (a gcd b) by A5,Def2; then consider c such that A7: a gcd b = ((a gcd b)*(a1 gcd b1))*c by INT_1:def 3; (a gcd b)*1 = (a gcd b)*((a1 gcd b1)*c) by A7; then 1 = (a1 gcd b1)*c by A1,XCMPLX_1:5; then a1 gcd b1 = 1 or a1 gcd b1 = -1 by INT_1:9; then a1,b1 are_relative_prime by Def3; hence thesis by A2,A3; end; theorem Th24: a,b are_relative_prime implies (c*a gcd c*b) = abs(c) & c*a gcd b*c = abs(c) & a*c gcd c*b = abs(c) & a*c gcd b*c = abs(c) proof assume a,b are_relative_prime; then A1: a gcd b = 1 by Def3; thus A2: c*a gcd c*b = abs(c) proof (c*a gcd c*b) divides c*b by Def2; then consider l such that A3: c*b = (c*a gcd c*b)*l by INT_1:def 3; (c*a gcd c*b) divides c*a by Def2; then consider k such that A4: c*a = (c*a gcd c*b)*k by INT_1:def 3; c divides c*a & c divides c*b by Th2; then c divides (c*a gcd c*b) by Def2; then consider d such that A5: c*a gcd c*b = c*d by INT_1:def 3; A6: c*b = c*(d*l) by A5,A3; A7: c*a = c*(d*k) by A5,A4; A8: c <>0 implies c*a gcd c*b = abs(c) proof assume A9: c <>0; then b = d*l by A6,XCMPLX_1:5; then A10: d divides b by INT_1:def 3; a = d*k by A7,A9,XCMPLX_1:5; then d divides a by INT_1:def 3; then d divides 1 by A1,A10,Def2; then c*a gcd c*b = c*1 or c*a gcd c*b = c*(-1) by A5,Th13; then c*a gcd c*b = c*1 or c*a gcd c*b = (-c)*1; then A11: abs((c*a gcd c*b)) = abs(c) by COMPLEX1:52; c*a gcd c*b >=0 by NAT_1:2; hence thesis by A11,ABSVALUE:def 1; end; 0*a gcd 0*b = 0 by Th5 .= abs 0 by ABSVALUE:2; hence thesis by A8; end; hence c*a gcd b*c = abs(c); thus thesis by A2; end; theorem Th25: c divides a*b & a,c are_relative_prime implies c divides b proof assume that A1: c divides a*b and A2: a,c are_relative_prime; c divides c*b by Th2; then A3: c divides (a*b gcd c*b) by A1,Def2; A4: a*b gcd c*b = abs(b) by A2,Th24; b<0 implies c divides b proof assume b<0; then c divides (-b) by A4,A3,ABSVALUE:def 1; hence thesis by Th10; end; hence thesis by A4,A3,ABSVALUE:def 1; end; theorem a,c are_relative_prime & b,c are_relative_prime implies a*b,c are_relative_prime proof assume that A1: a,c are_relative_prime and A2: b,c are_relative_prime; A3: (a gcd c) = 1 by A1,Def3; A4: ((a*b gcd c) gcd a) divides a by Def2; A5: (a*b gcd c) divides c by Def2; ((a*b gcd c) gcd a) divides (a*b gcd c) by Def2; then ((a*b gcd c) gcd a) divides c by A5,Lm2; then ((a*b gcd c) gcd a) divides 1 by A3,A4,Def2; then (a*b gcd c) gcd a = 1 or (a*b gcd c) gcd a = -1 by Th13; then a,(a*b gcd c) are_relative_prime by Def3; then A6: (a*b gcd c) divides b by Th21,Th25; (b gcd c) = 1 by A2,Def3; then (a*b gcd c) divides 1 by A5,A6,Def2; then a*b gcd c = 1 or a*b gcd c = -1 by Th13; hence thesis by Def3; end; reserve p,p1,q,l for Nat; definition let p be Nat; attr p is prime means :Def4: p > 1 & for n being Nat st n divides p holds n = 1 or n = p; end; theorem Th27: 0 < b & a divides b implies a <= b proof assume A1: 0 < b; assume a divides b; then consider c such that A2: b = a * c by INT_1:def 3; per cases; suppose a <= 0; hence thesis by A1,XXREAL_0:2; end; suppose A3: a > 0; then c > 0 by A1,A2,XREAL_1:131; then c >= 0+1 by INT_1:7; hence thesis by A2,A3,XREAL_1:151; end; end; theorem Th28: 2 is prime proof thus 2>1; let n be Nat; assume A1: n divides 2; then n <= 2 by Th27; then n = 0 or n = 1 or n = 2 by NAT_1:26; hence thesis by A1,Th3; end; theorem Th29: not 4 is prime proof ex n st n divides 4 & n<>1 & n<>4 proof take 2; 4 = 2*2; hence thesis by INT_1:def 3; end; hence thesis by Def4; end; registration cluster prime for Nat; existence by Th28; cluster non zero non prime for Nat; existence by Th29; end; theorem p is prime & q is prime implies p,q are_relative_prime or p = q proof assume that A1: p is prime and A2: q is prime; A3: (p gcd q) divides q by Def2; assume not p,q are_relative_prime; then A4: p gcd q<>1 by Def3; (p gcd q) divides p by Def2; then p gcd q = p by A1,A4,Def4; hence thesis by A2,A4,A3,Def4; end; theorem l>=2 implies ex p being Element of NAT st p is prime & p divides l proof defpred P[Nat] means ex p st p is prime & p divides $1; A1: for k being Nat st k>=2 holds (for n being Nat st n>=2 holds n=2; assume A3: for n being Nat st n>=2 holds n1+1-1 by A2,NAT_1:13; not k is prime implies ex p being Element of NAT st p is prime & p divides k proof assume not k is prime; then consider m being Nat such that A5: m divides k and A6: m<>1 and A7: m<>k by A4,Def4; m<>0 by A5,A7,Th3; then m>0 by NAT_1:3; then m>=0+1 by NAT_1:13; then m>1 by A6,XXREAL_0:1; then A8: m>=1+1 by NAT_1:13; k>0 by A2,XXREAL_0:2; then m<=k by A5,Th27; then m=2 holds P[k] from NAT_1:sch 9(A1); assume l>=2; then consider p such that A11: p is prime & p divides l by A10; reconsider p as Element of NAT by ORDINAL1:def 12; take p; thus thesis by A11; end; begin theorem for i,j being Integer st i >= 0 & j >= 0 holds abs(i) mod abs(j) = i mod j & abs(i) div abs(j) = i div j proof let i,j be Integer; assume that A1: i >= 0 and A2: j >= 0; per cases by A2,XXREAL_0:1; suppose A3: j > 0; i = abs(i) by A1,ABSVALUE:def 1; hence thesis by A3,ABSVALUE:def 1; end; suppose A4: j = 0; abs(0) = 0 by ABSVALUE:def 1; then abs(i) mod abs(0) = 0 & abs(i) div abs(0) = 0 by INT_1:48,def 10; hence thesis by A4,INT_1:48,def 10; end; end; theorem a lcm b = abs(a) lcm abs(b) proof A1: abs b = b or abs b = -b by ABSVALUE:1; A2: abs a = a or abs a = -a by ABSVALUE:1; A3: now let m be Integer; assume abs a divides m & abs b divides m; then a divides m & b divides m by A2,A1,Th10; hence a lcm b divides m by Def1; end; b divides a lcm b by Def1; then A4: abs b divides a lcm b by A1,Th10; a divides a lcm b by Def1; then abs a divides a lcm b by A2,Th10; hence thesis by A4,A3,Def1; end; theorem a gcd b = abs(a) gcd abs(b) proof A1: abs b = b or abs b = -b by ABSVALUE:1; A2: abs a = a or abs a = -a by ABSVALUE:1; A3: now let m be Integer; assume m divides abs a & m divides abs b; then m divides a & m divides b by A2,A1,Th10; hence m divides a gcd b by Def2; end; a gcd b divides b by Def2; then A4: a gcd b divides abs b by A1,Th10; a gcd b divides a by Def2; then a gcd b divides abs a by A2,Th10; hence thesis by A4,A3,Def2; end; begin reserve p,k,l,m,n,s,h,i,j,t for Nat; Lm1: now let k,l; k div l in NAT by INT_1:3,55; hence k div l is Nat; end; Lm2: now let k,l; k mod l in NAT by INT_1:3,57; hence k mod l is Nat; end; definition let k,l be Nat; redefine func k div l -> Nat means :Def1: ( ex t being Nat st k = l * it + t & t < l ) or it = 0 & l = 0; compatibility proof let r be Nat; per cases; suppose l = 0; hence thesis by INT_1:48; end; suppose A1: l > 0; then A2: k = l * (k div l) + (k mod l) by INT_1:59; A3: k mod l is Nat by Lm2; hence r = k div l implies (ex t being Nat st k = l * r + t & t < l) or r = 0 & l = 0 by A1,A2,INT_1:58; assume A4: ( ex t being Nat st k = l * r + t & t < l ) or r = 0 & l = 0; A5: k mod l < l by A1,INT_1:58; k div l is Nat by Lm1; hence thesis by A2,A3,A4,A5,NAT_1:18; end; end; coherence by Lm1; end; definition let k,l be Nat; redefine func k mod l -> Nat means :Def2: ( ex t being Nat st k = l * t + it & it < l ) or it = 0 & l = 0; compatibility proof let r be Nat; per cases; suppose l = 0; hence thesis by INT_1:def 10; end; suppose A1: l > 0; then A2: k = l * (k div l) + (k mod l) by INT_1:59; hence r = k mod l implies ( ex t being Nat st k = l * t + r & r < l ) or r = 0 & l = 0 by A1,INT_1:58; assume A3: ( ex t being Nat st k = l * t + r & r < l ) or r = 0 & l = 0; A4: k mod l < l by A1,INT_1:58; k mod l is Nat by Lm2; hence thesis by A2,A3,A4,NAT_1:18; end; end; coherence by Lm2; end; definition let k,l be Nat; redefine func k div l -> Element of NAT; coherence proof k div l is Nat; hence thesis by ORDINAL1:def 12; end; redefine func k mod l -> Element of NAT; coherence proof k mod l is Nat; hence thesis by ORDINAL1:def 12; end; end; theorem Th1: 0 < i implies j mod i < i proof assume 0 < i; then ex t being Nat st j = i * t + (j mod i) & j mod i < i by Def2; hence thesis; end; theorem 0 < i implies j = i * (j div i) + (j mod i) by INT_1:59; definition let k,l be Nat; redefine pred k divides l means :Def3: ex t being Nat st l = k * t; compatibility proof hereby assume A1: k divides l; thus ex t being Nat st l = k * t proof consider t being Integer such that A2: l = k * t by A1,INT_1:def 3; per cases; suppose 0 < l; then 0 <= t by A2; then reconsider t as Element of NAT by INT_1:3; take t; thus l = k * t by A2; end; suppose A3: l = 0; take 0; thus l = k*0 by A3; end; end; end; assume ex t being Nat st l = k * t; hence thesis by INT_1:def 3; end; reflexivity proof let i; i = i * 1; hence thesis; end; end; theorem Th3: j divides i iff i = j * (i div j) proof thus j divides i implies i = j * (i div j) proof assume j divides i; then consider k being Nat such that A1: i = j * k by Def3; A2: i = j * k + 0 by A1; now assume A3: j <> 0; then A4: i = j * (i div j) + (i mod j) by INT_1:59; i mod j < j by A3,Th1; hence thesis by A2,A4,NAT_1:18; end; hence thesis by A1; end; assume i = j * (i div j); hence thesis by Def3; end; theorem i divides j & j divides h implies i divides h proof assume that A1: i divides j and A2: j divides h; A3: j = i * (j div i) by A1,Th3; h = j * (h div j) by A2,Th3; then h = i * ((j div i)*(h div j)) by A3; hence thesis by Def3; end; theorem Th5: i divides j & j divides i implies i = j proof assume that A1: i divides j and A2: j divides i; A3: j = i * (j div i) by A1,Th3; i = j * (i div j) by A2,Th3; then A4: i*1 = i * (j div i) * (i div j) by A3 .= i * ((j div i) * (i div j)); A5: i = 0 implies i = j by A3; (j div i) * (i div j) = 1 implies i = j proof assume (j div i) * (i div j) = 1; then j div i = 1 by NAT_1:15; hence thesis by A3; end; hence thesis by A4,A5,XCMPLX_1:5; end; theorem Th6: i divides 0 & 1 divides i proof 0 = i * 0; hence i divides 0 by Def3; i = i * 1; hence thesis by Def3; end; theorem 0 < j & i divides j implies i <= j proof assume that A1: 0 < j and A2: i divides j; A3: j = i * (j div i) by A2,Th3; then j div i <> 0 by A1; then consider m such that A4: j div i = m + 1 by NAT_1:6; i * (m + 1) = i + i * m; hence thesis by A3,A4,NAT_1:11; end; theorem Th8: i divides j & i divides h implies i divides j+h proof assume that A1: i divides j and A2: i divides h; A3: j = i * (j div i) by A1,Th3; h = i * (h div i) by A2,Th3; then j + h = i * ((j div i) + (h div i)) by A3; hence thesis by Def3; end; theorem Th9: i divides j implies i divides j * h proof assume i divides j; then consider l being Nat such that A1: j = i * l by Def3; i * l * h = i * (l * h); hence thesis by A1,Def3; end; theorem Th10: i divides j & i divides j + h implies i divides h proof assume that A1: i divides j and A2: i divides j + h; consider t being Nat such that A3: j + h = i * t by A2,Def3; consider u being Nat such that A4: j = i * u by A1,Def3; now assume A5: i <> 0; then A6: h = i * (h div i) + (h mod i) by INT_1:59; A7: j + (i * (h div i) + (h mod i)) = i * (u + (h div i)) + (h mod i) by A4; A8: h mod i < i by A5,Th1; j + h = i * t + 0 by A3; then h mod i = 0 by A6,A7,A8,NAT_1:18; hence thesis by A6,Th3; end; hence thesis by A3; end; theorem Th11: i divides j & i divides h implies i divides j mod h proof assume that A1: i divides j and A2: i divides h; A3: now assume h = 0; then j mod h = 0 by Def2; hence thesis by Th6; end; now assume h <> 0; then A4: j = h * (j div h) + (j mod h) by INT_1:59; i divides h * (j div h) by A2,Th9; hence thesis by A1,A4,Th10; end; hence thesis by A3; end; definition let k,n be Nat; redefine func k lcm n means :Def4: k divides it & n divides it & for m being Nat st k divides m & n divides m holds it divides m; compatibility proof let IT be Nat; thus IT = k lcm n implies k divides IT & n divides IT & for m being Nat st k divides m & n divides m holds IT divides m by INT_2:def 1; assume that A1: k divides IT and A2: n divides IT and A3: for m being Nat st k divides m & n divides m holds IT divides m; for m being Integer st k divides m & n divides m holds IT divides m proof let m be Integer; m in INT by INT_1:def 2; then consider i being Element of NAT such that A4: m = i or m = -i by INT_1:def 1; assume that A5: k divides m and A6: n divides m; A7: k divides i by A4,A5,INT_2:10; n divides i by A4,A6,INT_2:10; then IT divides i by A3,A7; hence thesis by A4,INT_2:10; end; hence thesis by A1,A2,INT_2:def 1; end; end; definition let k,n be Nat; redefine func k lcm n -> Element of NAT; coherence by ORDINAL1:def 12; end; definition let k,n be Nat; redefine func k gcd n means :Def5: it divides k & it divides n & for m being Nat st m divides k & m divides n holds m divides it; compatibility proof let IT be Nat; thus IT = k gcd n implies IT divides k & IT divides n & for m being Nat st m divides k & m divides n holds m divides IT by INT_2:def 2; assume that A1: IT divides k and A2: IT divides n and A3: for m being Nat st m divides k & m divides n holds m divides IT; for m being Integer st m divides k & m divides n holds m divides IT proof let m be Integer; m in INT by INT_1:def 2; then consider i being Element of NAT such that A4: m = i or m = -i by INT_1:def 1; assume that A5: m divides k and A6: m divides n; A7: i divides k by A4,A5,INT_2:10; i divides n by A4,A6,INT_2:10; then i divides IT by A3,A7; hence thesis by A4,INT_2:10; end; hence thesis by A1,A2,INT_2:def 2; end; end; definition let k,n be Nat; redefine func k gcd n -> Element of NAT; coherence by ORDINAL1:def 12; end; scheme Euklides { Q(Nat)->Nat, a,b()->Nat } : ex n being Element of NAT st Q(n) = a() gcd b() & Q(n + 1) = 0 provided A1: 0 < b() & b() < a() and A2: Q(0) = a() & Q(1) = b() and A3: for n being Element of NAT holds Q(n + 2) = Q(n) mod Q(n + 1) proof defpred P[Nat] means ex n being Element of NAT st $1 = Q(n); A4: ex k being Nat st P[k] by A2; A5: for k being Nat st k <> 0 & P[k] ex n being Nat st n < k & P[n] proof let k be Nat; assume that A6: k <> 0 and A7: ex n being Element of NAT st k = Q(n); consider n being Element of NAT such that A8: k = Q(n) by A7; reconsider Q = Q(n+1) as Element of NAT by ORDINAL1:def 12; A9: n = 0 implies Q < k by A1,A2,A8; now given m such that A10: n = m + 1; reconsider m1=m as Element of NAT by ORDINAL1:def 12; Q(m1 + 2) = Q(m1) mod Q(m1 + 1) by A3; hence Q(n + 1) < k by A6,A8,A10,Th1; take m = n + 1; thus Q(n + 1) =Q(m); end; hence thesis by A9,NAT_1:6; end; A11: P[0] from NAT_1:sch 7(A4,A5); defpred Q[Nat] means 0 = Q($1); A12: ex n being Nat st Q[n] by A11; consider k being Nat such that A13: Q[k] & for n being Nat st Q[n] holds k <= n from NAT_1:sch 5(A12); consider n such that A14: k = n + 1 by A1,A2,A13,NAT_1:6; reconsider n as Element of NAT by ORDINAL1:def 12; take n; defpred PP[Nat] means Q(n) divides Q($1) & Q(n) divides Q($1 + 1); PP[n] by A13,A14,Th6; then A15: ex k being Nat st PP[k]; A16: for k being Nat st k <> 0 & PP[k] ex m being Nat st m < k & PP[m] proof let l be Nat; assume that A17: l <> 0 and A18: Q(n) divides Q(l) and A19: Q(n) divides Q(l + 1); consider m such that A20: l = m + 1 by A17,NAT_1:6; reconsider m as Element of NAT by ORDINAL1:def 12; take m; A21: m <= m + 1 by NAT_1:11; m <> m + 1; hence m < l by A20,A21,XXREAL_0:1; A22: now assume A23: Q(m + 1) = 0; now assume A24: m + 1 <> k; k <= m + 1 by A13,A23; then k < m + 1 by A24,XXREAL_0:1; then A25: k <= m by NAT_1:13; defpred Q[Nat] means k <= $1 implies Q($1) = 0; A26: Q[0] by A13; A27: for m st Q[m] holds Q[m+1] proof let m such that A28: k <= m implies Q(m) = 0 and A29: k <= m + 1; now assume k <> m + 1; then A30: k < m + 1 by A29,XXREAL_0:1; then consider l such that A31: m = l + 1 by A1,A2,A28,NAT_1:6,13; reconsider l as Element of NAT by ORDINAL1:def 12; Q(l + 2) = Q(l) mod Q(l + 1) by A3; hence thesis by A28,A30,A31,Def2,NAT_1:13; end; hence thesis by A13; end; for m holds Q[m] from NAT_1:sch 2(A26,A27); then Q(m) = 0 by A25; hence Q(n) divides Q(m) by Th6; end; hence Q(n) divides Q(m) by A14; end; now assume A32: Q(m + 1) <> 0; Q(m + 2) = Q(m) mod Q(m + 1) by A3; then A33: Q(m) = Q(m + 1) * (Q(m) div Q(m + 1)) + Q(m + 2) by A32,INT_1:59; Q(n) divides Q(m + 1) * (Q(m) div Q(m + 1)) by A18,A20,Th9; hence Q(n) divides Q(m) by A19,A20,A33,Th8; end; hence Q(n) divides Q(m) by A22; thus Q(n) divides Q(m + 1) by A18,A20; end; now PP[0] from NAT_1:sch 7(A15,A16); hence Q(n) divides a() & Q(n) divides b() by A2; let m; defpred P1[Nat] means m divides Q($1) & m divides Q($1 + 1); assume that A34: m divides a() and A35: m divides b(); A36: P1[0] by A2,A34,A35; A37: for k be Element of NAT st P1[k] holds P1[k+1] proof let k be Element of NAT; assume that A38: m divides Q(k) and A39: m divides Q(k + 1); thus m divides Q(k + 1) by A39; Q(k + 2) = Q(k) mod Q(k + 1) by A3; hence m divides Q(k + 1 + 1) by A38,A39,Th11; end; for k be Element of NAT holds P1[k] from NAT_1:sch 1(A36,A37); hence m divides Q(n); end; hence Q(n) = a() gcd b() by Def5; thus thesis by A13,A14; end; theorem n mod 2 = 0 or n mod 2 = 1 proof assume A1: n mod 2 <> 0; A2: 2 = 1 + 1; n mod 2 < 2 by Th1; then A3: n mod 2 <= 1 by A2,NAT_1:13; n mod 2 >= 1 by A1,NAT_1:14; hence thesis by A3,XXREAL_0:1; end; theorem (k * n) mod k = 0 proof per cases; suppose k = 0; hence thesis by Def2; end; suppose A1: k <> 0; k * n = k * n + 0; hence thesis by A1,Def2; end; end; theorem k > 1 implies 1 mod k = 1 proof assume A1: k > 1; 1 = k * 0 + 1; hence thesis by A1,Def2; end; theorem k mod n = 0 & l = k - m * n implies l mod n = 0 proof assume that A1: k mod n = 0 and A2: l = k - m * n; per cases; suppose n = 0; hence thesis by A1,A2; end; suppose n <> 0; then consider t being Nat such that A3: k = n * t + 0 and A4: 0 < n by A1,Def2; A5: l = n * (t - m) + 0 by A2,A3; now assume t < m + 0; then t - m < 0 by XREAL_1:19; then l < n * 0 by A4,A5,XREAL_1:68; hence contradiction; end; then t - m is Element of NAT by NAT_1:21; hence thesis by A4,A5,Def2; end; end; theorem n <> 0 & k mod n = 0 & l < n implies k + l mod n = l proof assume that A1: n <> 0 and A2: k mod n = 0 and A3: l < n; ex t being Nat st k = n * t + 0 & 0 < n by A1,A2,Def2; hence thesis by A3,Def2; end; theorem k mod n = 0 implies k + l mod n = l mod n proof assume that A1: k mod n = 0; per cases; suppose A2: n = 0; hence k + l mod n = 0 by Def2 .= l mod n by A2,Def2; end; suppose A3: n <> 0; then consider m being Nat such that A4: k = n * m + 0 and 0 < n by A1,Def2; consider t being Nat such that A5: l = n * t + (l mod n) and A6: l mod n < n by A3,Def2; k + l = n * (m + t) + (l mod n) by A4,A5; hence thesis by A6,Def2; end; end; theorem k <> 0 implies (k * n) div k = n proof assume A1: k <> 0; k * n = k * n + 0; hence thesis by A1,Def1; end; theorem k mod n = 0 implies (k + l) div n = (k div n) + (l div n) proof assume A1: k mod n = 0; per cases; suppose A2: n <> 0; then A3: k = n * (k div n) + 0 by A1,INT_1:59; A4: ex t being Nat st l = n * t + (l mod n) & l mod n < n by A2,Def2; l = n * (l div n) + (l mod n) by A2,INT_1:59; then k + l = n * ((k div n) + (l div n)) + (l mod n) by A3; hence thesis by A4,Def1; end; suppose A5: n = 0; then A6: (k + l) div n = 0 by Def1; k div n = 0 by A5,Def1; hence thesis by A5,A6,Def1; end; end; begin theorem k <> 0 implies m * k div k = m proof assume k <> 0; then m*k = k * m + 0 & 0 < k or m = 0 & k = 0; hence thesis by Def1; end; theorem Th21: m mod n = (n*k + m) mod n proof per cases; suppose A1: n > 0; m mod n = t implies (n*k + m) mod n = t proof assume m mod n = t; then consider q being Nat such that A2: m = n * q + t and A3: t < n by A1,Def2; ex p st n*k + m = n*p + t & t < n proof reconsider p = k+q as Element of NAT by ORDINAL1:def 12; take p; thus thesis by A2,A3; end; hence thesis by Def2; end; hence thesis; end; suppose n = 0; hence thesis; end; end; theorem Th22: (p+s) mod n = ((p mod n)+s) mod n proof per cases; suppose n > 0; then (p + s) mod n = (n*(p div n) + (p mod n) + s) mod n by INT_1:59 .=(n*(p div n) + ((p mod n) + s)) mod n .=((p mod n) + s) mod n by Th21; hence thesis; end; suppose A1: n = 0; hence (p+s) mod n = 0 by Def2 .= ((p mod n)+s) mod n by A1,Def2; end; end; theorem (p+s) mod n = (p + ( s mod n)) mod n by Th22; theorem Th24: k < n implies k mod n = k proof assume A1: k0; n=n*1+0; hence thesis by A1,Def2; end; suppose n = 0; hence thesis by Def2; end; end; theorem 0 = 0 mod n proof n = 0 or n > 0; hence thesis by Def2,Th24; end; theorem Th27: i < j implies i div j = 0 proof assume A1: i0; then consider k such that A3: i div j = k+1 by NAT_1:6; i = j + (j*k+j1) by A2,A3; hence contradiction by A1,NAT_1:11; end; suppose i div j=0 & j=0; hence thesis; end; end; theorem Th28: m > 0 implies n gcd m = m gcd (n mod m) proof set r=n mod m, x=n gcd m, y=m gcd r; assume m>0; then consider t be Nat such that A1: n = m * t + r and r < m by Def2; reconsider t as Element of NAT by ORDINAL1:def 12; A2: x divides n by Def5; A3: x divides m by Def5; then x divides r by A2,Th11; then A4: x divides y by A3,Def5; A5: y divides m by Def5; A6: y divides r by Def5; y divides m*t by A5,Th9; then y divides n by A1,A6,Th8; then y divides x by A5,Def5; hence thesis by A4,Th5; end; scheme INDI{ k,n() -> Element of NAT, P[set] }: P[n()] provided A1: P[0] and A2: k() > 0 and A3: for i,j st P[k()*i] & j <> 0 & j <= k() holds P[k()*i+j] proof defpred R[Nat] means P[k()*$1]; A4: R[0] by A1; A5: now let i; assume A6: R[i]; k()*(i+1) = k()*i + k(); hence R[i+1] by A2,A3,A6; end; A7: for i holds R[i] from NAT_1:sch 2(A4,A5); per cases; suppose n() mod k() = 0; then n() = k() * (n() div k()) + 0 by A2,INT_1:59; hence thesis by A7; end; suppose A8: n() mod k() <> 0; A9: n() = k() * (n() div k()) + (n() mod k()) by A2,INT_1:59; n() mod k() <= k() by A2,Th1; hence thesis by A3,A7,A8,A9; end; end; theorem i*j = (i lcm j)*(i gcd j) proof A1: i<>0 & j<>0 implies i*j = (i lcm j)*(i gcd j) proof assume that A2: i<>0 and A3: j<>0; A4: i divides i implies i divides i*j by Th9; j divides j implies j divides j*i by Th9; then (i lcm j) divides i*j by A4,Def4; then consider c being Nat such that A5: i*j = (i lcm j)*c by Def3; A6: i divides (i lcm j) by Def4; A7: j divides (i lcm j) by Def4; consider d being Nat such that A8: (i lcm j) = i*d by A6,Def3; consider e being Nat such that A9: (i lcm j) = j*e by A7,Def3; i*j = i*(c*d) by A5,A8; then A10: j = c*d by A2,XCMPLX_1:5; i*j = j*(c*e) by A5,A9; then i = c*e by A3,XCMPLX_1:5; then A11: c divides i by Def3; A12: c divides j by A10,Def3; for f being Nat holds f divides i & f divides j implies f divides c proof let f be Nat; assume that A13: f divides i and A14: f divides j; consider g being Nat such that A15: i = f*g by A13,Def3; consider h being Nat such that A16: j = f*h by A14,Def3; A17: j*g = g*h*f by A16; i*h = g*h*f by A15; then A18: i divides g*h*f by Def3; j divides g*h*f by A17,Def3; then (i lcm j) divides g*h*f by A18,Def4; then consider z being Nat such that A19: g*h*f = (i lcm j)*z by Def3; A20: c*(i lcm j) = (g*(h*f))*f by A5,A15,A16 .= (i lcm j)*z*f by A19 .= (z*f)*(i lcm j); (i lcm j) <> 0 by A2,A3,INT_2:4; then c = f*z by A20,XCMPLX_1:5; hence thesis by Def3; end; hence thesis by A5,A11,A12,Def5; end; i = 0 or j = 0 implies i*j = (i lcm j)*(i gcd j) proof assume A21: i = 0 or j = 0; then i*j = 0*(i gcd j) .= (i lcm j)*(i gcd j) by A21,INT_2:4; hence thesis; end; hence thesis by A1; end; theorem for i,j being Integer st i>=0 & j>0 holds i gcd j= j gcd (i mod j) proof let i,j be Integer; assume that A1: i>=0 and A2: j>0; A3: abs(j)> 0 by A2,ABSVALUE:def 1; thus i gcd j = abs(i) gcd abs(j) by INT_2:34 .=abs(j) gcd (abs(i) mod abs(j)) by A3,Th28 .=abs(j) gcd abs(abs(i) mod abs(j)) by ABSVALUE:def 1 .=j gcd (abs(i) mod abs(j)) by INT_2:34 .=j gcd (i mod j) by A1,A2,INT_2:32; end; theorem i lcm i = i proof for m being Nat st i divides m & i divides m holds i divides m; hence thesis by Def4; end; theorem i gcd i = i proof for m being Nat st m divides i & m divides i holds m divides i; hence thesis by Def5; end; theorem for i, j being Nat st i < j & i <> 0 holds i/j is not integer proof let i, j be Nat such that A1: i < j and A2: i <> 0; assume i/j is integer; then reconsider r = i/j as Integer; r = [\ r /] by INT_1:25 .= i qua Integer div j by INT_1:def 9; hence thesis by A1,A2,Th27,XCMPLX_1:50; end; definition let i,j be Nat; redefine func i -' j -> Element of NAT; coherence proof i -' j = i - j & 0 <= i -' j or i -' j = 0 by XREAL_0:def 2; hence thesis by INT_1:3; end; end; theorem Th34: for i,j being Nat holds i + j -' j = i proof let i, j be Nat; i + j - j >= 0; hence thesis by XREAL_0:def 2; end; reserve a,b for Nat; theorem Th35: a -' b <= a proof a-b <= a-0 by XREAL_1:230; hence thesis by XREAL_0:def 2; end; reserve n,i,j,k for Nat; theorem Th36: n-'i=0 implies n<=i proof assume A1: n-'i=0; assume i=1 or i-i1>=1 implies i-'i1=i-i1 proof assume A1: i-'i1>=1 or i-i1>=1; per cases by A1; suppose i-'i1>=1; hence thesis by XREAL_0:def 2; end; suppose i-i1>=1; hence thesis by XREAL_0:def 2; end; end; theorem n-'0=n proof n-'0=n-0 by XREAL_0:def 2 .=n; hence thesis; end; theorem i1<=i2 implies n-'i2<=n-'i1 proof assume A1: i1<=i2; per cases; suppose A2: i2<=n; then A3: n-'i1=n-i1 by A1,XREAL_1:233,XXREAL_0:2; n-'i2=n-i2 by A2,XREAL_1:233; hence thesis by A1,A3,XREAL_1:10; end; suppose i2>n; then n-i2<0 by XREAL_1:49; hence thesis by XREAL_0:def 2; end; end; theorem Th42: i1<=i2 implies i1-'n<=i2-'n proof assume A1: i1<=i2; per cases; suppose i1-n>=0; then A2: i1-'n=i1-n by XREAL_0:def 2; i1-n<=i2-n by A1,XREAL_1:9; hence thesis by A2,XREAL_0:def 2; end; suppose i1-n<0; hence thesis by XREAL_0:def 2; end; end; theorem Th43: i-'i1>=1 or i-i1>=1 implies i-'i1+i1=i proof assume i-'i1>=1 or i-i1>=1; then i-'i1+i1=i-i1+i1 by Th39 .=i; hence thesis; end; theorem i1<=i2 implies i1-'1<=i2 proof assume A1: i1<=i2; per cases; suppose i1-1>=0; then i1-'1=i1-1 by XREAL_0:def 2; then i1-'1<=i1-1+1 by NAT_1:12; hence thesis by A1,XXREAL_0:2; end; suppose i1-1<0; hence thesis by XREAL_0:def 2; end; end; theorem Th45: i-'2=i-'1-'1 proof per cases; suppose A1: i>=2; then 1<=i by XXREAL_0:2; then i-1>=0 by XREAL_1:48; then A2: i-'1=i-1 by XREAL_0:def 2; i-1>=1+1-1 by A1,XREAL_1:9; then i-1-1>=1-1 by XREAL_1:9; then i-'1-'1 =i-2 by A2,XREAL_0:def 2; hence thesis by XREAL_0:def 2; end; suppose A3: i<2; then i-2<2-2 by XREAL_1:9; then A4: i-'2=0 by XREAL_0:def 2; A5: i+1-1<=1+1-1 by A3,NAT_1:13; now per cases; case 1<=i; then i=1 by A5,XXREAL_0:1; then i-'1-'1=0-'1 by XREAL_1:232; hence thesis by A4,Th35; end; case i<1; then i-1<1-1 by XREAL_1:9; then i-'1-'1=0-'1 by XREAL_0:def 2; hence thesis by A4,Th35; end; end; hence thesis; end; end; theorem Th46: i1+1<=i2 implies i1-'1=i1 implies i>=i1-'i2 proof assume A1: i>=i1; i1>=i1-'i2 by Th35; hence thesis by A1,XXREAL_0:2; end; theorem 1<=i & 1<=i1-'i implies i1-'i= k; i-'k +k <= j + k by A1,XREAL_1:6; hence thesis by A2,XREAL_1:235; end; suppose A3: i <= k; k <= j + k by NAT_1:11; hence thesis by A3,XXREAL_0:2; end; end; theorem i <= j + k implies i-'k <= j proof assume i <= j + k; then i -' k <= j + k -' k by Th42; hence thesis by Th34; end; theorem i <= j -' k & k <= j implies i + k <= j proof assume that A1: i <= j -' k and A2: j >= k; i + k <= j -' k + k by A1,XREAL_1:6; hence thesis by A2,XREAL_1:235; end; theorem j + k <= i implies k <= i -' j proof assume A1: j + k <= i; per cases by A1,XXREAL_0:1; suppose j + k = i; hence thesis by Th34; end; suppose j + k < i; hence thesis by Th52; end; end; theorem k <= i & i < j implies i -' k < j -' k proof assume that A1: k <= i and A2: i < j; i -' k + k = i by A1,XREAL_1:235; then i -' k + k < j -' k + k by A1,A2,XREAL_1:235,XXREAL_0:2; hence thesis by XREAL_1:6; end; theorem i < j & k < j implies i -' k < j -' k proof assume that A1: i < j and A2: k < j; per cases; suppose k <= i; then A3: i -' k = i - k by XREAL_1:233; j -' k = j - k by A2,XREAL_1:233; hence thesis by A1,A3,XREAL_1:9; end; suppose k > i; then i - k < 0 by XREAL_1:49; then A4: i -' k = 0 by XREAL_0:def 2; j -' k <> 0 by A2,Th36; hence thesis by A4; end; end; theorem i <= j implies j-'(j-'i) = i proof assume A1: i <= j; j-'(j-'i) + (j-'i) = j by Th50,XREAL_1:235 .= i + (j-'i) by A1,XREAL_1:235; hence thesis; end; theorem for n,k being Nat st n < k holds k -' (n+1) + 1 = k -' n proof let n,k be Nat such that A1: n < k; A2: k -' n = k - n by A1,XREAL_1:233; n+1 <= k by A1,NAT_1:13; then k -' (n+1) = k - (n+1) by XREAL_1:233; hence thesis by A2; end; theorem for A being finite set holds A is trivial iff card A < 2 proof let A be finite set; hereby assume A1: A is trivial; per cases; suppose A is empty; hence card A < 2; end; suppose A is non empty; then ex x being set st A = {x} by A1,ZFMISC_1:131; then card A = 1 by CARD_1:30; hence card A < 2; end; end; assume A2: card A < 2; per cases by A2,NAT_1:23; suppose card A = 0; hence thesis; end; suppose card A = 1; then A is 1-element by CARD_1:def 7; hence thesis; end; end; theorem Th61: for n,a,k being Integer holds (n <> 0 implies (a + n * k) div n = (a div n) + k) & (a + n * k) mod n = a mod n proof let n,a,k be Integer; thus A1: now assume A2: n <> 0; thus (a + n * k) div n = [\ (a + n * k)/n /] by INT_1:def 9 .= [\ (a + n * k) * n" /] by XCMPLX_0:def 9 .= [\ a * n" + (n * n") * k /] .= [\ a * n" + 1 * k /] by A2,XCMPLX_0:def 7 .= [\ a * n" /] + k by INT_1:28 .= [\ a/n /] + k by XCMPLX_0:def 9 .= (a div n) + k by INT_1:def 9; end; per cases; suppose A3: n <> 0; hence (a + n * k) mod n = (a + n * k) - ((a div n) + k) * n by A1, INT_1:def 10 .= a - (a div n) * n .= a mod n by A3,INT_1:def 10; end; suppose n = 0; hence thesis; end; end; theorem Th62: for n being Nat st n > 0 for a being Integer holds a mod n >= 0 & a mod n < n proof let n be Nat; assume A1: n > 0; let a be Integer; now a div n = [\ a/n /] by INT_1:def 9; then a div n <= a/n by INT_1:def 6; then (a div n) * n <= a/n * n by XREAL_1:64; then (a div n) * n <= (a * n") * n by XCMPLX_0:def 9; then (a div n) * n <= a * (n" * n); then (a div n) * n <= a * 1 by A1,XCMPLX_0:def 7; then (a div n) * n - (a div n) * n <= a - (a div n) * n by XREAL_1:9; hence 0 <= a mod n by INT_1:def 10; assume a mod n >= n; then a - (a div n) * n >= n by A1,INT_1:def 10; then (a + -(a div n) * n) + (a div n) * n >= n + (a div n) * n by XREAL_1:6 ; then a - n >= (n + (a div n) * n) - n by XREAL_1:9; then (a - n) * n" >= ((a div n) * n) * n" by XREAL_1:64; then (a - n) * n" >= (a div n) * (n * n"); then a * n" - n * n" >= (a div n) * 1 by A1,XCMPLX_0:def 7; then a * n" - 1 >= (a div n) by A1,XCMPLX_0:def 7; then A2: a/n - 1 >= (a div n) by XCMPLX_0:def 9; a div n = [\ a/n /] by INT_1:def 9; hence contradiction by A2,INT_1:def 6; end; hence thesis; end; theorem Th63: for n,a being Integer holds (0 <= a & a < n implies a mod n = a) & (0 > a & a >= -n implies a mod n = n + a) proof let n,a be Integer; per cases; suppose n = 0; hence thesis; end; suppose A1: n <> 0; hereby assume that A2: 0 <= a and A3: a < n; reconsider aa = a as Element of NAT by A2,INT_1:3; reconsider nn = n as Element of NAT by A2,A3,INT_1:3; consider t being Nat such that A4: aa = nn * t + (aa mod nn) and (aa mod nn) < nn by A1,Def2; t = 0 proof assume t <> 0; then t >= 1 + 0 by INT_1:7; then A5: t * n >= 1 * n by A2,A3,XREAL_1:64; nn * t + (aa mod nn) >= nn * t by NAT_1:11; hence thesis by A3,A4,A5,XXREAL_0:2; end; hence a mod n = a by A4; end; assume that A6: 0 > a and A7: a >= -n; A8: n >= 0 by A6,A7; A9: a/n - 1 < -1 proof assume a/n - 1 >= -1; then (a/n - 1) + 1 >= -1 + 1 by XREAL_1:6; then a * n" >= 0 by XCMPLX_0:def 9; then (a * n") * n >= 0 * n by A8; then a * (n" * n) >= 0; then a * 1 >= 0 by A1,XCMPLX_0:def 7; hence thesis by A6; end; a * n" >= (-n) * n" by A7,A8,XREAL_1:64; then a /n >= -(n * n") by XCMPLX_0:def 9; then -1 <= a/n by A1,XCMPLX_0:def 7; then [\ a/n /] = -1 by A9,INT_1:def 6; then A10: a div n = -1 by INT_1:def 9; a mod n = a - (a div n) * n by A1,INT_1:def 10; hence thesis by A10; end; end; theorem Th64: for n,a,b being Integer holds (n <> 0 & a mod n = b mod n implies a,b are_congruent_mod n) & (a,b are_congruent_mod n implies a mod n = b mod n) proof let n,a,b be Integer; hereby assume A1: n <> 0; assume a mod n = b mod n; then a - (a div n) * n = b mod n by A1,INT_1:def 10; then a - (a div n) * n = b - (b div n) * n by A1,INT_1:def 10; then a - b = (-(b div n) + (a div n)) * n; then n divides (a-b) by INT_1:def 3; hence a,b are_congruent_mod n by INT_2:15; end; assume a,b are_congruent_mod n; then n divides (a-b) by INT_2:15; then consider k being Integer such that A2: n * k = a - b by INT_1:def 3; a = n * k + b by A2; hence thesis by Th61; end; theorem for n being Nat for a being Integer holds (a mod n) mod n = a mod n proof let n be Nat; let a be Integer; per cases; suppose A1: n = 0; hence (a mod n) mod n = 0 by INT_1:def 10 .= a mod n by A1,INT_1:def 10; end; suppose n <> 0; then a mod n >= 0 & a mod n < n by Th62; hence thesis by Th63; end; end; theorem for n,a,b being Integer holds (a + b) mod n = ((a mod n) + (b mod n)) mod n proof let n,a,b be Integer; per cases; suppose A1: n = 0; hence (a + b) mod n = 0 by INT_1:def 10 .= ((a mod n) + (b mod n)) mod n by A1,INT_1:def 10; end; suppose n <> 0; then a mod n + (a div n) * n = (a - (a div n) * n) + (a div n) * n & b mod n + (b div n) * n = (b - (b div n) * n) + (b div n) * n by INT_1:def 10; then (a + b) - ((a mod n) + (b mod n)) = ((a div n) + (b div n)) * n; then n divides (a + b) - ((a mod n) + (b mod n)) by INT_1:def 3; then a+b,(a mod n)+(b mod n) are_congruent_mod n by INT_2:15; hence thesis by Th64; end; end; theorem for n,a,b being Integer holds (a * b) mod n = ((a mod n) * (b mod n)) mod n proof let n,a,b be Integer; per cases; suppose A1: n = 0; hence (a * b) mod n = 0 by INT_1:def 10 .= ((a mod n) * (b mod n)) mod n by A1,INT_1:def 10; end; suppose n <> 0; then a mod n + (a div n) * n = (a - (a div n) * n) + (a div n) * n & b mod n + (b div n) * n = (b - (b div n) * n) + (b div n) * n by INT_1:def 10; then (a * b) - ((a mod n) * (b mod n)) = (((a mod n) * (b div n)) + (((a div n) * (b mod n)) + (((a div n) * n) * (b div n)))) * n; then n divides ((a * b) - ((a mod n) * (b mod n))) by INT_1:def 3; then (a*b),((a mod n)*(b mod n)) are_congruent_mod n by INT_2:15; hence thesis by Th64; end; end; theorem for a,b being Integer ex s,t being Integer st a gcd b = s * a + t * b proof let a,b be Integer; A1: for a,b being Integer st a > 0 & b > 0 holds ex s,t being Integer st (a gcd b) = (s * a + t * b) proof let a,b be Integer; assume that A2: a > 0 and A3: b > 0; reconsider a,b as Element of NAT by A2,A3,INT_1:3; set M = {z where z is Element of NAT : ex s,t being Integer st z = s * a + t * b}; defpred P[Nat] means ($1 in M & $1 <> 0); a = 1 * a + 0 * b; then A4: a in M; then A5: ex k being Nat st P[k] by A2; consider g being Nat such that A6: P[g] & for n being Nat st P[n] holds g <= n from NAT_1:sch 5(A5); set G = {zz where zz is Element of NAT : ex s being Element of NAT st zz = s * g}; ex z being Element of NAT st z = g & ex s,t being Integer st z = s * a + t * b by A6; then consider s,t being Integer such that A7: g = s * a + t * b; A8: for x being set holds x in M implies x in G proof let x be set; assume x in M; then consider x9 being Element of NAT such that A9: x9 = x and A10: ex u,v being Integer st x9 = u * a + v * b; consider u,v being Integer such that A11: x = u * a + v * b by A9,A10; consider r being Nat such that A12: x9 = g * (x9 div g) + r and A13: r < g by A6,Def1; A14: r in NAT by ORDINAL1:def 12; r = x9 - g * (x9 div g) by A12 .= a * (u + -(s * (x9 div g))) + b * (v + -(t * (x9 div g))) by A7,A9,A11; then r in M by A14; then r = 0 by A6,A13; hence thesis by A9,A12; end; for x being set holds x in G implies x in M proof let x be set; assume x in G; then A15: ex x9 being Element of NAT st x9 = x & ex u being Element of NAT st x9 = u * g; then consider u being Integer such that A16: x = u * g; x = (u * s) * a + (u * t) * b by A7,A16; hence thesis by A15; end; then A17: G = M by A8,TARSKI:1; A18: abs(b) = b by ABSVALUE:def 1; A19: abs(a) = a by ABSVALUE:def 1; A20: for m being Nat st m divides abs(a) & m divides abs(b) holds m divides g proof ex g9 being Element of NAT st g9 = g & ex s,t being Integer st g9 = s * a + t * b by A6; then consider s,t being Integer such that A21: g = s * a + t * b; let m be Nat; assume that A22: m divides abs(a) and A23: m divides abs(b); consider u being Nat such that A24: a = m * u by A19,A22,Def3; consider v being Nat such that A25: b = m * v by A18,A23,Def3; A26: g = m * (s * u + t * v) by A24,A25,A21; then s * u + t * v >= 0 by A6; then s * u + t * v is Element of NAT by INT_1:3; hence thesis by A26,Def3; end; b = 0 * a + 1 * b; then b in M; then ex b9 being Element of NAT st b9 = b & ex t being Element of NAT st b9 = t * g by A17; then A27: g divides abs(b) by A18,Def3; ex a9 being Element of NAT st a9 = a & ex s being Element of NAT st a9 = s * g by A4,A17; then g divides abs(a) by A19,Def3; then g = abs(a) gcd abs(b) by A27,A20,Def5 .= a gcd b by INT_2:34; hence thesis by A7; end; now per cases; case A28: a = 0 or b = 0; A29: for a,b being Integer holds a = 0 implies a gcd b = abs(b) proof let a,b be Integer; assume a = 0; then abs(a) = 0 by ABSVALUE:def 1; then A30: abs(b) divides abs(a) by Th6; a gcd b = abs(a) gcd abs(b) & for m being Nat st m divides abs(a) & m divides abs(b) holds m divides abs(b) by INT_2:34; hence thesis by A30,Def5; end; now per cases by A28; case a = 0; then A31: a gcd b = abs(b) by A29; now per cases; case b >= 0; hence a gcd b = 0 * a + 1 * b by A31,ABSVALUE:def 1; end; case b < 0; hence a gcd b = -(b * 1) by A31,ABSVALUE:def 1 .= 0 * a + (-1) * b; end; end; hence thesis; end; case b = 0; then A32: a gcd b = abs(a) by A29; now per cases; case a >= 0; hence a gcd b = 1 * a + 0 * b by A32,ABSVALUE:def 1; end; case a < 0; hence a gcd b = -(a * 1) by A32,ABSVALUE:def 1 .= 0 * b + (-1) * a; end; end; hence thesis; end; end; hence thesis; end; case A33: a <> 0 & b <> 0; now per cases; case a >= 0 & b >= 0; hence thesis by A1,A33; end; case A34: a < 0 & b >= 0; then -a > 0 by XREAL_1:58; then consider s,t being Integer such that A35: -a gcd b = s * -a + t * b by A1,A33,A34; A36: a gcd b = abs(a) gcd abs(b) by INT_2:34 .= abs((-a)) gcd abs(b) by COMPLEX1:52 .= -a gcd b by INT_2:34; s * -a + t * b = (-s) * a + t * b; hence thesis by A35,A36; end; case A37: a >= 0 & b < 0; then -b > 0 by XREAL_1:58; then consider s,t being Integer such that A38: a gcd -b = s * a + t * -b by A1,A33,A37; A39: a gcd b = abs(a) gcd abs(b) by INT_2:34 .= abs(a) gcd abs((-b)) by COMPLEX1:52 .= a gcd -b by INT_2:34; s * a + t * -b = s * a + (-t) * b; hence thesis by A38,A39; end; case a < 0 & b < 0; then -a > 0 & -b > 0 by XREAL_1:58; then consider s,t being Integer such that A40: -a gcd -b = s * -a + t * -b by A1; A41: a gcd b = abs(a) gcd abs(b) by INT_2:34 .= abs(a) gcd abs((-b)) by COMPLEX1:52 .= abs((-a)) gcd abs((-b)) by COMPLEX1:52 .= -a gcd -b by INT_2:34; s * -a + t * -b = (-s) * a + (-t) * b; hence thesis by A40,A41; end; end; hence thesis; end; end; hence thesis; end; theorem n mod k = k - 1 implies (n+1) mod k = 0 proof per cases; suppose k <> 0; then k >= 1 by NAT_1:14; then reconsider K = k - 1 as Element of NAT by INT_1:3,XREAL_1:48; A1: K + 1 = k - 0; assume n mod k = k-1; then (n+1) mod k = k mod k by A1,Th22; hence thesis by Th25; end; suppose k=0; hence thesis; end; end; theorem n mod k < k - 1 implies (n+1) mod k = (n mod k) + 1 proof assume n mod k < k - 1; then A1: (n mod k) + 1 < k by XREAL_1:20; (n+1) mod k = ((n mod k)+1) mod k by Th22; hence thesis by A1,Th24; end; begin scheme FuncDefUniq{C, D()->non empty set, F(Element of C())->set}: for f1,f2 being Function of C(),D() st (for x being Element of C() holds f1.x = F(x)) & (for x being Element of C() holds f2.x = F(x)) holds f1 = f2 proof let f1,f2 be Function of C(),D() such that A1: for x being Element of C() holds f1.x = F(x) and A2: for x being Element of C() holds f2.x = F(x); now let x be Element of C(); thus f1.x = F(x) by A1 .= f2.x by A2; end; hence thesis by FUNCT_2:63; end; scheme BinOpDefuniq{A()->non empty set, O(Element of A(),Element of A())->set}: for o1,o2 being BinOp of A() st (for a,b being Element of A() holds o1.(a,b) = O(a, b)) & (for a,b being Element of A() holds o2.(a,b) = O(a,b)) holds o1 = o2 proof let o1,o2 be BinOp of A() such that A1: for a,b being Element of A() holds o1.(a,b) = O(a,b) and A2: for a,b being Element of A() holds o2.(a,b) = O(a,b); now let a,b be Element of A(); thus o1.(a,b) = O(a,b) by A1 .= o2.(a,b) by A2; end; hence thesis by BINOP_1:2; end; scheme CFuncDefUniq{F(complex number)->set}: for f1,f2 being Function of COMPLEX,COMPLEX st (for x being complex number holds f1.x = F(x)) & (for x being complex number holds f2.x = F(x)) holds f1 = f2 proof let f1,f2 be Function of COMPLEX,COMPLEX such that A1: for x being complex number holds f1.x = F(x) and A2: for x being complex number holds f2.x = F(x); now let x be Element of COMPLEX; thus f1.x = F(x) by A1 .= f2.x by A2; end; hence thesis by FUNCT_2:63; end; scheme RFuncDefUniq{F(real number)->set}: for f1,f2 being Function of REAL,REAL st (for x being real number holds f1.x = F(x)) & (for x being real number holds f2.x = F(x)) holds f1 = f2 proof let f1,f2 be Function of REAL,REAL such that A1: for x being real number holds f1.x = F(x) and A2: for x being real number holds f2.x = F(x); now let x be Element of REAL; thus f1.x = F(x) by A1 .= f2.x by A2; end; hence thesis by FUNCT_2:63; end; registration cluster -> rational for Element of RAT; coherence by RAT_1:def 2; end; scheme WFuncDefUniq{F(rational number)->set}: for f1,f2 being Function of RAT,RAT st (for x being rational number holds f1.x = F(x)) & (for x being rational number holds f2.x = F(x)) holds f1 = f2 proof let f1,f2 be Function of RAT,RAT such that A1: for x being rational number holds f1.x = F(x) and A2: for x being rational number holds f2.x = F(x); now let x be Element of RAT; thus f1.x = F(x) by A1 .= f2.x by A2; end; hence thesis by FUNCT_2:63; end; scheme IFuncDefUniq{F(integer number)->set}: for f1,f2 being Function of INT,INT st (for x being integer number holds f1.x = F(x)) & (for x being integer number holds f2.x = F(x)) holds f1 = f2 proof let f1,f2 be Function of INT,INT such that A1: for x being integer number holds f1.x = F(x) and A2: for x being integer number holds f2.x = F(x); now let x be Element of INT; thus f1.x = F(x) by A1 .= f2.x by A2; end; hence thesis by FUNCT_2:63; end; scheme NFuncDefUniq{F(Nat)->set}: for f1,f2 being Function of NAT,NAT st (for x being Nat holds f1.x = F(x)) & (for x being Nat holds f2.x = F(x)) holds f1 = f2 proof let f1,f2 be Function of NAT,NAT such that A1: for x being Nat holds f1.x = F(x) and A2: for x being Nat holds f2.x = F(x); now let x be Element of NAT; thus f1.x = F(x) by A1 .= f2.x by A2; end; hence thesis by FUNCT_2:63; end; scheme CBinOpDefuniq{O(complex number,complex number)->set}: for o1,o2 being BinOp of COMPLEX st (for a,b being complex number holds o1.(a,b) = O(a,b)) & (for a,b being complex number holds o2.(a,b) = O(a,b)) holds o1 = o2 proof let o1,o2 be BinOp of COMPLEX such that A1: for a,b being complex number holds o1.(a,b) = O(a,b) and A2: for a,b being complex number holds o2.(a,b) = O(a,b); now let a,b be Element of COMPLEX; thus o1.(a,b) = O(a,b) by A1 .= o2.(a,b) by A2; end; hence thesis by BINOP_1:2; end; scheme RBinOpDefuniq{O(real number,real number)->set}: for o1,o2 being BinOp of REAL st (for a,b being real number holds o1.(a,b) = O(a,b)) & (for a,b being real number holds o2.(a,b) = O(a,b)) holds o1 = o2 proof let o1,o2 be BinOp of REAL such that A1: for a,b being real number holds o1.(a,b) = O(a,b) and A2: for a,b being real number holds o2.(a,b) = O(a,b); now let a,b be Element of REAL; thus o1.(a,b) = O(a,b) by A1 .= o2.(a,b) by A2; end; hence thesis by BINOP_1:2; end; scheme WBinOpDefuniq{O(rational number,rational number)->set}: for o1,o2 being BinOp of RAT st (for a,b being rational number holds o1.(a,b) = O(a,b)) & (for a,b being rational number holds o2.(a,b) = O(a,b)) holds o1 = o2 proof let o1,o2 be BinOp of RAT such that A1: for a,b being rational number holds o1.(a,b) = O(a,b) and A2: for a,b being rational number holds o2.(a,b) = O(a,b); now let a,b be Element of RAT; thus o1.(a,b) = O(a,b) by A1 .= o2.(a,b) by A2; end; hence thesis by BINOP_1:2; end; scheme IBinOpDefuniq{O(integer number,integer number)->set}: for o1,o2 being BinOp of INT st (for a,b being integer number holds o1.(a,b) = O(a,b)) & (for a,b being integer number holds o2.(a,b) = O(a,b)) holds o1 = o2 proof let o1,o2 be BinOp of INT such that A1: for a,b being integer number holds o1.(a,b) = O(a,b) and A2: for a,b being integer number holds o2.(a,b) = O(a,b); now let a,b be Element of INT; thus o1.(a,b) = O(a,b) by A1 .= o2.(a,b) by A2; end; hence thesis by BINOP_1:2; end; scheme NBinOpDefuniq{O(Nat,Nat)->set}: for o1,o2 being BinOp of NAT st (for a,b being Nat holds o1.(a,b) = O(a,b)) & (for a,b being Nat holds o2.(a,b) = O(a,b)) holds o1 = o2 proof let o1,o2 be BinOp of NAT such that A1: for a,b being Nat holds o1.(a,b) = O(a,b) and A2: for a,b being Nat holds o2.(a,b) = O(a,b); now let a,b be Element of NAT; thus o1.(a,b) = O(a,b) by A1 .= o2.(a,b) by A2; end; hence thesis by BINOP_1:2; end; scheme CLambda2D{F(complex number,complex number) -> complex number}: ex f being Function of [:COMPLEX,COMPLEX:],COMPLEX st for x,y being complex number holds f.(x,y)=F(x,y) proof defpred P[complex number,complex number,set] means $3 = F($1,$2); A1: for x,y being Element of COMPLEX ex z being Element of COMPLEX st P[x,y,z] proof let x,y being Element of COMPLEX; reconsider z = F(x,y) as Element of COMPLEX by XCMPLX_0:def 2; take z; thus P[x,y,z]; end; consider f being Function of [:COMPLEX,COMPLEX:],COMPLEX such that A2: for x,y being Element of COMPLEX holds P[x,y,f.(x,y)] from BINOP_1:sch 3(A1); take f; let x,y be complex number; reconsider x,y as Element of COMPLEX by XCMPLX_0:def 2; P[x,y,f.(x,y)] by A2; then f.(x,y)=F(x,y); hence thesis; end; scheme RLambda2D{F(real number,real number) -> real number}: ex f being Function of [:REAL,REAL:],REAL st for x,y being real number holds f.(x,y)=F(x,y) proof defpred P[real number,real number,set] means $3 = F($1,$2); A1: for x,y being Element of REAL ex z being Element of REAL st P[x,y,z] proof let x,y being Element of REAL; reconsider z = F(x,y) as Element of REAL by XREAL_0:def 1; take z; thus P[x,y,z]; end; consider f being Function of [:REAL,REAL:],REAL such that A2: for x,y being Element of REAL holds P[x,y,f.(x,y)] from BINOP_1:sch 3(A1 ); take f; let x,y be real number; reconsider x,y as Element of REAL by XREAL_0:def 1; P[x,y,f.(x,y)] by A2; then f.(x,y)=F(x,y); hence thesis; end; scheme WLambda2D{F(rational number,rational number) -> rational number}: ex f being Function of [:RAT,RAT:],RAT st for x,y being rational number holds f.(x,y)=F(x,y) proof defpred P[rational number,rational number,set] means $3 = F($1,$2); A1: for x,y being Element of RAT ex z being Element of RAT st P[x,y,z] proof let x,y being Element of RAT; reconsider z = F(x,y) as Element of RAT by RAT_1:def 2; take z; thus P[x,y,z]; end; consider f being Function of [:RAT,RAT:],RAT such that A2: for x,y being Element of RAT holds P[x,y,f.(x,y)] from BINOP_1:sch 3(A1); take f; let x,y be rational number; reconsider x,y as Element of RAT by RAT_1:def 2; P[x,y,f.(x,y)] by A2; then f.(x,y)=F(x,y); hence thesis; end; scheme ILambda2D{F(integer number,integer number) -> integer number}: ex f being Function of [:INT,INT:],INT st for x,y being integer number holds f.(x,y)=F(x,y) proof defpred P[integer number,integer number,set] means $3 = F($1,$2); A1: for x,y being Element of INT ex z being Element of INT st P[x,y,z] proof let x,y being Element of INT; reconsider z = F(x,y) as Element of INT by INT_1:def 2; take z; thus P[x,y,z]; end; consider f being Function of [:INT,INT:],INT such that A2: for x,y being Element of INT holds P[x,y,f.(x,y)] from BINOP_1:sch 3(A1); take f; let x,y be integer number; reconsider x,y as Element of INT by INT_1:def 2; P[x,y,f.(x,y)] by A2; then f.(x,y)=F(x,y); hence thesis; end; scheme NLambda2D{F(Nat,Nat) -> Nat}: ex f being Function of [:NAT,NAT:],NAT st for x,y being Nat holds f.(x,y)=F(x,y) proof defpred P[Nat,Nat,set] means $3 = F($1,$2); A1: for x,y being Element of NAT ex z being Element of NAT st P[x,y,z] proof let x,y being Element of NAT; reconsider z = F(x,y) as Element of NAT by ORDINAL1:def 12; take z; thus P[x,y,z]; end; consider f being Function of [:NAT,NAT:],NAT such that A2: for x,y being Element of NAT holds P[x,y,f.(x,y)] from BINOP_1:sch 3(A1); take f; let x,y be Nat; reconsider x,y as Element of NAT by ORDINAL1:def 12; P[x,y,f.(x,y)] by A2; then f.(x,y)=F(x,y); hence thesis; end; scheme CLambdaD{F(complex number) -> complex number }: ex f being Function of COMPLEX,COMPLEX st for x being complex number holds f.x = F(x) proof defpred P[Element of COMPLEX,set] means $2 = F($1); A1: for x being Element of COMPLEX ex y being Element of COMPLEX st P[x,y] proof let x being Element of COMPLEX; reconsider y = F(x) as Element of COMPLEX by XCMPLX_0:def 2; take y; thus P[x,y]; end; consider f being Function of COMPLEX,COMPLEX such that A2: for x being Element of COMPLEX holds P[x,f.x] from FUNCT_2:sch 3(A1); take f; let c be complex number; reconsider c as Element of COMPLEX by XCMPLX_0:def 2; P[c,f.c] by A2; hence thesis; end; scheme RLambdaD{F(real number) -> real number }: ex f being Function of REAL,REAL st for x being real number holds f.x = F(x) proof defpred P[Element of REAL,set] means $2 = F($1); A1: for x being Element of REAL ex y being Element of REAL st P[x,y] proof let x being Element of REAL; reconsider y = F(x) as Element of REAL by XREAL_0:def 1; take y; thus P[x,y]; end; consider f being Function of REAL,REAL such that A2: for x being Element of REAL holds P[x,f.x] from FUNCT_2:sch 3(A1); take f; let c be real number; reconsider c as Element of REAL by XREAL_0:def 1; P[c,f.c] by A2; hence thesis; end; scheme WLambdaD{F(rational number) -> rational number }: ex f being Function of RAT,RAT st for x being rational number holds f.x = F(x) proof defpred P[Element of RAT,set] means $2 = F($1); A1: for x being Element of RAT ex y being Element of RAT st P[x,y] proof let x being Element of RAT; reconsider y = F(x) as Element of RAT by RAT_1:def 2; take y; thus P[x,y]; end; consider f being Function of RAT,RAT such that A2: for x being Element of RAT holds P[x,f.x] from FUNCT_2:sch 3(A1); take f; let c be rational number; reconsider c as Element of RAT by RAT_1:def 2; P[c,f.c] by A2; hence thesis; end; scheme ILambdaD{F(integer number) -> integer number }: ex f being Function of INT,INT st for x being integer number holds f.x = F(x) proof defpred P[Element of INT,set] means $2 = F($1); A1: for x being Element of INT ex y being Element of INT st P[x,y] proof let x being Element of INT; reconsider y = F(x) as Element of INT by INT_1:def 2; take y; thus P[x,y]; end; consider f being Function of INT,INT such that A2: for x being Element of INT holds P[x,f.x] from FUNCT_2:sch 3(A1); take f; let c be integer number; reconsider c as Element of INT by INT_1:def 2; P[c,f.c] by A2; hence thesis; end; scheme NLambdaD{F(Nat) -> Nat }: ex f being Function of NAT,NAT st for x being Nat holds f.x = F(x) proof defpred P[Element of NAT,set] means $2 = F($1); A1: for x being Element of NAT ex y being Element of NAT st P[x,y] proof let x being Element of NAT; reconsider y = F(x) as Element of NAT by ORDINAL1:def 12; take y; thus P[x,y]; end; consider f being Function of NAT,NAT such that A2: for x being Element of NAT holds P[x,f.x] from FUNCT_2:sch 3(A1); take f; let c be Nat; reconsider c as Element of NAT by ORDINAL1:def 12; P[c,f.c] by A2; hence thesis; end; reserve c,c1,c2 for complex number; definition let c1; redefine func -c1 -> Element of COMPLEX; coherence by XCMPLX_0:def 2; redefine func c1" -> Element of COMPLEX; coherence by XCMPLX_0:def 2; let c2; redefine func c1+c2 -> Element of COMPLEX; coherence by XCMPLX_0:def 2; redefine func c1-c2 -> Element of COMPLEX; coherence by XCMPLX_0:def 2; redefine func c1*c2 -> Element of COMPLEX; coherence by XCMPLX_0:def 2; redefine func c1/c2 -> Element of COMPLEX; coherence by XCMPLX_0:def 2; end; reserve r,r1,r2 for real number; definition let r1; redefine func -r1 -> Element of REAL; coherence by XREAL_0:def 1; redefine func r1" -> Element of REAL; coherence by XREAL_0:def 1; let r2; redefine func r1+r2 -> Element of REAL; coherence by XREAL_0:def 1; redefine func r1-r2 -> Element of REAL; coherence by XREAL_0:def 1; redefine func r1*r2 -> Element of REAL; coherence by XREAL_0:def 1; redefine func r1/r2 -> Element of REAL; coherence by XREAL_0:def 1; end; reserve w,w1,w2 for rational number; definition let w1; redefine func -w1 -> Element of RAT; coherence by RAT_1:def 2; redefine func w1" -> Element of RAT; coherence by RAT_1:def 2; let w2; redefine func w1+w2 -> Element of RAT; coherence by RAT_1:def 2; redefine func w1-w2 -> Element of RAT; coherence by RAT_1:def 2; redefine func w1*w2 -> Element of RAT; coherence by RAT_1:def 2; redefine func w1/w2 -> Element of RAT; coherence by RAT_1:def 2; end; reserve i,i1,i2 for integer number; definition let i1; redefine func -i1 -> Element of INT; coherence by INT_1:def 2; let i2; redefine func i1+i2 -> Element of INT; coherence by INT_1:def 2; redefine func i1-i2 -> Element of INT; coherence by INT_1:def 2; redefine func i1*i2 -> Element of INT; coherence by INT_1:def 2; end; reserve n1,n2 for Nat; definition let n1,n2; redefine func n1+n2 -> Element of NAT; coherence by ORDINAL1:def 12; redefine func n1*n2 -> Element of NAT; coherence by ORDINAL1:def 12; end; definition func compcomplex -> UnOp of COMPLEX means for c holds it.c = -c; existence from CLambdaD; uniqueness from CFuncDefUniq; func invcomplex -> UnOp of COMPLEX means for c holds it.c = c"; existence from CLambdaD; uniqueness from CFuncDefUniq; func addcomplex -> BinOp of COMPLEX means :Def3: for c1,c2 holds it.(c1,c2) = c1 + c2; existence from CLambda2D; uniqueness from CBinOpDefuniq; func diffcomplex -> BinOp of COMPLEX means for c1,c2 holds it.(c1,c2) = c1 - c2; existence from CLambda2D; uniqueness from CBinOpDefuniq; func multcomplex -> BinOp of COMPLEX means :Def5: for c1,c2 holds it.(c1,c2) = c1 * c2; existence from CLambda2D; uniqueness from CBinOpDefuniq; func divcomplex -> BinOp of COMPLEX means for c1,c2 holds it.(c1,c2) = c1 / c2; existence from CLambda2D; uniqueness from CBinOpDefuniq; end; definition func compreal -> UnOp of REAL means for r holds it.r = -r; existence from RLambdaD; uniqueness from RFuncDefUniq; func invreal -> UnOp of REAL means for r holds it.r = r"; existence from RLambdaD; uniqueness from RFuncDefUniq; func addreal -> BinOp of REAL means :Def9: for r1,r2 holds it.(r1,r2) = r1 + r2; existence from RLambda2D; uniqueness from RBinOpDefuniq; func diffreal -> BinOp of REAL means for r1,r2 holds it.(r1,r2) = r1 - r2; existence from RLambda2D; uniqueness from RBinOpDefuniq; func multreal -> BinOp of REAL means :Def11: for r1,r2 holds it.(r1,r2) = r1 * r2; existence from RLambda2D; uniqueness from RBinOpDefuniq; func divreal -> BinOp of REAL means for r1,r2 holds it.(r1,r2) = r1 / r2; existence from RLambda2D; uniqueness from RBinOpDefuniq; end; definition func comprat -> UnOp of RAT means for w holds it.w = -w; existence from WLambdaD; uniqueness from WFuncDefUniq; func invrat -> UnOp of RAT means for w holds it.w = w"; existence from WLambdaD; uniqueness from WFuncDefUniq; func addrat -> BinOp of RAT means :Def15: for w1,w2 holds it.(w1,w2) = w1 + w2; existence from WLambda2D; uniqueness from WBinOpDefuniq; func diffrat -> BinOp of RAT means for w1,w2 holds it.(w1,w2) = w1 - w2; existence from WLambda2D; uniqueness from WBinOpDefuniq; func multrat -> BinOp of RAT means :Def17: for w1,w2 holds it.(w1,w2) = w1 * w2; existence from WLambda2D; uniqueness from WBinOpDefuniq; func divrat -> BinOp of RAT means for w1,w2 holds it.(w1,w2) = w1 / w2; existence from WLambda2D; uniqueness from WBinOpDefuniq; end; definition func compint -> UnOp of INT means for i holds it.i = -i; existence from ILambdaD; uniqueness from IFuncDefUniq; func addint -> BinOp of INT means :Def20: for i1,i2 holds it.(i1,i2) = i1 + i2; existence from ILambda2D; uniqueness from IBinOpDefuniq; func diffint -> BinOp of INT means for i1,i2 holds it.(i1,i2) = i1 - i2; existence from ILambda2D; uniqueness from IBinOpDefuniq; func multint -> BinOp of INT means :Def22: for i1,i2 holds it.(i1,i2) = i1 * i2; existence from ILambda2D; uniqueness from IBinOpDefuniq; end; definition func addnat -> BinOp of NAT means :Def23: for n1,n2 holds it.(n1,n2) = n1 + n2; existence from NLambda2D; uniqueness from NBinOpDefuniq; func multnat -> BinOp of NAT means :Def24: for n1,n2 holds it.(n1,n2) = n1 * n2; existence from NLambda2D; uniqueness from NBinOpDefuniq; end; registration cluster addcomplex -> commutative associative; coherence proof thus addcomplex is commutative proof let c1,c2 be Element of COMPLEX; thus addcomplex.(c1,c2) = c1 + c2 by Def3 .= addcomplex.(c2,c1) by Def3; end; let c1,c2,c3 be Element of COMPLEX; thus addcomplex.(c1,addcomplex.(c2,c3)) = c1 + addcomplex.(c2,c3) by Def3 .= c1 + (c2 + c3) by Def3 .= c1 + c2 + c3 .= addcomplex.(c1,c2) + c3 by Def3 .= addcomplex.(addcomplex.(c1,c2),c3) by Def3; end; cluster multcomplex -> commutative associative; coherence proof thus multcomplex is commutative proof let c1,c2 be Element of COMPLEX; thus multcomplex.(c1,c2) = c1 * c2 by Def5 .= multcomplex.(c2,c1) by Def5; end; let c1,c2,c3 be Element of COMPLEX; thus multcomplex.(c1,multcomplex.(c2,c3)) = c1 * multcomplex.(c2,c3) by Def5 .= c1 * (c2 * c3) by Def5 .= c1 * c2 * c3 .= multcomplex.(c1,c2) * c3 by Def5 .= multcomplex.(multcomplex.(c1,c2),c3) by Def5; end; cluster addreal -> commutative associative; coherence proof thus addreal is commutative proof let r1,r2 be Element of REAL; thus addreal.(r1,r2) = r1 + r2 by Def9 .= addreal.(r2,r1) by Def9; end; let r1,r2,r3 be Element of REAL; thus addreal.(r1,addreal.(r2,r3)) = r1 + addreal.(r2,r3) by Def9 .= r1 + (r2 + r3) by Def9 .= r1 + r2 + r3 .= addreal.(r1,r2) + r3 by Def9 .= addreal.(addreal.(r1,r2),r3) by Def9; end; cluster multreal -> commutative associative; coherence proof thus multreal is commutative proof let r1,r2 be Element of REAL; thus multreal.(r1,r2) = r1 * r2 by Def11 .= multreal.(r2,r1) by Def11; end; let r1,r2,r3 be Element of REAL; thus multreal.(r1,multreal.(r2,r3)) = r1 * multreal.(r2,r3) by Def11 .= r1 * (r2 * r3) by Def11 .= r1 * r2 * r3 .= multreal.(r1,r2) * r3 by Def11 .= multreal.(multreal.(r1,r2),r3) by Def11; end; cluster addrat -> commutative associative; coherence proof thus addrat is commutative proof let w1,w2 be Element of RAT; thus addrat.(w1,w2) = w1 + w2 by Def15 .= addrat.(w2,w1) by Def15; end; let w1,w2,w3 be Element of RAT; thus addrat.(w1,addrat.(w2,w3)) = w1 + addrat.(w2,w3) by Def15 .= w1 + (w2 + w3) by Def15 .= w1 + w2 + w3 .= addrat.(w1,w2) + w3 by Def15 .= addrat.(addrat.(w1,w2),w3) by Def15; end; cluster multrat -> commutative associative; coherence proof thus multrat is commutative proof let w1,w2 be Element of RAT; thus multrat.(w1,w2) = w1 * w2 by Def17 .= multrat.(w2,w1) by Def17; end; let w1,w2,w3 be Element of RAT; thus multrat.(w1,multrat.(w2,w3)) = w1 * multrat.(w2,w3) by Def17 .= w1 * (w2 * w3) by Def17 .= w1 * w2 * w3 .= multrat.(w1,w2) * w3 by Def17 .= multrat.(multrat.(w1,w2),w3) by Def17; end; cluster addint -> commutative associative; coherence proof thus addint is commutative proof let i1,i2 be Element of INT; thus addint.(i1,i2) = i1 + i2 by Def20 .= addint.(i2,i1) by Def20; end; let i1,i2,i3 be Element of INT; thus addint.(i1,addint.(i2,i3)) = i1 + addint.(i2,i3) by Def20 .= i1 + (i2 + i3) by Def20 .= i1 + i2 + i3 .= addint.(i1,i2) + i3 by Def20 .= addint.(addint.(i1,i2),i3) by Def20; end; cluster multint -> commutative associative; coherence proof thus multint is commutative proof let i1,i2 be Element of INT; thus multint.(i1,i2) = i1 * i2 by Def22 .= multint.(i2,i1) by Def22; end; let i1,i2,i3 be Element of INT; thus multint.(i1,multint.(i2,i3)) = i1 * multint.(i2,i3) by Def22 .= i1 * (i2 * i3) by Def22 .= i1 * i2 * i3 .= multint.(i1,i2) * i3 by Def22 .= multint.(multint.(i1,i2),i3) by Def22; end; cluster addnat -> commutative associative; coherence proof thus addnat is commutative proof let n1,n2 be Element of NAT; thus addnat.(n1,n2) = n1 + n2 by Def23 .= addnat.(n2,n1) by Def23; end; let n1,n2,n3 be Element of NAT; thus addnat.(n1,addnat.(n2,n3)) = n1 + addnat.(n2,n3) by Def23 .= n1 + (n2 + n3) by Def23 .= n1 + n2 + n3 .= addnat.(n1,n2) + n3 by Def23 .= addnat.(addnat.(n1,n2),n3) by Def23; end; cluster multnat -> commutative associative; coherence proof thus multnat is commutative proof let n1,n2 be Element of NAT; thus multnat.(n1,n2) = n1 * n2 by Def24 .= multnat.(n2,n1) by Def24; end; let n1,n2,n3 be Element of NAT; thus multnat.(n1,multnat.(n2,n3)) = n1 * multnat.(n2,n3) by Def24 .= n1 * (n2 * n3) by Def24 .= n1 * n2 * n3 .= multnat.(n1,n2) * n3 by Def24 .= multnat.(multnat.(n1,n2),n3) by Def24; end; end; Lm1: 0 in NAT; then reconsider z = 0 as Element of COMPLEX by NUMBERS:20; Lm2: z is_a_unity_wrt addcomplex proof thus for c being Element of COMPLEX holds addcomplex.(z,c) = c proof let c be Element of COMPLEX; thus addcomplex.(z,c) = 0 + c by Def3 .= c; end; let c be Element of COMPLEX; thus addcomplex.(c,z) = c + 0 by Def3 .= c; end; Lm3: 0 is_a_unity_wrt addreal proof thus for r being Element of REAL holds addreal.(0,r) = r proof let r be Element of REAL; thus addreal.(0,r) = 0 + r by Def9 .= r; end; let r be Element of REAL; thus addreal.(r,0) = r + 0 by Def9 .= r; end; reconsider z = 0 as Element of RAT by Lm1,NUMBERS:18; Lm4: z is_a_unity_wrt addrat proof thus for w being Element of RAT holds addrat.(z,w) = w proof let w be Element of RAT; thus addrat.(z,w) = 0 + w by Def15 .= w; end; let w be Element of RAT; thus addrat.(w,z) = w + 0 by Def15 .= w; end; reconsider z = 0 as Element of INT by Lm1,NUMBERS:17; Lm5: z is_a_unity_wrt addint proof thus for i being Element of INT holds addint.(z,i) = i proof let i be Element of INT; thus addint.(z,i) = 0 + i by Def20 .= i; end; let i be Element of INT; thus addint.(i,z) = i + 0 by Def20 .= i; end; Lm6: 0 is_a_unity_wrt addnat proof thus for n being Element of NAT holds addnat.(0,n) = n proof let n be Element of NAT; thus addnat.(0,n) = 0 + n by Def23 .= n; end; let n be Element of NAT; thus addnat.(n,0) = n + 0 by Def23 .= n; end; Lm7: 1 in NAT; then reconsider z = 1 as Element of COMPLEX by NUMBERS:20; Lm8: z is_a_unity_wrt multcomplex proof thus for c being Element of COMPLEX holds multcomplex.(z,c) = c proof let c be Element of COMPLEX; thus multcomplex.(z,c) = 1 * c by Def5 .= c; end; let c be Element of COMPLEX; thus multcomplex.(c,z) = c * 1 by Def5 .= c; end; Lm9: 1 is_a_unity_wrt multreal proof thus for r being Element of REAL holds multreal.(1,r) = r proof let r be Element of REAL; thus multreal.(1,r) = 1 * r by Def11 .= r; end; let r be Element of REAL; thus multreal.(r,1) = r * 1 by Def11 .= r; end; reconsider z = 1 as Element of RAT by Lm7,NUMBERS:18; Lm10: z is_a_unity_wrt multrat proof thus for w being Element of RAT holds multrat.(z,w) = w proof let w be Element of RAT; thus multrat.(z,w) = 1 * w by Def17 .= w; end; let w be Element of RAT; thus multrat.(w,z) = w * 1 by Def17 .= w; end; reconsider z = 1 as Element of INT by Lm7,NUMBERS:17; Lm11: z is_a_unity_wrt multint proof thus for i being Element of INT holds multint.(z,i) = i proof let i be Element of INT; thus multint.(z,i) = 1 * i by Def22 .= i; end; let i be Element of INT; thus multint.(i,z) = i * 1 by Def22 .= i; end; Lm12: 1 is_a_unity_wrt multnat proof thus for n being Element of NAT holds multnat.(1,n) = n proof let n be Element of NAT; thus multnat.(1,n) = 1 * n by Def24 .= n; end; let n be Element of NAT; thus multnat.(n,1) = n * 1 by Def24 .= n; end; registration cluster addcomplex -> having_a_unity; coherence by Lm2,SETWISEO:def 2; cluster addreal -> having_a_unity; coherence by Lm3,SETWISEO:def 2; cluster addrat -> having_a_unity; coherence by Lm4,SETWISEO:def 2; cluster addint -> having_a_unity; coherence by Lm5,SETWISEO:def 2; cluster addnat -> having_a_unity; coherence by Lm6,SETWISEO:def 2; cluster multcomplex -> having_a_unity; coherence by Lm8,SETWISEO:def 2; cluster multreal -> having_a_unity; coherence by Lm9,SETWISEO:def 2; cluster multrat -> having_a_unity; coherence by Lm10,SETWISEO:def 2; cluster multint -> having_a_unity; coherence by Lm11,SETWISEO:def 2; cluster multnat -> having_a_unity; coherence by Lm12,SETWISEO:def 2; end; theorem the_unity_wrt addcomplex = 0 by Lm2,BINOP_1:def 8; theorem the_unity_wrt addreal = 0 by Lm3,BINOP_1:def 8; theorem the_unity_wrt addrat = 0 by Lm4,BINOP_1:def 8; theorem the_unity_wrt addint = 0 by Lm5,BINOP_1:def 8; theorem the_unity_wrt addnat = 0 by Lm6,BINOP_1:def 8; theorem the_unity_wrt multcomplex = 1 by Lm8,BINOP_1:def 8; theorem the_unity_wrt multreal = 1 by Lm9,BINOP_1:def 8; theorem the_unity_wrt multrat = 1 by Lm10,BINOP_1:def 8; theorem the_unity_wrt multint = 1 by Lm11,BINOP_1:def 8; theorem the_unity_wrt multnat = 1 by Lm12,BINOP_1:def 8; begin reserve x for set, p,q,r,s,t,u for ext-real number, a for Element of ExtREAL; scheme Conti { P,Q[set] }: ex s st (for r st P[r] holds r <= s) & for r st Q[r] holds s <= r provided A1: for r,s st P[r] & Q[s] holds r <= s proof set A = { a : P[a]}, B = { a : Q[a]}; reconsider X = A /\ REAL, Y = B /\ REAL as Subset of REAL by XBOOLE_1:17; per cases; suppose A2: X = {}; per cases; suppose A3: +infty in A; take +infty; thus for r st P[r] holds r <= +infty by XXREAL_0:3; ex a st a = +infty & P[a] by A3; hence thesis by A1; end; suppose A4: not +infty in A; take -infty; thus for r st P[r] holds r <= -infty proof let r such that A5: P[r]; r in ExtREAL by XXREAL_0:def 1; then A6: r in A by A5; per cases by A4,A6,XXREAL_0:14; suppose r = -infty; hence thesis; end; suppose r in REAL; hence thesis by A2,A6,XBOOLE_0:def 4; end; end; thus thesis by XXREAL_0:5; end; end; suppose A7: Y = {}; per cases; suppose A8: -infty in B; take -infty; ex a st a = -infty & Q[a] by A8; hence for r st P[r] holds r <= -infty by A1; thus thesis by XXREAL_0:5; end; suppose A9: not -infty in B; take +infty; thus for r st P[r] holds r <= +infty by XXREAL_0:3; let r such that A10: Q[r]; r in ExtREAL by XXREAL_0:def 1; then A11: r in B by A10; per cases by A9,A11,XXREAL_0:14; suppose r = +infty; hence thesis; end; suppose r in REAL; hence thesis by A7,A11,XBOOLE_0:def 4; end; end; end; suppose that A12: X <> {} and A13: Y <> {}; for x,y being real number st x in X & y in Y holds x <= y proof let x,y be real number; assume x in X; then x in A by XBOOLE_0:def 4; then A14: ex a st ( a = x)&( P[a]); assume y in Y; then y in B by XBOOLE_0:def 4; then ex a st a = y & Q[a]; hence thesis by A1,A14; end; then consider s being real number such that A15: for x,y being real number st x in X & y in Y holds x <= s & s <= y by AXIOMS:1; reconsider s as ext-real number; take s; thus for r st P[r] holds r <= s proof let r; consider x being Element of REAL such that A16: x in Y by A13,SUBSET_1:4; x in B by A16,XBOOLE_0:def 4; then A17: ex a st x = a & Q[a]; assume A18: P[r]; per cases by A1,A17,A18,XXREAL_0:13; suppose A19: r in REAL; then reconsider r as real number; r is Element of ExtREAL by XXREAL_0:def 1; then r in A by A18; then r in X by A19,XBOOLE_0:def 4; hence thesis by A15,A16; end; suppose r = -infty; hence thesis by XXREAL_0:5; end; end; let r; consider x being Element of REAL such that A20: x in X by A12,SUBSET_1:4; x in A by A20,XBOOLE_0:def 4; then A21: ex a st x = a & P[a]; assume A22: Q[r]; per cases by A1,A21,A22,XXREAL_0:10; suppose A23: r in REAL; then reconsider r as real number; r is Element of ExtREAL by XXREAL_0:def 1; then r in B by A22; then r in Y by A23,XBOOLE_0:def 4; hence thesis by A15,A20; end; suppose r = +infty; hence thesis by XXREAL_0:3; end; end; end; begin definition let r,s; func [.r,s.] equals { a : r <= a & a <= s }; correctness; func [.r,s.[ equals { a : r <= a & a < s }; correctness; func ].r,s.] equals { a : r < a & a <= s }; correctness; func ].r,s.[ equals { a : r < a & a < s }; correctness; end; theorem Th1: t in [.r,s.] iff r <= t & t <= s proof hereby assume t in [.r,s.]; then ex a st a = t & r <= a & a <= s; hence r <= t & t <= s; end; t is Element of ExtREAL by XXREAL_0:def 1; hence thesis; end; theorem Th2: t in ].r,s.] iff r < t & t <= s proof hereby assume t in ].r,s.]; then ex a st a = t & r < a & a <= s; hence r < t & t <= s; end; t is Element of ExtREAL by XXREAL_0:def 1; hence thesis; end; theorem Th3: t in [.r,s.[ iff r <= t & t < s proof hereby assume t in [.r,s.[; then ex a st a = t & r <= a & a < s; hence r <= t & t < s; end; t is Element of ExtREAL by XXREAL_0:def 1; hence thesis; end; theorem Th4: t in ].r,s.[ iff r < t & t < s proof hereby assume t in ].r,s.[; then ex a st a = t & r < a & a < s; hence r < t & t < s; end; t is Element of ExtREAL by XXREAL_0:def 1; hence thesis; end; registration let r,s; cluster [.r,s.] -> ext-real-membered; coherence proof let x; assume x in [.r,s.]; then ex a st x = a & r <= a & a <= s; hence thesis; end; cluster [.r,s.[ -> ext-real-membered; coherence proof let x; assume x in [.r,s.[; then ex a st x = a & r <= a & a < s; hence thesis; end; cluster ].r,s.] -> ext-real-membered; coherence proof let x; assume x in ].r,s.]; then ex a st x = a & r < a & a <= s; hence thesis; end; cluster ].r,s.[ -> ext-real-membered; coherence proof let x; assume x in ].r,s.[; then ex a st x = a & r < a & a < s; hence thesis; end; end; theorem Th5: x in [.p,q.] implies x in ].p,q.[ or x = p or x = q proof assume A1: x in [. p, q .]; then reconsider s = x as ext-real number; A2: p <= s by A1,Th1; A3: s <= q by A1,Th1; A4: p = s or p < s by A2,XXREAL_0:1; s = q or s < q by A3,XXREAL_0:1; hence thesis by A4,Th4; end; theorem Th6: x in [.p,q.] implies x in ].p,q.] or x = p proof assume A1: x in [.p,q.]; then reconsider s = x as ext-real number; A2: p <= s by A1,Th1; A3: s <= q by A1,Th1; p = s or p < s by A2,XXREAL_0:1; hence thesis by A3,Th2; end; theorem Th7: x in [.p,q.] implies x in [.p,q.[ or x = q proof assume A1: x in [.p,q.]; then reconsider s = x as ext-real number; A2: p <= s by A1,Th1; s <= q by A1,Th1; then q = s or s < q by XXREAL_0:1; hence thesis by A2,Th3; end; theorem Th8: x in [.p,q.[ implies x in ].p,q.[ or x = p proof assume A1: x in [.p,q.[; then reconsider s = x as ext-real number; A2: p <= s by A1,Th3; A3: s < q by A1,Th3; p = s or p < s by A2,XXREAL_0:1; hence thesis by A3,Th4; end; theorem Th9: x in ].p,q.] implies x in ].p,q.[ or x = q proof assume A1: x in ].p,q.]; then reconsider s = x as ext-real number; A2: p < s by A1,Th2; s <= q by A1,Th2; then q = s or s < q by XXREAL_0:1; hence thesis by A2,Th4; end; theorem x in [.p,q.[ implies x in ].p,q.] & x <> q or x = p proof assume A1: x in [.p,q.[; then reconsider s = x as ext-real number; A2: p <= s by A1,Th3; A3: s < q by A1,Th3; p = s or p < s by A2,XXREAL_0:1; hence thesis by A3,Th2; end; theorem x in ].p,q.] implies x in [.p,q.[ & x <> p or x = q proof assume A1: x in ].p,q.]; then reconsider s = x as ext-real number; A2: p < s by A1,Th2; s <= q by A1,Th2; then q = s or s < q by XXREAL_0:1; hence thesis by A2,Th3; end; theorem Th12: x in ].p,q.] implies x in [.p,q.] & x <> p proof assume A1: x in ].p,q.]; then reconsider s = x as ext-real number; A2: p < s by A1,Th2; s <= q by A1,Th2; hence thesis by A2,Th1; end; theorem Th13: x in [.p,q.[ implies x in [.p,q.] & x <> q proof assume A1: x in [.p,q.[; then reconsider s = x as ext-real number; A2: p <= s by A1,Th3; s < q by A1,Th3; hence thesis by A2,Th1; end; theorem Th14: x in ].p,q.[ implies x in [.p,q.[ & x <> p proof assume A1: x in ].p,q.[; then reconsider s = x as ext-real number; A2: p < s by A1,Th4; s < q by A1,Th4; hence thesis by A2,Th3; end; theorem Th15: x in ].p,q.[ implies x in ].p,q.] & x <> q proof assume A1: x in ].p,q.[; then reconsider s = x as ext-real number; A2: p < s by A1,Th4; s < q by A1,Th4; hence thesis by A2,Th2; end; theorem Th16: x in ].p,q.[ implies x in [.p,q.] & x <> p & x <> q proof assume A1: x in ].p,q.[; then x in ].p,q.] by Th15; hence thesis by A1,Th12,Th15; end; theorem Th17: [.r,r.] = {r} proof let s; thus s in [.r,r.] implies s in {r} proof assume s in [.r,r.]; then ex a st s = a & r <= a & a <= r; then s = r by XXREAL_0:1; hence thesis by TARSKI:def 1; end; assume s in {r}; then A1: s = r by TARSKI:def 1; reconsider s as Element of ExtREAL by XXREAL_0:def 1; s <= s; hence thesis by A1; end; theorem Th18: [.r,r.[ = {} proof let p; not ex p st p in [.r,r.[ proof given p such that A1: p in [.r,r.[; ex a st p = a & r <= a & a < r by A1; hence thesis; end; hence thesis; end; theorem Th19: ].r,r.] = {} proof let p; thus p in ].r,r.] implies p in {} proof assume p in ].r,r.]; then ex a st p = a & r < a & a <= r; hence thesis; end; thus thesis; end; theorem Th20: ].r,r.[ = {} proof let p; thus p in ].r,r.[ implies p in {} proof assume p in ].r,r.[; then ex a st p = a & r < a & a < r; hence thesis; end; thus thesis; end; registration let r; cluster [.r,r.] -> non empty; coherence proof [.r,r.] = {r} by Th17; hence thesis; end; cluster [.r,r.[ -> empty; coherence by Th18; cluster ].r,r.] -> empty; coherence by Th19; cluster ].r,r.[ -> empty; coherence by Th20; end; theorem Th21: ].p,q.[ c= ].p,q.] proof let s; assume A1: s in ].p,q.[; then A2: p < s by Th4; s < q by A1,Th4; hence thesis by A2,Th2; end; theorem Th22: ].p,q.[ c= [.p,q.[ proof let s; assume A1: s in ].p,q.[; then A2: p < s by Th4; s < q by A1,Th4; hence thesis by A2,Th3; end; theorem Th23: ].p,q.] c= [.p,q.] proof let s; assume A1: s in ].p,q.]; then A2: p < s by Th2; s <= q by A1,Th2; hence thesis by A2,Th1; end; theorem Th24: [.p,q.[ c= [.p,q.] proof let s; assume A1: s in [.p,q.[; then A2: p <= s by Th3; s < q by A1,Th3; hence thesis by A2,Th1; end; theorem Th25: ].p,q.[ c= [.p,q.] proof A1: ].p,q.[ c= [.p,q.[ by Th22; [.p,q.[ c= [.p,q.] by Th24; hence thesis by A1,XBOOLE_1:1; end; theorem p <= q implies ].q,p.] = {} proof assume A1: p <= q; assume ].q,p.] <> {}; then consider r such that A2: r in ].q,p.] by MEMBERED:8; A3: q < r by A2,Th2; r <= p by A2,Th2; hence contradiction by A1,A3,XXREAL_0:2; end; theorem Th27: p <= q implies [.q,p.[ = {} proof assume A1: p <= q; assume [.q,p.[ <> {}; then consider r such that A2: r in [.q,p.[ by MEMBERED:8; A3: q <= r by A2,Th3; r < p by A2,Th3; hence contradiction by A1,A3,XXREAL_0:2; end; theorem Th28: p <= q implies ].q,p.[ = {} proof assume p <= q; then [.q,p.[ = {} by Th27; hence thesis by Th22,XBOOLE_1:3; end; theorem Th29: p < q implies [.q,p.] = {} proof assume A1: p < q; assume [.q,p.] <> {}; then consider r such that A2: r in [.q,p.] by MEMBERED:8; A3: q <= r by A2,Th1; r <= p by A2,Th1; hence contradiction by A1,A3,XXREAL_0:2; end; theorem r <= s implies [.r,s.] is non empty by Th1; theorem p < q implies [.p,q.[ is non empty by Th3; theorem p < q implies ].p,q.] is non empty by Th2; theorem p < q implies ].p,q.[ is non empty proof assume p < q; then ex s st p < s & s < q by XREAL_1:227; hence thesis by Th4; end; theorem Th34: p <= r & s <= q implies [.r,s.] c= [.p,q.] proof assume that A1: p <= r and A2: s <= q; let t; assume A3: t in [.r,s.]; then A4: r <= t by Th1; A5: t <= s by A3,Th1; A6: p <= t by A1,A4,XXREAL_0:2; t <= q by A2,A5,XXREAL_0:2; hence thesis by A6,Th1; end; theorem Th35: p <= r & s <= q implies [.r,s.[ c= [.p,q.] proof A1: [.r,s.[ c= [.r,s.] by Th24; assume that A2: p <= r and A3: s <= q; [.r,s.] c= [.p,q.] by A2,A3,Th34; hence thesis by A1,XBOOLE_1:1; end; theorem Th36: p <= r & s <= q implies ].r,s.] c= [.p,q.] proof A1: ].r,s.] c= [.r,s.] by Th23; assume that A2: p <= r and A3: s <= q; [.r,s.] c= [.p,q.] by A2,A3,Th34; hence thesis by A1,XBOOLE_1:1; end; theorem Th37: p <= r & s <= q implies ].r,s.[ c= [.p,q.] proof A1: ].r,s.[ c= [.r,s.] by Th25; assume that A2: p <= r and A3: s <= q; [.r,s.] c= [.p,q.] by A2,A3,Th34; hence thesis by A1,XBOOLE_1:1; end; theorem Th38: p <= r & s <= q implies [.r,s.[ c= [.p,q.[ proof assume that A1: p <= r and A2: s <= q; let t; assume A3: t in [.r,s.[; then A4: r <= t by Th3; A5: t < s by A3,Th3; A6: p <= t by A1,A4,XXREAL_0:2; t < q by A2,A5,XXREAL_0:2; hence thesis by A6,Th3; end; theorem Th39: p < r & s <= q implies [.r,s.] c= ].p,q.] proof assume that A1: p < r and A2: s <= q; let t; assume A3: t in [.r,s.]; then A4: r <= t by Th1; A5: t <= s by A3,Th1; A6: p ].p,q.] proof assume that A1: r <= s and A2: [.r,s.] = ].p,q.]; now assume r in ].p,q.]; then A3: p < r by Th2; s <= q by A1,A2,Th58; then r <= q by A1,XXREAL_0:2; then p < q by A3,XXREAL_0:2; hence contradiction by A2,A3,Th53; end; hence contradiction by A1,A2,Th1; end; theorem r <= s implies [.r,s.] <> [.p,q.[ proof assume that A1: r <= s and A2: [.r,s.] = [.p,q.[; now assume s in [.p,q.[; then A3: s < q by Th3; p <= r by A1,A2,Th54; then p <= s by A1,XXREAL_0:2; then p < q by A3,XXREAL_0:2; hence contradiction by A2,A3,Th52; end; hence contradiction by A1,A2,Th1; end; theorem r <= s implies [.r,s.] <> ].p,q.[ proof assume that A1: r <= s and A2: [.r,s.] = ].p,q.[; now assume s in ].p,q.[; then A3: s < q by Th4; p <= r by A1,A2,Th62; then p <= s by A1,XXREAL_0:2; then p < q by A3,XXREAL_0:2; hence contradiction by A2,A3,Th51; end; hence contradiction by A1,A2,Th1; end; theorem r < s implies [.r,s.[ <> [.p,q.] proof assume that A1: r < s and A2: [.r,s.[ = [.p,q.]; A3: not s in [.r,s.[ by Th3; p <= r by A1,A2,Th52; then A4: p <= s by A1,XXREAL_0:2; s <= q by A1,A2,Th52; hence contradiction by A2,A3,A4,Th1; end; theorem r < s implies [.r,s.[ <> ].p,q.] proof assume that A1: r < s and A2: [.r,s.[ = ].p,q.]; A3: not s in [.r,s.[ by Th3; p <= r by A1,A2,Th60; then A4: p < s by A1,XXREAL_0:2; s <= q by A1,A2,Th60; hence contradiction by A2,A3,A4,Th2; end; theorem r < s implies [.r,s.[ <> ].p,q.[ proof assume that A1: r < s and A2: [.r,s.[ = ].p,q.[; now assume r in ].p,q.[; then A3: p < r by Th4; s <= q by A1,A2,Th64; then r < q by A1,XXREAL_0:2; then p < q by A3,XXREAL_0:2; hence contradiction by A2,A3,Th56; end; hence contradiction by A1,A2,Th3; end; theorem r < s implies ].r,s.] <> [.p,q.] proof assume that A1: r < s and A2: ].r,s.] = [.p,q.]; A3: not r in ].r,s.] by Th2; A4: p <= r by A1,A2,Th53; s <= q by A1,A2,Th53; then r <= q by A1,XXREAL_0:2; hence contradiction by A2,A3,A4,Th1; end; theorem r < s implies ].r,s.] <> [.p,q.[ proof assume that A1: r < s and A2: ].r,s.] = [.p,q.[; A3: not r in ].r,s.] by Th2; A4: p <= r by A1,A2,Th57; s <= q by A1,A2,Th57; then r < q by A1,XXREAL_0:2; hence contradiction by A2,A3,A4,Th3; end; theorem r < s implies ].r,s.] <> ].p,q.[ proof assume that A1: r < s and A2: ].r,s.] = ].p,q.[; now assume s in ].p,q.[; then A3: s < q by Th4; p <= r by A1,A2,Th65; then p <= s by A1,XXREAL_0:2; then p < q by A3,XXREAL_0:2; hence contradiction by A2,A3,Th59; end; hence contradiction by A1,A2,Th2; end; theorem r < s implies ].r,s.[ <> [.p,q.] proof assume that A1: r < s and A2: ].r,s.[ = [.p,q.]; A3: not r in ].r,s.[ by Th4; A4: p <= r by A1,A2,Th51; s <= q by A1,A2,Th51; then r <= q by A1,XXREAL_0:2; hence contradiction by A2,A3,A4,Th1; end; theorem r < s implies ].r,s.[ <> ].p,q.] proof assume that A1: r < s and A2: ].r,s.[ = ].p,q.]; A3: not s in ].r,s.[ by Th4; p <= r by A1,A2,Th59; then A4: p < s by A1,XXREAL_0:2; s <= q by A1,A2,Th59; hence contradiction by A2,A3,A4,Th2; end; theorem r < s implies ].r,s.[ <> [.p,q.[ proof assume that A1: r < s and A2: ].r,s.[ = [.p,q.[; A3: not r in ].r,s.[ by Th4; A4: p <= r by A1,A2,Th56; s <= q by A1,A2,Th56; then r < q by A1,XXREAL_0:2; hence contradiction by A2,A3,A4,Th3; end; theorem r <= s & [.r,s.] c< [.p,q.] implies p < r or s < q proof assume A1: r <= s; assume A2: [.r,s.] c< [.p,q.]; then A3: [.r,s.] c= [.p,q.] by XBOOLE_0:def 8; then A4: p <= r by A1,Th50; A5: s <= q by A1,A3,Th50; p <> r or s <> q by A2; hence thesis by A4,A5,XXREAL_0:1; end; theorem r < s & ].r,s.[ c= [.p,q.] implies [.r,s.] c= [.p,q.] proof assume that A1: r < s and A2: ].r,s.[ c= [.p,q.]; let t; assume A3: t in [.r,s.]; per cases by A3,Th5; suppose t in ].r,s.[; hence thesis by A2; end; suppose A4: t = r; then A5: p <= t by A1,A2,Th51; s <= q by A1,A2,Th51; then t <= q by A1,A4,XXREAL_0:2; hence thesis by A5,Th1; end; suppose A6: t = s; A7: s <= q by A1,A2,Th51; p <= r by A1,A2,Th51; then p <= t by A1,A6,XXREAL_0:2; hence thesis by A6,A7,Th1; end; end; theorem r < s implies [.s,p.[ c= ].r,p.[ proof assume A1: r < s; let t; assume A2: t in [.s,p.[; then s <= t by Th3; then A3: r < t by A1,XXREAL_0:2; t < p by A2,Th3; hence thesis by A3,Th4; end; theorem Th85: s <= r implies [.r,s.] c= {r} & [.r,s.] c= {s} proof assume A1: s <= r; thus [.r,s.] c= {r} proof let t; assume A2: t in [.r,s.]; then A3: t <= s by Th1; A4: r <= t by A2,Th1; t <= r by A1,A3,XXREAL_0:2; then r = t by A4,XXREAL_0:1; hence thesis by TARSKI:def 1; end; let t; assume A5: t in [.r,s.]; then r <= t by Th1; then A6: s <= t by A1,XXREAL_0:2; t <= s by A5,Th1; then s = t by A6,XXREAL_0:1; hence thesis by TARSKI:def 1; end; theorem ].r,s.[ misses {r,s} proof let t; assume A1: t in ].r,s.[; then A2: r < t by Th4; t < s by A1,Th4; hence thesis by A2,TARSKI:def 2; end; theorem [.r,s.[ misses {s} proof let t; assume t in [.r,s.[; then t < s by Th3; hence thesis by TARSKI:def 1; end; theorem ].r,s.] misses {r} proof let t; assume t in ].r,s.]; then r < t by Th2; hence thesis by TARSKI:def 1; end; theorem s <= p implies [.r,s.] misses ].p,q.[ proof assume A1: s <= p; let t; assume t in [.r,s.]; then t <= s by Th1; then t <= p by A1,XXREAL_0:2; hence thesis by Th4; end; theorem s <= p implies [.r,s.] misses ].p,q.] proof assume A1: s <= p; let t; assume t in [.r,s.]; then t <= s by Th1; then t <= p by A1,XXREAL_0:2; hence thesis by Th2; end; theorem s <= p implies ].r,s.] misses ].p,q.[ proof assume A1: s <= p; let t; assume t in ].r,s.]; then t <= s by Th2; then t <= p by A1,XXREAL_0:2; hence thesis by Th4; end; theorem s <= p implies ].r,s.] misses ].p,q.] proof assume A1: s <= p; let t; assume t in ].r,s.]; then t <= s by Th2; then t <= p by A1,XXREAL_0:2; hence thesis by Th2; end; theorem s <= p implies ].r,s.[ misses [.p,q.] proof assume A1: s <= p; let t; assume t in ].r,s.[; then t < s by Th4; then t < p by A1,XXREAL_0:2; hence thesis by Th1; end; theorem s <= p implies ].r,s.[ misses [.p,q.[ proof assume A1: s <= p; let t; assume t in ].r,s.[; then t < s by Th4; then t < p by A1,XXREAL_0:2; hence thesis by Th3; end; theorem s <= p implies [.r,s.[ misses [.p,q.] proof assume A1: s <= p; let t; assume t in [.r,s.[; then t < s by Th3; then t < p by A1,XXREAL_0:2; hence thesis by Th1; end; theorem s <= p implies [.r,s.[ misses [.p,q.[ proof assume A1: s <= p; let t; assume t in [.r,s.[; then t < s by Th3; then t < p by A1,XXREAL_0:2; hence thesis by Th3; end; theorem r < p & r < s implies not ].r,s.[ c= [.p,q.] proof assume that A1: r < p and A2: r < s; per cases; suppose A3: s <= p; consider t such that A4: r < t and A5: t < s by A2,XREAL_1:227; take t; thus t in ].r,s.[ by A4,A5,Th4; t < p by A3,A5,XXREAL_0:2; hence thesis by Th1; end; suppose A6: p <= s; consider t such that A7: r < t and A8: t < p by A1,XREAL_1:227; take t; t < s by A6,A8,XXREAL_0:2; hence t in ].r,s.[ by A7,Th4; thus thesis by A8,Th1; end; end; theorem r < p & r < s implies not [.r,s.[ c= [.p,q.] proof assume that A1: r < p and A2: r < s; per cases; suppose A3: s <= p; consider t such that A4: r < t and A5: t < s by A2,XREAL_1:227; take t; thus t in [.r,s.[ by A4,A5,Th3; t < p by A3,A5,XXREAL_0:2; hence thesis by Th1; end; suppose A6: p <= s; consider t such that A7: r < t and A8: t < p by A1,XREAL_1:227; take t; t < s by A6,A8,XXREAL_0:2; hence t in [.r,s.[ by A7,Th3; thus thesis by A8,Th1; end; end; theorem r < p & r < s implies not ].r,s.] c= [.p,q.] proof assume that A1: r < p and A2: r < s; per cases; suppose A3: s <= p; consider t such that A4: r < t and A5: t < s by A2,XREAL_1:227; take t; thus t in ].r,s.] by A4,A5,Th2; t < p by A3,A5,XXREAL_0:2; hence thesis by Th1; end; suppose A6: p <= s; consider t such that A7: r < t and A8: t < p by A1,XREAL_1:227; take t; t < s by A6,A8,XXREAL_0:2; hence t in ].r,s.] by A7,Th2; thus thesis by A8,Th1; end; end; theorem r < p & r <= s implies not [.r,s.] c= [.p,q.] proof assume that A1: r < p and A2: r <= s; take t=r; thus t in [.r,s.] by A2,Th1; thus thesis by A1,Th1; end; theorem r < p & r < s implies not ].r,s.[ c= [.p,q.[ proof assume that A1: r < p and A2: r < s; per cases; suppose A3: s <= p; consider t such that A4: r < t and A5: t < s by A2,XREAL_1:227; take t; thus t in ].r,s.[ by A4,A5,Th4; t < p by A3,A5,XXREAL_0:2; hence thesis by Th3; end; suppose A6: p <= s; consider t such that A7: r < t and A8: t < p by A1,XREAL_1:227; take t; t < s by A6,A8,XXREAL_0:2; hence t in ].r,s.[ by A7,Th4; thus thesis by A8,Th3; end; end; theorem r < p & r < s implies not ].r,s.] c= [.p,q.[ proof assume that A1: r < p and A2: r < s; per cases; suppose A3: s <= p; consider t such that A4: r < t and A5: t < s by A2,XREAL_1:227; take t; thus t in ].r,s.] by A4,A5,Th2; t < p by A3,A5,XXREAL_0:2; hence thesis by Th3; end; suppose A6: p <= s; consider t such that A7: r < t and A8: t < p by A1,XREAL_1:227; take t; t < s by A6,A8,XXREAL_0:2; hence t in ].r,s.] by A7,Th2; thus thesis by A8,Th3; end; end; theorem r < p & r < s implies not [.r,s.[ c= [.p,q.[ proof assume that A1: r < p and A2: r < s; per cases; suppose A3: s <= p; consider t such that A4: r < t and A5: t < s by A2,XREAL_1:227; take t; thus t in [.r,s.[ by A4,A5,Th3; t < p by A3,A5,XXREAL_0:2; hence thesis by Th3; end; suppose A6: p <= s; consider t such that A7: r < t and A8: t < p by A1,XREAL_1:227; take t; t < s by A6,A8,XXREAL_0:2; hence t in [.r,s.[ by A7,Th3; thus thesis by A8,Th3; end; end; theorem r < p & r <= s implies not [.r,s.] c= [.p,q.[ proof assume that A1: r < p and A2: r <= s; take t=r; thus t in [.r,s.] by A2,Th1; thus thesis by A1,Th3; end; theorem r < p & r < s implies not ].r,s.[ c= ].p,q.] proof assume that A1: r < p and A2: r < s; per cases; suppose A3: s <= p; consider t such that A4: r < t and A5: t < s by A2,XREAL_1:227; take t; thus t in ].r,s.[ by A4,A5,Th4; t < p by A3,A5,XXREAL_0:2; hence thesis by Th2; end; suppose A6: p <= s; consider t such that A7: r < t and A8: t < p by A1,XREAL_1:227; take t; t < s by A6,A8,XXREAL_0:2; hence t in ].r,s.[ by A7,Th4; thus thesis by A8,Th2; end; end; theorem r <= p & r < s implies not [.r,s.[ c= ].p,q.] proof assume that A1: r <= p and A2: r < s; take t=r; thus t in [.r,s.[ by A2,Th3; thus thesis by A1,Th2; end; theorem r < p & r < s implies not ].r,s.] c= ].p,q.] proof assume that A1: r < p and A2: r < s; per cases; suppose A3: s <= p; consider t such that A4: r < t and A5: t < s by A2,XREAL_1:227; take t; thus t in ].r,s.] by A4,A5,Th2; t < p by A3,A5,XXREAL_0:2; hence thesis by Th2; end; suppose A6: p <= s; consider t such that A7: r < t and A8: t < p by A1,XREAL_1:227; take t; t <= s by A6,A8,XXREAL_0:2; hence t in ].r,s.] by A7,Th2; thus thesis by A8,Th2; end; end; theorem r <= p & r <= s implies not [.r,s.] c= ].p,q.] proof assume that A1: r <= p and A2: r <= s; take r; thus r in [.r,s.] by A2,Th1; thus thesis by A1,Th2; end; theorem r <= p & r <= s implies not [.r,s.] c= ].p,q.[ proof assume that A1: r <= p and A2: r <= s; take r; thus r in [.r,s.] by A2,Th1; thus thesis by A1,Th4; end; theorem r <= p & r < s implies not [.r,s.[ c= ].p,q.[ proof assume that A1: r <= p and A2: r < s; take r; thus r in [.r,s.[ by A2,Th3; thus thesis by A1,Th4; end; theorem r < p & r < s implies not ].r,s.] c= ].p,q.[ proof assume that A1: r < p and A2: r < s; per cases; suppose A3: s <= p; consider t such that A4: r < t and A5: t < s by A2,XREAL_1:227; take t; thus t in ].r,s.] by A4,A5,Th2; t < p by A3,A5,XXREAL_0:2; hence thesis by Th4; end; suppose A6: p <= s; consider t such that A7: r < t and A8: t < p by A1,XREAL_1:227; take t; t <= s by A6,A8,XXREAL_0:2; hence t in ].r,s.] by A7,Th2; thus thesis by A8,Th4; end; end; theorem r < p & r < s implies not ].r,s.[ c= ].p,q.[ proof assume that A1: r < p and A2: r < s; per cases; suppose A3: s <= p; consider t such that A4: r < t and A5: t < s by A2,XREAL_1:227; take t; thus t in ].r,s.[ by A4,A5,Th4; t < p by A3,A5,XXREAL_0:2; hence thesis by Th4; end; suppose A6: p <= s; consider t such that A7: r < t and A8: t < p by A1,XREAL_1:227; take t; t < s by A6,A8,XXREAL_0:2; hence t in ].r,s.[ by A7,Th4; thus thesis by A8,Th4; end; end; theorem q < s & r < s implies not ].r,s.[ c= [.p,q.] proof assume that A1: q < s and A2: r < s; per cases; suppose A3: r <= q; consider t such that A4: q < t and A5: t < s by A1,XREAL_1:227; take t; r < t by A3,A4,XXREAL_0:2; hence t in ].r,s.[ by A5,Th4; thus thesis by A4,Th1; end; suppose A6: q <= r; consider t such that A7: r < t and A8: t < s by A2,XREAL_1:227; take t; thus t in ].r,s.[ by A7,A8,Th4; q < t by A6,A7,XXREAL_0:2; hence thesis by Th1; end; end; theorem q < s & r < s implies not [.r,s.[ c= [.p,q.] proof assume that A1: q < s and A2: r < s; per cases; suppose A3: r <= q; consider t such that A4: q < t and A5: t < s by A1,XREAL_1:227; take t; r < t by A3,A4,XXREAL_0:2; hence t in [.r,s.[ by A5,Th3; thus thesis by A4,Th1; end; suppose A6: q <= r; consider t such that A7: r < t and A8: t < s by A2,XREAL_1:227; take t; thus t in [.r,s.[ by A7,A8,Th3; q < t by A6,A7,XXREAL_0:2; hence thesis by Th1; end; end; theorem q < s & r < s implies not ].r,s.] c= [.p,q.] proof assume that A1: q < s and A2: r < s; per cases; suppose A3: r <= q; consider t such that A4: q < t and A5: t < s by A1,XREAL_1:227; take t; r < t by A3,A4,XXREAL_0:2; hence t in ].r,s.] by A5,Th2; thus thesis by A4,Th1; end; suppose A6: q <= r; consider t such that A7: r < t and A8: t < s by A2,XREAL_1:227; take t; thus t in ].r,s.] by A7,A8,Th2; q < t by A6,A7,XXREAL_0:2; hence thesis by Th1; end; end; theorem q < s & r <= s implies not [.r,s.] c= [.p,q.] proof assume that A1: q < s and A2: r <= s; per cases; suppose A3: r <= q; consider t such that A4: q < t and A5: t < s by A1,XREAL_1:227; take t; r < t by A3,A4,XXREAL_0:2; hence t in [.r,s.] by A5,Th1; thus thesis by A4,Th1; end; suppose A6: q < r; take t=r; thus t in [.r,s.] by A2,Th1; thus thesis by A6,Th1; end; end; theorem q < s & r < s implies not ].r,s.[ c= [.p,q.[ proof assume that A1: q < s and A2: r < s; per cases; suppose A3: r <= q; consider t such that A4: q < t and A5: t < s by A1,XREAL_1:227; take t; r < t by A3,A4,XXREAL_0:2; hence t in ].r,s.[ by A5,Th4; thus thesis by A4,Th3; end; suppose A6: q < r; consider t such that A7: r < t and A8: t < s by A2,XREAL_1:227; take t; thus t in ].r,s.[ by A7,A8,Th4; q < t by A6,A7,XXREAL_0:2; hence thesis by Th3; end; end; theorem q <= s & r < s implies not ].r,s.] c= [.p,q.[ proof assume that A1: q <= s and A2: r < s; take t=s; thus t in ].r,s.] by A2,Th2; thus thesis by A1,Th3; end; theorem q < s & r < s implies not [.r,s.[ c= [.p,q.[ proof assume that A1: q < s and A2: r < s; per cases; suppose A3: r <= q; consider t such that A4: q < t and A5: t < s by A1,XREAL_1:227; take t; r < t by A3,A4,XXREAL_0:2; hence t in [.r,s.[ by A5,Th3; thus thesis by A4,Th3; end; suppose A6: q < r; consider t such that A7: r < t and A8: t < s by A2,XREAL_1:227; take t; thus t in [.r,s.[ by A7,A8,Th3; q < t by A6,A7,XXREAL_0:2; hence thesis by Th3; end; end; theorem q < s & r < s implies not ].r,s.[ c= ].p,q.] proof assume that A1: q < s and A2: r < s; per cases; suppose A3: r <= q; consider t such that A4: q < t and A5: t < s by A1,XREAL_1:227; take t; r < t by A3,A4,XXREAL_0:2; hence t in ].r,s.[ by A5,Th4; thus thesis by A4,Th2; end; suppose A6: q < r; consider t such that A7: r < t and A8: t < s by A2,XREAL_1:227; take t; thus t in ].r,s.[ by A7,A8,Th4; q < t by A6,A7,XXREAL_0:2; hence thesis by Th2; end; end; theorem q < s & r <= s implies not [.r,s.] c= ].p,q.] proof assume that A1: q < s and A2: r <= s; take t=s; thus t in [.r,s.] by A2,Th1; thus thesis by A1,Th2; end; theorem q < s & r < s implies not [.r,s.[ c= ].p,q.] proof assume that A1: q < s and A2: r < s; per cases; suppose A3: r <= q; consider t such that A4: q < t and A5: t < s by A1,XREAL_1:227; take t; r < t by A3,A4,XXREAL_0:2; hence t in [.r,s.[ by A5,Th3; thus thesis by A4,Th2; end; suppose A6: q < r; consider t such that A7: r < t and A8: t < s by A2,XREAL_1:227; take t; thus t in [.r,s.[ by A7,A8,Th3; q < t by A6,A7,XXREAL_0:2; hence thesis by Th2; end; end; theorem q < s & r < s implies not ].r,s.] c= ].p,q.] proof assume that A1: q < s and A2: r < s; per cases; suppose A3: r <= q; consider t such that A4: q < t and A5: t < s by A1,XREAL_1:227; take t; r < t by A3,A4,XXREAL_0:2; hence t in ].r,s.] by A5,Th2; thus thesis by A4,Th2; end; suppose A6: q < r; consider t such that A7: r < t and A8: t < s by A2,XREAL_1:227; take t; thus t in ].r,s.] by A7,A8,Th2; q < t by A6,A7,XXREAL_0:2; hence thesis by Th2; end; end; theorem q <= s & r <= s implies not [.r,s.] c= ].p,q.[ proof assume that A1: q <= s and A2: r <= s; take t=s; thus t in [.r,s.] by A2,Th1; thus thesis by A1,Th4; end; theorem q < s & r < s implies not [.r,s.[ c= ].p,q.[ proof assume that A1: q < s and A2: r < s; per cases; suppose A3: r <= q; consider t such that A4: q < t and A5: t < s by A1,XREAL_1:227; take t; r < t by A3,A4,XXREAL_0:2; hence t in [.r,s.[ by A5,Th3; thus thesis by A4,Th4; end; suppose A6: q < r; consider t such that A7: r < t and A8: t < s by A2,XREAL_1:227; take t; thus t in [.r,s.[ by A7,A8,Th3; q < t by A6,A7,XXREAL_0:2; hence thesis by Th4; end; end; theorem q <= s & r < s implies not ].r,s.] c= ].p,q.[ proof assume that A1: q <= s and A2: r < s; take t=s; thus t in ].r,s.] by A2,Th2; thus thesis by A1,Th4; end; theorem q < s & r < s implies not ].r,s.[ c= ].p,q.[ proof assume that A1: q < s and A2: r < s; per cases; suppose A3: r <= q; consider t such that A4: q < t and A5: t < s by A1,XREAL_1:227; take t; r < t by A3,A4,XXREAL_0:2; hence t in ].r,s.[ by A5,Th4; thus thesis by A4,Th4; end; suppose A6: q < r; consider t such that A7: r < t and A8: t < s by A2,XREAL_1:227; take t; thus t in ].r,s.[ by A7,A8,Th4; q < t by A6,A7,XXREAL_0:2; hence thesis by Th4; end; end; begin theorem Th128: r <= s implies [.r,s.] = ].r,s.[ \/ {r,s} proof assume A1: r <= s; let t; thus t in [.r,s.] implies t in ].r,s.[ \/ {r,s} proof assume t in [.r,s.]; then t in ].r,s.[ or t = r or t = s by Th5; then t in ].r,s.[ or t in {r,s} by TARSKI:def 2; hence thesis by XBOOLE_0:def 3; end; assume t in ].r,s.[ \/ {r,s}; then t in ].r,s.[ or t in {r,s} by XBOOLE_0:def 3; then t in ].r,s.[ or t = r or t = s by TARSKI:def 2; hence thesis by A1,Th1,Th16; end; theorem Th129: r <= s implies [.r,s.] = [.r,s.[ \/ {s} proof assume A1: r <= s; let t; thus t in [.r,s.] implies t in [.r,s.[ \/ {s} proof assume t in [.r,s.]; then t in [.r,s.[ or t = s by Th7; then t in [.r,s.[ or t in {s} by TARSKI:def 1; hence thesis by XBOOLE_0:def 3; end; assume t in [.r,s.[ \/ {s}; then t in [.r,s.[ or t in {s} by XBOOLE_0:def 3; then t in [.r,s.[ or t = s by TARSKI:def 1; hence thesis by A1,Th1,Th13; end; theorem Th130: r <= s implies [.r,s.] = {r} \/ ].r,s.] proof assume A1: r <= s; let t; thus t in [.r,s.] implies t in {r} \/ ].r,s.] proof assume t in [.r,s.]; then t in ].r,s.] or t = r by Th6; then t in ].r,s.] or t in {r} by TARSKI:def 1; hence thesis by XBOOLE_0:def 3; end; assume t in {r} \/].r,s.]; then t in ].r,s.] or t in {r} by XBOOLE_0:def 3; then t in ].r,s.] or t = r by TARSKI:def 1; hence thesis by A1,Th1,Th12; end; theorem Th131: r < s implies [.r,s.[ = {r} \/ ].r,s.[ proof assume A1: r < s; let t; thus t in [.r,s.[ implies t in {r} \/ ].r,s.[ proof assume t in [.r,s.[; then t in ].r,s.[ or t = r by Th8; then t in ].r,s.[ or t in {r} by TARSKI:def 1; hence thesis by XBOOLE_0:def 3; end; assume t in {r} \/].r,s.[; then t in ].r,s.[ or t in {r} by XBOOLE_0:def 3; then t in ].r,s.[ or t = r by TARSKI:def 1; hence thesis by A1,Th3,Th14; end; theorem Th132: r < s implies ].r,s.] = ].r,s.[ \/ {s} proof assume A1: r < s; let t; thus t in ].r,s.] implies t in ].r,s.[ \/ {s} proof assume t in ].r,s.]; then t in ].r,s.[ or t = s by Th9; then t in ].r,s.[ or t in {s} by TARSKI:def 1; hence thesis by XBOOLE_0:def 3; end; assume t in ].r,s.[ \/ {s}; then t in ].r,s.[ or t in {s} by XBOOLE_0:def 3; then t in ].r,s.[ or t = s by TARSKI:def 1; hence thesis by A1,Th2,Th15; end; theorem r <= s implies [.r,s.] \ {r,s} = ].r,s.[ proof assume r <= s; then A1: [.r,s.] = ].r,s.[ \/ {r,s} by Th128; A2: not r in ].r,s.[ by Th4; not s in ].r,s.[ by Th4; hence thesis by A1,A2,ZFMISC_1:121; end; theorem r <= s implies [.r,s.] \ {r} = ].r,s.] proof assume r <= s; then A1: [.r,s.] = {r} \/ ].r,s.] by Th130; not r in ].r,s.] by Th2; hence thesis by A1,ZFMISC_1:117; end; theorem r <= s implies [.r,s.] \ {s} = [.r,s.[ proof assume r <= s; then A1: [.r,s.] = [.r,s.[ \/ {s} by Th129; not s in [.r,s.[ by Th3; hence thesis by A1,ZFMISC_1:117; end; theorem r < s implies [.r,s.[ \ {r} = ].r,s.[ proof assume r < s; then A1: [.r,s.[= {r} \/ ].r,s.[ by Th131; not r in ].r,s.[ by Th4; hence thesis by A1,ZFMISC_1:117; end; theorem r < s implies ].r,s.] \ {s} = ].r,s.[ proof assume r < s; then A1: ].r,s.] = ].r,s.[ \/ {s} by Th132; not s in ].r,s.[ by Th4; hence thesis by A1,ZFMISC_1:117; end; theorem r < s & s < t implies ].r,s.] /\ [.s,t.[ = {s} proof assume that A1: r < s and A2: s < t; now let x; hereby assume A3: x in ].r,s.] /\ [.s,t.[; then reconsider p = x as ext-real number; A4: p in ].r,s.] by A3,XBOOLE_0:def 4; p in [.s,t.[ by A3,XBOOLE_0:def 4; then A5: s <= p by Th3; p <= s by A4,Th2; hence x = s by A5,XXREAL_0:1; end; assume A6: x = s; A7: s in ].r,s.] by A1,Th2; s in [.s,t.[ by A2,Th3; hence x in ].r,s.] /\ [.s,t.[ by A6,A7,XBOOLE_0:def 4; end; hence thesis by TARSKI:def 1; end; theorem [.r,s.[ /\ [.p,q.[ = [.max(r,p),min(s,q).[ proof let t; thus t in [.r,s.[ /\ [.p,q.[ implies t in [.max(r,p),min(s,q).[ proof assume A1: t in [.r,s.[ /\ [.p,q.[; then A2: t in [.r,s.[ by XBOOLE_0:def 4; A3: t in [.p,q.[ by A1,XBOOLE_0:def 4; A4: r <= t by A2,Th3; A5: t < s by A2,Th3; A6: p <= t by A3,Th3; A7: t < q by A3,Th3; A8: max(r,p) <= t by A4,A6,XXREAL_0:28; t < min(s,q) by A5,A7,XXREAL_0:21; hence thesis by A8,Th3; end; assume A9: t in [.max(r,p),min(s,q).[; then A10: max(r,p) <= t by Th3; A11: t < min(s,q) by A9,Th3; A12: r <= t by A10,XXREAL_0:30; A13: p <= t by A10,XXREAL_0:30; A14: t < s by A11,XXREAL_0:23; A15: t < q by A11,XXREAL_0:23; A16: t in [.r,s.[ by A12,A14,Th3; t in [.p,q.[ by A13,A15,Th3; hence thesis by A16,XBOOLE_0:def 4; end; theorem [.r,s.] /\ [.p,q.] = [.max(r,p),min(s,q).] proof let t; thus t in [.r,s.] /\ [.p,q.] implies t in [.max(r,p),min(s,q).] proof assume A1: t in [.r,s.] /\ [.p,q.]; then A2: t in [.r,s.] by XBOOLE_0:def 4; A3: t in [.p,q.] by A1,XBOOLE_0:def 4; A4: r <= t by A2,Th1; A5: t <= s by A2,Th1; A6: p <= t by A3,Th1; A7: t <= q by A3,Th1; A8: max(r,p) <= t by A4,A6,XXREAL_0:28; t <= min(s,q) by A5,A7,XXREAL_0:20; hence thesis by A8,Th1; end; assume A9: t in [.max(r,p),min(s,q).]; then A10: max(r,p) <= t by Th1; A11: t <= min(s,q) by A9,Th1; A12: r <= t by A10,XXREAL_0:30; A13: p <= t by A10,XXREAL_0:30; A14: t <= s by A11,XXREAL_0:22; A15: t <= q by A11,XXREAL_0:22; A16: t in [.r,s.] by A12,A14,Th1; t in [.p,q.] by A13,A15,Th1; hence thesis by A16,XBOOLE_0:def 4; end; theorem ].r,s.] /\ ].p,q.] = ].max(r,p),min(s,q).] proof let t; thus t in ].r,s.] /\ ].p,q.] implies t in ].max(r,p),min(s,q).] proof assume A1: t in ].r,s.] /\ ].p,q.]; then A2: t in ].r,s.] by XBOOLE_0:def 4; A3: t in ].p,q.] by A1,XBOOLE_0:def 4; A4: r < t by A2,Th2; A5: t <= s by A2,Th2; A6: p < t by A3,Th2; A7: t <= q by A3,Th2; A8: max(r,p) < t by A4,A6,XXREAL_0:29; t <= min(s,q) by A5,A7,XXREAL_0:20; hence thesis by A8,Th2; end; assume A9: t in ].max(r,p),min(s,q).]; then A10: max(r,p) < t by Th2; A11: t <= min(s,q) by A9,Th2; A12: r < t by A10,XXREAL_0:31; A13: p < t by A10,XXREAL_0:31; A14: t <= s by A11,XXREAL_0:22; A15: t <= q by A11,XXREAL_0:22; A16: t in ].r,s.] by A12,A14,Th2; t in ].p,q.] by A13,A15,Th2; hence thesis by A16,XBOOLE_0:def 4; end; theorem ].r,s.[ /\ ].p,q.[ = ].max(r,p),min(s,q).[ proof let t; thus t in ].r,s.[ /\ ].p,q.[ implies t in ].max(r,p),min(s,q).[ proof assume A1: t in ].r,s.[ /\ ].p,q.[; then A2: t in ].r,s.[ by XBOOLE_0:def 4; A3: t in ].p,q.[ by A1,XBOOLE_0:def 4; A4: r < t by A2,Th4; A5: t < s by A2,Th4; A6: p < t by A3,Th4; A7: t < q by A3,Th4; A8: max(r,p) < t by A4,A6,XXREAL_0:29; t < min(s,q) by A5,A7,XXREAL_0:21; hence thesis by A8,Th4; end; assume A9: t in ].max(r,p),min(s,q).[; then A10: max(r,p) < t by Th4; A11: t < min(s,q) by A9,Th4; A12: r < t by A10,XXREAL_0:31; A13: p < t by A10,XXREAL_0:31; A14: t < s by A11,XXREAL_0:23; A15: t < q by A11,XXREAL_0:23; A16: t in ].r,s.[ by A12,A14,Th4; t in ].p,q.[ by A13,A15,Th4; hence thesis by A16,XBOOLE_0:def 4; end; theorem r <= p & s <= q implies [.r,s.] /\ [.p,q.] = [.p,s.] proof assume that A1: r <= p and A2: s <= q; let t; thus t in [.r,s.] /\ [.p,q.] implies t in [.p,s.] proof assume A3: t in [.r,s.] /\ [.p,q.]; then A4: t in [.r,s.] by XBOOLE_0:def 4; A5: t in [.p,q.] by A3,XBOOLE_0:def 4; A6: t <= s by A4,Th1; p <= t by A5,Th1; hence thesis by A6,Th1; end; assume A7: t in [.p,s.]; then A8: p <= t by Th1; A9: t <= s by A7,Th1; A10: r <= t by A1,A8,XXREAL_0:2; A11: t <= q by A2,A9,XXREAL_0:2; A12: t in [.r,s.] by A9,A10,Th1; t in [.p,q.] by A8,A11,Th1; hence thesis by A12,XBOOLE_0:def 4; end; theorem r <= p & s <= q implies [.r,s.[ /\ [.p,q.] = [.p,s.[ proof assume that A1: r <= p and A2: s <= q; let t; thus t in [.r,s.[ /\ [.p,q.] implies t in [.p,s.[ proof assume A3: t in [.r,s.[ /\ [.p,q.]; then A4: t in [.r,s.[ by XBOOLE_0:def 4; A5: t in [.p,q.] by A3,XBOOLE_0:def 4; A6: t < s by A4,Th3; p <= t by A5,Th1; hence thesis by A6,Th3; end; assume A7: t in [.p,s.[; then A8: p <= t by Th3; A9: t < s by A7,Th3; A10: r <= t by A1,A8,XXREAL_0:2; A11: t <= q by A2,A9,XXREAL_0:2; A12: t in [.r,s.[ by A9,A10,Th3; t in [.p,q.] by A8,A11,Th1; hence thesis by A12,XBOOLE_0:def 4; end; theorem r >= p & s > q implies [.r,s.[ /\ [.p,q.] = [.r,q.] proof assume that A1: r >= p and A2: s > q; let t; thus t in [.r,s.[ /\ [.p,q.] implies t in [.r,q.] proof assume A3: t in [.r,s.[ /\ [.p,q.]; then A4: t in [.r,s.[ by XBOOLE_0:def 4; A5: t in [.p,q.] by A3,XBOOLE_0:def 4; A6: r <= t by A4,Th3; t <= q by A5,Th1; hence thesis by A6,Th1; end; assume A7: t in [.r,q.]; then A8: r <= t by Th1; A9: t <= q by A7,Th1; then A10: t < s by A2,XXREAL_0:2; A11: p <= t by A1,A8,XXREAL_0:2; A12: t in [.r,s.[ by A8,A10,Th3; t in [.p,q.] by A9,A11,Th1; hence thesis by A12,XBOOLE_0:def 4; end; theorem r < p & s <= q implies ].r,s.] /\ [.p,q.] = [.p,s.] proof assume that A1: r < p and A2: s <= q; let t; thus t in ].r,s.] /\ [.p,q.] implies t in [.p,s.] proof assume A3: t in ].r,s.] /\ [.p,q.]; then A4: t in ].r,s.] by XBOOLE_0:def 4; A5: t in [.p,q.] by A3,XBOOLE_0:def 4; A6: t <= s by A4,Th2; p <= t by A5,Th1; hence thesis by A6,Th1; end; assume A7: t in [.p,s.]; then A8: p <= t by Th1; A9: t <= s by A7,Th1; A10: r < t by A1,A8,XXREAL_0:2; A11: t <= q by A2,A9,XXREAL_0:2; A12: t in ].r,s.] by A9,A10,Th2; t in [.p,q.] by A8,A11,Th1; hence thesis by A12,XBOOLE_0:def 4; end; theorem r >= p & s >= q implies ].r,s.] /\ [.p,q.] = ].r,q.] proof assume that A1: r >= p and A2: s >= q; let t; thus t in ].r,s.] /\ [.p,q.] implies t in ].r,q.] proof assume A3: t in ].r,s.] /\ [.p,q.]; then A4: t in ].r,s.] by XBOOLE_0:def 4; A5: t in [.p,q.] by A3,XBOOLE_0:def 4; A6: r < t by A4,Th2; t <= q by A5,Th1; hence thesis by A6,Th2; end; assume A7: t in ].r,q.]; then A8: r < t by Th2; A9: t <= q by A7,Th2; then A10: t <= s by A2,XXREAL_0:2; A11: p <= t by A1,A8,XXREAL_0:2; A12: t in ].r,s.] by A8,A10,Th2; t in [.p,q.] by A9,A11,Th1; hence thesis by A12,XBOOLE_0:def 4; end; theorem r < p & s <= q implies ].r,s.[ /\ [.p,q.] = [.p,s.[ proof assume that A1: r < p and A2: s <= q; let t; thus t in ].r,s.[ /\ [.p,q.] implies t in [.p,s.[ proof assume A3: t in ].r,s.[ /\ [.p,q.]; then A4: t in ].r,s.[ by XBOOLE_0:def 4; A5: t in [.p,q.] by A3,XBOOLE_0:def 4; A6: t < s by A4,Th4; p <= t by A5,Th1; hence thesis by A6,Th3; end; assume A7: t in [.p,s.[; then A8: p <= t by Th3; A9: t < s by A7,Th3; A10: r < t by A1,A8,XXREAL_0:2; A11: t <= q by A2,A9,XXREAL_0:2; A12: t in ].r,s.[ by A9,A10,Th4; t in [.p,q.] by A8,A11,Th1; hence thesis by A12,XBOOLE_0:def 4; end; theorem r >= p & s > q implies ].r,s.[ /\ [.p,q.] = ].r,q.] proof assume that A1: r >= p and A2: s > q; let t; thus t in ].r,s.[ /\ [.p,q.] implies t in ].r,q.] proof assume A3: t in ].r,s.[ /\ [.p,q.]; then A4: t in ].r,s.[ by XBOOLE_0:def 4; A5: t in [.p,q.] by A3,XBOOLE_0:def 4; A6: r < t by A4,Th4; t <= q by A5,Th1; hence thesis by A6,Th2; end; assume A7: t in ].r,q.]; then A8: r < t by Th2; A9: t <= q by A7,Th2; then A10: t < s by A2,XXREAL_0:2; A11: p <= t by A1,A8,XXREAL_0:2; A12: t in ].r,s.[ by A8,A10,Th4; t in [.p,q.] by A9,A11,Th1; hence thesis by A12,XBOOLE_0:def 4; end; theorem r <= p & s <= q implies [.r,s.[ /\ [.p,q.[ = [.p,s.[ proof assume that A1: r <= p and A2: s <= q; let t; thus t in [.r,s.[ /\ [.p,q.[ implies t in [.p,s.[ proof assume A3: t in [.r,s.[ /\ [.p,q.[; then A4: t in [.r,s.[ by XBOOLE_0:def 4; A5: t in [.p,q.[ by A3,XBOOLE_0:def 4; A6: t < s by A4,Th3; p <= t by A5,Th3; hence thesis by A6,Th3; end; assume A7: t in [.p,s.[; then A8: p <= t by Th3; A9: t < s by A7,Th3; A10: r <= t by A1,A8,XXREAL_0:2; A11: t < q by A2,A9,XXREAL_0:2; A12: t in [.r,s.[ by A9,A10,Th3; t in [.p,q.[ by A8,A11,Th3; hence thesis by A12,XBOOLE_0:def 4; end; theorem r >= p & s >= q implies [.r,s.[ /\ [.p,q.[ = [.r,q.[ proof assume that A1: r >= p and A2: s >= q; let t; thus t in [.r,s.[ /\ [.p,q.[ implies t in [.r,q.[ proof assume A3: t in [.r,s.[ /\ [.p,q.[; then A4: t in [.r,s.[ by XBOOLE_0:def 4; A5: t in [.p,q.[ by A3,XBOOLE_0:def 4; A6: r <= t by A4,Th3; t < q by A5,Th3; hence thesis by A6,Th3; end; assume A7: t in [.r,q.[; then A8: r <= t by Th3; A9: t < q by A7,Th3; then A10: t < s by A2,XXREAL_0:2; A11: p <= t by A1,A8,XXREAL_0:2; A12: t in [.r,s.[ by A8,A10,Th3; t in [.p,q.[ by A9,A11,Th3; hence thesis by A12,XBOOLE_0:def 4; end; theorem Th152: r < p & s < q implies ].r,s.] /\ [.p,q.[ = [.p,s.] proof assume that A1: r < p and A2: s < q; let t; thus t in ].r,s.] /\ [.p,q.[ implies t in [.p,s.] proof assume A3: t in ].r,s.] /\ [.p,q.[; then A4: t in ].r,s.] by XBOOLE_0:def 4; A5: t in [.p,q.[ by A3,XBOOLE_0:def 4; A6: t <= s by A4,Th2; p <= t by A5,Th3; hence thesis by A6,Th1; end; assume A7: t in [.p,s.]; then A8: p <= t by Th1; A9: t <= s by A7,Th1; A10: r < t by A1,A8,XXREAL_0:2; A11: t < q by A2,A9,XXREAL_0:2; A12: t in ].r,s.] by A9,A10,Th2; t in [.p,q.[ by A8,A11,Th3; hence thesis by A12,XBOOLE_0:def 4; end; theorem r >= p & s >= q implies ].r,s.] /\ [.p,q.[ = ].r,q.[ proof assume that A1: r >= p and A2: s >= q; let t; thus t in ].r,s.] /\ [.p,q.[ implies t in ].r,q.[ proof assume A3: t in ].r,s.] /\ [.p,q.[; then A4: t in ].r,s.] by XBOOLE_0:def 4; A5: t in [.p,q.[ by A3,XBOOLE_0:def 4; A6: r < t by A4,Th2; t < q by A5,Th3; hence thesis by A6,Th4; end; assume A7: t in ].r,q.[; then A8: r < t by Th4; A9: t < q by A7,Th4; then A10: t <= s by A2,XXREAL_0:2; A11: p <= t by A1,A8,XXREAL_0:2; A12: t in ].r,s.] by A8,A10,Th2; t in [.p,q.[ by A9,A11,Th3; hence thesis by A12,XBOOLE_0:def 4; end; theorem Th154: r < p & s <= q implies ].r,s.[ /\ [.p,q.[ = [.p,s.[ proof assume that A1: r < p and A2: s <= q; let t; thus t in ].r,s.[ /\ [.p,q.[ implies t in [.p,s.[ proof assume A3: t in ].r,s.[ /\ [.p,q.[; then A4: t in ].r,s.[ by XBOOLE_0:def 4; A5: t in [.p,q.[ by A3,XBOOLE_0:def 4; A6: t < s by A4,Th4; p <= t by A5,Th3; hence thesis by A6,Th3; end; assume A7: t in [.p,s.[; then A8: p <= t by Th3; A9: t < s by A7,Th3; A10: r < t by A1,A8,XXREAL_0:2; A11: t < q by A2,A9,XXREAL_0:2; A12: t in ].r,s.[ by A9,A10,Th4; t in [.p,q.[ by A8,A11,Th3; hence thesis by A12,XBOOLE_0:def 4; end; theorem r >= p & s >= q implies ].r,s.[ /\ [.p,q.[ = ].r,q.[ proof assume that A1: r >= p and A2: s >= q; let t; thus t in ].r,s.[ /\ [.p,q.[ implies t in ].r,q.[ proof assume A3: t in ].r,s.[ /\ [.p,q.[; then A4: t in ].r,s.[ by XBOOLE_0:def 4; A5: t in [.p,q.[ by A3,XBOOLE_0:def 4; A6: r < t by A4,Th4; t < q by A5,Th3; hence thesis by A6,Th4; end; assume A7: t in ].r,q.[; then A8: r < t by Th4; A9: t < q by A7,Th4; then A10: t < s by A2,XXREAL_0:2; A11: p <= t by A1,A8,XXREAL_0:2; A12: t in ].r,s.[ by A8,A10,Th4; t in [.p,q.[ by A9,A11,Th3; hence thesis by A12,XBOOLE_0:def 4; end; theorem r <= p & s <= q implies ].r,s.] /\ ].p,q.] = ].p,s.] proof assume that A1: r <= p and A2: s <= q; let t; thus t in ].r,s.] /\ ].p,q.] implies t in ].p,s.] proof assume A3: t in ].r,s.] /\ ].p,q.]; then A4: t in ].r,s.] by XBOOLE_0:def 4; A5: t in ].p,q.] by A3,XBOOLE_0:def 4; A6: t <= s by A4,Th2; p < t by A5,Th2; hence thesis by A6,Th2; end; assume A7: t in ].p,s.]; then A8: p < t by Th2; A9: t <= s by A7,Th2; A10: r < t by A1,A8,XXREAL_0:2; A11: t <= q by A2,A9,XXREAL_0:2; A12: t in ].r,s.] by A9,A10,Th2; t in ].p,q.] by A8,A11,Th2; hence thesis by A12,XBOOLE_0:def 4; end; theorem r >= p & s >= q implies ].r,s.] /\ ].p,q.] = ].r,q.] proof assume that A1: r >= p and A2: s >= q; let t; thus t in ].r,s.] /\ ].p,q.] implies t in ].r,q.] proof assume A3: t in ].r,s.] /\ ].p,q.]; then A4: t in ].r,s.] by XBOOLE_0:def 4; A5: t in ].p,q.] by A3,XBOOLE_0:def 4; A6: r < t by A4,Th2; t <= q by A5,Th2; hence thesis by A6,Th2; end; assume A7: t in ].r,q.]; then A8: r < t by Th2; A9: t <= q by A7,Th2; then A10: t <= s by A2,XXREAL_0:2; A11: p < t by A1,A8,XXREAL_0:2; A12: t in ].r,s.] by A8,A10,Th2; t in ].p,q.] by A9,A11,Th2; hence thesis by A12,XBOOLE_0:def 4; end; theorem r <= p & s <= q implies ].r,s.[ /\ ].p,q.] = ].p,s.[ proof assume that A1: r <= p and A2: s <= q; let t; thus t in ].r,s.[ /\ ].p,q.] implies t in ].p,s.[ proof assume A3: t in ].r,s.[ /\ ].p,q.]; then A4: t in ].r,s.[ by XBOOLE_0:def 4; A5: t in ].p,q.] by A3,XBOOLE_0:def 4; A6: t < s by A4,Th4; p < t by A5,Th2; hence thesis by A6,Th4; end; assume A7: t in ].p,s.[; then A8: p < t by Th4; A9: t < s by A7,Th4; A10: r < t by A1,A8,XXREAL_0:2; A11: t <= q by A2,A9,XXREAL_0:2; A12: t in ].r,s.[ by A9,A10,Th4; t in ].p,q.] by A8,A11,Th2; hence thesis by A12,XBOOLE_0:def 4; end; theorem Th159: r >= p & s > q implies ].r,s.[ /\ ].p,q.] = ].r,q.] proof assume that A1: r >= p and A2: s > q; let t; thus t in ].r,s.[ /\ ].p,q.] implies t in ].r,q.] proof assume A3: t in ].r,s.[ /\ ].p,q.]; then A4: t in ].r,s.[ by XBOOLE_0:def 4; A5: t in ].p,q.] by A3,XBOOLE_0:def 4; A6: r < t by A4,Th4; t <= q by A5,Th2; hence thesis by A6,Th2; end; assume A7: t in ].r,q.]; then A8: r < t by Th2; A9: t <= q by A7,Th2; then A10: t < s by A2,XXREAL_0:2; A11: p < t by A1,A8,XXREAL_0:2; A12: t in ].r,s.[ by A8,A10,Th4; t in ].p,q.] by A9,A11,Th2; hence thesis by A12,XBOOLE_0:def 4; end; theorem Th160: r <= p & s <= q implies ].r,s.[ /\ ].p,q.[ = ].p,s.[ proof assume that A1: r <= p and A2: s <= q; let t; thus t in ].r,s.[ /\ ].p,q.[ implies t in ].p,s.[ proof assume A3: t in ].r,s.[ /\ ].p,q.[; then A4: t in ].r,s.[ by XBOOLE_0:def 4; A5: t in ].p,q.[ by A3,XBOOLE_0:def 4; A6: t < s by A4,Th4; p < t by A5,Th4; hence thesis by A6,Th4; end; assume A7: t in ].p,s.[; then A8: p < t by Th4; A9: t < s by A7,Th4; A10: r < t by A1,A8,XXREAL_0:2; A11: t < q by A2,A9,XXREAL_0:2; A12: t in ].r,s.[ by A9,A10,Th4; t in ].p,q.[ by A8,A11,Th4; hence thesis by A12,XBOOLE_0:def 4; end; theorem [.r,s.[ \/ [.p,q.[ c= [.min(r,p),max(s,q).[ proof let t; assume t in [.r,s.[ \/ [.p,q.[; then t in [.r,s.[ or t in [.p,q.[ by XBOOLE_0:def 3; then A1: r <= t & t < s or p <= t & t < q by Th3; then A2: min(r,p) <= t by XXREAL_0:23; t < max(s,q) by A1,XXREAL_0:30; hence thesis by A2,Th3; end; theorem [.r,s.[ meets [.p,q.[ implies [.r,s.[ \/ [.p,q.[ = [.min(r,p),max(s,q).[ proof assume [.r,s.[ meets [.p,q.[; then consider u such that A1: u in [.r,s.[ and A2: u in [.p,q.[ by MEMBERED:def 20; let t; thus t in [.r,s.[ \/ [.p,q.[ implies t in [.min(r,p),max(s,q).[ proof assume t in [.r,s.[ \/ [.p,q.[; then t in [.r,s.[ or t in [.p,q.[ by XBOOLE_0:def 3; then A3: r <= t & t < s or p <= t & t < q by Th3; then A4: min(r,p) <= t by XXREAL_0:23; t < max(s,q) by A3,XXREAL_0:30; hence thesis by A4,Th3; end; A5: r <= u by A1,Th3; A6: u < s by A1,Th3; A7: p <= u by A2,Th3; A8: u < q by A2,Th3; assume A9: t in [.min(r,p),max(s,q).[; then A10: min(r,p) <= t by Th3; A11: t < max(s,q) by A9,Th3; per cases by A10,A11,XXREAL_0:21,28; suppose r <= t & t < s or p <= t & t < q; then t in [.r,s.[ or t in [.p,q.[ by Th3; hence thesis by XBOOLE_0:def 3; end; suppose that A12: p <= t and A13: t < s; u <= t or t <= u; then r <= t or t < q by A5,A8,XXREAL_0:2; then t in [.r,s.[ or t in [.p,q.[ by A12,A13,Th3; hence thesis by XBOOLE_0:def 3; end; suppose that A14: r <= t and A15: t < q; u <= t or t <= u; then t < s or p <= t by A6,A7,XXREAL_0:2; then t in [.r,s.[ or t in [.p,q.[ by A14,A15,Th3; hence thesis by XBOOLE_0:def 3; end; end; theorem ].r,s.] \/ ].p,q.] c= ].min(r,p),max(s,q).] proof let t; assume t in ].r,s.] \/ ].p,q.]; then t in ].r,s.] or t in ].p,q.] by XBOOLE_0:def 3; then A1: r < t & t <= s or p < t & t <= q by Th2; then A2: min(r,p) < t by XXREAL_0:22; t <= max(s,q) by A1,XXREAL_0:31; hence thesis by A2,Th2; end; theorem ].r,s.] meets ].p,q.] implies ].r,s.] \/ ].p,q.] = ].min(r,p),max(s,q).] proof assume ].r,s.] meets ].p,q.]; then consider u such that A1: u in ].r,s.] and A2: u in ].p,q.] by MEMBERED:def 20; let t; thus t in ].r,s.] \/ ].p,q.] implies t in ].min(r,p),max(s,q).] proof assume t in ].r,s.] \/ ].p,q.]; then t in ].r,s.] or t in ].p,q.] by XBOOLE_0:def 3; then A3: r < t & t <= s or p < t & t <= q by Th2; then A4: min(r,p) < t by XXREAL_0:22; t <= max(s,q) by A3,XXREAL_0:31; hence thesis by A4,Th2; end; A5: r < u by A1,Th2; A6: u <= s by A1,Th2; A7: p < u by A2,Th2; A8: u <= q by A2,Th2; assume A9: t in ].min(r,p),max(s,q).]; then A10: min(r,p) < t by Th2; A11: t <= max(s,q) by A9,Th2; per cases by A10,A11,XXREAL_0:20,29; suppose r < t & t <= s or p < t & t <= q; then t in ].r,s.] or t in ].p,q.] by Th2; hence thesis by XBOOLE_0:def 3; end; suppose that A12: p < t and A13: t <= s; u <= t or t <= u; then r < t or t <= q by A5,A8,XXREAL_0:2; then t in ].r,s.] or t in ].p,q.] by A12,A13,Th2; hence thesis by XBOOLE_0:def 3; end; suppose that A14: r < t and A15: t <= q; u <= t or t <= u; then t <= s or p < t by A6,A7,XXREAL_0:2; then t in ].r,s.] or t in ].p,q.] by A14,A15,Th2; hence thesis by XBOOLE_0:def 3; end; end; theorem r <= s & s <= t implies [.r,s.] \/ [.s,t.] = [.r,t.] proof assume that A1: r <= s and A2: s <= t; let p; thus p in [.r,s.] \/ [.s,t.] implies p in [.r,t.] proof assume p in [.r,s.] \/ [.s,t.]; then p in [.r,s.] or p in [.s,t.] by XBOOLE_0:def 3; then A3: r <= p & p <= s or s <= p & p <= t by Th1; then A4: r <= p by A1,XXREAL_0:2; p <= t by A2,A3,XXREAL_0:2; hence thesis by A4,Th1; end; assume p in [.r,t.]; then r <= p & p <= s or s <= p & p <= t by Th1; then p in [.r,s.] or p in [.s,t.] by Th1; hence thesis by XBOOLE_0:def 3; end; theorem Th166: r <= s & s <= t implies [.r,s.[ \/ [.s,t.] = [.r,t.] proof assume that A1: r <= s and A2: s <= t; let p; thus p in [.r,s.[ \/ [.s,t.] implies p in [.r,t.] proof assume p in [.r,s.[ \/ [.s,t.]; then p in [.r,s.[ or p in [.s,t.] by XBOOLE_0:def 3; then A3: r <= p & p < s or s <= p & p <= t by Th1,Th3; then A4: r <= p by A1,XXREAL_0:2; p <= t by A2,A3,XXREAL_0:2; hence thesis by A4,Th1; end; assume p in [.r,t.]; then r <= p & p < s or s <= p & p <= t by Th1; then p in [.r,s.[ or p in [.s,t.] by Th1,Th3; hence thesis by XBOOLE_0:def 3; end; theorem Th167: r <= s & s <= t implies [.r,s.] \/ ].s,t.] = [.r,t.] proof assume that A1: r <= s and A2: s <= t; let p; thus p in [.r,s.] \/ ].s,t.] implies p in [.r,t.] proof assume p in [.r,s.] \/ ].s,t.]; then p in [.r,s.] or p in ].s,t.] by XBOOLE_0:def 3; then A3: r <= p & p <= s or s < p & p <= t by Th1,Th2; then A4: r <= p by A1,XXREAL_0:2; p <= t by A2,A3,XXREAL_0:2; hence thesis by A4,Th1; end; assume p in [.r,t.]; then r <= p & p <= s or s < p & p <= t by Th1; then p in [.r,s.] or p in ].s,t.] by Th1,Th2; hence thesis by XBOOLE_0:def 3; end; theorem r <= s & s <= t implies [.r,s.[ \/ [.s,t.[ = [.r,t.[ proof assume that A1: r <= s and A2: s <= t; let p; thus p in [.r,s.[ \/ [.s,t.[ implies p in [.r,t.[ proof assume p in [.r,s.[ \/ [.s,t.[; then p in [.r,s.[ or p in [.s,t.[ by XBOOLE_0:def 3; then A3: r <= p & p < s or s <= p & p < t by Th3; then A4: r <= p by A1,XXREAL_0:2; p < t by A2,A3,XXREAL_0:2; hence thesis by A4,Th3; end; assume p in [.r,t.[; then r <= p & p < s or s <= p & p < t by Th3; then p in [.r,s.[ or p in [.s,t.[ by Th3; hence thesis by XBOOLE_0:def 3; end; theorem Th169: r <= s & s < t implies [.r,s.] \/ ].s,t.[ = [.r,t.[ proof assume that A1: r <= s and A2: s < t; let p; thus p in [.r,s.] \/ ].s,t.[ implies p in [.r,t.[ proof assume p in [.r,s.] \/ ].s,t.[; then p in [.r,s.] or p in ].s,t.[ by XBOOLE_0:def 3; then A3: r <= p & p <= s or s < p & p < t by Th1,Th4; then A4: r <= p by A1,XXREAL_0:2; p < t by A2,A3,XXREAL_0:2; hence thesis by A4,Th3; end; assume p in [.r,t.[; then r <= p & p <= s or s < p & p < t by Th3; then p in [.r,s.] or p in ].s,t.[ by Th1,Th4; hence thesis by XBOOLE_0:def 3; end; theorem r <= s & s <= t implies ].r,s.] \/ ].s,t.] = ].r,t.] proof assume that A1: r <= s and A2: s <= t; let p; thus p in ].r,s.] \/ ].s,t.] implies p in ].r,t.] proof assume p in ].r,s.] \/ ].s,t.]; then p in ].r,s.] or p in ].s,t.] by XBOOLE_0:def 3; then A3: r < p & p <= s or s < p & p <= t by Th2; then A4: r < p by A1,XXREAL_0:2; p <= t by A2,A3,XXREAL_0:2; hence thesis by A4,Th2; end; assume p in ].r,t.]; then r < p & p <= s or s < p & p <= t by Th2; then p in ].r,s.] or p in ].s,t.] by Th2; hence thesis by XBOOLE_0:def 3; end; theorem Th171: r <= s & s < t implies ].r,s.] \/ ].s,t.[ = ].r,t.[ proof assume that A1: r <= s and A2: s < t; let p; thus p in ].r,s.] \/ ].s,t.[ implies p in ].r,t.[ proof assume p in ].r,s.] \/ ].s,t.[; then p in ].r,s.] or p in ].s,t.[ by XBOOLE_0:def 3; then A3: r < p & p <= s or s < p & p < t by Th2,Th4; then A4: r < p by A1,XXREAL_0:2; p < t by A2,A3,XXREAL_0:2; hence thesis by A4,Th4; end; assume p in ].r,t.[; then r < p & p <= s or s < p & p < t by Th4; then p in ].r,s.] or p in ].s,t.[ by Th2,Th4; hence thesis by XBOOLE_0:def 3; end; theorem r < s & s < t implies ].r,s.] \/ [.s,t.[ = ].r,t.[ proof assume that A1: r < s and A2: s < t; let p; thus p in ].r,s.] \/ [.s,t.[ implies p in ].r,t.[ proof assume p in ].r,s.] \/ [.s,t.[; then p in ].r,s.] or p in [.s,t.[ by XBOOLE_0:def 3; then A3: r < p & p <= s or s <= p & p < t by Th2,Th3; then A4: r < p by A1,XXREAL_0:2; p < t by A2,A3,XXREAL_0:2; hence thesis by A4,Th4; end; assume p in ].r,t.[; then r < p & p <= s or s < p & p < t by Th4; then p in ].r,s.] or p in [.s,t.[ by Th2,Th3; hence thesis by XBOOLE_0:def 3; end; theorem Th173: r < s & s < t implies ].r,s.[ \/ [.s,t.[ = ].r,t.[ proof assume that A1: r < s and A2: s < t; let p; thus p in ].r,s.[ \/ [.s,t.[ implies p in ].r,t.[ proof assume p in ].r,s.[ \/ [.s,t.[; then p in ].r,s.[ or p in [.s,t.[ by XBOOLE_0:def 3; then A3: r < p & p < s or s <= p & p < t by Th3,Th4; then A4: r < p by A1,XXREAL_0:2; p < t by A2,A3,XXREAL_0:2; hence thesis by A4,Th4; end; assume p in ].r,t.[; then r < p & p < s or s <= p & p < t by Th4; then p in ].r,s.[ or p in [.s,t.[ by Th3,Th4; hence thesis by XBOOLE_0:def 3; end; theorem Th174: p <= s & r <= q & s <= r implies [.p,r.] \/ [.s,q.] = [.p,q.] proof assume that A1: p <= s and A2: r <= q and A3: s <= r; let t; thus t in [.p,r.] \/ [.s,q.] implies t in [.p,q.] proof assume t in [.p,r.] \/ [.s,q.]; then t in [.p,r.] or t in [.s,q.] by XBOOLE_0:def 3; then A4: p <= t & t <= r or s <= t & t <= q by Th1; then A5: p <= t by A1,XXREAL_0:2; t <= q by A2,A4,XXREAL_0:2; hence thesis by A5,Th1; end; assume t in [.p,q.]; then p <= t & t <= r or s <= t & t <= q by A3,Th1,XXREAL_0:2; then t in [.p,r.] or t in [.s,q.] by Th1; hence thesis by XBOOLE_0:def 3; end; theorem Th175: p <= s & r <= q & s < r implies [.p,r.[ \/ ].s,q.] = [.p,q.] proof assume that A1: p <= s and A2: r <= q and A3: s < r; let t; thus t in [.p,r.[ \/ ].s,q.] implies t in [.p,q.] proof assume t in [.p,r.[ \/ ].s,q.]; then t in [.p,r.[ or t in ].s,q.] by XBOOLE_0:def 3; then A4: p <= t & t <= r or s <= t & t <= q by Th2,Th3; then A5: p <= t by A1,XXREAL_0:2; t <= q by A2,A4,XXREAL_0:2; hence thesis by A5,Th1; end; assume t in [.p,q.]; then p <= t & t < r or s < t & t <= q by A3,Th1,XXREAL_0:2; then t in [.p,r.[ or t in ].s,q.] by Th2,Th3; hence thesis by XBOOLE_0:def 3; end; theorem p <= s & s <= r & r < q implies [.p,r.] \/ [.s,q.[ = [.p,q.[ proof assume that A1: p <= s and A2: s <= r and A3: r < q; let t; thus t in [.p,r.] \/ [.s,q.[ implies t in [.p,q.[ proof assume t in [.p,r.] \/ [.s,q.[; then t in [.p,r.] or t in [.s,q.[ by XBOOLE_0:def 3; then A4: p <= t & t <= r or s <= t & t < q by Th1,Th3; then A5: p <= t by A1,XXREAL_0:2; t < q by A3,A4,XXREAL_0:2; hence thesis by A5,Th3; end; assume t in [.p,q.[; then p <= t & t <= r or s <= t & t < q by A2,Th3,XXREAL_0:2; then t in [.p,r.] or t in [.s,q.[ by Th1,Th3; hence thesis by XBOOLE_0:def 3; end; theorem p < s & r <= q & s <= r implies ].p,r.] \/ [.s,q.] = ].p,q.] proof assume that A1: p < s and A2: r <= q and A3: s <= r; let t; thus t in ].p,r.] \/ [.s,q.] implies t in ].p,q.] proof assume t in ].p,r.] \/ [.s,q.]; then t in ].p,r.] or t in [.s,q.] by XBOOLE_0:def 3; then A4: p < t & t <= r or s <= t & t <= q by Th1,Th2; then A5: p < t by A1,XXREAL_0:2; t <= q by A2,A4,XXREAL_0:2; hence thesis by A5,Th2; end; assume t in ].p,q.]; then p < t & t <= r or s <= t & t <= q by A3,Th2,XXREAL_0:2; then t in ].p,r.] or t in [.s,q.] by Th1,Th2; hence thesis by XBOOLE_0:def 3; end; theorem Th178: p < s & r < q & s <= r implies ].p,r.] \/ [.s,q.[ = ].p,q.[ proof assume that A1: p < s and A2: r < q and A3: s <= r; let t; thus t in ].p,r.] \/ [.s,q.[ implies t in ].p,q.[ proof assume t in ].p,r.] \/ [.s,q.[; then t in ].p,r.] or t in [.s,q.[ by XBOOLE_0:def 3; then A4: p < t & t <= r or s <= t & t < q by Th2,Th3; then A5: p < t by A1,XXREAL_0:2; t < q by A2,A4,XXREAL_0:2; hence thesis by A5,Th4; end; assume t in ].p,q.[; then p < t & t <= r or s <= t & t < q by A3,Th4,XXREAL_0:2; then t in ].p,r.] or t in [.s,q.[ by Th2,Th3; hence thesis by XBOOLE_0:def 3; end; theorem p<=r & p<=s & r<=q & s<=q implies [.p,r.[ \/ [.r,s.] \/ ].s,q.] = [.p,q.] proof assume that A1: p <= r and A2: p <= s and A3: r <= q and A4: s <= q; per cases; suppose r <= s; hence [.p,r.[ \/ [.r,s.] \/ ].s,q.] = [.p,s.] \/ ].s,q.] by A1,Th166 .= [.p,q.] by A2,A4,Th167; end; suppose A5: s < r; hence [.p,r.[ \/ [.r,s.] \/ ].s,q.] = [.p,r.[ \/ {} \/ ].s,q.] by Th29 .= [.p,q.] by A2,A3,A5,Th175; end; end; theorem p s by TARSKI:def 1; then r <= p & p < s or s < p & p <= t by A3,Th1,XXREAL_0:1; then p in [.r,s.[ or p in ].s,t.] by Th2,Th3; hence thesis by XBOOLE_0:def 3; end; assume p in [.r,s.[ \/ ].s,t.]; then p in [.r,s.[ or p in ].s,t.] by XBOOLE_0:def 3; then A4: r <= p & p < s or s < p & p <= t by Th2,Th3; then A5: r <= p by A1,XXREAL_0:2; p <= t by A2,A4,XXREAL_0:2; then A6: p in [.r,t.] by A5,Th1; not p in {s} by A4,TARSKI:def 1; hence thesis by A6,XBOOLE_0:def 5; end; theorem r <= s & s < t implies [.r,t.[ \ {s} = [.r,s.[ \/ ].s,t.[ proof assume that A1: r <= s and A2: s < t; let p; thus p in [.r,t.[ \ {s} implies p in [.r,s.[ \/ ].s,t.[ proof assume A3: p in [.r,t.[ \ {s}; then not p in {s} by XBOOLE_0:def 5; then p <> s by TARSKI:def 1; then r <= p & p < s or s < p & p < t by A3,Th3,XXREAL_0:1; then p in [.r,s.[ or p in ].s,t.[ by Th3,Th4; hence thesis by XBOOLE_0:def 3; end; assume p in [.r,s.[ \/ ].s,t.[; then p in [.r,s.[ or p in ].s,t.[ by XBOOLE_0:def 3; then A4: r <= p & p < s or s < p & p < t by Th3,Th4; then A5: r <= p by A1,XXREAL_0:2; p < t by A2,A4,XXREAL_0:2; then A6: p in [.r,t.[ by A5,Th3; not p in {s} by A4,TARSKI:def 1; hence thesis by A6,XBOOLE_0:def 5; end; theorem r < s & s <= t implies ].r,t.] \ {s} = ].r,s.[ \/ ].s,t.] proof assume that A1: r < s and A2: s <= t; let p; thus p in ].r,t.] \ {s} implies p in ].r,s.[ \/ ].s,t.] proof assume A3: p in ].r,t.] \ {s}; then not p in {s} by XBOOLE_0:def 5; then p <> s by TARSKI:def 1; then r < p & p < s or s < p & p <= t by A3,Th2,XXREAL_0:1; then p in ].r,s.[ or p in ].s,t.] by Th2,Th4; hence thesis by XBOOLE_0:def 3; end; assume p in ].r,s.[ \/ ].s,t.]; then p in ].r,s.[ or p in ].s,t.] by XBOOLE_0:def 3; then A4: r < p & p < s or s < p & p <= t by Th2,Th4; then A5: r < p by A1,XXREAL_0:2; p <= t by A2,A4,XXREAL_0:2; then A6: p in ].r,t.] by A5,Th2; not p in {s} by A4,TARSKI:def 1; hence thesis by A6,XBOOLE_0:def 5; end; theorem r < s & s < t implies ].r,t.[ \ {s} = ].r,s.[ \/ ].s,t.[ proof assume that A1: r < s and A2: s < t; let p; thus p in ].r,t.[ \ {s} implies p in ].r,s.[ \/ ].s,t.[ proof assume A3: p in ].r,t.[ \ {s}; then not p in {s} by XBOOLE_0:def 5; then p <> s by TARSKI:def 1; then r < p & p < s or s < p & p < t by A3,Th4,XXREAL_0:1; then p in ].r,s.[ or p in ].s,t.[ by Th4; hence thesis by XBOOLE_0:def 3; end; assume p in ].r,s.[ \/ ].s,t.[; then p in ].r,s.[ or p in ].s,t.[ by XBOOLE_0:def 3; then A4: r < p & p < s or s < p & p < t by Th4; then A5: r < p by A1,XXREAL_0:2; p < t by A2,A4,XXREAL_0:2; then A6: p in ].r,t.[ by A5,Th4; not p in {s} by A4,TARSKI:def 1; hence thesis by A6,XBOOLE_0:def 5; end; theorem not s in ].r,s .[ \/ ].s,t.[ proof assume s in ].r,s .[ \/ ].s,t.[; then s in ].r,s .[ or s in ].s,t.[ by XBOOLE_0:def 3; hence contradiction by Th4; end; theorem not s in [.r,s .[ \/ ].s,t.[ proof assume s in [.r,s .[ \/ ].s,t.[; then s in [.r,s .[ or s in ].s,t.[ by XBOOLE_0:def 3; hence contradiction by Th3,Th4; end; theorem not s in ].r,s .[ \/ ].s,t.] proof assume s in ].r,s .[ \/ ].s,t.]; then s in ].r,s .[ or s in ].s,t.] by XBOOLE_0:def 3; hence contradiction by Th2,Th4; end; theorem not s in [.r,s .[ \/ ].s,t.] proof assume s in [.r,s .[ \/ ].s,t.]; then s in [.r,s .[ or s in ].s,t.] by XBOOLE_0:def 3; hence contradiction by Th2,Th3; end; begin theorem [.-infty,+infty.] = ExtREAL proof let r; thus r in [.-infty,+infty.] implies r in ExtREAL by XXREAL_0:def 1; assume r in ExtREAL; A1: -infty <= r by XXREAL_0:5; r <= +infty by XXREAL_0:3; hence thesis by A1,Th1; end; theorem ].p,-infty.[ = {} proof not ex x st x in ].p,-infty.[ proof given x such that A1: x in ].p,-infty.[; reconsider s = x as ext-real number by A1; s < -infty by A1,Th4; hence contradiction by XXREAL_0:5; end; hence thesis by XBOOLE_0:def 1; end; theorem [.p,-infty.[ = {} proof not ex x st x in [.p,-infty.[ proof given x such that A1: x in [.p,-infty.[; reconsider s = x as ext-real number by A1; s < -infty by A1,Th3; hence contradiction by XXREAL_0:5; end; hence thesis by XBOOLE_0:def 1; end; theorem ].p,-infty.] = {} proof not ex x st x in ].p,-infty.] proof given x such that A1: x in ].p,-infty.]; reconsider s = x as ext-real number by A1; A2: p < s by A1,Th2; s <= -infty by A1,Th2; then p < -infty by A2,XXREAL_0:2; hence contradiction by XXREAL_0:5; end; hence thesis by XBOOLE_0:def 1; end; theorem p <> -infty implies [.p,-infty.] = {} proof assume A1: p <> -infty; not ex x st x in [.p,-infty.] proof given x such that A2: x in [.p,-infty.]; reconsider s = x as ext-real number by A2; A3: p <= s by A2,Th1; s <= -infty by A2,Th1; hence contradiction by A1,A3,XXREAL_0:2,6; end; hence thesis by XBOOLE_0:def 1; end; theorem ].+infty,p.[ = {} proof not ex x st x in ].+infty,p.[ proof given x such that A1: x in ].+infty,p.[; reconsider s = x as ext-real number by A1; +infty < s by A1,Th4; hence contradiction by XXREAL_0:3; end; hence thesis by XBOOLE_0:def 1; end; theorem [.+infty,p.[ = {} proof not ex x st x in [.+infty,p.[ proof given x such that A1: x in [.+infty,p.[; reconsider s = x as ext-real number by A1; A2: +infty <= s by A1,Th3; s < p by A1,Th3; then p > +infty by A2,XXREAL_0:2; hence contradiction by XXREAL_0:3; end; hence thesis by XBOOLE_0:def 1; end; theorem ].+infty,p.] = {} proof not ex x st x in ].+infty,p.] proof given x such that A1: x in ].+infty,p.]; reconsider s = x as ext-real number by A1; +infty < s by A1,Th2; hence contradiction by XXREAL_0:3; end; hence thesis by XBOOLE_0:def 1; end; theorem p <> +infty implies [.+infty,p.] = {} proof assume A1: p <> +infty; not ex x st x in [.+infty,p.] proof given x such that A2: x in [.+infty,p.]; reconsider s = x as ext-real number by A2; A3: +infty <= s by A2,Th1; s <= p by A2,Th1; hence contradiction by A1,A3,XXREAL_0:2,4; end; hence thesis by XBOOLE_0:def 1; end; theorem p > q implies p in ].q, +infty.] proof p <= +infty by XXREAL_0:3; hence thesis by Th2; end; theorem q <= p implies p in [.q, +infty.] proof p <= +infty by XXREAL_0:3; hence thesis by Th1; end; theorem p <= q implies p in [.-infty,q.] proof p >= -infty by XXREAL_0:5; hence thesis by Th1; end; theorem p < q implies p in [.-infty, q.[ proof p >= -infty by XXREAL_0:5; hence thesis by Th3; end; begin theorem p <= q implies [.p,q.] = [.p,q.] \/ [.q,p.] proof assume A1: p <= q; then A2: [.q,p.] c= {p} by Th85; p in [.p,q.] by A1,Th1; then {p} c= [.p,q.] by ZFMISC_1:31; hence thesis by A2,XBOOLE_1:1,12; end; theorem r <= s & s <= t implies not r in ].s,t.[ \/ ].t,p.[ proof assume that A1: r <= s and A2: s <= t; assume r in ].s,t.[ \/ ].t,p.[; then r in ].s,t.[ or r in ].t,p.[ by XBOOLE_0:def 3; then s < r & r < t or t < r & r < p by Th4; hence contradiction by A1,A2,XXREAL_0:2; end; theorem Th224: REAL = ].-infty,+infty.[ proof let x be ext-real number; thus x in REAL implies x in ].-infty,+infty.[ proof assume A1: x in REAL; then A2: -infty < x by XXREAL_0:12; x < +infty by A1,XXREAL_0:9; hence thesis by A2,Th4; end; assume A3: x in ].-infty,+infty.[; then A4: -infty < x by Th4; x < +infty by A3,Th4; hence thesis by A4,XXREAL_0:14; end; theorem Th225: ].p,q.[ c= REAL proof let x be ext-real number; assume A1: x in ].p,q.[; then A2: p < x by Th4; x < q by A1,Th4; hence thesis by A2,XXREAL_0:48; end; theorem Th226: p in REAL implies [.p,q.[ c= REAL proof assume A1: p in REAL; let x be ext-real number; assume A2: x in [.p,q.[; then A3: p <= x by Th3; x < q by A2,Th3; hence thesis by A1,A3,XXREAL_0:46; end; theorem Th227: q in REAL implies ].p,q.] c= REAL proof assume A1: q in REAL; let x be ext-real number; assume A2: x in ].p,q.]; then A3: p < x by Th2; x <= q by A2,Th2; hence thesis by A1,A3,XXREAL_0:47; end; theorem Th228: p in REAL & q in REAL implies [.p,q.] c= REAL proof assume that A1: p in REAL and A2: q in REAL; let x be ext-real number; assume A3: x in [.p,q.]; then A4: p <= x by Th1; x <= q by A3,Th1; hence thesis by A1,A2,A4,XXREAL_0:45; end; registration let p,q; cluster ].p,q.[ -> real-membered; coherence by Th225,MEMBERED:21; end; registration let p be real number, q; cluster [.p,q.[ -> real-membered; coherence proof p in REAL by XREAL_0:def 1; then [.p,q.[ c= REAL by Th226; hence thesis; end; end; registration let q be real number, p; cluster ].p,q.] -> real-membered; coherence proof q in REAL by XREAL_0:def 1; then ].p,q.] c= REAL by Th227; hence thesis; end; end; registration let p,q be real number; cluster [.p,q.] -> real-membered; coherence proof A1: p in REAL by XREAL_0:def 1; q in REAL by XREAL_0:def 1; then [.p,q.] c= REAL by A1,Th228; hence thesis; end; end; theorem ].-infty,s.[ = {g where g is Real : g {} & ex x st x in Y proof assume A1: x in X; given f such that f is one-to-one and A2: dom f = X & rng f = Y; f.x in Y by A1,A2,FUNCT_1:def 3; hence Y <> {}; take f.x; thus thesis by A1,A2,FUNCT_1:def 3; end; theorem bool X,bool card X are_equipotent & card bool X = card bool card X proof consider f such that A1: f is one-to-one and A2: dom f = X and A3: rng f = card X by CARD_1:def 2,WELLORD2:def 4; deffunc g(set) = f.:$1; consider g such that A4: dom g = bool X & for x st x in bool X holds g.x = g(x) from FUNCT_1: sch 3; thus bool X,bool card X are_equipotent proof take g; thus g is one-to-one proof let x,y; assume that A5: x in dom g and A6: y in dom g and A7: g.x = g.y; A8: g.x = f.:x & g.y = f.:y by A4,A5,A6; A9: y c= x proof let z; assume A10: z in y; then f.z in f.:y by A2,A4,A6,FUNCT_1:def 6; then ex u st u in dom f & u in x & f.z = f.u by A7,A8,FUNCT_1:def 6; hence thesis by A1,A2,A4,A6,A10,FUNCT_1:def 4; end; x c= y proof let z; assume A11: z in x; then f.z in f.:x by A2,A4,A5,FUNCT_1:def 6; then ex u st u in dom f & u in y & f.z = f.u by A7,A8,FUNCT_1:def 6; hence thesis by A1,A2,A4,A5,A11,FUNCT_1:def 4; end; hence thesis by A9,XBOOLE_0:def 10; end; thus dom g = bool X by A4; thus rng g c= bool card X proof let x; assume x in rng g; then consider y such that A12: y in dom g and A13: x = g.y by FUNCT_1:def 3; A14: f.:y c= rng f by RELAT_1:111; g.y = f.:y by A4,A12; hence thesis by A3,A13,A14; end; let x; A15: f"x c= dom f by RELAT_1:132; assume x in bool card X; then f.:(f"x) = x by A3,FUNCT_1:77; then g.(f"x) = x by A2,A4,A15; hence thesis by A2,A4,A15,FUNCT_1:def 3; end; hence thesis by CARD_1:5; end; deffunc g(set) = $1`1; theorem Z in Funcs(X,Y) implies Z,X are_equipotent & card Z = card X proof assume Z in Funcs(X,Y); then consider f such that A1: Z = f and A2: dom f = X and rng f c= Y by FUNCT_2:def 2; thus Z,X are_equipotent proof consider g such that A3: dom g = Z & for x st x in Z holds g.x = g(x) from FUNCT_1:sch 3; take g; thus g is one-to-one proof let x,y; assume that A4: x in dom g and A5: y in dom g; A6: g.x = x`1 & g.y = y`1 by A3,A4,A5; ex x1,x2 being set st [x1,x2] = y by A1,A3,A5,RELAT_1:def 1; then A7: y = [y`1,y`2] by MCART_1:8; ex x1,x2 being set st [x1,x2] = x by A1,A3,A4,RELAT_1:def 1; then A8: x = [x`1,x`2] by MCART_1:8; then x`2 = f.(x`1) by A1,A3,A4,FUNCT_1:1; hence thesis by A1,A3,A5,A8,A7,A6,FUNCT_1:1; end; thus dom g = Z by A3; thus rng g c= X proof let x; assume x in rng g; then consider y such that A9: y in dom g and A10: x = g.y by FUNCT_1:def 3; ex x1,x2 being set st [x1,x2] = y by A1,A3,A9,RELAT_1:def 1; then A11: y = [y`1,y`2] by MCART_1:8; x = y`1 by A3,A9,A10; hence thesis by A1,A2,A3,A9,A11,FUNCT_1:1; end; let x; assume x in X; then A12: [x,f.x] in Z by A1,A2,FUNCT_1:def 2; then g.[x,f.x] = [x,f.x]`1 by A3 .= x; hence thesis by A3,A12,FUNCT_1:def 3; end; hence thesis by CARD_1:5; end; Lm1: x1 <> x2 implies A+^B,[:A,{x1}:] \/ [:B,{x2}:] are_equipotent & card(A+^B ) = card([:A,{x1}:] \/ [:B,{x2}:]) proof defpred C[set] means $1 in A; deffunc F(set) = [$1,x1]; deffunc G(Ordinal) = [$1-^A,x2]; consider f such that A1: dom f = A+^B and A2: for x being Ordinal holds x in A+^B implies (C[x] implies f.x = F(x) ) & (not C[x] implies f.x = G(x)) from FINSET_1:sch 1; assume A3: x1 <> x2; thus A+^B,[:A,{x1}:] \/ [:B,{x2}:] are_equipotent proof take f; thus f is one-to-one proof let x,y; assume that A4: x in dom f & y in dom f and A5: f.x = f.y; reconsider C1 = x, C2 = y as Ordinal by A1,A4; per cases; suppose A6: x in A & y in A; A7: [x,x1]`1 = C1; f.C1 = [x,x1] & f.C2 = [y,x1] by A1,A2,A4,A6; hence thesis by A5,A7,MCART_1:7; end; suppose A8: not x in A & not y in A; A9: [C1-^A,x2]`1 = C1-^A; f.x = [C1-^A,x2] & f.y = [C2-^A,x2] by A1,A2,A4,A8; then A10: C1-^A = C2-^A by A5,A9,MCART_1:7; A c= C1 by A8,ORDINAL1:16; then A11: C1 = A+^(C1-^A) by ORDINAL3:def 5; A c= C2 by A8,ORDINAL1:16; hence thesis by A10,A11,ORDINAL3:def 5; end; suppose A12: x in A & not y in A; A13: [x,x1]`2 = x1; f.x = [x,x1] & f.y = [C2-^A,x2] by A1,A2,A4,A12; hence thesis by A3,A5,A13,MCART_1:7; end; suppose A14: not x in A & y in A; A15: [y,x1]`2 = x1; f.y = [y,x1] & f.x = [C1-^A,x2] by A1,A2,A4,A14; hence thesis by A3,A5,A15,MCART_1:7; end; end; thus dom f = A+^B by A1; thus rng f c= [:A,{x1}:] \/ [:B,{x2}:] proof let x; A16: x1 in {x1} by TARSKI:def 1; A17: x2 in {x2} by TARSKI:def 1; assume x in rng f; then consider y such that A18: y in dom f and A19: x = f.y by FUNCT_1:def 3; reconsider C = y as Ordinal by A1,A18; per cases; suppose y in A; then x = [C,x1] & [C,x1] in [:A,{x1}:] by A1,A2,A18,A19,A16,ZFMISC_1:87 ; hence thesis by XBOOLE_0:def 3; end; suppose A20: not y in A; then A c= C by ORDINAL1:16; then A+^(C-^A) = C by ORDINAL3:def 5; then C-^A in B by A1,A18,ORDINAL3:22; then A21: [C-^A,x2] in [:B,{x2}:] by A17,ZFMISC_1:87; x = [C-^A,x2] by A1,A2,A18,A19,A20; hence thesis by A21,XBOOLE_0:def 3; end; end; let x such that A22: x in [:A,{x1}:] \/ [:B,{x2}:]; A23: now assume x in [:B,{x2}:]; then consider y,z such that A24: y in B and A25: z in {x2} and A26: x = [y,z] by ZFMISC_1:84; reconsider y as Ordinal by A24; A27: A+^y in A+^B by A24,ORDINAL2:32; A28: not A+^y in A by ORDINAL1:5,ORDINAL3:24; A+^y-^A = y & z = x2 by A25,ORDINAL3:52,TARSKI:def 1; then x = f.(A+^y) by A2,A26,A27,A28; hence thesis by A1,A27,FUNCT_1:def 3; end; now assume x in [:A,{x1}:]; then consider y,z such that A29: y in A and A30: z in {x1} and A31: x = [y,z] by ZFMISC_1:84; A32: A c= A+^B by ORDINAL3:24; z = x1 by A30,TARSKI:def 1; then x = f.y by A2,A29,A31,A32; hence thesis by A1,A29,A32,FUNCT_1:def 3; end; hence thesis by A22,A23,XBOOLE_0:def 3; end; hence thesis by CARD_1:5; end; deffunc plus(set,set) = [:$1,{0}:] \/ [:$2,{1}:]; Lm2: [:X,Y:],[:Y,X:] are_equipotent & card [:X,Y:] = card [:Y,X:] proof deffunc f(set) = [$1`2,$1`1]; consider f such that A1: dom f = [:X,Y:] & for x st x in [:X,Y:] holds f.x = f(x) from FUNCT_1:sch 3; thus [:X,Y:],[:Y,X:] are_equipotent proof take f; thus f is one-to-one proof let x,y; assume A2: x in dom f & y in dom f; then A3: x = [x`1,x`2] & y = [y`1,y`2] by A1,MCART_1:21; assume A4: f.x = f.y; A5: f.x = [x`2,x`1] & f.y = [y`2,y `1] by A1,A2; then x`1 = y`1 by A4,XTUPLE_0:1; hence thesis by A3,A5,A4,XTUPLE_0:1; end; thus dom f = [:X,Y:] by A1; thus rng f c= [:Y,X:] proof let x; assume x in rng f; then consider y such that A6: y in dom f and A7: x = f.y by FUNCT_1:def 3; A8: y`2 in Y by A1,A6,MCART_1:10; x = [y`2,y`1] & y`1 in X by A1,A6,A7,MCART_1:10; hence thesis by A8,ZFMISC_1:87; end; let x; A9: [x`2,x`1]`1 = x`2 & [x`2,x`1]`2 = x`1; assume A10: x in [:Y,X:]; then A11: x = [x`1,x`2] by MCART_1:21; A12: x`1 in Y & x`2 in X by A10,MCART_1:10; then [x`2,x`1] in [:X,Y:] by ZFMISC_1:87; then f.[x`2,x`1] in rng f by A1,FUNCT_1:def 3; hence thesis by A1,A11,A12,A9,ZFMISC_1:87; end; hence thesis by CARD_1:5; end; definition let M,N; func M +` N -> Cardinal equals card( M +^ N); coherence; commutativity proof let C be Cardinal; let M,N; assume C = card( M +^ N); hence C = card plus( N, M) by Lm1 .= card( N +^ M) by Lm1; end; func M *` N -> Cardinal equals card [:M,N:]; coherence; commutativity by Lm2; func exp(M,N) -> Cardinal equals card Funcs(N,M); coherence; end; theorem Th4: [:X,Y:],[:Y,X:] are_equipotent & card [:X,Y:] = card [:Y,X:] by Lm2; theorem Th5: [:[:X,Y:],Z:],[:X,[:Y,Z:]:] are_equipotent & card [:[:X,Y:],Z:] = card [:X,[:Y,Z:]:] proof deffunc f(set) = [$1`1`1,[$1`1`2,$1`2]]; consider f such that A1: dom f = [:[:X,Y:],Z:] & for x st x in [:[:X,Y:],Z:] holds f.x = f(x) from FUNCT_1:sch 3; thus [:[:X,Y:],Z:],[:X,[:Y,Z:]:] are_equipotent proof take f; thus f is one-to-one proof let x,y; assume that A2: x in dom f and A3: y in dom f; assume A4: f.x = f.y; A5: x = [x`1,x`2] & y = [y`1,y`2] by A1,A2,A3,MCART_1:21; x`1 in [:X,Y:] by A1,A2,MCART_1:10; then A6: x`1 = [x`1`1,x`1`2 ] by MCART_1:21; A7: f.x = [x`1`1,[x`1`2,x`2]] & f.y = [y`1`1,[y`1`2,y`2]] by A1,A2,A3; then A8: x`1`1 = y`1`1 by A4,XTUPLE_0:1; y`1 in [:X,Y :] by A1,A3,MCART_1:10; then A9: y`1 = [y`1`1,y`1`2] by MCART_1:21; A10: [x`1`2,x`2] = [y`1`2,y`2] by A7,A4,XTUPLE_0:1; then x`1`2 = y`1`2 by XTUPLE_0:1; hence thesis by A5,A8,A10,A6,A9,XTUPLE_0:1; end; thus dom f = [:[:X,Y:],Z:] by A1; thus rng f c= [:X,[:Y,Z:]:] proof let x; assume x in rng f; then consider y such that A11: y in dom f and A12: x = f.y by FUNCT_1:def 3; A13: y`1 in [:X,Y:] by A1,A11,MCART_1:10; then A14: y`1`2 in Y by MCART_1:10; y`2 in Z by A1,A11,MCART_1:10; then A15: [y`1`2,y`2] in [:Y,Z:] by A14,ZFMISC_1:87; A16: y`1`1 in X by A13,MCART_1:10; x = [y`1`1,[y`1`2,y`2]] by A1,A11,A12; hence thesis by A16,A15,ZFMISC_1:87; end; let x; A17: [x`1,x`2`1]`1 = x`1 & [x`1,x`2`1]`2 = x`2 `1; A18: [[x`1,x`2`1],x`2`2]`1 = [x`1,x`2`1] & [[x`1,x`2`1],x`2`2]`2 = x`2`2; assume A19: x in [:X,[:Y,Z:]:]; then A20: x`2 in [:Y,Z:] by MCART_1:10; then A21: x`2`1 in Y by MCART_1:10; A22: x`2`2 in Z by A20,MCART_1:10; x`1 in X by A19,MCART_1:10; then A23: [x`1,x`2`1] in [:X,Y:] by A21,ZFMISC_1:87; then A24: [[x`1,x`2`1],x`2`2] in [:[:X,Y:],Z:] by A22,ZFMISC_1:87; A25: x`2 = [x`2`1,x`2`2] by A20,MCART_1:21; x = [x`1,x`2] by A19,MCART_1:21; then x = f.[[x`1,x`2`1],x`2`2] by A1,A25,A17,A23,A18,A22,ZFMISC_1:87; hence thesis by A1,A24,FUNCT_1:def 3; end; hence thesis by CARD_1:5; end; theorem Th6: X,[:X,{x}:] are_equipotent & card X = card [:X,{x}:] proof deffunc f(set) = [$1,x]; consider f such that A1: dom f = X & for y st y in X holds f.y = f(y) from FUNCT_1:sch 3; thus X,[:X,{x}:] are_equipotent proof take f; thus f is one-to-one proof let y,z; assume that A2: y in dom f & z in dom f and A3: f.y = f.z; A4: [y,x]`1 = y; f.y = [y,x] & f.z = [z,x] by A1,A2; hence thesis by A3,A4,MCART_1:7; end; thus dom f = X by A1; thus rng f c= [:X,{x}:] proof let y; A5: x in {x} by TARSKI:def 1; assume y in rng f; then consider z such that A6: z in dom f and A7: y = f.z by FUNCT_1:def 3; y = [z,x] by A1,A6,A7; hence thesis by A1,A6,A5,ZFMISC_1:87; end; let y; assume y in [:X,{x}:]; then consider y1,y2 being set such that A8: y1 in X and A9: y2 in {x} and A10: y = [y1,y2] by ZFMISC_1:84; y2 = x by A9,TARSKI:def 1; then y = f.y1 by A1,A8,A10; hence thesis by A1,A8,FUNCT_1:def 3; end; hence thesis by CARD_1:5; end; Lm3: [:X,Y:],[:card X,Y:] are_equipotent proof consider f such that A1: f is one-to-one and A2: dom f = X and A3: rng f = card X by CARD_1:def 2,WELLORD2:def 4; deffunc g(set) = [f.$1`1,$1`2]; consider g such that A4: dom g = [:X,Y:] & for x st x in [:X,Y:] holds g.x = g(x) from FUNCT_1:sch 3; take g; thus g is one-to-one proof let x,y; assume A5: x in dom g & y in dom g; then A6: x`1 in X & y`1 in X by A4,MCART_1:10; assume A7: g.x = g.y; g.x = [f.x`1,x`2] & g.y = [f.y`1,y `2] by A4,A5; then A8: f.x`1 = f.y`1 & x`2 = y`2 by A7,XTUPLE_0:1; x = [x`1,x`2] & y = [y`1,y`2] by A4,A5,MCART_1:21; hence thesis by A1,A2,A6,A8,FUNCT_1:def 4; end; thus dom g = [:X,Y:] by A4; thus rng g c= [:card X,Y:] proof let y; assume y in rng g; then consider x such that A9: x in dom g and A10: y = g.x by FUNCT_1:def 3; x`1 in X by A4,A9,MCART_1:10; then A11: f.x`1 in card X by A2,A3,FUNCT_1:def 3; y = [f.x`1,x`2] & x`2 in Y by A4,A9,A10,MCART_1:10; hence thesis by A11,ZFMISC_1:87; end; let y; assume A12: y in [:card X,Y:]; then y`1 in card X by MCART_1:10; then consider x such that A13: x in X and A14: y`1 = f.x by A2,A3,FUNCT_1:def 3; A15: y = [y`1,y`2] by A12,MCART_1:21; A16: y`2 in Y by A12,MCART_1:10; then A17: [x,y`2] in [:X,Y:] by A13,ZFMISC_1:87; [x,y`2]`1 = x & [x,y`2]`2 = y`2; then g.[x,y`2] = y by A4,A15,A14,A16,A13,ZFMISC_1:87; hence thesis by A4,A17,FUNCT_1:def 3; end; theorem Th7: [:X,Y:],[:card X,Y:] are_equipotent & [:X,Y:],[:X,card Y:] are_equipotent & [:X,Y:],[:card X,card Y:] are_equipotent & card [:X,Y:] = card [:card X,Y:] & card [:X,Y:] = card [:X,card Y:] & card [:X,Y:] = card [:card X, card Y:] proof [:Y,X:],[:card Y,X:] are_equipotent & [:X,Y:],[:Y,X:] are_equipotent by Lm2 ,Lm3; then A1: [:X,Y:],[:card Y,X:] are_equipotent by WELLORD2:15; A2: [:card Y,X:],[:X,card Y:] are_equipotent by Lm2; hence A3: [:X,Y:],[:card X,Y:] are_equipotent & [:X,Y:],[:X,card Y:] are_equipotent by A1,Lm3,WELLORD2:15; [:X,card Y:],[:card X,card Y:] are_equipotent by Lm3; hence [:X,Y:],[:card X,card Y:] are_equipotent by A3,WELLORD2:15; hence thesis by A2,A1,Lm3,CARD_1:5,WELLORD2:15; end; theorem Th8: X1,Y1 are_equipotent & X2,Y2 are_equipotent implies [:X1,X2:],[: Y1,Y2:] are_equipotent & card [:X1,X2:] = card [:Y1,Y2:] proof assume X1,Y1 are_equipotent & X2,Y2 are_equipotent; then A1: card X1 = card Y1 & card X2 = card Y2 by CARD_1:5; [:X1,X2:],[:card X1,card X2:] are_equipotent & [:Y1,Y2:],[:card Y1,card Y2:] are_equipotent by Th7; hence [:X1,X2:],[:Y1,Y2:] are_equipotent by A1,WELLORD2:15; hence thesis by CARD_1:5; end; theorem x1 <> x2 implies A+^B,[:A,{x1}:] \/ [:B,{x2}:] are_equipotent & card(A +^B) = card([:A,{x1}:] \/ [:B,{x2}:]) by Lm1; theorem Th10: x1 <> x2 implies K+`M,[:K,{x1}:] \/ [:M,{x2}:] are_equipotent & K+`M = card([:K,{x1}:] \/ [:M,{x2}:]) proof assume x1 <> x2; then card([:K,{x1}:] \/ [:M,{x2}:]) = K+`M by Lm1; hence thesis by CARD_1:def 2; end; theorem Th11: A*^B,[:A,B:] are_equipotent & card(A*^B) = card [:A,B:] proof defpred P[set,set] means ex O1, O2 being Ordinal st O1 = $1`1 & O2 = $1`2 & $2 = O1*^B+^O2; A1: for x st x in [:A,B:] ex y st P[x,y] proof let x; assume x in [:A,B:]; then x`1 in A & x`2 in B by MCART_1:10; then reconsider x1 = x`1, x2 = x`2 as Ordinal; take x1*^B+^x2; take x1, x2; thus thesis; end; consider f such that A2: dom f = [:A,B:] & for x st x in [:A,B:] holds P[x,f.x] from CLASSES1 :sch 1(A1); A3: [:A,B:],A*^B are_equipotent proof take f; thus f is one-to-one proof let x,y; assume A4: x in dom f & y in dom f; then A5: x`2 in B & y`2 in B by A2,MCART_1:10; x`1 in A & y`1 in A by A2,A4,MCART_1:10; then reconsider x1 = x`1, y1 = y`1 as Ordinal; assume A6: f.x = f.y; A7: x = [x`1,x`2] & y = [y`1,y`2] by A2,A4,MCART_1:21; A8: (ex O1, O2 being Ordinal st O1 = x`1 & O2 = x`2 & f.x = O1*^B+^O2 ) & ex O3, O4 being Ordinal st O3 = y`1 & O4 = y`2 & f.y = O3*^B+^O4 by A2,A4; then x1 = y1 by A5,A6,ORDINAL3:48; hence thesis by A7,A5,A8,A6,ORDINAL3:48; end; thus dom f = [:A,B:] by A2; thus rng f c= A*^B proof let y; A9: 1*^B = B by ORDINAL2:39; assume y in rng f; then consider x such that A10: x in dom f and A11: y = f.x by FUNCT_1:def 3; consider x1, x2 being Ordinal such that A12: x1 = x`1 and A13: x2 = x`2 & f.x = x1*^B+^x2 by A2,A10; x1+^1 = succ x1 by ORDINAL2:31; then A14: x1*^B+^1*^B = (succ x1)*^B by ORDINAL3:46; succ x1 c= A by A12,A2,A10,MCART_1:10,ORDINAL1:21; then A15: x1*^B+^1*^B c= A*^B by A14,ORDINAL2:41; y in x1*^B+^1*^B by A11,A13,A9,A2,A10,MCART_1:10,ORDINAL2:32; hence thesis by A15; end; let y; assume A16: y in A*^B; then reconsider C = y as Ordinal; A17: C = (C div^ B)*^B+^(C mod^ B) & [C div^ B,C mod^ B]`1 = C div^ B by ORDINAL3:65; C div^ B in A & C mod^ B in B by A16,ORDINAL3:67; then A18: [C div^ B,C mod^ B] in [:A,B:] by ZFMISC_1:87; then [C div^ B,C mod^ B]`2 = C mod^ B & ex O1, O2 being Ordinal st O1 = [C div^ B,C mod^ B]`1 & O2 = [C div^ B,C mod^ B]`2 & f.[C div^ B,C mod^ B] = O1*^B +^ O2 by A2; hence thesis by A2,A18,A17,FUNCT_1:def 3; end; hence A*^B,[:A,B:] are_equipotent; thus thesis by A3,CARD_1:5; end; deffunc plus(set,set) = [:$1,{0}:] \/ [:$2,{1}:]; deffunc plus(set,set,set,set) = [:$1,{$3}:] \/ [:$2,{$4}:]; theorem Th12: X1,Y1 are_equipotent & X2,Y2 are_equipotent & x1 <> x2 & y1 <> y2 implies [:X1,{x1}:] \/ [:X2,{x2}:],[:Y1,{y1}:] \/ [:Y2,{y2}:] are_equipotent & card ([:X1,{x1}:] \/ [:X2,{x2}:]) = card ([:Y1,{y1}:] \/ [:Y2,{y2}:]) proof assume that A1: X1,Y1 are_equipotent and A2: X2,Y2 are_equipotent and A3: x1 <> x2 and A4: y1 <> y2; {x2},{y2} are_equipotent by CARD_1:28; then A5: [:X2,{x2}:],[:Y2,{y2}:] are_equipotent by A2,Th8; A6: now assume [:Y1,{y1}:] meets [:Y2,{y2}:]; then consider y being set such that A7: y in [:Y1,{y1}:] and A8: y in [:Y2,{y2}:] by XBOOLE_0:3; y`2 in {y1} by A7,MCART_1:10; then A9: y`2 = y1 by TARSKI:def 1; y`2 in {y2} by A8,MCART_1:10; hence contradiction by A4,A9,TARSKI:def 1; end; A10: now assume [:X1,{x1}:] meets [:X2,{x2}:]; then consider x being set such that A11: x in [:X1,{x1}:] and A12: x in [:X2,{x2}:] by XBOOLE_0:3; x`2 in {x1} by A11,MCART_1:10; then A13: x`2 = x1 by TARSKI:def 1; x`2 in {x2} by A12,MCART_1:10; hence contradiction by A3,A13,TARSKI:def 1; end; {x1},{y1} are_equipotent by CARD_1:28; then [:X1,{x1}:],[:Y1,{y1}:] are_equipotent by A1,Th8; hence [:X1,{x1}:] \/ [:X2,{x2}:],[:Y1,{y1}:] \/ [:Y2,{y2}:] are_equipotent by A5,A10,A6,CARD_1:31; hence thesis by CARD_1:5; end; theorem Th13: card(A+^B) = card A +` card B proof A1: A+^B,plus(A,B) are_equipotent by Lm1; A,card A are_equipotent & B,card B are_equipotent by CARD_1:def 2; then A2: plus(A,B),plus( card A, card B) are_equipotent by Th12; plus( card A, card B),card A +^ card B are_equipotent by Lm1; then plus(A,B),card A +^ card B are_equipotent by A2,WELLORD2:15; then A+^B,card A +^ card B are_equipotent by A1,WELLORD2:15; hence thesis by CARD_1:5; end; theorem Th14: card(A*^B) = card A *` card B proof thus card (A*^B) = card [:A,B:] by Th11 .= card A *` card B by Th7; end; theorem [:X,{0}:] \/ [:Y,{1}:],[:Y,{0}:] \/ [:X,{1}:] are_equipotent & card([: X,{0}:] \/ [:Y,{1}:]) = card([:Y,{0}:] \/ [:X,{1}:]) by Th12; theorem Th16: [:X1,X2:] \/ [:Y1,Y2:],[:X2,X1:] \/ [:Y2,Y1:] are_equipotent & card ([:X1,X2:] \/ [:Y1,Y2:]) = card ([:X2,X1:] \/ [:Y2,Y1:]) proof deffunc f(set) = [$1`2,$1`1]; consider f such that A1: dom f = [:X1,X2:] \/ [:Y1,Y2:] & for x st x in [:X1,X2:] \/ [:Y1,Y2 :] holds f.x = f(x) from FUNCT_1:sch 3; thus [:X1,X2:] \/ [:Y1,Y2:],[:X2,X1:] \/ [:Y2,Y1:] are_equipotent proof take f; thus f is one-to-one proof let x1,x2; assume that A2: x1 in dom f and A3: x2 in dom f and A4: f.x1 = f.x2; x1 in [:X1,X2:] or x1 in [:Y1,Y2:] by A1,A2,XBOOLE_0:def 3; then A5: x1 = [x1`1,x1`2] by MCART_1:21; x2 in [:X1,X2:] or x2 in [:Y1,Y2:] by A1,A3,XBOOLE_0:def 3; then A6: x2 = [x2`1,x2`2] by MCART_1:21; A7: f.x1 = [x1`2,x1`1] & f.x2 = [x2`2,x2`1] by A1,A2,A3; then x1`1 = x2`1 by A4,XTUPLE_0:1; hence thesis by A4,A7,A5,A6,XTUPLE_0:1; end; thus dom f = [:X1,X2:] \/ [:Y1,Y2:] by A1; thus rng f c= [:X2,X1:] \/ [:Y2,Y1:] proof let x; assume x in rng f; then consider y such that A8: y in dom f and A9: x = f.y by FUNCT_1:def 3; y in [:X1,X2:] or y in [:Y1,Y2:] by A1,A8,XBOOLE_0:def 3; then A10: y`1 in X1 & y`2 in X2 or y`1 in Y1 & y`2 in Y2 by MCART_1:10; x = [y`2,y`1] by A1,A8,A9; then x in [:X2,X1:] or x in [:Y2,Y1:] by A10,ZFMISC_1:87; hence thesis by XBOOLE_0:def 3; end; let x; A11: [x`2,x`1]`1 = x`2 & [x`2,x`1]`2 = x`1; assume x in [:X2,X1:] \/ [:Y2,Y1:]; then A12: x in [:X2,X1:] or x in [:Y2,Y1:] by XBOOLE_0:def 3; then x`1 in X2 & x`2 in X1 or x`1 in Y2 & x`2 in Y1 by MCART_1:10; then [x`2,x`1] in [:X1,X2:] or [x`2,x`1] in [:Y1,Y2:] by ZFMISC_1:87; then A13: [x`2,x`1] in [:X1,X2:] \/ [:Y1,Y2:] by XBOOLE_0:def 3; x = [x`1,x`2] by A12,MCART_1:21; then f.[x`2,x`1] = x by A1,A13,A11; hence thesis by A1,A13,FUNCT_1:def 3; end; hence thesis by CARD_1:5; end; theorem Th17: x <> y implies card X +` card Y = card([:X,{x}:] \/ [:Y,{y}:]) proof assume A1: x <> y; X,card X are_equipotent & Y,card Y are_equipotent by CARD_1:def 2; then card plus(X,Y,x,y) = card plus(card X,card Y,x,y) by A1,Th12; hence thesis by A1,Lm1; end; theorem M+`0 = M proof thus M+`0 = card plus(M,{}) by Lm1 .= card M by Th6 .= M by CARD_1:def 2; end; Lm4: x <> y implies [:X,{x}:] misses [:Y,{y}:] proof assume A1: x <> y; assume not thesis; then consider z being set such that A2: z in [:X,{x}:] and A3: z in [:Y,{y}:] by XBOOLE_0:3; z`2 = x by A2,MCART_1:13; hence contradiction by A1,A3,MCART_1:13; end; theorem Th19: (K+`M)+`N = K+`(M+`N) proof A1: card(K+`M+`N) = K+`M+`N; A2: K+`M+`N,[:K+`M,{0}:] \/ [:N,{2}:] are_equipotent by Th10; [:M,{1}:] misses [:N,{2}:] by Lm4; then A3: [:M,{1}:] /\ [:N,{2}:] = {} by XBOOLE_0:def 7; [:K,{0}:] misses [:N,{2}:] by Lm4; then [:K,{0}:] /\ [:N,{2}:] = {} by XBOOLE_0:def 7; then ([:K,{0}:] \/ [:M,{1}:]) /\ [:N,{2}:] = {} \/ {} by A3,XBOOLE_1:23 .= {}; then A4: ([:K,{0}:] \/ [:M,{1}:]) misses [:N,{2}:] by XBOOLE_0:def 7; K+`M,[:K,{0}:] \/ [:M,{1}:] are_equipotent & K+`M,[:K+`M,{0}:] are_equipotent by Th6,Th10; then A5: [:K+`M,{0}:],[:K,{0}:] \/ [:M,{1}:] are_equipotent by WELLORD2:15; [:K,{0}:] misses [:N,{2}:] by Lm4; then A6: [:K,{0}:] /\ [:N,{2}:] = {} by XBOOLE_0:def 7; [:K,{0}:] misses [:M,{1}:] by Lm4; then [:K,{0}:] /\ [:M,{1}:] = {} by XBOOLE_0:def 7; then [:K,{0}:] /\ ([:M,{1}:] \/ [:N,{2}:]) = {} \/ {} by A6,XBOOLE_1:23 .= {}; then A7: [:K,{0}:] misses ([:M,{1}:] \/ [:N,{2}:]) by XBOOLE_0:def 7; M+`N,[:M,{1}:] \/ [:N,{2}:] are_equipotent & M+`N,[:M+`N,{2}:] are_equipotent by Th6,Th10; then A8: [:M+`N,{2}:],[:M,{1}:] \/ [:N,{2}:] are_equipotent by WELLORD2:15; [:K,{0}:] misses [:M+`N,{2}:] by Lm4; then A9: [:K,{0}:] \/ ([:M,{1}:] \/ [:N,{2}:]),[:K,{0}:] \/ [:M+`N,{2}:] are_equipotent by A7,A8,CARD_1:31; [:K+`M,{0}:] misses [:N,{2}:] by Lm4; then A10: [:K+`M,{0}:] \/ [:N,{2}:], [:K,{0}:] \/ [:M,{1}:] \/ [:N,{2}:] are_equipotent by A4,A5,CARD_1:31; [:K,{0}:] \/ ([:M,{1}:] \/ [:N,{2}:]) = [:K,{0}:] \/ [:M,{1}:] \/ [:N,{ 2}:] by XBOOLE_1:4; then [:K+`M,{0}:] \/ [:N,{2}:],[:K,{0}:] \/ [:M+`N,{2}:] are_equipotent by A10,A9,WELLORD2:15; then A11: K+`M+`N,[:K,{0}:] \/ [:M+`N,{2}:] are_equipotent by A2,WELLORD2:15; [:K,{0}:] \/ [:M+`N,{2}:],K+`(M+`N) are_equipotent by Th10; then K+`M+`N,K+`(M+`N) are_equipotent by A11,WELLORD2:15; hence thesis by A1,CARD_1:def 2; end; theorem K*`0 = 0; theorem Th21: K*`1 = K proof K = card K by CARD_1:def 2; hence thesis by Th6,ORDINAL3:15; end; theorem Th22: (K*`M)*`N = K*`(M*`N) proof thus (K*`M)*`N = card [:[:K,M:],N:] by Th7 .= card [:K,[:M,N:]:] by Th5 .= K*`(M*`N) by Th7; end; theorem Th23: 2*`K = K+`K proof thus 2*`K = card([:{{}},K:] \/ [:{1},K:]) by CARD_1:50,ZFMISC_1:109 .= card([:K,{{}}:] \/ [:K,{1}:]) by Th16 .= card K +` card K by Th17 .= K +` card K by CARD_1:def 2 .= K +` K by CARD_1:def 2; end; theorem Th24: K*`(M+`N) = K*`M +` K*`N proof A1: [:card [:K,M:],{0}:],[:[:K,M:],{0}:] are_equipotent by Th7; M,[:M,{0}:] are_equipotent by Th6; then A2: [:K,M:],[:K,[:M,{0}:]:] are_equipotent by Th8; [:[:K,M:],{0}:],[:K,M:] are_equipotent by Th6; then [:[:K,M:],{0}:],[:K,[:M,{0}:]:] are_equipotent by A2,WELLORD2:15; then A3: [:card [:K,M:],{0}:],[:K,[:M,{0}:]:] are_equipotent by A1,WELLORD2:15; A4: [:card [:K,N:],{1}:],[:[:K,N:],{1}:] are_equipotent by Th7; [:M,{0}:] misses [:N,{1}:] by Lm4; then A5: [:K,[:M,{0}:]:] misses [:K,[:N,{1}:]:] by ZFMISC_1:104; N,[:N,{1}:] are_equipotent by Th6; then A6: [:K,N:],[:K,[:N,{1}:]:] are_equipotent by Th8; A7: K*`(M+`N) = card [:K,card plus(M,N):] by Th10 .= card [:K,plus(M,N):] by Th7 .= card ([:K,[:M,{0}:]:] \/ [:K,[:N,{1}:]:]) by ZFMISC_1:97; [:[:K,N:],{1}:],[:K,N:] are_equipotent by Th6; then [:[:K,N:],{1}:],[:K,[:N,{1}:]:] are_equipotent by A6,WELLORD2:15; then A8: [:card [:K,N:],{1}:],[:K,[:N,{1}:]:] are_equipotent by A4,WELLORD2:15; [:card [:K,M:],{0}:] misses [:card [:K,N:],{1}:] by Lm4; then [:card [:K,M:],{0}:] \/ [:card [:K,N:],{1}:], [:K,[:M,{0}:]:] \/ [:K,[: N,{1}:]:] are_equipotent by A3,A8,A5,CARD_1:31; hence K*`(M+`N) = card([:card [:K,M:],{0}:] \/ [:card [:K,N:],{1}:]) by A7, CARD_1:5 .= K*`M +` K*`N by Th10; end; theorem exp(K,0) = 1 proof thus exp(K,0) = card {{}} by FUNCT_5:57 .= 1 by CARD_1:30; end; theorem K <> 0 implies exp(0,K) = 0; theorem exp(K,1) = K & exp(1,K) = 1 proof thus exp(K,1) = card K by FUNCT_5:58,ORDINAL3:15 .= K by CARD_1:def 2; thus exp(1,K) = card {K --> {}} by FUNCT_5:59,ORDINAL3:15 .= 1 by CARD_1:30; end; theorem exp(K,M+`N) = exp(K,M)*`exp(K,N) proof A1: [:M,{0}:] misses [:N,{1}:] by ZFMISC_1:108; [:M,{0}:],M are_equipotent by Th6; then A2: Funcs([:M,{0}:],K),Funcs(M,K) are_equipotent by FUNCT_5:60; [:N,{1}:],N are_equipotent by Th6; then A3: Funcs([:N,{1}:],K),Funcs(N,K) are_equipotent by FUNCT_5:60; M+`N,[:M,{0}:] \/ [:N,{1}:] are_equipotent by Th10; hence exp(K,M+`N) = card Funcs([:M,{0}:] \/ [:N,{1}:],K) by FUNCT_5:60 .= card [:Funcs([:M,{0}:],K),Funcs([:N,{1}:],K):] by A1,FUNCT_5:62 .= card [:Funcs(M,K),Funcs(N,K):] by A2,A3,Th8 .= exp(K,M)*`exp(K,N) by Th7; end; theorem exp(K*`M,N) = exp(K,N)*`exp(M,N) proof card(K*`M) = K*`M & card N = card N; hence exp(K*`M,N) = card Funcs(N,[:K,M:]) by FUNCT_5:61 .= card [:Funcs(N,K),Funcs(N,M):] by FUNCT_5:64 .= exp(K,N)*`exp(M,N) by Th7; end; theorem exp(K,M*`N) = exp(exp(K,M),N) proof A1: Funcs(M,K),card Funcs(M,K) are_equipotent by CARD_1:def 2; [:M,N:],M*`N are_equipotent & [:N,M:],[:M,N:] are_equipotent by Lm2, CARD_1:def 2; then [:N,M:],M*`N are_equipotent by WELLORD2:15; hence exp(K,M*`N) = card Funcs([:N,M:],K) by FUNCT_5:60 .= card Funcs(N,Funcs(M,K)) by FUNCT_5:63 .= exp(exp(K,M),N) by A1,FUNCT_5:60; end; theorem exp(2,card X) = card bool X proof card card X = card X & card 2 = card {{},1} by CARD_1:50; hence exp(2,card X) = card Funcs(X,{{},1}) by FUNCT_5:61 .= card bool X by FUNCT_5:65; end; theorem exp(K,2) = K*`K by CARD_1:50,FUNCT_5:66; theorem exp(K+`M,2) = K*`K +` 2*`K*`M +` M*`M proof thus exp(K+`M,2) = (K+`M)*`(K+`M) by CARD_1:50,FUNCT_5:66 .= K*`(K+`M) +` M*`(K+`M) by Th24 .= K*`K +` K*`M +` M*`(K+`M) by Th24 .= K*`K +` K*`M +` (M*`K +` M*`M) by Th24 .= K*`K +` K*`M +` K*`M +` M*`M by Th19 .= K*`K +` (K*`M +` K*`M) +` M*`M by Th19 .= K*`K +` 2*`(K*`M) +` M*`M by Th23 .= K*`K +` 2*`K*`M +` M*`M by Th22; end; theorem Th34: card(X \/ Y) c= card X +` card Y proof consider f such that A1: dom f = plus(X,Y) & for x st x in plus(X,Y) holds f.x = g(x) from FUNCT_1:sch 3; X \/ Y c= rng f proof let x; assume x in X \/ Y; then A2: x in X or x in Y by XBOOLE_0:def 3; per cases; suppose x in X; then [x,0] in [:X,{0}:] by ZFMISC_1:106; then A3: [x,0] in plus(X,Y) by XBOOLE_0:def 3; [x,0]`1 = x; then x = f.[x,0] by A1,A3; hence thesis by A1,A3,FUNCT_1:def 3; end; suppose not x in X; then [x,1] in [:Y,{1}:] by A2,ZFMISC_1:106; then A4: [x,1] in plus(X,Y) by XBOOLE_0:def 3; [x,1]`1 = x; then x = f.[x,1] by A1,A4; hence thesis by A1,A4,FUNCT_1:def 3; end; end; then card(X \/ Y) c= card plus(X,Y) by A1,CARD_1:12; hence thesis by Th17; end; theorem Th35: X misses Y implies card (X \/ Y) = card X +` card Y proof assume A1: X misses Y; X,[:X,{0}:] are_equipotent & [:X,{0}:],[:card X,{0}:] are_equipotent by Th6 ,Th7; then A2: X,[:card X,{0}:] are_equipotent by WELLORD2:15; Y,[:Y,{1}:] are_equipotent & [:Y,{1}:],[:card Y,{1}:] are_equipotent by Th6 ,Th7; then A3: Y,[:card Y,{1}:] are_equipotent by WELLORD2:15; [:card X,{0}:] misses [:card Y,{1}:] by Lm4; then X \/ Y,[:card X,{0}:] \/ [:card Y,{1}:] are_equipotent by A1,A2,A3, CARD_1:31; hence card (X \/ Y) = card ([:card X,{0}:] \/ [:card Y,{1}:]) by CARD_1:5 .= card X +` card Y by Th10; end; reserve m,n for Element of NAT; theorem Th36: n+m = n +^ m proof defpred P[Element of NAT] means n+$1 = n +^ $1; A1: for m st P[m] holds P[m+1] proof let m such that A2: P[m]; thus n+(m+1) = n+m+1 .= succ( n +^ m) by A2,NAT_1:38 .= n +^ succ m by ORDINAL2:28 .= n +^ (m+1) by NAT_1:38; end; A3: P[0] by ORDINAL2:27; for m holds P[m] from NAT_1:sch 1(A3,A1); hence thesis; end; theorem Th37: n*m = n *^ m proof defpred P[Element of NAT] means $1*m = $1 *^ m; A1: for n st P[n] holds P[n+1] proof let n such that A2: P[n]; thus (n+1)*m = n*m+1*m .= n *^ m +^ m by A2,Th36 .= n *^ m +^ 1 *^ m by ORDINAL2:39 .= ( n +^ 1) *^ m by ORDINAL3:46 .= (succ n) *^ m by ORDINAL2:31 .= (n+1) *^ m by NAT_1:38; end; A3: P[0] by ORDINAL2:35; for n holds P[n] from NAT_1:sch 1(A3,A1); hence thesis; end; theorem Th38: card(n+m) = card n +` card m proof thus card(n+m) = card( n +^ m) by Th36 .= card n +` card m by Th13; end; theorem Th39: card(n*m) = card n *` card m proof thus card(n*m) = card( n *^ m) by Th37 .= card n *` card m by Th14; end; theorem Th40: for X,Y being finite set st X misses Y holds card (X \/ Y) = card X + card Y proof let X,Y be finite set; assume X misses Y; then card card (X \/ Y) = card card X +` card card Y by Th35 .= card (card X + card Y) by Th38; hence thesis by CARD_1:40; end; theorem Th41: for X being finite set st not x in X holds card (X \/ {x}) = card X + 1 proof let X be finite set; A1: card {x} = 1 by CARD_1:30; assume not x in X; hence thesis by A1,Th40,ZFMISC_1:50; end; theorem Th42: for X being set holds card X = 1 iff ex x st X = {x} proof let X be set; card {0} = 1 by CARD_1:30; hence card X = 1 implies ex x st X = {x} by CARD_1:29; given x such that A1: X = {x}; thus thesis by A1,CARD_1:30; end; theorem Th43: for X,Y being finite set holds card(X \/ Y) <= card X + card Y proof let X,Y be finite set; card X = card card X & card Y = card card Y; then card X +` card Y = card(card X + card Y) by Th38; then card card(X \/ Y) = card(X \/ Y) & card (X \/ Y) c= card(card X + card Y ) by Th34; hence thesis by NAT_1:40; end; theorem Th44: for X,Y being finite set st Y c= X holds card (X \ Y) = card X - card Y proof let X,Y be finite set; defpred P[set] means ex S being finite set st S = $1 & card (X \ S) = card X - card S; card X - 0 = card X & X \ {} = X; then A1: P[{}] by CARD_1:27; assume A2: Y c= X; A3: for X1,Z being set st X1 in Y & Z c= Y & P[Z] holds P[Z \/ {X1}] proof let X1,Z be set such that A4: X1 in Y and A5: Z c= Y and A6: P[Z] and A7: not P[Z \/ {X1}]; A8: card {X1} = 1 by CARD_1:30; A9: now assume X1 in Z; then {X1} c= Z by ZFMISC_1:31; then Z = Z \/ {X1} by XBOOLE_1:12; hence P[Z \/ {X1}] by A6; end; then A10: X1 in X \ Z by A2,A4,A7,XBOOLE_0:def 5; then consider m being Nat such that A11: card (X \ Z) = m+1 by NAT_1:6; reconsider Z1 = Z as finite set by A5; A12: X \ Z, card (X \ Z) are_equipotent & X \ (Z \/ {X1}) = X \ Z \ {X1} by CARD_1:def 2,XBOOLE_1:41; card { X1} = 1 by CARD_1:30; then A13: card Z1 + card {X1} = card (Z1 \/ {X1}) by A7,A9,Th41; m+1 = succ m by NAT_1:38; then m in m+1 & m = m+1 \ {m} by ORDINAL1:6,37; then X \ (Z \/ {X1}), m are_equipotent by A10,A11,A12,CARD_1:34; then card (X \ (Z \/ {X1})) = card X - card (Z1 \/ {X1}) by A6,A13,A11,A8, CARD_1:def 2; hence contradiction by A7; end; A14: Y is finite; P[Y] from FINSET_1:sch 2(A14,A1,A3); hence thesis; end; theorem for X,Y being finite set holds card (X \/ Y) = card X + card Y - card (X /\ Y) proof let X,Y be finite set; Y \ X = Y \ X /\ Y by XBOOLE_1:47; then A1: card (Y \ X) = card Y - card (X /\ Y) by Th44,XBOOLE_1:17; card (X \/ (Y \ X)) = card X + card (Y \ X) by Th40,XBOOLE_1:79; hence thesis by A1,XBOOLE_1:39; end; theorem for X,Y being finite set holds card [:X,Y:] = card X * card Y proof let X,Y be finite set; card card [:X,Y:] = card card X *` card card Y by Th7 .= card (card X * card Y) by Th39; hence thesis by CARD_1:40; end; theorem for f being finite Function holds card rng f <= card dom f by CARD_1:12,NAT_1:39; theorem for X,Y being finite set st X c< Y holds card X < card Y & card X in card Y proof let X,Y be finite set; assume A1: X c< Y; then X c= Y by XBOOLE_0:def 8; then A2: Y = X \/ (Y\X) by XBOOLE_1:45; then A3: card Y = card X + card (Y\X) by Th40,XBOOLE_1:79; then A4: card X <= card Y by NAT_1:11; now assume card (Y\X) = 0; then Y \ X = {}; hence contradiction by A1,A2; end; then card X <> card Y by A3; hence card X < card Y by A4,XXREAL_0:1; hence thesis by NAT_1:44; end; theorem (card X c= card Y or card X in card Y) & Y is finite implies X is finite proof assume that A1: card X c= card Y or card X in card Y and A2: Y is finite; card X c= card Y by A1,ORDINAL1:def 2; hence thesis by A2; end; reserve x1,x2,x3,x4,x5,x6,x7,x8 for set; theorem Th50: card {x1,x2} <= 2 proof A1: {x1,x2} = {x1} \/ {x2} & 1+1 = 2 by ENUMSET1:1; card {x1} = 1 & card {x2} = 1 by CARD_1:30; hence thesis by A1,Th43; end; theorem Th51: card {x1,x2,x3} <= 3 proof card {x2,x3} <= 2 by Th50; then A1: 1 + card {x2,x3} <= 1+2 by XREAL_1:7; card {x1} = 1 & {x1,x2,x3} = {x1} \/ {x2,x3} by CARD_1:30,ENUMSET1:2; then card {x1,x2,x3} <= 1 + card {x2,x3} by Th43; hence thesis by A1,XXREAL_0:2; end; theorem Th52: card {x1,x2,x3,x4} <= 4 proof card {x2,x3,x4} <= 3 by Th51; then A1: 1 + card {x2,x3,x4} <= 1+3 by XREAL_1:7; card {x1} = 1 & {x1,x2,x3,x4} = {x1} \/ {x2,x3,x4} by CARD_1:30,ENUMSET1:4; then card {x1,x2,x3,x4} <= 1 + card {x2,x3,x4 } by Th43; hence thesis by A1,XXREAL_0:2; end; theorem Th53: card {x1,x2,x3,x4,x5} <= 5 proof card {x2,x3,x4,x5} <= 4 by Th52; then A1: 1 + card {x2,x3,x4,x5} <= 1+4 by XREAL_1:7; card {x1} = 1 & {x1,x2,x3,x4,x5} = {x1} \/ {x2,x3,x4,x5} by CARD_1:30 ,ENUMSET1:7; then card {x1,x2,x3,x4,x5} <= 1 + card {x2,x3,x4,x5} by Th43; hence thesis by A1,XXREAL_0:2; end; theorem Th54: card {x1,x2,x3,x4,x5,x6} <= 6 proof card {x2,x3,x4,x5,x6} <= 5 by Th53; then A1: 1 + card {x2,x3,x4,x5,x6} <= 1+5 by XREAL_1:7; card {x1} = 1 & {x1,x2,x3,x4,x5,x6} = {x1} \/ {x2,x3,x4,x5,x6} by CARD_1:30 ,ENUMSET1:11; then card {x1,x2,x3,x4,x5,x6} <= 1 + card {x2,x3,x4,x5,x6} by Th43; hence thesis by A1,XXREAL_0:2; end; theorem Th55: card {x1,x2,x3,x4,x5,x6,x7} <= 7 proof card {x2,x3,x4,x5,x6,x7} <= 6 by Th54; then A1: 1 + card {x2,x3,x4,x5,x6,x7} <= 1+6 by XREAL_1:7; card {x1} = 1 & {x1,x2,x3,x4,x5,x6,x7} = {x1} \/ {x2,x3,x4,x5,x6,x7} by CARD_1:30,ENUMSET1:16; then card {x1,x2,x3,x4,x5,x6,x7} <= 1 + card {x2,x3,x4,x5,x6,x7} by Th43; hence thesis by A1,XXREAL_0:2; end; theorem card {x1,x2,x3,x4,x5,x6,x7,x8} <= 8 proof card {x2,x3,x4,x5,x6,x7,x8} <= 7 by Th55; then A1: 1 + card {x2,x3,x4,x5,x6,x7,x8} <= 1+7 by XREAL_1:7; {x1,x2,x3,x4,x5,x6,x7,x8} = {x1} \/ {x2,x3,x4,x5,x6,x7,x8} & card {x1} = 1 by CARD_1:30,ENUMSET1:22; then card {x1,x2,x3,x4,x5,x6,x7,x8} <= 1 + card {x2,x3,x4,x5,x6,x7,x8} by Th43; hence thesis by A1,XXREAL_0:2; end; theorem Th57: x1 <> x2 implies card {x1,x2} = 2 proof A1: card {x1} = 1 & card {x2} = 1 by CARD_1:30; A2: {x1,x2} = {x1} \/ {x2} & 1+1 = 2 by ENUMSET1:1; assume x1 <> x2; hence thesis by A1,A2,Th40,ZFMISC_1:11; end; theorem Th58: x1 <> x2 & x1 <> x3 & x2 <> x3 implies card {x1,x2,x3} = 3 proof assume x1 <> x2 & x1 <> x3 & x2 <> x3; then A1: card {x1,x2} = 2 & not x3 in {x1,x2} by Th57,TARSKI:def 2; {x1,x2,x3} = {x1,x2} \/ {x3} by ENUMSET1:3; hence card {x1,x2,x3} = 2+1 by A1,Th41 .= 3; end; theorem Th59: x1 <> x2 & x1 <> x3 & x1 <> x4 & x2 <> x3 & x2 <> x4 & x3 <> x4 implies card {x1,x2,x3,x4} = 4 proof assume x1 <> x2 & x1 <> x3 & x1 <> x4 & x2 <> x3 & x2 <> x4 & x3 <> x4; then A1: card {x1,x2,x3} = 3 & not x4 in {x1,x2,x3} by Th58,ENUMSET1:def 1; {x1,x2,x3,x4} = {x1,x2,x3} \/ {x4} by ENUMSET1:6; hence card {x1,x2,x3,x4} = 3+1 by A1,Th41 .= 4; end; begin theorem for X being set st card X = 2 ex x,y st x <> y & X = {x,y} proof let X be set; assume A1: card X = 2; then consider x being set such that A2: x in X by CARD_1:27,XBOOLE_0:def 1; X is finite by A1; then reconsider Y = X as finite set; {x} c= X by A2,ZFMISC_1:31; then card(X \ {x}) = card Y - card{x} by Th44 .= 2 - 1 by A1,CARD_1:30; then consider y such that A3: X \ {x} = {y} by Th42; take x,y; x in {x} by TARSKI:def 1; hence x <> y by A3,XBOOLE_0:def 5; thus X c= {x,y} proof let z be set; assume A4: z in X; per cases; suppose z = x; hence thesis by TARSKI:def 2; end; suppose z <> x; then not z in {x} by TARSKI:def 1; then z in {y} by A3,A4,XBOOLE_0:def 5; then z = y by TARSKI:def 1; hence thesis by TARSKI:def 2; end; end; let z be set; assume z in {x,y}; then A5: z = x or z = y by TARSKI:def 2; y in X \ {x} by A3,TARSKI:def 1; hence thesis by A2,A5; end; theorem for f being Function holds card rng f c= card dom f proof let f be Function; rng f = f.:dom f by RELAT_1:113; hence thesis by CARD_1:66; end; Lm5: now let n; assume A1: for Z being finite set holds card Z = n & Z <> {} & (for X,Y st X in Z & Y in Z holds X c= Y or Y c= X) implies union Z in Z; let Z be finite set; assume that A2: card Z = n + 1 and A3: Z <> {} and A4: for X,Y st X in Z & Y in Z holds X c= Y or Y c= X; set y = the Element of Z; per cases; suppose n = 0; then consider x such that A5: Z = {x} by A2,Th42; union Z = x by A5,ZFMISC_1:25; hence union Z in Z by A5,TARSKI:def 1; end; suppose A6: n <> 0; set Y = Z \ {y}; reconsider Y as finite set; {y} c= Z by A3,ZFMISC_1:31; then A7: card Y = (n + 1) - card{y} by A2,Th44 .= n + 1 - 1 by CARD_1:30 .= n; for a,b being set st a in Y & b in Y holds a c= b or b c= a by A4; then A8: union Y in Y by A1,A6,A7,CARD_1:27; then A9: union Y in Z; Z = (Z \ {y}) \/ {y} proof thus Z c= (Z \ {y}) \/ {y} proof let x; assume x in Z; then x in Z \ {y} or x in {y} by XBOOLE_0:def 5; hence thesis by XBOOLE_0:def 3; end; let x; assume x in (Z \ {y}) \/ {y}; then A10: x in (Z \ {y}) or x in {y} by XBOOLE_0:def 3; {y} c= Z by A3,ZFMISC_1:31; hence thesis by A10; end; then A11: union Z = union Y \/ union {y} by ZFMISC_1:78 .= union Y \/ y by ZFMISC_1:25; A12: y in Z by A3; y c= union Y or union Y c= y by A4,A8; hence union Z in Z by A9,A12,A11,XBOOLE_1:12; end; end; Lm6: for Z being finite set holds Z <> {} & (for X,Y st X in Z & Y in Z holds X c= Y or Y c= X) implies union Z in Z proof defpred P[Element of NAT] means for Z being finite set st card Z = $1 & Z <> {} & (for X,Y st X in Z & Y in Z holds X c= Y or Y c= X) holds union Z in Z; let Z be finite set; A1: card Z = card Z; A2: P[0]; A3: for k be Element of NAT st P[k] holds P[k+1] by Lm5; for n holds P[n] from NAT_1:sch 1(A2,A3); hence thesis by A1; end; theorem Z <> {} & Z is finite & (for X,Y st X in Z & Y in Z holds X c= Y or Y c= X) implies union Z in Z by Lm6; theorem x1,x2,x3,x4,x5 are_mutually_different implies card {x1,x2,x3,x4,x5} = 5 proof A1: {x1,x2,x3,x4,x5} = {x1,x2,x3,x4} \/ {x5} by ENUMSET1:10; assume A2: x1,x2,x3,x4,x5 are_mutually_different; then A3: x3 <> x5 & x4 <> x5 by ZFMISC_1:def 7; A4: x2 <> x4 & x3 <> x4 by A2,ZFMISC_1:def 7; A5: x1 <> x4 & x2 <> x3 by A2,ZFMISC_1:def 7; x1 <> x5 & x2 <> x5 by A2,ZFMISC_1:def 7; then A6: not x5 in {x1,x2,x3,x4} by A3,ENUMSET1:def 2; x1 <> x2 & x1 <> x3 by A2,ZFMISC_1:def 7; then card {x1,x2,x3,x4} = 4 by A5,A4,Th59; hence card {x1,x2,x3,x4,x5} = 4+1 by A6,A1,Th41 .= 5; end; theorem for M1, M2 being set st card M1 = 0 & card M2 = 0 holds M1 = M2 proof let M1, M2 be set; assume that A1: card M1 = {} and A2: card M2 = {}; M1 = {} by A1; hence thesis by A2; end; registration let x,y; cluster [x,y] -> non natural; coherence proof assume [x,y] is natural; then reconsider n = [x,y] as Nat; card n <= 2 by Th50; then A1: n <= 2 by CARD_1:def 2; per cases by A1,NAT_1:26; suppose n = 0; hence contradiction; end; suppose n = 1; hence contradiction by CARD_1:49,ZFMISC_1:4; end; suppose n = 2; hence contradiction by CARD_1:50,ZFMISC_1:6; end; end; end; begin reserve A,B,C for Ordinal, K,L,M,N for Cardinal, x,y,y1,y2,z,u,X,Y,Z,Z1,Z2 for set, n for Nat, f,f1,g,h for Function, Q,R for Relation; theorem Sum(M --> N) = M*`N proof thus Sum(M --> N) = card [:N,M:] by CARD_3:25 .= M*`N by Lm2; end; theorem Product(N --> M) = exp(M,N) by CARD_3:11; scheme FinRegularity { X()->finite set, P[set,set] }: ex x st x in X() & for y st y in X() & y <> x holds not P[y,x] provided A1: X() <> {} and A2: for x,y st P[x,y] & P[y,x] holds x = y and A3: for x,y,z st P[x,y] & P[y,z] holds P[x,z] proof defpred Q[Nat] means for X being finite set st card X = $1 & X <> {} ex x st x in X & for y st y in X & y <> x holds not P[y,x]; A4: Q[0]; A5: Q[n] implies Q[n+1] proof assume A6: for X being finite set st card X = n & X <> {} ex x st x in X & for y st y in X & y <> x holds not P[y,x]; let X be finite set; assume that A7: card X = n+1 and A8: X <> {}; set x = the Element of X; A9: now assume X\{x} = {}; then A10: X c= {x} by XBOOLE_1:37; thus thesis proof take x; thus x in X by A8; thus thesis by A10,TARSKI:def 1; end; end; now assume A11: X\{x} <> {}; {x} c= X by A8,ZFMISC_1:31; then A12: card (X\{x}) = (n+1) - card {x} by A7,Th44; card {x} = 1 by CARD_1:30; then consider y such that A13: y in X\{x} and A14: for z st z in X\{x} & z <> y holds not P[z,y] by A6,A11,A12; A15: now assume A16: P[x,y]; thus thesis proof take x; thus x in X by A8; let z; assume that A17: z in X and A18: z <> x and A19: P[z,x]; not z in {x} by A18,TARSKI:def 1; then A20: z in X \ {x} by A17,XBOOLE_0:def 5; A21: not y in {x} by A13,XBOOLE_0:def 5; A22: z = y by A3,A14,A16,A19,A20; y <> x by A21,TARSKI:def 1; hence contradiction by A2,A16,A19,A22; end; end; now assume A23: not P[x,y]; thus thesis proof take y; thus y in X by A13; let z such that A24: z in X and A25: z <> y; z in {x} or not z in {x}; then z = x or z in X \ {x} by A24,TARSKI:def 1,XBOOLE_0:def 5; hence thesis by A14,A23,A25; end; end; hence thesis by A15; end; hence thesis by A9; end; A26: Q[n] from NAT_1:sch 2(A4,A5); card X() = card X(); hence thesis by A1,A26; end; scheme MaxFinSetElem { X()->finite set, P[set,set] }: ex x st x in X() & for y st y in X() holds P[x,y] provided A1: X() <> {} and A2: for x,y holds P[x,y] or P[y,x] and A3: for x,y,z st P[x,y] & P[y,z] holds P[x,z] proof defpred Q[Nat] means for X being finite set st card X = $1 & X <> {} ex x st x in X & for y st y in X holds P[x,y]; A4: Q[0]; A5: Q[n] implies Q[n+1] proof assume A6: for X being finite set st card X = n & X <> {} ex x st x in X & for y st y in X holds P[x,y]; let X be finite set; assume that A7: card X = n+1 and A8: X <> {}; set x = the Element of X; A9: now assume X\{x} = {}; then A10: X c= {x} by XBOOLE_1:37; thus thesis proof take x; thus x in X by A8; let y; assume y in X; then y = x by A10,TARSKI:def 1; hence thesis by A2; end; end; now assume A11: X\{x} <> {}; {x} c= X by A8,ZFMISC_1:31; then A12: card (X\{x}) = (n+1) - card {x} by A7,Th44; card {x} = 1 by CARD_1:30; then consider y such that A13: y in X\{x} and A14: for z st z in X\{x} holds P[y,z] by A6,A11,A12; A15: P[x,y] or P[y,x] by A2; A16: P[x,x] by A2; P[y,y] by A2; then consider z such that A17: z = x or z = y and A18: P[z,x] and A19: P[z,y] by A15,A16; thus thesis proof take z; thus z in X by A13,A17; let u; A20: u in {x} or not u in {x}; assume u in X; then u = x or u in X\{x} by A20,TARSKI:def 1,XBOOLE_0:def 5; then P[z,u] or P[y,u] by A14,A18; hence thesis by A3,A19; end; end; hence thesis by A9; end; A21: Q[n] from NAT_1:sch 2(A4,A5); card X() = card X(); hence thesis by A1,A21; end; Lm7: Rank n is finite implies Rank (n+1) is finite proof n+1 = succ n by NAT_1:38; then Rank (n+1) = bool Rank n by CLASSES1:30; hence thesis; end; Lm8: 1 = card 1 by CARD_1:def 2; Lm9: 2 = card 2 by CARD_1:def 2; theorem Rank n is finite proof defpred P[Nat] means Rank $1 is finite; A1: P[0] by CLASSES1:29; A2: for n st P[n] holds P[n+1] by Lm7; for n holds P[n] from NAT_1:sch 2(A1,A2); hence thesis; end; theorem 0 in M iff 1 c= M proof 0+1 = 1; then nextcard card 0 = card 1 by NAT_1:42; hence thesis by Lm8,CARD_3:90; end; theorem 1 in M iff 2 c= M proof 1+1 = 2; then nextcard card 1 = card 2 by NAT_1:42; hence thesis by Lm8,Lm9,CARD_3:90; end; reserve n,k for Nat; theorem Th70: A is limit_ordinal iff for B,n st B in A holds B+^ n in A proof thus A is limit_ordinal implies for B,n st B in A holds B+^ n in A proof assume A1: A is limit_ordinal; let B,n; defpred P[Nat] means B+^ $1 in A; assume B in A; then A2: P[0] by ORDINAL2:27; A3: P[k] implies P[k+1] proof (k+1) = succ k by NAT_1:38; then B+^(k+1) = succ (B+^ k) by ORDINAL2:28; hence thesis by A1,ORDINAL1:28; end; P[k] from NAT_1:sch 2(A2,A3); hence thesis; end; assume A4: for B,n st B in A holds B+^ n in A; now let B; assume B in A; then B+^ 1 in A by A4; hence succ B in A by ORDINAL2:31; end; hence thesis by ORDINAL1:28; end; theorem Th71: A+^succ n = succ A +^ n & A +^ (n+1) = succ A +^ n proof defpred P[Nat] means A+^succ $1 = succ A +^ $1; A+^succ 0 = succ A by ORDINAL2:31 .= succ A +^ 0 by ORDINAL2:27; then A1: P[0]; A2: P[k] implies P[k+1] proof assume A3: P[k]; A4: k+1 = succ k by NAT_1:38; hence A+^succ (k+1) = succ (succ A +^ k) by A3,ORDINAL2:28 .= succ A +^ k +^ 1 by ORDINAL2:31 .= succ A +^ ( k +^ 1) by ORDINAL3:30 .= succ A +^ (k+1) by A4,ORDINAL2:31; end; P[k] from NAT_1:sch 2(A1,A2); hence A+^succ n = succ A +^ n; hence thesis by NAT_1:38; end; theorem Th72: ex n st A*^succ 1 = A +^ n proof defpred P[Ordinal] means ex n st $1*^2 = $1+^ n; {}+^{} = {} by ORDINAL2:27; then A1: P[0] by ORDINAL2:35; A2: for A st P[A] holds P[succ A] proof let A; given n such that A3: A*^2 = A+^ n; take n+1; (succ A)*^2 = A*^2+^2 by ORDINAL2:36 .= succ(A*^succ 1+^1) by ORDINAL2:28 .= succ succ(A+^ n) by A3,ORDINAL2:31 .= succ (A+^succ n) by ORDINAL2:28 .= succ (A+^ (n+1)) by NAT_1:38 .= A+^succ (n+1) by ORDINAL2:28; hence thesis by Th71; end; A4: for A st A <> {} & A is limit_ordinal & for B st B in A holds P[B] holds P[A] proof let A; assume that A5: A <> {} and A6: A is limit_ordinal and A7: for B st B in A holds P[B]; take 0; deffunc f(Ordinal) = $1*^2; consider phi being Ordinal-Sequence such that A8: dom phi = A and A9: for B st B in A holds phi.B = f(B) from ORDINAL2:sch 3; A10: A*^2 = union sup phi by A5,A6,A8,A9,ORDINAL2:37 .= union sup rng phi by ORDINAL2:26; thus A*^2 c= A+^ 0 proof let B; assume B in A*^2; then consider X such that A11: B in X and A12: X in sup rng phi by A10,TARSKI:def 4; reconsider X as Ordinal by A12; consider C being Ordinal such that A13: C in rng phi and A14: X c= C by A12,ORDINAL2:21; consider x such that A15: x in dom phi and A16: C = phi.x by A13,FUNCT_1:def 3; reconsider x as Ordinal by A15; A17: ex n st x*^2 = x+^ n by A7,A8,A15; C = x*^2 by A8,A9,A15,A16; then A18: C in A by A6,A8,A15,A17,Th70; A+^{} = A by ORDINAL2:27; hence thesis by A11,A14,A18,ORDINAL1:10; end; A19: 1 in succ 1 by ORDINAL1:6; A20: A+^ 0 = A by ORDINAL2:27; A21: A = A*^1 by ORDINAL2:39; 1 c= 2 by A19,ORDINAL1:def 2; hence thesis by A20,A21,ORDINAL2:42; end; for A holds P[A] from ORDINAL2:sch 1(A1,A2,A4); hence thesis; end; theorem Th73: A is limit_ordinal implies A *^ succ 1 = A proof consider n such that A1: A*^2 = A+^ n by Th72; assume A is limit_ordinal; then A2: A+^ n is limit_ordinal by A1,ORDINAL3:40; now assume n <> 0; then consider k being Nat such that A3: n = k+1 by NAT_1:6; reconsider k as Element of NAT by ORDINAL1:def 12; n = succ k by A3,NAT_1:38; then A+^ n = succ(A+^ k) by ORDINAL2:28; hence contradiction by A2,ORDINAL1:29; end; hence thesis by A1,ORDINAL2:27; end; Lm10: omega is limit_ordinal by ORDINAL1:def 11; theorem Th74: omega c= A implies 1+^A = A proof deffunc f(Ordinal) = 1+^$1; consider phi being Ordinal-Sequence such that A1: dom phi = omega & for B st B in omega holds phi.B = f(B) from ORDINAL2:sch 3; A2: 1+^omega = sup phi by A1,Lm10,ORDINAL2:29 .= sup rng phi by ORDINAL2:26; A3: 1+^omega c= omega proof let B; assume B in 1+^omega; then consider C being Ordinal such that A4: C in rng phi and A5: B c= C by A2,ORDINAL2:21; consider x such that A6: x in dom phi and A7: C = phi.x by A4,FUNCT_1:def 3; reconsider x as Ordinal by A6; reconsider x9 = x as Cardinal by A1,A6; reconsider x as finite Ordinal by A1,A6; A8: C = 1+^x by A1,A6,A7; succ x in omega by A1,A6,Lm10,ORDINAL1:28; then C in omega by A8,ORDINAL2:31; hence thesis by A5,ORDINAL1:12; end; assume omega c= A; then A9: ex B st A = omega+^B by ORDINAL3:27; omega c= 1+^omega by ORDINAL3:24; then omega = 1+^omega by A3,XBOOLE_0:def 10; hence thesis by A9,ORDINAL3:30; end; registration cluster infinite -> limit_ordinal for Cardinal; coherence proof let M be Cardinal; assume M is infinite; then A1: not M in omega; assume not thesis; then consider A such that A2: M = succ A by ORDINAL1:29; omega <> M & omega c= M iff omega c< M by XBOOLE_0:def 8; then omega = succ A or omega in succ A by A1,A2,CARD_1:4,ORDINAL1:11; then A3: omega c= A by Lm10,ORDINAL1:22,29; card (A+^1) = card 1 +` card A by Th13 .= card (1+^A) by Th13 .= card A by A3,Th74; then card succ A = card A by ORDINAL2:31; then A4: A,succ A are_equipotent by CARD_1:5; A5: not succ A c= A by ORDINAL1:5,6; ex B st succ A = B & for A st A,B are_equipotent holds B c= A by A2, CARD_1:def 1; hence contradiction by A4,A5; end; end; theorem Th75: not M is finite implies M+`M = M proof assume not M is finite; then M*^succ 1 = M by Th73; then card M = (card 2)*`card M by Th14 .= card (succ 1*^ M) by Th14 .= card (1*^ M+^ M) by ORDINAL2:36 .= M+`M by ORDINAL2:39; hence thesis by CARD_1:def 2; end; theorem Th76: not M is finite & (N c= M or N in M) implies M+`N = M & N+`M = M proof assume that A1: not M is finite and A2: N c= M or N in M; A3: M+`M = M by A1,Th75; N c= M by A2,CARD_1:3; then A4: M +^ N c= M +^ M by ORDINAL2:33; A5: M c= M +^ N by ORDINAL3:24; A6: card M = M by A3; A7: M+`N c= M by A3,A4,CARD_1:11; M c= M+`N by A5,A6,CARD_1:11; hence thesis by A7,XBOOLE_0:def 10; end; theorem not X is finite & (X,Y are_equipotent or Y,X are_equipotent) implies X \/ Y,X are_equipotent & card (X \/ Y) = card X proof assume that A1: not X is finite and A2: X,Y are_equipotent or Y,X are_equipotent; A3: card X = card Y by A2,CARD_1:5; A4: card X c= card (X \/ Y) by CARD_1:11,XBOOLE_1:7; A5: card (X \/ Y) c= card X +` card Y by Th34; card X +` card Y = card X by A1,A3,Th75; then card X = card (X \/ Y) by A4,A5,XBOOLE_0:def 10; hence thesis by CARD_1:5; end; theorem not X is finite & Y is finite implies X \/ Y,X are_equipotent & card (X \/ Y) = card X proof assume that A1: not X is finite and A2: Y is finite; card Y in card X by A1,A2,CARD_3:86; then A3: card X +` card Y = card X by A1,Th76; A4: card (X \/ Y) c= card X +` card Y by Th34; card X c= card (X \/ Y) by CARD_1:11,XBOOLE_1:7; then card X = card (X \/ Y) by A3,A4,XBOOLE_0:def 10; hence thesis by CARD_1:5; end; theorem not X is finite & (card Y in card X or card Y c= card X) implies X \/ Y,X are_equipotent & card (X \/ Y) = card X proof assume that A1: not X is finite and A2: card Y in card X or card Y c= card X; A3: card X +` card Y = card X by A1,A2,Th76; A4: card (X \/ Y) c= card X +` card Y by Th34; card X c= card (X \/ Y) by CARD_1:11,XBOOLE_1:7; then card X = card (X \/ Y) by A3,A4,XBOOLE_0:def 10; hence thesis by CARD_1:5; end; theorem for M,N being finite Cardinal holds M+`N is finite proof let M,N be finite Cardinal; A1: card M = M by CARD_1:def 2; card N = N by CARD_1:def 2; then M+`N = card (card M + card N) by A1,Th38; hence thesis; end; theorem not M is finite implies not M+`N is finite & not N+`M is finite proof assume A1: not M is finite; M c= N or N c= M; then M c= N & not N is finite or M+`N = M & N+`M = M by A1,Th76; hence thesis by A1,Th76; end; theorem for M,N being finite Cardinal holds M*`N is finite; theorem Th83: K in L & M in N or K c= L & M in N or K in L & M c= N or K c= L & M c= N implies K+`M c= L+`N & M+`K c= L+`N proof assume that A1: K in L & M in N or K c= L & M in N or K in L & M c= N or K c= L & M c= N; A2: K c= L by A1,CARD_1:3; A3: M c= N by A1,CARD_1:3; A4: K+`M = card ( K +^ M); A5: K +^ M c= L +^ N by A2,A3,ORDINAL3:18; hence K+`M c= L+`N by CARD_1:11; thus thesis by A4,A5,CARD_1:11; end; theorem M in N or M c= N implies K+`M c= K+`N & K+`M c= N+`K & M+`K c= K+`N & M+`K c= N+`K by Th83; theorem Th85: X is countable & Y is countable implies X \/ Y is countable proof assume that A1: card X c= omega and A2: card Y c= omega; A3: card (X \/ Y) c= card X +` card Y by Th34; A4: omega +` omega = omega by Th75; card X +` card Y c= omega +` omega by A1,A2,Th83; hence card (X \/ Y) c= omega by A3,A4,XBOOLE_1:1; end; theorem Th86: (card dom f c= M & for x st x in dom f holds card (f.x) c= N) implies card Union f c= M*`N proof assume that A1: card dom f c= M and A2: for x st x in dom f holds card (f.x) c= N; A3: card Union f c= Sum Card f by CARD_3:39; A4: dom Card f = dom f by CARD_3:def 2; A5: dom(dom f --> N) = dom f by FUNCOP_1:13; now let x; assume A6: x in dom Card f; then A7: (Card f).x = card (f.x) by A4,CARD_3:def 2; (dom f --> N).x = N by A4,A6,FUNCOP_1:7; hence (Card f).x c= (dom f --> N).x by A2,A4,A6,A7; end; then Sum Card f c= Sum(dom f --> N) by A4,A5,CARD_3:30; then A8: card Union f c= Sum(dom f --> N) by A3,XBOOLE_1:1; A9: [:card dom f,N:] c= [:M,N:] by A1,ZFMISC_1:95; Sum(dom f --> N) = card [:N,dom f:] by CARD_3:25 .= card [:N,card dom f:] by Th7 .= card [:card dom f,N:] by Th4; then A10: Sum(dom f --> N) c= card [:M,N:] by A9,CARD_1:11; thus thesis by A8,A10,XBOOLE_1:1; end; theorem (card X c= M & for Y st Y in X holds card Y c= N) implies card union X c= M*`N proof assume that A1: card X c= M and A2: for Y st Y in X holds card Y c= N; now let x; assume x in dom id X; then (id X).x in X by FUNCT_1:18; hence card ((id X).x) c= N by A2; end; then card Union id X c= M*`N by A1,Th86; hence thesis; end; theorem Th88: for f st dom f is finite & for x st x in dom f holds f.x is finite holds Union f is finite proof let f; assume that A1: dom f is finite and A2: for x st x in dom f holds f.x is finite; reconsider df = dom f as finite set by A1; now assume dom f <> {}; then A3: df <> {}; defpred P[set,set] means card (f.$2) c= card (f.$1); A4: for x,y holds P[x,y] or P[y,x]; A5: for x,y,z being set st P[x,y] & P[y,z] holds P[x,z] by XBOOLE_1:1; consider x such that A6: x in df & for y st y in df holds P[x,y] from MaxFinSetElem(A3,A4, A5); reconsider fx = f.x as finite set by A2,A6; A7: card Union f c= (card card df) *` (card (f.x)) by A6,Th86; card (f.x) = card card fx; then card Union f c= card ((card df) * (card fx)) by A7,Th39; hence thesis; end; hence thesis by RELAT_1:42,ZFMISC_1:2; end; theorem (omega)*`(card n) c= omega & (card n)*`(omega) c= omega proof defpred P[Nat] means (omega)*`(card $1) c= omega; A1: P[0]; A2: for k being Nat holds P[k] implies P[k+1] proof let k be Nat; assume A3: P[k]; card (k+1) = (k+1) by CARD_1:def 2 .= succ k by NAT_1:38; then card (k+1) = card succ k; then (omega)*`(card (k+1)) = card (succ k *^ omega) by Th14,CARD_1:47 .= card ( k *^ omega +^ omega) by ORDINAL2:36 .= card ( k *^ omega) +` omega by Th13,CARD_1:47 .= (omega)*`(card k) +` omega by Th14,CARD_1:47 .= omega by A3,Th76; hence thesis; end; A4: for k being Nat holds P[k] from NAT_1:sch 2(A1,A2); hence (omega)*`(card n) c= omega; thus thesis by A4; end; theorem Th90: K in L & M in N or K c= L & M in N or K in L & M c= N or K c= L & M c= N implies K*`M c= L*`N & M*`K c= L*`N proof assume that A1: K in L & M in N or K c= L & M in N or K in L & M c= N or K c= L & M c= N; A2: K c= L by A1,CARD_1:3; A3: M c= N by A1,CARD_1:3; A4: K*`M = card [:K,M:]; A5: [:K,M:] c= [:L,N:] by A2,A3,ZFMISC_1:96; hence K*`M c= L*`N by CARD_1:11; thus thesis by A4,A5,CARD_1:11; end; theorem M in N or M c= N implies K*`M c= K*`N & K*`M c= N*`K & M*`K c= K*`N & M*`K c= N*`K by Th90; theorem Th92: K in L & M in N or K c= L & M in N or K in L & M c= N or K c= L & M c= N implies K = 0 or exp(K,M) c= exp(L,N) proof assume that A1: K in L & M in N or K c= L & M in N or K in L & M c= N or K c= L & M c= N; A2: K c= L by A1,CARD_1:3; A3: M c= N by A1,CARD_1:3; now assume L <> {}; then A4: Funcs(N\M,L) <> {}; 0 c= card Funcs(N\M,L); then 0 in card Funcs(N\M,L) by A4,CARD_1:3; then A5: nextcard card 0 c= card Funcs(N\M,L) by CARD_1:def 3; 0+1 = 1; then A6: 1 c= card Funcs(N\M,L) by A5,Lm8,NAT_1:42; A7: M misses (N\M) by XBOOLE_1:79; A8: N = M \/ (N\M) by A3,XBOOLE_1:45; Funcs(M,K) c= Funcs(M,L) by A2,FUNCT_5:56; then A9: exp(K,M) c= card Funcs(M,L) by CARD_1:11; A10: exp(L,N) = card [:Funcs(M,L),Funcs(N\M,L):] by A7,A8,FUNCT_5:62; A11: card [:Funcs(M,L),Funcs(N\M,L):] = card [:card Funcs(M,L),card Funcs(N\ M,L):] by Th7; card Funcs(M,L) *` card Funcs(N\M,L) = card [:card Funcs(M,L),card Funcs(N\M,L):]; then 1 *` card Funcs(M,L) c= exp(L,N) by A6,A10,A11,Th90; then card Funcs(M,L) c= exp(L,N) by Th21; hence thesis by A9,XBOOLE_1:1; end; hence thesis by A1; end; theorem M in N or M c= N implies K = 0 or exp(K,M) c= exp(K,N) & exp(M,K) c= exp(N,K) proof assume that A1: M in N or M c= N and A2: K <> 0; thus exp(K,M) c= exp(K,N) by A1,A2,Th92; M = 0 implies exp(M,K) = 0 by A2; hence thesis by A1,Th92; end; theorem Th94: M c= M+`N & N c= M+`N proof A1: M c= M +^ N by ORDINAL3:24; A2: N c= M +^ N by ORDINAL3:24; A3: card N = N by CARD_1:def 2; card M = M by CARD_1:def 2; then A4: M c= card ( M +^ N) by A1,CARD_1:11; N c= card ( M +^ N) by A2,A3,CARD_1:11; hence thesis by A4; end; theorem N <> 0 implies M c= M*`N & M c= N*`M proof assume A1: N <> 0; A2: card M = M by CARD_1:def 2; card N = N by CARD_1:def 2; then A3: M*`N = card ( M *^ N) by A2,Th14; M c= M *^ N by A1,ORDINAL3:36; hence thesis by A2,A3,CARD_1:11; end; theorem Th96: K in L & M in N implies K+`M in L+`N & M+`K in L+`N proof A1: for K,L,M,N st K in L & M in N & L c= N holds K+`M in L+`N proof let K,L,M,N such that A2: K in L and A3: M in N and A4: L c= N; A5: now assume A6: N is finite; then reconsider N as finite Cardinal; reconsider L,M,K as finite Cardinal by A2,A3,A4,A6,CARD_3:92; A7: card K = K by CARD_1:def 2; A8: card L = L by CARD_1:def 2; A9: card M = M by CARD_1:def 2; A10: card N = N by CARD_1:def 2; A11: K+`M = card (card K + card M) by A7,A9,Th38; A12: L+`N = card (card L + card N) by A8,A10,Th38; A13: card K < card L by A2,A7,A8,NAT_1:41; card M < card N by A3,A9,A10,NAT_1:41; then card K + card M < card L + card N by A13,XREAL_1:8; hence thesis by A11,A12,NAT_1:41; end; now assume A14: not N is finite; then A15: L+`N = N by A4,Th76; A16: omega c= N by A14,CARD_3:85; K c= M & (M is finite or not M is finite) or M c= K & (K is finite or not K is finite); then A17: K is finite & M is finite or K+`M = M or K+`M = K & K in N by A2,A4,Th76 ; now assume that A18: K is finite and A19: M is finite; reconsider K,M as finite Cardinal by A18,A19; A20: card K = K by CARD_1:def 2; card M = M by CARD_1:def 2; then K+`M = card (card K + card M) by A20,Th38 .= (card K + card M) by CARD_1:def 2; hence thesis by A15,A16,TARSKI:def 3; end; hence thesis by A3,A4,A14,A17,Th76; end; hence thesis by A5; end; L c= N or N c= L; hence thesis by A1; end; theorem K+`M in K+`N implies M in N proof assume that A1: K+`M in K+`N and A2: not M in N; N c= M by A2,CARD_1:4; then K+`N c= K+`M by Th83; hence thesis by A1,CARD_1:4; end; theorem card X +` card Y = card X & card Y in card X implies card (X \ Y) = card X proof assume that A1: card X +` card Y = card X and A2: card Y in card X; A3: card X c= card (X \/ Y) by CARD_1:11,XBOOLE_1:7; card (X \/ Y) c= card X by A1,Th34; then A4: card (X \/ Y) = card X by A3,XBOOLE_0:def 10; (X \ Y) \/ Y = X \/ Y by XBOOLE_1:39; then A5: card X = card (X \ Y) +` card Y by A4,Th35,XBOOLE_1:79; then A6: card (X \ Y) c= card X by Th94; A7: now assume not card X is finite; then A8: card X +` card X = card X by Th75; assume not thesis; then card (X \ Y) in card X by A6,CARD_1:3; then card X in card X by A2,A5,A8,Th96; hence contradiction; end; now assume card X is finite; then reconsider X,Y as finite set by A2,CARD_3:92; card Y = card card Y; then card (card X + card Y) = card card X by A1,Th38; then card X + card Y = card X + 0 by CARD_1:40; then Y = {}; hence thesis; end; hence thesis by A7; end; theorem K*`M in K*`N implies M in N proof assume that A1: K*`M in K*`N and A2: not M in N; N c= M by A2,CARD_1:4; then K*`N c= K*`M by Th90; hence thesis by A1,CARD_1:4; end; theorem X is countable & Y is countable implies X \+\ Y is countable proof assume that A1: X is countable and A2: Y is countable; A3: X \ Y is countable by A1; Y \ X is countable by A2; hence thesis by A3,Th85; end; registration let A be finite set, B be set, f be Function of A, Fin B; cluster Union f -> finite; coherence proof now let x be set; assume A1: x in dom f; then reconsider A as non empty set; reconsider x9 = x as Element of A by A1; reconsider f9 = f as Function of A, Fin B; f9.x9 is finite; hence f.x is finite; end; hence thesis by Th88; end; end; registration let f be finite finite-yielding Function; cluster product f -> finite; coherence proof Funcs(dom f, Union f) is finite by FRAENKEL:6; hence thesis by FINSET_1:1,FUNCT_6:1; end; end; theorem for F be Function st dom F is infinite & rng F is finite ex x st x in rng F & F"{x} is infinite proof let F be Function such that A1: dom F is infinite and A2: rng F is finite; deffunc f(set)=F"{$1}; consider g be Function such that A3: dom g = rng F & for x st x in rng F holds g.x = f(x) from FUNCT_1: sch 3; A4: dom F c= Union g proof let x such that A5: x in dom F; A6: F.x in rng F by A5,FUNCT_1:def 3; then A7: g.(F.x) in rng g by A3,FUNCT_1:def 3; F.x in {F.x} by TARSKI:def 1; then A8: x in F"{F.x} by A5,FUNCT_1:def 7; g.(F.x)=F"{F.x} by A3,A6; then x in union rng g by A8,A7,TARSKI:def 4; hence thesis; end; assume A9: for x st x in rng F holds F"{x} is finite; now let x such that A10: x in dom g; g.x=F"{x} by A3,A10; hence g.x is finite by A9,A3,A10; end; then Union g is finite by A2,A3,Th88; hence thesis by A1,A4; end; begin scheme FinInter{m, n() -> Integer, F(set)->set, P[set]}: {F(i) where i is Element of INT: m()<=i & i<=n() & P[i]} is finite proof set F = {F(i) where i is Element of INT: m()<=i & i<=n() & P[i]}; per cases; suppose A1: n() < m(); now assume F <> {}; then consider x being set such that A2: x in F by XBOOLE_0:def 1; ex i being Element of INT st x = F(i) & m()<=i & i<=n() & P[i] by A2; hence contradiction by A1,XXREAL_0:2; end; then reconsider F as empty set; F is finite; hence thesis; end; suppose m() <= n(); then reconsider k = n()-m() as Element of NAT by INT_1:5; set F = {F(i) where i is Element of INT: m()<=i & i<=n() & P[i]}; defpred Q[set,set] means ex i being Integer st $1 = i & $2 = F(i+m()); A3: for e being set st e in k+1 ex u being set st Q[e,u] proof let e be set; assume e in k+1; then reconsider i = e as Nat; take F(i+m()),i; thus thesis; end; consider f being Function such that A4: dom f = k+1 and A5: for i being set st i in k+1 holds Q[i,f.i] from CLASSES1:sch 1(A3); A6: F c= rng f proof let x be set; assume x in F; then consider j being Element of INT such that A7: x=F(j) and A8: m()<=j and A9: j<=n() and P[j]; reconsider l = j-m() as Element of NAT by A8,INT_1:5; l <= k by A9,XREAL_1:9; then l < k+1 by NAT_1:13; then A10: l in k+1 by NAT_1:44; then Q[j-m(),f.(j-m())] by A5; then f.(j-m()) = F(j+m()-m()) .= F(j); hence thesis by A4,A7,A10,FUNCT_1:def 3; end; rng f is finite by A4,FINSET_1:8; hence thesis by A6; end; end; reserve x,y,z,r,s for ext-real number; definition let X be ext-real-membered set; mode UpperBound of X -> ext-real number means :Def1: x in X implies x <= it; existence proof take +infty; thus thesis by XXREAL_0:4; end; mode LowerBound of X -> ext-real number means :Def2: x in X implies it <= x; existence proof take -infty; thus thesis by XXREAL_0:5; end; end; definition let X be ext-real-membered set; func sup X -> ext-real number means :Def3: it is UpperBound of X & for x being UpperBound of X holds it <= x; existence proof defpred Q[set] means $1 is UpperBound of X; defpred P[set] means $1 in X; A1: for r,s st P[r] & Q[s] holds r <= s by Def1; consider s such that A2: for r st P[r] holds r <= s and A3: for r st Q[r] holds s <= r from XXREAL_1:sch 1(A1); take s; thus s is UpperBound of X by A2,Def1; thus thesis by A3; end; uniqueness proof let y,z such that A4: y is UpperBound of X and A5: for x being UpperBound of X holds y <= x and A6: z is UpperBound of X and A7: for x being UpperBound of X holds z <= x; A8: y <= z by A5,A6; z <= y by A4,A7; hence thesis by A8,XXREAL_0:1; end; func inf X -> ext-real number means :Def4: it is LowerBound of X & for x being LowerBound of X holds x <= it; existence proof defpred Q[set] means $1 in X; defpred P[set] means $1 is LowerBound of X; A9: for r,s st P[r] & Q[s] holds r <= s by Def2; consider s such that A10: for r st P[r] holds r <= s and A11: for r st Q[r] holds s <= r from XXREAL_1:sch 1(A9); take s; thus s is LowerBound of X by A11,Def2; thus thesis by A10; end; uniqueness proof let y,z such that A12: y is LowerBound of X and A13: for x being LowerBound of X holds x <= y and A14: z is LowerBound of X and A15: for x being LowerBound of X holds x <= z; A16: z <= y by A13,A14; y <= z by A12,A15; hence thesis by A16,XXREAL_0:1; end; end; definition let X be ext-real-membered set; attr X is left_end means :Def5: inf X in X; attr X is right_end means :Def6: sup X in X; end; theorem Th1: y is UpperBound of {x} iff x <= y proof x in {x} by TARSKI:def 1; hence y is UpperBound of {x} implies x <= y by Def1; assume A1: x <= y; let z; assume z in {x}; hence thesis by A1,TARSKI:def 1; end; theorem Th2: y is LowerBound of {x} iff y <= x proof x in {x} by TARSKI:def 1; hence y is LowerBound of {x} implies y <= x by Def2; assume A1: y <= x; let z; assume z in {x}; hence thesis by A1,TARSKI:def 1; end; Lm1: sup {x} = x proof A1: for z being UpperBound of {x} holds x <= z proof let z be UpperBound of {x}; x in {x} by TARSKI:def 1; hence thesis by Def1; end; x is UpperBound of {x} by Th1; hence thesis by A1,Def3; end; Lm2: inf {x} = x proof A1: for z being LowerBound of {x} holds z <= x proof let z be LowerBound of {x}; x in {x} by TARSKI:def 1; hence thesis by Def2; end; x is LowerBound of {x} by Th2; hence thesis by A1,Def4; end; registration cluster -> ext-real-membered for Element of Fin ExtREAL; coherence proof let X be Element of Fin ExtREAL; X c= ExtREAL by FINSUB_1:def 5; hence thesis; end; end; reserve A,B for ext-real-membered set; theorem Th3: x in A implies inf A <= x proof inf A is LowerBound of A by Def4; hence thesis by Def2; end; theorem Th4: x in A implies x <= sup A proof sup A is UpperBound of A by Def3; hence thesis by Def1; end; theorem Th5: B c= A implies for x being LowerBound of A holds x is LowerBound of B proof assume A1: B c= A; let x be LowerBound of A; let y; assume y in B; hence thesis by A1,Def2; end; theorem Th6: B c= A implies for x being UpperBound of A holds x is UpperBound of B proof assume A1: B c= A; let x be UpperBound of A; let y; assume y in B; hence thesis by A1,Def1; end; theorem Th7: for x being LowerBound of A, y being LowerBound of B holds min(x, y) is LowerBound of A\/ B proof let x be LowerBound of A, y be LowerBound of B; set m = min(x,y); let z; assume A1: z in A \/ B; per cases by A1,XBOOLE_0:def 3; suppose A2: z in A; A3: m <= x by XXREAL_0:17; x <= z by A2,Def2; hence thesis by A3,XXREAL_0:2; end; suppose A4: z in B; A5: m <= y by XXREAL_0:17; y <= z by A4,Def2; hence thesis by A5,XXREAL_0:2; end; end; theorem Th8: for x being UpperBound of A, y being UpperBound of B holds max(x, y) is UpperBound of A\/ B proof let x be UpperBound of A, y be UpperBound of B; set m = max(x,y); let z; assume A1: z in A \/ B; per cases by A1,XBOOLE_0:def 3; suppose A2: z in A; A3: x <= m by XXREAL_0:25; z <= x by A2,Def1; hence thesis by A3,XXREAL_0:2; end; suppose A4: z in B; A5: y <= m by XXREAL_0:25; z <= y by A4,Def1; hence thesis by A5,XXREAL_0:2; end; end; theorem Th9: inf(A \/ B) = min(inf A,inf B) proof set m = min(inf A,inf B); A1: inf B is LowerBound of B by Def4; A2: for x being LowerBound of A \/ B holds x <= m proof let x be LowerBound of A \/ B; x is LowerBound of B by Th5,XBOOLE_1:7; then A3: x <= inf B by Def4; x is LowerBound of A by Th5,XBOOLE_1:7; then x <= inf A by Def4; hence thesis by A3,XXREAL_0:20; end; inf A is LowerBound of A by Def4; then m is LowerBound of A \/ B by A1,Th7; hence thesis by A2,Def4; end; theorem Th10: sup(A \/ B) = max(sup A,sup B) proof set m = max(sup A,sup B); A1: sup B is UpperBound of B by Def3; A2: for x being UpperBound of A \/ B holds m <= x proof let x be UpperBound of A \/ B; x is UpperBound of B by Th6,XBOOLE_1:7; then A3: sup B <= x by Def3; x is UpperBound of A by Th6,XBOOLE_1:7; then sup A <= x by Def3; hence thesis by A3,XXREAL_0:28; end; sup A is UpperBound of A by Def3; then m is UpperBound of A \/ B by A1,Th8; hence thesis by A2,Def3; end; registration cluster finite -> left_end right_end for non empty ext-real-membered set; coherence proof let X be non empty ext-real-membered set; defpred P[non empty ext-real-membered set] means $1 is left_end right_end; assume A1: X is finite; X c= ExtREAL by MEMBERED:2; then A2: X is non empty Element of Fin ExtREAL by A1,FINSUB_1:def 5; A3: for B1,B2 being non empty Element of Fin ExtREAL holds P[B1] & P[B2] implies P[B1 \/ B2] proof let B1,B2 be non empty Element of Fin ExtREAL; assume A4: P[B1]; inf(B1 \/ B2) = min(inf B1,inf B2) by Th9; then A5: inf(B1 \/ B2) = inf B1 or inf(B1 \/ B2) = inf B2 by XXREAL_0:15; assume A6: P[B2]; then A7: inf B2 in B2 by Def5; inf B1 in B1 by A4,Def5; hence inf(B1 \/ B2) in B1 \/ B2 by A7,A5,XBOOLE_0:def 3; sup(B1 \/ B2) = max(sup B1,sup B2) by Th10; then A8: sup(B1 \/ B2) = sup B1 or sup(B1 \/ B2) = sup B2 by XXREAL_0:16; A9: sup B2 in B2 by A6,Def6; sup B1 in B1 by A4,Def6; hence sup(B1 \/ B2) in B1 \/ B2 by A9,A8,XBOOLE_0:def 3; end; A10: for x being Element of ExtREAL holds P[{.x.}] proof let x being Element of ExtREAL; sup {x} = x by Lm1; then A11: sup {x} in {x} by TARSKI:def 1; inf {x} = x by Lm2; then inf {x} in {x} by TARSKI:def 1; hence thesis by A11,Def5,Def6; end; for B being non empty Element of Fin ExtREAL holds P[B] from SETWISEO :sch 3(A10,A3); hence thesis by A2; end; end; registration cluster -> left_end for non empty natural-membered set; coherence proof let X be non empty natural-membered set; defpred P[set] means $1 in X; A1: ex k being Nat st P[k] by MEMBERED:12; consider k being Nat such that A2: P[k] and A3: for n being Nat st P[n] holds k <= n from NAT_1:sch 5(A1); A4: k is LowerBound of X proof let y; assume y in X; hence thesis by A3; end; for x being LowerBound of X holds x <= k by A2,Def2; hence inf X in X by A2,A4,Def4; end; end; registration cluster right_end for non empty natural-membered set; existence proof take {0}; thus thesis; end; end; notation let X be left_end ext-real-membered set; synonym min X for inf X; end; notation let X be right_end ext-real-membered set; synonym max X for sup X; end; definition let X be left_end ext-real-membered set; redefine func min X means :Def7: it in X & for x st x in X holds it <= x; compatibility proof let y; thus y = min X implies y in X & for x st x in X holds y <= x by Def5,Th3; assume that A1: y in X and A2: for x st x in X holds y <= x; A3: for x being LowerBound of X holds x <= y by A1,Def2; y is LowerBound of X by A2,Def2; hence thesis by A3,Def4; end; end; definition let X be right_end ext-real-membered set; redefine func max X means :Def8: it in X & for x st x in X holds x <= it; compatibility proof let y; thus y = max X implies y in X & for x st x in X holds x <= y by Def6,Th4; assume that A1: y in X and A2: for x st x in X holds x <= y; A3: for x being UpperBound of X holds y <= x by A1,Def1; y is UpperBound of X by A2,Def1; hence thesis by A3,Def3; end; end; theorem max{x} = x by Lm1; Lm3: x <= y implies y is UpperBound of {x,y} proof assume A1: x <= y; let z; assume z in {x,y}; hence thesis by A1,TARSKI:def 2; end; Lm4: for z being UpperBound of {x,y} holds y <= z proof let z be UpperBound of {x,y}; y in {x,y} by TARSKI:def 2; hence thesis by Def1; end; theorem max(x,y) = max{x,y} proof now per cases; case A1: x <= y; A2: for z being UpperBound of {x,y} holds y <= z by Lm4; y is UpperBound of {x,y} by A1,Lm3; hence max{x,y} = y by A2,Def3; end; case A3: y < x; A4: for z being UpperBound of {x,y} holds x <= z by Lm4; x is UpperBound of {x,y} by A3,Lm3; hence max{x,y} = x by A4,Def3; end; end; hence thesis by XXREAL_0:def 10; end; theorem min{x} = x by Lm2; Lm5: y <= x implies y is LowerBound of {x,y} proof assume A1: y <= x; let z; assume z in {x,y}; hence thesis by A1,TARSKI:def 2; end; Lm6: for z being LowerBound of {x,y} holds z <= y proof let z be LowerBound of {x,y}; y in {x,y} by TARSKI:def 2; hence thesis by Def2; end; theorem min{x,y} = min(x,y) proof now per cases; case A1: y <= x; A2: for z being LowerBound of {x,y} holds z <= y by Lm6; y is LowerBound of {x,y} by A1,Lm5; hence min{x,y} = y by A2,Def4; end; case A3: x < y; A4: for z being LowerBound of {x,y} holds z <= x by Lm6; x is LowerBound of {x,y} by A3,Lm5; hence min{x,y} = x by A4,Def4; end; end; hence thesis by XXREAL_0:def 9; end; definition let X be ext-real-membered set; attr X is bounded_below means :Def9: ex r being real number st r is LowerBound of X; attr X is bounded_above means :Def10: ex r being real number st r is UpperBound of X; end; registration cluster non empty finite natural-membered for set; existence proof take {0}; thus thesis; end; end; definition let X be ext-real-membered set; attr X is real-bounded means :Def11: X is bounded_below bounded_above; end; registration cluster real-bounded -> bounded_above bounded_below for ext-real-membered set; coherence by Def11; cluster bounded_above bounded_below -> real-bounded for ext-real-membered set; coherence by Def11; end; registration cluster finite -> real-bounded for real-membered set; coherence proof let X be real-membered set; assume A1: X is finite; per cases; suppose A2: X is empty; thus X is bounded_below proof take 0; let x; thus thesis by A2; end; take 0; let x; thus thesis by A2; end; suppose X is non empty; then reconsider Y=X as non empty finite real-membered set by A1; inf Y in X by Def5; then reconsider m = inf X as real number; thus X is bounded_below proof take m; let x; assume x in X; hence thesis by Th3; end; sup Y in X by Def6; then reconsider m = sup X as real number; take m; let x; assume x in X; hence thesis by Th4; end; end; end; registration cluster real-bounded for non empty natural-membered set; existence proof take {0}; thus thesis; end; end; theorem Th15: for X being non empty real-membered set st X is bounded_below holds inf X in REAL proof let X be non empty real-membered set; given r being real number such that A1: r is LowerBound of X; consider s being real number such that A2: s in X by MEMBERED:9; A3: inf X <= s by A2,Th3; A4: r in REAL by XREAL_0:def 1; A5: s in REAL by XREAL_0:def 1; r <= inf X by A1,Def4; hence thesis by A4,A5,A3,XXREAL_0:45; end; theorem Th16: for X being non empty real-membered set st X is bounded_above holds sup X in REAL proof let X be non empty real-membered set; given r being real number such that A1: r is UpperBound of X; consider s being real number such that A2: s in X by MEMBERED:9; A3: s <= sup X by A2,Th4; A4: r in REAL by XREAL_0:def 1; A5: s in REAL by XREAL_0:def 1; sup X <= r by A1,Def3; hence thesis by A4,A5,A3,XXREAL_0:45; end; registration let X be bounded_above non empty real-membered set; cluster sup X -> real; coherence proof sup X in REAL by Th16; hence thesis; end; end; registration let X be bounded_below non empty real-membered set; cluster inf X -> real; coherence proof inf X in REAL by Th15; hence thesis; end; end; registration cluster bounded_above -> right_end for non empty integer-membered set; coherence proof let X be non empty integer-membered set; assume X is bounded_above; then reconsider Y=X as bounded_above non empty integer-membered set; set s = sup Y; A1: [\ s /] <= s by INT_1:def 6; [\ s /] is UpperBound of X proof let x; assume x in X; hence thesis by Th4,INT_1:54; end; then s <= [\ s /] by Def3; then reconsider s as Integer by A1,XXREAL_0:1; assume A2: not sup X in X; s - 1 is UpperBound of X proof let x; assume A3: x in X; then reconsider i=x as Integer; i <= s by A3,Th4; then i < s by A2,A3,XXREAL_0:1; hence thesis by INT_1:52; end; then s - 1 >= s by Def3; hence contradiction by XREAL_1:146; end; end; registration cluster bounded_below -> left_end for non empty integer-membered set; coherence proof let X be non empty integer-membered set; assume X is bounded_below; then reconsider Y=X as bounded_below non empty integer-membered set; set s = inf Y; A1: [/ s \] >= s by INT_1:def 7; [/ s \] is LowerBound of X proof let x; assume x in X; hence thesis by Th3,INT_1:65; end; then [/ s \] <= s by Def4; then reconsider s as Integer by A1,XXREAL_0:1; assume A2: not inf X in X; s + 1 is LowerBound of X proof let x; assume A3: x in X; then reconsider i=x as Integer; i >= s by A3,Th3; then s < i by A2,A3,XXREAL_0:1; hence thesis by INT_1:7; end; then s + 1 <= s by Def4; hence contradiction by XREAL_1:145; end; end; registration cluster -> bounded_below for natural-membered set; coherence proof let X be natural-membered set; take 0; let x; assume x in X; hence thesis; end; end; registration let X be left_end real-membered set; cluster min X -> real; coherence proof min X in X by Def7; hence thesis; end; end; registration let X be left_end rational-membered set; cluster min X -> rational; coherence proof min X in X by Def7; hence thesis; end; end; registration let X be left_end integer-membered set; cluster min X -> integer; coherence proof min X in X by Def7; hence thesis; end; end; registration let X be left_end natural-membered set; cluster min X -> natural; coherence proof min X in X by Def7; hence thesis; end; end; registration let X be right_end real-membered set; cluster max X -> real; coherence proof max X in X by Def8; hence thesis; end; end; registration let X be right_end rational-membered set; cluster max X -> rational; coherence proof max X in X by Def8; hence thesis; end; end; registration let X be right_end integer-membered set; cluster max X -> integer; coherence proof max X in X by Def8; hence thesis; end; end; registration let X be right_end natural-membered set; cluster max X -> natural; coherence proof max X in X by Def8; hence thesis; end; end; registration cluster left_end -> bounded_below for real-membered set; coherence proof let X be real-membered set; assume inf X in X; then reconsider r = inf X as real number; take r; let x; thus thesis by Th3; end; cluster right_end -> bounded_above for real-membered set; coherence proof let X be real-membered set; assume sup X in X; then reconsider r = sup X as real number; take r; let x; thus thesis by Th4; end; end; theorem Th17: x is LowerBound of [.x,y.] proof let z; assume z in [.x,y.]; hence thesis by XXREAL_1:1; end; theorem Th18: x is LowerBound of ].x,y.] proof let z; assume z in ].x,y.]; hence thesis by XXREAL_1:2; end; theorem Th19: x is LowerBound of [.x,y.[ proof let z; assume z in [.x,y.[; hence thesis by XXREAL_1:3; end; theorem Th20: x is LowerBound of ].x,y.[ proof let z; assume z in ].x,y.[; hence thesis by XXREAL_1:4; end; theorem Th21: y is UpperBound of [.x,y.] proof let z; assume z in [.x,y.]; hence thesis by XXREAL_1:1; end; theorem Th22: y is UpperBound of ].x,y.] proof let z; assume z in ].x,y.]; hence thesis by XXREAL_1:2; end; theorem Th23: y is UpperBound of [.x,y.[ proof let z; assume z in [.x,y.[; hence thesis by XXREAL_1:3; end; theorem Th24: y is UpperBound of ].x,y.[ proof let z; assume z in ].x,y.[; hence thesis by XXREAL_1:4; end; theorem Th25: x <= y implies inf [.x,y.] = x proof assume A1: x <= y; A2: for z being LowerBound of [.x,y.] holds z <= x proof let z be LowerBound of [.x,y.]; x in [.x,y.] by A1,XXREAL_1:1; hence thesis by Def2; end; x is LowerBound of [.x,y.] by Th17; hence thesis by A2,Def4; end; theorem Th26: x < y implies inf [.x,y.[ = x proof assume A1: x < y; A2: for z being LowerBound of [.x,y.[ holds z <= x proof let z be LowerBound of [.x,y.[; x in [.x,y.[ by A1,XXREAL_1:3; hence thesis by Def2; end; x is LowerBound of [.x,y.[ by Th19; hence thesis by A2,Def4; end; theorem Th27: x < y implies inf ].x,y.] = x proof assume A1: x < y; A2: for z being LowerBound of ].x,y.] holds z <= x proof let z be LowerBound of ].x,y.]; for r st x < r & r < y holds z <= r proof let r; assume that A3: x < r and A4: r < y; r in ].x,y.] by A3,A4,XXREAL_1:2; hence thesis by Def2; end; hence thesis by A1,XREAL_1:228; end; x is LowerBound of ].x,y.] by Th18; hence thesis by A2,Def4; end; theorem Th28: x < y implies inf ].x,y.[ = x proof assume A1: x < y; A2: for z being LowerBound of ].x,y.[ holds z <= x proof let z be LowerBound of ].x,y.[; for r st x < r & r < y holds z <= r proof let r; assume that A3: x < r and A4: r < y; r in ].x,y.[ by A3,A4,XXREAL_1:4; hence thesis by Def2; end; hence thesis by A1,XREAL_1:228; end; x is LowerBound of ].x,y.[ by Th20; hence thesis by A2,Def4; end; theorem Th29: x <= y implies sup [.x,y.] = y proof assume A1: x <= y; A2: for z being UpperBound of [.x,y.] holds y <= z proof let z be UpperBound of [.x,y.]; y in [.x,y.] by A1,XXREAL_1:1; hence thesis by Def1; end; y is UpperBound of [.x,y.] by Th21; hence thesis by A2,Def3; end; theorem Th30: x < y implies sup ].x,y.] = y proof assume A1: x < y; A2: for z being UpperBound of ].x,y.] holds y <= z proof let z be UpperBound of ].x,y.]; y in ].x,y.] by A1,XXREAL_1:2; hence thesis by Def1; end; y is UpperBound of ].x,y.] by Th22; hence thesis by A2,Def3; end; theorem Th31: x < y implies sup [.x,y.[ = y proof assume A1: x < y; A2: for z being UpperBound of [.x,y.[ holds y <= z proof let z be UpperBound of [.x,y.[; for r st x < r & r < y holds r <= z proof let r; assume that A3: x < r and A4: r < y; r in [.x,y.[ by A3,A4,XXREAL_1:3; hence thesis by Def1; end; hence thesis by A1,XREAL_1:229; end; y is UpperBound of [.x,y.[ by Th23; hence thesis by A2,Def3; end; theorem Th32: x < y implies sup ].x,y.[ = y proof assume A1: x < y; A2: for z being UpperBound of ].x,y.[ holds y <= z proof let z be UpperBound of ].x,y.[; for r st x < r & r < y holds r <= z proof let r; assume that A3: x < r and A4: r < y; r in ].x,y.[ by A3,A4,XXREAL_1:4; hence thesis by Def1; end; hence thesis by A1,XREAL_1:229; end; y is UpperBound of ].x,y.[ by Th24; hence thesis by A2,Def3; end; theorem Th33: x <= y implies [.x,y.] is left_end right_end proof assume A1: x <= y; then x in [.x,y.] by XXREAL_1:1; then inf [.x,y.] in [.x,y.] by A1,Th25; hence [.x,y.] is left_end by Def5; y in [.x,y.] by A1,XXREAL_1:1; hence sup [.x,y.] in [.x,y.] by A1,Th29; end; theorem Th34: x < y implies [.x,y.[ is left_end proof assume A1: x < y; then x in [.x,y.[ by XXREAL_1:3; hence inf [.x,y.[ in [.x,y.[ by A1,Th26; end; theorem Th35: x < y implies ].x,y.] is right_end proof assume A1: x < y; then y in ].x,y.] by XXREAL_1:2; hence sup ].x,y.] in ].x,y.] by A1,Th30; end; theorem Th36: x is LowerBound of {} proof let y; thus thesis; end; theorem Th37: x is UpperBound of {} proof let y; thus thesis; end; theorem Th38: inf {} = +infty proof A1: for x being LowerBound of {} holds x <= +infty by XXREAL_0:3; +infty is LowerBound of {} by Th36; hence thesis by A1,Def4; end; theorem Th39: sup {} = -infty proof A1: for x being UpperBound of {} holds -infty <= x by XXREAL_0:5; -infty is UpperBound of {} by Th37; hence thesis by A1,Def3; end; theorem Th40: for X being ext-real-membered set holds X is non empty iff inf X <= sup X proof let X be ext-real-membered set; thus X is non empty implies inf X <= sup X proof assume X is non empty; then consider x such that A1: x in X by MEMBERED:8; A2: x <= sup X by A1,Th4; inf X <= x by A1,Th3; hence thesis by A2,XXREAL_0:2; end; assume inf X <= sup X; hence thesis by Th38,Th39; end; registration cluster real-bounded -> finite for integer-membered set; coherence proof let X be integer-membered set; per cases; suppose X is empty; hence thesis; end; suppose A1: X is non empty; assume X is bounded_below bounded_above; then reconsider Z = X as bounded_below bounded_above non empty integer-membered set by A1; set m = inf Z, n = sup Z; defpred P[set] means $1 in X; deffunc F(set) = $1; set Y = {F(i) where i is Element of INT: m<=i & i<=n & P[i]}; A2: X c= Y proof let i be Integer; A3: i in INT by INT_1:def 2; assume A4: P[i]; then A5: i<=n by Th4; m<=i by A4,Th3; hence thesis by A3,A4,A5; end; Y is finite from FinInter; hence thesis by A2; end; end; end; registration cluster -> finite for bounded_above natural-membered set; coherence; end; theorem for X being ext-real-membered set holds +infty is UpperBound of X proof let X be ext-real-membered set; let x such that x in X; thus thesis by XXREAL_0:3; end; theorem for X being ext-real-membered set holds -infty is LowerBound of X proof let X be ext-real-membered set; let x such that x in X; thus thesis by XXREAL_0:5; end; theorem Th43: for X,Y being ext-real-membered set st X c= Y & Y is bounded_above holds X is bounded_above proof let X,Y be ext-real-membered set; assume A1: X c= Y; given r being real number such that A2: r is UpperBound of Y; take r; thus thesis by A1,A2,Th6; end; theorem Th44: for X,Y being ext-real-membered set st X c= Y & Y is bounded_below holds X is bounded_below proof let X,Y be ext-real-membered set; assume A1: X c= Y; given r being real number such that A2: r is LowerBound of Y; take r; thus thesis by A1,A2,Th5; end; theorem for X,Y being ext-real-membered set st X c= Y & Y is real-bounded holds X is real-bounded proof let X,Y be ext-real-membered set; assume A1: X c= Y; assume Y is bounded_below bounded_above; hence X is bounded_below bounded_above by A1,Th43,Th44; end; theorem Th46: REAL is non bounded_below non bounded_above proof thus REAL is non bounded_below proof given r being real number such that A1: r is LowerBound of REAL; consider s being real number such that A2: s < r by XREAL_1:2; s in REAL by XREAL_0:def 1; hence contradiction by A1,A2,Def2; end; given r being real number such that A3: r is UpperBound of REAL; consider s being real number such that A4: r < s by XREAL_1:1; s in REAL by XREAL_0:def 1; hence contradiction by A3,A4,Def1; end; registration cluster REAL -> non bounded_below non bounded_above; coherence by Th46; end; theorem {+infty} is bounded_below proof take 0; let x; assume x in {+infty}; hence thesis by TARSKI:def 1; end; theorem {-infty} is bounded_above proof take 0; let x; assume x in {-infty}; hence thesis by TARSKI:def 1; end; theorem Th49: for X being bounded_above non empty ext-real-membered set st X <> {-infty} holds ex x being Element of REAL st x in X proof let X be bounded_above non empty ext-real-membered set; assume X <> {-infty}; then consider x being set such that A1: x in X and A2: x <> -infty by ZFMISC_1:35; reconsider x as ext-real number by A1; consider r being real number such that A3: r is UpperBound of X by Def10; A4: r in REAL by XREAL_0:def 1; x <= r by A3,A1,Def1; then x in REAL by A4,A2,XXREAL_0:13; hence thesis by A1; end; theorem Th50: for X being bounded_below non empty ext-real-membered set st X <> {+infty} holds ex x being Element of REAL st x in X proof let X be bounded_below non empty ext-real-membered set; assume X <> {+infty}; then consider x being set such that A1: x in X and A2: x <> +infty by ZFMISC_1:35; reconsider x as ext-real number by A1; consider r being real number such that A3: r is LowerBound of X by Def9; A4: r in REAL by XREAL_0:def 1; r <= x by A3,A1,Def2; then x in REAL by A4,A2,XXREAL_0:10; hence thesis by A1; end; theorem Th51: for X being ext-real-membered set st -infty is UpperBound of X holds X c= {-infty} proof let X be ext-real-membered set such that A1: -infty is UpperBound of X; let x; assume x in X; then x = -infty by A1,Def1,XXREAL_0:6; hence thesis by TARSKI:def 1; end; theorem Th52: for X being ext-real-membered set st +infty is LowerBound of X holds X c= {+infty} proof let X be ext-real-membered set such that A1: +infty is LowerBound of X; let x; assume x in X; then x = +infty by A1,Def2,XXREAL_0:4; hence thesis by TARSKI:def 1; end; theorem for X being non empty ext-real-membered set st ex y being UpperBound of X st y <> +infty holds X is bounded_above proof let X be non empty ext-real-membered set; given y being UpperBound of X such that A1: y <> +infty; per cases; suppose A2: y = -infty; take 0; let x; assume A3: x in X; X c= {-infty} by A2,Th51; hence thesis by A3,TARSKI:def 1; end; suppose y <> -infty; then y in REAL by A1,XXREAL_0:14; then reconsider y as real number; take y; thus thesis; end; end; theorem for X being non empty ext-real-membered set st ex y being LowerBound of X st y <> -infty holds X is bounded_below proof let X be non empty ext-real-membered set; given y being LowerBound of X such that A1: y <> -infty; per cases; suppose A2: y = +infty; take 0; let x; assume A3: x in X; X c= {+infty} by A2,Th52; hence thesis by A3,TARSKI:def 1; end; suppose y <> +infty; then y in REAL by A1,XXREAL_0:14; then reconsider y as real number; take y; thus thesis; end; end; theorem for X being non empty ext-real-membered set, x being UpperBound of X st x in X holds x = sup X proof let X be non empty ext-real-membered set, x be UpperBound of X; assume x in X; then for y being UpperBound of X holds x <= y by Def1; hence thesis by Def3; end; theorem for X being non empty ext-real-membered set, x being LowerBound of X st x in X holds x = inf X proof let X be non empty ext-real-membered set, x be LowerBound of X; assume x in X; then for y being LowerBound of X holds y <= x by Def2; hence thesis by Def4; end; theorem Th57: for X being non empty ext-real-membered set st X is bounded_above & X <> {-infty} holds sup X in REAL proof let X be non empty ext-real-membered set; assume A1: X is bounded_above; then consider r being real number such that A2: r is UpperBound of X by Def10; assume X <> {-infty}; then A3: ex x being Element of REAL st x in X by A1,Th49; sup X is UpperBound of X by Def3; then A4: not sup X = -infty by A3,Def1,XXREAL_0:12; A5: r in REAL by XREAL_0:def 1; sup X <= r by A2,Def3; hence thesis by A5,A4,XXREAL_0:13; end; theorem Th58: for X being non empty ext-real-membered set st X is bounded_below & X <> {+infty} holds inf X in REAL proof let X be non empty ext-real-membered set; assume A1: X is bounded_below; then consider r being real number such that A2: r is LowerBound of X by Def9; assume X <> {+infty}; then A3: ex x being Element of REAL st x in X by A1,Th50; inf X is LowerBound of X by Def4; then A4: inf X <> +infty by A3,Def2,XXREAL_0:9; A5: r in REAL by XREAL_0:def 1; r <= inf X by A2,Def4; hence thesis by A5,A4,XXREAL_0:10; end; theorem for X,Y being ext-real-membered set st X c= Y holds sup X <= sup Y proof let X,Y be ext-real-membered set; assume A1: X c= Y; sup Y is UpperBound of Y by Def3; then sup Y is UpperBound of X by A1,Th6; hence thesis by Def3; end; theorem for X,Y being ext-real-membered set st X c= Y holds inf Y <= inf X proof let X,Y be ext-real-membered set; assume A1: X c= Y; inf Y is LowerBound of Y by Def4; then inf Y is LowerBound of X by A1,Th5; hence thesis by Def4; end; theorem for X being ext-real-membered set, x being ext-real number st (ex y being ext-real number st y in X & x <= y) holds x <= sup X proof let X be ext-real-membered set; let x be ext-real number; given y being ext-real number such that A1: y in X and A2: x <= y; y <= sup X by A1,Th4; hence thesis by A2,XXREAL_0:2; end; theorem for X being ext-real-membered set, x being ext-real number st (ex y being ext-real number st y in X & y <= x) holds inf X <= x proof let X be ext-real-membered set; let x be ext-real number; given y being ext-real number such that A1: y in X and A2: y <= x; inf X <= y by A1,Th3; hence thesis by A2,XXREAL_0:2; end; theorem for X,Y being ext-real-membered set st for x being ext-real number st x in X ex y being ext-real number st y in Y & x <= y holds sup X <= sup Y proof let X,Y be ext-real-membered set; assume A1: for x being ext-real number st x in X ex y being ext-real number st y in Y & x <= y; sup Y is UpperBound of X proof let x be ext-real number; assume x in X; then consider y being ext-real number such that A2: y in Y and A3: x <= y by A1; y <= sup Y by A2,Th4; hence thesis by A3,XXREAL_0:2; end; hence thesis by Def3; end; theorem for X,Y being ext-real-membered set st for y being ext-real number st y in Y ex x being ext-real number st x in X & x <= y holds inf X <= inf Y proof let X,Y be ext-real-membered set; assume A1: for y being ext-real number st y in Y ex x being ext-real number st x in X & x <= y; inf X is LowerBound of Y proof let y be ext-real number; assume y in Y; then consider x being ext-real number such that A2: x in X and A3: x <= y by A1; inf X <= x by A2,Th3; hence thesis by A3,XXREAL_0:2; end; hence thesis by Def4; end; theorem Th65: for X,Y being ext-real-membered set, x being UpperBound of X, y being UpperBound of Y holds min(x,y) is UpperBound of X /\ Y proof let X,Y be ext-real-membered set, x be UpperBound of X, y be UpperBound of Y; let a be ext-real number; assume A1: a in X /\ Y; then a in Y by XBOOLE_0:def 4; then A2: a <= y by Def1; a in X by A1,XBOOLE_0:def 4; then a <= x by Def1; hence thesis by A2,XXREAL_0:20; end; theorem Th66: for X,Y being ext-real-membered set, x being LowerBound of X, y being LowerBound of Y holds max(x,y) is LowerBound of X /\ Y proof let X,Y be ext-real-membered set, x be LowerBound of X, y be LowerBound of Y; let a be ext-real number; assume A1: a in X /\ Y; then a in Y by XBOOLE_0:def 4; then A2: y <= a by Def2; a in X by A1,XBOOLE_0:def 4; then x <= a by Def2; hence thesis by A2,XXREAL_0:28; end; theorem for X,Y being ext-real-membered set holds sup(X /\ Y) <= min(sup X,sup Y) proof let X,Y be ext-real-membered set; A1: sup Y is UpperBound of Y by Def3; sup X is UpperBound of X by Def3; then min(sup X,sup Y) is UpperBound of X /\ Y by A1,Th65; hence thesis by Def3; end; theorem for X,Y being ext-real-membered set holds max(inf X,inf Y) <= inf(X /\ Y) proof let X,Y be ext-real-membered set; A1: inf Y is LowerBound of Y by Def4; inf X is LowerBound of X by Def4; then max(inf X,inf Y) is LowerBound of X /\ Y by A1,Th66; hence thesis by Def4; end; registration cluster real-bounded -> real-membered for ext-real-membered set; coherence proof let X be ext-real-membered set such that A1: X is real-bounded; let x be set; assume A2: x in X; then reconsider X as non empty ext-real-membered set; consider s being real number such that A3: s is UpperBound of X by A1,Def10; reconsider x as ext-real number by A2; A4: s in REAL by XREAL_0:def 1; A5: x <= s by A2,A3,Def1; consider r being real number such that A6: r is LowerBound of X by A1,Def9; A7: r in REAL by XREAL_0:def 1; r <= x by A2,A6,Def2; then x in REAL by A5,A7,A4,XXREAL_0:45; hence thesis; end; end; theorem Th69: A c= [.inf A, sup A.] proof let x be ext-real number; assume A1: x in A; then A2: x <= sup A by Th4; inf A <= x by A1,Th3; hence thesis by A2,XXREAL_1:1; end; theorem sup A = inf A implies A = {inf A} proof assume A1: sup A = inf A; then A c= [.inf A,inf A.] by Th69; then A2: A c= {inf A} by XXREAL_1:17; A <> {} by A1,Th38,Th39; hence thesis by A2,ZFMISC_1:33; end; theorem Th71: x <= y & x is UpperBound of A implies y is UpperBound of A proof assume that A1: x <= y and A2: x is UpperBound of A; let z; assume z in A; then z <= x by A2,Def1; hence thesis by A1,XXREAL_0:2; end; theorem Th72: y <= x & x is LowerBound of A implies y is LowerBound of A proof assume that A1: y <= x and A2: x is LowerBound of A; let z; assume z in A; then x <= z by A2,Def2; hence thesis by A1,XXREAL_0:2; end; theorem A is bounded_above iff sup A <> +infty proof hereby assume A1: A is bounded_above; per cases by A1,Th57; suppose A = {}; hence sup A <> +infty by Th39; end; suppose A = {-infty}; hence sup A <> +infty by Lm1; end; suppose sup A in REAL; hence sup A <> +infty; end; end; assume A2: sup A <> +infty; per cases by A2,XXREAL_0:14; suppose A3: sup A = -infty; take 0; -infty is UpperBound of A by A3,Def3; hence thesis by Th71; end; suppose sup A in REAL; then reconsider r = sup A as real number; take r; thus thesis by Def3; end; end; theorem A is bounded_below iff inf A <> -infty proof hereby assume A1: A is bounded_below; per cases by A1,Th58; suppose A = {}; hence inf A <> -infty by Th38; end; suppose A = {+infty}; hence inf A <> -infty by Lm2; end; suppose inf A in REAL; hence inf A <> -infty; end; end; assume A2: inf A <> -infty; per cases by A2,XXREAL_0:14; suppose A3: inf A = +infty; take 0; +infty is LowerBound of A by A3,Def4; hence thesis by Th72; end; suppose inf A in REAL; then reconsider r = inf A as real number; take r; thus thesis by Def4; end; end; begin definition let A be ext-real-membered set; attr A is interval means :Def12: for r,s being ext-real number st r in A & s in A holds [.r,s.] c= A; end; registration cluster ExtREAL -> interval; coherence proof let r,s; thus thesis by MEMBERED:2; end; cluster empty -> interval for ext-real-membered set; coherence proof let A be ext-real-membered set; assume A1: A is empty; let r,s; thus thesis by A1; end; let r,s; cluster [.r,s.] -> interval; coherence proof let x,y; assume x in [.r,s.]; then A2: r <= x by XXREAL_1:1; assume y in [.r,s.]; then A3: y <= s by XXREAL_1:1; let z; assume A4: z in [.x,y.]; then x <= z by XXREAL_1:1; then A5: r <= z by A2,XXREAL_0:2; z <= y by A4,XXREAL_1:1; then z <= s by A3,XXREAL_0:2; hence thesis by A5,XXREAL_1:1; end; cluster ].r,s.] -> interval; coherence proof let x,y; assume x in ].r,s.]; then A6: r < x by XXREAL_1:2; assume y in ].r,s.]; then A7: y <= s by XXREAL_1:2; let z; assume A8: z in [.x,y.]; then x <= z by XXREAL_1:1; then A9: r < z by A6,XXREAL_0:2; z <= y by A8,XXREAL_1:1; then z <= s by A7,XXREAL_0:2; hence thesis by A9,XXREAL_1:2; end; cluster [.r,s.[ -> interval; coherence proof let x,y; assume x in [.r,s.[; then A10: r <= x by XXREAL_1:3; assume y in [.r,s.[; then A11: y < s by XXREAL_1:3; let z; assume A12: z in [.x,y.]; then x <= z by XXREAL_1:1; then A13: r <= z by A10,XXREAL_0:2; z <= y by A12,XXREAL_1:1; then z < s by A11,XXREAL_0:2; hence thesis by A13,XXREAL_1:3; end; cluster ].r,s.[ -> interval; coherence proof let x,y; assume x in ].r,s.[; then A14: r < x by XXREAL_1:4; assume y in ].r,s.[; then A15: y < s by XXREAL_1:4; let z; assume A16: z in [.x,y.]; then x <= z by XXREAL_1:1; then A17: r < z by A14,XXREAL_0:2; z <= y by A16,XXREAL_1:1; then z < s by A15,XXREAL_0:2; hence thesis by A17,XXREAL_1:4; end; end; registration cluster REAL -> interval; coherence by XXREAL_1:224; end; registration cluster interval for non empty ext-real-membered set; existence proof take REAL; thus thesis; end; end; registration let A,B be interval ext-real-membered set; cluster A /\ B -> interval; coherence proof let r,s be ext-real number; assume that A1: r in A /\ B and A2: s in A /\ B; A3: s in B by A2,XBOOLE_0:def 4; r in B by A1,XBOOLE_0:def 4; then A4: [.r,s.] c= B by A3,Def12; A5: s in A by A2,XBOOLE_0:def 4; r in A by A1,XBOOLE_0:def 4; then [.r,s.] c= A by A5,Def12; hence thesis by A4,XBOOLE_1:19; end; end; reserve A,B for ext-real-membered set; registration let r,s; cluster ].r,s.] -> non left_end; coherence proof assume ].r,s.] is left_end; then A1: inf ].r,s.] in ].r,s.] by Def5; then A2: inf ].r,s.] <= s by XXREAL_1:2; r < inf ].r,s.] by A1,XXREAL_1:2; then r < s by A2,XXREAL_0:2; then r = inf ].r,s.] by Th27; hence contradiction by A1,XXREAL_1:2; end; cluster [.r,s.[ -> non right_end; coherence proof assume [.r,s.[ is right_end; then A3: sup [.r,s.[ in [.r,s.[ by Def6; then A4: sup [.r,s.[ < s by XXREAL_1:3; r <= sup [.r,s.[ by A3,XXREAL_1:3; then r < s by A4,XXREAL_0:2; then s = sup [.r,s.[ by Th31; hence contradiction by A3,XXREAL_1:3; end; cluster ].r,s.[ -> non left_end non right_end; coherence proof thus ].r,s.[ is non left_end proof assume ].r,s.[ is left_end; then A5: inf ].r,s.[ in ].r,s.[ by Def5; then A6: inf ].r,s.[ < s by XXREAL_1:4; r < inf ].r,s.[ by A5,XXREAL_1:4; then r < s by A6,XXREAL_0:2; then r = inf ].r,s.[ by Th28; hence contradiction by A5,XXREAL_1:4; end; assume ].r,s.[ is right_end; then A7: sup ].r,s.[ in ].r,s.[ by Def6; then A8: sup ].r,s.[ < s by XXREAL_1:4; r < sup ].r,s.[ by A7,XXREAL_1:4; then r < s by A8,XXREAL_0:2; then s = sup ].r,s.[ by Th32; hence contradiction by A7,XXREAL_1:4; end; end; registration cluster left_end right_end interval for ext-real-membered set; existence proof take [.0,1.]; thus thesis by Th33; end; cluster non left_end right_end interval for ext-real-membered set; existence proof take ].0,1.]; thus thesis by Th35; end; cluster left_end non right_end interval for ext-real-membered set; existence proof take [.0,1.[; thus thesis by Th34; end; cluster non left_end non right_end interval non empty for ext-real-membered set; existence proof take ].0,2.[; 1 in ].0,2.[ by XXREAL_1:4; hence thesis; end; end; theorem for A being left_end right_end interval ext-real-membered set holds A = [.min A, max A.] proof let A be left_end right_end interval ext-real-membered set; let x; A1: max A in A by Def6; thus x in A implies x in [.min A, max A.] proof assume A2: x in A; then A3: x <= max A by Th4; min A <= x by A2,Th3; hence thesis by A3,XXREAL_1:1; end; min A in A by Def5; then [.min A, max A.] c= A by A1,Def12; hence thesis; end; theorem for A being non left_end right_end interval ext-real-membered set holds A = ].inf A, max A.] proof let A be non left_end right_end interval ext-real-membered set; let x; defpred P[ext-real number] means $1 in A & $1 < x; thus x in A implies x in ].inf A, max A.] proof A1: not inf A in A by Def5; assume A2: x in A; then A3: x <= max A by Th4; inf A <= x by A2,Th3; then inf A < x by A2,A1,XXREAL_0:1; hence thesis by A3,XXREAL_1:2; end; assume A4: x in ].inf A, max A.]; per cases; suppose not ex r st P[r]; then x is LowerBound of A by Def2; then x <= inf A by Def4; hence thesis by A4,XXREAL_1:2; end; suppose ex r st P[r]; then consider r such that A5: r in A and A6: r < x; x <= max A by A4,XXREAL_1:2; then A7: x in [.r,max A.] by A6,XXREAL_1:1; max A in A by Def6; then [.r,max A.] c= A by A5,Def12; hence thesis by A7; end; end; theorem for A being left_end non right_end interval ext-real-membered set holds A = [.min A, sup A.[ proof let A be left_end non right_end interval ext-real-membered set; let x; defpred P[ext-real number] means $1 in A & $1 > x; thus x in A implies x in [.min A, sup A.[ proof A1: not sup A in A by Def6; assume A2: x in A; then A3: min A <= x by Th3; x <= sup A by A2,Th4; then x < sup A by A2,A1,XXREAL_0:1; hence thesis by A3,XXREAL_1:3; end; assume A4: x in [.min A, sup A.[; per cases; suppose not ex r st P[r]; then x is UpperBound of A by Def1; then sup A <= x by Def3; hence thesis by A4,XXREAL_1:3; end; suppose ex r st P[r]; then consider r such that A5: r in A and A6: r > x; inf A <= x by A4,XXREAL_1:3; then A7: x in [.inf A,r.] by A6,XXREAL_1:1; min A in A by Def5; then [.inf A,r.] c= A by A5,Def12; hence thesis by A7; end; end; theorem Th78: for A being non left_end non right_end non empty interval ext-real-membered set holds A =].inf A,sup A.[ proof let A be non left_end non right_end non empty interval ext-real-membered set; let x; defpred P[ext-real number] means $1 in A & $1 < x; defpred Q[ext-real number] means $1 in A & $1 > x; thus x in A implies x in ].inf A,sup A.[ proof assume A1: x in A; then A2: x <> sup A by Def6; x <= sup A by A1,Th4; then A3: x < sup A by A2,XXREAL_0:1; A4: x <> inf A by A1,Def5; inf A <= x by A1,Th3; then inf A < x by A4,XXREAL_0:1; hence thesis by A3,XXREAL_1:4; end; assume A5: x in ].inf A,sup A.[; per cases; suppose not ex r st P[r]; then x is LowerBound of A by Def2; then x <= inf A by Def4; hence thesis by A5,XXREAL_1:4; end; suppose not ex r st Q[r]; then x is UpperBound of A by Def1; then sup A <= x by Def3; hence thesis by A5,XXREAL_1:4; end; suppose that A6: ex r st P[r] and A7: ex r st Q[r]; consider r such that A8: r in A and A9: r < x by A6; consider s such that A10: s in A and A11: s > x by A7; A12: x in [.r,s.] by A9,A11,XXREAL_1:1; [.r,s.] c= A by A8,A10,Def12; hence thesis by A12; end; end; theorem for A being non left_end non right_end interval ext-real-membered set ex r,s st r <= s & A =].r,s.[ proof let A be non left_end non right_end interval ext-real-membered set; per cases; suppose A1: A is empty; take -infty,-infty; thus thesis by A1; end; suppose A2: A is not empty; take inf A, sup A; thus inf A <= sup A by A2,Th40; thus thesis by A2,Th78; end; end; theorem Th80: A is interval implies for x,y,r st x in A & y in A & x <= r & r <= y holds r in A proof assume A1: A is interval; let x,y,r such that A2: x in A and A3: y in A and A4: x <= r and A5: r <= y; A6: r in [.x,y.] by A4,A5,XXREAL_1:1; [.x,y.] c= A by A1,A2,A3,Def12; hence thesis by A6; end; theorem Th81: A is interval implies for x,r st x in A & x <= r & r < sup A holds r in A proof assume A1: A is interval; let x,r such that A2: x in A and A3: x <= r and A4: r < sup A; per cases; suppose ex y st y in A & r < y; hence thesis by A1,A2,A3,Th80; end; suppose not ex y st y in A & r < y; then r is UpperBound of A by Def1; hence thesis by A4,Def3; end; end; theorem Th82: A is interval implies for x,r st x in A & inf A < r & r <= x holds r in A proof assume A1: A is interval; let x,r such that A2: x in A and A3: inf A < r and A4: r <= x; per cases; suppose ex y st y in A & r > y; hence thesis by A1,A2,A4,Th80; end; suppose not ex y st y in A & r > y; then r is LowerBound of A by Def2; hence thesis by A3,Def4; end; end; theorem A is interval implies for r st inf A < r & r < sup A holds r in A proof assume A1: A is interval; let r such that A2: inf A < r and A3: r < sup A; per cases; suppose ex y st y in A & r > y; hence thesis by A1,A3,Th81; end; suppose not ex y st y in A & r > y; then r is LowerBound of A by Def2; hence thesis by A2,Def4; end; end; theorem Th84: (for x,y,r st x in A & y in A & x < r & r < y holds r in A) implies A is interval proof assume A1: for x,y,r st x in A & y in A & x < r & r < y holds r in A; let x,y such that A2: x in A and A3: y in A; let r; assume r in [.x,y.]; then r in ].x,y.[ \/ {x,y} by XXREAL_1:29,128; then A4: r in ].x,y.[ or r in {x,y} by XBOOLE_0:def 3; per cases by A4,TARSKI:def 2; suppose r = x; hence thesis by A2; end; suppose r = y; hence thesis by A3; end; suppose A5: r in ].x,y.[; then A6: r < y by XXREAL_1:4; x < r by A5,XXREAL_1:4; hence thesis by A1,A2,A3,A6; end; end; theorem (for x,r st x in A & x < r & r < sup A holds r in A) implies A is interval proof assume A1: for x,r st x in A & x < r & r < sup A holds r in A; let x,y such that A2: x in A and A3: y in A; let r; assume r in [.x,y.]; then r in ].x,y.[ \/ {x,y} by XXREAL_1:29,128; then A4: r in ].x,y.[ or r in {x,y} by XBOOLE_0:def 3; per cases by A4,TARSKI:def 2; suppose r = x; hence thesis by A2; end; suppose r = y; hence thesis by A3; end; suppose A5: r in ].x,y.[; then A6: r < y by XXREAL_1:4; y <= sup A by A3,Th4; then A7: r < sup A by A6,XXREAL_0:2; x < r by A5,XXREAL_1:4; hence thesis by A1,A2,A7; end; end; theorem (for y,r st y in A & inf A < r & r < y holds r in A) implies A is interval proof assume A1: for y,r st y in A & inf A < r & r < y holds r in A; let x,y such that A2: x in A and A3: y in A; let r; assume r in [.x,y.]; then r in ].x,y.[ \/ {x,y} by XXREAL_1:29,128; then A4: r in ].x,y.[ or r in {x,y} by XBOOLE_0:def 3; per cases by A4,TARSKI:def 2; suppose r = x; hence thesis by A2; end; suppose r = y; hence thesis by A3; end; suppose A5: r in ].x,y.[; then A6: x < r by XXREAL_1:4; inf A <= x by A2,Th3; then A7: inf A < r by A6,XXREAL_0:2; r < y by A5,XXREAL_1:4; hence thesis by A1,A3,A7; end; end; theorem (for r st inf A < r & r < sup A holds r in A) implies A is interval proof assume A1: for r st inf A < r & r < sup A holds r in A; let x,y such that A2: x in A and A3: y in A; let r; assume r in [.x,y.]; then r in ].x,y.[ \/ {x,y} by XXREAL_1:29,128; then A4: r in ].x,y.[ or r in {x,y} by XBOOLE_0:def 3; per cases by A4,TARSKI:def 2; suppose r = x; hence thesis by A2; end; suppose r = y; hence thesis by A3; end; suppose A5: r in ].x,y.[; then A6: r < y by XXREAL_1:4; y <= sup A by A3,Th4; then A7: r < sup A by A6,XXREAL_0:2; A8: x < r by A5,XXREAL_1:4; inf A <= x by A2,Th3; then inf A < r by A8,XXREAL_0:2; hence thesis by A1,A7; end; end; theorem Th88: (for x,y,r st x in A & y in A & x <= r & r <= y holds r in A) implies A is interval proof assume for x,y,r st x in A & y in A & x <= r & r <= y holds r in A; then for x,y,r st x in A & y in A & x < r & r < y holds r in A; hence thesis by Th84; end; theorem A is interval & B is interval & A meets B implies A \/ B is interval proof assume that A1: A is interval and A2: B is interval; given z such that A3: z in A and A4: z in B; for x,y,r st x in A \/ B & y in A \/ B & x <= r & r <= y holds r in A \/ B proof let x,y,r such that A5: x in A \/ B and A6: y in A \/ B and A7: x <= r and A8: r <= y; per cases by A5,A6,XBOOLE_0:def 3; suppose x in A & y in A; then r in A by A1,A7,A8,Th80; hence thesis by XBOOLE_0:def 3; end; suppose that A9: x in A and A10: y in B; per cases; suppose r <= z; then r in A by A1,A3,A7,A9,Th80; hence thesis by XBOOLE_0:def 3; end; suppose z <= r; then r in B by A2,A4,A8,A10,Th80; hence thesis by XBOOLE_0:def 3; end; end; suppose that A11: x in B and A12: y in A; per cases; suppose z <= r; then r in A by A1,A3,A8,A12,Th80; hence thesis by XBOOLE_0:def 3; end; suppose r <= z; then r in B by A2,A4,A7,A11,Th80; hence thesis by XBOOLE_0:def 3; end; end; suppose x in B & y in B; then r in B by A2,A7,A8,Th80; hence thesis by XBOOLE_0:def 3; end; end; hence thesis by Th88; end; theorem A is interval & B is left_end interval & sup A = inf B implies A \/ B is interval proof assume that A1: A is interval and A2: B is left_end interval and A3: sup A = inf B; set z = inf B; A4: z in B by A2,Def5; for x,y,r st x in A \/ B & y in A \/ B & x < r & r < y holds r in A \/ B proof let x,y,r such that A5: x in A \/ B and A6: y in A \/ B and A7: x < r and A8: r < y; per cases by A5,A6,XBOOLE_0:def 3; suppose x in A & y in A; then r in A by A1,A7,A8,Th80; hence thesis by XBOOLE_0:def 3; end; suppose that A9: x in A and A10: y in B; per cases; suppose r < z; then r in A by A1,A3,A7,A9,Th81; hence thesis by XBOOLE_0:def 3; end; suppose z <= r; then r in B by A2,A4,A8,A10,Th80; hence thesis by XBOOLE_0:def 3; end; end; suppose that A11: x in B and A12: y in A; per cases; suppose A13: z < r; y <= z by A3,A12,Th4; hence thesis by A8,A13,XXREAL_0:2; end; suppose r <= z; then r in B by A2,A4,A7,A11,Th80; hence thesis by XBOOLE_0:def 3; end; end; suppose x in B & y in B; then r in B by A2,A7,A8,Th80; hence thesis by XBOOLE_0:def 3; end; end; hence thesis by Th84; end; theorem A is right_end interval & B is interval & sup A = inf B implies A \/ B is interval proof assume that A1: A is right_end interval and A2: B is interval and A3: sup A = inf B; set z = inf B; A4: z in A by A1,A3,Def6; for x,y,r st x in A \/ B & y in A \/ B & x < r & r < y holds r in A \/ B proof let x,y,r such that A5: x in A \/ B and A6: y in A \/ B and A7: x < r and A8: r < y; per cases by A5,A6,XBOOLE_0:def 3; suppose x in A & y in A; then r in A by A1,A7,A8,Th80; hence thesis by XBOOLE_0:def 3; end; suppose that A9: x in A and A10: y in B; per cases; suppose r <= z; then r in A by A1,A4,A7,A9,Th80; hence thesis by XBOOLE_0:def 3; end; suppose z < r; then r in B by A2,A8,A10,Th82; hence thesis by XBOOLE_0:def 3; end; end; suppose that A11: x in B and A12: y in A; per cases; suppose z <= r; then r in A by A1,A4,A8,A12,Th80; hence thesis by XBOOLE_0:def 3; end; suppose A13: r < z; z <= x by A11,Th3; hence thesis by A7,A13,XXREAL_0:2; end; end; suppose x in B & y in B; then r in B by A2,A7,A8,Th80; hence thesis by XBOOLE_0:def 3; end; end; hence thesis by Th84; end; registration cluster left_end -> non empty for ext-real-membered set; coherence proof let A be ext-real-membered set; assume inf A in A; hence thesis; end; cluster right_end -> non empty for ext-real-membered set; coherence proof let A be ext-real-membered set; assume sup A in A; hence thesis; end; end; theorem for A being non empty Subset of ExtREAL st for r being Element of ExtREAL st r in A holds r <= -infty holds A = {-infty} proof let A be non empty Subset of ExtREAL such that A1: for r being Element of ExtREAL st r in A holds r <= -infty; assume A <> {-infty}; then ex a being Element of A st a <> -infty by SETFAM_1:49; hence contradiction by A1,XXREAL_0:6; end; theorem for A being non empty Subset of ExtREAL st for r being Element of ExtREAL st r in A holds +infty <= r holds A = {+infty} proof let A be non empty Subset of ExtREAL such that A1: for r being Element of ExtREAL st r in A holds +infty <= r; assume A <> {+infty}; then ex a being Element of A st a <> +infty by SETFAM_1:49; hence contradiction by A1,XXREAL_0:4; end; theorem Th94: for A being non empty Subset of ExtREAL, r being ext-real number st r < sup A ex s being Element of ExtREAL st s in A & r < s proof let A be non empty Subset of ExtREAL, r be ext-real number; assume A1: r < sup A; assume A2: for s being Element of ExtREAL st s in A holds not r < s; r is UpperBound of A proof let x be ext-real number; assume x in A; hence thesis by A2; end; hence contradiction by A1,Def3; end; theorem Th95: for A being non empty Subset of ExtREAL, r being Element of ExtREAL st inf A < r ex s being Element of ExtREAL st s in A & s < r proof let A be non empty Subset of ExtREAL, r be Element of ExtREAL; assume A1: inf A < r; assume A2: for s being Element of ExtREAL st s in A holds not s < r; r is LowerBound of A proof let x be ext-real number; assume x in A; hence thesis by A2; end; hence contradiction by A1,Def4; end; theorem for A,B being non empty Subset of ExtREAL st for r,s being Element of ExtREAL st r in A & s in B holds r <= s holds sup A <= inf B proof let A,B be non empty Subset of ExtREAL; assume A1: for r,s being Element of ExtREAL st r in A & s in B holds r <= s; assume not sup A <= inf B; then consider s1 being Element of ExtREAL such that A2: s1 in A and A3: inf B < s1 by Th94; ex s2 being Element of ExtREAL st s2 in B & s2 < s1 by A3,Th95; hence contradiction by A1,A2; end; begin reserve x,y,z,w for ext-real number, r for real number; definition let x,y; redefine pred x <= y means :Def1: ex p,q being Element of REAL st p = x & q = y & p <= q if x in REAL & y in REAL otherwise x = -infty or y = +infty; consistency; compatibility proof thus x in REAL & y in REAL implies (x <= y iff ex p,q being Element of REAL st p = x & q = y & p <= q); thus not(x in REAL & y in REAL) implies (x <= y iff x = -infty or y = +infty) proof assume A1: not(x in REAL & y in REAL); per cases by A1; suppose A2: not x in REAL; thus x <= y implies x = -infty or y = +infty proof assume A3: x <= y; assume x <> -infty; then x = +infty by A2,XXREAL_0:14; hence thesis by A3,XXREAL_0:4; end; thus thesis by XXREAL_0:3,5; end; suppose A4: not y in REAL; thus x <= y implies x = -infty or y = +infty proof assume A5: x <= y; assume A6: x <> -infty; assume y <> +infty; then y = -infty by A4,XXREAL_0:14; hence thesis by A5,A6,XXREAL_0:6; end; thus thesis by XXREAL_0:3,5; end; end; end; end; registration cluster non real positive for ext-real number; existence proof take +infty; thus thesis; end; cluster non real negative for ext-real number; existence proof take -infty; thus thesis; end; end; theorem Th1: for x being non real positive ext-real number holds x = +infty proof let x be non real positive ext-real number; not x in REAL; hence thesis by XXREAL_0:14; end; theorem Th2: for x being non real negative ext-real number holds x = -infty proof let x be non real negative ext-real number; not x in REAL; hence thesis by XXREAL_0:14; end; registration cluster non real non negative -> positive for ext-real number; coherence; cluster non real non positive -> negative for ext-real number; coherence; end; theorem Th3: x < z implies ex y being real number st x < y & y < z proof assume A1: x < z; per cases by XXREAL_0:14; suppose x in REAL & z in REAL; hence thesis by A1,XREAL_1:5; end; suppose x = +infty or z = -infty; hence thesis by A1,XXREAL_0:4,6; end; suppose A2: z = +infty; per cases by A1,A2,XXREAL_0:14; suppose x = -infty; hence thesis by A2; end; suppose x in REAL; then reconsider x1 = x as real number; take x1+1; A3: x1+1 in REAL by XREAL_0:def 1; x1+0 < x1+1 by XREAL_1:8; hence thesis by A2,A3,XXREAL_0:9; end; end; suppose A4: x = -infty; per cases by A1,A4,XXREAL_0:14; suppose z = +infty; hence thesis by A4; end; suppose z in REAL; then reconsider z1 = z as real number; take z1-1; A5: z1-1 in REAL by XREAL_0:def 1; z1-1 < z1-0 by XREAL_1:10; hence thesis by A4,A5,XXREAL_0:12; end; end; end; begin definition let x,y; func x + y -> ext-real number means :Def2: ex a,b being complex number st x = a & y = b & it = a + b if x is real & y is real, it = +infty if x = +infty & y <> -infty or y = +infty & x <> -infty, it = -infty if x = -infty & y <> +infty or y = -infty & x <> +infty otherwise it = 0; existence proof thus x is real & y is real implies ex c being ext-real number, a, b being complex number st x = a & y = b & c = a + b proof assume x is real & y is real; then reconsider a = x, b = y as real number; take a+b, a, b; thus thesis; end; thus thesis; end; uniqueness; consistency; commutativity; end; definition let x; func -x -> ext-real number means :Def3: ex a being complex number st x = a & it = -a if x is real, it = -infty if x = +infty otherwise it = +infty; existence proof thus x is real implies ex c being ext-real number, a being complex number st x = a & c = -a proof assume x is real; then reconsider a = x as real number; take -a, a; thus thesis; end; thus thesis; end; uniqueness; consistency; involutiveness proof let y,x be ext-real number such that A1: x is real implies ex a being complex number st x = a & y = - a and A2: x = +infty implies y = -infty and A3: x is not real & x <> +infty implies y = +infty; thus y is real implies ex a being complex number st y = a & x = - a proof assume y is real; then consider a being complex number such that A4: x = a & y = - a by A1,A2,A3; take -a; thus thesis by A4; end; x in REAL implies x is real; hence y = +infty implies x = -infty by A1,A2,XXREAL_0:14; thus thesis by A1,A3; end; end; definition let x,y; func x - y -> ext-real number equals x + -y; coherence; end; registration let x,y be real number, a,b be complex number; identify x+y with a+b when x = a, y = b; compatibility by Def2; end; registration let x be real number, a be complex number; identify -x with -a when x = a; compatibility by Def3; end; registration let r be real number; cluster -r -> real; coherence; end; registration let r,s be real number; cluster r+s -> real; coherence; cluster r-s -> real; coherence; end; registration let x be real number, y be non real ext-real number; cluster x+y -> non real for number; coherence proof not y in REAL; then A1: y = -infty or y = +infty by XXREAL_0:14; let z be number; assume z = x+y; hence thesis by A1,Def2; end; end; registration let x,y be non real positive ext-real number; cluster x+y -> non real; coherence proof x = +infty by Th1; hence thesis by Def2; end; end; registration let x,y be non real negative ext-real number; cluster x+y -> non real; coherence proof x = -infty by Th2; hence thesis by Def2; end; end; registration let x be non real negative ext-real number, y be non real positive ext-real number; cluster x+y -> zero; coherence proof x = -infty & y = +infty by Th1,Th2; hence thesis by Def2; end; end; registration let x,y be real number, a,b be complex number; identify x-y with a-b when x = a, y = b; compatibility; end; theorem Th4: x + 0 = x proof per cases by XXREAL_0:14; suppose x in REAL; then reconsider r=x as real number; r + 0 = r; hence thesis; end; suppose x = -infty or x = +infty; hence thesis by Def2; end; end; theorem Th5: --infty = +infty by Def3; theorem Th6: -+infty = -infty by Def3; Lm1: +infty + +infty = +infty by Def2; Lm2: -infty + -infty = -infty by Def2; theorem Th7: x + -x = 0 proof per cases by XXREAL_0:14; suppose x = -infty; hence thesis by Th5; end; suppose x in REAL; then reconsider x as real number; reconsider y=-x as real number; x + y = 0; hence thesis; end; suppose x = +infty; hence thesis by Th6; end; end; theorem x+y = 0 implies x = -y proof assume A1: x+y = 0; per cases by XXREAL_0:14; suppose x in REAL; then reconsider x as real number; x+y is real by A1; then reconsider y as real number; x+y = 0 by A1; then x = -y; hence thesis; end; suppose A2: x = -infty; then y = +infty by A1,Def2; hence thesis by A2,Def3; end; suppose A3: x = +infty; then y = -infty by A1,Def2; hence thesis by A3,Def3; end; end; Lm3: for x holds -x in REAL iff x in REAL proof let x; hereby assume -x in REAL; then reconsider a = -x as real number; -a in REAL by XREAL_0:def 1; hence x in REAL; end; assume x in REAL; then reconsider a = x as real number; -a is real; hence thesis by XREAL_0:def 1; end; Lm4: -(+infty + -infty) = +infty - +infty by Def3 .= --infty - +infty by Def3; Lm5: -+infty = -infty by Def3; Lm6: x in REAL implies -(x + +infty) = -+infty + -x proof assume A1: x in REAL; then x + +infty = +infty by Def2; hence thesis by A1,Def2,Th6; end; Lm7: x in REAL implies -(x + -infty) = --infty + -x proof assume A1: x in REAL; then x + -infty = -infty by Def2; hence thesis by A1,Def2,Th5; end; theorem Th9: -(x+y) = -x + -y proof per cases by XXREAL_0:14; suppose A1: x = +infty & y = +infty; hence -(x + y) = -+infty by Def2 .= -x +- y by A1,Def2,Lm5; end; suppose x = +infty & y = -infty; hence thesis by Lm4; end; suppose x = +infty & y in REAL; hence thesis by Lm6; end; suppose x = -infty & y = +infty; hence thesis by Lm4; end; suppose A2: x = -infty & y = -infty; hence -(x + y) = --infty by Def2 .= -x +- y by A2,Def2,Th5; end; suppose x = -infty & y in REAL; hence thesis by Lm7; end; suppose x in REAL & y = +infty; hence thesis by Lm6; end; suppose x in REAL & y = -infty; hence thesis by Lm7; end; suppose x in REAL & y in REAL; then reconsider a=x, b=y as real number; -(x + y) = -(a + b) .= -a + - b; hence thesis; end; end; reserve f,g for ext-real number; theorem Th10: -f = -g implies f = g proof assume A1: -f = -g; per cases by XXREAL_0:14; suppose A2: f in REAL; now assume not g in REAL; then g = +infty or g = -infty by XXREAL_0:14; hence contradiction by A1,A2,Def3; end; then A3: ex a being complex number st g = a & -g = -a by Def3; ex a being complex number st f = a & -f = -a by A2,Def3; hence thesis by A1,A3; end; suppose f = +infty; hence thesis by A1,Th5; end; suppose f = -infty; then - -g = -infty by A1; hence thesis by A1; end; end; Lm8: x + y = +infty implies x = +infty or y = +infty proof assume A1: x + y = +infty; assume ( not x = +infty)& not y = +infty; then x in REAL & y in REAL or x in REAL & y = -infty or x = -infty & y in REAL or x = -infty & y = -infty by XXREAL_0:14; hence thesis by A1,Def2; end; Lm9: x + y = -infty implies (x = -infty or y = -infty) proof assume A1: x + y = -infty; assume ( not x = -infty)& not y = -infty; then x in REAL & y in REAL or x in REAL & y = +infty or x = +infty & y in REAL or x = +infty & y = +infty by XXREAL_0:14; hence thesis by A1,Def2; end; theorem Th11: r+f = r+g implies f = g proof assume A1: r+f = r+g; per cases by XXREAL_0:14; suppose A2: f in REAL; now assume not g in REAL; then g = +infty or g = -infty by XXREAL_0:14; hence contradiction by A1,A2; end; then A3: ex c, d being complex number st r = c & g = d & r+g = c+d by Def2; ex a, b being complex number st r = a & f = b & r+f = a+ b by A2,Def2; hence thesis by A1,A3; end; suppose A4: f = +infty; then r+f = +infty by Def2; hence thesis by A1,A4,Lm8; end; suppose A5: f = -infty; then r+f = -infty by Def2; hence thesis by A1,A5,Lm9; end; end; theorem r-f = r-g implies f = g proof assume r-f = r-g; then -f = -g by Th11; hence thesis by Th10; end; theorem Th13: x <> +infty implies +infty - x = +infty & x - +infty = -infty proof assume A1: x <> +infty; then -x <> -infty by Th5; hence +infty - x = +infty by Def2; - +infty = -infty by Def3; hence thesis by A1,Def2; end; theorem Th14: x <> -infty implies -infty - x = -infty & x - -infty = +infty proof assume A1: x <> -infty; now assume -x = +infty; then --x = -infty by Def3; hence contradiction by A1; end; hence -infty - x = -infty by Def2; thus thesis by A1,Def2,Th5; end; theorem Th15: x - 0 = x proof per cases by XXREAL_0:14; suppose x in REAL; then reconsider a = x as real number; x - 0 = a - 0 .= x; hence thesis; end; suppose x = -infty; hence thesis by Th14; end; suppose x = +infty; hence thesis by Th13; end; end; theorem x + y = +infty implies x = +infty or y = +infty by Lm8; theorem x + y = -infty implies (x = -infty or y = -infty) by Lm9; theorem Th18: x - y = +infty implies (x = +infty or y = -infty) proof assume A1: x - y = +infty; assume ( not x = +infty)& not y = -infty; then x in REAL & y in REAL or x in REAL & y = +infty or x = -infty & y in REAL or x = -infty & y = +infty by XXREAL_0:14; hence thesis by A1,Th13,Th14; end; theorem Th19: x - y = -infty implies (x = -infty or y = +infty) proof assume A1: x - y = -infty; assume ( not x = -infty)& not y = +infty; then x in REAL & y in REAL or x in REAL & y = -infty or x = +infty & y in REAL or x = +infty & y = -infty by XXREAL_0:14; hence thesis by A1,Th13,Th14; end; theorem Th20: not ( x = +infty & y = -infty or x = -infty & y = +infty ) & x + y in REAL implies x in REAL & y in REAL proof assume A1: ( not ( x = +infty & y = -infty or x = -infty & y = +infty ))& x + y in REAL; A2: x in REAL or x = -infty or x = +infty by XXREAL_0:14; A3: y in REAL or y = -infty or y = +infty by XXREAL_0:14; assume not (x in REAL & y in REAL); hence thesis by A1,A2,A3; end; theorem Th21: not ( x = +infty & y = +infty or x = -infty & y = -infty ) & x - y in REAL implies x in REAL & y in REAL proof assume A1: ( not ( x = +infty & y = +infty or x = -infty & y = -infty ))& x - y in REAL; A2: x in REAL or x = -infty or x = +infty by XXREAL_0:14; A3: y in REAL or y = -infty or y = +infty by XXREAL_0:14; assume not (x in REAL & y in REAL); hence thesis by A1,A2,A3,Th13,Th14; end; theorem Th22: x is real implies y - x + x = y & y + x - x = y proof assume A1: x is real; per cases by A1,XXREAL_0:14; suppose x in REAL & y in REAL; then reconsider a = x, b = y as real number; A2: (y + x) - x = b + a - a .= y; y - x + x = (b - a) + a .= y; hence thesis by A2; end; suppose A3: x in REAL & y = -infty; then y - x = -infty by Def2; hence thesis by A3,Def2; end; suppose A4: x in REAL & y = +infty; then y - x = +infty by Def2; hence thesis by A4,Def2; end; end; theorem Th23: (x = +infty iff -x = -infty) & (x = -infty iff -x = +infty) proof -x = +infty implies x = -infty proof assume -x = +infty; then --x = -infty by Def3; hence thesis; end; hence thesis by Th5; end; theorem z is real implies x = x + z - z proof assume A1: z is real; per cases by XXREAL_0:14; suppose A2: x = +infty; then x + z = +infty by A1,Def2; hence thesis by A1,A2,Th13; end; suppose A3: x = -infty; then x + z = -infty by A1,Def2; hence thesis by A1,A3,Th14; end; suppose x is Element of REAL; then reconsider a = x, c = z as real number by A1; x + z - z = a + c - c; hence thesis; end; end; Lm10: -+infty = -infty by Def3; Lm11: x in REAL implies -(x + -infty) = --infty + -x proof A1: --infty = +infty by Th23; assume A2: x in REAL; then x + -infty = -infty by Def2; hence thesis by A2,A1,Def2; end; theorem Th25: -(x + y) = -y - x proof per cases by XXREAL_0:14; suppose A1: x = +infty & y = +infty; hence -(x + y) = -+infty by Def2 .= -y - x by A1,Def2,Lm10; end; suppose x = +infty & y = -infty; hence thesis by Lm4; end; suppose x = +infty & y in REAL; hence thesis by Lm6; end; suppose x = -infty & y = +infty; hence thesis by Lm4; end; suppose A2: x = -infty & y = -infty; hence -(x + y) = --infty by Def2 .= -y - x by A2,Def2,Th5; end; suppose x = -infty & y in REAL; hence thesis by Lm11; end; suppose x in REAL & y = +infty; hence thesis by Lm6; end; suppose x in REAL & y = -infty; hence thesis by Lm11; end; suppose x in REAL & y in REAL; then reconsider a=x, b=y as real number; -(x + y) = -(a + b) .= -a + - b; hence thesis; end; end; theorem -(x - y) = -x + y & -(x - y) = y - x proof -(x - y) = -(-y) - x by Th25; hence thesis; end; theorem Th27: -(-x + y) = x - y & -(-x + y) = x + -y proof -(-x + y) = -(-x) - y by Th25 .= x - y; hence thesis; end; theorem 0 <= y & y < +infty implies z = z + y - y proof assume 0 <= y & y < +infty; then y in REAL by XXREAL_0:14; hence thesis by Th22; end; theorem Th29: not (x = +infty & y = -infty) & not (x = -infty & y = +infty) & not ( y = +infty & z = -infty or y = -infty & z = +infty ) & not ( x = +infty & z = -infty or x = -infty & z = +infty ) implies x + y + z = x + (y + z) proof assume A1: ( not (x = +infty & y = -infty or x = -infty & y = +infty))& not ( y = +infty & z = -infty or y = -infty & z = +infty ) & not ( x = +infty & z = -infty or x = -infty & z = +infty ); per cases by A1,XXREAL_0:14; suppose x in REAL & y in REAL & z in REAL; then reconsider A = x, B = y, C = z as real number; A + B + C = x + y + z & A + (B + C) = x + (y + z); hence thesis; end; suppose A2: x in REAL & y = +infty & z in REAL; then x + y = +infty & y + z = +infty by Def2; hence thesis by A2; end; suppose A3: x in REAL & y = -infty & z in REAL; then x + y = -infty & y + z = -infty by Def2; hence thesis by A3; end; suppose A4: x = -infty & y in REAL & z in REAL; then x + y = -infty by Def2; then x + y + z = -infty by A4,Def2; hence thesis by A4,Def2; end; suppose A5: x = +infty & y in REAL & z in REAL; then x + y = +infty by Def2; then x + y + z = +infty by A5,Def2; hence thesis by A5,Def2; end; suppose A6: x in REAL & y in REAL & z = +infty; then y + z = +infty by Def2; then x + (y + z) = +infty by A6,Def2; hence thesis by A6,Def2; end; suppose A7: x in REAL & y in REAL & z = -infty; then y + z = -infty by Def2; then x + (y + z) = -infty by A7,Def2; hence thesis by A7,Def2; end; suppose A8: x = +infty & y = +infty & z in REAL; then x + y = +infty by Def2; then A9: x + y + z = +infty by A8,Def2; y + z <> -infty by A8,Def2; hence thesis by A8,A9,Def2; end; suppose A10: x in REAL & y = -infty & z = -infty; then A11: x + y = -infty by Def2; then x + y + z = -infty by A10,Def2; hence thesis by A10,A11; end; suppose A12: x = -infty & y = -infty & z in REAL; then A13: x + y = -infty by Def2; then x + y + z = -infty by A12,Def2; hence thesis by A12,A13; end; suppose x = -infty & y in REAL & z = -infty or x = -infty & y = -infty & z = -infty or x = +infty & y in REAL & z = +infty or x = +infty & y = +infty & z = +infty; hence thesis; end; suppose A14: x in REAL & y = +infty & z = +infty; then x + y = +infty & y + z = +infty by Def2; hence thesis by A14; end; end; theorem Th30: not (x = +infty & y = -infty) & not (x = -infty & y = +infty) & not (y = +infty & z = +infty) & not (y = -infty & z = -infty) & not (x = +infty & z = +infty) & not (x = -infty & z = -infty) implies x + y - z = x + (y - z) proof assume that A1: ( not (x = +infty & y = -infty))& not (x = -infty & y = +infty) and A2: ( not (y = +infty & z = +infty))& not (y = -infty & z = -infty) and A3: ( not (x = +infty & z = +infty))& not (x = -infty & z = -infty); A4: ( not (x = +infty & -z = -infty))& not (x = -infty & -z = +infty) by A3 ,Th23; ( not (y = +infty & -z = -infty))& not (y = -infty & -z = +infty) by A2,Th23; hence thesis by A1,A4,Th29; end; theorem not (x = +infty & y = +infty) & not (x = -infty & y = -infty) & not (y = +infty & z = -infty) & not (y = -infty & z = +infty) & not (x = +infty & z = +infty) & not (x = -infty & z = -infty) implies x - y - z = x - (y + z) proof assume that A1: not(x=+infty & y=+infty) and A2: not(x=-infty & y=-infty) and A3: not (y = +infty & z = -infty) and A4: not (y = -infty & z = +infty) and A5: not (x = +infty & z = +infty) and A6: not (x = -infty & z = -infty); per cases; suppose A7: x = +infty; then x - y = +infty by A1,Th13; then A8: x - y - z = +infty by A5,A7,Th13; y + z <> +infty by A1,A5,A7,Lm8; hence thesis by A7,A8,Th13; end; suppose A9: x = -infty; then x - y = -infty by A2,Th14; then A10: x - y - z = -infty by A6,A9,Th14; y + z <> -infty by A2,A6,A9,Lm9; hence thesis by A9,A10,Th14; end; suppose A11: x <> +infty & x <> -infty; then x in REAL by XXREAL_0:14; then reconsider a = x as real number; per cases; suppose A12: y = +infty; then x - y = -infty & y + z = +infty by A3,A11,Def2,Th13; hence thesis by A3,A12,Th14; end; suppose A13: y = -infty; then x - y = +infty & y + z = -infty by A4,A11,Def2,Th14; hence thesis by A4,A13,Th13; end; suppose y <> +infty & y <> -infty; then y in REAL by XXREAL_0:14; then reconsider b = y as real number; A14: x - y = a - b; per cases; suppose z = +infty; then x - y - z = -infty & y + z = +infty by A14,Def2,Th13; hence thesis by A11,Th13; end; suppose z = -infty; then x - y - z = +infty & y + z = -infty by A14,Def2,Th14; hence thesis by A11,Th14; end; suppose z <> +infty & z <> -infty; then z in REAL by XXREAL_0:14; then reconsider c = z as real number; x - y - z = a - b - c & x - (y + z) = a - (b + c); hence thesis; end; end; end; end; theorem Th32: not (x = +infty & y = +infty) & not (x = -infty & y = -infty) & not (y = +infty & z = +infty) & not (y = -infty & z = -infty) & not (x = +infty & z = -infty) & not (x = -infty & z = +infty) implies x - y + z = x - (y - z) proof assume that A1: not(x=+infty & y=+infty) and A2: not(x=-infty & y=-infty) and A3: not (y = +infty & z = +infty) and A4: not (y = -infty & z = -infty) and A5: not (x = +infty & z = -infty) and A6: not (x = -infty & z = +infty); per cases; suppose A7: x = +infty; then x - y = +infty by A1,Th13; then A8: x - y + z = +infty by A5,A7,Def2; y - z <> +infty by A1,A5,A7,Th18; hence thesis by A7,A8,Th13; end; suppose A9: x = -infty; then x - y = -infty by A2,Th14; then A10: x - y + z = -infty by A6,A9,Def2; y - z <> -infty by A2,A6,A9,Th19; hence thesis by A9,A10,Th14; end; suppose A11: x <> +infty & x <> -infty; then x in REAL by XXREAL_0:14; then reconsider a = x as real number; per cases; suppose A12: y = +infty; then x - y = -infty & y - z = +infty by A3,A11,Th13; hence thesis by A3,A12,Def2; end; suppose A13: y = -infty; then x - y = +infty & y - z = -infty by A4,A11,Th14; hence thesis by A4,A13,Def2; end; suppose y <> +infty & y <> -infty; then y in REAL by XXREAL_0:14; then reconsider b = y as real number; A14: x - y = a - b; per cases; suppose z = +infty; then x - y + z = +infty & y - z = -infty by A14,Def2,Th13; hence thesis by A11,Th14; end; suppose z = -infty; then x - y + z = -infty & y - z = +infty by A14,Def2,Th14; hence thesis by A11,Th13; end; suppose z <> +infty & z <> -infty; then z in REAL by XXREAL_0:14; then reconsider c = z as real number; x - y + z = a - b + c & x - (y - z) = a - (b - c); hence thesis; end; end; end; end; theorem Th33: z is real implies (z + x) - (z + y) = x - y proof assume A1: z is real; per cases by A1,XXREAL_0:14; suppose A2: x = -infty; per cases by XXREAL_0:14; suppose A3: y = -infty; (z + -infty) - (z + -infty) = -infty - (z + -infty) by A1,Def2 .= -infty - -infty by A1,Def2; hence thesis by A2,A3; end; suppose A4: y = +infty; (z + -infty) - (z + +infty) = -infty - (z + +infty) by A1,Def2 .= -infty - +infty by A1,Def2; hence thesis by A2,A4; end; suppose A5: y in REAL; then consider a,b being complex number such that A6: z = a & y = b and z+y = a + b by A1,Def2; reconsider a,b as real number by A1,A5,A6; A7: a+b in REAL by XREAL_0:def 1; (z + -infty) - (z + y) = -infty - (z + y) by A1,Def2 .= -infty by A6,A7,Def2 .= -infty - y by A5,Def2; hence thesis by A2; end; end; suppose A8: y = +infty; per cases by XXREAL_0:14; suppose A9: x = -infty; (z + -infty) - (z + +infty) = z + -infty - +infty by A1,Def2 .= -infty - +infty by A1,Def2; hence thesis by A8,A9; end; suppose A10: x = +infty; (z + +infty) - (z + +infty) = z + +infty - +infty by A1,Def2 .= +infty - +infty by A1,Def2; hence thesis by A8,A10; end; suppose A11: x in REAL; then consider a,b being complex number such that A12: z = a & x = b and z+x = a + b by A1,Def2; reconsider a,b as real number by A1,A11,A12; A13: a+b in REAL by XREAL_0:def 1; A14: - +infty = -infty by Def3; (z + x) - (z + +infty) = z + x - +infty by A1,Def2 .= z + x + -infty by Def3 .= -infty by A12,A13,Def2 .= x + - +infty by A11,A14,Def2; hence thesis by A8; end; end; suppose x in REAL & y in REAL & z in REAL; then reconsider a = x, b = y, c = z as real number; (z + x) - (z + y) = (a + c) - (c + b) .= a - b .= x - y; hence thesis; end; suppose A15: x = +infty & y in REAL & z in REAL; then reconsider c = z, b = y as real number; A16: z + y = c + b; z + x = +infty & x - y = +infty by A15,Def2; hence thesis by A16,Th13; end; suppose A17: x in REAL & y = -infty & z in REAL; then reconsider c = z, a = x as real number; z + x = c + a & z + y = -infty by A17,Def2; then (z + x) - (z + y) = +infty by Th14 .= x - y by A17,Th14; hence thesis; end; suppose A18: x = +infty & y = -infty & z in REAL; then z + y = -infty & not z + x = -infty by Def2; then (z + x) - (z + y) = +infty by Th14 .= x - y by A18,Th14; hence thesis; end; end; theorem y is real implies (z - y) + (y - x) = z - x proof assume A1: y is real; thus (z - y) + (y - x) = (z - y) - (x - y) by Th27 .= z - x by A1,Th33; end; begin Lm12: x <= y implies x + z <= y + z proof assume A1: x <= y; per cases by XXREAL_0:14; suppose A2: x in REAL & y in REAL; per cases by XXREAL_0:14; suppose A3: z = -infty; -infty <= y + z by XXREAL_0:5; hence thesis by A2,A3,Def2; end; suppose z in REAL; then reconsider x, y, z as real number by A2; x + z <= y + z by A1,XREAL_1:6; hence thesis; end; suppose A4: z = +infty; x + z <= +infty by XXREAL_0:3; hence thesis by A2,A4,Def2; end; end; suppose A5: x in REAL & y = +infty; per cases by XXREAL_0:14; suppose A6: z = -infty; -infty <= y+z by XXREAL_0:5; hence thesis by A5,A6,Def2; end; suppose A7: z in REAL; x + z <= +infty by XXREAL_0:3; hence thesis by A5,A7,Def2; end; suppose z = +infty; hence thesis by A5,Lm1,XXREAL_0:3; end; end; suppose A8: x = -infty & y in REAL; per cases by XXREAL_0:14; suppose z = -infty; hence thesis by A8,Lm2,XXREAL_0:5; end; suppose A9: z in REAL; -infty <= y + z by XXREAL_0:5; hence thesis by A8,A9,Def2; end; suppose A10: z = +infty; x + z <= +infty by XXREAL_0:3; hence thesis by A8,A10,Def2; end; end; suppose A11: x = -infty & y = +infty; per cases by XXREAL_0:14; suppose z = -infty; hence thesis by A11,Lm2; end; suppose A12: z in REAL; -infty <= y + z by XXREAL_0:5; hence thesis by A11,A12,Def2; end; suppose z = +infty; hence thesis by A11,Lm1; end; end; suppose x = +infty; hence thesis by A1,XXREAL_0:4; end; suppose y = -infty; hence thesis by A1,XXREAL_0:6; end; end; Lm13: x >= 0 & y > 0 implies x + y > 0 proof assume x >= 0; then x + y >= 0 + y by Lm12; hence thesis by Th4; end; Lm14: x <= 0 & y < 0 implies x + y < 0 proof assume x <= 0; then x + y <= 0 + y by Lm12; hence thesis by Th4; end; registration let x,y be non negative ext-real number; cluster x + y -> non negative; coherence proof per cases; suppose x = 0; hence x + y >= 0 by Th4; end; suppose x > 0; hence x+y >= 0 by Lm13; end; end; end; registration let x,y be non positive ext-real number; cluster x + y -> non positive; coherence proof per cases; suppose x = 0; hence x + y <= 0 by Th4; end; suppose x < 0; hence x + y <= 0 by Lm14; end; end; end; registration let x be positive ext-real number; let y be non negative ext-real number; cluster x + y -> positive; coherence by Lm13; cluster y + x -> positive; coherence; end; registration let x be negative ext-real number; let y be non positive ext-real number; cluster x + y -> negative; coherence by Lm14; cluster y + x -> negative; coherence; end; registration let x be non positive ext-real number; cluster -x -> non negative; coherence proof assume -x < 0; then -x - -x < 0; hence contradiction by Th7; end; end; registration let x be non negative ext-real number; cluster -x -> non positive; coherence proof assume -x > 0; then -x - -x > 0; hence contradiction by Th7; end; end; registration let x be positive ext-real number; cluster -x -> negative; coherence proof assume -x >= 0; then -x- -x > 0; hence contradiction by Th7; end; end; registration let x be negative ext-real number; cluster -x -> positive; coherence proof assume -x <= 0; then -x- -x < 0; hence contradiction by Th7; end; end; registration let x be non negative ext-real number, y be non positive ext-real number; cluster x - y -> non negative; coherence; cluster y - x -> non positive; coherence; end; registration let x be positive ext-real number; let y be non positive ext-real number; cluster x - y -> positive; coherence; cluster y - x -> negative; coherence; end; registration let x be negative ext-real number; let y be non negative ext-real number; cluster x - y -> negative; coherence; cluster y - x -> positive; coherence; end; Lm15: for x,y st x <= y holds - y <= - x proof let x,y; assume A1: x <= y; per cases; case that A2: -y in REAL and A3: -x in REAL; x in REAL by A3,Lm3; then consider a being complex number such that A4: x = a and A5: -x = - a by Def3; y in REAL by A2,Lm3; then consider b being complex number such that A6: y = b and A7: -y = - b by Def3; x in REAL & y in REAL by A2,A3,Lm3; then reconsider a,b as real number by A6,A4; reconsider mb=-b, ma=-a as Element of REAL by XREAL_0:def 1; take mb,ma; thus mb = -y & ma = -x by A7,A5; thus thesis by A1,A6,A4,XREAL_1:24; end; case not(-y in REAL & -x in REAL); then not(y in REAL & x in REAL) by Lm3; then x = -infty or y = +infty by A1,Def1; hence thesis by Def3; end; end; theorem x <= y implies x + z <= y + z by Lm12; theorem Th36: x <= y & z <= w implies x + z <= y + w proof assume that A1: x <= y and A2: z <= w; per cases; suppose A3: x = +infty & z = -infty; A4: w <> -infty implies +infty + w = +infty by Def2; y = +infty by A1,A3,XXREAL_0:4; hence thesis by A3,A4; end; suppose A5: x = -infty & z = +infty; A6: y <> -infty implies +infty + y = +infty by Def2; w = +infty by A2,A5,XXREAL_0:4; hence thesis by A5,A6; end; suppose A7: y = +infty & w = -infty; A8: x <> +infty implies -infty + x = -infty by Def2; z = -infty by A2,A7,XXREAL_0:6; hence thesis by A7,A8; end; suppose A9: y = -infty & w = +infty; A10: z <> +infty implies -infty + z = -infty by Def2; x = -infty by A1,A9,XXREAL_0:6; hence thesis by A9,A10; end; suppose A11: not ( x = +infty & z = -infty or x = -infty & z = +infty ) & not ( y = +infty & w = -infty or y = -infty & w = +infty ); reconsider a = x + z, b = y + w as Element of ExtREAL by XXREAL_0:def 1; A12: not(a = +infty & b = -infty) proof assume that A13: a = +infty and A14: b = -infty; x = +infty or z = +infty by A13,Lm8; hence thesis by A1,A2,A11,A14,Lm9,XXREAL_0:4; end; A15: a in REAL & b in REAL implies a <= b proof assume A16: a in REAL & b in REAL; then A17: z in REAL & w in REAL by A11,Th20; x in REAL & y in REAL by A11,A16,Th20; then consider Ox,Oy,Os,Ot being real number such that A18: Ox = x & Oy = y & Os = z & Ot = w and A19: Ox <= Oy & Os <= Ot by A1,A2,A17; Ox + Os <= Os + Oy & Os + Oy <= Ot + Oy by A19,XREAL_1:6; hence thesis by A18,XXREAL_0:2; end; A20: a = +infty & b in REAL implies a <= b proof assume that A21: a = +infty and b in REAL; x = +infty or z = +infty by A21,Lm8; then y = +infty or w = +infty by A1,A2,XXREAL_0:4; then b = +infty by A11,Def2; hence thesis by XXREAL_0:4; end; A22: a in REAL & b = -infty implies a <= b proof assume that a in REAL and A23: b = -infty; y = -infty or w = -infty by A23,Lm9; then x = -infty or z = -infty by A1,A2,XXREAL_0:6; then a = -infty by A11,Def2; hence thesis by XXREAL_0:5; end; a in REAL & b in REAL or a in REAL & b = +infty or a in REAL & b = -infty or a = +infty & b in REAL or a = +infty & b = +infty or a = +infty & b = -infty or a = -infty & b in REAL or a = -infty & b = +infty or a = -infty & b = -infty by XXREAL_0:14; hence thesis by A15,A22,A20,A12,XXREAL_0:4,5; end; end; theorem Th37: x <= y & z <= w implies x - w <= y - z proof assume that A1: x <= y and A2: z <= w; -w <= -z by A2,Lm15; hence thesis by A1,Th36; end; theorem Th38: x <= y iff - y <= - x proof thus x <= y implies - y <= - x by Lm15; - y <= - x implies --x <= --y by Lm15; hence thesis; end; theorem Th39: 0 <= z implies x <= x + z proof assume 0 <= z; then x + 0 <= x + z by Th36; hence thesis by Th4; end; theorem x <= y implies y-x >= 0 proof assume x <= y; then -y <= -x by Lm15; then -y +y <= y + -x by Th36; hence thesis by Th7; end; theorem (z = -infty & y = +infty implies x <= 0) & (z = +infty & y = -infty implies x <= 0) implies (x - y <= z implies x <= z + y) proof assume that A1: z = -infty & y = +infty implies x <= 0 and A2: z = +infty & y = -infty implies x <= 0 and A3: x - y <= z; per cases by XXREAL_0:14; suppose A4: z = -infty; per cases by A3,A4,Th19,XXREAL_0:6; suppose x = -infty; hence thesis by XXREAL_0:5; end; suppose y = +infty; hence thesis by A1,A4; end; end; suppose A5: z = +infty; per cases; suppose y = -infty; hence thesis by A2,A5; end; suppose y <> -infty; then z + y = +infty by A5,Def2; hence thesis by XXREAL_0:3; end; end; suppose A6: z in REAL; per cases by A3,A6,XXREAL_0:13; suppose A7: x-y in REAL; per cases by A7,Th21; suppose y = +infty; then z + y = +infty by A6,Def2; hence thesis by XXREAL_0:3; end; suppose x = -infty; hence thesis by XXREAL_0:5; end; suppose x in REAL & y in REAL; then reconsider a = x, b = y, c = z as Element of REAL by A6; a - b <= c by A3; then a <= b + c by XREAL_1:20; hence thesis; end; end; suppose A8: x-y = -infty; per cases by A8,Th19; suppose x = -infty; hence thesis by XXREAL_0:5; end; suppose y = +infty; then z + y = +infty by A6,Def2; hence thesis by XXREAL_0:3; end; end; end; end; theorem (x = +infty & y = +infty implies 0 <= z) & (x = -infty & y = -infty implies 0 <= z) implies (x <= z + y implies x - y <= z) proof assume that A1: x = +infty & y = +infty implies 0 <= z and A2: x = -infty & y = -infty implies 0 <= z and A3: x <= z + y; per cases by XXREAL_0:14; suppose A4: x = +infty; per cases by A3,A4,Lm8,XXREAL_0:4; suppose z = +infty; hence thesis by XXREAL_0:3; end; suppose y = +infty; hence thesis by A1,A4,Th7; end; end; suppose A5: x = -infty; per cases; suppose y = -infty; hence thesis by A2,A5,Th7; end; suppose --y <> -infty; then -y <> +infty by Def3; then x - y = -infty by A5,Def2; hence thesis by XXREAL_0:5; end; end; suppose A6: x in REAL; per cases by A3,A6,XXREAL_0:10; suppose A7: z + y in REAL; per cases by A7,Th20; suppose y = +infty; then x - y = -infty by A6,Def2,Th5; hence thesis by XXREAL_0:5; end; suppose z = +infty; hence thesis by XXREAL_0:3; end; suppose z in REAL & y in REAL; then reconsider a = x, b = y, c = z as Element of REAL by A6; a <= b + c by A3; then a - b <= c by XREAL_1:20; hence thesis; end; end; suppose A8: z + y = +infty; per cases by A8,Lm8; suppose z = +infty; hence thesis by XXREAL_0:3; end; suppose y = +infty; then x - y = -infty by A6,Def2,Th5; hence thesis by XXREAL_0:5; end; end; end; end; theorem Th43: z in REAL & x < y implies x + z < y + z & x - z < y - z proof assume that A1: z in REAL and A2: x < y; A3: x + z <> y + z proof assume x + z = y + z; then x = (y + z) - z by A1,Th22 .= y by A1,Th22; hence thesis by A2; end; A4: x - z <> y - z proof assume x - z = y - z; then x = (y - z) + z by A1,Th22 .= y by A1,Th22; hence thesis by A2; end; x + z <= y + z & x - z <= y - z by A2,Th36; hence thesis by A3,A4,XXREAL_0:1; end; theorem 0<= x & 0<= y & 0<= z implies (x + y) + z = x + (y + z) proof assume that A1: 0<= x and A2: 0<= y and A3: 0<= z; per cases by A1,A2,A3,XXREAL_0:14; suppose x in REAL & y in REAL & z in REAL; then consider a,b,c,d,e being real number such that A4: x = a & y = b & z = c and x + y = d and y + z = e; (x + y) + z = (a + b) + c by A4 .= a + (b + c) .= x + (y + z) by A4; hence thesis; end; suppose A5: x = +infty; then (x + y) + z = +infty + z by A2,Def2 .= +infty by A3,Def2 .= +infty + (y + z) by A2,A3,Def2; hence thesis by A5; end; suppose A6: y = +infty; then (x + y) + z = +infty + z by A1,Def2 .= +infty by A3,Def2 .= x + (+infty) by A1,Def2 .= x + (+infty + z) by A3,Def2; hence thesis by A6; end; suppose A7: z = +infty; then (x + y) + z = +infty by A1,A2,Def2 .= x + (+infty) by A1,Def2 .= x + (y + (+infty)) by A2,Def2; hence thesis by A7; end; end; theorem Th45: x is real implies (y + x <= z iff y <= z - x) proof assume A1: x is real; A2: (z - x) + x = z proof per cases by XXREAL_0:14; suppose z in REAL; then reconsider a = x, b = z as real number by A1; thus (z - x) + x = (b - a) + a .= z; end; suppose A3: z = -infty; hence (z - x) + x = -infty + x by A1,Th14 .= z by A1,A3,Def2; end; suppose A4: z = +infty; hence (z - x) + x = +infty + x by A1,Th13 .= z by A1,A4,Def2; end; end; hereby A5: (y + x) - x = y proof per cases by XXREAL_0:14; suppose y in REAL; then reconsider a = x, b = y as Element of REAL by A1,XXREAL_0:14; (y + x) - x = (b + a) - a .= y; hence thesis; end; suppose A6: y = -infty or y = +infty; per cases by A6; suppose A7: y = -infty; hence (y + x) - x = -infty - x by A1,Def2 .= y by A1,A7,Th14; end; suppose A8: y = +infty; hence (y + x) - x = +infty - x by A1,Def2 .= y by A1,A8,Th13; end; end; end; assume y + x <= z; hence y <= z - x by A5,Th37; end; assume y <= z - x; hence thesis by A2,Th36; end; theorem Th46: 0 < x & x < y implies 0 < y - x proof assume that A1: 0 < x and A2: x < y; A3: x in REAL by A1,A2,XXREAL_0:48; A4: 0 <> y - x proof assume 0= y - x; then x = (y - x) + x by Th4 .= y by A3,Th22; hence thesis by A2; end; 0 + x < y by A2,Th4; hence thesis by A3,A4,Th45; end; theorem 0 <= x & 0 <= z & z + x < y implies z < y - x proof assume that A1: 0 <= x and A2: 0 <= z and A3: z + x < y; x in REAL proof A4: x <> +infty proof assume x = +infty; then +infty < y by A2,A3,Def2; hence thesis by XXREAL_0:4; end; assume not x in REAL; hence thesis by A1,A4,XXREAL_0:10; end; then z <= y - x & z <> y - x by A3,Th22,Th45; hence thesis by XXREAL_0:1; end; theorem 0 <= x & 0 <= z & z + x < y implies z <= y proof assume that A1: 0 <= x and A2: 0 <= z and A3: z + x < y; x in REAL proof A4: x <> +infty proof assume x = +infty; then +infty < y by A2,A3,Def2; hence thesis by XXREAL_0:4; end; assume not x in REAL; hence thesis by A1,A4,XXREAL_0:10; end; then A5: (z + x) - x = z by Th22; y - 0 = y by Th15; hence thesis by A1,A3,A5,Th37; end; theorem Th49: 0 <= x & x < z implies ex y being real number st 0 < y & x + y < z proof assume that A1: 0 <= x and A2: x < z; per cases by A1; suppose A3: 0 < x; then 0 < z - x by A2,Th46; then consider y being real number such that A4: 0 < y and A5: y < z - x by Th3; take y; A6: x + y <= x + (z - x) by A5,Th36; A7: x in REAL by A2,A3,XXREAL_0:48; then A8: x + (z - x) = z by Th22; x + y <> z by A7,A5,Th22; hence thesis by A4,A6,A8,XXREAL_0:1; end; suppose A9: 0 = x; consider y being real number such that A10: 0 < y & y < z by A1,A2,Th3; take y; thus thesis by A9,A10,Th4; end; end; theorem 0 < x implies ex y being real number st 0 < y & y + y < x proof assume 0 < x; then consider x1 being real number such that A1: 0 < x1 and A2: x1 < x by Th3; consider x2 being real number such that A3: 0 < x2 and A4: x1 + x2 < x by A1,A2,Th49; take y = min(x1,x2); per cases; suppose A5: x1 <= x2; hence 0 < y by A1,XXREAL_0:def 9; y = x1 by A5,XXREAL_0:def 9; then y + y <= x1 + x2 by A5,Th36; hence thesis by A4,XXREAL_0:2; end; suppose A6: x2 <= x1; hence 0 < y by A3,XXREAL_0:def 9; y = x2 by A6,XXREAL_0:def 9; then y + y <= x1 + x2 by A6,Th36; hence thesis by A4,XXREAL_0:2; end; end; theorem Th51: x < y & x < +infty & -infty < y implies 0 < y- x proof assume that A1: x < y and A2: x < +infty and A3: -infty < y; per cases; suppose y = +infty; hence thesis by A2,Th13; end; suppose A4: y <> +infty; per cases; suppose x = -infty; hence thesis by A3,Th14; end; suppose A5: x <> -infty; A6: y in REAL by A3,A4,XXREAL_0:14; x in REAL by A2,A5,XXREAL_0:14; then reconsider a = x, b = y as real number by A6; b - a > 0 by A1,XREAL_1:50; hence thesis; end; end; end; theorem not ( x = +infty & y = -infty or x = -infty & y = +infty ) & x + y < z implies x <> +infty & y <> +infty & z <> -infty & x < z - y proof assume that A1: not ( x=+infty & y=-infty or x=-infty & y=+infty ) and A2: x + y < z; per cases; suppose A3: z = +infty; then x<>+infty by A1,A2,Def2; then A4: x < +infty by XXREAL_0:4; y<>+infty by A1,A2,A3,Def2; hence thesis by A3,A4,Th13; end; suppose A5: z <> +infty; A6: -infty <= x + y by XXREAL_0:5; then z in REAL by A2,A5,XXREAL_0:14; then reconsider c = z as real number; A7: x + y < +infty by A2,XXREAL_0:2,4; then A8: x <> +infty by A1,Def2; A9: y <> +infty by A1,A7,Def2; per cases; suppose A10: y = -infty; then x < +infty by A1,XXREAL_0:4; hence thesis by A2,A6,A10,Th14; end; suppose y <> -infty; then y in REAL by A9,XXREAL_0:14; then reconsider b = y as real number; per cases; suppose A11: x = -infty; hence x <> +infty; A12: z - y = c - b; hence y <> +infty; thus z <> -infty by A12; c-b in REAL by XREAL_0:def 1; hence thesis by A11,XXREAL_0:12; end; suppose x <> -infty; then x in REAL by A8,XXREAL_0:14; then reconsider a = x as real number; x + y = a + b; then a < c - b by A2,XREAL_1:20; hence thesis; end; end; end; end; theorem not ( z = +infty & y = +infty or z = -infty & y = -infty ) & x < z - y implies x <> +infty & y <> +infty & z <> -infty & x + y < z proof assume that A1: not ( z=+infty & y=+infty or z=-infty & y=-infty ) and A2: x < z - y; per cases; suppose A3: x = -infty; A4: -infty <= z by XXREAL_0:5; z<>-infty by A1,A2,A3,Th14; then A5: -infty < z by A4,XXREAL_0:1; y<>+infty by A1,A2,A3,Th13; hence thesis by A3,A5,Def2; end; suppose A6: x <> -infty; A7: z - y <= +infty by XXREAL_0:4; then x in REAL by A2,A6,XXREAL_0:14; then reconsider a = x as real number; A8: -infty <= x by XXREAL_0:5; then A9: z <> -infty by A1,A2,Th14; A10: y <> +infty by A1,A2,A8,Th13; per cases; suppose A11: y = -infty; -infty <= z by XXREAL_0:5; then -infty < z by A1,A11,XXREAL_0:1; hence thesis by A2,A7,A11,Def2; end; suppose y <> -infty; then y in REAL by A10,XXREAL_0:14; then reconsider b = y as real number; per cases; suppose A12: z = +infty; a+b in REAL by XREAL_0:def 1; hence thesis by A12,XXREAL_0:9; end; suppose z <> +infty; then z in REAL by A9,XXREAL_0:14; then reconsider c = z as real number; z - y = c - b; then a + b < c by A2,XREAL_1:20; hence thesis; end; end; end; end; theorem not ( x = +infty & y = +infty or x = -infty & y = -infty ) & x - y < z implies x <> +infty & y <> -infty & z <> -infty & x < z + y proof assume that A1: not ( x=+infty & y=+infty or x=-infty & y=-infty ) and A2: x - y < z; per cases; suppose A3: z = +infty; then x<>+infty by A1,A2,Th13; then A4: x < +infty by XXREAL_0:4; y<>-infty by A1,A2,A3,Th14; hence thesis by A3,A4,Def2; end; suppose A5: z <> +infty; A6: -infty <= x - y by XXREAL_0:5; then z in REAL by A2,A5,XXREAL_0:14; then reconsider c = z as real number; A7: x - y < +infty by A2,XXREAL_0:2,4; then A8: x <> +infty by A1,Th13; A9: y <> -infty by A1,A7,Th14; per cases; suppose A10: y = +infty; then x < +infty by A1,XXREAL_0:4; hence thesis by A2,A6,A10,Def2; end; suppose y <> +infty; then y in REAL by A9,XXREAL_0:14; then reconsider b = y as real number; per cases; suppose A11: x = -infty; c+b in REAL by XREAL_0:def 1; hence thesis by A11,XXREAL_0:12; end; suppose x <> -infty; then x in REAL by A8,XXREAL_0:14; then reconsider a = x as real number; x - y = a - b; then a < c + b by A2,XREAL_1:19; hence thesis; end; end; end; end; theorem not ( z = +infty & y = -infty or z = -infty & y = +infty ) & x < z + y implies x <> +infty & y <> -infty & z <> -infty & x - y < z proof assume that A1: not ( z=+infty & y=-infty or z=-infty & y=+infty ) and A2: x < z + y; per cases; suppose A3: x = -infty; A4: -infty <= z by XXREAL_0:5; z<>-infty by A1,A2,A3,Def2; then A5: -infty < z by A4,XXREAL_0:1; y<>-infty by A1,A2,A3,Def2; hence thesis by A3,A5,Th14; end; suppose A6: x <> -infty; A7: z + y <= +infty by XXREAL_0:4; then x in REAL by A2,A6,XXREAL_0:14; then reconsider a = x as real number; A8: -infty <= x by XXREAL_0:5; then A9: z <> -infty by A1,A2,Def2; A10: y <> -infty by A1,A2,A8,Def2; per cases; suppose A11: y = +infty; -infty <= z by XXREAL_0:5; then -infty < z by A1,A11,XXREAL_0:1; hence thesis by A2,A7,A11,Th13; end; suppose y <> +infty; then y in REAL by A10,XXREAL_0:14; then reconsider b = y as real number; per cases; suppose A12: z = +infty; a-b in REAL by XREAL_0:def 1; hence thesis by A12,XXREAL_0:9; end; suppose z <> +infty; then z in REAL by A9,XXREAL_0:14; then reconsider c = z as real number; z + y = c + b; then a - b < c by A2,XREAL_1:19; hence thesis; end; end; end; end; theorem not ( x = +infty & y = -infty or x = -infty & y = +infty or y = +infty & z = +infty or y = -infty & z = -infty ) & x + y <= z implies y <> +infty & x <= z - y proof assume that A1: not ( x=+infty & y=-infty or x=-infty & y=+infty or y = +infty & z = +infty or y = -infty & z = -infty ) and A2: x + y <= z; thus y <> +infty proof assume A3: y = +infty; then x + y = +infty by A1,Def2; hence contradiction by A1,A2,A3,XXREAL_0:4; end; per cases; suppose z = +infty; then z - y = +infty by A1,Th13; hence thesis by XXREAL_0:4; end; suppose A4: z <> +infty; then A5: x + y < +infty by A2,XXREAL_0:2,4; then A6: x <> +infty by A1,Def2; A7: y <> +infty by A1,A5,Def2; per cases; suppose x = -infty; hence thesis by XXREAL_0:5; end; suppose x <> -infty; then x in REAL by A6,XXREAL_0:14; then reconsider a = x as real number; per cases; suppose y = -infty; then z - y = +infty by A1,Th14; hence thesis by XXREAL_0:4; end; suppose y <> -infty; then y in REAL by A7,XXREAL_0:14; then reconsider b = y as real number; a+b in REAL by XREAL_0:def 1; then z <> -infty by A2,XXREAL_0:12; then z in REAL by A4,XXREAL_0:14; then reconsider c = z as real number; x + y = a + b; then a <= c - b by A2,XREAL_1:19; hence thesis; end; end; end; end; theorem not (x = +infty & y = -infty) & not (x = -infty & y = +infty) & not (y = +infty & z = +infty) & x <= z - y implies y <> +infty & x + y <= z proof assume that A1: not (x = +infty & y = -infty) and A2: not (x = -infty & y = +infty) and A3: not (y = +infty & z = +infty) and A4: x <= z - y; thus A5: y <> +infty proof assume A6: y = +infty; then z - y = -infty by A3,Th13; hence contradiction by A2,A4,A6,XXREAL_0:6; end; per cases by A5; suppose y = -infty; then x + y = -infty by A1,Def2; hence thesis by XXREAL_0:5; end; suppose A7: y <> +infty & y <> -infty; - -infty = +infty by Def3; then A8: -y <> -infty by A7; - +infty = -infty by Def3; then -y <> +infty by A7; then z - y + y = z + (-y + y) by A7,A8,Th29 .= z + 0 by Th7 .= z by Th4; hence thesis by A4,Th36; end; end; theorem not ( x = +infty & y = +infty or x = -infty & y = -infty or y = +infty & z = -infty or y = -infty & z = +infty ) & x - y <= z implies y <> -infty proof assume that A1: not ( x=+infty & y=+infty or x=-infty & y=-infty or y = +infty & z = -infty or y = -infty & z = +infty ) and A2: x - y <= z; assume A3: y = -infty; then x - y = +infty by A1,Th14; hence contradiction by A1,A2,A3,XXREAL_0:4; end; theorem not (x = -infty & y = -infty) & not (y = -infty & z = +infty) & x <= z + y implies y <> -infty proof assume that A1: not(x=-infty & y=-infty) and A2: not(y = -infty & z = +infty) and A3: x <= z + y; assume A4: y = -infty; then z + y = -infty by A2,Def2; hence contradiction by A1,A3,A4,XXREAL_0:6; end; theorem (x <= -y implies y <= -x) & (-x <= y implies -y <= x) proof x <= -y implies --y <= -x by Th38; hence x <= -y implies y <= -x; -x <= y implies -y <= --x by Th38; hence thesis; end; theorem (for e be real number st 0 < e holds x < y + e) implies x <= y proof assume A1: for e be real number st 0 < e holds x < y + e; per cases; suppose A2: y = +infty or y=-infty; per cases by A2; suppose y=+infty; hence thesis by XXREAL_0:4; end; suppose A3: y=-infty; x < y + 1 by A1; hence thesis by A3,Def2; end; end; suppose A4: y <> +infty & y <>-infty; per cases; suppose A5: x = +infty; x < y+ 1 by A1; hence thesis by A5,XXREAL_0:4; end; suppose A6: x <> +infty; now assume A7: x <> -infty; then x in REAL by A6,XXREAL_0:14; then reconsider x1=x as real number; -infty <= x by XXREAL_0:5; then A8: -infty < x by A7,XXREAL_0:1; y in REAL by A4,XXREAL_0:14; then reconsider y1=y as real number; assume A9: not x <= y; y < +infty by A4,XXREAL_0:4; then 0 < x- y by A9,A8,Th51; then x < y + (x1-y1) by A1; then x < y + x-y by Th30; then x < x +(y-y) by A4,Th30; then x < x +0 by Th7; hence contradiction by Th4; end; hence thesis by XXREAL_0:5; end; end; end; reserve t for ext-real number; theorem t <> -infty & t <> +infty & x < y implies x + t < y + t proof assume that A1: t <> -infty & t <> +infty and A2: x < y; A3: t-t = 0 by Th7; A4: now assume x + t = y + t; then x + (t -t) = y + t-t by A1,Th30; then x+ 0 = y + (t-t) by A1,A3,Th30; then x=y+ 0 by A3,Th4; hence contradiction by A2,Th4; end; x + t <= y + t by A2,Th36; hence thesis by A4,XXREAL_0:1; end; theorem t <> -infty & t <> +infty & x < y implies x - t < y - t proof assume that A1: t <> -infty & t <> +infty and A2: x < y; A3: t-t = 0 by Th7; A4: now assume x - t = y - t; then x - (t -t) = y - t+t by A1,Th32; then x - 0 = y - (t-t) by A1,A3,Th32; then x= y+ 0 by A3,Th4; hence contradiction by A2,Th4; end; x - t <= y - t by A2,Th37; hence thesis by A4,XXREAL_0:1; end; theorem x < y & w < z implies x + w < y + z proof assume that A2: x < y and A3: w < z; -infty <= w by XXREAL_0:5; then per cases by XXREAL_0:1; suppose B2: w = -infty; B3: y <> -infty & z <> -infty by A2,A3,XXREAL_0:5; x <> +infty by A2,XXREAL_0:3; then x + w = -infty by B2,Def2; hence thesis by B3,Lm9,XXREAL_0:6; end; suppose A1: -infty < w; per cases; suppose A4: y = +infty; A5: z <= +infty by XXREAL_0:4; y + z = +infty by A1,A3,A4,Def2; hence thesis by A2,A3,A4,A5,Lm8,XXREAL_0:4; end; suppose A6: y <> +infty; -infty <= x by XXREAL_0:5; then y in REAL by A2,A6,XXREAL_0:14; then A7: y + w < y + z by A3,Th43; z <= +infty by XXREAL_0:4; then w in REAL by A1,A3,XXREAL_0:14; then x + w < y + w by A2,Th43; hence thesis by A7,XXREAL_0:2; end; end; end; theorem 0 <= x & z + x <= y implies z <= y proof assume 0 <= x; then z <= z + x by Th39; hence thesis by XXREAL_0:2; end; begin definition let x,y be ext-real number; func x * y -> ext-real number means :Def5: ex a,b being complex number st x = a & y = b & it = a * b if x is real & y is real, it = +infty if (x is not real or y is not real) & (x is positive & y is positive or x is negative & y is negative), it = -infty if (x is not real or y is not real) & (x is positive & y is negative or x is negative & y is positive) otherwise it = 0; existence proof thus x is real & y is real implies ex c being ext-real number, a, b being complex number st x = a & y = b & c = a * b proof assume x is real & y is real; then reconsider a = x, b = y as real number; take a*b, a, b; thus thesis; end; thus thesis; end; uniqueness; consistency; commutativity; end; registration let x,y be real number, a,b be complex number; identify x*y with a*b when x = a, y = b; compatibility by Def5; end; definition let x be ext-real number; func x" -> ext-real number means :Def6: ex a being complex number st x = a & it = a" if x is real otherwise it = 0; existence proof thus x is real implies ex c being ext-real number, a being complex number st x = a & c = a" proof assume x is real; then reconsider a = x as real number; take a", a; thus thesis; end; thus thesis; end; uniqueness; consistency; end; registration let x be real number, a be complex number; identify x" with a" when x = a; compatibility by Def6; end; definition let x,y be ext-real number; func x / y -> ext-real number equals x * y"; coherence; end; registration let x,y be real number, a,b be complex number; identify x/y with a/b when x = a, y = b; compatibility proof reconsider y1=y" as real number; assume x = a & y = b; hence a / b = x * y1 .= x / y; end; end; Lm16: x * 0 = 0 proof per cases by XXREAL_0:14; suppose x in REAL; then ex a,b being complex number st x = a & 0 = b & x * 0 = a * b by Def5; hence thesis; end; suppose x = +infty; hence thesis by Def5; end; suppose x = -infty; hence thesis by Def5; end; end; registration let x be positive ext-real number, y be negative ext-real number; cluster x*y -> negative; coherence proof per cases; suppose x in REAL & y in REAL; then reconsider x,y as real number; x*y < 0; hence thesis; end; suppose not x in REAL or not y in REAL; then x is not real or y is not real by XREAL_0:def 1; hence thesis by Def5; end; end; end; registration let x,y be negative ext-real number; cluster x*y -> positive; coherence proof per cases; suppose x in REAL & y in REAL; then reconsider x,y as real number; x*y > 0; hence thesis; end; suppose not x in REAL or not y in REAL; then x is not real or y is not real by XREAL_0:def 1; hence thesis by Def5; end; end; end; registration let x,y be positive ext-real number; cluster x*y -> positive; coherence proof per cases; suppose x in REAL & y in REAL; then reconsider x,y as real number; x*y > 0; hence thesis; end; suppose not x in REAL or not y in REAL; then x is not real or y is not real by XREAL_0:def 1; hence thesis by Def5; end; end; end; registration let x be non positive ext-real number, y be non negative ext-real number; cluster x*y -> non positive; coherence proof per cases; suppose x = 0 or y = 0; hence x * y <= 0 by Lm16; end; suppose x < 0 & y > 0; hence x * y <= 0; end; end; end; registration let x,y be non positive ext-real number; cluster x*y -> non negative; coherence proof per cases; suppose x = 0 or y = 0; hence x * y >= 0 by Lm16; end; suppose x < 0 & y < 0; hence x * y >= 0; end; end; end; registration let x,y be non negative ext-real number; cluster x*y -> non negative; coherence proof per cases; suppose x = 0 or y = 0; hence x * y >= 0 by Lm16; end; suppose x > 0 & y > 0; hence x * y >= 0; end; end; end; registration let x be non positive ext-real number; cluster x" -> non positive; coherence proof per cases; suppose x is real; then reconsider x as real number; x" is non positive; hence thesis; end; suppose x is not real; hence thesis by Def6; end; end; end; registration let x be non negative ext-real number; cluster x" -> non negative; coherence proof per cases; suppose x is real; then reconsider x as real number; x" is non negative; hence thesis; end; suppose x is not real; hence thesis by Def6; end; end; end; registration let x be non negative ext-real number, y be non positive ext-real number; cluster x/y -> non positive; coherence; cluster y/x -> non positive; coherence; end; registration let x,y be non negative ext-real number; cluster x/y -> non negative; coherence; end; registration let x,y be non positive ext-real number; cluster x/y -> non negative; coherence; end; Lm17: x is not real & x*y = 0 implies y = 0 proof assume that A1: x is not real and A2: x*y = 0; not(x is positive & y is positive or x is negative & y is negative) by A2; hence thesis by A1,A2; end; registration let x,y be non zero ext-real number; cluster x*y -> non zero; coherence proof per cases; suppose x is real & y is real; then reconsider r=x, s=y as real number; assume x*y is zero; then r*s = 0; hence contradiction; end; suppose x is not real or y is not real; hence thesis by Lm17; end; end; end; registration let x be zero ext-real number, y be ext-real number; cluster x*y -> zero for ext-real number; coherence by Lm16; end; Lm18: x = 0 implies x*(y*z) = (x*y)*z proof assume A1: x = 0; hence x*(y*z) = 0 .= (x*y)*z by A1; end; Lm19: y = 0 implies x*(y*z) = (x*y)*z proof assume A1: y = 0; hence x*(y*z) = 0 .= (x*y)*z by A1; end; Lm20: y is not real implies x*(y*z) = (x*y)*z proof assume y is not real; then A1: not y in REAL; assume A2: not thesis; then A3: x <> 0 & z <> 0 by Lm18; per cases by A1,XXREAL_0:14; suppose A4: y = -infty; per cases by A3; suppose A5: x is positive & z is positive; then x*(-infty*z) = x*-infty by Def5 .= -infty by A5,Def5 .= -infty*z by A5,Def5 .= (x*-infty)*z by A5,Def5; hence thesis by A2,A4; end; suppose A6: x is positive & z is negative; then x*(-infty*z) = x*+infty by Def5 .= +infty by A6,Def5 .= -infty*z by A6,Def5 .= (x*-infty)*z by A6,Def5; hence thesis by A2,A4; end; suppose A7: x is negative & z is positive; then x*(-infty*z) = x*-infty by Def5 .= +infty by A7,Def5 .= +infty*z by A7,Def5 .= (x*-infty)*z by A7,Def5; hence thesis by A2,A4; end; suppose A8: x is negative & z is negative; then x*(-infty*z) = x*+infty by Def5 .= -infty by A8,Def5 .= +infty*z by A8,Def5 .= (x*-infty)*z by A8,Def5; hence thesis by A2,A4; end; end; suppose A9: y = +infty; per cases by A3; suppose A10: x is positive & z is positive; then x*(+infty*z) = x*+infty by Def5 .= +infty by A10,Def5 .= +infty*z by A10,Def5 .= (x*+infty)*z by A10,Def5; hence thesis by A2,A9; end; suppose A11: x is positive & z is negative; then x*(+infty*z) = x*-infty by Def5 .= -infty by A11,Def5 .= +infty*z by A11,Def5 .= (x*+infty)*z by A11,Def5; hence thesis by A2,A9; end; suppose A12: x is negative & z is positive; then x*(+infty*z) = x*+infty by Def5 .= -infty by A12,Def5 .= -infty*z by A12,Def5 .= (x*+infty)*z by A12,Def5; hence thesis by A2,A9; end; suppose A13: x is negative & z is negative; then x*(+infty*z) = x*-infty by Def5 .= +infty by A13,Def5 .= -infty*z by A13,Def5 .= (x*+infty)*z by A13,Def5; hence thesis by A2,A9; end; end; end; Lm21: x is not real implies x*(y*z) = (x*y)*z proof assume x is not real; then A1: not x in REAL; assume A2: not thesis; then A3: y <> 0 & z <> 0 by Lm18,Lm19; per cases by A1,XXREAL_0:14; suppose A4: x = -infty; per cases by A3; suppose A5: y is positive & z is positive; then -infty*(y*z) = -infty by Def5 .= -infty*z by A5,Def5 .= (-infty*y)*z by A5,Def5; hence thesis by A2,A4; end; suppose A6: y is positive & z is negative; then -infty*(y*z) = +infty by Def5 .= -infty*z by A6,Def5 .= (-infty*y)*z by A6,Def5; hence thesis by A2,A4; end; suppose A7: y is negative & z is positive; then -infty*(y*z) = +infty by Def5 .= +infty*z by A7,Def5 .= (-infty*y)*z by A7,Def5; hence thesis by A2,A4; end; suppose A8: y is negative & z is negative; then -infty*(y*z) = -infty by Def5 .= +infty*z by A8,Def5 .= (-infty*y)*z by A8,Def5; hence thesis by A2,A4; end; end; suppose A9: x = +infty; per cases by A3; suppose A10: y is positive & z is positive; then +infty*(y*z) = +infty by Def5 .= +infty*z by A10,Def5 .= (+infty*y)*z by A10,Def5; hence thesis by A2,A9; end; suppose A11: y is positive & z is negative; then +infty*(y*z) = -infty by Def5 .= +infty*z by A11,Def5 .= (+infty*y)*z by A11,Def5; hence thesis by A2,A9; end; suppose A12: y is negative & z is positive; then +infty*(y*z) = -infty by Def5 .= -infty*z by A12,Def5 .= (+infty*y)*z by A12,Def5; hence thesis by A2,A9; end; suppose A13: y is negative & z is negative; then +infty*(y*z) = +infty by Def5 .= -infty*z by A13,Def5 .= (+infty*y)*z by A13,Def5; hence thesis by A2,A9; end; end; end; theorem Th66: x*(y*z) = (x*y)*z proof per cases; suppose x is real & y is real & z is real; then reconsider r=x, s=y, t=z as real number; reconsider rs = r*s, sx = s*t as real number; thus x*(y*z) = r*sx .= rs*t .= (x*y)*z; end; suppose x is not real or z is not real; hence thesis by Lm21; end; suppose y is not real; hence thesis by Lm20; end; end; registration let r be real number; cluster r" -> real; coherence; end; registration let r,s be real number; cluster r*s -> real; coherence; cluster r/s -> real; coherence; end; registration cluster -infty" -> zero; coherence by Def6; cluster +infty" -> zero; coherence by Def6; end; theorem (f*g)" = f"*g" proof per cases by XXREAL_0:14; suppose f in REAL & g in REAL; then reconsider f1 = f, g1 = g as real number; A1: (ex a being complex number st f1 = a & f" = a" )& ex b being complex number st g1 = b & g" = b" by Def6; then ex a,b being complex number st f" = a & g" = b & f"*g" = a * b by Def5 ; then f"*g" = (f1*g1)" by A1,XCMPLX_1:204; hence thesis; end; suppose A2: f = +infty; g is positive or g is negative or g = 0; then (f*g)" = +infty" or (f*g)" = -infty" or (f*g)" = 0" by A2,Def5; hence thesis by A2; end; suppose A3: f = -infty; g is positive or g is negative or g = 0; then (f*g)" = +infty" or (f*g)" = -infty" or (f*g)" = 0" by A3,Def5; hence thesis by A3; end; suppose A4: g = +infty; f is positive or f is negative or f = 0; then (f*g)" = +infty" or (f*g)" = -infty" or (f*g)" = 0" by A4,Def5; hence thesis by A4; end; suppose A5: g = -infty; f is positive or f is negative or f = 0; then (f*g)" = +infty" or (f*g)" = -infty" or (f*g)" = 0" by A5,Def5; hence thesis by A5; end; end; theorem r <> 0 & r*f = r*g implies f = g proof assume that A1: r <> 0 and A2: r*f = r*g; A3: r is positive or r is negative by A1; per cases by XXREAL_0:14; suppose A4: f in REAL; now assume not g in REAL; then g = +infty or g = -infty by XXREAL_0:14; hence contradiction by A2,A3,A4,Def5; end; then A5: ex c, d being complex number st r = c & g = d & r*g = c*d by Def5; ex a, b being complex number st r = a & f = b & r*f = a *b by A4,Def5; hence thesis by A1,A2,A5,XCMPLX_1:5; end; suppose A6: f = +infty; assume f <> g; then g in REAL or g = -infty by A6,XXREAL_0:14; hence thesis by A2,A3,A6,Def5; end; suppose A7: f = -infty; assume f <> g; then g in REAL or g = +infty by A7,XXREAL_0:14; hence thesis by A2,A3,A7,Def5; end; end; theorem Th69: x <> +infty & x <> -infty & x * y = +infty implies y = +infty or y = -infty proof assume that A1: x <> +infty & x <> -infty and A2: x * y = +infty; assume y <> +infty & y <> -infty; then A3: y in REAL by XXREAL_0:14; x in REAL by A1,XXREAL_0:14; then reconsider a=x, b=y as real number by A3; x * y = a * b; hence contradiction by A2; end; theorem Th70: x <> +infty & x <> -infty & x * y = -infty implies y = +infty or y = -infty proof assume that A1: x <> +infty & x <> -infty and A2: x * y = -infty; assume y <> +infty & y <> -infty; then A3: y in REAL by XXREAL_0:14; x in REAL by A1,XXREAL_0:14; then reconsider a=x, b=y as real number by A3; x * y = a * b; hence contradiction by A2; end; Lm22: x*y in REAL implies x in REAL & y in REAL or x*y = 0 proof assume A1: x*y in REAL; assume not x in REAL or not y in REAL; then A2: x is not real or y is not real by XREAL_0:def 1; assume A3: x*y <> 0; per cases by A3; suppose x is positive & y is positive or x is negative & y is negative; hence contradiction by A1,A2,Def5; end; suppose x is positive & y is negative or x is negative & y is positive; hence contradiction by A1,A2,Def5; end; end; theorem Th71: x <= y & 0 <= z implies x*z <= y*z proof assume that A1: x <= y and A2: 0 <= z; per cases by A2; suppose z = 0; hence thesis; end; suppose A3: z > 0; per cases; suppose A4: x = 0; then z*y >= 0 by A1,A2; hence thesis by A4; end; suppose A5: x <> 0; per cases; case that A6: x*z in REAL & y*z in REAL; y*z = 0 implies y = 0 by A3; then reconsider x,y,z as Element of REAL by A3,A5,A6,Lm22; reconsider p = x*z, q = y*z as Element of REAL by XREAL_0:def 1; take p, q; thus thesis by A1,A2,XREAL_1:64; end; case A7: not x*z in REAL or not y*z in REAL; per cases by A7; suppose A8: not x*z in REAL; per cases by A8,XXREAL_0:14; suppose x*z = -infty; hence thesis; end; suppose x*z = +infty; then A9: x <> -infty by A3; A10: not x in REAL or not y in REAL or not z in REAL by A8,XREAL_0:def 1 ; per cases by A9,A10,XXREAL_0:14; suppose y = +infty; hence thesis by A3,Def5; end; suppose x = +infty; then y = +infty by A1,XXREAL_0:4; hence thesis by A3,Def5; end; suppose y = -infty; then x = -infty by A1,XXREAL_0:6; hence thesis by A3,Def5; end; suppose that A11: not z in REAL and x in REAL & y in REAL; A12: z = +infty by A3,A11,XXREAL_0:14; per cases by A5; suppose x < 0; hence thesis by A12,Def5; end; suppose 0 < x; hence thesis by A1,A12,Def5; end; end; end; end; suppose not y*z in REAL; then A13: not x in REAL or not y in REAL or not z in REAL by XREAL_0:def 1; per cases by A13,XXREAL_0:14; suppose x = -infty; hence thesis by A3,Def5; end; suppose y = +infty; hence thesis by A3,Def5; end; suppose x = +infty; then y = +infty by A1,XXREAL_0:4; hence thesis by A3,Def5; end; suppose y = -infty; then x = -infty by A1,XXREAL_0:6; hence thesis by A3,Def5; end; suppose that A14: not z in REAL and x in REAL & y in REAL; A15: z = +infty by A3,A14,XXREAL_0:14; per cases by A5; suppose x < 0; hence thesis by A15,Def5; end; suppose 0 < x; hence thesis by A1,A15,Def5; end; end; end; end; end; end; end; theorem Th72: x < y & 0 < z & z <> +infty implies x*z < y*z proof assume that A1: x < y and A2: 0 < z and A3: z <> +infty; A4: now A5: x <> +infty & y <> -infty by A1,XXREAL_0:3,5; assume A6: x*z = y*z; per cases by A5,XXREAL_0:14; suppose A7: x in REAL & y in REAL; z in REAL by A2,A3,XXREAL_0:14; then reconsider x,y,z as real number by A7; x*z < y*z by A1,A2,XREAL_1:68; hence contradiction by A6; end; suppose A8: y = +infty; then y*z = +infty by A2,Def5; then x = +infty or x = -infty by A2,A3,A6,Th69; hence contradiction by A1,A2,A6,A8; end; suppose A9: x = -infty; then x*z = -infty by A2,Def5; then y = +infty or y = -infty by A2,A3,A6,Th70; hence contradiction by A1,A2,A6,A9; end; end; x*z <= y*z by A1,A2,Th71; hence thesis by A4,XXREAL_0:1; end; theorem x*y in REAL implies x in REAL & y in REAL or x*y = 0 by Lm22; theorem +infty" = 0; theorem -infty" = 0; theorem x/+infty = 0; theorem x/-infty = 0; theorem Th78: x <> -infty & x <> +infty & x <> 0 implies x / x = 1 proof assume x <> -infty & x <> +infty; then x in REAL by XXREAL_0:14; then reconsider a=x as real number; assume x <> 0; then a/a =1 by XCMPLX_1:60; hence thesis; end; theorem x <= y & 0 < z implies x/z <= y/z by Th71; theorem x < y & 0 < z & z <> +infty implies x/z < y/z proof assume that A1: x < y and A2: 0 < z and A3: z <> +infty; per cases by A3,XXREAL_0:14; suppose z = -infty; hence thesis by A2; end; suppose z in REAL; then reconsider z as real number; z" > 0 by A2; hence thesis by A1,Th72; end; end; theorem Th81: 1*x = x proof per cases by XXREAL_0:14; suppose x in REAL; then reconsider x, y=1 as real number; y*x = x; hence thesis; end; suppose x = -infty or x = +infty; hence thesis by Def5; end; end; theorem Th82: y" = 0 implies y = +infty or y = -infty or y = 0 proof assume A1: y" = 0; assume y <> +infty & y <> -infty; then y in REAL by XXREAL_0:14; then reconsider y as real number; y"" = 0 by A1; hence thesis; end; theorem Th83: 0 < y & y <> +infty implies +infty / y = +infty proof assume that A1: 0+infty; y" <> 0 by A1,A2,Th82; hence thesis by A1,Def5; end; theorem Th84: y < 0 & -infty <> y implies -infty / y = +infty proof assume that A1: y<0 and A2: -infty<>y; y" <> 0 by A1,A2,Th82; hence thesis by A1,Def5; end; theorem Th85: y < 0 & -infty <> y implies +infty / y = -infty proof assume that A1: y<0 and A2: -infty<>y; y" <> 0 by A1,A2,Th82; hence thesis by A1,Def5; end; theorem Th86: 0 < y & y <> +infty implies -infty / y = -infty proof assume that A1: 0+infty; y" <> 0 by A1,A2,Th82; hence thesis by A1,Def5; end; theorem x <> +infty & x <> -infty & x <> 0 implies x*(1/x) = 1 & (1/x)*x = 1 proof assume that A1: x <> +infty & x <> -infty and A2: x <> 0; x in REAL by A1,XXREAL_0:14; then reconsider a = x as real number; x * (1 / x) = a * (1/a) .= 1 by A2,XCMPLX_1:106; hence thesis; end; theorem -infty <> y & y <> +infty & y <> 0 implies x * y / y = x & x * (y / y) = x proof assume that A1: -infty <> y and A2: y <> +infty and A3: y <> 0; reconsider b = y as Element of REAL by A1,A2,XXREAL_0:14; A4: x * y / y = x proof per cases; suppose A5: x = +infty; per cases by A3; suppose A6: 0 < y; then x * y = +infty by A5,Def5; hence thesis by A2,A5,A6,Th83; end; suppose A7: y < 0; then x * y = -infty by A5,Def5; hence thesis by A1,A5,A7,Th84; end; end; suppose A8: x = -infty; per cases by A3; suppose A9: 0 +infty & x <> -infty; then x in REAL by XXREAL_0:14; then reconsider a = x as real number; (x * y)/y = (a * b)/b .= a by A3,XCMPLX_1:89; hence thesis; end; end; y / y = 1 by A1,A2,A3,Th78; hence thesis by A4,Th81; end; theorem +infty * y <> 1 & -infty * y <> 1 proof y = 0 or 0 < y or y < 0; hence thesis by Def5; end; theorem x * y <> +infty & x * y <> -infty implies x in REAL or y in REAL proof assume that A1: x * y <> +infty and A2: x * y <> -infty; assume A3: ( not x in REAL)& not y in REAL; per cases by A3,XXREAL_0:14; suppose x = +infty & y = +infty; hence contradiction by A1,Def5; end; suppose x = +infty & y = -infty; hence contradiction by A2,Def5; end; suppose x = -infty & y = +infty; hence contradiction by A2,Def5; end; suppose x = -infty & y = -infty; hence contradiction by A1,Def5; end; end; begin theorem Th91: (-1)*x = -x proof per cases by XXREAL_0:14; suppose x in REAL; then reconsider x, y=-1 as real number; y*x = -x; hence thesis; end; suppose A1: x = -infty; hence (-1)*x = +infty by Def5 .= -x by A1,Def3; end; suppose A2: x = +infty; hence (-1)*x = -infty by Def5 .= -x by A2,Def3; end; end; theorem Th92: - x*y = (-x)*y proof thus - x*y = (-1)*(x*y) by Th91 .= (-1)*x*y by Th66 .= (-x)*y by Th91; end; theorem Th93: y = -z implies x*(y+z) = x*y +x*z proof assume A1: y = -z; hence x*(y+z) = x*0 by Th7 .= x*y - x*y by Th7 .= x*y + x*(-y) by Th92 .= x*y + x*z by A1; end; theorem Th94: 2*x = x+x proof per cases by XXREAL_0:14; suppose x in REAL; then reconsider x as real number; 2*x = x+x; hence thesis; end; suppose A1: x = -infty; hence 2*x = -infty by Def5 .= x+x by A1,Def2; end; suppose A2: x = +infty; hence 2*x = +infty by Def5 .= x+x by A2,Def2; end; end; Lm23: x*(y+y) = x*y+x*y proof thus x*(y+y) = x*(2*y) by Th94 .= 2*(x*y) by Th66 .= x*y+x*y by Th94; end; Lm24: x*(0+z) = x*0 +x*z proof thus x*(0+z) = x*z by Th4 .= x*0 +x*z by Th4; end; Lm25: 0*(y+z) = 0*y +0*z; Lm26: x is real & y is real implies x*(y+z) = x*y +x*z proof assume that A1: x is real and A2: y is real; reconsider r=x, s=y as real number by A1,A2; A3: x*y = r*s; per cases by XXREAL_0:14; suppose z in REAL; then reconsider t=z as real number; reconsider u=s+t, v=r*s, w=r*t as real number; r*u = v + w; hence thesis; end; suppose A4: z = -infty; then A5: y+z = -infty by A2,Def2; per cases; suppose x is zero; hence thesis by Lm25; end; suppose A6: x is positive; hence x*(y+z) = -infty by A5,Def5 .= x*y + -infty by A3,Def2 .= x*y +x*z by A4,A6,Def5; end; suppose A7: x is negative; hence x*(y+z) = +infty by A5,Def5 .= x*y + +infty by A3,Def2 .= x*y +x*z by A4,A7,Def5; end; end; suppose A8: z = +infty; then A9: y+z = +infty by A2,Def2; per cases; suppose x is zero; hence thesis by Lm25; end; suppose A10: x is positive; hence x*(y+z) = +infty by A9,Def5 .= x*y + +infty by A3,Def2 .= x*y +x*z by A8,A10,Def5; end; suppose A11: x is negative; hence x*(y+z) = -infty by A9,Def5 .= x*y + -infty by A3,Def2 .= x*y +x*z by A8,A11,Def5; end; end; end; Lm27: x is real & y is not real implies x*(y+z) = x*y +x*z proof assume that A1: x is real and A2: y is not real; per cases; suppose z is real; hence thesis by A1,Lm26; end; suppose z is not real; then A3: not z in REAL; A4: not y in REAL by A2; per cases by A4,A3,XXREAL_0:14; suppose y = -infty & z = -infty; hence thesis by Lm23; end; suppose y = -infty & z = +infty; hence thesis by Th5,Th93; end; suppose y = +infty & z = -infty; hence thesis by Th6,Th93; end; suppose y = +infty & z = +infty; hence thesis by Lm23; end; end; end; theorem Th95: x is real implies x*(y+z) = x*y +x*z proof assume A1: x is real; per cases; suppose y is real & z is real; hence thesis by A1,Lm26; end; suppose y is not real or z is not real; hence thesis by A1,Lm27; end; end; theorem Th96: y>=0 & z>=0 implies x*(y+z) = x*y +x*z proof assume A1: y>=0 & z>=0; per cases by A1; suppose y = 0 or z = 0; hence thesis by Lm24; end; suppose A2: y>0 & z>0; per cases; suppose x is real; hence thesis by Th95; end; suppose x is not real; then A3: not x in REAL; per cases by A3,XXREAL_0:14; suppose A4: x = -infty; hence x*(y+z) = -infty by A2,Def5 .= -infty + x*z by A2,A4,Def2 .= x*y + x*z by A2,A4,Def5; end; suppose A5: x = +infty; hence x*(y+z) = +infty by A2,Def5 .= +infty + x*z by A2,A5,Def2 .= x*y + x*z by A2,A5,Def5; end; end; end; end; theorem y<=0 & z<=0 implies x*(y+z) = x*y +x*z proof assume A1: y<=0 & z<=0; thus x*(y+z) = --(x*(y+z)) .= -(x*-(y+z)) by Th92 .= -(x*(-y+-z)) by Th9 .= -(x*(-y)+x*(-z)) by A1,Th96 .= -(-x*y+x*(-z)) by Th92 .= -(-x*y+-x*z) by Th92 .= --(x*y +x*z) by Th9 .= x*y +x*z; end; theorem x*(0+z) = x*0 +x*z by Lm24; theorem (-f)" = -f" proof per cases by XXREAL_0:14; suppose A1: f in REAL; then reconsider g = f as real number; A2: -f = -g; consider a being complex number such that A3: f = a and A4: f" = a" by A1,Def6; A5: (-a)" = -a" by XCMPLX_1:222; ex m being complex number st -f = m & -f" = m" proof take -a; thus -f = -a by A3,A2; thus thesis by A4,A5,A2,Def3; end; hence thesis by A2,Def6; end; suppose A6: f = +infty; hence (-f)" = (-infty)" by Def3 .= -f" by A6; end; suppose A7: f = -infty; hence (-f)" = (+infty)" by Def3 .= -f" by A7; end; end; theorem x is real implies x * (y - z) = x * y - x * z proof assume x is real; then x * (y - z) = x * y + x * (-z) by Th95 .= x * y + -(x * z) by Th92; hence thesis; end; theorem Th101: x <= y & z <= 0 implies y*z <= x*z proof assume x <= y & z <= 0; then A1: x*(-z) <= y*(-z) by Th71; -x*z = x*(-z) & -y*z = y*(-z) by Th92; hence thesis by A1,Th38; end; theorem Th102: x < y & z < 0 & z <> -infty implies y*z < x*z proof assume x < y & z < 0 & z <> -infty; then A1: x*(-z) < y*(-z) by Th5,Th10,Th72; -x*z = x*(-z) & -y*z = y*(-z) by Th92; hence thesis by A1,Th38; end; theorem x <= y & z < 0 implies y/z <= x/z by Th101; theorem x < y & z < 0 & z <> -infty implies y/z < x/z proof assume that A1: x < y and A2: 0 > z and A3: z <> -infty; per cases by A3,XXREAL_0:14; suppose z = +infty; hence thesis by A2; end; suppose z in REAL; then reconsider z as real number; z" < 0 by A2; hence thesis by A1,Th102; end; end; theorem x/2 + x/2 = x proof x/2 + x/2 = (x+x)/2 by Th95 .= 2*x/2 by Th94 .= x*(2/2) by Th66 .= x by Th81; hence thesis; end; begin reserve w, w1, w2 for Element of ExtREAL; reserve c, c1, c2 for Element of COMPLEX; reserve A, B, C, D for complex-membered set; reserve F, G, H, I for ext-real-membered set; reserve a, b, s, t, z for complex number; reserve f, g, h, i, j for ext-real number; reserve r for real number; reserve e for set; definition let w; redefine func -w -> Element of ExtREAL; coherence by XXREAL_0:def 1; redefine func w" -> Element of ExtREAL; coherence by XXREAL_0:def 1; let w1; redefine func w*w1 -> Element of ExtREAL; coherence by XXREAL_0:def 1; end; registration let a, b, c, d be complex number; cluster {a,b,c,d} -> complex-membered; coherence proof let e; thus thesis by ENUMSET1:def 2; end; end; registration let a, b, c, d be ext-real number; cluster {a,b,c,d} -> ext-real-membered; coherence proof let e; thus thesis by ENUMSET1:def 2; end; end; definition let F be ext-real-membered set; func --F -> ext-real-membered set equals {-w: w in F}; coherence proof {-w: w in F} is ext-real-membered proof let e; assume e in {-w: w in F}; then ex w st e = -w & w in F; hence thesis; end; hence thesis; end; involutiveness proof let A, B be ext-real-membered set; assume A1: A = {-w: w in B}; thus B c= {-w: w in A} proof let z be ext-real number; A2: z in ExtREAL by XXREAL_0:def 1; A3: -z in ExtREAL & z = - -z by XXREAL_0:def 1; assume z in B; then -z in A by A1,A2; hence thesis by A3; end; let e; assume e in {-w: w in A}; then consider w1 such that A4: -w1 = e and A5: w1 in A; ex w st -w = w1 & w in B by A1,A5; hence thesis by A4; end; end; theorem Th1: f in F iff -f in --F proof f in ExtREAL by XXREAL_0:def 1; hence f in F implies -f in --F; assume -f in --F; then A1: ex w st -w = -f & w in F; - -f = f; hence thesis by A1; end; theorem Th2: -f in F iff f in --F proof - -f = f; hence thesis by Th1; end; registration let F be empty set; cluster --F -> empty; coherence proof assume --F is non empty; then the Element of --F in --F; then ex w st the Element of --F = -w & w in F; hence thesis; end; end; registration let F be ext-real-membered non empty set; cluster --F -> non empty; coherence proof -the Element of F in --F by Th1; hence thesis; end; end; Lm1: F c= G implies --F c= --G proof assume A1: F c= G; let j; assume j in --F; then -j in F by Th2; hence thesis by A1,Th2; end; theorem Th3: F c= G iff --F c= --G proof ----F = F & ----G = G; hence thesis by Lm1; end; theorem --F = --G implies F = G proof assume --F = --G; then F c= G & G c= F by Th3; hence thesis by XBOOLE_0:def 10; end; theorem Th5: -- (F \/ G) = (--F) \/ (--G) proof let i; hereby assume i in --(F\/G); then -i in F \/ G by Th2; then -i in F or -i in G by XBOOLE_0:def 3; then i in --F or i in --G by Th2; hence i in --F \/ --G by XBOOLE_0:def 3; end; assume i in --F \/ --G; then i in --F or i in --G by XBOOLE_0:def 3; then -i in F or -i in G by Th2; then -i in F \/ G by XBOOLE_0:def 3; hence thesis by Th2; end; theorem Th6: -- (F /\ G) = (--F) /\ (--G) proof let i; hereby assume i in --(F/\G); then A1: -i in F /\ G by Th2; then -i in G by XBOOLE_0:def 4; then A2: i in --G by Th2; -i in F by A1,XBOOLE_0:def 4; then i in --F by Th2; hence i in (--F) /\ --G by A2,XBOOLE_0:def 4; end; assume A3: i in (--F) /\ --G; then i in --G by XBOOLE_0:def 4; then A4: -i in G by Th2; i in --F by A3,XBOOLE_0:def 4; then -i in F by Th2; then -i in F /\ G by A4,XBOOLE_0:def 4; hence thesis by Th2; end; theorem Th7: -- (F \ G) = (--F) \ (--G) proof let i; hereby assume i in --(F\G); then A1: -i in F \ G by Th2; then not -i in G by XBOOLE_0:def 5; then A2: not i in --G by Th2; i in --F by A1,Th2; hence i in (--F) \ --G by A2,XBOOLE_0:def 5; end; assume A3: i in (--F) \ --G; then not i in --G by XBOOLE_0:def 5; then A4: not -i in G by Th2; -i in F by A3,Th2; then -i in F \ G by A4,XBOOLE_0:def 5; hence thesis by Th2; end; theorem Th8: -- (F \+\ G) = (--F) \+\ (--G) proof thus -- (F \+\ G) = --(F\G) \/ --(G\F) by Th5 .= --F \ --G \/ --(G\F) by Th7 .= (--F) \+\ --G by Th7; end; theorem Th9: --{f} = {-f} proof let i; hereby assume i in --{f}; then consider w such that A1: i = -w and A2: w in {f}; w = f by A2,TARSKI:def 1; hence i in {-f} by A1,TARSKI:def 1; end; assume i in {-f}; then A3: i = -f by TARSKI:def 1; f in ExtREAL & f in {f} by TARSKI:def 1,XXREAL_0:def 1; hence thesis by A3; end; theorem Th10: --{f,g} = {-f,-g} proof thus --{f,g} = --({f}\/{g}) by ENUMSET1:1 .= --{f} \/ --{g} by Th5 .= {-f} \/ --{g} by Th9 .= {-f} \/ {-g} by Th9 .= {-f,-g} by ENUMSET1:1; end; definition let A be complex-membered set; func --A -> complex-membered set equals {-c: c in A}; coherence proof {-c: c in A} is complex-membered proof let e; assume e in {-c: c in A}; then ex c st e = -c & c in A; hence thesis; end; hence thesis; end; involutiveness proof let A, B; assume A1: A = {-c: c in B}; thus B c= {-c: c in A} proof let z; A2: z in COMPLEX by XCMPLX_0:def 2; A3: -z in COMPLEX & z = - -z by XCMPLX_0:def 2; assume z in B; then -z in A by A1,A2; hence thesis by A3; end; let e; assume e in {-c: c in A}; then consider r0 being Element of COMPLEX such that A4: -r0 = e and A5: r0 in A; ex c st -c = r0 & c in B by A1,A5; hence thesis by A4; end; end; theorem Th11: a in A iff -a in --A proof a in COMPLEX by XCMPLX_0:def 2; hence a in A implies -a in --A; assume -a in --A; then ex c st -c = -a & c in A; hence thesis; end; theorem Th12: -a in A iff a in --A proof - -a = a; hence thesis by Th11; end; registration let A be empty set; cluster --A -> empty; coherence proof assume --A is non empty; then the Element of --A in --A; then ex c st the Element of --A = -c & c in A; hence thesis; end; end; registration let A be complex-membered non empty set; cluster --A -> non empty; coherence proof -the Element of A in --A by Th11; hence thesis; end; end; registration let A be real-membered set; cluster --A -> real-membered; coherence proof let e; assume e in --A; then ex c st e = -c & c in A; hence thesis; end; end; registration let A be rational-membered set; cluster --A -> rational-membered; coherence proof let e; assume e in --A; then ex c st e = -c & c in A; hence thesis; end; end; registration let A be integer-membered set; cluster --A -> integer-membered; coherence proof let e; assume e in --A; then ex c st e = -c & c in A; hence thesis; end; end; registration let A be real-membered set, F be ext-real-membered set; identify --A with --F when A = F; compatibility proof assume A1: A = F; let a be ext-real number; hereby assume A2: a in --A; then reconsider b = a as real number; -b in A by A2,Th12; hence a in --F by A1,Th2; end; assume a in --F; then consider w such that A3: a = -w and A4: w in F; reconsider b = w as real number by A1,A4; -b in COMPLEX by XCMPLX_0:def 2; then -a in COMPLEX by A3,XCMPLX_0:def 2; then -b in --A by A1,A3,A4; hence thesis by A3; end; end; Lm2: A c= B implies --A c= --B proof assume A1: A c= B; let a; assume a in --A; then -a in A by Th12; hence thesis by A1,Th12; end; theorem Th13: A c= B iff --A c= --B proof ----A = A & ----B = B; hence thesis by Lm2; end; theorem --A = --B implies A = B proof assume --A = --B; then A c= B & B c= A by Th13; hence thesis by XBOOLE_0:def 10; end; theorem Th15: -- (A \/ B) = (--A) \/ (--B) proof let z; hereby assume z in --(A\/B); then -z in A \/ B by Th12; then -z in A or -z in B by XBOOLE_0:def 3; then z in --A or z in --B by Th12; hence z in --A \/ --B by XBOOLE_0:def 3; end; assume z in --A \/ --B; then z in --A or z in --B by XBOOLE_0:def 3; then -z in A or -z in B by Th12; then -z in A \/ B by XBOOLE_0:def 3; hence thesis by Th12; end; theorem Th16: -- (A /\ B) = (--A) /\ (--B) proof let z; hereby assume z in --(A/\B); then A1: -z in A /\ B by Th12; then -z in B by XBOOLE_0:def 4; then A2: z in --B by Th12; -z in A by A1,XBOOLE_0:def 4; then z in --A by Th12; hence z in (--A) /\ --B by A2,XBOOLE_0:def 4; end; assume A3: z in (--A) /\ --B; then z in --B by XBOOLE_0:def 4; then A4: -z in B by Th12; z in --A by A3,XBOOLE_0:def 4; then -z in A by Th12; then -z in A /\ B by A4,XBOOLE_0:def 4; hence thesis by Th12; end; theorem Th17: -- (A \ B) = (--A) \ (--B) proof let z; hereby assume z in --(A\B); then A1: -z in A \ B by Th12; then not -z in B by XBOOLE_0:def 5; then A2: not z in --B by Th12; z in --A by A1,Th12; hence z in (--A) \ --B by A2,XBOOLE_0:def 5; end; assume A3: z in (--A) \ --B; then not z in --B by XBOOLE_0:def 5; then A4: not -z in B by Th12; -z in A by A3,Th12; then -z in A \ B by A4,XBOOLE_0:def 5; hence thesis by Th12; end; theorem Th18: -- (A \+\ B) = (--A) \+\ (--B) proof thus -- (A \+\ B) = --(A\B) \/ --(B\A) by Th15 .= --A \ --B \/ --(B\A) by Th17 .= (--A) \+\ --B by Th17; end; theorem Th19: --{a} = {-a} proof let z; hereby assume z in --{a}; then consider c such that A1: z = -c and A2: c in {a}; c = a by A2,TARSKI:def 1; hence z in {-a} by A1,TARSKI:def 1; end; assume z in {-a}; then A3: z = -a by TARSKI:def 1; a in COMPLEX & a in {a} by TARSKI:def 1,XCMPLX_0:def 2; hence thesis by A3; end; theorem Th20: --{a,b} = {-a,-b} proof thus --{a,b} = --({a}\/{b}) by ENUMSET1:1 .= --{a} \/ --{b} by Th15 .= {-a} \/ --{b} by Th19 .= {-a} \/ {-b} by Th19 .= {-a,-b} by ENUMSET1:1; end; definition let F be ext-real-membered set; func F"" -> ext-real-membered set equals {w": w in F}; coherence proof {w": w in F} is ext-real-membered proof let e; assume e in {w": w in F}; then ex w st e = w" & w in F; hence thesis; end; hence thesis; end; end; theorem Th21: f in F implies f" in F"" proof f in ExtREAL by XXREAL_0:def 1; hence thesis; end; registration let F be empty set; cluster F"" -> empty; coherence proof assume F"" is non empty; then the Element of F"" in F""; then ex w st the Element of F"" = w" & w in F; hence thesis; end; end; registration let F be ext-real-membered non empty set; cluster F"" -> non empty; coherence proof (the Element of F)" in F"" by Th21; hence thesis; end; end; theorem F c= G implies F"" c= G"" proof assume A1: F c= G; let i; assume i in F""; then ex w st i = w" & w in F; hence thesis by A1; end; theorem Th23: (F \/ G)"" = (F"") \/ (G"") proof let i; hereby assume i in (F\/G)""; then consider w such that A1: i = w" and A2: w in F \/ G; w in F or w in G by A2,XBOOLE_0:def 3; then w" in F"" or w" in G""; hence i in F"" \/ G"" by A1,XBOOLE_0:def 3; end; assume A3: i in F"" \/ G""; per cases by A3,XBOOLE_0:def 3; suppose i in F""; then consider w such that A4: i = w" and A5: w in F; w in F\/G by A5,XBOOLE_0:def 3; hence thesis by A4; end; suppose i in G""; then consider w such that A6: i = w" and A7: w in G; w in F\/G by A7,XBOOLE_0:def 3; hence thesis by A6; end; end; theorem Th24: (F /\ G)"" c= (F"") /\ (G"") proof let i; assume i in (F/\G)""; then consider w such that A1: i = w" and A2: w in F /\ G; w in G by A2,XBOOLE_0:def 4; then A3: w" in G""; w in F by A2,XBOOLE_0:def 4; then w" in F""; hence thesis by A1,A3,XBOOLE_0:def 4; end; theorem --(F"") = (--F)"" proof let i; hereby assume i in --F""; then -i in F"" by Th2; then consider w such that A1: -i = w" and A2: w in F; (-w)" = -w" & -w in --F by A2,XXREAL_3:99; hence i in (--F)"" by A1; end; assume i in (--F)""; then consider w such that A3: i = w" and A4: w in --F; (-w)" = -w" & -w in F by A4,Th2,XXREAL_3:99; then -i in F"" by A3; hence thesis by Th2; end; theorem Th26: {f}"" = {f"} proof let i; hereby assume i in {f}""; then consider w such that A1: i = w" and A2: w in {f}; w = f by A2,TARSKI:def 1; hence i in {f"} by A1,TARSKI:def 1; end; assume i in {f"}; then A3: i = f" by TARSKI:def 1; f in ExtREAL & f in {f} by TARSKI:def 1,XXREAL_0:def 1; hence thesis by A3; end; theorem Th27: {f,g}"" = {f",g"} proof thus {f,g}"" = ({f}\/{g})"" by ENUMSET1:1 .= ({f}"") \/ ({g}"") by Th23 .= {f"} \/ ({g}"") by Th26 .= ({f"}) \/ {g"} by Th26 .= {f",g"} by ENUMSET1:1; end; definition let A be complex-membered set; func A"" -> complex-membered set equals {c": c in A}; coherence proof {c": c in A} is complex-membered proof let e; assume e in {c": c in A}; then ex c st e = c" & c in A; hence thesis; end; hence thesis; end; involutiveness proof let A, B; assume A1: A = {c": c in B}; thus B c= {c": c in A} proof let z; A2: z in COMPLEX by XCMPLX_0:def 2; A3: z" in COMPLEX & z = z" " by XCMPLX_0:def 2; assume z in B; then z" in A by A1,A2; hence thesis by A3; end; let e; assume e in {c": c in A}; then consider r0 being Element of COMPLEX such that A4: r0" = e and A5: r0 in A; ex c st c" = r0 & c in B by A1,A5; hence thesis by A4; end; end; theorem Th28: a in A iff a" in A"" proof a in COMPLEX by XCMPLX_0:def 2; hence a in A implies a" in A""; assume a" in A""; then ex c st c" = a" & c in A; hence thesis by XCMPLX_1:201; end; theorem Th29: a" in A iff a in A"" proof a" " = a; hence thesis by Th28; end; registration let A be empty set; cluster A"" -> empty; coherence proof assume A"" is non empty; then the Element of A"" in A""; then ex c st the Element of A"" = c" & c in A; hence thesis; end; end; registration let A be complex-membered non empty set; cluster A"" -> non empty; coherence proof (the Element of A)" in A"" by Th28; hence thesis; end; end; registration let A be real-membered set; cluster A"" -> real-membered; coherence proof let e; assume e in A""; then ex c st e = c" & c in A; hence thesis; end; end; registration let A be rational-membered set; cluster A"" -> rational-membered; coherence proof let e; assume e in A""; then ex c st e = c" & c in A; hence thesis; end; end; registration let A be real-membered set, F be ext-real-membered set; identify A"" with F"" when A = F; compatibility proof assume A1: A = F; let a be ext-real number; hereby assume a in A""; then consider c such that A2: a = c" and A3: c in A; reconsider w = c as Element of ExtREAL by A3,XXREAL_0:def 1; ex m being complex number st w = m & w" = m" by A3,XXREAL_3:def 6; hence a in F"" by A1,A2,A3; end; assume a in F""; then consider w such that A4: a = w" and A5: w in F; reconsider c = w as Element of COMPLEX by A1,A5,XCMPLX_0:def 2; w" = c" by A1,A5,XXREAL_3:def 6; hence thesis by A1,A4,A5; end; end; Lm3: A c= B implies A"" c= B"" proof assume A1: A c= B; let a; assume a in A""; then a" in A by Th29; hence thesis by A1,Th29; end; theorem Th30: A c= B iff A"" c= B"" proof A"""" = A & B"""" = B; hence thesis by Lm3; end; theorem A"" = B"" implies A = B proof assume A"" = B""; then A c= B & B c= A by Th30; hence thesis by XBOOLE_0:def 10; end; theorem Th32: (A \/ B)"" = (A"") \/ (B"") proof let a; hereby assume a in (A\/B)""; then a" in A\/B by Th29; then a" in A or a" in B by XBOOLE_0:def 3; then a in A"" or a in B"" by Th29; hence a in A"" \/ B"" by XBOOLE_0:def 3; end; assume a in A"" \/ B""; then a in A"" or a in B"" by XBOOLE_0:def 3; then a" in A or a" in B by Th29; then a" in A\/B by XBOOLE_0:def 3; hence thesis by Th29; end; theorem Th33: (A /\ B)"" = (A"") /\ (B"") proof let a; hereby assume a in (A/\B)""; then A1: a" in A/\B by Th29; then a" in B by XBOOLE_0:def 4; then A2: a in B"" by Th29; a" in A by A1,XBOOLE_0:def 4; then a in A"" by Th29; hence a in (A"") /\ (B"") by A2,XBOOLE_0:def 4; end; assume A3: a in (A"") /\ (B""); then a in B"" by XBOOLE_0:def 4; then A4: a" in B by Th29; a in A"" by A3,XBOOLE_0:def 4; then a" in A by Th29; then a" in A/\B by A4,XBOOLE_0:def 4; hence thesis by Th29; end; theorem Th34: (A \ B)"" = (A"") \ (B"") proof let a; hereby assume a in (A\B)""; then A1: a" in A\B by Th29; then not a" in B by XBOOLE_0:def 5; then A2: not a in B"" by Th29; a in A"" by A1,Th29; hence a in (A"") \ (B"") by A2,XBOOLE_0:def 5; end; assume A3: a in (A"") \ (B""); then not a in B"" by XBOOLE_0:def 5; then A4: not a" in B by Th29; a" in A by A3,Th29; then a" in A\B by A4,XBOOLE_0:def 5; hence thesis by Th29; end; theorem Th35: (A \+\ B)"" = (A"") \+\ (B"") proof thus (A \+\ B)"" = ((A\B)"") \/ ((B\A)"") by Th32 .= ((A"")\(B"")) \/ ((B\A)"") by Th34 .= (A"") \+\ (B"") by Th34; end; theorem Th36: --(A"") = (--A)"" proof let a; A1: (-a)" = -a" by XCMPLX_1:222; hereby assume a in --A""; then -a in A"" by Th12; then (-a)" in A by Th29; then a" in --A by A1,Th12; hence a in (--A)"" by Th29; end; assume a in (--A)""; then a" in --A by Th29; then -a" in A by Th12; then -a in A"" by A1,Th29; hence thesis by Th12; end; theorem Th37: {a}"" = {a"} proof let z; hereby assume z in {a}""; then consider c such that A1: z = c" and A2: c in {a}; c = a by A2,TARSKI:def 1; hence z in {a"} by A1,TARSKI:def 1; end; assume z in {a"}; then A3: z = a" by TARSKI:def 1; a in COMPLEX & a in {a} by TARSKI:def 1,XCMPLX_0:def 2; hence thesis by A3; end; theorem Th38: {a,b}"" = {a",b"} proof let z; hereby assume z in {a,b}""; then consider c such that A1: z = c" and A2: c in {a,b}; c = a or c = b by A2,TARSKI:def 2; hence z in {a",b"} by A1,TARSKI:def 2; end; A3: a in {a,b} & b in {a,b} by TARSKI:def 2; assume z in {a",b"}; then A4: z = a" or z = b" by TARSKI:def 2; a in COMPLEX & b in COMPLEX by XCMPLX_0:def 2; hence thesis by A4,A3; end; definition let F, G be ext-real-membered set; func F++G equals {w1+w2: w1 in F & w2 in G}; coherence; commutativity proof let X be set; let F, G; assume A1: X = {w1+w2: w1 in F & w2 in G}; thus X c= {w1+w2: w1 in G & w2 in F} proof let e; assume e in X; then ex w1,w2 st e = w1+w2 & w1 in F & w2 in G by A1; hence thesis; end; let e; assume e in {w1+w2: w1 in G & w2 in F}; then ex w1,w2 st e = w1+w2 & w1 in G & w2 in F; hence thesis by A1; end; end; theorem Th39: f in F & g in G implies f+g in F++G proof f in ExtREAL & g in ExtREAL by XXREAL_0:def 1; hence thesis; end; registration let F be empty set; let G be ext-real-membered set; cluster F++G -> empty; coherence proof assume F++G is non empty; then the Element of (F++G) in F++G; then ex w1,w2 st the Element of (F++G) = w1+w2 & w1 in F & w2 in G; hence thesis; end; cluster G++F -> empty; coherence; end; registration let F, G be ext-real-membered non empty set; cluster F++G -> non empty; coherence proof (the Element of F)+the Element of G in F++G by Th39; hence thesis; end; end; registration let F, G be ext-real-membered set; cluster F++G -> ext-real-membered; coherence proof let e; assume e in F++G; then ex w1,w2 st e = w1+w2 & w1 in F & w2 in G; hence thesis; end; end; theorem F c= G & H c= I implies F++H c= G++I proof assume A1: F c= G & H c= I; let i; assume i in F++H; then ex w,w1 st i = w+w1 & w in F & w1 in H; hence thesis by A1; end; theorem Th41: F ++ (G \/ H) = (F++G) \/ (F++H) proof let j; hereby assume j in F++(G\/H); then consider w,w1 such that A1: j = w+w1 and A2: w in F and A3: w1 in G\/H; w1 in G or w1 in H by A3,XBOOLE_0:def 3; then w+w1 in F++G or w+w1 in F++H by A2; hence j in (F++G)\/(F++H) by A1,XBOOLE_0:def 3; end; assume A4: j in (F++G)\/(F++H); per cases by A4,XBOOLE_0:def 3; suppose j in F++G; then consider w,w1 such that A5: j = w+w1 & w in F and A6: w1 in G; w1 in G\/H by A6,XBOOLE_0:def 3; hence thesis by A5; end; suppose j in F++H; then consider w,w1 such that A7: j = w+w1 & w in F and A8: w1 in H; w1 in G\/H by A8,XBOOLE_0:def 3; hence thesis by A7; end; end; theorem Th42: F ++ (G /\ H) c= (F++G) /\ (F++H) proof let j; assume j in F++(G/\H); then consider w,w1 such that A1: j = w+w1 and A2: w in F and A3: w1 in G/\H; w1 in H by A3,XBOOLE_0:def 4; then A4: w+w1 in F++H by A2; w1 in G by A3,XBOOLE_0:def 4; then w+w1 in F++G by A2; hence thesis by A1,A4,XBOOLE_0:def 4; end; theorem Th43: {f}++{g} = {f+g} proof let j; hereby assume j in {f}++{g}; then consider w1,w2 such that A1: j = w1+w2 and A2: w1 in {f} & w2 in {g}; w1 = f & w2 = g by A2,TARSKI:def 1; hence j in {f+g} by A1,TARSKI:def 1; end; A3: f in {f} & g in {g} by TARSKI:def 1; assume j in {f+g}; then A4: j = f+g by TARSKI:def 1; f in ExtREAL & g in ExtREAL by XXREAL_0:def 1; hence thesis by A4,A3; end; theorem Th44: {f}++{g,h} = {f+g,f+h} proof thus {f}++{g,h} = {f}++({g}\/{h}) by ENUMSET1:1 .= ({f}++{g}) \/ ({f}++{h}) by Th41 .= {f+g} \/ ({f}++{h}) by Th43 .= {f+g} \/ {f+h} by Th43 .= {f+g,f+h} by ENUMSET1:1; end; theorem Th45: {f,g}++{h,i} = {f+h,f+i,g+h,g+i} proof thus {f,g}++{h,i} = ({f}\/{g})++{h,i} by ENUMSET1:1 .= ({f}++{h,i}) \/ ({g}++{h,i}) by Th41 .= {f+h,f+i} \/ ({g}++{h,i}) by Th44 .= {f+h,f+i} \/ {g+h,g+i} by Th44 .= {f+h,f+i,g+h,g+i} by ENUMSET1:5; end; definition let A, B be complex-membered set; func A++B equals {c1+c2: c1 in A & c2 in B}; coherence; commutativity proof let X be set; let A, B; assume A1: X = {c1+c2: c1 in A & c2 in B}; thus X c= {c1+c2: c1 in B & c2 in A} proof let e; assume e in X; then ex c1,c2 st e = c1+c2 & c1 in A & c2 in B by A1; hence thesis; end; let e; assume e in {c1+c2: c1 in B & c2 in A}; then ex c1,c2 st e = c1+c2 & c1 in B & c2 in A; hence thesis by A1; end; end; theorem Th46: a in A & b in B implies a+b in A++B proof a in COMPLEX & b in COMPLEX by XCMPLX_0:def 2; hence thesis; end; registration let A be empty set; let B be complex-membered set; cluster A++B -> empty; coherence proof assume A++B is non empty; then the Element of (A++B) in A++B; then ex c1,c2 st the Element of (A++B) = c1+c2 & c1 in A & c2 in B; hence thesis; end; cluster B++A -> empty; coherence; end; registration let A, B be complex-membered non empty set; cluster A++B -> non empty; coherence proof (the Element of A)+the Element of B in A++B by Th46; hence thesis; end; end; registration let A, B be complex-membered set; cluster A++B -> complex-membered; coherence proof let e; assume e in A++B; then ex c1,c2 st e = c1+c2 & c1 in A & c2 in B; hence thesis; end; end; registration let A, B be real-membered set; cluster A++B -> real-membered; coherence proof let e; assume e in A++B; then ex c1,c2 st e = c1+c2 & c1 in A & c2 in B; hence thesis; end; end; registration let A, B be rational-membered set; cluster A++B -> rational-membered; coherence proof let e; assume e in A++B; then ex c1,c2 st e = c1+c2 & c1 in A & c2 in B; hence thesis; end; end; registration let A, B be integer-membered set; cluster A++B -> integer-membered; coherence proof let e; assume e in A++B; then ex c1,c2 st e = c1+c2 & c1 in A & c2 in B; hence thesis; end; end; registration let A, B be natural-membered set; cluster A++B -> natural-membered; coherence proof let e; assume e in A++B; then ex c1,c2 st e = c1+c2 & c1 in A & c2 in B; hence thesis; end; end; registration let A, B be real-membered set, F, G be ext-real-membered set; identify A++B with F++G when A = F, B = G; compatibility proof assume A1: A = F & B = G; let a be ext-real number; hereby assume a in A++B; then consider c,c1 such that A2: a = c+c1 and A3: c in A & c1 in B; reconsider d1 = c, d2 = c1 as Element of ExtREAL by A3,XXREAL_0:def 1; a = d1+d2 by A2,A3,XXREAL_3:def 2; hence a in F++G by A1,A3; end; assume a in F++G; then consider w,w1 such that A4: a = w+w1 and A5: w in F & w1 in G; reconsider d1 = w, d2 = w1 as Element of COMPLEX by A1,A5,XCMPLX_0:def 2; a = d1+d2 by A1,A4,A5,XXREAL_3:def 2; hence thesis by A1,A5; end; end; theorem Th47: A c= B & C c= D implies A++C c= B++D proof assume A1: A c= B & C c= D; let a; assume a in A++C; then ex c,c1 st a = c+c1 & c in A & c1 in C; hence thesis by A1; end; theorem Th48: A ++ (B \/ C) = (A++B) \/ (A++C) proof let a; hereby assume a in A++(B\/C); then consider c,c1 such that A1: a = c+c1 and A2: c in A and A3: c1 in B\/C; c1 in B or c1 in C by A3,XBOOLE_0:def 3; then c+c1 in A++B or c+c1 in A++C by A2; hence a in (A++B)\/(A++C) by A1,XBOOLE_0:def 3; end; assume A4: a in (A++B)\/(A++C); per cases by A4,XBOOLE_0:def 3; suppose a in A++B; then consider c,c1 such that A5: a = c+c1 & c in A and A6: c1 in B; c1 in B\/C by A6,XBOOLE_0:def 3; hence thesis by A5; end; suppose a in A++C; then consider c,c1 such that A7: a = c+c1 & c in A and A8: c1 in C; c1 in B\/C by A8,XBOOLE_0:def 3; hence thesis by A7; end; end; theorem Th49: A ++ (B /\ C) c= (A++B) /\ (A++C) proof let a; assume a in A++(B/\C); then consider c,c1 such that A1: a = c+c1 and A2: c in A and A3: c1 in B/\C; c1 in C by A3,XBOOLE_0:def 4; then A4: c+c1 in A++C by A2; c1 in B by A3,XBOOLE_0:def 4; then c+c1 in A++B by A2; hence thesis by A1,A4,XBOOLE_0:def 4; end; theorem Th50: (A++B)++C = A++(B++C) proof let a; hereby assume a in A++B++C; then consider c,c1 such that A1: a = c+c1 and A2: c in A++B and A3: c1 in C; consider c2,c3 being Element of COMPLEX such that A4: c = c2+c3 and A5: c2 in A and A6: c3 in B by A2; a = c2+(c3+c1) & c3+c1 in B++C by A1,A3,A4,A6; hence a in A++(B++C) by A5; end; assume a in A++(B++C); then consider c,c1 such that A7: a = c+c1 & c in A and A8: c1 in B++C; consider c2,c3 being Element of COMPLEX such that A9: c1 = c2+c3 & c2 in B and A10: c3 in C by A8; a = c+c2+c3 & c+c2 in A++B by A7,A9; hence thesis by A10; end; theorem Th51: {a}++{b} = {a+b} proof let z; hereby assume z in {a}++{b}; then consider c1,c2 such that A1: z = c1+c2 and A2: c1 in {a} & c2 in {b}; c1 = a & c2 = b by A2,TARSKI:def 1; hence z in {a+b} by A1,TARSKI:def 1; end; A3: a in {a} & b in {b} by TARSKI:def 1; assume z in {a+b}; then A4: z = a+b by TARSKI:def 1; a in COMPLEX & b in COMPLEX by XCMPLX_0:def 2; hence thesis by A4,A3; end; theorem Th52: {a}++{s,t} = {a+s,a+t} proof thus {a}++{s,t} = {a}++({s}\/{t}) by ENUMSET1:1 .= ({a}++{s}) \/ ({a}++{t}) by Th48 .= {a+s} \/ ({a}++{t}) by Th51 .= {a+s} \/ {a+t} by Th51 .= {a+s,a+t} by ENUMSET1:1; end; theorem Th53: {a,b}++{s,t} = {a+s,a+t,b+s,b+t} proof thus {a,b}++{s,t} = ({a}\/{b})++{s,t} by ENUMSET1:1 .= ({a}++{s,t}) \/ ({b}++{s,t}) by Th48 .= {a+s,a+t} \/ ({b}++{s,t}) by Th52 .= {a+s,a+t} \/ {b+s,b+t} by Th52 .= {a+s,a+t,b+s,b+t} by ENUMSET1:5; end; definition let F, G be ext-real-membered set; func F--G equals F ++ --G; coherence; end; theorem Th54: F--G = {w1-w2: w1 in F & w2 in G} proof thus F--G c= {w1-w2: w1 in F & w2 in G} proof let e; assume e in F--G; then consider w1,w2 such that A1: e = w1+w2 and A2: w1 in F and A3: w2 in --G; e = w1- -w2 & -w2 in G by A1,A3,Th2; hence thesis by A2; end; let e; assume e in {w1-w2: w1 in F & w2 in G}; then consider w1,w2 such that A4: e = w1-w2 & w1 in F and A5: w2 in G; -w2 in --G by A5; hence thesis by A4; end; theorem Th55: f in F & g in G implies f-g in F--G proof A1: f in ExtREAL & g in ExtREAL by XXREAL_0:def 1; F--G = {w1-w2: w1 in F & w2 in G} by Th54; hence thesis by A1; end; registration let F be empty set; let G be ext-real-membered set; cluster F--G -> empty; coherence; cluster G--F -> empty; coherence; end; registration let F, G be ext-real-membered non empty set; cluster F--G -> non empty; coherence; end; registration let F, G be ext-real-membered set; cluster F--G -> ext-real-membered; coherence; end; theorem F c= G & H c= I implies F--H c= G--I proof assume A1: F c= G & H c= I; let i; A2: F--H = {w1-w2: w1 in F & w2 in H} by Th54; assume i in F--H; then ex w,w1 st i = w-w1 & w in F & w1 in H by A2; hence thesis by A1,Th55; end; theorem F -- (G \/ H) = (F--G) \/ (F--H) proof thus F -- (G \/ H) = F++(--G\/--H) by Th5 .= (F--G) \/ (F--H) by Th41; end; theorem F -- (G /\ H) c= (F--G) /\ (F--H) proof F -- (G /\ H) = F++((--G)/\--H) by Th6; hence thesis by Th42; end; Lm4: --(F++G) = (--F) ++ --G proof let j; hereby assume j in --(F++G); then consider w such that A1: j = -w and A2: w in F++G; consider w1,w2 such that A3: w = w1+w2 and A4: w1 in F & w2 in G by A2; A5: -(w1+w2) = -w1-w2 by XXREAL_3:9; -w1 in --F & -w2 in --G by A4; hence j in (--F) ++ --G by A1,A3,A5; end; assume j in (--F) ++ --G; then consider w1,w2 such that A6: j = w1+w2 and A7: w1 in --F & w2 in --G; -w1 in F & -w2 in G by A7,Th2; then -(w1+w2) = -w1-w2 & -w1+-w2 in F++G by XXREAL_3:9; hence thesis by A6,Th2; end; theorem --(F++G) = (--F) -- G by Lm4; theorem Th60: --(F--G) = (--F) ++ G proof thus --(F--G) = (--F)----G by Lm4 .= (--F) ++ G; end; theorem {f}--{g} = {f-g} proof thus {f}--{g} = {f}++{-g} by Th9 .= {f-g} by Th43; end; theorem {f}--{h,i} = {f-h,f-i} proof thus {f}--{h,i} = {f}++{-h,-i} by Th10 .= {f-h,f-i} by Th44; end; theorem {f,g}--{h} = {f-h,g-h} proof thus {f,g}--{h} = {f,g}++{-h} by Th9 .= {f-h,g-h} by Th44; end; theorem {f,g}--{h,i} = {f-h,f-i,g-h,g-i} proof thus {f,g}--{h,i} = {f,g}++{-h,-i} by Th10 .= {f-h,f-i,g-h,g-i} by Th45; end; definition let A, B be complex-membered set; func A--B equals A ++ --B; coherence; end; theorem Th65: A--B = {c1-c2: c1 in A & c2 in B} proof thus A--B c= {c1-c2: c1 in A & c2 in B} proof let e; assume e in A--B; then consider c1,c2 such that A1: e = c1+c2 and A2: c1 in A and A3: c2 in --B; e = c1- -c2 & -c2 in B by A1,A3,Th12; hence thesis by A2; end; let e; assume e in {c1-c2: c1 in A & c2 in B}; then consider c1,c2 such that A4: e = c1-c2 & c1 in A and A5: c2 in B; -c2 in --B by A5; hence thesis by A4; end; theorem Th66: a in A & b in B implies a-b in A--B proof A1: a in COMPLEX & b in COMPLEX by XCMPLX_0:def 2; A--B = {c1-c2: c1 in A & c2 in B} by Th65; hence thesis by A1; end; registration let A be empty set; let B be complex-membered set; cluster A--B -> empty; coherence; cluster B--A -> empty; coherence; end; registration let A, B be complex-membered non empty set; cluster A--B -> non empty; coherence; end; registration let A, B be complex-membered set; cluster A--B -> complex-membered; coherence; end; registration let A, B be real-membered set; cluster A--B -> real-membered; coherence; end; registration let A, B be rational-membered set; cluster A--B -> rational-membered; coherence; end; registration let A, B be integer-membered set; cluster A--B -> integer-membered; coherence; end; registration let A, B be real-membered set, F, G be ext-real-membered set; identify A--B with F--G when A = F, B = G; compatibility; end; theorem Th67: A c= B & C c= D implies A--C c= B--D proof assume A1: A c= B & C c= D; let z; A2: A--C = {c1-c2: c1 in A & c2 in C} by Th65; assume z in A--C; then ex c,c1 st z = c-c1 & c in A & c1 in C by A2; hence thesis by A1,Th66; end; Lm5: --(A++B) = (--A) ++ --B proof let a; hereby assume a in --(A++B); then consider c such that A1: a = -c and A2: c in A++B; consider c1,c2 such that A3: c = c1+c2 and A4: c1 in A & c2 in B by A2; A5: -c1 in --A & -c2 in --B by A4; a = -c1+-c2 by A1,A3; hence a in (--A) ++ --B by A5; end; assume a in (--A) ++ --B; then consider c1,c2 such that A6: a = c1+c2 and A7: c1 in --A & c2 in --B; -c1 in A & -c2 in B by A7,Th12; then -c1+-c2 in A++B; then -a in A++B by A6; hence thesis by Th12; end; theorem A -- (B \/ C) = (A--B) \/ (A--C) proof thus A -- (B \/ C) = A++(--B\/--C) by Th15 .= (A--B) \/ (A--C) by Th48; end; theorem A -- (B /\ C) c= (A--B) /\ (A--C) proof A -- (B /\ C) = A++((--B)/\--C) by Th16; hence thesis by Th49; end; theorem --(A++B) = (--A) -- B by Lm5; theorem Th71: --(A--B) = (--A) ++ B proof thus --(A--B) = (--A)----B by Lm5 .= (--A) ++ B; end; theorem A++(B--C) = A++B--C by Th50; theorem A--(B++C) = A--B--C proof thus A--(B++C) = A++(--B--C) by Lm5 .= A--B--C by Th50; end; theorem A--(B--C) = A--B++C proof thus A--(B--C) = A++((--B)++C) by Th71 .= A--B++C by Th50; end; theorem Th75: {a}--{b} = {a-b} proof thus {a}--{b} = {a}++{-b} by Th19 .= {a-b} by Th51; end; theorem {a}--{s,t} = {a-s,a-t} proof thus {a}--{s,t} = {a}++{-s,-t} by Th20 .= {a-s,a-t} by Th52; end; theorem {a,b}--{s} = {a-s,b-s} proof thus {a,b}--{s} = {a,b}++{-s} by Th19 .= {a-s,b-s} by Th52; end; theorem {a,b}--{s,t} = {a-s,a-t,b-s,b-t} proof thus {a,b}--{s,t} = {a,b}++{-s,-t} by Th20 .= {a-s,a-t,b-s,b-t} by Th53; end; definition let F, G be ext-real-membered set; func F**G equals {w1*w2: w1 in F & w2 in G}; coherence; commutativity proof let X be set; let F, G; assume A1: X = {w1*w2: w1 in F & w2 in G}; thus X c= {w1*w2: w1 in G & w2 in F} proof let e; assume e in X; then ex w1,w2 st e = w1*w2 & w1 in F & w2 in G by A1; hence thesis; end; let e; assume e in {w1*w2: w1 in G & w2 in F}; then ex w1,w2 st e = w1*w2 & w1 in G & w2 in F; hence thesis by A1; end; end; registration let F be empty set; let G be ext-real-membered set; cluster F**G -> empty; coherence proof assume F**G is non empty; then the Element of (F**G) in F**G; then ex w1,w2 st the Element of (F**G) = w1*w2 & w1 in F & w2 in G; hence thesis; end; cluster G**F -> empty; coherence; end; registration let F, G be ext-real-membered set; cluster F**G -> ext-real-membered; coherence proof let e; assume e in F**G; then ex w1,w2 st e = w1*w2 & w1 in F & w2 in G; hence thesis; end; end; theorem Th79: f in F & g in G implies f*g in F**G proof f in ExtREAL & g in ExtREAL by XXREAL_0:def 1; hence thesis; end; registration let F, G be ext-real-membered non empty set; cluster F**G -> non empty; coherence proof (the Element of F)*the Element of G in F**G by Th79; hence thesis; end; end; theorem Th80: (F**G)**H = F**(G**H) proof let i; hereby assume i in F**G**H; then consider w,w1 such that A1: i = w*w1 and A2: w in F**G and A3: w1 in H; consider w2,w3 being Element of ExtREAL such that A4: w = w2*w3 and A5: w2 in F and A6: w3 in G by A2; i = w2*(w3*w1) & w3*w1 in G**H by A1,A3,A4,A6,XXREAL_3:66; hence i in F**(G**H) by A5; end; assume i in F**(G**H); then consider w,w1 such that A7: i = w*w1 & w in F and A8: w1 in G**H; consider w2,w3 being Element of ExtREAL such that A9: w1 = w2*w3 & w2 in G and A10: w3 in H by A8; i = w*w2*w3 & w*w2 in F**G by A7,A9,XXREAL_3:66; hence thesis by A10; end; theorem Th81: F c= G & H c= I implies F**H c= G**I proof assume A1: F c= G & H c= I; let i; assume i in F**H; then ex w,w1 st i = w*w1 & w in F & w1 in H; hence thesis by A1; end; theorem Th82: F ** (G \/ H) = (F**G) \/ (F**H) proof let j; hereby assume j in F**(G\/H); then consider w,w1 such that A1: j = w*w1 and A2: w in F and A3: w1 in G\/H; w1 in G or w1 in H by A3,XBOOLE_0:def 3; then w*w1 in F**G or w*w1 in F**H by A2; hence j in (F**G)\/(F**H) by A1,XBOOLE_0:def 3; end; assume A4: j in (F**G)\/(F**H); per cases by A4,XBOOLE_0:def 3; suppose j in F**G; then consider w,w1 such that A5: j = w*w1 & w in F and A6: w1 in G; w1 in G\/H by A6,XBOOLE_0:def 3; hence thesis by A5; end; suppose j in F**H; then consider w,w1 such that A7: j = w*w1 & w in F and A8: w1 in H; w1 in G\/H by A8,XBOOLE_0:def 3; hence thesis by A7; end; end; theorem Th83: F ** (G /\ H) c= (F**G) /\ (F**H) proof let j; assume j in F**(G/\H); then consider w,w1 such that A1: j = w*w1 and A2: w in F and A3: w1 in G/\H; w1 in H by A3,XBOOLE_0:def 4; then A4: w*w1 in F**H by A2; w1 in G by A3,XBOOLE_0:def 4; then w*w1 in F**G by A2; hence thesis by A1,A4,XBOOLE_0:def 4; end; theorem F**--G = --(F**G) proof let i; hereby assume i in F**--G; then consider w,w1 such that A1: i = w*w1 and A2: w in F and A3: w1 in --G; w*-w1 = -(w*w1) by XXREAL_3:92; then A4: i = -(w*-w1) by A1; -w1 in G by A3,Th2; then w*-w1 in F**G by A2; hence i in --(F**G) by A4; end; assume i in --(F**G); then -i in F**G by Th2; then consider w,w1 such that A5: -i = w*w1 & w in F and A6: w1 in G; w*-w1 = -(w*w1) & -w1 in --G by A6,XXREAL_3:92; hence thesis by A5; end; theorem Th85: (F**G)"" = (F"") ** (G"") proof let i; hereby assume i in (F**G)""; then consider w such that A1: i = w" and A2: w in F**G; consider w1,w2 such that A3: w = w1*w2 and A4: w1 in F & w2 in G by A2; A5: w1" in F"" & w2" in G"" by A4; i = w1"*w2" by A1,A3,XXREAL_3:67; hence i in (F"")**(G"") by A5; end; assume i in (F"")**(G""); then consider w,w1 such that A6: i = w*w1 and A7: w in F"" and A8: w1 in G""; consider w3 being Element of ExtREAL such that A9: w1 = w3" and A10: w3 in G by A8; consider w2 such that A11: w = w2" and A12: w2 in F by A7; A13: w2*w3 in F**G by A12,A10; i = (w2*w3)" by A6,A11,A9,XXREAL_3:67; hence thesis by A13; end; theorem Th86: {f}**{g} = {f*g} proof let i; hereby assume i in {f}**{g}; then consider w1,w2 such that A1: i = w1*w2 and A2: w1 in {f} & w2 in {g}; w1 = f & w2 = g by A2,TARSKI:def 1; hence i in {f*g} by A1,TARSKI:def 1; end; A3: f in {f} & g in {g} by TARSKI:def 1; assume i in {f*g}; then A4: i = f*g by TARSKI:def 1; f in ExtREAL & g in ExtREAL by XXREAL_0:def 1; hence thesis by A4,A3; end; theorem Th87: {f}**{h,i} = {f*h,f*i} proof thus {f}**{h,i} = {f}**({h}\/{i}) by ENUMSET1:1 .= ({f}**{h}) \/ ({f}**{i}) by Th82 .= {f*h} \/ ({f}**{i}) by Th86 .= {f*h} \/ {f*i} by Th86 .= {f*h,f*i} by ENUMSET1:1; end; theorem Th88: {f,g}**{h,i} = {f*h,f*i,g*h,g*i} proof thus {f,g}**{h,i} = ({f}\/{g})**{h,i} by ENUMSET1:1 .= ({f}**{h,i}) \/ ({g}**{h,i}) by Th82 .= {f*h,f*i} \/ ({g}**{h,i}) by Th87 .= {f*h,f*i} \/ {g*h,g*i} by Th87 .= {f*h,f*i,g*h,g*i} by ENUMSET1:5; end; definition let A, B be complex-membered set; func A**B equals {c1*c2: c1 in A & c2 in B}; coherence; commutativity proof let X be set; let A, B; assume A1: X = {c1*c2: c1 in A & c2 in B}; thus X c= {c1*c2: c1 in B & c2 in A} proof let e; assume e in X; then ex c1,c2 st e = c1*c2 & c1 in A & c2 in B by A1; hence thesis; end; let e; assume e in {c1*c2: c1 in B & c2 in A}; then ex c1,c2 st e = c1*c2 & c1 in B & c2 in A; hence thesis by A1; end; end; theorem Th89: a in A & b in B implies a*b in A**B proof a in COMPLEX & b in COMPLEX by XCMPLX_0:def 2; hence thesis; end; registration let A be empty set; let B be complex-membered set; cluster A**B -> empty; coherence proof assume A**B is non empty; then the Element of (A**B) in A**B; then ex c1,c2 st the Element of (A**B) = c1*c2 & c1 in A & c2 in B; hence thesis; end; cluster B**A -> empty; coherence; end; registration let A, B be complex-membered non empty set; cluster A**B -> non empty; coherence proof (the Element of A)*the Element of B in A**B by Th89; hence thesis; end; end; registration let A, B be complex-membered set; cluster A**B -> complex-membered; coherence proof let e; assume e in A**B; then ex c1,c2 st e = c1*c2 & c1 in A & c2 in B; hence thesis; end; end; registration let A, B be real-membered set; cluster A**B -> real-membered; coherence proof let e; assume e in A**B; then ex c1,c2 st e = c1*c2 & c1 in A & c2 in B; hence thesis; end; end; registration let A, B be rational-membered set; cluster A**B -> rational-membered; coherence proof let e; assume e in A**B; then ex c1,c2 st e = c1*c2 & c1 in A & c2 in B; hence thesis; end; end; registration let A, B be integer-membered set; cluster A**B -> integer-membered; coherence proof let e; assume e in A**B; then ex c1,c2 st e = c1*c2 & c1 in A & c2 in B; hence thesis; end; end; registration let A, B be natural-membered set; cluster A**B -> natural-membered; coherence proof let e; assume e in A**B; then ex c1,c2 st e = c1*c2 & c1 in A & c2 in B; hence thesis; end; end; registration let A, B be real-membered set, F, G be ext-real-membered set; identify A**B with F**G when A = F, B = G; compatibility proof assume A1: A = F & B = G; let a be ext-real number; hereby assume a in A**B; then consider c,c1 such that A2: a = c*c1 and A3: c in A & c1 in B; reconsider d1 = c, d2 = c1 as Element of ExtREAL by A3,XXREAL_0:def 1; a = d1*d2 by A2,A3,XXREAL_3:def 5; hence a in F**G by A1,A3; end; assume a in F**G; then consider w,w1 such that A4: a = w*w1 and A5: w in F & w1 in G; reconsider d1 = w, d2 = w1 as Element of COMPLEX by A1,A5,XCMPLX_0:def 2; a = d1*d2 by A1,A4,A5,XXREAL_3:def 5; hence thesis by A1,A5; end; end; theorem Th90: (A**B)**C = A**(B**C) proof let a; hereby assume a in A**B**C; then consider c,c1 such that A1: a = c*c1 and A2: c in A**B and A3: c1 in C; consider c2,c3 being Element of COMPLEX such that A4: c = c2*c3 and A5: c2 in A and A6: c3 in B by A2; a = c2*(c3*c1) & c3*c1 in B**C by A1,A3,A4,A6; hence a in A**(B**C) by A5; end; assume a in A**(B**C); then consider c,c1 such that A7: a = c*c1 & c in A and A8: c1 in B**C; consider c2,c3 being Element of COMPLEX such that A9: c1 = c2*c3 & c2 in B and A10: c3 in C by A8; a = c*c2*c3 & c*c2 in A**B by A7,A9; hence thesis by A10; end; theorem A c= B & C c= D implies A**C c= B**D proof assume A1: A c= B & C c= D; let a; assume a in A**C; then ex c,c1 st a = c*c1 & c in A & c1 in C; hence thesis by A1; end; theorem Th92: A ** (B \/ C) = (A**B) \/ (A**C) proof let a; hereby assume a in A**(B\/C); then consider c,c1 such that A1: a = c*c1 and A2: c in A and A3: c1 in B\/C; c1 in B or c1 in C by A3,XBOOLE_0:def 3; then c*c1 in A**B or c*c1 in A**C by A2; hence a in (A**B)\/(A**C) by A1,XBOOLE_0:def 3; end; assume A4: a in (A**B)\/(A**C); per cases by A4,XBOOLE_0:def 3; suppose a in A**B; then consider c,c1 such that A5: a = c*c1 & c in A and A6: c1 in B; c1 in B\/C by A6,XBOOLE_0:def 3; hence thesis by A5; end; suppose a in A**C; then consider c,c1 such that A7: a = c*c1 & c in A and A8: c1 in C; c1 in B\/C by A8,XBOOLE_0:def 3; hence thesis by A7; end; end; theorem Th93: A ** (B /\ C) c= (A**B) /\ (A**C) proof let a; assume a in A**(B/\C); then consider c,c1 such that A1: a = c*c1 and A2: c in A and A3: c1 in B/\C; c1 in C by A3,XBOOLE_0:def 4; then A4: c*c1 in A**C by A2; c1 in B by A3,XBOOLE_0:def 4; then c*c1 in A**B by A2; hence thesis by A1,A4,XBOOLE_0:def 4; end; theorem Th94: A**--B = --(A**B) proof let a; hereby assume a in A**--B; then consider c,c1 such that A1: a = c*c1 and A2: c in A and A3: c1 in --B; -c1 in B by A3,Th12; then A4: c*-c1 in A**B by A2; a = -(c*-c1) by A1; hence a in --(A**B) by A4; end; assume a in --(A**B); then -a in A**B by Th12; then consider c,c1 such that A5: -a = c*c1 and A6: c in A and A7: c1 in B; a = c*-c1 & -c1 in --B by A5,A7; hence thesis by A6; end; theorem Th95: A**(B++C) c= A**B ++ A**C proof let a; assume a in A**(B++C); then consider c,c1 such that A1: a = c*c1 and A2: c in A and A3: c1 in B++C; consider c2,c3 being Element of COMPLEX such that A4: c1 = c2+c3 & c2 in B and A5: c3 in C by A3; A6: c*c3 in A**C by A2,A5; a = c*c2+c*c3 & c*c2 in A**B by A1,A2,A4; hence thesis by A6; end; theorem Th96: A**(B--C) c= A**B -- A**C proof A**(B++--C) c= A**B++A**--C by Th95; hence thesis by Th94; end; theorem Th97: (A**B)"" = (A"") ** (B"") proof let a; hereby assume a in (A**B)""; then consider c such that A1: a = c" and A2: c in A**B; consider c1,c2 such that A3: c = c1*c2 and A4: c1 in A & c2 in B by A2; A5: c1" in A"" & c2" in B"" by A4; a = c1"*c2" by A1,A3,XCMPLX_1:204; hence a in (A"")**(B"") by A5; end; assume a in (A"")**(B""); then consider c,c1 such that A6: a = c*c1 and A7: c in A"" and A8: c1 in B""; consider c3 being Element of COMPLEX such that A9: c1 = c3" and A10: c3 in B by A8; consider c2 such that A11: c = c2" and A12: c2 in A by A7; A13: c2*c3 in A**B by A12,A10; a = (c2*c3)" by A6,A11,A9,XCMPLX_1:204; hence thesis by A13; end; theorem Th98: {a}**{b} = {a*b} proof let z; hereby assume z in {a}**{b}; then consider c1,c2 such that A1: z = c1*c2 and A2: c1 in {a} & c2 in {b}; c1 = a & c2 = b by A2,TARSKI:def 1; hence z in {a*b} by A1,TARSKI:def 1; end; A3: a in {a} & b in {b} by TARSKI:def 1; assume z in {a*b}; then A4: z = a*b by TARSKI:def 1; a in COMPLEX & b in COMPLEX by XCMPLX_0:def 2; hence thesis by A4,A3; end; theorem Th99: {a}**{s,t} = {a*s,a*t} proof thus {a}**{s,t} = {a}**({s}\/{t}) by ENUMSET1:1 .= ({a}**{s}) \/ ({a}**{t}) by Th92 .= {a*s} \/ ({a}**{t}) by Th98 .= {a*s} \/ {a*t} by Th98 .= {a*s,a*t} by ENUMSET1:1; end; theorem Th100: {a,b}**{s,t} = {a*s,a*t,b*s,b*t} proof thus {a,b}**{s,t} = ({a}\/{b})**{s,t} by ENUMSET1:1 .= ({a}**{s,t}) \/ ({b}**{s,t}) by Th92 .= {a*s,a*t} \/ ({b}**{s,t}) by Th99 .= {a*s,a*t} \/ {b*s,b*t} by Th99 .= {a*s,a*t,b*s,b*t} by ENUMSET1:5; end; definition let F, G be ext-real-membered set; func F///G equals F**(G""); coherence; end; theorem Th101: F///G = {w1/w2: w1 in F & w2 in G} proof thus F///G c= {w1/w2: w1 in F & w2 in G} proof let e; assume e in F///G; then consider w1,w2 such that A1: e = w1*w2 and A2: w1 in F and A3: w2 in G""; consider w such that A4: w2 = w" and A5: w in G by A3; e = w1/w by A1,A4; hence thesis by A2,A5; end; let e; assume e in {w1/w2: w1 in F & w2 in G}; then consider w1,w2 such that A6: e = w1/w2 & w1 in F and A7: w2 in G; w2" in G"" by A7; hence thesis by A6; end; theorem Th102: f in F & g in G implies f/g in F///G proof A1: f in ExtREAL & g in ExtREAL by XXREAL_0:def 1; F///G = {w1/w2: w1 in F & w2 in G} by Th101; hence thesis by A1; end; registration let F be empty set; let G be ext-real-membered set; cluster F///G -> empty; coherence; cluster G///F -> empty; coherence; end; registration let F, G be ext-real-membered non empty set; cluster F///G -> non empty; coherence; end; registration let F, G be ext-real-membered set; cluster F///G -> ext-real-membered; coherence; end; theorem F c= G & H c= I implies F///H c= G///I proof assume A1: F c= G & H c= I; let i; A2: F///H = {w1/w2: w1 in F & w2 in H} by Th101; assume i in F///H; then ex w,w1 st i = w/w1 & w in F & w1 in H by A2; hence thesis by A1,Th102; end; theorem (F \/ G) /// H = (F///H) \/ (G///H) by Th82; theorem (F /\ G) /// H c= (F///H) /\ (G///H) by Th83; theorem F /// (G \/ H) = (F///G) \/ (F///H) proof thus F /// (G \/ H) = F**((G"")\/(H"")) by Th23 .= (F///G) \/ (F///H) by Th82; end; theorem F /// (G /\ H) c= (F///G) /\ (F///H) proof (G /\ H)"" c= (G"")/\(H"") by Th24; then A1: F**((G /\ H)"") c= F**((G"")/\(H"")) by Th81; F**((G"")/\(H"")) c= (F**(G""))/\(F**(H"")) by Th83; hence thesis by A1,XBOOLE_1:1; end; theorem (F**G)///H = F**(G///H) by Th80; theorem (F///G)**H = (F**H)///G by Th80; theorem (F///G)///H = F///(G**H) proof thus (F///G)///H = F**((G"")**(H"")) by Th80 .= F///(G**H) by Th85; end; theorem {f}///{g} = {f/g} proof thus {f}///{g} = {f}**{g"} by Th26 .= {f/g} by Th86; end; theorem {f}///{h,i} = {f/h,f/i} proof thus {f}///{h,i} = {f}**{h",i"} by Th27 .= {f/h,f/i} by Th87; end; theorem {f,g}///{h} = {f/h,g/h} proof thus {f,g}///{h} = {f,g}**{h"} by Th26 .= {f/h,g/h} by Th87; end; theorem {f,g}///{h,i} = {f/h,f/i,g/h,g/i} proof thus {f,g}///{h,i} = {f,g}**{h",i"} by Th27 .= {f/h,f/i,g/h,g/i} by Th88; end; definition let A, B be complex-membered set; func A///B equals A**(B""); coherence; end; theorem Th115: A///B = {c1/c2: c1 in A & c2 in B} proof thus A///B c= {c1/c2: c1 in A & c2 in B} proof let e; assume e in A///B; then consider c1,c2 such that A1: e = c1*c2 and A2: c1 in A and A3: c2 in B""; e = c1/(c2") & c2" in B by A1,A3,Th29; hence thesis by A2; end; let e; assume e in {c1/c2: c1 in A & c2 in B}; then consider c1,c2 such that A4: e = c1/c2 & c1 in A and A5: c2 in B; c2" in B"" by A5; hence thesis by A4; end; theorem Th116: a in A & b in B implies a/b in A///B proof A1: a in COMPLEX & b in COMPLEX by XCMPLX_0:def 2; A///B = {c1/c2: c1 in A & c2 in B} by Th115; hence thesis by A1; end; registration let A be empty set; let B be complex-membered set; cluster A///B -> empty; coherence; cluster B///A -> empty; coherence; end; registration let A, B be complex-membered non empty set; cluster A///B -> non empty; coherence; end; registration let A, B be complex-membered set; cluster A///B -> complex-membered; coherence; end; registration let A, B be real-membered set; cluster A///B -> real-membered; coherence; end; registration let A, B be rational-membered set; cluster A///B -> rational-membered; coherence; end; registration let A, B be real-membered set, F, G be ext-real-membered set; identify A///B with F///G when A = F, B = G; compatibility; end; theorem A c= B & C c= D implies A///C c= B///D proof assume A1: A c= B & C c= D; let z; A2: A///C = {c1/c2: c1 in A & c2 in C} by Th115; assume z in A///C; then ex c,c1 st z = c/c1 & c in A & c1 in C by A2; hence thesis by A1,Th116; end; theorem A /// (B \/ C) = (A///B) \/ (A///C) proof thus A /// (B \/ C) = A**((B"")\/(C"")) by Th32 .= (A///B) \/ (A///C) by Th92; end; theorem A /// (B /\ C) c= (A///B) /\ (A///C) proof A /// (B /\ C) = A**((B"")/\(C"")) by Th33; hence thesis by Th93; end; theorem A///--B = --(A///B) proof thus A///--B = A**--(B"") by Th36 .= --(A///B) by Th94; end; theorem (--A)///B = --(A///B) by Th94; theorem (A++B)///C c= A///C ++ B///C by Th95; theorem (A--B)///C c= A///C -- B///C proof (A++--B)///C c= A///C++(--B)///C by Th95; hence thesis by Th94; end; theorem (A**B)///C = A**(B///C) by Th90; theorem (A///B)**C = (A**C)///B by Th90; theorem (A///B)///C = A///(B**C) proof thus (A///B)///C = A**((B"")**(C"")) by Th90 .= A///(B**C) by Th97; end; theorem A///(B///C) = (A**C)///B proof thus A///(B///C) = A**((B"")**(C"""")) by Th97 .= (A**C)///B by Th90; end; theorem {a}///{b} = {a/b} proof thus {a}///{b} = {a}**{b"} by Th37 .= {a/b} by Th98; end; theorem {a}///{s,t} = {a/s,a/t} proof thus {a}///{s,t} = {a}**{s",t"} by Th38 .= {a/s,a/t} by Th99; end; theorem {a,b}///{s} = {a/s,b/s} proof thus {a,b}///{s} = {a,b}**{s"} by Th37 .= {a/s,b/s} by Th99; end; theorem {a,b}///{s,t} = {a/s,a/t,b/s,b/t} proof thus {a,b}///{s,t} = {a,b}**{s",t"} by Th38 .= {a/s,a/t,b/s,b/t} by Th100; end; definition let F be ext-real-membered set; let f be ext-real number; func f++F equals {f}++F; coherence; end; theorem Th132: g in G implies f+g in f++G proof f in {f} by TARSKI:def 1; hence thesis by Th39; end; theorem Th133: f++F = {f+w: w in F} proof thus f++F c= {f+w: w in F} proof let e; assume e in f++F; then consider w1,w2 such that A1: e = w1+w2 and A2: w1 in {f} and A3: w2 in F; w1 = f by A2,TARSKI:def 1; hence thesis by A1,A3; end; let e; assume e in {f+w: w in F}; then ex w st e = f+w & w in F; hence thesis by Th132; end; theorem Th134: e in f++F implies ex w st e = f+w & w in F proof f++F = {f+w: w in F} by Th133; hence thesis; end; registration let F be empty set; let f be ext-real number; cluster f++F -> empty; coherence; end; registration let F be ext-real-membered non empty set; let f be ext-real number; cluster f++F -> non empty; coherence; end; registration let F be ext-real-membered set; let f be ext-real number; cluster f++F -> ext-real-membered; coherence; end; theorem Th135: r++F c= r++G implies F c= G proof assume A1: r++F c= r++G; let i; assume i in F; then r+i in r++F by Th132; then ex w st r+i = r+w & w in G by A1,Th134; hence thesis by XXREAL_3:11; end; theorem r++F = r++G implies F = G proof assume r++F = r++G; then F c= G & G c= F by Th135; hence thesis by XBOOLE_0:def 10; end; theorem Th137: r ++ (F /\ G) = (r++F) /\ (r++G) proof A1: (r++F) /\ (r++G) c= r ++ (F /\ G) proof let j; assume A2: j in (r++F) /\ (r++G); then j in r++F by XBOOLE_0:def 4; then consider w such that A3: j = r+w and A4: w in F by Th134; j in r++G by A2,XBOOLE_0:def 4; then consider w1 such that A5: j = r+w1 and A6: w1 in G by Th134; w = w1 by A3,A5,XXREAL_3:11; then w in F /\ G by A4,A6,XBOOLE_0:def 4; hence thesis by A3,Th132; end; r ++ (F /\ G) c= (r++F) /\ (r++G) by Th42; hence thesis by A1,XBOOLE_0:def 10; end; theorem Th138: (f++F) \ (f++G) c= f ++ (F \ G) proof let i; assume A1: i in (f++F) \ (f++G); then consider w such that A2: i = f+w and A3: w in F by Th134; now assume not w in F\G; then w in G by A3,XBOOLE_0:def 5; then f+w in f++G by Th132; hence contradiction by A1,A2,XBOOLE_0:def 5; end; hence thesis by A2,Th132; end; theorem Th139: r ++ (F \ G) = (r++F) \ (r++G) proof A1: r ++ (F \ G) c= (r++F) \ (r++G) proof let i; assume i in r ++ (F \ G); then consider w such that A2: i = r+w and A3: w in F\G by Th134; A4: now assume r+w in r++G; then consider w1 such that A5: r+w = r+w1 and A6: w1 in G by Th134; w = w1 by A5,XXREAL_3:11; hence contradiction by A3,A6,XBOOLE_0:def 5; end; r+w in r++F by A3,Th132; hence thesis by A2,A4,XBOOLE_0:def 5; end; (r++F) \ (r++G) c= r ++ (F \ G) by Th138; hence thesis by A1,XBOOLE_0:def 10; end; theorem Th140: r ++ (F \+\ G) = (r++F) \+\ (r++G) proof thus r ++ (F \+\ G) = (r++(F\G)) \/ (r++(G\F)) by Th41 .= ((r++F)\(r++G)) \/ (r++(G\F)) by Th139 .= (r++F) \+\ (r++G) by Th139; end; definition let A be complex-membered set; let a be complex number; func a++A equals {a}++A; coherence; end; theorem Th141: b in A implies a+b in a++A proof a in {a} by TARSKI:def 1; hence thesis by Th46; end; theorem Th142: a++A = {a+c: c in A} proof thus a++A c= {a+c: c in A} proof let e; assume e in a++A; then consider c1,c2 such that A1: e = c1+c2 and A2: c1 in {a} and A3: c2 in A; c1 = a by A2,TARSKI:def 1; hence thesis by A1,A3; end; let e; assume e in {a+c: c in A}; then ex c st e = a+c & c in A; hence thesis by Th141; end; theorem Th143: e in a++A implies ex c st e = a+c & c in A proof a++A = {a+c: c in A} by Th142; hence thesis; end; registration let A be empty set; let a be complex number; cluster a++A -> empty; coherence; end; registration let A be complex-membered non empty set; let a be complex number; cluster a++A -> non empty; coherence; end; registration let A be complex-membered set; let a be complex number; cluster a++A -> complex-membered; coherence; end; registration let A be real-membered set; let a be real number; cluster a++A -> real-membered; coherence; end; registration let A be rational-membered set; let a be rational number; cluster a++A -> rational-membered; coherence; end; registration let A be integer-membered set; let a be integer number; cluster a++A -> integer-membered; coherence; end; registration let A be natural-membered set; let a be Nat; cluster a++A -> natural-membered; coherence; end; registration let A be real-membered set, F be ext-real-membered set; let a be real number, f be ext-real number; identify a++A with f++F when a = f, A = F; compatibility; end; theorem Th144: A c= B iff a++A c= a++B proof thus A c= B implies a++A c= a++B by Th47; assume A1: a++A c= a++B; let z; assume z in A; then a+z in a++A by Th141; then ex c st a+z = a+c & c in B by A1,Th143; hence thesis; end; theorem a++A = a++B implies A = B proof assume a++A = a++B; then A c= B & B c= A by Th144; hence thesis by XBOOLE_0:def 10; end; theorem 0++A = A proof let a; hereby assume a in 0++A; then consider c1,c2 such that A1: a = c1+c2 and A2: c1 in {0} and A3: c2 in A; c1 = 0 by A2,TARSKI:def 1; hence a in A by A1,A3; end; assume a in A; then 0+a in {0+c: c in A}; hence thesis by Th142; end; theorem (a+b)++A = a++(b++A) proof thus (a+b)++A = {a}++{b}++A by Th51 .= a++(b++A) by Th50; end; theorem a++(A++B) = (a++A)++B by Th50; theorem Th149: a ++ (A /\ B) = (a++A) /\ (a++B) proof A1: (a++A) /\ (a++B) c= a ++ (A /\ B) proof let z; assume A2: z in (a++A) /\ (a++B); then z in a++A by XBOOLE_0:def 4; then consider c such that A3: z = a+c and A4: c in A by Th143; z in a++B by A2,XBOOLE_0:def 4; then ex c1 st z = a+c1 & c1 in B by Th143; then c in A/\B by A3,A4,XBOOLE_0:def 4; hence thesis by A3,Th141; end; a ++ (A /\ B) c= (a++A) /\ (a++B) by Th49; hence thesis by A1,XBOOLE_0:def 10; end; theorem Th150: a ++ (A \ B) = (a++A) \ (a++B) proof let z; hereby assume z in a ++ (A \ B); then consider c such that A1: z = a+c and A2: c in A\B by Th143; A3: now assume a+c in a++B; then ex c1 st a+c = a+c1 & c1 in B by Th143; hence contradiction by A2,XBOOLE_0:def 5; end; a+c in a++A by A2,Th141; hence z in (a++A) \ (a++B) by A1,A3,XBOOLE_0:def 5; end; assume A4: z in (a++A) \ (a++B); then consider c such that A5: z = a+c and A6: c in A by Th143; now assume not c in A\B; then c in B by A6,XBOOLE_0:def 5; then a+c in a++B by Th141; hence contradiction by A4,A5,XBOOLE_0:def 5; end; hence thesis by A5,Th141; end; theorem Th151: a ++ (A \+\ B) = (a++A) \+\ (a++B) proof thus a ++ (A \+\ B) = (a++(A\B)) \/ (a++(B\A)) by Th48 .= ((a++A)\(a++B)) \/ (a++(B\A)) by Th150 .= (a++A) \+\ (a++B) by Th150; end; definition let F be ext-real-membered set; let f be ext-real number; func f--F equals {f}--F; coherence; end; theorem Th152: g in G implies f-g in f--G proof f in {f} by TARSKI:def 1; hence thesis by Th55; end; theorem Th153: f--F = {f-w: w in F} proof thus f--F c= {f-w: w in F} proof let e; assume e in f--F; then consider w1,w2 such that A1: e = w1+w2 and A2: w1 in {f} & w2 in --F; A3: w1- -w2 = w1+w2; -w2 in F & w1 = f by A2,Th2,TARSKI:def 1; hence thesis by A1,A3; end; let e; assume e in {f-w: w in F}; then ex w st e = f-w & w in F; hence thesis by Th152; end; theorem Th154: e in f--F implies ex w st e = f-w & w in F proof f--F = {f-w: w in F} by Th153; hence thesis; end; registration let F be empty set; let f be ext-real number; cluster f--F -> empty; coherence; end; registration let F be ext-real-membered non empty set; let f be ext-real number; cluster f--F -> non empty; coherence; end; registration let F be ext-real-membered set; let f be ext-real number; cluster f--F -> ext-real-membered; coherence; end; theorem Th155: r--F c= r--G implies F c= G proof assume A1: r--F c= r--G; let i; assume i in F; then r-i in r--F by Th152; then ex w st r-i = r-w & w in G by A1,Th154; hence thesis by XXREAL_3:12; end; theorem r--F = r--G implies F = G proof assume r--F = r--G; then F c= G & G c= F by Th155; hence thesis by XBOOLE_0:def 10; end; theorem Th157: r -- (F/\G) = (r--F) /\ (r--G) proof thus r -- (F/\G) = r ++ ((--F)/\(--G)) by Th6 .= (r++--F) /\ (r++--G) by Th137 .= (r--F) /\ (r--G); end; theorem Th158: r -- (F\G) = (r--F) \ (r--G) proof thus r -- (F\G) = r ++ ((--F)\(--G)) by Th7 .= (r++--F) \ (r++--G) by Th139 .= (r--F) \ (r--G); end; theorem Th159: r -- (F\+\G) = (r--F) \+\ (r--G) proof thus r -- (F\+\G) = r ++ ((--F)\+\(--G)) by Th8 .= (r++--F) \+\ (r++--G) by Th140 .= (r--F) \+\ (r--G); end; definition let A be complex-membered set; let a be complex number; func a--A equals {a}--A; coherence; end; theorem Th160: b in A implies a-b in a--A proof a in {a} by TARSKI:def 1; hence thesis by Th66; end; theorem Th161: a--A = {a-c: c in A} proof A1: a--A = {c1-c2: c1 in {a} & c2 in A} by Th65; thus a--A c= {a-c: c in A} proof let e; assume e in a--A; then consider c1,c2 such that A2: e = c1-c2 and A3: c1 in {a} and A4: c2 in A by A1; c1 = a by A3,TARSKI:def 1; hence thesis by A2,A4; end; let e; assume e in {a-c: c in A}; then ex c st e = a-c & c in A; hence thesis by Th160; end; theorem Th162: e in a--A implies ex c st e = a-c & c in A proof a--A = {a-c: c in A} by Th161; hence thesis; end; registration let A be empty set; let a be complex number; cluster a--A -> empty; coherence; end; registration let A be complex-membered non empty set; let a be complex number; cluster a--A -> non empty; coherence; end; registration let A be complex-membered set; let a be complex number; cluster a--A -> complex-membered; coherence; end; registration let A be real-membered set; let a be real number; cluster a--A -> real-membered; coherence; end; registration let A be rational-membered set; let a be rational number; cluster a--A -> rational-membered; coherence; end; registration let A be integer-membered set; let a be integer number; cluster a--A -> integer-membered; coherence; end; registration let A be real-membered set, F be ext-real-membered set; let a be real number, f be ext-real number; identify a--A with f--F when a = f, A = F; compatibility; end; theorem Th163: A c= B iff a--A c= a--B proof thus A c= B implies a--A c= a--B by Th67; assume A1: a--A c= a--B; let z; assume z in A; then a-z in a--A by Th160; then ex c st a-z = a-c & c in B by A1,Th162; hence thesis; end; theorem a--A = a--B implies A = B proof assume a--A = a--B; then A c= B & B c= A by Th163; hence thesis by XBOOLE_0:def 10; end; theorem Th165: a -- (A/\B) = (a--A) /\ (a--B) proof thus a -- (A/\B) = a ++ ((--A)/\(--B)) by Th16 .= (a++--A) /\ (a++--B) by Th149 .= (a--A) /\ (a--B); end; theorem Th166: a -- (A\B) = (a--A) \ (a--B) proof thus a -- (A\B) = a ++ ((--A)\(--B)) by Th17 .= (a++--A) \ (a++--B) by Th150 .= (a--A) \ (a--B); end; theorem Th167: a -- (A\+\B) = (a--A) \+\ (a--B) proof thus a -- (A\+\B) = a ++ ((--A)\+\(--B)) by Th18 .= (a++--A) \+\ (a++--B) by Th151 .= (a--A) \+\ (a--B); end; definition let F be ext-real-membered set; let f be ext-real number; func F--f equals F--{f}; coherence; end; theorem Th168: g in G implies g-f in G--f proof f in {f} by TARSKI:def 1; hence thesis by Th55; end; theorem Th169: F--f = {w-f: w in F} proof thus F--f c= {w-f: w in F} proof let e; assume e in F--f; then consider w1,w2 such that A1: e = w1+w2 & w1 in F and A2: w2 in --{f}; -w2 in {f} by A2,Th2; then w1- -w2 = w1+w2 & -w2 = f by TARSKI:def 1; hence thesis by A1; end; let e; assume e in {w-f: w in F}; then ex w st e = w-f & w in F; hence thesis by Th168; end; theorem e in F--f implies ex w st e = w-f & w in F proof F--f = {w-f: w in F} by Th169; hence thesis; end; registration let F be empty set; let f be ext-real number; cluster F--f -> empty; coherence; end; registration let F be ext-real-membered non empty set; let f be ext-real number; cluster F--f -> non empty; coherence; end; registration let F be ext-real-membered set; let f be ext-real number; cluster F--f -> ext-real-membered; coherence; end; theorem F -- f = -- (f -- F) by Th60; theorem f -- F = -- (F -- f) by Th60; theorem (F/\G) -- r = (F--r) /\ (G--r) proof thus (F/\G) -- r = --(r--(F/\G)) by Th60 .= --((r--F) /\ (r--G)) by Th157 .= (--(r--F)) /\ (--(r--G)) by Th6 .= (--(r--F)) /\ (G--r) by Th60 .= (F--r) /\ (G--r) by Th60; end; theorem (F\G) -- r = (F--r) \ (G--r) proof thus (F\G) -- r = --(r--(F\G)) by Th60 .= --((r--F) \ (r--G)) by Th158 .= (--(r--F)) \ (--(r--G)) by Th7 .= (--(r--F)) \ (G--r) by Th60 .= (F--r) \ (G--r) by Th60; end; theorem (F\+\G) -- r = (F--r) \+\ (G--r) proof thus (F\+\G) -- r = --(r--(F\+\G)) by Th60 .= --((r--F) \+\ (r--G)) by Th159 .= (--(r--F)) \+\ (--(r--G)) by Th8 .= (--(r--F)) \+\ (G--r) by Th60 .= (F--r) \+\ (G--r) by Th60; end; definition let A be complex-membered set; let a be complex number; func A--a equals A--{a}; coherence; end; theorem Th176: b in A implies b-a in A--a proof a in {a} by TARSKI:def 1; hence thesis by Th66; end; theorem Th177: A--a = {c-a: c in A} proof A1: A--a = {c1-c2: c1 in A & c2 in {a}} by Th65; thus A--a c= {c-a: c in A} proof let e; assume e in A--a; then consider c1,c2 such that A2: e = c1-c2 & c1 in A and A3: c2 in {a} by A1; c2 = a by A3,TARSKI:def 1; hence thesis by A2; end; let e; assume e in {c-a: c in A}; then ex c st e = c-a & c in A; hence thesis by Th176; end; theorem Th178: e in A--a implies ex c st e = c-a & c in A proof A--a = {c-a: c in A} by Th177; hence thesis; end; registration let A be empty set; let a be complex number; cluster A--a -> empty; coherence; end; registration let A be complex-membered non empty set; let a be complex number; cluster A--a -> non empty; coherence; end; registration let A be complex-membered set; let a be complex number; cluster A--a -> complex-membered; coherence; end; registration let A be real-membered set; let a be real number; cluster A--a -> real-membered; coherence; end; registration let A be rational-membered set; let a be rational number; cluster A--a -> rational-membered; coherence; end; registration let A be integer-membered set; let a be integer number; cluster A--a -> integer-membered; coherence; end; registration let A be real-membered set, F be ext-real-membered set; let a be real number, f be ext-real number; identify A--a with F--f when a = f, A = F; compatibility; end; theorem Th179: A c= B iff A--a c= B--a proof thus A c= B implies A--a c= B--a by Th67; assume A1: A--a c= B--a; let z; assume z in A; then z-a in A--a by Th176; then ex c st z-a = c-a & c in B by A1,Th178; hence thesis; end; theorem A--a = B--a implies A = B proof assume A--a = B--a; then A c= B & B c= A by Th179; hence thesis by XBOOLE_0:def 10; end; theorem A -- a = -- (a -- A) by Th71; theorem a -- A = -- (A -- a) by Th71; theorem (A/\B) -- a = (A--a) /\ (B--a) proof thus (A/\B) -- a = --(a--(A/\B)) by Th71 .= --((a--A) /\ (a--B)) by Th165 .= (--(a--A)) /\ (--(a--B)) by Th16 .= (--(a--A)) /\ (B--a) by Th71 .= (A--a) /\ (B--a) by Th71; end; theorem (A\B) -- a = (A--a) \ (B--a) proof thus (A\B) -- a = --(a--(A\B)) by Th71 .= --((a--A) \ (a--B)) by Th166 .= (--(a--A)) \ (--(a--B)) by Th17 .= (--(a--A)) \ (B--a) by Th71 .= (A--a) \ (B--a) by Th71; end; theorem (A\+\B) -- a = (A--a) \+\ (B--a) proof thus (A\+\B) -- a = --(a--(A\+\B)) by Th71 .= --((a--A) \+\ (a--B)) by Th167 .= (--(a--A)) \+\ (--(a--B)) by Th18 .= (--(a--A)) \+\ (B--a) by Th71 .= (A--a) \+\ (B--a) by Th71; end; definition let F be ext-real-membered set; let f be ext-real number; func f**F equals {f}**F; coherence; end; theorem Th186: g in G implies f*g in f**G proof f in {f} by TARSKI:def 1; hence thesis by Th79; end; theorem Th187: f**F = {f*w: w in F} proof thus f**F c= {f*w: w in F} proof let e; assume e in f**F; then consider w1,w2 such that A1: e = w1*w2 and A2: w1 in {f} and A3: w2 in F; w1 = f by A2,TARSKI:def 1; hence thesis by A1,A3; end; let e; assume e in {f*w: w in F}; then ex w st e = f*w & w in F; hence thesis by Th186; end; theorem Th188: e in f**F implies ex w st e = f*w & w in F proof f**F = {f*w: w in F} by Th187; hence thesis; end; registration let F be empty set; let f be ext-real number; cluster f**F -> empty; coherence; end; registration let F be ext-real-membered non empty set; let f be ext-real number; cluster f**F -> non empty; coherence; end; registration let F be ext-real-membered set; let f be ext-real number; cluster f**F -> ext-real-membered; coherence; end; theorem r <> 0 implies r ** (F/\G) = (r**F) /\ (r**G) proof assume A1: r <> 0; A2: (r**F) /\ (r**G) c= r ** (F /\ G) proof let j; assume A3: j in (r**F) /\ (r**G); then j in r**F by XBOOLE_0:def 4; then consider w such that A4: j = r*w and A5: w in F by Th188; j in r**G by A3,XBOOLE_0:def 4; then consider w1 such that A6: j = r*w1 and A7: w1 in G by Th188; w = w1 by A1,A4,A6,XXREAL_3:68; then w in F /\ G by A5,A7,XBOOLE_0:def 4; hence thesis by A4,Th186; end; r ** (F /\ G) c= (r**F) /\ (r**G) by Th83; hence thesis by A2,XBOOLE_0:def 10; end; theorem Th190: (f**F) \ (f**G) c= f ** (F \ G) proof let i; assume A1: i in (f**F) \ (f**G); then consider w such that A2: i = f*w and A3: w in F by Th188; now assume not w in F\G; then w in G by A3,XBOOLE_0:def 5; then f*w in f**G by Th186; hence contradiction by A1,A2,XBOOLE_0:def 5; end; hence thesis by A2,Th186; end; theorem Th191: r <> 0 implies r ** (F\G) = (r**F) \ (r**G) proof assume A1: r <> 0; A2: r ** (F \ G) c= (r**F) \ (r**G) proof let i; assume i in r ** (F \ G); then consider w such that A3: i = r*w and A4: w in F\G by Th188; A5: now assume r*w in r**G; then consider w1 such that A6: r*w = r*w1 and A7: w1 in G by Th188; w = w1 by A1,A6,XXREAL_3:68; hence contradiction by A4,A7,XBOOLE_0:def 5; end; r*w in r**F by A4,Th186; hence thesis by A3,A5,XBOOLE_0:def 5; end; (r**F) \ (r**G) c= r ** (F \ G) by Th190; hence thesis by A2,XBOOLE_0:def 10; end; theorem r <> 0 implies r ** (F\+\G) = (r**F) \+\ (r**G) proof assume A1: r <> 0; thus r ** (F \+\ G) = (r**(F\G)) \/ (r**(G\F)) by Th82 .= ((r**F)\(r**G)) \/ (r**(G\F)) by A1,Th191 .= (r**F) \+\ (r**G) by A1,Th191; end; definition let A be complex-membered set; let a be complex number; func a**A equals {a}**A; coherence; end; theorem Th193: b in A implies a*b in a**A proof a in {a} by TARSKI:def 1; hence thesis by Th89; end; theorem Th194: a**A = {a*c: c in A} proof thus a**A c= {a*c: c in A} proof let e; assume e in a**A; then consider c1,c2 such that A1: e = c1*c2 and A2: c1 in {a} and A3: c2 in A; c1 = a by A2,TARSKI:def 1; hence thesis by A1,A3; end; let e; assume e in {a*c: c in A}; then ex c st e = a*c & c in A; hence thesis by Th193; end; theorem Th195: e in a**A implies ex c st e = a*c & c in A proof a**A = {a*c: c in A} by Th194; hence thesis; end; registration let A be empty set; let a be complex number; cluster a**A -> empty; coherence; end; registration let A be complex-membered non empty set; let a be complex number; cluster a**A -> non empty; coherence; end; registration let A be complex-membered set; let a be complex number; cluster a**A -> complex-membered; coherence; end; registration let A be real-membered set; let a be real number; cluster a**A -> real-membered; coherence; end; registration let A be rational-membered set; let a be rational number; cluster a**A -> rational-membered; coherence; end; registration let A be integer-membered set; let a be integer number; cluster a**A -> integer-membered; coherence; end; registration let A be natural-membered set; let a be Nat; cluster a**A -> natural-membered; coherence; end; registration let A be real-membered set, F be ext-real-membered set; let a be real number, f be ext-real number; identify a**A with f**F when a = f, A = F; compatibility; end; theorem Th196: a <> 0 & a**A c= a**B implies A c= B proof assume that A1: a <> 0 and A2: a**A c= a**B; let z; assume z in A; then a*z in a**A by Th193; then ex c st a*z = a*c & c in B by A2,Th195; hence thesis by A1,XCMPLX_1:5; end; theorem a <> 0 & a**A = a**B implies A = B proof assume a <> 0 & a**A = a**B; then A c= B & B c= A by Th196; hence thesis by XBOOLE_0:def 10; end; theorem Th198: a <> 0 implies a ** (A/\B) = (a**A) /\ (a**B) proof assume A1: a <> 0; A2: (a**A) /\ (a**B) c= a ** (A /\ B) proof let z; assume A3: z in (a**A) /\ (a**B); then z in a**A by XBOOLE_0:def 4; then consider c such that A4: z = a*c and A5: c in A by Th195; z in a**B by A3,XBOOLE_0:def 4; then consider c1 such that A6: z = a*c1 and A7: c1 in B by Th195; c = c1 by A1,A4,A6,XCMPLX_1:5; then c in A /\ B by A5,A7,XBOOLE_0:def 4; hence thesis by A4,Th193; end; a ** (A /\ B) c= (a**A) /\ (a**B) by Th93; hence thesis by A2,XBOOLE_0:def 10; end; theorem Th199: a <> 0 implies a ** (A\B) = (a**A) \ (a**B) proof assume A1: a <> 0; let z; hereby assume z in a ** (A \ B); then consider c such that A2: z = a*c and A3: c in A\B by Th195; A4: now assume a*c in a**B; then consider c1 such that A5: a*c = a*c1 and A6: c1 in B by Th195; c = c1 by A1,A5,XCMPLX_1:5; hence contradiction by A3,A6,XBOOLE_0:def 5; end; a*c in a**A by A3,Th193; hence z in (a**A) \ (a**B) by A2,A4,XBOOLE_0:def 5; end; assume A7: z in (a**A) \ (a**B); then consider c such that A8: z = a*c and A9: c in A by Th195; now assume not c in A\B; then c in B by A9,XBOOLE_0:def 5; then a*c in a**B by Th193; hence contradiction by A7,A8,XBOOLE_0:def 5; end; hence thesis by A8,Th193; end; theorem Th200: a <> 0 implies a ** (A\+\B) = (a**A) \+\ (a**B) proof assume A1: a <> 0; thus a ** (A \+\ B) = (a**(A\B)) \/ (a**(B\A)) by Th92 .= ((a**A)\(a**B)) \/ (a**(B\A)) by A1,Th199 .= (a**A) \+\ (a**B) by A1,Th199; end; theorem Th201: 0**A c= {0} proof let a; assume a in 0**A; then consider c1,c2 such that A1: a = c1*c2 and A2: c1 in {0} and c2 in A; c1 = 0 by A2,TARSKI:def 1; hence thesis by A1,TARSKI:def 1; end; theorem A <> {} implies 0**A = {0} proof assume A1: A <> {}; A2: {0} c= 0**A proof set x = the Element of A; let a be Nat; assume A3: a in {0}; x in COMPLEX by XCMPLX_0:def 2; then A4: 0*x in {0*c: c in A} by A1; 0**A = {0*c: c in A} by Th194; hence thesis by A3,A4,TARSKI:def 1; end; 0**A c= {0} by Th201; hence thesis by A2,XBOOLE_0:def 10; end; theorem 1**A = A proof let a; hereby assume a in 1**A; then consider c1,c2 such that A1: a = c1*c2 and A2: c1 in {1} and A3: c2 in A; c1 = 1 by A2,TARSKI:def 1; hence a in A by A1,A3; end; assume a in A; then 1*a in {1*c: c in A}; hence thesis by Th194; end; theorem (a*b)**A = a**(b**A) proof thus (a*b)**A = {a}**{b}**A by Th98 .= a**(b**A) by Th90; end; theorem a**(A**B) = (a**A)**B by Th90; theorem (a+b)**A c= a**A ++ b**A proof {a}++{b} = {a+b} by Th51; hence thesis by Th95; end; theorem (a-b)**A c= a**A -- b**A proof {a}--{b} = {a-b} by Th75; hence thesis by Th96; end; theorem Th208: a**(B++C) = a**B++a**C proof A1: a**B++a**C c= a**(B++C) proof let z; assume z in a**B++a**C; then consider c,c1 such that A2: z = c+c1 and A3: c in a**B and A4: c1 in a**C; consider c3 being Element of COMPLEX such that A5: c1 = a*c3 and A6: c3 in C by A4,Th195; consider c2 such that A7: c = a*c2 and A8: c2 in B by A3,Th195; A9: c2+c3 in B++C by A8,A6; z = a*(c2+c3) by A2,A7,A5; hence thesis by A9,Th193; end; a**(B++C) c= a**B++a**C by Th95; hence thesis by A1,XBOOLE_0:def 10; end; theorem a**(B--C) = a**B--a**C proof thus a**(B--C) = a**B++a**--C by Th208 .= a**B--a**C by Th94; end; definition let F be ext-real-membered set; let f be ext-real number; func f///F equals {f}///F; coherence; end; theorem Th210: g in G implies f/g in f///G proof f in {f} by TARSKI:def 1; hence thesis by Th102; end; theorem Th211: f///F = {f/w: w in F} proof thus f///F c= {f/w: w in F} proof let e; assume e in f///F; then consider w1,w2 such that A1: e = w1*w2 and A2: w1 in {f} and A3: w2 in F""; consider w3 being Element of ExtREAL such that A4: w2 = w3" & w3 in F by A3; w1*w3" = w1/w3 & w1 = f by A2,TARSKI:def 1; hence thesis by A1,A4; end; let e; assume e in {f/w: w in F}; then ex w st e = f/w & w in F; hence thesis by Th210; end; theorem e in f///F implies ex w st e = f/w & w in F proof f///F = {f/w: w in F} by Th211; hence thesis; end; registration let F be empty set; let f be ext-real number; cluster f///F -> empty; coherence; end; registration let F be ext-real-membered non empty set; let f be ext-real number; cluster f///F -> non empty; coherence; end; registration let F be ext-real-membered set; let f be ext-real number; cluster f///F -> ext-real-membered; coherence; end; definition let A be complex-membered set; let a be complex number; func a///A equals {a}///A; coherence; end; theorem Th213: b in A implies a/b in a///A proof a in {a} by TARSKI:def 1; hence thesis by Th116; end; theorem Th214: a///A = {a/c: c in A} proof thus a///A c= {a/c: c in A} proof let e; assume e in a///A; then consider c1,c2 such that A1: e = c1*c2 and A2: c1 in {a} & c2 in A""; A3: c1*c2 = c1/(c2"); c2" in A & c1 = a by A2,Th29,TARSKI:def 1; hence thesis by A1,A3; end; let e; assume e in {a/c: c in A}; then ex c st e = a/c & c in A; hence thesis by Th213; end; theorem Th215: e in a///A implies ex c st e = a/c & c in A proof a///A = {a/c: c in A} by Th214; hence thesis; end; registration let A be empty set; let a be complex number; cluster a///A -> empty; coherence; end; registration let A be complex-membered non empty set; let a be complex number; cluster a///A -> non empty; coherence; end; registration let A be complex-membered set; let a be complex number; cluster a///A -> complex-membered; coherence; end; registration let A be real-membered set; let a be real number; cluster a///A -> real-membered; coherence; end; registration let A be rational-membered set; let a be rational number; cluster a///A -> rational-membered; coherence; end; registration let A be real-membered set, F be ext-real-membered set; let a be real number, f be ext-real number; identify a///A with f///F when a = f, A = F; compatibility; end; theorem Th216: a <> 0 & a///A c= a///B implies A c= B proof assume that A1: a <> 0 and A2: a///A c= a///B; let z; assume z in A; then a/z in a///A by Th213; then consider c such that A3: a/z = a/c and A4: c in B by A2,Th215; z" = c" by A1,A3,XCMPLX_1:5; hence thesis by A4,XCMPLX_1:201; end; theorem a <> 0 & a///A = a///B implies A = B proof assume a <> 0 & a///A = a///B; then A c= B & B c= A by Th216; hence thesis by XBOOLE_0:def 10; end; theorem a <> 0 implies a /// (A/\B) = (a///A) /\ (a///B) proof assume A1: a <> 0; thus a /// (A/\B) = a ** ((A"")/\(B"")) by Th33 .= (a**(A"")) /\ (a**(B"")) by A1,Th198 .= (a///A) /\ (a///B); end; theorem a <> 0 implies a /// (A\B) = (a///A) \ (a///B) proof assume A1: a <> 0; thus a /// (A\B) = a ** ((A"")\(B"")) by Th34 .= (a**(A"")) \ (a**(B"")) by A1,Th199 .= (a///A) \ (a///B); end; theorem a <> 0 implies a /// (A\+\B) = (a///A) \+\ (a///B) proof assume A1: a <> 0; thus a /// (A\+\B) = a ** ((A"")\+\(B"")) by Th35 .= (a**(A"")) \+\ (a**(B"")) by A1,Th200 .= (a///A) \+\ (a///B); end; theorem (a+b)///A c= a///A ++ b///A proof {a}++{b} = {a+b} by Th51; hence thesis by Th95; end; theorem (a-b)///A c= a///A -- b///A proof {a}--{b} = {a-b} by Th75; hence thesis by Th96; end; definition let F be ext-real-membered set; let f be ext-real number; func F///f equals F///{f}; coherence; end; theorem Th223: g in G implies g/f in G///f proof f in {f} by TARSKI:def 1; hence thesis by Th102; end; theorem Th224: F///f = {w/f: w in F} proof thus F///f c= {w/f: w in F} proof let e; assume e in F///f; then consider w1,w2 such that A1: e = w1*w2 & w1 in F and A2: w2 in {f}""; consider w3 being Element of ExtREAL such that A3: w2 = w3" and A4: w3 in {f} by A2; w1*w3" = w1/w3 & w3 = f by A4,TARSKI:def 1; hence thesis by A1,A3; end; let e; assume e in {w/f: w in F}; then ex w st e = w/f & w in F; hence thesis by Th223; end; theorem e in F///f implies ex w st e = w/f & w in F proof F///f = {w/f: w in F} by Th224; hence thesis; end; registration let F be empty set; let f be ext-real number; cluster F///f -> empty; coherence; end; registration let F be ext-real-membered non empty set; let f be ext-real number; cluster F///f -> non empty; coherence; end; registration let F be ext-real-membered set; let f be ext-real number; cluster F///f -> ext-real-membered; coherence; end; definition let A be complex-membered set; let a be complex number; func A///a equals A///{a}; coherence; end; theorem Th226: b in A implies b/a in A///a proof a in {a} by TARSKI:def 1; hence thesis by Th116; end; theorem Th227: A///a = {c/a: c in A} proof thus A///a c= {c/a: c in A} proof let e; assume e in A///a; then consider c1,c2 such that A1: e = c1*c2 & c1 in A and A2: c2 in {a}""; {a}"" = {a"} by Th37; then c1*c2 = c1/(c2") & c2 = a" by A2,TARSKI:def 1; hence thesis by A1; end; let e; assume e in {c/a: c in A}; then ex c st e = c/a & c in A; hence thesis by Th226; end; theorem Th228: e in A///a implies ex c st e = c/a & c in A proof A///a = {c/a: c in A} by Th227; hence thesis; end; registration let A be empty set; let a be complex number; cluster A///a -> empty; coherence; end; registration let A be complex-membered non empty set; let a be complex number; cluster A///a -> non empty; coherence; end; registration let A be complex-membered set; let a be complex number; cluster A///a -> complex-membered; coherence; end; registration let A be real-membered set; let a be real number; cluster A///a -> real-membered; coherence; end; registration let A be rational-membered set; let a be rational number; cluster A///a -> rational-membered; coherence; end; registration let A be real-membered set, F be ext-real-membered set; let a be real number, f be ext-real number; identify A///a with F///f when a = f, A = F; compatibility; end; theorem Th229: a <> 0 & A///a c= B///a implies A c= B proof assume that A1: a <> 0 and A2: A///a c= B///a; let z; assume z in A; then z/a in A///a by Th226; then ex c st z/a = c/a & c in B by A2,Th228; hence thesis by A1,XCMPLX_1:5; end; theorem a <> 0 & A///a = B///a implies A = B proof assume a <> 0 & A///a = B///a; then A c= B & B c= A by Th229; hence thesis by XBOOLE_0:def 10; end; theorem a <> 0 implies (A/\B) /// a = (A///a) /\ (B///a) proof assume A1: a <> 0; A2: {a}"" = {a"} by Th37; thus (A/\B)///a = a"**(A/\B) by Th37 .= (a"**A)/\(a"**B) by A1,Th198 .= (A///a) /\ (B///a) by A2; end; theorem a <> 0 implies (A\B) /// a = (A///a) \ (B///a) proof assume A1: a <> 0; A2: {a}"" = {a"} by Th37; thus (A\B)///a = a"**(A\B) by Th37 .= (a"**A)\(a"**B) by A1,Th199 .= (A///a) \ (B///a) by A2; end; theorem a <> 0 implies (A\+\B) /// a = (A///a) \+\ (B///a) proof assume A1: a <> 0; A2: {a}"" = {a"} by Th37; thus (A\+\B)///a = a"**(A\+\B) by Th37 .= (a"**A)\+\(a"**B) by A1,Th200 .= (A///a) \+\ (B///a) by A2; end; theorem Th234: (A++B)///a = A///a ++ B///a proof thus (A++B)///a = a"**(A++B) by Th37 .= a"**A++a"**B by Th208 .= A///a++a"**B by Th37 .= A///a ++ B///a by Th37; end; theorem (A--B)///a = A///a -- B///a proof thus (A--B)///a = A///a ++ (--B)///a by Th234 .= A///a -- B///a by Th94; end; begin definition mode R_eal is Element of ExtREAL; end; definition redefine func +infty -> R_eal; coherence by XXREAL_0:def 1; redefine func -infty -> R_eal; coherence by XXREAL_0:def 1; end; definition let X be ext-real-membered set; func SetMajorant(X) -> ext-real-membered set means :Def1: for x being ext-real number holds x in it iff x is UpperBound of X; existence proof defpred P[ext-real number] means $1 is UpperBound of X; consider Y being ext-real-membered set such that A1: for x being ext-real number holds x in Y iff P[x] from MEMBERED: sch 2; take Y; thus thesis by A1; end; uniqueness proof let Y1,Y2 be ext-real-membered set such that A2: for x being ext-real number holds x in Y1 iff x is UpperBound of X and A3: for x being ext-real number holds x in Y2 iff x is UpperBound of X; let x be ext-real number; x in Y1 iff x is UpperBound of X by A2; hence thesis by A3; end; end; registration let X be ext-real-membered set; cluster SetMajorant(X) -> non empty; coherence proof set x = the UpperBound of X; x in SetMajorant(X) by Def1; hence thesis; end; end; theorem for X,Y being ext-real-membered set st X c= Y holds for x being ext-real number holds x in SetMajorant Y implies x in SetMajorant(X) proof let X,Y be ext-real-membered set; assume A1: X c= Y; let x be ext-real number; assume x in SetMajorant(Y); then x is UpperBound of Y by Def1; then x is UpperBound of X by A1,XXREAL_2:6; hence thesis by Def1; end; definition let X be ext-real-membered set; func SetMinorant(X) -> ext-real-membered set means :Def2: for x being ext-real number holds x in it iff x is LowerBound of X; existence proof defpred P[ext-real number] means $1 is LowerBound of X; consider Y being ext-real-membered set such that A1: for x being ext-real number holds x in Y iff P[x] from MEMBERED: sch 2; take Y; thus thesis by A1; end; uniqueness proof let Y1,Y2 be ext-real-membered set such that A2: for x being ext-real number holds x in Y1 iff x is LowerBound of X and A3: for x being ext-real number holds x in Y2 iff x is LowerBound of X; let x be ext-real number; x in Y1 iff x is LowerBound of X by A2; hence thesis by A3; end; end; registration let X be ext-real-membered set; cluster SetMinorant(X) -> non empty; coherence proof set x = the LowerBound of X; x in SetMinorant(X) by Def2; hence thesis; end; end; theorem for X,Y being ext-real-membered set st X c= Y holds for x being ext-real number holds x in SetMinorant(Y) implies x in SetMinorant(X) proof let X,Y be ext-real-membered set; assume A1: X c= Y; let x be ext-real number; assume x in SetMinorant(Y); then x is LowerBound of Y by Def2; then x is LowerBound of X by A1,XXREAL_2:5; hence thesis by Def2; end; theorem for X being non empty ext-real-membered set holds sup X = inf SetMajorant(X) & inf X = sup SetMinorant(X) proof let X be non empty ext-real-membered set; for y being ext-real number st y in SetMajorant X holds sup X <= y proof let y be ext-real number; assume y in SetMajorant X; then y is UpperBound of X by Def1; hence thesis by XXREAL_2:def 3; end; then A1: sup X is LowerBound of SetMajorant X by XXREAL_2:def 2; inf X is LowerBound of X by XXREAL_2:def 4; then A2: inf X in SetMinorant X by Def2; for y being ext-real number st y in SetMinorant X holds y <= inf X proof let y be ext-real number; assume y in SetMinorant X; then y is LowerBound of X by Def2; hence thesis by XXREAL_2:def 4; end; then A3: inf X is UpperBound of SetMinorant X by XXREAL_2:def 1; sup X is UpperBound of X by XXREAL_2:def 3; then sup X in SetMajorant X by Def1; hence thesis by A1,A2,A3,XXREAL_2:55,56; end; registration let X be non empty set; cluster non empty with_non-empty_elements for Subset-Family of X; existence proof take {[#]X}; thus {[#]X} is non empty; assume {} in {[#]X}; hence contradiction by TARSKI:def 1; end; end; definition let X be non empty set; mode bool_DOMAIN of X is non empty with_non-empty_elements Subset-Family of X; end; definition let F be bool_DOMAIN of ExtREAL; func SUP(F) -> ext-real-membered set means :Def3: for a being ext-real number holds a in it iff ex A being non empty ext-real-membered set st A in F & a = sup A; existence proof defpred P[ext-real number] means ex A being non empty ext-real-membered set st A in F & $1 = sup A; consider S being ext-real-membered set such that A1: for a being ext-real number holds a in S iff P[a] from MEMBERED: sch 2; reconsider S as ext-real-membered set; take S; thus thesis by A1; end; uniqueness proof let S1,S2 be ext-real-membered set such that A2: for a being ext-real number holds a in S1 iff ex A being non empty ext-real-membered set st A in F & a = sup A and A3: for a being ext-real number holds a in S2 iff ex A being non empty ext-real-membered set st A in F & a = sup A; let a be ext-real number; hereby assume a in S1; then ex A being non empty ext-real-membered set st A in F & a = sup A by A2; hence a in S2 by A3; end; assume a in S2; then ex A being non empty ext-real-membered set st A in F & a = sup A by A3; hence thesis by A2; end; end; registration let F be bool_DOMAIN of ExtREAL; cluster SUP(F) -> non empty; coherence proof set A = the Element of F; reconsider A as non empty ext-real-membered set by SETFAM_1:def 8; sup A = sup A; hence thesis by Def3; end; end; theorem Th4: for F being bool_DOMAIN of ExtREAL, S being non empty ext-real-membered number st S = union F holds sup S is UpperBound of SUP(F) proof let F be bool_DOMAIN of ExtREAL, S be non empty ext-real-membered set; assume A1: S = union F; for x being ext-real number st x in SUP(F) holds x <= sup S proof let x be ext-real number; assume x in SUP(F); then consider A being non empty ext-real-membered set such that A2: A in F and A3: x = sup A by Def3; A c= S proof let a be ext-real number; assume a in A; hence thesis by A1,A2,TARSKI:def 4; end; hence thesis by A3,XXREAL_2:59; end; hence thesis by XXREAL_2:def 1; end; theorem Th5: for F being bool_DOMAIN of ExtREAL, S being ext-real-membered set st S = union F holds sup SUP(F) is UpperBound of S proof let F be bool_DOMAIN of ExtREAL, S be ext-real-membered set; assume A1: S = union F; for x being ext-real number st x in S holds x <= sup SUP(F) proof let x be ext-real number; assume x in S; then consider Z being set such that A2: x in Z and A3: Z in F by A1,TARSKI:def 4; reconsider Z as non empty ext-real-membered set by A2,A3; consider a being set such that A4: a = sup Z; reconsider a as ext-real number by A4; sup Z is UpperBound of Z & a in SUP(F) by A3,A4,Def3,XXREAL_2:def 3; hence thesis by A2,A4,XXREAL_2:61,def 1; end; hence thesis by XXREAL_2:def 1; end; theorem for F being bool_DOMAIN of ExtREAL, S being non empty ext-real-membered set st S = union F holds sup S = sup SUP(F) proof let F be bool_DOMAIN of ExtREAL, S be non empty ext-real-membered set; set a = sup S; set b = sup SUP(F); assume A1: S = union F; then sup S is UpperBound of SUP(F) by Th4; then A2: b <= a by XXREAL_2:def 3; sup SUP(F) is UpperBound of S by A1,Th5; then a <= b by XXREAL_2:def 3; hence thesis by A2,XXREAL_0:1; end; definition let F be bool_DOMAIN of ExtREAL; func INF F -> ext-real-membered set means :Def4: for a being ext-real number holds a in it iff ex A being non empty ext-real-membered set st A in F & a = inf A; existence proof set A = the Element of F; defpred P[ext-real number] means ex A being non empty ext-real-membered set st A in F & $1 = inf A; reconsider A as non empty ext-real-membered set by SETFAM_1:def 8; consider S being ext-real-membered set such that A1: for a being ext-real number holds a in S iff P[a] from MEMBERED: sch 2; inf A = inf A; then reconsider S as non empty ext-real-membered set by A1; take S; thus thesis by A1; end; uniqueness proof let S1,S2 be ext-real-membered set such that A2: for a being ext-real number holds a in S1 iff ex A being non empty ext-real-membered set st A in F & a = inf A and A3: for a being ext-real number holds a in S2 iff ex A being non empty ext-real-membered set st A in F & a = inf A; for a being set holds a in S1 iff a in S2 proof let a be set; hereby assume A4: a in S1; then reconsider a9 = a as ext-real number; ex A being non empty ext-real-membered set st A in F & a9 = inf A by A2,A4; hence a in S2 by A3; end; assume A5: a in S2; then reconsider a as ext-real number; ex A being non empty ext-real-membered set st A in F & a = inf A by A3,A5 ; hence thesis by A2; end; hence thesis by TARSKI:1; end; end; registration let F be bool_DOMAIN of ExtREAL; cluster INF(F) -> non empty; coherence proof set A = the Element of F; reconsider A as non empty ext-real-membered set by SETFAM_1:def 8; inf A = inf A; hence thesis by Def4; end; end; theorem Th7: for F being bool_DOMAIN of ExtREAL, S being non empty ext-real-membered set st S = union F holds inf S is LowerBound of INF(F) proof let F be bool_DOMAIN of ExtREAL, S be non empty ext-real-membered set; assume A1: S = union F; for x being ext-real number st x in INF(F) holds inf S <= x proof let x be ext-real number; assume x in INF(F); then consider A being non empty ext-real-membered set such that A2: A in F and A3: x = inf A by Def4; A c= S proof let a be ext-real number; assume a in A; hence thesis by A1,A2,TARSKI:def 4; end; hence thesis by A3,XXREAL_2:60; end; hence thesis by XXREAL_2:def 2; end; theorem Th8: for F being bool_DOMAIN of ExtREAL, S being ext-real-membered set st S = union F holds inf INF(F) is LowerBound of S proof let F be bool_DOMAIN of ExtREAL, S be ext-real-membered set; assume A1: S = union F; for x being ext-real number st x in S holds inf INF(F) <= x proof let x be ext-real number; assume x in S; then consider Z being set such that A2: x in Z and A3: Z in F by A1,TARSKI:def 4; reconsider Z as non empty ext-real-membered set by A2,A3; consider a being set such that A4: a = inf Z; reconsider a as ext-real number by A4; inf Z is LowerBound of Z & a in INF(F) by A3,A4,Def4,XXREAL_2:def 4; hence thesis by A2,A4,XXREAL_2:62,def 2; end; hence thesis by XXREAL_2:def 2; end; theorem for F being bool_DOMAIN of ExtREAL, S being non empty ext-real-membered set st S = union F holds inf S = inf INF(F) proof let F be bool_DOMAIN of ExtREAL, S be non empty ext-real-membered set; set a = inf S; set b = inf INF(F); assume A1: S = union F; then inf S is LowerBound of INF(F) by Th7; then A2: a <= b by XXREAL_2:def 4; inf INF(F) is LowerBound of S by A1,Th8; then b <= a by XXREAL_2:def 4; hence thesis by A2,XXREAL_0:1; end; begin reserve x, a, b, c for real number; definition let a,b,c be complex number; func delta(a,b,c) equals b^2 - 4 * a * c; coherence; end; registration let a,b,c be complex number; cluster delta(a,b,c) -> complex; coherence; end; registration let a,b,c; cluster delta(a,b,c) -> real; coherence; end; definition let a,b,c be Real; redefine func delta(a,b,c) -> Real; coherence by XREAL_0:def 1; end; theorem Th1: for a, b, c, x being complex number holds a <> 0 implies a * x^2 + b * x + c = a * (x + b/(2 * a))^2 - delta(a,b,c)/(4 * a) proof let a, b, c, x be complex number; assume A1: a <> 0; then A2: 4 * a <> 0; a * x^2 + b * x + c = a * x^2 + (b * x) * 1 + c .= a * x^2 + (b * x) * (a * (1/a)) + c by A1,XCMPLX_1:106 .= a * (x^2 + ((b * x) * (1/a))) + c .= a * (x^2 + ((b * x)/a)) + c by XCMPLX_1:99 .= a * (x^2 + x * (b/a)) + c by XCMPLX_1:74 .= a * (x^2 + x * ((2 * b)/(2 * a))) + c by XCMPLX_1:91 .= a * (x^2 + x * (2 * (b/(2 * a)))) + c by XCMPLX_1:74 .= (a * (x^2 + 2 * x * (b/(2 * a))) + b^2/(4 * a)) + (c - b^2/(4 * a)) .= (a * (x^2 + 2 * x * (b/(2 * a))) + a * (b^2/(4 * a) * (1/a))) + (c - b^2/(4 * a)) by A1,XCMPLX_1:109 .= (a * (x^2 + 2 * x * (b/(2 * a))) + a * ((b^2 * 1)/((4 * a) * a))) + ( c - b^2/(4 * a)) by XCMPLX_1:76 .= (a * (x^2 + 2 * x * (b/(2 * a))) + a * (b^2/(2 * a)^2)) + (c - b^2/(4 * a)) .= (a * (x^2 + 2 * x * (b/(2 * a))) + a * (b/(2 * a))^2) + (c - b^2/(4 * a)) by XCMPLX_1:76 .= a * (x + b/(2 * a))^2 - (b^2/(4 * a) - c) .= a * (x + b/(2 * a))^2 - (b^2/(4 * a) - ((4 * a * c)/(4 * a))) by A2, XCMPLX_1:89 .= a * (x + b/(2 * a))^2 - (b^2 - (4 * a * c))/(4 * a) by XCMPLX_1:120; hence thesis; end; theorem a > 0 & delta(a,b,c) <= 0 implies a * x^2 + b * x + c >= 0 proof assume that A1: a > 0 and A2: delta(a,b,c) <= 0; - delta(a,b,c) >= -0 & 4 * a > 0 by A1,A2,XREAL_1:25,129; then (- delta(a,b,c))/(4 * a) >= 0 by XREAL_1:136; then - delta(a,b,c)/(4 * a) >= 0 by XCMPLX_1:187; then A3: a * (x + b/(2 * a))^2 + - delta(a,b,c)/(4 * a) >= a * (x + b/(2 * a) )^2 + 0 by XREAL_1:7; (x +b/(2 * a))^2 >= 0 by XREAL_1:63; then a * (x +b/(2 * a))^2 >= 0 by A1,XREAL_1:127; then a * (x + b/(2 * a))^2 - delta(a,b,c)/(4 * a) >= 0 by A3,XXREAL_0:2; hence thesis by A1,Th1; end; theorem a > 0 & delta(a,b,c) < 0 implies a * x^2 + b * x + c > 0 proof assume that A1: a > 0 and A2: delta(a,b,c) < 0; - delta(a,b,c) > -0 & 4 * a > 0 by A1,A2,XREAL_1:26,129; then (- delta(a,b,c))/(4 * a) > 0 by XREAL_1:139; then - delta(a,b,c)/(4 * a) > 0 by XCMPLX_1:187; then A3: a * (x + b/(2 * a))^2 + - delta(a,b,c)/(4 * a) > a * (x + b/(2 * a)) ^2 by XREAL_1:29; (x +b/(2 * a))^2 >= 0 by XREAL_1:63; then a * (x +b/(2 * a))^2 >= 0 by A1,XREAL_1:127; then a * (x + b/(2 * a))^2 - delta(a,b,c)/(4 * a) > 0 by A3,XXREAL_0:2; hence thesis by A1,Th1; end; theorem a < 0 & delta(a,b,c) <= 0 implies a * x^2 + b * x + c <= 0 proof assume that A1: a < 0 and A2: delta(a,b,c) <= 0; - delta(a,b,c) >= -0 & 4 * a < 0 by A1,A2,XREAL_1:25,132; then (- delta(a,b,c))/(4 * a) <= 0 by XREAL_1:137; then - delta(a,b,c)/(4 * a) <= 0 by XCMPLX_1:187; then A3: a * (x + b/(2 * a))^2 + - delta(a,b,c)/(4 * a) <= a * (x + b/(2 * a) )^2 + 0 by XREAL_1:7; a * (x +b/(2 * a))^2 <= 0 by A1,XREAL_1:63,131; then a * (x + b/(2 * a))^2 - delta(a,b,c)/(4 * a) <= 0 by A3,XXREAL_0:2; hence thesis by A1,Th1; end; theorem a < 0 & delta(a,b,c) < 0 implies a * x^2 + b * x + c < 0 proof assume that A1: a < 0 and A2: delta(a,b,c) < 0; - delta(a,b,c) > 0 & 4 * a < 0 by A1,A2,XREAL_1:58,132; then (- delta(a,b,c))/(4 * a) < 0 by XREAL_1:142; then - delta(a,b,c)/(4 * a) < 0 by XCMPLX_1:187; then A3: a * (x + b/(2 * a))^2 + - delta(a,b,c)/(4 * a) < a * (x + b/(2 * a)) ^2 + 0 by XREAL_1:6; a * (x +b/(2 * a))^2 <= 0 by A1,XREAL_1:63,131; then a * (x + b/(2 * a))^2 - delta(a,b,c)/(4 * a) < 0 by A3,XXREAL_0:2; hence thesis by A1,Th1; end; theorem Th6: a > 0 & a * x^2 + b * x + c >= 0 implies (2 * a * x + b)^2 - delta(a,b,c) >= 0 proof assume that A1: a > 0 and A2: a * x^2 + b * x + c >= 0; A3: 4 * a <> 0 by A1; 4 * a > 0 & a * (x + b/(2 * a))^2 - delta(a,b,c)/(4 * a) >= 0 by A1,A2,Th1, XREAL_1:129; then (4 * a) * (a * (x + b/(2 * a))^2 - delta(a,b,c)/(4 * a)) >= 0 by XREAL_1:127; then A4: ((2 * a) * x + (2 * a) * (b/(2 * a)))^2 - (4 * a) * (delta(a,b,c)/(4 * a )) >= 0; 2 * a <> 0 by A1; then (2 * a * x + b)^2 - (4 * a) * (delta(a,b,c)/(4 * a)) >= 0 by A4, XCMPLX_1:87; hence thesis by A3,XCMPLX_1:87; end; theorem Th7: a > 0 & a * x^2 + b * x + c > 0 implies (2 * a * x + b)^2 - delta (a,b,c) > 0 proof assume that A1: a > 0 and A2: a * x^2 + b * x + c > 0; A3: 4 * a <> 0 by A1; 4 * a > 0 & a * (x + b/(2 * a))^2 - delta(a,b,c)/(4 * a) > 0 by A1,A2,Th1, XREAL_1:129; then (4 * a) * (a * (x + b/(2 * a))^2 - delta(a,b,c)/(4 * a)) > 0 by XREAL_1:129; then A4: ((2 * a) * x + (2 * a) * (b/(2 * a)))^2 - (4 * a) * (delta(a,b,c)/(4 * a )) > 0; 2 * a <> 0 by A1; then (2 * a * x + b)^2 - (4 * a) * (delta(a,b,c)/(4 * a)) > 0 by A4, XCMPLX_1:87; hence thesis by A3,XCMPLX_1:87; end; theorem Th8: a < 0 & a * x^2 + b * x + c <= 0 implies (2 * a * x + b)^2 - delta(a,b,c) >= 0 proof assume that A1: a < 0 and A2: a * x^2 + b * x + c <= 0; A3: 4 * a <> 0 by A1; 4 * a < 0 & a * (x + b/(2 * a))^2 - delta(a,b,c)/(4 * a) <= 0 by A1,A2,Th1, XREAL_1:132; then (4 * a) * (a * (x + b/(2 * a))^2 - delta(a,b,c)/(4 * a)) >= 0 by XREAL_1:128; then A4: ((2 * a) * x + (2 * a) * (b/(2 * a)))^2 - (4 * a) * (delta(a,b,c)/(4 * a )) >= 0; 2 * a <> 0 by A1; then (2 * a * x + b)^2 - (4 * a) * (delta(a,b,c)/(4 * a)) >= 0 by A4, XCMPLX_1:87; hence thesis by A3,XCMPLX_1:87; end; theorem Th9: a < 0 & a * x^2 + b * x + c < 0 implies (2 * a * x + b)^2 - delta (a,b,c) > 0 proof assume that A1: a < 0 and A2: a * x^2 + b * x + c < 0; A3: 4 * a <> 0 by A1; 4 * a < 0 & a * (x + b/(2 * a))^2 - delta(a,b,c)/(4 * a) < 0 by A1,A2,Th1, XREAL_1:132; then (4 * a) * (a * (x + b/(2 * a))^2 - delta(a,b,c)/(4 * a)) > 0 by XREAL_1:130; then A4: ((2 * a) * x + (2 * a) * (b/(2 * a)))^2 - (4 * a) * (delta(a,b,c)/(4 * a )) > 0; 2 * a <> 0 by A1; then (2 * a * x + b)^2 - (4 * a) * (delta(a,b,c)/(4 * a)) > 0 by A4, XCMPLX_1:87; hence thesis by A3,XCMPLX_1:87; end; theorem ( for x holds a * x^2 + b * x + c >= 0 ) & a > 0 implies delta(a,b,c) <= 0 proof assume that A1: for x holds a * x^2 + b * x + c >= 0 and A2: a > 0; a * (- b/(2 * a))^2 + b * (- b/(2 * a)) + c >= 0 by A1; then (2 * a * (- b/(2 * a)) + b)^2 - delta(a,b,c) >= 0 by A2,Th6; then A3: (- (2 * a) * (b/(2 * a)) + b)^2 - delta(a,b,c) >= 0; 2 * a <> 0 by A2; then (- b + b)^2 - delta(a,b,c) >= 0 by A3,XCMPLX_1:87; then - delta(a,b,c) >= -0; hence thesis by XREAL_1:24; end; theorem ( for x holds a * x^2 + b * x + c <= 0 ) & a < 0 implies delta(a,b,c) <= 0 proof assume that A1: for x holds a * x^2 + b * x + c <= 0 and A2: a < 0; a * (- b/(2 * a))^2 + b * (- b/(2 * a)) + c <= 0 by A1; then (2 * a * (- b/(2 * a)) + b)^2 - delta(a,b,c) >= 0 by A2,Th8; then A3: (- (2 * a) * (b/(2 * a)) + b)^2 - delta(a,b,c) >= 0; 2 * a <> 0 by A2; then (- b + b)^2 - delta(a,b,c) >= 0 by A3,XCMPLX_1:87; then - delta(a,b,c) >= -0; hence thesis by XREAL_1:24; end; theorem ( for x holds a * x^2 + b * x + c > 0 ) & a > 0 implies delta(a,b,c) < 0 proof assume that A1: for x holds a * x^2 + b * x + c > 0 and A2: a > 0; a * (- b/(2 * a))^2 + b * (- b/(2 * a)) + c > 0 by A1; then (2 * a * (- b/(2 * a)) + b)^2 - delta(a,b,c) > 0 by A2,Th7; then A3: (- (2 * a) * (b/(2 * a)) + b)^2 - delta(a,b,c) > 0; 2 * a <> 0 by A2; then (- b + b)^2 - delta(a,b,c) > 0 by A3,XCMPLX_1:87; then - delta(a,b,c) > 0; hence thesis by XREAL_1:58; end; theorem ( for x holds a * x^2 + b * x + c < 0 ) & a < 0 implies delta(a,b,c) < 0 proof assume that A1: for x holds a * x^2 + b * x + c < 0 and A2: a < 0; a * (- b/(2 * a))^2 + b * (- b/(2 * a)) + c < 0 by A1; then (2 * a * (- b/(2 * a)) + b)^2 - delta(a,b,c) > 0 by A2,Th9; then A3: (- (2 * a) * (b/(2 * a)) + b)^2 - delta(a,b,c) > 0; 2 * a <> 0 by A2; then (- b + b)^2 - delta(a,b,c) > 0 by A3,XCMPLX_1:87; then - delta(a,b,c) > -0; hence thesis by XREAL_1:24; end; theorem Th14: for a, b, c, x being complex number holds a <> 0 & a * x^2 + b * x + c = 0 implies (2 * a * x + b)^2 - delta(a,b,c) = 0 proof let a, b, c, x be complex number; assume that A1: a <> 0 and A2: a * x^2 + b * x + c = 0; A3: 4 * a <> 0 by A1; a * (x + b/(2 * a))^2 - delta(a,b,c)/(4 * a) = 0 by A1,A2,Th1; then A4: ((2 * a) * x + (2 * a) * (b/(2 * a)))^2 - (4 * a) * (delta(a,b,c)/(4 * a )) = 0; 2 * a <> 0 by A1; then (2 * a * x + b)^2 - (4 * a) * (delta(a,b,c)/(4 * a)) = 0 by A4, XCMPLX_1:87; hence thesis by A3,XCMPLX_1:87; end; Lm1: for a, b being complex number holds a^2 = b^2 implies a = b or a = - b proof let a, b be complex number; assume a^2 = b^2; then (a + b) * (a - b) = 0; then a + b = 0 or a - b = 0 by XCMPLX_1:6; hence thesis; end; theorem a <> 0 & delta(a,b,c) >= 0 & a * x^2 + b * x + c = 0 implies x = (- b - sqrt delta(a,b,c))/(2 * a) or x = (- b + sqrt delta(a,b,c))/(2 * a) proof assume that A1: a <> 0 and A2: delta(a,b,c) >= 0 and A3: a * x^2 + b * x + c = 0; (2 * a * x + b)^2 - delta(a,b,c) = 0 by A1,A3,Th14; then (2 * a * x + b)^2 = (sqrt delta(a,b,c))^2 by A2,SQUARE_1:def 2; then A4: 2 * a * x + b = sqrt delta(a,b,c) or 2 * a * x + b = - sqrt delta(a, b,c ) by Lm1; 2 * a <> 0 by A1; hence thesis by A4,XCMPLX_1:89; end; theorem Th16: a <> 0 & delta(a,b,c) >= 0 implies a * x^2 + b * x + c = a * (x - (- b - sqrt delta(a,b,c))/(2 * a)) * (x - (- b + sqrt delta(a,b,c))/(2 * a)) proof assume that A1: a <> 0 and A2: delta(a,b,c) >= 0; a * x^2 + b * x + c = a * (x + b/(2 * a))^2 - 1 * (delta(a,b,c)/(4 * a)) by A1,Th1 .= a * (x + b/(2 * a))^2 - (a * (1/a)) * (delta(a,b,c)/(4 * a)) by A1, XCMPLX_1:106 .= a * ((x + b/(2 * a))^2 - (1/a) * (delta(a,b,c)/(4 * a))) .= a * ((x + b/(2 * a))^2 - (delta(a,b,c) * 1)/((4 * a) * a)) by XCMPLX_1:76 .= a * ((x + b/(2 * a))^2 - (sqrt delta(a,b,c))^2/(2 * a)^2) by A2, SQUARE_1:def 2 .= a * ((x + b/(2 * a))^2 - (sqrt delta(a,b,c)/(2 * a))^2) by XCMPLX_1:76 .= a * (x - (- b/(2 * a) + sqrt delta(a,b,c)/(2 * a))) * (x - (- b/(2 * a) - sqrt delta(a,b,c)/(2 * a))) .= a * (x - ((- b)/(2 * a) + sqrt delta(a,b,c)/(2 * a))) * (x - (- b/(2 * a) - sqrt delta(a,b,c)/(2 * a))) by XCMPLX_1:187 .= a * (x - ((- b)/(2 * a) + sqrt delta(a,b,c)/(2 * a))) * (x - ((- b)/( 2 * a) - sqrt delta(a,b,c)/(2 * a))) by XCMPLX_1:187 .= a * (x - (- b + sqrt delta(a,b,c))/(2 * a)) * (x - ((- b)/(2 * a) - sqrt delta(a,b,c)/(2 * a))) by XCMPLX_1:62 .= a * (x - (- b + sqrt delta(a,b,c))/(2 * a)) * (x - (- b - sqrt delta( a,b,c))/(2 * a)) by XCMPLX_1:120; hence thesis; end; theorem Th17: a < 0 & delta(a,b,c) > 0 implies (- b + sqrt delta(a,b,c))/(2 * a) < (- b - sqrt delta(a,b,c))/(2 * a) proof assume that A1: a < 0 and A2: delta(a,b,c) > 0; sqrt delta(a,b,c) > 0 by A2,SQUARE_1:25; then 2 * sqrt delta(a,b,c) > 0 by XREAL_1:129; then sqrt delta(a,b,c) + sqrt delta(a,b,c) > 0; then sqrt delta(a,b,c) > - sqrt delta(a,b,c) by XREAL_1:59; then A3: - b + sqrt delta(a,b,c) > - b + - sqrt delta(a,b,c) by XREAL_1:6; 2 * a < 0 by A1,XREAL_1:132; hence thesis by A3,XREAL_1:75; end; theorem a < 0 & delta(a,b,c) > 0 implies ( a * x^2 + b * x + c > 0 iff (- b + sqrt delta(a,b,c))/(2 * a) < x & x < (- b - sqrt delta(a,b,c))/(2 * a) ) proof assume that A1: a < 0 and A2: delta(a,b,c) > 0; thus a * x^2 + b * x + c > 0 implies (- b + sqrt delta(a,b,c))/(2 * a) < x & x < (- b - sqrt delta(a,b,c))/(2 * a) proof assume a * x^2 + b * x + c > 0; then a * (x - (- b - sqrt delta(a,b,c))/(2 * a)) * (x - (- b + sqrt delta(a ,b,c))/(2 * a)) > 0 by A1,A2,Th16; then a * ((x - (- b - sqrt delta(a,b,c))/(2 * a)) * (x - (- b + sqrt delta( a,b,c))/(2 * a))) > 0; then (x - (- b - sqrt delta(a,b,c))/(2 * a)) * (x - (- b + sqrt delta(a,b,c ))/(2 * a)) < 0/a by A1,XREAL_1:84; then x - (- b - sqrt delta(a,b,c))/(2 * a) > 0 & x - (- b + sqrt delta(a,b, c))/(2 * a) < 0 or x - (- b - sqrt delta(a,b,c))/(2 * a) < 0 & x - (- b + sqrt delta(a,b,c))/(2 * a) > 0 by XREAL_1:133; then x > (- b - sqrt delta(a,b,c))/(2 * a) & x < (- b + sqrt delta(a,b,c))/ (2 * a) & (- b + sqrt delta(a,b,c))/(2 * a) < (- b - sqrt delta(a,b,c))/(2 * a) or x < (- b - sqrt delta(a,b,c))/(2 * a) & x > (- b + sqrt delta(a,b,c))/(2 * a ) by A1,A2,Th17,XREAL_1:47,48; hence thesis by XXREAL_0:2; end; assume (- b + sqrt delta(a,b,c))/(2 * a) < x & x < (- b - sqrt delta(a,b,c ))/(2 * a ); then x - (- b + sqrt delta(a,b,c))/(2 * a) > 0 & x - (- b - sqrt delta(a,b,c ))/(2 * a) < 0 by XREAL_1:49,50; then (x - (- b + sqrt delta(a,b,c))/(2 * a)) * (x - (- b - sqrt delta(a,b,c) )/(2 * a)) < 0 by XREAL_1:132; then a * ((x - (- b + sqrt delta(a,b,c))/(2 * a)) * (x - (- b - sqrt delta(a ,b,c))/(2 * a))) > 0 by A1,XREAL_1:130; then a * (x - (- b - sqrt delta(a,b,c))/(2 * a)) * (x - (- b + sqrt delta(a, b,c))/(2 * a)) > 0; hence thesis by A1,A2,Th16; end; theorem a < 0 & delta(a,b,c) > 0 implies ( a * x^2 + b * x + c < 0 iff x < (- b + sqrt delta(a,b,c))/(2 * a) or x > (- b - sqrt delta(a,b,c))/(2 * a) ) proof assume that A1: a < 0 and A2: delta(a,b,c) > 0; thus a * x^2 + b * x + c < 0 implies x < (- b + sqrt delta(a,b,c))/(2 * a) or x > (- b - sqrt delta(a,b,c))/(2 * a) proof assume a * x^2 + b * x + c < 0; then a * (x - (- b - sqrt delta(a,b,c))/(2 * a)) * (x - (- b + sqrt delta(a ,b,c))/(2 * a)) < 0 by A1,A2,Th16; then a * ((x - (- b - sqrt delta(a,b,c))/(2 * a)) * (x - (- b + sqrt delta( a,b,c))/(2 * a))) < 0; then (x - (- b - sqrt delta(a,b,c))/(2 * a)) * (x - (- b + sqrt delta(a,b,c ))/(2 * a)) > 0/a by A1,XREAL_1:82; then x - (- b - sqrt delta(a,b,c))/(2 * a) > 0 & x - (- b + sqrt delta(a,b, c))/(2 * a) > 0 or x - (- b - sqrt delta(a,b,c))/(2 * a) < 0 & x - (- b + sqrt delta(a,b,c))/(2 * a) < 0 by XREAL_1:134; hence thesis by XREAL_1:47,48; end; assume x < (- b + sqrt delta(a,b,c))/(2 * a) or x > (- b - sqrt delta(a,b, c))/(2 * a); then A3: x - (- b + sqrt delta(a,b,c))/(2 * a) < 0 or x - (- b - sqrt delta(a,b, c))/(2 * a) > 0 by XREAL_1:49,50; (- b + sqrt delta(a,b,c))/(2 * a) < (- b - sqrt delta(a,b,c))/(2 * a) by A1,A2,Th17; then x - (- b + sqrt delta(a,b,c))/(2 * a) > x - (- b - sqrt delta(a,b,c))/( 2 * a) by XREAL_1:10; then x - (- b + sqrt delta(a,b,c))/(2 * a) < 0 & x - (- b - sqrt delta(a,b,c ))/(2 * a) < 0 or x - (- b - sqrt delta(a,b,c))/(2 * a) > 0 & x - (- b + sqrt delta(a,b,c))/(2 * a) > 0 by A3,XXREAL_0:2; then (x - (- b + sqrt delta(a,b,c))/(2 * a)) * (x - (- b - sqrt delta(a,b,c) )/(2 * a)) > 0 by XREAL_1:129,130; then a * ((x - (- b + sqrt delta(a,b,c))/(2 * a)) * (x - (- b - sqrt delta(a ,b,c))/(2 * a))) < 0 by A1,XREAL_1:132; then a * (x - (- b - sqrt delta(a,b,c))/(2 * a)) * (x - (- b + sqrt delta(a, b,c))/(2 * a)) < 0; hence thesis by A1,A2,Th16; end; theorem for a, b, c, x being complex number holds a <> 0 & delta(a,b,c) = 0 & a * x^2 + b * x + c = 0 implies x = - b/(2 * a) proof let a, b, c, x be complex number; assume that A1: a <> 0 and A2: delta(a,b,c) = 0 & a * x^2 + b * x + c = 0; (2 * a * x + b)^2 - 0 = 0 by A1,A2,Th14; then A3: 2 * a * x + b = 0 by XCMPLX_1:6; 2 * a <> 0 by A1; then x = (- b)/(2 * a) by A3,XCMPLX_1:89; hence thesis by XCMPLX_1:187; end; theorem Th21: a > 0 & (2 * a * x + b)^2 - delta(a,b,c) > 0 implies a * x^2 + b * x + c > 0 proof assume that A1: a > 0 and A2: (2 * a * x + b)^2 - delta(a,b,c) > 0; 4 * a <> 0 by A1; then A3: (2 * a * x + b)^2 - (4 * a) * (delta(a,b,c)/(4 * a)) > 0 by A2,XCMPLX_1:87; 2 * a <> 0 by A1; then (2 * a * x + (2 * a) * (b/(2 * a)))^2 - (4 * a) * (delta(a,b,c)/(4 * a)) > 0 by A3,XCMPLX_1:87; then A4: (4 * a) * (a * (x + b/(2 * a))^2 - delta(a,b,c)/(4 * a)) > 0; 4 * a > 0 by A1,XREAL_1:129; then a * (x + b/(2 * a))^2 - delta(a,b,c)/(4 * a) > 0/(4 * a) by A4, XREAL_1:83; hence thesis by A1,Th1; end; theorem a > 0 & delta(a,b,c) = 0 implies ( a * x^2 + b * x + c > 0 iff x <> - b/(2 * a) ) proof assume that A1: a > 0 and A2: delta(a,b,c) = 0; A3: 2 * a <> 0 by A1; thus a * x^2 + b * x + c > 0 implies x <> - b/(2 * a) proof assume a * x^2 + b * x + c > 0; then (2 * a * x + b)^2 - 0 > 0 by A1,A2,Th7; then 2 * a * x <> - b; then x <> (- b)/(2 * a) by A3,XCMPLX_1:87; hence thesis by XCMPLX_1:187; end; assume x <> - b/(2 * a); then x <> (- b)/(2 * a) by XCMPLX_1:187; then 2 * a * x + b <> 0 by A3,XCMPLX_1:89; then (2 * a * x + b)^2 - delta(a,b,c) > 0 by A2,SQUARE_1:12; hence thesis by A1,Th21; end; theorem Th23: a < 0 & (2 * a * x + b)^2 - delta(a,b,c) > 0 implies a * x^2 + b * x + c < 0 proof assume that A1: a < 0 and A2: (2 * a * x + b)^2 - delta(a,b,c) > 0; 4 * a <> 0 by A1; then A3: (2 * a * x + b)^2 - (4 * a) * (delta(a,b,c)/(4 * a)) > 0 by A2,XCMPLX_1:87; 2 * a <> 0 by A1; then (2 * a * x + (2 * a) * (b/(2 * a)))^2 - (4 * a) * (delta(a,b,c)/(4 * a)) > 0 by A3,XCMPLX_1:87; then A4: (4 * a) * (a * (x + b/(2 * a))^2 - delta(a,b,c)/(4 * a)) > 0; 4 * a < 0 by A1,XREAL_1:132; then a * (x + b/(2 * a))^2 - delta(a,b,c)/(4 * a) < 0/(4 * a) by A4, XREAL_1:84; hence thesis by A1,Th1; end; theorem a < 0 & delta(a,b,c) = 0 implies ( a * x^2 + b * x + c < 0 iff x <> - b/(2 * a) ) proof assume that A1: a < 0 and A2: delta(a,b,c) = 0; A3: 2 * a <> 0 by A1; thus a * x^2 + b * x + c < 0 implies x <> - b/(2 * a) proof assume a * x^2 + b * x + c < 0; then (2 * a * x + b)^2 - 0 > 0 by A1,A2,Th9; then 2 * a * x <> - b; then x <> (- b)/(2 * a) by A3,XCMPLX_1:87; hence thesis by XCMPLX_1:187; end; assume x <> - b/(2 * a); then x <> (- b)/(2 * a) by XCMPLX_1:187; then 2 * a * x + b <> 0 by A3,XCMPLX_1:89; then (2 * a * x + b)^2 - delta(a,b,c) > 0 by A2,SQUARE_1:12; hence thesis by A1,Th23; end; theorem Th25: a > 0 & delta(a,b,c) > 0 implies (- b + sqrt delta(a,b,c))/(2 * a) > (- b - sqrt delta(a,b,c))/(2 * a) proof assume that A1: a > 0 and A2: delta(a,b,c) > 0; sqrt delta(a,b,c) > 0 by A2,SQUARE_1:25; then 2 * sqrt delta(a,b,c) > 0 by XREAL_1:129; then sqrt delta(a,b,c) + sqrt delta(a,b,c) > 0; then sqrt delta(a,b,c) > - sqrt delta(a,b,c) by XREAL_1:59; then A3: - b + sqrt delta(a,b,c) > - b + - sqrt delta(a,b,c) by XREAL_1:6; 2 * a > 0 by A1,XREAL_1:129; hence thesis by A3,XREAL_1:74; end; theorem a > 0 & delta(a,b,c) > 0 implies ( a * x^2 + b * x + c < 0 iff (- b - sqrt delta(a,b,c))/(2 * a) < x & x < (- b + sqrt delta(a,b,c))/(2 * a) ) proof assume that A1: a > 0 and A2: delta(a,b,c) > 0; thus a * x^2 + b * x + c < 0 implies (- b - sqrt delta(a,b,c))/(2 * a) < x & x < (- b + sqrt delta(a,b,c))/(2 * a) proof assume a * x^2 + b * x + c < 0; then a * (x - (- b - sqrt delta(a,b,c))/(2 * a)) * (x - (- b + sqrt delta(a ,b,c))/(2 * a)) < 0 by A1,A2,Th16; then a * ((x - (- b - sqrt delta(a,b,c))/(2 * a)) * (x - (- b + sqrt delta( a,b,c))/(2 * a))) < 0; then (x - (- b - sqrt delta(a,b,c))/(2 * a)) * (x - (- b + sqrt delta(a,b,c ))/(2 * a)) < 0/a by A1,XREAL_1:81; then x - (- b - sqrt delta(a,b,c))/(2 * a) > 0 & x - (- b + sqrt delta(a,b, c))/(2 * a) < 0 or x - (- b - sqrt delta(a,b,c))/(2 * a) < 0 & x - (- b + sqrt delta(a,b,c))/(2 * a) > 0 by XREAL_1:133; then x > (- b - sqrt delta(a,b,c))/(2 * a) & x < (- b + sqrt delta(a,b,c))/ (2 * a) or (- b + sqrt delta(a,b,c))/(2 * a) > (- b - sqrt delta(a,b,c))/(2 * a ) & x < (- b - sqrt delta(a,b,c))/(2 * a) & x > (- b + sqrt delta(a,b,c))/(2 * a) by A1,A2,Th25,XREAL_1:47,48; hence thesis by XXREAL_0:2; end; assume (- b - sqrt delta(a,b,c))/(2 * a) < x & x < (- b + sqrt delta(a,b,c ))/(2 * a ); then x - (- b - sqrt delta(a,b,c))/(2 * a) > 0 & x - (- b + sqrt delta(a,b,c ))/(2 * a) < 0 by XREAL_1:49,50; then (x - (- b - sqrt delta(a,b,c))/(2 * a)) * (x - (- b + sqrt delta(a,b,c) )/(2 * a)) < 0 by XREAL_1:132; then a * ((x - (- b - sqrt delta(a,b,c))/(2 * a)) * (x - (- b + sqrt delta(a ,b,c))/(2 * a))) < 0 by A1,XREAL_1:132; then a * (x - (- b - sqrt delta(a,b,c))/(2 * a)) * (x - (- b + sqrt delta(a, b,c))/(2 * a)) < 0; hence thesis by A1,A2,Th16; end; theorem a > 0 & delta(a,b,c) > 0 implies ( a * x^2 + b * x + c > 0 iff x < (- b - sqrt delta(a,b,c))/(2 * a) or x > (- b + sqrt delta(a,b,c))/(2 * a) ) proof assume that A1: a > 0 and A2: delta(a,b,c) > 0; thus a * x^2 + b * x + c > 0 implies x < (- b - sqrt delta(a,b,c))/(2 * a) or x > (- b + sqrt delta(a,b,c))/(2 * a) proof assume a * x^2 + b * x + c > 0; then a * (x - (- b - sqrt delta(a,b,c))/(2 * a)) * (x - (- b + sqrt delta(a ,b,c))/(2 * a)) > 0 by A1,A2,Th16; then a * ((x - (- b - sqrt delta(a,b,c))/(2 * a)) * (x - (- b + sqrt delta( a,b,c))/(2 * a))) > 0; then (x - (- b - sqrt delta(a,b,c))/(2 * a)) * (x - (- b + sqrt delta(a,b,c ))/(2 * a)) > 0/a by A1,XREAL_1:83; then x - (- b - sqrt delta(a,b,c))/(2 * a) > 0 & x - (- b + sqrt delta(a,b, c))/(2 * a) > 0 or x - (- b - sqrt delta(a,b,c))/(2 * a) < 0 & x - (- b + sqrt delta(a,b,c))/(2 * a) < 0 by XREAL_1:134; hence thesis by XREAL_1:47,48; end; assume x < (- b - sqrt delta(a,b,c))/(2 * a) or x > (- b + sqrt delta(a,b, c))/(2 * a); then A3: x - (- b - sqrt delta(a,b,c))/(2 * a) < 0 or x - (- b + sqrt delta(a,b, c))/(2 * a) > 0 by XREAL_1:49,50; (- b + sqrt delta(a,b,c))/(2 * a) > (- b - sqrt delta(a,b,c))/(2 * a) by A1,A2,Th25; then x - (- b + sqrt delta(a,b,c))/(2 * a) < x - (- b - sqrt delta(a,b,c))/( 2 * a) by XREAL_1:10; then x - (- b - sqrt delta(a,b,c))/(2 * a) < 0 & x - (- b + sqrt delta(a,b,c ))/(2 * a) < 0 or x - (- b - sqrt delta(a,b,c))/(2 * a) > 0 & x - (- b + sqrt delta(a,b,c))/(2 * a) > 0 by A3,XXREAL_0:2; then (x - (- b + sqrt delta(a,b,c))/(2 * a)) * (x - (- b - sqrt delta(a,b,c) )/(2 * a)) > 0 by XREAL_1:129,130; then a * ((x - (- b + sqrt delta(a,b,c))/(2 * a)) * (x - (- b - sqrt delta(a ,b,c))/(2 * a))) > 0 by A1,XREAL_1:129; then a * (x - (- b - sqrt delta(a,b,c))/(2 * a)) * (x - (- b + sqrt delta(a, b,c))/(2 * a)) > 0; hence thesis by A1,A2,Th16; end; begin theorem Th1: for X,x being set holds for F being Function of [:X,X:],X holds x in [:X,X:] implies F.x in X proof let X,x be set; let F be Function of [:X,X:],X; X={} implies [:X,X:]={}; then A1: dom F = [:X,X:] by FUNCT_2:def 1; assume x in [:X,X:]; then rng F c= X & F.x in rng F by A1,FUNCT_1:def 3,RELAT_1:def 19; hence thesis; end; definition let X be set; let F be BinOp of X; mode Preserv of F -> Subset of X means :Def1: for x being set holds x in [: it,it:] implies F.x in it; existence proof X c= X; then reconsider Z = X as Subset of X; take Z; thus thesis by Th1; end; end; definition let R be Relation; let A be set; func R||A equals R | [:A,A:]; coherence; end; registration let R be Relation; let A be set; cluster R||A -> Relation-like; coherence; end; registration let R be Function; let A be set; cluster R||A -> Function-like; coherence; end; theorem Th2: for X being set, F being BinOp of X, A being Preserv of F holds F ||A is BinOp of A proof let X be set, F be BinOp of X, A be Preserv of F; X={} implies [:X,X:]={}; then dom F = [:X,X:] by FUNCT_2:def 1; then A1: dom (F||A) = [:A,A:] by RELAT_1:62,ZFMISC_1:96; for x being set holds x in [:A,A:] implies F||A.x in A proof let x be set; assume A2: x in [:A,A:]; then F||A.x=F.x by A1,FUNCT_1:47; hence thesis by A2,Def1; end; hence thesis by A1,FUNCT_2:3; end; definition let X be set; let F be BinOp of X; let A be Preserv of F; redefine func F||A -> BinOp of A; coherence by Th2; end; theorem Th3: for X being set holds X is non trivial iff for x being set holds X\{x} is non empty set proof let X be set; hereby assume A1: X is non trivial; let x be set; X <> {x} by A1; then consider y being set such that A2: y in X and A3: x <> y by A1,ZFMISC_1:35; not y in {x} by A3,TARSKI:def 1; hence X\{x} is non empty set by A2,XBOOLE_0:def 5; end; assume A4: for x being set holds X\{x} is non empty set; X\{{}} c= X; then X is non empty by A4; then consider x being set such that A5: x in X by XBOOLE_0:def 1; X\{x} is non empty by A4; then consider y being set such that A6: y in X\{x} by XBOOLE_0:def 1; take x,y; thus x in X by A5; thus y in X by A6; x in {x} by TARSKI:def 1; then not x in X\{x} by XBOOLE_0:def 5; hence x <> y by A6; end; theorem ex A being non empty set st for z being Element of A holds A \ {z} is non empty set proof set B = {0,1}; take B; for z being Element of B holds B\{z} is non empty set proof let z be Element of B; 0 in B & not 0 in {1} by TARSKI:def 1,def 2; then A1: B\{1} is non empty set by XBOOLE_0:def 5; 1 in B & not 1 in {0} by TARSKI:def 1,def 2; then B\{0} is non empty set by XBOOLE_0:def 5; hence thesis by A1,TARSKI:def 2; end; hence thesis; end; definition let X be non trivial set; let F be BinOp of X; let x be Element of X; pred F is_Bin_Op_Preserv x means X\{x} is Preserv of F & F||X\{x} is BinOp of X\{x}; correctness; end; theorem Th5: for X being set holds for A being Subset of X holds ex F being BinOp of X st for x being set holds x in [:A,A:] implies F.x in A proof let X be set; let A be Subset of X; set S = pr1(X,X); take S; for x being set holds x in [:A,A:] implies S.x in A proof let x be set; assume x in [:A,A:]; then consider p,q being set such that A1: p in A & q in A and A2: x = [p,q] by ZFMISC_1:def 2; S.x = S.(p,q) by A2; hence thesis by A1,FUNCT_3:def 4; end; hence thesis; end; definition let X be set; let A be Subset of X; mode Presv of X,A -> BinOp of X means :Def4: for x being set holds x in [:A, A:] implies it.x in A; existence by Th5; end; theorem Th6: for X being set, A being Subset of X, F being Presv of X,A holds F||A is BinOp of A proof let X be set; let A be Subset of X; let F be Presv of X,A; X={} implies [:X,X:]={}; then dom F = [:X,X:] by FUNCT_2:def 1; then A1: dom (F||A) = [:A,A:] by RELAT_1:62,ZFMISC_1:96; for x being set holds x in [:A,A:] implies F||A.x in A proof let x be set; assume A2: x in [:A,A:]; then F||A.x=F.x by A1,FUNCT_1:47; hence thesis by A2,Def4; end; hence thesis by A1,FUNCT_2:3; end; definition let X be set; let A be Subset of X; let F be Presv of X,A; func F|||A -> BinOp of A equals F||A; coherence by Th6; end; definition let A be set; let x be Element of A; mode DnT of x,A -> BinOp of A means :Def6: for y being set holds y in [:A\{x },A\{x}:] implies it.y in A\{x}; existence by Th5; end; theorem Th7: for A being non trivial set holds for x being Element of A holds for F being DnT of x,A holds F||(A\{x}) is BinOp of A\{x} proof let A be non trivial set; let x be Element of A; let F be DnT of x,A; dom F = [:A,A:] by FUNCT_2:def 1; then A1: dom(F||(A\{x})) = [:A\{x},A\{x}:] by RELAT_1:62,ZFMISC_1:96; for y being set holds y in [:A\{x},A\{x}:] implies F||(A\{x}).y in A\{x} proof let y be set; assume A2: y in [:A\{x},A\{x}:]; then F||(A\{x}).y=F.y by A1,FUNCT_1:47; hence thesis by A2,Def6; end; hence thesis by A1,FUNCT_2:3; end; definition let A be non trivial set; let x be Element of A; let F be DnT of x,A; func F!(A,x) -> BinOp of A\{x} equals F||(A\{x}); coherence by Th7; end; theorem Th8: for F being non trivial set holds for A being Singleton of F holds F\A is non empty set proof let F be non trivial set; let A be Singleton of F; ex x being Element of F st A = {x} by CARD_1:65; hence thesis by Th3; end; registration let F be non trivial set; let A be Singleton of F; cluster F\A -> non empty; coherence by Th8; end; begin reserve m for Cardinal, A,B,C for Ordinal, x,y,z,X,Y,Z,W for set, f for Function; Lm1: Tarski-Class X is Tarski proof Tarski-Class X is_Tarski-Class_of X by CLASSES1:def 4; hence thesis by CLASSES1:def 3; end; registration cluster Tarski -> subset-closed for set; coherence by CLASSES1:def 2; end; registration let X be set; cluster Tarski-Class X -> Tarski; coherence by Lm1; end; theorem Th1: W is subset-closed & X in W implies not X,W are_equipotent & card X in card W proof assume A1: W is subset-closed; assume A2: X in W; bool X c= W proof let x; assume x in bool X; hence thesis by A1,A2,CLASSES1:def 1; end; then A3: card bool X c= card W by CARD_1:11; A4: card X in card bool X by CARD_1:14; then card X in card W by A3; then card X <> card W; hence thesis by A4,A3,CARD_1:5; end; theorem Th2: W is Tarski & x in W & y in W implies {x} in W & {x,y} in W proof defpred C[set] means $1 = {}; assume that A1: W is Tarski and A2: x in W and A3: y in W; A4: {x} c= bool x by ZFMISC_1:68; bool x in W by A1,A2,CLASSES1:def 2; hence {x} in W by A1,A4,CLASSES1:def 1; then A5: bool {x} in W by A1,CLASSES1:def 2; deffunc g(set) = x; deffunc f(set) = y; consider f such that A6: dom f = {{},{x}} & for z st z in {{},{x}} holds (C[z] implies f.z = f(z)) & (not C[z] implies f.z = g(z)) from PARTFUN1:sch 1; {x,y} c= rng f proof let z; A7: {} in {{},{x}} by TARSKI:def 2; A8: {x} in {{},{x}} by TARSKI:def 2; assume z in {x,y}; then z = x or z = y by TARSKI:def 2; then f.{} = z or f.{x} = z by A6,A7,A8; hence thesis by A6,A7,A8,FUNCT_1:def 3; end; then A9: card {x,y} c= card {{},{x}} by A6,CARD_1:12; A10: {x,y} c= W proof let z; assume z in {x,y}; hence thesis by A2,A3,TARSKI:def 2; end; bool {x} = {{},{x}} by ZFMISC_1:24; then card {{},{x}} in card W by A1,A5,Th1; then card {x,y} in card W by A9,ORDINAL1:12; hence thesis by A1,A10,CLASSES1:1; end; theorem Th3: W is Tarski & x in W & y in W implies [x,y] in W proof assume A1: W is Tarski; assume that A2: x in W and A3: y in W; A4: {x} in W by A1,A2,Th2; {x,y} in W by A1,A2,A3,Th2; hence thesis by A1,A4,Th2; end; theorem Th4: W is Tarski & X in W implies Tarski-Class X c= W proof assume that A1: W is Tarski and A2: X in W; reconsider D = W as non empty set by A2; D is_Tarski-Class_of X by A1,A2,CLASSES1:def 3; hence thesis by CLASSES1:def 4; end; theorem Th5: W is Tarski & A in W implies succ A in W & A c= W proof assume that A1: for X,Y st X in W & Y c= X holds Y in W and A2: for X st X in W holds bool X in W and for X st X c= W holds X,W are_equipotent or X in W and A3: A in W; bool A in W by A2,A3; hence succ A in W by A1,ORDINAL2:3; let x; assume A4: x in A; then reconsider B = x as Ordinal; B c= A by A4,ORDINAL1:def 2; hence thesis by A1,A3; end; theorem A in Tarski-Class W implies succ A in Tarski-Class W & A c= Tarski-Class W by Th5; theorem Th7: W is subset-closed & X is epsilon-transitive & X in W implies X c= W proof assume that A1: for X,Y st X in W & Y c= X holds Y in W and A2: Y in X implies Y c= X and A3: X in W; let x; thus thesis by A1,A2,A3; end; theorem X is epsilon-transitive & X in Tarski-Class W implies X c= Tarski-Class W by Th7; theorem Th9: W is Tarski implies On W = card W proof assume A1: W is Tarski; now let X; assume A2: X in On W; hence X is Ordinal by ORDINAL1:def 9; reconsider A = X as Ordinal by A2,ORDINAL1:def 9; A3: X in W by A2,ORDINAL1:def 9; thus X c= On W proof let x; assume A4: x in X; then x in A; then reconsider B = x as Ordinal; B c= A by A4,ORDINAL1:def 2; then B in W by A1,A3,CLASSES1:def 1; hence thesis by ORDINAL1:def 9; end; end; then reconsider ON = On W as Ordinal by ORDINAL1:19; A5: now assume ON in W; then ON in ON by ORDINAL1:def 9; hence contradiction; end; ON c= W by ORDINAL2:7; then A6: ON,W are_equipotent or ON in W by A1,CLASSES1:def 2; now let A; assume that A7: A,ON are_equipotent and A8: not ON c= A; A in ON by A8,ORDINAL1:16; then A in W by ORDINAL1:def 9; hence contradiction by A1,A6,A5,A7,Th1,WELLORD2:15; end; then reconsider ON as Cardinal by CARD_1:def 1; ON = card ON by CARD_1:def 2; hence thesis by A6,A5,CARD_1:5; end; theorem On Tarski-Class W = card Tarski-Class W by Th9; theorem Th11: W is Tarski & X in W implies card X in W proof assume that A1: W is Tarski and A2: X in W; A3: card W = On W by A1,Th9; card X in card W by A1,A2,Th1; hence thesis by A3,ORDINAL1:def 9; end; theorem X in Tarski-Class W implies card X in Tarski-Class W by Th11; theorem Th13: W is Tarski & x in card W implies x in W proof assume A1: W is Tarski; assume x in card W; then x in On W by A1,Th9; hence thesis by ORDINAL1:def 9; end; theorem x in card Tarski-Class W implies x in Tarski-Class W by Th13; theorem W is Tarski & m in card W implies m in W proof assume A1: W is Tarski; assume m in card W; then m in On W by A1,Th9; hence thesis by ORDINAL1:def 9; end; theorem m in card Tarski-Class W implies m in Tarski-Class W proof assume m in card Tarski-Class W; then m in On Tarski-Class W by Th9; hence thesis by ORDINAL1:def 9; end; theorem W is Tarski & m in W implies m c= W by Th5; theorem m in Tarski-Class W implies m c= Tarski-Class W by Th5; theorem Th19: W is Tarski implies card W is limit_ordinal proof assume A1: W is Tarski; now let A; assume A in card W; then A in W by A1,Th13; then succ A in W by A1,Th5; then succ A in On W by ORDINAL1:def 9; hence succ A in card W by A1,Th9; end; hence thesis by ORDINAL1:28; end; theorem W is Tarski & W <> {} implies card W <> 0 & card W <> {} & card W is limit_ordinal by Th19; theorem Th21: card Tarski-Class W <> 0 & card Tarski-Class W <> {} & card Tarski-Class W is limit_ordinal proof thus card Tarski-Class W <> 0; thus card Tarski-Class W <> {}; now let A; assume A in card Tarski-Class W; then A in Tarski-Class W by Th13; then succ A in Tarski-Class W by Th5; then succ A in On Tarski-Class W by ORDINAL1:def 9; hence succ A in card Tarski-Class W by Th9; end; hence thesis by ORDINAL1:28; end; reserve f,g for Function, L for T-Sequence, F for Cardinal-Function; theorem Th22: W is Tarski & (X in W & W is epsilon-transitive or X in W & X c= W or card X in card W & X c= W) implies Funcs(X,W) c= W proof assume A1: W is Tarski; assume that A2: X in W & W is epsilon-transitive or X in W & X c= W or card X in card W & X c= W; A3: card X in card W by A1,A2,Th1; let x; assume A4: x in Funcs(X,W); then consider f such that A5: x = f and A6: dom f = X and A7: rng f c= W by FUNCT_2:def 2; A8: X c= W by A2,ORDINAL1:def 2; A9: f c= W proof let y; assume A10: y in f; then consider y1,y2 being set such that A11: [y1,y2] = y by RELAT_1:def 1; A12: y1 in dom f by A10,A11,FUNCT_1:1; y2 = f.y1 by A10,A11,FUNCT_1:1; then y2 in rng f by A12,FUNCT_1:def 3; hence thesis by A1,A8,A6,A7,A11,A12,Th3; end; card f = card X by A4,A5,CARD_2:3; hence thesis by A1,A3,A5,A9,CLASSES1:1; end; theorem X in Tarski-Class W & W is epsilon-transitive or X in Tarski-Class W & X c= Tarski-Class W or card X in card Tarski-Class W & X c= Tarski-Class W implies Funcs(X,Tarski-Class W) c= Tarski-Class W proof assume that A1: X in Tarski-Class W & W is epsilon-transitive or X in Tarski-Class W & X c= Tarski-Class W or card X in card Tarski-Class W & X c= Tarski-Class W; A2: card X in card Tarski-Class W by A1,CLASSES1:24; let x; assume A3: x in Funcs(X,Tarski-Class W); then consider f such that A4: x = f and A5: dom f = X and A6: rng f c= Tarski-Class W by FUNCT_2:def 2; W is epsilon-transitive implies Tarski-Class W is epsilon-transitive by CLASSES1:23; then A7: X c= Tarski-Class W by A1,ORDINAL1:def 2; A8: f c= Tarski-Class W proof let y; assume A9: y in f; then consider y1,y2 being set such that A10: [y1,y2] = y by RELAT_1:def 1; A11: y1 in dom f by A9,A10,FUNCT_1:1; y2 = f.y1 by A9,A10,FUNCT_1:1; then y2 in rng f by A11,FUNCT_1:def 3; hence thesis by A7,A5,A6,A10,A11,CLASSES1:27; end; card f = card X by A3,A4,CARD_2:3; hence thesis by A2,A4,A8,CLASSES1:6; end; theorem Th24: dom L is limit_ordinal & (for A st A in dom L holds L.A = Rank A ) implies Rank dom L = Union L proof assume that A1: dom L is limit_ordinal and A2: for A st A in dom L holds L.A = Rank A; A3: union rng L = Union L by CARD_3:def 4; now assume A4: dom L <> {}; thus Rank dom L c= Union L proof let x; assume x in Rank dom L; then consider A such that A5: A in dom L and A6: x in Rank A by A1,A4,CLASSES1:31; L.A = Rank A by A2,A5; then Rank A in rng L by A5,FUNCT_1:def 3; hence thesis by A3,A6,TARSKI:def 4; end; thus Union L c= Rank dom L proof let x; assume x in Union L; then consider X such that A7: x in X and A8: X in rng L by A3,TARSKI:def 4; consider y such that A9: y in dom L and A10: X = L.y by A8,FUNCT_1:def 3; reconsider y as Ordinal by A9; X = Rank y by A2,A9,A10; hence thesis by A1,A7,A9,CLASSES1:31; end; end; hence thesis by A3,CLASSES1:29,RELAT_1:42,XBOOLE_0:def 10,ZFMISC_1:2; end; defpred PQ[Ordinal] means W is Tarski & $1 in On W implies card Rank $1 in card W & Rank $1 in W; Lm2: PQ[{}] by Th9,CARD_1:27,CLASSES1:29,ORDINAL1:def 9; Lm3: PQ[A] implies PQ[succ A] proof assume A1: PQ[A]; A2: A in succ A by ORDINAL1:6; let W; assume that A3: W is Tarski and A4: succ A in On W; card W = On W by A3,Th9; then A in On W by A4,A2,ORDINAL1:10; then Rank A in W by A1,A3; then A5: bool Rank A in W by A3,CLASSES1:def 2; Rank succ A = bool Rank A by CLASSES1:30; hence thesis by A3,A5,Th1; end; Lm4: A <> {} & A is limit_ordinal & (for B st B in A holds PQ[B]) implies PQ[A ] proof deffunc f(Ordinal) = Rank $1; assume that A1: A <> {} and A2: A is limit_ordinal and A3: for B st B in A holds PQ[B]; let W; assume that A4: W is Tarski and A5: A in On W; consider L such that A6: dom L = A & for B st B in A holds L.B = f(B) from ORDINAL2:sch 2; deffunc g(set) = card bool (L.$1); consider F such that A7: dom F = A & for x st x in A holds F.x = g(x) from CARD_3:sch 1; A8: product F c= Funcs(A,W) proof let x; assume x in product F; then consider f such that A9: x = f and A10: dom f = dom F and A11: for x st x in dom F holds f.x in F.x by CARD_3:def 5; rng f c= W proof A12: A in W by A5,ORDINAL1:def 9; let z; assume z in rng f; then consider y such that A13: y in dom f and A14: z = f.y by FUNCT_1:def 3; reconsider y as Ordinal by A7,A10,A13; A15: f.y in F.y by A10,A11,A13; y c= A by A7,A10,A13,ORDINAL1:def 2; then y in W by A4,A12,CLASSES1:def 1; then A16: y in On W by ORDINAL1:def 9; L.y = Rank y by A6,A7,A10,A13; then L.y in W by A3,A4,A7,A10,A13,A16; then bool (L.y) in W by A4,CLASSES1:def 2; then A17: card bool (L.y) in W by A4,Th11; F.y = card bool (L.y) by A7,A10,A13; then F.y c= W by A4,A17,Th5; hence thesis by A14,A15; end; hence thesis by A7,A9,A10,FUNCT_2:def 2; end; A18: Product F = card product F by CARD_3:def 8; A19: A in W by A5,ORDINAL1:def 9; then A c= W by A4,Th5; then Funcs(A,W) c= W by A4,A19,Th22; then product F c= W by A8,XBOOLE_1:1; then A20: Product F c= card W by A18,CARD_1:11; A21: for x st x in dom Card L holds (Card L).x in F.x proof let x; A22: card (L.x) in card bool (L.x) by CARD_1:14; assume x in dom Card L; then A23: x in dom L by CARD_3:def 2; then F.x = card bool (L.x) by A6,A7; hence thesis by A23,A22,CARD_3:def 2; end; dom Card L = dom L by CARD_3:def 2; then A24: Sum Card L in Product F by A6,A7,A21,CARD_3:41; A25: Rank A c= W proof let x; assume x in Rank A; then consider B such that A26: B in A and A27: x in Rank B by A1,A2,CLASSES1:31; B c= A by A26,ORDINAL1:def 2; then B in W by A4,A19,CLASSES1:def 1; then B in On W by ORDINAL1:def 9; then Rank B c= W by A3,A4,A26,Th7; hence thesis by A27; end; A28: Rank A = Union L by A2,A6,Th24; hence card Rank A in card W by A24,A20,CARD_3:39,ORDINAL1:12; card Rank A in Product F by A28,A24,CARD_3:39,ORDINAL1:12; hence thesis by A4,A20,A25,CLASSES1:1; end; theorem Th25: W is Tarski & A in On W implies card Rank A in card W & Rank A in W proof PQ[B] from ORDINAL2:sch 1(Lm2,Lm3,Lm4); hence thesis; end; theorem A in On Tarski-Class W implies card Rank A in card Tarski-Class W & Rank A in Tarski-Class W by Th25; theorem Th27: W is Tarski implies Rank card W c= W proof assume A1: W is Tarski; now assume A2: W <> {}; thus thesis proof A3: card W is limit_ordinal by A1,Th19; let x; assume x in Rank card W; then consider A such that A4: A in card W and A5: x in Rank A by A2,A3,CLASSES1:31; A in On W by A1,A4,Th9; then Rank A c= W by A1,Th7,Th25; hence thesis by A5; end; end; hence thesis by CLASSES1:29; end; theorem Th28: Rank card Tarski-Class W c= Tarski-Class W proof A1: card Tarski-Class W is limit_ordinal by Th21; let x; assume x in Rank card Tarski-Class W; then consider A such that A2: A in card Tarski-Class W and A3: x in Rank A by A1,CLASSES1:31; A in On Tarski-Class W by A2,Th9; then Rank A c= Tarski-Class W by Th7,Th25; hence thesis by A3; end; deffunc f(set) = the_rank_of $1; deffunc g(set) = card bool $1; theorem Th29: W is Tarski & W is epsilon-transitive & X in W implies the_rank_of X in W proof assume that A1: W is Tarski and A2: W is epsilon-transitive; A3: On W = card W by A1,Th9; defpred P[Ordinal] means ex X st $1 = the_rank_of X & X in W & not $1 in W; assume that A4: X in W and A5: not the_rank_of X in W; A6: ex A st P[A] by A4,A5; consider A such that A7: P[A] and A8: for B st P[B] holds A c= B from ORDINAL1:sch 1(A6); consider X such that A9: A = the_rank_of X and A10: X in W and A11: not A in W by A7; defpred P[set] means ex Y st Y in X & $1 = the_rank_of Y; consider LL being set such that A12: x in LL iff x in On W & P[x] from XBOOLE_0:sch 1; consider ff being Cardinal-Function such that A13: dom ff = LL & for x st x in LL holds ff.x = g(x) from CARD_3:sch 1; A14: LL c= On W proof let x; thus thesis by A12; end; A15: product ff c= Funcs(LL,W) proof let x; assume x in product ff; then consider g such that A16: x = g and A17: dom g = dom ff and A18: for x st x in dom ff holds g.x in ff.x by CARD_3:def 5; rng g c= W proof let y; assume y in rng g; then consider x such that A19: x in dom g and A20: y = g.x by FUNCT_1:def 3; A21: ff.x = card bool x by A13,A17,A19; x in W by A14,A13,A17,A19,ORDINAL1:def 9; then bool x in W by A1,CLASSES1:def 2; then card bool x in W by A1,Th11; then A22: card bool x c= W by A1,Th5; y in ff.x by A17,A18,A19,A20; hence thesis by A21,A22; end; hence thesis by A13,A16,A17,FUNCT_2:def 2; end; now let Z; assume Z in union LL; then consider Y such that A23: Z in Y and A24: Y in LL by TARSKI:def 4; Y in On W by A12,A24; then reconsider Y as Ordinal by ORDINAL1:def 9; A25: Y c= union LL by A24,ZFMISC_1:74; A26: Z in Y by A23; hence Z is Ordinal; reconsider A = Z as Ordinal by A26; A c= Y by A23,ORDINAL1:def 2; hence Z c= union LL by A25,XBOOLE_1:1; end; then reconsider ULL = union LL as Ordinal by ORDINAL1:19; A27: dom Card id LL = dom id LL by CARD_3:def 2; A28: dom id LL = LL by RELAT_1:45; now let x; assume A29: x in dom Card id LL; then A30: (Card id LL).x = card ((id LL).x) by A27,CARD_3:def 2; A31: (id LL).x = x by A28,A27,A29,FUNCT_1:18; ff.x = card bool x by A13,A28,A27,A29; hence (Card id LL).x in ff.x by A31,A30,CARD_1:14; end; then A32: Sum Card id LL in Product ff by A13,A28,A27,CARD_3:41; Union id LL = union rng id LL by CARD_3:def 4 .= ULL by RELAT_1:45; then A33: card ULL in Product ff by A32,CARD_3:39,ORDINAL1:12; consider f such that A34: dom f = X & for x st x in X holds f.x = f(x) from FUNCT_1:sch 3; LL c= rng f proof let x; assume x in LL; then consider Y such that A35: Y in X and A36: x = the_rank_of Y by A12; f.Y = x by A34,A35,A36; hence thesis by A34,A35,FUNCT_1:def 3; end; then A37: card LL c= card X by A34,CARD_1:12; card X in card W by A1,A10,Th1; then card LL <> card W by A37,ORDINAL1:12; then A38: not LL,W are_equipotent by CARD_1:5; A39: card product ff = Product ff by CARD_3:def 8; A40: X c= W by A2,A10,ORDINAL1:def 2; X c= Rank card W proof let x; assume A41: x in X; then not A c= the_rank_of x by A9,CLASSES1:68,ORDINAL1:5; then the_rank_of x in W by A8,A40,A41; then the_rank_of x in card W by A3,ORDINAL1:def 9; then A42: Rank the_rank_of x in Rank card W by CLASSES1:36; x c= Rank the_rank_of x by CLASSES1:def 8; hence thesis by A42,CLASSES1:41; end; then A43: A c= On W by A9,A3,CLASSES1:65; On W c= ULL proof let x; assume A44: x in On W; then reconsider B = x as Ordinal by ORDINAL1:def 9; now assume A45: for Y st Y in X holds the_rank_of Y c= B; X c= Rank succ B proof let y; assume y in X; then the_rank_of y c= B by A45; then the_rank_of y in succ B by ORDINAL1:22; hence thesis by CLASSES1:66; end; then A46: A c= succ B by A9,CLASSES1:65; B in W by A44,ORDINAL1:def 9; then succ B in W by A1,Th5; hence contradiction by A1,A11,A46,CLASSES1:def 1; end; then consider Y such that A47: Y in X and A48: not the_rank_of Y c= B; the_rank_of Y in A by A9,A47,CLASSES1:68; then the_rank_of Y in LL by A43,A12,A47; then A49: the_rank_of Y c= ULL by ZFMISC_1:74; B in the_rank_of Y by A48,ORDINAL1:16; hence thesis by A49; end; then A50: card On W c= card ULL by CARD_1:11; On W c= W by ORDINAL2:7; then LL c= W by A14,XBOOLE_1:1; then LL in W by A1,A38,CLASSES1:def 2; then Funcs(LL,W) c= W by A1,A2,Th22; then product ff c= W by A15,XBOOLE_1:1; then A51: Product ff c= card W by A39,CARD_1:11; On W = card W by A1,Th9; hence contradiction by A33,A51,A50,CARD_1:4; end; theorem Th30: W is Tarski & W is epsilon-transitive implies W c= Rank card W proof assume that A1: W is Tarski and A2: W is epsilon-transitive; let x; assume x in W; then the_rank_of x in W by A1,A2,Th29; then A3: the_rank_of x in On W by ORDINAL1:def 9; On W = card W by A1,Th9; then A4: Rank the_rank_of x in Rank card W by A3,CLASSES1:36; x c= Rank the_rank_of x by CLASSES1:def 8; hence thesis by A4,CLASSES1:41; end; theorem Th31: W is Tarski & W is epsilon-transitive implies Rank card W = W proof assume that A1: W is Tarski and A2: W is epsilon-transitive; thus Rank card W c= W & W c= Rank card W by A1,A2,Th27,Th30; end; theorem W is Tarski & A in On W implies card Rank A c= card W proof assume that A1: W is Tarski and A2: A in On W; card Rank A in card W by A1,A2,Th25; hence thesis by CARD_1:3; end; theorem A in On Tarski-Class W implies card Rank A c= card Tarski-Class W proof assume A in On Tarski-Class W; then card Rank A in card Tarski-Class W by Th25; hence thesis by CARD_1:3; end; theorem Th34: W is Tarski implies card W = card Rank card W proof assume W is Tarski; then A1: card Rank card W c= card W by Th27,CARD_1:11; card card W c= card Rank card W by CARD_1:11,CLASSES1:38; hence thesis by A1,XBOOLE_0:def 10; end; theorem card Tarski-Class W = card Rank card Tarski-Class W by Th34; theorem Th36: W is Tarski & X c= Rank card W implies X,Rank card W are_equipotent or X in Rank card W proof assume that A1: W is Tarski and A2: X c= Rank card W and A3: not X,Rank card W are_equipotent; defpred P[set] means ex Y st Y in X & $1 = the_rank_of Y; consider LL being set such that A4: x in LL iff x in On W & P[x] from XBOOLE_0:sch 1; consider ff being Cardinal-Function such that A5: dom ff = LL & for x st x in LL holds ff.x = g(x) from CARD_3:sch 1; A6: LL c= On W proof let x; thus thesis by A4; end; A7: product ff c= Funcs(LL,W) proof let x; assume x in product ff; then consider g such that A8: x = g and A9: dom g = dom ff and A10: for x st x in dom ff holds g.x in ff.x by CARD_3:def 5; rng g c= W proof let y; assume y in rng g; then consider x such that A11: x in dom g and A12: y = g.x by FUNCT_1:def 3; A13: ff.x = card bool x by A5,A9,A11; x in W by A6,A5,A9,A11,ORDINAL1:def 9; then bool x in W by A1,CLASSES1:def 2; then card bool x in W by A1,Th11; then A14: card bool x c= W by A1,Th5; y in ff.x by A9,A10,A11,A12; hence thesis by A13,A14; end; hence thesis by A5,A8,A9,FUNCT_2:def 2; end; A15: card W = card Rank card W by A1,Th34; then A16: card X <> card W by A3,CARD_1:5; On W c= W by ORDINAL2:7; then A17: LL c= W by A6,XBOOLE_1:1; now let Z; assume Z in union LL; then consider Y such that A18: Z in Y and A19: Y in LL by TARSKI:def 4; Y in On W by A4,A19; then reconsider Y as Ordinal by ORDINAL1:def 9; A20: Y c= union LL by A19,ZFMISC_1:74; A21: Z in Y by A18; hence Z is Ordinal; reconsider A = Z as Ordinal by A21; A c= Y by A18,ORDINAL1:def 2; hence Z c= union LL by A20,XBOOLE_1:1; end; then reconsider ULL = union LL as Ordinal by ORDINAL1:19; A22: dom Card id LL = dom id LL by CARD_3:def 2; A23: dom id LL = LL by RELAT_1:45; now let x; assume A24: x in dom Card id LL; then A25: (Card id LL).x = card ((id LL).x) by A22,CARD_3:def 2; A26: (id LL).x = x by A23,A22,A24,FUNCT_1:18; ff.x = card bool x by A5,A23,A22,A24; hence (Card id LL).x in ff.x by A26,A25,CARD_1:14; end; then A27: Sum Card id LL in Product ff by A5,A23,A22,CARD_3:41; consider f such that A28: dom f = X & for x st x in X holds f.x = f(x) from FUNCT_1:sch 3; LL c= rng f proof let x; assume x in LL; then consider Y such that A29: Y in X and A30: x = the_rank_of Y by A4; f.Y = x by A28,A29,A30; hence thesis by A28,A29,FUNCT_1:def 3; end; then A31: card LL c= card X by A28,CARD_1:12; A32: card product ff = Product ff by CARD_3:def 8; card X c= card W by A2,A15,CARD_1:11; then card X in card W by A16,CARD_1:3; then card LL <> card W by A31,ORDINAL1:12; then not LL,W are_equipotent by CARD_1:5; then LL in W by A1,A17,CLASSES1:def 2; then Funcs(LL,W) c= W by A1,A17,Th22; then product ff c= W by A7,XBOOLE_1:1; then A33: Product ff c= card W by A32,CARD_1:11; A34: card W is limit_ordinal by A1,Th19; A35: card W = On W by A1,Th9; X c= Rank succ ULL proof let x; defpred P[Ordinal] means $1 in card W & x c= Rank $1; assume A36: x in X; then A37: f.x = the_rank_of x by A28; consider A such that A38: A in card W and A39: x in Rank A by A2,A34,A36,CLASSES1:29,31; P[A] by A38,A39,ORDINAL1:def 2; then A40: ex A st P[A]; consider A such that A41: P[A] and A42: for B st P[B] holds A c= B from ORDINAL1:sch 1(A40); now let B; assume x c= Rank B; then A c= card W & card W c= B or A c= B by A41,A42,ORDINAL1:16; hence A c= B by XBOOLE_1:1; end; then A = the_rank_of x by A41,CLASSES1:def 8; then f.x in LL by A4,A35,A36,A37,A41; then the_rank_of x c= ULL by A37,ZFMISC_1:74; then A43: Rank the_rank_of x c= Rank ULL by CLASSES1:37; x c= Rank the_rank_of x by CLASSES1:def 8; then x c= Rank ULL by A43,XBOOLE_1:1; hence thesis by CLASSES1:32; end; then A44: X in Rank succ succ ULL by CLASSES1:32; Union id LL = union rng id LL by CARD_3:def 4 .= ULL by RELAT_1:45; then card ULL in card W by A27,A33,CARD_3:39,ORDINAL1:12; then A45: ULL <> On W by A35; union card W = card W by A34,ORDINAL1:def 6; then ULL c= On W by A6,A35,ZFMISC_1:77; then ULL c< On W by A45,XBOOLE_0:def 8; then ULL in card W by A35,ORDINAL1:11; then succ ULL in card W by A34,ORDINAL1:28; then succ succ ULL in card W by A34,ORDINAL1:28; hence thesis by A34,A44,CLASSES1:31; end; theorem X c= Rank card Tarski-Class W implies X,Rank card Tarski-Class W are_equipotent or X in Rank card Tarski-Class W by Th36; theorem Th38: W is Tarski implies Rank card W is Tarski proof assume A1: W is Tarski; set B = Rank card W; thus for X,Y holds X in B & Y c= X implies Y in B by CLASSES1:41; now A2: card W is limit_ordinal by A1,Th19; assume A3: W <> {}; thus for X holds X in B implies bool X in B proof let X; assume X in B; then consider A such that A4: A in card W and A5: X in Rank A by A3,A2,CLASSES1:31; A6: bool X in Rank succ A by A5,CLASSES1:42; succ A in card W by A2,A4,ORDINAL1:28; hence thesis by A2,A6,CLASSES1:31; end; end; hence thesis by A1,Th36,CLASSES1:29; end; theorem Rank card Tarski-Class W is Tarski by Th38; theorem Th40: X is epsilon-transitive & A in the_rank_of X implies ex Y st Y in X & the_rank_of Y = A proof assume that A1: X is epsilon-transitive and A2: A in the_rank_of X; defpred P[Ordinal] means ex Y st A in $1 & Y in X & the_rank_of Y = $1; assume A3: not thesis; A4: ex B st P[B] proof assume A5: for B,Y st A in B & Y in X holds the_rank_of Y <> B; X c= Rank A proof let x; assume A6: x in X; then A7: the_rank_of x <> A by A3; the_rank_of x c= A by A5,A6,ORDINAL1:16; then the_rank_of x c< A by A7,XBOOLE_0:def 8; then the_rank_of x in A by ORDINAL1:11; hence thesis by CLASSES1:66; end; then the_rank_of X c= A by CLASSES1:65; hence contradiction by A2,ORDINAL1:5; end; consider B such that A8: P[B] and A9: for C st P[C] holds B c= C from ORDINAL1:sch 1(A4); consider Y such that A10: A in B and A11: Y in X and A12: the_rank_of Y = B by A8; Y c= Rank A proof let x; A13: Y c= X by A1,A11,ORDINAL1:def 2; assume A14: x in Y; then the_rank_of x in B by A12,CLASSES1:68; then not A in the_rank_of x by A9,A14,A13,ORDINAL1:5; then A15: the_rank_of x c= A by ORDINAL1:16; the_rank_of x <> A by A3,A14,A13; then the_rank_of x c< A by A15,XBOOLE_0:def 8; then the_rank_of x in A by ORDINAL1:11; hence thesis by CLASSES1:66; end; then the_rank_of Y c= A by CLASSES1:65; hence contradiction by A10,A12,ORDINAL1:5; end; theorem Th41: X is epsilon-transitive implies card the_rank_of X c= card X proof consider f such that A1: dom f = X & for x st x in X holds f.x = f(x) from FUNCT_1:sch 3; assume A2: X is epsilon-transitive; the_rank_of X c= rng f proof let x; assume A3: x in the_rank_of X; then reconsider x9 = x as Ordinal; consider Y such that A4: Y in X and A5: the_rank_of Y = x9 by A2,A3,Th40; f.Y = x by A1,A4,A5; hence thesis by A1,A4,FUNCT_1:def 3; end; hence thesis by A1,CARD_1:12; end; theorem Th42: W is Tarski & X is epsilon-transitive & X in W implies X in Rank card W proof assume A1: W is Tarski; assume A2: X is epsilon-transitive; assume X in W; then card X in card W by A1,Th1; then A3: card the_rank_of X in card W by A2,Th41,ORDINAL1:12; card card W = card W; then the_rank_of X in card W by A3,CARD_3:43; then A4: Rank the_rank_of X in Rank card W by CLASSES1:36; X c= Rank the_rank_of X by CLASSES1:def 8; hence thesis by A4,CLASSES1:41; end; theorem X is epsilon-transitive & X in Tarski-Class W implies X in Rank card Tarski-Class W by Th42; theorem Th44: W is epsilon-transitive implies Rank card Tarski-Class W is_Tarski-Class_of W proof A1: W in Tarski-Class W by CLASSES1:2; assume W is epsilon-transitive; hence W in Rank card Tarski-Class W & Rank card Tarski-Class W is Tarski by A1,Th38,Th42; end; theorem W is epsilon-transitive implies Rank card Tarski-Class W = Tarski-Class W proof assume W is epsilon-transitive; then Rank card Tarski-Class W is_Tarski-Class_of W by Th44; hence Rank card Tarski-Class W c= Tarski-Class W & Tarski-Class W c= Rank card Tarski-Class W by Th28,CLASSES1:def 4; end; definition let IT be set; attr IT is universal means :Def1: IT is epsilon-transitive & IT is Tarski; end; registration cluster universal -> epsilon-transitive Tarski for set; coherence by Def1; cluster epsilon-transitive Tarski -> universal for set; coherence by Def1; end; registration cluster universal non empty for set; existence proof set X = the set; take V = Tarski-Class the_transitive-closure_of X; thus V is epsilon-transitive by CLASSES1:23,51; thus thesis; end; end; definition mode Universe is universal non empty set; end; reserve U1,U2,U for Universe; theorem Th46: On U is Ordinal proof On U = card U by Th9; hence thesis; end; theorem Th47: X is epsilon-transitive implies Tarski-Class X is universal proof assume X is epsilon-transitive; hence Tarski-Class X is epsilon-transitive & Tarski-Class X is Tarski by CLASSES1:23; end; theorem Tarski-Class U is Universe by Th47; registration let U; cluster On U -> ordinal; coherence by Th46; cluster Tarski-Class U -> universal; coherence by Th47; end; theorem Th49: Tarski-Class A is universal proof set M = Tarski-Class A; thus M is epsilon-transitive & M is Tarski by CLASSES1:23; end; registration let A; cluster Tarski-Class A -> universal; coherence by Th49; end; theorem Th50: U = Rank On U proof card U = On U by Th9; hence thesis by Th31; end; theorem Th51: On U <> {} & On U is limit_ordinal proof card U = On U by Th9; hence thesis by Th19; end; theorem U1 in U2 or U1 = U2 or U2 in U1 proof A1: On U1 in On U2 or On U1 = On U2 or On U2 in On U1 by ORDINAL1:14; A2: U2 = Rank On U2 by Th50; U1 = Rank On U1 by Th50; hence thesis by A1,A2,CLASSES1:36; end; theorem Th53: U1 c= U2 or U2 in U1 proof A1: On U1 c= On U2 or On U2 in On U1 by ORDINAL1:16; A2: U2 = Rank On U2 by Th50; U1 = Rank On U1 by Th50; hence thesis by A1,A2,CLASSES1:36,37; end; theorem Th54: U1,U2 are_c=-comparable proof A1: On U1 c= On U2 or On U2 c= On U1; A2: U2 = Rank On U2 by Th50; U1 = Rank On U1 by Th50; hence U1 c= U2 or U2 c= U1 by A1,A2,CLASSES1:37; end; theorem U1 \/ U2 is Universe & U1 /\ U2 is Universe proof U1,U2 are_c=-comparable by Th54; then U1 c= U2 or U2 c= U1 by XBOOLE_0:def 9; hence thesis by XBOOLE_1:12,28; end; theorem Th56: {} in U proof {} c= the Element of U by XBOOLE_1:2; hence thesis by CLASSES1:def 1; end; theorem x in U implies {x} in U by Th2; theorem x in U & y in U implies {x,y} in U & [x,y] in U by Th2,Th3; theorem Th59: X in U implies bool X in U & union X in U & meet X in U proof assume A1: X in U; hence bool X in U by CLASSES1:def 2; U = Rank On U by Th50; hence A2: union X in U by A1,CLASSES1:35; meet X c= union X by SETFAM_1:2; hence thesis by A2,CLASSES1:def 1; end; theorem Th60: X in U & Y in U implies X \/ Y in U & X /\ Y in U & X \ Y in U & X \+\ Y in U proof assume that A1: X in U and A2: Y in U; A3: union {X,Y} = X \/ Y by ZFMISC_1:75; A4: meet {X,Y} = X /\ Y by SETFAM_1:11; {X,Y} in U by A1,A2,Th2; hence A5: X \/ Y in U & X /\ Y in U by A3,A4,Th59; X \+\ Y = (X \/ Y)\(X /\ Y) by XBOOLE_1:101; hence thesis by A1,A5,CLASSES1:def 1; end; theorem Th61: X in U & Y in U implies [:X,Y:] in U & Funcs(X,Y) in U proof assume that A1: X in U and A2: Y in U; X \/ Y in U by A1,A2,Th60; then bool(X \/ Y) in U by Th59; then A3: bool bool(X \/ Y) in U by Th59; [:X,Y:] c= bool bool(X \/ Y) by ZFMISC_1:86; hence [:X,Y:] in U by A3,CLASSES1:def 1; then A4: bool [:X,Y:] in U by Th59; Funcs(X,Y) c= bool [:X,Y:] by FRAENKEL:2; hence thesis by A4,CLASSES1:def 1; end; reserve u,v for Element of U; registration let U1; cluster non empty for Element of U1; existence proof {} in U1 by Th56; then reconsider x = bool {} as Element of U1 by Th59; take x; thus thesis; end; end; definition let U,u; redefine func {u} -> Element of U; coherence by Th2; redefine func bool u -> Element of U; coherence by Th59; redefine func union u -> Element of U; coherence by Th59; redefine func meet u -> Element of U; coherence by Th59; let v; redefine func {u,v} -> Element of U; coherence by Th2; redefine func [u,v] -> Element of U; coherence by Th3; redefine func u \/ v -> Element of U; coherence by Th60; redefine func u /\ v -> Element of U; coherence by Th60; redefine func u \ v -> Element of U; coherence by Th60; redefine func u \+\ v -> Element of U; coherence by Th60; redefine func [:u,v:] -> Element of U; coherence by Th61; redefine func Funcs(u,v) -> Element of U; coherence by Th61; end; definition func FinSETS -> Universe equals Tarski-Class {}; correctness; end; Lm5: omega is limit_ordinal by ORDINAL1:def 11; theorem Th62: card Rank omega = card omega proof deffunc h(Ordinal) = Rank $1; consider L such that A1: dom L = omega & for A st A in omega holds L.A = h(A) from ORDINAL2: sch 2; now let X,Y; assume X in rng L; then consider x such that A2: x in dom L and A3: X = L.x by FUNCT_1:def 3; assume Y in rng L; then consider y such that A4: y in dom L and A5: Y = L.y by FUNCT_1:def 3; reconsider x,y as Ordinal by A2,A4; A6: Y = Rank y by A1,A4,A5; A7: x c= y or y c= x; X = Rank x by A1,A2,A3; then X c= Y or Y c= X by A6,A7,CLASSES1:37; hence X,Y are_c=-comparable by XBOOLE_0:def 9; end; then A8: rng L is c=-linear by ORDINAL1:def 8; A9: card omega c= card Rank omega by CARD_1:11,CLASSES1:38; A10: now let X; assume X in rng L; then consider x such that A11: x in dom L and A12: X = L.x by FUNCT_1:def 3; reconsider x as Ordinal by A11; X = Rank x by A1,A11,A12; hence card X in card omega by A1,A11,CARD_2:67,CARD_3:42; end; Rank omega = Union L by A1,Lm5,Th24 .= union rng L by CARD_3:def 4; then card Rank omega c= card omega by A8,A10,CARD_3:46; hence thesis by A9,XBOOLE_0:def 10; end; theorem Th63: Rank omega is Tarski proof thus X in Rank omega & Y c= X implies Y in Rank omega by CLASSES1:41; thus X in Rank omega implies bool X in Rank omega proof assume X in Rank omega; then consider A such that A1: A in omega and A2: X in Rank A by Lm5,CLASSES1:31; A3: bool X in Rank succ A by A2,CLASSES1:42; succ A in omega by A1,Lm5,ORDINAL1:28; hence thesis by A3,Lm5,CLASSES1:31; end; thus X c= Rank omega implies X,Rank omega are_equipotent or X in Rank omega proof A4: 0 in omega; defpred P[set,set] means the_rank_of $2 c= the_rank_of $1; assume that A5: X c= Rank omega and A6: not X,Rank omega are_equipotent and A7: not X in Rank omega; A8: card X <> card omega by A6,Th62,CARD_1:5; card X c= card omega by A5,Th62,CARD_1:11; then card X in omega by A8,CARD_1:3,47; then reconsider X as finite set; A9: for x,y holds P[x,y] or P[y,x]; A10: for x,y,z st P[x,y] & P[y,z] holds P[x,z] by XBOOLE_1:1; omega c= Rank omega by CLASSES1:38; then A11: X <> {} by A7,A4; consider x such that A12: x in X & for y st y in X holds P[x,y] from CARD_2:sch 2(A11,A9,A10); set A = the_rank_of x; now let Y; assume Y in X; then the_rank_of Y c= A by A12; hence the_rank_of Y in succ A by ORDINAL1:22; end; then A13: the_rank_of X c= succ A by CLASSES1:69; A in omega by A5,A12,CLASSES1:66; then succ A in omega by Lm5,ORDINAL1:28; then the_rank_of X in omega by A13,ORDINAL1:12; hence thesis by A7,CLASSES1:66; end; end; theorem FinSETS = Rank omega proof A1: omega c= Rank omega by CLASSES1:38; then reconsider M = Rank omega as non empty set; 0 in omega; then M is_Tarski-Class_of {} by A1,Th63,CLASSES1:def 3; hence FinSETS c= Rank omega by CLASSES1:def 4; A2: {} in On FinSETS by Th51,ORDINAL3:8; A3: FinSETS = Rank On FinSETS by Th50; On FinSETS is limit_ordinal by Th51; then omega c= On FinSETS by A2,ORDINAL1:def 11; hence thesis by A3,CLASSES1:37; end; definition func SETS -> Universe equals Tarski-Class FinSETS; correctness; end; registration let X be set; cluster the_transitive-closure_of X -> epsilon-transitive; coherence by CLASSES1:51; end; registration let X be epsilon-transitive set; cluster Tarski-Class X -> epsilon-transitive; coherence by CLASSES1:23; end; definition let X be set; func Universe_closure X -> Universe means :Def4: X c= it & for Y being Universe st X c= Y holds it c= Y; uniqueness proof let T1, T2 be Universe; assume A1: not thesis; then A2: T2 c= T1; T1 c= T2 by A1; hence thesis by A1,A2,XBOOLE_0:def 10; end; existence proof per cases; suppose Rank the_rank_of X is Universe; then reconsider R = Rank the_rank_of X as Universe; take R; thus X c= R by CLASSES1:def 8; let Y be Universe; assume X c= Y; then the_rank_of X c= the_rank_of Y by CLASSES1:67; then A3: R c= Rank the_rank_of Y by CLASSES1:37; A4: Rank card Y = Y by Th31; then the_rank_of Y c= card Y by CLASSES1:def 8; then Rank the_rank_of Y c= Y by A4,CLASSES1:37; hence thesis by A3,XBOOLE_1:1; end; suppose A5: Rank the_rank_of X is not Universe; take R = Tarski-Class Rank the_rank_of X; A6: Rank the_rank_of X in R by CLASSES1:2; X c= Rank the_rank_of X by CLASSES1:def 8; then X in R by A6,CLASSES1:def 1; hence X c= R by ORDINAL1:def 2; let Y be Universe; assume X c= Y; then A7: the_rank_of X c= the_rank_of Y by CLASSES1:67; A8: Rank card Y = Y by Th31; then A9: the_rank_of Y c= card Y by CLASSES1:def 8; Y c= Rank the_rank_of Y by CLASSES1:def 8; then card Y c= the_rank_of Y by A8,CLASSES1:37; then card Y = the_rank_of Y by A9,XBOOLE_0:def 10; then the_rank_of X c< card Y by A5,A7,A8,XBOOLE_0:def 8; then the_rank_of X in card Y by ORDINAL1:11; then Rank the_rank_of X in Y by A8,CLASSES1:36; then Y is_Tarski-Class_of Rank the_rank_of X by CLASSES1:def 3; hence thesis by CLASSES1:def 4; end; end; end; deffunc C(Ordinal,set) = Tarski-Class $2; deffunc D(Ordinal,T-Sequence) = Universe_closure Union $2; definition mode FinSet is Element of FinSETS; mode Set is Element of SETS; let A; func UNIVERSE A means : Def5: ex L st it = last L & dom L = succ A & L.{} = FinSETS & (for C st succ C in succ A holds L.succ C = Tarski-Class(L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = Universe_closure Union(L|C); correctness proof thus (ex x,L st x = last L & dom L = succ A & L.{} = FinSETS & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) ) & for x1,x2 being set st (ex L st x1 = last L & dom L = succ A & L.{} = FinSETS & (for C st succ C in succ A holds L .succ C = C(C,L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) ) & (ex L st x2 = last L & dom L = succ A & L.{} = FinSETS & ( for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) ) holds x1 = x2 from ORDINAL2: sch 7; end; end; deffunc u(Ordinal) = UNIVERSE $1; Lm6: now A1: for A,x holds x = u(A) iff ex L st x = last L & dom L = succ A & L.{} = FinSETS & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) by Def5; thus u({}) = FinSETS from ORDINAL2:sch 8(A1); thus for A holds u(succ A) = C(A,u(A)) from ORDINAL2:sch 9(A1); let A,L; assume that A2: A <> {} & A is limit_ordinal and A3: dom L = A and A4: for B st B in A holds L.B = u(B); thus u(A) = D(A,L) from ORDINAL2:sch 10(A1,A2,A3,A4); end; registration let A; cluster UNIVERSE A -> universal non empty; coherence proof defpred P[Ordinal] means UNIVERSE $1 is Universe; A1: P[B] implies P[succ B] proof assume P[B]; then reconsider UU = UNIVERSE B as Universe; UNIVERSE succ B = Tarski-Class UU by Lm6; hence thesis; end; A2: for A st A <> {} & A is limit_ordinal & for B st B in A holds P[B] holds P[A] proof let A such that A3: A <> {} and A4: A is limit_ordinal and for B st B in A holds P[B]; consider L such that A5: dom L = A & for B st B in A holds L.B = u(B) from ORDINAL2:sch 2; UNIVERSE A = Universe_closure Union L by A3,A4,A5,Lm6 .= Universe_closure union rng L by CARD_3:def 4; hence thesis; end; A6: P[{}] by Lm6; for A holds P[A] from ORDINAL2:sch 1(A6,A1,A2); hence thesis; end; end; theorem UNIVERSE {} = FinSETS by Lm6; theorem UNIVERSE succ A = Tarski-Class UNIVERSE A by Lm6; Lm7: 1 = succ 0; theorem UNIVERSE 1 = SETS by Lm6,Lm7; theorem A <> {} & A is limit_ordinal & dom L = A & (for B st B in A holds L.B = UNIVERSE B) implies UNIVERSE A = Universe_closure Union L by Lm6; theorem FinSETS c= U & Tarski-Class {} c= U & UNIVERSE {} c= U proof A1: On U c= Rank On U by CLASSES1:38; A2: Rank On U = U by Th50; {} in On U by Th51,ORDINAL3:8; hence thesis by A2,A1,Lm6,Th4; end; theorem Th70: A in B iff UNIVERSE A in UNIVERSE B proof defpred P[Ordinal] means for A st A in $1 holds UNIVERSE A in UNIVERSE $1; A1: for B st P[B] holds P[succ B] proof let B such that A2: P[B]; let A; assume A3: A in succ B; A c< B iff A c= B & A <> B by XBOOLE_0:def 8; then A in B or A = B by A3,ORDINAL1:11,22; then A4: UNIVERSE A in UNIVERSE B or UNIVERSE A = UNIVERSE B by A2; UNIVERSE succ B = Tarski-Class UNIVERSE B by Lm6; then UNIVERSE B in UNIVERSE succ B by CLASSES1:2; hence thesis by A4,ORDINAL1:10; end; A5: for A st A <> {} & A is limit_ordinal & for B st B in A holds P[B] holds P[A] proof let B; assume that A6: B <> {} and A7: B is limit_ordinal and for C st C in B for A st A in C holds UNIVERSE A in UNIVERSE C; let A; consider L such that A8: dom L = B & for C st C in B holds L.C = u(C) from ORDINAL2:sch 2; assume A in B; then A9: succ A in B by A7,ORDINAL1:28; then L.succ A = UNIVERSE succ A by A8; then UNIVERSE succ A in rng L by A9,A8,FUNCT_1:def 3; then A10: UNIVERSE succ A c= union rng L by ZFMISC_1:74; UNIVERSE B = Universe_closure Union L by A6,A7,A8,Lm6 .= Universe_closure union rng L by CARD_3:def 4; then union rng L c= UNIVERSE B by Def4; then A11: UNIVERSE succ A c= UNIVERSE B by A10,XBOOLE_1:1; A12: UNIVERSE A in Tarski-Class UNIVERSE A by CLASSES1:2; UNIVERSE succ A = Tarski-Class UNIVERSE A by Lm6; hence thesis by A12,A11; end; A13: P[{}]; A14: for B holds P[B] from ORDINAL2:sch 1(A13,A1,A5); hence A in B implies UNIVERSE A in UNIVERSE B; assume that A15: UNIVERSE A in UNIVERSE B and A16: not A in B; B c< A iff B c= A & B <> A by XBOOLE_0:def 8; then B in A or B = A by A16,ORDINAL1:11,16; hence contradiction by A14,A15; end; theorem UNIVERSE A = UNIVERSE B implies A = B proof assume that A1: UNIVERSE A = UNIVERSE B and A2: A <> B; A in B or B in A by A2,ORDINAL1:14; then UNIVERSE A in UNIVERSE B or UNIVERSE B in UNIVERSE A by Th70; hence contradiction by A1; end; theorem A c= B iff UNIVERSE A c= UNIVERSE B proof thus A c= B implies UNIVERSE A c= UNIVERSE B proof assume A1: A c= B; assume not UNIVERSE A c= UNIVERSE B; then UNIVERSE B in UNIVERSE A by Th53; then B in A by Th70; hence contradiction by A1,ORDINAL1:5; end; assume A2: UNIVERSE A c= UNIVERSE B; assume not A c= B; then B in A by ORDINAL1:16; then UNIVERSE B in UNIVERSE A by Th70; hence contradiction by A2,ORDINAL1:5; end; reserve u,v for Element of Tarski-Class(X); theorem Tarski-Class(X,{}) in Tarski-Class(X,1) & Tarski-Class(X,{}) <> Tarski-Class(X,1) proof deffunc F(Ordinal) = Tarski-Class(X,$1); deffunc C(Ordinal,set) = { u : ex v st v in $2 & u c= v } \/ { bool v : v in $2 } \/ bool $2 /\ Tarski-Class X; deffunc D(Ordinal,T-Sequence) = (union rng $2) /\ Tarski-Class X; A1: for A,x holds x = F(A) iff ex L st x = last L & dom L = succ A & L.{} = { X } & (for C st succ C in succ A holds L.succ C = C(C,L.C)) & for C st C in succ A & C <> {} & C is limit_ordinal holds L.C = D(C,L|C) by CLASSES1:def 5; A2: F({}) = { X } from ORDINAL2:sch 8(A1); then X in Tarski-Class(X,{}) by TARSKI:def 1; then A3: bool X in Tarski-Class X by CLASSES1:4; { X } c= bool X proof let x; assume x in { X }; then x = X by TARSKI:def 1; hence thesis by ZFMISC_1:def 1; end; then 1 = succ 0 & { X } in Tarski-Class X by A3,CLASSES1:3; thus then A4: Tarski-Class(X,{}) in Tarski-Class(X,1) by A2,CLASSES1:10; assume Tarski-Class(X,{}) = Tarski-Class(X,1); hence contradiction by A4; end; begin reserve phi,fi,psi for Ordinal-Sequence, A,A1,B,C,D for Ordinal, f,g for Function, X for set, x,y,z for set; Lm1: {} in omega by ORDINAL1:def 11; Lm2: omega is limit_ordinal by ORDINAL1:def 11; Lm3: 1 = succ {}; registration let L be Ordinal-Sequence; cluster last L -> ordinal; coherence; end; theorem dom fi = succ A implies last fi is_limes_of fi & lim fi = last fi proof assume A1: dom fi = succ A; then A2: last fi = fi.A by ORDINAL2:6; thus last fi is_limes_of fi proof per cases; case A3: last fi = {}; take A; thus A in dom fi by A1,ORDINAL1:6; let B; assume that A4: A c= B and A5: B in dom fi; B c= A by A1,A5,ORDINAL1:22; hence thesis by A2,A3,A4,XBOOLE_0:def 10; end; case last fi <> {}; let B,C such that A6: B in last fi and A7: last fi in C; take A; thus A in dom fi by A1,ORDINAL1:6; let D; assume that A8: A c= D and A9: D in dom fi; D c= A by A1,A9,ORDINAL1:22; hence thesis by A2,A6,A7,A8,XBOOLE_0:def 10; end; end; hence thesis by ORDINAL2:def 10; end; definition let fi,psi be T-Sequence; func fi^psi -> T-Sequence means : Def1: dom it = (dom fi)+^(dom psi) & (for A st A in dom fi holds it.A = fi.A) & for A st A in dom psi holds it.((dom fi) +^A) = psi.A; existence proof defpred P[set] means $1 in dom fi; deffunc G(Ordinal) = psi.(($1)-^dom fi); deffunc F(set) = fi.$1; consider f such that A1: dom f = (dom fi)+^(dom psi) and A2: for x being Ordinal st x in (dom fi)+^(dom psi) holds (P[x] implies f.x = F(x)) & (not P[x] implies f.x = G(x)) from FINSET_1:sch 1; reconsider f as T-Sequence by A1,ORDINAL1:def 7; take f; thus dom f = (dom fi)+^(dom psi) by A1; thus for A st A in dom fi holds f.A = fi.A proof A3: dom fi c= dom f by A1,ORDINAL3:24; let A; assume A in dom fi; hence thesis by A1,A2,A3; end; let A; dom fi c= (dom fi)+^A by ORDINAL3:24; then A4: not (dom fi)+^A in dom fi by ORDINAL1:5; assume A in dom psi; then (dom fi)+^A in dom f by A1,ORDINAL2:32; then f.((dom fi)+^A) = psi.((((dom fi)+^A))-^dom fi) by A1,A2,A4; hence thesis by ORDINAL3:52; end; uniqueness proof let f1,f2 be T-Sequence such that A5: dom f1 = (dom fi)+^(dom psi) and A6: for A st A in dom fi holds f1.A = fi.A and A7: for A st A in dom psi holds f1.((dom fi)+^A) = psi.A and A8: dom f2 = (dom fi)+^(dom psi) and A9: for A st A in dom fi holds f2.A = fi.A and A10: for A st A in dom psi holds f2.((dom fi)+^A) = psi.A; now let x; assume A11: x in (dom fi)+^(dom psi); then reconsider A = x as Ordinal; now per cases; suppose A12: x in dom fi; then f1.A = fi.A by A6; hence f1.x = f2.x by A9,A12; end; suppose not x in dom fi; then dom fi c= A by ORDINAL1:16; then A13: (dom fi)+^(A-^dom fi) = A by ORDINAL3:def 5; then f1.A = psi.(A-^dom fi) by A7,A11,ORDINAL3:22; hence f1.x = f2.x by A10,A11,A13,ORDINAL3:22; end; end; hence f1.x = f2.x; end; hence thesis by A5,A8,FUNCT_1:2; end; end; theorem Th2: rng(fi^psi) c= rng fi \/ rng psi proof set f = fi^psi, A1 = rng fi, A2 = rng psi; A1: dom(fi^psi) = (dom fi)+^(dom psi) by Def1; let y; assume y in rng f; then consider x such that A2: x in dom f and A3: y = f.x by FUNCT_1:def 3; reconsider x as Ordinal by A2; per cases; suppose A4: x in dom fi; then A5: fi.x in rng fi by FUNCT_1:def 3; y = fi.x by A3,A4,Def1; then y in A1 by A5; hence thesis by XBOOLE_0:def 3; end; suppose not x in dom fi; then dom fi c= x by ORDINAL1:16; then A6: (dom fi)+^(x-^dom fi) = x by ORDINAL3:def 5; then A7: x-^dom fi in dom psi by A1,A2,ORDINAL3:22; then y = psi.(x-^dom fi) by A3,A6,Def1; then y in rng psi by A7,FUNCT_1:def 3; then y in A2; hence thesis by XBOOLE_0:def 3; end; end; registration let fi,psi; cluster fi^psi -> Ordinal-yielding; coherence proof set f = fi^psi; consider A1 being Ordinal such that A1: rng fi c= A1 by ORDINAL2:def 4; consider A2 being Ordinal such that A2: rng psi c= A2 by ORDINAL2:def 4; A3: A2 c= A1+^A2 by ORDINAL3:24; A1 c= A1+^A2 by ORDINAL3:24; then A4: A1 \/ A2 c= A1+^A2 by A3,XBOOLE_1:8; A5: rng f c= rng fi \/ rng psi by Th2; rng fi \/ rng psi c= A1 \/ A2 by A1,A2,XBOOLE_1:13; then rng f c= A1 \/ A2 by A5,XBOOLE_1:1; then rng f c= A1+^A2 by A4,XBOOLE_1:1; hence thesis by ORDINAL2:def 4; end; end; theorem Th3: A is_limes_of psi implies A is_limes_of fi^psi proof assume that A1: A = {} & (ex B st B in dom psi & for C st B c= C & C in dom psi holds psi.C = {}) or A <> {} & for B,C st B in A & A in C ex D st D in dom psi & for E being Ordinal st D c= E & E in dom psi holds B in psi.E & psi.E in C; A2: dom(fi^psi) = (dom fi)+^(dom psi) by Def1; per cases; case A = {}; then consider B such that A3: B in dom psi and A4: for C st B c= C & C in dom psi holds psi.C = {} by A1; take B1 = (dom fi)+^B; thus B1 in dom(fi^psi) by A2,A3,ORDINAL2:32; let C; assume that A5: B1 c= C and A6: C in dom(fi^psi); A7: C = B1+^(C-^B1) by A5,ORDINAL3:def 5 .= (dom fi)+^(B+^(C-^B1)) by ORDINAL3:30; then A8: B+^(C-^B1) in dom psi by A2,A6,ORDINAL3:22; B c= B+^(C-^B1) by ORDINAL3:24; then psi.(B+^(C-^B1)) = {} by A2,A4,A6,A7,ORDINAL3:22; hence thesis by A7,A8,Def1; end; case A <> {}; let B,C; assume that A9: B in A and A10: A in C; consider D such that A11: D in dom psi and A12: for E being Ordinal st D c= E & E in dom psi holds B in psi.E & psi.E in C by A1,A9,A10; take D1 = (dom fi)+^D; thus D1 in dom(fi^psi) by A2,A11,ORDINAL2:32; let E be Ordinal; assume that A13: D1 c= E and A14: E in dom(fi^psi); A15: D c= D+^(E-^D1) by ORDINAL3:24; A16: E = D1+^(E-^D1) by A13,ORDINAL3:def 5 .= (dom fi)+^(D+^(E-^D1)) by ORDINAL3:30; then A17: D+^(E-^D1) in dom psi by A2,A14,ORDINAL3:22; then (fi^psi).E = psi.(D+^(E-^D1)) by A16,Def1; hence thesis by A12,A15,A17; end; end; theorem A is_limes_of fi implies B+^A is_limes_of B+^fi proof assume that A1: A = {} & (ex B st B in dom fi & for C st B c= C & C in dom fi holds fi.C = {}) or A <> {} & for B,C st B in A & A in C ex D st D in dom fi & for E being Ordinal st D c= E & E in dom fi holds B in fi.E & fi.E in C; A2: dom fi = dom(B+^fi) by ORDINAL3:def 1; per cases; case A3: B+^A = {}; then consider A1 such that A4: A1 in dom fi and A5: for C st A1 c= C & C in dom fi holds fi.C = {} by A1,ORDINAL3:26; take A1; thus A1 in dom(B+^fi) by A4,ORDINAL3:def 1; let C; assume that A6: A1 c= C and A7: C in dom(B+^fi); A8: (B+^fi).C = B+^(fi.C) by A2,A7,ORDINAL3:def 1; fi.C = {} by A2,A5,A6,A7; hence thesis by A3,A8,ORDINAL3:26; end; case B+^A <> {}; now per cases; suppose A9: A = {}; then consider A1 such that A10: A1 in dom fi and A11: for C st A1 c= C & C in dom fi holds fi.C = {} by A1; let B1,B2 be Ordinal such that A12: B1 in B+^A and A13: B+^A in B2; take A1; thus A1 in dom(B+^fi) by A10,ORDINAL3:def 1; let C; assume that A14: A1 c= C and A15: C in dom(B+^fi); (B+^fi).C = B+^(fi.C) by A2,A15,ORDINAL3:def 1; hence B1 in (B+^fi).C & (B+^fi).C in B2 by A2,A9,A11,A12,A13,A14,A15; end; suppose A16: A <> {}; let B1,B2 be Ordinal; assume that A17: B1 in B+^A and A18: B+^A in B2; B1-^B in A by A16,A17,ORDINAL3:60; then consider A1 such that A19: A1 in dom fi and A20: for C st A1 c= C & C in dom fi holds B1-^B in fi.C & fi.C in B2-^B by A1,A18,ORDINAL3:61; A21: B1 c= B+^(B1-^B) by ORDINAL3:62; A22: B c= B+^A by ORDINAL3:24; B+^A c= B2 by A18,ORDINAL1:def 2; then B c= B2 by A22,XBOOLE_1:1; then A23: B+^(B2-^B) = B2 by ORDINAL3:def 5; take A1; thus A1 in dom(B+^fi) by A19,ORDINAL3:def 1; let C; assume that A24: A1 c= C and A25: C in dom(B+^fi); A26: (B+^fi).C = B+^(fi.C) by A2,A25,ORDINAL3:def 1; reconsider E = fi.C as Ordinal; B1-^B in E by A2,A20,A24,A25; then A27: B+^(B1-^B) in B+^E by ORDINAL2:32; E in B2-^B by A2,A20,A24,A25; hence B1 in (B+^fi).C & (B+^fi).C in B2 by A21,A26,A23,A27,ORDINAL1:12 ,ORDINAL2:32; end; end; hence thesis; end; end; Lm4: A is_limes_of fi implies dom fi <> {} proof assume that A1: A = {} & (ex B st B in dom fi & for C st B c= C & C in dom fi holds fi.C = {}) or A <> {} & for B,C st B in A & A in C ex D st D in dom fi & for E being Ordinal st D c= E & E in dom fi holds B in fi.E & fi.E in C; now per cases; suppose A = {}; hence thesis by A1; end; suppose A <> {}; then {} in A by ORDINAL3:8; then ex B st B in dom fi & for C st B c= C & C in dom fi holds {} in fi.C & fi.C in succ A by A1,ORDINAL1:6; hence thesis; end; end; hence thesis; end; theorem Th5: A is_limes_of fi implies A*^B is_limes_of fi*^B proof A1: dom fi = dom(fi*^B) by ORDINAL3:def 4; assume A2: A is_limes_of fi; then A3: dom fi <> {} by Lm4; per cases; case A*^B = {}; then A4: B = {} or A = {} by ORDINAL3:31; now per cases; suppose A5: B = {}; set x = the Element of dom fi; reconsider x as Ordinal; take A1 = x; thus A1 in dom(fi*^B) by A1,A3; let C; assume that A1 c= C and A6: C in dom(fi*^B); thus (fi*^B).C = (fi.C)*^B by A1,A6,ORDINAL3:def 4 .= {} by A5,ORDINAL2:38; end; suppose B <> {}; then consider A1 such that A7: A1 in dom fi and A8: for C st A1 c= C & C in dom fi holds fi.C = {} by A2,A4,ORDINAL2:def 9 ; take A1; thus A1 in dom(fi*^B) by A7,ORDINAL3:def 4; let C; assume that A9: A1 c= C and A10: C in dom(fi*^B); A11: (fi*^B).C = (fi.C)*^B by A1,A10,ORDINAL3:def 4; fi.C = {} by A1,A8,A9,A10; hence (fi*^B).C = {} by A11,ORDINAL2:35; end; end; hence thesis; end; case A12: A*^B <> {}; let B1,B2 be Ordinal such that A13: B1 in A*^B and A14: A*^B in B2; A15: B <> {} by A12,ORDINAL2:38; A16: now assume not ex A1 st A = succ A1; then A is limit_ordinal by ORDINAL1:29; then consider C such that A17: C in A and A18: B1 in C*^B by A13,ORDINAL3:41; A in succ A by ORDINAL1:6; then consider D such that A19: D in dom fi and A20: for A1 st D c= A1 & A1 in dom fi holds C in fi.A1 & fi.A1 in succ A by A2,A17,ORDINAL2:def 9; take D; thus D in dom(fi*^B) by A19,ORDINAL3:def 4; let A1; assume that A21: D c= A1 and A22: A1 in dom(fi*^B); reconsider E = fi.A1 as Ordinal; fi.A1 in succ A by A1,A20,A21,A22; then A23: E c= A by ORDINAL1:22; C in fi.A1 by A1,A20,A21,A22; then C*^B in E*^B by A15,ORDINAL2:40; then A24: B1 in E*^B by A18,ORDINAL1:10; (fi*^B).A1 = (fi.A1)*^B by A1,A22,ORDINAL3:def 4; hence B1 in (fi*^B).A1 & (fi*^B).A1 in B2 by A14,A23,A24,ORDINAL1:12 ,ORDINAL2:41; end; now A25: A in succ A by ORDINAL1:6; given A1 such that A26: A = succ A1; A1 in A by A26,ORDINAL1:6; then consider D such that A27: D in dom fi and A28: for C st D c= C & C in dom fi holds A1 in fi.C & fi.C in succ A by A2,A25,ORDINAL2:def 9; take D; thus D in dom(fi*^B) by A27,ORDINAL3:def 4; let C; assume that A29: D c= C and A30: C in dom(fi*^B); reconsider E = fi.C as Ordinal; A1 in E by A1,A28,A29,A30; then A31: A c= E by A26,ORDINAL1:21; E in succ A by A1,A28,A29,A30; then A32: E c= A by ORDINAL1:22; (fi*^B).C = E*^B by A1,A30,ORDINAL3:def 4; hence B1 in (fi*^B).C & (fi*^B).C in B2 by A13,A14,A31,A32, XBOOLE_0:def 10; end; hence thesis by A16; end; end; theorem Th6: dom fi = dom psi & B is_limes_of fi & C is_limes_of psi & ((for A st A in dom fi holds fi.A c= psi.A) or for A st A in dom fi holds fi.A in psi.A ) implies B c= C proof assume that A1: dom fi = dom psi and A2: B = {} & (ex A1 st A1 in dom fi & for C st A1 c= C & C in dom fi holds fi.C = {}) or B <> {} & for A1,C st A1 in B & B in C ex D st D in dom fi & for E being Ordinal st D c= E & E in dom fi holds A1 in fi.E & fi.E in C and A3: C = {} & (ex B st B in dom psi & for A1 st B c= A1 & A1 in dom psi holds psi.A1 = {}) or C <> {} & for B,A1 st B in C & C in A1 ex D st D in dom psi & for E being Ordinal st D c= E & E in dom psi holds B in psi.E & psi.E in A1 and A4: (for A st A in dom fi holds fi.A c= psi.A) or for A st A in dom fi holds fi.A in psi.A; A5: now let A; reconsider A1 = fi.A, A2 = psi.A as Ordinal; assume A in dom fi; then A1 c= A2 or A1 in A2 by A4; hence fi.A c= psi.A by ORDINAL1:def 2; end; now per cases; suppose B = {} & C = {}; hence thesis; end; suppose B = {} & C <> {}; then B in C by ORDINAL3:8; hence thesis by ORDINAL1:def 2; end; suppose A6: B <> {} & C = {}; then {} in B by ORDINAL3:8; then consider A2 being Ordinal such that A7: A2 in dom fi and A8: for A st A2 c= A & A in dom fi holds {} in fi.A & fi.A in succ B by A2,ORDINAL1:6; consider A1 such that A9: A1 in dom psi and A10: for A st A1 c= A & A in dom psi holds psi.A = {} by A3,A6; A11: A1 \/ A2 = A1 or A1 \/ A2 = A2 by ORDINAL3:12; then A12: fi.(A1 \/ A2) c= psi.(A1 \/ A2) by A1,A5,A9,A7; A2 c= A1 \/ A2 by XBOOLE_1:7; then {} in fi.(A1 \/ A2) by A1,A9,A7,A8,A11; hence thesis by A1,A9,A10,A7,A11,A12,XBOOLE_1:7; end; suppose A13: B <> {} & C <> {}; assume not B c= C; then C in B by ORDINAL1:16; then consider A1 such that A14: A1 in dom fi and A15: for A st A1 c= A & A in dom fi holds C in fi.A & fi.A in succ B by A2,ORDINAL1:6; {} in C by A13,ORDINAL3:8; then consider A2 being Ordinal such that A16: A2 in dom psi and A17: for A st A2 c= A & A in dom psi holds {} in psi.A & psi.A in succ C by A3,ORDINAL1:6; A18: A1 \/ A2 = A1 or A1 \/ A2 = A2 by ORDINAL3:12; reconsider A3 = psi.(A1 \/ A2) as Ordinal; A2 c= A1 \/ A2 by XBOOLE_1:7; then psi.(A1 \/ A2) in succ C by A1,A14,A16,A17,A18; then A19: A3 c= C by ORDINAL1:22; A1 c= A1 \/ A2 by XBOOLE_1:7; then A20: C in fi.(A1 \/ A2) by A1,A14,A15,A16,A18; fi.(A1 \/ A2) c= psi.(A1 \/ A2) by A1,A5,A14,A16,A18; hence contradiction by A20,A19,ORDINAL1:5; end; end; hence thesis; end; reserve f1,f2 for Ordinal-Sequence; theorem dom f1 = dom fi & dom fi = dom f2 & A is_limes_of f1 & A is_limes_of f2 & (for A st A in dom fi holds f1.A c= fi.A & fi.A c= f2.A) implies A is_limes_of fi proof assume that A1: dom f1 = dom fi and A2: dom fi = dom f2 and A3: A = {} & (ex B st B in dom f1 & for C st B c= C & C in dom f1 holds f1.C = {}) or A <> {} & for B,C st B in A & A in C ex D st D in dom f1 & for E being Ordinal st D c= E & E in dom f1 holds B in f1.E & f1.E in C and A4: A = {} & (ex B st B in dom f2 & for C st B c= C & C in dom f2 holds f2.C = {}) or A <> {} & for B,C st B in A & A in C ex D st D in dom f2 & for E being Ordinal st D c= E & E in dom f2 holds B in f2.E & f2.E in C and A5: for A st A in dom fi holds f1.A c= fi.A & fi.A c= f2.A; per cases; case A = {}; then consider B being Ordinal such that A6: B in dom f2 and A7: for C st B c= C & C in dom f2 holds f2.C = {} by A4; take B; thus B in dom fi by A2,A6; let C; assume that A8: B c= C and A9: C in dom fi; f2.C = {} by A2,A7,A8,A9; hence thesis by A5,A9,XBOOLE_1:3; end; case A <> {}; let B,C; assume that A10: B in A and A11: A in C; consider D2 being Ordinal such that A12: D2 in dom f2 and A13: for A1 st D2 c= A1 & A1 in dom f2 holds B in f2.A1 & f2.A1 in C by A4,A10,A11; consider D1 being Ordinal such that A14: D1 in dom f1 and A15: for A1 st D1 c= A1 & A1 in dom f1 holds B in f1.A1 & f1.A1 in C by A3,A10,A11; take D = D1 \/ D2; thus D in dom fi by A1,A2,A14,A12,ORDINAL3:12; let A1; assume that A16: D c= A1 and A17: A1 in dom fi; reconsider B1 = fi.A1, B2 = f2.A1 as Ordinal; A18: B1 c= B2 by A5,A17; D2 c= D by XBOOLE_1:7; then D2 c= A1 by A16,XBOOLE_1:1; then A19: B2 in C by A2,A13,A17; D1 c= D by XBOOLE_1:7; then D1 c= A1 by A16,XBOOLE_1:1; then A20: B in f1.A1 by A1,A15,A17; f1.A1 c= fi.A1 by A5,A17; hence thesis by A20,A18,A19,ORDINAL1:12; end; end; theorem Th8: dom fi <> {} & dom fi is limit_ordinal & fi is increasing implies sup fi is_limes_of fi & lim fi = sup fi proof assume that A1: dom fi <> {} & dom fi is limit_ordinal and A2: A in B & B in dom fi implies fi.A in fi.B; reconsider x = fi.{} as Ordinal; {} in dom fi by A1,ORDINAL3:8; then A3: x in rng fi by FUNCT_1:def 3; thus sup fi is_limes_of fi proof per cases; case sup fi = {}; hence thesis by A3,ORDINAL2:19; end; case sup fi <> {}; let A,B; assume that A4: A in sup fi and A5: sup fi in B; consider C such that A6: C in rng fi and A7: A c= C by A4,ORDINAL2:21; consider x such that A8: x in dom fi and A9: C = fi.x by A6,FUNCT_1:def 3; reconsider x as Ordinal by A8; take M = succ x; thus M in dom fi by A1,A8,ORDINAL1:28; let D; assume that A10: M c= D and A11: D in dom fi; reconsider E = fi.D as Ordinal; x in M by ORDINAL1:6; then C in E by A2,A9,A10,A11; hence A in fi.D by A7,ORDINAL1:12; fi.D in rng fi by A11,FUNCT_1:def 3; then E in sup fi by ORDINAL2:19; hence thesis by A5,ORDINAL1:10; end; end; hence thesis by ORDINAL2:def 10; end; theorem Th9: fi is increasing & A c= B & B in dom fi implies fi.A c= fi.B proof assume that A1: for A,B st A in B & B in dom fi holds fi.A in fi.B and A2: A c= B and A3: B in dom fi; reconsider C = fi.B as Ordinal; now per cases; suppose A = B; hence thesis; end; suppose A <> B; then A c< B by A2,XBOOLE_0:def 8; then A in B by ORDINAL1:11; then fi.A in C by A1,A3; hence thesis by ORDINAL1:def 2; end; end; hence thesis; end; theorem Th10: fi is increasing & A in dom fi implies A c= fi.A proof assume that A1: for A,B st A in B & B in dom fi holds fi.A in fi.B and A2: A in dom fi and A3: not A c= fi.A; defpred P[set] means $1 in dom fi & not $1 c= fi.$1; A4: ex A st P[A] by A2,A3; consider A such that A5: P[A] and A6: for B st P[B] holds A c= B from ORDINAL1:sch 1(A4); reconsider B = fi.A as Ordinal; A7: B in A by A5,ORDINAL1:16; then not B c= fi.B by A1,A5,ORDINAL1:5; hence contradiction by A5,A6,A7,ORDINAL1:10; end; theorem Th11: phi is increasing implies phi"A is Ordinal proof assume A1: for A,B st A in B & B in dom phi holds phi.A in phi.B; now let X; assume A2: X in phi"A; then A3: X in dom phi by FUNCT_1:def 7; hence X is Ordinal; reconsider B = X as Ordinal by A3; A4: phi.X in A by A2,FUNCT_1:def 7; thus X c= phi"A proof let x; assume A5: x in X; then x in B; then reconsider C = x, D = phi.B as Ordinal; reconsider E = phi.C as Ordinal; E in D by A1,A3,A5; then A6: phi.x in A by A4,ORDINAL1:10; C in dom phi by A3,A5,ORDINAL1:10; hence thesis by A6,FUNCT_1:def 7; end; end; hence thesis by ORDINAL1:19; end; theorem Th12: f1 is increasing implies f2*f1 is Ordinal-Sequence proof A1: dom(f2*f1) = f1"dom f2 by RELAT_1:147; assume f1 is increasing; then dom(f2*f1) is Ordinal by A1,Th11; then reconsider f = f2*f1 as T-Sequence by ORDINAL1:def 7; consider A such that A2: rng f2 c= A by ORDINAL2:def 4; rng f c= rng f2 by RELAT_1:26; then rng f c= A by A2,XBOOLE_1:1; hence thesis by ORDINAL2:def 4; end; theorem Th13: f1 is increasing & f2 is increasing implies ex phi st phi = f1* f2 & phi is increasing proof assume that A1: f1 is increasing and A2: f2 is increasing; reconsider f = f1*f2 as Ordinal-Sequence by A2,Th12; take f; thus f = f1*f2; let A,B; assume that A3: A in B and A4: B in dom f; reconsider A1 = f2.A, B1 = f2.B as Ordinal; A5: B1 in dom f1 by A4,FUNCT_1:11; dom f c= dom f2 by RELAT_1:25; then A6: A1 in B1 by A2,A3,A4,ORDINAL2:def 12; A7: f.B = f1.B1 by A4,FUNCT_1:12; f.A = f1.A1 by A3,A4,FUNCT_1:12,ORDINAL1:10; hence thesis by A1,A6,A5,A7,ORDINAL2:def 12; end; theorem Th14: f1 is increasing & A is_limes_of f2 & sup rng f1 = dom f2 & fi = f2*f1 implies A is_limes_of fi proof assume that A1: f1 is increasing and A2: A = {} & (ex B st B in dom f2 & for C st B c= C & C in dom f2 holds f2.C = {}) or A <> {} & for B,C st B in A & A in C ex D st D in dom f2 & for E being Ordinal st D c= E & E in dom f2 holds B in f2.E & f2.E in C and A3: sup rng f1 = dom f2 and A4: fi = f2*f1; per cases; case A = {}; then consider B such that A5: B in dom f2 and A6: for C st B c= C & C in dom f2 holds f2.C = {} by A2; consider B1 being Ordinal such that A7: B1 in rng f1 and A8: B c= B1 by A3,A5,ORDINAL2:21; consider x such that A9: x in dom f1 and A10: B1 = f1.x by A7,FUNCT_1:def 3; reconsider x as Ordinal by A9; take x; B1 in dom f2 by A3,A7,ORDINAL2:19; hence x in dom fi by A4,A9,A10,FUNCT_1:11; let C such that A11: x c= C and A12: C in dom fi; reconsider C1 = f1.C as Ordinal; A13: dom fi c= dom f1 by A4,RELAT_1:25; then B1 c= C1 by A1,A10,A11,A12,Th9; then A14: B c= C1 by A8,XBOOLE_1:1; C1 in rng f1 by A12,A13,FUNCT_1:def 3; then f2.C1 = {} by A3,A6,A14,ORDINAL2:19; hence thesis by A4,A12,FUNCT_1:12; end; case A <> {}; let B,C; assume that A15: B in A and A16: A in C; consider D such that A17: D in dom f2 and A18: for A1 st D c= A1 & A1 in dom f2 holds B in f2.A1 & f2.A1 in C by A2,A15 ,A16; consider B1 being Ordinal such that A19: B1 in rng f1 and A20: D c= B1 by A3,A17,ORDINAL2:21; consider x such that A21: x in dom f1 and A22: B1 = f1.x by A19,FUNCT_1:def 3; reconsider x as Ordinal by A21; take x; B1 in dom f2 by A3,A19,ORDINAL2:19; hence x in dom fi by A4,A21,A22,FUNCT_1:11; let E be Ordinal such that A23: x c= E and A24: E in dom fi; reconsider E1 = f1.E as Ordinal; A25: dom fi c= dom f1 by A4,RELAT_1:25; then E1 in rng f1 by A24,FUNCT_1:def 3; then A26: E1 in dom f2 by A3,ORDINAL2:19; B1 c= E1 by A1,A22,A23,A24,A25,Th9; then A27: D c= E1 by A20,XBOOLE_1:1; then A28: f2.E1 in C by A18,A26; B in f2.E1 by A18,A27,A26; hence thesis by A4,A24,A28,FUNCT_1:12; end; end; theorem Th15: phi is increasing implies phi|A is increasing proof assume A1: for A,B st A in B & B in dom phi holds phi.A in phi.B; let B,C such that A2: B in C and A3: C in dom (phi|A); A4: phi.B = (phi|A).B by A2,A3,FUNCT_1:47,ORDINAL1:10; dom (phi|A) c= dom phi by RELAT_1:60; then phi.B in phi.C by A1,A2,A3; hence thesis by A3,A4,FUNCT_1:47; end; theorem Th16: phi is increasing & dom phi is limit_ordinal implies sup phi is limit_ordinal proof assume that A1: phi is increasing and A2: dom phi is limit_ordinal; now let A; assume A in sup phi; then consider B such that A3: B in rng phi and A4: A c= B by ORDINAL2:21; consider x such that A5: x in dom phi and A6: B = phi.x by A3,FUNCT_1:def 3; reconsider x as Ordinal by A5; A7: succ x in dom phi by A2,A5,ORDINAL1:28; reconsider C = phi.succ x as Ordinal; x in succ x by ORDINAL1:6; then B in C by A1,A6,A7,ORDINAL2:def 12; then A8: succ B c= C by ORDINAL1:21; A9: succ A c= succ B by A4,ORDINAL2:1; C in rng phi by A7,FUNCT_1:def 3; then C in sup phi by ORDINAL2:19; then succ B in sup phi by A8,ORDINAL1:12; hence succ A in sup phi by A9,ORDINAL1:12; end; hence thesis by ORDINAL1:28; end; Lm5: rng f c= X implies (g|X)*f = g*f proof A1: f"rng f = dom f by RELAT_1:134; assume rng f c= X; then A2: f"rng f c= f"X by RELAT_1:143; f"X c= dom f by RELAT_1:132; then A3: f"X = dom f by A2,A1,XBOOLE_0:def 10; dom ((g|X)*f) = f"(dom (g|X)) by RELAT_1:147 .= f"(dom g /\ X) by RELAT_1:61 .= f"(dom g) /\ f"X by FUNCT_1:68 .= f"(dom g) by A3,RELAT_1:132,XBOOLE_1:28 .= dom (g*f) by RELAT_1:147; hence thesis by GRFUNC_1:3,RELAT_1:64; end; theorem fi is increasing & fi is continuous & psi is continuous & phi = psi*fi implies phi is continuous proof assume that A1: fi is increasing and A2: for A,B st A in dom fi & A <> {} & A is limit_ordinal & B = fi.A holds B is_limes_of fi|A and A3: for A,B st A in dom psi & A <> {} & A is limit_ordinal & B = psi.A holds B is_limes_of psi|A and A4: phi = psi*fi; let A,B such that A5: A in dom phi and A6: A <> {} and A7: A is limit_ordinal and A8: B = phi.A; reconsider A1 = fi.A as Ordinal; A9: fi|A is increasing by A1,Th15; A10: dom phi c= dom fi by A4,RELAT_1:25; then A c= dom fi by A5,ORDINAL1:def 2; then A11: dom (fi|A) = A by RELAT_1:62; A1 is_limes_of fi|A by A2,A5,A6,A7,A10; then lim (fi|A) = A1 by ORDINAL2:def 10; then A12: sup (fi|A) = A1 by A6,A7,A11,A9,Th8; A13: B = psi.A1 by A4,A5,A8,FUNCT_1:12; A14: {} in A by A6,ORDINAL3:8; A15: A1 in dom psi by A4,A5,FUNCT_1:11; then A1 c= dom psi by ORDINAL1:def 2; then A16: dom (psi|A1) = A1 by RELAT_1:62; A17: rng (fi|A) c= sup rng (fi|A) proof let x; assume A18: x in rng (fi|A); then ex y st y in dom (fi|A) & x = (fi|A).y by FUNCT_1:def 3; hence thesis by A18,ORDINAL2:19; end; phi|A = psi*(fi| A ) by A4,RELAT_1:83; then A19: phi|A = (psi|A1)*(fi|A) by A17,A12,Lm5; A c= A1 by A1,A5,A10,Th10; then B is_limes_of psi|A1 by A3,A7,A13,A15,A11,A14,A9,A12,Th16; hence thesis by A9,A16,A12,A19,Th14; end; theorem (for A st A in dom fi holds fi.A = C+^A) implies fi is increasing proof assume A1: for A st A in dom fi holds fi.A = C+^A; let A,B; assume that A2: A in B and A3: B in dom fi; A4: fi.B = C+^B by A1,A3; fi.A = C+^A by A1,A2,A3,ORDINAL1:10; hence thesis by A2,A4,ORDINAL2:32; end; theorem Th19: C <> {} & (for A st A in dom fi holds fi.A = A*^C) implies fi is increasing proof assume that A1: C <> {} and A2: for A st A in dom fi holds fi.A = A*^C; let A,B; assume that A3: A in B and A4: B in dom fi; A5: fi.B = B*^C by A2,A4; fi.A = A*^C by A2,A3,A4,ORDINAL1:10; hence thesis by A1,A3,A5,ORDINAL2:40; end; theorem Th20: A <> {} implies exp({},A) = {} proof defpred FF[Ordinal] means $1 <> {} implies exp({},$1) = {}; A1: FF[B] implies FF[succ B] proof assume that FF[B] and succ B <> {}; thus exp({},succ B) = {}*^exp({},B) by ORDINAL2:44 .= {} by ORDINAL2:35; end; A2: for B st B <> {} & B is limit_ordinal & for C st C in B holds FF[C] holds FF[B] proof deffunc F(Ordinal) = exp({},$1); let A such that A3: A <> {} and A4: A is limit_ordinal and A5: for C st C in A holds FF[C] and A <> {}; consider fi such that A6: dom fi = A & for B st B in A holds fi.B = F(B) from ORDINAL2:sch 3; {} is_limes_of fi proof per cases; case {} = {}; take B = 1; {} in A by A3,ORDINAL3:8; hence B in dom fi by A4,A6,Lm3,ORDINAL1:28; let D; assume A7: B c= D; assume A8: D in dom fi; then FF[D] by A5,A6; hence thesis by A6,A7,A8,Lm3,ORDINAL1:21; end; case {} <> {}; thus thesis; end; end; then lim fi = {} by ORDINAL2:def 10; hence thesis by A3,A4,A6,ORDINAL2:45; end; A9: FF[{}]; FF[B] from ORDINAL2:sch 1(A9,A1,A2); hence thesis; end; Lm6: A <> {} & A is limit_ordinal implies for fi st dom fi = A & for B st B in A holds fi.B = exp({},B) holds {} is_limes_of fi proof assume that A1: A <> {} and A2: A is limit_ordinal; let fi; assume that A3: dom fi = A and A4: for B st B in A holds fi.B = exp({},B); per cases; case {} = {}; take B = 1; {} in A by A1,ORDINAL3:8; hence B in dom fi by A2,A3,Lm3,ORDINAL1:28; let D; assume that A5: B c= D and A6: D in dom fi; A7: D <> {} by A5,Lm3,ORDINAL1:21; exp({},D) = fi.D by A3,A4,A6; hence thesis by A7,Th20; end; case {} <> {}; thus thesis; end; end; Lm7: A <> {} implies for fi st dom fi = A & for B st B in A holds fi.B = exp(1 ,B) holds 1 is_limes_of fi proof assume that A1: A <> {}; let fi; assume that A2: dom fi = A and A3: for B st B in A holds fi.B = exp(1,B); per cases; case 1 = {}; hence thesis; end; case 1 <> {}; let A1,A2 be Ordinal such that A4: A1 in 1 and A5: 1 in A2; take B = {}; thus B in dom fi by A1,A2,ORDINAL3:8; let D; assume that B c= D and A6: D in dom fi; exp(1,D) = fi.D by A2,A3,A6; hence thesis by A4,A5,ORDINAL2:46; end; end; Lm8: for A st A <> {} & A is limit_ordinal holds ex fi st dom fi = A & (for B st B in A holds fi.B = exp(C,B)) & ex D st D is_limes_of fi proof defpred P[Ordinal] means $1 <> {} & $1 is limit_ordinal & for fi st dom fi = $1 & for B st B in $1 holds fi.B = exp(C,B) for D holds not D is_limes_of fi; let A such that A1: A <> {} and A2: A is limit_ordinal and A3: for fi st dom fi = A & for B st B in A holds fi.B = exp(C,B) for D holds not D is_limes_of fi; deffunc F(Ordinal) = exp(C,$1); A4: ex A st P[A] by A1,A2,A3; consider A such that A5: P[A] and A6: for A1 st P[A1] holds A c= A1 from ORDINAL1:sch 1(A4); consider fi such that A7: dom fi = A & for B st B in A holds fi.B = F(B) from ORDINAL2:sch 3; A8: now assume C = {} or C = 1; then {} is_limes_of fi or 1 is_limes_of fi by A5,A7,Lm6,Lm7; hence contradiction by A5,A7; end; then {} in C by ORDINAL3:8; then 1 c= C by Lm3,ORDINAL1:21; then A9: 1 c< C by A8,XBOOLE_0:def 8; A10: for B2,B1 being Ordinal st B1 in B2 & B2 in A holds exp(C,B1) in exp(C, B2) proof defpred V[Ordinal] means for B1 being Ordinal st B1 in $1 & $1 in A holds exp(C,B1) in exp(C,$1); A11: V[B] implies V[succ B] proof assume A12: for B1 being Ordinal st B1 in B & B in A holds exp(C,B1) in exp (C,B); let B1 be Ordinal such that A13: B1 in succ B and A14: succ B in A; A15: B1 c= B by A13,ORDINAL1:22; B in succ B by ORDINAL1:6; then A16: B in A by A14,ORDINAL1:10; A17: 1*^exp(C,B) = exp(C,B) by ORDINAL2:39; A18: exp(C,B) <> {} proof now per cases; suppose B = {}; hence thesis by ORDINAL2:43; end; suppose A19: B <> {}; B in succ B by ORDINAL1:6; then B in A by A14,ORDINAL1:10; hence thesis by A12,A19,ORDINAL3:8; end; end; hence thesis; end; A20: exp(C,succ B) = C*^exp(C,B) by ORDINAL2:44; then A21: exp(C,B) in exp(C,succ B) by A9,A18,A17,ORDINAL1:11,ORDINAL2:40; now assume B1 <> B; then B1 c< B by A15,XBOOLE_0:def 8; then B1 in B by ORDINAL1:11; then exp(C,B1) in exp(C,B) by A12,A16; hence thesis by A21,ORDINAL1:10; end; hence thesis by A9,A18,A20,A17,ORDINAL1:11,ORDINAL2:40; end; A22: for B st B <> {} & B is limit_ordinal & for D st D in B holds V[D] holds V[B] proof let B such that A23: B <> {} and A24: B is limit_ordinal and A25: for D st D in B holds V[D]; let B1 be Ordinal; assume that A26: B1 in B and A27: B in A; consider psi such that A28: dom psi = B and A29: for D st D in B holds psi.D = exp(C,D) and ex D st D is_limes_of psi by A6,A24,A26,A27,ORDINAL1:5; psi.B1 = exp(C,B1) by A26,A29; then A30: exp(C,B1) in rng psi by A26,A28,FUNCT_1:def 3; psi is increasing proof let B1,B2 be Ordinal; assume that A31: B1 in B2 and A32: B2 in dom psi; B2 in A by A27,A28,A32,ORDINAL1:10; then A33: exp(C,B1) in exp(C,B2) by A25,A28,A31,A32; psi.B1 = exp(C,B1) by A28,A29,A31,A32,ORDINAL1:10; hence thesis by A28,A29,A32,A33; end; then A34: lim psi = sup psi by A23,A24,A28,Th8; exp(C,B) = lim psi by A23,A24,A28,A29,ORDINAL2:45; hence thesis by A34,A30,ORDINAL2:19; end; A35: V[{}]; thus for B holds V[B] from ORDINAL2:sch 1(A35,A11,A22); end; fi is increasing proof let B1,B2 be Ordinal; assume that A36: B1 in B2 and A37: B2 in dom fi; A38: fi.B1 = exp(C,B1) by A7,A36,A37,ORDINAL1:10; exp(C,B1) in exp(C,B2) by A7,A10,A36,A37; hence thesis by A7,A37,A38; end; then sup fi is_limes_of fi by A5,A7,Th8; hence contradiction by A5,A7; end; theorem Th21: A <> {} & A is limit_ordinal implies for fi st dom fi = A & for B st B in A holds fi.B = exp(C,B) holds exp(C,A) is_limes_of fi proof assume that A1: A <> {} and A2: A is limit_ordinal; consider psi such that A3: dom psi = A and A4: for B st B in A holds psi.B = exp(C,B) and A5: ex D st D is_limes_of psi by A1,A2,Lm8; let fi such that A6: dom fi = A and A7: for B st B in A holds fi.B = exp(C,B); now let x; assume A8: x in A; then reconsider B = x as Ordinal; thus fi.x = exp(C,B) by A7,A8 .= psi.x by A4,A8; end; then fi = psi by A6,A3,FUNCT_1:2; then consider D such that A9: D is_limes_of fi by A5; D = lim fi by A9,ORDINAL2:def 10 .= exp(C,A) by A1,A2,A6,A7,ORDINAL2:45; hence thesis by A9; end; theorem Th22: C <> {} implies exp(C,A) <> {} proof defpred P[Ordinal] means exp(C,$1) <> {}; assume A1: C <> {}; A2: for A st P[A] holds P[succ A] proof let A such that A3: exp(C,A) <> {}; exp(C,succ A) = C*^exp(C,A) by ORDINAL2:44; hence thesis by A1,A3,ORDINAL3:31; end; A4: for A st A <> {} & A is limit_ordinal & for B st B in A holds P[B] holds P[A] proof let A such that A5: A <> {} and A6: A is limit_ordinal and A7: for B st B in A holds exp(C,B) <> {}; consider fi such that A8: dom fi = A and A9: for B st B in A holds fi.B = exp(C,B) and A10: ex D st D is_limes_of fi by A5,A6,Lm8; A11: exp(C,A) = lim fi by A5,A6,A8,A9,ORDINAL2:45; assume A12: exp(C,A) = {}; consider D such that A13: D is_limes_of fi by A10; lim fi = D by A13,ORDINAL2:def 10; then consider B such that A14: B in dom fi and A15: for D st B c= D & D in dom fi holds fi.D = {} by A11,A13,A12, ORDINAL2:def 9; fi.B = exp(C,B) by A8,A9,A14; hence contradiction by A7,A8,A14,A15; end; A16: P[{}] by ORDINAL2:43; for A holds P[A] from ORDINAL2:sch 1(A16,A2,A4); hence thesis; end; theorem Th23: 1 in C implies exp(C,A) in exp(C,succ A) proof A1: 1*^exp(C,A) = exp(C,A) by ORDINAL2:39; assume 1 in C; then exp(C,A) in C*^exp(C,A) by A1,Th22,ORDINAL2:40; hence thesis by ORDINAL2:44; end; theorem Th24: 1 in C & A in B implies exp(C,A) in exp(C,B) proof defpred OO[Ordinal] means for A st A in $1 holds exp(C,A) in exp(C,$1); A1: for B st B <> {} & B is limit_ordinal & for D st D in B holds OO[D] holds OO[B] proof deffunc F(Ordinal) = exp(C,$1); let B such that A2: B <> {} and A3: B is limit_ordinal and A4: for D st D in B holds OO[D]; consider fi such that A5: dom fi = B & for D st D in B holds fi.D = F(D) from ORDINAL2:sch 3; fi is increasing proof let B1,B2 be Ordinal; assume that A6: B1 in B2 and A7: B2 in dom fi; A8: fi.B1 = exp(C,B1) by A5,A6,A7,ORDINAL1:10; exp(C,B1) in exp(C,B2) by A4,A5,A6,A7; hence thesis by A5,A7,A8; end; then A9: sup fi = lim fi by A2,A3,A5,Th8; let A such that A10: A in B; fi.A = exp(C,A) by A10,A5; then A11: exp(C,A) in rng fi by A10,A5,FUNCT_1:def 3; exp(C,B) = lim fi by A2,A3,A5,ORDINAL2:45; hence thesis by A9,A11,ORDINAL2:19; end; assume A12: 1 in C; A13: for B st OO[B] holds OO[succ B] proof let B such that A14: for A st A in B holds exp(C,A) in exp(C,B); let A; assume A in succ B; then A15: A c= B by ORDINAL1:22; A16: now assume A <> B; then A c< B by A15,XBOOLE_0:def 8; hence exp(C,A) in exp(C,B) by A14,ORDINAL1:11; end; exp(C,B) in exp(C,succ B) by A12,Th23; hence thesis by A16,ORDINAL1:10; end; A17: OO[{}]; for B holds OO[B] from ORDINAL2:sch 1(A17,A13,A1); hence thesis; end; theorem Th25: 1 in C & (for A st A in dom fi holds fi.A = exp(C,A)) implies fi is increasing proof assume that A1: 1 in C and A2: for A st A in dom fi holds fi.A = exp(C,A); let A,B; assume that A3: A in B and A4: B in dom fi; A5: fi.B = exp(C,B) by A2,A4; fi.A = exp(C,A) by A2,A3,A4,ORDINAL1:10; hence thesis by A1,A3,A5,Th24; end; theorem 1 in C & A <> {} & A is limit_ordinal implies for fi st dom fi = A & for B st B in A holds fi.B = exp(C,B) holds exp(C,A) = sup fi proof assume that A1: 1 in C and A2: A <> {} and A3: A is limit_ordinal; let fi; assume that A4: dom fi = A and A5: for B st B in A holds fi.B = exp(C,B); fi is increasing by A1,A4,A5,Th25; then lim fi = sup fi by A2,A3,A4,Th8; hence thesis by A2,A3,A4,A5,ORDINAL2:45; end; theorem C <> {} & A c= B implies exp(C,A) c= exp(C,B) proof A1: A c< B iff A c= B & A <> B by XBOOLE_0:def 8; assume C <> {}; then {} in C by ORDINAL3:8; then A2: 1 c= C by Lm3,ORDINAL1:21; assume A c= B; then A3: A in B or A = B by A1,ORDINAL1:11; now per cases; suppose A4: C = 1; then exp(C,A) = 1 by ORDINAL2:46; hence thesis by A4,ORDINAL2:46; end; suppose C <> 1; then 1 c< C by A2,XBOOLE_0:def 8; then 1 in C by ORDINAL1:11; then exp(C,A) in exp(C,B) or exp(C,A) = exp(C,B) by A3,Th24; hence thesis by ORDINAL1:def 2; end; end; hence thesis; end; theorem A c= B implies exp(A,C) c= exp(B,C) proof defpred P[Ordinal] means exp(A,$1) c= exp(B,$1); assume A1: A c= B; A2: for C st P[C] holds P[succ C] proof let C; A3: exp(B,succ C) = B*^exp(B,C) by ORDINAL2:44; exp(A,succ C) = A*^exp(A,C) by ORDINAL2:44; hence thesis by A1,A3,ORDINAL3:20; end; A4: for C st C <> {} & C is limit_ordinal & for D st D in C holds P[D] holds P[C] proof deffunc F(Ordinal) = exp(A,$1); let C; assume that A5: C <> {} and A6: C is limit_ordinal and A7: for D st D in C holds exp(A,D) c= exp(B,D); consider f1 such that A8: dom f1 = C & for D st D in C holds f1.D = F(D) from ORDINAL2:sch 3; deffunc F(Ordinal) = exp(B,$1); consider f2 such that A9: dom f2 = C & for D st D in C holds f2.D = F(D) from ORDINAL2:sch 3; A10: now let D; assume A11: D in dom f1; then A12: f1.D = exp(A,D) by A8; f2.D = exp(B,D) by A8,A9,A11; hence f1.D c= f2.D by A7,A8,A11,A12; end; A13: exp(A,C) is_limes_of f1 by A5,A6,A8,Th21; exp(B,C) is_limes_of f2 by A5,A6,A9,Th21; hence thesis by A8,A9,A13,A10,Th6; end; exp(A,{}) = 1 by ORDINAL2:43; then A14: P[{}] by ORDINAL2:43; for C holds P[C] from ORDINAL2:sch 1(A14,A2,A4); hence thesis; end; theorem 1 in C & A <> {} implies 1 in exp(C,A) proof assume that A1: 1 in C and A2: A <> {}; exp(C,{}) = 1 by ORDINAL2:43; hence thesis by A1,A2,Th24,ORDINAL3:8; end; theorem Th30: exp(C,A+^B) = exp(C,B)*^exp(C,A) proof defpred P[Ordinal] means exp(C,A+^$1) = exp(C,$1)*^exp(C,A); A1: 1 = exp(C,{}) by ORDINAL2:43; A2: for B st P[B] holds P[succ B] proof let B such that A3: exp(C,A+^B) = exp(C,B)*^exp(C,A); thus exp(C,A+^succ B) = exp(C,succ(A+^B)) by ORDINAL2:28 .= C*^exp(C,A+^B) by ORDINAL2:44 .= C*^exp(C,B)*^exp(C,A) by A3,ORDINAL3:50 .= exp(C,succ B)*^exp(C,A) by ORDINAL2:44; end; A4: for B st B <> {} & B is limit_ordinal & for D st D in B holds P[D] holds P[B] proof deffunc F(Ordinal) = exp(C,$1); let B such that A5: B <> {} and A6: B is limit_ordinal and A7: for D st D in B holds exp(C,A+^D) = exp(C,D)*^exp(C,A); consider fi such that A8: dom fi = B & for D st D in B holds fi.D = F(D) from ORDINAL2:sch 3; consider psi such that A9: dom psi = A+^B & for D st D in A+^B holds psi.D = F(D) from ORDINAL2:sch 3; deffunc F(Ordinal) = exp(C,$1); consider f1 such that A10: dom f1 = A & for D st D in A holds f1.D = F(D) from ORDINAL2:sch 3; A11: now let D; assume D in dom(fi*^exp(C,A)); then A12: D in dom fi by ORDINAL3:def 4; hence psi.((dom f1)+^D) = exp(C,A+^D) by A8,A9,A10,ORDINAL2:32 .= (exp(C,D))*^exp(C,A) by A7,A8,A12 .= (fi.D)*^exp(C,A) by A8,A12 .= (fi*^exp(C,A)).D by A12,ORDINAL3:def 4; end; A13: now let D such that A14: D in dom f1; A c= A+^B by ORDINAL3:24; hence psi.D = exp(C,D) by A9,A10,A14 .= f1.D by A10,A14; end; dom psi = (dom f1)+^(dom(fi*^exp(C,A))) by A8,A9,A10,ORDINAL3:def 4; then A15: psi = f1^(fi*^exp(C,A)) by A13,A11,Def1; exp(C,B)*^exp(C,A) is_limes_of fi*^exp(C,A) by A5,A6,A8,Th5,Th21; then A16: exp(C,B)*^exp(C,A) is_limes_of psi by A15,Th3; A17: A+^B <> {} by A5,ORDINAL3:26; A+^B is limit_ordinal by A5,A6,ORDINAL3:29; then lim psi = exp(C,A+^B) by A9,A17,ORDINAL2:45; hence thesis by A16,ORDINAL2:def 10; end; exp(C,A) = 1*^exp(C,A) by ORDINAL2:39; then A18: P[{}] by A1,ORDINAL2:27; for B holds P[B] from ORDINAL2:sch 1(A18,A2,A4); hence thesis; end; theorem exp(exp(C,A),B) = exp(C,B*^A) proof defpred P[Ordinal] means exp(exp(C,A),$1) = exp(C,$1*^A); A1: exp(C,{}) = 1 by ORDINAL2:43; A2: for B st P[B] holds P[succ B] proof let B; assume exp(exp(C,A),B) = exp(C,B*^A); hence exp(exp(C,A),succ B) = exp(C,A)*^exp(C,B*^A) by ORDINAL2:44 .= exp(C,B*^A+^A) by Th30 .= exp(C,(succ B)*^A) by ORDINAL2:36; end; A3: for B st B <> {} & B is limit_ordinal & for D st D in B holds P[D] holds P[B] proof deffunc F(Ordinal) = exp(exp(C,A),$1); let B; assume that A4: B <> {} and A5: B is limit_ordinal and A6: for D st D in B holds exp(exp(C,A),D) = exp(C,D*^A); consider fi such that A7: dom fi = B & for D st D in B holds fi.D = F(D) from ORDINAL2:sch 3; deffunc F(Ordinal) = $1*^A; consider f1 such that A8: dom f1 = B & for D st D in B holds f1.D = F(D) from ORDINAL2:sch 3; deffunc F(Ordinal) = exp(C,$1); consider f2 such that A9: dom f2 = B*^A & for D st D in B*^A holds f2.D = F(D) from ORDINAL2:sch 3; A10: now assume A11: A <> {}; then B*^A <> {} by A4,ORDINAL3:31; then A12: exp(C,B*^A) is_limes_of f2 by A5,A9,Th21,ORDINAL3:40; A13: rng f1 c= dom f2 proof let x; assume x in rng f1; then consider y such that A14: y in dom f1 and A15: x = f1.y by FUNCT_1:def 3; reconsider y as Ordinal by A14; x = y*^A by A8,A14,A15; hence thesis by A8,A9,A11,A14,ORDINAL2:40; end; A16: sup rng f1 = dom f2 proof sup rng f1 c= sup dom f2 by A13,ORDINAL2:22; hence sup rng f1 c= dom f2 by ORDINAL2:18; let x; assume A17: x in dom f2; then reconsider D = x as Ordinal; consider A1 such that A18: A1 in B and A19: D in A1*^A by A5,A9,A17,ORDINAL3:41; f1.A1 = A1*^A by A8,A18; then A1*^A in rng f1 by A8,A18,FUNCT_1:def 3; then A1*^A in sup rng f1 by ORDINAL2:19; hence thesis by A19,ORDINAL1:10; end; A20: dom(f2*f1) = B proof thus dom(f2*f1) c= B by A8,RELAT_1:25; let x; assume A21: x in B; then reconsider E = x as Ordinal; A22: f1.E = E*^A by A8,A21; E*^A in B*^A by A11,A21,ORDINAL2:40; hence thesis by A8,A9,A21,A22,FUNCT_1:11; end; now let x; assume A23: x in B; then reconsider D = x as Ordinal; A24: f1.D = D*^A by A8,A23; thus fi.x = exp(exp(C,A),D) by A7,A23 .= exp(C,D*^A) by A6,A23 .= f2.(f1.D) by A9,A11,A23,A24,ORDINAL2:40 .= (f2*f1).x by A8,A23,FUNCT_1:13; end; then fi = f2*f1 by A7,A20,FUNCT_1:2; then exp(C,B*^A) is_limes_of fi by A8,A11,A12,A16,Th14,Th19; then exp(C,B*^A) = lim fi by ORDINAL2:def 10; hence thesis by A4,A5,A7,ORDINAL2:45; end; A25: B*^{} = {} by ORDINAL2:38; exp(C,{}) = 1 by ORDINAL2:43; hence thesis by A25,A10,ORDINAL2:46; end; exp(exp(C,A),{}) = 1 by ORDINAL2:43; then A26: P[{}] by A1,ORDINAL2:35; for B holds P[B] from ORDINAL2:sch 1(A26,A2,A3); hence thesis; end; theorem 1 in C implies A c= exp(C,A) proof defpred P[Ordinal] means $1 c= exp(C,$1); assume A1: 1 in C; A2: P[B] implies P[succ B] proof assume A3: B c= exp(C,B); A4: exp(C,B) = 1*^exp(C,B) by ORDINAL2:39; exp(C,succ B) = C*^exp(C,B) by ORDINAL2:44; then exp(C,B) in exp(C,succ B) by A1,A4,Th22,ORDINAL2:40; then B in exp(C,succ B) by A3,ORDINAL1:12; hence thesis by ORDINAL1:21; end; A5: for A st A <> {} & A is limit_ordinal & for B st B in A holds P[B] holds P[A] proof deffunc F(Ordinal) = exp(C,$1); let A such that A6: A <> {} and A7: A is limit_ordinal and A8: for B st B in A holds B c= exp(C,B); consider fi such that A9: dom fi = A & for B st B in A holds fi.B = F(B) from ORDINAL2:sch 3; let x; assume A10: x in A; then reconsider B = x as Ordinal; fi.B = exp(C,B) by A9,A10; then exp(C,B) in rng fi by A9,A10,FUNCT_1:def 3; then A11: exp(C,B) in sup fi by ORDINAL2:19; fi is increasing by A1,A9,Th25; then A12: sup fi = lim fi by A6,A7,A9,Th8 .= exp(C,A) by A6,A7,A9,ORDINAL2:45; B c= exp(C,B) by A8,A10; hence thesis by A12,A11,ORDINAL1:12; end; A13: P[{}] by XBOOLE_1:2; P[B] from ORDINAL2:sch 1(A13,A2,A5); hence thesis; end; scheme CriticalNumber { phi(Ordinal) -> Ordinal } : ex A st phi(A) = A provided A1: for A,B st A in B holds phi(A) in phi(B) and A2: for A st A <> {} & A is limit_ordinal for phi st dom phi = A & for B st B in A holds phi.B = phi(B) holds phi(A) is_limes_of phi proof A3: now defpred P[Ordinal] means not $1 c= phi($1); assume A4: ex A st P[A]; consider A such that A5: P[A] and A6: for B st P[B] holds A c= B from ORDINAL1:sch 1(A4); phi(phi(A)) in phi(A) by A1,A5,ORDINAL1:16; then not phi(A) c= phi(phi(A)) by ORDINAL1:5; hence contradiction by A5,A6; end; deffunc G(Ordinal,T-Sequence) = {}; deffunc F(Ordinal,Ordinal) = phi($2); consider phi such that A7: dom phi = omega and A8: {} in omega implies phi.{} = phi({}) and A9: for A st succ A in omega holds phi.(succ A) = F(A,phi.A) and for A st A in omega & A <> {} & A is limit_ordinal holds phi.A = G(A,phi |A) from ORDINAL2:sch 11; assume A10: not thesis; A11: now let A; A12: A <> phi(A) by A10; A c= phi(A) by A3; then A c< phi(A) by A12,XBOOLE_0:def 8; hence A in phi(A) by ORDINAL1:11; end; A13: phi is increasing proof let A,B; assume that A14: A in B and A15: B in dom phi; defpred R[Ordinal] means A+^$1 in omega & $1 <> {} implies phi.A in phi.(A +^$1); A16: for B st B <> {} & B is limit_ordinal & for C st C in B holds R[C] holds R[B] proof let B such that A17: B <> {} and A18: B is limit_ordinal and for C st C in B holds A+^C in omega & C <> {} implies phi.A in phi.( A+^C) and A19: A+^B in omega and A20: B <> {}; A+^B <> {} by A20,ORDINAL3:26; then A21: {} in A+^B by ORDINAL3:8; A+^B is limit_ordinal by A17,A18,ORDINAL3:29; then omega c= A+^B by A21,ORDINAL1:def 11; hence thesis by A19,ORDINAL1:5; end; A22: for C st R[C] holds R[succ C] proof let C such that A23: A+^C in omega & C <> {} implies phi.A in phi.(A+^C) and A24: A+^succ C in omega and succ C <> {}; reconsider D = phi.(A+^C) as Ordinal; A25: A+^C in succ(A+^C) by ORDINAL1:6; A26: D in phi(D) by A11; A27: A+^succ C = succ(A+^C) by ORDINAL2:28; then phi.(A+^succ C) = phi(D) by A9,A24; hence thesis by A23,A24,A25,A27,A26,ORDINAL1:10,ORDINAL2:27; end; A28: R[{}]; A29: for C holds R[C] from ORDINAL2:sch 1(A28,A22,A16); ex C st B = A+^C & C <> {} by A14,ORDINAL3:28; hence thesis by A7,A15,A29; end; deffunc phi(Ordinal) = phi ($1); consider fi such that A30: dom fi = sup phi & for A st A in sup phi holds fi.A = phi(A) from ORDINAL2:sch 3; phi({}) in rng phi by A7,A8,Lm1,FUNCT_1:def 3; then A31: sup phi <> {} by ORDINAL2:19; then A32: phi(sup phi) is_limes_of fi by A2,A7,A13,A30,Lm2,Th16; A33: sup fi c= sup phi proof let x; assume A34: x in sup fi; then reconsider A = x as Ordinal; consider B such that A35: B in rng fi and A36: A c= B by A34,ORDINAL2:21; consider y such that A37: y in dom fi and A38: B = fi.y by A35,FUNCT_1:def 3; reconsider y as Ordinal by A37; consider C such that A39: C in rng phi and A40: y c= C by A30,A37,ORDINAL2:21; y c< C iff y <> C & y c= C by XBOOLE_0:def 8; then A41: phi(y) in phi(C) or y = C by A1,A40,ORDINAL1:11; B = phi(y) by A30,A37,A38; then A42: B c= phi(C) by A41,ORDINAL1:def 2; consider z such that A43: z in dom phi and A44: C = phi.z by A39,FUNCT_1:def 3; reconsider z as Ordinal by A43; A45: succ z in omega by A7,A43,Lm2,ORDINAL1:28; then A46: phi.succ z in rng phi by A7,FUNCT_1:def 3; phi.succ z = phi(C) by A9,A44,A45; then phi(C) in sup phi by A46,ORDINAL2:19; then B in sup phi by A42,ORDINAL1:12; hence thesis by A36,ORDINAL1:12; end; A47: fi is increasing proof let A,B; assume that A48: A in B and A49: B in dom fi; A50: fi.B = phi(B) by A30,A49; fi.A = phi(A) by A30,A48,A49,ORDINAL1:10; hence thesis by A1,A48,A50; end; sup phi is limit_ordinal by A7,A13,Lm2,Th16; then sup fi = lim fi by A30,A31,A47,Th8 .= phi(sup phi) by A32,ORDINAL2:def 10; hence contradiction by A11,A33,ORDINAL1:5; end; reserve W for Universe; registration let W; cluster ordinal for Element of W; existence proof A1: On W c= W by ORDINAL2:7; {} in On W by CLASSES2:51,ORDINAL3:8; hence thesis by A1; end; end; definition let W; mode Ordinal of W is ordinal Element of W; mode Ordinal-Sequence of W is Function of On W, On W; end; registration let W; cluster non empty for Ordinal of W; existence proof A1: On W c= W by ORDINAL2:7; {} in On W by CLASSES2:51,ORDINAL3:8; then 1 in W by A1,Lm3,CLASSES2:5; hence thesis; end; end; registration let W; cluster On W -> non empty; coherence by CLASSES2:51; end; registration let W; cluster -> T-Sequence-like Ordinal-yielding for Ordinal-Sequence of W; coherence proof let s be Ordinal-Sequence of W; thus dom s is ordinal by FUNCT_2:def 1; take On W; thus rng s c= On W by RELAT_1:def 19; end; end; reserve A1,B1 for Ordinal of W, phi for Ordinal-Sequence of W; scheme UOSLambda { W() -> Universe, F(set) -> Ordinal of W() } : ex phi being Ordinal-Sequence of W() st for a being Ordinal of W() holds phi.a = F(a) proof consider psi such that A1: dom psi = On W() & for A st A in On W() holds psi.A = F(A) from ORDINAL2:sch 3; rng psi c= On W() proof let x; assume x in rng psi; then consider y such that A2: y in dom psi and A3: x = psi.y by FUNCT_1:def 3; reconsider y as Ordinal by A2; x = F(y) by A1,A2,A3; hence thesis by ORDINAL1:def 9; end; then reconsider psi as Ordinal-Sequence of W() by A1,FUNCT_2:def 1,RELSET_1:4 ; take psi; let a be Ordinal of W(); a in On W() by ORDINAL1:def 9; hence thesis by A1; end; definition let W; func 0-element_of W -> Ordinal of W equals {}; correctness proof A1: On W c= W by ORDINAL2:7; {} in On W by ORDINAL3:8; then reconsider A = {} as Ordinal of W by A1; A = {}; hence thesis; end; func 1-element_of W -> non empty Ordinal of W equals 1; correctness proof A2: On W c= W by ORDINAL2:7; {} in On W by ORDINAL3:8; then reconsider A = 1 as Ordinal of W by A2,Lm3,CLASSES2:5; A = 1; hence thesis; end; let phi,A1; redefine func phi.A1 -> Ordinal of W; coherence proof reconsider B = phi.A1 as Ordinal; A3: dom phi = On W by FUNCT_2:def 1; A4: rng phi c= On W by RELAT_1:def 19; A1 in On W by ORDINAL1:def 9; then B in rng phi by A3,FUNCT_1:def 3; then A5: B in On W by A4; On W c= W by ORDINAL2:7; hence thesis by A5; end; end; definition let W; let p2,p1 be Ordinal-Sequence of W; redefine func p1*p2 -> Ordinal-Sequence of W; coherence proof A1: rng p2 c= On W by RELAT_1:def 19; A2: dom p2 = On W by FUNCT_2:def 1; dom p1 = On W by FUNCT_2:def 1; then A3: dom(p1*p2) = On W by A2,A1,RELAT_1:27; then reconsider f = p1*p2 as T-Sequence by ORDINAL1:def 7; A4: rng p1 c= On W by RELAT_1:def 19; rng(p1*p2) c= rng p1 by RELAT_1:26; then rng f c= On W by A4,XBOOLE_1:1; hence thesis by A3,FUNCT_2:def 1,RELSET_1:4; end; end; theorem 0-element_of W = {} & 1-element_of W = 1; definition let W,A1; redefine func succ A1 -> non empty Ordinal of W; coherence by CLASSES2:5; let B1; redefine func A1 +^ B1 -> Ordinal of W; coherence proof defpred P[Ordinal] means $1 in W implies A1+^$1 in W; A1: for B st for C st C in B holds P[C] holds P[B] proof let B such that A2: for C st C in B holds C in W implies A1+^C in W and A3: B in W; [:B,{1-element_of W}:] in W by A3,CLASSES2:61; then [:A1,{0-element_of W}:] \/ [:B,{1-element_of W}:] in W by CLASSES2:60; then A4: card([:A1,{0-element_of W}:] \/ [:B,{1-element_of W}:]) in card W by CLASSES2:1; A5: A1+^B c= W proof let x; assume A6: x in A1+^B; then reconsider A = x as Ordinal; A7: now A8: B c= W by A3,ORDINAL1:def 2; assume A1 c= A; then consider C such that A9: A = A1+^C by ORDINAL3:27; C in B by A6,A9,ORDINAL3:22; hence thesis by A2,A9,A8; end; A10: A in A1 or A1 c= A by ORDINAL1:16; A1 c= W by ORDINAL1:def 2; hence thesis by A10,A7; end; card(A1+^B) = card([:A1,{0-element_of W}:] \/ [:B,{ 1-element_of W} :] ) by CARD_2:9; hence thesis by A4,A5,CLASSES1:1; end; for B holds P[B] from ORDINAL1:sch 2(A1); hence thesis; end; end; definition let W,A1,B1; redefine func A1 *^ B1 -> Ordinal of W; coherence proof defpred P[Ordinal] means $1 in W implies $1*^B1 in W; A1: for A st for C st C in A holds P[C] holds P[A] proof let A such that A2: for C st C in A holds C in W implies C*^B1 in W and A3: A in W; [:A,B1:] in W by A3,CLASSES2:61; then A4: card [:A,B1:] in card W by CLASSES2:1; A5: A*^B1 c= W proof let x; A6: B1 c= W by ORDINAL1:def 2; assume A7: x in A*^B1; then reconsider B = x as Ordinal; B1 <> {} by A7,ORDINAL2:38; then consider C,D such that A8: B = C*^B1+^D and A9: D in B1 by ORDINAL3:47; C*^B1 c= B by A8,ORDINAL3:24; then C*^B1 in A*^B1 by A7,ORDINAL1:12; then A10: C in A by ORDINAL3:34; A c= W by A3,ORDINAL1:def 2; then reconsider CB = C*^B1, D as Ordinal of W by A2,A9,A6,A10; x = CB+^D by A8; hence thesis; end; card(A*^B1) = card [:A,B1:] by CARD_2:11; hence thesis by A4,A5,CLASSES1:1; end; for A holds P[A] from ORDINAL1:sch 2(A1); hence thesis; end; end; theorem Th34: A1 in dom phi proof dom phi = On W by FUNCT_2:def 1; hence thesis by ORDINAL1:def 9; end; theorem Th35: dom fi in W & rng fi c= W implies sup fi in W proof assume that A1: dom fi in W and A2: rng fi c= W; ex A st rng fi c= A by ORDINAL2:def 4; then for x st x in rng fi holds x is Ordinal; then reconsider B = union rng fi as Ordinal by ORDINAL1:23; A3: rng fi = fi.:(dom fi) by RELAT_1:113; A4: sup fi c= succ B proof let x; assume A5: x in sup fi; then reconsider A = x as Ordinal; consider C such that A6: C in rng fi and A7: A c= C by A5,ORDINAL2:21; C c= union rng fi by A6,ZFMISC_1:74; then A c= B by A7,XBOOLE_1:1; hence thesis by ORDINAL1:22; end; card dom fi in card W by A1,CLASSES2:1; then card rng fi in card W by A3,CARD_1:67,ORDINAL1:12; then rng fi in W by A2,CLASSES1:1; then union rng fi in W by CLASSES2:59; then succ B in W by CLASSES2:5; hence thesis by A4,CLASSES1:def 1; end; reserve L for T-Sequence; theorem phi is increasing & phi is continuous & omega in W implies ex A st A in dom phi & phi.A = A proof deffunc D(set,set) = {}; assume that A1: phi is increasing and A2: phi is continuous and A3: omega in W; deffunc C(set,set) = phi.$2; reconsider N = phi.(0-element_of W) as Ordinal; consider L such that A4: dom L = omega and A5: {} in omega implies L.{} = N and A6: for A st succ A in omega holds L.(succ A) = C(A,L.A) and for A st A in omega & A <> {} & A is limit_ordinal holds L.A = D(A,L|A) from ORDINAL2:sch 5; defpred P[Ordinal] means $1 in dom L implies L.$1 is Ordinal of W; A7: for A st P[A] holds P[succ A] proof let A such that A8: A in dom L implies L.A is Ordinal of W and A9: succ A in dom L; A in succ A by ORDINAL1:6; then reconsider x = L.A as Ordinal of W by A8,A9,ORDINAL1:10; L.succ A = phi.x by A4,A6,A9; hence thesis; end; A10: for A st A <> {} & A is limit_ordinal & for B st B in A holds P[B] holds P[A] proof let A such that A11: A <> {} and A12: A is limit_ordinal and for B st B in A holds B in dom L implies L.B is Ordinal of W and A13: A in dom L; {} in A by A11,ORDINAL3:8; then omega c= A by A12,ORDINAL1:def 11; hence thesis by A4,A13,ORDINAL1:5; end; A14: P[{}] by A4,A5; A15: for A holds P[A] from ORDINAL2:sch 1(A14,A7,A10); rng L c= sup rng L proof let x; assume A16: x in rng L; then consider y such that A17: y in dom L and A18: x = L.y by FUNCT_1:def 3; reconsider y as Ordinal by A17; reconsider A = L.y as Ordinal of W by A15,A17; A in sup rng L by A16,A18,ORDINAL2:19; hence thesis by A18; end; then reconsider L as Ordinal-Sequence by ORDINAL2:def 4; A19: dom phi = On W by FUNCT_2:def 1; assume A20: not thesis; A21: now let A1; A1 in dom phi by Th34; then A22: A1 c= phi.A1 by A1,Th10; A1 <> phi.A1 by A20,Th34; then A1 c< phi.A1 by A22,XBOOLE_0:def 8; hence A1 in phi.A1 by ORDINAL1:11; end; L is increasing proof let A,B; assume that A23: A in B and A24: B in dom L; defpred P[Ordinal] means A+^$1 in omega & $1 <> {} implies L.A in L.(A+^$1 ); A25: for B st B <> {} & B is limit_ordinal & for C st C in B holds P[C] holds P[B] proof let B such that A26: B <> {} and A27: B is limit_ordinal and for C st C in B holds A+^C in omega & C <> {} implies L.A in L.(A+^C ) and A28: A+^B in omega and A29: B <> {}; A+^B <> {} by A29,ORDINAL3:26; then A30: {} in A+^B by ORDINAL3:8; A+^B is limit_ordinal by A26,A27,ORDINAL3:29; then omega c= A+^B by A30,ORDINAL1:def 11; hence thesis by A28,ORDINAL1:5; end; A31: for C st P[C] holds P[succ C] proof let C such that A32: A+^C in omega & C <> {} implies L.A in L.(A+^C) and A33: A+^succ C in omega and succ C <> {}; A34: A+^succ C = succ(A+^C) by ORDINAL2:28; A35: A+^C in succ(A+^C) by ORDINAL1:6; then reconsider D = L.(A+^C) as Ordinal of W by A4,A15,A33,A34, ORDINAL1:10; A36: D in phi.D by A21; L.(A+^succ C) = phi.D by A6,A33,A34; hence thesis by A32,A33,A35,A34,A36,ORDINAL1:10,ORDINAL2:27; end; A37: P[{}]; A38: for C holds P[C] from ORDINAL2:sch 1(A37,A31,A25); ex C st B = A+^C & C <> {} by A23,ORDINAL3:28; hence thesis by A4,A24,A38; end; then A39: sup L is limit_ordinal by A4,Lm2,Th16; A40: rng L c= W proof let x; assume x in rng L; then consider y such that A41: y in dom L and A42: x = L.y by FUNCT_1:def 3; reconsider y as Ordinal by A41; L.y is Ordinal of W by A15,A41; hence thesis by A42; end; then reconsider S = sup L as Ordinal of W by A3,A4,Th35; set fi = phi|sup L; N in rng L by A4,A5,Lm1,FUNCT_1:def 3; then A43: sup L <> {} by ORDINAL2:19; A44: S in On W by ORDINAL1:def 9; then A45: phi.S is_limes_of fi by A2,A43,A39,A19,ORDINAL2:def 13; S c= dom phi by A44,A19,ORDINAL1:def 2; then A46: dom fi = S by RELAT_1:62; A47: sup fi c= sup L proof let x; assume A48: x in sup fi; then reconsider A = x as Ordinal; consider B such that A49: B in rng fi and A50: A c= B by A48,ORDINAL2:21; consider y such that A51: y in dom fi and A52: B = fi.y by A49,FUNCT_1:def 3; reconsider y as Ordinal by A51; consider C such that A53: C in rng L and A54: y c= C by A46,A51,ORDINAL2:21; reconsider C1 = C as Ordinal of W by A40,A53; y c< C1 iff y c= C1 & y <> C1 by XBOOLE_0:def 8; then y in C1 & C1 in dom phi or y = C by A19,A54,ORDINAL1:11,def 9; then A55: phi.y in phi.C1 or y = C1 by A1,ORDINAL2:def 12; B = phi.y by A51,A52,FUNCT_1:47; then A56: B c= phi.C1 by A55,ORDINAL1:def 2; consider z such that A57: z in dom L and A58: C = L.z by A53,FUNCT_1:def 3; reconsider z as Ordinal by A57; A59: succ z in omega by A4,A57,Lm2,ORDINAL1:28; then A60: L.succ z in rng L by A4,FUNCT_1:def 3; L.succ z = phi.C by A6,A58,A59; then phi.C1 in sup L by A60,ORDINAL2:19; then B in sup L by A56,ORDINAL1:12; hence thesis by A50,ORDINAL1:12; end; fi is increasing proof A61: dom fi c= dom phi by RELAT_1:60; let A,B; assume that A62: A in B and A63: B in dom fi; A64: fi.B = phi.B by A63,FUNCT_1:47; fi.A = phi.A by A62,A63,FUNCT_1:47,ORDINAL1:10; hence thesis by A1,A62,A63,A61,A64,ORDINAL2:def 12; end; then sup fi = lim fi by A43,A39,A46,Th8 .= phi.(sup L) by A45,ORDINAL2:def 10; then not S in phi.S by A47,ORDINAL1:5; hence contradiction by A21; end; begin reserve e,u for set; theorem A is_cofinal_with B & B is_cofinal_with C implies A is_cofinal_with C proof given xi1 being Ordinal-Sequence such that A1: dom xi1 = B and A2: rng xi1 c= A and A3: xi1 is increasing and A4: A = sup xi1; given xi2 being Ordinal-Sequence such that A5: dom xi2 = C and A6: rng xi2 c= B and A7: xi2 is increasing and A8: B = sup xi2; consider xi being Ordinal-Sequence such that A9: xi = xi1*xi2 and A10: xi is increasing by A3,A7,Th13; take xi; thus A11: dom xi = C by A1,A5,A6,A9,RELAT_1:27; rng xi c= rng xi1 by A9,RELAT_1:26; hence A12: rng xi c= A & xi is increasing by A2,A10,XBOOLE_1:1; thus A c= sup xi proof let a be set; assume A13: a in A; then reconsider a as Ordinal; consider b being Ordinal such that A14: b in rng xi1 and A15: a c= b by A4,A13,ORDINAL2:21; consider e such that A16: e in B and A17: b = xi1.e by A1,A14,FUNCT_1:def 3; reconsider e as Ordinal by A16; consider c being Ordinal such that A18: c in rng xi2 and A19: e c= c by A8,A16,ORDINAL2:21; consider u such that A20: u in C and A21: c = xi2.u by A5,A18,FUNCT_1:def 3; reconsider u as Ordinal by A20; A22: xi1.c = xi.u by A9,A11,A20,A21,FUNCT_1:12; xi.u in rng xi by A11,A20,FUNCT_1:def 3; then A23: xi.u in sup xi by ORDINAL2:19; xi1.e c= xi1.c by A1,A3,A6,A18,A19,Th9; hence thesis by A15,A17,A22,A23,ORDINAL1:12,XBOOLE_1:1; end; sup rng xi c= sup A by A12,ORDINAL2:22; hence thesis by ORDINAL2:18; end; theorem A is_cofinal_with B implies (A is limit_ordinal iff B is limit_ordinal ) proof given psi such that A1: dom psi = B and A2: rng psi c= A and A3: psi is increasing and A4: A = sup psi; thus A is limit_ordinal implies B is limit_ordinal proof assume A5: A is limit_ordinal; now let C; reconsider c = psi.C as Ordinal; assume A6: C in B; then psi.C in rng psi by A1,FUNCT_1:def 3; then succ c in A by A2,A5,ORDINAL1:28; then consider b being Ordinal such that A7: b in rng psi and A8: succ c c= b by A4,ORDINAL2:21; consider e such that A9: e in B and A10: b = psi.e by A1,A7,FUNCT_1:def 3; reconsider e as Ordinal by A9; c in succ c by ORDINAL1:6; then not e c= C by A1,A3,A6,A8,A10,Th9,ORDINAL1:5; then C in e by ORDINAL1:16; then succ C c= e by ORDINAL1:21; hence succ C in B by A9,ORDINAL1:12; end; hence thesis by ORDINAL1:28; end; thus thesis by A1,A3,A4,Th16; end; registration let D; let f,g be T-Sequence of D; cluster f^g -> D-valued; coherence proof rng f c= D & rng g c= D by RELAT_1:def 19; then A1: rng f \/ rng g c= D by XBOOLE_1:8; rng(f^g) c= rng f \/ rng g by Th2; hence rng(f^g) c= D by A1,XBOOLE_1:1; end; end; begin reserve k,l,m,n,k1,a,b,c,i for Nat, x,y,z,y1,y2,X,Y for set, f,g for Function; definition let n be Nat; func Seg n -> set equals { k where k is Element of NAT: 1 <= k & k <= n }; correctness; end; definition let n be Nat; redefine func Seg n -> Subset of NAT; coherence proof set X = Seg n; X c= NAT proof let x; assume x in X; then ex k being Element of NAT st x = k & 1 <= k & k <= n; hence thesis; end; hence thesis; end; end; theorem Th1: a in Seg b iff 1 <= a & a <= b proof A1: a in NAT by ORDINAL1:def 12; a in { m where m is Element of NAT: 1 <= m & m <= b } iff ex m being Element of NAT st a = m & 1 <= m & m <= b; hence thesis by A1; end; registration let n be zero Nat; cluster Seg n -> empty; coherence proof assume Seg n is not empty; then consider x being set such that A1: x in Seg n by XBOOLE_0:def 1; ex k being Element of NAT st k = x & 1 <= k & k <= 0 by A1; hence contradiction; end; end; theorem Th2: Seg 1 = { 1 } & Seg 2 = { 1,2 } proof now let x; thus x in Seg 1 implies x in { 1 } proof assume x in Seg 1; then consider k being Element of NAT such that A1: x = k and A2: 1 <= k & k <= 1; k = 1 by A2,XXREAL_0:1; hence thesis by A1,TARSKI:def 1; end; assume x in { 1 }; then x = 1 by TARSKI:def 1; hence x in Seg 1; end; hence Seg 1 = { 1 } by TARSKI:1; now let x; thus x in Seg 2 implies x in { 1,2 } proof assume x in Seg 2; then consider k being Element of NAT such that A3: x = k and A4: 1 <= k and A5: k <= 2; k <= 1 + 1 by A5; then k = 1 or k = 2 by A4,NAT_1:9; hence thesis by A3,TARSKI:def 2; end; assume x in { 1,2 }; then x = 1 or x = 2 by TARSKI:def 2; hence x in Seg 2; end; hence thesis by TARSKI:1; end; theorem Th3: a = 0 or a in Seg a proof assume a <> 0; then ex b be Nat st a = b + 1 by NAT_1:6; then a in NAT & 1 <= a by NAT_1:11; hence thesis; end; registration let n be non zero Nat; cluster Seg n -> non empty; coherence by Th3; end; theorem a+1 in Seg(a+1) by Th3; theorem Th5: a <= b iff Seg a c= Seg b proof thus a <= b implies Seg a c= Seg b proof assume A1: a <= b; let x; assume A2: x in Seg a; then reconsider c = x as Element of NAT; A3: 1 <= c by A2,Th1; c <= a by A2,Th1; then c <= b by A1,XXREAL_0:2; hence thesis by A3; end; assume A4: Seg a c= Seg b; now assume a <> 0; then a in Seg a by Th3; hence thesis by A4,Th1; end; hence thesis; end; theorem Th6: Seg a = Seg b implies a = b proof assume Seg a = Seg b; then a <= b & b <= a by Th5; hence thesis by XXREAL_0:1; end; theorem Th7: c <= a implies Seg c = Seg a /\ Seg c proof assume c <= a; then Seg c c= Seg a by Th5; hence thesis by XBOOLE_1:28; end; theorem Seg c = Seg c /\ Seg a implies c <= a by Th6,Th7; theorem Th9: Seg a \/ { a+1 } = Seg (a+1) proof thus Seg a \/ { a+1 } c= Seg (a+1) proof a+0<=a+1 by XREAL_1:7; then A1: Seg a c= Seg(a+1) by Th5; let x; assume x in Seg a \/ { a+1 }; then x in Seg a or x in { a+1 } by XBOOLE_0:def 3; then x in Seg (a+1) or x = a+1 by A1,TARSKI:def 1; hence thesis by Th3; end; let x; assume A2: x in Seg (a+1); then reconsider x as Element of NAT; A3: x<=a+1 by A2,Th1; A4: 1<=x by A2,Th1; x<=a or x=a+1 by A3,NAT_1:8; then x in Seg a or x in {a+1} by A4,TARSKI:def 1; hence thesis by XBOOLE_0:def 3; end; theorem for k being Nat holds Seg k = Seg(k + 1) \ {k + 1} proof let k be Nat; A1: Seg(k + 1) = Seg k \/ {k + 1} by Th9; Seg k misses {k + 1} proof assume not thesis; then A2: Seg k /\ {k + 1} <> {} by XBOOLE_0:def 7; set x = the Element of Seg k /\ {k + 1}; A3: x in Seg k by A2,XBOOLE_0:def 4; then reconsider x as Element of NAT; x in {k + 1} by A2,XBOOLE_0:def 4; then A4: x = k + 1 by TARSKI:def 1; x <= k by A3,Th1; hence thesis by A4,XREAL_1:29; end; hence thesis by A1,XBOOLE_1:88; end; definition let IT be Relation; attr IT is FinSequence-like means :Def2: ex n st dom IT = Seg n; end; registration cluster empty -> FinSequence-like for Relation; coherence proof let R be Relation; assume A1: R is empty; take 0; thus thesis by A1; end; end; definition mode FinSequence is FinSequence-like Function; end; reserve p,q,r,s,t for FinSequence; defpred P[set,set] means ex k st $1 = k & $2 = k+1; registration let n be Nat; cluster Seg n -> finite; coherence proof Seg n is finite proof A1: n = { k where k is Element of NAT: k < n } by AXIOMS:4; A2: for x st x in n ex y st P[x,y] proof let x; assume x in n; then ex k being Element of NAT st x = k & k < n by A1; then reconsider k = x as Nat; take k+1; thus thesis; end; consider f such that A3: dom f = n and A4: for x st x in n holds P[x,f.x] from CLASSES1:sch 1(A2); take f; thus rng f = Seg n proof thus rng f c= Seg n proof let x; assume x in rng f; then consider y being set such that A5: y in dom f and A6: x = f.y by FUNCT_1:def 3; consider k such that A7: y = k and A8: x = k+1 by A3,A4,A5,A6; ex m being Element of NAT st m = y & m < n by A1,A3,A5; then 1 <= k+1 & k+1 <= n by A7,NAT_1:11,13; hence thesis by A8; end; let x; assume x in Seg n; then consider k being Element of NAT such that A9: x = k and A10: 1 <= k and A11: k <= n; consider i being Nat such that A12: 1+i = k by A10,NAT_1:10; i in NAT & i < n by A11,A12,NAT_1:13,ORDINAL1:def 12; then A13: i in n by A1; then P[i,f.i] by A4; hence thesis by A3,A9,A12,A13,FUNCT_1:def 3; end; thus thesis by A3,ORDINAL1:def 12; end; hence thesis; end; end; registration cluster FinSequence-like -> finite for Function; coherence proof let f be Function; given n such that A1: dom f = Seg n; rng f is finite by A1,FINSET_1:8; then [:dom f, rng f:] is finite by A1; hence thesis by FINSET_1:1,RELAT_1:7; end; end; Lm1: Seg n,n are_equipotent proof defpred P[Nat] means Seg $1,$1 are_equipotent; A1: P[0]; A2: for n st P[n] holds P[n+1] proof let n such that A3: Seg n,n are_equipotent; A4: (n+1) = succ n by NAT_1:38 .= n \/ { n } by ORDINAL1:def 1; A5: Seg(n+1) = Seg n \/ { n+1 } & { n+1 },{ n } are_equipotent by Th9, CARD_1:28; A6: now assume n meets { n }; then consider x being set such that A7: x in n and A8: x in { n } by XBOOLE_0:3; x = n by A8,TARSKI:def 1; hence contradiction by A7; end; now assume Seg n meets { n+1 }; then consider x being set such that A9: x in Seg n and A10: x in { n+1 } by XBOOLE_0:3; A11: x = n+1 by A10,TARSKI:def 1; not n+1 <= n by NAT_1:13; hence contradiction by A9,A11,Th1; end; hence thesis by A3,A4,A5,A6,CARD_1:31; end; for n holds P[n] from NAT_1:sch 2(A1,A2); hence thesis; end; Lm2: card Seg n = card n proof Seg n,n are_equipotent by Lm1; hence thesis by CARD_1:5; end; registration let n; cluster Seg n -> n-element; coherence proof card Seg n = card n by Lm2; hence card Seg n = n by CARD_1:def 2; end; end; notation let p; synonym len p for card p; end; definition let p; redefine func len p -> Element of NAT means :Def3: Seg it = dom p; coherence proof card p = card p; hence thesis; end; compatibility proof let k be Element of NAT; consider n such that A1: dom p = Seg n by Def2; dom p,p are_equipotent proof deffunc F(set) = [$1,p.$1]; consider g being Function such that A2: dom g = dom p and A3: for x st x in dom p holds g.x = F(x) from FUNCT_1:sch 3; take g; thus g is one-to-one proof let x,y; assume that A4: x in dom g and A5: y in dom g; assume g.x = g.y; then [x,p.x] = g.y by A2,A3,A4 .= [y,p.y] by A2,A3,A5; hence thesis by XTUPLE_0:1; end; thus dom g = dom p by A2; thus rng g c= p proof let i be set; assume i in rng g; then consider x such that A6: x in dom g and A7: g.x = i by FUNCT_1:def 3; g.x = [x,p.x] by A2,A3,A6; hence thesis by A2,A6,A7,FUNCT_1:1; end; let x,y be set; assume A8: [x,y] in p; then A9: x in dom p by FUNCT_1:1; y = p.x by A8,FUNCT_1:1; then g.x = [x,y] by A3,A9; hence thesis by A2,A9,FUNCT_1:def 3; end; then A10: card p = card dom p by CARD_1:5; thus k = card p implies Seg k = dom p proof assume k = card p; then k = card n by A1,A10,Lm2; hence thesis by A1,CARD_1:def 2; end; assume A11: Seg k = dom p; thus k = card k by CARD_1:def 2 .= card p by A10,A11,Lm2; end; end; definition let p; redefine func dom p -> Subset of NAT; coherence proof dom p = Seg len p by Def3; hence thesis; end; end; theorem (ex k st dom f c= Seg k) implies ex p st f c= p proof given k such that A1: dom f c= Seg k; deffunc F(set) = f.$1; consider g such that A2: dom g = Seg k & for x st x in Seg k holds g.x = F(x) from FUNCT_1:sch 3; reconsider g as FinSequence by A2,Def2; take g; let y,z be set; assume A3: [y,z] in f; then A4: y in dom f by XTUPLE_0:def 12; then A5: f.y = z by A3,FUNCT_1:def 2; [y,g.y] in g by A1,A2,A4,FUNCT_1:1; hence thesis by A1,A2,A4,A5; end; scheme SeqEx{A()->Nat,P[set,set]}: ex p st dom p = Seg A() & for k st k in Seg A() holds P[k,p.k] provided A1: for k st k in Seg A() ex x st P[k,x] proof A2: for x st x in Seg A() ex y st P[x,y] by A1; consider f being Function such that A3: dom f = Seg A() & for x st x in Seg A() holds P[x,f.x] from CLASSES1:sch 1(A2); reconsider p=f as FinSequence by A3,Def2; take p; thus thesis by A3; end; scheme SeqLambda{A()->Nat,F(set) -> set}: ex p being FinSequence st len p = A() & for k st k in dom p holds p.k=F(k) proof consider f being Function such that A1: dom f = Seg A() & for x st x in Seg A() holds f.x=F(x) from FUNCT_1:sch 3; A2: A() in NAT by ORDINAL1:def 12; reconsider p=f as FinSequence by A1,Def2; take p; thus thesis by A1,A2,Def3; end; theorem z in p implies ex k st k in dom p & z=[k,p.k] proof assume A1: z in p; then consider x,y such that A2: z=[x,y] by RELAT_1:def 1; x in dom p by A1,A2,FUNCT_1:1; then reconsider k = x as Nat; take k; thus thesis by A1,A2,FUNCT_1:1; end; theorem Th13: dom p = dom q & (for k st k in dom p holds p.k = q.k) implies p=q proof assume that A1: dom p = dom q and A2: for k st k in dom p holds p.k = q.k; for x st x in dom p holds p.x=q.x by A2; hence thesis by A1,FUNCT_1:2; end; theorem Th14: len p = len q & (for k st 1 <= k & k <= len p holds p.k = q.k) implies p=q proof assume that A1: len p = len q and A2: for k st 1<=k & k<=len p holds p.k = q.k; A3: dom p = Seg len p by Def3; A4: dom q = Seg len q by Def3; now let x; assume A5: x in dom p; then reconsider k=x as Nat; 1 <= k & k <= len p by A3,A5,Th1; hence p.x = q.x by A2; end; hence thesis by A1,A3,A4,FUNCT_1:2; end; theorem Th15: p|(Seg a) is FinSequence proof A1: dom(p|Seg a) = dom p /\ Seg a by RELAT_1:61 .=Seg len p /\ Seg a by Def3; len p <= a or a <= len p; then dom(p|Seg a) = Seg len p or dom(p|Seg a) = Seg a by A1,Th7; hence thesis by Def2; end; theorem rng p c= dom f implies f*p is FinSequence proof assume rng p c= dom f; then dom(f*p) = dom p by RELAT_1:27 .= Seg len p by Def3; hence thesis by Def2; end; theorem Th17: a <= len p & q = p|(Seg a) implies len q = a & dom q = Seg a proof assume that A1: a <= len p and A2: q = p|(Seg a); Seg a c= Seg len p by A1,Th5; then Seg a c= dom p by Def3; then a in NAT & dom q = Seg a by A2,ORDINAL1:def 12,RELAT_1:62; hence thesis by Def3; end; definition let D be set; mode FinSequence of D -> FinSequence means :Def4: rng it c= D; existence proof rng {} c= D by XBOOLE_1:2; hence thesis; end; end; registration let D be set; cluster -> D-valued for FinSequence of D; coherence proof let f be FinSequence of D; thus rng f c= D by Def4; end; end; Lm3: for D being set, f being FinSequence of D holds f is PartFunc of NAT,D proof let D be set, f be FinSequence of D; dom f c= NAT & rng f c= D by Def4; hence thesis by RELSET_1:4; end; registration cluster empty -> FinSequence-like for Relation; coherence; end; registration let D be set; cluster FinSequence-like for PartFunc of NAT,D; existence proof {} is PartFunc of NAT,D by RELSET_1:12; hence thesis; end; end; definition let D be set; redefine mode FinSequence of D -> FinSequence-like PartFunc of NAT,D; coherence by Lm3; end; reserve D for set; theorem Th18: for p being FinSequence of D holds p|(Seg a) is FinSequence of D proof let p be FinSequence of D; A1: p|(Seg a) is FinSequence by Th15; rng(p|(Seg a)) c= rng p & rng p c= D by Def4,RELAT_1:70; then rng(p|(Seg a)) c= D by XBOOLE_1:1; hence thesis by A1,Def4; end; theorem for D being non empty set ex p being FinSequence of D st len p = a proof let D be non empty set; reconsider a as Element of NAT by ORDINAL1:def 12; set y = the Element of D; set p = Seg a --> y; A1: dom p = Seg a by FUNCOP_1:13; then reconsider p as FinSequence by Def2; rng p c= {y} & {y} c= D by FUNCOP_1:13,ZFMISC_1:31; then rng p c= D by XBOOLE_1:1; then reconsider q=p as FinSequence of D by Def4; take q; thus thesis by A1,Def3; end; Lm4: q = {} iff len q = 0; theorem p <> {} iff len p >= 1 proof hereby assume p <> {}; then len p+1 > 0+1 by XREAL_1:8; hence len p >=1 by NAT_1:13; end; assume len p >= 1; hence thesis; end; definition let x; func <*x*> -> set equals { [1,x] }; coherence; end; definition let D be set; func <*>D -> FinSequence of D equals {}; coherence proof rng {} c= D by XBOOLE_1:2; hence thesis by Def4; end; end; registration let D be set; cluster <*>D -> empty; coherence; end; registration let D be set; cluster empty for FinSequence of D; existence proof take <*>D; thus thesis; end; end; definition let p,q; func p^q -> FinSequence means :Def7: dom it = Seg (len p + len q) & (for k st k in dom p holds it.k=p.k) & for k st k in dom q holds it.(len p + k) = q.k; existence proof defpred P[set,set] means (for k st k=$1 & 1 <= k & k <= len p holds $2=p.k) & (for k st k=$1 & len p + 1 <= k & k <= len p + len q holds $2=q.(k-len p)); A1: for x st x in Seg(len p + len q) ex y st P[x,y] proof let x; assume x in Seg(len p + len q); then reconsider m=x as Element of NAT; A2: now assume A3: len p + 1 <= m; set y = q.(m-len p); A4: for k st k=x & 1 <= k & k <= len p holds y=p.k proof let k; assume that A5: k=x and 1 <= k and A6: k <= len p; m + (len p + 1) <= m + len p by A3,A5,A6,XREAL_1:7; then m + len p + 1 <= m + len p + 0; hence thesis by XREAL_1:6; end; for k st k=x & len p + 1 <= k & k <= len p + len q holds y=q.(k-len p); hence thesis by A4; end; now assume A7: not len p + 1 <= m; set y=p.m; ( for k st k=x & 1 <= k & k <= len p holds y=p.k)& for k st k=x & len p + 1 <= k & k <= len p + len q holds y=q.(k-len p) by A7; hence thesis; end; hence thesis by A2; end; consider f such that A8: dom f=Seg(len p + len q) & for x st x in Seg(len p + len q) holds P[x,f.x] from CLASSES1:sch 1 (A1); A9: for k st k in dom p holds f.k=p.k proof let k; assume k in dom p; then A10: k in Seg len p by Def3; then A11: 1 <= k & k <= len p by Th1; len p <= len p + len q by NAT_1:11; then Seg len p c= Seg(len p + len q) by Th5; hence thesis by A8,A10,A11; end; A12: for n st n in dom q holds f.(len p+n)=q.n proof let n; assume n in dom q; then A13: n in Seg len q by Def3; then A14: 1 <= n by Th1; A15: n <= len q by A13,Th1; A16: len p + 1 <= len p + n by A14,XREAL_1:7; A17: len p + n <= len p + len q by A15,XREAL_1:7; reconsider n as Element of NAT by ORDINAL1:def 12; len p + n <= len p + n + len p by NAT_1:11; then len p + 1 <= len p + n + len p by A16,XXREAL_0:2; then 1 <= len p + n by XREAL_1:6; then (len p + n) in Seg(len p + len q) by A17; then f.(len p + n)=q.(n + len p - len p) by A8,A16,A17; hence thesis; end; reconsider r=f as FinSequence by A8,Def2; take r; thus thesis by A8,A9,A12; end; uniqueness proof let f,g be FinSequence such that A18: dom f = Seg(len p + len q) and A19: for k st k in dom p holds f.k=p.k and A20: for k st k in dom q holds f.(len p + k)=q.k and A21: dom g = Seg(len p + len q) and A22: for k st k in dom p holds g.k=p.k and A23: for k st k in dom q holds g.(len p + k)=q.k; for x st x in Seg(len p + len q) holds f.x=g.x proof let x; assume A24: x in Seg(len p + len q); then reconsider k=x as Element of NAT; A25: 1 <= k by A24,Th1; A26: now assume len p + 1 <= k; then consider m be Nat such that A27: len p + 1 + m = k by NAT_1:10; reconsider m as Element of NAT by ORDINAL1:def 12; len p + (1 + m) <= len p + len q by A24,A27,Th1; then 1+0<=1+m & 1 + m <= len q by XREAL_1:6; then (1+m) in Seg len q; then A28: (1+m) in dom q by Def3; then g.(len p +(1+m)) = q.(1+m) by A23; hence thesis by A20,A27,A28; end; now assume not len p + 1 <= k; then k <= len p by NAT_1:8; then k in Seg len p by A25; then A29: k in dom p by Def3; then f.k=p.k by A19; hence thesis by A22,A29; end; hence thesis by A26; end; hence thesis by A18,A21,FUNCT_1:2; end; end; theorem Th21: p = (p ^ q) | (dom p) proof A1: dom(p ^ q) = Seg(len p + len q) by Def7; A2: dom p = Seg len p by Def3; then A3: dom p = dom(p ^ q) /\ Seg len p by A1,Th7,NAT_1:12; for x st x in dom p holds p.x = (p ^ q).x by Def7; hence thesis by A2,A3,FUNCT_1:46; end; theorem Th22: len(p^q) = len p + len q proof dom(p^q) = Seg(len p + len q) by Def7; hence thesis by Def3; end; theorem Th23: for k being Nat st len p + 1 <= k & k <= len p + len q holds (p^q).k=q.(k-len p) proof let k be Nat; assume that A1: len p + 1 <= k and A2: k <= len p + len q; consider m be Nat such that A3: (len p + 1)+m=k by A1,NAT_1:10; reconsider m as Element of NAT by ORDINAL1:def 12; A4: len p+(1+m) = k by A3; 1+m = k - len p by A3; then A5: 1 <= 1+m by A1,XREAL_1:19; k-len p <= len q by A2,XREAL_1:20; then 1+m in Seg len q by A3,A5; then 1+m in dom q by Def3; hence thesis by A4,Def7; end; theorem Th24: for k being Nat st len p < k & k <= len(p^q) holds (p^q).k = q.(k - len p) proof let k be Nat; assume len p < k & k <= len(p^q); then len p + 1 <= k & k <= len p + len q by Th22,NAT_1:13; hence thesis by Th23; end; theorem Th25: for k being Nat st k in dom (p^q) holds (k in dom p or ex n st n in dom q & k=len p + n ) proof let k be Nat; assume k in dom(p^q); then A1: k in Seg len (p^q) by Def3; then A2: k in Seg(len p + len q) by Th22; A3: k in NAT & 1 <= k by A1,Th1; A4: now assume not len p+1 <= k; then k <= len p by NAT_1:8; then k in Seg len p by A3; hence thesis by Def3; end; now assume len p + 1 <= k; then consider n be Nat such that A5: k=len p + 1 + n by NAT_1:10; reconsider n as Element of NAT by ORDINAL1:def 12; len p + (1 + n) <= len p + len q by A2,A5,Th1; then A6: 1+n <= len q by XREAL_1:6; 1 <= 1+n by NAT_1:11; then 1+n in Seg len q by A6; then A7: 1+n in dom q by Def3; k=len p + (1+n) by A5; hence thesis by A7; end; hence thesis by A4; end; theorem Th26: dom p c= dom(p^q) proof len p <= len p + len q by NAT_1:11; then Seg len p c= Seg(len p + len q) by Th5; then Seg len p c= dom(p^q) by Def7; hence thesis by Def3; end; theorem Th27: x in dom q implies ex k st k=x & len p + k in dom(p^q) proof assume A1: x in dom q; then A2: x in Seg len q by Def3; reconsider k=x as Element of NAT by A1; take k; A3: 1 <= k by A2,Th1; A4: k <= len q by A2,Th1; k <= len p + k by NAT_1:11; then A5: 1 <= len p + k by A3,XXREAL_0:2; len p + k <= len p + len q by A4,XREAL_1:7; then len p + k in Seg(len p + len q) by A5; hence thesis by Def7; end; theorem Th28: k in dom q implies len p + k in dom(p^q) proof assume k in dom q; then ex n st n=k & len p + n in dom(p^q) by Th27; hence thesis; end; theorem Th29: rng p c= rng(p^q) proof now let x; assume x in rng p; then consider y such that A1: y in dom p and A2: x=p.y by FUNCT_1:def 3; reconsider k=y as Element of NAT by A1; A3: dom p c= dom(p^q) by Th26; (p^q).k=p.k by A1,Def7; hence x in rng(p^q) by A1,A2,A3,FUNCT_1:def 3; end; hence thesis by TARSKI:def 3; end; theorem Th30: rng q c= rng(p^q) proof now let x; assume x in rng q; then consider y such that A1: y in dom q and A2: x=q.y by FUNCT_1:def 3; reconsider k=y as Element of NAT by A1; len p + k in dom(p^q) & (p^q).(len p + k) = q.k by A1,Def7,Th28; hence x in rng(p^q) by A2,FUNCT_1:def 3; end; hence thesis by TARSKI:def 3; end; theorem Th31: rng(p^q) = rng p \/ rng q proof now let x; assume x in rng(p^q); then consider y such that A1: y in dom(p^q) and A2: x=(p^q).y by FUNCT_1:def 3; A3: y in Seg(len p + len q) by A1,Def7; reconsider k=y as Element of NAT by A1; A4: 1 <= k by A3,Th1; A5: k <= len p + len q by A3,Th1; A6: now assume A7: len p + 1 <= k; then A8: q.(k-len p) = x by A2,A5,Th23; consider m be Nat such that A9: (len p+1)+m = k by A7,NAT_1:10; reconsider m as Element of NAT by ORDINAL1:def 12; len p +(1+m) = k by A9; then 1+0<=1+m & 1+m <= len q by A5,XREAL_1:6; then 1+m in Seg len q; then k-len p in dom q by A9,Def3; hence x in rng q by A8,FUNCT_1:def 3; end; now assume not len p + 1 <= k; then k <= len p by NAT_1:8; then k in Seg len p by A4; then A10: k in dom p by Def3; then p.k = x by A2,Def7; hence x in rng p by A10,FUNCT_1:def 3; end; hence x in rng p \/ rng q by A6,XBOOLE_0:def 3; end; then A11: rng(p^q) c= rng p \/ rng q by TARSKI:def 3; rng p c= rng(p^q) & rng q c= rng(p^q) by Th29,Th30; then (rng p \/ rng q) c= rng(p^q) by XBOOLE_1:8; hence thesis by A11,XBOOLE_0:def 10; end; theorem Th32: p^q^r = p^(q^r) proof A1: dom ((p^q)^r) = Seg(len (p^q) + len r) by Def7 .= Seg(len p + len q + len r) by Th22 .= Seg(len p + (len q + len r)) .= Seg(len p + len(q^r)) by Th22; A2: for k st k in dom p holds ((p^q)^r).k=p.k proof let k; assume A3: k in dom p; dom p c= dom(p^q) by Th26; hence (p^q^r).k=(p^q).k by A3,Def7 .=p.k by A3,Def7; end; for k st k in dom(q^r) holds ((p^q)^r).(len p + k)=(q^r).k proof let k; assume A4: k in dom(q^r); A5: now assume A6: k in dom q; then (len p + k) in dom(p^q) by Th28; hence (p^q^r).(len p + k) = (p^q).(len p + k) by Def7 .=q.k by A6,Def7 .=(q^r).k by A6,Def7; end; now assume not k in dom q; then consider n such that A7: n in dom r and A8: k=len q + n by A4,Th25; thus (p^q^r).(len p + k) =(p^q^r).(len p + len q + n) by A8 .=(p^q^r).(len(p^q) + n) by Th22 .=r.n by A7,Def7 .=(q^r).k by A7,A8,Def7; end; hence thesis by A5; end; hence thesis by A1,A2,Def7; end; theorem p^r = q^r or r^p = r^q implies p = q proof assume A1: p^r = q^r or r^p = r^q; A2: now assume A3: p^r = q^r; then len p + len r = len(q^r) by Th22; then len p + len r = len q + len r by Th22; then A4: dom p = Seg len q by Def3 .= dom q by Def3; for k st k in dom p holds p.k=q.k proof let k; assume A5: k in dom p; hence p.k=(q^r).k by A3,Def7 .=q.k by A4,A5,Def7; end; hence thesis by A4,Th13; end; now assume A6: r^p=r^q; then len r + len p = len(r^q) by Th22 .=len r + len q by Th22; then A7: dom p = Seg len q by Def3 .= dom q by Def3; for k st k in dom p holds p.k=q.k proof let k; assume A8: k in dom p; hence p.k = (r^q).(len r + k) by A6,Def7 .= q.k by A7,A8,Def7; end; hence thesis by A7,Th13; end; hence thesis by A1,A2; end; theorem Th34: p^{} = p & {}^p = p proof A1: dom(p^{}) = Seg len (p^{}) by Def3 .= Seg (len p + len {}) by Th22 .= dom p by Def3; for k st k in dom p holds p.k=(p^{}).k by Def7; hence p^{} = p by A1,Th13; A2: dom({}^p) = Seg len ({}^p) by Def3 .= Seg (len {} + len p) by Th22 .= dom p by Def3; for k st k in dom p holds p.k = ({}^p).k proof let k; assume A3: k in dom p; thus ({}^p).k =({}^p).(len {} + k) .=p.k by A3,Def7; end; hence {}^p=p by A2,Th13; end; theorem Th35: p^q = {} implies p={} & q={} proof assume p^q={}; then 0 = len (p^q) .= len p + len q by Th22; hence thesis; end; definition let D be set; let p,q be FinSequence of D; redefine func p^q -> FinSequence of D; coherence proof A1: rng(p^q) = rng p \/ rng q & rng p c= D by Def4,Th31; rng q c= D by Def4; hence rng(p^q) c= D by A1,XBOOLE_1:8; end; end; Lm5: for x1, y1 being set holds [x,y] in {[x1,y1]} implies x = x1 & y = y1 proof let x1, y1 be set; assume [x,y] in {[x1,y1]}; then [x,y] = [x1,y1] by TARSKI:def 1; hence thesis by XTUPLE_0:1; end; definition let x; redefine func <*x*> -> Function means :Def8: dom it = Seg 1 & it.1 = x; coherence; compatibility proof let f be Function; hereby assume A1: f = <*x*>; hence dom f = Seg 1 by Th2,RELAT_1:9; [1,x] in f by A1,TARSKI:def 1; hence f.1 = x by FUNCT_1:1; end; assume that A2: dom f = Seg 1 and A3: f.1 = x; reconsider g = { [1,f.1] } as Function; [y,z] in f iff [y,z] in g proof hereby assume A4: [y,z] in f; then A5: y in {1} by A2,Th2,XTUPLE_0:def 12; A6: z in rng f by A4,XTUPLE_0:def 13; A7: rng f = {f.1} by A2,Th2,FUNCT_1:4; A8: y = 1 by A5,TARSKI:def 1; z = f.1 by A6,A7,TARSKI:def 1; hence [y,z] in g by A8,TARSKI:def 1; end; assume [y,z] in g; then A9: y = 1 & z = f.1 by Lm5; 1 in dom f by A2; hence thesis by A9,FUNCT_1:def 2; end; hence thesis by A3,RELAT_1:def 2; end; end; registration let x; cluster <*x*> -> Function-like Relation-like; coherence; end; registration let x; cluster <*x*> -> FinSequence-like; coherence proof take 1; thus thesis by Def8; end; end; theorem Th36: p^q is FinSequence of D implies p is FinSequence of D & q is FinSequence of D proof assume p^q is FinSequence of D; then rng(p^q) c= D by Def4; then A1: rng p \/ rng q c= D by Th31; rng p c= rng p \/ rng q by XBOOLE_1:7; then rng p c= D by A1,XBOOLE_1:1; hence p is FinSequence of D by Def4; rng q c= rng p \/ rng q by XBOOLE_1:7; then rng q c= D by A1,XBOOLE_1:1; hence thesis by Def4; end; definition let x,y; func <*x,y*> -> set equals <*x*>^<*y*>; correctness; let z; func <*x,y,z*> -> set equals <*x*>^<*y*>^<*z*>; correctness; end; registration let x,y; cluster <*x,y*> -> Function-like Relation-like; coherence; let z; cluster <*x,y,z*> -> Function-like Relation-like; coherence; end; registration let x,y; cluster <*x,y*> -> FinSequence-like; coherence; let z; cluster <*x,y,z*> -> FinSequence-like; coherence; end; theorem <*x*> = { [1,x] }; theorem Th38: p=<*x*> iff dom p = Seg 1 & rng p = {x} proof thus p = <*x*> implies dom p = Seg 1 & rng p = {x} proof assume A1: p = <*x*>; hence dom p = Seg 1 by Def8; dom p = {1} by A1,Def8,Th2; then rng p = {p.1} by FUNCT_1:4; hence thesis by A1,Def8; end; assume that A2: dom p = Seg 1 and A3: rng p = {x}; 1 in dom p by A2; then p.1 in {x} by A3,FUNCT_1:def 3; then p.1 = x by TARSKI:def 1; hence thesis by A2,Def8; end; theorem Th39: p=<*x*> iff len p = 1 & rng p = {x} proof len p = 1 iff dom p = Seg 1 by Def3; hence thesis by Th38; end; theorem Th40: p = <*x*> iff len p = 1 & p.1 = x proof len p = 1 iff dom p = Seg 1 by Def3; hence thesis by Def8; end; theorem (<*x*>^p).1 = x proof 1 in Seg 1; then 1 in dom <*x*> by Def8; then (<*x*>^p).1 = <*x*>.1 by Def7; hence thesis by Def8; end; theorem Th42: (p^<*x*>).(len p + 1)=x proof dom <*x*> = Seg 1 by Def8; then 1 in dom <*x*>; hence (p^<*x*>).(len p + 1) = <*x*>.1 by Def7 .=x by Def8; end; theorem <*x,y,z*>=<*x*>^<*y,z*> & <*x,y,z*>=<*x,y*>^<*z*> by Th32; theorem Th44: p = <*x,y*> iff len p = 2 & p.1=x & p.2=y proof thus p = <*x,y*> implies len p = 2 & p.1=x & p.2=y proof assume A1: p=<*x,y*>; hence len p = len <*x*> + len <*y*> by Th22 .= 1 + len <*y*> by Th39 .= 1 + 1 by Th39 .=2; A2: 1 in {1} by TARSKI:def 1; then 1 in dom <*x*> by Def8,Th2; hence p.1 = <*x*>.1 by A1,Def7 .= x by Def8; A3: 1 in dom <*y*> by A2,Def8,Th2; thus p.2 = (<*x*>^<*y*>).(1+1) by A1 .= (<*x*>^<*y*>).(len <*x*> + 1) by Th39 .= <*y*>.1 by A3,Def7 .= y by Def8; end; assume that A4: len p = 2 and A5: p.1=x and A6: p.2=y; A7: dom p = Seg(1+1) by A4,Def3 .= Seg(len <*x*> + 1) by Th39 .= Seg(len <*x*> + len <*y*>) by Th39; A8: for k st k in dom <*x*> holds p.k=<*x*>.k proof let k; assume k in dom <*x*>; then k in {1} by Def8,Th2; then k=1 by TARSKI:def 1; hence thesis by A5,Def8; end; for k st k in dom <*y*> holds p.((len <*x*>)+k)=<*y*>.k proof let k; assume k in dom <*y*>; then A9: k in {1} by Def8,Th2; thus p.((len <*x*>) + k) = p.(1+k) by Th39 .=p.(1+1) by A9,TARSKI:def 1 .=<*y*>.1 by A6,Def8 .= <*y*>.k by A9,TARSKI:def 1; end; hence thesis by A7,A8,Def7; end; theorem Th45: p = <*x,y,z*> iff len p = 3 & p.1 = x & p.2 = y & p.3 = z proof thus p = <*x,y,z*> implies len p = 3 & p.1 = x & p.2 = y & p.3 = z proof assume A1: p =<*x,y,z*>; hence len p =len <*x,y*> + len <*z*> by Th22 .=2 + len <*z*> by Th44 .=2+1 by Th39 .=3; A2: 1 in {1} by TARSKI:def 1; then A3: 1 in dom <*x*> by Def8,Th2; thus p.1 = (<*x*>^<*y,z*>).1 by A1,Th32 .=<*x*>.1 by A3,Def7 .=x by Def8; 2 in Seg 2 & len <*x,y*> = 2 by Th44; then 2 in dom <*x,y*> by Def3; hence p.2 =<*x,y*>.2 by A1,Def7 .=y by Th44; A4: 1 in dom <*z*> by A2,Def8,Th2; thus p.3 = (<*x,y*>^<*z*>).(2+1) by A1 .=(<*x,y*>^<*z*>).(len (<*x,y*>) + 1) by Th44 .= <*z*>.1 by A4,Def7 .= z by Def8; end; assume that A5: len p = 3 and A6: p.1 = x and A7: p.2 = y and A8: p.3 = z; A9: dom p = Seg(2+1) by A5,Def3 .= Seg((len <*x,y*>) + 1) by Th44 .= Seg((len <*x,y*>) + len <*z*>) by Th39; A10: for k st k in dom <*x,y*> holds p.k=<*x,y*>.k proof let k such that A11: k in dom <*x,y*>; len <*x,y*> = 2 by Th44; then A12: k in Seg 2 by A11,Def3; A13: k=1 implies p.k=<*x,y*>.k by A6,Th44; k=2 implies p.k=<*x,y*>.k by A7,Th44; hence thesis by A12,A13,Th2,TARSKI:def 2; end; for k st k in dom <*z*> holds p.( (len <*x,y*>) + k) = <*z*>.k proof let k; assume k in dom <*z*>; then k in {1} by Def8,Th2; then A14: k = 1 by TARSKI:def 1; hence p.( (len <*x,y*>) + k) = p.(2+1) by Th44 .=<*z*>.k by A8,A14,Def8; end; hence thesis by A9,A10,Def7; end; theorem Th46: p <> {} implies ex q,x st p=q^<*x*> proof assume p <> {}; then consider n be Nat such that A1: len p = n + 1 by NAT_1:6; reconsider n as Element of NAT by ORDINAL1:def 12; reconsider q=p|Seg n as FinSequence by Th15; take q; take p.(len p); A2: dom q = dom p /\ Seg n by RELAT_1:61 .= Seg len p /\ Seg n by Def3; n <=len p by A1,NAT_1:11; then Seg n c= Seg len p by Th5; then A3: dom q = Seg n by A2,XBOOLE_1:28; A4: dom(q^<*p.(len p)*>) = Seg len (q^<*p.(len p)*>) by Def3 .= Seg(len q + len <*p.(len p)*>) by Th22 .= Seg(len q + 1) by Th39 .= Seg len p by A1,A3,Def3 .= dom p by Def3; for x st x in dom p holds p.x = (q^<*p.(len p)*>).x proof let x; assume A5: x in dom p; then reconsider k = x as Element of NAT; k in Seg(n+1) by A1,A5,Def3; then A6: k in Seg n \/ {n+1} by Th9; A7: now assume A8: k in Seg n; hence p.k=q.k by A3,FUNCT_1:47 .=(q^<*p.(len p)*>).k by A3,A8,Def7; end; now assume A9: k in {n+1}; 1 in Seg 1; then A10: 1 in dom <*p.(len p)*> by Def8; thus (q^<*p.(len p)*>).k =(q^<*p.(len p)*>).(n+1) by A9,TARSKI:def 1 .=(q^<*p.(len p)*>).(len q + 1) by A3,Def3 .=<*p.(len p)*>.1 by A10,Def7 .=p.(n+1) by A1,Def8 .=p.k by A9,TARSKI:def 1; end; hence thesis by A6,A7,XBOOLE_0:def 3; end; hence q^<*p.(len p)*>=p by A4,FUNCT_1:2; end; definition let D be non empty set; let x be Element of D; redefine func <*x*> -> FinSequence of D; coherence proof let y; assume y in rng <*x*>; then y in {x} by Th39; then y = x by TARSKI:def 1; hence thesis; end; end; scheme IndSeq{P[FinSequence]}: for p holds P[p] provided A1: P[{}] and A2: for p,x st P[p] holds P[p^<*x*>] proof let p; defpred R[set] means for p st len p = $1 holds P[p]; consider X being Subset of REAL such that A3: for x being Real holds x in X iff R[x] from SUBSET_1:sch 3; for k holds k in X proof defpred S[Nat] means $1 in X; for q st len q = 0 holds P[q] by A1,Lm4; then A4: S[0] by A3; now let n such that A5: n in X; now let q; assume A6: len q = n+1; then q <> {}; then consider r,x such that A7: q=r^<*x*> by Th46; len q = len r + len <*x*> by A7,Th22 .= len r + 1 by Th39; then P[r] by A3,A5,A6; hence P[q] by A2,A7; end; hence n+1 in X by A3; end; then A8: for n st S[n] holds S[n+1]; thus for n holds S[n] from NAT_1:sch 2(A4,A8); end; then len p in X; hence thesis by A3; end; theorem for p,q,r,s being FinSequence st p^q = r^s & len p <= len r ex t being FinSequence st p^t = r proof defpred S[FinSequence] means for p,q,s st p^q=$1^s & len p <= len $1 holds ex t st p^t=$1; A1: S[{}] proof let p,q,s; assume that p^q={}^s and A2: len p <= len {}; take {}; thus p^{} = p by Th34 .= {} by A2; end; A3: for r,x st S[r] holds S[r^<*x*>] proof let r,x; assume A4: for p,q,s st p^q=r^s & len p <= len r ex t st p^t=r; let p,q,s; assume that A5: p^q=(r^<*x*>)^s and A6: len p <= len (r^<*x*>); A7: now assume len p = len(r^<*x*>); then A8: dom p = Seg len(r^<*x*>) by Def3 .= dom(r^<*x*>) by Def3; A9: for k st k in dom p holds p.k=(r^<*x*>).k proof let k; assume A10: k in dom p; hence p.k = (r^<*x*>^s).k by A5,Def7 .=(r^<*x*>).k by A8,A10,Def7; end; p^{} = p by Th34 .=r^<*x*> by A8,A9,Th13; hence thesis; end; now assume len p <> len(r^<*x*>); then len p <> len r + len <*x*> by Th22; then A11: len p <> len r + 1 by Th39; len p <= len r + len <*x*> by A6,Th22; then A12: len p <= len r + 1 by Th39; p^q=r^(<*x*>^s) by A5,Th32; then consider t being FinSequence such that A13: p^t = r by A4,A11,A12,NAT_1:8; p^(t^<*x*>) = r^<*x*> by A13,Th32; hence thesis; end; hence thesis by A7; end; for r holds S[r] from IndSeq(A1,A3); hence thesis; end; registration cluster -> NAT-defined for FinSequence; coherence proof let f be FinSequence; thus dom f c= NAT; end; end; definition let D be set; func D* -> set means :Def11: x in it iff x is FinSequence of D; existence proof defpred P[set] means $1 is FinSequence of D; consider X such that A1: x in X iff x in bool [:NAT,D:] & P[x] from XBOOLE_0:sch 1; take X; let x; thus x in X implies x is FinSequence of D by A1; assume x is FinSequence of D; then reconsider p = x as FinSequence of D; p c= [:NAT,D:]; hence thesis by A1; end; uniqueness proof let D1,D2 be set such that A2: x in D1 iff x is FinSequence of D and A3: x in D2 iff x is FinSequence of D; now let x; thus x in D1 implies x in D2 proof assume x in D1; then x is FinSequence of D by A2; hence thesis by A3; end; assume x in D2; then x is FinSequence of D by A3; hence x in D1 by A2; end; hence thesis by TARSKI:1; end; end; registration let D be set; cluster D* -> non empty; coherence proof set f = the FinSequence of D; f in D* by Def11; hence thesis; end; end; theorem rng p = rng q & p is one-to-one & q is one-to-one implies len p = len q proof defpred P[FinSequence] means $1 is one-to-one implies for q st rng $1 = rng q & q is one-to-one holds len $1 = len q; A1: P[{}] by RELAT_1:41; now let p,x; assume A2: p is one-to-one implies for q st rng p = rng q & q is one-to-one holds len p = len q; assume A3: p ^ <* x *> is one-to-one; let q; assume that A4: rng(p ^ <* x *>) = rng q and A5: q is one-to-one; A6: rng(p ^ <* x *>) = rng p \/ rng<* x *> by Th31 .= rng p \/ {x} by Th38; x in {x} by TARSKI:def 1; then x in rng q by A4,A6,XBOOLE_0:def 3; then consider y such that A7: y in dom q and A8: x = q.y by FUNCT_1:def 3; A9: y in Seg(len q) by A7,Def3; reconsider y as Element of NAT by A7; A10: 1 <= y by A9,Th1; then consider k be Nat such that A11: 1 + k = y by NAT_1:10; A12: y <= len q by A9,Th1; then consider n be Nat such that A13: y + n = len q by NAT_1:10; reconsider k,n as Element of NAT by ORDINAL1:def 12; reconsider q1 = q | (Seg k) as FinSequence by Th15; defpred P[Nat,set] means $2 = q.(y + $1); A14: for j being Nat st j in Seg n ex x st P[j,x]; consider q2 being FinSequence such that A15: dom q2 = Seg n and A16: for j being Nat st j in Seg n holds P[j,q2.j] from SeqEx(A14); k <= y by A11,NAT_1:12; then A17: k <= len q by A12,XXREAL_0:2; then A18: len q1 = k by Th17; len(q1 ^ <* x *>) + len q2 = len q1 + len<* x *> + len q2 by Th22 .= k + 1 + len q2 by A18,Th39 .= len q by A11,A13,A15,Def3; then A19: dom q = Seg(len(q1 ^ <* x *>) + len q2) by Def3; A20: rng(q1 ^ q2) = rng q \ {x} proof thus rng(q1 ^ q2) c= rng q \ {x} proof let z be set; assume z in rng(q1 ^ q2); then A21: z in rng q1 \/ rng q2 by Th31; A22: now assume A23: z in rng q1; A24: rng q1 = q .: (Seg k) & q .: (Seg k) c= rng q by RELAT_1:111,115; consider y1 such that A25: y1 in dom q1 and A26: q1.y1 = z by A23,FUNCT_1:def 3; A27: q1.y1 = q.y1 by A25,FUNCT_1:47; A28: y1 in Seg(len q1) by A25,Def3; reconsider y1 as Element of NAT by A25; A29: y1 <= k by A18,A28,Th1; A30: k < y by A11,XREAL_1:29; Seg k c= Seg(len q) by A17,Th5; then dom q1 c= Seg(len q) by A17,Th17; then dom q1 c= dom q by Def3; then x <> z by A5,A7,A8,A25,A26,A27,A29,A30,FUNCT_1:def 4; then not z in {x} by TARSKI:def 1; hence thesis by A23,A24,XBOOLE_0:def 5; end; now assume z in rng q2; then consider y1 such that A31: y1 in dom q2 and A32: q2.y1 = z by FUNCT_1:def 3; reconsider y1 as Element of NAT by A31; A33: q2.y1 = q.(y + y1) by A15,A16,A31; A34: 1 <= y + y1 by A10,NAT_1:12; y1 <= n by A15,A31,Th1; then y + y1 <= len q by A13,XREAL_1:7; then y + y1 in Seg(len q) by A34; then A35: y + y1 in dom q by Def3; then A36: z in rng q by A32,A33,FUNCT_1:def 3; y1 <> 0 by A15,A31,Th1; then y <> y + y1; then x <> z by A5,A7,A8,A32,A33,A35,FUNCT_1:def 4; then not z in {x} by TARSKI:def 1; hence thesis by A36,XBOOLE_0:def 5; end; hence thesis by A21,A22,XBOOLE_0:def 3; end; let z be set; assume A37: z in rng q \ {x}; then consider y1 such that A38: y1 in dom q and A39: z = q.y1 by FUNCT_1:def 3; A40: y1 in Seg(len q) by A38,Def3; reconsider y1 as Element of NAT by A38; not z in {x} by A37,XBOOLE_0:def 5; then A41: y <> y1 by A8,A39,TARSKI:def 1; A42: now assume A43: y < y1; then consider j being Nat such that A44: y1 = y + j by NAT_1:10; reconsider j as Element of NAT by ORDINAL1:def 12; A45: 1 <= j by A43,A44,NAT_1:19; y + j <= len q by A40,A44,Th1; then j <= n by A13,XREAL_1:6; then A46: j in Seg n by A45; then z = q2.j by A16,A39,A44; hence z in rng q2 by A15,A46,FUNCT_1:def 3; end; now assume A47: y1 < y; A48: 1 <= y1 by A40,Th1; y1 <= k by A11,A47,NAT_1:13; then y1 in Seg k by A48; then A49: y1 in dom q1 by A17,Th17; then q1.y1 = z by A39,FUNCT_1:47; hence z in rng q1 by A49,FUNCT_1:def 3; end; then z in rng q1 \/ rng q2 by A41,A42,XBOOLE_0:def 3,XXREAL_0:1; hence thesis by Th31; end; A50: p = (p ^ <* x *>) | (dom p) by Th21; A51: rng p = rng(p ^ <* x *>) \ {x} proof thus rng p c= rng(p ^ <* x *>) \ {x} proof let z be set; assume A52: z in rng p; A53: rng p c= rng(p ^ <* x *>) by A50,RELAT_1:70; consider y1 such that A54: y1 in dom p and A55: p.y1 = z by A52,FUNCT_1:def 3; A56: y1 in Seg(len p) by A54,Def3; reconsider y1 as Element of NAT by A54; A57: (p ^ <* x *>).(len p + 1) = x by Th42; A58: (p ^ <* x *>).y1 = p.y1 by A50,A54,FUNCT_1:47; A59: y1 <= len p by A56,Th1; A60: len p < len p +1 by XREAL_1:29; A61: 1 <= y1 by A56,Th1; y1 <= len p + 1 by A59,A60,XXREAL_0:2; then A62: y1 in Seg(len p + 1) by A61; A63: len p + 1 in Seg(len p + 1) by Th3; A64: y1 in Seg(len p + len<* x *>) by A62,Th40; A65: len p + 1 in Seg(len p + len<* x *>) by A63,Th40; A66: y1 in dom(p ^ <* x *>) by A64,Def7; len p + 1 in dom(p ^ <* x *>) by A65,Def7; then x <> z by A3,A55,A57,A58,A59,A60,A66,FUNCT_1:def 4; then not z in {x} by TARSKI:def 1; hence thesis by A52,A53,XBOOLE_0:def 5; end; let z be set; assume A67: z in rng(p ^ <* x *>) \ {x}; then A68: z in rng(p ^ <* x *>); A69: not z in {x} by A67,XBOOLE_0:def 5; z in rng p \/ rng<* x *> by A68,Th31; then z in rng p or z in rng<* x *> by XBOOLE_0:def 3; hence thesis by A69,Th38; end; A70: q1 ^ q2 is one-to-one proof let y1,y2; assume that A71: y1 in dom(q1 ^ q2) & y2 in dom(q1 ^ q2) and A72: (q1 ^ q2).y1 = (q1 ^ q2).y2; reconsider m1 = y1, m2 = y2 as Element of NAT by A71; A73: q1 is one-to-one by A5,FUNCT_1:52; A74: now assume A75: m1 in dom q1 & m2 in dom q1; then (q1 ^ q2).m1 = q1.m1 & (q1 ^ q2).m2 = q1.m2 by Def7; hence thesis by A72,A73,A75,FUNCT_1:def 4; end; A76: now assume A77: m1 in dom q1; given j being Nat such that A78: j in dom q2 and A79: m2 = len q1 + j; reconsider j as Element of NAT by ORDINAL1:def 12; A80: (q1 ^ q2).m2 = q2.j by A78,A79,Def7; (q1 ^ q2).m1 = q1.m1 & q1.m1 = q.m1 by A77,Def7,FUNCT_1:47; then A81: q.m1 = q.(y + j) by A15,A16,A72,A78,A80; 1 <= j by A15,A78,Th1; then A82: 1 <= y + j by NAT_1:12; j <= n by A15,A78,Th1; then y + j <= len q by A13,XREAL_1:7; then y + j in Seg(len q) by A82; then A83: y + j in dom q by Def3; m1 in Seg k by A17,A77,Th17; then A84: m1 <= k by Th1; k < y by A11,XREAL_1:29; then A85: m1 < y by A84,XXREAL_0:2; dom q1 c= dom q & y <= y + j by NAT_1:12,RELAT_1:60; hence thesis by A5,A77,A81,A83,A85,FUNCT_1:def 4; end; A86: now assume A87: m2 in dom q1; given j be Nat such that A88: j in dom q2 and A89: m1 = len q1 + j; reconsider j as Element of NAT by ORDINAL1:def 12; A90: (q1 ^ q2).m1 = q2.j by A88,A89,Def7; (q1 ^ q2).m2 = q1.m2 & q1.m2 = q.m2 by A87,Def7,FUNCT_1:47; then A91: q.m2 = q.(y + j) by A15,A16,A72,A88,A90; 1 <= j by A15,A88,Th1; then A92: 1 <= y + j by NAT_1:12; j <= n by A15,A88,Th1; then y + j <= len q by A13,XREAL_1:7; then y + j in Seg(len q) by A92; then A93: y + j in dom q by Def3; m2 in Seg k by A17,A87,Th17; then A94: m2 <= k by Th1; k < y by A11,XREAL_1:29; then A95: m2 < y by A94,XXREAL_0:2; dom q1 c= dom q & y <= y + j by NAT_1:12,RELAT_1:60; hence thesis by A5,A87,A91,A93,A95,FUNCT_1:def 4; end; now given j1 being Nat such that A96: j1 in dom q2 and A97: m1 = len q1 + j1; given j2 being Nat such that A98: j2 in dom q2 and A99: m2 = len q1 + j2; reconsider j1,j2 as Element of NAT by ORDINAL1:def 12; A100: (q1 ^ q2).m1 = q2.j1 by A96,A97,Def7; A101: (q1 ^ q2).m2 = q2.j2 by A98,A99,Def7; A102: (q1 ^ q2).m1 = q.(y + j1) by A15,A16,A96,A100; A103: (q1 ^ q2).m2 = q.(y + j2) by A15,A16,A98,A101; A104: 1 <= j1 by A15,A96,Th1; A105: 1 <= j2 by A15,A98,Th1; A106: 1 <= y + j1 by A104,NAT_1:12; A107: 1 <= y + j2 by A105,NAT_1:12; A108: j1 <= n by A15,A96,Th1; A109: j2 <= n by A15,A98,Th1; A110: y + j1 <= len q by A13,A108,XREAL_1:7; A111: y + j2 <= len q by A13,A109,XREAL_1:7; A112: y + j1 in Seg(len q) by A106,A110; A113: y + j2 in Seg(len q) by A107,A111; A114: y + j1 in dom q by A112,Def3; y + j2 in dom q by A113,Def3; then y + j1 = y + j2 by A5,A72,A102,A103,A114,FUNCT_1:def 4; hence thesis by A97,A99; end; hence thesis by A71,A74,A76,A86,Th25; end; A115: now let j be Nat; assume A116: j in dom(q1 ^ <* x *>); A117: now assume A118: j in dom q1; then (q1 ^ <* x *>).j = q1.j by Def7; hence q.j = (q1 ^ <* x *>).j by A118,FUNCT_1:47; end; now given i be Nat such that A119: i in dom<* x *> and A120: j = len q1 + i; i in {1} by A119,Th2,Th38; then i = 1 by TARSKI:def 1; hence q.j = (q1 ^ <* x *>).j by A8,A11,A18,A120,Th42; end; hence q.j = (q1 ^ <* x *>).j by A116,A117,Th25; end; now let j be Nat; assume j in dom q2; hence q2.j = q.(len q1 + 1 + j) by A11,A15,A16,A18 .= q.(len q1 + len<* x *> + j) by Th39 .= q.(len(q1 ^ <* x *>) + j) by Th22; end; then q1 ^ <* x *> ^ q2 = q by A19,A115,Def7; then A121: len q = len(q1 ^ <* x *>) + len q2 by Th22 .= len <* x *> + len q1 + len q2 by Th22 .= 1 + len q1 + len q2 by Th40 .= 1 + (len q1 + len q2) .= len(q1 ^ q2) + 1 by Th22; len(p ^ <* x *>) = len p + len<* x *> by Th22 .= len p + 1 by Th40; hence len(p ^ <* x *>) = len q by A2,A3,A4,A20,A50,A51,A70,A121,FUNCT_1:52; end; then A122: for p,x st P[p] holds P[p^<*x*>]; for p holds P[p] from IndSeq(A1,A122); hence thesis; end; theorem {} in D* proof {} = <*>D; hence thesis by Def11; end; scheme SepSeq{D()->non empty set, P[FinSequence]}: ex X st for x holds x in X iff ex p st p in D()* & P[p] & x=p proof defpred R[set] means ex p st P[p] & $1=p; consider Y such that A1: x in Y iff x in D()* & R[x] from XBOOLE_0:sch 1; take Y; x in Y iff ex p st p in D()* & P[p] & x=p proof now assume x in Y; then x in D()* & ex p st P[p] & x=p by A1; hence ex p st p in D()* & P[p] & x=p; end; hence thesis by A1; end; hence thesis; end; definition let IT be Function; attr IT is FinSubsequence-like means :Def12: ex k st dom IT c= Seg k; end; registration cluster FinSubsequence-like for Function; existence proof take {},len {}; thus thesis; end; end; definition mode FinSubsequence is FinSubsequence-like Function; end; registration cluster FinSequence-like -> FinSubsequence-like for Function; coherence proof let p be Function; assume p is FinSequence-like; then reconsider p as FinSequence; dom p = Seg len p by Def3; hence thesis by Def12; end; let p be FinSubsequence, X be set; cluster p|X -> FinSubsequence-like; coherence proof consider k such that A1: dom p c= Seg k by Def12; dom(p|X) c= dom p by RELAT_1:60; then dom(p|X) c= Seg k by A1,XBOOLE_1:1; hence thesis by Def12; end; cluster X|`p -> FinSubsequence-like; coherence proof consider k such that A2: dom p c= Seg k by Def12; dom(X|`p) c= dom p by FUNCT_1:56; then dom(X|`p) c= Seg k by A2,XBOOLE_1:1; hence thesis by Def12; end; end; registration cluster -> NAT-defined for FinSubsequence; coherence proof let f be FinSubsequence; ex n st dom f c= Seg n by Def12; hence dom f c= NAT by XBOOLE_1:1; end; end; reserve p9 for FinSubsequence; definition let X; given k being Nat such that A1: X c= Seg k; func Sgm X -> FinSequence of NAT means :Def13: rng it = X & for l,m,k1,k2 being Nat st 1 <= l & l < m & m <= len it & k1=it.l & k2=it.m holds k1 < k2; existence proof defpred P[Nat] means for X st X c= Seg $1 ex p being FinSequence of NAT st rng p = X & for l,m,k1,k2 being Nat st ( 1 <= l & l < m & m <= len p & k1=p.l & k2=p.m) holds k1 < k2; A2: P[0] proof let X; assume A3: X c= Seg 0; take <*>(NAT); thus rng <*>(NAT) = X by A3; thus thesis; end; A4: for k being Nat st P[k] holds P[k+1] proof let k be Nat such that A5: for X st X c= Seg k holds ex p being FinSequence of NAT st rng p = X & for l,m,k1,k2 be Nat st 1 <= l & l < m & m <= len p & k1=p.l & k2=p.m holds k1 < k2; let X; assume A6: X c= Seg(k+1); now assume not X c= Seg k; then consider x such that A7: x in X and A8: not x in Seg k by TARSKI:def 3; x in Seg(k+1) by A6,A7; then reconsider n=x as Element of NAT; A9: n=k+1 proof assume A10: n <> k+1; A11: n <= k+1 by A6,A7,Th1; A12: 1 <= n by A6,A7,Th1; n <= k by A10,A11,NAT_1:8; hence contradiction by A8,A12; end; set Y=X\{k+1}; A13: Y c= Seg k proof let x; assume A14: x in Y; then A15: x in X; A16: not x in {k+1} by A14,XBOOLE_0:def 5; A17: x in Seg(k+1) by A6,A15; A18: x<>k+1 by A16,TARSKI:def 1; reconsider m=x as Element of NAT by A17; A19: m <= k+1 by A6,A15,Th1; A20: 1 <= m by A6,A15,Th1; m <= k by A18,A19,NAT_1:8; hence thesis by A20; end; then consider p being FinSequence of NAT such that A21: rng p = Y and A22: for l,m,k1,k2 be Nat st 1 <= l & l < m & m <= len p & k1=p.l & k2 =p.m holds k1 < k2 by A5; reconsider k as Element of NAT by ORDINAL1:def 12; consider q such that A23: q=p^<*k+1*>; reconsider q as FinSequence of NAT by A23; A24: {k+1} c= X by A7,A9,ZFMISC_1:31; A25: rng q = rng p \/ rng <*k+1*> by A23,Th31 .= Y \/ {k+1} by A21,Th38 .= X \/ {k+1} by XBOOLE_1:39 .= X by A24,XBOOLE_1:12; for l,m,k1,k2 be Nat st 1 <= l & l < m & m <= len q & k1=q.l & k2=q.m holds k1 < k2 proof let l,m,k1,k2 be Nat; assume that A26: 1 <= l and A27: l < m and A28: m <= len q and A29: k1=q.l and A30: k2=q.m; l < len (p^<*k+1*>) by A23,A27,A28,XXREAL_0:2; then l < len p + len <*k+1*> by Th22; then l < len p + 1 by Th39; then l <= len p by NAT_1:13; then l in Seg len p by A26,Th1; then A31: l in dom p by Def3; A32: 1 <= m by A26,A27,XXREAL_0:2; A33: now assume A34: m=len q; k1 = p.l by A23,A29,A31,Def7; then k1 in Y by A21,A31,FUNCT_1:def 3; then A35: k1 <= k by A13,Th1; q.m = (p^<*k+1*>).(len p + len <*k+1*>) by A23,A34,Th22 .=(p^<*k+1*>).(len p + 1) by Th39 .= k+1 by Th42; hence thesis by A30,A35,NAT_1:13; end; now assume m <> len q; then m < len (p^<*k+1*>) by A23,A28,XXREAL_0:1; then m < len p + len <*k+1*> by Th22; then m < len p + 1 by Th39; then A36: m <= len p by NAT_1:13; then m in Seg len p by A32,Th1; then m in dom p by Def3; then A37: k2 = p.m by A23,A30,Def7; k1 = p.l by A23,A29,A31,Def7; hence thesis by A22,A26,A27,A36,A37; end; hence thesis by A33; end; hence thesis by A25; end; hence thesis by A5; end; for k being Nat holds P[k] from NAT_1:sch 2(A2,A4); hence thesis by A1; end; uniqueness proof let p,q be FinSequence of NAT such that A38: ( rng p = X & for l,m,k1,k2 being Nat st 1 <= l & l < m & m <= len p & k1=p. l & k2=p.m holds k1 < k2 )&( rng q = X & for l,m,k1,k2 being Nat st 1 <= l & l < m & m <= len q & k1=q.l & k2=q.m holds k1 < k2 ); defpred S[FinSequence] means for X st ex k being Nat st X c= Seg k holds ($1 is FinSequence of NAT & rng $1 = X & for l,m,k1,k2 being Nat st ( 1 <= l & l < m & m <= len $1 & k1=$1.l & k2=$1.m) holds k1 < k2) implies for q being FinSequence of NAT st rng q = X & for l,m,k1,k2 being Nat st ( 1 <= l & l < m & m <= len q & k1=q.l & k2=q.m) holds k1 < k2 holds q=$1; A39: S[{}]; A40: for p,x st S[p] holds S[p^<*x*>] proof let p,x; assume A41: S[p]; let X; given k being Nat such that A42: X c= Seg k; assume that A43: p^<*x*> is FinSequence of NAT and A44: rng (p^<*x*>) = X and A45: for l,m,k1,k2 being Nat st 1 <= l & l < m & m <= len(p^<*x*>) & k1=(p^<*x*>).l & k2=(p^<*x*>).m holds k1 < k2; let q be FinSequence of NAT; assume that A46: rng q = X and A47: for l,m,k1,k2 being Nat st 1 <= l & l < m & m <= len q & k1=q.l & k2=q.m holds k1 < k2; 1 in Seg 1; then A48: 1 in dom <*x*> by Def8; A49: ex m st m=x & for l st l in X & l <> x holds l < m proof <*x*> is FinSequence of NAT by A43,Th36; then rng <*x*> c= NAT by Def4; then {x} c= NAT by Th38; then reconsider m=x as Element of NAT by ZFMISC_1:31; take m; thus m=x; thus for l st l in X & l <> x holds l < m proof let l; assume that A50: l in X and A51: l <> x; consider y such that A52: y in dom (p^<*x*>) and A53: l=(p^<*x*>).y by A44,A50,FUNCT_1:def 3; A54: y in Seg len (p^<*x*>) by A52,Def3; reconsider k=y as Element of NAT by A52; k <= len (p^<*x*>) by A54,Th1; then k <= len p + len <*x*> by Th22; then A55: k <= len p + 1 by Th39; A56: k <> len p + 1 proof assume k = len p + 1; then (p^<*x*>).k = <*x*>.1 by A48,Def7 .= x by Def8; hence contradiction by A51,A53; end; A57: 1 <= k by A54,Th1; k < len p + 1 by A55,A56,XXREAL_0:1; then k < len p + len <*x*> by Th39; then A58: k < len(p^<*x*>) by Th22; m=(p^<*x*>).(len p + 1) by Th42 .= (p^<*x*>).(len p + len <*x*>) by Th39 .= (p^<*x*>).(len(p^<*x*>)) by Th22; hence thesis by A45,A53,A57,A58; end; end; then reconsider m = x as Nat; len q <> 0 proof assume len q = 0; then p^<*x*> = {} by A44,A46,Lm4,RELAT_1:38; then 0 = len (p^<*x*>) .= len p + len <*x*> by Th22 .= 1 + len p by Th39; hence contradiction; end; then consider n be Nat such that A59: len q = n+1 by NAT_1:6; deffunc F(Nat) = q.$1; ex q9 being FinSequence st len q9 = n & for m st m in dom q9 holds q9.m = F(m) from SeqLambda; then consider q9 being FinSequence such that A60: len q9 = n and A61: for m st m in dom q9 holds q9.m = q.m; now let x; assume x in rng q9; then consider y such that A62: y in dom q9 and A63: x=q9.y by FUNCT_1:def 3; A64: y in Seg len q9 by A62,Def3; reconsider y as Element of NAT by A62; A65: y <= n by A60,A64,Th1; A66: n <= n + 1 by NAT_1:11; A67: 1 <= y by A64,Th1; y <= n+1 by A65,A66,XXREAL_0:2; then y in Seg (n+1) by A67; then y in dom q by A59,Def3; then A68: q.y in rng q by FUNCT_1:def 3; rng q c= NAT by Def4; then q.y in NAT by A68; hence x in NAT by A61,A62,A63; end; then rng q9 c= NAT by TARSKI:def 3; then reconsider f=q9 as FinSequence of NAT by Def4; A69: dom q = Seg (n+1) by A59,Def3 .= Seg (len q9 + len <*x*>) by A60,Th39; A70: for m st m in dom <*x*> holds q.(len q9 + m) = <*x*>.m proof let m; assume m in dom <*x*>; then A71: m in {1} by Def8,Th2; then A72: m=1 by TARSKI:def 1; q.(len q9 + m) = x proof assume q.(len q9 + m) <> x; then A73: q.len q <> x by A59,A60,A71,TARSKI:def 1; consider d being Nat such that A74: d=x and A75: for l st l in X & l<>x holds l by Th38; then x in rng p \/ rng <*x*> by XBOOLE_0:def 3; then x in rng q by A44,A46,Th31; then consider y such that A76: y in dom q and A77: x=q.y by FUNCT_1:def 3; A78: y in Seg len q by A76,Def3; reconsider y as Element of NAT by A76; A79: 1 <= y by A78,Th1; A80: y <= len q by A78,Th1; then A81: y < len q by A73,A77,XXREAL_0:1; 1 <= len q by A79,A80,XXREAL_0:2; then len q in Seg len q; then A82: len q in dom q by Def3; A83: q.len q in X by A46,A82,FUNCT_1:def 3; reconsider k = q.len q as Nat; k < d by A73,A75,A83; hence contradiction by A47,A74,A77,A79,A81; end; hence thesis by A72,Th40; end; then A84: q9^<*x*> = q by A61,A69,Def7; A85: ex m st X\{x} c= Seg m by A42,XBOOLE_1:1; A86: not x in rng p proof assume x in rng p; then consider y such that A87: y in dom p and A88: x=p.y by FUNCT_1:def 3; A89: y in Seg len p by A87,Def3; reconsider y as Element of NAT by A87; A90: y <= len p by A89,Th1; A91: len p + 1 = len p + len <*x*> by Th39 .= len (p^<*x*>) by Th22; A92: 1 <= y by A89,Th1; A93: y < len p + 1 by A90,NAT_1:13; A94: m = (p^<*x*>).y by A87,A88,Def7; m = (p^<*x*>).(len p + 1 ) by Th42; hence contradiction by A45,A91,A92,A93,A94; end; A95: X = rng p \/ rng <*x*> by A44,Th31 .= rng p \/ {x} by Th39; A96: for z holds z in rng p \/ {x} \ {x} iff z in rng p proof let z; thus z in rng p \/ {x} \ {x} implies z in rng p proof assume A97: z in rng p \/ {x} \ {x}; then not z in {x} by XBOOLE_0:def 5; hence thesis by A97,XBOOLE_0:def 3; end; assume z in rng p; then ( not z in {x})& z in rng p \/ {x} by A86,TARSKI:def 1,XBOOLE_0:def 3; hence thesis by XBOOLE_0:def 5; end; A98: for l,m,k1,k2 being Nat st 1 <= l & l < m & m <= len p & k1=p.l & k2=p.m holds k1 < k2 proof let l,m,k1,k2 be Nat; assume that A99: 1 <= l and A100: l < m and A101: m <= len p and A102: k1=p.l and A103: k2=p.m; l <= len p by A100,A101,XXREAL_0:2; then l in Seg len p by A99,Th1; then l in dom p by Def3; then A104: k1 = (p^<*x*>).l by A102,Def7; 1 <= m by A99,A100,XXREAL_0:2; then m in Seg len p by A101,Th1; then m in dom p by Def3; then A105: k2 = (p^<*x*>).m by A103,Def7; len p <= len p + 1 by NAT_1:11; then m <= len p + 1 by A101,XXREAL_0:2; then m <= len p + len <*x*> by Th39; then m <= len (p^<*x*>) by Th22; hence thesis by A45,A99,A100,A104,A105; end; A106: p is FinSequence of NAT by A43,Th36; A107: rng p = X\{x} by A95,A96,TARSKI:1; A108: not x in rng f proof assume x in rng f; then consider y such that A109: y in dom f and A110: x=f.y by FUNCT_1:def 3; A111: y in Seg len f by A109,Def3; reconsider y as Element of NAT by A109; A112: y <= len f by A111,Th1; A113: len f + 1 = len f + len <*x*> by Th39 .= len (f^<*x*>) by Th22; A114: 1 <= y by A111,Th1; A115: y < len f + 1 by A112,NAT_1:13; A116: m = q.y by A61,A109,A110; m = q.(len f + 1) by A84,Th42; hence contradiction by A47,A84,A113,A114,A115,A116; end; A117: X = rng f \/ rng <*x*> by A46,A84,Th31 .= rng f \/ {x} by Th39; A118: for z holds z in rng f \/ {x} \ {x} iff z in rng f proof let z; thus z in rng f \/ {x} \ {x} implies z in rng f proof assume A119: z in rng f \/ {x} \ {x}; then not z in {x} by XBOOLE_0:def 5; hence thesis by A119,XBOOLE_0:def 3; end; assume z in rng f; then ( not z in {x})& z in rng f \/ {x} by A108,TARSKI:def 1,XBOOLE_0:def 3; hence thesis by XBOOLE_0:def 5; end; A120: for l,m,k1,k2 being Nat st 1 <= l & l < m & m <= len f & k1=f.l & k2=f.m holds k1 < k2 proof let l,m,k1,k2 be Nat; assume that A121: 1 <= l and A122: l < m and A123: m <= len f and A124: k1=f.l and A125: k2=f.m; A126: m <= len q by A59,A60,A123,NAT_1:13; l <= n by A60,A122,A123,XXREAL_0:2; then A127: l in Seg n by A121,Th1; 1 <= m by A121,A122,XXREAL_0:2; then A128: m in Seg n by A60,A123,Th1; A129: l in dom q9 by A60,A127,Def3; A130: m in dom q9 by A60,A128,Def3; A131: k1 = q.l by A61,A124,A129; k2 = q.m by A61,A125,A130; hence thesis by A47,A121,A122,A126,A131; end; rng f = X\{x} by A117,A118,TARSKI:1; then q9 = p by A41,A85,A98,A106,A107,A120; hence thesis by A61,A69,A70,Def7; end; for p holds S[p] from IndSeq(A39,A40); hence thesis by A1,A38; end; end; theorem Th50: rng Sgm dom p9 = dom p9 proof ex k st dom p9 c= Seg k by Def12; hence thesis by Def13; end; definition let p9; func Seq p9 -> Function equals p9* Sgm(dom p9); coherence; end; registration let p9; cluster Seq p9 -> FinSequence-like; coherence proof rng Sgm dom p9 = dom p9 by Th50; then dom(p9*Sgm(dom p9)) = dom Sgm dom p9 by RELAT_1:27 .=Seg len Sgm dom p9 by Def3; hence thesis by Def2; end; end; theorem for X st ex k st X c= Seg k holds Sgm X = {} iff X = {} proof let X; given k such that A1: X c= Seg k; thus Sgm X = {} implies X = {} proof assume Sgm X = {}; hence X = rng {} by A1,Def13 .= {}; end; assume X={}; then rng Sgm X = {} by A1,Def13; hence thesis; end; begin theorem D is finite iff ex p st D = rng p proof thus D is finite implies ex p st D = rng p proof given g being Function such that A1: rng g = D and A2: dom g in omega; reconsider n = dom g as Element of NAT by A2; defpred R[set,set] means P[$2,$1]; A3: for x st x in Seg n ex y st R[x,y] proof let x; assume A4: x in Seg n; then reconsider x as Element of NAT; x >= 1 by A4,Th1; then ex k be Nat st x = 1+k by NAT_1:10; hence thesis; end; consider f such that A5: dom f = Seg n and A6: for x st x in Seg n holds R[x,f.x] from CLASSES1:sch 1(A3); A7: rng f = dom g proof A8: n = { k where k is Element of NAT: k < n } by AXIOMS:4; thus rng f c= dom g proof let x; assume x in rng f; then consider y such that A9: y in dom f and A10: x = f.y by FUNCT_1:def 3; consider k such that A11: x = k and A12: y = k+1 by A5,A6,A9,A10; k + 1 <= n by A5,A9,A12,Th1; then k in NAT & k < n by NAT_1:13,ORDINAL1:def 12; hence thesis by A8,A11; end; let x; assume x in dom g; then consider k being Element of NAT such that A13: x = k and A14: k < n by A8; 1 <= k+1 & k+1 <= n by A14,NAT_1:11,13; then A15: k+1 in Seg n; then ex k1 st f.(k+1) = k1 & k+1 = k1+1 by A6; hence thesis by A5,A13,A15,FUNCT_1:def 3; end; then dom(g*f) = Seg n by A5,RELAT_1:27; then reconsider p = g*f as FinSequence by Def2; take p; thus thesis by A1,A7,RELAT_1:28; end; given p such that A16: D = rng p; consider n such that A17: dom p = Seg n by Def2; A18: n = { k where k is Element of NAT: k < n } by AXIOMS:4; A19: for x st x in n ex y st P[x,y] proof let x; assume x in n; then ex k being Element of NAT st x = k & k < n by A18; then reconsider k = x as Nat; take k+1; thus thesis; end; consider f such that A20: dom f = n and A21: for x st x in n holds P[x,f.x] from CLASSES1:sch 1(A19); take p*f; A22: rng f = dom p proof thus rng f c= dom p proof let x; assume x in rng f; then consider y such that A23: y in dom f and A24: x = f.y by FUNCT_1:def 3; consider k such that A25: y = k and A26: x = k+1 by A20,A21,A23,A24; ex m being Element of NAT st k = m & m < n by A18,A20,A23,A25; then 1 <= k+1 & k+1 <= n by NAT_1:11,13; hence thesis by A17,A26; end; let x; assume A27: x in dom p; then reconsider x as Element of NAT; 1 <= x by A17,A27,Th1; then consider m be Nat such that A28: x = 1+m by NAT_1:10; reconsider m as Element of NAT by ORDINAL1:def 12; x <= n by A17,A27,Th1; then m < n by A28,NAT_1:13; then A29: m in n by A18; then ex k st m = k & f.m = k+1 by A21; hence thesis by A20,A28,A29,FUNCT_1:def 3; end; hence rng(p*f) = D by A16,RELAT_1:28; dom(p*f) = dom f by A22,RELAT_1:27; hence thesis by A20,ORDINAL1:def 12; end; begin theorem Seg n,Seg m are_equipotent implies n = m proof defpred P[Nat] means ex n st Seg n,Seg $1 are_equipotent & n <> $1; assume Seg n,Seg m are_equipotent & n <> m; then A1: ex m being Nat st P[m]; consider m being Nat such that A2: P[m] and A3: for k being Nat st P[k] holds m <= k from NAT_1:sch 5(A1); consider n such that A4: Seg n,Seg m are_equipotent and A5: n <> m by A2; A6: ex f st f is one-to-one & dom f = Seg n & rng f = Seg m by A4,WELLORD2:def 4; A7: now assume m = 0; then Seg m = {}; then Seg m = Seg n by A6,RELAT_1:42; hence contradiction by A5,Th6; end; then consider m1 being Nat such that A8: m = m1+1 by NAT_1:6; A9: now assume n = 0; then Seg n = {}; then Seg m = Seg n by A6,RELAT_1:42; hence contradiction by A5,Th6; end; then consider n1 being Nat such that A10: n = n1+1 by NAT_1:6; reconsider m1,n1 as Element of NAT by ORDINAL1:def 12; A11: n in Seg n by A9,Th3; A12: m in Seg m by A7,Th3; A13: not n1+1 <= n1 by NAT_1:13; A14: not m1+1 <= m1 by NAT_1:13; A15: not n in Seg n1 by A10,A13,Th1; A16: not m in Seg m1 by A8,A14,Th1; A17: (Seg n1) /\ { n } c= {} proof let x; assume x in (Seg n1) /\ { n }; then x in Seg n1 & x in { n } by XBOOLE_0:def 4; hence thesis by A15,TARSKI:def 1; end; A18: (Seg m1) /\ { m } c= {} proof let x; assume x in (Seg m1) /\ { m }; then x in Seg m1 & x in { m } by XBOOLE_0:def 4; hence thesis by A16,TARSKI:def 1; end; A19: Seg n = (Seg n1) \/ { n } by A10,Th9; A20: Seg m = (Seg m1) \/ { m } by A8,Th9; A21: (Seg n1) /\ { n } = {} by A17; A22: (Seg m1) /\ { m } = {} by A18; A23: ( Seg n1) \ { n } = ((Seg n1) \/ { n }) \ { n } & (Seg n1) misses { n } by A21, XBOOLE_0:def 7,XBOOLE_1:40; A24: ( Seg m1) \ { m } = ((Seg m1) \/ { m }) \ { m } & (Seg m1) misses { m } by A22, XBOOLE_0:def 7,XBOOLE_1:40; A25: (Seg n) \ { n } = Seg n1 by A19,A23,XBOOLE_1:83; (Seg m) \ { m } = Seg m1 by A20,A24,XBOOLE_1:83; hence contradiction by A3,A4,A5,A8,A10,A11,A12,A14,A25,CARD_1:34; end; theorem Seg n,n are_equipotent by Lm1; theorem card Seg n = card n by Lm2; theorem X is finite implies ex n st X,Seg n are_equipotent proof assume X is finite; then consider n being Nat such that A1: X,n are_equipotent by CARD_1:43; take n; n,Seg n are_equipotent by Lm1; hence thesis by A1,WELLORD2:15; end; theorem for n being Nat holds card Seg n = n proof let n be Nat; Seg n,n are_equipotent by Lm1; hence thesis by CARD_1:def 2; end; begin registration let x be set; cluster <*x*> -> non empty; coherence; end; registration cluster non empty for FinSequence; existence proof take <* 0 *>; thus thesis; end; end; registration let f1 be FinSequence, f2 be non empty FinSequence; cluster f1^f2 -> non empty; coherence by Th35; cluster f2^f1 -> non empty; coherence by Th35; end; registration let x,y be set; cluster <*x,y*> -> non empty; coherence; let z be set; cluster <*x,y,z*> -> non empty; coherence; end; scheme SeqDEx{D()->non empty set,A()->Nat,P[set,set]}: ex p being FinSequence of D() st dom p = Seg A() & for k st k in Seg A() holds P[k,p.k] provided A1: for k st k in Seg A() ex x being Element of D() st P[k,x] proof A2: for y be set st y in Seg A() ex x st x in D() & P[y,x] proof let y; assume A3: y in Seg A(); then reconsider k=y as Element of NAT; consider x being Element of D() such that A4: P[k,x] by A1,A3; take x; thus thesis by A4; end; consider f being Function such that A5: dom f = Seg A() and A6: rng f c= D() and A7: for y be set st y in Seg A() holds P[y,f.y] from FUNCT_1:sch 5(A2); reconsider f as FinSequence by A5,Def2; reconsider p=f as FinSequence of D() by A6,Def4; take p; thus thesis by A5,A7; end; reserve D for set, p for FinSequence of D, m for Nat; definition let m; let p be FinSequence; func p|m -> FinSequence equals p|Seg m; coherence by Th15; end; definition let D,m,p; redefine func p|m -> FinSequence of D; coherence by Th18; end; registration let f be FinSequence; cluster f|0 -> empty; coherence; end; theorem len q <= i implies q|i = q proof assume len q <= i; then Seg len q c= Seg i by Th5; then dom q c= Seg i by Def3; hence thesis by RELAT_1:68; end; theorem i <= len q implies len(q|i) = i proof assume i <= len q; then Seg i c= Seg(len q) by Th5; then Seg i c= dom q by Def3; then i in NAT & Seg i = dom(q|i) by ORDINAL1:def 12,RELAT_1:62; hence thesis by Def3; end; theorem i in Seg n implies i+m in Seg (n+m) proof assume A1: i in Seg n; then A2: 1 <= i by Th1; A3: i <= n by A1,Th1; i <= i+m by NAT_1:11; then A4: 1 <= i+m by A2,XXREAL_0:2; i+m <= n+m by A3,XREAL_1:7; hence thesis by A4,Th1; end; theorem i>0 & i+m in Seg (n+m) implies i in Seg n & i in Seg (n+m) proof assume that A1: i > 0 and A2: i+m in Seg (n+m); 1 = 0+1; then A3: 1 <= i by A1,NAT_1:13; A4: i+m <= n+m by A2,Th1; then i <= n by XREAL_1:6; hence i in Seg n by A3,Th1; i <= i+m by NAT_1:11; then i <= n+m by A4,XXREAL_0:2; hence thesis by A3,Th1; end; definition let R be Relation; func R[*] -> Relation means for x,y being set holds [x,y] in it iff x in field R & y in field R & ex p being FinSequence st len p >= 1 & p.1 = x & p.(len p) = y & for i being Nat st i >= 1 & i < len p holds [p.i,p.(i+1)] in R; existence proof defpred X[set,set] means ex p being FinSequence st len p >= 1 & p.1 = $1 & p.(len p) = $2 & for i being Nat st i >= 1 & i < len p holds [p.i,p.(i+1)] in R; thus ex S being Relation st for x,y being set holds [x,y] in S iff x in field R & y in field R & X[x,y] from RELAT_1:sch 1; end; uniqueness proof let R1,R2 be Relation such that A1: for x,y being set holds [x,y] in R1 iff x in field R & y in field R & ex p being FinSequence st len p >= 1 & p.1 = x & p.(len p) = y & for i being Nat st i >= 1 & i < len p holds [p.i,p.(i+1)] in R and A2: for x,y being set holds [x,y] in R2 iff x in field R & y in field R & ex p being FinSequence st len p >= 1 & p.1 = x & p.(len p) = y & for i being Nat st i >= 1 & i < len p holds [p.i,p.(i+1)] in R; let x,y be set; thus [x,y] in R1 implies [x,y] in R2 proof assume A3: [x,y] in R1; then A4: x in field R & y in field R by A1; ex p being FinSequence st len p >= 1 & p.1 = x & p.(len p) = y & for i being Nat st i >= 1 & i < len p holds [p.i,p.(i+1)] in R by A1,A3; hence thesis by A2,A4; end; assume A5: [x,y] in R2; then A6: x in field R & y in field R by A2; ex p being FinSequence st len p >= 1 & p.1 = x & p.(len p) = y & for i being Nat st i >= 1 & i < len p holds [p.i,p.(i+1)] in R by A2,A5; hence thesis by A1,A6; end; end; theorem for D1,D2 being set st D1 c= D2 holds D1* c= D2* proof let D1,D2 be set such that A1: D1 c= D2; let x be set; assume x in D1*; then reconsider p = x as FinSequence of D1 by Def11; rng p c= D1 by Def4; then rng p c= D2 by A1,XBOOLE_1:1; then x is FinSequence of D2 by Def4; hence thesis by Def11; end; registration let D be set; cluster D* -> functional; coherence proof let x be set; thus thesis by Def11; end; end; theorem for p,q being FinSequence st p c= q holds len p <= len q proof let p,q be FinSequence; assume p c= q; then card p c= card q by CARD_1:11; hence thesis by NAT_1:39; end; theorem for p,q being FinSequence, i being Nat st 1 <= i & i <= len p holds (p ^ q).i = p.i proof let p,q be FinSequence, i be Nat; assume A1: 1 <= i & i <= len p; i in NAT & Seg len p = dom p by Def3,ORDINAL1:def 12; then i in dom p by A1; hence thesis by Def7; end; theorem for p,q being FinSequence, i being Nat st 1 <= i & i <= len q holds (p ^ q).(len p + i) = q.i proof let p,q be FinSequence, i be Nat; assume 1 <= i & i <= len q; then len p + 1 <= len p + i & len p + i <= len p + len q by XREAL_1:6; hence (p ^ q).(len p + i) = q.(len p + i - len p) by Th23 .= q.i; end; scheme FinSegRng{m, n() -> Nat, F(set)->set, P[set]}: {F(i) where i is Element of NAT: m()<=i & i<=n() & P[i]} is finite proof set F = {F(i) where i is Element of NAT: m()<=i & i<=n() & P[i]}; deffunc G(Nat) = F($1-1); consider f being FinSequence such that A1: len f = n()+1 and A2: for k st k in dom f holds f.k = G(k) from SeqLambda; F c= rng f proof let x be set; assume x in F; then consider j being Element of NAT such that A3: x=F(j) and m()<=j and A4: j<=n() and P[j]; 1<=j+1 & j+1<=n()+1 by A4,NAT_1:11,XREAL_1:6; then j+1 in Seg (n()+1); then A5: j+1 in dom f by A1,Def3; then f.(j+1) = F(j+1-1) by A2 .= F(j); hence thesis by A3,A5,FUNCT_1:def 3; end; hence thesis; end; Lm6: 1 in Seg 3 & 2 in Seg 3; Lm7: 3 in Seg 3; Lm8: 1 in Seg 4 & 2 in Seg 4; Lm9: 3 in Seg 4 & 4 in Seg 4; Lm10: 1 in Seg 5 & 2 in Seg 5; Lm11: 3 in Seg 5 & 4 in Seg 5; Lm12: 5 in Seg 5; Lm13: 1 in Seg 6 & 2 in Seg 6; Lm14: 3 in Seg 6 & 4 in Seg 6; Lm15: 5 in Seg 6 & 6 in Seg 6; Lm16: 1 in Seg 7 & 2 in Seg 7; Lm17: 3 in Seg 7 & 4 in Seg 7; Lm18: 5 in Seg 7 & 6 in Seg 7; Lm19: 7 in Seg 7; Lm20: 1 in Seg 8 & 2 in Seg 8; Lm21: 3 in Seg 8 & 4 in Seg 8; Lm22: 5 in Seg 8 & 6 in Seg 8; Lm23: 7 in Seg 8 & 8 in Seg 8; theorem Th66: for x1, x2, x3, x4 being set, p being FinSequence st p = <*x1*>^<*x2*>^<*x3*>^<*x4*> holds len p = 4 & p.1 = x1 & p.2 = x2 & p.3 = x3 & p.4 = x4 proof let x1, x2, x3, x4 be set, p be FinSequence; assume A1: p = <*x1*>^<*x2*>^<*x3*>^<*x4*>; set p13 = <*x1*>^<*x2*>^<*x3*>; A2: p13 = <*x1, x2, x3*>; then A3: len p13 = 3 by Th45; A4: p13.1 = x1 & p13.2 = x2 by A2,Th45; A5: p13.3 = x3 by A2,Th45; thus len p = len p13 + len <*x4*> by A1,Th22 .= 3 + 1 by A3,Th40 .= 4; dom p13 = Seg 3 by A3,Def3; hence p.1 = x1 & p.2 = x2 & p.3 = x3 by A1,A4,A5,Def7,Lm6,Lm7; thus p.4 = p.(len p13 + 1) by A3 .= x4 by A1,Th42; end; theorem Th67: for x1, x2, x3, x4, x5 being set, p being FinSequence st p = <*x1*>^<*x2*>^<*x3*>^<*x4*>^<*x5*> holds len p = 5 & p.1 = x1 & p.2 = x2 & p.3 = x3 & p.4 = x4 & p.5 = x5 proof let x1, x2, x3, x4, x5 be set, p be FinSequence; assume A1: p = <*x1*>^<*x2*>^<*x3*>^<*x4*>^<*x5*>; set p14 = <*x1*>^<*x2*>^<*x3*>^<*x4*>; A2: len p14 = 4 by Th66; A3: p14.1 = x1 & p14.2 = x2 by Th66; A4: p14.3 = x3 & p14.4 = x4 by Th66; thus len p = len p14 + len <*x5*> by A1,Th22 .= 4 + 1 by A2,Th40 .= 5; dom p14 = Seg 4 by A2,Def3; hence p.1 = x1 & p.2 = x2 & p.3 = x3 & p.4 = x4 by A1,A3,A4,Def7,Lm8,Lm9; thus p.5 = p.(len p14 + 1) by A2 .= x5 by A1,Th42; end; theorem Th68: for x1, x2, x3, x4, x5, x6 being set, p being FinSequence st p = <*x1*>^<*x2*>^<*x3*>^<*x4*>^<*x5*>^<*x6*> holds len p = 6 & p.1 = x1 & p.2 = x2 & p.3 = x3 & p.4 = x4 & p.5 = x5 & p.6 = x6 proof let x1, x2, x3, x4, x5, x6 be set, p be FinSequence; assume A1: p = <*x1*>^<*x2*>^<*x3*>^<*x4*>^<*x5*>^<*x6*>; set p15 = <*x1*>^<*x2*>^<*x3*>^<*x4*>^<*x5*>; A2: len p15 = 5 by Th67; A3: p15.1 = x1 & p15.2 = x2 by Th67; A4: p15.3 = x3 & p15.4 = x4 by Th67; A5: p15.5 = x5 by Th67; thus len p = len p15 + len <*x6*> by A1,Th22 .= 5 + 1 by A2,Th40 .= 6; dom p15 = Seg 5 by A2,Def3; hence p.1 = x1 & p.2 = x2 & p.3 = x3 & p.4 = x4 & p.5 = x5 by A1,A3,A4,A5,Def7,Lm10,Lm11,Lm12; thus p.6 = p.(len p15 + 1) by A2 .= x6 by A1,Th42; end; theorem Th69: for x1, x2, x3, x4, x5, x6, x7 being set, p being FinSequence st p = <*x1*>^<*x2*>^<*x3*>^<*x4*>^<*x5*>^<*x6*>^<*x7*> holds len p = 7 & p.1 = x1 & p.2 = x2 & p.3 = x3 & p.4 = x4 & p.5 = x5 & p.6 = x6 & p.7 = x7 proof let x1, x2, x3, x4, x5, x6, x7 be set, p be FinSequence; assume A1: p = <*x1*>^<*x2*>^<*x3*>^<*x4*>^<*x5*>^<*x6*>^<*x7*>; set p16 = <*x1*>^<*x2*>^<*x3*>^<*x4*>^<*x5*>^<*x6*>; A2: len p16 = 6 by Th68; A3: p16.1 = x1 & p16.2 = x2 by Th68; A4: p16.3 = x3 & p16.4 = x4 by Th68; A5: p16.5 = x5 & p16.6 = x6 by Th68; thus len p = len p16 + len <*x7*> by A1,Th22 .= 6 + 1 by A2,Th40 .= 7; dom p16 = Seg 6 by A2,Def3; hence p.1 = x1 & p.2 = x2 & p.3 = x3 & p.4 = x4 & p.5 = x5 & p.6 = x6 by A1,A3,A4,A5,Def7,Lm13,Lm14,Lm15; thus p.7 = p.(len p16 + 1) by A2 .= x7 by A1,Th42; end; theorem Th70: for x1,x2,x3,x4, x5, x6, x7, x8 being set, p being FinSequence st p = <*x1*>^<*x2*>^<*x3*>^<*x4*>^<*x5*>^<*x6*>^<*x7*>^<*x8*> holds len p = 8 & p.1 = x1 & p.2 = x2 & p.3 = x3 & p.4 = x4 & p.5 = x5 & p.6 = x6 & p.7 = x7 & p.8 = x8 proof let x1, x2, x3, x4, x5, x6, x7, x8 be set, p be FinSequence; assume A1: p = <*x1*>^<*x2*>^<*x3*>^<*x4*>^<*x5*>^<*x6*>^<*x7*>^<*x8*>; set p17 = <*x1*>^<*x2*>^<*x3*>^<*x4*>^<*x5*>^<*x6*>^<*x7*>; A2: len p17 = 7 by Th69; A3: p17.1 = x1 & p17.2 = x2 by Th69; A4: p17.3 = x3 & p17.4 = x4 by Th69; A5: p17.5 = x5 & p17.6 = x6 by Th69; A6: p17.7 = x7 by Th69; thus len p = len p17 + len <*x8*> by A1,Th22 .= 7 + 1 by A2,Th40 .= 8; dom p17 = Seg 7 by A2,Def3; hence p.1 = x1 & p.2 = x2 & p.3 = x3 & p.4 = x4 & p.5 = x5 & p.6 = x6 & p.7 = x7 by A1,A3,A4,A5,A6,Def7,Lm16,Lm17,Lm18,Lm19; thus p.8 = p.(len p17 + 1) by A2 .= x8 by A1,Th42; end; theorem for x1,x2,x3,x4,x5,x6,x7, x8, x9 being set, p being FinSequence st p = <*x1*>^<*x2*>^<*x3*>^<*x4*>^<*x5*>^<*x6*>^<*x7*>^<*x8*>^<*x9*> holds len p = 9 & p.1 = x1 & p.2 = x2 & p.3 = x3 & p.4 = x4 & p.5 = x5 & p.6 = x6 & p.7 = x7 & p.8 = x8 & p.9 = x9 proof let x1, x2, x3, x4, x5, x6, x7, x8, x9 be set, p be FinSequence; assume A1: p = <*x1*>^<*x2*>^<*x3*>^<*x4*>^<*x5*>^<*x6*>^<*x7*>^<*x8*>^<*x9*>; set p17 = <*x1*>^<*x2*>^<*x3*>^<*x4*>^<*x5*>^<*x6*>^<*x7*>^<*x8*>; A2: len p17 = 8 by Th70; A3: p17.1 = x1 & p17.2 = x2 by Th70; A4: p17.3 = x3 & p17.4 = x4 by Th70; A5: p17.5 = x5 & p17.6 = x6 by Th70; A6: p17.7 = x7 & p17.8 = x8 by Th70; thus len p = len p17 + len <*x9*> by A1,Th22 .= 8 + 1 by A2,Th40 .= 9; dom p17 = Seg 8 by A2,Def3; hence p.1 = x1 & p.2 = x2 & p.3 = x3 & p.4 = x4 & p.5 = x5 & p.6 = x6 & p.7 = x7 & p.8 = x8 by A1,A3,A4,A5,A6,Def7,Lm20,Lm21,Lm22,Lm23; thus p.9 = p.(len p17 + 1) by A2 .= x9 by A1,Th42; end; theorem for p being FinSequence holds p | Seg 0 = {}; theorem for f,g being FinSequence holds f | Seg 0 = g | Seg 0; theorem for D being non empty set, x being Element of D holds <* x *> is FinSequence of D; theorem for D being set, p,q being FinSequence of D holds p ^ q is FinSequence of D; reserve a, b, c, d, e, f for set; theorem <*a*> = <*b*> implies a = b proof assume A1: <*a*> = <*b*>; thus a = <*a*>.1 by Def8 .= b by A1,Def8; end; theorem <*a,b*> = <*c,d*> implies a = c & b = d proof assume A1: <*a,b*> = <*c,d*>; thus a = <*a,b*>.1 by Th44 .= c by A1,Th44; thus b = <*a,b*>.2 by Th44 .= d by A1,Th44; end; theorem <*a,b,c*> = <*d,e,f*> implies a = d & b = e & c = f proof assume A1: <*a,b,c*> = <*d,e,f*>; thus a = <*a,b,c*>.1 by Th45 .= d by A1,Th45; thus b = <*a,b,c*>.2 by Th45 .= e by A1,Th45; thus c = <*a,b,c*>.3 by Th45 .= f by A1,Th45; end; registration cluster non empty non-empty for FinSequence; existence proof take <*{{}}*>; thus <*{{}}*> is non empty; assume {} in rng <*{{}}*>; then {} in {{{}}} by Th38; hence contradiction by TARSKI:def 1; end; end; theorem Th79: for p,q being FinSequence st q = p|Seg n holds len q <= len p proof let p,q be FinSequence; assume q = p|Seg n; then A1: dom q = dom p /\ Seg n by RELAT_1:61; Seg len q = dom q & Seg len p = dom p by Def3; then Seg len q c= Seg len p by A1,XBOOLE_1:17; hence thesis by Th5; end; theorem for p,r being FinSequence st r = p|Seg n ex q being FinSequence st p = r^q proof let p,r be FinSequence; assume A1: r = p|Seg n; then consider m be Nat such that A2: len p = len r + m by Th79,NAT_1:10; deffunc U(Nat) = p.(len r + $1); consider q being FinSequence such that A3: len q = m & for k st k in dom q holds q.k = U(k) from SeqLambda; take q; A4: len p = len(r^q) by A2,A3,Th22; now let k such that A5: 1 <= k and A6: k <= len p; A7: k in NAT by ORDINAL1:def 12; A8: now assume k <= len r; then A9: k in Seg len r by A5,A7; A10: dom r = Seg len r by Def3; then (r^q).k = r.k by A9,Def7; hence p.k = (r^q).k by A1,A9,A10,FUNCT_1:47; end; now assume A11: not k <= len r; then consider j being Nat such that A12: k = len r + j by NAT_1:10; k-len r = j by A12; then A13: (r^q).k = q.j by A4,A6,A11,Th24; j <> 0 by A11,A12; then A14: 0+1 <= j by NAT_1:13; j <= len q by A2,A3,A6,A12,XREAL_1:6; then j in Seg m by A3,A14,Th1; then j in dom q by A3,Def3; hence p.k = (r^q).k by A3,A12,A13; end; hence p.k = (r^q).k by A8; end; hence thesis by A4,Th14; end; registration let D be non empty set; cluster non empty for FinSequence of D; existence proof set x = the Element of D; take <*x*>; thus thesis; end; end; definition let p,q be FinSequence; redefine pred p = q means len p = len q & for k st 1 <= k & k <= len p holds p.k = q.k; compatibility by Th14; end; theorem for M1, M2 being set st card M1 = 0 & card M2 = 0 holds M1 = M2 proof let M1, M2 be set; assume that A1: card M1 = {} and A2: card M2 = {}; M1 = {} by A1; hence thesis by A2; end; registration let n be non zero Nat; cluster Seg n -> non empty; coherence; end; theorem for p being FinSequence, n,m being Nat st m <= n holds p|n|m = p|m proof let p be FinSequence, n,m be Nat; assume m <= n; then Seg m c= Seg n by Th5; hence thesis by RELAT_1:74; end; reserve m for Element of NAT; theorem Seg n = (n+1) \ {0} proof A1: n+1 = {m: m < n+1} by AXIOMS:4; thus Seg n c= (n+1) \ {0} proof let x; assume x in Seg n; then consider k being Element of NAT such that A2: x = k and A3: 1 <= k and A4: k <= n; k < n+1 by A4,NAT_1:13; then A5: x in n+1 by A1,A2; not x in {0} by A2,A3,TARSKI:def 1; hence thesis by A5,XBOOLE_0:def 5; end; let x; assume A6: x in (n+1) \ {0}; then A7: x in n+1; A8: not x in {0} by A6,XBOOLE_0:def 5; consider m such that A9: x = m and A10: m < n+1 by A1,A7; A11: x <> 0 by A8,TARSKI:def 1; 0+1 = 1; then A12: 1 <= m by A9,A11,NAT_1:13; m <= n by A10,NAT_1:13; hence thesis by A9,A12; end; registration let n be Nat; cluster n-element for FinSequence; existence proof set p = Seg n --> {}; dom p = Seg n by FUNCOP_1:13; then reconsider p as FinSequence by Def2; take p; Seg len p = dom p by Def3; hence len p = n by Th6,FUNCOP_1:13; end; end; registration let x be set; cluster <*x*> -> 1-element; coherence; let y be set; cluster <*x,y*> -> 2-element; coherence proof thus len<*x,y*> = 2 by Th44; end; let z be set; cluster <*x,y,z*> -> 3-element; coherence proof thus len<*x,y,z*> = 3 by Th45; end; end; definition let X be set; attr X is FinSequence-membered means :Def18: x in X implies x is FinSequence; end; registration cluster empty -> FinSequence-membered for set; coherence proof let X be set such that A1: X is empty; let x; assume x in X; hence thesis by A1; end; end; registration cluster non empty FinSequence-membered for set; existence proof take X = {the FinSequence}; thus X is non empty; let x; thus thesis by TARSKI:def 1; end; end; registration let X be set; cluster X* -> FinSequence-membered; coherence proof let x; assume x in X*; hence x is FinSequence by Def11; end; end; theorem for f being Function st f in D* & x in dom f holds f.x in D proof let f be Function such that A1: f in D* and A2: x in dom f; f is FinSequence of D by A1,Def11; then A3: rng f c= D by Def4; f.x in rng f by A2,FUNCT_1:3; hence f.x in D by A3; end; registration cluster FinSequence-membered -> functional for set; coherence proof let X such that A1: X is FinSequence-membered; let x be set; assume x in X; hence x is Function by A1,Def18; end; end; theorem for X being FinSequence-membered set ex Y being non empty set st X c= Y* proof let X be FinSequence-membered set; set Z = {rng f where f is Element of X: f in X}; take Y = succ union Z; let x; assume A1: x in X; then reconsider x as FinSequence by Def18; rng x in {rng f where f is Element of X: f in X} by A1; then rng x c= Y by ORDINAL3:1,SETFAM_1:41; then x is FinSequence of Y by Def4; hence thesis by Def11; end; registration let X be FinSequence-membered set; cluster -> FinSequence-like for Element of X; coherence proof let e be Element of X; X is empty or X is non empty; hence thesis by Def18,SUBSET_1:def 1; end; end; registration let X be FinSequence-membered set; cluster -> FinSequence-membered for Subset of X; coherence proof let Y be Subset of X; let x; assume x in Y; hence x is FinSequence; end; end; theorem for p,q being FinSequence st q = p|Seg n holds len q <= n proof let p,q be FinSequence; assume q = p|Seg n; then A1: dom q = dom p /\ Seg n by RELAT_1:61; Seg len q = dom q by Def3; then Seg len q c= Seg n by A1,XBOOLE_1:17; hence thesis by Th5; end; theorem for p,q being FinSequence st p = p^q or p = q^p holds q = {} proof let p,q be FinSequence such that A1: p = p^q or p = q^p; len(p^q) = len p + len q & len(q^p) = len q + len p by Th22; hence thesis by A1; end; theorem for p,q being FinSequence st p^q = <*x*> holds p = <*x*> & q = {} or p = {} & q = <*x*> proof let p,q be FinSequence; assume A1: p^q = <*x*>; then A2: 1 = len(p^q) by Th40 .= len p + len q by Th22; A3: now assume len p = 0; thus then p = {}; hence q = <*x*> by A1,Th34; end; now assume len p <> 0; then A4: 0+1 <= len p by NAT_1:13; len p <= 1 by A2,NAT_1:11; then len p = 1 by A4,XXREAL_0:1; thus then q = {} by A2; hence p = <*x*> by A1,Th34; end; hence thesis by A3; end; theorem for f being n-element FinSequence holds dom f = Seg n proof let f be n-element FinSequence; len f = n by CARD_1:def 7; hence dom f = Seg n by Def3; end; registration let n,m; let f be n-element FinSequence, g be m-element FinSequence; cluster f^g -> (n+m)-element; coherence proof len f = n & len g = m by CARD_1:def 7; hence len(f^g) = n+m by Th22; end; end; registration cluster increasing -> one-to-one for real-valued FinSequence; coherence proof let f be real-valued FinSequence; assume A1: f is increasing; let x,y be set; assume that A2: x in dom f & y in dom f and A3: f.x=f.y; reconsider nx=x,ny=y as Element of NAT by A2; nx<=ny & nx>=ny by A1,A2,A3,VALUED_0:def 13; hence thesis by XXREAL_0:1; end; end; theorem for x, y being set st x in dom <*y*> holds x = 1 proof let x, y be set; assume x in dom <*y*>; then x in Seg 1 by Th38; hence thesis by Th2,TARSKI:def 1; end; registration let X; cluster X-valued for FinSequence; existence proof take <*>X; thus thesis; end; end; registration let D be FinSequence-membered set; let f be D-valued Function; let x be set; cluster f.x -> FinSequence-like; coherence proof per cases; suppose x in dom f; then A1: f.x in rng f by FUNCT_1:def 3; rng f c= D by RELAT_1:def 19; hence thesis by A1; end; suppose not x in dom f; hence thesis by FUNCT_1:def 2; end; end; end; begin reserve n,m,k for Element of NAT, D for non empty set, Z,x,y,z,y1,y2 for set, p,q for FinSequence; Lm1: for p being FinSequence of D st 1 <= n & n <= len p holds p.n is Element of D proof let p be FinSequence of D; assume 1 <= n & n <= len p; then n in Seg len p by FINSEQ_1:1; then n in dom p by FINSEQ_1:def 3; then A1: p.n in rng p by FUNCT_1:def 3; rng p c= D by FINSEQ_1:def 4; hence thesis by A1; end; definition let p be natural-valued Function; let n be set; redefine func p.n -> Element of NAT; coherence by ORDINAL1:def 12; end; scheme RecEx{A() -> set,P[set,set,set]}: ex f being Function st dom f = NAT & f.0 = A() & for n being Element of NAT holds P[n,f.n,f.(n+1)] provided A1: for n being Element of NAT for x being set ex y being set st P[n,x,y ] proof defpred Q[set,set,set] means ex O2 being Ordinal st O2 = $3 & (for X being set, n being Element of NAT st X c= Rank the_rank_of $2 ex Y being set st Y c= Rank O2 & P[n,X,Y]) & (for O being Ordinal st for X being set, n being Element of NAT st X c= Rank the_rank_of $2 ex Y being set st Y c= Rank O & P[n,X,Y] holds O2 c= O); A2: for n being Element of NAT for x being set ex y being set st Q[n,x,y] proof defpred Y[set,set] means for m being Element of NAT ex y being set st $2 is Ordinal & y c= Rank the_rank_of $2 & P[m,$1,y]; let n be Element of NAT; let x be set; defpred X[Ordinal] means for X being set, n being Element of NAT st X c= Rank the_rank_of x ex Y being set st Y c= Rank $1 & P[n,X,Y]; A3: for x9 being set st x9 in bool Rank the_rank_of x ex o being set st Y[ x9,o] proof let x9 be set; assume x9 in bool Rank the_rank_of x; defpred X[set,set] means ex y being set st $2 is Ordinal & y c= Rank the_rank_of $2 & P[$1,x9,y]; A4: for e being set st e in NAT ex u being set st X[e,u] proof let i be set; assume i in NAT; then reconsider i9 = i as Element of NAT; thus ex o being set, y being set st o is Ordinal & y c= Rank the_rank_of o & P[i,x9,y] proof consider y being set such that A5: P[i9,x9,y] by A1; take o = the_rank_of y, y; thus o is Ordinal; the_rank_of the_rank_of y = the_rank_of y by CLASSES1:73; hence y c= Rank the_rank_of o by CLASSES1:65; thus thesis by A5; end; end; consider h being Function such that A6: dom h = NAT and A7: for i being set st i in NAT holds X[i,h.i] from CLASSES1:sch 1( A4); take o = sup rng h; thus for m being Element of NAT ex y being set st o is Ordinal & y c= Rank the_rank_of o & P[m,x9,y] proof let m be Element of NAT; consider y being set such that A8: h.m is Ordinal and A9: y c= Rank the_rank_of (h.m) and A10: P[m,x9,y] by A7; reconsider O = h.m as Ordinal by A8; h.m in rng h by A6,FUNCT_1:def 3; then h.m in sup rng h by A8,ORDINAL2:19; then h.m c= o by ORDINAL1:def 2; then A11: Rank O c= Rank o by CLASSES1:37; take y; thus o is Ordinal; y c= Rank O by A9,CLASSES1:73; then y c= Rank o by A11,XBOOLE_1:1; hence y c= Rank the_rank_of o by CLASSES1:73; thus thesis by A10; end; end; consider f being Function such that A12: dom f = bool Rank the_rank_of x and A13: for x9 being set st x9 in bool Rank the_rank_of x holds Y[x9,f.x9 ] from CLASSES1:sch 1(A3); A14: ex O being Ordinal st X[O] proof take O2 = sup rng f; thus for X being set, m being Element of NAT st X c= Rank the_rank_of x ex Y being set st Y c= Rank O2 & P[m,X,Y] proof let X be set; let m be Element of NAT; assume A15: X c= Rank the_rank_of x; then consider Y being set such that A16: f.X is Ordinal and A17: Y c= Rank the_rank_of (f.X) and A18: P[m,X,Y] by A13; reconsider O = f.X as Ordinal by A16; f.X in rng f by A12,A15,FUNCT_1:def 3; then f.X in sup rng f by A16,ORDINAL2:19; then f.X c= O2 by ORDINAL1:def 2; then A19: Rank O c= Rank O2 by CLASSES1:37; take Y; the_rank_of O = O by CLASSES1:73; hence Y c= Rank O2 by A17,A19,XBOOLE_1:1; thus thesis by A18; end; end; consider O2 being Ordinal such that A20: X[O2] & for O being Ordinal st X[O] holds O2 c= O from ORDINAL1: sch 1(A14); take O2; thus thesis by A20; end; A21: for n being Element of NAT for x,y1,y2 being set st Q[n,x,y1] & Q[n,x, y2] holds y1 = y2 proof let n be Element of NAT; let x,y1,y2 be set; assume that A22: Q[n,x,y1] and A23: Q[n,x,y2]; consider O2 being Ordinal such that A24: O2 = y2 and A25: ( for X being set, n being Element of NAT st X c= Rank the_rank_of x ex Y being set st Y c= Rank O2 & P[n,X,Y])& for O being Ordinal st for X being set, n being Element of NAT st X c= Rank the_rank_of x ex Y being set st Y c= Rank O & P[n,X,Y] holds O2 c= O by A23; consider O1 being Ordinal such that A26: O1 = y1 and A27: ( for X being set, n being Element of NAT st X c= Rank the_rank_of x ex Y being set st Y c= Rank O1 & P[n,X,Y])& for O being Ordinal st for X being set, n being Element of NAT st X c= Rank the_rank_of x ex Y being set st Y c= Rank O & P[n,X,Y] holds O1 c= O by A22; O1 c= O2 & O2 c= O1 by A27,A25; hence thesis by A26,A24,XBOOLE_0:def 10; end; ex f being Function st dom f = NAT & f.0 = the_rank_of A() & for n being Element of NAT holds Q[n,f.n,f.(n+1)] proof deffunc S(Element of NAT) = {k : k <= $1}; A28: for p,q being Function,k st dom p = S(k) & dom q = S(k+1) & p.0 = q.0 & for n st n < k holds Q[n,p.n,p.(n+1)] & Q[n,q.n,q.(n+1)] holds p.k = q.k proof let p,q be Function; let k; defpred Z[Element of NAT] means $1 <= k implies p.$1 = q.$1; assume that dom p = S(k) and dom q = S(k+1) and A29: p.0 = q.0 and A30: for n st n < k holds Q[n,p.n,p.(n+1)] & Q[n,q.n,q.(n+1)]; A31: for n st Z[n] holds Z[n+1] proof let n; assume A32: n <= k implies p.n = q.n; assume n+1 <= k; then A33: n < k by NAT_1:13; then A34: Q[n,p.n,p.(n+1)] by A30; Q[n,p.n,q.(n+1)] by A30,A32,A33; hence thesis by A21,A34; end; A35: Z[0] by A29; for n holds Z[n] from NAT_1:sch 1(A35,A31); hence thesis; end; A36: for n ex p being Function st dom p = S(n) & p.0 = the_rank_of A() & for k st k < n holds Q[k,p.k,p.(k+1)] proof defpred Z[Element of NAT] means ex p being Function st dom p = S($1) & p .0 = the_rank_of A() & for k st k < $1 holds Q[k,p.k,p.(k+1)]; A37: for n st Z[n] holds Z[n+1] proof let n; given p being Function such that dom p = S(n) and A38: p.0 = the_rank_of A() and A39: for k st k < n holds Q[k,p.k,p.(k+1)]; consider z such that A40: Q[n,p.n,z] by A2; defpred ST[set,set] means (for k st k=$1 holds (k <= n implies $2 = p. k) & (k=n+1 implies $2 = z )); A41: for x st x in S(n+1) ex y st ST[x,y] proof let x; assume x in S(n+1); then A42: ex m st m=x & m <= n+1; then reconsider t=x as Element of NAT; A43: t <= n implies thesis proof assume A44: t <= n; take p.x; let k; assume A45: k=x; hence k <= n implies p.x = p.k; assume k=n+1; then n+1 <= n+0 by A44,A45; hence thesis by XREAL_1:6; end; t = n+1 implies thesis proof assume A46: t=n+1; take z; let k such that A47: k=x; thus k <= n implies z=p.k proof assume k <= n; then n+1 <= n+0 by A46,A47; hence thesis by XREAL_1:6; end; thus thesis; end; hence thesis by A42,A43,NAT_1:8; end; consider q being Function such that A48: dom q = S(n+1) & for x st x in S(n+1) holds ST[x,q.x] from CLASSES1:sch 1 (A41); take q; thus dom q = S(n+1) by A48; 0 in S(n+1); hence q.0 = the_rank_of A() by A38,A48; let k such that A49: k < n+1; A50: now A51: k+1 <= n+1 by A49,NAT_1:13; assume k <> n; then k+1 <> n+1; then A52: k+1 <= n by A51,NAT_1:8; then A53: k < n by NAT_1:13; k+1 in S(n+1) by A51; then A54: q.(k+1) = p.(k+1) by A48,A52; k in S(n+1) by A49; then p.k = q.k by A48,A53; hence thesis by A39,A54,A53; end; now assume A55: k = n; then k <= n+1 by NAT_1:11; then k in S(n+1); then A56: q.k = p.k by A48,A55; k+1 in S(n+1) by A55; then q.(k+1) = z by A48,A55; hence thesis by A40,A55,A56; end; hence thesis by A50; end; A57: Z[0] proof set s = S(0) --> the_rank_of A(); take s; thus dom s = S(0) by FUNCOP_1:13; 0 in S(0); hence s.0 = the_rank_of A() by FUNCOP_1:7; thus thesis; end; thus for n holds Z[n] from NAT_1:sch 1(A57,A37); end; ex f being Function st dom f = NAT & for n ex p being Function st dom p = S(n) & p.0 = the_rank_of A() & (for k st k < n holds Q[k,p.k,p.(k+1)]) & f. n = p.n proof defpred Z[set,set] means for n st n=$1 ex p being Function st dom p = S( n) & p.0 = the_rank_of A() & (for k st k < n holds Q[k,p.k,p.(k+1)]) & $2 = p.n ; A58: for x st x in NAT ex y st Z[x,y] proof let x; assume x in NAT; then reconsider n=x as Element of NAT; consider p being Function such that A59: dom p = S(n) & p.0 = the_rank_of A() & for k st k < n holds Q [k,p.k,p.(k +1)] by A36; take p.n; let k such that A60: k = x; take p; thus thesis by A59,A60; end; consider f being Function such that A61: dom f = NAT & for x st x in NAT holds Z[x,f.x] from CLASSES1: sch 1 (A58); take f; thus dom f = NAT by A61; let n; consider p being Function such that A62: dom p = S(n) & p.0 = the_rank_of A() and A63: for k st k < n holds Q[k,p.k,p.(k+1)] and A64: f.n = p.n by A61; take p; thus dom p = S(n) & p.0 = the_rank_of A() by A62; thus for k st k < n holds Q[k,p.k,p.(k+1)] by A63; thus thesis by A64; end; then consider f being Function such that A65: dom f = NAT and A66: for n ex p being Function st dom p = S(n) & p.0 = the_rank_of A( ) & (for k st k < n holds Q[k,p.k,p.(k+1)]) & f.n = p.n; take f; thus dom f = NAT by A65; ex p being Function st dom p = S(0) & p.0 = the_rank_of A() & (for k st k < 0 holds Q[k,p.k,p.(k+1)]) & f.0 = p.0 by A66; hence f.0 = the_rank_of A(); let d be Element of NAT; consider p being Function such that A67: dom p = S(d+1) and A68: p.0 = the_rank_of A() and A69: for k st k < d+1 holds Q[k,p.k,p.(k+1)] and A70: f.(d+1) = p.(d+1) by A66; consider q being Function such that A71: dom q = S(d) and A72: q.0 = the_rank_of A() and A73: for k st k < d holds Q[k,q.k,q.(k+1)] and A74: f.d = q.d by A66; dom p = S(d+1) & dom q = S(d) & p.0 = q.0 & for k st k < d holds Q[k ,q.k,q.(k+1)] & Q[k,p.k,p.(k+1)] proof thus dom p = S(d+1) by A67; thus dom q = S(d) by A71; thus p.0 = q.0 by A68,A72; let k; assume A75: k < d; hence Q[k,q.k,q.(k+1)] by A73; d <= d+1 by NAT_1:11; then k < d+1 by A75,XXREAL_0:2; hence thesis by A69; end; then p.d = q.d by A28; hence thesis by A69,A70,A74,XREAL_1:29; end; then consider g being Function such that A76: dom g = NAT and A77: g.0 = the_rank_of A() and A78: for n being Element of NAT holds Q[n,g.n,g.(n+1)]; defpred X[set,set] means ex i being Element of NAT st i = $1`2 & P[$1`2,$1`1 ,$2`1] & $2`2 = i+1 & not ex y being set st P[$1`2,$1`1,y] & the_rank_of y in the_rank_of $2`1; A79: [A(),0]`1 = A() & [A(),0]`2 = 0; set beta = sup rng g; A80: for x being set st x in [:Rank beta, NAT:] ex u being set st X[x,u] proof let x be set; defpred X[Ordinal] means ex y being set st y c= Rank $1 & P[x`2,x`1,y]; assume x in [:Rank beta, NAT:]; then consider a,b being set such that A81: a in Rank beta and A82: b in NAT and A83: x = [a,b] by ZFMISC_1:def 2; reconsider b as Element of NAT by A82; A84: x`2 = b & x`1 = a by A83,MCART_1:7; the_rank_of a in beta by A81,CLASSES1:66; then consider alfa being Ordinal such that A85: alfa in rng g and A86: the_rank_of a c= alfa by ORDINAL2:21; consider k being set such that A87: k in dom g and A88: alfa = g.k by A85,FUNCT_1:def 3; reconsider k as Element of NAT by A76,A87; A89: Q[k,alfa,g.(k+1)] by A78,A88; then reconsider O2 = g.(k+1) as Ordinal; a c= Rank alfa by A86,CLASSES1:65; then a c= Rank the_rank_of alfa by CLASSES1:73; then ex y being set st y c= Rank O2 & P[x`2,x`1,y] by A89,A84; then A90: ex O being Ordinal st X[O]; consider O being Ordinal such that A91: X[O] and A92: for O9 being Ordinal st X[O9] holds O c= O9 from ORDINAL1:sch 1( A90); consider Y being set such that A93: Y c= Rank O and A94: P[b,a,Y] by A84,A91; A95: the_rank_of Y c= O by A93,CLASSES1:65; take u = [Y,b+1], i = b; thus i = x`2 by A83,MCART_1:7; thus P[x`2,x`1,u`1] by A84,A94,MCART_1:7; thus u`2 = i+1 by MCART_1:7; given y being set such that A96: P[x`2,x`1,y] and A97: the_rank_of y in the_rank_of u`1; A98: y c= Rank the_rank_of y by CLASSES1:def 8; the_rank_of y in the_rank_of Y by A97,MCART_1:7; hence contradiction by A92,A96,A95,A98,ORDINAL1:5; end; consider F being Function such that dom F = [:Rank beta, NAT:] and A99: for x being set st x in [:Rank beta, NAT:] holds X[x,F.x] from CLASSES1:sch 1(A80); deffunc U(Nat,set) = (F.[$2,$1])`1; consider f being Function such that A100: dom f = NAT and A101: f.0 = A() and A102: for n being Nat holds f.(n+1) = U(n,f.n) from NAT_1:sch 11; defpred X[Element of NAT] means the_rank_of (f.$1) in sup rng g; g.0 in rng g by A76,FUNCT_1:def 3; then A103: X[0] by A77,A101,ORDINAL2:19; A104: for n being Element of NAT st X[n] holds X[n+1] proof let n be Element of NAT; assume A105: the_rank_of (f.n) in sup rng g; then consider o1 being Ordinal such that A106: o1 in rng g and A107: the_rank_of (f.n) c= o1 by ORDINAL2:21; f.n in Rank sup rng g by A105,CLASSES1:66; then A108: [f.n,n] in [:Rank beta, NAT:] by ZFMISC_1:87; consider m being set such that A109: m in dom g and A110: g.m = o1 by A106,FUNCT_1:def 3; reconsider m as Element of NAT by A76,A109; consider o2 being Ordinal such that A111: o2 = g.(m+1) and A112: for X being set, n being Element of NAT st X c= Rank the_rank_of (g.m) ex Y being set st Y c= Rank o2 & P[n,X,Y] and for o being Ordinal st for X being set, n being Element of NAT st X c= Rank the_rank_of (g.m) ex Y being set st Y c= Rank o & P[n,X,Y] holds o2 c= o by A78; the_rank_of (f.n) c= the_rank_of (g.m) by A107,A110,CLASSES1:73; then f.n c= Rank the_rank_of (g.m) by CLASSES1:65; then consider YY being set such that A113: YY c= Rank o2 and A114: P[n,f.n,YY] by A112; A115: the_rank_of YY c= o2 by A113,CLASSES1:65; [f.n,n]`1 = f.n & [f.n,n]`2 = n; then ex i being Element of NAT st i = n &( P[n,f.n,(F.[f.n,n]) `1])& (F.[f .n,n])`2 = i+1 & not ex y being set st P[n,f.n,y] & the_rank_of y in the_rank_of (F.[f.n,n])`1 by A99,A108; then A116: the_rank_of (F.[f.n,n])`1 c= the_rank_of YY by A114,ORDINAL1:16; g.(m+1) in rng g by A76,FUNCT_1:def 3; then A117: o2 in sup rng g by A111,ORDINAL2:19; f.(n+1) = (F.[f.n,n])`1 by A102; hence thesis by A116,A115,A117,ORDINAL1:12,XBOOLE_1:1; end; A118: for n being Element of NAT holds X[n] from NAT_1:sch 1(A103,A104); defpred X[Element of NAT] means P[$1,f.$1,f.($1+1)]; A119: for n being Element of NAT st X[n] holds X[n+1] proof let n be Element of NAT; assume P[n,f.n,f.(n+1)]; the_rank_of (f.(n+1)) in sup rng g by A118; then f.(n+1) in Rank sup rng g by CLASSES1:66; then A120: [f.(n+1),n+1] in [:Rank beta, NAT:] by ZFMISC_1:87; [f.(n+1),n+1]`1 = f.(n+1) & [f.(n+1),n+1]`2 = n+1; then ex i being Element of NAT st i = n+1 &( P[n+1,f.(n+1),(F.[ f.(n+1),n+ 1])`1])& (F.[f.(n+1),n+1])`2 = i+1 & not ex y being set st P[(n+1), f.(n+1),y] & the_rank_of y in the_rank_of (F.[f.(n+1),n+1])`1 by A99,A120; hence thesis by A102; end; take f; thus dom f = NAT by A100; thus f.0 = A() by A101; A() in Rank sup rng g by A101,A103,CLASSES1:66; then [A(),0] in [:Rank beta, NAT:] by ZFMISC_1:87; then ex i being Element of NAT st i = [A(),0]`2 &( P[0,A(),(F.[ A(),0])`1])& (F.[A(),0])`2 = i+1 & not ex y being set st P[0,A(),y] & the_rank_of y in the_rank_of (F.[A(),0])`1 by A99,A79; then A121: X[0] by A101,A102; thus for n being Element of NAT holds X[n] from NAT_1:sch 1(A121,A119); end; scheme RecExD{D()->non empty set,A() -> Element of D(), P[set,set,set]}: ex f being Function of NAT,D() st f.0 = A() & for n being Element of NAT holds P[n,f.n,f.( n+1)] provided A1: for n being Element of NAT for x being Element of D() ex y being Element of D() st P[n,x,y] proof defpred Q[Element of NAT qua non empty set,set,set] means P[$1,$2,$3]; A2: for x being Element of NAT qua non empty set for y being Element of D() ex z being Element of D() st Q[x,y,z] by A1; consider f being Function of [:(NAT qua non empty set),D():],D() such that A3: for x being Element of NAT qua non empty set for y being Element of D() holds Q[x,y,f.(x,y)] from BINOP_1:sch 3(A2); defpred P[FinSequence] means ($1.1=A() & for n st n+2 <= len $1 holds $1.(n+ 2) = f.[n,$1.(n+1)]); consider X being set such that A4: for x holds x in X iff ex p st p in D()* & P[p] & x=p from FINSEQ_1: sch 4; set Y = union X; A5: x in X implies x in D()* proof assume x in X; then ex p st p in D()* & (p.1=A() & for n st n + 2 <= len p holds p.(n+2) = f.[n,p.(n+1)]) & x=p by A4; hence thesis; end; A6: for p,q st p in X & q in X & len p <= len q holds p c= q proof let p,q; assume that A7: p in X and A8: q in X and A9: len p <= len q; A10: ex q9 being FinSequence st q9 in D()* & (q9.1 = A() & for n st n+2<= len q9 holds q9.(n+2) = f.[n,q9.(n+1)]) & q=q9 by A4,A8; A11: ex p9 being FinSequence st p9 in D()* & (p9.1 = A() & for n st n+2<= len p9 holds p9.(n+2) = f.[n,p9.(n+1)]) & p=p9 by A4,A7; A12: for n st 1 <= n & n <= len p holds p.n = q.n proof defpred P[Nat] means 1 <= $1 & $1 <= len p & p.$1 <> q.$1; assume ex n st P[n]; then A13: ex n be Nat st P[n]; consider k be Nat such that A14: P[k] & for n be Nat st P[n] holds k <= n from NAT_1:sch 5(A13); k = 1 proof 0 <> k by A14; then consider n being Nat such that A15: k = n+1 by NAT_1:6; n+0 <= n+1 by XREAL_1:7; then A16: n <= len p by A14,A15,XXREAL_0:2; A17: n+0 < n+1 by XREAL_1:6; assume A18: k <> 1; then 1 < n+1 by A14,A15,XXREAL_0:1; then A19: 1 <= n by NAT_1:13; n <> 0 by A18,A15; then consider m being Nat such that A20: n=m+1 by NAT_1:6; reconsider m as Element of NAT by ORDINAL1:def 12; A21: m+2 <= len q by A9,A14,A15,A20,XXREAL_0:2; p.k = p.(m+(1+1)) by A15,A20 .=f.[m,p.n] by A11,A14,A15,A20 .=f.[m,q.(m+1)] by A14,A15,A19,A16,A17,A20 .=q.k by A10,A15,A20,A21; hence thesis by A14; end; hence contradiction by A11,A10,A14; end; now let x; assume x in p; then consider n be Nat such that A22: n in dom p and A23: x = [n,p.n] by FINSEQ_1:12; A24: n in Seg len p by A22,FINSEQ_1:def 3; then A25: 1 <= n by FINSEQ_1:1; A26: n <= len p by A24,FINSEQ_1:1; then n <= len q by A9,XXREAL_0:2; then n in Seg len q by A25,FINSEQ_1:1; then A27: n in dom q by FINSEQ_1:def 3; x = [n,q.n] by A12,A22,A23,A25,A26; hence x in q by A27,FUNCT_1:1; end; hence thesis by TARSKI:def 3; end; ex f being Function st f = Y proof defpred Z[set,set] means [$1,$2] in Y; A28: for x,y,z st Z[x,y] & Z[x,z] holds y=z proof let x,y,z; assume that A29: [x,y] in Y and A30: [x,z] in Y; consider Z2 being set such that A31: [x,z] in Z2 and A32: Z2 in X by A30,TARSKI:def 4; Z2 in D()* by A5,A32; then reconsider q=Z2 as FinSequence of D() by FINSEQ_1:def 11; consider Z1 being set such that A33: [x,y] in Z1 and A34: Z1 in X by A29,TARSKI:def 4; Z1 in D()* by A5,A34; then reconsider p=Z1 as FinSequence of D() by FINSEQ_1:def 11; A35: now assume len q <= len p; then A36: q c= Z1 by A6,A34,A32; [x,y] in p by A33; hence thesis by A31,A36,FUNCT_1:def 1; end; now assume len p <= len q; then p c= Z2 by A6,A34,A32; then [x,y] in q by A33; hence thesis by A31,FUNCT_1:def 1; end; hence thesis by A35; end; consider h being Function such that A37: for x,y holds [x,y] in h iff x in NAT & Z[x,y] from FUNCT_1:sch 1 (A28); take h; A38: for x,y holds [x,y] in h iff [x,y] in Y proof let x,y; thus [x,y] in h implies [x,y] in Y by A37; thus [x,y] in Y implies [x,y] in h proof assume A39: [x,y] in Y; then consider Z such that A40: [x,y] in Z and A41: Z in X by TARSKI:def 4; Z in D()* by A5,A41; then reconsider p=Z as FinSequence of D() by FINSEQ_1:def 11; x in dom p by A40,XTUPLE_0:def 12; hence thesis by A37,A39; end; end; for x holds x in h iff x in Y proof let x; thus x in h implies x in Y proof assume A42: x in h; then ex y,z st [y,z] = x by RELAT_1:def 1; hence thesis by A38,A42; end; assume A43: x in Y; then consider Z such that A44: x in Z and A45: Z in X by TARSKI:def 4; Z in D()* by A5,A45; then reconsider p=Z as FinSequence of D() by FINSEQ_1:def 11; x in p by A44; then ex y,z st [y,z] = x by RELAT_1:def 1; hence thesis by A38,A43; end; hence thesis by TARSKI:1; end; then consider g being Function such that A46: g = Y; A47: for x st x in rng g holds x in D() proof let x; assume x in rng g; then consider y such that A48: y in dom g & x = g.y by FUNCT_1:def 3; [y,x] in Y by A46,A48,FUNCT_1:1; then consider Z such that A49: [y,x] in Z and A50: Z in X by TARSKI:def 4; Z in D()* by A5,A50; then reconsider p=Z as FinSequence of D() by FINSEQ_1:def 11; y in dom p & x = p.y by A49,FUNCT_1:1; then A51: x in rng p by FUNCT_1:def 3; rng p c= D() by FINSEQ_1:def 4; hence thesis by A51; end; then rng g c= D() by TARSKI:def 3; then reconsider h = g as Function of dom g,D() by FUNCT_2:2; A52: for n holds (n+1) in dom h proof defpred P[Element of NAT] means $1+1 in dom h; A53: for n st n+2 <= len <*A()*> holds <*A()*>.(n+2) = f.[n,<*A()*>.(n+1)] proof let n; assume n+2 <= len <*A()*>; then n+2 <= 1 by FINSEQ_1:39; then n+(1+1) <= n+1 by NAT_1:12; hence thesis by XREAL_1:6; end; <*A()*>.1 = A() & <*A()*> in D()* by FINSEQ_1:def 8,def 11; then <*A()*> in X by A4,A53; then A54: {[1,A()]} in X by FINSEQ_1:37; A55: for k st P[k] holds P[k+1] proof let k; assume k+1 in dom h; then [k+1,h.(k+1)] in Y by A46,FUNCT_1:1; then consider Z such that A56: [k+1,h.(k+1)] in Z and A57: Z in X by TARSKI:def 4; Z in D()* by A5,A57; then reconsider Z as FinSequence of D() by FINSEQ_1:def 11; A58: k+1 = len Z implies thesis proof set p=Z^<*f.[k,Z.(k+1)]*>; A59: 1 <= k+1+1 by NAT_1:12; assume A60: k+1 = len Z; then 1 <= len Z by NAT_1:12; then 1 in Seg len Z by FINSEQ_1:1; then A61: 1 in dom Z by FINSEQ_1:def 3; A62: for n st n+2 <= len p holds p.(n+2) = f.[n,p.(n+1)] proof let n; assume n+2 <= len p; then A63: n+2 <= len Z + len <*f.[k,Z.(k+1)]*> by FINSEQ_1:22; then A64: n+2 <= len Z + 1 by FINSEQ_1:40; A65: n+2 <> len Z + 1 implies thesis proof n+1+1 <= len Z + 1 by A63,FINSEQ_1:40; then 1 <= n + 1 & n+1 <= len Z by NAT_1:12,XREAL_1:6; then n+1 in Seg len Z by FINSEQ_1:1; then A66: n+1 in dom Z by FINSEQ_1:def 3; A67: 1 <= n+(1+1) by NAT_1:12; assume A68: n+2 <> len Z + 1; then n+2 <= len Z by A64,NAT_1:8; then n+2 in Seg len Z by A67,FINSEQ_1:1; then A69: n+2 in dom Z by FINSEQ_1:def 3; ex q st q in D()* & q.1 = A() & (for n st n+2 <= len q holds q.(n+2) = f.[n,q.(n+1)]) & Z = q by A4,A57; then Z.(n+2) = f.[n,Z.(n+1)] by A64,A68,NAT_1:8; then p.(n+2) = f.[n,Z.(n+1)] by A69,FINSEQ_1:def 7; hence thesis by A66,FINSEQ_1:def 7; end; n+2 = len Z + 1 implies thesis proof n+1+1 <= len Z + 1 by A63,FINSEQ_1:40; then 1 <= n + 1 & n+1 <= len Z by NAT_1:12,XREAL_1:6; then n+1 in Seg len Z by FINSEQ_1:1; then A70: n+1 in dom Z by FINSEQ_1:def 3; assume A71: n+2 = len Z + 1; then p.(n+2) =<*f.[k,Z.(k+1)]*>.(n+2-(n+2-1 )) by A63,FINSEQ_1:23 .=f.[n,Z.(n+1)] by A60,A71,FINSEQ_1:40; hence thesis by A70,FINSEQ_1:def 7; end; hence thesis by A65; end; A72: p in D()* proof 1 <= k + 1 by NAT_1:12; then k+1 in Seg len Z by A60,FINSEQ_1:1; then k+1 in dom Z by FINSEQ_1:def 3; then A73: Z.(k+1) in rng Z by FUNCT_1:def 3; rng Z c= D() by FINSEQ_1:def 4; then reconsider z=Z.(k+1) as Element of D() by A73; reconsider n=k as Element of (NAT qua non empty set); p= Z^<*f.[n,z]*>; hence thesis by FINSEQ_1:def 11; end; len p = len Z + len <*f.[k,Z.(k+1)]*> by FINSEQ_1:22 .=k+1+1 by A60,FINSEQ_1:39; then k+1+1 in Seg len p by A59,FINSEQ_1:1; then k+1+1 in dom p by FINSEQ_1:def 3; then A74: [k+1+1,p.(k+1+1)] in p by FUNCT_1:1; ex p being FinSequence st p in D()* & p.1 = A() & (for n st n+2 <= len p holds p.(n+2) = f.[n,p.(n+1)]) & Z=p by A4,A57; then p.1 = A() by A61,FINSEQ_1:def 7; then p in X by A4,A72,A62; then [k+1+1,p.(k+1+1)] in h by A46,A74,TARSKI:def 4; hence thesis by FUNCT_1:1; end; k+1 <> len Z implies thesis proof k+1 in dom Z by A56,FUNCT_1:1; then k+1 in Seg len Z by FINSEQ_1:def 3; then A75: k+1 <= len Z by FINSEQ_1:1; assume k+1 <> len Z; then k+1 < len Z by A75,XXREAL_0:1; then A76: k+1+1 <= len Z by NAT_1:13; 1 <= k+1+1 by NAT_1:12; then k+1+1 in Seg len Z by A76,FINSEQ_1:1; then k+1+1 in dom Z by FINSEQ_1:def 3; then [k+1+1,Z.(k+1+1)] in Z by FUNCT_1:1; then [k+1+1,Z.(k+1+1)] in h by A46,A57,TARSKI:def 4; hence thesis by FUNCT_1:1; end; hence thesis by A58; end; [1,A()] in {[1,A()]} by TARSKI:def 1; then [1,A()] in h by A46,A54,TARSKI:def 4; then A77: P[0] by FUNCT_1:1; thus for k holds P[k] from NAT_1:sch 1(A77,A55); end; A78: for n holds h.(n+2) = f.[n,h.(n+1)] proof let n; (n+1)+1 in dom h by A52; then [n+2,h.(n+2)] in h by FUNCT_1:def 2; then consider Z being set such that A79: [n+2,h.(n+2)] in Z and A80: Z in X by A46,TARSKI:def 4; A81: ex p st p in D()* & (p.1=A() & for n st n+2 <= len p holds p.(n+2) = f.[n,p.(n+1)]) & Z=p by A4,A80; Z in D()* by A5,A80; then reconsider Z as FinSequence of D() by FINSEQ_1:def 11; n+2 in dom Z by A79,FUNCT_1:1; then n+2 in Seg len Z by FINSEQ_1:def 3; then A82: n+2 <= len Z by FINSEQ_1:1; n+1 <= n+2 by XREAL_1:7; then 1 <= n+1 & n+1 <= len Z by A82,NAT_1:12,XXREAL_0:2; then n+1 in Seg len Z by FINSEQ_1:1; then n+1 in dom Z by FINSEQ_1:def 3; then [n+1,Z.(n+1)] in Z by FUNCT_1:1; then A83: [n+1,Z.(n+1)] in h by A46,A80,TARSKI:def 4; thus h.(n+2) = Z.(n+2) by A79,FUNCT_1:1 .= f.[n,Z.(n+1)] by A81,A82 .= f.[n,h.(n+1)] by A83,FUNCT_1:1; end; ex g being Function of NAT,D() st for n holds g.n = h.(n+1) proof ex g being Function st dom g = NAT & for n holds g.n = h.(n+1) proof defpred P[set,set] means ex n st n = $1 & $2=h.(n+1); A84: for x st x in NAT ex y st P[x,y] proof let x; assume x in NAT; then reconsider n=x as Element of NAT; take h.(n+1); take n; thus thesis; end; consider g being Function such that A85: dom g = NAT & for x st x in NAT holds P[x,g.x] from CLASSES1: sch 1 (A84); take g; thus dom g = NAT by A85; thus for n holds g.n = h.(n+1) proof let n; ex m st m=n & g.n = h.(m+1) by A85; hence thesis; end; end; then consider g being Function such that A86: dom g = NAT and A87: for n holds g.n = h.(n+1); rng g c= D() proof let x; assume x in rng g; then consider y such that A88: y in dom g and A89: x = g.y by FUNCT_1:def 3; reconsider k=y as Element of NAT by A86,A88; k+1 in dom h by A52; then A90: h.(k+1) in rng h by FUNCT_1:def 3; x=h.(k+1) by A87,A89; hence thesis by A47,A90; end; then reconsider g as Function of NAT,D() by A86,FUNCT_2:2; take g; thus thesis by A87; end; then consider g being Function of NAT,D() such that A91: for n holds g.n = h.(n+1); A92: for n st n + 2 <= len <*A()*> holds <*A()*>.(n+2) = f.[n,<*A()*>.(n+1) ] proof let n; assume n + 2 <= len <*A()*>; then n +1+1 <= 0 + 1 by FINSEQ_1:39; then n + 1 <= 0 by XREAL_1:6; then n + 1 <= 0 + n; hence thesis by XREAL_1:6; end; <*A()*> in D()* & <*A()*>.1 = A() by FINSEQ_1:def 8,def 11; then <*A()*> in X by A4,A92; then A93: {[1,A()]} in X by FINSEQ_1:37; take g; [1,A()] in {[1,A()]} by TARSKI:def 1; then [1,A()] in h by A46,A93,TARSKI:def 4; then A() = h.(0+1) by FUNCT_1:1 .= g.0 by A91; hence g.0 = A(); let n be Element of NAT; A94: h.(n+(1+1)) =f.(n,h.(n+1)) by A78; P[n,g.n,f.(n,g.n)] by A3; then P[n,g.n,h.(n+1+1)] by A91,A94; hence thesis by A91; end; scheme FinRecEx{A() -> set,N() -> Nat,P[set,set,set]}: ex p being FinSequence st len p = N() & (p.1 = A() or N() = 0) & for n st 1 <= n & n < N() holds P[n,p.n, p.(n+1)] provided A1: for n being Element of NAT st 1 <= n & n < N() for x being set ex y being set st P[n,x,y] proof defpred Q[Element of NAT,set,set] means ($1 < N()-1 implies P[$1+1,$2,$3]) & (not $1 < N()-1 implies $3=0); A2: for n being Element of NAT for x being set ex y being set st Q[n,x,y] proof let n be Element of NAT,x be set; n < N()-1 implies thesis proof assume A3: n < N()-1; then n+1 < N() by XREAL_1:20; then consider y such that A4: P[n+1,x,y] by A1,NAT_1:11; take y; thus n < N()-1 implies P[n+1,x,y] by A4; thus thesis by A3; end; hence thesis; end; consider f being Function such that A5: dom f = NAT & f.0 = A() & for n being Element of NAT holds Q[n,f.n,f .(n+1)] from RecEx(A2); defpred Q[set,set] means for r being Real st r=$1 holds $2=f.(r-1); A6: for x st x in REAL ex y st Q[x,y] proof let x; assume x in REAL; then reconsider r=x as Real; take f.(r-1); thus thesis; end; consider g being Function such that A7: dom g = REAL & for x st x in REAL holds Q[x,g.x] from CLASSES1:sch 1(A6); A8: dom (g|Seg N()) = Seg N() by A7,RELAT_1:62,XBOOLE_1:1; then reconsider p = g|Seg N() as FinSequence by FINSEQ_1:def 2; take p; N() in NAT by ORDINAL1:def 12; hence len p = N() by A8,FINSEQ_1:def 3; N() <> 0 implies (p.1 = A() or N() = 0) proof assume N() <> 0; then consider k being Nat such that A9: N() = k+1 by NAT_1:6; 0 + 1 <= k +1 by XREAL_1:7; then 1 in Seg N() by A9,FINSEQ_1:1; then p.1 = g.1 by FUNCT_1:49 .= f.(1-1) by A7 .= A() by A5; hence thesis; end; hence p.1 = A() or N() = 0; let n; assume that A10: 1 <= n and A11: n < N(); 0 <> n by A10; then consider k being Nat such that A12: n = k+1 by NAT_1:6; A13: for n being Element of NAT st n < N() holds p.(n+1) = f.n proof let n be Element of NAT; assume n < N(); then 1 <= n+1 & n+1 <= N() by NAT_1:11,13; then A14: n+1 in Seg N() by FINSEQ_1:1; g.(n+1) = f.(n+1-1) by A7 .= f.n; hence thesis by A14,FUNCT_1:49; end; reconsider k as Element of NAT by ORDINAL1:def 12; k <= k+1 by NAT_1:11; then A15: k < N() by A11,A12,XXREAL_0:2; k < N()-1 by A11,A12,XREAL_1:20; then P[k+1,f.k,f.(k+1)] by A5; then P[k+1,f.k,p.(k+1+1)] by A13,A11,A12; hence thesis by A13,A12,A15; end; scheme FinRecExD{D() -> non empty set,A() -> Element of D(), N() -> Nat, P[set,set, set]}: ex p being FinSequence of D() st len p = N() & (p.1 = A() or N() = 0) & for n st 1 <= n & n < N() holds P[n,p.n,p.(n+1)] provided A1: for n being Element of NAT st 1 <= n & n < N() for x being Element of D() ex y being Element of D() st P[n,x,y] proof set 00 = the Element of D(); defpred Z[Element of NAT,set,set] means ($1 < N()-1 implies P[$1+1,$2,$3]) & (not $1 < N()-1 implies $3=00); A2: for n being Element of NAT for x being Element of D() ex y being Element of D() st Z[n,x,y] proof let n be Element of NAT,x be Element of D(); n < N()-1 implies thesis proof assume A3: n < N()-1; then n+1 < N() by XREAL_1:20; then consider y being Element of D() such that A4: P[n+1,x,y] by A1,NAT_1:11; take y; thus n < N()-1 implies P[n+1,x,y] by A4; thus thesis by A3; end; hence thesis; end; consider f being Function of NAT,D() such that A5: f.0 = A() & for n being Element of NAT holds Z[n,f.n,f.(n+1)] from RecExD(A2); defpred P[set,set] means for r being Real st r = $1 holds $2 = f.(r-1); A6: for x st x in REAL ex y st P[x,y] proof let x; assume x in REAL; then reconsider r=x as Real; take f.(r-1); thus thesis; end; consider g being Function such that A7: dom g = REAL & for x st x in REAL holds P[x,g.x] from CLASSES1:sch 1(A6); A8: dom (g|Seg N()) = Seg N() by A7,RELAT_1:62,XBOOLE_1:1; then reconsider p = g|Seg N() as FinSequence by FINSEQ_1:def 2; rng p c= D() proof let x; assume x in rng p; then consider y such that A9: y in dom p and A10: x = p.y by FUNCT_1:def 3; reconsider y as Element of NAT by A9; A11: f.(y-1) in D() proof y <> 0 by A8,A9,FINSEQ_1:1; then consider k being Nat such that A12: y = k+1 by NAT_1:6; reconsider k as Element of NAT by ORDINAL1:def 12; f.k in D(); hence thesis by A12; end; p.y = g.y by A9,FUNCT_1:47; hence thesis by A7,A10,A11; end; then reconsider p as FinSequence of D() by FINSEQ_1:def 4; take p; N() in NAT by ORDINAL1:def 12; hence len p = N() by A8,FINSEQ_1:def 3; N() <> 0 implies (p.1 = A() or N() = 0) proof assume N() <> 0; then consider k being Nat such that A13: N() = k+1 by NAT_1:6; 0 + 1 <= k +1 by XREAL_1:7; then 1 in Seg N() by A13,FINSEQ_1:1; then p.1 = g.1 by FUNCT_1:49 .= f.(1-1) by A7 .= A() by A5; hence thesis; end; hence p.1 = A() or N() = 0; let n; assume that A14: 1 <= n and A15: n < N(); 0 <> n by A14; then consider k being Nat such that A16: n = k+1 by NAT_1:6; A17: for n being Element of NAT st n < N() holds p.(n+1) = f.n proof let n be Element of NAT; assume n < N(); then 1 <= n+1 & n+1 <= N() by NAT_1:11,13; then A18: n+1 in Seg N() by FINSEQ_1:1; g.(n+1) = f.(n+1-1) by A7 .= f.n; hence thesis by A18,FUNCT_1:49; end; reconsider k as Element of NAT by ORDINAL1:def 12; k <= k+1 by NAT_1:11; then A19: k < N() by A15,A16,XXREAL_0:2; k < N() - 1 by A15,A16,XREAL_1:20; then P[k+1,f.k,f.(k+1)] by A5; then P[k+1,f.k,p.(k+1+1)] by A17,A15,A16; hence thesis by A17,A16,A19; end; scheme SeqBinOpEx{S() -> FinSequence,P[set,set,set]}: ex x st ex p being FinSequence st x = p.(len p) & len p = len S() & p.1 = S().1 & for k st 1 <= k & k < len S() holds P[S().(k+1),p.k,p.(k+1)] provided A1: for k,x st 1 <= k & k < len S() ex y st P[S().(k+1),x,y] proof defpred Q[Element of NAT,set,set] means P[S().($1+1),$2,$3]; A2: for k st 1 <= k & k < len S() for x ex y st Q[k,x,y] by A1; consider p such that A3: len p = len S() & (p.1 = S().1 or len S() = 0) & for k st 1 <= k & k < len S() holds Q[k,p.k,p.(k+1)] from FinRecEx(A2); A4: len S() <> 0 implies thesis proof assume A5: len S() <> 0; take p.(len p),p; thus p.(len p) = p.(len p) & len p = len S() & p.1 = S().1 by A3,A5; let k; assume 1 <= k & k < len S(); hence thesis by A3; end; len S() = 0 implies thesis proof assume A6: len S() = 0; take S().0,S(); thus S().0 = S().(len S()) & len S() = len S() & S().1 = S(). 1 by A6; thus thesis by A6; end; hence thesis by A4; end; scheme LambdaSeqBinOpEx{S() -> FinSequence,F(set,set) -> set}: ex x st ex p being FinSequence st x = p.(len p) & len p = len S() & p.1 = S().1 & for k st 1 <= k & k < len S() holds p.(k+1) = F(S().(k+1),p.k) proof defpred P[set,set,set] means $3 = F($1,$2); A1: for k,x st 1 <= k & k < len S() ex y st P[S().(k+1),x,y]; consider x such that A2: ex p st x = p.(len p) & len p = len S() & p.1 = S().1 & for k st 1 <= k & k < len S() holds P[S().(k+1),p.k,p.(k+1)] from SeqBinOpEx(A1); take x; consider p such that A3: x = p.(len p) & len p = len S() & p.1 = S().1 and A4: for k st 1 <= k & k < len S() holds p.(k+1) = F(S().(k+1),p.k) by A2; take p; thus x = p.(len p) & len p = len S() & p.1 = S().1 by A3; let k; assume 1 <= k & k < len S(); hence thesis by A4; end; scheme FinRecUn{A() -> set,N() -> Nat, F, G() -> FinSequence, P[set,set,set]}: F() = G() provided A1: for n st 1 <= n & n < N() for x,y1,y2 being set st P[n,x,y1] & P[n,x ,y2] holds y1 = y2 and A2: len F() = N() & (F().1 = A() or N() = 0) & for n st 1 <= n & n < N() holds P[n,F().n,F().(n+1)] and A3: len G() = N() & (G().1 = A() or N() = 0) & for n st 1 <= n & n < N() holds P[n,G().n,G().(n+1)] proof defpred P[Nat] means 1 <= $1 & $1 <= N() & F().$1 <> G().$1; assume A4: F() <> G(); dom F() = Seg len G() by A2,A3,FINSEQ_1:def 3 .= dom G() by FINSEQ_1:def 3; then consider x such that A5: x in dom F() and A6: F().x <> G().x by A4,FUNCT_1:2; A7: x in Seg len F() by A5,FINSEQ_1:def 3; reconsider x as Element of NAT by A5; A8: 1 <= x by A7,FINSEQ_1:1; x <= N() by A2,A7,FINSEQ_1:1; then A9: ex n be Nat st P[n] by A6,A8; consider n be Nat such that A10: P[n]& for k be Nat st P[k] holds n <= k from NAT_1:sch 5(A9); 0 <> n by A10; then consider k being Nat such that A11: n = k+1 by NAT_1:6; reconsider k as Element of NAT by ORDINAL1:def 12; n <> 1 by A2,A3,A10; then 1 < n by A10,XXREAL_0:1; then A12: 1 <= k by A11,NAT_1:13; k < n by A11,XREAL_1:29; then A13: k < N() by A10,XXREAL_0:2; n > k by A11,NAT_1:13; then F().k = G().k by A10,A12,A13; then A14: P[k,F().k,G().(k+1)] by A3,A12,A13; P[k,F().k,F().(k+1)] by A2,A12,A13; hence contradiction by A1,A10,A11,A12,A13,A14; end; scheme FinRecUnD{D() -> non empty set, A() -> Element of D(), N() -> Nat, F, G() -> FinSequence of D(), P[set,set,set]}: F() = G() provided A1: for n st 1 <= n & n < N() for x,y1,y2 being Element of D() st P[n,x, y1] & P[n,x,y2] holds y1 = y2 and A2: len F() = N() & (F().1 = A() or N() = 0) & for n st 1 <= n & n < N() holds P[n,F().n,F().(n+1)] and A3: len G() = N() & (G().1 = A() or N() = 0) & for n st 1 <= n & n < N() holds P[n,G().n,G().(n+1)] proof defpred P[Nat] means 1 <= $1 & $1 <= N() & F().$1 <> G().$1; assume A4: F() <> G(); dom F() = Seg len G() by A2,A3,FINSEQ_1:def 3 .= dom G() by FINSEQ_1:def 3; then consider x such that A5: x in dom F() and A6: F().x <> G().x by A4,FUNCT_1:2; A7: x in Seg len F() by A5,FINSEQ_1:def 3; reconsider x as Element of NAT by A5; A8: 1 <= x by A7,FINSEQ_1:1; x <= N() by A2,A7,FINSEQ_1:1; then A9: ex n be Nat st P[n] by A6,A8; consider n be Nat such that A10: P[n] & for k be Nat st P[k] holds n <= k from NAT_1:sch 5(A9); 0 <> n by A10; then consider k being Nat such that A11: n = k+1 by NAT_1:6; reconsider k as Element of NAT by ORDINAL1:def 12; reconsider Gk1 = G().(k+1) as Element of D() by A3,A10,A11,Lm1; n <> 1 by A2,A3,A10; then 1 < n by A10,XXREAL_0:1; then A12: 1 <= k by A11,NAT_1:13; k < n by A11,XREAL_1:29; then A13: k < N() by A10,XXREAL_0:2; then reconsider Fk = F().k as Element of D() by A2,A12,Lm1; n > k by A11,NAT_1:13; then F().k = G().k by A10,A12,A13; then A14: P[k,Fk,Gk1] by A3,A12,A13; reconsider Fk1 = F().(k+1) as Element of D() by A2,A10,A11,Lm1; P[k,Fk,Fk1] by A2,A12,A13; hence contradiction by A1,A10,A11,A12,A13,A14; end; scheme SeqBinOpUn{S() -> FinSequence,P[set,set,set],x, y() -> set}: x() = y() provided A1: for k,x,y1,y2,z st 1 <= k & k < len S() & z = S().(k+1) & P[z,x,y1] & P[z,x,y2] holds y1 = y2 and A2: ex p being FinSequence st x() = p.(len p) & len p = len S() & p.1 = S().1 & for k st 1 <= k & k < len S() holds P[S().(k+1),p.k,p.(k+1)] and A3: ex p being FinSequence st y() = p.(len p) & len p = len S() & p.1 = S().1 & for k st 1 <= k & k < len S() holds P[S().(k+1),p.k,p.(k+1)] proof defpred Q[Element of NAT,set,set] means P[S().($1+1),$2,$3]; A4: for k st 1 <= k & k < len S() for x,y1,y2 st Q[k,x,y1] & Q[k,x,y2] holds y1 = y2 by A1; consider q such that A5: y() = q.(len q) and A6: len q = len S() & q.1 = S().1 & for k st 1 <= k & k < len S() holds Q[k, q.k,q.(k+1)] by A3; A7: len q = len S() & (q.1 = S().1 or len S() = 0) & for k st 1 <= k & k < len S() holds Q[k,q.k,q.(k+1)] by A6; consider p such that A8: x() = p.(len p) and A9: len p = len S() & p.1 = S().1 & for k st 1 <= k & k < len S() holds Q[k, p.k,p.(k+1)] by A2; A10: len p = len S() & (p.1 = S().1 or len S() = 0) & for k st 1 <= k & k < len S() holds Q[k,p.k,p.(k+1)] by A9; p = q from FinRecUn(A4,A10,A7); hence thesis by A8,A5; end; scheme LambdaSeqBinOpUn{S() -> FinSequence, F(set,set) -> set, x, y() -> set}: x() = y() provided A1: ex p being FinSequence st x() = p.(len p) & len p = len S() & p.1 = S().1 & for k st 1 <= k & k < len S() holds p.(k+1) = F(S().(k+1),p.k) and A2: ex p being FinSequence st y() = p.(len p) & len p = len S() & p.1 = S().1 & for k st 1 <= k & k < len S() holds p.(k+1) = F(S().(k+1),p.k) proof defpred P[set,set,set] means $3 = F($1,$2); A3: ex p st y() = p.(len p) & len p = len S() & p.1 = S().1 & for k st 1 <= k & k < len S() holds P[S().(k+1),p.k,p.(k+1)] by A2; A4: for k,x,y1,y2,z st 1 <= k & k < len S() & z = S().(k+1) & P[z,x,y1] & P[ z,x,y2] holds y1 = y2; A5: ex p st x() = p.(len p) & len p = len S() & p.1 = S().1 & for k st 1 <= k & k < len S() holds P[S().(k+1),p.k,p.(k+1)] by A1; thus x() = y() from SeqBinOpUn(A4,A5,A3); end; scheme DefRec{A() -> set,n() -> Nat,P[set,set,set]}: (ex y being set st ex f being Function st y = f.n() & dom f = NAT & f.0 = A() & for n holds P[n,f.n,f.(n+1)]) & for y1,y2 being set st (ex f being Function st y1 = f.n() & dom f = NAT & f.0 = A() & for n holds P[n,f.n,f.(n+1)]) & (ex f being Function st y2 = f.n() & dom f = NAT & f.0 = A() & for n holds P[n,f.n,f.(n+1)]) holds y1 = y2 provided A1: for n,x ex y st P[n,x,y] and A2: for n,x,y1,y2 st P[n,x,y1] & P[n,x,y2] holds y1 = y2 proof A3: for n,x ex y st P[n,x,y] by A1; consider f being Function such that A4: dom f = NAT & f.0 = A() & for n being Element of NAT holds P[n,f.n,f .(n+1)] from RecEx(A3); A5: for n being Nat,x,y1,y2 st P[n,x,y1] & P[n,x,y2] holds y1 = y2 proof let n be Nat; n in NAT by ORDINAL1:def 12; hence thesis by A2; end; thus ex y being set st ex f being Function st y = f.n() & dom f = NAT & f.0 = A() & for n holds P[n,f.n,f.(n+1)] proof take f.n(),f; thus thesis by A4; end; let y1,y2 be set; given f1 being Function such that A6: y1 = f1.n() and A7: dom f1 = NAT and A8: f1.0 = A() and A9: for n holds P[n,f1.n,f1.(n+1)]; A10: for n being Nat holds P[n,f1.n,f1.(n+1)] proof let n be Nat; n in NAT by ORDINAL1:def 12; hence thesis by A9; end; given f2 being Function such that A11: y2 = f2.n() and A12: dom f2 = NAT and A13: f2.0 = A() and A14: for n holds P[n,f2.n,f2.(n+1)]; A15: for n being Nat holds P[n,f2.n,f2.(n+1)] proof let n be Nat; n in NAT by ORDINAL1:def 12; hence thesis by A14; end; f1 = f2 from NAT_1:sch 13(A7,A8,A10,A12,A13,A15,A5); hence thesis by A6,A11; end; scheme LambdaDefRec{A() -> set,n() -> Nat,RecFun(set,set) -> set}: (ex y being set st ex f being Function st y = f.n() & dom f = NAT & f.0 = A() & for n holds f.( n+1) = RecFun(n,f.n)) & for y1,y2 being set st (ex f being Function st y1 = f.n () & dom f = NAT & f.0 = A() & for n holds f.(n+1) = RecFun(n,f.n)) & (ex f being Function st y2 = f.n() & dom f = NAT & f.0 = A() & for n holds f.(n+1) = RecFun(n,f.n)) holds y1 = y2 proof defpred P[set,set,set] means for z st z = $2 holds $3 = RecFun($1,z); A1: for n,x ex y st P[n,x,y] proof let n,x; take RecFun(n,x); let z; assume z = x; hence thesis; end; A2: for n,x,y1,y2 st P[n,x,y1] & P[n,x,y2] holds y1 = y2 proof let n,x,y1,y2; assume that A3: for z st z = x holds y1 = RecFun(n,z) and A4: for z st z = x holds y2 = RecFun(n,z); thus y1 = RecFun(n,x) by A3 .= y2 by A4; end; A5: (ex y being set st ex f being Function st y = f.n() & dom f = NAT & f.0 = A() & for n holds P[n,f.n,f.(n+1)] ) & for y1,y2 being set st (ex f being Function st y1 = f.n() & dom f = NAT & f.0 = A() & for n holds P[n,f.n,f.(n+1)] ) & (ex f being Function st y2 = f.n() & dom f = NAT & f.0 = A() & for n holds P[n,f.n,f.(n+1)] ) holds y1 = y2 from DefRec(A1,A2); then consider y being set, f being Function such that A6: y = f.n() & dom f = NAT &( f.0 = A() & for n holds P[n,f.n,f.(n+1)] ); thus ex y being set st ex f being Function st y = f.n() & dom f = NAT & f.0 = A() & for n holds f.(n+1) = RecFun(n,f.n) proof take y,f; thus thesis by A6; end; let y1,y2 being set; given f1 being Function such that A7: y1 = f1.n() & dom f1 = NAT & f1.0 = A() and A8: for n holds f1.(n+1) = RecFun(n,f1.n); A9: for n holds P[n,f1.n,f1.(n+1)] by A8; given f2 being Function such that A10: y2 = f2.n() & dom f2 = NAT & f2.0 = A() and A11: for n holds f2.(n+1) = RecFun(n,f2.n); for n holds P[n,f2.n,f2.(n+1)] by A11; hence thesis by A5,A7,A10,A9; end; scheme DefRecD{D() -> non empty set,A() -> (Element of D()), n() -> Nat,P[set,set, set]}: (ex y being Element of D() st ex f being Function of NAT,D() st y = f.n( ) & f.0 = A() & for n holds P[n,f.n,f.(n+1)]) & for y1,y2 being Element of D() st (ex f being Function of NAT,D() st y1 = f.n() & f.0 = A() & for n holds P[n, f.n,f.(n+1)]) & (ex f being Function of NAT,D() st y2 = f.n() & f.0 = A() & for n holds P[n,f.n,f.(n+1)]) holds y1 = y2 provided A1: for n being Element of NAT,x being Element of D() ex y being Element of D() st P[n,x,y] and A2: for n being Element of NAT, x,y1,y2 being Element of D() st P[n,x,y1 ] & P[n,x,y2] holds y1 = y2 proof A3: for n being Element of NAT,x being Element of D() ex y being Element of D() st P[n,x,y] by A1; consider f being Function of NAT,D() such that A4: f.0 = A() & for n being Element of NAT holds P[n,f.n,f.(n+1)] from RecExD(A3); A5: for n being Nat, x,y1,y2 being Element of D() st P[n,x,y1] & P[n,x,y2] holds y1 = y2 proof let n be Nat; n in NAT by ORDINAL1:def 12; hence thesis by A2; end; thus ex y being Element of D() st ex f being Function of NAT,D() st y = f.n( ) & f.0 = A() & for n holds P[n,f.n,f.(n+1)] proof reconsider n = n() as Element of NAT by ORDINAL1:def 12; take f.n,f; thus thesis by A4; end; let y1,y2 be Element of D(); given f1 being Function of NAT,D() such that A6: y1 = f1.n() and A7: f1.0 = A() and A8: for n holds P[n,f1.n,f1.(n+1)]; A9: f1.0 = A() by A7; A10: for n being Nat holds P[n,f1.n,f1.(n+1)] proof let n be Nat; n in NAT by ORDINAL1:def 12; hence thesis by A8; end; given f2 being Function of NAT,D() such that A11: y2 = f2.n() and A12: f2.0 = A() and A13: for n holds P[n,f2.n,f2.(n+1)]; A14: for n being Nat holds P[n,f2.n,f2.(n+1)] proof let n be Nat; n in NAT by ORDINAL1:def 12; hence thesis by A13; end; A15: f2.0 = A() by A12; f1 = f2 from NAT_1:sch 14(A9,A10,A15,A14,A5); hence thesis by A6,A11; end; scheme LambdaDefRecD{D() -> non empty set, A() -> Element of D(), n() -> Nat, RecFun(set,set) -> Element of D()}: (ex y being Element of D() st ex f being Function of NAT,D() st y = f.n() & f.0 = A() & for n being Nat holds f.(n+1) = RecFun(n,f.n)) & for y1,y2 being Element of D() st (ex f being Function of NAT, D() st y1 = f.n() & f.0 = A() & for n being Nat holds f.(n+1) = RecFun(n,f.n)) & (ex f being Function of NAT,D() st y2 = f.n() & f.0 = A() & for n being Nat holds f.(n+1) = RecFun(n,f.n)) holds y1 = y2 proof defpred Q[set,set,set] means for z being Element of D() st z=$2 holds $3 = RecFun($1,z); A1: for n being Element of NAT,x being Element of D() ex y being Element of D() st Q[n,x,y] proof let n be Element of NAT,x be Element of D(); take RecFun(n,x); let z be Element of D(); assume z = x; hence thesis; end; A2: for n being Element of NAT,x,y1,y2 being Element of D() st Q[n,x,y1] & Q [n,x,y2] holds y1 = y2 proof let n be Element of NAT,x,y1,y2 be Element of D(); assume that A3: for z being Element of D() st z = x holds y1 = RecFun(n,z) and A4: for z being Element of D() st z = x holds y2 = RecFun(n,z); thus y1 = RecFun(n,x) by A3 .= y2 by A4; end; A5: (ex y being Element of D() st ex f being Function of NAT,D() st y = f.n( ) & f.0 = A() & for n being Element of NAT holds Q[n,f.n,f.(n+1)]) & for y1,y2 being Element of D() st (ex f being Function of NAT,D() st y1 = f.n() & f.0 = A () & for n being Element of NAT holds Q[n,f.n,f.(n+1)]) & (ex f being Function of NAT,D() st y2 = f.n() & f.0 = A() & for n being Element of NAT holds Q[n,f.n ,f.(n+1)]) holds y1 = y2 from DefRecD(A1,A2); then consider y being Element of D(), f being Function of NAT,D() such that A6: y = f.n() & f.0 = A() and A7: for n being Element of NAT holds Q[n,f.n,f.(n+1)]; thus ex y being Element of D() st ex f being Function of NAT,D() st y = f.n( ) & f.0 = A() & for n being Nat holds f.(n+1) = RecFun(n,f.n) proof take y,f; thus y = f.n() & f.0 = A() by A6; let n be Nat; reconsider n as Element of NAT by ORDINAL1:def 12; Q[n,f.n,f.(n+1)] by A7; hence thesis; end; let y1,y2 being Element of D(); given f being Function of NAT,D() such that A8: y1 = f.n() & f.0 = A() and A9: for n being Nat holds f.(n+1) = RecFun(n,f.n); A10: for n being Element of NAT holds Q[n,f.n,f.(n+1)] by A9; given f2 being Function of NAT,D() such that A11: y2 = f2.n() & f2.0 = A() and A12: for n being Nat holds f2.(n+1) = RecFun(n,f2.n); for n being Element of NAT holds Q[n,f2.n,f2.(n+1)] by A12; hence thesis by A5,A8,A11,A10; end; scheme SeqBinOpDef{S() -> FinSequence,P[set,set,set]}: (ex x st ex p being FinSequence st x = p.(len p) & len p = len S() & p.1 = S().1 & for k st 1 <= k & k < len S() holds P[S().(k+1),p.k,p.(k+1)]) & for x,y st (ex p being FinSequence st x = p.(len p) & len p = len S() & p.1 = S().1 & for k st 1 <= k & k < len S() holds P[S().(k+1),p.k,p.(k+1)]) & (ex p being FinSequence st y = p.(len p) & len p = len S() & p.1 = S().1 & for k st 1 <= k & k < len S() holds P[S().(k+1),p.k,p.(k+1)]) holds x = y provided A1: for k,y st 1 <= k & k < len S() ex z st P[S().(k+1),y,z] and A2: for k,x,y1,y2,z st 1 <= k & k < len S() & z = S().(k+1) & P[z,x,y1] & P[z,x,y2] holds y1 = y2 proof A3: for k,x,y1,y2,z st 1 <= k & k < len S() & z = S().(k+1) & P[z,x,y1] & P[ z,x,y2] holds y1 = y2 by A2; A4: for k,y st 1 <= k & k < len S() ex z st P[S().(k+1),y,z] by A1; thus ex x st ex p being FinSequence st x = p.(len p) & len p = len S() & p.1 = S().1 & for k st 1 <= k & k < len S() holds P[S().(k+1),p.k,p.(k+1)] from SeqBinOpEx(A4); let x,y; assume A5: ex p being FinSequence st x = p.(len p) & len p = len S() & p.1 = S( ).1 & for k st 1 <= k & k < len S() holds P[S().(k+1),p.k,p.(k+1)]; assume A6: ex p being FinSequence st y = p.(len p) & len p = len S() & p.1 = S( ).1 & for k st 1 <= k & k < len S() holds P[S().(k+1),p.k,p.(k+1)]; thus x = y from SeqBinOpUn(A3,A5,A6); end; scheme LambdaSeqBinOpDef{S() -> FinSequence,F(set,set) -> set}: (ex x st ex p being FinSequence st x = p.(len p) & len p = len S() & p.1 = S().1 & for k st 1 <= k & k < len S() holds p.(k+1) = F(S().(k+1),p.k)) & for x,y st (ex p being FinSequence st x = p.(len p) & len p = len S() & p.1 = S().1 & for k st 1 <= k & k < len S() holds p.(k+1) = F(S().(k+1),p.k)) & (ex p being FinSequence st y = p.(len p) & len p = len S() & p.1 = S().1 & for k st 1 <= k & k < len S() holds p.(k+1) = F(S().(k+1),p.k)) holds x = y proof thus ex x st ex p being FinSequence st x = p.(len p) & len p = len S() & p.1 = S().1 & for k st 1 <= k & k < len S() holds p.(k+1) = F(S().(k+1),p.k) from LambdaSeqBinOpEx; let x,y; assume A1: ex p being FinSequence st x = p.(len p) & len p = len S() & p.1 = S( ).1 & for k st 1 <= k & k < len S() holds p.(k+1) = F(S().(k+1),p.k); assume A2: ex p being FinSequence st y = p.(len p) & len p = len S() & p.1 = S( ).1 & for k st 1 <= k & k < len S() holds p.(k+1) = F(S().(k+1),p.k); thus x = y from LambdaSeqBinOpUn(A1,A2); end; scheme SeqExD{D() -> non empty set, N() -> Element of NAT, P[set,set]}: ex p being FinSequence of D() st dom p = Seg N() & for k being Element of NAT st k in Seg N() holds P[k,p/.k] provided A1: for k being Element of NAT st k in Seg N() ex x being Element of D() st P[k,x] proof per cases; suppose A2: N() = 0; take <*>(D()); thus thesis by A2; end; suppose A3: N() <> 0; now assume A4: Seg N() = {}; now per cases; case N() = 0; hence contradiction by A3; end; case N() <> 0; hence contradiction by A4; end; end; hence contradiction; end; then reconsider M = Seg N() as non empty set; A5: for x being Element of M ex y being Element of D() st P[x,y] proof let x be Element of M; x in Seg N(); hence thesis by A1; end; consider f being Function of M,D() such that A6: for x being Element of M holds P[x,f.x] from FUNCT_2:sch 3(A5); dom f = Seg N() by FUNCT_2:def 1; then reconsider q = f as FinSequence by FINSEQ_1:def 2; now let u be set; A7: rng q c= D() by RELAT_1:def 19; assume u in rng q; hence u in D() by A7; end; then rng q c= D() by TARSKI:def 3; then reconsider q as FinSequence of D() by FINSEQ_1:def 4; take q; now let k be Element of NAT; assume A8: k in Seg N(); then k in dom q by FUNCT_2:def 1; then q.k = q/.k by PARTFUN1:def 6; hence P[k,q/.k] by A6,A8; end; hence thesis by FUNCT_2:def 1; end; end; scheme FinRecExD2{D() -> non empty set,A() -> (Element of D()), N() -> Element of NAT, P[set,set,set]}: ex p being FinSequence of D() st len p = N() & (p/.1 = A( ) or N() = 0) & for n being Element of NAT st 1 <= n & n <= N()-1 holds P[n,p/. n,p/.(n+1)] provided A1: for n being Element of NAT st 1 <= n & n <= N()-1 holds for x being Element of D() ex y being Element of D() st P[n,x,y] proof set 00 = the Element of D(); defpred Q[Element of NAT,set,set] means (0 <= $1 & $1 <= N()-2 implies P[$1+ 1,$2,$3]) & (not (0 <= $1 & $1 <= N()-2) implies $3=00); A2: for n be Element of NAT for x be Element of D() ex y be Element of D() st Q[n,x,y] proof let n be Element of NAT,x be Element of D(); 0 <= n & n <= N()-2 implies thesis proof A3: 0+1 <= n+1 by XREAL_1:6; assume that 0 <= n and A4: n <= N()-2; n+1 <= N()-2+1 by A4,XREAL_1:6; then consider y being Element of D() such that A5: P[n+1,x,y] by A1,A3; take y; thus 0 <= n & n <= N()-2 implies P[n+1,x,y] by A5; thus thesis by A4; end; hence thesis; end; consider f being Function of NAT,D() such that A6: f.0 = A() & for n being Element of NAT holds Q[n,f.n,f.(n+1)] from RecExD(A2); defpred Q[set,set] means for r being Real st r = $1 holds $2 = f.(r-1); A7: for x being set st x in REAL ex y being set st Q[x,y] proof let x be set; assume x in REAL; then reconsider r=x as Real; take f.(r-1); thus thesis; end; consider g being Function such that A8: dom g = REAL & for x being set st x in REAL holds Q[x,g.x] from CLASSES1:sch 1(A7); A9: dom (g|Seg N()) = Seg N() by A8,RELAT_1:62,XBOOLE_1:1; then reconsider p = g|Seg N() as FinSequence by FINSEQ_1:def 2; now let x be set; assume x in rng p; then consider y being set such that A10: y in dom p and A11: x = p.y by FUNCT_1:def 3; reconsider y as Element of NAT by A10; A12: f.(y-1) in D() proof y <> 0 by A9,A10,FINSEQ_1:1; then consider k being Nat such that A13: y = k+1 by NAT_1:6; reconsider k as Element of NAT by ORDINAL1:def 12; f.k in D(); hence thesis by A13; end; p.y = g.y by A10,FUNCT_1:47; hence x in D() by A8,A11,A12; end; then rng p c= D() by TARSKI:def 3; then reconsider p as FinSequence of D() by FINSEQ_1:def 4; take p; thus len p = N() by A9,FINSEQ_1:def 3; N() <> 0 implies p/.1 = A() proof assume N() <> 0; then consider k being Nat such that A14: N() = k+1 by NAT_1:6; 0 + 1 <= k +1 by XREAL_1:7; then A15: 1 in Seg N() by A14,FINSEQ_1:1; then p/.1 = p.1 by A9,PARTFUN1:def 6 .= g.1 by A15,FUNCT_1:49 .= f.(1-1) by A8 .= A() by A6; hence thesis; end; hence p/.1 = A() or N() = 0; let n be Element of NAT; assume that A16: 1 <= n and A17: n <= N()-1; consider k being Nat such that A18: n = k+1 by A16,NAT_1:6; A19: for n being Element of NAT st n <= N()-1 holds p/.(n+1) = f.n proof let n be Element of NAT; assume n <= N() - 1; then A20: n+1 <= N()-1+1 by XREAL_1:6; A21: g.(n+1) = f.(n+1-1) by A8 .= f.n; 1 <= n+1 by NAT_1:11; then A22: n+1 in Seg N() by A20,FINSEQ_1:1; then p/.(n+1) = p.(n+1) by A9,PARTFUN1:def 6; hence thesis by A22,A21,FUNCT_1:49; end; A23: k <= k+1 by NAT_1:11; A24: k in NAT by ORDINAL1:def 12; k <= N()-1-1 by A17,A18,XREAL_1:19; then P[k+1,f.k,f.(k+1)] by A6,A24; then P[k+1,f.k,p/.(k+1+1)] by A19,A17,A18; hence thesis by A19,A17,A18,A24,A23,XXREAL_0:2; end; begin Lm1: for f being FinSequence, h being Function st dom h = dom f holds h is FinSequence proof let f be FinSequence, h be Function such that A1: dom h = dom f; h is FinSequence-like proof take len f; thus thesis by A1,FINSEQ_1:def 3; end; hence thesis; end; Lm2: for f, g being FinSequence, h being Function st dom h = dom f /\ dom g holds h is FinSequence proof let f, g be FinSequence, h be Function such that A1: dom h = dom f /\ dom g; consider n being Nat such that A2: dom f = Seg n by FINSEQ_1:def 2; consider m being Nat such that A3: dom g = Seg m by FINSEQ_1:def 2; h is FinSequence-like proof per cases; suppose A4: n <= m; take n; thus thesis by A1,A2,A3,A4,FINSEQ_1:7; end; suppose A5: m <= n; take m; thus thesis by A1,A2,A3,A5,FINSEQ_1:7; end; end; hence thesis; end; registration cluster complex-valued for FinSequence; existence proof take <*>COMPLEX; thus thesis; end; end; registration let r be rational number; cluster |. r .| -> rational; coherence proof |. r .| = -r or |. r .| = r by COMPLEX1:71; hence thesis; end; end; definition let f1,f2 be complex-valued Function; deffunc F(set) = f1.$1 + f2.$1; set X = dom f1 /\ dom f2; func f1 + f2 -> Function means :Def1: dom it = dom f1 /\ dom f2 & for c being set st c in dom it holds it.c = f1.c + f2.c; existence proof ex f being Function st dom f = X & for x being set st x in X holds f.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let f, g be Function such that A1: dom f = X and A2: for c being set st c in dom f holds f.c = F(c) and A3: dom g = X and A4: for c being set st c in dom g holds g.c = F(c); now let x be set; assume A5: x in dom f; hence f.x = F(x) by A2 .= g.x by A1,A3,A4,A5; end; hence thesis by A1,A3,FUNCT_1:2; end; commutativity; end; registration let f1,f2 be complex-valued Function; cluster f1+f2 -> complex-valued; coherence proof let x be set; assume x in dom (f1+f2); then (f1+f2).x = f1.x + f2.x by Def1; hence thesis; end; end; registration let f1,f2 be real-valued Function; cluster f1+f2 -> real-valued; coherence proof let x be set; assume x in dom (f1+f2); then (f1+f2).x = f1.x + f2.x by Def1; hence thesis; end; end; registration let f1,f2 be RAT-valued Function; cluster f1+f2 -> RAT-valued; coherence proof let y be set; assume y in rng(f1+f2); then consider x being set such that A1: x in dom (f1+f2) and A2: (f1+f2).x = y by FUNCT_1:def 3; (f1+f2).x = f1.x + f2.x by A1,Def1; hence thesis by A2,RAT_1:def 2; end; end; registration let f1,f2 be INT-valued Function; cluster f1+f2 -> INT-valued; coherence proof let y be set; assume y in rng(f1+f2); then consider x being set such that A1: x in dom (f1+f2) and A2: (f1+f2).x = y by FUNCT_1:def 3; (f1+f2).x = f1.x + f2.x by A1,Def1; hence thesis by A2,INT_1:def 2; end; end; registration let f1,f2 be natural-valued Function; cluster f1+f2 -> natural-valued; coherence proof let x be set; assume x in dom (f1+f2); then (f1+f2).x = f1.x + f2.x by Def1; hence thesis; end; end; definition let C be set; let D1,D2 be complex-membered set; let f1 be PartFunc of C,D1; let f2 be PartFunc of C,D2; redefine func f1+f2 -> PartFunc of C,COMPLEX; coherence proof dom (f1+f2) = dom f1 /\ dom f2 & rng (f1+f2) c= COMPLEX by Def1, VALUED_0:def 1; hence thesis by RELSET_1:4; end; end; definition let C be set; let D1,D2 be real-membered set; let f1 be PartFunc of C,D1; let f2 be PartFunc of C,D2; redefine func f1+f2 -> PartFunc of C,REAL; coherence proof dom (f1+f2) = dom f1 /\ dom f2 & rng (f1+f2) c= REAL by Def1,VALUED_0:def 3 ; hence thesis by RELSET_1:4; end; end; definition let C be set; let D1,D2 be rational-membered set; let f1 be PartFunc of C,D1; let f2 be PartFunc of C,D2; redefine func f1+f2 -> PartFunc of C,RAT; coherence proof dom (f1+f2) = dom f1 /\ dom f2 & rng (f1+f2) c= RAT by Def1,RELAT_1:def 19; hence thesis by RELSET_1:4; end; end; definition let C be set; let D1,D2 be integer-membered set; let f1 be PartFunc of C,D1; let f2 be PartFunc of C,D2; redefine func f1+f2 -> PartFunc of C,INT; coherence proof dom (f1+f2) = dom f1 /\ dom f2 & rng (f1+f2) c= INT by Def1,RELAT_1:def 19; hence thesis by RELSET_1:4; end; end; definition let C be set; let D1,D2 be natural-membered set; let f1 be PartFunc of C,D1; let f2 be PartFunc of C,D2; redefine func f1+f2 -> PartFunc of C,NAT; coherence proof dom (f1+f2) = dom f1 /\ dom f2 & rng (f1+f2) c= NAT by Def1,VALUED_0:def 6; hence thesis by RELSET_1:4; end; end; registration let C be set; let D1,D2 be complex-membered non empty set; let f1 be Function of C,D1; let f2 be Function of C,D2; cluster f1+f2 -> total for PartFunc of C,COMPLEX; coherence proof dom f1 = C & dom f2 = C by FUNCT_2:def 1; then dom(f1+f2) = C /\ C by Def1 .= C; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D1,D2 be real-membered non empty set; let f1 be Function of C,D1; let f2 be Function of C,D2; cluster f1+f2 -> total for PartFunc of C,REAL; coherence proof dom f1 = C & dom f2 = C by FUNCT_2:def 1; then dom(f1+f2) = C /\ C by Def1 .= C; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D1,D2 be rational-membered non empty set; let f1 be Function of C,D1; let f2 be Function of C,D2; cluster f1+f2 -> total for PartFunc of C,RAT; coherence proof dom f1 = C & dom f2 = C by FUNCT_2:def 1; then dom(f1+f2) = C /\ C by Def1 .= C; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D1,D2 be integer-membered non empty set; let f1 be Function of C,D1; let f2 be Function of C,D2; cluster f1+f2 -> total for PartFunc of C,INT; coherence proof dom f1 = C & dom f2 = C by FUNCT_2:def 1; then dom(f1+f2) = C /\ C by Def1 .= C; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D1,D2 be natural-membered non empty set; let f1 be Function of C,D1; let f2 be Function of C,D2; cluster f1+f2 -> total for PartFunc of C,NAT; coherence proof dom f1 = C & dom f2 = C by FUNCT_2:def 1; then dom(f1+f2) = C /\ C by Def1 .= C; hence thesis by PARTFUN1:def 2; end; end; theorem for C being set, D1,D2 being complex-membered non empty set for f1 being Function of C,D1, f2 being Function of C,D2 for c being Element of C holds (f1+f2).c = f1.c + f2.c proof let C be set; let D1,D2 be complex-membered non empty set; let f1 be Function of C,D1, f2 be Function of C,D2; A1: dom(f1+f2) = C by FUNCT_2:def 1; let c be Element of C; per cases; suppose C is non empty; hence thesis by A1,Def1; end; suppose A2: C is empty; then dom f1 = {}; then f1.c = 0 by FUNCT_1:def 2; hence thesis by A2; end; end; registration let f1, f2 be complex-valued FinSequence; cluster f1+f2 -> FinSequence-like; coherence proof dom(f1+f2) = dom f1 /\ dom f2 by Def1; hence thesis by Lm2; end; end; begin definition let f be complex-valued Function, r be complex number; deffunc F(set) = r + f.$1; func r + f -> Function means :Def2: dom it = dom f & for c being set st c in dom it holds it.c = r + f.c; existence proof ex g being Function st dom g = dom f & for x being set st x in dom f holds g.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let h, g be Function such that A1: dom h = dom f and A2: for c being set st c in dom h holds h.c = F(c) and A3: dom g = dom f and A4: for c being set st c in dom g holds g.c = F(c); now let x be set; assume A5: x in dom h; hence h.x = F(x) by A2 .= g.x by A1,A3,A4,A5; end; hence thesis by A1,A3,FUNCT_1:2; end; end; notation let f be complex-valued Function, r be complex number; synonym f + r for r + f; end; registration let f be complex-valued Function, r be complex number; cluster r+f -> complex-valued; coherence proof let x be set; assume x in dom (r+f); then (r+f).x = r + f.x by Def2; hence thesis; end; end; registration let f be real-valued Function, r be real number; cluster r+f -> real-valued; coherence proof let x be set; assume x in dom (r+f); then (r+f).x = r + f.x by Def2; hence thesis; end; end; registration let f be RAT-valued Function, r be rational number; cluster r+f -> RAT-valued; coherence proof let y be set; assume y in rng (r+f); then consider x being set such that A1: x in dom (r+f) and A2: (r+f).x = y by FUNCT_1:def 3; (r+f).x = r + f.x by A1,Def2; hence thesis by A2,RAT_1:def 2; end; end; registration let f be INT-valued Function, r be integer number; cluster r+f -> INT-valued; coherence proof let y be set; assume y in rng (r+f); then consider x being set such that A1: x in dom (r+f) and A2: (r+f).x = y by FUNCT_1:def 3; (r+f).x = r + f.x by A1,Def2; hence thesis by A2,INT_1:def 2; end; end; registration let f be natural-valued Function, r be Nat; cluster r+f -> natural-valued; coherence proof let x be set; assume x in dom (r+f); then (r+f).x = r + f.x by Def2; hence thesis; end; end; definition let C be set; let D be complex-membered set; let f be PartFunc of C,D; let r be complex number; redefine func r+f -> PartFunc of C,COMPLEX; coherence proof dom (r+f) = dom f & rng (r+f) c= COMPLEX by Def2,VALUED_0:def 1; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be real-membered set; let f be PartFunc of C,D; let r be real number; redefine func r+f -> PartFunc of C,REAL; coherence proof dom (r+f) = dom f & rng (r+f) c= REAL by Def2,VALUED_0:def 3; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be rational-membered set; let f be PartFunc of C,D; let r be rational number; redefine func r+f -> PartFunc of C,RAT; coherence proof dom (r+f) = dom f & rng (r+f) c= RAT by Def2,RELAT_1:def 19; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be integer-membered set; let f be PartFunc of C,D; let r be integer number; redefine func r+f -> PartFunc of C,INT; coherence proof dom (r+f) = dom f & rng (r+f) c= INT by Def2,RELAT_1:def 19; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be natural-membered set; let f be PartFunc of C,D; let r be Nat; redefine func r+f -> PartFunc of C,NAT; coherence proof dom (r+f) = dom f & rng (r+f) c= NAT by Def2,VALUED_0:def 6; hence thesis by RELSET_1:4; end; end; registration let C be set; let D be complex-membered non empty set; let f be Function of C,D; let r be complex number; cluster r+f -> total for PartFunc of C,COMPLEX; coherence proof dom(r+f) = dom f by Def2 .= C by FUNCT_2:def 1; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D be real-membered non empty set; let f be Function of C,D; let r be real number; cluster r+f -> total for PartFunc of C,REAL; coherence proof dom(r+f) = dom f by Def2 .= C by FUNCT_2:def 1; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D be rational-membered non empty set; let f be Function of C,D; let r be rational number; cluster r+f -> total for PartFunc of C,RAT; coherence proof dom(r+f) = dom f by Def2 .= C by FUNCT_2:def 1; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D be integer-membered non empty set; let f be Function of C,D; let r be integer number; cluster r+f -> total for PartFunc of C,INT; coherence proof dom(r+f) = dom f by Def2 .= C by FUNCT_2:def 1; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D be natural-membered non empty set; let f be Function of C,D; let r be Nat; cluster r+f -> total for PartFunc of C,NAT; coherence proof dom(r+f) = dom f by Def2 .= C by FUNCT_2:def 1; hence thesis by PARTFUN1:def 2; end; end; theorem for C being non empty set, D being complex-membered non empty set for f being Function of C,D, r being complex number for c being Element of C holds (r+f).c = r + f.c proof let C be non empty set; let D be complex-membered non empty set; let f be Function of C,D, r be complex number; dom(r+f) = C by FUNCT_2:def 1; hence thesis by Def2; end; registration let f be complex-valued FinSequence, r be complex number; cluster r+f -> FinSequence-like; coherence proof dom (r+f) = dom f by Def2; hence thesis by Lm1; end; end; begin definition let f be complex-valued Function, r be complex number; func f - r -> Function equals -r + f; coherence; end; theorem for f being complex-valued Function, r being complex number holds dom (f-r) = dom f & for c being set st c in dom f holds (f-r).c = f.c - r proof let f be complex-valued Function, r be complex number; dom (f-r) = dom f by Def2; hence thesis by Def2; end; registration let f be complex-valued Function, r be complex number; cluster f-r -> complex-valued; coherence; end; registration let f be real-valued Function, r be real number; cluster f-r -> real-valued; coherence; end; registration let f be RAT-valued Function, r be rational number; cluster f-r -> RAT-valued; coherence; end; registration let f be INT-valued Function, r be integer number; cluster f-r -> INT-valued; coherence; end; definition let C be set; let D be complex-membered set; let f be PartFunc of C,D; let r be complex number; redefine func f-r -> PartFunc of C,COMPLEX; coherence proof dom (f-r) = dom f & rng (f-r) c= COMPLEX by Def2,VALUED_0:def 1; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be real-membered set; let f be PartFunc of C,D; let r be real number; redefine func f-r -> PartFunc of C,REAL; coherence proof dom (f-r) = dom f & rng (f-r) c= REAL by Def2,VALUED_0:def 3; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be rational-membered set; let f be PartFunc of C,D; let r be rational number; redefine func f-r -> PartFunc of C,RAT; coherence proof dom (f-r) = dom f & rng (f-r) c= RAT by Def2,RELAT_1:def 19; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be integer-membered set; let f be PartFunc of C,D; let r be integer number; redefine func f-r -> PartFunc of C,INT; coherence proof dom (f-r) = dom f & rng (f-r) c= INT by Def2,RELAT_1:def 19; hence thesis by RELSET_1:4; end; end; registration let C be set; let D be complex-membered non empty set; let f be Function of C,D; let r be complex number; cluster f-r -> total for PartFunc of C,COMPLEX; coherence; end; registration let C be set; let D be real-membered non empty set; let f be Function of C,D; let r be real number; cluster f-r -> total for PartFunc of C,REAL; coherence; end; registration let C be set; let D be rational-membered non empty set; let f be Function of C,D; let r be rational number; cluster f-r -> total for PartFunc of C,RAT; coherence; end; registration let C be set; let D be integer-membered non empty set; let f be Function of C,D; let r be integer number; cluster f-r -> total for PartFunc of C,INT; coherence; end; theorem for C being non empty set, D being complex-membered non empty set for f being Function of C,D, r being complex number for c being Element of C holds (f-r).c = f.c - r proof let C be non empty set; let D be complex-membered non empty set; let f be Function of C,D, r be complex number; dom (f-r) = C by FUNCT_2:def 1; hence thesis by Def2; end; registration let f be complex-valued FinSequence, r be complex number; cluster f-r -> FinSequence-like; coherence; end; begin definition let f1,f2 be complex-valued Function; deffunc F(set) = f1.$1 * f2.$1; set X = dom f1 /\ dom f2; func f1 (#) f2 -> Function means :Def4: dom it = dom f1 /\ dom f2 & for c being set st c in dom it holds it.c = f1.c * f2.c; existence proof ex f being Function st dom f = X & for x being set st x in X holds f.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let f, g be Function such that A1: dom f = X and A2: for c being set st c in dom f holds f.c = F(c) and A3: dom g = X and A4: for c being set st c in dom g holds g.c = F(c); now let x be set; assume A5: x in dom f; hence f.x = F(x) by A2 .= g.x by A1,A3,A4,A5; end; hence thesis by A1,A3,FUNCT_1:2; end; commutativity; end; theorem for f1,f2 being complex-valued Function for c being set holds (f1(#)f2 ).c = f1.c * f2.c proof let f1,f2 be complex-valued Function; let c be set; A1: dom (f1(#)f2) = dom f1 /\ dom f2 by Def4; per cases; suppose c in dom (f1(#)f2); hence thesis by Def4; end; suppose A2: not c in dom (f1(#)f2); then not c in dom f1 or not c in dom f2 by A1,XBOOLE_0:def 4; then f1.c = 0 or f2.c = 0 by FUNCT_1:def 2; hence thesis by A2,FUNCT_1:def 2; end; end; registration let f1,f2 be complex-valued Function; cluster f1(#)f2 -> complex-valued; coherence proof let x be set; assume x in dom (f1(#)f2); then (f1(#)f2).x = f1.x * f2.x by Def4; hence thesis; end; end; registration let f1,f2 be real-valued Function; cluster f1(#)f2 -> real-valued; coherence proof let x be set; assume x in dom (f1(#)f2); then (f1(#)f2).x = f1.x * f2.x by Def4; hence thesis; end; end; registration let f1,f2 be RAT-valued Function; cluster f1(#)f2 -> RAT-valued; coherence proof let y be set; assume y in rng (f1(#)f2); then consider x being set such that A1: x in dom (f1(#)f2) and A2: (f1(#)f2).x = y by FUNCT_1:def 3; (f1(#)f2).x = f1.x * f2.x by A1,Def4; hence thesis by A2,RAT_1:def 2; end; end; registration let f1,f2 be INT-valued Function; cluster f1(#)f2 -> INT-valued; coherence proof let y be set; assume y in rng (f1(#)f2); then consider x being set such that A1: x in dom (f1(#)f2) and A2: (f1(#)f2).x = y by FUNCT_1:def 3; (f1(#)f2).x = f1.x * f2.x by A1,Def4; hence thesis by A2,INT_1:def 2; end; end; registration let f1,f2 be natural-valued Function; cluster f1(#)f2 -> natural-valued; coherence proof let x be set; assume x in dom (f1(#)f2); then (f1(#)f2).x = f1.x * f2.x by Def4; hence thesis; end; end; definition let C be set; let D1,D2 be complex-membered set; let f1 be PartFunc of C,D1; let f2 be PartFunc of C,D2; redefine func f1(#)f2 -> PartFunc of C,COMPLEX; coherence proof dom (f1(#)f2) = dom f1 /\ dom f2 & rng (f1(#)f2) c= COMPLEX by Def4, VALUED_0:def 1; hence thesis by RELSET_1:4; end; end; definition let C be set; let D1,D2 be real-membered set; let f1 be PartFunc of C,D1; let f2 be PartFunc of C,D2; redefine func f1(#)f2 -> PartFunc of C,REAL; coherence proof dom (f1(#)f2) = dom f1 /\ dom f2 & rng (f1(#)f2) c= REAL by Def4, VALUED_0:def 3; hence thesis by RELSET_1:4; end; end; definition let C be set; let D1,D2 be rational-membered set; let f1 be PartFunc of C,D1; let f2 be PartFunc of C,D2; redefine func f1(#)f2 -> PartFunc of C,RAT; coherence proof dom (f1(#)f2) = dom f1 /\ dom f2 & rng (f1(#)f2) c= RAT by Def4, RELAT_1:def 19; hence thesis by RELSET_1:4; end; end; definition let C be set; let D1,D2 be integer-membered set; let f1 be PartFunc of C,D1; let f2 be PartFunc of C,D2; redefine func f1(#)f2 -> PartFunc of C,INT; coherence proof dom (f1(#)f2) = dom f1 /\ dom f2 & rng (f1(#)f2) c= INT by Def4, RELAT_1:def 19; hence thesis by RELSET_1:4; end; end; definition let C be set; let D1,D2 be natural-membered set; let f1 be PartFunc of C,D1; let f2 be PartFunc of C,D2; redefine func f1(#)f2 -> PartFunc of C,NAT; coherence proof dom (f1(#)f2) = dom f1 /\ dom f2 & rng (f1(#)f2) c= NAT by Def4, VALUED_0:def 6; hence thesis by RELSET_1:4; end; end; registration let C be set; let D1,D2 be complex-membered non empty set; let f1 be Function of C,D1; let f2 be Function of C,D2; cluster f1(#)f2 -> total for PartFunc of C,COMPLEX; coherence proof dom f1 = C & dom f2 = C by FUNCT_2:def 1; then dom(f1(#)f2) = C /\ C by Def4 .= C; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D1,D2 be real-membered non empty set; let f1 be Function of C,D1; let f2 be Function of C,D2; cluster f1(#)f2 -> total for PartFunc of C,REAL; coherence proof dom f1 = C & dom f2 = C by FUNCT_2:def 1; then dom(f1(#)f2) = C /\ C by Def4 .= C; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D1,D2 be rational-membered non empty set; let f1 be Function of C,D1; let f2 be Function of C,D2; cluster f1(#)f2 -> total for PartFunc of C,RAT; coherence proof dom f1 = C & dom f2 = C by FUNCT_2:def 1; then dom(f1(#)f2) = C /\ C by Def4 .= C; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D1,D2 be integer-membered non empty set; let f1 be Function of C,D1; let f2 be Function of C,D2; cluster f1(#)f2 -> total for PartFunc of C,INT; coherence proof dom f1 = C & dom f2 = C by FUNCT_2:def 1; then dom(f1(#)f2) = C /\ C by Def4 .= C; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D1,D2 be natural-membered non empty set; let f1 be Function of C,D1; let f2 be Function of C,D2; cluster f1(#)f2 -> total for PartFunc of C,NAT; coherence proof dom f1 = C & dom f2 = C by FUNCT_2:def 1; then dom(f1(#)f2) = C /\ C by Def4 .= C; hence thesis by PARTFUN1:def 2; end; end; registration let f1, f2 be complex-valued FinSequence; cluster f1(#)f2 -> FinSequence-like; coherence proof dom(f1(#)f2) = dom f1 /\ dom f2 by Def4; hence thesis by Lm2; end; end; begin definition let f be complex-valued Function, r be complex number; deffunc F(set) = r * f.$1; func r (#) f -> Function means :Def5: dom it = dom f & for c being set st c in dom it holds it.c = r * f.c; existence proof ex g being Function st dom g = dom f & for x being set st x in dom f holds g.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let h, g be Function such that A1: dom h = dom f and A2: for c being set st c in dom h holds h.c = F(c) and A3: dom g = dom f and A4: for c being set st c in dom g holds g.c = F(c); now let x be set; assume A5: x in dom h; hence h.x = F(x) by A2 .= g.x by A1,A3,A4,A5; end; hence thesis by A1,A3,FUNCT_1:2; end; end; notation let f be complex-valued Function, r be complex number; synonym f (#) r for r (#) f; end; theorem Th6: for f being complex-valued Function, r being complex number for c being set holds (r(#)f).c = r * f.c proof let f be complex-valued Function, r be complex number; let c be set; A1: dom f = dom (r(#)f) by Def5; per cases; suppose c in dom f; hence thesis by A1,Def5; end; suppose A2: not c in dom f; hence (r(#)f).c = r*0 by A1,FUNCT_1:def 2 .= r * f.c by A2,FUNCT_1:def 2; end; end; registration let f be complex-valued Function, r be complex number; cluster r(#)f -> complex-valued; coherence proof let x be set; assume x in dom (r(#)f); then (r(#)f).x = r * f.x by Def5; hence thesis; end; end; registration let f be real-valued Function, r be real number; cluster r(#)f -> real-valued; coherence proof let x be set; assume x in dom (r(#)f); then (r(#)f).x = r * f.x by Def5; hence thesis; end; end; registration let f be RAT-valued Function, r be rational number; cluster r(#)f -> RAT-valued; coherence proof let y be set; assume y in rng (r(#)f); then consider x being set such that A1: x in dom (r(#)f) and A2: (r(#)f).x = y by FUNCT_1:def 3; (r(#)f).x = r * f.x by A1,Def5; hence thesis by A2,RAT_1:def 2; end; end; registration let f be INT-valued Function, r be integer number; cluster r(#)f -> INT-valued; coherence proof let y be set; assume y in rng (r(#)f); then consider x being set such that A1: x in dom (r(#)f) and A2: (r(#)f).x = y by FUNCT_1:def 3; (r(#)f).x = r * f.x by A1,Def5; hence thesis by A2,INT_1:def 2; end; end; registration let f be natural-valued Function, r be Nat; cluster r(#)f -> natural-valued; coherence proof let x be set; assume x in dom (r(#)f); then (r(#)f).x = r * f.x by Def5; hence thesis; end; end; definition let C be set; let D be complex-membered set; let f be PartFunc of C,D; let r be complex number; redefine func r(#)f -> PartFunc of C,COMPLEX; coherence proof dom (r(#)f) = dom f & rng (r(#)f) c= COMPLEX by Def5,VALUED_0:def 1; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be real-membered set; let f be PartFunc of C,D; let r be real number; redefine func r(#)f -> PartFunc of C,REAL; coherence proof dom (r(#)f) = dom f & rng (r(#)f) c= REAL by Def5,VALUED_0:def 3; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be rational-membered set; let f be PartFunc of C,D; let r be rational number; redefine func r(#)f -> PartFunc of C,RAT; coherence proof dom (r(#)f) = dom f & rng (r(#)f) c= RAT by Def5,RELAT_1:def 19; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be integer-membered set; let f be PartFunc of C,D; let r be integer number; redefine func r(#)f -> PartFunc of C,INT; coherence proof dom (r(#)f) = dom f & rng (r(#)f) c= INT by Def5,RELAT_1:def 19; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be natural-membered set; let f be PartFunc of C,D; let r be Nat; redefine func r(#)f -> PartFunc of C,NAT; coherence proof dom (r(#)f) = dom f & rng (r(#)f) c= NAT by Def5,VALUED_0:def 6; hence thesis by RELSET_1:4; end; end; registration let C be set; let D be complex-membered non empty set; let f be Function of C,D; let r be complex number; cluster r(#)f -> total for PartFunc of C,COMPLEX; coherence proof dom(r(#)f) = dom f by Def5 .= C by FUNCT_2:def 1; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D be real-membered non empty set; let f be Function of C,D; let r be real number; cluster r(#)f -> total for PartFunc of C,REAL; coherence proof dom(r(#)f) = dom f by Def5 .= C by FUNCT_2:def 1; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D be rational-membered non empty set; let f be Function of C,D; let r be rational number; cluster r(#)f -> total for PartFunc of C,RAT; coherence proof dom(r(#)f) = dom f by Def5 .= C by FUNCT_2:def 1; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D be integer-membered non empty set; let f be Function of C,D; let r be integer number; cluster r(#)f -> total for PartFunc of C,INT; coherence proof dom(r(#)f) = dom f by Def5 .= C by FUNCT_2:def 1; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D be natural-membered non empty set; let f be Function of C,D; let r be Nat; cluster r(#)f -> total for PartFunc of C,NAT; coherence proof dom(r(#)f) = dom f by Def5 .= C by FUNCT_2:def 1; hence thesis by PARTFUN1:def 2; end; end; theorem for C being non empty set, D being complex-membered non empty set for f being Function of C,D, r being complex number for g being Function of C, COMPLEX st for c being Element of C holds g.c = r * f.c holds g = r(#)f proof let C be non empty set, D be complex-membered non empty set; let f be Function of C,D, r be complex number; let g be Function of C,COMPLEX such that A1: for c being Element of C holds g.c = r * f.c; let x be Element of C; thus g.x = r*f.x by A1 .= (r(#)f).x by Th6; end; registration let f be complex-valued FinSequence, r be complex number; cluster r(#)f -> FinSequence-like; coherence proof dom (r(#)f) = dom f by Def5; hence thesis by Lm1; end; end; begin definition let f be complex-valued Function; func -f -> complex-valued Function equals (-1) (#) f; coherence; involutiveness proof let r, h be complex-valued Function; assume A1: r = (-1)(#)h; thus dom ((-1)(#)r) = dom r by Def5 .= dom h by A1,Def5; let c be set; assume c in dom h; reconsider a = (-1)*(h.c) as complex number; thus h.c = (-1) * a .= (-1)*r.c by A1,Th6 .= ((-1)(#)r).c by Th6; end; end; theorem Th8: for f being complex-valued Function holds dom -f = dom f & for c being set holds (-f).c = -(f.c) proof let f be complex-valued Function; thus A1: dom -f = dom f by Def5; let c be set; per cases; suppose c in dom f; hence (-f).c = (-1)*f.c by A1,Def5 .= -(f.c); end; suppose A2: not c in dom f; hence (-f).c = -(0 qua complex number) by A1,FUNCT_1:def 2 .= -(f.c) by A2,FUNCT_1:def 2; end; end; theorem for f being complex-valued Function, g being Function st dom f = dom g & for c being set st c in dom f holds g.c = -(f.c) holds g = -f proof let f be complex-valued Function, g be Function; assume that A1: dom f = dom g and A2: for c being set st c in dom f holds g.c = -(f.c); thus dom -f = dom g by A1,Def5; let c be set; assume A3: c in dom g; thus (-f).c = -f.c by Th8 .= g.c by A1,A2,A3; end; registration let f be complex-valued Function; cluster -f -> complex-valued; coherence; end; registration let f be real-valued Function; cluster -f -> real-valued; coherence; end; registration let f be RAT-valued Function; cluster -f -> RAT-valued; coherence; end; registration let f be INT-valued Function; cluster -f -> INT-valued; coherence; end; definition let C be set; let D be complex-membered set; let f be PartFunc of C,D; redefine func -f -> PartFunc of C,COMPLEX; coherence proof dom -f = dom f & rng -f c= COMPLEX by Def5,VALUED_0:def 1; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be real-membered set; let f be PartFunc of C,D; redefine func -f -> PartFunc of C,REAL; coherence proof dom -f = dom f & rng -f c= REAL by Def5,VALUED_0:def 3; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be rational-membered set; let f be PartFunc of C,D; redefine func -f -> PartFunc of C,RAT; coherence proof dom -f = dom f & rng -f c= RAT by Def5,RELAT_1:def 19; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be integer-membered set; let f be PartFunc of C,D; redefine func -f -> PartFunc of C,INT; coherence proof dom -f = dom f & rng -f c= INT by Def5,RELAT_1:def 19; hence thesis by RELSET_1:4; end; end; registration let C be set; let D be complex-membered non empty set; let f be Function of C,D; cluster -f -> total for PartFunc of C,COMPLEX; coherence; end; registration let C be set; let D be real-membered non empty set; let f be Function of C,D; cluster -f -> total for PartFunc of C,REAL; coherence; end; registration let C be set; let D be rational-membered non empty set; let f be Function of C,D; cluster -f -> total for PartFunc of C,RAT; coherence; end; registration let C be set; let D be integer-membered non empty set; let f be Function of C,D; cluster -f -> total for PartFunc of C,INT; coherence; end; registration let f be complex-valued FinSequence; cluster -f -> FinSequence-like; coherence; end; begin definition let f be complex-valued Function; deffunc F(set) = (f.$1)"; func f" -> complex-valued Function means :Def7: dom it = dom f & for c being set st c in dom it holds it.c = (f.c)"; existence proof consider g being Function such that A1: dom g = dom f & for x being set st x in dom f holds g.x = F(x) from FUNCT_1:sch 3; g is complex-valued proof let x be set; assume x in dom g; then g.x = (f.x)" by A1; hence thesis; end; hence thesis by A1; end; uniqueness proof let h, g be complex-valued Function such that A2: dom h = dom f and A3: for c being set st c in dom h holds h.c = F(c) and A4: dom g = dom f and A5: for c being set st c in dom g holds g.c = F(c); now let x be set; assume A6: x in dom h; hence h.x = F(x) by A3 .= g.x by A2,A4,A5,A6; end; hence thesis by A2,A4,FUNCT_1:2; end; involutiveness proof let r, h be complex-valued Function; assume that A7: dom r = dom h and A8: for c being set st c in dom r holds r.c = (h.c)"; thus dom r = dom h by A7; let c be set; assume A9: c in dom h; thus h.c = (h.c)"" .= (r.c)" by A7,A8,A9; end; end; theorem Th10: for f being complex-valued Function holds for c being set holds f".c = (f.c)" proof let f be complex-valued Function; let c be set; A1: dom (f") = dom f by Def7; per cases; suppose c in dom f; hence thesis by A1,Def7; end; suppose A2: not c in dom f; hence f".c = 0 qua complex number" by A1,FUNCT_1:def 2 .= (f.c)" by A2,FUNCT_1:def 2; end; end; registration let f be real-valued Function; cluster f" -> real-valued; coherence proof let x be set; assume x in dom (f"); then f".x = (f.x)" by Def7; hence thesis; end; end; registration let f be RAT-valued Function; cluster f" -> RAT-valued; coherence proof let y be set; assume y in rng (f"); then consider x being set such that A1: x in dom (f") and A2: (f").x = y by FUNCT_1:def 3; f".x = (f.x)" by A1,Def7; hence thesis by A2,RAT_1:def 2; end; end; definition let C be set; let D be complex-membered set; let f be PartFunc of C,D; redefine func f" -> PartFunc of C,COMPLEX; coherence proof dom (f") = dom f & rng (f") c= COMPLEX by Def7,VALUED_0:def 1; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be real-membered set; let f be PartFunc of C,D; redefine func f" -> PartFunc of C,REAL; coherence proof dom (f") = dom f & rng (f") c= REAL by Def7,VALUED_0:def 3; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be rational-membered set; let f be PartFunc of C,D; redefine func f" -> PartFunc of C,RAT; coherence proof dom (f") = dom f & rng (f") c= RAT by Def7,RELAT_1:def 19; hence thesis by RELSET_1:4; end; end; registration let C be set; let D be complex-membered non empty set; let f be Function of C,D; cluster f" -> total for PartFunc of C,COMPLEX; coherence proof dom (f") = dom f by Def7 .= C by FUNCT_2:def 1; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D be real-membered non empty set; let f be Function of C,D; cluster f" -> total for PartFunc of C,REAL; coherence proof dom (f") = dom f by Def7 .= C by FUNCT_2:def 1; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D be rational-membered non empty set; let f be Function of C,D; cluster f" -> total for PartFunc of C,RAT; coherence proof dom (f") = dom f by Def7 .= C by FUNCT_2:def 1; hence thesis by PARTFUN1:def 2; end; end; registration let f be complex-valued FinSequence; cluster f" -> FinSequence-like; coherence proof dom (f") = dom f by Def7; hence thesis by Lm1; end; end; begin definition let f be complex-valued Function; func f^2 -> Function equals f (#) f; coherence; end; theorem Th11: for f being complex-valued Function holds dom (f^2) = dom f & for c being set holds f^2.c = (f.c)^2 proof let f be complex-valued Function; thus A1: dom (f^2) = dom f /\ dom f by Def4 .= dom f; let c be set; per cases; suppose c in dom f; hence thesis by A1,Def4; end; suppose A2: not c in dom f; hence f^2.c = 0 qua complex number^2 by A1,FUNCT_1:def 2 .= (f.c)^2 by A2,FUNCT_1:def 2; end; end; registration let f be complex-valued Function; cluster f^2 -> complex-valued; coherence; end; registration let f be real-valued Function; cluster f^2 -> real-valued; coherence; end; registration let f be RAT-valued Function; cluster f^2 -> RAT-valued; coherence; end; registration let f be INT-valued Function; cluster f^2 -> INT-valued; coherence; end; registration let f be natural-valued Function; cluster f^2 -> natural-valued; coherence; end; definition let C be set; let D be complex-membered set; let f be PartFunc of C,D; redefine func f^2 -> PartFunc of C,COMPLEX; coherence proof dom (f^2) = dom f & rng (f^2) c= COMPLEX by Th11,VALUED_0:def 1; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be real-membered set; let f be PartFunc of C,D; redefine func f^2 -> PartFunc of C,REAL; coherence proof dom (f^2) = dom f & rng (f^2) c= REAL by Th11,VALUED_0:def 3; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be rational-membered set; let f be PartFunc of C,D; redefine func f^2 -> PartFunc of C,RAT; coherence proof dom (f^2) = dom f & rng (f^2) c= RAT by Th11,RELAT_1:def 19; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be integer-membered set; let f be PartFunc of C,D; redefine func f^2 -> PartFunc of C,INT; coherence proof dom (f^2) = dom f & rng (f^2) c= INT by Th11,RELAT_1:def 19; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be natural-membered set; let f be PartFunc of C,D; redefine func f^2 -> PartFunc of C,NAT; coherence proof dom (f^2) = dom f & rng (f^2) c= NAT by Th11,VALUED_0:def 6; hence thesis by RELSET_1:4; end; end; registration let C be set; let D be complex-membered non empty set; let f be Function of C,D; cluster f^2 -> total for PartFunc of C,COMPLEX; coherence; end; registration let C be set; let D be real-membered non empty set; let f be Function of C,D; cluster f^2 -> total for PartFunc of C,REAL; coherence; end; registration let C be set; let D be rational-membered non empty set; let f be Function of C,D; cluster f^2 -> total for PartFunc of C,RAT; coherence; end; registration let C be set; let D be integer-membered non empty set; let f be Function of C,D; cluster f^2 -> total for PartFunc of C,INT; coherence; end; registration let C be set; let D be natural-membered non empty set; let f be Function of C,D; cluster f^2 -> total for PartFunc of C,NAT; coherence; end; registration let f be complex-valued FinSequence; cluster f^2 -> FinSequence-like; coherence; end; begin definition let f1,f2 be complex-valued Function; func f1 - f2 -> Function equals f1 + - f2; coherence; end; registration let f1,f2 be complex-valued Function; cluster f1-f2 -> complex-valued; coherence; end; registration let f1,f2 be real-valued Function; cluster f1-f2 -> real-valued; coherence; end; registration let f1,f2 be RAT-valued Function; cluster f1-f2 -> RAT-valued; coherence; end; registration let f1,f2 be INT-valued Function; cluster f1-f2 -> INT-valued; coherence; end; theorem Th12: for f1,f2 being complex-valued Function holds dom (f1-f2) = dom f1 /\ dom f2 proof let f1,f2 be complex-valued Function; thus dom (f1-f2) = dom f1 /\ dom -f2 by Def1 .= dom f1 /\ dom f2 by Def5; end; theorem for f1,f2 being complex-valued Function for c being set st c in dom ( f1-f2) holds (f1-f2).c = f1.c - f2.c proof let f1,f2 be complex-valued Function; let c be set; assume c in dom (f1-f2); hence (f1-f2).c = f1.c+(-f2).c by Def1 .= f1.c-f2.c by Th8; end; theorem for f1,f2 being complex-valued Function, f being Function st dom f = dom (f1-f2) & for c being set st c in dom f holds f.c = f1.c - f2.c holds f = f1-f2 proof let f1,f2 be complex-valued Function, f be Function such that A1: dom f = dom (f1-f2) and A2: for c being set st c in dom f holds f.c = f1.c - f2.c; thus dom f = dom (f1-f2) by A1; let c be set; assume A3: c in dom f; hence f.c = f1.c - f2.c by A2 .= f1.c+(-f2).c by Th8 .= (f1-f2).c by A1,A3,Def1; end; definition let C be set; let D1,D2 be complex-membered set; let f1 be PartFunc of C,D1; let f2 be PartFunc of C,D2; redefine func f1-f2 -> PartFunc of C,COMPLEX; coherence proof dom (f1-f2) = dom f1 /\ dom f2 & rng (f1-f2) c= COMPLEX by Th12, VALUED_0:def 1; hence thesis by RELSET_1:4; end; end; definition let C be set; let D1,D2 be real-membered set; let f1 be PartFunc of C,D1; let f2 be PartFunc of C,D2; redefine func f1-f2 -> PartFunc of C,REAL; coherence proof dom (f1-f2) = dom f1 /\ dom f2 & rng (f1-f2) c= REAL by Th12,VALUED_0:def 3 ; hence thesis by RELSET_1:4; end; end; definition let C be set; let D1,D2 be rational-membered set; let f1 be PartFunc of C,D1; let f2 be PartFunc of C,D2; redefine func f1-f2 -> PartFunc of C,RAT; coherence proof dom (f1-f2) = dom f1 /\ dom f2 & rng (f1-f2) c= RAT by Th12,RELAT_1:def 19; hence thesis by RELSET_1:4; end; end; definition let C be set; let D1,D2 be integer-membered set; let f1 be PartFunc of C,D1; let f2 be PartFunc of C,D2; redefine func f1-f2 -> PartFunc of C,INT; coherence proof dom (f1-f2) = dom f1 /\ dom f2 & rng (f1-f2) c= INT by Th12,RELAT_1:def 19; hence thesis by RELSET_1:4; end; end; Lm3: for C being set, D1,D2 being complex-membered non empty set, f1 being Function of C,D1, f2 being Function of C,D2 holds dom(f1-f2) = C proof let C be set; let D1,D2 be complex-membered non empty set; let f1 be Function of C,D1; let f2 be Function of C,D2; thus dom(f1-f2) = dom f1 /\ dom -f2 by Def1 .= C /\ dom -f2 by FUNCT_2:def 1 .= C /\ C by FUNCT_2:def 1 .= C; end; registration let C be set; let D1,D2 be complex-membered non empty set; let f1 be Function of C,D1; let f2 be Function of C,D2; cluster f1-f2 -> total for PartFunc of C,COMPLEX; coherence proof dom(f1-f2) = C by Lm3; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D1,D2 be real-membered non empty set; let f1 be Function of C,D1; let f2 be Function of C,D2; cluster f1-f2 -> total for PartFunc of C,REAL; coherence proof dom(f1-f2) = C by Lm3; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D1,D2 be rational-membered non empty set; let f1 be Function of C,D1; let f2 be Function of C,D2; cluster f1-f2 -> total for PartFunc of C,RAT; coherence proof dom(f1-f2) = C by Lm3; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D1,D2 be integer-membered non empty set; let f1 be Function of C,D1; let f2 be Function of C,D2; cluster f1-f2 -> total for PartFunc of C,INT; coherence proof dom(f1-f2) = C by Lm3; hence thesis by PARTFUN1:def 2; end; end; theorem for C being set, D1,D2 being complex-membered non empty set for f1 being Function of C,D1, f2 being Function of C,D2 for c being Element of C holds (f1-f2).c = f1.c - f2.c proof let C be set; let D1,D2 be complex-membered non empty set; let f1 be Function of C,D1, f2 be Function of C,D2; let c be Element of C; A1: dom(f1-f2) = C by FUNCT_2:def 1; per cases; suppose C is non empty; hence (f1-f2).c = f1.c + (-f2).c by A1,Def1 .= f1.c - f2.c by Th8; end; suppose A2: C is empty; then dom f2 = {}; then f2.c = 0 by FUNCT_1:def 2; hence thesis by A2; end; end; registration let f1, f2 be complex-valued FinSequence; cluster f1-f2 -> FinSequence-like; coherence; end; begin definition let f1,f2 be complex-valued Function; func f1 /" f2 -> Function equals f1 (#) (f2"); coherence; end; theorem Th16: for f1,f2 being complex-valued Function holds dom (f1/"f2) = dom f1 /\ dom f2 proof let f1,f2 be complex-valued Function; thus dom (f1/"f2) = dom f1 /\ dom (f2") by Def4 .= dom f1 /\ dom f2 by Def7; end; theorem for f1,f2 being complex-valued Function for c being set holds (f1/"f2) .c = f1.c / f2.c proof let f1,f2 be complex-valued Function; let c be set; A1: dom (f1/"f2) = dom f1 /\ dom f2 by Th16; per cases; suppose c in dom (f1/"f2); hence (f1/"f2).c = f1.c * (f2").c by Def4 .= f1.c / f2.c by Th10; end; suppose A2: not c in dom (f1/"f2); then not c in dom f1 or not c in dom f2 by A1,XBOOLE_0:def 4; then A3: f1.c = 0 or f2.c = 0 by FUNCT_1:def 2; thus (f1/"f2).c = 0 / 0 by A2,FUNCT_1:def 2 .= f1.c / f2.c by A3; end; end; registration let f1,f2 be complex-valued Function; cluster f1/"f2 -> complex-valued; coherence; end; registration let f1,f2 be real-valued Function; cluster f1/"f2 -> real-valued; coherence; end; registration let f1,f2 be RAT-valued Function; cluster f1/"f2 -> RAT-valued; coherence; end; definition let C be set; let D1,D2 be complex-membered set; let f1 be PartFunc of C,D1; let f2 be PartFunc of C,D2; redefine func f1/"f2 -> PartFunc of C,COMPLEX; coherence proof dom (f1/"f2) = dom f1 /\ dom f2 & rng (f1/"f2) c= COMPLEX by Th16, VALUED_0:def 1; hence thesis by RELSET_1:4; end; end; definition let C be set; let D1,D2 be real-membered set; let f1 be PartFunc of C,D1; let f2 be PartFunc of C,D2; redefine func f1/"f2 -> PartFunc of C,REAL; coherence proof dom (f1/"f2) = dom f1 /\ dom f2 & rng (f1/"f2) c= REAL by Th16, VALUED_0:def 3; hence thesis by RELSET_1:4; end; end; definition let C be set; let D1,D2 be rational-membered set; let f1 be PartFunc of C,D1; let f2 be PartFunc of C,D2; redefine func f1/"f2 -> PartFunc of C,RAT; coherence proof dom (f1/"f2) = dom f1 /\ dom f2 & rng (f1/"f2) c= RAT by Th16, RELAT_1:def 19; hence thesis by RELSET_1:4; end; end; Lm4: for C being set, D1,D2 being complex-membered non empty set for f1 being Function of C,D1, f2 being Function of C,D2 holds dom(f1/"f2) = C proof let C be set; let D1,D2 be complex-membered non empty set; let f1 be Function of C,D1, f2 be Function of C,D2; thus dom(f1/"f2) = dom f1 /\ dom f2 by Th16 .= C /\ dom f2 by FUNCT_2:def 1 .= C /\ C by FUNCT_2:def 1 .= C; end; registration let C be set; let D1,D2 be complex-membered non empty set; let f1 be Function of C,D1; let f2 be Function of C,D2; cluster f1/"f2 -> total for PartFunc of C,COMPLEX; coherence proof dom(f1/"f2) = C by Lm4; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D1,D2 be real-membered non empty set; let f1 be Function of C,D1; let f2 be Function of C,D2; cluster f1/"f2 -> total for PartFunc of C,REAL; coherence proof dom(f1/"f2) = C by Lm4; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D1,D2 be rational-membered non empty set; let f1 be Function of C,D1; let f2 be Function of C,D2; cluster f1/"f2 -> total for PartFunc of C,RAT; coherence proof dom(f1/"f2) = C by Lm4; hence thesis by PARTFUN1:def 2; end; end; registration let f1, f2 be complex-valued FinSequence; cluster f1/"f2 -> FinSequence-like; coherence; end; begin definition let f be complex-valued Function; deffunc F(set) = |.f.$1.|; func |. f .| -> real-valued Function means :Def11: dom it = dom f & for c being set st c in dom it holds it.c = |. f.c .|; existence proof consider g being Function such that A1: dom g = dom f & for x being set st x in dom f holds g.x = F(x) from FUNCT_1:sch 3; g is real-valued proof let x be set; assume x in dom g; then g.x = |. f.x .| by A1; hence thesis; end; hence thesis by A1; end; uniqueness proof let h, g be real-valued Function such that A2: dom h = dom f and A3: for c being set st c in dom h holds h.c = F(c) and A4: dom g = dom f and A5: for c being set st c in dom g holds g.c = F(c); now let x be set; assume A6: x in dom h; hence h.x = F(x) by A3 .= g.x by A2,A4,A5,A6; end; hence thesis by A2,A4,FUNCT_1:2; end; projectivity proof let r be real-valued Function; let h be complex-valued Function; assume that dom r = dom h and A7: for c being set st c in dom r holds r.c = |.h.c.|; thus dom r = dom r; let c be set; assume A8: c in dom r; hence r.c = |.|.h.c.|.| by A7 .= |.r.c.| by A7,A8; end; end; notation let f be complex-valued Function; synonym abs f for |. f .|; end; theorem for f being complex-valued Function holds for c being set holds |.f.|. c = |.f.c.| proof let f be complex-valued Function; let c be set; A1: dom |.f.| = dom f by Def11; per cases; suppose c in dom f; hence thesis by A1,Def11; end; suppose A2: not c in dom f; hence |.f.|.c = |.0 qua complex number.| by A1,COMPLEX1:44,FUNCT_1:def 2 .= |.f.c.| by A2,FUNCT_1:def 2; end; end; registration let f be RAT-valued Function; cluster |.f.| -> RAT-valued; coherence proof let y be set; assume y in rng |.f.|; then consider x being set such that A1: x in dom |.f.| and A2: (|.f.|).x = y by FUNCT_1:def 3; |.f.|.x = |.f.x.| by A1,Def11; hence thesis by A2,RAT_1:def 2; end; end; registration let f be INT-valued Function; cluster |.f.| -> natural-valued; coherence proof let x be set; abs(f.x) is natural; hence thesis by Def11; end; end; definition let C be set; let D be complex-membered set; let f be PartFunc of C,D; redefine func |.f.| -> PartFunc of C,REAL; coherence proof dom |.f.| = dom f & rng |.f.| c= REAL by Def11,VALUED_0:def 3; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be complex-membered set; let f be PartFunc of C,D; redefine func abs(f) -> PartFunc of C,REAL; coherence proof abs(f) = |.f.|; hence thesis; end; end; definition let C be set; let D be rational-membered set; let f be PartFunc of C,D; redefine func |.f.| -> PartFunc of C,RAT; coherence proof dom |.f.| = dom f & rng |.f.| c= RAT by Def11,RELAT_1:def 19; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be rational-membered set; let f be PartFunc of C,D; redefine func abs(f) -> PartFunc of C,RAT; coherence proof abs(f) = |.f.|; hence thesis; end; end; definition let C be set; let D be integer-membered set; let f be PartFunc of C,D; redefine func |.f.| -> PartFunc of C,NAT; coherence proof dom |.f.| = dom f & rng |.f.| c= NAT by Def11,VALUED_0:def 6; hence thesis by RELSET_1:4; end; end; definition let C be set; let D be integer-membered set; let f be PartFunc of C,D; redefine func abs(f) -> PartFunc of C,NAT; coherence proof abs(f) = |.f.|; hence thesis; end; end; registration let C be set; let D be complex-membered non empty set; let f be Function of C,D; cluster |.f.| -> total for PartFunc of C,REAL; coherence proof dom |.f.| = dom f by Def11 .= C by FUNCT_2:def 1; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D be rational-membered non empty set; let f be Function of C,D; cluster |.f.| -> total for PartFunc of C,RAT; coherence proof dom |.f.| = dom f by Def11 .= C by FUNCT_2:def 1; hence thesis by PARTFUN1:def 2; end; end; registration let C be set; let D be integer-membered non empty set; let f be Function of C,D; cluster |.f.| -> total for PartFunc of C,NAT; coherence proof dom |.f.| = dom f by Def11 .= C by FUNCT_2:def 1; hence thesis by PARTFUN1:def 2; end; end; registration let f be complex-valued FinSequence; cluster |.f.| -> FinSequence-like; coherence proof dom abs f = dom f by Def11; hence thesis by Lm1; end; end; theorem for f, g being FinSequence, h being Function st dom h = dom f /\ dom g holds h is FinSequence by Lm2; begin reserve m,j,p,q,n,l for Element of NAT; definition let p be Function, k be Nat; func Shift(p,k) -> Function means :Def12: dom it = { m+k:m in dom p } & for m st m in dom p holds it.(m+k) = p.m; existence proof defpred P [set,set] means ex m st $1 = m+k & $2 = p.m; set A = { m+k:m in dom p }; A1: for e being set st e in A ex u being set st P[e,u] proof let e be set; assume e in A; then consider m such that A2: e = m+k and m in dom p; take p.m; thus thesis by A2; end; consider f being Function such that A3: dom f = A and A4: for e being set st e in A holds P[e,f.e] from CLASSES1:sch 1(A1); take f; thus dom f = { m+k:m in dom p } by A3; let m; assume m in dom p; then m+k in A; then ex j st m+k = j+k & f.(m+k) = p.j by A4; hence thesis; end; uniqueness proof let IT1,IT2 be Function such that A5: dom IT1 = { m+k:m in dom p } and A6: for m st m in dom p holds IT1.(m+k) = p.m and A7: dom IT2 = { m+k:m in dom p } and A8: for m st m in dom p holds IT2.(m+k) = p.m; for x being set st x in dom IT1 holds IT1.x = IT2.x proof let x be set; assume x in dom IT1; then consider m such that A9: x = m+k & m in dom p by A5; thus IT1.x = p.m by A6,A9 .= IT2.x by A8,A9; end; hence thesis by A5,A7,FUNCT_1:2; end; end; registration let p be Function, k be Nat; cluster Shift(p,k) -> NAT-defined; coherence proof A1: dom Shift(p,k) = { m+k:m in dom p } by Def12; Shift(p,k) is NAT-defined proof let x be set; assume x in dom Shift(p,k); then ex m st x = m+k & m in dom p by A1; hence thesis; end; hence thesis; end; end; theorem for P,Q being Function, k being Nat st P c= Q holds Shift(P ,k) c= Shift(Q,k) proof let P,Q be Function; let k be Nat; assume A1: P c= Q; then A2: dom P c= dom Q by GRFUNC_1:2; A3: dom Shift(P,k) = {m + k: m in dom P} by Def12; A4: dom Shift(Q,k) = {m + k: m in dom Q} by Def12; now let x be set; assume x in dom Shift(P,k); then ex m1 being Element of NAT st x = m1 + k & m1 in dom P by A3; hence x in dom Shift(Q,k) by A2,A4; end; then A5: dom Shift(P,k) c= dom Shift(Q,k) by TARSKI:def 3; now let x be set; assume x in dom Shift(P,k); then consider m1 being Element of NAT such that A6: x = m1 + k and A7: m1 in dom P by A3; thus Shift(P,k).x = Shift(P,k).(m1 + k) by A6 .= P.m1 by A7,Def12 .= Q.m1 by A1,A7,GRFUNC_1:2 .= Shift(Q,k).(m1 + k) by A2,A7,Def12 .= Shift(Q,k).x by A6; end; hence thesis by A5,GRFUNC_1:2; end; theorem for n,m being Nat for I being Function holds Shift(Shift(I,m),n) = Shift(I,m+n) proof let n,m be Nat; let I be Function; set A = {l+m:l in dom I }; A1: dom Shift(I,m) = A by Def12; A2: now let l; assume A3: l in dom I; then A4: l+m in dom Shift(I,m) by A1; thus Shift(Shift(I,m),n).(l+(m+n)) = Shift(Shift(I,m),n).(l+m+n) .= Shift(I,m).(l+m) by A4,Def12 .= I.l by A3,Def12; end; {p+n: p in A } = { q+(m+n): q in dom I} proof thus {p+n: p in A } c= { q+(m+n): q in dom I} proof let x be set; assume x in {p+n: p in A }; then consider p such that A5: x = p+n and A6: p in A; consider l such that A7: p = l+m and A8: l in dom I by A6; x = l+(m+n) by A5,A7; hence thesis by A8; end; let x be set; assume x in { q+(m+n): q in dom I}; then consider q such that A9: x = q+(m+n) & q in dom I; x = (q+m)+n & q+m in A by A9; hence thesis; end; then dom Shift(Shift(I,m),n) = { l+(m+n): l in dom I} by A1,Def12; hence thesis by A2,Def12; end; theorem for s,f be Function for n being Nat holds Shift(f*s,n) = f*Shift(s,n) proof let s,f be Function; let n be Nat; A1: dom(f*s) c= dom s by RELAT_1:25; A2: dom Shift(s,n)= { m+n: m in dom s } by Def12; now let e be set; thus e in { m+n: m in dom(f*s) } implies e in dom Shift(s,n) & Shift(s,n). e in dom f proof assume e in { m+n: m in dom(f*s) }; then consider m such that A3: e = m+n and A4: m in dom(f*s); thus e in dom Shift(s,n) by A2,A1,A3,A4; Shift(s,n).e = s.m by A1,A3,A4,Def12; hence thesis by A4,FUNCT_1:11; end; assume e in dom Shift(s,n); then consider m0 being Element of NAT such that A5: e = m0+n and A6: m0 in dom s by A2; assume Shift(s,n).e in dom f; then s.m0 in dom f by A5,A6,Def12; then m0 in dom(f*s) by A6,FUNCT_1:11; hence e in { m+n: m in dom(f*s) } by A5; end; then Shift(s,n)"dom f = { m+n: m in dom(f*s) } by FUNCT_1:def 7; then A7: dom(f*Shift(s,n)) = { m+n: m in dom(f*s) } by RELAT_1:147; now let m; assume A8: m in dom(f*s); then m+n in dom Shift(s,n) by A2,A1; hence (f*Shift(s,n)).(m+n) = f.(Shift(s,n).(m+n)) by FUNCT_1:13 .= f.(s.m) by A1,A8,Def12 .= (f*s).m by A8,FUNCT_1:12; end; hence thesis by A7,Def12; end; theorem for I,J being Function, n being Nat holds Shift(I +* J, n) = Shift(I,n) +* Shift(J,n) proof let I,J be Function, n be Nat; A1: dom Shift(J,n) = { m+n: m in dom J } by Def12; A2: now let m such that A3: m in dom(I +* J); per cases; suppose A4: m in dom J; then m+n in dom Shift(J,n) by A1; hence (Shift(I,n) +* Shift(J,n)).(m+n) = Shift(J,n).(m+n) by FUNCT_4:13 .= J.m by A4,Def12 .= (I +* J).m by A4,FUNCT_4:13; end; suppose A5: not m in dom J; m in dom I \/ dom J by A3,FUNCT_4:def 1; then A6: m in dom I by A5,XBOOLE_0:def 3; not ex l st m+n = l+n & l in dom J by A5; then not m+n in dom Shift(J,n) by A1; hence (Shift(I,n) +* Shift(J,n)).(m+n) = Shift(I,n).(m+n) by FUNCT_4:11 .= I.m by A6,Def12 .= (I +* J).m by A5,FUNCT_4:11; end; end; A7: dom Shift(I,n) = { m+n: m in dom I } by Def12; A8: dom Shift(I,n) \/ dom Shift(J,n) = { m+n: m in dom I \/ dom J } proof hereby let x be set; assume x in dom Shift(I,n) \/ dom Shift(J,n); then x in dom Shift(I,n) or x in dom Shift(J,n) by XBOOLE_0:def 3; then consider m such that A9: x = m+n & m in dom J or x = m+n & m in dom I by A1,A7; m in dom I \/ dom J by A9,XBOOLE_0:def 3; hence x in { l+n: l in dom I \/ dom J } by A9; end; let x be set; assume x in { m+n: m in dom I \/ dom J }; then consider m such that A10: x = m+n and A11: m in dom I \/ dom J; m in dom I or m in dom J by A11,XBOOLE_0:def 3; then x in dom Shift(I,n) or x in dom Shift(J,n) by A1,A7,A10; hence thesis by XBOOLE_0:def 3; end; dom(I +* J) = dom I \/ dom J by FUNCT_4:def 1; then dom(Shift(I,n) +* Shift(J,n)) = { m+n: m in dom(I +* J ) } by A8, FUNCT_4:def 1; hence thesis by A2,Def12; end; theorem Th24: for p being Function,k,il being Nat st il in dom p holds il+k in dom Shift(p,k) proof let p be Function, k,il be Nat such that A1: il in dom p; A2: dom Shift(p,k) = { loc+k where loc is Element of NAT : loc in dom p} by Def12; reconsider loc = il as Element of NAT by ORDINAL1:def 12; loc+k in dom Shift(p,k) by A2,A1; hence thesis; end; theorem Th25: for p being Function, k being Nat holds rng Shift(p,k) c= rng p proof let p be Function, k being Nat; let y be set; assume y in rng Shift(p,k); then consider x being set such that A1: x in dom Shift(p,k) and A2: y = Shift(p,k).x by FUNCT_1:def 3; x in { m+k:m in dom p } by A1,Def12; then consider m such that A3: x = m+k and A4: m in dom p; p.m = Shift(p,k).x by A3,A4,Def12; hence thesis by A2,A4,FUNCT_1:def 3; end; theorem for p being Function st dom p c= NAT for k being Nat holds rng Shift(p,k) = rng p proof let p be Function such that A1: dom p c= NAT; let k be Nat; thus rng Shift(p,k) c= rng p by Th25; let y be set; assume y in rng p; then consider x being set such that A2: x in dom p and A3: y = p.x by FUNCT_1:def 3; reconsider x as Element of NAT by A1,A2; x+k in dom Shift(p,k) & Shift(p,k).(x+k) = y by A2,A3,Def12,Th24; hence thesis by FUNCT_1:def 3; end; registration let p be finite Function, k be Nat; cluster Shift(p,k) -> finite; coherence proof deffunc F(Element of NAT) = $1+k; A1: dom p is finite; { F(w) where w is Element of NAT: w in dom p } is finite from FRAENKEL :sch 21(A1); then dom Shift(p,k) is finite by Def12; hence thesis by FINSET_1:10; end; end; reserve e1,e2 for ext-real number; definition let X be non empty ext-real-membered set, s be sequence of X; redefine attr s is increasing means for n being Nat holds s.n < s.(n+1); compatibility proof thus s is increasing implies for n being Nat holds s.n < s.(n+1 ) proof assume A1: s is increasing; let n be Nat; A2: n < n+1 by NAT_1:13; dom s = NAT & n in NAT by FUNCT_2:def 1,ORDINAL1:def 12; hence thesis by A1,A2,VALUED_0:def 13; end; assume A3: for n being Nat holds s.n < s.(n+1); let e1,e2; assume e1 in dom s & e2 in dom s; then reconsider m=e1, n=e2 as Nat; defpred P[Nat] means m < $1 implies s.m < s.$1; A4: for j being Nat st P[j] holds P[j+1] proof let j being Nat such that A5: P[j]; assume m < j+1; then m <= j by NAT_1:13; then s.m < s.j or m = j by A5,XXREAL_0:1; hence thesis by A3,XXREAL_0:2; end; assume A6: e1 < e2; A7: P[0]; for j being Nat holds P[j] from NAT_1:sch 2(A7,A4); then s.m < s.n by A6; hence thesis; end; redefine attr s is decreasing means for n being Nat holds s.n > s.(n+1); compatibility proof thus s is decreasing implies for n being Nat holds s.n > s.(n+1 ) proof assume A8: s is decreasing; let n be Nat; A9: n < n+1 by NAT_1:13; dom s = NAT & n in NAT by FUNCT_2:def 1,ORDINAL1:def 12; hence thesis by A8,A9,VALUED_0:def 14; end; assume A10: for n being Nat holds s.n > s.(n+1); let e1,e2; assume e1 in dom s & e2 in dom s; then reconsider m=e1, n=e2 as Nat; defpred P[Nat] means m < $1 implies s.m > s.$1; A11: for j being Nat st P[j] holds P[j+1] proof let j being Nat such that A12: P[j]; assume m < j+1; then m <= j by NAT_1:13; then s.m > s.j or m = j by A12,XXREAL_0:1; hence thesis by A10,XXREAL_0:2; end; assume A13: e1 < e2; A14: P[0]; for j being Nat holds P[j] from NAT_1:sch 2(A14,A11); then s.m > s.n by A13; hence thesis; end; redefine attr s is non-decreasing means for n being Nat holds s.n <= s.(n+1); compatibility proof thus s is non-decreasing implies for n being Nat holds s.n <= s.(n+1 ) proof assume A15: s is non-decreasing; let n be Nat; A16: n < n+1 by NAT_1:13; dom s = NAT & n in NAT by FUNCT_2:def 1,ORDINAL1:def 12; hence thesis by A15,A16,VALUED_0:def 15; end; assume A17: for n being Nat holds s.n <= s.(n+1); let e1,e2; assume e1 in dom s & e2 in dom s; then reconsider m=e1, n=e2 as Nat; defpred P[Nat] means m <= $1 implies s.m <= s.$1; A18: for j being Nat st P[j] holds P[j+1] proof let j being Nat such that A19: P[j]; assume m <= j+1; then A20: m < j+1 or m = j+1 by XXREAL_0:1; s.j <= s.(j+1) by A17; hence thesis by A19,A20,NAT_1:13,XXREAL_0:2; end; assume A21: e1 <= e2; A22: P[0]; for j being Nat holds P[j] from NAT_1:sch 2(A22,A18); then s.m <= s.n by A21; hence thesis; end; redefine attr s is non-increasing means for n being Nat holds s.n >= s.(n+1); compatibility proof thus s is non-increasing implies for n being Nat holds s.n >= s.(n+1 ) proof assume A23: s is non-increasing; let n be Nat; A24: n < n+1 by NAT_1:13; dom s = NAT & n in NAT by FUNCT_2:def 1,ORDINAL1:def 12; hence thesis by A23,A24,VALUED_0:def 16; end; assume A25: for n being Nat holds s.n >= s.(n+1); let e1,e2; assume e1 in dom s & e2 in dom s; then reconsider m=e1, n=e2 as Nat; defpred P[Nat] means m <= $1 implies s.m >= s.$1; A26: for j being Nat st P[j] holds P[j+1] proof let j being Nat such that A27: P[j]; assume m <= j+1; then A28: m < j+1 or m = j+1 by XXREAL_0:1; s.j >= s.(j+1) by A25; hence thesis by A27,A28,NAT_1:13,XXREAL_0:2; end; assume A29: e1 <= e2; A30: P[0]; for j being Nat holds P[j] from NAT_1:sch 2(A30,A26); then s.m >= s.n by A29; hence thesis; end; end; scheme SubSeqChoice { X() -> non empty set, S() -> sequence of X(), P[set]} : ex S1 being subsequence of S() st for n being Element of NAT holds P[S1.n] provided A1: for n being Element of NAT ex m being Element of NAT st n <= m & P[S ().m] proof defpred P1[set,set,set] means $3 in NAT & (for m,k being Element of NAT st m = $2 & k = $3 holds m < k & P[S().k]); consider n0 being Element of NAT such that 0 <= n0 and A2: P[S().n0] by A1; A3: for n being Element of NAT for x being set ex y being set st P1[n,x,y] proof let n be Element of NAT, x be set; per cases; suppose x in NAT; then reconsider mx = x as Element of NAT; consider my being Element of NAT such that A4: mx + 1 <= my & P[S().my] by A1; take my; thus my in NAT; thus thesis by A4,NAT_1:13; end; suppose A5: not x in NAT; take 0; set y = 0; thus y in NAT; let m, k be Element of NAT; assume that A6: m = x and k = y; thus thesis by A5,A6; end; end; consider g being Function such that A7: dom g = NAT and A8: g.0 = n0 and A9: for n being Element of NAT holds P1[n,g.n,g.(n+1)] from RECDEF_1: sch 1(A3); rng g c= NAT proof defpred P[Element of NAT] means g.$1 in NAT; let y be set; assume y in rng g; then consider x being set such that A10: x in dom g and A11: g.x = y by FUNCT_1:def 3; reconsider n = x as Element of NAT by A7,A10; A12: for k being Element of NAT holds P[k] implies P[k+1] by A9; A13: P[0] by A8; for k being Element of NAT holds P[k] from NAT_1:sch 1(A13,A12); then g.n in NAT; hence thesis by A11; end; then reconsider g as sequence of NAT by A7,FUNCT_2:2; g is increasing proof let n be Nat; reconsider n as Element of NAT by ORDINAL1:def 12; g.n < g.(n+1) by A9; hence thesis; end; then reconsider g as increasing sequence of NAT; reconsider S1 = S() * g as sequence of X(); A14: dom S1 = NAT by FUNCT_2:def 1; reconsider S1 as subsequence of S(); take S1; thus for n being Element of NAT holds P[S1.n] proof let n be Element of NAT; per cases; suppose n = 0; hence thesis by A2,A8,A14,FUNCT_1:12; end; suppose n <> 0; then n >= 0 qua Nat + 1 by NAT_1:13; then reconsider n9 = n-1 as Element of NAT by INT_1:5; reconsider k = g.(n9+1) as Element of NAT; for m,k being Element of NAT st m = g.n9 & k = g.(n9+1) holds P[S() .k] by A9; then P[S().k]; hence thesis by A14,FUNCT_1:12; end; end; end; theorem for k being Nat for F being NAT-defined Function holds dom F,dom Shift(F,k) are_equipotent proof let k be Nat; let F be NAT-defined Function; defpred P[set,set] means ex il being Element of NAT st $1 = il & $2 = k+il; A1: for e being set st e in dom F ex u being set st P[e,u] proof let e be set; assume e in dom F; then reconsider e as Element of NAT; take k+e, e; thus thesis; end; consider f being Function such that A2: dom f = dom F and A3: for x being set st x in dom F holds P[x,f.x] from CLASSES1:sch 1(A1); take f; hereby let x1, x2 be set such that A4: x1 in dom f and A5: x2 in dom f and A6: f.x1 = f.x2; consider i1 being Element of NAT such that A7: x1 = i1 and A8: f.x1 = k+i1 by A2,A3,A4; consider i2 being Element of NAT such that A9: x2 = i2 and A10: f.x2 = k+i2 by A2,A3,A5; thus x1 = x2 by A7,A6,A8,A10,A9; end; thus dom f = dom F by A2; A11: dom Shift(F,k) = { (m+k) where m is Element of NAT: m in dom F } by Def12; hereby let y be set; assume y in rng f; then consider x being set such that A12: x in dom f and A13: f.x = y by FUNCT_1:def 3; consider il being Element of NAT such that A14: x = il and A15: f.x = k+il by A2,A3,A12; thus y in dom Shift(F,k) by A2,A11,A12,A13,A14,A15; end; let y be set; assume y in dom Shift(F,k); then consider m being Element of NAT such that A16: y = (m+k) and A17: m in dom F by A11; consider il being Element of NAT such that A18: m = il and A19: f.m = k+il by A3,A17; thus thesis by A2,A16,A17,A18,A19,FUNCT_1:def 3; end; registration let F be NAT-defined Function; reduce Shift(F,0) to F; reducibility proof A1: dom F = { m+(0 qua complex number) where m is Element of NAT: m in dom F } proof hereby let a be set; assume A2: a in dom F; then reconsider l=a as Element of NAT; a = (l qua complex number)+(0 qua complex number); hence a in { m+(0 qua complex number) where m is Element of NAT: m in dom F } by A2; end; let a be set; assume a in { m+(0 qua complex number) where m is Element of NAT: m in dom F }; then ex m being Element of NAT st a = m+(0 qua complex number) & m in dom F; hence thesis; end; for m being Element of NAT st m in dom F holds F.(m+(0 qua complex number)) = F.m; hence thesis by A1,Def12; end; end; theorem for F being NAT-defined Function holds Shift(F,0) = F; registration let X be non empty set; let F be X-valued Function, k be Nat; cluster Shift(F,k) -> X-valued; coherence proof A1: dom Shift(F,k) = { (m+k) where m is Element of NAT: m in dom F } by Def12; thus rng Shift(F,k) c= X proof let x be set; assume x in rng Shift(F,k); then consider y being set such that A2: y in dom Shift(F,k) and A3: x = Shift(F,k).y by FUNCT_1:def 3; consider m being Element of NAT such that A4: y = (m+k) and A5: m in dom F by A2,A1; Shift(F,k).(m+k) = F.m by A5,Def12 .= F/.m by A5,PARTFUN1:def 6; hence x in X by A3,A4; end; end; end; registration cluster non empty NAT-defined for Function; existence proof take id NAT; thus thesis; end; end; registration let F be empty Function, k be Nat; cluster Shift(F,k) -> empty; coherence proof A1: dom Shift(F,k) = { (m+k) where m is Element of NAT: m in dom F } by Def12; assume Shift(F,k) is non empty; then reconsider f = Shift(F,k) as non empty Function; dom f is non empty; then consider a being set such that A2: a in dom Shift(F,k) by XBOOLE_0:def 1; ex m being Element of NAT st a = (m+k) & m in dom F by A1,A2; hence thesis; end; end; registration let F be non empty NAT-defined Function, k be Nat; cluster Shift(F,k) -> non empty; coherence proof A1: dom Shift(F,k) = { (m+k) where m is Element of NAT: m in dom F } by Def12; consider a being set such that A2: a in dom F by XBOOLE_0:def 1; reconsider a as Element of NAT by A2; consider m being Nat such that A3: a = m; reconsider m as Element of NAT by ORDINAL1:def 12; (m+k) in dom Shift(F,k) by A1,A2,A3; hence thesis; end; end; theorem for F being Function, k being Nat st k > 0 holds not 0 in dom Shift(F,k) proof let F be Function, k be Nat such that A1: k > 0 and A2: 0 in dom Shift(F,k); dom Shift(F,k) = { m+k where m is Element of NAT: m in dom F } by Def12; then ex m being Element of NAT st 0 = m+k & m in dom F by A2; hence contradiction by A1; end; registration cluster NAT-defined finite non empty for Function; existence proof take f = 0 .--> 0; dom f = {0} by FUNCOP_1:13; hence dom f c= NAT by ZFMISC_1:31; thus thesis; end; end; registration let F be NAT-defined Relation; cluster dom F -> natural-membered; coherence; end; definition let F be non empty NAT-defined finite Function; func LastLoc F -> Element of NAT equals max dom F; coherence by ORDINAL1:def 12; end; definition let F be non empty NAT-defined finite Function; func CutLastLoc F -> Function equals F \ ( LastLoc F .--> F.LastLoc F ); coherence; end; registration let F be non empty NAT-defined finite Function; cluster CutLastLoc F -> NAT-defined finite; coherence; end; theorem Th30: for F being non empty NAT-defined finite Function holds LastLoc F in dom F by XXREAL_2:def 8; theorem for F, G being non empty NAT-defined finite Function st F c= G holds LastLoc F <= LastLoc G by RELAT_1:11,XXREAL_2:59; theorem for F being non empty NAT-defined finite Function, l being Element of NAT st l in dom F holds l <= LastLoc F by XXREAL_2:def 8; definition let F be non empty NAT-defined Function; func FirstLoc F -> Element of NAT equals min dom F; coherence by ORDINAL1:def 12; end; theorem for F being non empty NAT-defined finite Function holds FirstLoc F in dom F by XXREAL_2:def 7; theorem for F, G being non empty NAT-defined finite Function st F c= G holds FirstLoc G <= FirstLoc F by RELAT_1:11,XXREAL_2:60; theorem for l1 being Element of NAT for F being non empty NAT-defined finite Function st l1 in dom F holds FirstLoc F <= l1 by XXREAL_2:def 7; theorem Th36: for F being non empty NAT-defined finite Function holds dom CutLastLoc F = (dom F) \ {LastLoc F} proof let F be non empty NAT-defined finite Function; A1: dom (LastLoc F .--> (F.LastLoc F)) = {LastLoc F} by FUNCOP_1:13; reconsider R = {[LastLoc F, F.LastLoc F]} as Relation; A2: R = LastLoc F .--> (F.LastLoc F) by FUNCT_4:82; then A3: dom R = {LastLoc F} by FUNCOP_1:13; thus dom CutLastLoc F c= (dom F) \ {LastLoc F} proof let x be set; assume x in dom CutLastLoc F; then consider y being set such that A4: [x,y] in F \ R by A2,XTUPLE_0:def 12; A5: not [x,y] in R by A4,XBOOLE_0:def 5; A6: x in dom F by A4,XTUPLE_0:def 12; per cases by A5,TARSKI:def 1; suppose x <> LastLoc F; then not x in dom R by A3,TARSKI:def 1; hence thesis by A1,A2,A6,XBOOLE_0:def 5; end; suppose A7: y <> F.LastLoc F; now assume x in dom R; then x = LastLoc F by A3,TARSKI:def 1; hence contradiction by A4,A7,FUNCT_1:1; end; hence thesis by A1,A2,A6,XBOOLE_0:def 5; end; end; thus thesis by A1,RELAT_1:3; end; theorem for F being non empty NAT-defined finite Function holds dom F = dom CutLastLoc F \/ {LastLoc F} proof let F be non empty NAT-defined finite Function; LastLoc F in dom F by Th30; then A1: {LastLoc F} c= dom F by ZFMISC_1:31; dom CutLastLoc F = (dom F) \ {LastLoc F} by Th36; hence thesis by A1,XBOOLE_1:45; end; registration cluster 1-element NAT-defined finite for Function; existence proof take 0 .--> 0; thus thesis; end; end; registration let F be 1-element NAT-defined finite Function; cluster CutLastLoc F -> empty; coherence proof LastLoc F in dom F by Th30; then A1: [LastLoc F,F.LastLoc F] in F by FUNCT_1:def 2; assume not thesis; then consider a being set such that A2: a in CutLastLoc F by XBOOLE_0:def 1; A3: a = [LastLoc F,F.LastLoc F] by A1,A2,ZFMISC_1:def 10; not a in LastLoc F .--> F.LastLoc F by A2,XBOOLE_0:def 5; then not a in {[LastLoc F,F.LastLoc F]} by FUNCT_4:82; hence thesis by A3,TARSKI:def 1; end; end; theorem for F being non empty NAT-defined finite Function holds card CutLastLoc F = card F - 1 proof let F be non empty NAT-defined finite Function; LastLoc F .--> F.LastLoc F c= F proof let a, b be set; assume [a,b] in LastLoc F .--> F.LastLoc F; then [a,b] in {[LastLoc F,F.LastLoc F]} by FUNCT_4:82; then A1: [a,b] = [LastLoc F,F.LastLoc F] by TARSKI:def 1; LastLoc F in dom F by Th30; hence thesis by A1,FUNCT_1:def 2; end; hence card CutLastLoc F = card F - card (LastLoc F .--> F.LastLoc F) by CARD_2:44 .= card F - card {[LastLoc F,F.LastLoc F]} by FUNCT_4:82 .= card F - 1 by CARD_1:30; end; begin registration let X be set, f be X-defined complex-valued Function; cluster -f -> X-defined; coherence proof A1: dom -f = dom f by Def5; thus dom -f c= X by A1; end; cluster f" -> X-defined; coherence proof A2: dom(f") = dom f by Def7; thus dom(f") c= X by A2; end; cluster f^2 -> X-defined; coherence proof A3: dom(f^2) = dom f by Th11; thus dom(f^2) c= X by A3; end; cluster |.f.| -> X-defined; coherence proof A4: dom |.f.| = dom f by Def11; thus dom |.f.| c= X by A4; end; end; registration let X be set; cluster total for X-defined natural-valued Function; existence proof take the total PartFunc of X, NAT; thus thesis; end; end; registration let X be set, f be total X-defined complex-valued Function; cluster -f -> total; coherence proof A1: dom -f = dom f by Def5; dom f = X by PARTFUN1:def 2; hence thesis by A1,PARTFUN1:def 2; end; cluster f" -> total; coherence proof A2: dom(f") = dom f by Def7; dom f = X by PARTFUN1:def 2; hence thesis by A2,PARTFUN1:def 2; end; cluster f^2 -> total; coherence proof A3: dom(f^2) = dom f by Th11; dom f = X by PARTFUN1:def 2; hence thesis by A3,PARTFUN1:def 2; end; cluster |.f.| -> total; coherence proof A4: dom |.f.| = dom f by Def11; dom f = X by PARTFUN1:def 2; hence thesis by A4,PARTFUN1:def 2; end; end; registration let X be set, f be X-defined complex-valued Function, r be complex number; cluster r+f -> X-defined; coherence proof A1: dom(r+f) = dom f by Def2; thus dom(r+f) c= X by A1; end; cluster f-r -> X-defined; coherence; cluster r(#)f -> X-defined; coherence proof A2: dom(r(#)f) = dom f by Def5; thus dom(r(#)f) c= X by A2; end; end; registration let X be set, f be total X-defined complex-valued Function, r be complex number; cluster r+f -> total; coherence proof A1: dom(r+f) = dom f by Def2; dom f = X by PARTFUN1:def 2; hence thesis by A1,PARTFUN1:def 2; end; cluster f-r -> total; coherence; cluster r(#)f -> total; coherence proof A2: dom(r(#)f) = dom f by Def5; dom f = X by PARTFUN1:def 2; hence thesis by A2,PARTFUN1:def 2; end; end; registration let X be set, f1 be complex-valued Function; let f2 be X-defined complex-valued Function; cluster f1 + f2 -> X-defined; coherence proof dom(f1 + f2) = dom f1 /\ dom f2 by Def1; then A1: dom(f1 + f2) c= dom f2 by XBOOLE_1:17; thus dom(f1 + f2) c= X by A1,XBOOLE_1:1; end; cluster f1 - f2 -> X-defined; coherence; cluster f1(#)f2 -> X-defined; coherence proof dom(f1(#)f2) = dom f1 /\ dom f2 by Def4; then A2: dom(f1(#)f2) c= dom f2 by XBOOLE_1:17; thus dom(f1(#)f2) c= X by A2,XBOOLE_1:1; end; cluster f1/"f2 -> X-defined; coherence; end; registration let X be set; let f1,f2 be total X-defined complex-valued Function; cluster f1 + f2 -> total; coherence proof A1: dom(f1 + f2) = dom f1 /\ dom f2 by Def1; dom f1 = X & dom f2 = X by PARTFUN1:def 2; hence thesis by A1,PARTFUN1:def 2; end; cluster f1 - f2 -> total; coherence; cluster f1(#)f2 -> total; coherence proof A2: dom(f1(#)f2) = dom f1 /\ dom f2 by Def4; dom f1 = X & dom f2 = X by PARTFUN1:def 2; hence thesis by A2,PARTFUN1:def 2; end; cluster f1/"f2 -> total; coherence; end; registration let X be non empty set; let F be X-valued non empty NAT-defined finite Function; cluster CutLastLoc F -> X-valued; coherence; end; theorem for f being Function for i,n being Nat st i in dom Shift(f,n) ex j being Nat st j in dom f & i = j + n proof let f be Function; let i,n be Nat; A: dom Shift(f,n) = { m+n:m in dom f } by Def12; assume i in dom Shift(f,n); then ex m being Element of NAT st i = m + n & m in dom f by A; hence ex j being Nat st j in dom f & i = j + n; end; begin reserve i,j,k,l for Nat; reserve A,a,b,x,x1,x2,x3 for set; reserve D,D9,E for non empty set; reserve d,d1,d2,d3 for Element of D; reserve d9,d19,d29,d39 for Element of D9; reserve p,q,r for FinSequence; theorem min(i,j) is Element of NAT & max(i,j) is Element of NAT by ORDINAL1:def 12; theorem Th2: l = min(i,j) implies Seg i /\ Seg j = Seg l proof i <= j or j <= i; then i <= j & Seg i /\ Seg j = Seg i or j <= i & Seg i /\ Seg j = Seg j by FINSEQ_1:7; hence thesis by XXREAL_0:def 9; end; theorem Th3: i <= j implies max(0,i-j) = 0 proof assume i <= j; then i-i <= j-i by XREAL_1:9; then -(j-i) <= -0; hence thesis by XXREAL_0:def 10; end; theorem Th4: j <= i implies max(0,i-j) = i-j proof assume j <= i; then j-j <= i-j by XREAL_1:9; hence thesis by XXREAL_0:def 10; end; theorem max(0,i-j) is Element of NAT proof per cases; suppose i <= j; hence thesis by Th3; end; suppose A1: j <= i; then i - j is Element of NAT by NAT_1:21; hence thesis by A1,Th4; end; end; theorem min(0,i) = 0 & min(i,0) = 0 & max(0,i) = i & max(i,0) = i by XXREAL_0:def 9 ,def 10; theorem i in Seg (l+1) implies i in Seg l or i = l+1 proof assume A1: i in Seg(l+1); then i <= l+1 by FINSEQ_1:1; then A2: 1 <= i & i <= l or i = l+1 by A1,FINSEQ_1:1,NAT_1:8; i is Element of NAT by ORDINAL1:def 12; hence thesis by A2; end; theorem i in Seg l implies i in Seg(l+j) proof l <= l+j by NAT_1:11; then Seg l c= Seg(l+j) by FINSEQ_1:5; hence thesis; end; theorem len p = len q & (for j st j in dom p holds p.j = q.j) implies p = q proof assume that A1: len p = len q and A2: for j st j in dom p holds p.j = q.j; dom p = Seg len p & dom q = Seg len p by A1,FINSEQ_1:def 3; hence thesis by A2,FINSEQ_1:13; end; theorem Th10: b in rng p implies ex i st i in dom p & p.i = b proof assume b in rng p; then ex a st a in dom p & b = p.a by FUNCT_1:def 3; hence thesis; end; theorem Th11: for D being set for p being FinSequence of D st i in dom p holds p.i in D proof let D be set; let p be FinSequence of D; assume i in dom p; then A1: p.i in rng p by FUNCT_1:def 3; rng p c= D by FINSEQ_1:def 4; hence thesis by A1; end; theorem Th12: for D being set holds (for i st i in dom p holds p.i in D) implies p is FinSequence of D proof let D be set; assume A1: for i st i in dom p holds p.i in D; let b; assume b in rng p; then ex i st i in dom p & p.i = b by Th10; hence thesis by A1; end; Lm1: rng <*x1,x2*> = {x1,x2} proof thus rng<* x1,x2 *> = rng<* x1 *> \/ rng <* x2 *> by FINSEQ_1:31 .= rng<* x1 *> \/ {x2} by FINSEQ_1:38 .= {x1} \/ {x2} by FINSEQ_1:39 .= {x1,x2} by ENUMSET1:1; end; theorem Th13: <*d1,d2*> is FinSequence of D proof rng <*d1,d2*> = {d1,d2} by Lm1; hence thesis by FINSEQ_1:def 4; end; Lm2: rng <*x1,x2,x3*> = {x1,x2,x3} proof thus rng <* x1,x2,x3 *> = rng(<* x1 *> ^ <* x2,x3 *>) by FINSEQ_1:43 .= rng<* x1 *> \/ rng <* x2,x3 *> by FINSEQ_1:31 .= {x1} \/ rng<* x2,x3 *> by FINSEQ_1:38 .= {x1} \/ {x2,x3} by Lm1 .= {x1,x2,x3} by ENUMSET1:2; end; theorem Th14: <*d1,d2,d3*> is FinSequence of D proof rng <*d1,d2,d3*> = {d1,d2,d3} by Lm2; hence thesis by FINSEQ_1:def 4; end; theorem Th15: i in dom p implies i in dom(p^q) proof A1: dom p c= dom(p^q) by FINSEQ_1:26; assume i in dom p; hence thesis by A1; end; theorem Th16: len(p^<*a*>) = len p + 1 proof len(p^<*a*>) = len p + len <*a*> by FINSEQ_1:22; hence thesis by FINSEQ_1:39; end; theorem p^<*a*> = q^<*b*> implies p = q & a = b proof assume A1: p^<*a*> = q^<*b*>; A2: (p^<*a*>).(len p + 1) = a & (q^<*b*>).(len q + 1) = b by FINSEQ_1:42; len(p^<*a*>) = len p + 1 & len(q^<*b*>) = len q + 1 by Th16; hence thesis by A1,A2,FINSEQ_1:33; end; theorem len p = i + 1 implies ex q,a st p = q^<*a*> by CARD_1:27,FINSEQ_1:46; theorem Th19: for p being FinSequence of A st len p <> 0 ex q being FinSequence of A, d being Element of A st p = q^<*d*> proof let p be FinSequence of A; assume A1: len p <> 0; then p <> {}; then consider q being FinSequence,d being set such that A2: p = q^<*d*> by FINSEQ_1:46; for i st i in dom q holds q.i in A proof let i; assume i in dom q; then p.i = q.i & i in dom p by A2,Th15,FINSEQ_1:def 7; hence thesis by Th11; end; then A3: q is FinSequence of A by Th12; len p in Seg len p by A1,FINSEQ_1:3; then A4: len p in dom p by FINSEQ_1:def 3; len p = len q + 1 by A2,Th16; then p.(len p) = d by A2,FINSEQ_1:42; then d is Element of A by A4,Th11; hence thesis by A2,A3; end; theorem Th20: q = p|(Seg i) & len p <= i implies p = q proof assume A1: q = p|(Seg i); assume len p <= i; then Seg len p c= Seg i by FINSEQ_1:5; then dom p c= Seg i by FINSEQ_1:def 3; hence thesis by A1,RELAT_1:68; end; theorem q = p|(Seg i) implies len q = min(i,len p) proof assume A1: q = p|(Seg i); now per cases; case i <= len p; hence len q = i by A1,FINSEQ_1:17; end; case not i <= len p; hence len q = len p by A1,Th20; end; end; hence thesis by XXREAL_0:def 9; end; theorem Th22: len r = i+j implies ex p,q st len p = i & len q = j & r = p^q proof assume A1: len r = i+j; reconsider z=i as Element of NAT by ORDINAL1:def 12; reconsider p = r|(Seg z) as FinSequence by FINSEQ_1:15; consider q being FinSequence such that A2: r = p^q by FINSEQ_1:80; take p,q; i <= len r by A1,NAT_1:11; hence len p = i by FINSEQ_1:17; then len(p^q) = i + len q by FINSEQ_1:22; hence len q = j by A1,A2; thus thesis by A2; end; theorem Th23: for r being FinSequence of D st len r = i+j ex p,q being FinSequence of D st len p = i & len q = j & r = p^q proof let r be FinSequence of D; assume len r = i+j; then consider p,q being FinSequence such that A1: len p = i & len q = j and A2: r = p^q by Th22; p is FinSequence of D & q is FinSequence of D by A2,FINSEQ_1:36; hence thesis by A1,A2; end; scheme SeqLambdaD{i()->Nat,D()->non empty set,F(set)->Element of D()}: ex z being FinSequence of D() st len z = i() & for j being Nat st j in dom z holds z.j = F (j) proof consider z being FinSequence such that A1: len z = i() and A2: for i being Nat st i in dom z holds z.i = F(i) from FINSEQ_1:sch 2; A3: Seg i() = dom z by A1,FINSEQ_1:def 3; for j be Nat st j in Seg i() holds z.j in D() proof let j be Nat; assume j in Seg i(); then z.j = F(j) by A2,A3; hence thesis; end; then reconsider z as FinSequence of D() by A3,Th12; take z; thus len z = i() by A1; let j be Nat; thus thesis by A2; end; scheme IndSeqD{D()->set, P[set]}: for p being FinSequence of D() holds P[p] provided A1: P[<*> D()] and A2: for p being FinSequence of D() for x being Element of D() st P[p] holds P[p^<*x*>] proof defpred R[set] means for p being FinSequence of D() st len p = $1 holds P[p]; A3: for i st R[i] holds R[i+1] proof let i such that A4: for p being FinSequence of D() st len p = i holds P[p]; let p be FinSequence of D(); assume A5: len p = i + 1; then consider q being FinSequence of D(), x being Element of D() such that A6: p = q^<*x*> by Th19; len p = len q + 1 by A6,Th16; hence thesis by A2,A4,A5,A6; end; let p be FinSequence of D(); A7: len p = len p; A8: R[0] proof let p be FinSequence of D(); assume len p = 0; then p = <*>D(); hence thesis by A1; end; for i holds R[i] from NAT_1:sch 2(A8,A3); hence thesis by A7; end; theorem Th24: for D being set, D1 being Subset of D for p being FinSequence of D1 holds p is FinSequence of D proof let D be set, D1 be Subset of D; let p be FinSequence of D1; rng p c= D1 by FINSEQ_1:def 4; hence rng p c= D by XBOOLE_1:1; end; theorem Th25: for f being Function of Seg i, D holds f is FinSequence of D proof let f be Function of Seg i, D; reconsider i as Element of NAT by ORDINAL1:def 12; dom f = Seg i by FUNCT_2:def 1; then A1: f is FinSequence by FINSEQ_1:def 2; rng f c= D by RELAT_1:def 19; hence thesis by A1,FINSEQ_1:def 4; end; theorem for p being FinSequence of D holds p is Function of dom p, D proof let p be FinSequence of D; rng p c= D by FINSEQ_1:def 4; hence thesis by FUNCT_2:2; end; theorem for f being Function of NAT,D holds f|(Seg i) is FinSequence of D proof let f be Function of NAT,D; f|(Seg i) is Function of Seg i, D by FUNCT_2:32; hence thesis by Th25; end; theorem for f being Function of NAT,D st q = f|(Seg i) holds len q = i proof let f be Function of NAT,D; reconsider i as Element of NAT by ORDINAL1:def 12; f|(Seg i) is Function of Seg i, D by FUNCT_2:32; then dom(f|(Seg i)) = Seg i by FUNCT_2:def 1; hence thesis by FINSEQ_1:def 3; end; theorem Th29: for f being Function st rng p c= dom f & q = f*p holds len q = len p proof let f be Function; assume rng p c= dom f; then dom(f*p) = dom p by RELAT_1:27; then dom(f*p) = Seg len p by FINSEQ_1:def 3; hence thesis by FINSEQ_1:def 3; end; theorem Th30: D = Seg i implies for p being FinSequence for q being FinSequence of D st i <= len p holds p*q is FinSequence proof assume A1: D = Seg i; let p be FinSequence; let q be FinSequence of D; assume i <= len p; then Seg i c= Seg len p by FINSEQ_1:5; then A2: Seg i c= dom p by FINSEQ_1:def 3; rng q c= Seg i by A1,FINSEQ_1:def 4; then dom (p*q) = dom q by A2,RELAT_1:27,XBOOLE_1:1; then dom (p*q) = Seg len q by FINSEQ_1:def 3; hence thesis by FINSEQ_1:def 2; end; theorem D = Seg i implies for p being FinSequence of D9 for q being FinSequence of D st i <= len p holds p*q is FinSequence of D9 proof assume A1: D = Seg i; let p be FinSequence of D9; let q be FinSequence of D; assume i <= len p; then reconsider pq = p*q as FinSequence by A1,Th30; rng pq c= rng p & rng p c= D9 by FINSEQ_1:def 4,RELAT_1:26; then rng pq c= D9 by XBOOLE_1:1; hence thesis by FINSEQ_1:def 4; end; theorem Th32: for A,D being set for p being FinSequence of A for f being Function of A,D holds f*p is FinSequence of D proof let A,D be set; let p be FinSequence of A; let f be Function of A,D; per cases; suppose D = {}; then f*p = <*>D; hence thesis; end; suppose A1: D <> {}; A2: rng p c= A by RELAT_1:def 19; A3: rng(f*p) c= D by RELAT_1:def 19; dom f = A by A1,FUNCT_2:def 1; then f*p is FinSequence by A2,FINSEQ_1:16; hence thesis by A3,FINSEQ_1:def 4; end; end; theorem Th33: for p being FinSequence of A for f being Function of A,D9 st q = f*p holds len q = len p proof let p be FinSequence of A; let f be Function of A,D9; dom f = A & rng p c= A by FINSEQ_1:def 4,FUNCT_2:def 1; hence thesis by Th29; end; theorem for x being set, f being Function st x in dom f holds f*<*x*> = <*f.x*> proof let x be set, f be Function; assume A1: x in dom f; then reconsider D = dom f, E = rng f as non empty set by FUNCT_1:3; rng <*x*> = {x} by FINSEQ_1:38; then rng <*x*> c= D by A1,ZFMISC_1:31; then reconsider p = <*x*> as FinSequence of D by FINSEQ_1:def 4; reconsider f as Function of D, E by FUNCT_2:def 1,RELSET_1:4; reconsider q = f*p as FinSequence of E by Th32; A2: p.1 = x by FINSEQ_1:40; A3: len q = len p by Th33 .= 1 by FINSEQ_1:39; then 1 in Seg len q; then 1 in dom q by FINSEQ_1:def 3; then q.1 = f.x by A2,FUNCT_1:12; hence thesis by A3,FINSEQ_1:40; end; theorem for p being FinSequence of D for f being Function of D,D9 st p = <*x1*> holds f*p = <*f.x1*> proof let p be FinSequence of D; let f be Function of D,D9 such that A1: p = <*x1*>; A2: p.1 = x1 by A1,FINSEQ_1:40; reconsider q = f*p as FinSequence of D9 by Th32; len p = 1 by A1,FINSEQ_1:39; then A3: len q = 1 by Th33; then 1 in Seg len q; then 1 in dom q by FINSEQ_1:def 3; then q.1 = f.x1 by A2,FUNCT_1:12; hence thesis by A3,FINSEQ_1:40; end; theorem Th36: for p being FinSequence of D for f being Function of D,D9 st p = <*x1,x2*> holds f*p = <*f.x1,f.x2*> proof let p be FinSequence of D; let f be Function of D,D9 such that A1: p = <*x1,x2*>; A2: p.2 = x2 by A1,FINSEQ_1:44; reconsider q = f*p as FinSequence of D9 by Th32; len p = 2 by A1,FINSEQ_1:44; then A3: len q = 2 by Th33; then 2 in Seg len q; then 2 in dom q by FINSEQ_1:def 3; then A4: q.2 = f.x2 by A2,FUNCT_1:12; 1 in Seg len q by A3; then A5: 1 in dom q by FINSEQ_1:def 3; p.1 = x1 by A1,FINSEQ_1:44; then q.1 = f.x1 by A5,FUNCT_1:12; hence thesis by A3,A4,FINSEQ_1:44; end; theorem Th37: for p being FinSequence of D for f being Function of D,D9 st p = <*x1,x2,x3*> holds f*p = <*f.x1,f.x2,f.x3*> proof let p be FinSequence of D; let f be Function of D,D9 such that A1: p = <*x1,x2,x3*>; A2: p.2 = x2 by A1,FINSEQ_1:45; reconsider q = f*p as FinSequence of D9 by Th32; len p = 3 by A1,FINSEQ_1:45; then A3: len q = 3 by Th33; then 2 in Seg len q; then 2 in dom q by FINSEQ_1:def 3; then A4: q.2 = f.x2 by A2,FUNCT_1:12; A5: p.3 = x3 by A1,FINSEQ_1:45; A6: p.1 = x1 by A1,FINSEQ_1:45; 3 in Seg len q by A3; then 3 in dom q by FINSEQ_1:def 3; then A7: q.3 = f.x3 by A5,FUNCT_1:12; 1 in Seg len q by A3; then 1 in dom q by FINSEQ_1:def 3; then q.1 = f.x1 by A6,FUNCT_1:12; hence thesis by A3,A4,A7,FINSEQ_1:45; end; theorem Th38: for f being Function of Seg i,Seg j st (j = 0 implies i = 0) & j <= len p holds p*f is FinSequence proof let f be Function of Seg i,Seg j; assume j = 0 implies i = 0; then Seg j = {} implies Seg i = {}; then A1: dom f = Seg i by FUNCT_2:def 1; assume j <= len p; then rng f c= Seg j & Seg j c= Seg len p by FINSEQ_1:5,RELAT_1:def 19; then rng f c= Seg len p by XBOOLE_1:1; then rng f c= dom p by FINSEQ_1:def 3; then dom(p*f) = dom f by RELAT_1:27; hence thesis by A1,FINSEQ_1:def 2; end; theorem for f being Function of Seg i,Seg i st i <= len p holds p*f is FinSequence by Th38; theorem for f being Function of dom p,dom p holds p*f is FinSequence proof dom p = Seg len p by FINSEQ_1:def 3; hence thesis by Th38; end; theorem Th41: for f being Function of Seg i,Seg i st rng f = Seg i & i <= len p & q = p*f holds len q = i proof let f be Function of Seg i,Seg i; assume rng f = Seg i & i <= len p; then rng f c= Seg len p by FINSEQ_1:5; then rng f c= dom p by FINSEQ_1:def 3; then A1: dom(p*f) = dom f by RELAT_1:27; i is Element of NAT & dom f = Seg i by FUNCT_2:52,ORDINAL1:def 12; hence thesis by A1,FINSEQ_1:def 3; end; theorem Th42: for f being Function of dom p,dom p st rng f = dom p & q = p*f holds len q = len p proof Seg len p = dom p by FINSEQ_1:def 3; hence thesis by Th41; end; theorem Th43: for f being Permutation of Seg i st i <= len p & q = p*f holds len q = i proof let f be Permutation of Seg i; rng f = Seg i by FUNCT_2:def 3; hence thesis by Th41; end; theorem for f being Permutation of dom p st q = p*f holds len q = len p proof Seg len p = dom p by FINSEQ_1:def 3; hence thesis by Th43; end; theorem Th45: for p being FinSequence of D for f being Function of Seg i,Seg j st (j = 0 implies i = 0) & j <= len p holds p*f is FinSequence of D proof let p be FinSequence of D; let f be Function of Seg i,Seg j such that A1: ( j = 0 implies i = 0)& j <= len p; set q = p*f; rng p c= D & rng q c= rng p by FINSEQ_1:def 4,RELAT_1:26; then A2: rng q c= D by XBOOLE_1:1; q is FinSequence by A1,Th38; hence thesis by A2,FINSEQ_1:def 4; end; theorem for p being FinSequence of D for f being Function of Seg i,Seg i st i <= len p holds p*f is FinSequence of D by Th45; theorem Th47: for p being FinSequence of D for f being Function of dom p,dom p holds p*f is FinSequence of D proof let p be FinSequence of D; Seg len p = dom p by FINSEQ_1:def 3; hence thesis by Th45; end; theorem Th48: id Seg k is FinSequence of NAT proof set I = id Seg k; reconsider k as Element of NAT by ORDINAL1:def 12; dom I = Seg k; then rng I = Seg k & I is FinSequence by FINSEQ_1:def 2; hence thesis by FINSEQ_1:def 4; end; definition let i be Nat; func idseq i -> FinSequence equals id Seg i; coherence by Th48; end; registration let k; cluster idseq k -> k-element; coherence proof k in NAT & dom idseq k = Seg k by ORDINAL1:def 12,RELAT_1:45; hence len idseq k = k by FINSEQ_1:def 3; end; end; registration cluster idseq 0 -> empty; coherence; end; theorem for k being Element of Seg i holds (idseq i).k = k proof let k be Element of Seg i; per cases; suppose i <> 0; hence thesis by FUNCT_1:18; end; suppose i = 0; then k = 0 & dom(idseq i) = 0 by SUBSET_1:def 1; hence thesis by FUNCT_1:def 2; end; end; theorem Th50: idseq 1 = <*1*> proof 1 in Seg 1; then len idseq 1 = 1 & (idseq 1).1 = 1 by CARD_1:def 7,FUNCT_1:18; hence thesis by FINSEQ_1:40; end; theorem Th51: idseq (i+1) = (idseq i) ^ <*i+1*> proof set p = idseq (i+1); consider q being FinSequence , a being set such that A1: p = q^<*a*> by FINSEQ_1:46; A2: len p = i + 1 & len p = len q + 1 by A1,Th16,CARD_1:def 7; A3: dom q = Seg len q by FINSEQ_1:def 3; A4: for a st a in Seg i holds q.a = a proof i <= i+1 by NAT_1:11; then A5: Seg i c= Seg (i+1) by FINSEQ_1:5; let a; assume A6: a in Seg i; then reconsider j = a as Element of NAT; p.j = q.j by A1,A2,A3,A6,FINSEQ_1:def 7; hence thesis by A6,A5,FUNCT_1:18; end; p.(i+1) = i+1 by FINSEQ_1:4,FUNCT_1:18; then a = i+1 by A1,A2,FINSEQ_1:42; hence thesis by A1,A2,A3,A4,FUNCT_1:17; end; theorem Th52: idseq 2 = <*1,2*> by Th50,Th51; theorem idseq 3 = <*1,2,3*> by Th51,Th52; theorem Th54: len p <= k implies p*(idseq k) = p proof assume A1: len p <= k; reconsider k as Element of NAT by ORDINAL1:def 12; dom p = Seg len p by FINSEQ_1:def 3; then dom p c= Seg k by A1,FINSEQ_1:5; hence thesis by RELAT_1:51; end; theorem idseq k is Permutation of Seg k; theorem Th56: (Seg k) --> a is FinSequence proof set p = Seg k --> a; reconsider k as Element of NAT by ORDINAL1:def 12; dom p = Seg k by FUNCOP_1:13; hence thesis by FINSEQ_1:def 2; end; registration let k, a; cluster (Seg k) --> a -> FinSequence-like; coherence by Th56; end; definition let i be Nat, a be set; func i |-> a -> FinSequence equals Seg i --> a; coherence; end; registration let k be Nat, a be set; cluster k |-> a -> k-element; coherence proof k in NAT & dom(k |-> a) = Seg k by FUNCOP_1:13,ORDINAL1:def 12; hence len(k |-> a) = k by FINSEQ_1:def 3; end; end; theorem Th57: for d being set, w being set st w in Seg k holds (k |-> d).w = d by FUNCOP_1:7; theorem 0 |-> a = {}; theorem Th59: 1 |-> a = <*a*> proof 1 in Seg 1; then len(1 |-> a) = 1 & (1 |-> a).1 = a by CARD_1:def 7,FUNCOP_1:7; hence thesis by FINSEQ_1:40; end; theorem Th60: (i+1) |-> a = (i |-> a) ^ <*a*> proof set p = (i+1) |-> a; consider q being FinSequence , x being set such that A1: p = q^<*x*> by FINSEQ_1:46; A2: len p = i + 1 & len p = len q + 1 by A1,Th16,CARD_1:def 7; A3: now per cases; suppose A4: i = 0; then q = {} by A2; hence q = i |-> a by A4; end; suppose A5: i <> 0; A6: rng q c= rng p & rng p = {a} by A1,FINSEQ_1:29,FUNCOP_1:8; A7: dom q = Seg len q by FINSEQ_1:def 3; then i in dom q by A2,A5,FINSEQ_1:3; then q.i in rng q by FUNCT_1:def 3; then rng q = {a} by A6,ZFMISC_1:33; hence q = i |-> a by A2,A7,FUNCOP_1:9; end; end; p.(i+1) = a by FINSEQ_1:4,FUNCOP_1:7; hence thesis by A1,A2,A3,FINSEQ_1:42; end; theorem Th61: 2 |-> a = <*a,a*> proof thus 2 |-> a = (1+1) |-> a .= (1|->a)^<*a*> by Th60 .= <*a,a*> by Th59; end; theorem 3 |-> a = <*a,a,a*> proof thus 3 |-> a = (2+1) |-> a .= (2|->a)^<*a*> by Th60 .= <*a,a*>^<*a*> by Th61 .= <*a,a,a*>; end; theorem Th63: k |-> d is FinSequence of D proof set s = k |-> d; rng s c= {d} by FUNCOP_1:13; then rng s c= D by XBOOLE_1:1; hence thesis by FINSEQ_1:def 4; end; Lm3: for F being Function st [:rng p,rng q:] c= dom F & i = min(len p,len q) holds dom(F.:(p,q)) = Seg i proof let F be Function such that A1: [:rng p,rng q:] c= dom F and A2: i = min(len p,len q); A3: rng <:p,q:> c= [:rng p,rng q:] & dom <:p,q:> = dom p /\ dom q by FUNCT_3:51 ,def 7; dom p = Seg len p & dom q = Seg len q by FINSEQ_1:def 3; then dom p /\ dom q = Seg i by A2,Th2; hence thesis by A1,A3,RELAT_1:27,XBOOLE_1:1; end; theorem Th64: for F being Function st [:rng p,rng q:] c= dom F holds F.:(p,q) is FinSequence proof let F be Function; reconsider k = min(len p,len q) as Element of NAT by XXREAL_0:15; assume [:rng p,rng q:] c= dom F; then dom(F.:(p,q)) = Seg k by Lm3; hence thesis by FINSEQ_1:def 2; end; theorem Th65: for F being Function st [:rng p,rng q:] c= dom F & r = F.:(p,q) holds len r = min(len p,len q) proof let F be Function; reconsider k = min(len p,len q) as Element of NAT by XXREAL_0:15; assume [:rng p,rng q:] c= dom F; then dom(F.:(p,q)) = Seg k by Lm3; hence thesis by FINSEQ_1:def 3; end; Lm4: for F being Function st [:{a},rng p:] c= dom F holds dom(F[;](a,p)) = dom p proof let F be Function such that A1: [:{a},rng p:] c= dom F; set q = dom p --> a; dom q = dom p by FUNCOP_1:13; then A2: dom <:q,p:> = dom p by FUNCT_3:50; rng q c= {a} by FUNCOP_1:13; then rng <:q,p:> c= [:rng q,rng p:] & [:rng q,rng p:] c= [:{a},rng p:] by FUNCT_3:51,ZFMISC_1:95; then A3: rng <:q,p:> c= [:{a},rng p:] by XBOOLE_1:1; thus thesis by A1,A3,A2,RELAT_1:27,XBOOLE_1:1; end; theorem Th66: for F being Function st [:{a},rng p:] c= dom F holds F[;](a,p) is FinSequence proof let F be Function; assume [:{a},rng p:] c= dom F; then dom(F[;](a,p)) = dom p by Lm4; then dom(F[;](a,p)) = Seg len p by FINSEQ_1:def 3; hence thesis by FINSEQ_1:def 2; end; theorem Th67: for F being Function st [:{a},rng p:] c= dom F & r = F[;](a,p) holds len r = len p proof let F be Function; assume [:{a},rng p:] c= dom F; then dom(F[;](a,p)) = dom p by Lm4; then dom(F[;](a,p)) = Seg len p by FINSEQ_1:def 3; hence thesis by FINSEQ_1:def 3; end; Lm5: for F being Function st [:rng p,{a}:] c= dom F holds dom(F[:](p,a)) = dom p proof let F be Function such that A1: [:rng p,{a}:] c= dom F; set q = dom p --> a; dom q = dom p by FUNCOP_1:13; then A2: dom <:p,q:> = dom p by FUNCT_3:50; rng q c= {a} by FUNCOP_1:13; then rng <:p,q:> c= [:rng p,rng q:] & [:rng p,rng q:] c= [:rng p,{a}:] by FUNCT_3:51,ZFMISC_1:95; then A3: rng <:p,q:> c= [:rng p,{a}:] by XBOOLE_1:1; thus thesis by A1,A3,A2,RELAT_1:27,XBOOLE_1:1; end; theorem Th68: for F being Function st [:rng p,{a}:] c= dom F holds F[:](p,a) is FinSequence proof let F be Function; assume [:rng p,{a}:] c= dom F; then dom(F[:](p,a)) = dom p by Lm5; then dom(F[:](p,a)) = Seg len p by FINSEQ_1:def 3; hence thesis by FINSEQ_1:def 2; end; theorem Th69: for F being Function st [:rng p,{a}:] c= dom F & r = F[:](p,a) holds len r = len p proof let F be Function; assume [:rng p,{a}:] c= dom F; then dom(F[:](p,a)) = dom p by Lm5; then dom(F[:](p,a)) = Seg len p by FINSEQ_1:def 3; hence thesis by FINSEQ_1:def 3; end; theorem Th70: for F being Function of [:D,D9:],E for p being FinSequence of D for q being FinSequence of D9 holds F.:(p,q) is FinSequence of E proof let F be Function of [:D,D9:],E; let p be FinSequence of D; let q be FinSequence of D9; A1: rng(F.:(p,q)) c= rng F by RELAT_1:26; rng p c= D & rng q c= D9 by FINSEQ_1:def 4; then [:rng p,rng q:] c= [:D,D9:] by ZFMISC_1:96; then [:rng p,rng q:] c= dom F by FUNCT_2:def 1; then A2: F.:(p,q) is FinSequence by Th64; rng F c= E by RELAT_1:def 19; then rng(F.:(p,q)) c= E by A1,XBOOLE_1:1; hence thesis by A2,FINSEQ_1:def 4; end; theorem Th71: for F being Function of [:D,D9:],E for p being FinSequence of D for q being FinSequence of D9 st r = F.:(p,q) holds len r = min(len p,len q) proof let F be Function of [:D,D9:],E; let p be FinSequence of D; let q be FinSequence of D9; rng p c= D & rng q c= D9 by FINSEQ_1:def 4; then [:rng p,rng q:] c= [:D,D9:] by ZFMISC_1:96; then [:rng p,rng q:] c= dom F by FUNCT_2:def 1; hence thesis by Th65; end; theorem Th72: for F being Function of [:D,D9:],E for p being FinSequence of D for q being FinSequence of D9 st len p = len q & r = F.:(p,q) holds len r = len p & len r = len q proof let F be Function of [:D,D9:],E; let p be FinSequence of D; let q be FinSequence of D9; assume that A1: len p = len q and A2: r = F.:(p,q); len r = min(len p,len q) by A2,Th71; hence thesis by A1; end; theorem for F being Function of [:D,D9:],E for p being FinSequence of D for p9 being FinSequence of D9 holds F.:(<*>D,p9) = <*>E & F.:(p,<*>D9) = <*>E proof let F be Function of [:D,D9:],E; let p be FinSequence of D; let p9 be FinSequence of D9; reconsider r = F.:(<*>D,p9),r9 = F.:(p,<*>D9) as FinSequence of E by Th70; len(<*>D) = 0; then len r = min(0,len p9) & len r9 = min(len p,0) by Th71; hence thesis by XXREAL_0:def 9; end; theorem for F being Function of [:D,D9:],E for p being FinSequence of D for q being FinSequence of D9 st p = <*d1*> & q = <*d19*> holds F.:(p,q) = <*F.(d1, d19)*> proof let F be Function of [:D,D9:],E; let p be FinSequence of D; let q be FinSequence of D9 such that A1: p = <*d1*> & q = <*d19*>; A2: p.1 = d1 & q.1 = d19 by A1,FINSEQ_1:40; reconsider r = F.:(p,q) as FinSequence of E by Th70; len p = 1 & len q = 1 by A1,FINSEQ_1:39; then A3: len r = 1 by Th72; then 1 in Seg len r; then 1 in dom r by FINSEQ_1:def 3; then r.1 = F.(d1,d19) by A2,FUNCOP_1:22; hence thesis by A3,FINSEQ_1:40; end; theorem for F being Function of [:D,D9:],E for p being FinSequence of D for q being FinSequence of D9 st p = <*d1,d2*> & q = <*d19,d29*> holds F.:(p,q) = <*F .(d1,d19),F.(d2,d29)*> proof let F be Function of [:D,D9:],E; let p be FinSequence of D; let q be FinSequence of D9 such that A1: p = <*d1,d2*> & q = <*d19,d29*>; A2: p.2 = d2 & q.2 = d29 by A1,FINSEQ_1:44; reconsider r = F.:(p,q) as FinSequence of E by Th70; len p = 2 & len q = 2 by A1,FINSEQ_1:44; then A3: len r = 2 by Th72; then 2 in Seg len r; then 2 in dom r by FINSEQ_1:def 3; then A4: r.2 = F.(d2,d29) by A2,FUNCOP_1:22; 1 in Seg len r by A3; then A5: 1 in dom r by FINSEQ_1:def 3; p.1 = d1 & q.1 = d19 by A1,FINSEQ_1:44; then r.1 = F.(d1,d19) by A5,FUNCOP_1:22; hence thesis by A3,A4,FINSEQ_1:44; end; theorem for F being Function of [:D,D9:],E for p being FinSequence of D for q being FinSequence of D9 st p = <*d1,d2,d3*> & q = <*d19,d29,d39*> holds F.:(p,q ) = <*F.(d1,d19),F.(d2,d29),F.(d3,d39)*> proof let F be Function of [:D,D9:],E; let p be FinSequence of D; let q be FinSequence of D9 such that A1: p = <*d1,d2,d3*> & q = <*d19,d29,d39*>; A2: p.2 = d2 & q.2 = d29 by A1,FINSEQ_1:45; reconsider r = F.:(p,q) as FinSequence of E by Th70; len p = 3 & len q = 3 by A1,FINSEQ_1:45; then A3: len r = 3 by Th72; then 2 in Seg len r; then 2 in dom r by FINSEQ_1:def 3; then A4: r.2 = F.(d2,d29) by A2,FUNCOP_1:22; A5: p.3 = d3 & q.3 = d39 by A1,FINSEQ_1:45; A6: p.1 = d1 & q.1 = d19 by A1,FINSEQ_1:45; 3 in Seg len r by A3; then 3 in dom r by FINSEQ_1:def 3; then A7: r.3 = F.(d3,d39) by A5,FUNCOP_1:22; 1 in Seg len r by A3; then 1 in dom r by FINSEQ_1:def 3; then r.1 = F.(d1,d19) by A6,FUNCOP_1:22; hence thesis by A3,A4,A7,FINSEQ_1:45; end; theorem Th77: for F being Function of [:D,D9:],E for p being FinSequence of D9 holds F[;](d,p) is FinSequence of E proof let F be Function of [:D,D9:],E; let p be FinSequence of D9; A1: rng(F[;](d,p)) c= rng F by RELAT_1:26; rng p c= D9 by FINSEQ_1:def 4; then [:{d},rng p:] c= [:D,D9:] by ZFMISC_1:96; then [:{d},rng p:] c= dom F by FUNCT_2:def 1; then A2: F[;](d,p) is FinSequence by Th66; rng F c= E by RELAT_1:def 19; then rng(F[;](d,p)) c= E by A1,XBOOLE_1:1; hence thesis by A2,FINSEQ_1:def 4; end; theorem Th78: for F being Function of [:D,D9:],E for p being FinSequence of D9 st r = F[;](d,p) holds len r = len p proof let F be Function of [:D,D9:],E; let p be FinSequence of D9; rng p c= D9 by FINSEQ_1:def 4; then [:{d},rng p:] c= [:D,D9:] by ZFMISC_1:96; then [:{d},rng p:] c= dom F by FUNCT_2:def 1; hence thesis by Th67; end; theorem for F being Function of [:D,D9:],E holds F[;](d,<*>D9) = <*>E proof let F be Function of [:D,D9:],E; reconsider r = F[;](d,<*>D9) as FinSequence of E by Th77; len(<*>D9) = 0; then len r = 0 by Th78; hence thesis; end; theorem for F being Function of [:D,D9:],E for p being FinSequence of D9 st p = <*d19*> holds F[;](d,p) = <*F.(d,d19)*> proof let F be Function of [:D,D9:],E; let p be FinSequence of D9 such that A1: p = <*d19*>; A2: p.1 = d19 by A1,FINSEQ_1:40; reconsider r = F[;](d,p) as FinSequence of E by Th77; len p = 1 by A1,FINSEQ_1:39; then A3: len r = 1 by Th78; then 1 in Seg len r; then 1 in dom r by FINSEQ_1:def 3; then r.1 = F.(d,d19) by A2,FUNCOP_1:32; hence thesis by A3,FINSEQ_1:40; end; theorem for F being Function of [:D,D9:],E for p being FinSequence of D9 st p = <*d19,d29*> holds F[;](d,p) = <*F.(d,d19),F.(d,d29)*> proof let F be Function of [:D,D9:],E; let p be FinSequence of D9 such that A1: p = <*d19,d29*>; A2: p.2 = d29 by A1,FINSEQ_1:44; reconsider r = F[;](d,p) as FinSequence of E by Th77; len p = 2 by A1,FINSEQ_1:44; then A3: len r = 2 by Th78; then 2 in Seg len r; then 2 in dom r by FINSEQ_1:def 3; then A4: r.2 = F.(d,d29) by A2,FUNCOP_1:32; 1 in Seg len r by A3; then A5: 1 in dom r by FINSEQ_1:def 3; p.1 = d19 by A1,FINSEQ_1:44; then r.1 = F.(d,d19) by A5,FUNCOP_1:32; hence thesis by A3,A4,FINSEQ_1:44; end; theorem for F being Function of [:D,D9:],E for p being FinSequence of D9 st p = <*d19,d29,d39*> holds F[;](d,p) = <*F.(d,d19),F.(d,d29),F.(d,d39)*> proof let F be Function of [:D,D9:],E; let p be FinSequence of D9 such that A1: p = <*d19,d29,d39*>; A2: p.2 = d29 by A1,FINSEQ_1:45; reconsider r = F[;](d,p) as FinSequence of E by Th77; len p = 3 by A1,FINSEQ_1:45; then A3: len r = 3 by Th78; then 2 in Seg len r; then 2 in dom r by FINSEQ_1:def 3; then A4: r.2 = F.(d,d29) by A2,FUNCOP_1:32; A5: p.3 = d39 by A1,FINSEQ_1:45; A6: p.1 = d19 by A1,FINSEQ_1:45; 3 in Seg len r by A3; then 3 in dom r by FINSEQ_1:def 3; then A7: r.3 = F.(d,d39) by A5,FUNCOP_1:32; 1 in Seg len r by A3; then 1 in dom r by FINSEQ_1:def 3; then r.1 = F.(d,d19) by A6,FUNCOP_1:32; hence thesis by A3,A4,A7,FINSEQ_1:45; end; theorem Th83: for F being Function of [:D,D9:],E for p being FinSequence of D holds F[:](p,d9) is FinSequence of E proof let F be Function of [:D,D9:],E; let p be FinSequence of D; A1: rng(F[:](p,d9)) c= rng F by RELAT_1:26; rng p c= D by FINSEQ_1:def 4; then [:rng p,{d9}:] c= [:D,D9:] by ZFMISC_1:96; then [:rng p,{d9}:] c= dom F by FUNCT_2:def 1; then A2: F[:](p,d9) is FinSequence by Th68; rng F c= E by RELAT_1:def 19; then rng(F[:](p,d9)) c= E by A1,XBOOLE_1:1; hence thesis by A2,FINSEQ_1:def 4; end; theorem Th84: for F being Function of [:D,D9:],E for p being FinSequence of D st r = F[:](p,d9) holds len r = len p proof let F be Function of [:D,D9:],E; let p be FinSequence of D; rng p c= D by FINSEQ_1:def 4; then [:rng p,{d9}:] c= [:D,D9:] by ZFMISC_1:96; then [:rng p,{d9}:] c= dom F by FUNCT_2:def 1; hence thesis by Th69; end; theorem for F being Function of [:D,D9:],E holds F[:](<*>D,d9) = <*>E proof let F be Function of [:D,D9:],E; reconsider r = F[:](<*>D,d9) as FinSequence of E by Th83; len(<*>D) = 0; then len r = 0 by Th84; hence thesis; end; theorem for F being Function of [:D,D9:],E for p being FinSequence of D st p = <*d1*> holds F[:](p,d9) = <*F.(d1,d9)*> proof let F be Function of [:D,D9:],E; let p be FinSequence of D such that A1: p = <*d1*>; A2: p.1 = d1 by A1,FINSEQ_1:40; reconsider r = F[:](p,d9) as FinSequence of E by Th83; len p = 1 by A1,FINSEQ_1:39; then A3: len r = 1 by Th84; then 1 in Seg len r; then 1 in dom r by FINSEQ_1:def 3; then r.1 = F.(d1,d9) by A2,FUNCOP_1:27; hence thesis by A3,FINSEQ_1:40; end; theorem for F being Function of [:D,D9:],E for p being FinSequence of D st p = <*d1,d2*> holds F[:](p,d9) = <*F.(d1,d9),F.(d2,d9)*> proof let F be Function of [:D,D9:],E; let p be FinSequence of D such that A1: p = <*d1,d2*>; A2: p.2 = d2 by A1,FINSEQ_1:44; reconsider r = F[:](p,d9) as FinSequence of E by Th83; len p = 2 by A1,FINSEQ_1:44; then A3: len r = 2 by Th84; then 2 in Seg len r; then 2 in dom r by FINSEQ_1:def 3; then A4: r.2 = F.(d2,d9) by A2,FUNCOP_1:27; 1 in Seg len r by A3; then A5: 1 in dom r by FINSEQ_1:def 3; p.1 = d1 by A1,FINSEQ_1:44; then r.1 = F.(d1,d9) by A5,FUNCOP_1:27; hence thesis by A3,A4,FINSEQ_1:44; end; theorem for F being Function of [:D,D9:],E for p being FinSequence of D st p = <*d1,d2,d3*> holds F[:](p,d9) = <*F.(d1,d9),F.(d2,d9),F.(d3,d9)*> proof let F be Function of [:D,D9:],E; let p be FinSequence of D such that A1: p = <*d1,d2,d3*>; A2: p.2 = d2 by A1,FINSEQ_1:45; reconsider r = F[:](p,d9) as FinSequence of E by Th83; len p = 3 by A1,FINSEQ_1:45; then A3: len r = 3 by Th84; then 2 in Seg len r; then 2 in dom r by FINSEQ_1:def 3; then A4: r.2 = F.(d2,d9) by A2,FUNCOP_1:27; A5: p.3 = d3 by A1,FINSEQ_1:45; A6: p.1 = d1 by A1,FINSEQ_1:45; 3 in Seg len r by A3; then 3 in dom r by FINSEQ_1:def 3; then A7: r.3 = F.(d3,d9) by A5,FUNCOP_1:27; 1 in Seg len r by A3; then 1 in dom r by FINSEQ_1:def 3; then r.1 = F.(d1,d9) by A6,FUNCOP_1:27; hence thesis by A3,A4,A7,FINSEQ_1:45; end; definition let D be set; mode FinSequenceSet of D -> set means :Def3: a in it implies a is FinSequence of D; existence proof take D*; thus thesis by FINSEQ_1:def 11; end; end; definition let D be set, S be FinSequenceSet of D; redefine mode Element of S -> FinSequence of D; coherence proof per cases; suppose S is non empty; hence thesis by Def3; end; suppose S is empty; then S = <*>D; hence thesis by SUBSET_1:def 1; end; end; end; registration let D be set; cluster non empty for FinSequenceSet of D; existence proof {<*>D} is FinSequenceSet of D proof let a; thus thesis by TARSKI:def 1; end; hence thesis; end; end; theorem Th89: for D being set holds D* is FinSequenceSet of D proof let D be set; D* is FinSequenceSet of D proof let a; thus thesis by FINSEQ_1:def 11; end; hence thesis; end; definition let D be set; redefine func D* -> FinSequenceSet of D; coherence by Th89; end; theorem for D being set, D9 being FinSequenceSet of D holds D9 c= D* proof let D be set, D9 be FinSequenceSet of D; let a; assume a in D9; then a is FinSequence of D by Def3; hence thesis by FINSEQ_1:def 11; end; theorem for D9 being Subset of D, S being FinSequenceSet of D9 holds S is FinSequenceSet of D proof let D9 be Subset of D, S be FinSequenceSet of D9; S is FinSequenceSet of D proof let a; assume a in S; then reconsider p = a as FinSequence of D9 by Def3; rng p c= D9 by FINSEQ_1:def 4; then rng p c= D by XBOOLE_1:1; hence thesis by FINSEQ_1:def 4; end; hence thesis; end; reserve s for Element of D*; registration let i be Nat, D; cluster i-element for FinSequence of D; existence proof take i |-> the Element of D; thus thesis by Th63; end; end; definition let i be Nat, D be non empty set; mode Tuple of i,D is i-element FinSequence of D; end; definition let i be Nat; let D be set; func i-tuples_on D -> FinSequenceSet of D equals { s where s is Element of D*: len s = i }; coherence proof now let a; assume a in { s where s is Element of D*: len s = i }; then ex s being Element of D* st s = a & len s = i; hence a is FinSequence of D; end; hence thesis by Def3; end; end; registration let i be Nat, D; cluster i-tuples_on D -> non empty; coherence proof set d = the Element of D; i |-> d is FinSequence of D by Th63; then reconsider S = i |-> d as Element of D* by FINSEQ_1:def 11; len S = i by CARD_1:def 7; then S in { s : len s = i }; hence thesis; end; end; registration let D; let i be Nat; cluster -> i-element for Element of i-tuples_on D; coherence proof let z be Element of i-tuples_on D; z in { p9 where p9 is Element of D*: len p9 = i }; then ex p9 being Element of D* st p9 = z & len p9 = i; hence len z = i; end; end; theorem Th92: for D be set, z being FinSequence of D holds z is Element of ( len z)-tuples_on D proof let D be set, z be FinSequence of D; z is Element of D* by FINSEQ_1:def 11; then z in { z9 where z9 is Element of D*: len z9 = len z}; hence thesis; end; theorem for D being set holds i-tuples_on D = Funcs(Seg i,D) proof let D be set; now reconsider j=i as Element of NAT by ORDINAL1:def 12; let z be set; thus z in i-tuples_on D implies z in Funcs(Seg i,D) proof assume z in i-tuples_on D; then consider s being Element of D* such that A1: z = s and A2: len s = i; A3: rng s c= D by FINSEQ_1:def 4; dom s = Seg i by A2,FINSEQ_1:def 3; hence thesis by A1,A3,FUNCT_2:def 2; end; assume z in Funcs(Seg i,D); then consider p being Function such that A4: z = p and A5: dom p = Seg j and A6: rng p c= D by FUNCT_2:def 2; p is FinSequence by A5,FINSEQ_1:def 2; then p is FinSequence of D by A6,FINSEQ_1:def 4; then reconsider p as Element of D* by FINSEQ_1:def 11; len p = i by A5,FINSEQ_1:def 3; hence z in i-tuples_on D by A4; end; hence thesis by TARSKI:1; end; theorem for D being set holds 0-tuples_on D = { <*>D } proof let D be set; now let z be set; thus z in 0-tuples_on D implies z = <*>D proof assume z in 0-tuples_on D; then ex s being Element of D* st z = s & len s = 0; hence thesis; end; <*>D is Element of D* & len <*>D = 0 by FINSEQ_1:def 11; hence z = <*>D implies z in 0-tuples_on D; end; hence thesis by TARSKI:def 1; end; theorem for z being Tuple of 0,D for t being Tuple of i, D holds z^t = t & t^z = t by FINSEQ_1:34; theorem Th96: 1-tuples_on D = { <*d*>: not contradiction } proof now let x be set; thus x in 1-tuples_on D implies x in { <*d*>: not contradiction } proof assume x in 1-tuples_on D; then consider s such that A1: x = s and A2: len s = 1; 1 in Seg 1; then 1 in dom s by A2,FINSEQ_1:def 3; then reconsider d1 = s.1 as Element of D by Th11; s = <*d1*> by A2,FINSEQ_1:40; hence thesis by A1; end; assume x in { <*d*>: not contradiction }; then consider d such that A3: x = <*d*>; len <*d*> = 1 & <*d*> is Element of D* by FINSEQ_1:40,def 11; hence x in 1-tuples_on D by A3; end; hence thesis by TARSKI:1; end; Lm6: for z being Tuple of i,D holds z in i-tuples_on D proof let z be Tuple of i,D; A1: z is Element of D* by FINSEQ_1:def 11; len z = i by CARD_1:def 7; hence z in i-tuples_on D by A1; end; theorem Th97: for z being Tuple of 1,D ex d st z = <*d*> proof let z be Tuple of 1,D; z in 1-tuples_on D by Lm6; then z in { <*d*>: not contradiction } by Th96; hence thesis; end; theorem Th98: <*d*> in 1-tuples_on D proof <*d*> in { <*d1*>: not contradiction }; hence thesis by Th96; end; theorem Th99: 2-tuples_on D = { <*d1,d2*>: not contradiction } proof now let x be set; thus x in 2-tuples_on D implies x in { <*d1,d2*>: not contradiction } proof assume x in 2-tuples_on D; then consider s such that A1: x = s and A2: len s = 2; 2 in Seg 2; then A3: 2 in dom s by A2,FINSEQ_1:def 3; 1 in Seg 2; then 1 in dom s by A2,FINSEQ_1:def 3; then reconsider d19 = s.1, d29 = s.2 as Element of D by A3,Th11; s = <*d19,d29*> by A2,FINSEQ_1:44; hence thesis by A1; end; assume x in { <*d1,d2*>: not contradiction }; then consider d1,d2 such that A4: x = <*d1,d2*>; <*d1,d2*> is FinSequence of D by Th13; then len <*d1,d2*> = 2 & <*d1,d2*> is Element of D* by FINSEQ_1:44,def 11; hence x in 2-tuples_on D by A4; end; hence thesis by TARSKI:1; end; theorem for z being Tuple of 2,D ex d1,d2 st z = <*d1,d2*> proof let z be Tuple of 2,D; A1: z is Element of D* by FINSEQ_1:def 11; len z = 2 by CARD_1:def 7; then z in 2-tuples_on D by A1; then z in { <*d1,d2*>: not contradiction } by Th99; hence thesis; end; theorem Th101: <*d1,d2*> in 2-tuples_on D proof <*d1,d2*> in { <*c1,c2*> where c1 is (Element of D), c2 is Element of D: not contradiction }; hence thesis by Th99; end; theorem Th102: 3-tuples_on D = { <*d1,d2,d3*>: not contradiction } proof now let x be set; thus x in 3-tuples_on D implies x in { <*d1,d2,d3*>: not contradiction } proof assume x in 3-tuples_on D; then consider s such that A1: x = s and A2: len s = 3; 2 in Seg(3); then A3: 2 in dom s by A2,FINSEQ_1:def 3; 3 in Seg(3); then A4: 3 in dom s by A2,FINSEQ_1:def 3; 1 in Seg(3); then 1 in dom s by A2,FINSEQ_1:def 3; then reconsider d19 = s.1, d29 = s.2, d39 = s.3 as Element of D by A3,A4 ,Th11; s = <*d19,d29,d39*> by A2,FINSEQ_1:45; hence thesis by A1; end; assume x in { <*d1,d2,d3*>: not contradiction }; then consider d1,d2,d3 such that A5: x = <*d1,d2,d3*>; <*d1,d2,d3*> is FinSequence of D by Th14; then len <*d1,d2,d3*> = 3 & <*d1,d2,d3*> is Element of D* by FINSEQ_1:45 ,def 11; hence x in 3-tuples_on D by A5; end; hence thesis by TARSKI:1; end; theorem for z being Tuple of 3,D ex d1,d2,d3 st z = <*d1,d2,d3*> proof let z be Tuple of 3,D; A1: z is Element of D* by FINSEQ_1:def 11; len z = 3 by CARD_1:def 7; then z in 3-tuples_on D by A1; then z in { <*d1,d2,d3*>: not contradiction } by Th102; hence thesis; end; theorem Th104: <*d1,d2,d3*> in 3-tuples_on D proof <*d1,d2,d3*> in { <*c1,c2,c3*> where c1 is (Element of D),c2 is (Element of D),c3 is Element of D : not contradiction }; hence thesis by Th102; end; theorem Th105: (i+j)-tuples_on D = {z^t where z is Tuple of i,D, t is Tuple of j,D: not contradiction} proof set T = {z^t where z is Tuple of i,D, t is Tuple of j,D: not contradiction}; now let x be set; thus x in (i+j)-tuples_on D implies x in T proof assume x in (i+j)-tuples_on D; then consider s such that A1: x = s and A2: len s = i + j; consider z,t being FinSequence of D such that A3: len z = i & len t = j and A4: s = z^t by A2,Th23; z is Tuple of i,D & t is Tuple of j,D by A3,CARD_1:def 7; hence thesis by A1,A4; end; assume x in T; then consider z being Tuple of i,D, t being Tuple of j,D such that A5: x = z^t; len z = i & len t = j by CARD_1:def 7; then A6: len(z^t) = i+j by FINSEQ_1:22; z^t is Element of D* by FINSEQ_1:def 11; hence x in (i+j)-tuples_on D by A5,A6; end; hence thesis by TARSKI:1; end; theorem Th106: for s being Tuple of i+j,D ex z being Element of i-tuples_on D, t being Element of j-tuples_on D st s = z^t proof let s be Tuple of i+j,D; A1: s is Element of D* by FINSEQ_1:def 11; len s = i+j by CARD_1:def 7; then s in (i+j)-tuples_on D by A1; then s in {z^t where z is Tuple of i,D, t is Tuple of j,D:not contradiction} by Th105; then consider z being Tuple of i,D, t being Tuple of j,D such that A2: s = z^t; reconsider z as Element of i-tuples_on D by Lm6; reconsider t as Element of j-tuples_on D by Lm6; s = z^t by A2; hence thesis; end; theorem for z being Tuple of i,D for t being Tuple of j,D holds z^t is Tuple of i+j,D proof let z be Tuple of i,D; let t be Tuple of j,D; z^t in {z9^t9 where z9 is Tuple of i,D, t9 is Tuple of j,D: not contradiction}; then z^t in (i+j)-tuples_on D by Th105; hence thesis; end; theorem D* = union {i-tuples_on D where i is Element of NAT: not contradiction} proof a in D* iff a in union {i-tuples_on D where i is Element of NAT : not contradiction} proof thus a in D* implies a in union {i-tuples_on D where i is Element of NAT : not contradiction} proof assume a in D*; then reconsider a as FinSequence of D by FINSEQ_1:def 11; a is Element of (len a)-tuples_on D & (len a)-tuples_on D in {i -tuples_on D where i is Element of NAT : not contradiction} by Th92; hence thesis by TARSKI:def 4; end; assume a in union {i-tuples_on D where i is Element of NAT: not contradiction}; then consider Z being set such that A1: a in Z and A2: Z in {i-tuples_on D where i is Element of NAT: not contradiction} by TARSKI:def 4; consider i being Element of NAT such that A3: Z = i-tuples_on D by A2; ex s being Element of D* st s = a & len s = i by A1,A3; hence thesis; end; hence thesis by TARSKI:1; end; theorem for D9 being non empty Subset of D for z being Tuple of i,D9 holds z is Element of i-tuples_on D proof let D9 be non empty Subset of D; let z being Tuple of i,D9; z is Tuple of i, D by Th24; hence thesis by Lm6; end; Lm7: x in i-tuples_on A implies x is i-element FinSequence proof assume x in i-tuples_on A; then x in { s where s is Element of A*: len s = i }; then ex s being Element of A* st x = s & len s = i; hence thesis by CARD_1:def 7; end; theorem i-tuples_on D = j-tuples_on A implies i = j proof set f = i |-> the Element of D; f is Tuple of i,D by Th63; then A1: f in i-tuples_on D by Lm6; assume i-tuples_on D = j-tuples_on A; then f in j-tuples_on A by A1; then f is j-element by Lm7; then len f = j by CARD_1:def 7; hence thesis by CARD_1:def 7; end; theorem idseq i is Element of i-tuples_on NAT proof idseq i is FinSequence of NAT & len idseq i = i by Th48,CARD_1:def 7; hence thesis by Th92; end; theorem Th112: i |-> d is Element of i-tuples_on D proof i |-> d is FinSequence of D & len(i |-> d) = i by Th63,CARD_1:def 7; hence thesis by Lm6; end; theorem for z being Tuple of i,D for f being Function of D,D9 holds f*z is Element of i-tuples_on D9 proof let z be Tuple of i,D; let f be Function of D,D9; reconsider s = f*z as FinSequence of D9 by Th32; len z = i by CARD_1:def 7; then len s = i by Th33; hence thesis by Th92; end; theorem Th114: for z being Tuple of i,D for f being Function of Seg i,Seg i st rng f = Seg i holds z*f is Element of i-tuples_on D proof let z be Tuple of i,D; let f be Function of Seg i,Seg i; A1: len z = i by CARD_1:def 7; then A2: Seg i = dom z by FINSEQ_1:def 3; then reconsider t = z*f as FinSequence of D by Th47; assume rng f = Seg i; then len t = len z by A2,Th42; hence thesis by A1,Th92; end; theorem for z being Tuple of i,D for f being Permutation of Seg i holds z*f is Tuple of i,D proof let z be Tuple of i,D; let f be Permutation of Seg i; rng f = Seg i by FUNCT_2:def 3; hence thesis by Th114; end; theorem for z being Tuple of i,D for d holds (z^<*d*>).(i+1) = d proof let z be Tuple of i,D; let d; len z = i by CARD_1:def 7; hence thesis by FINSEQ_1:42; end; theorem for z being Tuple of i+1,D ex t being Element of i-tuples_on D, d st z = t^<*d*> proof let z be Tuple of i+1,D; consider t being Element of i-tuples_on D, s being Element of 1-tuples_on D such that A1: z = t^s by Th106; ex d st s = <*d*> by Th97; hence thesis by A1; end; theorem for z being Tuple of i,D holds z*(idseq i) = z proof let z be Tuple of i,D; len z = i by CARD_1:def 7; hence thesis by Th54; end; theorem for z1,z2 being Tuple of i,D st for j st j in Seg i holds z1.j = z2.j holds z1 = z2 proof let z1,z2 be Tuple of i,D; len z2 = i by CARD_1:def 7; then A1: dom z2 = Seg i by FINSEQ_1:def 3; len z1 = i by CARD_1:def 7; then dom z1 = Seg i by FINSEQ_1:def 3; hence thesis by A1,FINSEQ_1:13; end; theorem for F being Function of [:D,D9:],E for z1 being Tuple of i,D for z2 being Tuple of i,D9 holds F.:(z1,z2) is Element of i -tuples_on E proof let F be Function of [:D,D9:],E; let z1 be Tuple of i,D; let z2 be Tuple of i,D9; reconsider r = F.:(z1,z2) as FinSequence of E by Th70; len z1 = i & len z2 = i by CARD_1:def 7; then len r = i by Th72; hence thesis by Th92; end; theorem for F being Function of [:D,D9:],E for z being Tuple of i,D9 holds F[;](d,z) is Element of i-tuples_on E proof let F be Function of [:D,D9:],E; let z be Tuple of i,D9; reconsider r = F[;](d,z) as FinSequence of E by Th77; len z = i by CARD_1:def 7; then len r = i by Th78; hence thesis by Th92; end; theorem for F being Function of [:D,D9:],E for z being Tuple of i,D holds F[:](z,d9) is Element of i-tuples_on E proof let F be Function of [:D,D9:],E; let z be Tuple of i,D; reconsider r = F[:](z,d9) as FinSequence of E by Th83; len z = i by CARD_1:def 7; then len r = i by Th84; hence thesis by Th92; end; theorem (i+j)|->x = (i|->x)^(j|->x) proof defpred P[Nat] means (i+$1)|->x = (i|->x)^($1|->x); A1: for j st P[j] holds P[j+1] proof let j such that A2: (i+j)|->x = (i|->x)^(j|->x); thus (i+(j+1))|->x = (i+j+1)|->x .= ((i+j)|->x) ^ <*x*> by Th60 .= (i|->x)^((j|->x) ^ <*x*>) by A2,FINSEQ_1:32 .= (i|->x)^((j+1)|->x) by Th60; end; (i+0)|->x = (i|->x)^{} by FINSEQ_1:34 .= (i|->x)^(0|->x); then A3: P[0]; for j holds P[j] from NAT_1:sch 2(A3,A1); hence thesis; end; theorem for i, D for x being Tuple of i,D holds dom x = Seg i proof let i, D; let x be Tuple of i,D; len x = i by CARD_1:def 7; hence thesis by FINSEQ_1:def 3; end; theorem for f being Function, x, y being set st x in dom f & y in dom f holds f*<*x,y*> = <*f.x,f.y*> proof let f be Function; let x,y be set; assume that A1: x in dom f and A2: y in dom f; reconsider D = dom f, E = rng f as non empty set by A1,FUNCT_1:3; rng <*x,y*> = {x,y} by Lm1; then rng <*x,y*> c= D by A1,A2,ZFMISC_1:32; then reconsider p = <*x,y*> as FinSequence of D by FINSEQ_1:def 4; reconsider g = f as Function of D,E by FUNCT_2:def 1,RELSET_1:4; thus f*<*x,y*> = g*p .= <*f.x,f.y*> by Th36; end; theorem for f being Function, x, y, z being set st x in dom f & y in dom f & z in dom f holds f*<*x,y,z*> = <*f.x,f.y,f.z*> proof let f be Function; let x,y,z be set; assume that A1: x in dom f and A2: y in dom f & z in dom f; reconsider D = dom f, E = rng f as non empty set by A1,FUNCT_1:3; rng <*x,y,z*> = {x,y,z} by Lm2; then A3: rng <*x,y,z*> = {x,y} \/ {z} by ENUMSET1:3; {x,y} c= D & {z} c= D by A1,A2,ZFMISC_1:31,32; then rng <*x,y,z*> c= D by A3,XBOOLE_1:8; then reconsider p = <*x,y,z*> as FinSequence of D by FINSEQ_1:def 4; reconsider g = f as Function of D,E by FUNCT_2:def 1,RELSET_1:4; thus f*<*x,y,z*> = g*p .= <*f.x,f.y,f.z*> by Th37; end; theorem rng <*x1,x2*> = {x1,x2} by Lm1; theorem rng <*x1,x2,x3*> = {x1,x2,x3} by Lm2; begin theorem for p1,p2,q being FinSequence st p1 c= q & p2 c= q & len p1 = len p2 holds p1 = p2 proof let p1,p2,q be FinSequence; assume that A1: p1 c= q and A2: p2 c= q and A3: len p1 = len p2; reconsider i = len p1 as Element of NAT; A4: dom p1 = Seg i & dom p2 = Seg i by A3,FINSEQ_1:def 3; now let j; assume A5: j in dom p1; hence p1.j = q.j by A1,GRFUNC_1:2 .= p2.j by A2,A4,A5,GRFUNC_1:2; end; hence thesis by A4,FINSEQ_1:13; end; reserve m,n for Nat, s,w for FinSequence of NAT; theorem for D being non empty set, s being FinSequence of D st s <> {} ex w being FinSequence of D, n being Element of D st s = <*n*>^w proof let D be non empty set, s be FinSequence of D; defpred P[FinSequence of D] means $1 <> {} implies ex w being FinSequence of D, n being Element of D st $1 = <*n*>^w; A1: for s being FinSequence of D for m being Element of D st P[s] holds P[s^<*m*>] proof let s be FinSequence of D; let m be Element of D such that A2: s <> {} implies ex w being FinSequence of D, n be Element of D st s = <*n*>^w; assume s^<*m*> <> {}; per cases; suppose A3: s = {}; reconsider w = <*> D as FinSequence of D; take w, n = m; thus s^<*m*> = <*m*> by A3,FINSEQ_1:34 .= <*n*>^w by FINSEQ_1:34; end; suppose s <> {}; then consider w be FinSequence of D, n be Element of D such that A4: s = <*n*>^w by A2; take w^<*m*>,n; thus thesis by A4,FINSEQ_1:32; end; end; A5: P[<*> D]; for p being FinSequence of D holds P[p] from IndSeqD(A5,A1); hence thesis; end; registration let D be set; cluster -> functional for FinSequenceSet of D; coherence proof let f be FinSequenceSet of D; let x be set; thus thesis by Def3; end; end; definition let D,n,d; redefine func n |-> d -> Element of n-tuples_on D; coherence by Th112; end; theorem for z being set holds z is Tuple of i,D iff z in i-tuples_on D proof let z be set; thus z is Tuple of i,D implies z in i-tuples_on D by Lm6; assume z in i-tuples_on D; then ex s being Element of D* st z = s & len s = i; hence z is Tuple of i,D by CARD_1:def 7; end; theorem Th132: for A being set, i being (Element of NAT), p being FinSequence holds p in i-tuples_on A iff len p = i & rng p c= A proof let A be set, i be (Element of NAT), p be FinSequence; hereby assume p in i-tuples_on A; then ex q being Element of A* st p = q & len q = i; hence len p = i & rng p c= A by FINSEQ_1:def 4; end; assume A1: len p = i; assume rng p c= A; then p is FinSequence of A by FINSEQ_1:def 4; then p in A* by FINSEQ_1:def 11; hence thesis by A1; end; theorem for A being set, i being (Element of NAT), p being FinSequence of A holds p in i-tuples_on A iff len p = i proof let A be set, i be (Element of NAT), p be FinSequence of A; rng p c= A by RELAT_1:def 19; hence thesis by Th132; end; theorem for A being set, i being Element of NAT holds i-tuples_on A c= A* proof let A be set, i be (Element of NAT), x be set; assume x in i-tuples_on A; then x is FinSequence of A by Def3; hence thesis by FINSEQ_1:def 11; end; theorem Th135: for A,x being set holds x in 1-tuples_on A iff ex a being set st a in A & x = <*a*> proof let A,x be set; hereby assume x in 1-tuples_on A; then x in {s where s is Element of A*: len s = 1}; then consider s being Element of A* such that A1: x = s and A2: len s = 1; take a = s.1; A3: rng <*a*> = {a} & a in {a} by FINSEQ_1:39,TARSKI:def 1; A4: rng s c= A by RELAT_1:def 19; x = <*a*> by A1,A2,FINSEQ_1:40; hence a in A & x = <*a*> by A1,A3,A4; end; given a being set such that A5: a in A and A6: x = <*a*>; reconsider A as non empty set by A5; reconsider a as Element of A by A5; <*a*> is Element of 1-tuples_on A by Th98; hence thesis by A6; end; theorem for A,a being set st <*a*> in 1-tuples_on A holds a in A proof let A,a be set; assume <*a*> in 1-tuples_on A; then A1: ex a9 being set st a9 in A & <*a*> = <*a9*> by Th135; <*a*>.1 = a by FINSEQ_1:40; hence thesis by A1,FINSEQ_1:40; end; theorem Th137: for A,x being set holds x in 2-tuples_on A iff ex a,b being set st a in A & b in A & x = <*a,b*> proof let A,x be set; hereby assume x in 2-tuples_on A; then x in {s where s is Element of A*: len s = 2}; then consider s being Element of A* such that A1: x = s and A2: len s = 2; take a = s.1, b = s.2; A3: rng <*a,b*> = {a,b} & a in {a,b} by Lm1,TARSKI:def 2; A4: b in {a,b} & rng s c= A by RELAT_1:def 19,TARSKI:def 2; x = <*a,b*> by A1,A2,FINSEQ_1:44; hence a in A & b in A & x = <*a,b*> by A1,A3,A4; end; given a,b being set such that A5: a in A and A6: b in A and A7: x = <*a,b*>; reconsider A as non empty set by A5; reconsider a,b as Element of A by A5,A6; <*a,b*> is Element of 2-tuples_on A by Th101; hence thesis by A7; end; theorem for A,a,b being set st <*a,b*> in 2-tuples_on A holds a in A & b in A proof let A,a,b be set; assume <*a,b*> in 2-tuples_on A; then A1: ex a9,b9 being set st a9 in A & b9 in A & <*a,b*> = <*a9,b9*> by Th137; <*a,b*>.1 = a & <*a,b*>.2 = b by FINSEQ_1:44; hence thesis by A1,FINSEQ_1:44; end; theorem Th139: for A,x being set holds x in 3-tuples_on A iff ex a,b,c being set st a in A & b in A & c in A & x = <*a,b,c*> proof let A,x be set; hereby assume x in 3-tuples_on A; then x in {s where s is Element of A*: len s = 3}; then consider s being Element of A* such that A1: x = s and A2: len s = 3; take a = s.1, b = s.2, c = s.3; A3: rng <*a,b,c*> = {a,b,c} & a in {a,b,c} by Lm2,ENUMSET1:def 1; A4: rng s c= A by RELAT_1:def 19; A5: b in {a,b,c} & c in {a,b,c} by ENUMSET1:def 1; x = <*a,b,c*> by A1,A2,FINSEQ_1:45; hence a in A & b in A & c in A & x = <*a,b,c*> by A1,A3,A5,A4; end; given a,b,c being set such that A6: a in A and A7: b in A & c in A and A8: x = <*a,b,c*>; reconsider A as non empty set by A6; reconsider a,b,c as Element of A by A6,A7; <*a,b,c*> is Element of 3-tuples_on A by Th104; hence thesis by A8; end; theorem for A,a,b,c being set st <*a,b,c*> in 3-tuples_on A holds a in A & b in A & c in A proof let A,a,b,c be set; A1: <*a,b,c*>.3 = c by FINSEQ_1:45; assume <*a,b,c*> in 3-tuples_on A; then A2: ex a9,b9,c9 being set st a9 in A & b9 in A & c9 in A & <*a,b,c*> = <*a9, b9,c9*> by Th139; <*a,b,c*>.1 = a & <*a,b,c*>.2 = b by FINSEQ_1:45; hence thesis by A2,A1,FINSEQ_1:45; end; theorem x in i-tuples_on A implies x is i-element FinSequence by Lm7; theorem for A being non empty set, n holds n-tuples_on A c= A* proof let A be non empty set, n; defpred P[Element of A*] means len $1 = n; { s where s is Element of A*: P[s] } c= A* from FRAENKEL:sch 10; hence thesis; end; theorem n |-> x = m |-> x implies n = m proof len(n |-> x) = n by CARD_1:def 7; hence thesis by CARD_1:def 7; end; reserve i,j,e,u for set, n for Element of NAT; definition let I be set; let M be ManySortedSet of I; func M# -> ManySortedSet of I* means :Def5: for i being Element of I* holds it.i = product(M*i); existence proof defpred P[set,set] means ex j being Element of I* st j = $1 & $2 = product (M*j); A1: for i st i in I* ex j st P[i,j] proof let i; assume i in I*; then reconsider j = i as Element of I*; reconsider e = product(M*j) as set; take e,j; thus thesis; end; consider f being ManySortedSet of I* such that A2: for i st i in I* holds P[i,f.i] from PBOOLE:sch 3(A1); take f; let i be Element of I*; ex j being Element of I* st j = i & f.i = product(M*j) by A2; hence thesis; end; uniqueness proof let N1,N2 be ManySortedSet of I* such that A3: for i being Element of I* holds N1.i = product(M*i) and A4: for i being Element of I* holds N2.i = product(M*i); now let i; assume i in I*; then reconsider e = i as Element of I*; thus N1.i = product(M*e) by A3 .= N2.i by A4; end; hence thesis by PBOOLE:3; end; end; registration let I be set; let M be non-empty ManySortedSet of I; cluster M# -> non-empty; coherence proof M# is non-empty proof let i; assume i in I*; then reconsider f = i as Element of I*; product(M*f) <> {}; hence thesis by Def5; end; hence thesis; end; end; definition let a be set; func *-->a -> Function of NAT,{a}* means :Def6: for n being Element of NAT holds it.n = n |-> a; existence proof defpred P[Element of NAT,set] means $2 = $1 |-> a; A1: for x being Element of NAT ex y being Element of {a}* st P[x,y] proof let n be Element of NAT; a is Element of {a} by TARSKI:def 1; then n |-> a is FinSequence of {a} by Th63; then reconsider u = n |-> a as Element of {a}* by FINSEQ_1:def 11; take u; thus thesis; end; ex f being Function of NAT, {a}* st for x being Element of NAT holds P [x,f.x] from FUNCT_2:sch 3(A1); hence thesis; end; uniqueness proof let f1,f2 be Function of NAT,{a}* such that A2: for n being Element of NAT holds f1.n = n |-> a and A3: for n being Element of NAT holds f2.n = n |-> a; now let k be Element of NAT; thus f1.k = k |-> a by A2 .= f2.k by A3; end; hence f1 = f2 by FUNCT_2:63; end; end; theorem Th144: for a,b being set holds (a .--> b)*(n|->a) = n |-> b proof let a,b be set; A1: now let x be set; hereby assume x in dom (n |-> b); then A2: x in Seg n by FUNCOP_1:13; hence x in dom(n|->a) by FUNCOP_1:13; dom(a .--> b) = {a} & (n|->a).x = a by A2,FUNCOP_1:7,13; hence (n|->a).x in dom(a .--> b) by TARSKI:def 1; end; assume that A3: x in dom(n|->a) and (n|->a).x in dom(a .--> b); x in Seg n by A3,FUNCOP_1:13; hence x in dom (n |-> b) by FUNCOP_1:13; end; now let x be set; A4: a in {a} by TARSKI:def 1; assume x in dom (n |-> b); then A5: x in Seg n by FUNCOP_1:13; hence (n |-> b).x = b by FUNCOP_1:7 .= (a .--> b).a by A4,FUNCOP_1:7 .= (a .--> b).((n|->a).x) by A5,FUNCOP_1:7; end; hence thesis by A1,FUNCT_1:10; end; theorem for a being set for M being ManySortedSet of {a} st M = a .--> D holds (M#* *-->a).n = Funcs(Seg n, D) proof let a be set; let M be ManySortedSet of {a} such that A1: M = a .--> D; a is Element of {a} by TARSKI:def 1; then n |-> a is FinSequence of {a} by Th63; then A2: n |-> a in {a}* by FINSEQ_1:def 11; dom(*-->a) = NAT by FUNCT_2:def 1; hence (M#* *-->a).n = M#.((*-->a).n) by FUNCT_1:13 .= M#.(n|->a) by Def6 .= product((a .--> D)*(n|->a)) by A1,A2,Def5 .= product(n |-> D) by Th144 .= Funcs(Seg n, D) by CARD_3:11; end; theorem for F being total NAT-defined Function, p be NAT-defined Function, n be Element of NAT st Shift(p,n) c= F for i being Element of NAT st i in dom p holds F.(n+i) = p.i proof let F be total NAT-defined Function, p be NAT-defined Function, n be Element of NAT such that A1: Shift(p,n) c= F; let i be Element of NAT; assume A2: i in dom p; then n+i in dom Shift(p,n) by VALUED_1:24; hence F.(n+i) = Shift(p,n).(n+i) by A1,GRFUNC_1:2 .= p.i by A2,VALUED_1:def 12; end; registration let i be Nat; cluster i |-> 0 -> empty-yielding; coherence proof let x; dom (i|->0) = Seg i by FUNCOP_1:13; hence thesis by Th57; end; end; registration let D be set; cluster -> FinSequence-membered for FinSequenceSet of D; coherence proof let A be FinSequenceSet of D; let x be set; thus thesis by Def3; end; end; begin reserve f for Function; reserve n,k,n1 for Element of NAT; reserve r,p for real number; reserve x,y,z for set; definition mode Real_Sequence is sequence of REAL; end; reserve seq,seq1,seq2,seq3,seq9,seq19 for Real_Sequence; theorem Th1: f is Real_Sequence iff (dom f=NAT & for x st x in NAT holds f.x is real) proof thus f is Real_Sequence implies (dom f=NAT & for x st x in NAT holds f.x is real) by FUNCT_2:def 1; assume that A1: dom f= NAT and A2: for x st x in NAT holds f.x is real; now let y; assume y in rng f; then consider x such that A3: x in dom f and A4: y=f.x by FUNCT_1:def 3; f.x is real by A1,A2,A3; hence y in REAL by A4,XREAL_0:def 1; end; then rng f c=REAL by TARSKI:def 3; hence thesis by A1,FUNCT_2:def 1,RELSET_1:4; end; theorem Th2: f is Real_Sequence iff (dom f=NAT & for n holds f.n is real) proof thus f is Real_Sequence implies (dom f=NAT & for n holds f.n is real) by Th1; assume that A1: dom f=NAT and A2: for n holds f.n is real; for x holds x in NAT implies f.x is real by A2; hence thesis by A1,Th1; end; definition let f be real-valued Function, x be set; redefine func f.x -> Real; coherence by XREAL_0:def 1; end; registration cluster non-zero for PartFunc of NAT,REAL; existence proof reconsider p = NAT --> 1 as PartFunc of NAT,REAL by FUNCOP_1:46; take p; rng p = {1} by FUNCOP_1:8; hence not 0 in rng p by TARSKI:def 1; end; end; theorem for f being non-zero PartFunc of NAT,REAL holds rng f c= REAL \ {0} proof let f be non-zero PartFunc of NAT,REAL; not {} in rng f by RELAT_1:def 9; hence thesis by ZFMISC_1:34; end; theorem Th4: seq is non-zero iff for x st x in NAT holds seq.x<>0 proof thus seq is non-zero implies for x st x in NAT holds seq.x<>0 proof assume A1: seq is non-zero; let x; assume x in NAT; then x in dom seq by Th2; then seq.x in rng seq by FUNCT_1:def 3; hence thesis by A1,RELAT_1:def 9; end; assume A2: for x st x in NAT holds seq.x<>0; assume 0 in rng seq; then ex x st x in dom seq & seq.x=0 by FUNCT_1:def 3; hence contradiction by A2; end; theorem Th5: seq is non-zero iff for n holds seq.n<>0 proof thus seq is non-zero implies for n holds seq.n<>0 by Th4; assume for n holds seq.n<>0; then for x holds x in NAT implies seq.x<>0; hence thesis by Th4; end; theorem for r ex seq st rng seq={r} proof let r; consider f such that A1: dom f=NAT and A2: rng f={r} by FUNCT_1:5; for x st x in {r} holds x in REAL by XREAL_0:def 1; then rng f c= REAL by A2,TARSKI:def 3; then reconsider f as Real_Sequence by A1,FUNCT_2:def 1,RELSET_1:4; take f; thus thesis by A2; end; scheme ExRealSeq{F(set)->real number}: ex seq st for n holds seq.n=F(n) proof defpred P[set,set] means ex n st n=$1 & $2=F(n); A1: now let x; assume x in NAT; then consider n such that A2: n=x; reconsider r2=F(n) as set; take y=r2; thus P[x,y] by A2; end; consider f such that A3: dom f=NAT and A4: for x st x in NAT holds P[x,f.x] from CLASSES1:sch 1(A1); now let x; assume x in NAT; then ex n st n=x & f.x=F(n) by A4; hence f.x is real; end; then reconsider f as Real_Sequence by A3,Th1; take seq=f; let n; ex k st k=n & seq.n=F(k) by A4; hence thesis; end; scheme PartFuncExD9{D,C()->non empty set, P[set,set]}: ex f being PartFunc of D(),C () st (for d be Element of D() holds d in dom f iff (ex c be Element of C() st P[d,c])) & for d be Element of D() st d in dom f holds P[d,f.d] proof defpred X[set] means ex c be Element of C() st P[$1,c]; set x = the Element of C(); defpred X[Element of D(),Element of C()] means ((ex c be Element of C() st P [$1,c]) implies P[$1,$2]) & ((for c be Element of C() holds not P[$1,c]) implies $2=x); consider X be set such that A1: for x holds x in X iff x in D() & X[x] from XBOOLE_0:sch 1; for x holds x in X implies x in D() by A1; then reconsider X as Subset of D() by TARSKI:def 3; A2: for d be Element of D() ex z be Element of C() st X[d,z] proof let d be Element of D(); (for c be Element of C() holds not P[d,c]) implies ex z st ((ex c be Element of C() st P[d,c]) implies P[d,z]) & ((for c be Element of C() holds not P[d,c]) implies z=x); hence thesis; end; consider g being Function of D(),C() such that A3: for d be Element of D() holds X[d,g.d] from FUNCT_2:sch 3(A2); reconsider f=g|X as PartFunc of D(),C(); take f; A4: dom g = D() by FUNCT_2:def 1; thus for d be Element of D() holds d in dom f iff ex c be Element of C() st P[d,c] proof let d be Element of D(); dom f c= X by RELAT_1:58; hence d in dom f implies ex c be Element of C() st P[d,c] by A1; assume ex c be Element of C() st P[d,c]; then d in X by A1; then d in dom g /\ X by A4,XBOOLE_0:def 4; hence thesis by RELAT_1:61; end; let d be Element of D(); assume A5: d in dom f; dom f c= X by RELAT_1:58; then ex c be Element of C() st P[d,c] by A1,A5; then P[d,g.d] by A3; hence thesis by A5,FUNCT_1:47; end; scheme LambdaPFD9{D,C()->non empty set, F(set)->Element of C(), P[set]}: ex f being PartFunc of D(),C() st (for d be Element of D() holds d in dom f iff P[d]) & for d be Element of D() st d in dom f holds f.d = F(d) proof defpred X[Element of D(),set] means P[$1] & $2 = F($1); consider f being PartFunc of D(),C() such that A1: for d be Element of D() holds d in dom f iff ex c be Element of C() st X[d,c] and A2: for d be Element of D() st d in dom f holds X[d,f.d] from PartFuncExD9; take f; thus for d be Element of D() holds d in dom f iff P[d] proof let d be Element of D(); thus d in dom f implies P[d] proof assume d in dom f; then ex c be Element of C() st P[d] & c = F(d) by A1; hence thesis; end; assume P[d]; then ex c be Element of C() st P[d] & c = F(d); hence thesis by A1; end; thus thesis by A2; end; scheme UnPartFuncD9{C,D,X() -> set, F(set)->set}: for f,g being PartFunc of C(),D() st (dom f=X() & for c be Element of C() st c in dom f holds f.c = F(c)) & (dom g=X() & for c be Element of C() st c in dom g holds g.c = F(c)) holds f = g proof let f,g be PartFunc of C(),D(); assume that A1: dom f=X() and A2: for c be Element of C() st c in dom f holds f.c = F(c) and A3: dom g=X() and A4: for c be Element of C() st c in dom g holds g.c = F(c); now let c be Element of C(); assume A5: c in dom f; hence f.c = F(c) by A2 .= g.c by A1,A3,A4,A5; end; hence thesis by A1,A3,PARTFUN1:5; end; theorem Th7: seq = seq1 + seq2 iff for n holds seq.n =seq1.n + seq2.n proof thus seq = seq1 + seq2 implies for n holds seq.n =seq1.n + seq2.n proof assume A1: seq = seq1 + seq2; let n; dom seq = NAT by FUNCT_2:def 1; hence thesis by A1,VALUED_1:def 1; end; assume for n holds seq.n =seq1.n + seq2.n; then A2: for n being set st n in dom seq holds seq.n = seq1.n + seq2.n; dom seq = NAT /\ NAT by FUNCT_2:def 1 .= NAT /\ dom seq2 by FUNCT_2:def 1 .= dom seq1 /\ dom seq2 by FUNCT_2:def 1; hence thesis by A2,VALUED_1:def 1; end; theorem Th8: seq = seq1 (#) seq2 iff for n holds seq.n =seq1.n * seq2.n proof thus seq = seq1 (#) seq2 implies for n holds seq.n =seq1.n * seq2.n proof assume A1: seq = seq1 (#) seq2; let n; dom seq = NAT by FUNCT_2:def 1; hence thesis by A1,VALUED_1:def 4; end; assume for n holds seq.n =seq1.n * seq2.n; then A2: for n being set st n in dom seq holds seq.n = seq1.n * seq2.n; dom seq = NAT /\ NAT by FUNCT_2:def 1 .= NAT /\ dom seq2 by FUNCT_2:def 1 .= dom seq1 /\ dom seq2 by FUNCT_2:def 1; hence thesis by A2,VALUED_1:def 4; end; theorem Th9: seq1 = r(#)seq2 iff for n holds seq1.n=r*seq2.n proof thus seq1 = r(#)seq2 implies for n holds seq1.n=r*seq2.n by VALUED_1:6; assume for n holds seq1.n=r*seq2.n; then A1: for n being set st n in dom seq1 holds seq1.n = r * seq2.n; dom seq1 = NAT by FUNCT_2:def 1 .= dom seq2 by FUNCT_2:def 1; hence thesis by A1,VALUED_1:def 5; end; theorem seq1 = -seq2 iff for n holds seq1.n= -seq2.n proof thus seq1 = -seq2 implies for n holds seq1.n=-seq2.n by VALUED_1:8; assume for n holds seq1.n= -seq2.n; then A1: for n being set st n in dom seq1 holds seq1.n = - seq2.n; dom seq1 = NAT by FUNCT_2:def 1 .= dom seq2 by FUNCT_2:def 1; hence thesis by A1,VALUED_1:9; end; theorem seq1 - seq2 = seq1 +- seq2; theorem Th12: seq1 = abs seq iff for n holds seq1.n= abs(seq.n) proof thus seq1 = abs seq implies for n holds seq1.n=abs(seq.n) by VALUED_1:18; assume for n holds seq1.n= abs(seq.n); then A1: for n being set st n in dom seq1 holds seq1.n = abs(seq.n); dom seq1 = NAT by FUNCT_2:def 1 .= dom seq by FUNCT_2:def 1; hence thesis by A1,VALUED_1:def 11; end; theorem Th13: (seq1 + seq2) + seq3 = seq1 + (seq2 + seq3) proof now let n; thus ((seq1+seq2)+seq3).n=(seq1+seq2).n+ seq3.n by Th7 .=seq1.n+seq2.n+seq3.n by Th7 .=seq1.n+(seq2.n+seq3.n) .=seq1.n+(seq2+seq3).n by Th7 .=(seq1+(seq2+seq3)).n by Th7; end; hence thesis by FUNCT_2:63; end; theorem Th14: (seq1 (#) seq2) (#) seq3 = seq1 (#) (seq2 (#) seq3) proof now let n; thus ((seq1(#)seq2)(#)seq3).n=(seq1(#)seq2).n*seq3.n by Th8 .=seq1.n*seq2.n*seq3.n by Th8 .=seq1.n*(seq2.n*seq3.n) .=seq1.n*(seq2(#)seq3).n by Th8 .=(seq1(#)(seq2(#)seq3)).n by Th8; end; hence thesis by FUNCT_2:63; end; theorem Th15: (seq1 + seq2) (#) seq3 = seq1 (#) seq3 + seq2 (#) seq3 proof now let n; thus ((seq1+seq2)(#)seq3).n=(seq1+seq2).n*seq3.n by Th8 .=(seq1.n+seq2.n)*seq3.n by Th7 .=seq1.n*seq3.n+seq2.n*seq3.n .=(seq1(#)seq3).n+seq2.n*seq3.n by Th8 .=(seq1(#)seq3).n+(seq2(#)seq3).n by Th8 .=((seq1(#)seq3)+(seq2(#)seq3)).n by Th7; end; hence thesis by FUNCT_2:63; end; theorem seq3 (#) (seq1 + seq2) = seq3 (#) seq1 + seq3 (#) seq2 by Th15; theorem -seq = (-1) (#) seq; theorem Th18: r(#)(seq1(#)seq2)=r(#)seq1(#)seq2 proof now let n; thus (r(#)(seq1(#)seq2)).n=r*(seq1(#)seq2).n by Th9 .=r*(seq1.n*seq2.n) by Th8 .=(r*seq1.n)*seq2.n .=(r(#)seq1).n*seq2.n by Th9 .=(r(#)seq1 (#) seq2).n by Th8; end; hence thesis by FUNCT_2:63; end; theorem Th19: r (#) (seq1 (#) seq2) = seq1 (#) (r (#) seq2) proof now let n; thus (r(#)(seq1(#)seq2)).n=r*(seq1(#)seq2).n by Th9 .=r*(seq1.n*seq2.n) by Th8 .=seq1.n*(r*seq2.n) .=seq1.n*(r(#)seq2).n by Th9 .=(seq1(#)(r(#)seq2)).n by Th8; end; hence thesis by FUNCT_2:63; end; theorem Th20: (seq1 - seq2) (#) seq3 = seq1 (#) seq3 - seq2 (#) seq3 proof thus (seq1-seq2)(#)seq3=seq1(#)seq3+(-seq2)(#)seq3 by Th15 .=seq1(#)seq3-seq2(#)seq3 by Th18; end; theorem seq3(#)seq1-seq3(#)seq2=seq3(#)(seq1-seq2) by Th20; theorem Th22: r(#)(seq1+seq2)=r(#)seq1+r(#)seq2 proof now let n; thus (r(#)(seq1 + seq2)).n=r*(seq1+seq2).n by Th9 .=r*(seq1.n+seq2.n) by Th7 .=r*seq1.n+r*seq2.n .=(r(#)seq1).n+r*seq2.n by Th9 .=(r(#)seq1).n+(r(#)seq2).n by Th9 .=((r(#)seq1)+(r(#)seq2)).n by Th7; end; hence thesis by FUNCT_2:63; end; theorem Th23: (r*p)(#)seq=r(#)(p(#)seq) proof now let n; thus ((r*p)(#)seq).n=(r*p)*seq.n by Th9 .=r*(p*seq.n) .=r*(p(#)seq).n by Th9 .=(r(#)(p(#)seq)).n by Th9; end; hence thesis by FUNCT_2:63; end; theorem Th24: r(#)(seq1-seq2)=r(#)seq1-r(#)seq2 proof thus r(#)(seq1-seq2)=r(#)seq1+r(#)(-seq2) by Th22 .=r(#)seq1+((-1)*r)(#)seq2 by Th23 .=r(#)seq1-(r(#)seq2) by Th23; end; theorem r(#)(seq1/"seq)=(r(#)seq1)/"seq proof thus r(#)(seq1/"seq)= r(#)(seq1(#)(seq")) .= (r(#)seq1)/"seq by Th18; end; theorem seq1-(seq2+seq3)=seq1-seq2-seq3 proof thus seq1-(seq2+seq3)=seq1+(-seq2+(-1)(#)seq3) by Th22 .=seq1-seq2-seq3 by Th13; end; theorem 1(#)seq=seq proof now let n; thus (1(#)seq).n=1*seq.n by Th9 .=seq.n; end; hence thesis by FUNCT_2:63; end; canceled; theorem seq1 - (-seq2) = seq1 + seq2; theorem seq1-(seq2-seq3)=seq1-seq2+seq3 proof thus seq1-(seq2-seq3)=seq1+(-seq2-(-seq3)) by Th24 .=seq1-seq2+seq3 by Th13; end; theorem seq1+(seq2-seq3)=seq1+seq2-seq3 proof thus seq1+(seq2-seq3)=seq1+seq2+-seq3 by Th13 .=seq1+seq2-seq3; end; theorem (-seq1)(#)seq2=-(seq1(#)seq2) & seq1(#)(-seq2)=-(seq1(#)seq2) by Th18; theorem Th33: seq is non-zero implies seq" is non-zero proof assume that A1: seq is non-zero and A2: not seq" is non-zero; consider n1 such that A3: (seq").n1=0 by A2,Th5; (seq.n1)"=(seq").n1 by VALUED_1:10; hence contradiction by A1,A3,Th5,XCMPLX_1:202; end; canceled; theorem Th35: seq is non-zero & seq1 is non-zero iff seq(#)seq1 is non-zero proof thus seq is non-zero & seq1 is non-zero implies seq(#)seq1 is non-zero proof assume A1: seq is non-zero & seq1 is non-zero; now let n; A2: (seq(#)seq1).n=(seq.n)*(seq1.n) by Th8; seq.n<>0 & seq1.n<>0 by A1,Th5; hence (seq(#)seq1).n<>0 by A2,XCMPLX_1:6; end; hence thesis by Th5; end; assume A3: seq(#)seq1 is non-zero; now let n; (seq(#)seq1).n=(seq.n)*(seq1.n) by Th8; hence seq.n<>0 by A3,Th5; end; hence seq is non-zero by Th5; now let n; (seq(#)seq1).n=(seq.n)*(seq1.n) by Th8; hence seq1.n<>0 by A3,Th5; end; hence thesis by Th5; end; theorem Th36: seq"(#)seq1"=(seq(#)seq1)" proof now let n; thus ((seq")(#)(seq1")).n=((seq").n)*((seq1").n) by Th8 .=((seq").n)*(seq1.n)" by VALUED_1:10 .=(seq.n)"*(seq1.n)" by VALUED_1:10 .=((seq.n)*(seq1.n))" by XCMPLX_1:204 .=((seq(#)seq1).n)" by Th8 .=((seq(#)seq1)").n by VALUED_1:10; end; hence thesis by FUNCT_2:63; end; theorem seq is non-zero implies (seq1/"seq)(#)seq=seq1 proof assume A1: seq is non-zero; now let n; A2: seq.n<>0 by A1,Th5; thus ((seq1/"seq)(#)seq).n=((seq1(#)seq").n)*seq.n by Th8 .=(seq1.n)*(seq".n)*seq.n by Th8 .=(seq1.n)*(seq.n)"*seq.n by VALUED_1:10 .=(seq1.n)*((seq.n)"*seq.n) .=(seq1.n)*1 by A2,XCMPLX_0:def 7 .=seq1.n; end; hence thesis by FUNCT_2:63; end; theorem (seq9/"seq)(#)(seq19/"seq1)=(seq9(#)seq19)/"(seq(#)seq1) proof now let n; thus ((seq9/"seq)(#)(seq19/"seq1)).n=((seq9(#)seq").n)*(seq19/"seq1).n by Th8 .=(seq9.n)*(seq".n)*(seq19(#)seq1").n by Th8 .=(seq9.n)*(seq".n)*((seq19.n)*seq1".n) by Th8 .=(seq9.n)*((seq19.n)*((seq".n)*seq1".n)) .=(seq9.n)*((seq19.n)*((seq"(#)seq1").n)) by Th8 .=(seq9.n)*(seq19.n)*((seq"(#)seq1").n) .=(seq9.n)*(seq19.n)*((seq(#)seq1)".n) by Th36 .=((seq9(#)seq19).n)*(seq(#)seq1)".n by Th8 .=((seq9(#)seq19)/"(seq(#)seq1)).n by Th8; end; hence thesis by FUNCT_2:63; end; theorem seq is non-zero & seq1 is non-zero implies seq/"seq1 is non-zero proof assume that A1: seq is non-zero and A2: seq1 is non-zero; seq1" is non-zero by A2,Th33; hence thesis by A1,Th35; end; theorem Th40: (seq/"seq1)"=seq1/"seq proof now let n; thus (seq/"seq1)".n=(seq"(#)seq1"").n by Th36 .=(seq1/"seq).n; end; hence thesis by FUNCT_2:63; end; theorem seq2(#)(seq1/"seq)=(seq2(#)seq1)/"seq proof thus seq2(#)(seq1/"seq) = seq2(#)(seq1(#)(seq")) .=(seq2(#)seq1)/"seq by Th14; end; theorem seq2/"(seq/"seq1)=(seq2(#)seq1)/"seq proof thus seq2/"(seq/"seq1) = seq2(#)(seq1/"seq) by Th40 .= seq2(#)(seq1(#)(seq")) .= (seq2(#)seq1)/"seq by Th14; end; theorem Th43: seq1 is non-zero implies seq2/"seq=(seq2(#)seq1)/"(seq(#)seq1) proof assume A1: seq1 is non-zero; now let n; A2: seq1.n<>0 by A1,Th5; thus (seq2/"seq).n=(seq2.n)*1*seq".n by Th8 .=(seq2.n)*((seq1.n)*(seq1.n)")*seq".n by A2,XCMPLX_0:def 7 .=(seq2.n)*(seq1.n)*((seq1.n)"*seq".n) .=((seq2(#)seq1).n)*((seq1.n)"*seq".n) by Th8 .=((seq2(#)seq1).n)*((seq1".n)*seq".n) by VALUED_1:10 .=((seq2(#)seq1).n)*(seq"(#)seq1").n by Th8 .=((seq2(#)seq1).n)*(seq(#)seq1)".n by Th36 .=((seq2(#)seq1)/"(seq(#)seq1)).n by Th8; end; hence thesis by FUNCT_2:63; end; theorem Th44: r<>0 & seq is non-zero implies r(#)seq is non-zero proof assume that A1: r<>0 and A2: seq is non-zero and A3: not r(#)seq is non-zero; consider n1 such that A4: (r(#)seq).n1=0 by A3,Th5; A5: seq.n1 <> 0 by A2,Th5; r*seq.n1=0 by A4,Th9; hence contradiction by A1,A5,XCMPLX_1:6; end; theorem seq is non-zero implies -seq is non-zero by Th44; theorem Th46: (r(#)seq)"=r"(#)seq" proof now let n; thus (r(#)seq)".n=((r(#)seq).n)" by VALUED_1:10 .=(r*(seq.n))" by Th9 .=r"*(seq.n)" by XCMPLX_1:204 .=r"*seq".n by VALUED_1:10 .=(r"(#)seq").n by Th9; end; hence thesis by FUNCT_2:63; end; Lm1: (-1)"=-1; theorem (-seq)" = (-1)(#)seq" by Lm1,Th46; theorem -seq1/"seq=(-seq1)/"seq & seq1/"(-seq)=-seq1/"seq proof thus -seq1/"seq=(-1)(#)(seq1(#)(seq")) .=(-seq1)/"seq by Th18; thus seq1/"(-seq)=seq1(#)((-1)(#)seq") by Lm1,Th46 .=-(seq1/"seq) by Th19; end; theorem seq1/"seq + seq19/"seq = (seq1 + seq19) /" seq & seq1/"seq - seq19/" seq = (seq1 - seq19) /" seq proof thus seq1/"seq + seq19/"seq = (seq1 + seq19) (#) (seq") by Th15 .= (seq1 + seq19) /" seq; thus seq1/"seq - seq19/"seq = (seq1 - seq19) (#) (seq") by Th20 .= (seq1 - seq19) /" seq; end; theorem seq is non-zero & seq9 is non-zero implies seq1/"seq + seq19/"seq9=( seq1(#)seq9+seq19(#)seq)/"(seq(#)seq9) & seq1/"seq - seq19/"seq9=(seq1(#)seq9- seq19(#)seq)/"(seq(#)seq9) proof assume that A1: seq is non-zero and A2: seq9 is non-zero; thus seq1/"seq + seq19/"seq9=(seq1(#)seq9)/"(seq(#)seq9)+seq19/"seq9 by A2 ,Th43 .=(seq1(#)seq9)/"(seq(#)seq9)+(seq19(#)seq)/"(seq(#)seq9) by A1,Th43 .=(seq1(#)seq9+seq19(#)seq)(#)((seq(#)seq9)") by Th15 .=(seq1(#)seq9+seq19(#)seq)/"(seq(#)seq9); thus seq1/"seq - seq19/"seq9=(seq1(#)seq9)/"(seq(#)seq9)-seq19/"seq9 by A2 ,Th43 .=(seq1(#)seq9)/"(seq(#)seq9)-(seq19(#)seq)/"(seq(#)seq9) by A1,Th43 .=(seq1(#)seq9-seq19(#)seq)(#)((seq(#)seq9)") by Th20 .=(seq1(#)seq9-seq19(#)seq)/"(seq(#)seq9); end; theorem (seq19/"seq)/"(seq9/"seq1)=(seq19(#)seq1)/"(seq(#)seq9) proof thus (seq19/"seq)/"(seq9/"seq1)=(seq19/"seq)(#)(seq9"(#)seq1"") by Th36 .=seq19(#)seq"(#)seq1(#)seq9" by Th14 .=seq19(#)(seq1(#)seq")(#)seq9" by Th14 .=seq19(#)((seq1(#)seq")(#)seq9") by Th14 .=seq19(#)(seq1(#)(seq"(#)seq9")) by Th14 .=seq19(#)seq1(#)(seq"(#)seq9") by Th14 .=(seq19(#)seq1)/"(seq(#)seq9) by Th36; end; theorem Th52: abs(seq(#)seq9)=abs(seq)(#)abs(seq9) proof now let n; thus (abs(seq(#)seq9)).n=abs(((seq(#)seq9).n)) by Th12 .=abs((seq.n)*(seq9.n)) by Th8 .=abs((seq.n))*abs((seq9.n)) by COMPLEX1:65 .=((abs(seq)).n)*abs((seq9.n)) by Th12 .=((abs(seq)).n)*(abs(seq9)).n by Th12 .=(abs(seq)(#)abs(seq9)).n by Th8; end; hence thesis by FUNCT_2:63; end; theorem seq is non-zero implies abs(seq) is non-zero proof assume A1: seq is non-zero; now let n; seq.n<>0 by A1,Th5; then abs(seq.n)<>0 by COMPLEX1:47; hence (abs(seq)).n<>0 by Th12; end; hence thesis by Th5; end; theorem Th54: abs(seq)"=abs(seq") proof now let n; thus (abs(seq")).n=abs(seq".n) by Th12 .=abs((seq.n)") by VALUED_1:10 .=abs(1/(seq.n)) by XCMPLX_1:215 .=1/abs(seq.n) by ABSVALUE:7 .=(abs(seq.n))" by XCMPLX_1:215 .=(abs(seq).n)" by Th12 .=(abs(seq))".n by VALUED_1:10; end; hence thesis by FUNCT_2:63; end; theorem abs(seq9/"seq)=abs(seq9)/"abs(seq) proof thus abs(seq9/"seq)=abs(seq9)(#)abs(seq") by Th52 .=abs(seq9)/"abs(seq) by Th54; end; theorem abs(r(#)seq)=abs(r)(#)abs(seq) proof now let n; thus abs(r(#)seq).n=abs((r(#)seq).n) by Th12 .=abs(r*(seq.n)) by Th9 .=abs(r)*abs(seq.n) by COMPLEX1:65 .=abs(r)*(abs(seq)).n by Th12 .=(abs(r)(#)abs(seq)).n by Th9; end; hence thesis by FUNCT_2:63; end; begin reserve f for Function; reserve n,k,n1 for Element of NAT; reserve r,p for Element of COMPLEX; reserve x,y for set; definition mode Complex_Sequence is sequence of COMPLEX; end; reserve seq,seq1,seq2,seq3,seq9,seq19 for Complex_Sequence; theorem Th1: f is Complex_Sequence iff (dom f=NAT & for x st x in NAT holds f. x is Element of COMPLEX) proof thus f is Complex_Sequence implies (dom f=NAT & for x st x in NAT holds f.x is Element of COMPLEX) proof assume A1: f is Complex_Sequence; hence A2: dom f=NAT by FUNCT_2:def 1; let x; assume x in NAT; then A3: f.x in rng f by A2,FUNCT_1:def 3; rng f c=COMPLEX by A1,RELAT_1:def 19; hence thesis by A3; end; assume that A4: dom f= NAT and A5: for x st x in NAT holds f.x is Element of COMPLEX; now let y; assume y in rng f; then consider x such that A6: x in dom f and A7: y=f.x by FUNCT_1:def 3; f.x is Element of COMPLEX by A4,A5,A6; hence y in COMPLEX by A7; end; then rng f c=COMPLEX by TARSKI:def 3; hence thesis by A4,FUNCT_2:def 1,RELSET_1:4; end; theorem Th2: f is Complex_Sequence iff (dom f=NAT & for n holds f.n is Element of COMPLEX) proof thus f is Complex_Sequence implies (dom f=NAT & for n holds f.n is Element of COMPLEX) by Th1; assume that A1: dom f=NAT and A2: for n holds f.n is Element of COMPLEX; for x holds x in NAT implies f.x is Element of COMPLEX by A2; hence thesis by A1,Th1; end; scheme ExComplexSeq{F(set) -> complex number}: ex seq st for n holds seq.n=F(n) proof defpred P[set,set] means ex n st n=$1 & $2=F(n); A1: now let x; assume x in NAT; then consider n such that A2: n=x; reconsider r2=F(n) as set; take y=r2; thus P[x,y] by A2; end; consider f such that A3: dom f=NAT and A4: for x st x in NAT holds P[x,f.x] from CLASSES1:sch 1(A1); now let x; assume x in NAT; then ex n st n=x & f.x=F(n) by A4; hence f.x is Element of COMPLEX by XCMPLX_0:def 2; end; then reconsider f as Complex_Sequence by A3,Th1; take seq=f; let n; ex k st k=n & seq.n=F(k) by A4; hence thesis; end; notation let f be complex-valued Relation; synonym f is non-zero for f is non-empty; end; registration cluster non-zero for Complex_Sequence; existence proof take s = NAT --> 1r; rng s = {1} by FUNCOP_1:8; hence not 0 in rng s by TARSKI:def 1; end; end; theorem Th3: seq is non-zero iff for x st x in NAT holds seq.x<>0c proof thus seq is non-zero implies for x st x in NAT holds seq.x<>0c proof assume A1: seq is non-zero; let x; assume x in NAT; then x in dom seq by Th2; then seq.x in rng seq by FUNCT_1:def 3; hence thesis by A1,RELAT_1:def 9; end; assume A2: for x st x in NAT holds seq.x<>0c; assume 0 in rng seq; then ex x st x in dom seq & seq.x=0 by FUNCT_1:def 3; hence contradiction by A2; end; theorem Th4: seq is non-zero iff for n holds seq.n<>0c proof thus seq is non-zero implies for n holds seq.n<>0c by Th3; assume for n holds seq.n<>0c; then for x holds x in NAT implies seq.x<>0c; hence thesis by Th3; end; theorem for IT being non-zero Complex_Sequence holds rng IT c= COMPLEX \ {0c} proof let IT be non-zero Complex_Sequence; not 0c in rng IT by RELAT_1:def 9; hence thesis by ZFMISC_1:34; end; theorem for r ex seq st rng seq={r} proof let r; consider f such that A1: dom f=NAT and A2: rng f={r} by FUNCT_1:5; now let x; assume x in {r}; then x=r by TARSKI:def 1; hence x in COMPLEX; end; then rng f c= COMPLEX by A2,TARSKI:def 3; then reconsider f as Complex_Sequence by A1,FUNCT_2:def 1,RELSET_1:4; take f; thus thesis by A2; end; theorem Th7: (seq1+seq2)+seq3=seq1+(seq2+seq3) proof now let n; thus ((seq1+seq2)+seq3).n=(seq1+seq2 qua Complex_Sequence).n+ seq3.n by VALUED_1:1 .=seq1.n+seq2.n+seq3.n by VALUED_1:1 .=seq1.n+(seq2.n+seq3.n) .=seq1.n+(seq2+seq3).n by VALUED_1:1 .=(seq1+(seq2+seq3)).n by VALUED_1:1; end; hence thesis by FUNCT_2:63; end; theorem Th8: (seq1(#)seq2)(#)seq3=seq1(#)(seq2(#)seq3) proof now let n; thus ((seq1(#)seq2)(#)seq3).n=(seq1(#)seq2).n*seq3.n by VALUED_1:5 .=seq1.n*seq2.n*seq3.n by VALUED_1:5 .=seq1.n*(seq2.n*seq3.n) .=seq1.n*(seq2(#)seq3).n by VALUED_1:5 .=(seq1(#)(seq2(#)seq3)).n by VALUED_1:5; end; hence thesis by FUNCT_2:63; end; theorem Th9: (seq1+seq2)(#)seq3=seq1(#)seq3+seq2(#)seq3 proof now let n; thus ((seq1+seq2)(#)seq3).n=(seq1+seq2).n*seq3.n by VALUED_1:5 .=(seq1.n+seq2.n)*seq3.n by VALUED_1:1 .=seq1.n*seq3.n+seq2.n*seq3.n .=(seq1(#)seq3).n+seq2.n*seq3.n by VALUED_1:5 .=(seq1(#)seq3).n+(seq2(#)seq3).n by VALUED_1:5 .=((seq1(#)seq3)+(seq2(#)seq3)).n by VALUED_1:1; end; hence thesis by FUNCT_2:63; end; theorem seq3(#)(seq1+seq2)=seq3(#)seq1+seq3(#)seq2 by Th9; theorem -seq=(-1r)(#)seq; theorem Th12: r(#)(seq1(#)seq2)=r(#)seq1(#)seq2 proof now let n; thus (r(#)(seq1(#)seq2)).n=r*(seq1(#)seq2).n by VALUED_1:6 .=r*(seq1.n*seq2.n) by VALUED_1:5 .=(r*seq1.n)*seq2.n .=(r(#)seq1).n*seq2.n by VALUED_1:6 .=(r(#)seq1 (#) seq2).n by VALUED_1:5; end; hence thesis by FUNCT_2:63; end; theorem Th13: r(#)(seq1(#)seq2)=seq1(#)(r(#)seq2) proof now let n; thus (r(#)(seq1(#)seq2)).n=r*(seq1(#)seq2).n by VALUED_1:6 .=r*(seq1.n*seq2.n) by VALUED_1:5 .=seq1.n*(r*seq2.n) .=seq1.n*(r(#)seq2).n by VALUED_1:6 .=(seq1(#)(r(#)seq2)).n by VALUED_1:5; end; hence thesis by FUNCT_2:63; end; theorem Th14: (seq1-seq2)(#)seq3=seq1(#)seq3-seq2(#)seq3 proof thus (seq1-seq2)(#)seq3=seq1(#)seq3+(-seq2)(#)seq3 by Th9 .=seq1(#)seq3+((-1r)(#)seq2)(#)seq3 .=seq1(#)seq3+(-1r)(#)(seq2(#)seq3) by Th12 .=seq1(#)seq3-seq2(#)seq3; end; theorem seq3(#)seq1-seq3(#)seq2=seq3(#)(seq1-seq2) by Th14; theorem Th16: r(#)(seq1+seq2)=r(#)seq1+r(#)seq2 proof now let n; thus (r(#)(seq1 + seq2)).n=r*(seq1+seq2).n by VALUED_1:6 .=r*(seq1.n+seq2.n) by VALUED_1:1 .=r*seq1.n+r*seq2.n .=(r(#)seq1).n+r*seq2.n by VALUED_1:6 .=(r(#)seq1).n+(r(#)seq2).n by VALUED_1:6 .=((r(#)seq1)+(r(#)seq2)).n by VALUED_1:1; end; hence thesis by FUNCT_2:63; end; theorem Th17: (r*p)(#)seq=r(#)(p(#)seq) proof now let n; thus ((r*p)(#)seq).n=(r*p)*seq.n by VALUED_1:6 .=r*(p*seq.n) .=r*(p(#)seq).n by VALUED_1:6 .=(r(#)(p(#)seq)).n by VALUED_1:6; end; hence thesis by FUNCT_2:63; end; theorem Th18: r(#)(seq1-seq2)=r(#)seq1-r(#)seq2 proof thus r(#)(seq1-seq2)=r(#)seq1+r(#)(-seq2) by Th16 .=r(#)seq1+r(#)((-1r)(#)seq2) .=r(#)seq1+((-1r)*r)(#)seq2 by Th17 .=r(#)seq1+(-1r)(#)(r(#)seq2) by Th17 .=r(#)seq1-(r(#)seq2); end; theorem r(#)(seq1/"seq)=(r(#)seq1)/"seq proof thus r(#)(seq1/"seq) = r(#)(seq1(#)(seq)") .= (r(#)seq1)/"seq by Th12; end; theorem seq1-(seq2+seq3)=seq1-seq2-seq3 proof thus seq1-(seq2+seq3)=seq1+(-1r)(#)(seq2+seq3) .=seq1+((-1r)(#)seq2+(-1r)(#)seq3) by Th16 .=seq1+(-seq2+(-1r)(#)seq3) .=seq1+(-seq2+-seq3) .=seq1-seq2-seq3 by Th7; end; theorem 1r(#)seq=seq proof now let n; thus (1r(#)seq).n=1r*seq.n by VALUED_1:6 .=seq.n; end; hence thesis by FUNCT_2:63; end; theorem --seq = seq; theorem seq1 - (-seq2) = seq1 + seq2; theorem seq1 - (seq2 - seq3) = seq1 - seq2 + seq3 proof thus seq1-(seq2-seq3)=seq1+(-1r)(#)(seq2-seq3) .=seq1+((-1r)(#)seq2-((-1r)(#)seq3)) by Th18 .=seq1+(-seq2-((-1r)(#)seq3)) .=seq1+(-seq2-(-seq3)) .=seq1-seq2+seq3 by Th7; end; theorem seq1 + (seq2 - seq3) = seq1 + seq2 - seq3 proof thus seq1 + (seq2-seq3) = seq1 + (seq2+-seq3) .= seq1+seq2-seq3 by Th7; end; theorem (-seq1)(#)seq2=-(seq1(#)seq2) & seq1(#)(-seq2)=-(seq1(#)seq2) proof thus (-seq1)(#)seq2=(-1r)(#)seq1(#)seq2 .=(-1r)(#)(seq1(#)seq2) by Th12 .=-(seq1(#)seq2); thus seq1(#)(-seq2)=seq1(#)((-1r)(#)seq2) .=(-1r)(#)(seq1(#)seq2) by Th13 .=-(seq1(#)seq2); end; theorem Th27: seq is non-zero implies seq" is non-zero proof assume that A1: seq is non-zero and A2: not seq" is non-zero; consider n1 such that A3: (seq").n1=0c by A2,Th4; (seq.n1)"=(seq").n1 by VALUED_1:10; hence contradiction by A1,A3,Th4,XCMPLX_1:202; end; canceled; theorem Th29: seq is non-zero & seq1 is non-zero iff seq(#)seq1 is non-zero proof thus seq is non-zero & seq1 is non-zero implies seq(#)seq1 is non-zero proof assume A1: seq is non-zero & seq1 is non-zero; now let n; A2: (seq(#)seq1).n=(seq.n)*(seq1.n) by VALUED_1:5; seq.n<>0c & seq1.n<>0c by A1,Th4; hence (seq(#)seq1).n<>0c by A2; end; hence thesis by Th4; end; assume A3: seq(#)seq1 is non-zero; now let n; (seq(#)seq1).n=(seq.n)*(seq1.n) by VALUED_1:5; hence seq.n<>0c by A3,Th4; end; hence seq is non-zero by Th4; now let n; (seq(#)seq1).n=(seq.n)*(seq1.n) by VALUED_1:5; hence seq1.n<>0c by A3,Th4; end; hence thesis by Th4; end; theorem Th30: seq"(#)seq1"=(seq(#)seq1)" proof now let n; thus ((seq")(#)(seq1")).n=((seq").n)*((seq1").n) by VALUED_1:5 .=((seq").n)*(seq1.n)" by VALUED_1:10 .=(seq.n)"*(seq1.n)" by VALUED_1:10 .=((seq.n)*(seq1.n))" by XCMPLX_1:204 .=((seq(#)seq1).n)" by VALUED_1:5 .=((seq(#)seq1)").n by VALUED_1:10; end; hence thesis by FUNCT_2:63; end; theorem seq is non-zero implies (seq1/"seq)(#)seq=seq1 proof assume A1: seq is non-zero; now let n; A2: seq.n<>0c by A1,Th4; thus ((seq1/"seq)(#)seq).n=((seq1(#)seq").n)*seq.n by VALUED_1:5 .=(seq1.n)*(seq".n)*seq.n by VALUED_1:5 .=(seq1.n)*(seq.n)"*seq.n by VALUED_1:10 .=(seq1.n)*((seq.n)"*seq.n) .=(seq1.n)*1r by A2,XCMPLX_0:def 7 .=seq1.n; end; hence thesis by FUNCT_2:63; end; theorem (seq9/"seq)(#)(seq19/"seq1)=(seq9(#)seq19)/"(seq(#)seq1) proof now let n; thus ((seq9/"seq)(#)(seq19/"seq1)).n=((seq9(#)seq").n)*(seq19/"seq1).n by VALUED_1:5 .=(seq9.n)*(seq".n)*(seq19(#)seq1").n by VALUED_1:5 .=(seq9.n)*(seq".n)*((seq19.n)*seq1".n) by VALUED_1:5 .=(seq9.n)*((seq19.n)*((seq".n)*seq1".n)) .=(seq9.n)*((seq19.n)*((seq"(#)seq1").n)) by VALUED_1:5 .=(seq9.n)*(seq19.n)*((seq"(#)seq1").n) .=(seq9.n)*(seq19.n)*((seq(#)seq1)".n) by Th30 .=((seq9(#)seq19).n)*(seq(#)seq1)".n by VALUED_1:5 .=((seq9(#)seq19)/"(seq(#)seq1)).n by VALUED_1:5; end; hence thesis by FUNCT_2:63; end; theorem seq is non-zero & seq1 is non-zero implies seq/"seq1 is non-zero proof assume that A1: seq is non-zero and A2: seq1 is non-zero; seq1" is non-zero by A2,Th27; hence thesis by A1,Th29; end; theorem Th34: (seq/"seq1)"=seq1/"seq proof now let n; thus (seq/"seq1)".n=(seq"(#)seq1"").n by Th30 .=(seq1/"seq).n; end; hence thesis by FUNCT_2:63; end; theorem seq2 (#) (seq1 /" seq) = (seq2 (#) seq1) /" seq proof thus seq2 (#) (seq1 /" seq) = seq2 (#) seq1 (#) (seq") by Th8 .= (seq2 (#) seq1) /" seq; end; theorem seq2/"(seq/"seq1)=(seq2(#)seq1)/"seq proof now let n; thus (seq2/"(seq/"seq1)).n=((seq2(#)(seq1/"seq))).n by Th34 .=((seq2(#)seq1)(#)(seq")).n by Th8 .=((seq2(#)seq1)/"seq).n; end; hence thesis by FUNCT_2:63; end; theorem Th37: seq1 is non-zero implies seq2/"seq=(seq2(#)seq1)/"(seq(#)seq1) proof assume A1: seq1 is non-zero; now let n; A2: seq1.n<>0c by A1,Th4; thus (seq2/"seq).n=(seq2.n)*1r*seq".n by VALUED_1:5 .=(seq2.n)*((seq1.n)*(seq1.n)")*seq".n by A2,XCMPLX_0:def 7 .=(seq2.n)*(seq1.n)*((seq1.n)"*seq".n) .=((seq2(#)seq1).n)*((seq1.n)"*seq".n) by VALUED_1:5 .=((seq2(#)seq1).n)*((seq1".n)*seq".n) by VALUED_1:10 .=((seq2(#)seq1).n)*(seq"(#)seq1").n by VALUED_1:5 .=((seq2(#)seq1).n)*(seq(#)seq1)".n by Th30 .=((seq2(#)seq1)/"(seq(#)seq1)).n by VALUED_1:5; end; hence thesis by FUNCT_2:63; end; theorem Th38: r<>0c & seq is non-zero implies r(#)seq is non-zero proof assume that A1: r<>0c and A2: seq is non-zero and A3: not r(#)seq is non-zero; consider n1 such that A4: (r(#)seq).n1=0c by A3,Th4; A5: r*seq.n1=0c by A4,VALUED_1:6; seq.n1 <> 0c by A2,Th4; hence contradiction by A1,A5; end; theorem seq is non-zero implies -seq is non-zero proof A1: --1r=1r; assume seq is non-zero; hence thesis by A1,Th38; end; theorem Th40: (r(#)seq)"=r"(#)seq" proof now let n; thus (r(#)seq)".n=((r(#)seq).n)" by VALUED_1:10 .=(r*(seq.n))" by VALUED_1:6 .=r"*(seq.n)" by XCMPLX_1:204 .=r"*seq".n by VALUED_1:10 .=(r"(#)seq").n by VALUED_1:6; end; hence thesis by FUNCT_2:63; end; theorem Th41: seq is non-zero implies (-seq)"=(-1r)(#)seq" proof (-1)" = -1; hence thesis by Th40; end; theorem seq is non-zero implies -seq1/"seq=(-seq1)/"seq & seq1/"(-seq)=-seq1/" seq proof assume A1: seq is non-zero; thus -seq1/"seq=(-1r)(#)(seq1/"seq) .=((-1r)(#)seq1)(#)(seq") by Th12 .=(-seq1)/"seq; thus seq1/"(-seq)=seq1(#)((-1r)(#)seq") by A1,Th41 .=(-1r)(#)(seq1(#)(seq")) by Th13 .=-(seq1/"seq); end; theorem seq1/"seq + seq19/"seq = (seq1+seq19) /" seq & seq1/"seq - seq19/"seq = (seq1-seq19) /" seq proof thus seq1/"seq + seq19/"seq = (seq1+seq19)(#)(seq") by Th9 .= (seq1+seq19) /" seq; thus seq1/"seq - seq19/"seq = (seq1-seq19)(#)(seq") by Th14 .= (seq1-seq19) /" seq; end; theorem seq is non-zero & seq9 is non-zero implies seq1/"seq + seq19/"seq9=( seq1(#)seq9+seq19(#)seq)/"(seq(#)seq9) & seq1/"seq - seq19/"seq9=(seq1(#)seq9- seq19(#)seq)/"(seq(#)seq9) proof assume that A1: seq is non-zero and A2: seq9 is non-zero; thus seq1/"seq + seq19/"seq9=(seq1(#)seq9)/"(seq(#)seq9)+seq19/"seq9 by A2 ,Th37 .=(seq1(#)seq9)/"(seq(#)seq9)+(seq19(#)seq)/"(seq(#)seq9) by A1,Th37 .=(seq1(#)seq9+seq19(#)seq)(#)((seq(#)seq9)") by Th9 .=(seq1(#)seq9+seq19(#)seq)/"(seq(#)seq9); thus seq1/"seq - seq19/"seq9=(seq1(#)seq9)/"(seq(#)seq9)-seq19/"seq9 by A2 ,Th37 .=(seq1(#)seq9)/"(seq(#)seq9)-(seq19(#)seq)/"(seq(#)seq9) by A1,Th37 .=(seq1(#)seq9-seq19(#)seq)(#)((seq(#)seq9)") by Th14 .=(seq1(#)seq9-seq19(#)seq)/"(seq(#)seq9); end; theorem (seq19/"seq)/"(seq9/"seq1)=(seq19(#)seq1)/"(seq(#)seq9) proof thus (seq19/"seq)/"(seq9/"seq1)= (seq19/"seq)(#)(seq9"(#)seq1"") by Th30 .=seq19(#)seq"(#)seq1(#)seq9" by Th8 .=seq19(#)(seq1(#)seq")(#)seq9" by Th8 .=seq19(#)((seq1(#)seq")(#)seq9") by Th8 .=seq19(#)(seq1(#)(seq"(#)seq9")) by Th8 .=seq19(#)seq1(#)(seq"(#)seq9") by Th8 .=(seq19(#)seq1)/"(seq(#)seq9) by Th30; end; theorem Th46: |.seq(#)seq9.|=|.seq.|(#)|.seq9.| proof now let n; thus (|.seq(#)seq9.|).n=|.((seq(#)seq9).n).| by VALUED_1:18 .=|.(seq.n)*(seq9.n).| by VALUED_1:5 .=|.(seq.n).|*|.(seq9.n).| by COMPLEX1:65 .=((|.seq.|).n)*|.(seq9.n).| by VALUED_1:18 .=((|.seq.|).n)*(|.seq9.|).n by VALUED_1:18 .=(|.seq.|(#)|.seq9.|).n by VALUED_1:5; end; hence thesis by FUNCT_2:63; end; theorem seq is non-zero implies |.seq.| is non-zero proof assume A1: seq is non-zero; now let n; seq.n<>0c by A1,Th4; then |.seq.n.|<>0 by COMPLEX1:45; hence (|.seq.|).n<>0 by VALUED_1:18; end; hence thesis by SEQ_1:5; end; theorem Th48: |. seq .| " = |. seq" .| proof now let n; thus (|.seq".|).n=|.seq".n.| by VALUED_1:18 .=|.(seq.n)".| by VALUED_1:10 .=|.1r/(seq.n).| by XCMPLX_1:215 .=1/|.seq.n.| by COMPLEX1:48,67 .=|.seq.n.|" by XCMPLX_1:215 .=(|.seq.|.n)" by VALUED_1:18 .=(|.seq.|)".n by VALUED_1:10; end; hence thesis by FUNCT_2:63; end; theorem |.seq9/"seq.|=|.seq9.|/"|.seq.| proof thus |.seq9/"seq.|=|.seq9.|(#)|.seq".| by Th46 .=|.seq9.|/"|.seq.| by Th48; end; theorem |.r(#)seq.|=|.r.|(#)|.seq.| proof now let n; thus |.r(#)seq.|.n=|.(r(#)seq).n.| by VALUED_1:18 .=|.r*(seq.n).| by VALUED_1:6 .=|.r.|*|.seq.n.| by COMPLEX1:65 .=|.r.|*(|.seq.|).n by VALUED_1:18 .=(|.r.|(#)|.seq.|).n by VALUED_1:6; end; hence thesis by FUNCT_2:63; end; begin definition func FALSE equals 0; coherence; func TRUE equals 1; coherence; end; definition let p be set; attr p is boolean means :Def3: p = FALSE or p = TRUE; end; registration cluster FALSE -> boolean; coherence by Def3; cluster TRUE -> boolean; coherence by Def3; cluster boolean for number; existence by Def3; cluster boolean -> natural for number; coherence proof let x be number; assume x = FALSE or x = TRUE; hence thesis; end; end; reserve p,q,r,s for boolean number; definition let p; func 'not' p -> boolean number equals 1 - p; coherence proof p = FALSE or p = TRUE by Def3; hence thesis by Def3; end; involutiveness; let q; func p '&' q equals p*q; correctness; commutativity; idempotence proof let p; p = FALSE or p = TRUE by Def3; hence thesis; end; end; registration let p,q; cluster p '&' q -> boolean; coherence proof p = FALSE or p = TRUE by Def3; hence thesis; end; end; definition let p,q; func p 'or' q equals 'not' ('not' p '&' 'not' q); coherence; commutativity; idempotence; end; definition let p,q; func p => q equals 'not' p 'or' q; coherence; end; registration let p,q; cluster p 'or' q -> boolean; coherence; cluster p => q -> boolean; coherence; end; definition let p,q; func p <=> q equals (p => q) '&' (q => p); coherence; commutativity; end; registration let p,q; cluster p <=> q -> boolean; coherence; end; definition let p,q; func p 'nand' q equals 'not'(p '&' q); coherence; commutativity; func p 'nor' q equals 'not'(p 'or' q); coherence; commutativity; func p 'xor' q equals 'not'(p <=> q); coherence; commutativity; func p '\' q equals p '&' 'not' q; coherence; end; registration let p,q; cluster p 'nand' q -> boolean; coherence; cluster p 'nor' q -> boolean; coherence; cluster p 'xor' q -> boolean; coherence; cluster p '\' q -> boolean; coherence; end; begin theorem p '&' p = p; theorem p '&' (p '&' q) = p '&' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'or' p = p; theorem p 'or' (p 'or' q) = p 'or' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'or' p '&' q = p proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p '&' (p 'or' q) = p proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p '&' (p 'or' q) = p 'or' (p '&' q) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p '&' (q 'or' r) = p '&' q 'or' p '&' r proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'or' q '&' r = (p 'or' q) '&' (p 'or' r) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p '&' q 'or' q '&' r 'or' r '&' p = (p 'or' q) '&' (q 'or' r) '&' (r 'or' p) proof A1: q = FALSE or q = TRUE by Def3; p = FALSE or p = TRUE by Def3; hence thesis by A1; end; theorem p '&' ('not' p 'or' q) = p '&' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'or' 'not' p '&' q = p 'or' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p => (p => q) = p => q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p '&' (p => q) = p '&' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p => (p '&' q) = p => q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p '&' 'not' (p => q) = p '&' 'not' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' p 'or' (p => q) = p => q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' p '&' (p => q) = 'not' p 'or' 'not' p '&' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p <=> q <=> r = p <=> (q <=> r) proof q = FALSE or q = TRUE by Def3; hence thesis; end; theorem p '&' (p <=> q) = p '&' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' p '&' (p <=> q) ='not' p '&' 'not' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p '&' (q <=> r) = p '&' ('not' q 'or' r) '&' ('not' r 'or' q); theorem p 'or' (q <=> r) = (p 'or' 'not' q 'or' r) '&' (p 'or' 'not' r 'or' q) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' p '&' (p <=> q) =('not' p '&' 'not' q) '&' ('not' p 'or' q) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' p '&' (q <=> r) = 'not' p '&' ('not' q 'or' r) '&' ('not' r 'or' q); theorem p => (p <=> q) = p => q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p => (p <=> q) = p => (p => q) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'or' (p <=> q) = q => p proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' p 'or' (p <=> q) = p => q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p => (q <=> r) = ('not' p 'or' 'not' q 'or' r) '&' ('not' p 'or' q 'or' 'not' r) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nor' p = 'not' p; theorem p 'nor' (p '&' q) = 'not' p proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nor' (p 'or' q) = 'not' p '&' 'not' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nor' (p 'nor' q) = 'not' p '&' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nor' (p '&' q) = 'not' p proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nor' (p 'or' q) = p 'nor' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' p '&' (p 'nor' q) = p 'nor' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'or' (q 'nor' r) = (p 'or' 'not' q) '&' (p 'or' 'not' r) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nor' (q 'nor' r) = 'not' p '&' q 'or' 'not' p '&' r proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nor' (q '&' r) = 'not' (p 'or' q) 'or' 'not' (p 'or' r) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p '&' (q 'nor' r) = p '&' 'not' q '&' 'not' r proof thus p '&' (q 'nor' r) = p '&' ('not' q '&' 'not' r) .= p '&' 'not' q '&' 'not' r; end; theorem p => (p 'nor' q) = 'not' p proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p => (q 'nor' r) = (p => 'not' q) '&' (p => 'not' r) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'or' (p 'nor' q) = q => p proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'or' (q 'nor' r) = (q => p) '&' (r => p) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p => (q 'nor' r) = ('not' p 'or' 'not' q) '&' ('not' p 'or' 'not' r) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nor' (p <=> q) = 'not' p '&' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' p '&' (p <=> q) = p 'nor' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nor' (q <=> r) = 'not' ((p 'or' 'not' q 'or' r) '&' (p 'or' 'not' r 'or' q)) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p <=> q = p '&' q 'or' (p 'nor' q) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nand' p = 'not' p; theorem p '&' (p 'nand' q) = p '&' 'not' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nand' (p '&' q) = 'not' (p '&' q) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nand' (q 'nand' r) = ('not' p 'or' q) '&' ('not' p 'or' r) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nand' (q 'or' r) = 'not' (p '&' q) '&' 'not' (p '&' r) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p => (p 'nand' q) = p 'nand' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nand' (p 'nand' q) = p => q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nand' (q 'nand' r) = (p => q) '&' (p => r) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nand' (p => q) = 'not' (p '&' q) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nand' (q => r) = (p => q) '&' (p => 'not' r) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' p 'or' (p 'nand' q) = p 'nand' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nand' (q => r) = ('not' p 'or' q) '&' ('not' p 'or' 'not' r) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' p '&' (p 'nand' q) = 'not' p 'or' 'not' p '&' 'not' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p '&' (q 'nand' r) = p '&' 'not' q 'or' p '&' 'not' r proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nand' (p <=> q) = 'not' (p '&' q) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nand' (q <=> r) = 'not' (p '&' ('not' q 'or' r) '&' ('not' r 'or' q )); theorem p 'nand' (q 'nor' r) = 'not' p 'or' q 'or' r proof thus p 'nand' (q 'nor' r) = 'not' p 'or' (q 'or' r) .= 'not' p 'or' q 'or' r; end; theorem p '\' q '\' q = p '\' q proof q = FALSE or q = TRUE by Def3; hence thesis; end; theorem p '&' (p '\' q) = p '\' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nor' (p <=> q) = q '\' p proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nor' (p 'nor' q) = q '\' p proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'xor' (p 'xor' q) = q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem (p 'xor' q) 'xor' r = p 'xor' (q 'xor' r) proof q = FALSE or q = TRUE by Def3; hence thesis; end; theorem 'not' (p 'xor' q) = 'not' p 'xor' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p '&' (q 'xor' r) = (p '&' q) 'xor' (p '&' r) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p '&' (p 'xor' q) = p '&' 'not' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'xor' (p '&' q) = p '&' 'not' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' p '&' (p 'xor' q) ='not' p '&' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'or' (p 'xor' q) = p 'or' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'or' ('not' p 'xor' q) =p 'or' 'not' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'xor' ('not' p '&' q) = p 'or' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'xor' (p 'or' q) = 'not' p '&' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'xor' (q '&' r) = (p 'or' (q '&' r)) '&' ('not' p 'or' 'not' (q '&' r)) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' p 'xor' (p => q) = p '&' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p => (p 'xor' q) = 'not' p 'or' 'not' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'xor' (p => q) = 'not' p 'or' 'not' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' p 'xor' (q => p) = (p '&' (p 'or' 'not' q)) 'or' ('not' p '&' q) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'xor' (p <=> q) = 'not' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' p 'xor' (p <=> q) = q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nor' (p 'xor' q) = 'not' p '&' 'not' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nor' (p 'xor' q) = p 'nor' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'xor' (p 'nor' q) = q => p proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nand' (p 'xor' q) = p => q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'xor' (p 'nand' q) = p => q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'xor' (p => q) = p 'nand' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nand' (q 'xor' r) = (p '&' q) <=> (p '&' r) proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'xor' (p '&' q) = p '\' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p '&' (p 'xor' q) = p '\' q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' p '&' (p 'xor' q) = q '\' p proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'xor' (p 'or' q) = q '\' p proof p = FALSE or p = TRUE by Def3; hence thesis; end; begin theorem p '&' q = TRUE implies p = TRUE & q = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not'(p '&' 'not' p) = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p => p = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p => (q => p) = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p => ((p => q) => q) = TRUE proof A1: q = FALSE or q = TRUE by Def3; p = FALSE or p = TRUE by Def3; hence thesis by A1; end; theorem (p => q) => ((q => r) => (p => r)) = TRUE proof A1: q = FALSE or q = TRUE by Def3; A2: p = FALSE or p = TRUE by Def3; r = FALSE or r = TRUE by Def3; hence thesis by A1,A2; end; theorem (p => q) => ((r => p) => (r => q)) = TRUE proof A1: q = FALSE or q = TRUE by Def3; A2: p = FALSE or p = TRUE by Def3; r = FALSE or r = TRUE by Def3; hence thesis by A1,A2; end; theorem (p => (p => q)) => (p => q) = TRUE proof A1: q = FALSE or q = TRUE by Def3; p = FALSE or p = TRUE by Def3; hence thesis by A1; end; theorem (p => (q => r)) => ((p => q) => (p => r)) = TRUE proof A1: q = FALSE or q = TRUE by Def3; A2: p = FALSE or p = TRUE by Def3; r = FALSE or r = TRUE by Def3; hence thesis by A1,A2; end; theorem (p => (q => r)) => (q => (p => r)) = TRUE proof A1: q = FALSE or q = TRUE by Def3; A2: p = FALSE or p = TRUE by Def3; r = FALSE or r = TRUE by Def3; hence thesis by A1,A2; end; theorem ((p => q) => r) => (q => r) = TRUE proof A1: q = FALSE or q = TRUE by Def3; r = FALSE or r = TRUE by Def3; hence thesis by A1; end; theorem (TRUE => p) => p = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p => q = TRUE implies (q => r) => (p => r) = TRUE proof r = FALSE or r = TRUE by Def3; hence thesis; end; theorem p => (p => q) = TRUE implies p => q = TRUE proof q = FALSE or q = TRUE by Def3; hence thesis; end; theorem p => (q => r) = TRUE implies (p => q) => (p =>r) = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p => q = TRUE & q => p = TRUE implies p = q proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p => q = TRUE & q => r = TRUE implies p => r = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem ('not' p => p) => p = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' p = TRUE implies p => q = TRUE; theorem p => q = TRUE & p => 'not' q = TRUE implies 'not' p = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem (p => q) => ('not' (q '&' r) => 'not' (p '&' r)) = TRUE proof A1: q = FALSE or q = TRUE by Def3; A2: p = FALSE or p = TRUE by Def3; r = FALSE or r = TRUE by Def3; hence thesis by A1,A2; end; theorem p 'or' (p => q) = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p => (p 'or' q) = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' q 'or' (q => p => p) = TRUE proof A1: q = FALSE or q = TRUE by Def3; p = FALSE or p = TRUE by Def3; hence thesis by A1; end; theorem p <=> p = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p <=> q <=> r <=> p <=> (q <=> r) = TRUE proof A1: q = FALSE or q = TRUE by Def3; A2: p = FALSE or p = TRUE by Def3; r = FALSE or r = TRUE by Def3; hence thesis by A1,A2; end; theorem p <=> q = TRUE & q <=> r = TRUE implies p <=> r = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p <=> q = TRUE & r <=> s = TRUE implies (p <=> r) <=> (q <=> s) = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' (p <=> 'not' p) = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p <=> q = TRUE & r <=> s = TRUE implies (p '&' r) <=> (q '&' s) = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p <=> q = TRUE & r <=> s = TRUE implies (p 'or' r) <=> (q 'or' s) = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p <=> q = TRUE iff p => q = TRUE & q => p = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p <=> q = TRUE & r <=> s = TRUE implies (p => r) <=> (q => s) = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' (p 'nor' 'not' p) = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nand' 'not' p = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'or' (p 'nand' q) = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nand' (p 'nor' q) = TRUE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p '&' 'not' p = FALSE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p '&' p = FALSE implies p = FALSE; theorem p '&' q = FALSE implies p = FALSE or q = FALSE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not' (p => p) = FALSE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p <=> 'not' p = FALSE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem 'not'(p <=> p) = FALSE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p '&' (p 'nor' q) = FALSE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nor' (p => q) = FALSE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'nor' (p 'nand' q) = FALSE proof p = FALSE or p = TRUE by Def3; hence thesis; end; theorem p 'xor' p = FALSE proof p = FALSE or p = TRUE by Def3; hence thesis; end; begin reserve X,Y,Z,x,y,z for set; reserve i,j for Element of NAT; reserve A,B,C for Subset of X; reserve R,R1,R2 for Relation of X; reserve AX for Subset of [:X,X:]; reserve SFXX for Subset-Family of [:X,X:]; definition let X; func nabla X -> Relation of X equals [:X,X:]; coherence proof [:X,X:] c=[:X,X:]; hence thesis; end; end; registration let X; cluster nabla X -> total reflexive; coherence proof thus dom nabla X c= X; thus X c= dom nabla X proof let x be set; assume x in X; then [x,x] in [:X,X:] by ZFMISC_1:87; hence thesis by XTUPLE_0:def 12; end; let x; assume x in field nabla X; then x in dom nabla X \/ rng nabla X; hence thesis by ZFMISC_1:87; end; end; definition let X; let R1,R2; redefine func R1 /\ R2 -> Relation of X; coherence proof R1 /\ R2 c= [:X,X:]; hence thesis; end; redefine func R1 \/ R2 -> Relation of X; coherence proof R1 \/ R2 c= [:X,X:]; hence thesis; end; end; theorem nabla X \/ R1 = nabla X by XBOOLE_1:12; theorem id X is_reflexive_in X & id X is_symmetric_in X & id X is_transitive_in X proof thus for x st x in X holds [x,x] in id X by RELAT_1:def 10; thus for x,y st x in X & y in X & [x,y] in id X holds [y,x] in id X by RELAT_1:def 10; thus for x,y,z st x in X & y in X & z in X & [x,y] in id X & [y,z] in id X holds [x,z] in id X by RELAT_1:def 10; end; definition let X; mode Tolerance of X is total reflexive symmetric Relation of X; mode Equivalence_Relation of X is total symmetric transitive Relation of X; end; theorem id X is Equivalence_Relation of X; theorem Th4: nabla X is Equivalence_Relation of X proof for x,y holds x in X & y in X & [x,y] in nabla X implies [y,x] in nabla X by ZFMISC_1:88; then A1: nabla X is_symmetric_in X by RELAT_2:def 3; for x,y,z st x in X & y in X & z in X & [x,y] in nabla X & [y,z] in nabla X holds [x,z] in nabla X by ZFMISC_1:87; then A2: nabla X is_transitive_in X by RELAT_2:def 8; field nabla X = X by ORDERS_1:12; hence thesis by A1,A2,RELAT_2:def 11,def 16; end; registration let X; cluster nabla X -> total symmetric transitive; coherence by Th4; end; reserve EqR,EqR1,EqR2,EqR3 for Equivalence_Relation of X; Lm1: [x,y] in R implies x in X & y in X proof assume [x,y] in R; then x in dom R & y in rng R by XTUPLE_0:def 12,def 13; hence thesis; end; theorem Th5: for R being total reflexive Relation of X holds x in X implies [ x,x] in R proof let R be total reflexive Relation of X; field R = X by ORDERS_1:12; then R is_reflexive_in X by RELAT_2:def 9; hence thesis by RELAT_2:def 1; end; theorem Th6: for R being total symmetric Relation of X holds [x,y] in R implies [y,x] in R proof let R be total symmetric Relation of X; field R = X by ORDERS_1:12; then A1: R is_symmetric_in X by RELAT_2:def 11; assume A2: [x,y] in R; then x in X & y in X by Lm1; hence thesis by A2,A1,RELAT_2:def 3; end; theorem Th7: for R being total transitive Relation of X holds [x,y] in R & [y ,z] in R implies [x,z] in R proof let R be total transitive Relation of X; assume that A1: [x,y] in R and A2: [y,z] in R; A3: z in X by A2,Lm1; field R = X by ORDERS_1:12; then A4: R is_transitive_in X by RELAT_2:def 16; x in X & y in X by A1,Lm1; hence thesis by A1,A2,A3,A4,RELAT_2:def 8; end; theorem for R being total reflexive Relation of X holds (ex x being set st x in X) implies R <> {}; theorem Th9: R is Equivalence_Relation of X iff R is reflexive symmetric transitive & field R = X proof thus R is Equivalence_Relation of X implies R is reflexive symmetric transitive & field R = X by ORDERS_1:12; assume that A1: R is reflexive and A2: R is symmetric & R is transitive and A3: field R = X; R is_reflexive_in X by A1,A3,RELAT_2:def 9; then dom R = X by ORDERS_1:13; hence thesis by A2,PARTFUN1:def 2; end; definition let X; let EqR1,EqR2; redefine func EqR1 /\ EqR2 -> Equivalence_Relation of X; coherence proof for x st x in X holds [x,x] in EqR2 by Th5; then A1: id X c= EqR2 by RELAT_1:47; for x st x in X holds [x,x] in EqR1 by Th5; then id X c= EqR1 by RELAT_1:47; then id X c= EqR1 /\ EqR2 by A1,XBOOLE_1:19; then dom(EqR1 /\ EqR2) = X & rng(EqR1 /\ EqR2) = X by RELSET_1:16,17; then field (EqR1 /\ EqR2) = X; hence thesis by Th9; end; end; theorem id X /\ EqR = id X proof now let x,y; assume [x,y] in id X; then x in X & x = y by RELAT_1:def 10; hence [x,y] in EqR by Th5; end; then id X c= EqR by RELAT_1:def 3; hence thesis by XBOOLE_1:28; end; theorem Th11: for SFXX st (SFXX <> {} & for Y st Y in SFXX holds Y is Equivalence_Relation of X) holds meet SFXX is Equivalence_Relation of X proof let SFXX such that A1: SFXX <> {} and A2: for Y st Y in SFXX holds Y is Equivalence_Relation of X; reconsider XX = meet SFXX as Relation of X; A3: XX is_symmetric_in X proof let x,y; assume that x in X and y in X and A4: [x,y] in XX; now let Y; assume Y in SFXX; then Y is Equivalence_Relation of X & [x,y] in Y by A2,A4,SETFAM_1:def 1; hence [y,x] in Y by Th6; end; hence thesis by A1,SETFAM_1:def 1; end; A5: XX is_transitive_in X proof let x,y,z; assume that x in X and y in X and z in X and A6: [x,y] in XX and A7: [y,z] in XX; now let Y; assume A8: Y in SFXX; then A9: [y,z] in Y by A7,SETFAM_1:def 1; Y is Equivalence_Relation of X & [x,y] in Y by A2,A6,A8,SETFAM_1:def 1; hence [x,z] in Y by A9,Th7; end; hence thesis by A1,SETFAM_1:def 1; end; XX is_reflexive_in X proof let x such that A10: x in X; for Y st Y in SFXX holds [x,x] in Y proof let Y; assume Y in SFXX; then Y is Equivalence_Relation of X by A2; hence thesis by A10,Th5; end; hence thesis by A1,SETFAM_1:def 1; end; then field XX = X & dom XX = X by ORDERS_1:13; hence thesis by A3,A5,PARTFUN1:def 2,RELAT_2:def 11,def 16; end; theorem Th12: for R holds ex EqR st R c= EqR & for EqR2 st R c= EqR2 holds EqR c= EqR2 proof let R; defpred P[set] means $1 is Equivalence_Relation of X & R c= $1; consider F being Subset-Family of [:X,X:] such that A1: for AX holds AX in F iff P[AX] from SUBSET_1:sch 3; R c= nabla X; then A2: F <> {} by A1; for Y st Y in F holds Y is Equivalence_Relation of X by A1; then reconsider EqR = meet F as Equivalence_Relation of X by A2,Th11; A3: now let EqR2; assume R c= EqR2; then EqR2 in F by A1; hence EqR c= EqR2 by SETFAM_1:3; end; take EqR; for Y st Y in F holds R c= Y by A1; hence thesis by A2,A3,SETFAM_1:5; end; definition let X; let EqR1,EqR2; func EqR1 "\/" EqR2 -> Equivalence_Relation of X means :Def2: EqR1 \/ EqR2 c= it & for EqR st EqR1 \/ EqR2 c= EqR holds it c= EqR; existence by Th12; uniqueness proof let R1,R2 be Equivalence_Relation of X; assume EqR1 \/ EqR2 c= R1 & ( for EqR st EqR1 \/ EqR2 c= EqR holds R1 c= EqR)& EqR1 \/ EqR2 c= R2 & for EqR st EqR1 \/ EqR2 c= EqR holds R2 c= EqR; then R1 c= R2 & R2 c= R1; hence thesis by XBOOLE_0:def 10; end; commutativity; idempotence; end; theorem (EqR1 "\/" EqR2) "\/" EqR3 = EqR1 "\/" (EqR2 "\/" EqR3) proof for EqR4 be Equivalence_Relation of X holds EqR4 = EqR1 "\/" (EqR2 "\/" EqR3) implies (EqR1 "\/" EqR2) "\/" EqR3 c= EqR4 proof let EqR4 be Equivalence_Relation of X; A1: EqR2 \/ EqR3 c= EqR2 "\/" EqR3 by Def2; assume EqR4 = EqR1 "\/" (EqR2 "\/" EqR3); then A2: EqR1 \/ (EqR2 "\/" EqR3) c= EqR4 by Def2; EqR2 "\/" EqR3 c= EqR1 \/ (EqR2 "\/" EqR3) by XBOOLE_1:7; then EqR2 "\/" EqR3 c= EqR4 by A2,XBOOLE_1:1; then A3: EqR2 \/ EqR3 c= EqR4 by A1,XBOOLE_1:1; EqR2 c= EqR2 \/ EqR3 by XBOOLE_1:7; then A4: EqR2 c= EqR4 by A3,XBOOLE_1:1; EqR1 c= EqR1 \/ (EqR2 "\/" EqR3) by XBOOLE_1:7; then EqR1 c= EqR4 by A2,XBOOLE_1:1; then EqR1 \/ EqR2 c= EqR4 by A4,XBOOLE_1:8; then A5: EqR1 "\/" EqR2 c= EqR4 by Def2; EqR3 c= EqR2 \/ EqR3 by XBOOLE_1:7; then EqR3 c= EqR4 by A3,XBOOLE_1:1; then (EqR1 "\/" EqR2) \/ EqR3 c= EqR4 by A5,XBOOLE_1:8; hence thesis by Def2; end; then A6: (EqR1 "\/" EqR2) "\/" EqR3 c= EqR1 "\/" (EqR2 "\/" EqR3); for EqR4 be Equivalence_Relation of X holds EqR4 = (EqR1 "\/" EqR2) "\/" EqR3 implies EqR1 "\/" (EqR2 "\/" EqR3) c= EqR4 proof let EqR4 be Equivalence_Relation of X; A7: EqR1 \/ EqR2 c= EqR1 "\/" EqR2 by Def2; assume EqR4 = (EqR1 "\/" EqR2) "\/" EqR3; then A8: (EqR1 "\/" EqR2) \/ EqR3 c= EqR4 by Def2; EqR1 "\/" EqR2 c= (EqR1 "\/" EqR2) \/ EqR3 by XBOOLE_1:7; then EqR1 "\/" EqR2 c= EqR4 by A8,XBOOLE_1:1; then A9: EqR1 \/ EqR2 c= EqR4 by A7,XBOOLE_1:1; EqR3 c= (EqR1 "\/" EqR2) \/ EqR3 by XBOOLE_1:7; then A10: EqR3 c= EqR4 by A8,XBOOLE_1:1; EqR2 c= EqR1 \/ EqR2 by XBOOLE_1:7; then EqR2 c= EqR4 by A9,XBOOLE_1:1; then EqR2 \/ EqR3 c= EqR4 by A10,XBOOLE_1:8; then A11: EqR2 "\/" EqR3 c= EqR4 by Def2; EqR1 c= EqR1 \/ EqR2 by XBOOLE_1:7; then EqR1 c= EqR4 by A9,XBOOLE_1:1; then EqR1 \/ (EqR2 "\/" EqR3) c= EqR4 by A11,XBOOLE_1:8; hence thesis by Def2; end; then EqR1 "\/" (EqR2 "\/" EqR3) c= (EqR1 "\/" EqR2) "\/" EqR3; hence thesis by A6,XBOOLE_0:def 10; end; theorem EqR "\/" EqR = EqR; theorem EqR1 "\/" EqR2 = EqR2 "\/" EqR1; theorem EqR1 /\ (EqR1 "\/" EqR2) = EqR1 proof thus EqR1 /\ (EqR1 "\/" EqR2) c= EqR1 by XBOOLE_1:17; EqR1 c= EqR1 \/ EqR2 & EqR1 \/ EqR2 c= EqR1 "\/" EqR2 by Def2,XBOOLE_1:7; then EqR1 c= EqR1 "\/" EqR2 by XBOOLE_1:1; hence thesis by XBOOLE_1:19; end; theorem EqR1 "\/" (EqR1 /\ EqR2) = EqR1 proof EqR1 = EqR1 \/ (EqR1 /\ EqR2) & for EqR st EqR1 \/ (EqR1 /\ EqR2) c= EqR holds EqR1 c= EqR by XBOOLE_1:22; hence thesis by Def2; end; scheme ExEqRel {X() -> set,P[set,set]}: ex EqR being Equivalence_Relation of X() st for x,y holds [x,y] in EqR iff x in X() & y in X() & P[x,y] provided A1: for x st x in X() holds P[x,x] and A2: for x,y st P[x,y] holds P[y,x] and A3: for x,y,z st P[x,y] & P[y,z] holds P[x,z] proof consider Y being Relation of X(),X() such that A4: for x,y holds [x,y] in Y iff x in X() & y in X() & P[x,y] from RELSET_1:sch 1; A5: Y is_transitive_in X() proof let x,y,z; assume that A6: x in X() and y in X() and A7: z in X() and A8: [x,y] in Y & [y,z] in Y; ( P[x,y])& P[y,z] by A4,A8; then P[x,z] by A3; hence thesis by A4,A6,A7; end; A9: Y is_symmetric_in X() proof let x,y; assume that A10: x in X() & y in X() and A11: [x,y] in Y; P[x,y] by A4,A11; then P[y,x] by A2; hence thesis by A4,A10; end; Y is_reflexive_in X() proof let x; assume A12: x in X(); then P[x,x] by A1; hence thesis by A4,A12; end; then field Y = X() & dom Y = X() by ORDERS_1:13; then reconsider R1 = Y as Equivalence_Relation of X() by A9,A5,PARTFUN1:def 2 ,RELAT_2:def 11,def 16; take R1; thus thesis by A4; end; notation let R be Relation, x be set; synonym Class(R,x) for Im(R,x); end; definition let X, Y be set, R be Relation of X, Y, x be set; redefine func Class(R,x) -> Subset of Y; coherence proof R.:{x} c= Y; hence thesis; end; end; theorem for R being Relation holds y in Class (R,x) iff [x,y] in R proof let R be Relation; thus y in Class(R,x) implies [x,y] in R proof assume y in Class(R,x); then ex z being set st [z,y] in R & z in {x} by RELAT_1:def 13; hence thesis by TARSKI:def 1; end; A1: x in {x} by TARSKI:def 1; assume [x,y] in R; hence thesis by A1,RELAT_1:def 13; end; theorem Th19: for R being total symmetric Relation of X holds y in Class (R,x) iff [y,x] in R proof let R be total symmetric Relation of X; thus y in Class(R,x) implies [y,x] in R proof assume y in Class(R,x); then ex z being set st [z,y] in R & z in {x} by RELAT_1:def 13; then [x,y] in R by TARSKI:def 1; hence thesis by Th6; end; assume [y,x] in R; then A1: [x,y] in R by Th6; x in {x} by TARSKI:def 1; hence thesis by A1,RELAT_1:def 13; end; theorem Th20: for R being Tolerance of X holds for x st x in X holds x in Class (R,x) proof let R be Tolerance of X; let x; assume x in X; then [x,x] in R by Th5; hence thesis by Th19; end; theorem for R being Tolerance of X holds for x st x in X holds ex y st x in Class(R,y) proof let R be Tolerance of X; let x; assume x in X; then x in Class(R,x) by Th20; hence thesis; end; theorem for R being transitive Tolerance of X holds y in Class(R,x) & z in Class(R,x) implies [y,z] in R proof let R be transitive Tolerance of X; assume that A1: y in Class(R,x) and A2: z in Class(R,x); [z,x] in R by A2,Th19; then A3: [x,z] in R by Th6; [y,x] in R by A1,Th19; hence thesis by A3,Th7; end; Lm2: for x st x in X holds [x,y] in EqR iff Class(EqR,x) = Class(EqR,y) proof let x such that A1: x in X; thus [x,y] in EqR implies Class(EqR,x) = Class(EqR,y) proof assume A2: [x,y] in EqR; now let z; assume z in Class(EqR,y); then A3: [z,y] in EqR by Th19; [y,x] in EqR by A2,Th6; then [z,x] in EqR by A3,Th7; hence z in Class(EqR,x) by Th19; end; then A4: Class(EqR,y) c= Class(EqR,x) by TARSKI:def 3; now let z; assume z in Class(EqR,x); then [z,x] in EqR by Th19; then [z,y] in EqR by A2,Th7; hence z in Class(EqR,y) by Th19; end; then Class(EqR,x) c= Class(EqR,y) by TARSKI:def 3; hence thesis by A4,XBOOLE_0:def 10; end; assume Class(EqR,x) = Class(EqR,y); then x in Class(EqR,y) by A1,Th20; hence thesis by Th19; end; theorem Th23: for x st x in X holds y in Class(EqR,x) iff Class(EqR,x) = Class (EqR,y) proof let x such that A1: x in X; thus y in Class(EqR,x) implies Class(EqR,x) = Class(EqR,y) proof assume y in Class(EqR,x); then [y,x] in EqR by Th19; then [x,y] in EqR by Th6; hence thesis by A1,Lm2; end; assume Class(EqR,x) = Class(EqR,y); then [x,y] in EqR by A1,Lm2; then [y,x] in EqR by Th6; hence thesis by Th19; end; theorem Th24: for x,y st y in X holds Class(EqR,x) = Class(EqR,y) or Class(EqR ,x) misses Class(EqR,y) proof let x,y; A1: not [x,y] in EqR implies Class(EqR,x) misses Class(EqR,y) proof assume A2: not [x,y] in EqR; assume Class(EqR,x) meets Class(EqR,y); then consider z such that A3: z in Class(EqR,x) and A4: z in Class(EqR,y) by XBOOLE_0:3; [z,x] in EqR by A3,Th19; then A5: [x,z] in EqR by Th6; [z,y] in EqR by A4,Th19; hence contradiction by A2,A5,Th7; end; assume A6: y in X; [x,y] in EqR implies Class(EqR,x) = Class(EqR,y) proof assume [x,y] in EqR; then x in Class(EqR,y) by Th19; hence thesis by A6,Th23; end; hence thesis by A1; end; theorem Th25: for x st x in X holds Class(id X,x) = {x} proof let x; A1: now let y; assume y in Class(id X,x); then [y,x] in id X by Th19; hence y = x by RELAT_1:def 10; end; assume x in X; then for y holds y in Class(id X,x) iff y = x by A1,Th20; hence thesis by TARSKI:def 1; end; theorem Th26: for x st x in X holds Class(nabla X,x) = X proof let x such that A1: x in X; now let y; assume y in X; then [y,x] in nabla X by A1,ZFMISC_1:87; hence y in Class(nabla X,x) by Th19; end; then for y holds y in X iff y in Class(nabla X,x); hence thesis by TARSKI:1; end; theorem Th27: (ex x st Class(EqR,x) = X) implies EqR = nabla X proof given x such that A1: Class(EqR,x) = X; [:X,X:] c= EqR proof let y,z; assume A2: [y,z] in [:X,X:]; then z in Class(EqR,x) by A1,ZFMISC_1:87; then [z,x] in EqR by Th19; then A3: [x,z] in EqR by Th6; y in Class(EqR,x) by A1,A2,ZFMISC_1:87; then [y,x] in EqR by Th19; hence thesis by A3,Th7; end; hence thesis by XBOOLE_0:def 10; end; theorem x in X implies ([x,y] in EqR1 "\/" EqR2 iff ex f being FinSequence st 1 <= len f & x = f.1 & y = f.(len f) & for i st 1 <= i & i < len f holds [f.i,f .(i+1)] in EqR1 \/ EqR2) proof assume A1: x in X; thus [x,y] in EqR1 "\/" EqR2 implies ex f being FinSequence st 1 <= len f & x = f.1 & y = f.(len f) & for i st 1 <= i & i < len f holds [f.i,f.(i+1)] in EqR1 \/ EqR2 proof defpred P[set,set] means ex f being FinSequence st (1 <= len f & $1 = f.1 & $2 = f.(len f) & for i st 1 <= i & i < len f holds [f.i,f.(i+1)] in EqR1 \/ EqR2); consider Y being Relation of X,X such that A2: for x,y holds [x,y] in Y iff x in X & y in X & P[x,y] from RELSET_1:sch 1; A3: Y is_transitive_in X proof let x,y,z; assume that A4: x in X and A5: y in X and A6: z in X and A7: [x,y] in Y and A8: [y,z] in Y; consider g being FinSequence such that A9: 1 <= len g and A10: y = g.1 and A11: z = g.(len g) and A12: for i st 1 <= i & i < len g holds [g.i,g.(i+1)] in EqR1 \/ EqR2 by A2,A8; consider f being FinSequence such that A13: 1 <= len f and A14: x = f.1 and A15: y = f.(len f) and A16: for i st 1 <= i & i < len f holds [f.i,f.(i+1)] in EqR1 \/ EqR2 by A2,A7; set h = f^g; A17: len h = len f + len g by FINSEQ_1:22; A18: len f + 1 <= len f + len g by A9,XREAL_1:7; then A19: h.(len h) = g.(len g + len f - len f) by A17,FINSEQ_1:23 .= g.(len g); A20: for i st 1 <= i & i < len h holds [h.i,h.(i+1)] in EqR1 \/ EqR2 proof let i; assume that A21: 1 <= i and A22: i < len h; A23: 1 <= i & i < len f or i = len f or len f < i by A21,XXREAL_0:1; now per cases by A22,A23,NAT_1:13; suppose A24: 1 <= i & i < len f; then 1 <= i + 1 & i + 1 <= len f by NAT_1:13; then i + 1 in Seg len f by FINSEQ_1:1; then i + 1 in dom f by FINSEQ_1:def 3; then A25: h.(i + 1) = f.(i + 1) by FINSEQ_1:def 7; i in Seg(len f) by A24,FINSEQ_1:1; then i in dom f by FINSEQ_1:def 3; then h.i = f.i by FINSEQ_1:def 7; hence thesis by A16,A24,A25; end; suppose A26: i = len f; len f in Seg len f by A13,FINSEQ_1:1; then len f in dom f by FINSEQ_1:def 3; then A27: h.i = y by A15,A26,FINSEQ_1:def 7; A28: [y,y] in EqR1 by A5,Th5; h.(i + 1) = g.(1 + len f - len f) by A18,A26,FINSEQ_1:23 .= y by A10; hence thesis by A27,A28,XBOOLE_0:def 3; end; suppose A29: len f + 1 <= i & i < len h; then len f < i by NAT_1:13; then reconsider k = i - len f as Element of NAT by NAT_1:21; i < len f + len g by A29,FINSEQ_1:22; then A30: i - len f < len g by XREAL_1:19; len f + 1 <= i + 1 & i + 1 <= len f + len g by A17,A29,NAT_1:13; then A31: h.(i + 1) = g.(1 + i - len f) by FINSEQ_1:23 .= g.((i - len f) + 1); 1 + len f - len f <= i - len f by A29,XREAL_1:9; then [g.k,g.(k + 1)] in EqR1 \/ EqR2 by A12,A30; hence thesis by A17,A29,A31,FINSEQ_1:23; end; end; hence thesis; end; 1 in Seg(len f) by A13,FINSEQ_1:1; then 1 in dom f by FINSEQ_1:def 3; then A32: x = h.1 by A14,FINSEQ_1:def 7; 1 <= len h by A13,A17,NAT_1:12; hence thesis by A2,A4,A6,A11,A32,A19,A20; end; A33: Y is_symmetric_in X proof let x,y; assume that A34: x in X & y in X and A35: [x,y] in Y; consider f being FinSequence such that A36: 1 <= len f and A37: x = f.1 and A38: y = f.(len f) and A39: for i st 1 <= i & i < len f holds [f.i,f.(i+1)] in EqR1 \/ EqR2 by A2,A35; defpred P[Nat,set] means $2 = f.(1 + (len f) - $1); A40: for k be Nat st k in Seg(len f) ex z st P[k,z]; consider g being FinSequence such that A41: dom g = Seg(len f) & for k being Nat st k in Seg(len f) holds P [k,g.k] from FINSEQ_1:sch 1(A40); A42: len f = len g by A41,FINSEQ_1:def 3; A43: for j st 1 <= j & j < len g holds [g.j,g.(j+1)] in EqR1 \/ EqR2 proof let j; assume that A44: 1 <= j and A45: j < len g; reconsider k = (len f) - j as Element of NAT by A42,A45,NAT_1:21; j - (len f) < (len f) - (len f) by A42,A45,XREAL_1:9; then - ((len f) - j) < - 0; then 0 < k; then A46: 0 + 1 <= k by NAT_1:13; - j < -0 by A44,XREAL_1:24; then (len f) + -j < 0 + (len f) by XREAL_1:6; then A47: [f.k,f.(k + 1)] in EqR1 \/ EqR2 by A39,A46; A48: now per cases by A47,XBOOLE_0:def 3; suppose [f.k,f.(k + 1)] in EqR1; then [f.(k + 1),f.k] in EqR1 by Th6; hence [f.(k + 1),f.k] in EqR1 \/ EqR2 by XBOOLE_0:def 3; end; suppose [f.k,f.(k + 1)] in EqR2; then [f.(k + 1),f.k] in EqR2 by Th6; hence [f.(k + 1),f.k] in EqR1 \/ EqR2 by XBOOLE_0:def 3; end; end; 1 <= (j + 1) & (j + 1) <= len f by A42,A45,NAT_1:12,13; then (j + 1) in Seg(len f) by FINSEQ_1:1; then A49: g.(j + 1) = f.((len f) + 1 - (1 + j)) by A41 .= f.((len f) - j); j in Seg(len f) by A42,A44,A45,FINSEQ_1:1; then g.j = f.(1 + (len f) - j) by A41 .= f.(((len f) - j) + 1); hence thesis by A49,A48; end; len f in Seg(len f) by A36,FINSEQ_1:1; then g.(len f) = f.(1 + (len f) - len f) by A41 .= f.(1 + 0); then A50: x = g.(len g) by A37,A41,FINSEQ_1:def 3; 1 in Seg(len f) by A36,FINSEQ_1:1; then A51: g.1 = f.((len f) + 1 - 1) by A41 .= f.(len f); 1 <= len g by A36,A41,FINSEQ_1:def 3; hence thesis by A2,A34,A38,A51,A50,A43; end; Y is_reflexive_in X proof let x such that A52: x in X; set g = <*x*>; A53: for i st 1 <= i & i < len g holds [g.i,g.(i+1)] in EqR1 \/ EqR2 by FINSEQ_1:40; len g = 1 & g.1 = x by FINSEQ_1:40; hence thesis by A2,A52,A53; end; then field Y = X & dom Y = X by ORDERS_1:13; then reconsider R1 = Y as Equivalence_Relation of X by A33,A3, PARTFUN1:def 2,RELAT_2:def 11,def 16; for x,y holds [x,y] in EqR1 \/ EqR2 implies [x,y] in R1 proof let x,y; assume A54: [x,y] in EqR1 \/ EqR2; set g = <*x,y*>; A55: len g = 1 + 1 by FINSEQ_1:44; A56: g.1 = x by FINSEQ_1:44; A57: for i st 1 <= i & i < len g holds [g.i,g.(i+1)] in EqR1 \/ EqR2 proof let i; assume that A58: 1 <= i and A59: i < len g; i <= 1 by A55,A59,NAT_1:13; then 1 = i by A58,XXREAL_0:1; hence thesis by A54,A56,FINSEQ_1:44; end; len g = 2 by FINSEQ_1:44; then A60: g.1 = x & g.(len g) = y by FINSEQ_1:44; x in X & y in X by A54,Lm1; hence thesis by A2,A55,A60,A57; end; then EqR1 \/ EqR2 c= R1 by RELAT_1:def 3; then A61: EqR1 "\/" EqR2 c= R1 by Def2; assume [x,y] in EqR1 "\/" EqR2; then consider f being FinSequence such that A62: 1 <= len f & x = f.1 &( y = f.(len f) & for i st 1 <= i & i < len f holds [f.i,f.(i+1)] in EqR1 \/ EqR2 ) by A2,A61; take f; thus thesis by A62; end; given f being FinSequence such that A63: 1 <= len f and A64: x = f.1 and A65: y = f.(len f) and A66: for i st 1 <= i & i < len f holds [f.i,f.(i+1)] in EqR1 \/ EqR2; defpred P[Element of NAT] means 1 <= $1 & $1 <= len f implies [f.1,f.$1] in EqR1 "\/" EqR2; A67: now let i; assume A68: P[i]; thus P[i+1] proof assume that A69: 1 <= i + 1 and A70: i + 1 <= len f; A71: 1 <= i or 1 = i + 1 by A69,NAT_1:8; A72: EqR1 \/ EqR2 c= EqR1 "\/" EqR2 by Def2; A73: i < len f by A70,NAT_1:13; now per cases by A71; suppose A74: 1 <= i; then [f.i,f.(i+1)] in EqR1 \/ EqR2 by A66,A73; hence thesis by A68,A70,A72,A74,Th7,NAT_1:13; end; suppose A75: 0 = i; [f.1,f.1] in EqR1 by A1,A64,Th5; then [f.1,f.1] in EqR1 \/ EqR2 by XBOOLE_0:def 3; hence thesis by A72,A75; end; end; hence thesis; end; end; A76: P[0]; for i holds P[i] from NAT_1:sch 1(A76,A67); hence thesis by A63,A64,A65; end; theorem Th29: for E being Equivalence_Relation of X st E = EqR1 \/ EqR2 holds for x st x in X holds Class(E,x) = Class(EqR1,x) or Class(E,x) = Class(EqR2,x) proof let E be Equivalence_Relation of X such that A1: E = EqR1 \/ EqR2; for x st x in X holds Class(E,x) = Class(EqR1,x) or Class(E,x) = Class( EqR2,x) proof let x such that x in X; assume that A2: not Class(E,x) = Class(EqR1,x) and A3: not Class(E,x) = Class(EqR2,x); consider y such that A4: y in Class(E,x) & not y in Class(EqR1,x) or y in Class(EqR1,x) & not y in Class(E,x) by A2,TARSKI:1; A5: now assume that A6: y in Class(EqR1,x) and A7: not y in Class(E,x); [y,x] in EqR1 by A6,Th19; then [y,x] in E by A1,XBOOLE_0:def 3; hence contradiction by A7,Th19; end; then A8: [y,x] in E by A4,Th19; consider z such that A9: z in Class(E,x) & not z in Class(EqR2,x) or z in Class(EqR2,x) & not z in Class(E,x) by A3,TARSKI:1; A10: now assume that A11: z in Class(EqR2,x) and A12: not z in Class(E,x); [z,x] in EqR2 by A11,Th19; then [z,x] in E by A1,XBOOLE_0:def 3; hence contradiction by A12,Th19; end; then A13: [z,x] in E by A9,Th19; not [z,x] in EqR2 by A9,A10,Th19; then A14: [z,x] in EqR1 by A1,A13,XBOOLE_0:def 3; A15: now assume [y,z] in EqR1; then A16: [z,y] in EqR1 by Th6; [x,z] in EqR1 by A14,Th6; then [x,y] in EqR1 by A16,Th7; then [y,x] in EqR1 by Th6; hence contradiction by A4,A5,Th19; end; not [y,x] in EqR1 by A4,A5,Th19; then A17: [y,x] in EqR2 by A1,A8,XBOOLE_0:def 3; A18: now assume A19: [y,z] in EqR2; [x,y] in EqR2 by A17,Th6; then [x,z] in EqR2 by A19,Th7; then [z,x] in EqR2 by Th6; hence contradiction by A9,A10,Th19; end; [x,z] in E by A13,Th6; then [y,z] in E by A8,Th7; hence contradiction by A1,A18,A15,XBOOLE_0:def 3; end; hence thesis; end; theorem EqR1 \/ EqR2 = nabla X implies EqR1 = nabla X or EqR2 = nabla X proof assume A1: EqR1 \/ EqR2 = nabla X; (not X = {}) implies EqR1 = nabla X or EqR2 = nabla X proof set y = the Element of X; A2: now let x; assume A3: x in X; then Class(nabla X,x) = Class(EqR1,x) or Class(nabla X,x) = Class(EqR2,x) by A1,Th29; hence Class(EqR1,x) = X or Class(EqR2,x) = X by A3,Th26; end; assume X <> {}; then Class(EqR1,y) = X or Class(EqR2,y) = X by A2; hence thesis by Th27; end; hence thesis; end; definition let X; let EqR; func Class EqR -> Subset-Family of X means :Def3: A in it iff ex x st x in X & A = Class(EqR,x); existence proof defpred P[set] means ex x st x in X & $1 = Class(EqR,x); consider F being Subset-Family of X such that A1: for A holds A in F iff P[A] from SUBSET_1:sch 3; take F; thus thesis by A1; end; uniqueness proof let F1,F2 be Subset-Family of X; assume that A2: for A holds A in F1 iff ex x st x in X & A = Class(EqR,x) and A3: for A holds A in F2 iff ex x st x in X & A = Class(EqR,x); now let A; A in F1 iff ex x st x in X & A = Class(EqR,x) by A2; hence A in F1 iff A in F2 by A3; end; hence thesis by SETFAM_1:31; end; end; theorem Th31: X = {} implies Class EqR = {} proof assume that A1: X = {} and A2: Class EqR <> {}; set z = the Element of Class EqR; z is Subset of X by A2,TARSKI:def 3; then ex x st x in X & z = Class(EqR,x) by A2,Def3; hence contradiction by A1; end; definition let X; mode a_partition of X -> Subset-Family of X means :Def4: union it = X & for A st A in it holds A<>{} & for B st B in it holds A = B or A misses B; existence proof defpred P[set] means ex x st x in X & $1 = {x}; consider F being Subset-Family of X such that A1: for A being Subset of X holds A in F iff P[A] from SUBSET_1:sch 3; A2: for A st A in F holds A<>{} & for B st B in F holds A = B or A misses B proof let A; assume A in F; then consider x such that x in X and A3: A = {x} by A1; thus A <> {} by A3; let B; assume B in F; then consider y such that y in X and A4: B = {y} by A1; now assume A5: not x = y; for z st z in A holds not z in B proof let z; assume z in A; then not z = y by A3,A5,TARSKI:def 1; hence thesis by A4,TARSKI:def 1; end; hence A misses B by XBOOLE_0:3; end; hence thesis by A3,A4; end; take F; now let y; now set Z = {y}; assume A6: y in X; then Z is Subset of X by ZFMISC_1:31; then y in Z & Z in F by A1,A6,TARSKI:def 1; hence ex Z st y in Z & Z in F; end; hence y in X iff ex Z st y in Z & Z in F; end; hence thesis by A2,TARSKI:def 4; end; end; theorem Th32: for P being a_partition of {} holds P = {} proof let P be a_partition of {}; assume not thesis; then consider Z being set such that A1: Z in P by XBOOLE_0:def 1; Z <> {} by A1,Def4; hence thesis by A1; end; theorem Th33: Class EqR is a_partition of X proof now let x; now consider Z such that A1: Z = Class(EqR,x); assume A2: x in X; then Z in Class EqR by A1,Def3; hence ex Z st x in Z & Z in Class EqR by A2,A1,Th20; end; hence x in X iff ex Z st x in Z & Z in Class EqR; end; hence union(Class EqR) = X by TARSKI:def 4; let A; assume A in Class EqR; then A3: ex x st x in X & A = Class(EqR,x) by Def3; hence A <> {} by Th20; let B; assume B in Class EqR; then ex y st y in X & B = Class(EqR,y) by Def3; hence thesis by A3,Th24; end; theorem Th34: for P being a_partition of X holds ex EqR st P = Class EqR proof let P be a_partition of X; A1: X <> {} implies ex EqR st P = Class EqR proof defpred P[set,set] means ex A st A in P & $1 in A & $2 in A; assume X <> {}; A2: for x,y,z st P[x,y] & P[y,z] holds P[x,z] proof let x,y,z; given A such that A3: A in P and A4: x in A & y in A; given B such that A5: B in P and A6: y in B & z in B; A = B or A misses B by A3,A5,Def4; hence thesis by A3,A4,A6,XBOOLE_0:3; end; A7: union P = X by Def4; A8: for x st x in X holds P[x,x] proof let x; assume x in X; then consider Z such that A9: x in Z and A10: Z in P by A7,TARSKI:def 4; reconsider A = Z as Subset of X by A10; take A; thus thesis by A9,A10; end; A11: for x,y st P[x,y] holds P[y,x]; consider R being Equivalence_Relation of X such that A12: for x,y holds [x,y] in R iff x in X & y in X & P[x,y] from ExEqRel(A8,A11,A2); take R; now let A; A13: now set x = the Element of A; assume A14: A in P; then A15: A <> {} by Def4; then A16: x in X by TARSKI:def 3; now let y; A17: now assume y in Class(R,x); then [y,x] in R by Th19; then consider B such that A18: B in P & y in B and A19: x in B by A12; A meets B by A15,A19,XBOOLE_0:3; hence y in A by A14,A18,Def4; end; now assume y in A; then [y,x] in R by A12,A14,A16; hence y in Class(R,x) by Th19; end; hence y in A iff y in Class(R,x) by A17; end; then A = Class(R,x) by TARSKI:1; hence A in Class R by A16,Def3; end; now assume A in Class R; then consider x such that A20: x in X and A21: A = Class(R,x) by Def3; x in Class(R,x) by A20,Th20; then [x,x] in R by Th19; then consider B such that A22: B in P and A23: x in B and x in B by A12; now let y; A24: now assume y in A; then [y,x] in R by A21,Th19; then consider C such that A25: C in P & y in C and A26: x in C by A12; B meets C by A23,A26,XBOOLE_0:3; hence y in B by A22,A25,Def4; end; now assume y in B; then [y,x] in R by A12,A22,A23; hence y in A by A21,Th19; end; hence y in A iff y in B by A24; end; hence A in P by A22,TARSKI:1; end; hence A in P iff A in Class R by A13; end; hence thesis by SETFAM_1:31; end; X = {} implies ex EqR st P = Class EqR proof set EqR1 = the Equivalence_Relation of X; assume A27: X = {}; take EqR1; P = {} by A27,Th32; hence thesis by A27,Th31; end; hence thesis by A1; end; theorem for x st x in X holds [x,y] in EqR iff Class(EqR,x) = Class(EqR,y) by Lm2; theorem x in Class EqR implies ex y being Element of X st x = Class(EqR,y) proof assume A1: x in Class EqR; then reconsider x as Subset of X; consider y such that A2: y in X and A3: x = Class(EqR,y) by A1,Def3; reconsider y as Element of X by A2; take y; thus thesis by A3; end; begin registration let X be non empty set; cluster -> non empty for a_partition of X; coherence proof set x = the Element of X; let P be a_partition of X; union P = X by Def4; then ex A being set st x in A & A in P by TARSKI:def 4; hence thesis; end; end; registration let X be set; cluster -> with_non-empty_elements for a_partition of X; coherence proof let P be a_partition of X; assume {} in P; hence contradiction by Def4; end; end; definition let X be set, R be Equivalence_Relation of X; redefine func Class R -> a_partition of X; coherence by Th33; end; registration let I be non empty set, R be Equivalence_Relation of I; cluster Class R -> non empty; coherence; end; registration let I be non empty set, R be Equivalence_Relation of I; cluster Class R -> with_non-empty_elements; coherence; end; notation let I be non empty set, R be Equivalence_Relation of I; let x be Element of I; synonym EqClass(R,x) for Class(R,x); end; definition let I be non empty set, R be Equivalence_Relation of I; let x be Element of I; redefine func EqClass(R,x) -> Element of Class R; coherence proof thus Class(R,x) is Element of Class R by Def3; end; end; definition let X be set; func SmallestPartition X -> a_partition of X equals Class id X; coherence; end; theorem for X being non empty set holds SmallestPartition X = {{x} where x is Element of X: not contradiction} proof let X be non empty set; set Y = {{x} where x is Element of X: not contradiction}; hereby let x be set; assume x in SmallestPartition X; then consider y being set such that A1: y in X and A2: x = Class(id X, y) by Def3; x = {y} by A1,A2,Th25; hence x in Y by A1; end; let x be set; assume x in Y; then consider y being Element of X such that A3: x = {y}; Class(id X, y) = x by A3,Th25; hence thesis by Def3; end; reserve X for non empty set, x for Element of X; definition let X be non empty set,x be Element of X,S1 be a_partition of X; func EqClass(x,S1) -> Subset of X means :Def6: x in it & it in S1; existence proof consider EQR being Equivalence_Relation of X such that A1: S1 = Class EQR by Th34; take Class(EQR,x); thus x in Class(EQR,x) by Th20; thus thesis by A1,Def3; end; uniqueness proof let A,B be Subset of X; assume that A2: x in A and A3: A in S1 and A4: x in B and A5: B in S1; A meets B by A2,A4,XBOOLE_0:3; hence thesis by A3,A5,Def4; end; end; theorem Th38: for S1,S2 being a_partition of X st (for x being Element of X holds EqClass(x,S1) = EqClass(x,S2)) holds S1=S2 proof let S1,S2 be a_partition of X; assume A1: for x being Element of X holds EqClass(x,S1) = EqClass(x,S2); now let P be Subset of X; thus P in S1 implies P in S2 proof set x = the Element of P; assume A2: P in S1; then A3: P is non empty by Def4; then x in P; then reconsider x as Element of X; P = EqClass(x,S1) by A2,A3,Def6; then P = EqClass(x,S2) by A1; hence thesis by Def6; end; thus P in S2 implies P in S1 proof set x = the Element of P; assume A4: P in S2; then A5: P <> {} by Def4; then x in P; then reconsider x as Element of X; P = EqClass(x,S2) by A4,A5,Def6; then P = EqClass(x,S1) by A1; hence thesis by Def6; end; end; hence thesis by SETFAM_1:31; end; theorem Th39: for X being non empty set holds {X} is a_partition of X proof let X be non empty set; reconsider A1 = {X} as Subset-Family of X by ZFMISC_1:68; A1: for A being Subset of X st A in A1 holds A <> {} & for B being Subset of X st B in A1 holds A = B or A misses B proof let A be Subset of X; assume A2: A in A1; hence A <> {} by TARSKI:def 1; let B be Subset of X; assume B in A1; then B = X by TARSKI:def 1; hence thesis by A2,TARSKI:def 1; end; union A1 = X by ZFMISC_1:25; hence thesis by A1,Def4; end; definition let X be set; mode Family-Class of X is Subset-Family of bool X; end; definition let X be set; let F be Family-Class of X; attr F is partition-membered means :Def7: for S being set st S in F holds S is a_partition of X; end; registration let X be set; cluster partition-membered for Family-Class of X; existence proof reconsider E = {} as Family-Class of X by XBOOLE_1:2; take E; let S be set; assume S in E; hence thesis; end; end; definition let X be set; mode Part-Family of X is partition-membered Family-Class of X; end; reserve F for Part-Family of X; registration let X be non empty set; cluster non empty for a_partition of X; existence proof take {X}; thus thesis by Th39; end; end; theorem Th40: for X being set, p being a_partition of X holds {p} is Part-Family of X proof let X be set; let p be a_partition of X; for x be set st x in {p} holds x is a_partition of X by TARSKI:def 1; hence thesis by Def7; end; registration let X be set; cluster non empty for Part-Family of X; existence proof set p = the a_partition of X; reconsider P = {p} as Part-Family of X by Th40; take P; thus thesis; end; end; theorem Th41: for S1 being a_partition of X, x,y being Element of X holds EqClass(x,S1) meets EqClass(y,S1) implies EqClass(x,S1) = EqClass(y,S1) proof let S1 be a_partition of X; let x,y be Element of X; consider EQR being Equivalence_Relation of X such that A1: S1 = Class EQR by Th34; A2: y in Class(EQR,y) by Th20; Class(EQR,y) in S1 by A1,Def3; then A3: Class(EQR,y) = EqClass(y,S1) by A2,Def6; A4: x in Class(EQR,x) by Th20; Class(EQR,x) in S1 by A1,Def3; then A5: Class(EQR,x) = EqClass(x,S1) by A4,Def6; assume EqClass(x,S1) meets EqClass(y,S1); hence thesis by A5,A3,Th24; end; Lm3: for A being set holds A in {EqClass(x,S) where S is a_partition of X : S in F} implies ex T being a_partition of X st T in F & A = EqClass(x,T) proof let A be set; assume A in {EqClass(x,S) where S is a_partition of X : S in F}; then consider S being a_partition of X such that A1: A = EqClass(x,S) & S in F; take S; thus thesis by A1; end; theorem for A being set,X being non empty set,S being a_partition of X holds A in S implies ex x being Element of X st A = EqClass(x,S) proof let A be set,X be non empty set,S be a_partition of X; assume A1: A in S; then A is non empty by Def4; then consider x being set such that A2: x in A by XBOOLE_0:def 1; take x; thus thesis by A1,A2,Def6; end; definition let X be non empty set,F be non empty Part-Family of X; func Intersection F -> non empty a_partition of X means for x being Element of X holds EqClass(x,it) = meet{EqClass(x,S) where S is a_partition of X : S in F}; uniqueness proof given S1,S2 being a_partition of X such that A1: for x being Element of X holds EqClass(x,S1) = meet{EqClass(x,S) where S is a_partition of X : S in F} and A2: for x being Element of X holds EqClass(x,S2) = meet{EqClass(x,S) where S is a_partition of X : S in F} and A3: not S1 = S2; now let x be Element of X; EqClass(x,S1) = meet{EqClass(x,S) where S is a_partition of X : S in F} by A1; hence EqClass(x,S1) = EqClass(x,S2) by A2; end; hence contradiction by A3,Th38; end; existence proof thus ex G being non empty a_partition of X st for x being Element of X holds EqClass(x,G) = meet{EqClass(x,S) where S is a_partition of X : S in F} proof set G = {meet{EqClass(x,S) where S is a_partition of X : S in F} where x is Element of X : not contradiction }; G c= bool X proof let y be set; assume y in G; then consider x being Element of X such that A4: y = meet{EqClass(x,S) where S is a_partition of X : S in F}; y c= X proof let e be set; consider T being set such that A5: T in F by XBOOLE_0:def 1; reconsider T as a_partition of X by A5,Def7; EqClass(x,T) in {EqClass(x,S) where S is a_partition of X : S in F } by A5; then consider f being set such that A6: f in {EqClass(x,S) where S is a_partition of X : S in F}; consider S being a_partition of X such that A7: f = EqClass(x,S) and S in F by A6; assume e in y; then e in EqClass(x,S) by A4,A6,A7,SETFAM_1:def 1; hence thesis; end; hence thesis; end; then reconsider G as Subset-Family of X; G is a_partition of X proof X c= union G proof let a be set; consider T being set such that A8: T in F by XBOOLE_0:def 1; assume a in X; then reconsider a1=a as Element of X; reconsider T as a_partition of X by A8,Def7; A9: meet{EqClass(a1,S) where S is a_partition of X : S in F} in G; A10: for T being set st T in {EqClass(a1,S) where S is a_partition of X : S in F} holds a1 in T proof let T be set; assume T in {EqClass(a1,S) where S is a_partition of X : S in F}; then ex A being a_partition of X st T = EqClass(a1,A) & A in F; hence thesis by Def6; end; EqClass(a1,T) in {EqClass(a1,S) where S is a_partition of X : S in F} by A8; then a in meet{EqClass(a1,S) where S is a_partition of X: S in F} by A10, SETFAM_1:def 1; hence thesis by A9,TARSKI:def 4; end; hence union G = X by XBOOLE_0:def 10; let A be Subset of X; consider T being set such that A11: T in F by XBOOLE_0:def 1; reconsider T as a_partition of X by A11,Def7; assume A12: A in G; then consider x being Element of X such that A13: A = meet{EqClass(x,S) where S is a_partition of X : S in F}; A14: for Y being set st Y in {EqClass(x,S) where S is a_partition of X : S in F} holds x in Y proof let Y be set; assume Y in {EqClass(x,S) where S is a_partition of X : S in F}; then ex T being a_partition of X st Y = EqClass(x,T) & T in F; hence thesis by Def6; end; EqClass(x,T) in {EqClass(x,S) where S is a_partition of X : S in F} by A11; hence A<>{} by A13,A14,SETFAM_1:def 1; consider x being Element of X such that A15: A = meet{EqClass(x,S) where S is a_partition of X : S in F} by A12; let B be Subset of X; assume B in G; then consider y being Element of X such that A16: B = meet{EqClass(y,S) where S is a_partition of X : S in F}; thus A = B or A misses B proof A17: {EqClass(y,S) where S is a_partition of X : S in F} is non empty proof consider T being set such that A18: T in F by XBOOLE_0:def 1; reconsider T as a_partition of X by A18,Def7; EqClass(y,T) in {EqClass(y,S) where S is a_partition of X : S in F} by A18; hence thesis; end; A19: {EqClass(x,S) where S is a_partition of X : S in F} is non empty proof consider T being set such that A20: T in F by XBOOLE_0:def 1; reconsider T as a_partition of X by A20,Def7; EqClass(x,T) in {EqClass(x,S) where S is a_partition of X : S in F} by A20; hence thesis; end; now assume A meets B; then consider c being set such that A21: c in A & c in B by XBOOLE_0:3; c in meet{EqClass(x,S) where S is a_partition of X : S in F} /\ meet{EqClass(y,S) where S is a_partition of X : S in F} by A15,A16,A21, XBOOLE_0:def 4; then A22: c in meet({EqClass(x,S) where S is a_partition of X: S in F } \/ {EqClass(y,S) where S is a_partition of X : S in F}) by A19,A17,SETFAM_1:9; A23: now let T be a_partition of X; assume T in F; then EqClass(y,T) in {EqClass(y,S) where S is a_partition of X : S in F}; then EqClass(y,T) in {EqClass(x,S) where S is a_partition of X : S in F} \/ {EqClass(y,S) where S is a_partition of X : S in F} by XBOOLE_0:def 3; hence c in EqClass(y,T) by A22,SETFAM_1:def 1; end; A24: now let T be a_partition of X; assume T in F; then EqClass(x,T) in {EqClass(x,S) where S is a_partition of X : S in F}; then EqClass(x,T) in {EqClass(x,S) where S is a_partition of X : S in F} \/ {EqClass(y,S) where S is a_partition of X : S in F} by XBOOLE_0:def 3; hence c in EqClass(x,T) by A22,SETFAM_1:def 1; end; A25: for T being a_partition of X st T in F holds ex A being set st A in EqClass(x,T) & A in EqClass(y,T) proof let T be a_partition of X; assume A26: T in F; take c; thus thesis by A24,A23,A26; end; A27: for T being a_partition of X st T in F holds (EqClass(x,T)) meets (EqClass(y,T)) proof let T be a_partition of X; assume T in F; then ex A being set st A in EqClass(x,T) & A in EqClass(y,T) by A25; hence thesis by XBOOLE_0:3; end; A28: {EqClass(y,S) where S is a_partition of X : S in F} c= { EqClass(x,S) where S is a_partition of X : S in F} proof let A be set; assume A in {EqClass(y,S) where S is a_partition of X : S in F }; then consider T being a_partition of X such that A29: T in F and A30: A = EqClass(y,T) by Lm3; A = EqClass(x,T) by A27,A29,A30,Th41; hence thesis by A29; end; {EqClass(x,S) where S is a_partition of X : S in F} c= { EqClass(y,S) where S is a_partition of X : S in F} proof let A be set; assume A in {EqClass(x,S) where S is a_partition of X : S in F }; then consider T being a_partition of X such that A31: T in F and A32: A = EqClass(x,T) by Lm3; A = EqClass(y,T) by A27,A31,A32,Th41; hence thesis by A31; end; hence thesis by A15,A16,A28,XBOOLE_0:def 10; end; hence thesis; end; end; then reconsider G as non empty a_partition of X; take G; for x being Element of X holds EqClass(x,G) = meet{EqClass(x,S) where S is a_partition of X : S in F} proof let x be Element of X; A33: now let Y be set; assume Y in {EqClass(x,S) where S is a_partition of X : S in F}; then ex T being a_partition of X st Y = EqClass(x,T) & T in F; hence x in Y by Def6; end; {EqClass(x,S) where S is a_partition of X : S in F} is non empty proof consider T being set such that A34: T in F by XBOOLE_0:def 1; reconsider T as a_partition of X by A34,Def7; EqClass(x,T) in {EqClass(x,S) where S is a_partition of X : S in F} by A34; hence thesis; end; then meet{EqClass(x,S) where S is a_partition of X : S in F} in G & x in meet{ EqClass(x,S) where S is a_partition of X : S in F} by A33, SETFAM_1:def 1; hence thesis by Def6; end; hence thesis; end; end; end; theorem Th43: for X being non empty set, S being a_partition of X, A being Subset of S holds (union S) \ (union A) = union (S \ A) proof let X be non empty set; let S be a_partition of X; let A be Subset of S; thus (union S) \ (union A) c= union (S \ A) proof let y be set; assume A1: y in (union S) \ (union A); then y in (union S) by XBOOLE_0:def 5; then consider z being set such that A2: y in z and A3: z in S by TARSKI:def 4; not y in (union A) by A1,XBOOLE_0:def 5; then not z in A by A2,TARSKI:def 4; then z in S \ A by A3,XBOOLE_0:def 5; hence thesis by A2,TARSKI:def 4; end; thus union (S \ A) c= (union S) \ (union A) proof let y be set; assume y in union(S \ A); then consider z being set such that A4: y in z and A5: z in S \ A by TARSKI:def 4; A6: z in S by A5,XBOOLE_0:def 5; A7: not z in A by A5,XBOOLE_0:def 5; A8: now let w be set; assume A9: w in A; then w in S; then z misses w by A6,A7,A9,Def4; hence not y in w by A4,XBOOLE_0:3; end; A10: now assume y in union A; then ex v being set st y in v & v in A by TARSKI:def 4; hence contradiction by A8; end; y in union S by A4,A6,TARSKI:def 4; hence thesis by A10,XBOOLE_0:def 5; end; end; theorem for X being non empty set,A being Subset of X, S being a_partition of X holds A in S implies union(S \ {A}) = X \ A proof let X be non empty set; let A be Subset of X; let S be a_partition of X; assume A1: A in S; {A} c= S proof let y be set; assume y in {A}; hence thesis by A1,TARSKI:def 1; end; then reconsider AA = {A} as Subset of S; thus union (S \ {A}) = (union S) \ (union AA) by Th43 .= X \ (union {A}) by Def4 .= X \ A by ZFMISC_1:25; end; theorem {} is a_partition of {} proof reconsider A = {} as Subset-Family of {} by XBOOLE_1:2; union A = {} & for a be Subset of {} st a in A holds a<>{} & for b be Subset of {} st b in A holds a = b or a misses b; hence thesis by Def4; end; begin reserve e,u,v,X,Y,X1 for set; theorem for F being Function st X c= F"X1 holds F.:X c= X1 proof let F be Function; assume X c= F"X1; then A1: F.:X c= F.:F"X1 by RELAT_1:123; F.:F"X1 c= X1 by FUNCT_1:75; hence thesis by A1,XBOOLE_1:1; end; theorem Th47: e c= [:X,Y:] implies (.:pr1(X,Y)).e = pr1(X,Y).:e proof assume e c= [:X,Y:]; then e c= dom pr1(X,Y) by FUNCT_3:def 4; hence thesis by FUNCT_3:def 1; end; theorem Th48: e c= [:X,Y:] implies (.:pr2(X,Y)).e = pr2(X,Y).:e proof assume e c= [:X,Y:]; then e c= dom pr2(X,Y) by FUNCT_3:def 5; hence thesis by FUNCT_3:def 1; end; theorem Th49: for X1 being Subset of X, Y1 being Subset of Y st [:X1,Y1:] <> {} holds pr1(X,Y).:[:X1,Y1:] = X1 & pr2(X,Y).:[:X1,Y1:] = Y1 proof let X1 be Subset of X, Y1 be Subset of Y; assume A1: [:X1,Y1:] <> {}; then A2: X1 <> {}; A3: Y1 <> {} by A1; A4: X <> {} by A2; now set y = the Element of Y1; let x be set; thus x in pr1(X,Y).:[:X1,Y1:] implies x in X1 proof assume x in pr1(X,Y).:[:X1,Y1:]; then consider u such that A5: u in [:X,Y:] and A6: u in [:X1,Y1:] & x = pr1(X,Y).u by FUNCT_2:64; A7: u`2 in Y by A5,MCART_1:10; u`1 in X1 & x = pr1(X,Y).(u`1,u`2) by A6,MCART_1:10,21; hence thesis by A7,FUNCT_3:def 4; end; assume A8: x in X1; y in Y by A3,TARSKI:def 3; then A9: x = pr1(X,Y).(x,y) by A8,FUNCT_3:def 4; [x,y] in [:X1,Y1:] by A3,A8,ZFMISC_1:87; hence x in pr1(X,Y).:[:X1,Y1:] by A4,A9,FUNCT_2:35; end; hence pr1(X,Y).:[:X1,Y1:] = X1 by TARSKI:1; A10: Y <> {} by A3; now set x = the Element of X1; let y be set; thus y in pr2(X,Y).:[:X1,Y1:] implies y in Y1 proof assume y in pr2(X,Y).:[:X1,Y1:]; then consider u such that A11: u in [:X,Y:] and A12: u in [:X1,Y1:] & y = pr2(X,Y).u by FUNCT_2:64; A13: u`1 in X by A11,MCART_1:10; u`2 in Y1 & y = pr2(X,Y).(u`1,u`2) by A12,MCART_1:10,21; hence thesis by A13,FUNCT_3:def 5; end; assume A14: y in Y1; x in X by A2,TARSKI:def 3; then A15: y = pr2(X,Y).(x,y) by A14,FUNCT_3:def 5; [x,y] in [:X1,Y1:] by A2,A14,ZFMISC_1:87; hence y in pr2(X,Y).:[:X1,Y1:] by A10,A15,FUNCT_2:35; end; hence thesis by TARSKI:1; end; theorem Th50: for X1 being Subset of X, Y1 being Subset of Y st [:X1,Y1:] <> {} holds .:pr1(X,Y). [:X1,Y1:] = X1 & .:pr2(X,Y). [:X1,Y1:] = Y1 proof let X1 be Subset of X, Y1 be Subset of Y; assume A1: [:X1,Y1:] <> {}; thus .:pr1(X,Y). [:X1,Y1:] = pr1(X,Y).:[:X1,Y1:] by Th47 .= X1 by A1,Th49; thus .:pr2(X,Y). [:X1,Y1:] = pr2(X,Y).:[:X1,Y1:] by Th48 .= Y1 by A1,Th49; end; theorem for A being Subset of [:X,Y:], H being Subset-Family of [:X,Y:] st for e st e in H holds e c= A & ex X1 being Subset of X, Y1 being Subset of Y st e =[:X1,Y1:] holds [:union(.:pr1(X,Y).:H), meet(.:pr2(X,Y).:H):] c= A proof let A be Subset of [:X,Y:], H be Subset-Family of [:X,Y:] such that A1: for e st e in H holds e c= A & ex X1 being Subset of X, Y1 being Subset of Y st e =[:X1,Y1:]; let u,v; assume A2: [u,v] in [:union(.:pr1(X,Y).:H), meet(.:pr2(X,Y).:H):]; then A3: v in meet(.:pr2(X,Y).:H) by ZFMISC_1:87; u in union(.:pr1(X,Y).:H) by A2,ZFMISC_1:87; then consider x being set such that A4: u in x and A5: x in .:pr1(X,Y).:H by TARSKI:def 4; consider y being set such that y in dom .:pr1(X,Y) and A6: y in H and A7: x = .:pr1(X,Y).y by A5,FUNCT_1:def 6; consider X1 being Subset of X, Y1 being Subset of Y such that A8: y =[:X1,Y1:] by A1,A6; A9: y <> {} by A4,A7,FUNCT_3:8; y in bool[:X,Y:] by A6; then y in bool dom pr2(X,Y) by FUNCT_3:def 5; then y in dom .:pr2(X,Y) by FUNCT_3:def 1; then .:pr2(X,Y).y in .:pr2(X,Y).:H by A6,FUNCT_1:def 6; then Y1 in .:pr2(X,Y).:H by A8,A9,Th50; then A10: v in Y1 by A3,SETFAM_1:def 1; u in X1 by A4,A7,A8,A9,Th50; then A11: [u,v] in y by A8,A10,ZFMISC_1:87; y c= A by A1,A6; hence thesis by A11; end; theorem for A being Subset of [:X,Y:], H being Subset-Family of [:X,Y:] st for e st e in H holds e c= A & ex X1 being Subset of X, Y1 being Subset of Y st e = [:X1,Y1:] holds [:meet(.:pr1(X,Y).:H), union(.:pr2(X,Y).:H):] c= A proof let A be Subset of [:X,Y:], H be Subset-Family of [:X,Y:] such that A1: for e st e in H holds e c= A & ex X1 being Subset of X, Y1 being Subset of Y st e =[:X1,Y1:]; let u,v; assume A2: [u,v] in [:meet(.:pr1(X,Y).:H), union(.:pr2(X,Y).:H):]; then A3: u in meet(.:pr1(X,Y).:H) by ZFMISC_1:87; v in union(.:pr2(X,Y).:H) by A2,ZFMISC_1:87; then consider x being set such that A4: v in x and A5: x in .:pr2(X,Y).:H by TARSKI:def 4; consider y being set such that y in dom .:pr2(X,Y) and A6: y in H and A7: x = .:pr2(X,Y).y by A5,FUNCT_1:def 6; consider X1 being Subset of X, Y1 being Subset of Y such that A8: y =[:X1,Y1:] by A1,A6; A9: y <> {} by A4,A7,FUNCT_3:8; y in bool[:X,Y:] by A6; then y in bool dom pr1(X,Y) by FUNCT_3:def 4; then y in dom .:pr1(X,Y) by FUNCT_3:def 1; then .:pr1(X,Y).y in .:pr1(X,Y).:H by A6,FUNCT_1:def 6; then X1 in .:pr1(X,Y).:H by A8,A9,Th50; then A10: u in X1 by A3,SETFAM_1:def 1; v in Y1 by A4,A7,A8,A9,Th50; then A11: [u,v] in y by A8,A10,ZFMISC_1:87; y c= A by A1,A6; hence thesis by A11; end; theorem for X being set, Y being non empty set, f being Function of X,Y for H being Subset-Family of X holds union(.:f.:H) = f.: union H proof let X be set, Y be non empty set, f be Function of X,Y; let H be Subset-Family of X; dom f = X by FUNCT_2:def 1; hence thesis by FUNCT_3:14; end; reserve X,Y,Z for non empty set; theorem for X being set, a being Subset-Family of X holds union union a = union { union A where A is Subset of X: A in a } proof let X be set, a be Subset-Family of X; thus union union a c= union { union A where A is Subset of X: A in a } proof let e; assume e in union union a; then consider B being set such that A1: e in B and A2: B in union a by TARSKI:def 4; consider C being set such that A3: B in C and A4: C in a by A2,TARSKI:def 4; A5: union C in { union A where A is Subset of X: A in a } by A4; e in union C by A1,A3,TARSKI:def 4; hence thesis by A5,TARSKI:def 4; end; let e; assume e in union { union A where A is Subset of X: A in a }; then consider c being set such that A6: e in c and A7: c in { union A where A is Subset of X: A in a } by TARSKI:def 4; consider A being Subset of X such that A8: c = union A and A9: A in a by A7; consider b being set such that A10: e in b and A11: b in A by A6,A8,TARSKI:def 4; b in union a by A9,A11,TARSKI:def 4; hence thesis by A10,TARSKI:def 4; end; theorem Th55: for X being set for D being Subset-Family of X st union D = X for A being Subset of D, B being Subset of X st B = union A holds B` c= union A ` proof let X be set; let D be Subset-Family of X such that A1: union D = X; let A be Subset of D, B be Subset of X such that A2: B = union A; let e; assume A3: e in B`; then consider u such that A4: e in u and A5: u in D by A1,TARSKI:def 4; not e in B by A3,XBOOLE_0:def 5; then not u in A by A2,A4,TARSKI:def 4; then u in A` by A5,SUBSET_1:29; hence thesis by A4,TARSKI:def 4; end; theorem for F being Function of X,Y, G being Function of X,Z st for x,x9 being Element of X st F.x=F.x9 holds G.x=G.x9 ex H being Function of Y,Z st H*F =G proof let F be Function of X,Y, G be Function of X,Z; defpred P[set,set] means not (ex x being Element of X st $1 = F.x) or for x being Element of X st $1 = F.x holds $2 = G.x; assume A1: for x,x9 being Element of X st F.x=F.x9 holds G.x=G.x9; A2: now let e such that e in Y; now per cases; case ex x being Element of X st e = F.x; then consider x being Element of X such that A3: e = F.x; take u = G.x; thus u in Z & ((ex x being Element of X st e = F.x) implies ex x being Element of X st e = F.x & u = G.x) by A3; end; case A4: not ex x being Element of X st e = F.x; set u = the Element of Z; u in Z; hence ex u st u in Z & ((ex x being Element of X st e = F.x) implies ex x being Element of X st e = F.x & u = G.x) by A4; end; end; then consider u such that A5: u in Z and A6: (ex x being Element of X st e = F.x) implies ex x being Element of X st e = F.x & u = G.x; take u; thus u in Z by A5; thus P[e,u] by A1,A6; end; consider H being Function of Y,Z such that A7: for e st e in Y holds P[e,H.e] from FUNCT_2:sch 1(A2); take H; now let x be Element of X; thus (H*F).x = H.(F.x) by FUNCT_2:15 .= G.x by A7; end; hence thesis by FUNCT_2:63; end; theorem for X,Y,Z for y being Element of Y, F being (Function of X,Y), G being Function of Y,Z holds F"{y} c= (G*F)"{G.y} proof let X,Y,Z; let y be Element of Y, F be (Function of X,Y), G be Function of Y,Z; F"{y} c= (G*F)"Im(G,y) by FUNCT_2:44; hence thesis by SETWISEO:8; end; theorem for F being Function of X,Y, x being Element of X, z being Element of Z holds [:F,id Z:].(x,z) = [F.x,z] proof let F be Function of X,Y, x be Element of X, z be Element of Z; thus [:F,id Z:].(x,z) = [F.x, (id Z).z] by FUNCT_3:75 .= [F.x,z] by FUNCT_1:18; end; theorem for F being Function of X,Y, A being Subset of X, B being Subset of Z holds [:F,id Z:].:[:A,B:] = [:F.:A,B:] proof let F be Function of X,Y, A be Subset of X, B be Subset of Z; thus [:F,id Z:].:[:A,B:] = [:F.:A, (id Z).:B:] by FUNCT_3:72 .= [:F.:A,B:] by FUNCT_1:92; end; theorem for F being Function of X,Y, y being Element of Y, z being Element of Z holds [:F,id Z:]"{[y,z]} = [:F"{y},{z}:] proof let F be Function of X,Y, y be Element of Y, z be Element of Z; thus [:F,id Z:]"{[y,z]} = [:F,id Z:]"[:{y},{z}:] by ZFMISC_1:29 .= [:F"{y},(id Z)"{z}:] by FUNCT_3:73 .= [:F"{y},{z}:] by FUNCT_2:94; end; theorem for D being Subset-Family of X, A being Subset of D holds union A is Subset of X proof let D be Subset-Family of X, A be Subset of D; union A c= X proof let e; assume e in union A; then ex u st e in u & u in A by TARSKI:def 4; then e in union D by TARSKI:def 4; hence thesis; end; hence thesis; end; theorem for X being set, D being a_partition of X, A,B being Subset of D holds union(A /\ B) = union A /\ union B proof let X be set, D be a_partition of X, A,B be Subset of D; thus union(A/\B) c= union A /\ union B by ZFMISC_1:79; let e; assume A1: e in union A /\ union B; then e in union A by XBOOLE_0:def 4; then consider a being set such that A2: e in a and A3: a in A by TARSKI:def 4; A4: a in D by A3; e in union B by A1,XBOOLE_0:def 4; then consider b being set such that A5: e in b and A6: b in B by TARSKI:def 4; A7: b in D by A6; not a misses b by A2,A5,XBOOLE_0:3; then a = b by A4,A7,Def4; then a in A/\B by A3,A6,XBOOLE_0:def 4; hence thesis by A2,TARSKI:def 4; end; theorem for D being a_partition of X, A being Subset of D, B being Subset of X st B = union A holds B` = union A` proof let D be a_partition of X, A be Subset of D, B be Subset of X; assume A1: B = union A; union D = X by Def4; hence B` c= union A` by A1,Th55; let e; assume e in union A`; then consider u such that A2: e in u and A3: u in A` by TARSKI:def 4; A4: u in D by A3; assume not e in B`; then e in B by A2,A4,SUBSET_1:29; then consider v being set such that A5: e in v and A6: v in A by A1,TARSKI:def 4; A7: v in D by A6; not u misses v by A2,A5,XBOOLE_0:3; then u = v by A4,A7,Def4; hence contradiction by A3,A6,XBOOLE_0:def 5; end; theorem for E being Equivalence_Relation of X holds Class(E) is non empty; registration let X be non empty set; cluster non empty for a_partition of X; existence proof reconsider P = Class nabla X as a_partition of X; take P; thus thesis; end; end; definition let X; let D be non empty a_partition of X; func proj D -> Function of X, D means :Def9: for p being Element of X holds p in it.p; existence proof defpred P[set,set] means $1 in $2; A1: now A2: union D = X by Def4; let e; assume e in X; then ex u st e in u & u in D by A2,TARSKI:def 4; hence ex u st u in D & P[e,u]; end; consider F being Function of X, D such that A3: for e st e in X holds P[e,F.e] from FUNCT_2:sch 1(A1); take F; let p be Element of X; thus thesis by A3; end; correctness proof let F,G be Function of X,D such that A4: ( for p being Element of X holds p in F.p)& for p being Element of X holds p in G.p; now let x be Element of X; x in F.x & x in G.x by A4; then A5: not F.x misses G.x by XBOOLE_0:3; F.x is Subset of X & G.x is Subset of X by TARSKI:def 3; hence F.x = G.x by A5,Def4; end; hence F = G by FUNCT_2:63; end; end; theorem Th65: for D being non empty a_partition of X, p being Element of X, A being Element of D st p in A holds A = (proj D).p proof let D be non empty a_partition of X, p be Element of X, A be Element of D such that A1: p in A; p in (proj D).p by Def9; then (proj D).p is Subset of X & not (proj D).p misses A by A1,TARSKI:def 3 ,XBOOLE_0:3; hence thesis by Def4; end; theorem for D being non empty a_partition of X, p being Element of D holds p = proj D " {p} proof let D be non empty a_partition of X, p be Element of D; thus p c= proj D " {p} proof let e; assume A1: e in p; then (proj D).e = p by Th65; then (proj D).e in {p} by TARSKI:def 1; hence thesis by A1,FUNCT_2:38; end; let e; assume A2: e in proj D " {p}; then (proj D).e in {p} by FUNCT_1:def 7; then (proj D).e = p by TARSKI:def 1; hence e in p by A2,Def9; end; theorem for D being non empty a_partition of X, A being Subset of D holds (proj D)"A = union A proof let D be non empty a_partition of X, A be Subset of D; thus (proj D)"A c= union A proof let e; assume e in (proj D)"A; then (proj D).e in A & e in (proj D).e by Def9,FUNCT_2:38; hence thesis by TARSKI:def 4; end; let e; assume e in union A; then consider u such that A1: e in u and A2: u in A by TARSKI:def 4; A3: u in D by A2; then (proj D).e = u by A1,Th65; hence thesis by A1,A2,A3,FUNCT_2:38; end; theorem for D being non empty a_partition of X, W being Element of D ex W9 being Element of X st proj(D).W9=W proof let D be non empty a_partition of X, W be Element of D; reconsider p = W as Subset of X; p <> {} by Def4; then consider W9 being Element of X such that A1: W9 in p by SUBSET_1:4; take W9; thus thesis by A1,Th65; end; theorem for D being non empty a_partition of X, W being Subset of X st for B being Subset of X st B in D & B meets W holds B c= W holds W = proj D " ( proj D .: W) proof let D be non empty a_partition of X, W be Subset of X such that A1: for B being Subset of X st B in D & B meets W holds B c= W; W c= X; then W c= dom proj D by FUNCT_2:def 1; hence W c= proj D " (proj D .: W) by FUNCT_1:76; let e; assume A2: e in proj D " (proj D .: W); then reconsider d = e as Element of X; (proj D).e in proj D .: W by A2,FUNCT_1:def 7; then consider c being Element of X such that A3: c in W and A4: (proj D).d = (proj D).c by FUNCT_2:65; reconsider B = (proj D).c as Subset of X by TARSKI:def 3; c in (proj D).c by Def9; then B meets W by A3,XBOOLE_0:3; then A5: B c= W by A1; d in B by A4,Def9; hence thesis by A5; end; theorem for X being set, P being a_partition of X, x, a, b being set st x in a & a in P & x in b & b in P holds a = b proof let X be set, P be a_partition of X, x,a,b be set; assume that A1: x in a and A2: a in P and A3: x in b and A4: b in P; a meets b by A1,A3,XBOOLE_0:3; hence thesis by A2,A4,Def4; end; begin reserve n,n1,n2,m for Element of NAT; reserve r,g1,g2,g,g9 for Element of COMPLEX; reserve R,R2 for Real; reserve s,s9,s1 for Complex_Sequence; theorem Th1: g<>0c & r<>0c implies |.g"-r".|=|.g-r.|/(|.g.|*|.r.|) proof assume A1: g<>0c & r<>0c; thus |.g"-r".|=|.1r/g-r".| by COMPLEX1:def 4,XCMPLX_1:215 .=|.1r/g-1r/r.| by COMPLEX1:def 4,XCMPLX_1:215 .=|.1r/g+-1r/r.| .=|.1r/g+-1r*r".| by XCMPLX_0:def 9 .=|.1r/g+(-1r)*r".| .=|.1r/g+(-1r)/r.| by XCMPLX_0:def 9 .=|.(1r*r+(-1r)*g)/(r*g).| by A1,XCMPLX_1:116 .=|.r-g.|/|.g*r.| by COMPLEX1:67,def 4 .=|.-(g-r).|/(|.g.|*|.r.|) by COMPLEX1:65 .=|.g-r.|/(|.g.|*|.r.|) by COMPLEX1:52; end; theorem Th2: for n ex r being Real st 00 by A2; let m such that A9: m <= n+1; A10: now assume m <= n; then A11: |.s.m.| < R1 by A3; R1+00 & for m st m<=n holds |.s.m.| complex-valued Function means :Def1: dom it = dom f & for c being set st c in dom it holds it.c = (f.c)*'; existence proof consider F being Function such that A1: dom F = dom f and A2: for x being set st x in dom f holds F.x = F(x) from FUNCT_1:sch 3; for x being set st x in dom F holds F.x is complex proof let x be set; assume x in dom F; then F.x = F(x) by A1,A2; hence thesis; end; then reconsider F as complex-valued Function by VALUED_0:def 7; take F; thus dom f = dom F by A1; thus thesis by A1,A2; end; uniqueness proof let h,g be complex-valued Function such that A3: dom h=dom f and A4: for c be set st c in dom h holds h.c = F(c) and A5: dom g=dom f and A6: for c be set st c in dom g holds g.c = F(c); thus dom h=dom g by A3,A5; let x be set; assume A7: x in dom h; hence h.x = F(x) by A4 .= g.x by A3,A5,A6,A7; end; involutiveness proof let g,f be complex-valued Function; assume that A8: dom g = dom f and A9: for c being set st c in dom g holds g.c = (f.c)*'; thus dom f = dom g by A8; let c be set; assume A10: c in dom f; thus f.c = (f.c)*'*' .= (g.c)*' by A8,A10,A9; end; end; definition let C be non empty set; let f be Function of C,COMPLEX; redefine func f*' -> Function of C,COMPLEX means :Def2: dom it = C & for n being Element of C holds it.n=(f.n)*'; coherence proof A1: dom(f*') = dom f by Def1 .= C by PARTFUN1:def 2; for x being set st x in C holds (f*').x in COMPLEX by XCMPLX_0:def 2; hence f*' is Function of C,COMPLEX by A1,FUNCT_2:3; end; compatibility proof let IT be Function of C,COMPLEX; thus IT = f*' implies dom IT = C & for c being Element of C holds IT.c = ( f.c)*' proof assume A2: IT = f*'; thus A3: dom IT = C by FUNCT_2:def 1; let c be Element of C; thus thesis by A2,A3,Def1; end; assume that A4: dom IT = C and A5: for c being Element of C holds IT.c = (f.c)*'; A6: dom IT = dom f by A4,FUNCT_2:def 1; for c being set st c in dom IT holds IT.c = (f.c)*' by A5; hence IT = f*' by A6,Def1; end; end; registration let C be non empty set; let s be complex-valued ManySortedSet of C; cluster s*' -> C-defined; coherence proof dom s c= C; hence dom(s*') c= C by Def1; end; end; registration let C be non empty set; let seq be complex-valued ManySortedSet of C; cluster seq*' -> total for C-defined Function; coherence proof let f be C-defined Function such that A1: f = seq*'; thus dom f = dom seq by Def1,A1 .= C by PARTFUN1:def 2; end; end; theorem s is non-zero implies s*' is non-zero proof assume A1: s is non-zero; now let n; (s.n)*' <>0c by A1,COMPLEX1:29; hence s*'.n <>0c by Def2; end; hence thesis by COMSEQ_1:4; end; theorem (r(#)s)*' = (r*')(#)(s*') proof now let n; thus (r(#)s)*'.n = ((r(#)s).n)*' by Def2 .= (r*s.n)*' by VALUED_1:6 .= (r*')*(s.n)*' by COMPLEX1:35 .= (r*')*(s*'.n) by Def2 .= ((r*')(#)(s*')).n by VALUED_1:6; end; hence thesis by FUNCT_2:63; end; theorem (s (#) s9)*' = (s*') (#) (s9*') proof now let n; thus (s (#) s9)*'.n = ((s (#) s9).n)*' by Def2 .= (s.n * s9.n)*' by VALUED_1:5 .= (s.n)*' * (s9.n)*' by COMPLEX1:35 .= (s*'.n) * (s9.n)*' by Def2 .= (s*'.n) * (s9*'.n) by Def2 .= (s*' (#) s9*').n by VALUED_1:5; end; hence thesis by FUNCT_2:63; end; theorem (s*')" = (s")*' proof now let n; thus (s*')".n = (s*'.n)" by VALUED_1:10 .= ((s.n)*')" by Def2 .= ((s.n)")*' by COMPLEX1:36 .= (s".n)*' by VALUED_1:10 .= (s")*'.n by Def2; end; hence thesis by FUNCT_2:63; end; theorem (s9/"s)*' = (s9*') /" (s*') proof now let n; thus (s9/"s)*'.n = ((s9 (#) s").n)*' by Def2 .= ((s9.n) * (s".n))*' by VALUED_1:5 .= ((s9.n) * (s.n)")*' by VALUED_1:10 .= (s9.n)*' * ((s.n)")*' by COMPLEX1:35 .= (s9.n)*' * ((s.n)*')" by COMPLEX1:36 .= (s9*').n * ((s.n)*')" by Def2 .= (s9*').n * ((s*').n)" by Def2 .= (s9*').n * ((s*')").n by VALUED_1:10 .= ((s9*') /" (s*')).n by VALUED_1:5; end; hence thesis by FUNCT_2:63; end; begin definition let f be complex-valued Function; attr f is bounded means ex r being real number st for y being set st y in dom f holds abs(f.y) 0c as Complex_Sequence; registration cluster bounded for Complex_Sequence; existence proof take sc, 1; let n; thus thesis by COMPLEX1:44,FUNCOP_1:7; end; end; theorem Th8: s is bounded iff ex r being Real st (0 Element of COMPLEX means :Def6: for p be Real st 0

g2; reconsider p = |.g1 - g2.|/2 as Real; A5: |.g1-g2.| > 0 by A4,COMPLEX1:62; then consider n1 such that A6: for m st n1<=m holds |.s.m-g1.|

convergent for Complex_Sequence; coherence proof let t be Complex_Sequence such that A1: t = s*'; consider g such that A2: for p being Real st 0

convergent for Complex_Sequence; coherence proof let s be Complex_Sequence such that A1: s = s1 + s2; consider g such that A2: for p be Real st 0

0; then consider n1 such that A5: for m st n1<=m holds |.s1.m - g.|

convergent for Complex_Sequence; coherence proof A1: now let c be Element of COMPLEX; per cases; suppose A2: c =0c; now let n; thus (c(#)s).n = 0c*s.n by A2,VALUED_1:6 .= 0c; end; hence c(#)s is convergent by Th9; end; suppose A3: c <> 0c; thus c(#)s is convergent proof consider g such that A4: for p be Real st 0

0 by A3,COMPLEX1:47; consider n such that A7: for m st n<=m holds |.s.m-g.|

0c; for p be Real st p>0 holds ex n st for m st n<=m holds |.(r(#)s) .m-r*(lim s).|

0; A3: |.r.|>0 by A1,COMPLEX1:47; p / |.r.| > 0 by A3,A2; then consider n such that A4: for m st n<=m holds |.s.m-(lim s).|< p/|.r.| by Def6; take n; let m; assume n<=m; then |.s.m-(lim s).|

convergent for Complex_Sequence; coherence; end; canceled; theorem Th22: for s being convergent Complex_Sequence holds lim(-s)=-(lim s) proof let s being convergent Complex_Sequence; lim(-s) = (-1)*(lim s) by Th18 .= - 1r*(lim s) by COMPLEX1:def 4; hence thesis by COMPLEX1:def 4; end; canceled; theorem for s being convergent Complex_Sequence holds lim (-s)*' = -(lim s)*' proof let s being convergent Complex_Sequence; thus lim (-s)*' = (lim (-s))*' by Th12 .= (-(lim s))*' by Th22 .= -(lim s)*' by COMPLEX1:33; end; registration let s1,s2 be convergent Complex_Sequence; cluster s1 - s2 -> convergent for Complex_Sequence; coherence proof - s2 is convergent; hence thesis; end; end; canceled; theorem Th26: for s,s9 being convergent Complex_Sequence holds lim(s - s9)=(lim s)-( lim s9) proof let s,s9 be convergent Complex_Sequence; lim(s - s9) = (lim s) + lim(-s9) by Th14 .= (lim s) + -(lim s9) by Th22; hence thesis; end; canceled; theorem for s,s9 being convergent Complex_Sequence holds lim (s - s9)*' = (lim s)*' - (lim s9)*' proof let s,s9 be convergent Complex_Sequence; thus lim (s - s9)*' = (lim (s - s9))*' by Th12 .= ((lim s) - (lim s9))*' by Th26 .= (lim s)*' - (lim s9)*' by COMPLEX1:34; end; registration cluster convergent -> bounded for Complex_Sequence; coherence proof let s; assume s is convergent; then consider g such that A1: for p be Real st 0

non convergent for Complex_Sequence; coherence; end; registration let s1,s2 be convergent Complex_Sequence; cluster s1 (#) s2 -> convergent for Complex_Sequence; coherence proof let s be Complex_Sequence such that A1: s = s1 (#) s2; consider g1 such that A2: for p being Real st 0

0c ex n st for m st n <=m holds |.(lim s).|/2<|.s.m.| proof let s be convergent Complex_Sequence such that A1: (lim s)<>0c; 0<|.(lim s).| by A1,COMPLEX1:47; then 0<|.(lim s).|/2; then consider n1 such that A2: for m st n1<=m holds |.s.m-(lim s).|<|.(lim s).|/2 by Def6; take n=n1; let m; assume n<=m; then A3: |.s.m-(lim s).|<|.(lim s).|/2 by A2; A4: |.(lim s)-s.m.|=|.-(s.m-(lim s)).| .=|.s.m-(lim s).| by COMPLEX1:52; A5: |.(lim s).|/2+(|.s.m.|- |.(lim s).|/2) =|.s.m.| & |.(lim s).|- |.s.m.|+ (|.s. m.|- |.(lim s).|/2) =|.(lim s).|/2; |.(lim s).|- |.s.m.|<=|.(lim s)-s.m.| by COMPLEX1:59; then |.(lim s).|- |.s.m.|<|.(lim s).|/2 by A3,A4,XXREAL_0:2; hence thesis by A5,XREAL_1:6; end; theorem Th34: for s being convergent Complex_Sequence st lim s <> 0c & s is non-zero holds s" is convergent proof let s be convergent Complex_Sequence; assume that A1: (lim s)<>0c and A2: s is non-zero; consider n1 such that A3: for m st n1<=m holds |.(lim s).|/2<|.s.m.| by A1,Th33; take(lim s)"; let p be Real; assume A4: 0|.(lim s).|/2 by A1,COMPLEX1:47; A12: (p*(|.(lim s).|/2))/(|.(lim s).|/2 ) =(p*(|.(lim s).|/2))*(|.(lim s).|/ 2 )" by XCMPLX_0:def 9 .=p*((|.(lim s).|/2)*(|.(lim s).|/2 )") .=p*1 by A11,XCMPLX_0:def 7 .=p; A13: 0<>|.(lim s).| by A1,COMPLEX1:47; A14: (p*((|.(lim s).|*|.(lim s).|)/2))/(|.s.m.|*|.(lim s).|) =(p*(2"*(|.(lim s).|*|.(lim s).|)))* (|.s.m.|*|.(lim s).|)" by XCMPLX_0:def 9 .=p*2"*((|.(lim s).|*|.(lim s).|)*(|.(lim s).|*|.s.m.|)") .=p*2"*((|.(lim s).|*|.(lim s).|)* (|.(lim s).|"*|.s.m.|")) by XCMPLX_1:204 .=p*2"*(|.(lim s).|*(|.(lim s).|*|.(lim s).|")*|.s.m.|") .=p*2"*(|.(lim s).|*1*|.s.m.|") by A13,XCMPLX_0:def 7 .=p*(|.(lim s).|/2)*|.s.m.|" .=(p*(|.(lim s).|/2))/|.s.m.| by XCMPLX_0:def 9; s.m*(lim s)<>0c by A1,A2; then 0<|.s.m*(lim s).| by COMPLEX1:47; then A15: 0<|.s.m.|*|.(lim s).| by COMPLEX1:65; n2<=n by NAT_1:12; then n2<=m by A7,XXREAL_0:2; then |.s.m-(lim s).|0c & s is non-zero implies lim s"=( lim s)" proof assume that A1: s is convergent and A2: (lim s)<>0c and A3: s is non-zero; consider n1 such that A4: for m st n1<=m holds |.(lim s).|/2<|.s.m.| by A1,A2,Th33; A5: 0<|.(lim s).| by A2,COMPLEX1:47; then 0*0<|.(lim s).|*|.(lim s).|; then A6: 0<(|.(lim s).|*|.(lim s).|)/2; A7: 0<>|.(lim s).| by A2,COMPLEX1:47; A8: now let p be Real; A9: 0<>|.(lim s).|/2 by A2,COMPLEX1:47; A10: (p*(|.(lim s).|/2))/(|.(lim s).|/2 ) =(p*(|.(lim s).|/2))*(|.(lim s) .|/2 )" by XCMPLX_0:def 9 .=p*((|.(lim s).|/2)*(|.(lim s).|/2 )") .=p*1 by A9,XCMPLX_0:def 7 .=p; assume A11: 00c by A2,A3; then 0<|.s.m*(lim s).| by COMPLEX1:47; then A18: 0<|.s.m.|*|.(lim s).| by COMPLEX1:65; n2<=n by NAT_1:12; then n2<=m by A13,XXREAL_0:2; then |.s.m-(lim s).|0c & s is non-zero implies lim (s")*' = (( lim s)*')" proof assume A1: s is convergent & (lim s)<>0c & s is non-zero; then s" is convergent by Th34; hence lim (s")*' = (lim s")*' by Th12 .= ((lim s)")*' by A1,Th35 .= ((lim s)*')" by COMPLEX1:36; end; theorem Th38: s9 is convergent & s is convergent & (lim s)<>0c & s is non-zero implies s9/"s is convergent proof assume that A1: s9 is convergent and A2: s is convergent & (lim s)<>0c & s is non-zero; s" is convergent by A2,Th34; hence thesis by A1; end; theorem Th39: s9 is convergent & s is convergent & (lim s)<>0c & s is non-zero implies lim(s9/"s)=(lim s9)/(lim s) proof assume that A1: s9 is convergent and A2: s is convergent & (lim s)<>0c & s is non-zero; s" is convergent by A2,Th34; then lim (s9(#)(s"))=(lim s9)*(lim s") by A1,Th30 .=(lim s9)*(lim s)" by A2,Th35 .=(lim s9)/(lim s) by XCMPLX_0:def 9; hence thesis; end; canceled; theorem s9 is convergent & s is convergent & (lim s)<>0c & s is non-zero implies lim (s9/"s)*' = ((lim s9)*')/((lim s)*') proof assume A1: s9 is convergent & s is convergent & (lim s)<>0c & s is non-zero; then s9/"s is convergent by Th38; hence lim (s9/"s)*' = (lim (s9/"s))*' by Th12 .= ((lim s9)/(lim s))*' by A1,Th39 .= ((lim s9)*')/((lim s)*') by COMPLEX1:37; end; theorem Th42: s is convergent & s1 is bounded & (lim s)=0c implies s(#)s1 is convergent proof assume that A1: s is convergent and A2: s1 is bounded and A3: (lim s) = 0c; take g=0c; consider R such that A4: 00; then |.((s(#)s1).m)-g.|<(p/R)*|.s1.m.| by A11,A10,A13,XREAL_1:68; hence thesis by A12,XXREAL_0:2; end; hence thesis by A6,A10; end; theorem Th43: s is convergent & s1 is bounded & (lim s)=0c implies lim(s(#)s1) =0c proof assume that A1: s is convergent and A2: s1 is bounded and A3: lim s=0c; A4: now consider R such that A5: 00; then |.((s(#)s1).m)-0c.|<(p/R)*|.s1.m.| by A11,A12,A13,XREAL_1:68; hence |.((s(#)s1).m)-0c.|

0 & r<>0 implies abs(g"-r")=abs(g-r)/(abs(g)*abs(r)) proof assume that A1: g<>0 and A2: r<>0; thus abs(g"-r")=abs(1/g-r") by XCMPLX_1:215 .=abs(1/g-1/r) by XCMPLX_1:215 .=abs((1*r-1*g)/(g*r)) by A1,A2,XCMPLX_1:130 .=abs(r-g)/abs(g*r) by COMPLEX1:67 .=abs(-(g-r))/(abs(g)*abs(r)) by COMPLEX1:65 .=abs(g-r)/(abs(g)*abs(r)) by COMPLEX1:52; end; definition let f be real-valued Function; attr f is bounded_above means :Def1: ex r st for y st y in dom f holds f.y bounded_above bounded_below for real-valued Function; coherence proof let f be real-valued Function; given r such that A1: for y st y in dom f holds abs(f.y) bounded for real-valued Function; coherence proof let f be real-valued Function; assume f is bounded_above; then consider r1 such that A5: for y st y in dom f holds f.y = g by COMPLEX1:13; now assume A3: g is not real; A4: Im g <> 0 by A2,A3; set p = abs Im g; A5: p > 0 by A4,COMPLEX1:47; not ex n st for m st n<=m holds |.seq.m-g.|< p proof let n; take n; thus n<=n; A6: Im(seq.n) = 0 by COMPLEX1:def 2; A7: Im(seq.n-g) = Im(seq.n)-Im g by COMPLEX1:19; A8: |.seq.n-g.| = sqrt ((Re(seq.n-g))^2 + (Im g)^2) by A7,A6; (Re(seq.n-g))^2 >= 0 by XREAL_1:63; then sqrt((Re(seq.n-g))^2+|.Im g.|^2) >= |.Im g.| by SQUARE_1:58; hence |.seq.n-g.| >= |.Im g.| by A8,COMPLEX1:75; end; hence contradiction by A1,A5; end; then reconsider g as real number; take g; let p; reconsider p as Real by XREAL_0:def 1; 0

real number means :Def7: for p st 0

g2; A5: now assume abs(g1-g2)=0; then 0+g2=g1-g2+g2 by ABSVALUE:2; hence contradiction by A4; end; A6: 0<=abs(g1-g2) by COMPLEX1:46; then consider n1 such that A7: for m st n1<=m holds abs(seq.m-g1) Real; coherence by XREAL_0:def 1; end; registration cluster constant -> convergent for Real_Sequence; coherence proof let seq be Real_Sequence; assume seq is constant; then consider r being Real such that A1: for n being Nat holds seq.n=r by VALUED_0:def 18; take g=r; let p such that A2: 0 0 as Real_Sequence by FUNCOP_1:45; take cs; thus thesis; end; end; theorem Th5: seq is convergent & seq9 is convergent implies seq + seq9 is convergent proof assume that A1: seq is convergent and A2: seq9 is convergent; consider g1 such that A3: for p st 0

convergent for Real_Sequence; coherence by Th5; end; theorem Th6: seq is convergent & seq9 is convergent implies lim (seq + seq9)=(lim seq)+(lim seq9) proof assume that A1: seq is convergent and A2: seq9 is convergent; now let p; assume 00; then A6: 0abs(r) by A5,COMPLEX1:47; consider n1 such that A9: for m st n1<=m holds abs(seq.m-g1)

convergent for Real_Sequence; coherence by Th7; end; theorem Th8: seq is convergent implies lim(r(#)seq)=r*(lim seq) proof assume A1: seq is convergent; A2: now assume A3: r=0; let p such that A4: 00; then A6: 0abs(r) by A5,COMPLEX1:47; 0

convergent for Real_Sequence; coherence; end; theorem Th10: seq is convergent implies lim(-seq) = -(lim seq) proof assume seq is convergent; then lim ((-1)(#)seq)=(-1)*(lim seq) by Th8; hence thesis; end; theorem Th11: seq is convergent & seq9 is convergent implies seq - seq9 is convergent proof assume that A1: seq is convergent and A2: seq9 is convergent; -seq9 is convergent by A2; hence thesis by A1; end; registration let seq1,seq2 be convergent Real_Sequence; cluster seq1 - seq2 -> convergent for Real_Sequence; coherence by Th11; end; theorem Th12: seq is convergent & seq9 is convergent implies lim(seq - seq9)=(lim seq)-(lim seq9) proof assume that A1: seq is convergent and A2: seq9 is convergent; thus lim(seq - seq9)=(lim seq)+(lim(- seq9)) by A1,A2,Th6 .=(lim seq)+-(lim seq9) by A2,Th10 .=(lim seq)-(lim seq9); end; theorem Th13: seq is convergent implies seq is bounded proof assume seq is convergent; then consider g such that A1: for p st 0

bounded for Real_Sequence; coherence by Th13; end; theorem Th14: seq is convergent & seq9 is convergent implies seq (#) seq9 is convergent proof assume that A1: seq is convergent and A2: seq9 is convergent; consider g1 such that A3: for p st 0

convergent for Real_Sequence; coherence by Th14; end; theorem Th15: seq is convergent & seq9 is convergent implies lim(seq(#)seq9)=(lim seq)*(lim seq9) proof assume that A1: seq is convergent and A2: seq9 is convergent; consider r such that A3: 00 implies ex n st for m st n<=m holds abs(lim seq)/20; 0 0 & seq is non-zero implies seq" is convergent proof assume that A1: seq is convergent and A2: lim seq<>0 and A3: seq is non-zero; A4: 0abs(lim seq) by A2,COMPLEX1:47; consider n1 such that A6: for m st n1<=m holds abs(lim seq)/20 by A3,SEQ_1:5; then seq.m*(lim seq)<>0 by A2; then 0abs(lim seq)/2 by A2,COMPLEX1:47; 0*0 0 & seq is non-zero implies lim seq"=(lim seq)" proof assume that A1: seq is convergent and A2: (lim seq)<>0 and A3: seq is non-zero; A4: seq" is convergent by A1,A2,A3,Th21; A5: 0abs(lim seq) by A2,COMPLEX1:47; consider n1 such that A7: for m st n1<=m holds abs(lim seq)/20 by A3,SEQ_1:5; then seq.m*(lim seq)<>0 by A2; then 0abs(lim seq)/2 by A2,COMPLEX1:47; 0*0 0 & seq is non-zero implies seq9/"seq is convergent proof assume that A1: seq9 is convergent and A2: seq is convergent and A3: (lim seq)<>0 and A4: seq is non-zero; seq" is convergent by A2,A3,A4,Th21; hence thesis by A1; end; theorem seq9 is convergent & seq is convergent & lim seq <> 0 & seq is non-zero implies lim(seq9/"seq)=(lim seq9)/(lim seq) proof assume that A1: seq9 is convergent and A2: seq is convergent and A3: (lim seq)<>0 and A4: seq is non-zero; seq" is convergent by A2,A3,A4,Th21; then lim (seq9(#)(seq"))=(lim seq9)*(lim seq") by A1,Th15 .=(lim seq9)*(lim seq)" by A2,A3,A4,Th22 .=(lim seq9)/(lim seq) by XCMPLX_0:def 9; hence thesis; end; theorem Th25: seq is convergent & seq1 is bounded & lim seq=0 implies seq(#)seq1 is convergent proof assume that A1: seq is convergent and A2: seq1 is bounded and A3: lim seq=0; reconsider g1=0 as Real; take g=g1; let p such that A4: 00; (p/r)*r=p*r"*r by XCMPLX_0:def 9 .=p*(r"*r) .=p*1 by A5,XCMPLX_0:def 7 .=p; then A13: (p/r)*abs(seq1.m)

0; (p/r)*r=p*r"*r by XCMPLX_0:def 9 .=p*(r"*r) .=p*1 by A6,XCMPLX_0:def 7; then A13: (p/r)*abs(seq1.m)

convergent for Real_Sequence; coherence proof |.s.| is convergent proof consider g such that A1: for p be Real st 0

0c & s is non-zero implies lim |.s".| = (|. lim s.|)" proof assume A1: s is convergent & (lim s)<>0c & s is non-zero; then s" is convergent by COMSEQ_2:34; hence lim |.s".| = |.lim s".| by Th27 .= |.(lim s)".| by A1,COMSEQ_2:35 .= (|.lim s.|)" by COMPLEX1:66; end; theorem s9 is convergent & s is convergent & (lim s)<>0c & s is non-zero implies lim |.(s9/"s).|=|.(lim s9).|/|.(lim s).| proof assume A1: s9 is convergent & s is convergent & (lim s)<>0c & s is non-zero; then s9/"s is convergent by COMSEQ_2:38; hence lim |.s9/"s.| = |.lim (s9/"s).| by Th27 .= |.(lim s9)/(lim s).| by A1,COMSEQ_2:39 .= |.(lim s9).|/|.(lim s).| by COMPLEX1:67; end; theorem s is convergent & s1 is bounded & (lim s)=0c implies lim |.s(#)s1.| = 0 proof assume A1: s is convergent & s1 is bounded & (lim s)=0c; then s(#)s1 is convergent by COMSEQ_2:42; hence lim |.s(#)s1.| = |.(lim (s(#)s1)).| by Th27 .= 0 by A1,COMSEQ_2:43,COMPLEX1:44; end; begin reserve x,y for set; reserve C,C9,D,D9,E for non empty set; reserve c for Element of C; reserve c9 for Element of C9; reserve d,d1,d2,d3,d4,e for Element of D; reserve d9 for Element of D9; theorem Th1: for f being Function holds <:{},f:> = {} & <:f,{}:> = {} proof let f be Function; dom <:{},f:> = dom {} /\ dom f & dom <:f,{}:> = dom f /\ dom {} by FUNCT_3:def 7; hence thesis; end; theorem for f being Function holds [:{},f:] = {} & [:f,{}:] = {} proof let f be Function; dom [:{},f:] = [:dom {},dom f:] & dom [:f,{}:] = [:dom f,dom {}:] by FUNCT_3:def 8; hence thesis by ZFMISC_1:90; end; theorem Th3: for F,f being Function holds F.:({},f) = {} & F.:(f,{}) = {} proof let F,f be Function; F.:({},f) = F*{} by Th1; hence thesis by Th1; end; theorem for F being Function holds F[:]({},x) = {} proof let F be Function; F[:]({},x) = F.:({}, dom {} --> x); hence thesis by Th3; end; theorem for F being Function holds F[;](x,{}) = {} proof let F be Function; F[;](x,{}) = F.:(dom {} --> x, {}); hence thesis by Th3; end; theorem Th6: for X being set, x1,x2 being set holds <:X-->x1,X-->x2:> = X -->[ x1,x2] proof let X be set, x1,x2 be set; set f = X-->x1, g = X-->x2; set fg = <:f,g:>; now per cases; suppose A1: X = {}; thus thesis by A1; end; suppose A2: X <> {}; rng fg c= [:{x1},{x2}:]; then A3: rng fg c= {[x1,x2]} by ZFMISC_1:29; set x = the Element of X; A4: dom f = X & dom g = X by FUNCOP_1:13; then A5: dom fg = X by FUNCT_3:50; f.x = x1 & g.x = x2 by A2,FUNCOP_1:7; then fg.x = [x1,x2] by A2,A4,FUNCT_3:49; then [x1,x2] in rng fg by A2,A5,FUNCT_1:def 3; then {[x1,x2]} c= rng fg by ZFMISC_1:31; then rng fg = {[x1,x2]} by A3,XBOOLE_0:def 10; hence thesis by A5,FUNCOP_1:9; end; end; hence thesis; end; theorem Th7: for F being Function,X being set, x1,x2 being set st [x1,x2] in dom F holds F.:(X-->x1,X-->x2) = X --> F.(x1,x2) proof let F be Function, X be set, x1,x2 be set such that A1: [x1,x2] in dom F; set f = X-->x1, g = X-->x2; thus F.:(f,g) = F*(X-->[x1,x2]) by Th6 .= X --> F.(x1,x2) by A1,FUNCOP_1:17; end; reserve i,j for Nat; reserve F for Function of [:D,D9:],E; reserve p,q for FinSequence of D, p9,q9 for FinSequence of D9; definition let D,D9,E,F,p,p9; redefine func F.:(p,p9) -> FinSequence of E; coherence by FINSEQ_2:70; end; definition let D,D9,E,F,p,d9; redefine func F[:](p,d9) -> FinSequence of E; coherence by FINSEQ_2:83; end; definition let D,D9,E,F,d,p9; redefine func F[;](d,p9) -> FinSequence of E; coherence by FINSEQ_2:77; end; reserve f,f9 for Function of C,D, h for Function of D,E; definition let D,E be set, p be FinSequence of D, h be Function of D,E; redefine func h*p -> FinSequence of E; coherence by FINSEQ_2:32; end; theorem Th8: h*(p^<*d*>) = (h*p)^<*h.d*> proof set q = h*(p^<*d*>); set r = (h*p)^<*h.d*>; set i = len p + 1; A1: len q = len(p^<*d*>) by FINSEQ_2:33; A2: len(h*p) = len p by FINSEQ_2:33; len(p^<*d*>) = i by FINSEQ_2:16; then A3: dom q = Seg i by A1,FINSEQ_1:def 3; A4: now let j be Nat; A5: Seg len p = dom p by FINSEQ_1:def 3; A6: Seg len(h*p) = dom(h*p) by FINSEQ_1:def 3; assume A7: j in dom q; now per cases by A3,A7,A5,FINSEQ_2:7; suppose A8: j in dom p; hence h.((p^<*d*>).j) = h.(p.j) by FINSEQ_1:def 7 .= (h*p).j by A2,A5,A6,A8,FUNCT_1:12 .= r.j by A2,A5,A6,A8,FINSEQ_1:def 7; end; suppose A9: j = i; hence h.((p^<*d*>).j) = h.d by FINSEQ_1:42 .= r.j by A2,A9,FINSEQ_1:42; end; end; hence q.j = r.j by A7,FUNCT_1:12; end; len r = len(h*p)+1 by FINSEQ_2:16; hence thesis by A1,A2,A4,FINSEQ_2:9,16; end; theorem h*(p^q) = (h*p)^(h*q) proof defpred P[FinSequence of D] means h*(p^$1) = (h*p)^(h*$1); A1: for q,d st P[q] holds P[q^<*d*>] proof let q,d such that A2: h*(p^q) = (h*p)^(h*q); thus h*(p^(q^<*d*>)) = h*((p^q)^<*d*>) by FINSEQ_1:32 .= (h*(p^q))^<*h.d*> by Th8 .= (h*p)^((h*q)^<*h.d*>) by A2,FINSEQ_1:32 .= (h*p)^(h*(q^<*d*>)) by Th8; end; h*(p^<*>D) = h*p by FINSEQ_1:34 .= (h*p)^(h*(<*>D)) by FINSEQ_1:34; then A3: P[<*>D]; for q holds P[q] from FINSEQ_2:sch 2(A3,A1); hence thesis; end; reserve T,T1,T2,T3 for Tuple of i,D; reserve T9 for Tuple of i, D9; reserve S for Tuple of j, D; reserve S9 for Tuple of j, D9; Lm1: for T being Tuple of 0, D holds F.:(T,T9) = <*>E proof let T be Tuple of 0, D; T = <*>D; hence thesis by FINSEQ_2:73; end; Lm2: for T9 being Tuple of 0, D9 holds F[;](d,T9) = <*>E proof let T9 be Tuple of 0, D9; T9 = <*>D9; hence thesis by FINSEQ_2:79; end; Lm3: for T being Tuple of 0, D holds F[:](T,d9) = <*>E proof let T be Tuple of 0, D; T = <*>D; hence thesis by FINSEQ_2:85; end; theorem Th10: F.:(T^<*d*>,T9^<*d9*>) = (F.:(T,T9))^<*F.(d,d9)*> proof set p = T^<*d*>, q = T9^<*d9*>, pq = F.:(T,T9); set r = F.:(p,q), s = pq^<*F.(d,d9)*>; A1: len T9 = i by CARD_1:def 7; then A2: len q = i+1 by FINSEQ_2:16; A3: len T = i by CARD_1:def 7; then A4: len pq = i by A1,FINSEQ_2:72; len p = i+1 by A3,FINSEQ_2:16; then A5: len r = i+1 by A2,FINSEQ_2:72; then A6: dom r = Seg(i+1) by FINSEQ_1:def 3; A7: now let j be Nat; assume A8: j in dom r; now per cases by A6,A8,FINSEQ_2:7; suppose A9: j in Seg i; Seg len T = dom T by FINSEQ_1:def 3; then A10: p.j = T.j by A3,A9,FINSEQ_1:def 7; A11: Seg len pq = dom pq by FINSEQ_1:def 3; Seg len T9 = dom T9 by FINSEQ_1:def 3; then A12: q.j = T9.j by A1,A9,FINSEQ_1:def 7; j in dom pq by A4,A9,FINSEQ_1:def 3; hence F.(p.j,q.j) = pq.j by A10,A12,FUNCOP_1:22 .= s.j by A4,A9,A11,FINSEQ_1:def 7; end; suppose A13: j = i+1; then p.j = d & q.j = d9 by A3,A1,FINSEQ_1:42; hence F.(p.j,q.j) = s.j by A4,A13,FINSEQ_1:42; end; end; hence r.j = s.j by A8,FUNCOP_1:22; end; len s = len pq + 1 by FINSEQ_2:16; hence thesis by A5,A4,A7,FINSEQ_2:9; end; theorem F.:(T^S,T9^S9) = (F.:(T,T9))^(F.:(S,S9)) proof defpred P[Nat] means for S being Tuple of $1, D, S9 being Tuple of $1, D9 holds F.:(T^S,T9^S9) = (F.:(T,T9))^(F.:(S,S9)); now let j such that A1: for S,S9 holds F.:(T^S,T9^S9) = (F.:(T,T9))^(F.:(S,S9)); let S be Tuple of j+1, D; let S9 be Tuple of j+1, D9; consider S1 being Element of j-tuples_on D, d such that A2: S = S1^<*d*> by FINSEQ_2:117; A3: T^S = T^S1^<*d*> by A2,FINSEQ_1:32; reconsider S1 as Tuple of j, D; consider S19 being Element of j-tuples_on D9, d9 such that A4: S9 = S19^<*d9*> by FINSEQ_2:117; A5: T9^S9 = T9^S19^<*d9*> by A4,FINSEQ_1:32; reconsider S19 as Tuple of j, D9; T^S1 is Tuple of i+j, D & T9^S19 is Tuple of i+j, D9 by FINSEQ_2:107; hence F.:(T^S,T9^S9) = (F.:(T^S1,T9^S19))^<*F.(d,d9)*> by A3,A5,Th10 .= (F.:(T,T9))^(F.:(S1,S19))^<*F.(d,d9)*> by A1 .= (F.:(T,T9))^((F.:(S1,S19))^<*F.(d,d9)*>) by FINSEQ_1:32 .= (F.:(T,T9))^(F.:(S,S9)) by A2,A4,Th10; end; then A6: for j st P[j] holds P[j+1]; now let S be Tuple of 0, D; let S9 be Tuple of 0, D9; S = <*>D; then A7: F.:(S,S9) = <*>E by FINSEQ_2:73; T^S = T & T9^S9 = T9 by FINSEQ_2:95; hence F.:(T^S,T9^S9) = (F.:(T,T9))^(F.:(S,S9)) by A7,FINSEQ_1:34; end; then A8: P[0]; for j holds P[j] from NAT_1:sch 2(A8,A6); hence thesis; end; theorem Th12: F[;](d,p9^<*d9*>) = (F[;](d,p9))^<*F.(d,d9)*> proof set pd = p9^<*d9*>, q = F[;](d,p9); set r = F[;](d,pd), s = q^<*F.(d,d9)*>; set i = len p9; A1: len q = i by FINSEQ_2:78; len pd = i + 1 by FINSEQ_2:16; then A2: len r = i + 1 by FINSEQ_2:78; then A3: dom r = Seg(i+1) by FINSEQ_1:def 3; A4: now let j be Nat; assume A5: j in dom r; now per cases by A3,A5,FINSEQ_2:7; suppose A6: j in Seg i; then A7: j in dom q by A1,FINSEQ_1:def 3; A8: Seg len q = dom q by FINSEQ_1:def 3; Seg len p9 = dom p9 by FINSEQ_1:def 3; hence F.(d,pd.j) = F.(d,p9.j) by A6,FINSEQ_1:def 7 .= q.j by A7,FUNCOP_1:32 .= s.j by A1,A6,A8,FINSEQ_1:def 7; end; suppose A9: j = i+1; hence F.(d,pd.j) = F.(d,d9) by FINSEQ_1:42 .= s.j by A1,A9,FINSEQ_1:42; end; end; hence r.j = s.j by A5,FUNCOP_1:32; end; len s = len q + 1 by FINSEQ_2:16; hence thesis by A1,A2,A4,FINSEQ_2:9; end; theorem F[;](d,p9^q9) = (F[;](d,p9))^(F[;](d,q9)) proof defpred P[FinSequence of D9] means F[;](d,p9^($1)) = (F[;](d,p9))^(F[;](d,$1 )); A1: for q9,d9 st P[q9] holds P[q9^<*d9*>] proof let q9,d9 such that A2: F[;](d,p9^q9) = (F[;](d,p9))^(F[;](d,q9)); thus F[;](d,p9^(q9^<*d9*>)) = F[;](d,(p9^q9)^<*d9*>) by FINSEQ_1:32 .= (F[;](d,p9^q9))^<*F.(d,d9)*> by Th12 .= (F[;](d,p9))^((F[;](d,q9))^<*F.(d,d9)*>) by A2,FINSEQ_1:32 .= (F[;](d,p9))^(F[;](d,q9^<*d9*>)) by Th12; end; F[;](d,p9^(<*>D9)) = F[;](d,p9) by FINSEQ_1:34 .= (F[;](d,p9))^(<*>E) by FINSEQ_1:34 .= (F[;](d,p9))^(F[;](d,<*>D9)) by FINSEQ_2:79; then A3: P[<*>D9]; for q9 holds P[q9] from FINSEQ_2:sch 2(A3,A1); hence thesis; end; theorem Th14: F[:](p^<*d*>,d9) = (F[:](p,d9))^<*F.(d,d9)*> proof set pd = p^<*d*>, q = F[:](p,d9); set r = F[:](pd,d9), s = q^<*F.(d,d9)*>; set i = len p; A1: len q = i by FINSEQ_2:84; len pd = i + 1 by FINSEQ_2:16; then A2: len r = i + 1 by FINSEQ_2:84; then A3: dom r = Seg(i+1) by FINSEQ_1:def 3; A4: now let j be Nat; assume A5: j in dom r; now per cases by A3,A5,FINSEQ_2:7; suppose A6: j in Seg i; then A7: j in dom q by A1,FINSEQ_1:def 3; Seg len p = dom p by FINSEQ_1:def 3; hence F.(pd.j,d9) = F.(p.j,d9) by A6,FINSEQ_1:def 7 .= q.j by A7,FUNCOP_1:27 .= s.j by A7,FINSEQ_1:def 7; end; suppose A8: j = i+1; hence F.(pd.j,d9) = F.(d,d9) by FINSEQ_1:42 .= s.j by A1,A8,FINSEQ_1:42; end; end; hence r.j = s.j by A5,FUNCOP_1:27; end; len s = len q + 1 by FINSEQ_2:16; hence thesis by A1,A2,A4,FINSEQ_2:9; end; theorem F[:](p^q,d9) = (F[:](p,d9))^(F[:](q,d9)) proof defpred P[FinSequence of D] means F[:](p^($1),d9) = (F[:](p,d9))^(F[:]($1,d9 )); A1: for q,d st P[q] holds P[q^<*d*>] proof let q,d such that A2: F[:](p^q,d9) = (F[:](p,d9))^(F[:](q,d9)); thus F[:](p^(q^<*d*>),d9) = F[:]((p^q)^<*d*>,d9) by FINSEQ_1:32 .= (F[:](p^q,d9))^<*F.(d,d9)*> by Th14 .= (F[:](p,d9))^((F[:](q,d9))^<*F.(d,d9)*>) by A2,FINSEQ_1:32 .= (F[:](p,d9))^(F[:](q^<*d*>,d9)) by Th14; end; F[:](p^(<*>D),d9) = F[:](p,d9) by FINSEQ_1:34 .= (F[:](p,d9))^(<*>E) by FINSEQ_1:34 .= (F[:](p,d9))^(F[:](<*>D,d9)) by FINSEQ_2:85; then A3: P[<*>D]; for q holds P[q] from FINSEQ_2:sch 2(A3,A1); hence thesis; end; theorem for h being Function of D,E holds h*(i|->d) = i|->(h.d) proof let h be Function of D,E; d in D; then d in dom h by FUNCT_2:def 1; hence thesis by FUNCOP_1:17; end; theorem Th17: F.:(i|->d,i|->d9) = i |-> (F.(d,d9)) proof [d,d9] in [:D,D9:] by ZFMISC_1:def 2; then [d,d9] in dom F by FUNCT_2:def 1; hence thesis by Th7; end; theorem F[;](d,i|->d9) = i |-> (F.(d,d9)) proof thus F[;](d,i|->d9) = F.:(i |->d,i|->d9) by FUNCOP_1:13 .= i |-> (F.(d,d9)) by Th17; end; theorem F[:](i|->d,d9) = i |-> (F.(d,d9)) proof thus F[:](i|->d,d9) = F.:(i |->d,i|->d9) by FUNCOP_1:13 .= i |-> (F.(d,d9)) by Th17; end; theorem F.:(i|->d,T9) = F[;](d,T9) proof dom T9 = Seg len T9 by FINSEQ_1:def 3 .= Seg i by CARD_1:def 7; hence thesis; end; theorem F.:(T,i|->d) = F[:](T,d) proof dom T = Seg len T by FINSEQ_1:def 3 .= Seg i by CARD_1:def 7; hence thesis; end; theorem F[;](d,T9) = F[;](d,id D9)*T9 proof rng T9 c= D9; hence F[;](d,T9) = F[;](d,(id D9)*T9) by RELAT_1:53 .= F[;](d,(id D9))*T9 by FUNCOP_1:34; end; theorem F[:](T,d) = F[:](id D,d)*T proof rng T c= D; hence F[:](T,d) = F[:]((id D)*T,d) by RELAT_1:53 .= F[:]((id D),d)*T by FUNCOP_1:29; end; reserve F,G for BinOp of D; reserve u for UnOp of D; reserve H for BinOp of E; Lm4: T is Function of Seg i,D proof len T = i by CARD_1:def 7; then Seg i = dom T by FINSEQ_1:def 3; hence thesis by FINSEQ_2:26; end; theorem Th24: F is associative implies F[;](d,id D)*(F.:(f,f9)) = F.:(F[;](d, id D)*f,f9) proof assume A1: F is associative; now let c; thus (F[;](d,id D)*(F.:(f,f9))).c = (F[;](d,id D)).((F.:(f,f9)).c) by FUNCT_2:15 .= (F[;](d,id D)).(F.(f.c,f9.c)) by FUNCOP_1:37 .= F.(d,(id D).(F.(f.c,f9.c))) by FUNCOP_1:53 .= F.(d,F.(f.c,f9.c)) by FUNCT_1:18 .= F.(F.(d,f.c),f9.c) by A1,BINOP_1:def 3 .= F.((F[;](d,f)).c,f9.c) by FUNCOP_1:53 .= F.(((F[;](d,id D))*f).c,f9.c) by FUNCOP_1:55 .= (F.:(F[;](d,id D)*f,f9)).c by FUNCOP_1:37; end; hence thesis by FUNCT_2:63; end; theorem Th25: F is associative implies F[:](id D,d)*(F.:(f,f9)) = F.:(f,F[:]( id D,d)*f9) proof assume A1: F is associative; now let c; thus (F[:](id D,d)*(F.:(f,f9))).c = (F[:](id D,d)).((F.:(f,f9)).c) by FUNCT_2:15 .= (F[:](id D,d)).(F.(f.c,f9.c)) by FUNCOP_1:37 .= F.((id D).(F.(f.c,f9.c)),d) by FUNCOP_1:48 .= F.(F.(f.c,f9.c),d) by FUNCT_1:18 .= F.(f.c,F.(f9.c,d)) by A1,BINOP_1:def 3 .= F.(f.c,(F[:](f9,d)).c) by FUNCOP_1:48 .= F.(f.c,((F[:](id D,d))*f9).c) by FUNCOP_1:50 .= (F.:(f,F[:](id D,d)*f9)).c by FUNCOP_1:37; end; hence thesis by FUNCT_2:63; end; theorem F is associative implies F[;](d,id D)*(F.:(T1,T2)) = F.:(F[;](d,id D)* T1,T2 ) proof assume A1: F is associative; per cases; suppose A2: i = 0; then F.:(T1,T2) = <*>D by Lm1; then A3: F[;](d,id D)*(F.:(T1,T2)) = <*>D; T2 = <*>D by A2; hence thesis by A3,FINSEQ_2:73; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T1 is Function of C,D & T2 is Function of C,D by Lm4; hence thesis by A1,Th24; end; end; theorem F is associative implies F[:](id D,d)*(F.:(T1,T2)) = F.:(T1,F[:](id D, d)*T2 ) proof assume A1: F is associative; per cases; suppose A2: i = 0; then F.:(T1,T2) = <*>D by Lm1; then A3: F[:](id D,d)*(F.:(T1,T2)) = <*>D; T1 = <*>D by A2; hence thesis by A3,FINSEQ_2:73; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T1 is Function of C,D & T2 is Function of C,D by Lm4; hence thesis by A1,Th25; end; end; theorem F is associative implies F.:(F.:(T1,T2),T3) = F.:(T1,F.:(T2,T3)) proof assume A1: F is associative; per cases; suppose A2: i = 0; then F.:(T1,T2) = <*>D by Lm1; then A3: F.:(F.:(T1,T2),T3) = <*>D by FINSEQ_2:73; F.:(T2,T3) = <*>D by A2,Lm1; hence thesis by A3,FINSEQ_2:73; end; suppose i <> 0; then reconsider C = Seg i as non empty set; A4: T3 is Function of C,D by Lm4; T1 is Function of C,D & T2 is Function of C,D by Lm4; hence thesis by A1,A4,FUNCOP_1:61; end; end; theorem F is associative implies F[:](F[;](d1,T),d2) = F[;](d1,F[:](T,d2)) proof assume A1: F is associative; per cases; suppose A2: i = 0; then F[;](d1,T) = <*>D by Lm2; then A3: F[:](F[;](d1,T),d2) = <*>D by FINSEQ_2:85; F[:](T,d2) = <*>D by A2,Lm3; hence thesis by A3,FINSEQ_2:79; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T is Function of C,D by Lm4; hence thesis by A1,FUNCOP_1:59; end; end; theorem F is associative implies F.:(F[:](T1,d),T2) = F.:(T1,F[;](d,T2)) proof assume A1: F is associative; per cases; suppose A2: i = 0; then F[:](T1,d) = <*>D by Lm3; then A3: F.:(F[:](T1,d),T2) = <*>D by FINSEQ_2:73; F[;](d,T2) = <*>D by A2,Lm2; hence thesis by A3,FINSEQ_2:73; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T1 is Function of C,D & T2 is Function of C,D by Lm4; hence thesis by A1,FUNCOP_1:60; end; end; theorem F is associative implies F[;](F.(d1,d2),T) = F[;](d1,F[;](d2,T)) proof assume A1: F is associative; per cases; suppose i = 0; then T = <*>D & F[;](d2,T) = <*>D by Lm2; hence thesis; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T is Function of C,D by Lm4; hence thesis by A1,FUNCOP_1:62; end; end; theorem F is associative implies F[:](T,F.(d1,d2)) = F[:](F[:](T,d1),d2) proof assume A1: F is associative; per cases; suppose i = 0; then T = <*>D & F[:](T,d1) = <*>D by Lm3; hence thesis; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T is Function of C,D by Lm4; hence thesis by A1,FUNCOP_1:63; end; end; theorem F is commutative implies F.:(T1,T2) = F.:(T2,T1) proof assume A1: F is commutative; per cases; suppose A2: i = 0; then F.:(T1,T2) = <*>D by Lm1; hence thesis by A2,Lm1; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T1 is Function of C,D & T2 is Function of C,D by Lm4; hence thesis by A1,FUNCOP_1:65; end; end; theorem F is commutative implies F[;](d,T) = F[:](T,d) proof assume A1: F is commutative; per cases; suppose A2: i = 0; then F[;](d,T) = <*>D by Lm2; hence thesis by A2,Lm3; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T is Function of C,D by Lm4; hence thesis by A1,FUNCOP_1:64; end; end; theorem Th35: F is_distributive_wrt G implies F[;](G.(d1,d2),f) = G.:(F[;](d1, f),F[;] (d2,f)) proof assume A1: F is_distributive_wrt G; now let c; thus (F[;](G.(d1,d2),f)).c = F.(G.(d1,d2),f.c) by FUNCOP_1:53 .= G.(F.(d1,f.c),F.(d2,f.c)) by A1,BINOP_1:11 .= G.(F[;](d1,f).c,F.(d2,f.c)) by FUNCOP_1:53 .= G.((F[;](d1,f)).c,(F[;](d2,f)).c) by FUNCOP_1:53 .= (G.:(F[;](d1,f),F[;](d2,f))).c by FUNCOP_1:37; end; hence thesis by FUNCT_2:63; end; theorem Th36: F is_distributive_wrt G implies F[:](f,G.(d1,d2)) = G.:(F[:](f, d1),F[:] (f,d2)) proof assume A1: F is_distributive_wrt G; now let c; thus (F[:](f,G.(d1,d2))).c = F.(f.c,G.(d1,d2)) by FUNCOP_1:48 .= G.(F.(f.c,d1),F.(f.c,d2)) by A1,BINOP_1:11 .= G.(F[:](f,d1).c,F.(f.c,d2)) by FUNCOP_1:48 .= G.((F[:](f,d1)).c,(F[:](f,d2)).c) by FUNCOP_1:48 .= (G.:(F[:](f,d1),F[:](f,d2))).c by FUNCOP_1:37; end; hence thesis by FUNCT_2:63; end; theorem Th37: (for d1,d2 holds h.(F.(d1,d2)) = H.(h.d1,h.d2)) implies h*(F.:(f ,f9)) = H.:(h*f,h*f9) proof assume A1: for d1,d2 holds h.(F.(d1,d2)) = H.(h.d1,h.d2); now let c; thus (h*(F.:(f,f9))).c = h.((F.:(f,f9)).c) by FUNCT_2:15 .= h.(F.(f.c,f9.c)) by FUNCOP_1:37 .= H.(h.(f.c),h.(f9.c)) by A1 .= H.((h*f).c,h.(f9.c)) by FUNCT_2:15 .= H.((h*f).c,(h*f9).c) by FUNCT_2:15 .= (H.:(h*f,h*f9)).c by FUNCOP_1:37; end; hence thesis by FUNCT_2:63; end; theorem Th38: (for d1,d2 holds h.(F.(d1,d2)) = H.(h.d1,h.d2)) implies h*(F[;]( d,f)) = H[;](h.d,h*f) proof assume A1: for d1,d2 holds h.(F.(d1,d2)) = H.(h.d1,h.d2); reconsider g = C --> d as Function of C,D; A2: dom h = D & dom(h*f) = C by FUNCT_2:def 1; thus h*(F[;](d,f)) = h*(F.:(g,f)) by FUNCT_2:def 1 .= H.:(h*g,h*f) by A1,Th37 .= H[;](h.d,h*f) by A2,FUNCOP_1:17; end; theorem Th39: (for d1,d2 holds h.(F.(d1,d2)) = H.(h.d1,h.d2)) implies h*(F[:]( f,d)) = H[:](h*f,h.d) proof assume A1: for d1,d2 holds h.(F.(d1,d2)) = H.(h.d1,h.d2); reconsider g = C --> d as Function of C,D; A2: dom h = D & dom(h*f) = C by FUNCT_2:def 1; thus h*(F[:](f,d)) = h*(F.:(f,g)) by FUNCT_2:def 1 .= H.:(h*f,h*g) by A1,Th37 .= H[:](h*f,h.d) by A2,FUNCOP_1:17; end; theorem u is_distributive_wrt F implies u*(F.:(f,f9)) = F.:(u*f,u*f9) proof assume for d1,d2 holds u.(F.(d1,d2)) = F.(u.d1,u.d2); hence thesis by Th37; end; theorem u is_distributive_wrt F implies u*(F[;](d,f)) = F[;](u.d,u*f) proof assume for d1,d2 holds u.(F.(d1,d2)) = F.(u.d1,u.d2); hence thesis by Th38; end; theorem u is_distributive_wrt F implies u*(F[:](f,d)) = F[:](u*f,u.d) proof assume for d1,d2 holds u.(F.(d1,d2)) = F.(u.d1,u.d2); hence thesis by Th39; end; theorem Th43: F is having_a_unity implies F.:(C-->the_unity_wrt F,f) = f & F.: (f,C-->the_unity_wrt F) = f proof set e = the_unity_wrt F; reconsider g = C-->e as Function of C,D; assume A1: F is having_a_unity; now let c; thus (F.:(g,f)).c = F.(g.c,f.c) by FUNCOP_1:37 .= F.(e,f.c) by FUNCOP_1:7 .= f.c by A1,SETWISEO:15; end; hence F.:(C-->e,f) = f by FUNCT_2:63; now let c; thus (F.:(f,g)).c = F.(f.c,g.c) by FUNCOP_1:37 .= F.(f.c,e) by FUNCOP_1:7 .= f.c by A1,SETWISEO:15; end; hence thesis by FUNCT_2:63; end; theorem Th44: F is having_a_unity implies F[;](the_unity_wrt F,f) = f proof set e = the_unity_wrt F; assume A1: F is having_a_unity; now let c; thus (F[;](e,f)).c = F.(e,f.c) by FUNCOP_1:53 .= f.c by A1,SETWISEO:15; end; hence thesis by FUNCT_2:63; end; theorem Th45: F is having_a_unity implies F[:](f,the_unity_wrt F) = f proof set e = the_unity_wrt F; assume A1: F is having_a_unity; now let c; thus (F[:](f,e)).c = F.(f.c,e) by FUNCOP_1:48 .= f.c by A1,SETWISEO:15; end; hence thesis by FUNCT_2:63; end; theorem F is_distributive_wrt G implies F[;](G.(d1,d2),T) = G.:(F[;](d1,T),F [;] (d2,T)) proof assume A1: F is_distributive_wrt G; per cases; suppose i = 0; then F[;](d1,T) = <*>D & F[;](G.(d1,d2),T) = <*>D by Lm2; hence thesis by FINSEQ_2:73; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T is Function of C,D by Lm4; hence thesis by A1,Th35; end; end; theorem F is_distributive_wrt G implies F[:](T,G.(d1,d2)) = G.:(F[:](T,d1),F [:] (T,d2)) proof assume A1: F is_distributive_wrt G; per cases; suppose i = 0; then F[:](T,d1) = <*>D & F[:](T,G.(d1,d2)) = <*>D by Lm3; hence thesis by FINSEQ_2:73; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T is Function of C,D by Lm4; hence thesis by A1,Th36; end; end; theorem Th48: (for d1,d2 holds h.(F.(d1,d2)) = H.(h.d1,h.d2)) implies h*(F.:( T1,T2)) = H.:(h*T1,h*T2) proof assume A1: for d1,d2 holds h.(F.(d1,d2)) = H.(h.d1,h.d2); per cases; suppose A2: i = 0; then F.:(T1,T2) = <*>D by Lm1; then A3: h*(F.:(T1,T2)) = <*>E; h*T1 = <*>E by A2; hence thesis by A3,FINSEQ_2:73; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T1 is Function of C,D & T2 is Function of C,D by Lm4; hence thesis by A1,Th37; end; end; theorem Th49: (for d1,d2 holds h.(F.(d1,d2)) = H.(h.d1,h.d2)) implies h*(F[;]( d,T)) = H[;](h.d,h*T) proof assume A1: for d1,d2 holds h.(F.(d1,d2)) = H.(h.d1,h.d2); per cases; suppose A2: i = 0; then F[;](d,T) = <*>D by Lm2; then A3: h*(F[;](d,T)) = <*>E; h*T = <*>E by A2; hence thesis by A3,FINSEQ_2:79; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T is Function of C,D by Lm4; hence thesis by A1,Th38; end; end; theorem Th50: (for d1,d2 holds h.(F.(d1,d2)) = H.(h.d1,h.d2)) implies h*(F[:]( T,d)) = H[:](h*T,h.d) proof assume A1: for d1,d2 holds h.(F.(d1,d2)) = H.(h.d1,h.d2); per cases; suppose A2: i = 0; then F[:](T,d) = <*>D by Lm3; then A3: h*(F[:](T,d)) = <*>E; h*T = <*>E by A2; hence thesis by A3,FINSEQ_2:85; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T is Function of C,D by Lm4; hence thesis by A1,Th39; end; end; theorem u is_distributive_wrt F implies u*(F.:(T1,T2)) = F.:(u*T1,u*T2) proof assume for d1,d2 holds u.(F.(d1,d2)) = F.(u.d1,u.d2); hence thesis by Th48; end; theorem u is_distributive_wrt F implies u*(F[;](d,T)) = F[;](u.d,u*T) proof assume for d1,d2 holds u.(F.(d1,d2)) = F.(u.d1,u.d2); hence thesis by Th49; end; theorem u is_distributive_wrt F implies u*(F[:](T,d)) = F[:](u*T,u.d) proof assume for d1,d2 holds u.(F.(d1,d2)) = F.(u.d1,u.d2); hence thesis by Th50; end; theorem G is_distributive_wrt F & u = G[;](d,id D) implies u is_distributive_wrt F proof assume that A1: G is_distributive_wrt F and A2: u = G[;](d,id D); let d1,d2; thus u.(F.(d1,d2)) = G.(d,(id D).(F.(d1,d2))) by A2,FUNCOP_1:53 .= G.(d,F.(d1,d2)) by FUNCT_1:18 .= F.(G.(d,d1),G.(d,d2)) by A1,BINOP_1:11 .= F.(G.(d,(id D).d1),G.(d,d2)) by FUNCT_1:18 .= F.(G.(d,(id D).d1),G.(d,(id D).d2)) by FUNCT_1:18 .= F.(u.d1,G.(d,(id D).d2)) by A2,FUNCOP_1:53 .= F.(u.d1,u.d2) by A2,FUNCOP_1:53; end; theorem G is_distributive_wrt F & u = G[:](id D,d) implies u is_distributive_wrt F proof assume that A1: G is_distributive_wrt F and A2: u = G[:](id D,d); let d1,d2; thus u.(F.(d1,d2)) = G.((id D).(F.(d1,d2)),d) by A2,FUNCOP_1:48 .= G.(F.(d1,d2),d) by FUNCT_1:18 .= F.(G.(d1,d),G.(d2,d)) by A1,BINOP_1:11 .= F.(G.((id D).d1,d),G.(d2,d)) by FUNCT_1:18 .= F.(G.((id D).d1,d),G.((id D).d2,d)) by FUNCT_1:18 .= F.(u.d1,G.((id D).d2,d)) by A2,FUNCOP_1:48 .= F.(u.d1,u.d2) by A2,FUNCOP_1:48; end; theorem F is having_a_unity implies F.:(i|->the_unity_wrt F,T) = T & F.:(T,i |->the_unity_wrt F) = T proof assume A1: F is having_a_unity; per cases; suppose A2: i = 0; then T = <*>D; hence thesis by A2,Lm1; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T is Function of C,D by Lm4; hence thesis by A1,Th43; end; end; theorem F is having_a_unity implies F[;](the_unity_wrt F,T) = T proof assume A1: F is having_a_unity; per cases; suppose i = 0; then T = <*>D; hence thesis by Lm2; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T is Function of C,D by Lm4; hence thesis by A1,Th44; end; end; theorem F is having_a_unity implies F[:](T,the_unity_wrt F) = T proof assume A1: F is having_a_unity; per cases; suppose i = 0; then T = <*>D; hence thesis by Lm3; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T is Function of C,D by Lm4; hence thesis by A1,Th45; end; end; definition let D,u,F; pred u is_an_inverseOp_wrt F means :Def1: for d holds F.(d,u.d) = the_unity_wrt F & F.(u.d,d) = the_unity_wrt F; end; definition let D,F; attr F is having_an_inverseOp means :Def2: ex u st u is_an_inverseOp_wrt F; end; definition let D,F; assume that A1: F is having_a_unity and A2: F is associative and A3: F is having_an_inverseOp; func the_inverseOp_wrt F -> UnOp of D means :Def3: it is_an_inverseOp_wrt F; existence by A3,Def2; uniqueness proof set e = the_unity_wrt F; let u1,u2 be UnOp of D such that A4: for d holds F.(d,u1.d) = e & F.(u1.d,d) = e and A5: for d holds F.(d,u2.d) = e & F.(u2.d,d) = e; now let d; set d1 = u1.d, d2 = u2.d; thus u1.d = F.(d1,e) by A1,SETWISEO:15 .= F.(d1,F.(d,d2)) by A5 .= F.(F.(d1,d),d2) by A2,BINOP_1:def 3 .= F.(e,d2) by A4 .= u2.d by A1,SETWISEO:15; end; hence thesis by FUNCT_2:63; end; end; theorem Th59: F is having_a_unity & F is associative & F is having_an_inverseOp implies F.((the_inverseOp_wrt F).d,d) = the_unity_wrt F & F .(d,(the_inverseOp_wrt F).d) = the_unity_wrt F proof assume F is having_a_unity & F is associative & F is having_an_inverseOp; then the_inverseOp_wrt F is_an_inverseOp_wrt F by Def3; hence thesis by Def1; end; theorem Th60: F is having_a_unity & F is associative & F is having_an_inverseOp & F.(d1,d2) = the_unity_wrt F implies d1 = ( the_inverseOp_wrt F).d2 & (the_inverseOp_wrt F).d1 = d2 proof assume that A1: F is having_a_unity and A2: F is associative and A3: F is having_an_inverseOp and A4: F.(d1,d2) = the_unity_wrt F; set e = the_unity_wrt F, d3 = (the_inverseOp_wrt F).d2; F.(F.(d1,d2),d3) = d3 by A1,A4,SETWISEO:15; then F.(d1,F.(d2,d3)) = d3 by A2,BINOP_1:def 3; then F.(d1,e) = d3 by A1,A2,A3,Th59; hence d1 = d3 by A1,SETWISEO:15; set d3 = (the_inverseOp_wrt F).d1; F.(d3,F.(d1,d2)) = d3 by A1,A4,SETWISEO:15; then F.(F.(d3,d1),d2) = d3 by A2,BINOP_1:def 3; then F.(e,d2) = d3 by A1,A2,A3,Th59; hence thesis by A1,SETWISEO:15; end; theorem Th61: F is having_a_unity & F is associative & F is having_an_inverseOp implies (the_inverseOp_wrt F).(the_unity_wrt F) = the_unity_wrt F proof assume that A1: F is having_a_unity and A2: F is associative & F is having_an_inverseOp; set e = the_unity_wrt F; F.(e,e) = e by A1,SETWISEO:15; hence thesis by A1,A2,Th60; end; theorem Th62: F is having_a_unity & F is associative & F is having_an_inverseOp implies (the_inverseOp_wrt F).((the_inverseOp_wrt F).d) = d proof assume A1: F is having_a_unity & F is associative & F is having_an_inverseOp; then F.(d,(the_inverseOp_wrt F).d) = the_unity_wrt F by Th59; hence thesis by A1,Th60; end; theorem Th63: F is having_a_unity & F is associative & F is commutative & F is having_an_inverseOp implies (the_inverseOp_wrt F) is_distributive_wrt F proof assume that A1: F is having_a_unity and A2: F is associative and A3: F is commutative and A4: F is having_an_inverseOp; let d1,d2; set e = the_unity_wrt F, u = the_inverseOp_wrt F; F.(F.(u.d1,u.d2),F.(d1,d2)) = F.(u.d1,F.(u.d2,F.(d1,d2))) by A2,BINOP_1:def 3 .= F.(u.d1,F.(F.(u.d2,d1),d2)) by A2,BINOP_1:def 3 .= F.(u.d1,F.(F.(d1,u.d2),d2)) by A3,BINOP_1:def 2 .= F.(u.d1,F.(d1,F.(u.d2,d2))) by A2,BINOP_1:def 3 .= F.(u.d1,F.(d1,e)) by A1,A2,A4,Th59 .= F.(F.(u.d1,d1),e) by A2,BINOP_1:def 3 .= F.(e,e) by A1,A2,A4,Th59 .= e by A1,SETWISEO:15; hence u.(F.(d1,d2)) = F.(u.d1,u.d2) by A1,A2,A4,Th60; end; theorem Th64: F is having_a_unity & F is associative & F is having_an_inverseOp & (F.(d,d1) = F.(d,d2) or F.(d1,d) = F.(d2,d)) implies d1 = d2 proof assume that A1: F is having_a_unity and A2: F is associative and A3: F is having_an_inverseOp and A4: F.(d,d1) = F.(d,d2) or F.(d1,d) = F.(d2,d); set e = the_unity_wrt F, u = the_inverseOp_wrt F; per cases by A4; suppose A5: F.(d,d1) = F.(d,d2); thus d1 = F.(e,d1) by A1,SETWISEO:15 .= F.(F.(u.d,d),d1) by A1,A2,A3,Th59 .= F.(u.d,F.(d,d2)) by A2,A5,BINOP_1:def 3 .= F.(F.(u.d,d),d2) by A2,BINOP_1:def 3 .= F.(e,d2) by A1,A2,A3,Th59 .= d2 by A1,SETWISEO:15; end; suppose A6: F.(d1,d) = F.(d2,d); thus d1 = F.(d1,e) by A1,SETWISEO:15 .= F.(d1,F.(d,u.d)) by A1,A2,A3,Th59 .= F.(F.(d2,d),u.d) by A2,A6,BINOP_1:def 3 .= F.(d2,F.(d,u.d)) by A2,BINOP_1:def 3 .= F.(d2,e) by A1,A2,A3,Th59 .= d2 by A1,SETWISEO:15; end; end; theorem Th65: F is having_a_unity & F is associative & F is having_an_inverseOp & (F.(d1,d2) = d2 or F.(d2,d1) = d2) implies d1 = the_unity_wrt F proof assume that A1: F is having_a_unity and A2: F is associative & F is having_an_inverseOp; set e = the_unity_wrt F; assume F.(d1,d2) = d2 or F.(d2,d1) = d2; then F.(d1,d2) = F.(e,d2) or F.(d2,d1) = F.(d2,e) by A1,SETWISEO:15; hence thesis by A1,A2,Th64; end; theorem Th66: F is associative & F is having_a_unity & F is having_an_inverseOp & G is_distributive_wrt F & e = the_unity_wrt F implies for d holds G.(e,d) = e & G.(d,e) = e proof assume that A1: F is associative and A2: F is having_a_unity and A3: F is having_an_inverseOp and A4: G is_distributive_wrt F and A5: e = the_unity_wrt F; let d; set ed = G.(e,d); F.(ed,ed) = G.(F.(e,e),d) by A4,BINOP_1:11 .= ed by A2,A5,SETWISEO:15; hence ed = e by A1,A2,A3,A5,Th65; set de = G.(d,e); F.(de,de) = G.(d,F.(e,e)) by A4,BINOP_1:11 .= de by A2,A5,SETWISEO:15; hence thesis by A1,A2,A3,A5,Th65; end; theorem Th67: F is having_a_unity & F is associative & F is having_an_inverseOp & u = the_inverseOp_wrt F & G is_distributive_wrt F implies u.(G.(d1,d2)) = G.(u.d1,d2) & u.(G.(d1,d2)) = G.(d1,u.d2) proof assume that A1: F is having_a_unity & F is associative & F is having_an_inverseOp and A2: u = the_inverseOp_wrt F and A3: G is_distributive_wrt F; set e = the_unity_wrt F; F.(G.(d1,d2),G.(u.d1,d2)) = G.(F.(d1,u.d1),d2) by A3,BINOP_1:11 .= G.(e,d2) by A1,A2,Th59 .= e by A1,A3,Th66; hence u.(G.(d1,d2)) = G.(u.d1,d2) by A1,A2,Th60; F.(G.(d1,d2),G.(d1,u.d2)) = G.(d1,F.(d2,u.d2)) by A3,BINOP_1:11 .= G.(d1,e) by A1,A2,Th59 .= e by A1,A3,Th66; hence thesis by A1,A2,Th60; end; theorem F is having_a_unity & F is associative & F is having_an_inverseOp & u = the_inverseOp_wrt F & G is_distributive_wrt F & G is having_a_unity implies G [;](u.(the_unity_wrt G),id D) = u proof assume that A1: F is having_a_unity & F is associative & F is having_an_inverseOp & u = the_inverseOp_wrt F & G is_distributive_wrt F and A2: G is having_a_unity; set o = the_unity_wrt G; for d holds (G[;](u.o,id D)).d = u.d proof let d; thus (G[;](u.o,id D)).d = G.(u.o,(id D).d) by FUNCOP_1:53 .= G.(u.o,d) by FUNCT_1:18 .= u.(G.(o,d)) by A1,Th67 .= u.d by A2,SETWISEO:15; end; hence thesis by FUNCT_2:63; end; theorem F is associative & F is having_a_unity & F is having_an_inverseOp & G is_distributive_wrt F implies G[;](d,id D).the_unity_wrt F = the_unity_wrt F proof assume that A1: F is associative and A2: F is having_a_unity and A3: F is having_an_inverseOp and A4: G is_distributive_wrt F; set e = the_unity_wrt F, i = the_inverseOp_wrt F; G.(d,e) = G.(d,F.(e,e)) by A2,SETWISEO:15 .= F.(G.(d,e),G.(d,e)) by A4,BINOP_1:11; then e = F.(F.(G.(d,e),G.(d,e)),i.(G.(d,e))) by A1,A2,A3,Th59; then e = F.(G.(d,e),F.(G.(d,e),i.(G.(d,e)))) by A1,BINOP_1:def 3; then e = F.(G.(d,e),e) by A1,A2,A3,Th59; then e = G.(d,e) by A2,SETWISEO:15; then G.(d,(id D).e) = e by FUNCT_1:18; hence thesis by FUNCOP_1:53; end; theorem F is associative & F is having_a_unity & F is having_an_inverseOp & G is_distributive_wrt F implies G[:](id D,d).the_unity_wrt F = the_unity_wrt F proof assume that A1: F is associative and A2: F is having_a_unity and A3: F is having_an_inverseOp and A4: G is_distributive_wrt F; set e = the_unity_wrt F, i = the_inverseOp_wrt F; G.(e,d) = G.(F.(e,e),d) by A2,SETWISEO:15 .= F.(G.(e,d),G.(e,d)) by A4,BINOP_1:11; then e = F.(F.(G.(e,d),G.(e,d)),i.(G.(e,d))) by A1,A2,A3,Th59; then e = F.(G.(e,d),F.(G.(e,d),i.(G.(e,d)))) by A1,BINOP_1:def 3; then e = F.(G.(e,d),e) by A1,A2,A3,Th59; then e = G.(e,d) by A2,SETWISEO:15; then G.((id D).e,d) = e by FUNCT_1:18; hence thesis by FUNCOP_1:48; end; theorem Th71: F is having_a_unity & F is associative & F is having_an_inverseOp implies F.:(f,(the_inverseOp_wrt F)*f) = C-->the_unity_wrt F & F.:((the_inverseOp_wrt F)*f,f) = C-->the_unity_wrt F proof set u = the_inverseOp_wrt F; reconsider g = C-->the_unity_wrt F as Function of C,D; assume A1: F is having_a_unity & F is associative & F is having_an_inverseOp; now let c; thus (F.:(f,u*f)).c = F.(f.c,(u*f).c) by FUNCOP_1:37 .= F.(f.c,u.(f.c)) by FUNCT_2:15 .= the_unity_wrt F by A1,Th59 .= g.c by FUNCOP_1:7; end; hence F.:(f,(the_inverseOp_wrt F)*f) = C-->the_unity_wrt F by FUNCT_2:63; now let c; thus (F.:(u*f,f)).c = F.((u*f).c,f.c) by FUNCOP_1:37 .= F.(u.(f.c),f.c) by FUNCT_2:15 .= the_unity_wrt F by A1,Th59 .= g.c by FUNCOP_1:7; end; hence thesis by FUNCT_2:63; end; theorem Th72: F is associative & F is having_an_inverseOp & F is having_a_unity & F.:(f,f9) = C-->the_unity_wrt F implies f = (the_inverseOp_wrt F)*f9 & (the_inverseOp_wrt F)*f = f9 proof assume that A1: F is associative & F is having_an_inverseOp & F is having_a_unity and A2: F.:(f,f9) = C-->the_unity_wrt F; set u = the_inverseOp_wrt F; set e = the_unity_wrt F; reconsider g = C-->e as Function of C,D; now let c; F.(f.c,f9.c) = g.c by A2,FUNCOP_1:37 .= e by FUNCOP_1:7; hence f.c = u.(f9.c) by A1,Th60 .= (u*f9).c by FUNCT_2:15; end; hence f = (the_inverseOp_wrt F)*f9 by FUNCT_2:63; now let c; F.(f.c,f9.c) = g.c by A2,FUNCOP_1:37 .= e by FUNCOP_1:7; then f9.c = u.(f.c) by A1,Th60; hence (u*f).c = f9.c by FUNCT_2:15; end; hence thesis by FUNCT_2:63; end; theorem F is having_a_unity & F is associative & F is having_an_inverseOp implies F.:(T,(the_inverseOp_wrt F)*T) = i|->the_unity_wrt F & F.:(( the_inverseOp_wrt F)*T,T) = i|->the_unity_wrt F proof assume A1: F is having_a_unity & F is associative & F is having_an_inverseOp; reconsider uT = the_inverseOp_wrt F*T as Element of i-tuples_on D by FINSEQ_2:113; per cases; suppose A2: i = 0; then F.:(T,uT) = <*>D & F.:(uT,T) = <*>D by Lm1; hence thesis by A2; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T is Function of C,D by Lm4; hence thesis by A1,Th71; end; end; theorem F is associative & F is having_an_inverseOp & F is having_a_unity & F .:(T1,T2) = i|->the_unity_wrt F implies T1 = (the_inverseOp_wrt F)*T2 & ( the_inverseOp_wrt F)*T1 = T2 proof assume A1: F is associative & F is having_an_inverseOp & F is having_a_unity & F .:(T1,T2) = i|->the_unity_wrt F; per cases; suppose i = 0; then T1 = <*>D & T2 = <*>D; hence thesis; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T1 is Function of C,D & T2 is Function of C,D by Lm4; hence thesis by A1,Th72; end; end; theorem Th75: F is associative & F is having_a_unity & e = the_unity_wrt F & F is having_an_inverseOp & G is_distributive_wrt F implies G[;](e,f) = C-->e proof reconsider g = C-->e as Function of C,D; assume A1: F is associative & F is having_a_unity & e = the_unity_wrt F & F is having_an_inverseOp & G is_distributive_wrt F; now let c; thus (G[;](e,f)).c = G.(e,f.c) by FUNCOP_1:53 .= e by A1,Th66 .= g.c by FUNCOP_1:7; end; hence thesis by FUNCT_2:63; end; theorem F is associative & F is having_a_unity & e = the_unity_wrt F & F is having_an_inverseOp & G is_distributive_wrt F implies G[;](e,T) = i|->e proof assume A1: F is associative & F is having_a_unity & e = the_unity_wrt F & F is having_an_inverseOp & G is_distributive_wrt F; per cases; suppose A2: i = 0; then G[;](e,T) = <*>D by Lm2; hence thesis by A2; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T is Function of C,D by Lm4; hence thesis by A1,Th75; end; end; definition let F,f,g be Function; func F*(f,g) -> Function equals F*[:f,g:]; correctness; end; theorem Th77: for F,f,g being Function st [x,y] in dom(F*(f,g)) holds (F*(f,g) ).(x,y) = F.(f.x,g.y) proof let F,f,g be Function such that A1: [x,y] in dom(F*(f,g)); [x,y] in dom [:f,g:] by A1,FUNCT_1:11; then [x,y] in [:dom f,dom g:] by FUNCT_3:def 8; then [:f,g:].(x,y) = [f.x,g.y] by FUNCT_3:65; hence thesis by A1,FUNCT_1:12; end; theorem for F,f,g being Function st [x,y] in dom(F*(f,g)) holds (F*(f,g)).(x,y ) = F.(f.x,g.y) by Th77; theorem Th79: for F being Function of [:D,D9:],E, f being Function of C,D, g being Function of C9,D9 holds F*(f,g) is Function of [:C,C9:],E proof let F be Function of [:D,D9:],E, f be Function of C,D, g be Function of C9, D9; F*(f,g) = F*[:f,g:]; hence thesis; end; theorem for u,u9 being Function of D,D holds F*(u,u9) is BinOp of D by Th79; definition let D,F; let f,f9 be Function of D,D; redefine func F*(f,f9) -> BinOp of D; coherence by Th79; end; theorem Th81: for F being Function of [:D,D9:],E, f being Function of C,D, g being Function of C9,D9 holds (F*(f,g)).(c,c9) = F.(f.c,g.c9) proof let F be Function of [:D,D9:],E, f be Function of C,D, g be Function of C9, D9; set H = F*(f,g); H is Function of [:C,C9:],E by Th79; then dom H = [:C,C9:] by FUNCT_2:def 1; then [c,c9] in dom H by ZFMISC_1:def 2; hence thesis by Th77; end; theorem Th82: for u being Function of D,D holds (F*(id D,u)).(d1,d2) = F.(d1,u .d2) & (F*(u,id D)).(d1,d2) = F.(u.d1,d2) proof let u be Function of D,D; (id D).d1 = d1 & (id D).d2 = d2 by FUNCT_1:18; hence thesis by Th81; end; theorem Th83: (F*(id D,u)).:(f,f9) = F.:(f,u*f9) proof now let c; thus ((F*(id D,u)).:(f,f9)).c = (F*(id D,u)).(f.c,f9.c) by FUNCOP_1:37 .= F.(f.c,u.(f9.c)) by Th82 .= F.(f.c,(u*f9).c) by FUNCT_2:15 .= (F.:(f,u*f9)).c by FUNCOP_1:37; end; hence thesis by FUNCT_2:63; end; theorem (F*(id D,u)).:(T1,T2) = F.:(T1,u*T2) proof now per cases; suppose i = 0; then (F*(id D,u)).:(T1,T2) = <*>D & u*T2 = <*>D by Lm1; hence thesis by FINSEQ_2:73; end; suppose i <> 0; then reconsider C = Seg i as non empty set; T1 is Function of C,D & T2 is Function of C,D by Lm4; hence thesis by Th83; end; end; hence thesis; end; theorem F is associative & F is having_a_unity & F is commutative & F is having_an_inverseOp & u = the_inverseOp_wrt F implies u.(F*(id D,u).(d1,d2)) = F*(u,id D).(d1,d2) & F*(id D,u).(d1,d2) = u.(F*(u,id D).(d1,d2)) proof assume that A1: F is associative & F is having_a_unity and A2: F is commutative and A3: F is having_an_inverseOp & u = the_inverseOp_wrt F; A4: u is_distributive_wrt F by A1,A2,A3,Th63; thus u.(F*(id D,u).(d1,d2)) = u.(F.(d1,u.d2)) by Th82 .= F.(u.d1,u.(u.d2)) by A4,BINOP_1:def 12 .= F.(u.d1,d2) by A1,A3,Th62 .= F*(u,id D).(d1,d2) by Th82; hence thesis by A1,A3,Th62; end; theorem F is associative & F is having_a_unity & F is having_an_inverseOp implies (F*(id D,the_inverseOp_wrt F)).(d,d) = the_unity_wrt F proof assume A1: F is associative & F is having_a_unity & F is having_an_inverseOp; set u = the_inverseOp_wrt F; thus F*(id D,u).(d,d) = F.(d,u.d) by Th82 .= the_unity_wrt F by A1,Th59; end; theorem F is associative & F is having_a_unity & F is having_an_inverseOp implies (F*(id D,the_inverseOp_wrt F)).(d,the_unity_wrt F) = d proof assume that A1: F is associative and A2: F is having_a_unity and A3: F is having_an_inverseOp; set u = the_inverseOp_wrt F, e = the_unity_wrt F; thus (F*(id D,u)).(d,e) = F.(d,u.e) by Th82 .= F.(d,e) by A1,A2,A3,Th61 .= d by A2,SETWISEO:15; end; theorem F is having_a_unity implies (F*(id D,u)).(the_unity_wrt F,d) = u.d proof assume A1: F is having_a_unity; set e = the_unity_wrt F; thus (F*(id D,u)).(e,d) = F.(e,u.d) by Th82 .= u.d by A1,SETWISEO:15; end; theorem F is commutative & F is associative & F is having_a_unity & F is having_an_inverseOp & G = F*(id D,the_inverseOp_wrt F) implies for d1,d2,d3,d4 holds F.(G.(d1,d2),G.(d3,d4))= G.(F.(d1,d3),F.(d2,d4)) proof assume that A1: F is commutative and A2: F is associative and A3: F is having_a_unity & F is having_an_inverseOp and A4: G = F*(id D,the_inverseOp_wrt F); set u = the_inverseOp_wrt F; A5: u is_distributive_wrt F by A1,A2,A3,Th63; let d1,d2,d3,d4; thus F.(G.(d1,d2),G.(d3,d4)) = F.(F.(d1,u.d2),G.(d3,d4)) by A4,Th82 .= F.(F.(d1,u.d2),F.(d3,u.d4)) by A4,Th82 .= F.(d1,F.(u.d2,F.(d3,u.d4))) by A2,BINOP_1:def 3 .= F.(d1,F.(F.(u.d2,d3),u.d4)) by A2,BINOP_1:def 3 .= F.(d1,F.(F.(d3,u.d2),u.d4)) by A1,BINOP_1:def 2 .= F.(d1,F.(d3,F.(u.d2,u.d4))) by A2,BINOP_1:def 3 .= F.(F.(d1,d3),F.(u.d2,u.d4)) by A2,BINOP_1:def 3 .= F.(F.(d1,d3),u.(F.(d2,d4))) by A5,BINOP_1:def 12 .= G.(F.(d1,d3),F.(d2,d4)) by A4,Th82; end; begin reserve p,q,r for FinSequence; reserve u,v,x,y,y1,y2,z,A,D,X,Y for set; reserve i,j,k,l,m,n for Nat; theorem Th1: Seg 3 = {1,2,3} proof thus Seg 3 = {1,2} \/ {2 + 1} by FINSEQ_1:2,9 .= {1,2,3} by ENUMSET1:3; end; theorem Th2: Seg 4 = {1,2,3,4} proof thus Seg 4 = {1,2,3} \/ {3 + 1} by Th1,FINSEQ_1:9 .= {1,2,3,4} by ENUMSET1:6; end; theorem Th3: Seg 5 = {1,2,3,4,5} proof thus Seg 5 = {1,2,3,4} \/ {4 + 1} by Th2,FINSEQ_1:9 .= {1,2,3,4,5} by ENUMSET1:10; end; theorem Th4: Seg 6 = {1,2,3,4,5,6} proof thus Seg 6 = {1,2,3,4,5} \/ {5 + 1} by Th3,FINSEQ_1:9 .= {1,2,3,4,5,6} by ENUMSET1:15; end; theorem Th5: Seg 7 = {1,2,3,4,5,6,7} proof thus Seg 7 = {1,2,3,4,5,6} \/ {6 + 1} by Th4,FINSEQ_1:9 .= {1,2,3,4,5,6,7} by ENUMSET1:21; end; theorem Seg 8 = {1,2,3,4,5,6,7,8} proof thus Seg 8 = {1,2,3,4,5,6,7} \/ {7 + 1} by Th5,FINSEQ_1:9 .= {1,2,3,4,5,6,7,8} by ENUMSET1:28; end; theorem Th7: Seg k = {} iff not k in Seg k proof thus Seg k = {} implies not k in Seg k; assume not k in Seg k; then k = 0 by FINSEQ_1:3; hence Seg k = {}; end; theorem Th8: not k + 1 in Seg k proof assume k + 1 in Seg k; then A1: k + 1 <= k by FINSEQ_1:1; k <= k + 1 by NAT_1:12; then k + 0 = k + 1 by A1,XXREAL_0:1; hence thesis; end; theorem k <> 0 implies k in Seg(k + n) proof assume k <> 0; then A1: 0 + 1 <= k by NAT_1:13; k <= k + n by NAT_1:12; hence thesis by A1,FINSEQ_1:1; end; theorem Th10: k + n in Seg k implies n = 0 proof assume k + n in Seg k; then k + n <= k + 0 by FINSEQ_1:1; hence thesis by XREAL_1:6; end; theorem k < n implies k + 1 in Seg n proof assume k < n; then A1: k + 1 <= n by NAT_1:13; 1 <= k + 1 by NAT_1:12; hence thesis by A1,FINSEQ_1:1; end; theorem Th12: k in Seg n & m < k implies k - m in Seg n proof assume that A1: k in Seg n and A2: m < k; consider i being Nat such that A3: k = m + i by A2,NAT_1:10; reconsider x = k - m as Element of NAT by A3,ORDINAL1:def 12; A4: now assume not 1 <= x; then x = 0 by NAT_1:14; hence contradiction by A2; end; A5: k <= n by A1,FINSEQ_1:1; i <= k by A3,NAT_1:12; then x <= n by A3,A5,XXREAL_0:2; hence thesis by A4,FINSEQ_1:1; end; theorem k - n in Seg k iff n < k proof thus k - n in Seg k implies n < k proof assume A1: k - n in Seg k; then reconsider x = k - n as Element of NAT; assume not n < k; then k - n <= n - n by XREAL_1:9; then x = 0; hence contradiction by A1,FINSEQ_1:1; end; thus thesis by Th12,FINSEQ_1:3; end; theorem Th14: Seg k misses {k + 1} proof set x = the Element of Seg k /\ {k + 1}; assume not thesis; then A1: Seg k /\ {k + 1} <> {} by XBOOLE_0:def 7; then A2: x in Seg k by XBOOLE_0:def 4; then reconsider x as Element of NAT; x in {k + 1} by A1,XBOOLE_0:def 4; then A3: x = k + 1 by TARSKI:def 1; x <= k by A2,FINSEQ_1:1; hence thesis by A3,XREAL_1:29; end; theorem Seg(k + 1) \ Seg k = {k + 1} proof A1: Seg(k + 1) = Seg k \/ {k + 1} by FINSEQ_1:9; Seg k misses {k + 1} by Th14; hence thesis by A1,XBOOLE_1:88; end; theorem Seg k <> Seg(k + 1) by Th8,FINSEQ_1:4; theorem Seg k = Seg(k + n) implies n = 0 by Th10,FINSEQ_1:3; theorem Th18: Seg k c= Seg(k + n) proof k <= k + n by NAT_1:12; hence thesis by FINSEQ_1:5; end; theorem Th19: Seg k, Seg n are_c=-comparable proof n <= k or k <= n; then Seg n c= Seg k or Seg k c= Seg n by FINSEQ_1:5; hence thesis by XBOOLE_0:def 9; end; theorem Th20: Seg k = {y} implies k = 1 & y = 1 proof assume A1: Seg k = {y}; now per cases; suppose k = 0; hence thesis by A1; end; suppose k <> 0; then A2: k in Seg k by FINSEQ_1:3; then 1 <= k by FINSEQ_1:1; then Seg 1 c= Seg k by FINSEQ_1:5; then Seg 1 = {y} by A1,ZFMISC_1:33; hence thesis by A1,A2,FINSEQ_1:2,TARSKI:def 1,ZFMISC_1:3; end; end; hence thesis; end; theorem Seg k = {x,y} & x <> y implies k = 2 & {x,y} = {1,2} proof assume that A1: Seg k = {x,y} and A2: x <> y; now per cases; suppose k = 0; hence thesis by A1; end; suppose A3: k <> 0; now per cases; suppose k = 1; hence thesis by A1,A2,FINSEQ_1:2,ZFMISC_1:5; end; suppose A4: k <> 1; 1 <= k by A3,NAT_1:14; then 1 < k by A4,XXREAL_0:1; then A5: 1 + 1 <= k by NAT_1:13; then Seg 2 c= Seg k by FINSEQ_1:5; then A6: 1 = x & 2 = x or 1 = x & 2 = y or 2 = x & 1 = y or 1 = y & 2 = y by A1,FINSEQ_1:2,ZFMISC_1:22; now k in Seg k by A1,Th7; then A7: k = 1 or k = 2 by A1,A6,TARSKI:def 2; assume not k <= 2; hence contradiction by A7; end; hence thesis by A1,A5,FINSEQ_1:2,XXREAL_0:1; end; end; hence thesis; end; end; hence thesis; end; theorem Th22: x in dom p implies x in dom(p ^ q) proof dom p c= dom(p ^ q) by FINSEQ_1:26; hence thesis; end; theorem x in dom p implies x is Element of NAT; theorem Th24: x in dom p implies x <> 0 proof assume x in dom p; then x in Seg(len p) by FINSEQ_1:def 3; hence thesis by FINSEQ_1:1; end; theorem Th25: n in dom p iff 1 <= n & n <= len p proof thus n in dom p implies 1 <= n & n <= len p proof assume n in dom p; then n in Seg(len p) by FINSEQ_1:def 3; hence thesis by FINSEQ_1:1; end; assume that A1: 1 <= n and A2: n <= len p; n in Seg(len p) by A1,A2,FINSEQ_1:1; hence thesis by FINSEQ_1:def 3; end; theorem n in dom p iff n - 1 is Element of NAT & len p - n is Element of NAT proof thus n in dom p implies n - 1 is Element of NAT & len p - n is Element of NAT proof assume A1: n in dom p; then A2: n <= len p by Th25; 1 <= n by A1,Th25; hence thesis by A2,INT_1:5; end; assume that A3: n - 1 is Element of NAT and A4: len p - n is Element of NAT; A5: 0 + n <= len p by A4,XREAL_1:19; 0 + 1 <= n by A3,XREAL_1:19; hence thesis by A5,Th25; end; canceled 2; theorem Th29: len p = len q iff dom p = dom q proof dom p = Seg(len p) by FINSEQ_1:def 3; hence thesis by FINSEQ_1:def 3; end; theorem Th30: len p <= len q iff dom p c= dom q proof A1: dom q = Seg(len q) by FINSEQ_1:def 3; dom p = Seg(len p) by FINSEQ_1:def 3; hence thesis by A1,FINSEQ_1:5; end; theorem Th31: x in rng p implies 1 in dom p proof assume x in rng p; then p <> {}; then A1: 1 <= len p by NAT_1:14; dom p = Seg(len p) by FINSEQ_1:def 3; hence thesis by A1,FINSEQ_1:1; end; theorem rng p <> {} implies 1 in dom p proof set y = the Element of rng p; assume rng p <> {}; then y in rng p; hence thesis by Th31; end; theorem {} <> <* x,y *>; theorem {} <> <* x,y,z *>; theorem Th35: <* x *> <> <* y,z *> proof len<* x *> = 1 by FINSEQ_1:40; hence thesis by FINSEQ_1:44; end; theorem <* u *> <> <* x,y,z *> proof len<* u *> = 1 by FINSEQ_1:40; hence thesis by FINSEQ_1:45; end; theorem <* u,v *> <> <* x,y,z *> proof len<* u,v *> = 2 by FINSEQ_1:44; hence thesis by FINSEQ_1:45; end; theorem Th38: len r = len p + len q & (for k being Element of NAT st k in dom p holds r.k = p.k) & (for k being Element of NAT st k in dom q holds r.(len p + k) = q.k) implies r = p ^ q proof assume len r = len p + len q; then A1: dom r = Seg(len p + len q) by FINSEQ_1:def 3; assume that A2: for k being Element of NAT st k in dom p holds r.k = p.k and A3: for k being Element of NAT st k in dom q holds r.(len p + k) = q.k; A4: for k being Nat st k in dom q holds r.(len p + k) = q.k by A3; for k being Nat st k in dom p holds r.k = p.k by A2; hence thesis by A1,A4,FINSEQ_1:def 7; end; Lm1: A c= Seg k implies Sgm A is one-to-one proof assume A1: A c= Seg k; then A2: rng(Sgm A) = A by FINSEQ_1:def 13; let x,y; assume that A3: x in dom(Sgm A) and A4: y in dom(Sgm A) and A5: Sgm(A).x = Sgm(A).y and A6: x <> y; Sgm(A).y in rng(Sgm A) by A4,FUNCT_1:def 3; then A7: Sgm(A).y in Seg k by A1,A2; Sgm(A).x in rng(Sgm A) by A3,FUNCT_1:def 3; then Sgm(A).x in Seg k by A1,A2; then reconsider m = Sgm(A).x, n = Sgm(A).y as Element of NAT by A7; reconsider i = x, j = y as Element of NAT by A3,A4; A8: dom(Sgm A) = Seg(len(Sgm A)) by FINSEQ_1:def 3; now per cases by A6,XXREAL_0:1; suppose A9: i < j; A10: j <= len(Sgm A) by A4,A8,FINSEQ_1:1; 1 <= i by A3,A8,FINSEQ_1:1; then m < n by A1,A9,A10,FINSEQ_1:def 13; hence contradiction by A5; end; suppose A11: j < i; A12: i <= len(Sgm A) by A3,A8,FINSEQ_1:1; 1 <= j by A4,A8,FINSEQ_1:1; then n < m by A1,A11,A12,FINSEQ_1:def 13; hence contradiction by A5; end; end; hence thesis; end; theorem Th39: for A being finite set st A c= Seg k holds len(Sgm A) = card A proof let A be finite set; A1: dom(Sgm A) = Seg(len(Sgm A)) by FINSEQ_1:def 3; A2: card(Seg(len(Sgm A))) = len(Sgm A) by FINSEQ_1:57; assume A3: A c= Seg k; then A4: rng(Sgm A) = A by FINSEQ_1:def 13; Sgm A is one-to-one by A3,Lm1; then Seg(len(Sgm A)),A are_equipotent by A1,A4,WELLORD2:def 4; hence thesis by A2,CARD_1:5; end; theorem for A being finite set st A c= Seg k holds dom(Sgm A) = Seg(card A) proof let A be finite set; assume A c= Seg k; then len(Sgm A) = card A by Th39; hence thesis by FINSEQ_1:def 3; end; theorem Th41: X c= Seg i & k < l & 1 <= n & m <= len(Sgm X) & Sgm(X).m = k & Sgm(X).n = l implies m < n proof assume that A1: X c= Seg i and A2: k < l and A3: 1 <= n and A4: m <= len(Sgm X) and A5: Sgm(X).m = k and A6: Sgm(X).n = l and A7: not m < n; n < m by A2,A5,A6,A7,XXREAL_0:1; hence thesis by A1,A2,A3,A4,A5,A6,FINSEQ_1:def 13; end; theorem Th42: X c= Seg i & Y c= Seg j implies ((for m,n being Element of NAT st m in X & n in Y holds m < n) iff Sgm(X \/ Y) = Sgm(X) ^ Sgm(Y)) proof assume that A1: X c= Seg i and A2: Y c= Seg j; set r = Sgm(X \/ Y); set q = Sgm Y; set p = Sgm X; Seg i, Seg j are_c=-comparable by Th19; then Seg i c= Seg j or Seg j c= Seg i by XBOOLE_0:def 9; then A3: X c= Seg j or Y c= Seg i by A1,A2,XBOOLE_1:1; then A4: X \/ Y c= Seg i or X \/ Y c= Seg j by A1,A2,XBOOLE_1:8; thus (for m,n being Element of NAT st m in X & n in Y holds m < n) implies Sgm(X \/ Y) = Sgm(X) ^ Sgm(Y) proof reconsider X1 = X, Y1 = Y as finite set by A1,A2; defpred P[Element of NAT] means $1 in dom p implies r.$1 = p.$1; assume A5: for m,n being Element of NAT st m in X & n in Y holds m < n; X /\ Y = {} proof set x = the Element of X /\ Y; X = rng p by A1,FINSEQ_1:def 13; then A6: X c= NAT; assume A7: not thesis; then x in X by XBOOLE_0:def 4; then reconsider m = x as Element of NAT by A6; A8: m in Y by A7,XBOOLE_0:def 4; m in X by A7,XBOOLE_0:def 4; hence thesis by A5,A8; end; then A9: X misses Y by XBOOLE_0:def 7; A10: len r = card(X1 \/ Y1) by A1,A2,A3,Th39,XBOOLE_1:8 .= card X1 + card Y1 by A9,CARD_2:40 .= len p + card Y1 by A1,Th39 .= len p + len q by A2,Th39; A11: now let k be Element of NAT; assume A12: P[k]; thus P[k+1] proof assume A13: k + 1 in dom p; then A14: p.(k + 1) in rng p by FUNCT_1:def 3; then reconsider n = p.(k + 1) as Element of NAT; A15: n in X by A1,A14,FINSEQ_1:def 13; len p <= len r by A10,NAT_1:12; then Seg(len p) c= Seg(len r) by FINSEQ_1:5; then dom p c= Seg(len r) by FINSEQ_1:def 3; then A16: dom p c= dom r by FINSEQ_1:def 3; then A17: r.(k + 1) in rng r by A13,FUNCT_1:def 3; then reconsider m = r.(k + 1) as Element of NAT; A18: m in X \/ Y by A4,A17,FINSEQ_1:def 13; assume A19: r.(k + 1) <> p.(k + 1); A20: k + 1 in dom r by A13,A16; now per cases; suppose A21: k in dom p; then p.k in rng p by FUNCT_1:def 3; then reconsider n1 = p.k as Element of NAT; r.k in rng r by A16,A21,FUNCT_1:def 3; then reconsider m1 = r.k as Element of NAT; now per cases by A19,XXREAL_0:1; suppose A22: m < n; A23: 1 <= k + 1 by A13,Th25; not m in Y by A5,A15,A22; then m in X by A18,XBOOLE_0:def 3; then m in rng p by A1,FINSEQ_1:def 13; then consider x such that A24: x in dom p and A25: p.x = m by FUNCT_1:def 3; reconsider x as Element of NAT by A24; x <= len p by A24,Th25; then A26: x < k + 1 by A1,A22,A25,A23,Th41; k + 1 in Seg(len r) by A20,FINSEQ_1:def 3; then A27: k + 1 <= len r by FINSEQ_1:1; k in Seg(len p) by A21,FINSEQ_1:def 3; then A28: 1 <= k by FINSEQ_1:1; k < k + 1 by XREAL_1:29; then A29: n1 < m by A4,A12,A21,A28,A27,FINSEQ_1:def 13; A30: k <= len p by A21,Th25; 1 <= x by A24,Th25; then k < x by A1,A25,A29,A30,Th41; hence contradiction by A26,NAT_1:13; end; suppose A31: n < m; A32: 1 <= k + 1 by A13,Th25; n in X \/ Y by A15,XBOOLE_0:def 3; then n in rng r by A4,FINSEQ_1:def 13; then consider x such that A33: x in dom r and A34: r.x = n by FUNCT_1:def 3; reconsider x as Element of NAT by A33; x <= len r by A33,Th25; then A35: x < k + 1 by A1,A2,A3,A31,A34,A32,Th41,XBOOLE_1:8; A36: k + 1 <= len p by A13,Th25; A37: k < k + 1 by XREAL_1:29; 1 <= k by A21,Th25; then A38: m1 < n by A1,A12,A21,A37,A36,FINSEQ_1:def 13; A39: k <= len r by A16,A21,Th25; 1 <= x by A33,Th25; then k < x by A1,A2,A3,A34,A38,A39,Th41,XBOOLE_1:8; hence contradiction by A35,NAT_1:13; end; end; hence contradiction; end; suppose A40: not k in dom p; A41: k < k + 1 by XREAL_1:29; k < 1 or len p < k by A40,Th25; then A42: k = 0 or len p < k + 1 & k + 1 <= len p by A13,A41,Th25,NAT_1:14 ,XXREAL_0:2; now per cases by A19,XXREAL_0:1; suppose A43: m < n; then not m in Y by A5,A15; then m in X by A18,XBOOLE_0:def 3; then m in rng p by A1,FINSEQ_1:def 13; then consider x such that A44: x in dom p and A45: p.x = m by FUNCT_1:def 3; A46: 1 <= k + 1 by A13,Th25; reconsider x as Element of NAT by A44; x <= len p by A44,Th25; then x < k + 1 by A1,A43,A45,A46,Th41; hence contradiction by A42,A44,Th24,NAT_1:14; end; suppose A47: n < m; A48: 1 <= k + 1 by A13,Th25; n in X \/ Y by A15,XBOOLE_0:def 3; then n in rng r by A4,FINSEQ_1:def 13; then consider x such that A49: x in dom r and A50: r.x = n by FUNCT_1:def 3; reconsider x as Element of NAT by A49; x <= len r by A49,Th25; then x < k + 1 by A1,A2,A3,A47,A50,A48,Th41,XBOOLE_1:8; hence contradiction by A42,A49,Th24,NAT_1:14; end; end; hence contradiction; end; end; hence contradiction; end; end; A51: P[0] by Th24; A52: for k being Element of NAT holds P[k] from NAT_1:sch 1(A51,A11); defpred P[Element of NAT] means $1 in dom q implies r.(len p + $1) = q.$1; A53: now let k be Element of NAT; assume A54: P[k]; thus P[k+1] proof set a = len p + (k + 1); assume A55: k + 1 in dom q; then k + 1 <= len q by Th25; then A56: a <= len r by A10,XREAL_1:7; A57: 1 <= k + 1 by NAT_1:12; then 1 <= a by NAT_1:12; then A58: a in dom r by A56,Th25; then A59: r.a in rng r by FUNCT_1:def 3; reconsider m = r.a as Element of NAT by A59; A60: now assume m in X; then m in rng p by A1,FINSEQ_1:def 13; then consider x such that A61: x in dom p and A62: p.x = m by FUNCT_1:def 3; reconsider x as Element of NAT by A61; x <= len p by A61,Th25; then A63: x <= len r by A10,NAT_1:12; A64: r is one-to-one by A1,A2,A3,Lm1,XBOOLE_1:8; 1 <= x by A61,Th25; then A65: x in dom r by A63,Th25; r.x = r.a by A52,A61,A62; then x = a by A58,A64,A65,FUNCT_1:def 4; then len p + (k + 1) <= len p + 0 by A61,Th25; hence contradiction by XREAL_1:29; end; A66: q.(k + 1) in rng q by A55,FUNCT_1:def 3; then reconsider n = q.(k + 1) as Element of NAT; A67: n in Y by A2,A66,FINSEQ_1:def 13; assume A68: r.(len p + (k + 1)) <> q.(k + 1); A69: m in X \/ Y by A4,A59,FINSEQ_1:def 13; now per cases; suppose A70: k in dom q; then q.k in rng q by FUNCT_1:def 3; then reconsider n1 = q.k as Element of NAT; 1 <= k by A70,Th25; then A71: 1 <= len p + k by NAT_1:12; A72: k <= len q by A70,Th25; then len p + k <= len r by A10,XREAL_1:7; then len p + k in dom r by A71,Th25; then r.(len p + k) in rng r by FUNCT_1:def 3; then reconsider m1 = r.(len p + k) as Element of NAT; now per cases by A68,XXREAL_0:1; suppose A73: m < n; A74: 1 <= k + 1 by A55,Th25; m in Y by A69,A60,XBOOLE_0:def 3; then m in rng q by A2,FINSEQ_1:def 13; then consider x such that A75: x in dom q and A76: q.x = m by FUNCT_1:def 3; reconsider x as Element of NAT by A75; x <= len q by A75,Th25; then A77: x < k + 1 by A2,A73,A76,A74,Th41; len p + k < len p + k + 1 by XREAL_1:29; then A78: n1 < m by A4,A54,A56,A70,A71,FINSEQ_1:def 13; A79: k <= len q by A70,Th25; 1 <= x by A75,Th25; then k < x by A2,A76,A78,A79,Th41; hence contradiction by A77,NAT_1:13; end; suppose A80: n < m; A81: 1 <= a by A57,NAT_1:12; n in X \/ Y by A67,XBOOLE_0:def 3; then n in rng r by A4,FINSEQ_1:def 13; then consider x such that A82: x in dom r and A83: r.x = n by FUNCT_1:def 3; reconsider x as Element of NAT by A82; x <= len r by A82,Th25; then A84: x < len p + k + 1 by A1,A2,A3,A80,A83,A81,Th41,XBOOLE_1:8; A85: k + 1 <= len q by A55,Th25; A86: k < k + 1 by XREAL_1:29; 1 <= k by A70,Th25; then A87: m1 < n by A2,A54,A70,A86,A85,FINSEQ_1:def 13; A88: len p + k <= len r by A10,A72,XREAL_1:7; 1 <= x by A82,Th25; then len p + k < x by A1,A2,A3,A83,A87,A88,Th41,XBOOLE_1:8; hence contradiction by A84,NAT_1:13; end; end; hence contradiction; end; suppose A89: not k in dom q; A90: k < k + 1 by XREAL_1:29; k < 1 or len q < k by A89,Th25; then A91: k = 0 or len q < k + 1 & k + 1 <= len q by A55,A90,Th25,NAT_1:14 ,XXREAL_0:2; now per cases by A68,XXREAL_0:1; suppose A92: m < n; A93: 1 <= k + 1 by A55,Th25; m in Y by A69,A60,XBOOLE_0:def 3; then m in rng q by A2,FINSEQ_1:def 13; then consider x such that A94: x in dom q and A95: q.x = m by FUNCT_1:def 3; reconsider x as Element of NAT by A94; x <= len q by A94,Th25; then x < k + 1 by A2,A92,A95,A93,Th41; hence contradiction by A91,A94,Th24,NAT_1:14; end; suppose A96: n < m; A97: 1 <= len p + 1 by NAT_1:12; n in X \/ Y by A67,XBOOLE_0:def 3; then n in rng r by A4,FINSEQ_1:def 13; then consider x such that A98: x in dom r and A99: r.x = n by FUNCT_1:def 3; reconsider x as Element of NAT by A98; x <= len r by A98,Th25; then x < len p + 1 by A1,A2,A3,A91,A96,A99,A97,Th41,XBOOLE_1:8; then A100: x <= len p by NAT_1:13; 1 <= x by A98,Th25; then A101: x in dom p by A100,Th25; then A102: p.x in rng p by FUNCT_1:def 3; n = p.x by A52,A99,A101; then n in X by A1,A102,FINSEQ_1:def 13; hence contradiction by A5,A67; end; end; hence contradiction; end; end; hence contradiction; end; end; A103: P[0] by Th24; for k being Element of NAT holds P[k] from NAT_1:sch 1(A103,A53); hence thesis by A10,A52,Th38; end; assume A104: Sgm(X \/ Y) = Sgm(X) ^ Sgm(Y); let m,n be Element of NAT; assume that A105: m in X and A106: n in Y; n in rng q by A2,A106,FINSEQ_1:def 13; then consider y such that A107: y in dom q and A108: q.y = n by FUNCT_1:def 3; reconsider y as Element of NAT by A107; A109: n = r.(len p + y) by A104,A107,A108,FINSEQ_1:def 7; y <= len q by A107,Th25; then len p + y <= len p + len q by XREAL_1:7; then A110: len p + y <= len r by A104,FINSEQ_1:22; m in rng(Sgm X) by A1,A105,FINSEQ_1:def 13; then consider x such that A111: x in dom p and A112: p.x = m by FUNCT_1:def 3; reconsider x as Element of NAT by A111; A113: x in Seg(len p) by A111,FINSEQ_1:def 3; then A114: 1 <= x by FINSEQ_1:1; A115: x <= len p by A113,FINSEQ_1:1; y <> 0 by A107,Th24; then A116: x < len p + y by A115,NAT_1:16,XXREAL_0:2; m = r.x by A104,A111,A112,FINSEQ_1:def 7; hence thesis by A4,A109,A114,A116,A110,FINSEQ_1:def 13; end; theorem Th43: Sgm {} = {} proof {} c= Seg 0; hence thesis by FINSEQ_1:51; end; theorem 0 <> n implies Sgm{n} = <* n *> proof assume 0 <> n; then n in Seg n by FINSEQ_1:3; then A1: {n} c= Seg n by ZFMISC_1:31; then len(Sgm{n}) = card{n} by Th39; then A2: len(Sgm{n}) = 1 by CARD_1:30; rng(Sgm{n}) = {n} by A1,FINSEQ_1:def 13; hence thesis by A2,FINSEQ_1:39; end; theorem 0 < n & n < m implies Sgm{n,m} = <* n,m *> proof assume that A1: 0 < n and A2: n < m; A3: m in Seg m by A2,FINSEQ_1:3; A4: n in Seg n by A1,FINSEQ_1:3; Seg n c= Seg m by A2,FINSEQ_1:5; then A5: {n,m} c= Seg m by A3,A4,ZFMISC_1:32; then A6: Sgm{n,m} is one-to-one by Lm1; A7: len(Sgm{n,m}) = card{n,m} by A5,Th39 .= 2 by A2,CARD_2:57; then A8: dom(Sgm{n,m}) = {1,2} by FINSEQ_1:2,def 3; then A9: 1 in dom(Sgm{n,m}) by TARSKI:def 2; A10: 2 in dom(Sgm{n,m}) by A8,TARSKI:def 2; A11: rng(Sgm{n,m}) = {n,m} by A5,FINSEQ_1:def 13; then A12: Sgm{n,m}.2 in {n,m} by A10,FUNCT_1:def 3; A13: Sgm{n,m}.1 in {n,m} by A9,A11,FUNCT_1:def 3; now per cases by A13,A12,TARSKI:def 2; suppose Sgm{n,m}.1 = n & Sgm{n,m}.2 = n; hence Sgm{n,m}.1 = n & Sgm{n,m}.2 = m by A9,A10,A6,FUNCT_1:def 4; end; suppose Sgm{n,m}.1 = m & Sgm{n,m}.2 = m; hence Sgm{n,m}.1 = n & Sgm{n,m}.2 = m by A9,A10,A6,FUNCT_1:def 4; end; suppose Sgm{n,m}.1 = n & Sgm{n,m}.2 = m; hence Sgm{n,m}.1 = n & Sgm{n,m}.2 = m; end; suppose Sgm{n,m}.1 = m & Sgm{n,m}.2 = n; hence Sgm{n,m}.1 = n & Sgm{n,m}.2 = m by A2,A5,A7,FINSEQ_1:def 13; end; end; hence thesis by A7,FINSEQ_1:44; end; theorem Th46: len(Sgm(Seg k)) = k proof card(Seg k) = k by FINSEQ_1:57; hence thesis by Th39; end; Lm2: Sgm(Seg(k + 0)) | Seg k = Sgm(Seg k) proof card(Seg k) = k by FINSEQ_1:57; then len(Sgm(Seg k)) = k by Th39; then dom(Sgm(Seg k)) = Seg k by FINSEQ_1:def 3; hence thesis by RELAT_1:68; end; Lm3: now let n; assume A1: for k holds Sgm(Seg(k + n)) | Seg k = Sgm(Seg k); let k; set X = Sgm(Seg(k + (n + 1))); set Y = Sgm(Seg(k + 1)); A2: Y | Seg k = Sgm(Seg k) proof reconsider p = Y | Seg k as FinSequence of NAT by FINSEQ_1:18; A3: len Y = k + 1 by Th46; then A4: dom Y = Seg(k + 1) by FINSEQ_1:def 3; A5: k <= k + 1 by NAT_1:12; then A6: dom p = Seg k by A3,FINSEQ_1:17; A7: rng Y = Seg(k + 1) by FINSEQ_1:def 13; A8: Y.(k + 1) = k + 1 proof k + 1 in dom Y by A4,FINSEQ_1:4; then A9: Y.(k + 1) in Seg(k + 1) by A7,FUNCT_1:def 3; then reconsider n = Y.(k + 1) as Element of NAT; A10: k < k + 1 by XREAL_1:29; k + 1 in rng Y by A7,FINSEQ_1:4; then consider x such that A11: x in dom Y and A12: Y.x = k + 1 by FUNCT_1:def 3; reconsider x as Element of NAT by A11; assume not thesis; then not Y.(k + 1) in {k + 1} by TARSKI:def 1; then Y.(k + 1) in Seg(k + 1) \ {k + 1} by A9,XBOOLE_0:def 5; then A13: Y.(k + 1) in Seg k by FINSEQ_1:10; A14: now assume A15: x = k + 1; n <= k by A13,FINSEQ_1:1; hence contradiction by A12,A15,XREAL_1:29; end; x <= k + 1 by A3,A11,Th25; then A16: x < k + 1 by A14,XXREAL_0:1; 1 <= x by A11,Th25; then A17: k + 1 < n by A3,A12,A16,FINSEQ_1:def 13; n <= k by A13,FINSEQ_1:1; hence contradiction by A17,A10,XXREAL_0:2; end; A18: Y is one-to-one by Lm1; rng p = rng Y \ {Y.(k + 1)} proof thus rng p c= rng Y \ {Y.(k + 1)} proof let x; assume A19: x in rng p; A20: now assume x in {k + 1}; then A21: x = k + 1 by TARSKI:def 1; A22: k < k + 1 by XREAL_1:29; A23: k + 1 in dom Y by A4,FINSEQ_1:4; A24: Seg k c= Seg(k + 1) by Th18; consider y such that A25: y in dom p and A26: p.y = x by A19,FUNCT_1:def 3; reconsider y as Element of NAT by A25; A27: Y.y = p.y by A25,FUNCT_1:47; y <= k by A6,A25,FINSEQ_1:1; hence contradiction by A18,A4,A6,A8,A25,A26,A24,A27,A21,A23,A22, FUNCT_1:def 4; end; rng p c= rng Y by RELAT_1:70; hence thesis by A8,A19,A20,XBOOLE_0:def 5; end; let x; assume A28: x in rng Y \ {Y.(k + 1)}; then x in rng Y by XBOOLE_0:def 5; then consider y such that A29: y in dom Y and A30: Y.y = x by FUNCT_1:def 3; now assume y in {k + 1}; then A31: x = k + 1 by A8,A30,TARSKI:def 1; not x in {k + 1} by A8,A28,XBOOLE_0:def 5; hence contradiction by A31,TARSKI:def 1; end; then y in Seg(k + 1) \ {k + 1} by A4,A29,XBOOLE_0:def 5; then A32: y in dom p by A6,FINSEQ_1:10; then p.y = Y.y by FUNCT_1:47; hence thesis by A30,A32,FUNCT_1:def 3; end; then A33: rng p = Seg k by A7,A8,FINSEQ_1:10; now A34: len p = k by A3,A5,FINSEQ_1:17; let i,j,l,m; assume that A35: 1 <= i and A36: i < j and A37: j <= len p and A38: l = p.i and A39: m = p.j; i <= len p by A36,A37,XXREAL_0:2; then i in dom p by A6,A35,A34,FINSEQ_1:1; then A40: p.i = Y.i by FUNCT_1:47; 1 <= j by A35,A36,XXREAL_0:2; then j in dom p by A6,A37,A34,FINSEQ_1:1; then A41: p.j = Y.j by FUNCT_1:47; len Y = k + 1 by Th46; then j <= len Y by A37,A34,NAT_1:12; hence l < m by A35,A36,A38,A39,A40,A41,FINSEQ_1:def 13; end; hence thesis by A33,FINSEQ_1:def 13; end; X = Sgm(Seg(k + 1 + n)); then X | Seg(k + 1) = Y by A1; then Sgm(Seg k) = X | (Seg(k + 1) /\ Seg k) by A2,RELAT_1:71; hence Sgm(Seg(k + (n + 1))) | Seg k = Sgm(Seg k) by FINSEQ_1:7,NAT_1:12; end; Lm4: for k holds Sgm(Seg(k + n)) | Seg k = Sgm(Seg k) proof defpred P[Nat] means for k holds Sgm(Seg(k + $1)) | Seg k = Sgm( Seg k); A1: for k st P[k] holds P[k+1] by Lm3; A2: P[0] by Lm2; for n holds P[n] from NAT_1:sch 2(A2,A1); hence thesis; end; theorem Sgm(Seg(k + n)) | Seg k = Sgm(Seg k) by Lm4; Lm5: now let k be Nat; assume A1: Sgm(Seg k) = idseq k; A2: len(idseq(k + 1)) = k + 1 by CARD_1:def 7; then A3: len(Sgm(Seg(k + 1))) = len(idseq(k + 1)) by Th46; then A4: dom Sgm(Seg(k + 1)) = Seg(k+1) by A2,FINSEQ_1:def 3; now let j be Nat; assume A5: j in dom Sgm(Seg(k + 1)); then A6: j in Seg k \/ {k + 1} by A4,FINSEQ_1:9; now per cases by A6,XBOOLE_0:def 3; suppose A7: j in Seg k; A8: idseq(k + 1).j = j by A4,A5,FUNCT_1:18; A9: Sgm(Seg(k + 1)) | Seg k = Sgm(Seg k) by Lm4; Sgm(Seg k).j = j by A1,A7,FUNCT_1:18; hence Sgm(Seg(k + 1)).j = idseq(k + 1).j by A7,A8,A9,FUNCT_1:49; end; suppose A10: j in {k + 1}; set Y = Sgm(Seg k); set X = Sgm(Seg(k + 1)); A11: j = k + 1 by A10,TARSKI:def 1; then A12: j in Seg(k + 1) by FINSEQ_1:4; now rng X = Seg(k + 1) by FINSEQ_1:def 13; then A13: X.j in Seg(k + 1) by A5,FUNCT_1:def 3; then reconsider n = X.j as Element of NAT; assume X.j <> j; then not X.j in {j} by TARSKI:def 1; then X.j in Seg(k + 1) \ {k + 1} by A11,A13,XBOOLE_0:def 5; then A14: X.j in Seg k by FINSEQ_1:10; A15: X is one-to-one by Lm1; A16: dom X = Seg(k + 1) by A2,A3,FINSEQ_1:def 3; A17: k < k + 1 by XREAL_1:29; X | Seg k = Y by Lm4; then A18: X.n = Y.n by A14,FUNCT_1:49 .= n by A1,A14,FUNCT_1:18; n <= k by A14,FINSEQ_1:1; hence contradiction by A11,A12,A16,A13,A15,A18,A17,FUNCT_1:def 4; end; hence Sgm(Seg(k + 1)).j = idseq(k + 1).j by A11,FINSEQ_1:4,FUNCT_1:18; end; end; hence Sgm(Seg(k + 1)).j = idseq(k + 1).j; end; hence Sgm(Seg(k + 1)) = idseq(k + 1) by A3,FINSEQ_2:9; end; theorem Th48: Sgm(Seg k) = idseq k proof defpred P[Nat] means Sgm(Seg $1) = idseq $1; A1: for k being Nat st P[k] holds P[k+1] by Lm5; A2: P[0] by Th43; for k being Nat holds P[k] from NAT_1:sch 2(A2,A1); hence thesis; end; theorem Th49: p | Seg n = p iff len p <= n proof thus p | Seg n = p implies len p <= n by FINSEQ_1:86; assume len p <= n; then Seg(len p) c= Seg n by FINSEQ_1:5; then dom p c= Seg n by FINSEQ_1:def 3; then A1: dom p = dom p /\ Seg n by XBOOLE_1:28; for x st x in dom p holds p.x = p.x; hence thesis by A1,FUNCT_1:46; end; theorem Th50: idseq(n + k) | Seg n = idseq n proof A1: Sgm(Seg n) = idseq n by Th48; Sgm(Seg(n + k)) = idseq(n + k) by Th48; hence thesis by A1,Lm4; end; theorem idseq n | Seg m = idseq m iff m <= n proof thus idseq n | Seg m = idseq m implies m <= n proof assume idseq n | Seg m = idseq m; then len(idseq m) <= len(idseq n) by FINSEQ_1:79; then m <= len(idseq n) by CARD_1:def 7; hence thesis by CARD_1:def 7; end; assume m <= n; then ex j being Nat st n = m + j by NAT_1:10; hence thesis by Th50; end; theorem idseq n | Seg m = idseq n iff n <= m proof len(idseq n) = n by CARD_1:def 7; hence thesis by Th49; end; theorem Th53: len p = k + l & q = p | Seg k implies len q = k proof assume that A1: len p = k + l and A2: q = p | Seg k; k <= len p by A1,NAT_1:12; hence thesis by A2,FINSEQ_1:17; end; theorem len p = k + l & q = p | Seg k implies dom q = Seg k proof assume that A1: len p = k + l and A2: q = p | Seg k; len q = k by A1,A2,Th53; hence thesis by FINSEQ_1:def 3; end; theorem Th55: len p = k + 1 & q = p | Seg k implies p = q ^ <* p.(k + 1) *> proof assume that A1: len p = k + 1 and A2: q = p | Seg k; A3: for l being Element of NAT holds l in dom q implies p.l = q.l by A2, FUNCT_1:47; set r = <* p.(k + 1) *>; A4: now let l be Element of NAT; assume l in dom r; then l in {1} by FINSEQ_1:2,38; then A5: l = 1 by TARSKI:def 1; hence p.(len q + l) = p.(k + 1) by A1,A2,Th53 .= r.l by A5,FINSEQ_1:40; end; len p = len q + 1 by A1,A2,Th53 .= len q + len<* p.(k + 1) *> by FINSEQ_1:39; hence thesis by A3,A4,Th38; end; theorem p | X is FinSequence iff ex k being Element of NAT st X /\ dom p = Seg k proof thus p | X is FinSequence implies ex k being Element of NAT st X /\ dom p = Seg k proof assume p | X is FinSequence; then consider k being Nat such that A1: dom(p | X) = Seg k by FINSEQ_1:def 2; reconsider k as Element of NAT by ORDINAL1:def 12; take k; thus thesis by A1,RELAT_1:61; end; given k being Element of NAT such that A2: X /\ dom p = Seg k; dom(p | X) = Seg k by A2,RELAT_1:61; hence thesis by FINSEQ_1:def 2; end; theorem Th57: card((p ^ q) " A) = card(p " A) + card(q " A) proof set X = (p ^ q) " A; set B = {len p + n where n is Element of NAT : n in q " A}; defpred P[set,set] means ex i st $1 = i & $2 = len p + i; A1: X = p " A \/ B proof thus X c= p " A \/ B proof let x; assume A2: x in X; then A3: x in dom(p ^ q) by FUNCT_1:def 7; then reconsider k = x as Element of NAT; now per cases by A3,FINSEQ_1:25; suppose A4: k in dom p; then (p ^ q).k = p.k by FINSEQ_1:def 7; then p.k in A by A2,FUNCT_1:def 7; then k in p " A by A4,FUNCT_1:def 7; hence thesis by XBOOLE_0:def 3; end; suppose ex m being Nat st m in dom q & k = len p + m; then consider m being Nat such that A5: m in dom q and A6: k = len p + m; q.m = (p ^ q).k by A5,A6,FINSEQ_1:def 7; then q.m in A by A2,FUNCT_1:def 7; then A7: m in q " A by A5,FUNCT_1:def 7; m in NAT by ORDINAL1:def 12; then k in B by A6,A7; hence thesis by XBOOLE_0:def 3; end; end; hence thesis; end; let x; assume A8: x in p " A \/ B; now per cases by A8,XBOOLE_0:def 3; suppose A9: x in p " A; then A10: x in dom p by FUNCT_1:def 7; then reconsider k = x as Element of NAT; (p ^ q).k = p.k by A10,FINSEQ_1:def 7; then A11: (p ^ q).x in A by A9,FUNCT_1:def 7; x in dom(p ^ q) by A10,Th22; hence thesis by A11,FUNCT_1:def 7; end; suppose x in B; then consider n being Element of NAT such that A12: x = len p + n and A13: n in q " A; A14: n in dom q by A13,FUNCT_1:def 7; then (p ^ q).(len p + n) = q.n by FINSEQ_1:def 7; then A15: (p ^ q).x in A by A12,A13,FUNCT_1:def 7; x in dom(p ^ q) by A12,A14,FINSEQ_1:28; hence thesis by A15,FUNCT_1:def 7; end; end; hence thesis; end; p " A /\ B = {} proof set x = the Element of p " A /\ B; assume A16: not thesis; then x in B by XBOOLE_0:def 4; then consider n being Element of NAT such that A17: x = len p + n and A18: n in q " A; len p + n in p " A by A16,A17,XBOOLE_0:def 4; then len p + n in dom p by FUNCT_1:def 7; then len p + n <= len p + 0 by Th25; then A19: n = 0 by XREAL_1:6; n in dom q by A18,FUNCT_1:def 7; hence thesis by A19,Th24; end; then A20: p " A misses B by XBOOLE_0:def 7; reconsider B as finite set by A1,FINSET_1:1,XBOOLE_1:7; A21: card X = card(p " A) + card B by A1,A20,CARD_2:40; A22: for x st x in q " A ex y st P[x,y] proof let x; assume x in q " A; then x in dom q by FUNCT_1:def 7; then reconsider i = x as Element of NAT; reconsider y = len p + i as set; take y; take i; thus thesis; end; consider f being Function such that A23: dom f = q " A and A24: for x st x in q " A holds P[x,f.x] from CLASSES1:sch 1(A22); A25: rng f = B proof thus rng f c= B proof let x; assume x in rng f; then consider y such that A26: y in dom f and A27: f.y = x by FUNCT_1:def 3; consider i such that A28: y = i and A29: f.y = len p + i by A23,A24,A26; i is Element of NAT by ORDINAL1:def 12; hence thesis by A23,A26,A27,A28,A29; end; let x; assume x in B; then consider n being Element of NAT such that A30: x = len p + n and A31: n in q " A; ex i st n = i & f.n = len p + i by A24,A31; hence thesis by A23,A30,A31,FUNCT_1:def 3; end; f is one-to-one proof let x,y; assume that A32: x in dom f and A33: y in dom f and A34: f.x = f.y; A35: ex j st y = j & f.y = len p + j by A23,A24,A33; ex i st x = i & f.x = len p + i by A23,A24,A32; hence thesis by A34,A35; end; then q " A,B are_equipotent by A23,A25,WELLORD2:def 4; hence thesis by A21,CARD_1:5; end; theorem Th58: p " A c= (p ^ q) " A proof let x; A1: dom p c= dom(p ^ q) by FINSEQ_1:26; assume A2: x in p " A; then A3: x in dom p by FUNCT_1:def 7; then reconsider k = x as Element of NAT; A4: p.k in A by A2,FUNCT_1:def 7; p.k = (p ^ q).k by A3,FINSEQ_1:def 7; hence thesis by A3,A1,A4,FUNCT_1:def 7; end; definition let p,A; func p - A -> FinSequence equals p * Sgm ((dom p) \ p " A); coherence proof now assume p <> {}; then reconsider D = Seg(len p) as non empty Subset of NAT; Seg(len p) \ p " A c= Seg(len p) by XBOOLE_1:36; then rng Sgm(Seg(len p) \ p " A) c= D by FINSEQ_1:def 13; then reconsider q = Sgm(Seg(len p) \ p " A) as FinSequence of D by FINSEQ_1:def 4; reconsider r = p * q as FinSequence by FINSEQ_2:30; take rr = r; thus rr = p * Sgm((dom p) \ p " A) by FINSEQ_1:def 3; end; hence thesis; end; end; theorem Th59: len(p - A) = len p - card(p " A) proof set q = Sgm(Seg(len p) \ p " A); A1: Seg len p = dom p by FINSEQ_1:def 3; Seg(len p) \ p " A c= Seg(len p) by XBOOLE_1:36; then rng q c= dom p by A1,FINSEQ_1:def 13; then A2: dom q = dom(p - A) by A1,RELAT_1:27; A3: dom q = Seg(len q) by FINSEQ_1:def 3; A4: p " A c= Seg(len p) proof let x; A5: p " A c= dom p by RELAT_1:132; A6: dom p = Seg(len p) by FINSEQ_1:def 3; assume x in p " A; hence thesis by A5,A6; end; len q = card(Seg(len p) \ p " A) by Th39,XBOOLE_1:36; then len(p - A) = card(Seg(len p) \ p " A) by A2,A3,FINSEQ_1:def 3; hence len(p - A) = card(Seg(len p)) - card(p " A) by A4,CARD_2:44 .= len p - card(p " A) by FINSEQ_1:57; end; theorem Th60: len(p - A) <= len p proof len(p - A) = len p - card(p " A) by Th59; hence thesis by XREAL_1:43; end; theorem Th61: len(p - A) = len p implies A misses rng p proof assume A1: len(p - A) = len p; A2: len(p - A) = len p - card(p " A) by Th59; assume A meets rng p; then p " A <> {} by RELAT_1:138; hence thesis by A1,A2; end; theorem n = len p - card(p " A) implies dom(p - A) = Seg n proof assume n = len p - card(p " A); then len(p - A) = n by Th59; hence thesis by FINSEQ_1:def 3; end; theorem dom(p - A) c= dom p proof A1: dom(p - A) = Seg(len(p - A)) by FINSEQ_1:def 3; A2: dom p = Seg(len p) by FINSEQ_1:def 3; len(p - A) <= len p by Th60; hence thesis by A1,A2,FINSEQ_1:5; end; theorem dom(p - A) = dom p implies A misses rng p proof A1: dom(p - A) = Seg(len(p - A)) by FINSEQ_1:def 3; A2: dom p = Seg(len p) by FINSEQ_1:def 3; assume dom(p - A) = dom p; hence thesis by A1,A2,Th61,FINSEQ_1:6; end; theorem Th65: rng(p - A) = rng p \ A proof set q = Sgm(Seg(len p) \ p " A); A1: dom p = Seg(len p) by FINSEQ_1:def 3; A2: dom p = Seg len p by FINSEQ_1:def 3; thus rng(p - A) c= rng p \ A proof let x; A3: rng(p * q) c= rng p by RELAT_1:26; assume A4: x in rng(p - A); A5: now A6: Seg(len p) \ p " A c= Seg(len p) by XBOOLE_1:36; assume A7: x in A; consider y such that A8: y in dom(p - A) and A9: (p - A).y = x by A4,FUNCT_1:def 3; set z = q.y; A10: y in dom q by A2,A8,FUNCT_1:11; then A11: (p - A).y = p.z by A2,FUNCT_1:13; z in rng q by A10,FUNCT_1:def 3; then z in Seg(len p) \ p " A by A6,FINSEQ_1:def 13; then A12: not z in p " A by XBOOLE_0:def 5; z in dom p by A2,A8,FUNCT_1:11; hence contradiction by A7,A9,A11,A12,FUNCT_1:def 7; end; x in rng(p * q) by A4,FINSEQ_1:def 3; hence thesis by A3,A5,XBOOLE_0:def 5; end; let x; assume A13: x in rng p \ A; then consider y such that A14: y in dom p and A15: p.y = x by FUNCT_1:def 3; Seg(len p) \ p " A c= Seg(len p) by XBOOLE_1:36; then A16: rng q = Seg(len p) \ p " A by FINSEQ_1:def 13; not p.y in A by A13,A15,XBOOLE_0:def 5; then not y in p " A by FUNCT_1:def 7; then y in rng q by A14,A1,A16,XBOOLE_0:def 5; then consider z such that A17: z in dom q and A18: q.z = y by FUNCT_1:def 3; A19: (p - A).z = x by A2,A15,A17,A18,FUNCT_1:13; z in dom(p - A) by A2,A14,A17,A18,FUNCT_1:11; hence thesis by A19,FUNCT_1:def 3; end; theorem rng(p - A) c= rng p proof rng(p - A) = rng p \ A by Th65; hence thesis; end; theorem rng(p - A) = rng p implies A misses rng p proof assume rng(p - A) = rng p; then rng p \ A = rng p by Th65; hence thesis by XBOOLE_1:83; end; theorem Th68: p - A = {} iff rng p c= A proof thus p - A = {} implies rng p c= A proof assume that A1: p - A = {} and A2: not rng p c= A; rng p \ A <> {} by A2,XBOOLE_1:37; then rng(p - A) <> {} by Th65; hence thesis by A1; end; assume A3: rng p c= A; rng(p - A) = rng p \ A by Th65; hence thesis by A3,XBOOLE_1:37; end; theorem Th69: p - A = p iff A misses rng p proof thus p - A = p implies A misses rng p proof assume that A1: p - A = p and A2: not A misses rng p; len(p - A) <> len p by A2,Th61; hence contradiction by A1; end; assume A misses rng p; then p " A = {} by RELAT_1:138; then Sgm(Seg(len p) \ p " A) = idseq(len p) by Th48; then p * Sgm(Seg(len p) \ p " A) = p by FINSEQ_2:54; hence thesis by FINSEQ_1:def 3; end; theorem p - {x} = p iff not x in rng p proof thus p - {x} = p implies not x in rng p proof assume p - {x} = p; then A1: {x} misses rng p by Th69; x in {x} by TARSKI:def 1; hence thesis by A1,XBOOLE_0:3; end; assume A2: not x in rng p; {x} misses rng p proof assume {x} meets rng p; then ex y st y in {x} & y in rng p by XBOOLE_0:3; hence thesis by A2,TARSKI:def 1; end; hence thesis by Th69; end; theorem p - {} = p proof {} misses rng p by XBOOLE_1:65; hence thesis by Th69; end; theorem p - rng p = {} by Th68; Lm6: <* x *> - A = <* x *> iff not x in A proof thus <* x *> - A = <* x *> implies not x in A proof assume <* x *> - A = <* x *>; then A1: rng<* x *> misses A by Th69; A2: rng<* x *> = {x} by FINSEQ_1:39; x in {x} by TARSKI:def 1; hence thesis by A2,A1,XBOOLE_0:3; end; assume A3: not x in A; rng<* x *> misses A proof assume rng<* x *> meets A; then consider y such that A4: y in rng<* x *> and A5: y in A by XBOOLE_0:3; y in {x} by A4,FINSEQ_1:39; hence thesis by A3,A5,TARSKI:def 1; end; hence thesis by Th69; end; Lm7: <* x *> - A = {} iff x in A proof A1: rng<* x *> = {x} by FINSEQ_1:39; thus <* x *> - A = {} implies x in A proof assume <* x *> - A = {}; then rng<* x *> c= A by Th68; then {x} c= A by FINSEQ_1:39; hence thesis by ZFMISC_1:31; end; assume x in A; then rng<* x *> c= A by A1,ZFMISC_1:31; hence thesis by Th68; end; Lm8: (p ^ {}) - A = (p - A) ^ ({} - A) proof thus (p ^ {}) - A = p - A by FINSEQ_1:34 .= (p - A) ^ ({} - A) by FINSEQ_1:34; end; Lm9: (p ^ <* x *>) - A = (p - A) ^ (<* x *> - A) proof set r = (p ^ <* x *>) - A; set q = <* x *> - A; set t = p ^ <* x *>; A1: len t = len p + len<* x *> by FINSEQ_1:22 .= len p + 1 by FINSEQ_1:40; A2: now t " A c= dom t by RELAT_1:132; then A3: t " A c= Seg(len t) by FINSEQ_1:def 3; set S = Seg(len(p ^ <* x *>)) \ (p ^ <* x *>) " A; set s = Sgm(Seg(len(p ^ <* x *>)) \ (p ^ <* x *>) " A); let k be Element of NAT; A4: S c= Seg(len t) by XBOOLE_1:36; assume A5: k in dom q; then A6: not x in A by Lm7,RELAT_1:38; then A7: q = <* x *> by Lm6; then A8: dom q = {1} by FINSEQ_1:2,def 8; then A9: k = 1 by A5,TARSKI:def 1; A10: p " A = (p ^ <* x *>) " A proof thus p " A c= (p ^ <* x *>) " A proof let y; assume A11: y in p " A; then A12: y in dom p by FUNCT_1:def 7; then reconsider z = y as Element of NAT; p.y in A by A11,FUNCT_1:def 7; then A13: t.z in A by A12,FINSEQ_1:def 7; y in dom t by A12,Th22; hence thesis by A13,FUNCT_1:def 7; end; let y; assume A14: y in (p ^ <* x *>) " A; then A15: y in dom t by FUNCT_1:def 7; then reconsider z = y as Element of NAT; A16: t.y in A by A14,FUNCT_1:def 7; A17: now given n such that A18: n in dom q and A19: z = len p + n; n = 1 by A8,A18,TARSKI:def 1; hence contradiction by A6,A16,A19,FINSEQ_1:42; end; A20: z in dom p or ex n being Nat st n in dom q & z = len p + n by A7,A15, FINSEQ_1:25; then t.z = p.z by A17,FINSEQ_1:def 7; hence thesis by A16,A20,A17,FUNCT_1:def 7; end; A21: now assume A22: len t in t " A; t.(len t) = x by A1,FINSEQ_1:42; hence contradiction by A6,A22,FUNCT_1:def 7; end; A23: dom s = Seg(len s) by FINSEQ_1:def 3; len t in Seg(len t) by A1,FINSEQ_1:4; then len t in S by A21,XBOOLE_0:def 5; then len t in rng s by A4,FINSEQ_1:def 13; then consider y such that A24: y in dom s and A25: s.y = len t by FUNCT_1:def 3; reconsider y as Element of NAT by A24; A26: len(p - A) + k = len p - card(p " A) + k by Th59 .= len p + 1 - card((p ^ <* x *>) " A) by A9,A10 .= len p + len<* x *> - card((p ^ <* x *>) " A) by FINSEQ_1:39 .= len(p ^ <* x *>) - card((p ^ <* x *>) " A) by FINSEQ_1:22 .= len r by Th59; A27: len s = card S by Th39,XBOOLE_1:36 .= card(Seg(len t)) - card(t " A) by A3,CARD_2:44 .= len t - card(p " A) by A10,FINSEQ_1:57 .= len p - card(p " A) + k by A1,A9 .= len r by A26,Th59; then A28: len s = len(p - A) + 1 by A5,A8,A26,TARSKI:def 1; then A29: len r in dom s by A27,A23,FINSEQ_1:4; A30: now A31: s.(len s) in rng s by A27,A29,FUNCT_1:def 3; reconsider w = s.(len s) as Element of NAT by A31; w in S by A4,A31,FINSEQ_1:def 13; then A32: w in Seg(len t) by XBOOLE_0:def 5; assume A33: y <> len s; A34: y in Seg(len s) by A24,FINSEQ_1:def 3; then y <= len s by FINSEQ_1:1; then A35: y < len s by A33,XXREAL_0:1; 1 <= y by A34,FINSEQ_1:1; then len t < w by A4,A25,A35,FINSEQ_1:def 13; hence contradiction by A32,FINSEQ_1:1; end; dom t = Seg len t by FINSEQ_1:def 3; hence r.(len(p - A) + k) = t.(len t) by A26,A27,A28,A23,A25,A30,FINSEQ_1:4 ,FUNCT_1:13 .= x by A1,FINSEQ_1:42 .= q.k by A7,A9,FINSEQ_1:def 8; end; A36: now A37: x in A implies t " A = p " A \/ {len p + 1} proof assume A38: x in A; thus t " A c= p " A \/ {len p + 1} proof let y; assume A39: y in t " A; then y in dom t by FUNCT_1:def 7; then y in Seg(len p + 1) by A1,FINSEQ_1:def 3; then A40: y in Seg(len p) \/ {len p + 1} by FINSEQ_1:9; now per cases by A40,XBOOLE_0:def 3; suppose A41: y in Seg(len p); then reconsider j = y as Element of NAT; A42: t.y in A by A39,FUNCT_1:def 7; A43: y in dom p by A41,FINSEQ_1:def 3; then p.j = t.j by FINSEQ_1:def 7; then y in p " A by A43,A42,FUNCT_1:def 7; hence thesis by XBOOLE_0:def 3; end; suppose y in {len p + 1}; hence thesis by XBOOLE_0:def 3; end; end; hence thesis; end; let y; assume A44: y in p " A \/ {len p + 1}; now per cases by A44,XBOOLE_0:def 3; suppose A45: y in p " A; p " A c= t " A by Th58; hence thesis by A45; end; suppose y in {len p + 1}; then A46: y = len p + 1 by TARSKI:def 1; then y in Seg(len t) by A1,FINSEQ_1:4; then A47: y in dom t by FINSEQ_1:def 3; t.y in A by A38,A46,FINSEQ_1:42; hence thesis by A47,FUNCT_1:def 7; end; end; hence thesis; end; t " A c= dom t by RELAT_1:132; then A48: t " A c= Seg(len t) by FINSEQ_1:def 3; A49: not x in A implies t " A = p " A proof assume A50: not x in A; thus t " A c= p " A proof let y; assume A51: y in t " A; then A52: y in dom t by FUNCT_1:def 7; then reconsider l = y as Element of NAT; A53: now assume l = len p + 1; then t.l = x by FINSEQ_1:42; hence contradiction by A50,A51,FUNCT_1:def 7; end; A54: y in Seg(len t) by A52,FINSEQ_1:def 3; then l <= len p + 1 by A1,FINSEQ_1:1; then l < len p + 1 by A53,XXREAL_0:1; then A55: l <= len p by NAT_1:13; 1 <= l by A54,FINSEQ_1:1; then l in Seg(len p) by A55,FINSEQ_1:1; then A56: y in dom p by FINSEQ_1:def 3; t.l in A by A51,FUNCT_1:def 7; then p.l in A by A56,FINSEQ_1:def 7; hence thesis by A56,FUNCT_1:def 7; end; thus thesis by Th58; end; set s2 = Sgm(Seg(len p) \ p " A); set s1 = Sgm(Seg(len t) \ t " A); let k be Element of NAT; A57: dom p = Seg len p by FINSEQ_1:def 3; A58: now {len p + 1} /\ p " A = {} proof set z = the Element of {len p + 1} /\ p " A; A59: p " A c= dom p by RELAT_1:132; assume A60: not thesis; then z in {len p + 1} by XBOOLE_0:def 4; then A61: z = len p + 1 by TARSKI:def 1; A62: dom p = Seg(len p) by FINSEQ_1:def 3; z in p " A by A60,XBOOLE_0:def 4; then len p + 1 <= len p by A61,A59,A62,FINSEQ_1:1; hence thesis by XREAL_1:29; end; then A63: {len p + 1} misses p " A by XBOOLE_0:def 7; assume t " A = p " A; hence Seg(len t) \ t " A = (Seg(len p) \/ {len p + 1}) \ p " A by A1, FINSEQ_1:9 .= (Seg(len p) \ p " A) \/ ({len p + 1} \ p " A) by XBOOLE_1:42 .= (Seg(len p) \ p " A) \/ {len p + 1} by A63,XBOOLE_1:83; end; Seg(len p) /\ {len p + 1} = {} proof set z = the Element of Seg(len p) /\ {len p + 1}; assume A64: not thesis; then A65: z in Seg(len p) by XBOOLE_0:def 4; then reconsider f = z as Element of NAT; f in {len p + 1} by A64,XBOOLE_0:def 4; then A66: f = len p + 1 by TARSKI:def 1; f <= len p by A65,FINSEQ_1:1; hence thesis by A66,XREAL_1:29; end; then A67: Seg(len p) misses {len p + 1} by XBOOLE_0:def 7; A68: now assume t " A = p " A \/ {len p + 1}; hence Seg(len t) \ t " A = (Seg(len p) \/ {len p + 1}) \ (p " A \/ {len p + 1}) by A1,FINSEQ_1:9 .= (Seg(len p) \ (p " A \/ {len p + 1}) \/ ({len p + 1} \ (p " A \/ {len p + 1}))) by XBOOLE_1:42 .= (Seg(len p) \ (p " A \/ {len p + 1})) \/ {} by XBOOLE_1:46 .= (Seg(len p) \ p " A) /\ (Seg(len p) \ {len p + 1}) by XBOOLE_1:53 .= (Seg(len p) \ p " A) /\ Seg(len p) by A67,XBOOLE_1:83 .= (Seg(len p) \ p " A) by XBOOLE_1:28,36; end; p " A c= dom p by RELAT_1:132; then A69: p " A c= Seg(len p) by FINSEQ_1:def 3; len s2 = card(Seg(len p) \ p " A) by Th39,XBOOLE_1:36 .= card(Seg(len p)) - card(p " A) by A69,CARD_2:44; then A70: len s2 = len p - card(p " A) by FINSEQ_1:57; Seg(len t) \ t " A c= Seg(len t) by XBOOLE_1:36; then A71: rng s1 c= Seg(len t) by FINSEQ_1:def 13; A72: Seg(len p) \ p " A c= Seg(len p) by XBOOLE_1:36; then A73: rng s2 c= Seg(len p) by FINSEQ_1:def 13; assume k in dom(p - A); then A74: k in dom s2 by A57,FUNCT_1:11; then s2.k in rng s2 by FUNCT_1:def 3; then s2.k in Seg(len p) by A73; then A75: s2.k in dom p by FINSEQ_1:def 3; len s1 = card(Seg(len t) \ t " A) by Th39,XBOOLE_1:36 .= card(Seg(len t)) - card(t " A) by A48,CARD_2:44; then A76: len s1 = len t - card(t " A) by FINSEQ_1:57; A77: dom s2 c= dom s1 proof <* x *> " A c= dom<* x *> by RELAT_1:132; then <* x *> " A c= {1} by FINSEQ_1:2,def 8; then A78: <* x *> " A = {} or <* x *> " A = {1} by ZFMISC_1:33; let y; A79: card(p " A) <= card(p " A) + 1 by NAT_1:12; assume A80: y in dom s2; then reconsider l = y as Element of NAT; A81: y in Seg(len s2) by A80,FINSEQ_1:def 3; then l <= len p - card(p " A) by A70,FINSEQ_1:1; then l + card(p " A) <= len p by XREAL_1:19; then A82: l + card(p " A) + 1 <= len t by A1,XREAL_1:7; card(t " A) = card(p " A) + card(<* x *> " A) by Th57; then l + card(t " A) <= l + (card(p " A) + 1) by A78,A79,CARD_1:27,30 ,XREAL_1:7; then l + card(t " A) <= len t by A82,XXREAL_0:2; then A83: l <= len s1 by A76,XREAL_1:19; 1 <= l by A81,FINSEQ_1:1; then l in Seg(len s1) by A83,FINSEQ_1:1; hence thesis by FINSEQ_1:def 3; end; then s1.k in rng s1 by A74,FUNCT_1:def 3; then s1.k in Seg(len t) by A71; then reconsider l = s1.k as Element of NAT; dom t = Seg len t by FINSEQ_1:def 3; then A84: r.k = t.l by A74,A77,FUNCT_1:13; len p + 1 in Seg(len p + 1) by FINSEQ_1:4; then A85: {len p + 1} c= Seg(len p + 1) by ZFMISC_1:31; A86: now per cases by A37,A49,A58,A68; suppose Seg(len p) \ p " A = Seg(len t) \ t " A; hence s1.k = s2.k; end; suppose A87: Seg(len t) \ t " A = (Seg(len p) \ p " A) \/ {len p + 1}; now let m,n be Element of NAT; assume that A88: m in Seg(len p) \ p " A and A89: n in {len p + 1}; m in Seg(len p) by A88,XBOOLE_0:def 5; then A90: m <= len p by FINSEQ_1:1; A91: len p < len p + 1 by XREAL_1:29; n = len p + 1 by A89,TARSKI:def 1; hence m < n by A90,A91,XXREAL_0:2; end; then s1 = s2 ^ Sgm{len p + 1} by A72,A85,A87,Th42; hence s1.k = s2.k by A74,FINSEQ_1:def 7; end; end; (p - A).k = p.(s2.k) by A57,A74,FUNCT_1:13; hence r.k = (p - A).k by A75,A86,A84,FINSEQ_1:def 7; end; len r = len(p ^ <* x *>) - card(t " A) by Th59 .= len p + len<* x *> - card(t " A) by FINSEQ_1:22 .= (len p + len<* x *>) - (card(p " A) + card(<* x *> " A)) by Th57 .= len p - card(p " A) + len<* x *> + (- card(<* x *> " A)) .= len(p - A) + len<* x *> + (- card(<* x *> " A)) by Th59 .= len(p - A) + (len<* x *> - card(<* x *> " A)) .= len(p - A) + len q by Th59; hence thesis by A36,A2,Th38; end; Lm10: now let q,x; assume A1: for p,A holds (p ^ q) - A = (p - A) ^ (q - A); let p,A; thus (p ^ (q ^ <* x *>)) - A = (p ^ q ^ <* x *>) - A by FINSEQ_1:32 .= ((p ^ q) - A) ^ (<* x *> - A) by Lm9 .= (p - A) ^ (q - A) ^ (<* x *> - A) by A1 .= (p - A) ^ ((q - A) ^ (<* x *> - A)) by FINSEQ_1:32 .= (p - A) ^ ((q ^ <* x *>) - A) by Lm9; end; Lm11: for q,p,A holds (p ^ q) - A = (p - A) ^ (q - A) proof defpred P[FinSequence] means (p ^ $1) - A = (p - A) ^ ($1 - A); A1: for q,x st P[q] holds P[q^<*x*>] by Lm10; A2: P[{}] by Lm8; for q holds P[q] from FINSEQ_1:sch 3(A2,A1); hence thesis; end; theorem (p ^ q) - A = (p - A) ^ (q - A) by Lm11; theorem {} - A = {}; theorem <* x *> - A = <* x *> iff not x in A by Lm6; theorem <* x *> - A = {} iff x in A by Lm7; theorem Th77: <* x,y *> - A = {} iff x in A & y in A proof A1: <* x,y *> = <* x *> ^ <* y *> by FINSEQ_1:def 9; thus <* x,y *> - A = {} implies x in A & y in A proof assume <* x,y *> - A = {}; then rng<* x,y *> c= A by Th68; then {x,y} c= A by FINSEQ_2:127; hence thesis by ZFMISC_1:32; end; assume that A2: x in A and A3: y in A; A4: <* y *> - A = {} by A3,Lm7; card {} +card {} = card({} ^ {}) by FINSEQ_1:22; then A5: card({} ^ {}) = 0; <* x *> - A = {} by A2,Lm7; hence <* x,y *> - A = {} ^ {} by A4,A1,Lm11 .= {} by A5; end; theorem Th78: x in A & not y in A implies <* x,y *> - A = <* y *> proof assume that A1: x in A and A2: not y in A; A3: <* y *> - A = <* y *> by A2,Lm6; A4: <* x,y *> = <* x *> ^ <* y *> by FINSEQ_1:def 9; <* x *> - A = {} by A1,Lm7; hence <* x,y *> - A = {} ^ <* y *> by A3,A4,Lm11 .= <* y *> by FINSEQ_1:34; end; theorem <* x,y *> - A = <* y *> & x <> y implies x in A & not y in A proof assume that A1: <* x,y *> - A = <* y *> and A2: x <> y; assume A3: not thesis; A4: y in A implies <* y *> - A = {} by Lm7; A5: not x in A implies <* x *> - A = <* x *> by Lm6; A6: not y in A implies <* y *> - A = <* y *> by Lm6; A7: x in A implies <* x *> - A = {} by Lm7; A8: <* x *>.1 = x by FINSEQ_1:40; <* y *> = (<* x *> ^ <* y *>) - A by A1,FINSEQ_1:def 9 .= (<* x *> - A) ^ (<* y *> - A) by Lm11; then <* y *> = {} or <* x *> = <* y *> or <* y *> = <* x,y *> by A7,A5,A4,A6 ,A3,FINSEQ_1:34,def 9; hence thesis by A2,A8,Th35,FINSEQ_1:40; end; theorem Th80: not x in A & y in A implies <* x,y *> - A = <* x *> proof assume that A1: not x in A and A2: y in A; A3: <* y *> - A = {} by A2,Lm7; A4: <* x,y *> = <* x *> ^ <* y *> by FINSEQ_1:def 9; <* x *> - A = <* x *> by A1,Lm6; hence <* x,y *> - A = <* x *> ^ {} by A3,A4,Lm11 .= <* x *> by FINSEQ_1:34; end; theorem <* x,y *> - A = <* x *> & x <> y implies not x in A & y in A proof assume that A1: <* x,y *> - A = <* x *> and A2: x <> y; assume A3: not thesis; A4: y in A implies <* y *> - A = {} by Lm7; A5: not x in A implies <* x *> - A = <* x *> by Lm6; A6: not y in A implies <* y *> - A = <* y *> by Lm6; A7: x in A implies <* x *> - A = {} by Lm7; A8: <* x *>.1 = x by FINSEQ_1:40; <* x *> = (<* x *> ^ <* y *>) - A by A1,FINSEQ_1:def 9 .= (<* x *> - A) ^ (<* y *> - A) by Lm11; then <* x *> = {} or <* x *> = <* y *> or <* x *> = <* x,y *> by A7,A5,A4,A6 ,A3,FINSEQ_1:34,def 9; hence thesis by A2,A8,Th35,FINSEQ_1:40; end; theorem <* x,y *> - A = <* x,y *> iff not x in A & not y in A proof A1: <* x,y *> = <* x *> ^ <* y *> by FINSEQ_1:def 9; thus <* x,y *> - A = <* x,y *> implies not x in A & not y in A proof assume A2: <* x,y *> - A = <* x,y *>; assume not thesis; then x in A & y in A or not x in A & y in A or x in A & not y in A; then <* x,y *> - A = {} or <* x,y *> - A = <* x *> or <* x,y *> - A = <* y *> by Th77,Th78,Th80; hence thesis by A2,Th35; end; assume that A3: not x in A and A4: not y in A; A5: <* y *> - A = <* y *> by A4,Lm6; <* x *> - A = <* x *> by A3,Lm6; hence thesis by A5,A1,Lm11; end; theorem Th83: len p = k + 1 & q = p | Seg k implies (p.(k + 1) in A iff p - A = q - A) proof assume that A1: len p = k + 1 and A2: q = p | Seg k; thus p.(k + 1) in A implies p - A = q - A proof assume A3: p.(k + 1) in A; thus p - A = (q ^ <* p.(k + 1) *>) - A by A1,A2,Th55 .= (q - A) ^ (<* p.(k + 1) *> - A) by Lm11 .= (q - A) ^ {} by A3,Lm7 .= q - A by FINSEQ_1:34; end; assume that A4: p - A = q - A and A5: not p.(k + 1) in A; q - A = (q ^ <* p.(k + 1) *>) - A by A1,A2,A4,Th55 .= (q - A) ^ (<* p.(k + 1) *> - A) by Lm11 .= (q - A) ^ <* p.(k + 1) *> by A5,Lm6; hence thesis by FINSEQ_1:87; end; theorem Th84: len p = k + 1 & q = p | Seg k implies (not p.(k + 1) in A iff p - A = (q - A) ^ <* p.(k + 1) *>) proof assume that A1: len p = k + 1 and A2: q = p | Seg k; thus not p.(k + 1) in A implies p - A = (q - A) ^ <* p.(k + 1) *> proof assume A3: not p.(k + 1) in A; thus p - A = (q ^ <* p.(k + 1) *>) - A by A1,A2,Th55 .= (q - A) ^ (<* p.(k + 1) *> - A) by Lm11 .= (q - A) ^ <* p.(k + 1) *> by A3,Lm6; end; assume A4: p - A = (q - A) ^ <* p.(k + 1) *>; assume p.(k + 1) in A; then q - A = (q - A) ^ <* p.(k + 1) *> by A1,A2,A4,Th83; hence contradiction by FINSEQ_1:87; end; Lm12: for l st (for p,A st len p = l for n st n in dom p for B being finite set st B = {k where k is Element of NAT : k in dom p & k <= n & p.k in A} holds p.n in A or (p - A).(n - card B) = p.n) holds for p,A st len p = l + 1 for n st n in dom p for C being finite set st C = {m where m is Element of NAT : m in dom p & m <= n & p.m in A} holds p.n in A or (p - A).(n - card C) = p.n proof let l; assume A1: for p,A st len p = l for n st n in dom p for B being finite set st B = {k where k is Element of NAT : k in dom p & k <= n & p.k in A} holds p.n in A or (p - A).(n - card B) = p.n; let p,A; reconsider q = p | Seg l as FinSequence by FINSEQ_1:15; assume A2: len p = l + 1; then A3: len q = l by Th53; let n; set B = {k where k is Element of NAT: k in dom q & k <= n & q.k in A}; B c= dom q proof let x be set; assume x in B; then ex k being Element of NAT st x = k & k in dom q & k <= n & q.k in A; hence thesis; end; then reconsider B as finite set; assume A4: n in dom p; let C be finite set such that A5: C = {m where m is Element of NAT: m in dom p & m <= n & p.m in A}; assume A6: not p.n in A; now per cases; suppose A7: p.(l + 1) in A; A8: n in Seg(l + 1) by A2,A4,FINSEQ_1:def 3; not n in {l + 1} by A6,A7,TARSKI:def 1; then n in Seg(l + 1) \ {l + 1} by A8,XBOOLE_0:def 5; then A9: n in Seg l by FINSEQ_1:10; A10: B = C proof thus B c= C proof let x; A11: dom q c= dom p by RELAT_1:60; assume x in B; then consider k being Element of NAT such that A12: x = k and A13: k in dom q and A14: k <= n and A15: q.k in A; p.k in A by A13,A15,FUNCT_1:47; hence thesis by A5,A12,A13,A14,A11; end; let x; assume x in C; then consider m being Element of NAT such that A16: x = m and A17: m in dom p and A18: m <= n and A19: p.m in A by A5; m in Seg(len p) by A17,FINSEQ_1:def 3; then A20: 1 <= m by FINSEQ_1:1; n <= l by A9,FINSEQ_1:1; then m <= l by A18,XXREAL_0:2; then m in Seg l by A20,FINSEQ_1:1; then A21: m in dom q by A3,FINSEQ_1:def 3; then q.m in A by A19,FUNCT_1:47; hence thesis by A16,A18,A21; end; A22: q - A = p - A by A2,A7,Th83; A23: n in dom q by A3,A9,FINSEQ_1:def 3; then p.n = q.n by FUNCT_1:47; hence thesis by A1,A6,A3,A23,A22,A10; end; suppose not p.(l + 1) in A; then A24: p - A = (q - A) ^ <* p.(l + 1) *> by A2,Th84; now per cases; suppose A25: n = l + 1; p " A = C proof thus p " A c= C proof let x; assume A26: x in p " A; then A27: x in dom p by FUNCT_1:def 7; then reconsider z = x as Element of NAT; A28: p.x in A by A26,FUNCT_1:def 7; z in Seg n by A2,A25,A27,FINSEQ_1:def 3; then z <= n by FINSEQ_1:1; hence thesis by A5,A27,A28; end; let x; assume x in C; then ex m being Element of NAT st x = m & m in dom p & m <= n & p. m in A by A5; hence thesis by FUNCT_1:def 7; end; then A29: len(p - A) = n - card C by A2,A25,Th59; len<* p.(l + 1) *> = 1 by FINSEQ_1:39; then (p - A).(n - card C) = (p - A).(len(q - A) + 1) by A24,A29, FINSEQ_1:22 .= p.(l + 1) by A24,FINSEQ_1:42; hence thesis by A25; end; suppose n <> l + 1; then A30: not n in {l + 1} by TARSKI:def 1; n in Seg(l + 1) by A2,A4,FINSEQ_1:def 3; then n in Seg(l + 1) \ {l + 1} by A30,XBOOLE_0:def 5; then A31: n in Seg l by FINSEQ_1:10; then 1 <= n by FINSEQ_1:1; then n in Seg n by FINSEQ_1:1; then A32: {n} c= Seg n by ZFMISC_1:31; A33: Seg n \ B c= Seg l \ q " A proof let x; assume A34: x in Seg n \ B; then reconsider z = x as Element of NAT; A35: x in Seg n by A34,XBOOLE_0:def 5; then A36: 1 <= z by FINSEQ_1:1; A37: z <= n by A35,FINSEQ_1:1; A38: now assume A39: z in q " A; then A40: z in dom q by FUNCT_1:def 7; q.z in A by A39,FUNCT_1:def 7; then z in B by A37,A40; hence contradiction by A34,XBOOLE_0:def 5; end; n <= l by A31,FINSEQ_1:1; then z <= l by A37,XXREAL_0:2; then z in Seg l by A36,FINSEQ_1:1; hence thesis by A38,XBOOLE_0:def 5; end; A41: B = C proof thus B c= C proof let x; A42: dom q c= dom p by RELAT_1:60; assume x in B; then consider k being Element of NAT such that A43: x = k and A44: k in dom q and A45: k <= n and A46: q.k in A; p.k in A by A44,A46,FUNCT_1:47; hence thesis by A5,A43,A44,A45,A42; end; let x; assume x in C; then consider m being Element of NAT such that A47: x = m and A48: m in dom p and A49: m <= n and A50: p.m in A by A5; m in Seg(len p) by A48,FINSEQ_1:def 3; then A51: 1 <= m by FINSEQ_1:1; n <= l by A31,FINSEQ_1:1; then m <= l by A49,XXREAL_0:2; then m in Seg l by A51,FINSEQ_1:1; then A52: m in dom q by A3,FINSEQ_1:def 3; then q.m in A by A50,FUNCT_1:47; hence thesis by A47,A49,A52; end; q " A c= dom q by RELAT_1:132; then A53: q " A c= Seg l by A3,FINSEQ_1:def 3; q " A \/ (Seg l \ q " A) = q " A \/ Seg l by XBOOLE_1:39 .= Seg l by A53,XBOOLE_1:12; then card(Seg l) = card(q " A) + card(Seg l \ q " A) by CARD_2:40 ,XBOOLE_1:79; then A54: len q = card(q " A) + card(Seg(len q) \ q " A) by A3,FINSEQ_1:57; set b = card B; set a = n - card B; A55: card(Seg n) = n by FINSEQ_1:57; A56: n in dom q by A3,A31,FINSEQ_1:def 3; then A57: not q.n in A by A6,FUNCT_1:47; A58: B c= (Seg n) \ {n} proof let x; assume x in B; then consider k being Element of NAT such that A59: x = k and A60: k in dom q and A61: k <= n and A62: q.k in A; k in Seg(len q) by A60,FINSEQ_1:def 3; then 1 <= k by FINSEQ_1:1; then A63: k in Seg n by A61,FINSEQ_1:1; not k in {n} by A57,A62,TARSKI:def 1; hence thesis by A59,A63,XBOOLE_0:def 5; end; then card B <= card((Seg n) \ {n}) by NAT_1:43; then card B <= card(Seg n) - card{n} by A32,CARD_2:44; then b <= card(Seg n) - 1 by CARD_1:30; then b <= n - 1 by FINSEQ_1:57; then b + 1 <= n by XREAL_1:19; then A64: 0 + b < a + b by NAT_1:13; then 0 <= a by XREAL_1:6; then reconsider a as Element of NAT by INT_1:3; Seg n \ {n} c= Seg n by XBOOLE_1:36; then a = card(Seg n \ B) by A58,A55,CARD_2:44,XBOOLE_1:1; then a <= len q - card(q " A) by A3,A54,A33,NAT_1:43; then A65: a <= len(q - A) by Th59; 1 <= a by A64,NAT_1:14; then a in Seg(len(q - A)) by A65,FINSEQ_1:1; then A66: a in dom(q - A) by FINSEQ_1:def 3; p.n = q.n by A56,FUNCT_1:47; then (q - A).(n - card B) = p.n by A1,A6,A3,A56; hence thesis by A24,A41,A66,FINSEQ_1:def 7; end; end; hence thesis; end; end; hence thesis; end; Lm13: for l for p,A st len p = l for n st n in dom p holds for B being finite set st B = {k where k is Element of NAT: k in dom p & k <= n & p.k in A} holds p.n in A or (p - A).(n - card B) = p.n proof defpred P[Element of NAT] means for p,A st len p = $1 for n st n in dom p holds for B being finite set st B = {k where k is Element of NAT : k in dom p & k <= n & p.k in A} holds p.n in A or (p - A).(n - card B) = p.n; A1: P[0] proof let p,A; assume len p = 0; then p = {}; hence thesis; end; A2: for k being Element of NAT st P[k] holds P[k+1] by Lm12; for n being Element of NAT holds P[n] from NAT_1:sch 1(A1,A2); hence thesis; end; theorem n in dom p implies for B being finite set st B = {k where k is Element of NAT : k in dom p & k <= n & p.k in A} holds p.n in A or (p - A).(n - card B) = p.n proof len p = len p; hence thesis by Lm13; end; theorem p is FinSequence of D implies p - A is FinSequence of D proof assume p is FinSequence of D; then A1: rng p c= D by FINSEQ_1:def 4; rng(p - A) = rng p \ A by Th65; then rng(p - A) c= D by A1,XBOOLE_1:1; hence thesis by FINSEQ_1:def 4; end; theorem p is one-to-one implies p - A is one-to-one proof assume A1: p is one-to-one; A2: p - A = p * Sgm(Seg(len p) \ p " A) by FINSEQ_1:def 3; Sgm(Seg(len p) \ p " A) is one-to-one by Lm1,XBOOLE_1:36; hence thesis by A1,A2; end; theorem Th88: p is one-to-one implies len(p - A) = len p - card(A /\ rng p) proof A1: p " A c= dom p by RELAT_1:132; assume A2: p is one-to-one; p " A,A /\ rng p are_equipotent proof deffunc F(set) = p.$1; consider f being Function such that A3: dom f = p " A and A4: for x st x in p " A holds f.x = F(x) from FUNCT_1:sch 3; take f; thus f is one-to-one proof let x,y; assume that A5: x in dom f and A6: y in dom f and A7: f.x = f.y; A8: f.y = p.y by A3,A4,A6; p.x = f.x by A3,A4,A5; hence thesis by A2,A1,A3,A5,A6,A7,A8,FUNCT_1:def 4; end; thus dom f = p " A by A3; thus rng f c= A /\ rng p proof let x; assume x in rng f; then consider y such that A9: y in dom f and A10: f.y = x by FUNCT_1:def 3; A11: p.y in A by A3,A9,FUNCT_1:def 7; y in dom p by A3,A9,FUNCT_1:def 7; then A12: p.y in rng p by FUNCT_1:def 3; p.y = f.y by A3,A4,A9; hence thesis by A10,A11,A12,XBOOLE_0:def 4; end; let x; assume A13: x in A /\ rng p; then x in rng p by XBOOLE_0:def 4; then consider y such that A14: y in dom p and A15: p.y = x by FUNCT_1:def 3; p.y in A by A13,A15,XBOOLE_0:def 4; then A16: y in p " A by A14,FUNCT_1:def 7; then f.y = x by A4,A15; hence thesis by A3,A16,FUNCT_1:def 3; end; then card(p " A) = card(A /\ rng p) by CARD_1:5; hence thesis by Th59; end; theorem Th89: for A being finite set st p is one-to-one & A c= rng p holds len (p - A) = len p - card A proof let A be finite set; assume that A1: p is one-to-one and A2: A c= rng p; A /\ rng p = A by A2,XBOOLE_1:28; hence thesis by A1,Th88; end; theorem p is one-to-one & x in rng p implies len(p - {x}) = len p - 1 proof assume that A1: p is one-to-one and A2: x in rng p; {x} c= rng p by A2,ZFMISC_1:31; then len(p - {x}) = len p - card{x} by A1,Th89; hence thesis by CARD_1:30; end; theorem Th91: rng p misses rng q & p is one-to-one & q is one-to-one iff p ^ q is one-to-one proof thus rng p misses rng q & p is one-to-one & q is one-to-one implies p ^ q is one-to-one proof assume that A1: rng p misses rng q and A2: p is one-to-one and A3: q is one-to-one; let x,y; assume that A4: x in dom(p ^ q) and A5: y in dom(p ^ q) and A6: (p ^ q).x = (p ^ q).y; reconsider k1 = x, k2 = y as Element of NAT by A4,A5; now per cases by A4,A5,FINSEQ_1:25; suppose A7: k1 in dom p & k2 in dom p; then A8: (p ^ q).k2 = p.k2 by FINSEQ_1:def 7; (p ^ q).k1 = p.k1 by A7,FINSEQ_1:def 7; hence thesis by A2,A6,A7,A8,FUNCT_1:def 4; end; suppose A9: k1 in dom p & ex n being Nat st n in dom q & k2 = len p + n; then consider n being Nat such that A10: n in dom q and A11: k2 = len p + n; A12: q.n in rng q by A10,FUNCT_1:def 3; A13: (p ^ q).k1 = p.k1 by A9,FINSEQ_1:def 7; (p ^ q).k2 = q.n by A9,A11,FINSEQ_1:def 7; then q.n in rng p by A6,A9,A13,FUNCT_1:def 3; hence thesis by A1,A12,XBOOLE_0:3; end; suppose A14: k2 in dom p & ex n being Nat st n in dom q & k1 = len p + n; then consider n being Nat such that A15: n in dom q and A16: k1 = len p + n; A17: q.n in rng q by A15,FUNCT_1:def 3; A18: (p ^ q).k2 = p.k2 by A14,FINSEQ_1:def 7; (p ^ q).k1 = q.n by A14,A16,FINSEQ_1:def 7; then q.n in rng p by A6,A14,A18,FUNCT_1:def 3; hence thesis by A1,A17,XBOOLE_0:3; end; suppose A19: (ex n being Nat st n in dom q & k1 = len p + n) & ex n being Nat st n in dom q & k2 = len p + n; then consider n2 being Nat such that A20: n2 in dom q and A21: k2 = len p + n2; A22: (p ^ q).k2 = q.n2 by A20,A21,FINSEQ_1:def 7; consider n1 being Nat such that A23: n1 in dom q and A24: k1 = len p + n1 by A19; (p ^ q).k1 = q.n1 by A23,A24,FINSEQ_1:def 7; hence thesis by A3,A6,A23,A24,A20,A21,A22,FUNCT_1:def 4; end; end; hence thesis; end; assume A25: p ^ q is one-to-one; thus rng p misses rng q proof assume not rng p misses rng q; then consider x such that A26: x in rng p and A27: x in rng q by XBOOLE_0:3; consider y1 such that A28: y1 in dom p and A29: p.y1 = x by A26,FUNCT_1:def 3; A30: y1 in Seg(len p) by A28,FINSEQ_1:def 3; consider y2 such that A31: y2 in dom q and A32: q.y2 = x by A27,FUNCT_1:def 3; A33: y2 in Seg(len q) by A31,FINSEQ_1:def 3; reconsider y1,y2 as Element of NAT by A28,A31; A34: len p + y2 in dom(p ^ q) by A31,FINSEQ_1:28; A35: (p ^ q).y1 = p.y1 by A28,FINSEQ_1:def 7; A36: (p ^ q).(len p + y2) = q.y2 by A31,FINSEQ_1:def 7; y1 in dom(p ^ q ) by A28,Th22; then A37: y1 = len p + y2 by A25,A29,A32,A34,A35,A36,FUNCT_1:def 4; A38: y1 = y1 + 0; A39: len p <= len p + y2 by NAT_1:12; y1 <= len p by A30,FINSEQ_1:1; then y1 = len p by A37,A39,XXREAL_0:1; hence thesis by A33,A37,A38,FINSEQ_1:1; end; thus p is one-to-one proof let x,y; assume that A40: x in dom p and A41: y in dom p and A42: p.x = p.y; reconsider k = x, l = y as Element of NAT by A40,A41; A43: (p ^ q).k = p.k by A40,FINSEQ_1:def 7; A44: (p ^ q).l = p.l by A41,FINSEQ_1:def 7; A45: l in dom(p ^q) by A41,Th22; k in dom(p ^ q) by A40,Th22; hence thesis by A25,A42,A43,A44,A45,FUNCT_1:def 4; end; let x,y; assume that A46: x in dom q and A47: y in dom q and A48: q.x = q.y; consider l being Nat such that A49: y = l and A50: len p + l in dom(p ^ q) by A47,FINSEQ_1:27; A51: (p ^ q).(len p + l) = q.l by A47,A49,FINSEQ_1:def 7; consider k being Nat such that A52: x = k and A53: len p + k in dom(p ^ q) by A46,FINSEQ_1:27; (p ^ q).(len p + k) = q.k by A46,A52,FINSEQ_1:def 7; then len p + k = len p + l by A25,A48,A52,A53,A49,A50,A51,FUNCT_1:def 4; hence thesis by A52,A49; end; theorem A c= Seg k implies Sgm A is one-to-one by Lm1; theorem Th93: <* x *> is one-to-one proof let y1,y2; assume that A1: y1 in dom<* x *> and A2: y2 in dom<* x *> and <* x *>.y1 = <* x *>.y2; y1 in {1} by A1,FINSEQ_1:2,def 8; then A3: y1 = 1 by TARSKI:def 1; y2 in {1} by A2,FINSEQ_1:2,def 8; hence thesis by A3,TARSKI:def 1; end; theorem Th94: x <> y iff <* x,y *> is one-to-one proof A1: <* x,y *>.2 = y by FINSEQ_1:44; 2 in {1,2} by TARSKI:def 2; then A2: 2 in dom<* x,y *> by FINSEQ_1:2,89; thus x <> y implies <* x,y *> is one-to-one proof assume A3: x <> y; let y1,y2; assume that A4: y1 in dom<* x,y *> and A5: y2 in dom<* x,y *> and A6: <* x,y *>.y1 = <* x,y *>.y2; A7: y2 in {1,2} by A5,FINSEQ_1:2,89; A8: y1 in {1,2} by A4,FINSEQ_1:2,89; now per cases by A8,A7,TARSKI:def 2; suppose y1 = 1 & y2 = 1 or y1 = 2 & y2 = 2; hence thesis; end; suppose A9: y1 = 1 & y2 = 2; then <* x,y *>.y1 = x by FINSEQ_1:44; hence thesis by A3,A6,A9,FINSEQ_1:44; end; suppose A10: y1 = 2 & y2 = 1; then <* x,y *>.y1 = y by FINSEQ_1:44; hence thesis by A3,A6,A10,FINSEQ_1:44; end; end; hence thesis; end; assume that A11: <* x,y *> is one-to-one and A12: x = y; 1 in {1,2} by TARSKI:def 2; then A13: 1 in dom<* x,y *> by FINSEQ_1:2,89; <* x,y *>.1 = x by FINSEQ_1:44; hence thesis by A11,A12,A13,A2,A1,FUNCT_1:def 4; end; theorem Th95: x <> y & y <> z & z <> x iff <* x,y,z *> is one-to-one proof set p = <* x,y,z *>; A1: p.1 = x by FINSEQ_1:45; A2: p.3 = z by FINSEQ_1:45; thus x <> y & y <> z & z <> x implies <* x,y,z *> is one-to-one proof assume that A3: x <> y and A4: y <> z and A5: z <> x; {x,y} /\ {z} = {} proof set y1 = the Element of {x,y} /\ {z}; assume A6: not thesis; then y1 in {x,y} by XBOOLE_0:def 4; then A7: y1 = x or y1 = y by TARSKI:def 2; y1 in {z} by A6,XBOOLE_0:def 4; hence thesis by A4,A5,A7,TARSKI:def 1; end; then {} = rng<* x,y *> /\ {z} by FINSEQ_2:127 .= rng<* x,y *> /\ rng<* z *> by FINSEQ_1:38; then A8: rng<* x,y *> misses rng<* z *> by XBOOLE_0:def 7; A9: <* z *> is one-to-one by Th93; <* x,y *> is one-to-one by A3,Th94; then <* x,y *> ^ <* z *> is one-to-one by A8,A9,Th91; hence thesis by FINSEQ_1:43; end; A10: p.2 = y by FINSEQ_1:45; 1 in {1,2,3} by ENUMSET1:def 1; then A11: 1 in dom p by Th1,FINSEQ_1:89; 3 in {1,2,3} by ENUMSET1:def 1; then A12: 3 in dom p by Th1,FINSEQ_1:89; 2 in {1,2,3} by ENUMSET1:def 1; then A13: 2 in dom p by Th1,FINSEQ_1:89; assume <* x,y,z *> is one-to-one; hence thesis by A11,A13,A12,A1,A10,A2,FUNCT_1:def 4; end; theorem Th96: p is one-to-one & rng p = {x} implies len p = 1 proof assume that A1: p is one-to-one and A2: rng p = {x}; A3: now given y1,y2 such that A4: y1 in dom p and A5: y2 in dom p and A6: y1 <> y2; p.y2 in rng p by A5,FUNCT_1:def 3; then A7: p.y2 = x by A2,TARSKI:def 1; p.y1 in rng p by A4,FUNCT_1:def 3; then p.y1 = x by A2,TARSKI:def 1; hence contradiction by A1,A4,A5,A6,A7,FUNCT_1:def 4; end; set y = the Element of dom p; A8: dom p <> {} by A2,RELAT_1:42; A9: dom p = {y} proof thus dom p c= {y} proof let x; assume x in dom p; then x = y by A3; hence thesis by TARSKI:def 1; end; let x; y in dom p by A8; hence thesis by TARSKI:def 1; end; dom p = Seg(len p) by FINSEQ_1:def 3; hence thesis by A9,Th20; end; theorem p is one-to-one & rng p = {x} implies p = <* x *> proof assume that A1: p is one-to-one and A2: rng p = {x}; len p = 1 by A1,A2,Th96; hence thesis by A2,FINSEQ_1:39; end; theorem Th98: p is one-to-one & rng p = {x,y} & x <> y implies len p = 2 proof assume that A1: p is one-to-one and A2: rng p = {x,y} and A3: x <> y; set q = <* x,y *>; A4: rng q = {x,y} by FINSEQ_2:127; A5: len q = 2 by FINSEQ_1:44; q is one-to-one by A3,Th94; hence thesis by A1,A2,A4,A5,FINSEQ_1:48; end; theorem p is one-to-one & rng p = {x,y} & x <> y implies p = <* x,y *> or p = <* y,x *> proof assume that A1: p is one-to-one and A2: rng p = {x,y} and A3: x <> y; A4: len p = 2 by A1,A2,A3,Th98; then A5: dom p = {1,2} by FINSEQ_1:2,def 3; then A6: 2 in dom p by TARSKI:def 2; then A7: p.2 in rng p by FUNCT_1:def 3; A8: 1 in dom p by A5,TARSKI:def 2; then p.1 in rng p by FUNCT_1:def 3; then p.1 = x & p.2 = x or p.1 = x & p.2 = y or p.1 = y & p.2 = x or p.1 = y & p.2 = y by A2,A7,TARSKI:def 2; hence thesis by A1,A4,A8,A6,FINSEQ_1:44,FUNCT_1:def 4; end; theorem Th100: p is one-to-one & rng p = {x,y,z} & <* x,y,z *> is one-to-one implies len p = 3 proof A1: len <* x,y,z *> = 3 by FINSEQ_1:45; rng <* x,y,z *> = {x,y,z} by FINSEQ_2:128; hence thesis by A1,FINSEQ_1:48; end; theorem p is one-to-one & rng p = {x,y,z} & x <> y & y <> z & x <> z implies len p = 3 proof assume that A1: p is one-to-one and A2: rng p = {x,y,z} and A3: x <> y and A4: y <> z and A5: x <> z; <* x,y,z *> is one-to-one by A3,A4,A5,Th95; hence thesis by A1,A2,Th100; end; begin theorem for D being non empty set, df being FinSequence of D holds df is non empty implies ex d being Element of D, df1 being FinSequence of D st d = df.1 & df = <*d*>^df1 proof let D be non empty set, df be FinSequence of D; deffunc F(Nat) = df.($1+1); assume A1: df is non empty; then reconsider lend1 = len df - 1 as Element of NAT by INT_1:5,NAT_1:14; 1 <= len df by A1,NAT_1:14; then 1 in dom df by Th25; then reconsider d = df.1 as Element of D by FINSEQ_2:11; take d; consider dta being FinSequence such that A2: len dta = lend1 and A3: for j being Nat st j in dom dta holds dta.j=F(j) from FINSEQ_1:sch 2; now let j be Nat; assume A4: j in dom dta; then j in Seg len dta by FINSEQ_1:def 3; then j + 1 in Seg (len dta + 1) by FINSEQ_1:60; then j+1 in dom df by A2,FINSEQ_1:def 3; then df.(j+1) in D by FINSEQ_2:11; hence dta.j in D by A3,A4; end; then reconsider dta as FinSequence of D by FINSEQ_2:12; take dta; thus d = df.1; now thus A5: len (<*d*>^dta) = len <*d*> + len dta by FINSEQ_1:22 .= 1 + (len df - 1) by A2,FINSEQ_1:40 .= len df; let i be Nat; A6: dom df = Seg len df by FINSEQ_1:def 3; assume A7: i in dom df; then A8: 1 <= i by A6,FINSEQ_1:1; A9: i <= len df by A6,A7,FINSEQ_1:1; per cases by A8,XXREAL_0:1; suppose i = 1; hence df.i = (<*d*>^dta).i by FINSEQ_1:41; end; suppose A10: i > 1; then consider j being Element of NAT such that A11: j = i-1 and A12: 1 <= j by INT_1:51; i - 1 <= lend1 by A9,XREAL_1:9; then A13: j in dom dta by A2,A11,A12,Th25; len <*d*> = 1 by FINSEQ_1:40; then (<*d*>^dta).i = dta.j by A5,A9,A10,A11,FINSEQ_1:24 .= df.(j+1) by A3,A13 .= df.i by A11; hence df.i = (<*d*>^dta).i; end; end; hence thesis by FINSEQ_2:9; end; theorem for df being FinSequence, d being set holds i in dom df implies (<*d*> ^df).(i+1) = df.i proof let df be FinSequence, d be set; A1: len (<*d*>^df) = len <*d*> + len df by FINSEQ_1:22 .= 1 + len df by FINSEQ_1:40; assume A2: i in dom df; then i in Seg len df by FINSEQ_1:def 3; then i+1 in Seg len (<*d*>^df) by A1,FINSEQ_1:60; then i+1 in dom (<*d*>^df) by FINSEQ_1:def 3; then A3: i+1 <= len (<*d*>^df) by Th25; A4: len <*d*> = 1 by FINSEQ_1:40; 1 <= i by A2,Th25; then 1 < i+1 by NAT_1:13; hence (<*d*>^df).(i+1) = df.(i + 1 - len <*d*>) by A4,A3,FINSEQ_1:24 .= df.i by A4; end; definition let i; let p be FinSequence; func Del(p,i) -> FinSequence equals p * Sgm ((dom p) \ {i}); coherence proof set q = Sgm((dom p) \ {i}); A1: (Seg len p) \ {i} c= Seg len p by XBOOLE_1:36; dom p = Seg len p by FINSEQ_1:def 3; then rng q c= dom p by A1,FINSEQ_1:def 13; then A2: dom (p*q) = dom q by RELAT_1:27; dom q = Seg len q by FINSEQ_1:def 3; hence thesis by A2,FINSEQ_1:def 2; end; end; theorem Th104: for p being FinSequence holds (i in dom p implies ex m being Nat st len p = m + 1 & len Del(p,i) = m) & (not i in dom p implies Del(p,i) = p) proof let p be FinSequence; hereby not i in (Seg(len p) \ {i}) proof assume i in (Seg(len p) \ {i}); then not i in {i} by XBOOLE_0:def 5; hence thesis by TARSKI:def 1; end; then A1: card ((Seg(len p) \ {i}) \/ {i})=card (Seg(len p) \ {i}) +1 by CARD_2:41; assume A2: i in dom p; then reconsider D9 = dom p as non empty set; reconsider D = rng p as non empty set by A2,FUNCT_1:3; reconsider r = p as Function of D9,D by FUNCT_2:1; A3: dom p = Seg len p by FINSEQ_1:def 3; for x holds x in (Seg(len p) \ {i}) implies x in Seg(len p) by XBOOLE_0:def 5; then A4: (Seg(len p) \ {i}) c= Seg len p by TARSKI:def 3; then rng Sgm(Seg(len p) \ {i}) c= Seg len p by FINSEQ_1:def 13; then reconsider q = Sgm((dom p) \ {i}) as FinSequence of D9 by A3, FINSEQ_1:def 4; p <> {} by A2; then consider m being Nat such that A5: len p = m+1 by NAT_1:6; take m; A6: len(r*q) = len q by FINSEQ_2:33; i in Seg len p by A2,FINSEQ_1:def 3; then for x holds x in {i} implies x in Seg(len p) by TARSKI:def 1; then {i} c= Seg len p by TARSKI:def 3; then card Seg(len p)=card (Seg(len p) \ {i}) +1 by A1,XBOOLE_1:45; then card (Seg(len p) \ {i}) +1 = m+1 by A5,FINSEQ_1:57; then len (Sgm(Seg(len p) \ {i}))=m by A4,Th39; hence len p=m + 1 & len Del(p,i) = m by A5,A6,FINSEQ_1:def 3; end; assume not i in dom p; then for x st x in {i} holds not x in dom p by TARSKI:def 1; then {i} misses dom p by XBOOLE_0:3; hence Del(p,i) = p * Sgm(dom p) by XBOOLE_1:83 .= p * Sgm(Seg len p) by FINSEQ_1:def 3 .= p * (idseq len p) by Th48 .= p|(Seg len p) by RELAT_1:65 .= p|(dom p) by FINSEQ_1:def 3 .= p; end; theorem for D being non empty set for p being FinSequence of D holds Del(p,i) is FinSequence of D proof let D be non empty set, p be FinSequence of D; per cases; suppose i in dom p; then reconsider D9=Seg(len p) as non empty set by FINSEQ_1:def 3; for x holds x in (Seg(len p) \ {i}) implies x in Seg(len p) by XBOOLE_0:def 5; then Seg(len p) \ {i} c= Seg(len p) by TARSKI:def 3; then rng Sgm(Seg(len p) \ {i}) c= Seg(len p) by FINSEQ_1:def 13; then reconsider q=Sgm(Seg(len p) \ {i}) as FinSequence of D9 by FINSEQ_1:def 4; p * q = Del(p,i) by FINSEQ_1:def 3; hence thesis by FINSEQ_2:31; end; suppose not i in dom p; hence thesis by Th104; end; end; theorem for p be FinSequence holds rng Del(p,i) c= rng p proof let p be FinSequence; let x; assume x in rng Del(p,i); hence thesis by FUNCT_1:14; end; theorem Th107: n = m + 1 & i in Seg n implies len Sgm(Seg n \ {i}) = m proof assume that A1: n = m + 1 and A2: i in Seg n; set X = Seg n \ {i}; i in {i} by TARSKI:def 1; then not i in X by XBOOLE_0:def 5; then card X + 1 = card (X \/ {i}) by CARD_2:41 .= card ((Seg n) \/ {i}) by XBOOLE_1:39 .= card (Seg n) by A2,ZFMISC_1:40 .= m + 1 by A1,FINSEQ_1:57; hence thesis by Th39,XBOOLE_1:36; end; reserve J for Element of NAT; theorem Th108: for i,k,m,n being Nat st n=m+1 & k in Seg n & i in Seg m holds (1<=i & ii by TARSKI:def 1; then Jg; set A = {l where l is Element of NAT : 1<=l & l<=g & l<>i}; A28: X = A proof thus X c= A proof let x; A29: Seg g= {J: 1<=J & J<=g } by FINSEQ_1:def 1; assume A30: x in X; then x in Seg g by XBOOLE_0:def 5; then consider m being Element of NAT such that A31: x=m and A32: 1<=m and A33: m<=g by A29; not x in {i} by A30,XBOOLE_0:def 5; then m<>i by A31,TARSKI:def 1; hence thesis by A31,A32,A33; end; let x; assume x in A; then consider m being Element of NAT such that A34: x=m and A35: 1<=m and A36: m<=g and A37: m<>i; A38: not m in {i} by A37,TARSKI:def 1; m in Seg g by A35,A36,FINSEQ_1:1; hence thesis by A34,A38,XBOOLE_0:def 5; end; 1<=k+1 by A11,A15,XXREAL_0:2; then k+1 in dom Sgm(X) by A10,Th25; then Sgm(X).(k+1) in X by A14,FUNCT_1:def 3; then A39: ex J st Sgm(X).(k+1) = J & 1<=J & J<=g & J<>i by A28; A40: g in NAT by ORDINAL1:def 12; 1<=g by A9,A12,XXREAL_0:2; then g in rng Sgm(X) by A14,A27,A28,A40; then consider x be Nat such that A41: x in dom Sgm(X) and A42: Sgm(X).x=g by FINSEQ_2:10; 1<=x by A41,Th25; then A43: k+1<=x by A13,A10,A39,A42,FINSEQ_1:def 13; A44: ii by A28; now per cases by A56,XXREAL_0:1; suppose J=g; then x in {g} by A54,TARSKI:def 1; hence thesis by XBOOLE_0:def 3; end; suppose Ji by A62,TARSKI:def 1; k+1<=g by A6,NAT_1:11; then s<=g by A64,XXREAL_0:2; hence thesis by A28,A62,A63,A65; end; suppose x in {g}; then A66: x=g by TARSKI:def 1; 1<=g by A9,A12,XXREAL_0:2; hence thesis by A27,A28,A66,A40; end; end; hence thesis; end; then {g} c= X by XBOOLE_1:7; then A67: {g} c= Seg g by A13,XBOOLE_1:1; Y c=X by A53,XBOOLE_1:7; then Y c= Seg g by A13,XBOOLE_1:1; then A68: Sgm(X) = Sgm(Y)^Sgm({g}) by A53,A49,A67,Th42; n<=k by A48,NAT_1:13; then A69: n in Seg k by A11,FINSEQ_1:1; A70: i in Seg(k+1) by A9,A45,FINSEQ_1:1; then len Sgm(Y) = k by Th107; then A71: n in dom Sgm(Y) by A69,FINSEQ_1:def 3; n<=k by A48,NAT_1:13; then A72: n in Seg k by A11,FINSEQ_1:1; then A73: 1<=n & n {}; consider m being Nat such that A4: len f = m+1 by A3,NAT_1:6; now per cases; suppose A5: 1 <= k; set X = dom f \ {n}; A6: dom Sgm(X)=Seg len Sgm(X) by FINSEQ_1:def 3; A7: dom f=Seg len f by FINSEQ_1:def 3; then A8: len Sgm X = m by A4,A2,Th107; X c= Seg len f by A7,XBOOLE_1:36; then rng Sgm(X) = X by FINSEQ_1:def 13; then A9: dom (f*Sgm X) = dom Sgm X by RELAT_1:27,XBOOLE_1:36; n<=m+1 by A4,A2,Th25; then k 0 & A = {} iff i-tuples_on A = {} proof let A be set, i be Nat; hereby assume i <> 0; then A1: 0+1 <= i by NAT_1:13; assume that A2: A = {} and A3: i-tuples_on A <> {}; reconsider B = i-tuples_on A as non empty FinSequenceSet of A by A3; set p = the Element of B; B = {s where s is Element of A*: len s = i} & p in B; then ex s being Element of A* st p = s & len s = i; then 1 in dom p by A1,Th25; then A4: rng p <> {} by RELAT_1:42; thus contradiction by A2,A4; end; assume that A5: i-tuples_on A = {} and A6: i = 0 or A <> {}; len (<*>A) = 0; then reconsider A as non empty set by A5,A6,FINSEQ_2:133; i-tuples_on A is non empty; hence contradiction by A5; end; registration let i be Nat, D be set; cluster i-tuples_on D -> with_common_domain; coherence proof set S = i-tuples_on D; let f, g be Function such that A1: f in S and A2: g in S; A3: ex s being Element of D* st f = s & len s = i by A1; ex s being Element of D* st g = s & len s = i by A2; hence thesis by A3,Th29; end; end; registration let i be Nat, D be set; cluster i-tuples_on D -> product-like; coherence proof set S = i-tuples_on D; per cases; suppose D = {} & i = 0; then S = { <*>D } by FINSEQ_2:94 .= {{}}; hence thesis by CARD_3:10; end; suppose D = {} & i <> 0; then A1: S = {} by Th119; take f = 0 .--> {}; rng f = {{}} by FUNCOP_1:8; then {} in rng f by TARSKI:def 1; hence thesis by A1,CARD_3:26; end; suppose D <> {}; then reconsider D as non empty set; set S = i-tuples_on D; take product" S; S = product product" S proof thus S c= product product" S by CARD_3:77; let x be set; assume x in product product" S; then consider g being Function such that A2: x = g and A3: dom g = dom product" S and A4: for z being set st z in dom product" S holds g.z in (product" S).z by CARD_3:def 5; set s = the Element of S; s in S; then consider t being Element of D* such that A5: s = t and A6: len t = i; A7: dom g = DOM S by A3,CARD_3:def 12 .= dom s by CARD_3:108; dom s = Seg len t by A5,FINSEQ_1:def 3; then A8: g is FinSequence by A7,FINSEQ_1:def 2; rng g c= D proof let y be set; assume y in rng g; then consider a being set such that A9: a in dom g and A10: g.a = y by FUNCT_1:def 3; g.a in (product" S).a by A3,A4,A9; then g.a in pi(S,a) by A3,A9,CARD_3:def 12; then consider f being Function such that A11: f in S and A12: g.a = f.a by CARD_3:def 6; consider w being Element of D* such that A13: f = w and len w = i by A11; dom g = dom w by A7,A11,A13,CARD_3:def 10; then A14: w.a in rng w by A9,FUNCT_1:def 3; thus thesis by A10,A12,A13,A14; end; then reconsider g as FinSequence of D by A8,FINSEQ_1:def 4; A15: g in D* by FINSEQ_1:def 11; len g = i by A5,A6,A7,Th29; hence thesis by A2,A15; end; hence thesis; end; end; end; begin reserve n for Element of NAT; theorem for D1,D2 be non empty set, p be FinSequence of D1, f be Function of D1,D2 holds dom(f*p) = dom p & len (f*p) = len p & for n being Nat st n in dom (f*p) holds (f*p).n = f.(p.n) proof let D1,D2 be non empty set, p be FinSequence of D1, f be Function of D1,D2; A1: rng p c= D1 & dom f = D1 by FUNCT_2:def 1; hence dom(f*p) = dom p by RELAT_1:27; dom(f*p) = dom p by A1,RELAT_1:27; hence len(f*p) = len p by Th29; let n be Nat; assume n in dom (f*p); hence thesis by FUNCT_1:12; end; definition let D be non empty set, R be Relation of D; func ExtendRel(R) -> Relation of D* means :Def3: for x,y be FinSequence of D holds [x,y] in it iff len x = len y & for n st n in dom x holds [x.n,y.n] in R; existence proof defpred P[set,set] means for a,b be FinSequence of D st a = $1 & b = $2 holds len a = len b & for n st n in dom a holds [a.n,b.n] in R; consider P be Relation of D*,D* such that A1: for x,y be set holds [x,y] in P iff x in D* & y in D* & P[x,y] from RELSET_1:sch 1; take P; let a,b be FinSequence of D; thus [a,b] in P implies len a = len b & for n st n in dom a holds [a.n,b.n ] in R by A1; assume len a = len b & for n st n in dom a holds [a.n,b.n] in R; then A2: P[a,b]; a in D* & b in D* by FINSEQ_1:def 11; hence thesis by A1,A2; end; uniqueness proof let P,Q be Relation of D*; assume that A3: for x,y be FinSequence of D holds [x,y] in P iff len x = len y & for n st n in dom x holds [x.n,y.n] in R and A4: for x,y be FinSequence of D holds [x,y] in Q iff len x = len y & for n st n in dom x holds [x.n,y.n] in R; for a,b be set holds [a,b] in P iff [a,b] in Q proof let a,b be set; thus [a,b] in P implies [a,b] in Q proof assume A5: [a,b] in P; then reconsider a1 = a, b1 = b as Element of D* by ZFMISC_1:87; len a1 = len b1 & for n st n in dom a1 holds [a1.n,b1.n] in R by A3,A5; hence thesis by A4; end; assume A6: [a,b] in Q; then reconsider a1 = a, b1 = b as Element of D* by ZFMISC_1:87; len a1 = len b1 & for n st n in dom a1 holds [a1.n,b1.n] in R by A4,A6; hence thesis by A3; end; hence thesis by RELAT_1:def 2; end; end; theorem for D be non empty set holds ExtendRel(id D) = id (D*) proof let D be non empty set; set P = ExtendRel(id D), Q = id(D*); for a,b be set holds [a,b] in P iff [a,b] in Q proof let a,b be set; thus [a,b] in P implies [a,b] in Q proof assume A1: [a,b] in P; then reconsider a1 = a, b1 = b as Element of D* by ZFMISC_1:87; A2: now let n be Nat; assume n in dom a1; then [a1.n,b1.n] in id D by A1,Def3; hence a1.n = b1.n by RELAT_1:def 10; end; len a1 = len b1 by A1,Def3; then a1 = b1 by A2,FINSEQ_2:9; hence thesis by RELAT_1:def 10; end; assume A3: [a,b] in Q; then reconsider a1 = a, b1 = b as Element of D* by ZFMISC_1:87; A4: a1 = b1 by A3,RELAT_1:def 10; A5: for n st n in dom a1 holds [a1.n,b1.n] in id D proof let n; assume n in dom a1; then a1.n in D by FINSEQ_2:11; hence thesis by A4,RELAT_1:def 10; end; len a1 = len b1 by A3,RELAT_1:def 10; hence thesis by A5,Def3; end; hence thesis by RELAT_1:def 2; end; definition let D be non empty set, R be Equivalence_Relation of D; let y be FinSequence of Class(R), x be FinSequence of D; pred x is_representatives_FS y means len x = len y & for n st n in dom x holds Class(R,x.n) = y.n; end; theorem for D be non empty set, R be Equivalence_Relation of D, y be FinSequence of Class(R) ex x be FinSequence of D st x is_representatives_FS y proof let D be non empty set, R be Equivalence_Relation of D, y be FinSequence of Class(R); defpred P[set,set] means for u be Element of D st $2 = u holds Class(R,u) = y.$1; A1: for e be set st e in dom y ex u be set st u in D & P[e,u] proof let e be set; assume e in dom y; then y.e in rng y by FUNCT_1:def 3; then consider a be Element of D such that A2: y.e = Class(R,a) by EQREL_1:36; reconsider b = a as set; take b; thus b in D; let u be Element of D; assume b = u; hence thesis by A2; end; consider f being Function such that A3: dom f = dom y & rng f c= D & for e be set st e in dom y holds P[e,f. e] from FUNCT_1:sch 5(A1); dom f = Seg len y by A3,FINSEQ_1:def 3; then reconsider f as FinSequence by FINSEQ_1:def 2; reconsider f as FinSequence of D by A3,FINSEQ_1:def 4; take f; thus len f = len y by A3,Th29; let n; assume A4: n in dom f; then f.n in rng f by FUNCT_1:def 3; then reconsider u = f.n as Element of D; Class(R,u) = y.n by A3,A4; hence thesis; end; reserve x,y,y1,y2,z,a,b,X,Y,Z,V1,V2 for set, f,g,h,h9,f1,f2 for Function, i for Nat, P for Permutation of X, D,D1,D2,D3 for non empty set, d1 for Element of D1, d2 for Element of D2, d3 for Element of D3; theorem Th123: x in product <*X*> iff ex y st y in X & x = <*y*> proof A1: dom <*X*> = Seg 1 by FINSEQ_1:def 8; A2: <*X*>.1 = X by FINSEQ_1:def 8; A3: 1 in Seg 1 by FINSEQ_1:2,TARSKI:def 1; thus x in product <*X*> implies ex y st y in X & x = <*y*> proof assume x in product <*X*>; then consider f such that A4: x = f and A5: dom f = dom <*X*> and A6: for x st x in dom <*X*> holds f.x in <*X*>.x by CARD_3:def 5; reconsider f as FinSequence by A1,A5,FINSEQ_1:def 2; take f.1; thus thesis by A1,A3,A2,A4,A5,A6,FINSEQ_1:def 8; end; given y such that A7: y in X and A8: x = <*y*>; A9: now let a; assume a in Seg 1; then a = 1 by FINSEQ_1:2,TARSKI:def 1; hence <*y*>.a in <*X*>.a by A2,A7,FINSEQ_1:def 8; end; dom <*y*> = Seg 1 by FINSEQ_1:def 8; hence thesis by A1,A8,A9,CARD_3:def 5; end; theorem Th124: z in product <*X,Y*> iff ex x,y st x in X & y in Y & z = <*x,y*> proof A1: <*X,Y*>.1 = X & <*X,Y*>.2 = Y by FINSEQ_1:44; len <*X,Y*> = 2 by FINSEQ_1:44; then A2: dom <*X,Y*> = Seg 2 by FINSEQ_1:def 3; A3: 1 in Seg 2 & 2 in Seg 2 by FINSEQ_1:2,TARSKI:def 2; thus z in product <*X,Y*> implies ex x,y st x in X & y in Y & z = <*x,y*> proof assume z in product <*X,Y*>; then consider f such that A4: z = f and A5: dom f = dom <*X,Y*> and A6: for x st x in dom <*X,Y*> holds f.x in <*X,Y*>.x by CARD_3:def 5; reconsider f as FinSequence by A2,A5,FINSEQ_1:def 2; take f.1, f.2; len f = 2 by A2,A5,FINSEQ_1:def 3; hence thesis by A2,A3,A1,A4,A6,FINSEQ_1:44; end; given x,y such that A7: x in X & y in Y and A8: z = <*x,y*>; A9: now let a; assume a in Seg 2; then a = 1 or a = 2 by FINSEQ_1:2,TARSKI:def 2; hence <*x,y*>.a in <*X,Y*>.a by A1,A7,FINSEQ_1:44; end; len <*x,y*> = 2 by FINSEQ_1:44; then dom <*x,y*> = Seg 2 by FINSEQ_1:def 3; hence thesis by A2,A8,A9,CARD_3:def 5; end; theorem Th125: a in product <*X,Y,Z*> iff ex x,y,z st x in X & y in Y & z in Z & a = <*x,y,z*> proof A1: 3 in Seg 3 by Th1,ENUMSET1:def 1; A2: <*X,Y,Z*>.1 = X & <*X,Y,Z*>.2 = Y by FINSEQ_1:45; A3: <*X,Y,Z*>.3 = Z by FINSEQ_1:45; len <*X,Y,Z*> = 3 by FINSEQ_1:45; then A4: dom <*X,Y,Z*> = Seg 3 by FINSEQ_1:def 3; A5: 1 in Seg 3 & 2 in Seg 3 by Th1,ENUMSET1:def 1; thus a in product <*X,Y,Z*> implies ex x,y,z st x in X & y in Y & z in Z & a = <*x,y,z*> proof assume a in product <*X,Y,Z*>; then consider f such that A6: a = f and A7: dom f = dom <*X,Y,Z*> and A8: for x st x in dom <*X,Y,Z*> holds f.x in <*X,Y,Z*>.x by CARD_3:def 5; reconsider f as FinSequence by A4,A7,FINSEQ_1:def 2; take f.1, f.2, f.3; len f = 3 by A4,A7,FINSEQ_1:def 3; hence thesis by A4,A5,A1,A2,A3,A6,A8,FINSEQ_1:45; end; given x,y,z such that A9: x in X & y in Y & z in Z and A10: a = <*x,y,z*>; A11: now let a; assume a in Seg 3; then a = 1 or a = 2 or a = 3 by Th1,ENUMSET1:def 1; hence <*x,y,z*>.a in <*X,Y,Z*>.a by A2,A3,A9,FINSEQ_1:45; end; len <*x,y,z*> = 3 by FINSEQ_1:45; then dom <*x,y,z*> = Seg 3 by FINSEQ_1:def 3; hence thesis by A4,A10,A11,CARD_3:def 5; end; theorem product <*D*> = 1-tuples_on D proof <*D*> = 1 |-> D by FINSEQ_2:59 .= Seg 1 --> D; then product <*D*> = Funcs(Seg 1,D) by CARD_3:11; hence thesis by FINSEQ_2:93; end; theorem Th127: product <*D1,D2*> = { <*d1,d2*>: not contradiction } proof thus product <*D1,D2*> c= { <*d1,d2*>: not contradiction } proof let a; assume a in product <*D1,D2*>; then ex x,y st x in D1 & y in D2 & a = <*x,y*> by Th124; hence thesis; end; let a; assume a in { <*d1,d2*>: not contradiction }; then ex d1,d2 st a = <*d1,d2*>; hence thesis by Th124; end; theorem product <*D,D*> = 2-tuples_on D proof thus product <*D,D*> = {<*d1,d2*> where d1 is Element of D, d2 is Element of D: not contradiction} by Th127 .= 2-tuples_on D by FINSEQ_2:99; end; theorem Th129: product <*D1,D2,D3*> = { <*d1,d2,d3*>: not contradiction } proof thus product <*D1,D2,D3*> c= { <*d1,d2,d3*>: not contradiction } proof let a; assume a in product <*D1,D2,D3*>; then ex x,y,z st x in D1 & y in D2 & z in D3 & a = <*x,y,z*> by Th125; hence thesis; end; let a; assume a in { <*d1,d2,d3*>: not contradiction }; then ex d1,d2,d3 st a = <*d1,d2,d3*>; hence thesis by Th125; end; theorem product <*D,D,D*> = 3-tuples_on D proof thus product <*D,D,D*> = {<*d1,d2,d3*> where d1 is Element of D, d2 is Element of D, d3 is Element of D: not contradiction} by Th129 .= 3-tuples_on D by FINSEQ_2:102; end; theorem Th131: for D being set holds product (i |-> D) = i-tuples_on D proof let D be set; thus product (i |-> D) = product (Seg i --> D) .= Funcs(Seg i,D) by CARD_3:11 .= i-tuples_on D by FINSEQ_2:93; end; theorem Th132: doms <*f*> = <*dom f*> & rngs <*f*> = <*rng f*> proof A1: rng <*f*> = {f} & <*f*>"rng <*f*> = dom <*f*> by FINSEQ_1:38,RELAT_1:134; A2: dom doms <*f*> = <*f*>"SubFuncs rng <*f*> & dom <*dom f*> = Seg 1 by FINSEQ_1:38,FUNCT_6:def 2; A3: <*f*>.1 = f by FINSEQ_1:40; A4: dom <*f*> = Seg 1 & SubFuncs {f} = {f} by FINSEQ_1:38,FUNCT_6:20; A5: <*rng f*>.1 = rng f by FINSEQ_1:40; A6: now let x; assume A7: x in {1}; then x = 1 by TARSKI:def 1; hence (rngs <*f*>).x = <*rng f*>.x by A1,A3,A5,A4,A7,FINSEQ_1:2,FUNCT_6:def 3; end; A8: <*dom f*>.1 = dom f by FINSEQ_1:40; now let x; assume A9: x in {1}; then x = 1 by TARSKI:def 1; hence (doms <*f*>).x = <*dom f*>.x by A1,A3,A8,A4,A9,FINSEQ_1:2,FUNCT_6:def 2; end; hence doms <*f*> = <*dom f*> by A1,A2,A4,FINSEQ_1:2,FUNCT_1:2; dom rngs <*f*> = <*f*>"SubFuncs rng <*f*> & dom <*rng f*> = Seg 1 by FINSEQ_1:38,FUNCT_6:def 3; hence thesis by A1,A4,A6,FINSEQ_1:2,FUNCT_1:2; end; theorem Th133: doms <*f,g*> = <*dom f, dom g*> & rngs <*f,g*> = <*rng f, rng g *> proof A1: rng <*f,g*> = {f,g} & <*f,g*>"rng <*f,g*> = dom <*f,g*> by FINSEQ_2:127 ,RELAT_1:134; A2: dom doms <*f,g*> = <*f,g*>"SubFuncs rng <*f,g*> & dom <*dom f, dom g*> = Seg 2 by FINSEQ_1:89,FUNCT_6:def 2; A3: <*f,g*>.1 = f & <*f,g*>.2 = g by FINSEQ_1:44; A4: dom <*f,g*> = Seg 2 & SubFuncs {f,g} = {f,g} by FINSEQ_1:89,FUNCT_6:20; A5: <*rng f, rng g*>.1 = rng f & <*rng f, rng g*>.2 = rng g by FINSEQ_1:44; A6: now let x; assume A7: x in {1,2}; then x = 1 or x = 2 by TARSKI:def 2; hence (rngs <*f,g*>).x = <*rng f, rng g*>.x by A1,A3,A5,A4,A7,FINSEQ_1:2,FUNCT_6:def 3; end; A8: <*dom f, dom g*>.1 = dom f & <*dom f, dom g*>.2 = dom g by FINSEQ_1:44; now let x; assume A9: x in {1,2}; then x = 1 or x = 2 by TARSKI:def 2; hence (doms <*f,g*>).x = <*dom f, dom g*>.x by A1,A3,A8,A4,A9,FINSEQ_1:2,FUNCT_6:def 2; end; hence doms <*f,g*> = <*dom f, dom g*> by A1,A2,A4,FINSEQ_1:2,FUNCT_1:2; dom rngs <*f,g*> = <*f,g*>"SubFuncs rng <*f,g*> & dom <*rng f, rng g*> = Seg 2 by FINSEQ_1:89,FUNCT_6:def 3; hence thesis by A1,A4,A6,FINSEQ_1:2,FUNCT_1:2; end; theorem doms <*f,g,h*> = <*dom f, dom g, dom h*> & rngs <*f,g,h*> = <*rng f, rng g, rng h*> proof A1: rng <*f,g,h*> = {f,g,h} & <*f,g,h*>"rng <*f,g,h*> = dom <*f,g,h*> by FINSEQ_2:128,RELAT_1:134; A2: <*rng f, rng g, rng h*>.3 = rng h by FINSEQ_1:45; A3: <*f,g,h*>.1 = f & <*f,g,h*>.2 = g by FINSEQ_1:45; A4: <*f,g,h*>.3 = h by FINSEQ_1:45; A5: dom <*f,g,h*> = Seg 3 & SubFuncs {f,g,h} = {f,g,h} by FINSEQ_1:89,FUNCT_6:20; A6: <*rng f, rng g, rng h*>.1 = rng f & <*rng f, rng g, rng h*>.2 = rng g by FINSEQ_1:45; A7: now let x; assume A8: x in {1,2,3}; then x = 1 or x = 2 or x = 3 by ENUMSET1:def 1; hence (rngs <*f,g,h*>).x = <*rng f, rng g, rng h*>.x by A1,A3,A4,A6,A2,A5 ,A8,Th1,FUNCT_6:def 3; end; A9: dom doms <*f,g,h*> = <*f,g,h*>"SubFuncs rng <*f,g,h*> & dom <*dom f, dom g, dom h*> = Seg 3 by FINSEQ_1:89,FUNCT_6:def 2; A10: <*dom f, dom g, dom h*>.3 = dom h by FINSEQ_1:45; A11: <*dom f, dom g, dom h*>.1 = dom f & <*dom f, dom g, dom h*>.2 = dom g by FINSEQ_1:45; now let x; assume A12: x in {1,2,3}; then x = 1 or x = 2 or x = 3 by ENUMSET1:def 1; hence (doms <*f,g,h*>).x = <*dom f, dom g, dom h*>.x by A1,A3,A4,A11,A10,A5 ,A12,Th1,FUNCT_6:def 2; end; hence doms <*f,g,h*> = <*dom f, dom g, dom h*> by A1,A9,A5,Th1,FUNCT_1:2; dom rngs <*f,g,h*> = <*f,g,h*>"SubFuncs rng <*f,g,h*> & dom <*rng f, rng g, rng h*> = Seg 3 by FINSEQ_1:89,FUNCT_6:def 3; hence thesis by A1,A5,A7,Th1,FUNCT_1:2; end; theorem Th135: Union <*X*> = X & meet <*X*> = X proof thus Union <*X*> = union rng <*X*> .= union {X} by FINSEQ_1:38 .= X by ZFMISC_1:25; thus meet <*X*> = meet {X} by FINSEQ_1:38 .= X by SETFAM_1:10; end; theorem Th136: Union <*X,Y*> = X \/ Y & meet <*X,Y*> = X /\ Y proof thus Union <*X,Y*> = union rng <*X,Y*> .= union {X,Y} by FINSEQ_2:127 .= X \/ Y by ZFMISC_1:75; thus meet <*X,Y*> = meet {X,Y} by FINSEQ_2:127 .= X /\ Y by SETFAM_1:11; end; theorem Union <*X,Y,Z*> = X \/ Y \/ Z & meet <*X,Y,Z*> = X /\ Y /\ Z proof A1: union ({X,Y} \/ {Z}) = union {X,Y} \/ union {Z} & union {X,Y} = X \/ Y by ZFMISC_1:75,78; A2: union {Z} = Z by ZFMISC_1:25; A3: {X,Y} \/ {Z} = {X,Y,Z} by ENUMSET1:3; thus Union <*X,Y,Z*> = union rng <*X,Y,Z*> .= X \/ Y \/ Z by A1,A2,A3,FINSEQ_2:128; A4: meet {Z} = Z by SETFAM_1:10; meet ({X,Y} \/ {Z}) = meet {X,Y} /\ meet {Z} & meet {X,Y} = X /\ Y by SETFAM_1:9,11; hence thesis by A4,A3,FINSEQ_2:128; end; theorem x in dom f implies <*f*>..(1,x) = f.x & <*f,g*>..(1,x) = f.x & <*f,g,h *>..(1,x) = f.x proof A1: <*f,g,h*>.1 = f & 1 in Seg 1 by FINSEQ_1:2,45,TARSKI:def 1; A2: dom <*f*> = Seg 1 & dom <*f,g*> = Seg 2 by FINSEQ_1:89; A3: 1 in Seg 2 & 1 in Seg 3 by Th1,ENUMSET1:def 1,FINSEQ_1:2,TARSKI:def 2; A4: dom <*f,g,h*> = Seg 3 by FINSEQ_1:89; <*f*>.1 = f & <*f,g*>.1 = f by FINSEQ_1:44,def 8; hence thesis by A1,A3,A2,A4,FUNCT_5:38; end; theorem x in dom g implies <*f,g*>..(2,x) = g.x & <*f,g,h*>..(2,x) = g.x proof A1: 2 in Seg 2 & 2 in Seg 3 by Th1,ENUMSET1:def 1,FINSEQ_1:2,TARSKI:def 2; A2: dom <*f,g*> = Seg 2 & dom <*f,g,h*> = Seg 3 by FINSEQ_1:89; <*f,g*>.2 = g & <*f,g,h*>.2 = g by FINSEQ_1:44,45; hence thesis by A1,A2,FUNCT_5:38; end; theorem x in dom h implies <*f,g,h*>..(3,x) = h.x proof A1: dom <*f,g,h*> = Seg 3 by FINSEQ_1:89; <*f,g,h*>.3 = h & 3 in Seg 3 by Th1,ENUMSET1:def 1,FINSEQ_1:45; hence thesis by A1,FUNCT_5:38; end; theorem dom <:<*h*>:> = dom h & for x st x in dom h holds <:<*h*>:>.x = <*h.x *> proof A1: 1 in Seg 1 by FINSEQ_1:2,TARSKI:def 1; A2: rng <:<*h*>:> c= product rngs <*h*> & rngs <*h*> = <*rng h*> by Th132,FUNCT_6:29; thus A3: dom <:<*h*>:> = meet doms <*h*> by FUNCT_6:29 .= meet <*dom h*> by Th132 .= dom h by Th135; let x; assume A4: x in dom h; then <:<*h*>:>.x in rng <:<*h*>:> by A3,FUNCT_1:def 3; then consider g such that A5: <:<*h*>:>.x = g and A6: dom g = dom <*rng h*> and for y st y in dom <*rng h*> holds g.y in <*rng h*>.y by A2,CARD_3:def 5; A7: dom g = Seg 1 by A6,FINSEQ_1:38; dom <*h*> = Seg 1 & <*h*>.1 = h by FINSEQ_1:38,40; then A8: (uncurry <*h*>).(1,x) = h.x by A4,A1,FUNCT_5:38; reconsider g as FinSequence by A7,FINSEQ_1:def 2; A9: len g = 1 by A7,FINSEQ_1:def 3; g.1 = (uncurry <*h*>).(1,x) by A3,A4,A5,A7,A1,FUNCT_6:31; hence thesis by A5,A8,A9,FINSEQ_1:40; end; theorem Th142: dom <:<*f1,f2*>:> = dom f1 /\ dom f2 & for x st x in dom f1 /\ dom f2 holds <:<*f1,f2*>:>.x = <*f1.x,f2.x*> proof A1: dom <*f1,f2*> = Seg 2 by FINSEQ_1:89; A2: rng <:<*f1,f2*>:> c= product rngs <*f1,f2*> & rngs <*f1,f2*> = <*rng f1, rng f2*> by Th133,FUNCT_6:29; thus A3: dom <:<*f1,f2*>:> = meet doms <*f1,f2*> by FUNCT_6:29 .= meet <*dom f1, dom f2*> by Th133 .= dom f1 /\ dom f2 by Th136; let x; assume A4: x in dom f1 /\ dom f2; then <:<*f1,f2*>:>.x in rng <:<*f1,f2*>:> by A3,FUNCT_1:def 3; then consider g such that A5: <:<*f1,f2*>:>.x = g and A6: dom g = dom <*rng f1, rng f2*> and for y st y in dom <*rng f1, rng f2*> holds g.y in <*rng f1, rng f2*> .y by A2,CARD_3:def 5; A7: dom g = Seg 2 by A6,FINSEQ_1:89; A8: 1 in Seg 2 by FINSEQ_1:2,TARSKI:def 2; reconsider g as FinSequence by A7,FINSEQ_1:def 2; A9: 2 in Seg 2 by FINSEQ_1:2,TARSKI:def 2; then A10: g.2 = (uncurry <*f1,f2*>).(2,x) by A3,A4,A5,A7,FUNCT_6:31; <*f1,f2*>.2 = f2 & x in dom f2 by A4,FINSEQ_1:44,XBOOLE_0:def 4; then A11: (uncurry <*f1,f2*>).(2,x) = f2.x by A1,A9,FUNCT_5:38; A12: len g = 2 by A7,FINSEQ_1:def 3; <*f1,f2*>.1 = f1 & x in dom f1 by A4,FINSEQ_1:44,XBOOLE_0:def 4; then A13: (uncurry <*f1,f2*>).(1,x) = f1.x by A1,A8,FUNCT_5:38; g.1 = (uncurry <*f1,f2*>).(1,x) by A3,A4,A5,A7,A8,FUNCT_6:31; hence thesis by A5,A13,A10,A11,A12,FINSEQ_1:44; end; theorem dom Frege<*h*> = product <*dom h*> & rng Frege<*h*> = product <*rng h *> & for x st x in dom h holds (Frege<*h*>).<*x*> = <*h.x*> proof A1: <*h*>.1 = h by FINSEQ_1:def 8; A2: rngs <*h*> = <*rng h*> by Th132; A3: doms <*h*> = <*dom h*> by Th132; hence dom Frege<*h*> = product <*dom h*> & rng Frege<*h*> = product <*rng h*> by A2,FUNCT_6:38,def 7; let x; assume x in dom h; then A4: <*x*> in product doms <*h*> by A3,Th123; then consider f such that A5: (Frege<*h*>).<*x*> = f and dom f = <*h*>"SubFuncs rng <*h*> and for y st y in dom f holds f.y = (uncurry <*h*>).(y,<*x*>.y) by FUNCT_6:def 7; A6: dom <*h*> = Seg 1 & 1 in Seg 1 by FINSEQ_1:2,def 8,TARSKI:def 1; then dom <*rng h*> = Seg 1 & f in product rngs <*h*> by A1,A4,A5, FINSEQ_1:def 8,FUNCT_6:37; then A7: dom f = Seg 1 by A2,CARD_3:9; A8: <*x*>.1 = x by FINSEQ_1:def 8; reconsider f as FinSequence by A7,FINSEQ_1:def 2; f.1 = h.(<*x*>.1) by A6,A1,A4,A5,FUNCT_6:37; hence thesis by A5,A7,A8,FINSEQ_1:def 8; end; theorem Th144: dom Frege<*f1,f2*> = product <*dom f1, dom f2*> & rng Frege<*f1, f2*> = product <*rng f1, rng f2*> & for x,y st x in dom f1 & y in dom f2 holds (Frege<*f1,f2*>).<*x,y*> = <*f1.x, f2.y*> proof A1: rngs <*f1,f2*> = <*rng f1, rng f2*> by Th133; len <*rng f1, rng f2*> = 2 by FINSEQ_1:44; then A2: dom <*rng f1, rng f2*> = Seg 2 by FINSEQ_1:def 3; len <*f1,f2*> = 2 by FINSEQ_1:44; then A3: dom <*f1,f2*> = Seg 2 by FINSEQ_1:def 3; A4: doms <*f1,f2*> = <*dom f1, dom f2*> by Th133; hence dom Frege<*f1,f2*> = product <*dom f1, dom f2*> & rng Frege<*f1,f2*> = product <*rng f1, rng f2*> by A1,FUNCT_6:38,def 7; let x,y; assume x in dom f1 & y in dom f2; then A5: <*x,y*> in product doms <*f1,f2*> by A4,Th124; then consider f such that A6: (Frege<*f1,f2*>).<*x,y*> = f and dom f = <*f1,f2*>"SubFuncs rng <*f1,f2*> and for z st z in dom f holds f.z = (uncurry <*f1,f2*>).(z,<*x,y*>.z) by FUNCT_6:def 7; A7: <*x,y*>.1 = x & <*x,y*>.2 = y by FINSEQ_1:44; A8: 1 in Seg 2 & <*f1,f2*>.1 = f1 by FINSEQ_1:2,44,TARSKI:def 2; then f in product rngs <*f1,f2*> by A3,A5,A6,FUNCT_6:37; then A9: dom f = Seg 2 by A1,A2,CARD_3:9; then reconsider f as FinSequence by FINSEQ_1:def 2; 2 in Seg 2 & <*f1,f2*>.2 = f2 by FINSEQ_1:2,44,TARSKI:def 2; then A10: f.2 = f2.(<*x,y*>.2) by A3,A5,A6,FUNCT_6:37; A11: len f = 2 by A9,FINSEQ_1:def 3; f.1 = f1.(<*x,y*>.1) by A3,A8,A5,A6,FUNCT_6:37; hence thesis by A6,A10,A11,A7,FINSEQ_1:44; end; theorem x in dom f1 & x in dom f2 implies for y1,y2 holds <:f1,f2:>.x = [y1,y2 ] iff <:<*f1,f2*>:>.x = <*y1,y2*> proof A1: <*f1.x,f2.x*>.1 = f1.x & <*f1.x,f2.x*>.2 = f2.x by FINSEQ_1:44; assume x in dom f1 & x in dom f2; then A2: x in dom f1 /\ dom f2 by XBOOLE_0:def 4; let y1,y2; A3: <*y1,y2*>.1 = y1 & <*y1,y2*>.2 = y2 by FINSEQ_1:44; [f1.x,f2.x] = [y1,y2] iff f1.x = y1 & f2.x = y2 by XTUPLE_0:1; hence thesis by A2,A1,A3,Th142,FUNCT_3:48; end; theorem x in dom f1 & y in dom f2 implies for y1,y2 holds [:f1,f2:].(x,y) = [ y1,y2] iff (Frege<*f1,f2*>).<*x,y*> = <*y1,y2*> proof assume A1: x in dom f1 & y in dom f2; let y1,y2; A2: <*f1.x,f2.y*>.1 = f1.x & <*f1.x,f2.y*>.2 = f2.y by FINSEQ_1:44; A3: <*y1,y2*>.1 = y1 & <*y1,y2*>.2 = y2 by FINSEQ_1:44; [f1.x,f2.y] = [y1,y2] iff f1.x = y1 & f2.y = y2 by XTUPLE_0:1; hence thesis by A1,A2,A3,Th144,FUNCT_3:def 8; end; theorem Funcs(<*X*>,Y) = <*Funcs(X,Y)*> proof A1: dom <*X*> = Seg 1 by FINSEQ_1:def 8; A2: dom Funcs(<*X*>,Y) = dom <*X*> by FUNCT_6:def 8; then reconsider p = Funcs(<*X*>,Y) as FinSequence by A1,FINSEQ_1:def 2; <*X*>.1 = X & 1 in Seg 1 by FINSEQ_1:2,def 8,TARSKI:def 1; then p.1 = Funcs(X,Y) by A1,FUNCT_6:def 8; hence thesis by A2,A1,FINSEQ_1:def 8; end; theorem Funcs(<*X,Y*>,Z) = <*Funcs(X,Z), Funcs(Y,Z)*> proof A1: Seg len <*X,Y*> = dom <*X,Y*> by FINSEQ_1:def 3; A2: dom Funcs(<*X,Y*>,Z) = dom <*X,Y*> by FUNCT_6:def 8; then reconsider p = Funcs(<*X,Y*>,Z) as FinSequence by A1,FINSEQ_1:def 2; A3: len <*X,Y*> = 2 by FINSEQ_1:44; then A4: len p = 2 by A2,A1,FINSEQ_1:def 3; <*X,Y*>.2 = Y & 2 in Seg 2 by FINSEQ_1:2,44,TARSKI:def 2; then A5: p.2 = Funcs(Y,Z) by A3,A1,FUNCT_6:def 8; <*X,Y*>.1 = X & 1 in Seg 2 by FINSEQ_1:2,44,TARSKI:def 2; then p.1 = Funcs(X,Z) by A3,A1,FUNCT_6:def 8; hence thesis by A4,A5,FINSEQ_1:44; end; theorem Funcs(X,<*Y*>) = <*Funcs(X,Y)*> proof A1: dom <*Y*> = Seg 1 by FINSEQ_1:def 8; A2: dom Funcs(X,<*Y*>) = dom <*Y*> by FUNCT_6:def 9; then reconsider p = Funcs(X,<*Y*>) as FinSequence by A1,FINSEQ_1:def 2; <*Y*>.1 = Y & 1 in Seg 1 by FINSEQ_1:2,def 8,TARSKI:def 1; then p.1 = Funcs(X,Y) by A1,FUNCT_6:def 9; hence thesis by A2,A1,FINSEQ_1:def 8; end; theorem Funcs(X,<*Y,Z*>) = <*Funcs(X,Y), Funcs(X,Z)*> proof A1: Seg len <*Y,Z*> = dom <*Y,Z*> by FINSEQ_1:def 3; A2: dom Funcs(X,<*Y,Z*>) = dom <*Y,Z*> by FUNCT_6:def 9; then reconsider p = Funcs(X,<*Y,Z*>) as FinSequence by A1,FINSEQ_1:def 2; A3: len <*Y,Z*> = 2 by FINSEQ_1:44; then A4: len p = 2 by A2,A1,FINSEQ_1:def 3; <*Y,Z*>.2 = Z & 2 in Seg 2 by FINSEQ_1:2,44,TARSKI:def 2; then A5: p.2 = Funcs(X,Z) by A3,A1,FUNCT_6:def 9; <*Y,Z*>.1 = Y & 1 in Seg 2 by FINSEQ_1:2,44,TARSKI:def 2; then p.1 = Funcs(X,Y) by A3,A1,FUNCT_6:def 9; hence thesis by A4,A5,FINSEQ_1:44; end; theorem for f being FinSequence st rng f={x,y} & len f=2 holds f.1=x & f. 2=y or f.1=y & f.2=x proof let f be FinSequence; assume that A1: rng f={x,y} and A2: len f=2; 2 in dom f by A2,Th25; then A3: f.2 in rng f by FUNCT_1:def 3; A4: now x in rng f by A1,TARSKI:def 2; then consider z such that A5: z in dom f and A6: x=f.z by FUNCT_1:def 3; reconsider nz=z as Element of NAT by A5; A7: 1<=nz & nz<=len f by A5,Th25; assume that A8: f.1=y and A9: f.2=y; per cases by A2,A7,NAT_1:9; suppose nz=1; hence f.1=x & f.2=y by A9,A6; end; suppose nz=1+1; hence f.1=x & f.2=y by A8,A9,A6; end; end; A10: now y in rng f by A1,TARSKI:def 2; then consider z such that A11: z in dom f and A12: y=f.z by FUNCT_1:def 3; reconsider nz=z as Element of NAT by A11; A13: 1<=nz & nz<=len f by A11,Th25; assume that A14: f.1=x and A15: f.2=x; per cases by A2,A13,NAT_1:9; suppose nz=1; hence f.1=x & f.2=y by A14,A15,A12; end; suppose nz=1+1; hence f.1=x & f.2=y by A14,A12; end; end; 1 in dom f by A2,Th25; then f.1 in rng f by FUNCT_1:def 3; hence thesis by A1,A3,A10,A4,TARSKI:def 2; end; theorem for X being set, k being Element of NAT st X c= Seg k holds for m ,n being Element of NAT st m in dom (Sgm X) & n = (Sgm X).m holds m <= n proof let X be set, k be Element of NAT; defpred P[Nat] means ($1 in dom (Sgm X) & (ex n being Element of NAT st n=( Sgm X).$1 & $1 <= n)) or (not $1 in dom (Sgm X)); assume A1: X c= Seg k; now let x be non empty Nat; assume A2: P[x]; now per cases by A2; suppose A3: x in dom (Sgm X) & ex n being Element of NAT st n = (Sgm X).x & x <= n; A4: x+0 < x+1 by XREAL_1:8; consider n being Element of NAT such that A5: n = Sgm(X).x and A6: x <= n by A3; A7: 1 <= x by A3,Th25; now set n1 = (Sgm X).(x+1); assume A8: x+1 in dom (Sgm X); then (Sgm X).(x+1) in rng (Sgm X) by FUNCT_1:3; then reconsider n1 as Element of NAT; take n1; thus n1 = (Sgm X).(x+1); x+1 <= len Sgm X by A8,Th25; then n < n1 by A1,A7,A4,A5,FINSEQ_1:def 13; then x < n1 by A6,XXREAL_0:2; hence x+1 <= n1 by NAT_1:13; end; hence P[x+1]; end; suppose not x in dom (Sgm X); then x < 0+1 or x > len Sgm X by Th25; then x+1 > len Sgm X + 0 by NAT_1:13; hence P[x+1] by Th25; end; end; hence P[x+1]; end; then A9: for x being non empty Nat st P[x] holds P[x+1]; let m, n be Element of NAT; assume that A10: m in dom (Sgm X) and A11: n = (Sgm X).m; reconsider m9=m as non empty Element of NAT by A10,Th25; now set n = (Sgm X).1; A12: m <= len (Sgm X) by A10,Th25; 1 <= m by A10,Th25; then 1 <= len (Sgm X) by A12,XXREAL_0:2; hence 1 in dom (Sgm X) by Th25; then A13: (Sgm X).1 in rng (Sgm X) by FUNCT_1:3; then reconsider n as Element of NAT; take n; thus n = (Sgm X).1; rng (Sgm X) = X by A1,FINSEQ_1:def 13; hence 1 <= n by A1,A13,FINSEQ_1:1; end; then A14: P[1]; for x being non empty Nat holds P[x] from NAT_1:sch 10(A14,A9); then P[m9]; hence thesis by A10,A11; end; registration let i be Nat; let D be finite set; cluster i-tuples_on D -> finite; coherence proof now let x be set; assume x in dom (i |-> D); then x in Seg i by FUNCOP_1:13; hence (i |-> D).x is finite by FUNCOP_1:7; end; then A1: i |-> D is finite-yielding by FINSET_1:def 4; product (i |-> D) = i-tuples_on D by Th131; hence thesis by A1; end; end; begin reserve x,z for set; reserve k for Element of NAT; reserve D for non empty set; definition let B be non empty set, A be set, b be Element of B; redefine func A --> b -> Function of A,B; coherence proof set f = A --> b; A1: dom f = A by FUNCOP_1:13; thus thesis by A1; end; end; definition let IT be FinSequence-membered set; redefine attr IT is with_common_domain means :Def1: for a,b being FinSequence st a in IT & b in IT holds len a = len b; compatibility proof thus IT is with_common_domain implies for a,b being FinSequence st a in IT & b in IT holds len a = len b proof assume A1: IT is with_common_domain; let a,b being FinSequence; assume a in IT & b in IT; then dom a = dom b by A1,CARD_3:def 10; hence len a = len b by FINSEQ_3:29; end; assume A2: for a,b being FinSequence st a in IT & b in IT holds len a = len b; let f,g be Function; assume A3: f in IT & g in IT; then reconsider f,g as FinSequence; len f = len g by A2,A3; hence thesis by FINSEQ_3:29; end; end; registration cluster FinSequence-membered with_common_domain for set; existence proof take {}; thus (for x being set st x in {} holds x is FinSequence) & for a,b being FinSequence st a in {} & b in {} holds len a = len b; end; end; definition mode relation is FinSequence-membered with_common_domain set; end; reserve X for set; reserve p,r for relation; reserve a,a1,a2,b for FinSequence; theorem X c= p implies X is relation; theorem {a} is relation proof for z st z in {a} holds z is FinSequence by TARSKI:def 1; then reconsider X ={a} as FinSequence-membered set by FINSEQ_1:def 18; X is with_common_domain; hence thesis; end; scheme relexist{A() -> set, P[FinSequence]}: ex r st for a holds a in r iff a in A( ) & P[a] provided A1: for a,b st P[a] & P[b] holds len a = len b proof defpred P1[set] means ex a st P[a] & $1 = a; consider X such that A2: x in X iff x in A() & P1[x] from XBOOLE_0:sch 1; X is FinSequence-membered proof let x be set; assume x in X; then ex a st P[a] & x = a by A2; hence thesis; end; then reconsider X as FinSequence-membered set; X is with_common_domain proof let a,b; assume that A3: a in X and A4: b in X; A5: ex d being FinSequence st P[d] & b = d by A2,A4; ex c being FinSequence st P[c] & a = c by A2,A3; hence thesis by A1,A5; end; then reconsider r = X as relation; for a holds a in r iff a in A() & P[a] proof let a; now assume A6: a in r; then ex c being FinSequence st P[c] & a = c by A2; hence a in A() & P[a] by A2,A6; end; hence thesis by A2; end; hence thesis; end; definition let p,r; redefine pred p = r means for a holds a in p iff a in r; compatibility proof thus p = r implies for a holds a in p iff a in r; thus (for a holds a in p iff a in r) implies p = r proof assume for a holds a in p iff a in r; then for x holds x in p iff x in r; hence thesis by TARSKI:1; end; end; end; registration cluster empty -> with_common_domain for set; coherence proof let X be set; assume A1: X is empty; then for a,b being FinSequence st a in X & b in X holds len a = len b; hence thesis by Def1,A1; end; end; theorem Th3: for p st for a holds not a in p holds p = {} proof let p such that A1: for a holds not a in p; assume p <> {}; then ex x being set st x in p by XBOOLE_0:def 1; hence contradiction by A1; end; definition let p; assume A1: p <> {}; func the_arity_of p -> Element of NAT means for a st a in p holds it = len a; existence proof consider c being FinSequence such that A2: c in p by A1,Th3; for a st a in p holds len c = len a by A2,Def1; hence thesis; end; uniqueness proof let n1,n2 be Element of NAT; assume that A3: for a st a in p holds n1 = len a and A4: for a st a in p holds n2 = len a; consider a such that A5: a in p by A1,Th3; len a = n1 by A3,A5; hence thesis by A4,A5; end; end; definition let k; mode relation_length of k -> relation means for a st a in it holds len a = k; existence proof take {}; thus thesis; end; end; definition let X be set; mode relation of X -> relation means for a st a in it holds rng a c= X; existence proof take {}; thus thesis; end; end; theorem Th4: {} is relation of X proof thus a in {} implies rng a c= X; end; theorem Th5: {} is relation_length of k proof thus a in {} implies len a = k; end; definition let X, k; mode relation of X,k -> relation means it is relation of X & it is relation_length of k; existence proof take {}; thus thesis by Th4,Th5; end; end; definition let D; func relations_on D -> set means :Def7: for X holds X in it iff X c= D* & for a,b being FinSequence of D st a in X & b in X holds len a = len b; existence proof defpred P[set] means ex Y being set st Y = $1 & Y c= D* & for a,b being FinSequence of D st a in Y & b in Y holds len a = len b; consider A being set such that A1: for x holds x in A iff x in bool(D*) & P[x] from XBOOLE_0:sch 1; take A; for X being set holds X in A iff X c= D* & for a,b being FinSequence of D st a in X & b in X holds len a = len b proof let X be set; thus X in A implies X c= D* & for a,b being FinSequence of D st a in X & b in X holds len a = len b proof assume X in A; then ex Y being set st Y = X & Y c= D* & for a,b being FinSequence of D st a in Y & b in Y holds len a=len b by A1; hence thesis; end; thus thesis by A1; end; hence thesis; end; uniqueness proof let A1,A2 be set; assume that A2: for X being set holds X in A1 iff X c= D* & for a,b being FinSequence of D st a in X & b in X holds len a=len b and A3: for X being set holds X in A2 iff X c= D* & for a,b being FinSequence of D st a in X & b in X holds len a=len b; for x being set holds x in A1 iff x in A2 proof let x; thus x in A1 implies x in A2 proof assume A4: x in A1; then A5: for a,b being FinSequence of D st a in x & b in x holds len a=len b by A2; x c= D* by A2,A4; hence thesis by A3,A5; end; thus x in A2 implies x in A1 proof assume A6: x in A2; then A7: for a,b being FinSequence of D st a in x & b in x holds len a=len b by A3; x c= D* by A3,A6; hence thesis by A2,A7; end; end; hence thesis by TARSKI:1; end; end; registration let D; cluster relations_on D -> non empty; coherence proof A1: for a,b being FinSequence of D st a in {} & b in {} holds len a = len b; defpred P[set] means ex Y being set st Y = $1 & Y c= D* & for a,b being FinSequence of D st a in Y & b in Y holds len a = len b; consider XX being set such that A2: for x holds x in XX iff x in bool(D*) & P[x] from XBOOLE_0:sch 1; {} c= D* by XBOOLE_1:2; then reconsider A = XX as non empty set by A2,A1; for X being set holds X in A iff X c= D* & for a,b being FinSequence of D st a in X & b in X holds len a = len b proof let X be set; thus X in A implies X c= D* & for a,b being FinSequence of D st a in X & b in X holds len a = len b proof assume X in A; then ex Y being set st Y = X & Y c= D* & for a,b being FinSequence of D st a in Y & b in Y holds len a=len b by A2; hence thesis; end; thus thesis by A2; end; hence thesis by Def7; end; end; definition let D be non empty set; mode relation of D is Element of relations_on D; end; reserve a,b for FinSequence of D; reserve p,r for Element of relations_on D; theorem X c= r implies X is Element of relations_on D proof assume A1: X c= r; then A2: for a,b st a in X & b in X holds len a = len b by Def7; r c= D* by Def7; then X c= D* by A1,XBOOLE_1:1; hence thesis by A2,Def7; end; theorem {a} is Element of relations_on D proof A1: for a1,a2 being FinSequence of D st a1 in {a} & a2 in {a} holds len a1 = len a2 proof let a1,a2 be FinSequence of D; assume that A2: a1 in {a} and A3: a2 in {a}; a1 = a by A2,TARSKI:def 1; hence thesis by A3,TARSKI:def 1; end; a in D* by FINSEQ_1:def 11; then {a} c= D* by ZFMISC_1:31; hence thesis by A1,Def7; end; theorem for x,y being Element of D holds {<*x,y*>} is Element of relations_on D proof let x,y be Element of D; A1: for a1,a2 being FinSequence of D st a1 in {<*x,y*>} & a2 in {<*x,y*>} holds len a1 = len a2 proof let a1,a2 be FinSequence of D; assume that A2: a1 in {<*x,y*>} and A3: a2 in {<*x,y*>}; a1 = <*x,y*> by A2,TARSKI:def 1; hence thesis by A3,TARSKI:def 1; end; <*x*>^<*y*> is FinSequence of D; then <*x,y*> in D* by FINSEQ_1:def 11; then {<*x,y*>} c= D* by ZFMISC_1:31; hence thesis by A1,Def7; end; definition let D,p,r; redefine pred p = r means :Def8: for a holds a in p iff a in r; compatibility proof thus p = r implies for a holds a in p iff a in r; thus (for a holds a in p iff a in r) implies p = r proof assume A1: for a holds a in p iff a in r; now let x; A2: now assume A3: x in r; r is Subset of D* by Def7; then x is FinSequence of D by A3,FINSEQ_1:def 11; hence x in p by A1,A3; end; now assume A4: x in p; p is Subset of D* by Def7; then x is FinSequence of D by A4,FINSEQ_1:def 11; hence x in r by A1,A4; end; hence x in p iff x in r by A2; end; hence thesis by TARSKI:1; end; end; end; scheme relDexist{D() -> non empty set, P[FinSequence of D()]}: ex r being Element of relations_on D() st for a being FinSequence of D() holds a in r iff P[a] provided A1: for a,b being FinSequence of D() st P[a] & P[b] holds len a = len b proof defpred P1[set] means ex a being FinSequence of D() st P[a] & $1 = a; consider X being set such that A2: x in X iff x in D()* & P1[x] from XBOOLE_0:sch 1; A3: for a,b being FinSequence of D() st a in X & b in X holds len a = len b proof let a,b be FinSequence of D(); assume that A4: a in X and A5: b in X; A6: ex d being FinSequence of D() st P[d] & b = d by A2,A5; ex c being FinSequence of D() st P[c] & a = c by A2,A4; hence thesis by A1,A6; end; for x holds x in X implies x in D()* by A2; then X c= D()* by TARSKI:def 3; then reconsider r = X as Element of relations_on D() by A3,Def7; for a being FinSequence of D() holds a in r iff P[a] proof let a be FinSequence of D(); A7: now A8: a in D()* by FINSEQ_1:def 11; assume P[a]; hence a in r by A2,A8; end; now assume a in r; then ex c being FinSequence of D() st P[c] & a = c by A2; hence P[a]; end; hence thesis by A7; end; hence thesis; end; definition let D; func empty_rel(D) -> Element of relations_on D means :Def9: not a in it; existence proof defpred P[FinSequence of D] means contradiction; A1: P[a] & P[b] implies len a = len b; consider r such that A2: for a holds a in r iff P[a] from relDexist(A1); take r; thus thesis by A2; end; uniqueness proof let r1,r2 be Element of relations_on D; assume that A3: not a in r1 and A4: not a in r2; for a holds ( a in r1 iff a in r2) by A3,A4; hence r1 = r2 by Def8; end; end; theorem empty_rel(D) = {} proof assume A1: not thesis; set x = the Element of empty_rel(D); empty_rel(D) is Subset of D* by Def7; then x in D* by A1,TARSKI:def 3; then reconsider a = x as FinSequence of D by FINSEQ_1:def 11; a in empty_rel(D) by A1; hence contradiction by Def9; end; definition let D,p; assume A1: p <> empty_rel(D); func the_arity_of p -> Element of NAT means a in p implies it = len a; existence proof consider c being FinSequence of D such that A2: c in p by A1,Def9; a in p implies len c = len a by A2,Def7; hence thesis; end; uniqueness proof let n1,n2 be Element of NAT; assume that A3: a in p implies n1 = len a and A4: a in p implies n2 = len a; consider a such that A5: a in p by A1,Def9; len a = n1 by A3,A5; hence thesis by A4,A5; end; end; scheme relDexist2{D() -> non empty set, k() -> Element of NAT, P[FinSequence of D() ]}: ex r being Element of relations_on D() st for a being FinSequence of D() st len a = k() holds a in r iff P[a] proof defpred P1[set] means ex a being FinSequence of D() st len a = k() & P[a] & $1 = a; consider X being set such that A1: x in X iff x in D()* & P1[x] from XBOOLE_0:sch 1; A2: for a,b being FinSequence of D() st a in X & b in X holds len a = len b proof let a,b be FinSequence of D(); assume that A3: a in X and A4: b in X; A5: ex d being FinSequence of D() st len d = k() & P[d] & b = d by A1,A4; ex c being FinSequence of D() st len c = k() & P[c] & a = c by A1,A3; hence thesis by A5; end; for x holds x in X implies x in D()* by A1; then X c= D()* by TARSKI:def 3; then reconsider r = X as Element of relations_on D() by A2,Def7; for a being FinSequence of D() st len a = k() holds a in r iff P[a] proof let a be FinSequence of D() such that A6: len a = k(); A7: now A8: a in D()* by FINSEQ_1:def 11; assume P[a]; hence a in r by A1,A6,A8; end; now assume a in r; then ex c being FinSequence of D() st len c = k() & P[c] & a = c by A1; hence P[a]; end; hence thesis by A7; end; hence thesis; end; definition func BOOLEAN -> set equals {0,1}; coherence; end; registration cluster BOOLEAN -> non empty; coherence; end; definition redefine func FALSE -> Element of BOOLEAN; coherence by TARSKI:def 2; redefine func TRUE -> Element of BOOLEAN; coherence by TARSKI:def 2; end; definition let x be set; redefine attr x is boolean means :Def12: x in BOOLEAN; compatibility proof hereby assume x is boolean; then x = FALSE or x = TRUE by XBOOLEAN:def 3; hence x in BOOLEAN; end; assume x in BOOLEAN; hence x = FALSE or x = TRUE by TARSKI:def 2; end; end; registration cluster -> boolean for Element of BOOLEAN; coherence by Def12; end; reserve u,v,w for boolean set; definition let v be boolean set; redefine func 'not' v equals TRUE if v = FALSE otherwise FALSE; compatibility proof let w; thus v = FALSE implies (w = 'not' v iff w = TRUE); assume v <> FALSE; then v = TRUE by XBOOLEAN:def 3; hence thesis; end; consistency; let w be boolean set; redefine func v '&' w equals TRUE if v = TRUE & w =TRUE otherwise FALSE; compatibility proof let u be set; thus v = TRUE & w =TRUE implies (u = v '&' w iff u = TRUE); assume v <> TRUE or w <>TRUE; then v = FALSE or w = FALSE by XBOOLEAN:def 3; hence thesis; end; consistency; end; definition let v be Element of BOOLEAN; redefine func 'not' v -> Element of BOOLEAN; correctness by Def12; let w be Element of BOOLEAN; redefine func v '&' w -> Element of BOOLEAN; correctness by Def12; end; canceled; theorem (v = FALSE iff 'not' v = TRUE) & (v = TRUE iff 'not' v = FALSE); theorem (v '&' w = TRUE iff v = TRUE & w = TRUE) & (v '&' w = FALSE iff v = FALSE or w = FALSE) by XBOOLEAN:101,140; theorem FALSE '&' v = FALSE; theorem TRUE '&' v = v; theorem v '&' v = FALSE implies v = FALSE; theorem v '&' (w '&' u) = (v '&' w) '&' u; definition let X; func ALL(X) equals :Def15: TRUE if not FALSE in X otherwise FALSE; correctness; end; registration let X; cluster ALL X -> boolean; correctness by Def15; end; definition let X; redefine func ALL X -> Element of BOOLEAN; correctness by Def12; end; theorem (not FALSE in X iff ALL(X) = TRUE) & (FALSE in X iff ALL(X) = FALSE) by Def15; begin definition let f be Relation; attr f is boolean-valued means :Def16: rng f c= BOOLEAN; end; registration cluster boolean-valued for Function; existence proof take {}; thus rng {} c= BOOLEAN by XBOOLE_1:2; end; end; registration let f be boolean-valued Function, x be set; cluster f.x -> boolean; coherence proof per cases; suppose not x in dom f; then f.x = FALSE by FUNCT_1:def 2; hence f.x in BOOLEAN; end; suppose A1: x in dom f; A2: rng f c= BOOLEAN by Def16; f.x in rng f by A1,FUNCT_1:def 3; hence f.x in BOOLEAN by A2; end; end; end; definition let p be boolean-valued Function; func 'not' p -> boolean-valued Function means :Def17: dom it = dom p & for x being set st x in dom p holds it.x = 'not'(p.x); existence proof deffunc F(set) = 'not'(p.$1); consider q being Function such that A1: dom q = dom p and A2: for x being set st x in dom p holds q.x = F(x) from FUNCT_1:sch 3; q is boolean-valued proof let x be set; assume x in rng q; then consider y being set such that A3: y in dom q and A4: x = q.y by FUNCT_1:def 3; x = 'not'(p.y) by A1,A2,A3,A4; then x = FALSE or x = TRUE by XBOOLEAN:def 3; hence thesis; end; hence thesis by A1,A2; end; uniqueness proof let q1,q2 be boolean-valued Function such that A5: dom q1 = dom p and A6: for x being set st x in dom p holds q1.x = 'not'(p.x) and A7: dom q2 = dom p and A8: for x being set st x in dom p holds q2.x = 'not'(p.x); for x being set st x in dom p holds q1.x = q2.x proof let x be set; assume A9: x in dom p; then q1.x = 'not'(p.x) by A6; hence thesis by A8,A9; end; hence thesis by A5,A7,FUNCT_1:2; end; involutiveness proof let q,p be boolean-valued Function; assume that A10: dom q = dom p and A11: for x being set st x in dom p holds q.x = 'not'(p.x); thus dom p = dom q by A10; let x be set; assume A12: x in dom q; thus p.x = 'not' 'not'(p.x) .= 'not'(q.x) by A10,A11,A12; end; let q be boolean-valued Function; func p '&' q -> boolean-valued Function means :Def18: dom it = dom p /\ dom q & for x being set st x in dom it holds it.x = (p.x) '&' (q.x); existence proof deffunc F(set) = (p.$1) '&' (q.$1); consider s being Function such that A13: dom s = dom p /\ dom q and A14: for x being set st x in dom p /\ dom q holds s.x = F(x) from FUNCT_1:sch 3; s is boolean-valued proof let x be set; assume x in rng s; then consider y being set such that A15: y in dom s and A16: x = s.y by FUNCT_1:def 3; x = (p.y) '&' (q.y) by A13,A14,A15,A16; then x = FALSE or x = TRUE by XBOOLEAN:def 3; hence thesis; end; hence thesis by A13,A14; end; uniqueness proof let s1,s2 be boolean-valued Function such that A17: dom s1 = dom p /\ dom q and A18: for x being set st x in dom s1 holds s1.x = (p.x) '&' (q.x) and A19: dom s2 = dom p /\ dom q and A20: for x being set st x in dom s2 holds s2.x = (p.x) '&' (q.x); for x being set st x in dom s1 holds s1.x = s2.x proof let x be set; assume A21: x in dom s1; then s1.x = (p.x) '&' (q.x) by A18; hence thesis by A17,A19,A20,A21; end; hence thesis by A17,A19,FUNCT_1:2; end; commutativity; idempotence; end; registration let A be set; cluster -> boolean-valued for Function of A,BOOLEAN; coherence proof let F be Function of A,BOOLEAN; thus rng F c= BOOLEAN by RELAT_1:def 19; end; end; definition let A be non empty set; let p be Function of A,BOOLEAN; redefine func 'not' p -> Function of A,BOOLEAN means for x being Element of A holds it.x = 'not'(p.x); coherence proof A1: dom 'not' p = dom p by Def17 .= A by PARTFUN1:def 2; rng 'not' p c= BOOLEAN by Def16; hence thesis by A1,FUNCT_2:2; end; compatibility proof let IT be Function of A,BOOLEAN; A2: dom IT = A by FUNCT_2:def 1; hereby assume A3: IT = 'not' p; let x be Element of A; x in A; then x in dom p by FUNCT_2:def 1; hence IT.x = 'not'(p.x) by A3,Def17; end; A4: dom p = A by FUNCT_2:def 1; assume for x being Element of A holds IT.x = 'not'(p.x); then for x being set st x in dom p holds IT.x = 'not'(p.x) by A4; hence thesis by A2,A4,Def17; end; let q be Function of A,BOOLEAN; redefine func p '&' q -> Function of A,BOOLEAN means for x being Element of A holds it.x = (p.x) '&' (q.x); coherence proof A5: rng(p '&' q) c= BOOLEAN by Def16; dom p = A & dom q = A by PARTFUN1:def 2; then dom(p '&' q) = A /\ A by Def18 .= A; hence thesis by A5,FUNCT_2:2; end; compatibility proof let IT be Function of A,BOOLEAN; A6: dom IT = A by FUNCT_2:def 1; hereby assume A7: IT = p '&' q; let x be Element of A; A8: dom q = A by FUNCT_2:def 1; dom p = A by FUNCT_2:def 1; then dom(p '&' q) = A /\ A by A8,Def18 .= A; hence IT.x = (p.x) '&' (q.x) by A7,Def18; end; A9: dom q = A by FUNCT_2:def 1; A10: dom IT = A /\ A by FUNCT_2:def 1 .= dom p /\ dom q by A9,FUNCT_2:def 1; assume for x being Element of A holds IT.x = (p.x) '&' (q.x); then for x being set st x in dom IT holds IT.x = (p.x) '&' (q.x) by A6; hence thesis by A10,Def18; end; end; begin reserve A,z for set, x,y for FinSequence of A, h for PartFunc of A*,A, n,m for Nat; definition let IT be Relation; attr IT is homogeneous means :Def21: dom IT is with_common_domain; end; definition let A; let IT be PartFunc of A*,A; attr IT is quasi_total means :Def22: for x,y st len x = len y & x in dom IT holds y in dom IT; end; registration let f be Relation; let X be with_common_domain set; cluster f|X -> homogeneous; coherence proof dom(f|X) c= X by RELAT_1:58; hence dom(f|X) is with_common_domain; end; end; registration let A be non empty set, f be PartFunc of A*,A; cluster dom f -> FinSequence-membered; coherence proof dom f c= A* by RELAT_1:def 18; hence thesis; end; end; registration let A be non empty set; cluster homogeneous quasi_total non empty for PartFunc of A*,A; existence proof set a = the Element of A; set f = <*>A .-->a; A1: dom f = {<*>A} by FUNCOP_1:13; A2: dom f c= A* proof let z; assume z in dom f; then z = <*>A by A1,TARSKI:def 1; hence thesis by FINSEQ_1:def 11; end; A3: rng f = {a} by FUNCOP_1:8; rng f c= A proof let z; assume z in rng f; then z = a by A3,TARSKI:def 1; hence thesis; end; then reconsider f as PartFunc of A*,A by A2,RELSET_1:4; A4: f is quasi_total proof let x,y be FinSequence of A; assume that A5: len x = len y and A6: x in dom f; x = <*>A by A1,A6,TARSKI:def 1; then len x = 0; then y = <*>A by A5; hence thesis by A1,TARSKI:def 1; end; f is homogeneous proof let x,y be FinSequence; assume that A7: x in dom f and A8: y in dom f; x = <*>A by A1,A7,TARSKI:def 1; hence thesis by A1,A8,TARSKI:def 1; end; hence thesis by A4; end; end; registration cluster homogeneous non empty for Function; existence proof set f = the homogeneous non empty PartFunc of {{}}*,{{}}; take f; thus thesis; end; end; registration let R be homogeneous Relation; cluster dom R -> with_common_domain; coherence by Def21; end; theorem Th18: for A being non empty set, a being Element of A holds <*>A .-->a is homogeneous quasi_total non empty PartFunc of A*,A proof let A be non empty set, a be Element of A; set f = <*>A .-->a; A1: dom f = {<*>A} by FUNCOP_1:13; A2: dom f c= A* proof let z; assume z in dom f; then z = <*>A by A1,TARSKI:def 1; hence thesis by FINSEQ_1:def 11; end; A3: rng f = {a} by FUNCOP_1:8; rng f c= A proof let z; assume z in rng f; then z = a by A3,TARSKI:def 1; hence thesis; end; then reconsider f as PartFunc of A*,A by A2,RELSET_1:4; A4: f is quasi_total proof let x,y be FinSequence of A; assume that A5: len x = len y and A6: x in dom f; x = <*>A by A1,A6,TARSKI:def 1; then len x = 0; then y = <*>A by A5; hence thesis by A1,TARSKI:def 1; end; f is homogeneous proof let x,y be FinSequence; assume that A7: x in dom f and A8: y in dom f; x = <*>A by A1,A7,TARSKI:def 1; hence thesis by A1,A8,TARSKI:def 1; end; hence thesis by A4; end; theorem for A being non empty set, a being Element of A holds <*>A .-->a is Element of PFuncs(A*,A) proof let A be non empty set, a be Element of A; set f = <*>A .-->a; A1: dom f = {<*>A} by FUNCOP_1:13; A2: dom f c= A* proof let z; assume z in dom f; then z = <*>A by A1,TARSKI:def 1; hence thesis by FINSEQ_1:def 11; end; A3: rng f = {a} by FUNCOP_1:8; rng f c= A proof let z; assume z in rng f; then z = a by A3,TARSKI:def 1; hence thesis; end; then reconsider f as PartFunc of A*,A by A2,RELSET_1:4; f in PFuncs(A*,A) by PARTFUN1:45; hence thesis; end; definition let A; mode PFuncFinSequence of A is FinSequence of PFuncs(A*,A); end; definition let A; let IT be PFuncFinSequence of A; attr IT is homogeneous means :Def23: for n,h st n in dom IT & h = IT.n holds h is homogeneous; end; definition let A; let IT be PFuncFinSequence of A; attr IT is quasi_total means :Def24: for n,h st n in dom IT & h = IT.n holds h is quasi_total; end; definition let A be non empty set; let x be Element of PFuncs(A*,A); redefine func <*x*> -> PFuncFinSequence of A; coherence proof <*x*> is FinSequence of PFuncs(A*,A); hence thesis; end; end; registration let A be non empty set; cluster homogeneous quasi_total non-empty for PFuncFinSequence of A; existence proof set a = the Element of A; reconsider f = <*>A .-->a as PartFunc of A*,A by Th18; reconsider f as Element of PFuncs(A*,A) by PARTFUN1:45; take <*f*>; thus <*f*> is homogeneous proof let n; let h be PartFunc of A*,A; assume that A1: n in dom <*f*> and A2: h =<*f*>.n; n in {1} by A1,FINSEQ_1:2,def 8; then h = <*f*>.1 by A2,TARSKI:def 1; then h = f by FINSEQ_1:def 8; hence thesis by Th18; end; thus <*f*> is quasi_total proof let n; let h be PartFunc of A*,A; assume that A3: n in dom <*f*> and A4: h =<*f*>.n; n in {1} by A3,FINSEQ_1:2,def 8; then h = <*f*>.1 by A4,TARSKI:def 1; then h = f by FINSEQ_1:def 8; hence thesis by Th18; end; thus <*f*> is non-empty proof let n be set; assume A5: n in dom <*f*>; then reconsider n as Element of NAT; n in {1} by A5,FINSEQ_1:2,def 8; then n = 1 by TARSKI:def 1; hence thesis by FINSEQ_1:def 8; end; end; end; registration let A be non empty set; let f be homogeneous PFuncFinSequence of A; let i be set; cluster f.i -> homogeneous; coherence proof per cases; suppose A1: i in dom f; A2: rng f c= PFuncs(A*,A) by RELAT_1:def 19; f.i in rng f by A1,FUNCT_1:3; then f.i is PartFunc of A*,A by A2,PARTFUN1:46; hence thesis by A1,Def23; end; suppose A3: not i in dom f; let x be Function; thus thesis by A3,FUNCT_1:def 2,RELAT_1:38; end; end; end; reserve A for non empty set, h for PartFunc of A*,A, a for Element of A; theorem for x be Element of PFuncs(A*,A) st x = <*>A .--> a holds <*x*> is homogeneous quasi_total non-empty proof let x be Element of PFuncs(A*,A) such that A1: x = <*>A .--> a; A2: for n,h st n in dom <*x*> & h = <*x*>.n holds h is homogeneous proof let n,h; assume that A3: n in dom <*x*> and A4: h =<*x*>.n; n in {1} by A3,FINSEQ_1:2,def 8; then h = <*x*>.1 by A4,TARSKI:def 1; then h = x by FINSEQ_1:def 8; hence thesis by A1,Th18; end; A5: for n,h st n in dom <*x*> & h = <*x*>.n holds h is quasi_total proof let n,h; assume that A6: n in dom <*x*> and A7: h =<*x*>.n; n in {1} by A6,FINSEQ_1:2,def 8; then h = <*x*>.1 by A7,TARSKI:def 1; then h = x by FINSEQ_1:def 8; hence thesis by A1,Th18; end; for n being set st n in dom <*x*> holds <*x*>.n is non empty proof let n be set; assume n in dom <*x*>; then n in {1} by FINSEQ_1:2,def 8; then <*x*>.n = <*x*>.1 by TARSKI:def 1; hence thesis by A1,FINSEQ_1:def 8; end; hence thesis by A2,A5,Def23,Def24,FUNCT_1:def 9; end; definition let f be homogeneous Relation; func arity(f) -> Nat means :Def25: for x being FinSequence st x in dom f holds it = len x if ex x being FinSequence st x in dom f otherwise it = 0; consistency; existence proof thus (ex x being FinSequence st x in dom f) implies ex n st for x being FinSequence st x in dom f holds n = len x proof given x being FinSequence such that A1: x in dom f; take len x; let y be FinSequence; assume y in dom f; then dom x = dom y by A1,CARD_3:def 10; hence thesis by FINSEQ_3:29; end; thus thesis; end; uniqueness proof let n,m; hereby given x0 being FinSequence such that A2: x0 in dom f; assume that A3: for x being FinSequence st x in dom f holds n = len x and A4: for x being FinSequence st x in dom f holds m = len x; n = len x0 by A2,A3; hence n = m by A2,A4; end; thus thesis; end; end; definition let f be homogeneous Function; redefine func arity(f) -> Element of NAT; coherence by ORDINAL1:def 12; end; begin theorem for n be Nat, D be non empty set, D1 be non empty Subset of D holds n-tuples_on D /\ n-tuples_on D1 = n-tuples_on D1 proof let n be Nat,D be non empty set, D1 be non empty Subset of D; n-tuples_on D1 c= n-tuples_on D proof let z be set; assume z in n-tuples_on D1; then z is Tuple of n,D1 by FINSEQ_2:131; then z is Element of n-tuples_on D by FINSEQ_2:109; hence thesis; end; hence thesis by XBOOLE_1:28; end; theorem for D being non empty set for h being homogeneous quasi_total non empty PartFunc of D*,D holds dom h = (arity(h))-tuples_on D proof let D be non empty set; let f be homogeneous quasi_total non empty PartFunc of D*,D; set y = the Element of dom f; A1: dom f c= D* by RELAT_1:def 18; then A2: y in D* by TARSKI:def 3; thus dom f c= (arity(f))-tuples_on D proof let x be set; assume A3: x in dom f; then reconsider x9 = x as FinSequence of D by A1,FINSEQ_1:def 11; len x9 = arity f by A3,Def25; then x9 is Element of (arity(f))-tuples_on D by FINSEQ_2:92; hence thesis; end; reconsider y as FinSequence of D by A2,FINSEQ_1:def 11; let x be set; assume x in (arity(f))-tuples_on D; then x in {s where s is Element of D* : len s = arity(f)} by FINSEQ_2:def 4; then A4: ex s being Element of D* st x = s & len s = arity(f); len y = arity f by Def25; hence thesis by A4,Def22; end; definition let D be non empty set; mode PFuncsDomHQN of D -> non empty set means :Def26: for x be Element of it holds x is homogeneous quasi_total non empty PartFunc of D*,D; existence proof set a = the Element of D; reconsider A = {{<*>D} -->a} as non empty set; take A; let x be Element of A; x= <*>D .-->a by TARSKI:def 1; hence thesis by Th18; end; end; definition let D be non empty set, P be PFuncsDomHQN of D; redefine mode Element of P -> homogeneous quasi_total non empty PartFunc of D*,D; coherence by Def26; end; begin reserve X,Y,Z,x,y,z for set; registration cluster empty -> reflexive irreflexive symmetric antisymmetric asymmetric connected strongly_connected transitive for Relation; coherence proof let R be Relation such that A1: R is empty; x in {} implies [x,x] in {}; then {} is_reflexive_in field {} by RELAT_2:def 1; hence R is reflexive by A1,RELAT_2:def 9; {} is_irreflexive_in field {} proof let x; assume x in field {}; thus thesis; end; hence R is irreflexive by A1,RELAT_2:def 10; thus R is symmetric proof let x,y; assume that x in field R and y in field R and A2: [x,y] in R; thus thesis by A1,A2; end; {} is_antisymmetric_in field {} proof let x,y; assume that A3: x in field {} and y in field {} and [x,y] in {} and [y,x] in {}; thus thesis by A3; end; hence R is antisymmetric by A1,RELAT_2:def 12; {} is_asymmetric_in field {} proof let x,y; assume that x in field {} and y in field {} and [x,y] in {}; thus thesis; end; hence R is asymmetric by A1,RELAT_2:def 13; {} is_connected_in field {} proof let x,y; assume that A4: x in field {} and y in field {} and x <> y; thus thesis by A4; end; hence R is connected by A1,RELAT_2:def 14; {} is_strongly_connected_in field {} proof let x,y; assume that A5: x in field {} and y in field {}; thus thesis by A5; end; hence R is strongly_connected by A1,RELAT_2:def 15; {} is_transitive_in field {} proof let x,y,z; assume that A6: x in field {} and y in field {} and z in field {} and [x,y] in {} and [y,z] in {}; thus thesis by A6; end; hence R is transitive by A1,RELAT_2:def 16; end; end; notation let X; synonym Total X for nabla X; end; definition let R be Relation, Y be set; redefine func R |_2 Y -> Relation of Y,Y; coherence by XBOOLE_1:17; end; theorem rng Total X = X proof for x holds x in X iff ex y st [y,x] in Total X proof let x; thus x in X implies ex y st [y,x] in Total X proof assume A1: x in X; take x; [x,x] in [:X,X:] by A1,ZFMISC_1:87; hence thesis by EQREL_1:def 1; end; given y such that A2: [y,x] in Total X; thus thesis by A2,ZFMISC_1:87; end; hence thesis by XTUPLE_0:def 13; end; theorem Th2: for x,y st x in X & y in X holds [x,y] in Total X proof let x,y; assume x in X & y in X; then [x,y] in [:X,X:] by ZFMISC_1:87; hence thesis by EQREL_1:def 1; end; theorem for x,y st x in field Total X & y in field Total X holds [x,y] in Total X proof let x,y; assume x in field Total X & y in field Total X; then x in X & y in X by ORDERS_1:12; hence thesis by Th2; end; theorem Total X is strongly_connected proof let x,y; assume x in field Total X & y in field Total X; then x in X & y in X by ORDERS_1:12; then [x,y] in [:X,X:] by ZFMISC_1:87; hence thesis by EQREL_1:def 1; end; theorem Total X is connected proof let x,y; assume that A1: x in field Total X & y in field Total X and x<>y; x in X & y in X by A1,ORDERS_1:12; then [x,y] in [:X,X:] by ZFMISC_1:87; hence thesis by EQREL_1:def 1; end; reserve T,R for Tolerance of X; theorem for T being Tolerance of X holds rng T = X proof let T be Tolerance of X; for x holds x in rng T iff x in X proof let x; x in X implies x in rng T proof field T = X by ORDERS_1:12; then A1: T is_reflexive_in X by RELAT_2:def 9; assume x in X; then [x,x] in T by A1,RELAT_2:def 1; hence thesis by XTUPLE_0:def 13; end; hence thesis; end; hence thesis by TARSKI:1; end; theorem Th7: for T being total reflexive Relation of X holds x in X iff [x,x] in T proof let T be total reflexive Relation of X; thus x in X implies [x,x] in T by EQREL_1:5; assume A1: [x,x] in T; field T = X by ORDERS_1:12; hence thesis by A1,RELAT_1:15; end; theorem for T being Tolerance of X holds T is_reflexive_in X proof let T be Tolerance of X; field T = X by ORDERS_1:12; hence thesis by RELAT_2:def 9; end; theorem for T being Tolerance of X holds T is_symmetric_in X proof let T be Tolerance of X; field T = X by ORDERS_1:12; hence thesis by RELAT_2:def 11; end; theorem Th10: for R be Relation of X,Y st R is symmetric holds R |_2 Z is symmetric proof let R be Relation of X,Y; assume R is symmetric; then A1: R is_symmetric_in field R by RELAT_2:def 11; now let x,y; assume that A2: x in field(R|_2 Z) & y in field(R|_2 Z) and A3: [x,y] in R|_2 Z; A4: [x,y] in R by A3,XBOOLE_0:def 4; A5: [y,x] in [:Z,Z:] by A3,ZFMISC_1:88; x in field R & y in field R by A2,WELLORD1:12; then [y,x] in R by A1,A4,RELAT_2:def 3; hence [y,x] in R|_2 Z by A5,XBOOLE_0:def 4; end; then R|_2 Z is_symmetric_in field(R|_2 Z) by RELAT_2:def 3; hence thesis by RELAT_2:def 11; end; definition let X,T; let Y be Subset of X; redefine func T |_2 Y -> Tolerance of Y; coherence proof now let x; assume x in Y; then [x,x] in [:Y,Y:] & [x,x] in T by Th7,ZFMISC_1:87; then [x,x] in T |_2 Y by XBOOLE_0:def 4; hence x in dom (T |_2 Y) by XTUPLE_0:def 12; end; then Y c= dom(T |_2 Y) by TARSKI:def 3; then dom(T |_2 Y) = Y by XBOOLE_0:def 10; hence T |_2 Y is Tolerance of Y by Th10,PARTFUN1:def 2,WELLORD1:15; end; end; theorem Y c= X implies T|_2 Y is Tolerance of Y proof assume Y c= X; then reconsider Z = Y as Subset of X; T |_2 Z is Tolerance of Z; hence thesis; end; definition let X; let T be Tolerance of X; mode TolSet of T -> set means :Def1: for x,y st x in it & y in it holds [x,y ] in T; existence proof take {}; let x,y; assume that A1: x in {} and y in {}; thus thesis by A1; end; end; theorem Th12: {} is TolSet of T proof let x,y; assume that A1: x in {} and y in {}; thus thesis by A1; end; definition let X; let T be Tolerance of X; let IT be TolSet of T; attr IT is TolClass-like means :Def2: for x st not x in IT & x in X ex y st y in IT & not [x,y] in T; end; registration let X; let T be Tolerance of X; cluster TolClass-like for TolSet of T; existence proof defpred X[set] means $1 is TolSet of T; consider TS being set such that A1: for x holds x in TS iff x in bool X & X[x] from XBOOLE_0:sch 1; A2: TS c= bool X proof let x; assume x in TS; hence thesis by A1; end; A3: for Z st Z c= TS & Z is c=-linear ex Y st Y in TS & for X1 being set st X1 in Z holds X1 c= Y proof let Z such that A4: Z c= TS and A5: Z is c=-linear; for x,y st x in union Z & y in union Z holds [x,y] in T proof let x,y; assume that A6: x in union Z and A7: y in union Z; consider Zy being set such that A8: y in Zy and A9: Zy in Z by A7,TARSKI:def 4; reconsider Zy as TolSet of T by A1,A4,A9; consider Zx being set such that A10: x in Zx and A11: Zx in Z by A6,TARSKI:def 4; reconsider Zx as TolSet of T by A1,A4,A11; Zx,Zy are_c=-comparable by A5,A11,A9,ORDINAL1:def 8; then Zx c= Zy or Zy c= Zx by XBOOLE_0:def 9; hence thesis by A10,A8,Def1; end; then A12: union Z is TolSet of T by Def1; take union Z; Z c= bool X by A2,A4,XBOOLE_1:1; then union Z c= union bool X by ZFMISC_1:77; then union Z c= X by ZFMISC_1:81; hence union Z in TS by A1,A12; let X1 be set; assume X1 in Z; hence thesis by ZFMISC_1:74; end; {} c= X & {} is TolSet of T by Th12,XBOOLE_1:2; then TS <> {} by A1; then consider Y such that A13: Y in TS and A14: for Z st Z in TS & Z <> Y holds not Y c= Z by A3,ORDERS_1:65; reconsider Y as TolSet of T by A1,A13; take Y; let x such that A15: not x in Y and A16: x in X; set Y1 = Y \/ {x}; A17: {x} c= X by A16,ZFMISC_1:31; assume A18: for y st y in Y holds [x,y] in T; for y,z st y in Y1 & z in Y1 holds [y,z] in T proof let y,z; assume that A19: y in Y1 and A20: z in Y1; y in Y or y in {x} by A19,XBOOLE_0:def 3; then A21: y in Y or y = x by TARSKI:def 1; z in Y or z in {x} by A20,XBOOLE_0:def 3; then A22: z in Y or z = x by TARSKI:def 1; assume A23: not [y,z] in T; then not [z,y] in T by EQREL_1:6; hence contradiction by A16,A18,A21,A22,A23,Def1,Th7; end; then A24: Y1 is TolSet of T by Def1; A25: Y1 <> Y proof A26: x in {x} by TARSKI:def 1; assume Y1 = Y; hence contradiction by A15,A26,XBOOLE_0:def 3; end; Y in bool X by A1,A13; then Y1 c= X by A17,XBOOLE_1:8; then Y1 in TS by A1,A24; hence contradiction by A14,A25,XBOOLE_1:7; end; end; definition let X; let T be Tolerance of X; mode TolClass of T is TolClass-like TolSet of T; end; theorem for T being Tolerance of X st {} is TolClass of T holds T={} proof let T be Tolerance of X; assume {} is TolClass of T; then reconsider 00 = {} as TolClass of T; assume T <> {}; then consider x,y such that A1: [x,y] in T by RELAT_1:37; x in X by A1,ZFMISC_1:87; then ex z st z in 00 & not [x,z] in T by Def2; hence contradiction; end; theorem {} is Tolerance of {} by RELSET_1:12; theorem Th15: for x,y st [x,y] in T holds {x,y} is TolSet of T proof let x,y; assume A1: [x,y] in T; then A2: x in X & y in X by ZFMISC_1:87; for a,b being set st a in {x,y} & b in {x,y} holds [a,b] in T proof let a,b be set; assume that A3: a in {x,y} and A4: b in {x,y}; A5: b = x or b = y by A4,TARSKI:def 2; a = x or a = y by A3,TARSKI:def 2; hence thesis by A1,A2,A5,Th7,EQREL_1:6; end; hence thesis by Def1; end; theorem for x st x in X holds {x} is TolSet of T proof let x; assume x in X; then [x,x] in T by Th7; then {x,x} is TolSet of T by Th15; hence thesis by ENUMSET1:29; end; theorem for Y,Z st Y is TolSet of T holds Y /\ Z is TolSet of T proof let Y,Z such that A1: Y is TolSet of T; let x,y; assume x in Y /\ Z & y in Y /\ Z; then x in Y & y in Y by XBOOLE_0:def 4; hence thesis by A1,Def1; end; theorem Th18: Y is TolSet of T implies Y c= X proof assume A1: Y is TolSet of T; let x; assume x in Y; then [x,x] in T by A1,Def1; hence thesis by Th7; end; theorem Th19: for Y being TolSet of T ex Z being TolClass of T st Y c= Z proof let Y be TolSet of T; defpred X[set] means $1 is TolSet of T & ex Z st $1=Z & Y c= Z; consider TS being set such that A1: for x holds x in TS iff x in bool X & X[x] from XBOOLE_0:sch 1; A2: for x being set holds x in TS iff x in bool X & x is TolSet of T & Y c= x proof let x be set; thus x in TS implies x in bool X & x is TolSet of T & Y c= x proof assume A3: x in TS; hence x in bool X & x is TolSet of T by A1; ex Z st x=Z & Y c= Z by A1,A3; hence thesis; end; thus thesis by A1; end; Y c= X by Th18; then A4: TS <> {} by A2; A5: TS c= bool X proof let x; assume x in TS; hence thesis by A1; end; for Z st Z c= TS & Z is c=-linear ex Y st Y in TS & for X1 being set st X1 in Z holds X1 c= Y proof let Z such that A6: Z c= TS and A7: Z is c=-linear; A8: for x,y st x in union Z & y in union Z holds [x,y] in T proof let x,y; assume that A9: x in union Z and A10: y in union Z; consider Zy being set such that A11: y in Zy and A12: Zy in Z by A10,TARSKI:def 4; reconsider Zy as TolSet of T by A1,A6,A12; consider Zx being set such that A13: x in Zx and A14: Zx in Z by A9,TARSKI:def 4; reconsider Zx as TolSet of T by A1,A6,A14; Zx, Zy are_c=-comparable by A7,A14,A12,ORDINAL1:def 8; then Zx c= Zy or Zy c= Zx by XBOOLE_0:def 9; hence thesis by A13,A11,Def1; end; A15: Z <> {} implies thesis proof assume A16: Z <> {}; A17: Y c= union Z proof set y = the Element of Z; y in TS by A6,A16,TARSKI:def 3; then A18: Y c= y by A2; let x; assume x in Y; hence thesis by A16,A18,TARSKI:def 4; end; Z c= bool X by A5,A6,XBOOLE_1:1; then union Z c= union bool X by ZFMISC_1:77; then A19: union Z c= X by ZFMISC_1:81; take union Z; union Z is TolSet of T by A8,Def1; hence union Z in TS by A2,A19,A17; let X1 be set; assume X1 in Z; hence thesis by ZFMISC_1:74; end; Z = {} implies thesis proof set Y = the Element of TS; assume A20: Z = {}; take Y; thus Y in TS by A4; let X1 be set; assume X1 in Z; hence thesis by A20; end; hence thesis by A15; end; then consider Z1 being set such that A21: Z1 in TS and A22: for Z st Z in TS & Z<>Z1 holds not Z1 c= Z by A4,ORDERS_1:65; reconsider Z1 as TolSet of T by A1,A21; Z1 is TolClass of T proof assume not thesis; then consider x such that A23: not x in Z1 and A24: x in X and A25: for y st y in Z1 holds [x,y] in T by Def2; set Y1 = Z1 \/ {x}; A26: {x} c= X by A24,ZFMISC_1:31; for y,z st y in Y1 & z in Y1 holds [y,z] in T proof let y,z; assume that A27: y in Y1 and A28: z in Y1; y in Z1 or y in {x} by A27,XBOOLE_0:def 3; then A29: y in Z1 or y = x by TARSKI:def 1; z in Z1 or z in {x} by A28,XBOOLE_0:def 3; then A30: z in Z1 or z = x by TARSKI:def 1; assume A31: not [y,z] in T; then not [z,y] in T by EQREL_1:6; hence contradiction by A24,A25,A29,A30,A31,Def1,Th7; end; then A32: Y1 is TolSet of T by Def1; Y c= Z1 & Z1 c= Y1 by A2,A21,XBOOLE_1:7; then A33: Y c= Y1 by XBOOLE_1:1; A34: Y1 <> Z1 proof A35: x in {x} by TARSKI:def 1; assume Y1 = Z1; hence contradiction by A23,A35,XBOOLE_0:def 3; end; Z1 in bool X by A1,A21; then Y1 c= X by A26,XBOOLE_1:8; then Y1 in TS by A2,A32,A33; hence contradiction by A22,A34,XBOOLE_1:7; end; then reconsider Z1 as TolClass of T; take Z1; thus thesis by A2,A21; end; theorem Th20: for x,y st [x,y] in T ex Z being TolClass of T st x in Z & y in Z proof let x,y; assume A1: [x,y] in T; then A2: x in X & y in X by ZFMISC_1:87; for a,b being set st a in {x,y} & b in {x,y} holds [a,b] in T proof let a,b be set; assume that A3: a in {x,y} and A4: b in {x,y}; A5: b = x or b = y by A4,TARSKI:def 2; a = x or a = y by A3,TARSKI:def 2; hence thesis by A1,A2,A5,Th7,EQREL_1:6; end; then reconsider PS = {x,y} as TolSet of T by Def1; consider Z being TolClass of T such that A6: PS c= Z by Th19; take Z; x in {x,y} by TARSKI:def 2; hence x in Z by A6; y in {x,y} by TARSKI:def 2; hence thesis by A6; end; theorem Th21: for x st x in X ex Z being TolClass of T st x in Z proof let x; assume x in X; then [x,x] in T by Th7; then ex Z being TolClass of T st x in Z & x in Z by Th20; hence thesis; end; theorem T c= Total X proof let x,y; assume [x,y] in T; then [x,y] in [:X,X:]; hence thesis by EQREL_1:def 1; end; theorem id X c= T proof let x,y; assume [x,y] in id X; then x in X & x = y by RELAT_1:def 10; hence thesis by Th7; end; scheme ToleranceEx{A() -> set,P[set,set]}: ex T being Tolerance of A() st for x,y st x in A() & y in A() holds [x,y] in T iff P[x,y] provided A1: for x st x in A() holds P[x,x] and A2: for x,y st x in A() & y in A() & P[x,y] holds P[y,x] proof defpred X[set] means ex y,z st $1 = [y,z] & P[y,z]; consider T being set such that A3: for x holds x in T iff x in [:A(),A():] & X[x] from XBOOLE_0:sch 1; for x st x in T holds x in [:A(),A():] by A3; then reconsider T as Relation of A(),A() by TARSKI:def 3; A4: field T c= A() \/ A() by RELSET_1:8; for x st x in field T holds [x,x] in T proof let x; assume x in field T; then [x,x] in [:A(),A():] & P[x,x] by A1,A4,ZFMISC_1:87; hence thesis by A3; end; then A5: T is_reflexive_in field T by RELAT_2:def 1; for x,y st x in field T & y in field T & [x,y] in T holds [y,x] in T proof let x,y such that A6: x in field T & y in field T and A7: [x,y] in T; x in A() & y in A() & P[x,y] proof thus x in A() & y in A() by A4,A6; consider a,b being set such that A8: [x,y] = [a,b] and A9: P[a,b] by A3,A7; x = a by A8,XTUPLE_0:1; hence thesis by A8,A9,XTUPLE_0:1; end; then [y,x] in [:A(),A():] & P[y,x] by A2,ZFMISC_1:87; hence thesis by A3; end; then A10: T is_symmetric_in field T by RELAT_2:def 3; for x st x in A() holds x in dom T proof let x; assume x in A(); then [x,x] in [:A(),A():] & P[x,x] by A1,ZFMISC_1:87; then [x,x] in T by A3; hence thesis by XTUPLE_0:def 12; end; then A() c= dom T by TARSKI:def 3; then dom T = A() by XBOOLE_0:def 10; then reconsider T as Tolerance of A() by A5,A10,PARTFUN1:def 2,RELAT_2:def 9 ,def 11; take T; let x,y; assume A11: x in A() & y in A(); thus [x,y] in T implies P[x,y] proof assume [x,y] in T; then consider a,b being set such that A12: [x,y] = [a,b] and A13: P[a,b] by A3; x = a by A12,XTUPLE_0:1; hence thesis by A12,A13,XTUPLE_0:1; end; assume A14: P[x,y]; [x,y] in [:A(),A():] by A11,ZFMISC_1:87; hence thesis by A3,A14; end; theorem for Y ex T being Tolerance of union Y st for Z st Z in Y holds Z is TolSet of T proof let Y; defpred X[set,set] means ex Z st Z in Y & $1 in Z & $2 in Z; A1: for x st x in union Y holds X[x,x] proof let x; assume x in union Y; then ex Z st x in Z & Z in Y by TARSKI:def 4; hence thesis; end; A2: for x,y st x in union Y & y in union Y & X[x,y] holds X[y,x]; consider T being Tolerance of union Y such that A3: for x,y st x in union Y & y in union Y holds [x,y] in T iff X[x,y] from ToleranceEx(A1,A2); take T; let Z such that A4: Z in Y; for x,y st x in Z & y in Z holds [x,y] in T proof let x,y; assume A5: x in Z & y in Z; then x in union Y & y in union Y by A4,TARSKI:def 4; hence thesis by A3,A4,A5; end; hence thesis by Def1; end; theorem for Y being set for T,R being Tolerance of union Y st (for x,y holds [ x,y] in T iff ex Z st Z in Y & x in Z & y in Z) & (for x,y holds [x,y] in R iff ex Z st Z in Y & x in Z & y in Z) holds T = R proof let Y be set; let T,R be Tolerance of union Y such that A1: for x,y holds [x,y] in T iff ex Z st Z in Y & x in Z & y in Z and A2: for x,y holds [x,y] in R iff ex Z st Z in Y & x in Z & y in Z; for x,y holds [x,y] in T iff [x,y] in R proof let x,y; thus [x,y] in T implies [x,y] in R proof assume [x,y] in T; then ex Z st Z in Y & x in Z & y in Z by A1; hence thesis by A2; end; assume [x,y] in R; then ex Z st Z in Y & x in Z & y in Z by A2; hence thesis by A1; end; hence thesis by RELAT_1:def 2; end; theorem Th26: for T,R being Tolerance of X st for Z holds Z is TolClass of T iff Z is TolClass of R holds T = R proof let T,R be Tolerance of X; assume A1: for Z holds Z is TolClass of T iff Z is TolClass of R; for x,y holds [x,y] in T iff [x,y] in R proof let x,y; thus [x,y] in T implies [x,y] in R proof assume [x,y] in T; then consider Z being TolClass of T such that A2: x in Z & y in Z by Th20; reconsider Z as TolClass of R by A1; Z is TolSet of R; hence thesis by A2,Def1; end; assume [x,y] in R; then consider Z being TolClass of R such that A3: x in Z & y in Z by Th20; reconsider Z as TolClass of T by A1; Z is TolSet of T; hence thesis by A3,Def1; end; hence thesis by RELAT_1:def 2; end; notation let X, Y; let T be Relation of X, Y; let x; synonym neighbourhood (x, T) for Class (T,x); end; theorem Th27: for y being set holds y in neighbourhood(x,T) iff [x,y] in T proof let y be set; hereby assume y in neighbourhood(x,T); then [y,x] in T by EQREL_1:19; hence [x,y] in T by EQREL_1:6; end; assume [x,y] in T; then [y,x] in T by EQREL_1:6; hence thesis by EQREL_1:19; end; theorem for Y st for Z being set holds Z in Y iff x in Z & Z is TolClass of T holds neighbourhood(x,T) = union Y proof let Y such that A1: for Z being set holds Z in Y iff x in Z & Z is TolClass of T; for y holds y in neighbourhood(x,T) iff y in union Y proof let y; thus y in neighbourhood(x,T) implies y in union Y proof assume y in neighbourhood(x,T); then [x,y] in T by Th27; then consider Z being TolClass of T such that A2: x in Z and A3: y in Z by Th20; Z in Y by A1,A2; hence thesis by A3,TARSKI:def 4; end; assume y in union Y; then consider Z such that A4: y in Z and A5: Z in Y by TARSKI:def 4; reconsider Z as TolClass of T by A1,A5; x in Z by A1,A5; then [x,y] in T by A4,Def1; hence thesis by Th27; end; hence thesis by TARSKI:1; end; theorem for Y st for Z holds Z in Y iff x in Z & Z is TolSet of T holds neighbourhood(x,T) = union Y proof let Y such that A1: for Z holds Z in Y iff x in Z & Z is TolSet of T; for y holds y in neighbourhood(x,T) iff y in union Y proof let y; thus y in neighbourhood(x,T) implies y in union Y proof assume y in neighbourhood(x,T); then [x,y] in T by Th27; then consider Z being TolClass of T such that A2: x in Z and A3: y in Z by Th20; Z in Y by A1,A2; hence thesis by A3,TARSKI:def 4; end; assume y in union Y; then consider Z such that A4: y in Z and A5: Z in Y by TARSKI:def 4; reconsider Z as TolSet of T by A1,A5; x in Z by A1,A5; then [x,y] in T by A4,Def1; hence thesis by Th27; end; hence thesis by TARSKI:1; end; definition let X; let T be Tolerance of X; func TolSets T -> set means :Def3: for Y holds Y in it iff Y is TolSet of T; existence proof defpred X[set] means $1 is TolSet of T; consider Z being set such that A1: x in Z iff x in bool X & X[x] from XBOOLE_0:sch 1; take Z; let Y; thus Y in Z implies Y is TolSet of T by A1; assume A2: Y is TolSet of T; for x holds x in Y implies x in X proof let x; assume x in Y; then [x,x] in T by A2,Def1; hence thesis by ZFMISC_1:87; end; then Y c= X by TARSKI:def 3; hence thesis by A1,A2; end; uniqueness proof defpred P[set] means $1 is TolSet of T; let Z1,Z2 be set such that A3: for Y holds Y in Z1 iff P[Y] and A4: for Y holds Y in Z2 iff P[Y]; Z1 = Z2 from XBOOLE_0:sch 2 (A3, A4); hence thesis; end; func TolClasses T -> set means :Def4: for Y holds Y in it iff Y is TolClass of T; existence proof defpred X[set] means $1 is TolClass of T; consider Z being set such that A5: x in Z iff x in bool X & X[x] from XBOOLE_0:sch 1; take Z; let Y; thus Y in Z implies Y is TolClass of T by A5; assume A6: Y is TolClass of T; for x holds x in Y implies x in X proof let x; assume x in Y; then [x,x] in T by A6,Def1; hence thesis by ZFMISC_1:87; end; then Y c= X by TARSKI:def 3; hence thesis by A5,A6; end; uniqueness proof defpred P[set] means $1 is TolClass of T; let C1,C2 be set such that A7: for Y holds Y in C1 iff P[Y] and A8: for Y holds Y in C2 iff P[Y]; C1 = C2 from XBOOLE_0:sch 2 (A7, A8); hence thesis; end; end; theorem TolClasses R c= TolClasses T implies R c= T proof assume A1: TolClasses R c= TolClasses T; let x,y; assume [x,y] in R; then consider Z being TolClass of R such that A2: x in Z & y in Z by Th20; Z in TolClasses R by Def4; then Z is TolSet of T by A1,Def4; hence thesis by A2,Def1; end; theorem for T,R being Tolerance of X st TolClasses T = TolClasses R holds T = R proof let T,R be Tolerance of X; assume A1: TolClasses T = TolClasses R; for Z holds Z is TolClass of T iff Z is TolClass of R proof let Z; Z is TolClass of T iff Z in TolClasses R by A1,Def4; hence thesis by Def4; end; hence thesis by Th26; end; theorem union TolClasses T = X proof for x holds x in union TolClasses T iff x in X proof let x; thus x in union TolClasses T implies x in X proof assume x in union TolClasses T; then consider Z such that A1: x in Z and A2: Z in TolClasses T by TARSKI:def 4; Z is TolSet of T by A2,Def4; then Z c= X by Th18; hence thesis by A1; end; assume x in X; then consider Z being TolClass of T such that A3: x in Z by Th21; Z in TolClasses T by Def4; hence thesis by A3,TARSKI:def 4; end; hence thesis by TARSKI:1; end; theorem union TolSets T = X proof for x holds x in union TolSets T iff x in X proof let x; thus x in union TolSets T implies x in X proof assume x in union TolSets T; then consider Z such that A1: x in Z and A2: Z in TolSets T by TARSKI:def 4; Z is TolSet of T by A2,Def3; then Z c= X by Th18; hence thesis by A1; end; assume x in X; then consider Z being TolClass of T such that A3: x in Z by Th21; Z in TolSets T by Def3; hence thesis by A3,TARSKI:def 4; end; hence thesis by TARSKI:1; end; theorem (for x st x in X holds neighbourhood(x,T) is TolSet of T) implies T is transitive proof assume A1: for x st x in X holds neighbourhood(x,T) is TolSet of T; A2: field T = X by ORDERS_1:12; for x,y,z st x in field T & y in field T & z in field T & [x,y] in T & [ y,z] in T holds [x,z] in T proof let x,y,z; assume that x in field T and A3: y in field T and z in field T and A4: [x,y] in T and A5: [y,z] in T; reconsider N = neighbourhood(y,T) as TolSet of T by A2,A1,A3; [y,x] in T by A4,EQREL_1:6; then A6: x in N by Th27; z in N by A5,Th27; hence thesis by A6,Def1; end; then T is_transitive_in field T by RELAT_2:def 8; hence thesis by RELAT_2:def 16; end; theorem T is transitive implies for x st x in X holds neighbourhood(x,T) is TolClass of T proof assume A1: T is transitive; let x; assume A2: x in X; set N = Class(T,x); field T = X by ORDERS_1:12; then A3: T is_transitive_in X by A1,RELAT_2:def 16; for y,z st y in N & z in N holds [y,z] in T proof let y,z such that A4: y in N and A5: z in N; [x,y] in T by A4,Th27; then A6: [y,x] in T by EQREL_1:6; [x,z] in T by A5,Th27; hence thesis by A3,A2,A4,A5,A6,RELAT_2:def 8; end; then reconsider Z = N as TolSet of T by Def1; for x st not x in Z & x in X ex y st y in Z & not [x,y] in T proof let y such that A7: not y in Z and y in X; A8: x in Z by A2,EQREL_1:20; assume for z st z in Z holds [y,z] in T; then [y,x] in T by A8; then [x,y] in T by EQREL_1:6; hence contradiction by A7,Th27; end; hence thesis by Def2; end; theorem for x for Y being TolClass of T st x in Y holds Y c= neighbourhood(x,T ) proof let x; let Y be TolClass of T such that A1: x in Y; for y st y in Y holds y in neighbourhood(x,T) proof let y; assume y in Y; then [x,y] in T by A1,Def1; hence thesis by Th27; end; hence thesis by TARSKI:def 3; end; theorem TolSets R c= TolSets T iff R c= T proof thus TolSets R c= TolSets T implies R c= T proof assume A1: TolSets R c= TolSets T; let x,y; assume [x,y] in R; then consider Z being TolClass of R such that A2: x in Z & y in Z by Th20; Z in TolSets R by Def3; then Z is TolSet of T by A1,Def3; hence thesis by A2,Def1; end; assume A3: R c= T; let x; assume x in TolSets R; then reconsider Z = x as TolSet of R by Def3; for x,y st x in Z & y in Z holds [x,y] in T proof let x,y; assume x in Z & y in Z; then [x,y] in R by Def1; hence thesis by A3; end; then Z is TolSet of T by Def1; hence thesis by Def3; end; theorem TolClasses T c= TolSets T proof let x; assume x in TolClasses T; then x is TolSet of T by Def4; hence thesis by Def3; end; theorem (for x st x in X holds neighbourhood(x,R) c= neighbourhood(x,T)) implies R c= T proof assume A1: for x st x in X holds neighbourhood(x,R) c= neighbourhood(x,T); let x,y; assume A2: [x,y] in R; then x in X by ZFMISC_1:87; then A3: neighbourhood(x,R) c= neighbourhood(x,T) by A1; y in neighbourhood(x,R) by A2,Th27; hence thesis by A3,Th27; end; theorem T c= T*T proof let x,y; assume A1: [x,y] in T; then y in X by ZFMISC_1:87; then [y,y] in T by Th7; hence thesis by A1,RELAT_1:def 8; end; begin reserve X,x,y,z for set, k,n,m for Element of NAT, f for Function, p,q,r for FinSequence of NAT; notation let p,q be FinSequence; synonym p is_a_prefix_of q for p c= q; end; definition let p,q be FinSequence; redefine pred p is_a_prefix_of q means :Def1: ex n st p = q|Seg n; compatibility proof thus p c= q implies ex n st p = q|Seg n proof assume A1: p c= q; consider n be Nat such that A2: dom p = Seg n by FINSEQ_1:def 2; reconsider n as Element of NAT by ORDINAL1:def 12; take n; thus thesis by A1,A2,GRFUNC_1:23; end; thus thesis by RELAT_1:59; end; end; theorem Th1: for p,q being FinSequence holds p is_a_prefix_of q iff ex r being FinSequence st q = p^r proof let p,q be FinSequence; thus p is_a_prefix_of q implies ex r being FinSequence st q = p^r proof given n such that A1: p = q|Seg n; thus thesis by A1,FINSEQ_1:80; end; given r being FinSequence such that A2: q = p^r; dom p = Seg len p & p = q|dom p by A2,FINSEQ_1:21,def 3; hence thesis by Def1; end; theorem Th2: for p,q being FinSequence st p is_a_prefix_of q & len p = len q holds p = q proof let p,q be FinSequence; assume that A1: p is_a_prefix_of q and A2: len p = len q; consider r being FinSequence such that A3: q = p^r by A1,Th1; len p = len p + len r by A2,A3,FINSEQ_1:22; then r = {}; hence thesis by A3,FINSEQ_1:34; end; theorem Th3: <*x*> is_a_prefix_of <*y*> iff x = y proof thus <*x*> is_a_prefix_of <*y*> implies x = y proof assume A1: <*x*> is_a_prefix_of <*y*>; len <*x*> = 1 & len <*y*> = 1 by FINSEQ_1:40; then A2: <*x*> = <*y*> by A1,Th2; <*x*>.1 = x by FINSEQ_1:40; hence thesis by A2,FINSEQ_1:40; end; thus thesis; end; notation let p,q be FinSequence; synonym p is_a_proper_prefix_of q for p c< q; end; Lm1: for A,B being finite set st A c= B & card A = card B holds A = B proof let A,B be finite set such that A1: A c= B and A2: card A = card B; card(B \ A) = card B - card A by A1,CARD_2:44 .= 0 by A2; then B \ A = {}; then B c= A by XBOOLE_1:37; hence thesis by A1,XBOOLE_0:def 10; end; theorem Th4: for p,q being finite set st p,q are_c=-comparable & card p = card q holds p = q proof let p,q be finite set such that A1: p c= q or q c= p and A2: card p = card q; per cases by A1; suppose p c= q; hence thesis by A2,Lm1; end; suppose q c= p; hence thesis by A2,Lm1; end; end; reserve p1,p2,p3 for FinSequence; theorem Th5: <*x*>,<*y*> are_c=-comparable implies x = y proof assume A1: <*x*>,<*y*> are_c=-comparable; len <*x*> = 1 & len <*y*> = 1 by FINSEQ_1:40; then A2: <*x*> = <*y*> by A1,Th4; <*x*>.1 = x by FINSEQ_1:40; hence thesis by A2,FINSEQ_1:40; end; theorem Th6: for p,q being finite set st p c< q holds card p < card q proof let p,q be finite set; assume that A1: p c= q and A2: p <> q; A3: card p <= card q by A1,NAT_1:43; p,q are_c=-comparable by A1,XBOOLE_0:def 9; hence thesis by A3,A2,Th4,XXREAL_0:1; end; theorem Th7: p1^<*x*> is_a_prefix_of p2 implies p1 is_a_proper_prefix_of p2 proof assume p1^<*x*> is_a_prefix_of p2; then consider p3 such that A1: p2 = p1^<*x*>^p3 by Th1; p2 = p1^(<*x*>^p3) by A1,FINSEQ_1:32; hence p1 is_a_prefix_of p2 by Th1; assume p1 = p2; then len p1 = len(p1^<*x*>) + len p3 by A1,FINSEQ_1:22 .= len p1 + len <*x*> + len p3 by FINSEQ_1:22 .= len p1 + 1 + len p3 by FINSEQ_1:39; then len p1 + 1 <= len p1 by NAT_1:11; hence contradiction by NAT_1:13; end; theorem Th8: p1 is_a_prefix_of p2 implies p1 is_a_proper_prefix_of p2^<*x*> proof assume p1 is_a_prefix_of p2; then consider p3 such that A1: p2 = p1^p3 by Th1; p2^<*x*> = p1^(p3^<*x*>) by A1,FINSEQ_1:32; hence p1 is_a_prefix_of p2^<*x*> by Th1; assume p1 = p2^<*x*>; then len p2 = len(p2^<*x*>) + len p3 by A1,FINSEQ_1:22 .= len p2 + len <*x*> + len p3 by FINSEQ_1:22 .= len p2 + 1 + len p3 by FINSEQ_1:39; then len p2 + 1 <= len p2 by NAT_1:11; hence contradiction by NAT_1:13; end; theorem Th9: p1 is_a_proper_prefix_of p2^<*x*> implies p1 is_a_prefix_of p2 proof assume that A1: p1 is_a_prefix_of p2^<*x*> and A2: p1 <> p2^<*x*>; A3: ex p3 st p2^<*x*> = p1^p3 by A1,Th1; A4: len p1 <= len(p2^<*x*>) by A1,NAT_1:43; len(p2^<*x*>) = len p2 + len <*x*> & len <*x*> = 1 by FINSEQ_1:22,39; then len p1 < len p2 + 1 by A1,A2,A4,Th2,XXREAL_0:1; then len p1 <= len p2 by NAT_1:13; then ex p3 st p1^p3 = p2 by A3,FINSEQ_1:47; hence thesis by Th1; end; theorem {} is_a_proper_prefix_of p2 or {} <> p2 implies p1 is_a_proper_prefix_of p1^p2 proof assume A1: {} is_a_proper_prefix_of p2 or {} <> p2; thus p1 is_a_prefix_of p1^p2 by Th1; assume p1 = p1^p2; then len p1 = len p1 + len p2 by FINSEQ_1:22; then p2 = {}; hence contradiction by A1; end; definition let p be FinSequence; func ProperPrefixes p -> set means :Def2: x in it iff ex q being FinSequence st x = q & q is_a_proper_prefix_of p; existence proof set E = rng p; defpred X[set] means ex q being FinSequence st $1 = q & q is_a_proper_prefix_of p; consider X such that A1: x in X iff x in E* & X[x] from XBOOLE_0:sch 1; take X; let x; thus x in X implies ex q being FinSequence st x = q & q is_a_proper_prefix_of p by A1; given q be FinSequence such that A2: x = q and A3: q is_a_proper_prefix_of p; q is_a_prefix_of p by A3,XBOOLE_0:def 8; then ex n st q = p|Seg n by Def1; then rng q c= E by RELAT_1:70; then reconsider q as FinSequence of E by FINSEQ_1:def 4; q in E* by FINSEQ_1:def 11; hence thesis by A1,A2,A3; end; uniqueness proof let S1,S2 be set such that A4: x in S1 iff ex q being FinSequence st x = q & q is_a_proper_prefix_of p and A5: x in S2 iff ex q being FinSequence st x = q & q is_a_proper_prefix_of p; defpred X[set] means ex q being FinSequence st $1 = q & q is_a_proper_prefix_of p; A6: x in S1 iff X[x] by A4; A7: x in S2 iff X[x] by A5; thus thesis from XBOOLE_0:sch 2(A6,A7); end; end; theorem Th11: for p being FinSequence st x in ProperPrefixes p holds x is FinSequence proof let p be FinSequence; assume x in ProperPrefixes p; then ex q being FinSequence st x = q & q is_a_proper_prefix_of p by Def2; hence thesis; end; theorem Th12: for p,q being FinSequence holds p in ProperPrefixes q iff p is_a_proper_prefix_of q proof let p,q be FinSequence; thus p in ProperPrefixes q implies p is_a_proper_prefix_of q proof assume p in ProperPrefixes q; then ex r being FinSequence st p = r & r is_a_proper_prefix_of q by Def2; hence thesis; end; thus thesis by Def2; end; theorem Th13: for p,q being FinSequence st p in ProperPrefixes q holds len p < len q proof let p,q be FinSequence; assume p in ProperPrefixes q; then p is_a_proper_prefix_of q by Th12; hence thesis by Th6; end; theorem for p,q,r being FinSequence st q^r in ProperPrefixes p holds q in ProperPrefixes p proof let p,q,r be FinSequence; assume A1: q^r in ProperPrefixes p; A2: q is_a_prefix_of q^r by Th1; q^r is_a_proper_prefix_of p by A1,Th12; then q is_a_proper_prefix_of p by A2,XBOOLE_1:59; hence thesis by Th12; end; theorem Th15: ProperPrefixes {} = {} proof set x = the Element of ProperPrefixes {}; assume A1: not thesis; then reconsider x as FinSequence by Th11; x is_a_proper_prefix_of {} by A1,Th12; hence contradiction by XBOOLE_1:115; end; set D = { {} }; theorem Th16: ProperPrefixes <*x*> = { {} } proof thus ProperPrefixes <*x*> c= D proof let y; assume y in ProperPrefixes <*x*>; then consider p being FinSequence such that A1: y = p and A2: p is_a_proper_prefix_of <*x*> by Def2; A3: len p < len <*x*> by A2,Th6; len <*x*> = 1 & 1 = 0+1 by FINSEQ_1:39; then p = {} by A3,NAT_1:13; hence thesis by A1,TARSKI:def 1; end; let y; assume y in D; then A4: y = {} by TARSKI:def 1; {} is_a_prefix_of <*x*> by XBOOLE_1:2; then {} is_a_proper_prefix_of <*x*> by XBOOLE_0:def 8; hence thesis by A4,Def2; end; theorem for p,q being FinSequence st p is_a_prefix_of q holds ProperPrefixes p c= ProperPrefixes q proof let p,q be FinSequence such that A1: p is_a_prefix_of q; let x; assume A2: x in ProperPrefixes p; then reconsider r = x as FinSequence by Th11; r is_a_proper_prefix_of p by A2,Th12; then r is_a_proper_prefix_of q by A1,XBOOLE_1:58; hence thesis by Th12; end; theorem Th18: for p,q,r being FinSequence st q in ProperPrefixes p & r in ProperPrefixes p holds q,r are_c=-comparable proof let p,q,r be FinSequence; assume q in ProperPrefixes p; then A1: ex q1 being FinSequence st q = q1 & q1 is_a_proper_prefix_of p by Def2; assume r in ProperPrefixes p; then A2: ex r1 being FinSequence st r = r1 & r1 is_a_proper_prefix_of p by Def2; q is_a_prefix_of p by A1,XBOOLE_0:def 8; then consider n such that A3: q = p|Seg n by Def1; r is_a_prefix_of p by A2,XBOOLE_0:def 8; then consider k such that A4: r = p|Seg k by Def1; A5: n <= k implies thesis proof assume n <= k; then Seg n c= Seg k by FINSEQ_1:5; then q = r|Seg n by A3,A4,FUNCT_1:51; then q is_a_prefix_of r by Def1; hence thesis by XBOOLE_0:def 9; end; k <= n implies thesis proof assume k <= n; then Seg k c= Seg n by FINSEQ_1:5; then r = q|Seg k by A3,A4,FUNCT_1:51; then r is_a_prefix_of q by Def1; hence thesis by XBOOLE_0:def 9; end; hence thesis by A5; end; definition let X; attr X is Tree-like means :Def3: X c= NAT* & (for p st p in X holds ProperPrefixes p c= X) & for p,k,n st p^<*k*> in X & n <= k holds p^<*n*> in X; end; registration cluster { {} } -> Tree-like; coherence proof thus D c= NAT* proof let x; assume x in D; then x = {} by TARSKI:def 1; hence thesis by FINSEQ_1:49; end; thus for p st p in D holds ProperPrefixes p c= D proof let p; assume p in D; then p = {} by TARSKI:def 1; hence thesis by Th15,XBOOLE_1:2; end; thus thesis by TARSKI:def 1; end; end; registration cluster non empty Tree-like for set; existence proof take D = { <*>(NAT) }; thus thesis; end; end; definition mode Tree is Tree-like non empty set; end; reserve T,T1 for Tree; theorem Th19: x in T implies x is FinSequence of NAT proof T c= NAT* by Def3; hence thesis by FINSEQ_1:def 11; end; definition let T; redefine mode Element of T -> FinSequence of NAT; coherence by Th19; end; theorem Th20: for p,q being FinSequence st p in T & q is_a_prefix_of p holds q in T proof let p,q be FinSequence; assume that A1: p in T and A2: q is_a_prefix_of p; reconsider r = p as Element of T by A1; A3: ProperPrefixes r c= T by Def3; q is_a_proper_prefix_of p or q = p by A2,XBOOLE_0:def 8; then q in ProperPrefixes p or p = q by Th12; hence thesis by A3; end; theorem Th21: for r being FinSequence st q^r in T holds q in T proof let r be FinSequence; assume A1: q^r in T; then reconsider p = q^r as FinSequence of NAT by Th19; reconsider s = p|Seg len q as FinSequence of NAT by FINSEQ_1:18; len p = len q + len r by FINSEQ_1:22; then len q <= len p by NAT_1:11; then A2: len s = len q by FINSEQ_1:17; now let n be Nat; assume 1 <= n & n <= len q; then A3: n in Seg len q by FINSEQ_1:1; Seg len q = dom q by FINSEQ_1:def 3; then p.n = q.n by A3,FINSEQ_1:def 7; hence q.n = s.n by A3,FUNCT_1:49; end; then q = s by A2,FINSEQ_1:14; then A4: q is_a_prefix_of p by Def1; now assume q <> p; then q is_a_proper_prefix_of p by A4,XBOOLE_0:def 8; then A5: q in ProperPrefixes p by Def2; ProperPrefixes p c= T by A1,Def3; hence thesis by A5; end; hence thesis by A1; end; theorem Th22: {} in T & <*> NAT in T proof reconsider x = the Element of T as FinSequence of NAT; x in T; then A1: {}^x in T by FINSEQ_1:34; {} = <*> NAT; hence thesis by A1,Th21; end; theorem { {} } is Tree; registration let T,T1; cluster T \/ T1 -> Tree-like; coherence proof set D = T \/ T1; T c= NAT* & T1 c= NAT* by Def3; hence D c= NAT* by XBOOLE_1:8; thus for p st p in D holds ProperPrefixes p c= D proof let p; assume p in D; then p in T or p in T1 by XBOOLE_0:def 3; then A1: ProperPrefixes p c= T or ProperPrefixes p c= T1 by Def3; T c= D & T1 c= D by XBOOLE_1:7; hence thesis by A1,XBOOLE_1:1; end; let p,k,n; assume that A2: p^<*k*> in D and A3: n <= k; p^<*k*> in T or p^<*k*> in T1 by A2,XBOOLE_0:def 3; then p^<*n*> in T or p^<*n*> in T1 by A3,Def3; hence thesis by XBOOLE_0:def 3; end; cluster T /\ T1 -> Tree-like non empty; coherence proof set D = T /\ T1; thus D is Tree-like proof T c= NAT* & T /\ T1 c= T by Def3,XBOOLE_1:17; hence D c= NAT* by XBOOLE_1:1; thus for p st p in D holds ProperPrefixes p c= D proof let p; assume A4: p in D; then A5: p in T by XBOOLE_0:def 4; A6: p in T1 by A4,XBOOLE_0:def 4; A7: ProperPrefixes p c= T by A5,Def3; ProperPrefixes p c= T1 by A6,Def3; hence thesis by A7,XBOOLE_1:19; end; let p,k,n; assume that A8: p^<*k*> in D and A9: n <= k; A10: p^<*k*> in T by A8,XBOOLE_0:def 4; A11: p^<*k*> in T1 by A8,XBOOLE_0:def 4; A12: p^<*n*> in T by A9,A10,Def3; p^<*n*> in T1 by A9,A11,Def3; hence thesis by A12,XBOOLE_0:def 4; end; {} in T & {} in T1 by Th22; hence thesis by XBOOLE_0:def 4; end; end; theorem T \/ T1 is Tree; theorem T /\ T1 is Tree; registration cluster finite for Tree; existence proof take D; thus thesis; end; end; reserve fT,fT1 for finite Tree; theorem fT \/ fT1 is finite Tree; theorem fT /\ T is finite Tree; definition let n; func elementary_tree n -> Tree equals { <*k*> : k < n } \/ { {} }; correctness proof set IT = { <*k*> : k < n } \/ D; IT is Tree-like proof thus IT c= NAT* proof let x; assume x in IT; then A1: x in { <*k*> : k < n } or x in D by XBOOLE_0:def 3; A2: {} in NAT* by FINSEQ_1:49; now assume x in { <*k*> : k < n }; then ex k st x = <*k*> & k < n; hence thesis by FINSEQ_1:def 11; end; hence thesis by A1,A2,TARSKI:def 1; end; thus for p st p in IT holds ProperPrefixes p c= IT proof let p; assume p in IT; then A3: p in { <*k*> : k < n } or p in D by XBOOLE_0:def 3; A4: {} c= IT by XBOOLE_1:2; now assume p in { <*k*> : k < n }; then ex k st p = <*k*> & k < n; then ProperPrefixes p = D by Th16; hence thesis by XBOOLE_1:7; end; hence thesis by A3,A4,Th15,TARSKI:def 1; end; let p,k,m; assume p^<*k*> in IT; then p^<*k*> in { <*j*> where j is Element of NAT : j < n } or p^<*k*> in D by XBOOLE_0:def 3; then consider l being Element of NAT such that A5: p^<*k*> = <*l*> and A6: l < n by TARSKI:def 1; len p + len <*k*> = len <*l*> by A5,FINSEQ_1:22 .= 1 by FINSEQ_1:39; then len p + 1 = 0 + 1 by FINSEQ_1:39; then A7: p = {}; then A8: <*k*> = <*l*> by A5,FINSEQ_1:34; <*k*>.1 = k by FINSEQ_1:def 8; then A9: k = l by A8,FINSEQ_1:def 8; assume A10: m <= k; A11: p^<*m*> = <*m*> by A7,FINSEQ_1:34; m < n by A6,A9,A10,XXREAL_0:2; then p^<*m*> in { <*j*> where j is Element of NAT : j < n } by A11; hence thesis by XBOOLE_0:def 3; end; hence thesis; end; end; registration let n; cluster elementary_tree n -> finite; coherence proof set IT = elementary_tree n; IT,Seg(n+1) are_equipotent proof defpred F[set,set] means $1 = {} & $2 = 1 or ex n st $1 = <*n*> & $2 = n+2; A1: x in IT & F[x,y] & F[x,z] implies y = z proof assume that x in IT and A2: (x = {} & y = 1 or ex n st x = <*n*> & y = n+2)&( x = {} & z = 1 or ex n st x = <*n*> & z = n+2); now given n1 being Element of NAT such that A3: x = <*n1*> & y = n1+2; given n2 being Element of NAT such that A4: x = <*n2*> & z = n2+2; <*n1*>.1 = n1 by FINSEQ_1:def 8; hence thesis by A3,A4,FINSEQ_1:def 8; end; hence thesis by A2; end; A5: x in IT implies ex y st F[x,y] proof assume A6: x in IT; A7: now assume x in { <*k*> : k < n }; then consider k such that A8: x = <*k*> and k < n; reconsider y = k+2 as set; take y; thus F[x,y] by A8; end; now assume A9: x in D; reconsider y = 1 as set; take y; thus F[x,y] by A9,TARSKI:def 1; end; hence thesis by A6,A7,XBOOLE_0:def 3; end; consider f such that A10: dom f = IT & for x st x in IT holds F[x,f.x] from CLASSES1:sch 1(A5); take f; thus f is one-to-one proof let x,y; assume that A11: x in dom f and A12: y in dom f and A13: f.x = f.y; A14: x = {} & f.x = 1 or ex n st x = <*n*> & f.x = n+2 by A10,A11; A15: y = {} & f.y = 1 or ex n st y = <*n*> & f.y = n+2 by A10,A12; A16: now assume that x = {} and A17: f.x = 1; given n such that y = <*n*> and A18: f.y = n+2; 0+1 = n+1+1 by A13,A17,A18; hence contradiction; end; now assume that y = {} and A19: f.y = 1; given n such that x = <*n*> and A20: f.x = n+2; 0+1 = n+1+1 by A13,A19,A20; hence contradiction; end; hence thesis by A13,A14,A15,A16; end; thus dom f = IT by A10; thus rng f c= Seg(n+1) proof let x; assume x in rng f; then consider y such that A21: y in dom f and A22: x = f.y by FUNCT_1:def 3; 1 <= 1+n by NAT_1:11; then A23: 1 in Seg(n+1) by FINSEQ_1:1; now given k such that A24: y = <*k*> and A25: x = k+2; y in { <*j*> where j is Element of NAT : j < n } or y in D by A10,A21,XBOOLE_0:def 3; then consider l being Element of NAT such that A26: y = <*l*> & l < n by A24,TARSKI:def 1; <*k*>.1 = k & <*l*>.1 = l by FINSEQ_1:def 8; then k+1 <= n by A24,A26,NAT_1:13; then 1+0 <= k+1+1 & k+1+1 <= n+1 by XREAL_1:7; hence thesis by A25,FINSEQ_1:1; end; hence thesis by A10,A21,A22,A23; end; let x; assume A27: x in Seg(n+1); then reconsider k = x as Element of NAT; A28: 1 <= k by A27,FINSEQ_1:1; A29: k <= n+1 by A27,FINSEQ_1:1; {} in D by TARSKI:def 1; then A30: {} in IT by XBOOLE_0:def 3; then F[{},f.{}] by A10; then A31: 1 in rng f by A10,A30,FUNCT_1:def 3; now assume 1 < k; then 1+1 <= k by NAT_1:13; then consider m be Nat such that A32: k = 2+m by NAT_1:10; reconsider m as Element of NAT by ORDINAL1:def 12; 1+1+m = 1+(1+m); then 1+m <= n by A29,A32,XREAL_1:6; then m < n by NAT_1:13; then <*m*> in { <*j*> where j is Element of NAT : j < n }; then A33: <*m*> in IT by XBOOLE_0:def 3; then F[<*m*>,f.<*m*>] by A10; then k = f.<*m*> by A1,A32,A33; hence k in rng f by A10,A33,FUNCT_1:def 3; end; hence thesis by A28,A31,XXREAL_0:1; end; hence thesis by CARD_1:38; end; end; theorem Th28: k < n implies <*k*> in elementary_tree n proof assume k < n; then <*k*> in { <*j*> where j is Element of NAT : j < n }; hence thesis by XBOOLE_0:def 3; end; theorem Th29: elementary_tree 0 = { {} } proof now set x = the Element of { <*j*> where j is Element of NAT : j < 0 }; assume { <*j*> where j is Element of NAT : j < 0 } <> {}; then x in { <*j*> where j is Element of NAT : j < 0 }; then ex k st x = <*k*> & k < 0; hence contradiction; end; hence thesis; end; theorem p in elementary_tree n implies p = {} or ex k st k < n & p = <*k*> proof assume p in elementary_tree n; then A1: p in D or p in { <*k*> : k < n } by XBOOLE_0:def 3; p in { <*k*> : k < n } implies ex k st p = <*k*> & k < n; hence thesis by A1,TARSKI:def 1; end; definition let T; func Leaves T -> Subset of T means :Def5: p in it iff p in T & not ex q st q in T & p is_a_proper_prefix_of q; existence proof defpred X[set] means for p st $1 = p for q st q in T holds not p is_a_proper_prefix_of q; consider X such that A1: x in X iff x in T & X[x] from XBOOLE_0:sch 1; X c= T proof let x; thus thesis by A1; end; then reconsider X as Subset of T; take X; let p; thus p in X implies p in T & not ex q st q in T & p is_a_proper_prefix_of q by A1; assume that A2: p in T and A3: not ex q st q in T & p is_a_proper_prefix_of q; for r being FinSequence of NAT st p = r for q st q in T holds not r is_a_proper_prefix_of q by A3; hence thesis by A1,A2; end; uniqueness proof let L1,L2 be Subset of T such that A4: p in L1 iff p in T & not ex q st q in T & p is_a_proper_prefix_of q and A5: p in L2 iff p in T & not ex q st q in T & p is_a_proper_prefix_of q; A6: T c= NAT* by Def3; then A7: L1 c= NAT* by XBOOLE_1:1; A8: L2 c= NAT* by A6,XBOOLE_1:1; now let x; thus x in L1 implies x in L2 proof assume A9: x in L1; then reconsider p = x as FinSequence of NAT by A7,FINSEQ_1:def 11; not ex q st q in T & p is_a_proper_prefix_of q by A4,A9; hence thesis by A5,A9; end; assume A10: x in L2; then reconsider p = x as FinSequence of NAT by A8,FINSEQ_1:def 11; not ex q st q in T & p is_a_proper_prefix_of q by A5,A10; hence x in L1 by A4,A10; end; hence thesis by TARSKI:1; end; let p such that B11: p in T; func T|p -> Tree means :Def6: q in it iff p^q in T; existence proof defpred X[set] means for q st $1 = q holds p^q in T; consider X such that A11: x in X iff x in NAT* & X[x] from XBOOLE_0:sch 1; <*> NAT in NAT* & for q st <*> NAT = q holds p^q in T by B11,FINSEQ_1:34,def 11; then reconsider X as non empty set by A11; A12: X c= NAT* proof let x; thus thesis by A11; end; A13: now let q such that A14: q in X; thus ProperPrefixes q c= X proof let x; assume x in ProperPrefixes q; then consider r being FinSequence such that A15: x = r and A16: r is_a_proper_prefix_of q by Def2; r is_a_prefix_of q by A16,XBOOLE_0:def 8; then A17: ex n st r = q|Seg n by Def1; then reconsider r as FinSequence of NAT by FINSEQ_1:18; consider s being FinSequence such that A18: q = r^s by A17,FINSEQ_1:80; A19: p^q in T by A11,A14; p^q = p^r^s by A18,FINSEQ_1:32; then r in NAT* & for q st r = q holds p^q in T by A19,Th21,FINSEQ_1:def 11; hence thesis by A11,A15; end; end; now let q,k,n; assume that A20: q^<*k*> in X and A21: n <= k; p^(q^<*k*>) in T by A11,A20; then p^q^<*k*> in T by FINSEQ_1:32; then p^q^<*n*> in T by A21,Def3; then q ^<*n*> in NAT* & for r st r = q^<*n*> holds p^r in T by FINSEQ_1:32,def 11; hence q^<*n*> in X by A11; end; then reconsider X as Tree by A12,A13,Def3; take X; let q; thus q in X implies p^q in T by A11; assume p^q in T; then q in NAT* & for r be FinSequence of NAT st q = r holds p^r in T by FINSEQ_1:def 11; hence thesis by A11; end; uniqueness proof let T1,T2 be Tree such that A22: q in T1 iff p^q in T and A23: q in T2 iff p^q in T; now let x; thus x in T1 implies x in T2 proof assume A24: x in T1; then reconsider q = x as FinSequence of NAT by Th19; p^q in T by A22,A24; hence thesis by A23; end; assume A25: x in T2; then reconsider q = x as FinSequence of NAT by Th19; p^q in T by A23,A25; hence x in T1 by A22; end; hence thesis by TARSKI:1; end; end; theorem T|(<*> NAT) = T proof A1: <*> NAT in T by Th22; thus T|(<*> NAT) c= T proof let x; assume x in T|(<*> NAT); then reconsider p = x as Element of T|(<*> NAT); {}^p = p by FINSEQ_1:34; hence thesis by A1,Def6; end; let x; assume x in T; then reconsider p = x as Element of T; {}^p = p by FINSEQ_1:34; hence thesis by A1,Def6; end; registration let T be finite Tree; let p be Element of T; cluster T|p -> finite; coherence proof consider t being Function such that A1: rng t = T and A2: dom t in omega by FINSET_1:def 1; defpred P[set,set] means ex q st t.$1 = q & ((ex r st $2 = r & q = p^r) or (for r holds q <> p^r) & $2 = <*> NAT); A3: for x st x in dom t ex y st P[x,y] proof let x; assume x in dom t; then t.x in T by A1,FUNCT_1:def 3; then reconsider q = t.x as FinSequence of NAT by Th19; (ex r st q = p^r) implies thesis; hence thesis; end; consider f being Function such that A4: dom f = dom t & for x st x in dom t holds P[x,f.x] from CLASSES1:sch 1( A3); T|p is finite proof take f; thus rng f c= T|p proof let x; assume x in rng f; then consider y such that A5: y in dom f and A6: x = f.y by FUNCT_1:def 3; consider q such that A7: t.y = q and A8: (ex r st x = r & q = p^r) or (for r holds q <> p^r) & x = <*> NAT by A4,A5,A6; assume A9: not x in T|p; p ^(<*> NAT) = p & q in T by A1,A4,A5,A7,FINSEQ_1:34,FUNCT_1:def 3; hence contradiction by A8,A9,Def6; end; thus T|p c= rng f proof let x; assume A10: x in T|p; then reconsider q = x as FinSequence of NAT by Th19; p^q in T by A10,Def6; then consider y such that A11: y in dom t and A12: p^q = t.y by A1,FUNCT_1:def 3; P[y,f.y] by A4,A11; then x = f.y by A12,FINSEQ_1:33; hence thesis by A4,A11,FUNCT_1:def 3; end; thus thesis by A2,A4; end; hence thesis; end; end; definition let T; assume A1: Leaves T <> {}; mode Leaf of T -> Element of T means it in Leaves T; existence proof set x = the Element of Leaves T; reconsider x as Element of T by A1,TARSKI:def 3; take x; thus thesis by A1; end; end; definition let T; mode Subtree of T -> Tree means ex p being Element of T st it = T|p; existence proof set p = the Element of T; take T|p, p; thus thesis; end; end; reserve t for Element of T; definition let T,p,T1; assume A1: p in T; func T with-replacement (p,T1) -> Tree means :Def9: q in it iff q in T & not p is_a_proper_prefix_of q or ex r st r in T1 & q = p^r; existence proof reconsider p9 = p as Element of T by A1; not p is_a_proper_prefix_of p9; then p in { t : not p is_a_proper_prefix_of t }; then reconsider X = { t : not p is_a_proper_prefix_of t } \/ { p^s where s is Element of T1 : s = s } as non empty set; A2: x in { t : not p is_a_proper_prefix_of t } implies x is FinSequence of NAT & x in NAT* & x in T proof assume x in { t : not p is_a_proper_prefix_of t }; then A3: ex t st x = t & not p is_a_proper_prefix_of t; hence x is FinSequence of NAT; thus thesis by A3,FINSEQ_1:def 11; end; X is Tree-like proof thus X c= NAT* proof let x; assume x in X; then A4: x in { t : not p is_a_proper_prefix_of t } or x in { p^s where s is Element of T1 : s = s } by XBOOLE_0:def 3; now assume x in { p^s where s is Element of T1 : s = s }; then ex s being Element of T1 st x = p^s & s = s; hence x is FinSequence of NAT; end; hence thesis by A2,A4,FINSEQ_1:def 11; end; thus for q st q in X holds ProperPrefixes q c= X proof let q such that A5: q in X; A6: now assume q in { t : not p is_a_proper_prefix_of t }; then A7: ex t st q = t & not p is_a_proper_prefix_of t; then A8: ProperPrefixes q c= T by Def3; thus ProperPrefixes q c= X proof let x; assume A9: x in ProperPrefixes q; then consider p1 such that A10: x = p1 and A11: p1 is_a_proper_prefix_of q by Def2; reconsider p1 as Element of T by A8,A9,A10; not p is_a_proper_prefix_of p1 by A7,A11,XBOOLE_1:56; then x in { s1 where s1 is Element of T : not p is_a_proper_prefix_of s1 } by A10; hence thesis by XBOOLE_0:def 3; end; end; now assume q in { p^s where s is Element of T1 : s = s }; then consider s being Element of T1 such that A12: q = p^s and s = s; thus ProperPrefixes q c= X proof let x; assume A13: x in ProperPrefixes q; then reconsider r = x as FinSequence by Th11; r is_a_proper_prefix_of p^s by A12,A13,Th12; then r is_a_prefix_of p^s by XBOOLE_0:def 8; then consider r1 being FinSequence such that A14: p^s = r^r1 by Th1; A15: now assume len p <= len r; then consider r2 being FinSequence such that A16: p^r2 = r by A14,FINSEQ_1:47; p^s = p^(r2^r1) by A14,A16,FINSEQ_1:32; then s = r2^r1 by FINSEQ_1:33; then A17: dom r2 = Seg len r2 & s|dom r2 = r2 by FINSEQ_1:21,def 3; then reconsider r2 as FinSequence of NAT by FINSEQ_1:18; r2 is_a_prefix_of s by A17,Def1; then reconsider r2 as Element of T1 by Th20; r = p^r2 by A16; then r in { p^v where v is Element of T1 : v = v }; hence r in X by XBOOLE_0:def 3; end; now assume len r <= len p; then ex r2 being FinSequence st r^r2 = p by A14,FINSEQ_1:47; then A18: p|dom r = r by FINSEQ_1:21; A19: dom r = Seg len r by FINSEQ_1:def 3; then reconsider r3 = r as FinSequence of NAT by A18,FINSEQ_1:18; A20: r3 is_a_prefix_of p by A18,A19,Def1; then A21: not p is_a_proper_prefix_of r3 by XBOOLE_0:def 8; reconsider r3 as Element of T by A1,A20,Th20; r3 in { t : not p is_a_proper_prefix_of t } by A21; hence r in X by XBOOLE_0:def 3; end; hence thesis by A15; end; end; hence thesis by A5,A6,XBOOLE_0:def 3; end; let q,k,n such that A22: q^<*k*> in X and A23: n <= k; A24: now assume q^<*k*> in { t : not p is_a_proper_prefix_of t }; then A25: ex s being Element of T st q^<*k*> = s & not p is_a_proper_prefix_of s; then reconsider u = q^<*n*> as Element of T by A23,Def3; now assume p is_a_proper_prefix_of u; then p is_a_prefix_of q by Th9; hence contradiction by A25,Th8; end; then q^<*n*> in { t : not p is_a_proper_prefix_of t }; hence thesis by XBOOLE_0:def 3; end; now assume q^<*k*> in { p^s where s is Element of T1 : s = s }; then consider s being Element of T1 such that A26: q^<*k*> = p^s and s = s; A27: now assume len q <= len p; then consider r being FinSequence such that A28: q^r = p by A26,FINSEQ_1:47; q^<*k*> = q^(r^s) by A26,A28,FINSEQ_1:32; then A29: <*k*> = r^s by FINSEQ_1:33; A30: now assume A31: r = <*k*>; then reconsider s = q^<*n*> as Element of T by A1,A23,A28,Def3; now assume A32: p is_a_proper_prefix_of s; then A33: p is_a_prefix_of s by XBOOLE_0:def 8; len p = len q + len <*k*> by A28,A31,FINSEQ_1:22 .= len q + 1 by FINSEQ_1:40 .= len q + len <*n*> by FINSEQ_1:40 .= len s by FINSEQ_1:22; hence contradiction by A32,A33,Th2; end; hence q^<*n*> in { t : not p is_a_proper_prefix_of t }; end; now assume that A34: s = <*k*> and A35: r = {}; s = {}^s & {} = <*> NAT by FINSEQ_1:34; then {}^<*n*> in T1 by A23,A34,Def3; then reconsider t = <*n*> as Element of T1 by FINSEQ_1:34; q^<*n*> = p^t by A28,A35,FINSEQ_1:34; hence q^<*n*> in { p^v where v is Element of T1 : v = v }; end; hence thesis by A29,A30,FINSEQ_1:88,XBOOLE_0:def 3; end; now assume len p <= len q; then consider r being FinSequence such that A36: p^r = q by A26,FINSEQ_1:47; p^(r^<*k*>) = p^s by A26,A36,FINSEQ_1:32; then A37: r^<*k*> = s by FINSEQ_1:33; then dom r = Seg len r & s|dom r = r by FINSEQ_1:21,def 3; then reconsider r as FinSequence of NAT by FINSEQ_1:18; reconsider t = r^<*n*> as Element of T1 by A23,A37,Def3; q^<*n*> = p^t by A36,FINSEQ_1:32; then q^<*n*> in { p^v where v is Element of T1 : v = v }; hence thesis by XBOOLE_0:def 3; end; hence thesis by A27; end; hence thesis by A22,A24,XBOOLE_0:def 3; end; then reconsider X as Tree; take X; let q; thus q in X implies q in T & not p is_a_proper_prefix_of q or ex r st r in T1 & q = p^r proof assume A38: q in X; A39: now assume q in { t : not p is_a_proper_prefix_of t }; then ex s being Element of T st q = s & not p is_a_proper_prefix_of s; hence thesis; end; now assume q in { p^s where s is Element of T1 : s = s }; then ex s being Element of T1 st q = p^s & s = s; hence ex r st r in T1 & q = p^r; end; hence thesis by A38,A39,XBOOLE_0:def 3; end; assume A40: q in T & not p is_a_proper_prefix_of q or ex r st r in T1 & q = p^r; A41: q in T & not p is_a_proper_prefix_of q implies q in { t : not p is_a_proper_prefix_of t }; (ex r st r in T1 & q = p^r) implies q in { p^v where v is Element of T1 : v = v }; hence thesis by A40,A41,XBOOLE_0:def 3; end; uniqueness proof let S1,S2 be Tree such that A42: q in S1 iff q in T & not p is_a_proper_prefix_of q or ex r st r in T1 & q = p^r and A43: q in S2 iff q in T & not p is_a_proper_prefix_of q or ex r st r in T1 & q = p^r; thus S1 c= S2 proof let x; assume A44: x in S1; then reconsider q = x as FinSequence of NAT by Th19; q in T & not p is_a_proper_prefix_of q or ex r st r in T1 & q = p^ r by A42,A44; hence thesis by A43; end; let x; assume A45: x in S2; then reconsider q = x as FinSequence of NAT by Th19; q in T & not p is_a_proper_prefix_of q or ex r st r in T1 & q = p^r by A43,A45; hence thesis by A42; end; end; theorem Th32: p in T implies T with-replacement (p,T1) = { t1 where t1 is Element of T : not p is_a_proper_prefix_of t1 } \/ { p^s where s is Element of T1 : s = s } proof assume A1: p in T; thus T with-replacement (p,T1) c= { t : not p is_a_proper_prefix_of t } \/ { p^s where s is Element of T1 : s = s } proof let x; assume A2: x in T with-replacement (p,T1); then reconsider q = x as FinSequence of NAT by Th19; A3: (ex r st r in T1 & q = p^r) implies x in { p^s where s is Element of T1 : s = s }; q in T & not p is_a_proper_prefix_of q implies x in { t : not p is_a_proper_prefix_of t }; hence thesis by A1,A2,A3,Def9,XBOOLE_0:def 3; end; let x such that A4: x in { t : not p is_a_proper_prefix_of t } \/ { p^s where s is Element of T1 : s = s }; A5: now assume x in { p^s where s is Element of T1 : s = s }; then ex s being Element of T1 st x = p^s & s = s; hence thesis by A1,Def9; end; now assume x in { t : not p is_a_proper_prefix_of t }; then ex t st x = t & not p is_a_proper_prefix_of t; hence thesis by A1,Def9; end; hence thesis by A4,A5,XBOOLE_0:def 3; end; theorem p in T implies T1 = T with-replacement (p,T1)|p proof assume A1: p in T; then A2: p in T with-replacement (p,T1) by Def9; thus T1 c= T with-replacement (p,T1)|p proof let x; assume A3: x in T1; then reconsider q = x as FinSequence of NAT by Th19; p^q in T with-replacement (p,T1) by A1,A3,Def9; hence thesis by A2,Def6; end; let x; assume A4: x in T with-replacement (p,T1)|p; then reconsider q = x as FinSequence of NAT by Th19; A5: p^q in T with-replacement (p,T1) by A2,A4,Def6; A6: now assume that p^q in T and A7: not p is_a_proper_prefix_of p^q; p is_a_prefix_of p^q by Th1; then p^q = p by A7,XBOOLE_0:def 8 .= p^{} by FINSEQ_1:34; then q = {} by FINSEQ_1:33; hence q in T1 by Th22; end; (ex r st r in T1 & p^q = p^r) implies q in T1 by FINSEQ_1:33; hence thesis by A1,A5,A6,Def9; end; registration let T be finite Tree, t be Element of T; let T1 be finite Tree; cluster T with-replacement (t,T1) -> finite; coherence proof A1: { s where s is Element of T : not t is_a_proper_prefix_of s } c= T proof let x; assume x in { s where s is Element of T : not t is_a_proper_prefix_of s }; then ex s being Element of T st x = s & not t is_a_proper_prefix_of s; hence thesis; end; T1,{ t^s where s is Element of T1 : s = s } are_equipotent proof defpred P[set,set] means ex q st $1 = q & $2 = t^q; A2: x in T1 implies ex y st P[x,y] proof assume x in T1; then reconsider q = x as FinSequence of NAT by Th19; t^q = t^q; hence thesis; end; consider f such that A3: dom f = T1 & for x st x in T1 holds P[x,f.x] from CLASSES1:sch 1(A2); take f; thus f is one-to-one proof let x,y; assume that A4: x in dom f & y in dom f and A5: f.x = f.y; ( ex q st x = q & f.x = t^q)& ex r st y = r & f.y = t^r by A3,A4; hence thesis by A5,FINSEQ_1:33; end; thus dom f = T1 by A3; thus rng f c= { t^s where s is Element of T1 : s = s } proof let x; assume x in rng f; then consider y such that A6: y in dom f and A7: x = f.y by FUNCT_1:def 3; consider q such that A8: y = q and A9: f.y = t^q by A3,A6; reconsider q as Element of T1 by A3,A6,A8; x = t^q by A7,A9; hence thesis; end; let x; assume x in { t^s where s is Element of T1 : s = s }; then consider s being Element of T1 such that A10: x = t^s and s = s; P[s,f.s] by A3; hence thesis by A3,A10,FUNCT_1:def 3; end; then { t^s where s is Element of T1 : s = s } is finite by CARD_1:38; then { v where v is Element of T : not t is_a_proper_prefix_of v } \/ { t^s where s is Element of T1 : s = s } is finite by A1; hence thesis by Th32; end; end; reserve w for FinSequence; theorem Th34: for p being FinSequence holds ProperPrefixes p,dom p are_equipotent proof let p be FinSequence; defpred P[set,set] means ex w st $1 = w & $2 = (len w)+1; A1: for x st x in ProperPrefixes p ex y st P[x,y] proof let x; assume x in ProperPrefixes p; then consider q being FinSequence such that A2: x = q and q is_a_proper_prefix_of p by Def2; reconsider y = (len q)+1 as set; take y,q; thus thesis by A2; end; consider f such that A3: dom f = ProperPrefixes p and A4: for x st x in ProperPrefixes p holds P[x,f.x] from CLASSES1:sch 1(A1); take f; thus f is one-to-one proof let x,y; assume that A5: x in dom f & y in dom f and A6: f.x = f.y; ( ex q being FinSequence st x = q & f.x = (len q)+1 )& ex r being FinSequence st y = r & f.x = (len r)+1 by A3,A4,A5,A6; hence thesis by A3,A5,Th4,Th18; end; thus dom f = ProperPrefixes p by A3; thus rng f c= dom p proof let x; assume x in rng f; then consider y such that A7: y in dom f and A8: x = f.y by FUNCT_1:def 3; consider q being FinSequence such that A9: y = q and A10: x = (len q)+1 by A3,A4,A7,A8; len q < len p by A3,A7,A9,Th13; then 0+1 <= (len q)+1 & (len q)+1 <= len p by NAT_1:13; then x in Seg len p by A10,FINSEQ_1:1; hence thesis by FINSEQ_1:def 3; end; let x; assume A11: x in dom p; then A12: x in Seg len p by FINSEQ_1:def 3; reconsider n = x as Element of NAT by A11; A13: 1 <= n by A12,FINSEQ_1:1; A14: n <= len p by A12,FINSEQ_1:1; consider m be Nat such that A15: n = 1+m by A13,NAT_1:10; reconsider m as Element of NAT by ORDINAL1:def 12; reconsider q = p|Seg m as FinSequence by FINSEQ_1:15; A16: m <= len p by A14,A15,NAT_1:13; A17: m <> len p by A14,A15,NAT_1:13; A18: len q = m by A16,FINSEQ_1:17; A19: q is_a_prefix_of p by Def1; len q = m by A16,FINSEQ_1:17; then q is_a_proper_prefix_of p by A17,A19,XBOOLE_0:def 8; then A20: q in ProperPrefixes p by Th12; then ex r being FinSequence st q = r & f.q = (len r)+1 by A4; hence thesis by A3,A15,A18,A20,FUNCT_1:def 3; end; registration let p be FinSequence; cluster ProperPrefixes p -> finite; coherence proof ProperPrefixes p,dom p are_equipotent by Th34; hence thesis by CARD_1:38; end; end; theorem for p being FinSequence holds card ProperPrefixes p = len p proof let p be FinSequence; A1: dom p = Seg len p by FINSEQ_1:def 3; A2: ProperPrefixes p,dom p are_equipotent by Th34; card dom p = card len p by A1,FINSEQ_1:55; hence thesis by A2,CARD_1:5; end; definition let IT be set; attr IT is AntiChain_of_Prefixes-like means :Def10: (for x st x in IT holds x is FinSequence) & for p1,p2 st p1 in IT & p2 in IT & p1 <> p2 holds not p1,p2 are_c=-comparable; end; registration cluster AntiChain_of_Prefixes-like for set; existence proof take {}; thus for x st x in {} holds x is FinSequence; let p1,p2; thus thesis; end; end; definition mode AntiChain_of_Prefixes is AntiChain_of_Prefixes-like set; end; theorem Th36: { w } is AntiChain_of_Prefixes-like proof thus for x st x in { w } holds x is FinSequence by TARSKI:def 1; let p1,p2; assume that A1: p1 in { w } and A2: p2 in { w }; p1 = w by A1,TARSKI:def 1; hence thesis by A2,TARSKI:def 1; end; theorem Th37: not p1,p2 are_c=-comparable implies { p1,p2 } is AntiChain_of_Prefixes-like proof assume A1: not p1,p2 are_c=-comparable; thus for x st x in { p1,p2 } holds x is FinSequence by TARSKI:def 2; let q1,q2 be FinSequence; assume that A2: q1 in { p1,p2 } and A3: q2 in { p1,p2 }; A4: q1 = p1 or q1 = p2 by A2,TARSKI:def 2; q2 = p1 or q2 = p2 by A3,TARSKI:def 2; hence thesis by A1,A4; end; definition let T; mode AntiChain_of_Prefixes of T -> AntiChain_of_Prefixes means :Def11: it c= T; existence proof set t = the Element of T; reconsider S = { t } as AntiChain_of_Prefixes by Th36; take S; let x; assume x in S; then x = t by TARSKI:def 1; hence thesis; end; end; reserve t1,t2 for Element of T; theorem Th38: {} is AntiChain_of_Prefixes of T & { {} } is AntiChain_of_Prefixes of T proof {} is AntiChain_of_Prefixes-like proof thus for x st x in {} holds x is FinSequence; let p1,p2; thus thesis; end; then reconsider S = {} as AntiChain_of_Prefixes; S c= T by XBOOLE_1:2; hence {} is AntiChain_of_Prefixes of T by Def11; reconsider S = D as AntiChain_of_Prefixes by Th36; S is AntiChain_of_Prefixes of T proof let x; assume x in S; then x = {} by TARSKI:def 1; hence thesis by Th22; end; hence thesis; end; theorem { t } is AntiChain_of_Prefixes of T proof reconsider S = { t } as AntiChain_of_Prefixes by Th36; S is AntiChain_of_Prefixes of T proof let x; assume x in S; then x = t by TARSKI:def 1; hence thesis; end; hence thesis; end; theorem not t1,t2 are_c=-comparable implies { t1,t2 } is AntiChain_of_Prefixes of T proof assume not t1,t2 are_c=-comparable; then reconsider A = { t1,t2 } as AntiChain_of_Prefixes by Th37; A is AntiChain_of_Prefixes of T proof let x; assume x in A; then x = t1 or x = t2 by TARSKI:def 2; hence thesis; end; hence thesis; end; registration let T be finite Tree; cluster -> finite for AntiChain_of_Prefixes of T; coherence proof let X be AntiChain_of_Prefixes of T; X c= T by Def11; hence thesis; end; end; definition let T be finite Tree; func height T -> Element of NAT means :Def12: (ex p st p in T & len p = it) & for p st p in T holds len p <= it; existence proof consider n be Nat such that A1: T,Seg n are_equipotent by FINSEQ_1:56; defpred X[Nat] means for p st p in T holds len p <= $1; A2: ex n be Nat st X[n] proof now given p such that A3: p in T and A4: not len p <= n; A5: ProperPrefixes p c= T by A3,Def3; A6: ProperPrefixes p,dom p are_equipotent by Th34; A7: card ProperPrefixes p c= card T by A5,CARD_1:11; A8: card ProperPrefixes p = card dom p by A6,CARD_1:5; A9: card T = card Seg n & dom p = Seg len p by A1,CARD_1:5,FINSEQ_1:def 3; Seg n c= Seg len p by A4,FINSEQ_1:5; then A10: card Seg n c= card Seg len p by CARD_1:11; card Seg n = card n & card Seg len p = card len p by FINSEQ_1:55; then card n = card len p by A7,A8,A9,A10,XBOOLE_0:def 10; hence contradiction by A4,CARD_1:40; end; then consider n be Nat such that A11: X[n]; reconsider n as Element of NAT by ORDINAL1:def 12; take n; thus thesis by A11; end; consider n being Nat such that A12: X[n] and A13: for m be Nat st X[m] holds n <= m from NAT_1:sch 5(A2); set x = the Element of T; reconsider n as Element of NAT by ORDINAL1:def 12; take n; thus ex p st p in T & len p = n proof assume A14: for p st p in T holds len p <> n; reconsider x as FinSequence of NAT; len x <= n by A12; then len x < n by A14,XXREAL_0:1; then consider k be Nat such that A15: n = k+1 by NAT_1:6; reconsider k as Element of NAT by ORDINAL1:def 12; for p st p in T holds len p <= k proof let p; assume A16: p in T; then len p <= n by A12; then len p < k+1 by A14,A15,A16,XXREAL_0:1; hence thesis by NAT_1:13; end; then n <= k by A13; hence contradiction by A15,NAT_1:13; end; let p; assume p in T; hence thesis by A12; end; uniqueness proof let l1,l2 be Element of NAT; given p1 being FinSequence of NAT such that A17: p1 in T & len p1 = l1; assume A18: for p st p in T holds len p <= l1; given p2 being FinSequence of NAT such that A19: p2 in T & len p2 = l2; assume for p st p in T holds len p <= l2; then A20: l1 <= l2 by A17; l2 <= l1 by A18,A19; hence thesis by A20,XXREAL_0:1; end; func width T -> Element of NAT means :Def13: ex X being AntiChain_of_Prefixes of T st it = card X & for Y being AntiChain_of_Prefixes of T holds card Y <= card X; existence proof defpred X[Nat] means ex X being finite set st $1 = card X & X c= T & (for p,q st p in X & q in X & p <> q holds not p,q are_c=-comparable); 0 = card {} & for p,q st p in {} & q in {} & p <> q holds not p,q are_c=-comparable; then A21: ex n be Nat st X[n] by XBOOLE_1:2; A22: for n be Nat st X[n] holds n <= card T proof let n be Nat; given X being finite set such that A23: n = card X & X c= T and for p,q st p in X & q in X & p <> q holds not p,q are_c=-comparable; A24: card X c= card T & card X = card n by A23,CARD_1:11; card T = card card T; hence thesis by A24,NAT_1:40; end; consider n being Nat such that A25: X[n] and A26: for m be Nat st X[m] holds m <= n from NAT_1:sch 6(A22,A21); consider X being finite set such that A27: n = card X and A28: X c= T and A29: for p,q st p in X & q in X & p <> q holds not p,q are_c=-comparable by A25; X is AntiChain_of_Prefixes-like proof thus for x st x in X holds x is FinSequence proof let x; assume A30: x in X; T c= NAT* by Def3; hence thesis by A30,A28; end; let p1,p2; assume A31: p1 in X & p2 in X; then reconsider q1 = p1, q2 = p2 as Element of T by A28; p1 = q1 & p2 = q2; hence thesis by A29,A31; end; then reconsider X as AntiChain_of_Prefixes; reconsider X as AntiChain_of_Prefixes of T by A28,Def11; reconsider n as Element of NAT by ORDINAL1:def 12; take n,X; thus n = card X by A27; let Y be AntiChain_of_Prefixes of T; Y c= T & for p,q st p in Y & q in Y & p <> q holds not p,q are_c=-comparable by Def10,Def11; hence thesis by A26,A27; end; uniqueness proof let n1,n2 be Element of NAT; given X1 being AntiChain_of_Prefixes of T such that A32: n1 = card X1 and A33: for Y being AntiChain_of_Prefixes of T holds card Y <= card X1; given X2 being AntiChain_of_Prefixes of T such that A34: n2 = card X2 and A35: for Y being AntiChain_of_Prefixes of T holds card Y <= card X2; A36: card X1 <= card X2 by A35; card X2 <= card X1 by A33; hence thesis by A32,A34,A36,XXREAL_0:1; end; end; theorem 1 <= width fT proof ( ex X being AntiChain_of_Prefixes of fT st width fT = card X & for Y being AntiChain_of_Prefixes of fT holds card Y <= card X)& D is AntiChain_of_Prefixes of fT by Def13,Th38; then card D <= width fT; hence thesis by CARD_1:30; end; theorem height elementary_tree 0 = 0 proof now thus ex p st p in elementary_tree 0 & len p = 0 proof take <*> NAT; thus thesis by Th29,TARSKI:def 1; end; let p; assume p in elementary_tree 0; then p = {} by Th29,TARSKI:def 1; hence len p <= 0; end; hence thesis by Def12; end; theorem height fT = 0 implies fT = elementary_tree 0 proof assume A1: height fT = 0; thus fT c= elementary_tree 0 proof let x; assume x in fT; then reconsider t = x as Element of fT; len t = 0 by A1,Def12; then x = {}; hence thesis by Th22; end; let x; assume x in elementary_tree 0; then x = {} by Th29,TARSKI:def 1; hence thesis by Th22; end; theorem height elementary_tree(n+1) = 1 proof set T = elementary_tree(n+1); now thus ex p st p in T & len p = 1 proof take p = <*0*>; thus p in T by Th28; thus thesis by FINSEQ_1:40; end; let p such that A1: p in T; A2: p in D implies p = {} by TARSKI:def 1; now assume p in { <*k*> : k < n+1 }; then ex k st p = <*k*> & k < n+1; hence len p = 1 by FINSEQ_1:40; end; hence len p <= 1 by A1,A2,XBOOLE_0:def 3; end; hence thesis by Def12; end; theorem width elementary_tree 0 = 1 proof set T = elementary_tree 0; now reconsider X = D as AntiChain_of_Prefixes of T by Th38; take X; thus 1 = card X by CARD_1:30; let Y be AntiChain_of_Prefixes of T; Y c= X by Def11,Th29; hence card Y <= card X by NAT_1:43; end; hence thesis by Def13; end; theorem width elementary_tree(n+1) = n+1 proof set T = elementary_tree(n+1); now { <*k*> : k < n+1 } is AntiChain_of_Prefixes-like proof thus x in { <*k*> : k < n+1 } implies x is FinSequence proof assume x in { <*k*> : k < n+1 }; then ex k st x = <*k*> & k < n+1; hence thesis; end; let p1,p2; assume p1 in { <*k*> : k < n+1 } & p2 in { <*m*> : m < n+1 }; then ( ex k st p1 = <*k*> & k < n+1)& ex m st p2 = <*m*> & m < n+1; hence thesis by Th5; end; then reconsider X = { <*k*> : k < n+1 } as AntiChain_of_Prefixes; X c= T by XBOOLE_1:7; then reconsider X as AntiChain_of_Prefixes of T by Def11; take X; X,Seg(n+1) are_equipotent proof defpred P[set,set] means ex n st $1 = <*n*> & $2 = n+1; A1: x in X & P[x,y] & P[x,z] implies y = z proof assume x in X; given n1 being Element of NAT such that A2: x = <*n1*> & y = n1+1; given n2 being Element of NAT such that A3: x = <*n2*> & z = n2+1; <*n1*>.1 = n1 by FINSEQ_1:def 8; hence thesis by A2,A3,FINSEQ_1:def 8; end; A4: x in X implies ex y st P[x,y] proof assume x in X; then consider k such that A5: x = <*k*> and k < n+1; reconsider y = k+1 as set; take y; thus thesis by A5; end; consider f such that A6: dom f = X & for x st x in X holds P[x,f.x] from CLASSES1:sch 1(A4); take f; thus f is one-to-one proof let x,y; assume that A7: x in dom f & y in dom f and A8: f.x = f.y; ( ex k1 being Element of NAT st x = <*k1*> & f.x = k1+1)& ex k2 being Element of NAT st y = <*k2*> & f.y = k2+1 by A6,A7; hence thesis by A8; end; thus dom f = X by A6; thus rng f c= Seg(n+1) proof let x; assume x in rng f; then consider y such that A9: y in dom f and A10: x = f.y by FUNCT_1:def 3; consider k such that A11: y = <*k*> and A12: x = k+1 by A6,A9,A10; consider m such that A13: y = <*m*> & m < n+1 by A6,A9; <*k*>.1 = k & <*m*>.1 = m by FINSEQ_1:def 8; then 0+1 <= k+1 & k+1 <= n+1 by A11,A13,NAT_1:13; hence thesis by A12,FINSEQ_1:1; end; let x; assume A14: x in Seg(n+1); then reconsider k = x as Element of NAT; A15: 1 <= k by A14,FINSEQ_1:1; A16: k <= n+1 by A14,FINSEQ_1:1; consider m be Nat such that A17: k = 1+m by A15,NAT_1:10; reconsider m as Element of NAT by ORDINAL1:def 12; m < n+1 by A16,A17,NAT_1:13; then A18: <*m*> in X; then P[<*m*>,f.<*m*>] by A6; then x = f.<*m*> by A1,A17,A18; hence thesis by A6,A18,FUNCT_1:def 3; end; then A19: card Seg(n+1) = card X by CARD_1:5; hence n+1 = card X by FINSEQ_1:57; let Y be AntiChain_of_Prefixes of T; A20: Y c= T by Def11; A21: {} in Y implies Y = D proof assume that A22: {} in Y and A23: Y <> D; consider x such that A24: not (x in Y iff x in D) by A23,TARSKI:1; A25: {} <> x by A22,A24,TARSKI:def 1; reconsider x as FinSequence of NAT by A20,A24,Th19; {} is_a_prefix_of x by XBOOLE_1:2; then {},x are_c=-comparable by XBOOLE_0:def 9; hence contradiction by A22,A24,A25,Def10,TARSKI:def 1; end; A26: card D = 1 & 1 <= 1+n by CARD_1:30,NAT_1:11; now assume A27: not {} in Y; Y c= X proof let x; assume A28: x in Y; then x in { <*k*> : k < n+1 } or x in D by A20,XBOOLE_0:def 3; hence thesis by A27,A28,TARSKI:def 1; end; hence card Y <= card X by NAT_1:43; end; hence card Y <= card X by A19,A21,A26,FINSEQ_1:57; end; hence thesis by Def13; end; theorem for t being Element of fT holds height(fT|t) <= height fT proof let t be Element of fT; consider p such that A1: p in fT|t and A2: len p = height(fT|t) by Def12; t^p in fT by A1,Def6; then A3: len(t^p) <= height fT by Def12; len(t^p) = len t + len p & len p <= len p + len t by FINSEQ_1:22,NAT_1:11 ; hence thesis by A2,A3,XXREAL_0:2; end; theorem Th48: for t being Element of fT st t <> {} holds height(fT|t) < height fT proof let t be Element of fT; assume t <> {}; then A1: 0+1 <= len t by NAT_1:13; consider p such that A2: p in fT|t and A3: len p = height(fT|t) by Def12; t^p in fT by A2,Def6; then A4: len(t^p) <= height fT by Def12; len(t^p) = len t + len p & len p + 1 <= len t + len p by A1,FINSEQ_1:22 ,XREAL_1:7; then height(fT|t)+1 <= height fT by A3,A4,XXREAL_0:2; hence thesis by NAT_1:13; end; scheme TreeInd { P[Tree] }: for fT holds P[fT] provided A1: for fT st for n st <*n*> in fT holds P[fT|<*n*>] holds P[fT] proof defpred X[set] means for fT holds height fT = $1 implies P[fT]; A2: for n being Nat st for k being Nat st k < n holds X[k] holds X[n] proof let n be Nat such that A3: for k being Nat st k < n for fT st height fT = k holds P[fT]; let fT such that A4: height fT = n; now let k; assume <*k*> in fT; then reconsider k9 = <*k*> as Element of fT; height(fT|k9) < height fT by Th48; hence P[fT|<*k*>] by A3,A4; end; hence thesis by A1; end; A5: for n be Nat holds X[n] from NAT_1:sch 4(A2); let fT; height fT = height fT; hence thesis by A5; end; begin reserve s,t for FinSequence; theorem w^t is_a_proper_prefix_of w^s implies t is_a_proper_prefix_of s proof assume A1: w^t is_a_proper_prefix_of w^s; then w^t is_a_prefix_of w^s by XBOOLE_0:def 8; then consider a be FinSequence such that A2: w^s = w^t^a by Th1; w^t^a = w^(t^a) by FINSEQ_1:32; then s= t^a by A2,FINSEQ_1:33; then t is_a_prefix_of s by Th1; hence thesis by A1,XBOOLE_0:def 8; end; theorem n <> m implies not <*n*> is_a_prefix_of <*m*>^s proof assume A1: n <> m; assume <*n*> is_a_prefix_of <*m*>^s; then A2: ex a be FinSequence st <*m*>^s = <*n*>^a by Th1; m = (<*m*>^s).1 by FINSEQ_1:41 .= n by A2,FINSEQ_1:41; hence contradiction by A1; end; theorem elementary_tree 1 = {{},<*0*>} proof now let x; thus x in {{},<*0*>} implies x in { <*n*> : n < 1 } or x in D proof assume x in {{},<*0*>}; then x = {} or x = <*0*> by TARSKI:def 2; hence thesis by TARSKI:def 1; end; assume A1: x in { <*n*> : n < 1 } or x in D; now per cases by A1; suppose x in { <*n*> : n < 1 }; then consider n such that A2: x = <*n*> and A3: n < 1; n = 0 by A3,NAT_1:25; hence x in {{},<*0*>} by A2,TARSKI:def 2; end; suppose x in D; then x = {} by TARSKI:def 1; hence x in {{},<*0*>} by TARSKI:def 2; end; end; hence x in {{},<*0*>}; end; hence thesis by XBOOLE_0:def 3; end; theorem not <*n*> is_a_proper_prefix_of <*m*> proof assume A1: not thesis; then <*n*> is_a_prefix_of <*m*> by XBOOLE_0:def 8; hence contradiction by A1,Th3; end; theorem elementary_tree 2 = {{},<*0*>,<*1*>} proof now let x; thus x in {{},<*0*>,<*1*>} implies x in { <*n*> : n < 2 } or x in D proof assume x in {{},<*0*>,<*1*>}; then x = {} or x = <*0*> or x = <*1*> by ENUMSET1:def 1; hence thesis by TARSKI:def 1; end; assume A1: x in { <*n*> : n < 2 } or x in D; now per cases by A1; suppose x in { <*n*> : n < 2 }; then consider n such that A2: x = <*n*> and A3: n < 2; n = 0 or n = 1 by A3,NAT_1:26; hence x in {{},<*0*>,<*1*>} by A2,ENUMSET1:def 1; end; suppose x in D; then x = {} by TARSKI:def 1; hence x in {{},<*0*>,<*1*>} by ENUMSET1:def 1; end; end; hence x in {{},<*0*>,<*1*>}; end; hence thesis by XBOOLE_0:def 3; end; theorem for T being Tree, t being Element of T holds t in Leaves T iff not t^<*0*> in T proof let T be Tree, t be Element of T; hereby assume A1: t in Leaves T; t is_a_proper_prefix_of t^<*0*> by Th7; hence not t^<*0*> in T by A1,Def5; end; assume that A2: not t^<*0*> in T and A3: not t in Leaves T; consider q being FinSequence of NAT such that A4: q in T and A5: t is_a_proper_prefix_of q by A3,Def5; t is_a_prefix_of q by A5,XBOOLE_0:def 8; then consider r being FinSequence such that A6: q = t^r by Th1; reconsider r as FinSequence of NAT by A6,FINSEQ_1:36; len q = len t+len r by A6,FINSEQ_1:22; then len r <> 0 by A5,Th6; then r <> {}; then consider p being FinSequence of NAT, x being Element of NAT such that A7: r = <*x*>^p by FINSEQ_2:130; reconsider x as Element of NAT; q = t^<*x*>^p by A6,A7,FINSEQ_1:32; then t^<*x*> in T by A4,Th21; hence contradiction by A2,Def3; end; theorem for T being Tree, t being Element of T holds t in Leaves T iff not ex n being Element of NAT st t^<*n*> in T proof let T be Tree, t be Element of T; hereby assume A1: t in Leaves T; given n being Element of NAT such that A2: t^<*n*> in T; A3: not t is_a_proper_prefix_of t^<*n*> by A1,A2,Def5; t is_a_prefix_of t^<*n*> by Th1; then A4: t = t^<*n*> by A3,XBOOLE_0:def 8; t = t^{} by FINSEQ_1:34; hence contradiction by A4,FINSEQ_1:33; end; assume that A5: not(ex n being Element of NAT st t^<*n*> in T) and A6: not t in Leaves T; consider q being FinSequence of NAT such that A7: q in T and A8: t is_a_proper_prefix_of q by A6,Def5; t is_a_prefix_of q by A8,XBOOLE_0:def 8; then consider r being FinSequence such that A9: q = t^r by Th1; reconsider r as FinSequence of NAT by A9,FINSEQ_1:36; len q = len t+len r by A9,FINSEQ_1:22; then len r <> 0 by A8,Th6; then r <> {}; then consider p being FinSequence of NAT, x being Element of NAT such that A10: r = <*x*>^p by FINSEQ_2:130; reconsider x as Element of NAT; q = t^<*x*>^p by A9,A10,FINSEQ_1:32; hence contradiction by A5,A7,Th21; end; definition func TrivialInfiniteTree equals { k |-> 0 where k is Element of NAT: not contradiction }; coherence; end; registration cluster TrivialInfiniteTree -> non empty Tree-like; coherence proof set X = TrivialInfiniteTree; 0 |-> 0 in X; hence X is non empty; thus X c= NAT* proof let x be set; assume x in X; then ex k being Element of NAT st x = k |-> 0; hence thesis by FINSEQ_1:def 11; end; thus for p being FinSequence of NAT st p in X holds ProperPrefixes p c= X proof let p be FinSequence of NAT; assume p in X; then consider m being Element of NAT such that A1: p = m |-> 0; let x be set; assume A2: x in ProperPrefixes p; then reconsider x as FinSequence by Th11; A3: for k being Nat st 1 <= k & k <= len x holds x.k = (len x |-> 0).k proof x is_a_proper_prefix_of p by A2,Th12; then A4: x c= p by XBOOLE_0:def 8; let k be Nat; assume 1 <= k & k <= len x; then A5: k in dom x by FINSEQ_3:25; thus (len x |-> 0).k = 0 .= p.k by A1 .= x.k by A5,A4,GRFUNC_1:2; end; len x = len (len x |-> 0) by CARD_1:def 7; then x = len x |-> 0 by A3,FINSEQ_1:14; hence thesis; end; let p be FinSequence of NAT, m, n be Element of NAT; assume p^<*m*> in X; then consider k being Element of NAT such that A7: p^<*m*> = k |-> 0; assume A8: n <= m; len (p^<*m*>) = len p + 1 by FINSEQ_2:16; then (p^<*m*>).len (p^<*m*>) = m by FINSEQ_1:42; then A11: m = 0 by A7; A12: for z being Nat st 1 <= z & z <= len (p^<*n*>) holds (len (p^<*n*>) |-> 0).z = (p^<*n*>).z proof let z be Nat; assume 1 <= z & z <= len (p^<*n*>); thus (len (p^<*n*>) |-> 0).z = 0 .= (p^<*m*>).z by A7 .= (p^<*n*>).z by A8,A11; end; len (p^<*n*>) = len (len (p^<*n*>) |-> 0) by CARD_1:def 7; then len (p^<*n*>) |-> 0 = p^<*n*> by A12,FINSEQ_1:14; hence thesis; end; end; theorem Th56: NAT,TrivialInfiniteTree are_equipotent proof defpred P[Element of NAT,set] means $2 = $1 |-> 0; A1: for x being Element of NAT ex y being Element of TrivialInfiniteTree st P[x,y] proof let x be Element of NAT; x |-> 0 in TrivialInfiniteTree; then reconsider y = x |-> 0 as Element of TrivialInfiniteTree; take y; thus thesis; end; consider f being Function of NAT,TrivialInfiniteTree such that A2: for x being Element of NAT holds P[x,f.x] from FUNCT_2:sch 3(A1); take f; thus f is one-to-one proof let x,y be set; assume A3: x in dom f & y in dom f; assume A4: f.x = f.y; reconsider x, y as Element of NAT by A3,FUNCT_2:def 1; ( P[x,f.x])& P[y,f.y] by A2; hence thesis by A4,FINSEQ_2:143; end; thus A5: dom f = NAT by FUNCT_2:def 1; thus rng f c= TrivialInfiniteTree by RELAT_1:def 19; let a be set; assume a in TrivialInfiniteTree; then consider k being Element of NAT such that A6: a = k |-> 0; f.k = a by A2,A6; hence thesis by A5,FUNCT_1:def 3; end; registration cluster TrivialInfiniteTree -> infinite; coherence by Th56,CARD_1:38; end; begin reserve f for Function; reserve p,q for FinSequence; reserve A,B,C,x,x1,x2,y,z for set; reserve k,l,m,n for Nat; reserve a for Nat; definition let f,x; pred f is_one-to-one_at x means :Def1: f"Im(f,x) = {x}; end; theorem Th1: f is_one-to-one_at x implies x in dom f proof assume f is_one-to-one_at x; then f"Im(f,x) = {x} by Def1; then x in f"Im(f,x) by TARSKI:def 1; hence thesis by FUNCT_1:def 7; end; theorem Th2: f is_one-to-one_at x iff x in dom f & f " {f.x} = {x} proof thus f is_one-to-one_at x implies x in dom f & f " {f.x} = {x} proof assume A1: f is_one-to-one_at x; hence A2: x in dom f by Th1; f"Im(f,x) = {x} by A1,Def1; hence thesis by A2,FUNCT_1:59; end; assume x in dom f & f " {f.x} = {x}; hence f"Im(f,x) = {x} by FUNCT_1:59; end; theorem Th3: f is_one-to-one_at x iff x in dom f & for z st z in dom f & x <> z holds f.x <> f.z proof thus f is_one-to-one_at x implies x in dom f & for z st z in dom f & x <> z holds f.x <> f.z proof assume A1: f is_one-to-one_at x; hence x in dom f by Th1; let z; assume that A2: z in dom f and A3: x <> z and A4: f.x = f.z; f.x in {f.x} by TARSKI:def 1; then z in f " {f.x} by A2,A4,FUNCT_1:def 7; then z in {x} by A1,Th2; hence thesis by A3,TARSKI:def 1; end; assume that A5: x in dom f and A6: for z st z in dom f & x <> z holds f.x <> f.z and A7: not f is_one-to-one_at x; f " {f.x} <> {x} by A5,A7,Th2; then consider y such that A8: y in f " {f.x} & not y in {x} or y in {x} & not y in f " {f.x} by TARSKI:1; f.x in {f.x} by TARSKI:def 1; then A9: x in f " {f.x} by A5,FUNCT_1:def 7; now per cases by A8; suppose A10: y in f " {f.x} & not y in {x}; then f.y in {f.x} by FUNCT_1:def 7; then A11: f.y = f.x by TARSKI:def 1; y in dom f & x <> y by A10,FUNCT_1:def 7,TARSKI:def 1; hence thesis by A6,A11; end; suppose not y in f " {f.x} & y in {x}; hence thesis by A9,TARSKI:def 1; end; end; hence thesis; end; theorem (for x st x in dom f holds f is_one-to-one_at x) iff f is one-to-one proof thus (for x st x in dom f holds f is_one-to-one_at x) implies f is one-to-one proof assume A1: for x st x in dom f holds f is_one-to-one_at x; let x1,x2; assume that A2: x1 in dom f and A3: x2 in dom f & f.x1 = f.x2; f is_one-to-one_at x1 by A1,A2; hence thesis by A3,Th3; end; assume A4: f is one-to-one; let x; assume A5: x in dom f; then for z holds z in dom f & x <> z implies f.x <> f.z by A4,FUNCT_1:def 4; hence thesis by A5,Th3; end; definition let R be Relation, y be set; pred R just_once_values y means :Def2: card Coim(R,y) = 1; end; theorem Th5: f just_once_values y implies y in rng f proof assume f just_once_values y; then card Coim(f,y) = 1 by Def2; then rng f meets {y} by CARD_1:27,RELAT_1:138; then consider x being set such that A1: x in rng f /\ {y} by XBOOLE_0:4; x in {y} by A1,XBOOLE_0:def 4; then y = x by TARSKI:def 1; hence thesis by A1,XBOOLE_0:def 4; end; theorem Th6: f just_once_values y iff ex x st {x} = f " {y} proof thus f just_once_values y implies ex x st {x} = f " {y} proof assume A1: f just_once_values y; then y in rng f by Th5; then consider x such that A2: x in dom f and A3: f.x = y by FUNCT_1:def 3; take x; card Coim(f,y) = 1 by A1,Def2; then consider z such that A4: f " {y} = {z} by CARD_2:42; f.x in {y} by A3,TARSKI:def 1; then x in {z} by A2,A4,FUNCT_1:def 7; hence thesis by A4,TARSKI:def 1; end; assume ex x st {x} = f " {y}; hence card Coim(f,y) = 1 by CARD_1:30; end; theorem Th7: f just_once_values y iff ex x st x in dom f & y = f.x & for z st z in dom f & z <> x holds f.z <> y proof thus f just_once_values y implies ex x st x in dom f & y = f.x & for z st z in dom f & z <> x holds f.z <> y proof assume A1: f just_once_values y; then A2: card Coim(f,y) = 1 by Def2; y in rng f by A1,Th5; then consider x1 such that A3: x1 in dom f and A4: f.x1 = y by FUNCT_1:def 3; f.x1 in {y} by A4,TARSKI:def 1; then A5: x1 in f " {y} by A3,FUNCT_1:def 7; take x1; thus x1 in dom f & y = f.x1 by A3,A4; let z; assume that A6: z in dom f and A7: z <> x1 and A8: f.z = y; A9: f"{y} is finite by A2; f.z in {y} by A8,TARSKI:def 1; then z in f " {y} by A6,FUNCT_1:def 7; then {z,x1} c= f " {y} by A5,ZFMISC_1:32; then card{z,x1} <= 1 by A9,A2,NAT_1:43; then 2 <= 1 by A7,CARD_2:57; hence thesis; end; given x such that A10: x in dom f and A11: y = f.x and A12: for z st z in dom f & z <> x holds f.z <> y; A13: {x} = f " {y} proof thus {x} c= f " {y} proof let x1; assume x1 in {x}; then A14: x1 = x by TARSKI:def 1; f.x in {y} by A11,TARSKI:def 1; hence thesis by A10,A14,FUNCT_1:def 7; end; let x1; assume A15: x1 in f " {y}; then f.x1 in {y} by FUNCT_1:def 7; then A16: f.x1 = y by TARSKI:def 1; x1 in dom f by A15,FUNCT_1:def 7; then x1 = x by A12,A16; hence thesis by TARSKI:def 1; end; card Coim(f,y) = 1 by A13,CARD_1:30; hence thesis by Def2; end; theorem Th8: f is one-to-one iff for y st y in rng f holds f just_once_values y proof thus f is one-to-one implies for y st y in rng f holds f just_once_values y proof assume A1: f is one-to-one; let y; assume y in rng f; then consider x such that A2: x in dom f & f.x = y by FUNCT_1:def 3; for z holds z in dom f & z <> x implies f.z <> y by A1,A2,FUNCT_1:def 4; hence thesis by A2,Th7; end; assume A3: for y st y in rng f holds f just_once_values y; let x,y; assume that A4: x in dom f and A5: y in dom f & f.x = f.y; f.x in rng f by A4,FUNCT_1:def 3; then f just_once_values f.x by A3; then consider x1 such that A6: {x1} = f " {f.x} by Th6; A7: f.x in {f.x} by TARSKI:def 1; then A8: y in f "{f.x} by A5,FUNCT_1:def 7; x in f " {f.x} by A4,A7,FUNCT_1:def 7; then x = x1 by A6,TARSKI:def 1; hence thesis by A6,A8,TARSKI:def 1; end; theorem Th9: f is_one-to-one_at x iff x in dom f & f just_once_values f.x proof thus f is_one-to-one_at x implies x in dom f & f just_once_values f.x proof assume A1: f is_one-to-one_at x; hence x in dom f by Th1; {x} = f " {f.x} by A1,Th2; hence thesis by Th6; end; assume that A2: x in dom f and A3: f just_once_values f.x; consider z such that A4: f " {f.x} = {z} by A3,Th6; f.x in {f.x} by TARSKI:def 1; then x in {z} by A2,A4,FUNCT_1:def 7; then x = z by TARSKI:def 1; hence thesis by A2,A4,Th2; end; definition let f,y; assume A1: f just_once_values y; func f <- y -> set means :Def3: it in dom f & f.it = y; existence proof y in rng f by A1,Th5; then consider x such that A2: x in dom f & f.x = y by FUNCT_1:def 3; take x; thus thesis by A2; end; uniqueness proof let x1,x2; assume that A3: x1 in dom f & f.x1 = y and A4: x2 in dom f & f.x2 = y; consider x such that x in dom f and f.x = y and A5: for z st z in dom f & z <> x holds f.z <> y by A1,Th7; x = x1 by A3,A5; hence thesis by A4,A5; end; end; theorem f just_once_values y implies Im(f, f<-y) = {y} proof assume A1: f just_once_values y; then f <- y in dom f by Def3; hence Im(f,f <- y) = {f.(f <- y)} by FUNCT_1:59 .= {y} by A1,Def3; end; theorem Th11: f just_once_values y implies f " {y} = {f <- y} proof assume A1: f just_once_values y; then consider x such that A2: {x} = f " {y} by Th6; A3: x in f " {y} by A2,ZFMISC_1:31; then f.x in {y} by FUNCT_1:def 7; then A4: f.x = y by TARSKI:def 1; x in dom f by A3,FUNCT_1:def 7; hence thesis by A1,A2,A4,Def3; end; theorem f is one-to-one & y in rng f implies (f").y = f <- y proof assume that A1: f is one-to-one and A2: y in rng f; consider x such that A3: x in dom f & f.x = y by A2,FUNCT_1:def 3; f just_once_values y by A1,A2,Th8; then x = f <- y by A3,Def3; hence thesis by A1,A3,FUNCT_1:32; end; theorem f is_one-to-one_at x implies f <- (f.x) = x proof assume f is_one-to-one_at x; then x in dom f & f just_once_values f.x by Th9; hence thesis by Def3; end; theorem f just_once_values y implies f is_one-to-one_at f <- y proof assume A1: f just_once_values y; A2: now let x; assume x in dom f & x <> f <- y; then f.x <> y by A1,Def3; hence f.x <> f.(f <- y) by A1,Def3; end; f <- y in dom f by A1,Def3; hence thesis by A2,Th3; end; reserve D for non empty set; reserve d,d1,d2,d3 for Element of D; definition let D; let d1,d2; redefine func <* d1,d2 *> -> FinSequence of D; coherence by FINSEQ_2:13; end; definition let D; let d1,d2,d3; redefine func <* d1,d2,d3 *> -> FinSequence of D; coherence by FINSEQ_2:14; end; theorem for i being Nat for D being set, P being FinSequence of D st 1 <= i & i <= len P holds P/.i = P.i proof let i be Nat; let D be set, P be FinSequence of D; assume 1 <= i & i <= len P; then i in dom P by FINSEQ_3:25; hence thesis by PARTFUN1:def 6; end; theorem <* d *>/.1 = d proof A1: 1 in {1} by FINSEQ_1:2; dom<* d *> = {1} & <* d *>.1 = d by FINSEQ_1:2,def 8; hence thesis by A1,PARTFUN1:def 6; end; theorem <* d1,d2 *>/.1 = d1 & <* d1,d2 *>/.2 = d2 proof set s = <* d1,d2 *>; A1: s.2 = d2 & 1 in {1,2} by FINSEQ_1:2,44; A2: 2 in {1,2} by FINSEQ_1:2; dom s = {1,2} & s.1 = d1 by FINSEQ_1:2,44,89; hence thesis by A1,A2,PARTFUN1:def 6; end; theorem <* d1,d2,d3 *>/.1 = d1 & <* d1,d2,d3 *>/.2 = d2 & <* d1,d2,d3 *>/.3 = d3 proof set s = <* d1,d2,d3 *>; A1: s.2 = d2 & s.3 = d3 by FINSEQ_1:45; A2: 1 in {1,2,3} & 2 in {1,2,3} by FINSEQ_3:1; A3: 3 in {1,2,3} by FINSEQ_3:1; dom s = {1,2,3} & s.1 = d1 by FINSEQ_1:45,89,FINSEQ_3:1; hence thesis by A1,A2,A3,PARTFUN1:def 6; end; definition let p,x; func x..p -> Element of NAT equals Sgm(p " {x}).1; coherence proof set q = Sgm(p " {x}); per cases; suppose not 1 in dom q; then q.1 = 0 by FUNCT_1:def 2; hence thesis; end; suppose A1: 1 in dom q; A2: rng q c= NAT by FINSEQ_1:def 4; q.1 in rng q by A1,FUNCT_1:def 3; hence thesis by A2; end; end; end; theorem Th19: x in rng p implies p.(x..p) = x proof set q = Sgm(p " {x}); A1: p " {x} c= dom p & dom p = Seg(len p) by FINSEQ_1:def 3,RELAT_1:132; assume x in rng p; then p " {x} <> {} by FUNCT_1:72; then rng q <> {} by A1,FINSEQ_1:def 13; then 1 in dom q by FINSEQ_3:32; then A2: q.1 in rng q by FUNCT_1:def 3; rng q = p " {x} by A1,FINSEQ_1:def 13; then p.(x..p) in {x} by A2,FUNCT_1:def 7; hence thesis by TARSKI:def 1; end; theorem Th20: x in rng p implies x..p in dom p proof A1: p " {x} c= dom p & dom p = Seg(len p) by FINSEQ_1:def 3,RELAT_1:132; assume x in rng p; then p " {x} <> {} by FUNCT_1:72; then rng(Sgm(p " {x})) <> {} by A1,FINSEQ_1:def 13; then 1 in dom(Sgm(p " {x})) by FINSEQ_3:32; then x..p in rng(Sgm(p " {x})) by FUNCT_1:def 3; then x..p in p " {x} by A1,FINSEQ_1:def 13; hence thesis by FUNCT_1:def 7; end; theorem Th21: x in rng p implies 1 <= x..p & x..p <= len p proof assume x in rng p; then x..p in dom p by Th20; hence thesis by FINSEQ_3:25; end; theorem Th22: x in rng p implies x..p - 1 is Element of NAT & len p - x..p is Element of NAT proof assume x in rng p; then 1 <= x..p & x..p <= len p by Th21; hence thesis by INT_1:5; end; theorem Th23: x in rng p implies x..p in p " {x} proof assume A1: x in rng p; then p.(x..p) = x by Th19; then A2: p.(x..p) in {x} by TARSKI:def 1; x..p in dom p by A1,Th20; hence thesis by A2,FUNCT_1:def 7; end; theorem Th24: for k st k in dom p & k < x..p holds p.k <> x proof let k; set q = Sgm(p " {x}); assume that A1: k in dom p and A2: k < x..p and A3: p.k = x; A4: x in {x} by TARSKI:def 1; A5: p " {x} c= dom p & dom p = Seg(len p) by FINSEQ_1:def 3,RELAT_1:132; then rng q = p " {x} by FINSEQ_1:def 13; then k in rng q by A1,A3,A4,FUNCT_1:def 7; then consider y such that A6: y in dom q and A7: q.y = k by FUNCT_1:def 3; reconsider y as Element of NAT by A6; A8: now assume not 1 < y; then 1 = y or y < 1 by XXREAL_0:1; hence contradiction by A2,A6,A7,FINSEQ_3:24,NAT_1:14; end; dom q = Seg(len q) by FINSEQ_1:def 3; then y <= len q by A6,FINSEQ_1:1; hence contradiction by A2,A5,A7,A8,FINSEQ_1:def 13; end; theorem Th25: p just_once_values x implies p <- x = x..p proof assume A1: p just_once_values x; then x in rng p by Th5; then x..p in dom p & p.(x..p) = x by Th19,Th20; hence thesis by A1,Def3; end; theorem Th26: p just_once_values x implies for k st k in dom p & k <> x..p holds p.k <> x proof assume A1: p just_once_values x; let k; assume A2: k in dom p & k <> x..p & p.k = x; p <- x = x..p by A1,Th25; hence thesis by A1,A2,Def3; end; theorem Th27: x in rng p & (for k st k in dom p & k <> x..p holds p.k <> x) implies p just_once_values x proof assume that A1: x in rng p and A2: for k st k in dom p & k <> x..p holds p.k <> x; A3: for z st z in dom p & z <> x..p holds p.z <> x by A2; p.(x..p) = x & x..p in dom p by A1,Th19,Th20; hence thesis by A3,Th7; end; theorem Th28: p just_once_values x iff x in rng p & {x..p} = p " {x} proof thus p just_once_values x implies x in rng p & {x..p} = p " {x} proof assume A1: p just_once_values x; then x..p = p <- x by Th25; hence thesis by A1,Th5,Th11; end; assume that A2: x in rng p and A3: {x..p} = p " {x}; A4: now let z; assume that A5: z in dom p and A6: z <> x..p and A7: p.z = x; p.z in {x} by A7,TARSKI:def 1; then z in p " {x} by A5,FUNCT_1:def 7; hence contradiction by A3,A6,TARSKI:def 1; end; p.(x..p) = x & x..p in dom p by A2,Th19,Th20; hence thesis by A4,Th7; end; theorem p is one-to-one & x in rng p implies {x..p} = p " {x} proof assume that A1: p is one-to-one and A2: x in rng p; thus {x..p} c= p " {x} proof let y; assume y in {x..p}; then y = x..p by TARSKI:def 1; hence thesis by A2,Th23; end; let y; assume A3: y in p " {x}; then A4: y in dom p by FUNCT_1:def 7; p.y in {x} by A3,FUNCT_1:def 7; then A5: p.y = x by TARSKI:def 1; p.(x..p) = x & x..p in dom p by A2,Th19,Th20; then x..p = y by A1,A4,A5,FUNCT_1:def 4; hence thesis by TARSKI:def 1; end; theorem Th30: p just_once_values x iff len(p - {x}) = len p - 1 proof thus p just_once_values x implies len(p - {x}) = len p - 1 proof assume p just_once_values x; then len(p - {x}) = len p - card(p " {x}) & p " {x} = {x..p} by Th28, FINSEQ_3:59; hence thesis by CARD_1:30; end; A1: p"{x} = Coim(p,x); assume len(p - {x}) = len p - 1; then len p + -1 = len p - card(p " {x}) by FINSEQ_3:59 .= len p + - (card (p"{x})); hence thesis by A1,Def2; end; reserve L,M for Element of NAT; theorem Th31: p just_once_values x implies for k st k in dom(p - {x}) holds (k < x..p implies (p - {x}).k = p.k) & (x..p <= k implies (p - {x}).k = p.(k + 1)) proof assume A1: p just_once_values x; set q = p - {x}; let k; assume A2: k in dom(p - {x}); set A = {L : L in dom p & L <= k & p.L in {x}}; A3: dom(p - {x}) c= dom p by FINSEQ_3:63; thus k < x..p implies (p - {x}).k = p.k proof assume A4: k < x..p; A c= {} proof let y; assume y in A; then consider L such that y = L and A5: L in dom p & L <= k and A6: p.L in {x}; p.L <> x by A1,A4,A5,Th26; hence thesis by A6,TARSKI:def 1; end; then A7: A = {}; p.k <> x by A1,A2,A3,A4,Th26; then not p.k in {x} by TARSKI:def 1; then q.(k - 0) = p.k by A2,A3,A7,CARD_1:27,FINSEQ_3:85; hence thesis; end; set B = {M : M in dom p & M <= k + 1 & p.M in {x}}; assume A8: x..p <= k; A9: x in rng p by A1,Th5; A10: B = {x..p} proof thus B c= {x..p} proof let y; assume y in B; then consider M such that A11: M = y and A12: M in dom p and M <= k + 1 and A13: p.M in {x}; p.M = x by A13,TARSKI:def 1; then M = x..p by A1,A12,Th26; hence thesis by A11,TARSKI:def 1; end; let y; assume y in {x..p}; then A14: y = x..p by TARSKI:def 1; p.(x..p) = x by A9,Th19; then A15: p.(x..p) in {x} by TARSKI:def 1; x..p in dom p & x..p <= k + 1 by A9,A8,Th20,NAT_1:12; hence thesis by A14,A15; end; then reconsider B as finite set; dom q = Seg(len q) & len(p - {x}) = len p - 1 by A1,Th30,FINSEQ_1:def 3; then k <= len p - 1 by A2,FINSEQ_1:1; then 1 <= k + 1 & k + 1 <= len p by NAT_1:12,XREAL_1:19; then k + 1 in Seg(len p); then A16: k + 1 in dom p by FINSEQ_1:def 3; now x..p <> k + 1 by A8,XREAL_1:29; then A17: p.(k + 1) <> x by A1,A16,Th26; assume p.(k + 1) in {x}; hence contradiction by A17,TARSKI:def 1; end; then (p - {x}).((k + 1) - card B) = p.(k + 1) by A16,FINSEQ_3:85; then q.((k + 1) - 1) = p.(k + 1) by A10,CARD_1:30; hence thesis; end; theorem p is one-to-one & x in rng p implies for k st k in dom(p - {x}) holds ((p - {x}).k = p.k iff k < x..p) & ((p - {x}).k = p.(k + 1) iff x..p <= k) proof assume that A1: p is one-to-one and A2: x in rng p; set q = p - {x}; let k; assume A3: k in dom(p - {x}); A4: p just_once_values x by A1,A2,Th8; then dom q = Seg(len q) & len(p - {x}) = len p - 1 by Th30,FINSEQ_1:def 3; then k <= len p - 1 by A3,FINSEQ_1:1; then 1 <= k + 1 & k + 1 <= len p by NAT_1:12,XREAL_1:19; then k + 1 in Seg(len p); then A5: dom(p - {x}) c= dom p & k + 1 in dom p by FINSEQ_1:def 3,FINSEQ_3:63; thus (p - {x}).k = p.k implies k < x..p proof assume that A6: (p - {x}).k = p.k and A7: not k < x..p; q.k = p.(k + 1) by A4,A3,A7,Th31; then k + 0 = k + 1 by A1,A3,A5,A6,FUNCT_1:def 4; hence thesis; end; thus k < x..p implies (p - {x}).k = p.k by A4,A3,Th31; thus (p - {x}).k = p.(k + 1) implies x..p <= k proof assume A8: (p - {x}).k = p.(k + 1); assume not x..p <= k; then p.(k + 1) = p.k by A4,A3,A8,Th31; then k + 0 = k + 1 by A1,A3,A5,FUNCT_1:def 4; hence thesis; end; thus thesis by A4,A3,Th31; end; definition let p; let x; assume A1: x in rng p; func p -| x -> FinSequence means :Def5: ex n st n = x..p - 1 & it = p | Seg n; existence proof reconsider n = x..p - 1 as Element of NAT by A1,Th22; reconsider q = p | Seg n as FinSequence by FINSEQ_1:15; take q; thus thesis; end; uniqueness; end; theorem Th33: x in rng p & n = x..p - 1 implies p | Seg n = p -| x proof assume x in rng p; then ex m st m = x..p - 1 & p | Seg m = p -| x by Def5; hence thesis; end; theorem Th34: x in rng p implies len(p -| x) = x..p - 1 proof assume A1: x in rng p; then consider n such that A2: n = x..p - 1 and A3: p | Seg n = p -| x by Def5; A4: n <= n + 1 by NAT_1:12; n + 1 <= len p by A1,A2,Th21; then n <= len p by A4,XXREAL_0:2; hence thesis by A2,A3,FINSEQ_1:17; end; theorem Th35: x in rng p & n = x..p - 1 implies dom(p -| x) = Seg n proof assume x in rng p; then len(p -| x) = x..p - 1 by Th34; hence thesis by FINSEQ_1:def 3; end; theorem Th36: x in rng p & k in dom(p -| x) implies p.k = (p -| x).k proof assume that A1: x in rng p and A2: k in dom(p -| x); ex n st n = x..p - 1 & p | Seg n = p -| x by A1,Def5; hence thesis by A2,FUNCT_1:47; end; theorem Th37: x in rng p implies not x in rng(p -| x) proof assume that A1: x in rng p and A2: x in rng(p -| x); reconsider n = x..p - 1 as Element of NAT by A1,Th22; set r = p | Seg n; A3: r = p -| x by A1,Th33; then consider y such that A4: y in dom r and A5: r.y = x by A2,FUNCT_1:def 3; A6: dom r = Seg n by A1,A3,Th35; then reconsider y as Element of NAT by A4; y <= n by A4,A6,FINSEQ_1:1; then A7: y + 1 <= x..p by XREAL_1:19; y < y + 1 by XREAL_1:29; then dom r c= dom p & y < x..p by A7,RELAT_1:60,XXREAL_0:2; then p.y <> x by A4,Th24; hence thesis by A4,A5,FUNCT_1:47; end; theorem x in rng p implies rng(p -| x) misses {x} proof assume x in rng p; then not x in rng(p -| x) by Th37; then for y st y in rng(p -| x) holds not y in {x} by TARSKI:def 1; hence thesis by XBOOLE_0:3; end; theorem x in rng p implies rng(p -| x) c= rng p proof assume x in rng p; then ex n st n = x..p - 1 & p | Seg n = p -| x by Def5; hence thesis by RELAT_1:70; end; theorem x in rng p implies (x..p = 1 iff p -| x = {}) proof assume A1: x in rng p; thus x..p = 1 implies p -| x = {} proof assume A2: x..p = 1; len(p -| x) = x..p - 1 by A1,Th34 .= 0 by A2; hence thesis; end; assume p -| x = {}; then A3: len(p -| x) = 0; len(p -| x) = x..p - 1 by A1,Th34; hence thesis by A3; end; theorem x in rng p & p is FinSequence of D implies p -| x is FinSequence of D proof assume x in rng p; then ex n st n = x..p - 1 & p | Seg n = p -| x by Def5; hence thesis by FINSEQ_1:18; end; definition let p; let x; assume A1: x in rng p; func p |-- x -> FinSequence means :Def6: len it = len p - x..p & for k st k in dom it holds it.k = p.(k + x..p); existence proof deffunc F(Nat) = p.($1 + x..p); reconsider n = len p - x..p as Element of NAT by A1,Th22; consider q such that A2: len q = n & for k be Nat st k in dom q holds q.k = F(k) from FINSEQ_1:sch 2; take q; thus thesis by A2; end; uniqueness proof let q,r be FinSequence; assume that A3: len q = len p - x..p and A4: for k st k in dom q holds q.k = p.(k + x..p); assume that A5: len r = len p - x..p and A6: for k st k in dom r holds r.k = p.(k + x..p); now let k be Nat; A7: dom q = Seg(len q) & dom r = Seg(len r) by FINSEQ_1:def 3; assume A8: k in dom q; then q.k = p.(k + x..p) by A4; hence q.k = r.k by A3,A5,A6,A8,A7; end; hence thesis by A3,A5,FINSEQ_2:9; end; end; theorem Th42: x in rng p & n = len p - x..p implies dom(p |-- x) = Seg n proof assume x in rng p; then len(p |-- x) = len p - x..p by Def6; hence thesis by FINSEQ_1:def 3; end; theorem Th43: x in rng p & n in dom(p |-- x) implies n + x..p in dom p proof assume that A1: x in rng p and A2: n in dom(p |-- x); reconsider m = len p - x..p as Element of NAT by A1,Th22; n in Seg m by A1,A2,Th42; then n <= len p - x..p by FINSEQ_1:1; then A3: n + x..p <= len p by XREAL_1:19; 1 <= n by A2,FINSEQ_3:25; then 1 <= n + x..p by NAT_1:12; hence thesis by A3,FINSEQ_3:25; end; theorem x in rng p implies rng(p |-- x) c= rng p proof assume A1: x in rng p; let y; assume y in rng(p |-- x); then consider z such that A2: z in dom(p |-- x) and A3: (p |-- x).z = y by FUNCT_1:def 3; reconsider z as Element of NAT by A2; y = p.(z + x..p) & z + x..p in dom p by A1,A2,A3,Def6,Th43; hence thesis by FUNCT_1:def 3; end; theorem Th45: p just_once_values x iff x in rng p & not x in rng(p |-- x) proof thus p just_once_values x implies x in rng p & not x in rng(p |-- x) proof assume A1: p just_once_values x; hence A2: x in rng p by Th5; assume x in rng(p |-- x); then consider z such that A3: z in dom(p |-- x) and A4: (p |-- x).z = x by FUNCT_1:def 3; reconsider z as Element of NAT by A3; (p |-- x).z = p.(z + x..p) & z + x..p in dom p by A2,A3,Def6,Th43; then z + x..p = 0 + x..p by A1,A4,Th26; hence thesis by A3,FINSEQ_3:24; end; assume that A5: x in rng p and A6: not x in rng(p |-- x); now let k; assume that A7: k in dom p and A8: k <> x..p and A9: p.k = x; now per cases by A8,XXREAL_0:1; suppose k < x..p; then k + 1 <= x..p by NAT_1:13; then k <= x..p - 1 by XREAL_1:19; then A10: k <= len(p -| x) by A5,Th34; 1 <= k by A7,FINSEQ_3:25; then A11: k in dom(p -| x) by A10,FINSEQ_3:25; then x = (p -| x).k by A5,A9,Th36; then x in rng(p -| x) by A11,FUNCT_1:def 3; hence contradiction by A5,Th37; end; suppose A12: x..p < k; then consider m be Nat such that A13: k = x..p + m by NAT_1:10; x..p + 0 < x..p + m by A12,A13; then 0 < m; then A14: 0 + 1 <= m by NAT_1:13; m + x..p <= len p by A7,A13,FINSEQ_3:25; then m <= len p - x..p by XREAL_1:19; then m <= len(p |-- x) by A5,Def6; then A15: m in dom(p |-- x) by A14,FINSEQ_3:25; then (p |-- x).m = p.k by A5,A13,Def6; hence contradiction by A6,A9,A15,FUNCT_1:def 3; end; end; hence contradiction; end; hence thesis by A5,Th27; end; theorem Th46: x in rng p & p is one-to-one implies not x in rng(p |-- x) proof assume that A1: x in rng p and A2: p is one-to-one and A3: x in rng(p |-- x); A4: len(p |-- x) = len p - x..p by A1,Def6; consider y such that A5: y in dom(p |-- x) and A6: (p |-- x).y = x by A3,FUNCT_1:def 3; reconsider y as Element of NAT by A5; A7: 1 <= y + x..p by A1,Th21,NAT_1:12; A8: y in Seg(len(p |-- x)) by A5,FINSEQ_1:def 3; then y <= len(p |-- x) by FINSEQ_1:1; then y + x..p <= len p by A4,XREAL_1:19; then y + x..p in Seg(len p) by A7; then A9: y + x..p in dom p by FINSEQ_1:def 3; A10: x..p in dom p & p.(x..p) = x by A1,Th19,Th20; (p |-- x).y = p.(y + x..p) by A1,A5,Def6; then 0 + x..p = y + x..p by A2,A6,A10,A9,FUNCT_1:def 4; hence thesis by A8,FINSEQ_1:1; end; theorem p just_once_values x iff x in rng p & rng(p |-- x) misses {x} proof thus p just_once_values x implies x in rng p & rng(p |-- x) misses {x} proof assume A1: p just_once_values x; hence x in rng p by Th45; assume not rng(p |-- x) misses {x}; then A2: ex y st y in rng(p |-- x) & y in {x} by XBOOLE_0:3; not x in rng(p |-- x) by A1,Th45; hence thesis by A2,TARSKI:def 1; end; assume that A3: x in rng p and A4: rng(p |-- x) misses {x}; now A5: x in {x} by TARSKI:def 1; assume x in rng(p |-- x); hence contradiction by A4,A5,XBOOLE_0:3; end; hence thesis by A3,Th45; end; theorem x in rng p & p is one-to-one implies rng(p |-- x) misses {x} proof assume x in rng p & p is one-to-one; then not x in rng(p |-- x) by Th46; then for y st y in rng(p |-- x) holds not y in {x} by TARSKI:def 1; hence thesis by XBOOLE_0:3; end; theorem x in rng p implies (x..p = len p iff p |-- x = {}) proof assume A1: x in rng p; thus x..p = len p implies p |-- x = {} proof assume A2: x..p = len p; len(p |-- x) = len p - x..p by A1,Def6 .= 0 by A2; hence thesis; end; assume p |-- x = {}; then A3: len(p |-- x) = 0; len(p |-- x) = len p - x..p by A1,Def6; hence thesis by A3; end; theorem x in rng p & p is FinSequence of D implies p |-- x is FinSequence of D proof assume that A1: x in rng p and A2: p is FinSequence of D; rng(p |-- x) c= D proof A3: len(p |-- x) = len p - x..p by A1,Def6; let y; assume y in rng(p |-- x); then consider z such that A4: z in dom(p |-- x) and A5: (p |-- x).z = y by FUNCT_1:def 3; reconsider z as Element of NAT by A4; dom(p |-- x) = Seg(len(p |-- x)) by FINSEQ_1:def 3; then z <= len(p |-- x) by A4,FINSEQ_1:1; then A6: z + x..p <= len p by A3,XREAL_1:19; 1 <= z + x..p by A1,Th21,NAT_1:12; then z + x..p in Seg(len p) by A6; then A7: z + x..p in dom p by FINSEQ_1:def 3; y = p.(z + x..p) by A1,A4,A5,Def6; then A8: y in rng p by A7,FUNCT_1:def 3; rng p c= D by A2,FINSEQ_1:def 4; hence thesis by A8; end; hence thesis by FINSEQ_1:def 4; end; theorem Th51: x in rng p implies p = (p -| x) ^ <* x *> ^ (p |-- x) proof set q1 = p -| x; set q2 = p |-- x; set r = q1 ^ <* x *>; assume A1: x in rng p; A2: now let k be Element of NAT; assume k in dom q2; then q2.k = p.(x..p - 1 + 1 + k) by A1,Def6 .= p.(len q1 + 1 + k) by A1,Th34 .= p.(len q1 + len<* x *> + k) by FINSEQ_1:40 .= p.(len r + k) by FINSEQ_1:22; hence p.(len r + k) = q2.k; end; A3: now let k be Element of NAT; assume A4: k in dom r; now per cases by A4,FINSEQ_1:25; suppose A5: k in dom q1; hence r.k = q1.k by FINSEQ_1:def 7 .= p.k by A1,A5,Th36; end; suppose ex n be Nat st n in dom<* x *> & k = len q1 + n; then consider n be Nat such that A6: n in dom <* x *> and A7: k = len q1 + n; n in {1} by A6,FINSEQ_1:2,def 8; then A8: n = 1 by TARSKI:def 1; hence r.k = <* x *>.1 by A6,A7,FINSEQ_1:def 7 .= x by FINSEQ_1:def 8 .= p.(x..p - 1 + 1) by A1,Th19 .= p.k by A1,A7,A8,Th34; end; end; hence p.k = r.k; end; len p = len p - x..p + x..p .= x..p - 1 + 1 + len q2 by A1,Def6 .= len q1 + 1 + len q2 by A1,Th34 .= len q1 + len<* x *> + len q2 by FINSEQ_1:40 .= len r + len q2 by FINSEQ_1:22; hence thesis by A3,A2,FINSEQ_3:38; end; theorem x in rng p & p is one-to-one implies p -| x is one-to-one proof assume x in rng p; then p = (p -| x) ^ <* x *> ^ (p |-- x) by Th51 .= (p -| x) ^ (<* x *> ^ (p |-- x)) by FINSEQ_1:32; hence thesis by FINSEQ_3:91; end; theorem x in rng p & p is one-to-one implies p |-- x is one-to-one proof assume x in rng p; then p = (p -| x) ^ <* x *> ^ (p |-- x) by Th51; hence thesis by FINSEQ_3:91; end; theorem Th54: p just_once_values x iff x in rng p & p - {x} = (p -| x) ^ (p |-- x) proof set q = p - {x}; set r = p -| x; set s = p |-- x; thus p just_once_values x implies x in rng p & p - {x} = (p -| x) ^ (p |-- x ) proof assume A1: p just_once_values x; hence A2: x in rng p by Th5; A3: now x..p <= len p by A2,Th21; then x..p - 1 <= len p - 1 by XREAL_1:9; then len r <= len p - 1 by A2,Th34; then len r <= len q by A1,Th30; then A4: Seg(len r) c= Seg(len q) by FINSEQ_1:5; let k be Nat; A5: Seg(len r) = dom r & Seg(len q) = dom q by FINSEQ_1:def 3; assume A6: k in dom r; then k in Seg(len r) by FINSEQ_1:def 3; then k <= len r by FINSEQ_1:1; then k <= x..p - 1 by A2,Th34; then A7: k + 1 <= x..p by XREAL_1:19; k < k + 1 by XREAL_1:29; then A8: k < x..p by A7,XXREAL_0:2; r.k = p.k by A2,A6,Th36; hence q.k = r.k by A1,A6,A4,A5,A8,Th31; end; A9: now reconsider m = x..p - 1 as Element of NAT by A2,Th22; let k be Nat; set z = k + m; assume A10: k in dom s; then A11: s.k = p.(k + x..p) by A2,Def6; A12: dom s = Seg(len s) by FINSEQ_1:def 3; then A13: 1 <= k by A10,FINSEQ_1:1; then x..p + 1 <= k + x..p by XREAL_1:7; then A14: x..p <= k + x..p - 1 by XREAL_1:19; k <= len s by A10,A12,FINSEQ_1:1; then k <= len p - x..p by A2,Def6; then k + x..p <= len p by XREAL_1:19; then k + x..p - 1 <= len p - 1 by XREAL_1:9; then A15: k + x..p - 1 <= len q by A1,Th30; 1 <= x..p by A2,Th21; then 1 + 1 <= k + x..p by A13,XREAL_1:7; then A16: 1 <= k + x..p - 1 by XREAL_1:19; dom q = Seg(len q) by FINSEQ_1:def 3; then z in dom q by A16,A15; then q.z = p.(z + 1) by A1,A14,Th31 .= p.(k + x..p); hence q.(len r + k) = s.k by A2,A11,Th34; end; len r + len s = (x..p - 1) + len s by A2,Th34 .= (x..p - 1) + (len p - x..p) by A2,Def6 .= len p - 1 .= len q by A1,Th30; then dom q = Seg(len r + len s) by FINSEQ_1:def 3; hence thesis by A3,A9,FINSEQ_1:def 7; end; assume A17: x in rng p; assume A18: p - {x} = (p -| x) ^ (p |-- x); now let k; assume that A19: k in dom p and A20: k <> x..p and A21: p.k = x; {x..p,k} c= p " {x} proof let y; assume A22: y in {x..p,k}; A23: x in {x} by TARSKI:def 1; x..p in dom p & p.(x..p) = x by A17,Th19,Th20; then A24: x..p in p " {x} by A23,FUNCT_1:def 7; k in p " {x} by A19,A21,A23,FUNCT_1:def 7; hence thesis by A22,A24,TARSKI:def 2; end; then card{x..p,k} <= card(p " {x}) by NAT_1:43; then A25: 2 <= card(p " {x}) by A20,CARD_2:57; A26: len q = len p - card(p " {x}) by FINSEQ_3:59 .= len p + (- card(p " {x})); len q = len r + len s by A18,FINSEQ_1:22 .= (x..p - 1) + len s by A17,Th34 .= (x..p - 1) + (len p - x..p) by A17,Def6 .= len p + (- 1); hence contradiction by A26,A25; end; hence thesis by A17,Th27; end; theorem x in rng p & p is one-to-one implies p - {x} = (p -| x) ^ (p |-- x) proof assume x in rng p & p is one-to-one; then p just_once_values x by Th8; hence thesis by Th54; end; theorem Th56: x in rng p & p - {x} is one-to-one & p - {x} = (p -| x) ^ (p |-- x) implies p is one-to-one proof assume that A1: x in rng p and A2: p - {x} is one-to-one and A3: p - {x} = (p -| x) ^ (p |-- x); set q = p - {x}; let x1,x2; assume that A4: x1 in dom p and A5: x2 in dom p and A6: p.x1 = p.x2; reconsider k1 = x1, k2 = x2 as Element of NAT by A4,A5; A7: p just_once_values x by A1,A3,Th54; now per cases by XXREAL_0:1; suppose x1 = x..p & x2 = x..p; hence thesis; end; suppose x1 = x..p & x..p < k2; hence thesis by A1,A5,A6,A7,Th19,Th26; end; suppose x1 = x..p & k2 < x..p; hence thesis by A1,A5,A6,A7,Th19,Th26; end; suppose k1 < x..p & x..p = x2; hence thesis by A1,A4,A6,A7,Th19,Th26; end; suppose A8: k1 < x..p & x..p < k2; x..p <= len p by A1,Th21; then k1 < len p by A8,XXREAL_0:2; then k1 + 1 <= len p by NAT_1:13; then k1 <= len p - 1 by XREAL_1:19; then A9: k1 <= len q by A7,Th30; k1 in Seg(len p) by A4,FINSEQ_1:def 3; then 1 <= k1 by FINSEQ_1:1; then k1 in Seg(len q) by A9; then A10: k1 in dom q by FINSEQ_1:def 3; then A11: q.k1 = p.k1 by A7,A8,Th31; consider m2 be Nat such that A12: k2 = m2 + 1 by A8,NAT_1:6; reconsider m2 as Element of NAT by ORDINAL1:def 12; A13: x..p <= m2 by A8,A12,NAT_1:13; k2 in Seg(len p) by A5,FINSEQ_1:def 3; then k2 <= len p by FINSEQ_1:1; then m2 <= len p - 1 by A12,XREAL_1:19; then A14: m2 <= len q by A7,Th30; 1 <= x..p by A1,Th21; then 1 <= m2 by A13,XXREAL_0:2; then m2 in Seg(len q) by A14; then A15: m2 in dom(p - {x}) by FINSEQ_1:def 3; then q.m2 = p.k2 by A7,A12,A13,Th31; hence thesis by A2,A6,A8,A10,A13,A15,A11,FUNCT_1:def 4; end; suppose A16: k1 < x..p & k2 < x..p; A17: x..p <= len p by A1,Th21; then k2 < len p by A16,XXREAL_0:2; then k2 + 1 <= len p by NAT_1:13; then k2 <= len p - 1 by XREAL_1:19; then A18: k2 <= len q by A7,Th30; k2 in Seg(len p) by A5,FINSEQ_1:def 3; then 1 <= k2 by FINSEQ_1:1; then k2 in Seg(len q) by A18; then A19: k2 in dom q by FINSEQ_1:def 3; then A20: p.k2 = (p - {x}).k2 by A7,A16,Th31; k1 < len p by A16,A17,XXREAL_0:2; then k1 + 1 <= len p by NAT_1:13; then k1 <= len p - 1 by XREAL_1:19; then A21: k1 <= len q by A7,Th30; k1 in Seg(len p) by A4,FINSEQ_1:def 3; then 1 <= k1 by FINSEQ_1:1; then k1 in Seg(len q) by A21; then A22: k1 in dom q by FINSEQ_1:def 3; then p.k1 = (p - {x}).k1 by A7,A16,Th31; hence thesis by A2,A6,A22,A19,A20,FUNCT_1:def 4; end; suppose A23: x..p < k1 & x..p < k2; then consider m2 be Nat such that A24: k2 = m2 + 1 by NAT_1:6; consider m1 be Nat such that A25: k1 = m1 + 1 by A23,NAT_1:6; reconsider m1, m2 as Element of NAT by ORDINAL1:def 12; k2 in Seg(len p) by A5,FINSEQ_1:def 3; then k2 <= len p by FINSEQ_1:1; then m2 <= len p - 1 by A24,XREAL_1:19; then A26: m2 <= len q by A7,Th30; A27: 1 <= x..p by A1,Th21; A28: x..p <= m2 by A23,A24,NAT_1:13; then 1 <= m2 by A27,XXREAL_0:2; then m2 in Seg(len q) by A26; then A29: m2 in dom(p - {x}) by FINSEQ_1:def 3; then A30: p.k2 = (p - {x}).m2 by A7,A24,A28,Th31; k1 in Seg(len p) by A4,FINSEQ_1:def 3; then k1 <= len p by FINSEQ_1:1; then m1 <= len p - 1 by A25,XREAL_1:19; then A31: m1 <= len q by A7,Th30; A32: x..p <= m1 by A23,A25,NAT_1:13; then 1 <= m1 by A27,XXREAL_0:2; then m1 in Seg(len q) by A31; then A33: m1 in dom(p - {x}) by FINSEQ_1:def 3; then p.k1 = (p - {x}).m1 by A7,A25,A32,Th31; hence thesis by A2,A6,A25,A24,A33,A29,A30,FUNCT_1:def 4; end; suppose x..p < k1 & x..p = x2; hence thesis by A1,A4,A6,A7,Th19,Th26; end; suppose A34: x..p < k1 & k2 < x..p; x..p <= len p by A1,Th21; then k2 < len p by A34,XXREAL_0:2; then k2 + 1 <= len p by NAT_1:13; then k2 <= len p - 1 by XREAL_1:19; then A35: k2 <= len q by A7,Th30; k2 in Seg(len p) by A5,FINSEQ_1:def 3; then 1 <= k2 by FINSEQ_1:1; then k2 in Seg(len q) by A35; then A36: k2 in dom q by FINSEQ_1:def 3; then A37: q.k2 = p.k2 by A7,A34,Th31; consider m2 be Nat such that A38: k1 = m2 + 1 by A34,NAT_1:6; reconsider m2 as Element of NAT by ORDINAL1:def 12; A39: x..p <= m2 by A34,A38,NAT_1:13; k1 in Seg len p by A4,FINSEQ_1:def 3; then k1 <= len p by FINSEQ_1:1; then m2 <= len p - 1 by A38,XREAL_1:19; then A40: m2 <= len q by A7,Th30; 1 <= x..p by A1,Th21; then 1 <= m2 by A39,XXREAL_0:2; then m2 in Seg len q by A40; then A41: m2 in dom(p - {x}) by FINSEQ_1:def 3; then q.m2 = p.k1 by A7,A38,A39,Th31; hence thesis by A2,A6,A34,A36,A39,A41,A37,FUNCT_1:def 4; end; end; hence thesis; end; theorem x in rng p & p is one-to-one implies rng(p -| x) misses rng(p |-- x) proof assume that A1: x in rng p and A2: p is one-to-one; p = (p -| x) ^ <* x *> ^ (p |-- x) by A1,Th51; then rng(p |-- x) misses rng((p -| x) ^ <* x *>) by A2,FINSEQ_3:91; hence thesis by FINSEQ_1:29,XBOOLE_1:63; end; theorem Th58: A is finite implies ex p st rng p = A & p is one-to-one proof defpred P[set] means ex p st rng p = $1 & p is one-to-one; rng {} = {}; then A1: P[{}]; now let B,C; assume that B in A and C c= A; given p such that A2: rng p = C and A3: p is one-to-one; A4: now assume A5: not B in C; take q = p ^ <* B *>; thus rng q = rng p \/ rng<* B *> by FINSEQ_1:31 .= C \/ {B} by A2,FINSEQ_1:38; thus q is one-to-one proof let x,y; assume that A6: x in dom q & y in dom q and A7: q.x = q.y; reconsider k = x, l = y as Element of NAT by A6; A8: now assume A9: k in dom p; given n be Nat such that A10: n in dom<* B *> and A11: l = len p + n; n in {1} by A10,FINSEQ_1:2,38; then A12: n = 1 by TARSKI:def 1; <* B *>.n = q.k by A7,A10,A11,FINSEQ_1:def 7 .= p.k by A9,FINSEQ_1:def 7; then B = p.k by A12,FINSEQ_1:def 8; hence thesis by A2,A5,A9,FUNCT_1:def 3; end; A13: now assume A14: l in dom p; given n be Nat such that A15: n in dom<* B *> and A16: k = len p + n; n in {1} by A15,FINSEQ_1:2,38; then A17: n = 1 by TARSKI:def 1; <* B *>.n = q.l by A7,A15,A16,FINSEQ_1:def 7 .= p.l by A14,FINSEQ_1:def 7; then B = p.l by A17,FINSEQ_1:def 8; hence thesis by A2,A5,A14,FUNCT_1:def 3; end; A18: now given m1 being Nat such that A19: m1 in dom<* B *> and A20: k = len p + m1; m1 in {1} by A19,FINSEQ_1:2,def 8; then A21: m1 = 1 by TARSKI:def 1; given m2 being Nat such that A22: m2 in dom<* B *> and A23: l = len p + m2; m2 in {1} by A22,FINSEQ_1:2,def 8; hence thesis by A20,A23,A21,TARSKI:def 1; end; now assume A24: k in dom p & l in dom p; then q.k = p.k & q.l = p.l by FINSEQ_1:def 7; hence thesis by A3,A7,A24,FUNCT_1:def 4; end; hence thesis by A6,A8,A13,A18,FINSEQ_1:25; end; end; now assume A25: B in C; take q = p; thus rng q = C \/ {B} & q is one-to-one by A2,A3,A25,ZFMISC_1:40; end; hence ex p st rng p = C \/ {B} & p is one-to-one by A4; end; then A26: for B,C being set st B in A & C c= A & P[C] holds P[C \/ {B}]; assume A27: A is finite; thus P[A] from FINSET_1:sch 2(A27,A1,A26); end; theorem Th59: rng p c= dom p & p is one-to-one implies rng p = dom p proof defpred P[Nat] means for q st len q = $1 & rng q c= dom q & q is one-to-one holds rng q = dom q; A1: len p = len p; now let k; assume A2: for q st len q = k & rng q c= dom q & q is one-to-one holds rng q = dom q; let q; assume that A3: len q = k + 1 and A4: rng q c= dom q and A5: q is one-to-one; A6: dom q = Seg(k + 1) by A3,FINSEQ_1:def 3; dom q c= rng q proof let x; assume A7: x in dom q; then reconsider n = x as Element of NAT; per cases; suppose A8: k + 1 in rng q; now per cases; suppose n = k + 1; hence thesis by A8; end; suppose n <> k + 1; then not x in {k + 1} by TARSKI:def 1; then x in Seg(k + 1) \ {k + 1} by A6,A7,XBOOLE_0:def 5; then A9: x in Seg k by FINSEQ_1:10; set r = q - {k + 1}; A10: len r = (k + 1) - 1 by A3,A5,A8,FINSEQ_3:90; then A11: dom r = Seg k by FINSEQ_1:def 3; A12: rng r = rng q \ {k + 1} by FINSEQ_3:65; then rng r c= Seg(k + 1) \ {k + 1} by A4,A6,XBOOLE_1:33; then rng r c= dom r by A11,FINSEQ_1:10; then rng r = dom r by A2,A5,A10,FINSEQ_3:87; hence thesis by A12,A11,A9; end; end; hence thesis; end; suppose A13: not k + 1 in rng q; A14: rng q c= Seg k proof let x; assume A15: x in rng q; then not x in {k + 1} by A13,TARSKI:def 1; then x in Seg(k + 1) \ {k + 1} by A4,A6,A15,XBOOLE_0:def 5; hence thesis by FINSEQ_1:10; end; A16: k + 1 in Seg(k + 1) by FINSEQ_1:4; then A17: q.(k + 1) in rng q by A6,FUNCT_1:def 3; reconsider r = q | Seg k as FinSequence by FINSEQ_1:15; A18: dom r c= dom q & k < k + 1 by RELAT_1:60,XREAL_1:29; A19: len r = k by A3,FINSEQ_3:53; then A20: dom r = Seg k by FINSEQ_1:def 3; rng r c= rng q & r is one-to-one by A5,FUNCT_1:52,RELAT_1:70; then rng r = dom r by A2,A19,A20,A14,XBOOLE_1:1; then consider x such that A21: x in dom r and A22: r.x = q.(k + 1) by A20,A14,A17,FUNCT_1:def 3; reconsider n = x as Element of NAT by A21; r.x = q.x & n <= k by A20,A21,FINSEQ_1:1,FUNCT_1:49; hence thesis by A5,A6,A16,A21,A22,A18,FUNCT_1:def 4; end; end; hence rng q = dom q by A4,XBOOLE_0:def 10; end; then A23: for k st P[k] holds P[k+1]; now let q; assume A24: len q = 0; assume that rng q c= dom q and q is one-to-one; q = {} by A24; hence rng q = dom q by RELAT_1:38; end; then A25: P[0]; for k holds P[k] from NAT_1:sch 2(A25,A23); hence thesis by A1; end; theorem Th60: rng p = dom p implies p is one-to-one proof defpred P[Nat] means for p st len p = $1 & rng p = dom p holds p is one-to-one; A1: len p = len p; A2: now let k; assume A3: P[k]; thus P[k+1] proof set x = k + 1; let p; set q = p - {k + 1}; assume that A4: len p = k + 1 and A5: rng p = dom p; A6: dom p = Seg(k + 1) by A4,FINSEQ_1:def 3; then A7: k + 1 in rng p by A5,FINSEQ_1:4; now rng q = Seg(k + 1) \ {k + 1} by A5,A6,FINSEQ_3:65 .= Seg k by FINSEQ_1:10; then card(rng q) = k by FINSEQ_1:57; then A8: card k = card(rng q); p.(x..p) = x by A5,A6,Th19,FINSEQ_1:4; then A9: p.(x..p) in {k + 1} by TARSKI:def 1; let l; assume that A10: l in dom p and A11: l <> (k + 1)..p and A12: p.l = k + 1; A13: card{x..p,l} = 2 by A11,CARD_2:57; p.l in {k + 1} by A12,TARSKI:def 1; then A14: l in p " {x} by A10,FUNCT_1:def 7; x..p in dom p by A5,A6,Th20,FINSEQ_1:4; then x..p in p " {x} by A9,FUNCT_1:def 7; then {x..p,l} c= p " {k + 1} by A14,ZFMISC_1:32; then A15: 2 <= card(p " {k + 1}) by A13,NAT_1:43; len q = (k + 1) - card(p " {k + 1}) by A4,FINSEQ_3:59; then 2 + len q <= card(p " {x}) + ((k + 1) - card(p " {k + 1})) by A15, XREAL_1:6; then len q + 1 + 1 <= k + 1; then len q + 1 <= k by XREAL_1:6; then A16: len q <= k - 1 by XREAL_1:19; dom q = Seg(len q) by FINSEQ_1:def 3; then card(rng q) c= card(dom q) & card(len q) = card(dom q) by CARD_1:12,FINSEQ_1:57; then k <= len q by A8,NAT_1:40; then k <= k - 1 by A16,XXREAL_0:2; then k + 1 <= k + 0 by XREAL_1:19; hence contradiction by XREAL_1:6; end; then A17: p just_once_values k + 1 by A7,Th27; then A18: len q = (k + 1) - 1 by A4,Th30 .= k; A19: q = (p -| (k + 1)) ^ (p |-- (k + 1)) by A17,Th54; rng q = Seg(k + 1) \ {k + 1} by A5,A6,FINSEQ_3:65 .= Seg k by FINSEQ_1:10; then dom q = rng q by A18,FINSEQ_1:def 3; hence thesis by A3,A7,A18,A19,Th56; end; end; A20: P[0] proof let p; assume len p = 0; then p = {}; hence thesis; end; for k holds P[k] from NAT_1:sch 2(A20,A2); hence thesis by A1; end; theorem rng p = rng q & len p = len q & q is one-to-one implies p is one-to-one proof assume that A1: rng p = rng q and A2: len p = len q and A3: q is one-to-one; A4: rng p = dom(q") by A1,A3,FUNCT_1:33; then A5: dom (q" * p) = dom p by RELAT_1:27 .= Seg(len p) by FINSEQ_1:def 3; then reconsider r = q" * p as FinSequence by FINSEQ_1:def 2; rng r = rng(q") by A4,RELAT_1:28 .= dom q by A3,FUNCT_1:33 .= Seg(len q) by FINSEQ_1:def 3; then r is one-to-one by A2,A5,Th60; hence thesis by A4,FUNCT_1:26; end; Lm1: for A,B being finite set, f being Function of A,B holds card A = card B & rng f = B implies f is one-to-one proof let A,B be finite set, f be Function of A,B; assume that A1: card A = card B and A2: rng f = B; A3: A,B are_equipotent by A1,CARD_1:5; consider p such that A4: rng p = A and A5: p is one-to-one by Th58; dom p,p .: (dom p) are_equipotent by A5,CARD_1:33; then dom p,A are_equipotent by A4,RELAT_1:113; then A6: dom p,B are_equipotent by A3,WELLORD2:15; reconsider X = dom p as finite set; consider q such that A7: rng q = B and A8: q is one-to-one by Th58; A9: dom q = Seg(len q) by FINSEQ_1:def 3; dom q,q .: (dom q) are_equipotent by A8,CARD_1:33; then dom q,B are_equipotent by A7,RELAT_1:113; then dom p,dom q are_equipotent by A6,WELLORD2:15; then card X = card(Seg(len q)) by A9,CARD_1:5 .= len q by FINSEQ_1:57; then A10: len q = card(Seg(len p)) by FINSEQ_1:def 3 .= len p by FINSEQ_1:57; now per cases; suppose B = {}; hence thesis; end; suppose A11: B <> {}; then rng p = dom f by A4,FUNCT_2:def 1; then A12: rng(f * p) = B by A2,RELAT_1:28 .= dom(q") by A7,A8,FUNCT_1:33; dom(q") = rng q by A8,FUNCT_1:33; then rng f c= dom(q") by A7,RELAT_1:def 19; then dom(q" * f) = dom f by RELAT_1:27; then rng p = dom(q" * f) by A4,A11,FUNCT_2:def 1; then A13: dom(q" * f * p) = dom p by RELAT_1:27 .= Seg(len p) by FINSEQ_1:def 3; then reconsider g = q" * f * p as FinSequence by FINSEQ_1:def 2; g = q" * (f * p) by RELAT_1:36; then rng g = rng(q") by A12,RELAT_1:28 .= dom q by A8,FUNCT_1:33 .= Seg(len q) by FINSEQ_1:def 3; then A14: g is one-to-one by A10,A13,Th60; q * g = q * (q " * (f * p)) by RELAT_1:36 .= q * q" * (f * p) by RELAT_1:36 .= id(rng q) * (f * p) by A8,FUNCT_1:39 .= id(rng q) * f * p by RELAT_1:36 .= f * p by A2,A7,RELAT_1:54; then q * g * p" = f * (p * p") by RELAT_1:36 .= f * id(rng p) by A5,FUNCT_1:39 .= f * id(dom f) by A4,A11,FUNCT_2:def 1 .= f by RELAT_1:52; hence thesis by A5,A8,A14; end; end; hence thesis; end; theorem Th62: p is one-to-one iff card(rng p) = len p proof thus p is one-to-one implies card(rng p) = len p proof assume p is one-to-one; then dom p,p .: (dom p) are_equipotent by CARD_1:33; then dom p,rng p are_equipotent by RELAT_1:113; then Seg(len p),rng p are_equipotent by FINSEQ_1:def 3; then card(Seg(len p)) = card(rng p) by CARD_1:5; hence thesis by FINSEQ_1:57; end; reconsider f = p as Function of dom p, rng p by FUNCT_2:1; reconsider B = dom p as finite set; assume card(rng p) = len p; then card(rng p) = card(Seg(len p)) by FINSEQ_1:57; then A1: card(rng p) = card B by FINSEQ_1:def 3; dom f is finite; hence thesis by A1,Lm1; end; reserve f for Function of A,B; theorem for A,B being finite set, f being Function of A,B holds card A = card B & f is one-to-one implies rng f = B proof let A,B be finite set; let f be Function of A,B; assume that A1: card A = card B and A2: f is one-to-one; A3: A,B are_equipotent by A1,CARD_1:5; consider p such that A4: rng p = A and A5: p is one-to-one by Th58; dom p,p .: (dom p) are_equipotent by A5,CARD_1:33; then dom p,A are_equipotent by A4,RELAT_1:113; then A6: dom p,B are_equipotent by A3,WELLORD2:15; consider q such that A7: rng q = B and A8: q is one-to-one by Th58; A9: dom q = Seg(len q) by FINSEQ_1:def 3; dom q,q .: (dom q) are_equipotent by A8,CARD_1:33; then dom q,B are_equipotent by A7,RELAT_1:113; then dom p,dom q are_equipotent by A6,WELLORD2:15; then card dom p = card(Seg(len q)) by A9,CARD_1:5 .= len q by FINSEQ_1:57; then A10: len q = card(Seg(len p)) by FINSEQ_1:def 3 .= len p by FINSEQ_1:57; per cases; suppose B = {}; hence thesis; end; suppose A11: B <> {}; dom(q") = rng q by A8,FUNCT_1:33; then rng f c= dom(q") by A7,RELAT_1:def 19; then dom(q" * f) = dom f by RELAT_1:27; then rng p = dom(q" * f) by A4,A11,FUNCT_2:def 1; then A12: dom(q" * f * p) = dom p by RELAT_1:27 .= Seg(len p) by FINSEQ_1:def 3; then reconsider g = q" * f * p as FinSequence by FINSEQ_1:def 2; g = q" * (f * p) by RELAT_1:36; then rng g c= rng(q") by RELAT_1:26; then rng g c= dom q by A8,FUNCT_1:33; then rng g c= dom g by A10,A12,FINSEQ_1:def 3; then rng g = dom g by A2,A5,A8,Th59; then rng g = dom q by A10,A12,FINSEQ_1:def 3; then A13: rng(q * g) = B by A7,RELAT_1:28; A14: rng f c= rng q by A7,RELAT_1:def 19; A15: rng p = dom f by A4,A11,FUNCT_2:def 1; q * g = q * (q " * (f * p)) by RELAT_1:36 .= q * q" * (f * p) by RELAT_1:36 .= id(rng q) * (f * p) by A8,FUNCT_1:39 .= id(rng q) * f * p by RELAT_1:36 .= f * p by A14,RELAT_1:53; hence thesis by A13,A15,RELAT_1:28; end; end; theorem for A,B being finite set, f being Function of A,B st card A = card B & rng f = B holds f is one-to-one by Lm1; theorem card B in card A & B <> {} implies ex x,y st x in A & y in A & x <> y & f.x = f.y proof assume that A1: card B in card A and A2: B <> {} and A3: for x,y st x in A & y in A & x <> y holds f.x <> f.y; A4: dom f = A by A2,FUNCT_2:def 1; then for x,y holds x in dom f & y in dom f & f.x = f.y implies x = y by A3; then f is one-to-one by FUNCT_1:def 4; then dom f,f .: (dom f) are_equipotent by CARD_1:33; then dom f,rng f are_equipotent by RELAT_1:113; then A5: card A = card(rng f) by A4,CARD_1:5; rng f c= B by RELAT_1:def 19; then card A c= card B by A5,CARD_1:11; hence contradiction by A1,CARD_1:4; end; theorem Th66: card A in card B implies ex x st x in B & for y st y in A holds f.y <> x proof assume that A1: card A in card B and A2: for x st x in B ex y st y in A & f.y = x; A3: dom f = A by A1,CARD_1:27,FUNCT_2:def 1; rng f = B proof thus rng f c= B by RELAT_1:def 19; let x; assume x in B; then ex y st y in A & f.y = x by A2; hence thesis by A3,FUNCT_1:def 3; end; then card B c= card A by A3,CARD_1:12; hence thesis by A1,CARD_1:4; end; begin theorem for D being non empty set, f being FinSequence of D, p being Element of D holds (f^<*p*>)/.(len f + 1) = p proof let D be non empty set, f be FinSequence of D, p be Element of D; len(f^<*p*>) = len f + len<*p*> by FINSEQ_1:22; then 1 <= len f + 1 & len f + 1 <= len(f^<*p*>) by FINSEQ_1:39,NAT_1:11; then len f + 1 in dom(f^<*p*>) by FINSEQ_3:25; hence (f^<*p*>)/.(len f + 1) = (f^<*p*>).(len f + 1) by PARTFUN1:def 6 .= p by FINSEQ_1:42; end; theorem for E being non empty set, p,q being FinSequence of E st k in dom p holds (p ^ q)/.k = p/.k proof let E be non empty set, p,q be FinSequence of E; assume A1: k in dom p; then k in dom(p ^ q) by FINSEQ_3:22; hence (p ^ q)/.k = (p ^ q).k by PARTFUN1:def 6 .= p.k by A1,FINSEQ_1:def 7 .= p/.k by A1,PARTFUN1:def 6; end; theorem for E being non empty set, p,q being FinSequence of E st k in dom q holds (p ^ q)/.(len p + k) = q/.k proof let E be non empty set, p,q be FinSequence of E; assume A1: k in dom q; then len p + k in dom(p ^ q) by FINSEQ_1:28; hence (p ^ q)/.(len p + k) = (p ^ q).(len p + k) by PARTFUN1:def 6 .= q.k by A1,FINSEQ_1:def 7 .= q/.k by A1,PARTFUN1:def 6; end; theorem for m being Nat for D being set, p being FinSequence of D st a in dom( p|m) holds (p|m qua FinSequence of D)/.a = p/.a proof let m be Nat; let D be set, p being FinSequence of D; assume A1: a in dom(p|m); then a in dom p /\ (Seg m) by RELAT_1:61; then A2: a in dom p by XBOOLE_0:def 4; thus (p|m)/.a = (p|Seg m).a by A1,PARTFUN1:def 6 .= p.a by A1,FUNCT_1:47 .= p/.a by A2,PARTFUN1:def 6; end; theorem for D being set, f being FinSequence of D, n,m st n in dom f & m in Seg n holds m in dom f & (f|n)/.m = f/.m proof let D be set, f be FinSequence of D, n,m; assume that A1: n in dom f and A2: m in Seg n; dom f = Seg len f & n<=len f by A1,FINSEQ_1:def 3,FINSEQ_3:25; then A3: Seg n c= dom f by FINSEQ_1:5; hence m in dom f by A2; A4: Seg n = dom f /\ Seg n by A3,XBOOLE_1:28 .= dom(f|n) by RELAT_1:61; hence (f|n)/.m = (f|n).m by A2,PARTFUN1:def 6 .= f.m by A2,A4,FUNCT_1:47 .= f/.m by A2,A3,PARTFUN1:def 6; end; theorem for X being finite set st n <= card X holds ex A being finite Subset of X st card A = n proof let X be finite set such that A1: n <= card X; consider p being FinSequence such that A2: rng p = X and A3: p is one-to-one by Th58; reconsider q = p|Seg n as FinSequence by FINSEQ_1:15; n <= len p by A1,A2,A3,Th62; then A4: len q = n by FINSEQ_1:17; reconsider A = rng q as Subset of X by A2,RELAT_1:70; q is one-to-one by A3,FUNCT_1:52; then card A = n by A4,Th62; hence thesis; end; reserve f for Function; theorem f is one-to-one & x in rng f implies card Coim (f,x) = 1 proof assume f is one-to-one & x in rng f; then f just_once_values x by Th8; hence thesis by Def2; end; definition let x1,x2,x3,x4 be set; func <*x1,x2,x3,x4*> -> set equals <*x1,x2,x3*>^<*x4*>; correctness; let x5 be set; func <*x1,x2,x3,x4,x5*> -> set equals <*x1,x2,x3*>^<*x4,x5*>; correctness; end; registration let x1,x2,x3,x4 be set; cluster <*x1,x2,x3,x4*> -> non empty Function-like Relation-like; coherence; let x5 be set; cluster <*x1,x2,x3,x4,x5*> -> non empty Function-like Relation-like; coherence; end; registration let x1,x2,x3,x4 be set; cluster <*x1,x2,x3,x4*> -> FinSequence-like; coherence; let x5 be set; cluster <*x1,x2,x3,x4,x5*> -> FinSequence-like; coherence; end; definition let D be non empty set,x1,x2,x3,x4 be Element of D; redefine func <* x1,x2,x3,x4*> -> FinSequence of D; coherence proof <*x1,x2,x3,x4*>=<* x1,x2,x3*>^<*x4*>; hence thesis; end; end; definition let D be non empty set,x1,x2,x3,x4,x5 be Element of D; redefine func <*x1,x2,x3,x4,x5*> -> FinSequence of D; coherence proof <*x1,x2,x3,x4,x5*>=<* x1,x2,x3*>^<*x4,x5*>; hence thesis; end; end; reserve x1,x2,x3,x4,x5 for set; theorem Th74: <*x1,x2,x3,x4*>=<*x1,x2,x3*>^<*x4*> & <*x1,x2,x3,x4*>=<*x1,x2*>^ <*x3,x4*> & <*x1,x2,x3,x4*>=<*x1*>^<*x2,x3,x4*> & <*x1,x2,x3,x4*>=<*x1*>^<*x2*> ^<*x3*>^<*x4*> proof thus <*x1,x2,x3,x4*>=<*x1,x2,x3*>^<*x4*>; thus <*x1,x2,x3,x4*>=<*x1,x2*>^<*x3,x4*> by FINSEQ_1:32; hence <*x1,x2,x3,x4*>=<*x1*>^(<*x2*>^<*x3,x4*>) by FINSEQ_1:32 .=<*x1*>^<*x2,x3,x4*> by FINSEQ_1:43; thus thesis; end; theorem Th75: <*x1,x2,x3,x4,x5*>=<*x1,x2,x3*>^<*x4,x5*> & <*x1,x2,x3,x4,x5*>= <*x1,x2,x3,x4*>^<*x5*> & <*x1,x2,x3,x4,x5*>=<*x1*>^<*x2*>^<*x3*>^<*x4*>^<*x5*> & <*x1,x2,x3,x4,x5*>=<*x1,x2*>^<*x3,x4,x5*> & <*x1,x2,x3,x4,x5*>=<*x1*>^<*x2,x3 ,x4,x5*> proof thus <*x1,x2,x3,x4,x5*>=<*x1,x2,x3*>^<*x4,x5*>; thus A1: <*x1,x2,x3,x4,x5*>=<*x1,x2,x3,x4*>^<*x5*> by FINSEQ_1:32; thus <*x1,x2,x3,x4,x5*>=<*x1*>^<*x2*>^<*x3*>^<*x4*>^<*x5*> by FINSEQ_1:32; thus <*x1,x2,x3,x4,x5*>=<*x1,x2*>^(<*x3*>^<*x4*>)^<*x5*> by A1,FINSEQ_1:32 .=<*x1,x2*>^<*x3,x4,x5*> by FINSEQ_1:32; hence <*x1,x2,x3,x4,x5*>=<*x1*>^(<*x2*>^<*x3,x4,x5*>) by FINSEQ_1:32 .=<*x1*>^<*x2,x3,x4,x5*> by Th74; end; reserve p for FinSequence; theorem Th76: p = <*x1,x2,x3,x4*> iff len p = 4 & p.1 = x1 & p.2 = x2 & p.3=x3 & p.4= x4 proof thus p = <*x1,x2,x3,x4*> implies len p = 4 & p.1 = x1 & p.2 = x2 & p.3 = x3 & p.4 = x4 proof set p3=<*x1,x2,x3*>; assume A1: p =<*x1,x2,x3,x4*>; hence len p =len <*x1,x2,x3*> + len <*x4*> by FINSEQ_1:22 .=3 + len <*x4*> by FINSEQ_1:45 .=3+1 by FINSEQ_1:40 .=4; A2: dom p3 ={1,2,3} by FINSEQ_3:1,FINSEQ_1:89; then 1 in dom p3 by ENUMSET1:def 1; hence p.1 = p3.1 by A1,FINSEQ_1:def 7 .=x1 by FINSEQ_1:45; 2 in dom p3 by A2,ENUMSET1:def 1; hence p.2 = p3.2 by A1,FINSEQ_1:def 7 .=x2 by FINSEQ_1:45; 3 in dom p3 by A2,ENUMSET1:def 1; hence p.3 = p3.3 by A1,FINSEQ_1:def 7 .=x3 by FINSEQ_1:45; 1 in {1} by TARSKI:def 1; then A3: 1 in dom <*x4*> by FINSEQ_1:2,def 8; thus p.4 = (p3^<*x4*>).(3+1) by A1 .=(p3^<*x4*>).(len p3 + 1) by FINSEQ_1:45 .= <*x4*>.1 by A3,FINSEQ_1:def 7 .= x4 by FINSEQ_1:def 8; end; assume that A4: len p = 4 and A5: p.1 = x1 and A6: p.2 = x2 and A7: p.3 = x3 and A8: p.4=x4; A9: for k be Nat st k in dom <*x1,x2,x3*> holds p.k=<*x1,x2,x3*>.k proof A10: len <*x1,x2,x3*> = 3 by FINSEQ_1:45; let k be Nat; assume k in dom <*x1,x2,x3*>; then A11: k in {1,2,3} by A10,FINSEQ_1:def 3,FINSEQ_3:1; per cases by A11,ENUMSET1:def 1; suppose k=1; hence thesis by A5,FINSEQ_1:45; end; suppose k=2; hence thesis by A6,FINSEQ_1:45; end; suppose k=3; hence thesis by A7,FINSEQ_1:45; end; end; A12: for k be Nat st k in dom <*x4*> holds p.( (len <*x1,x2,x3*>) + k) = <* x4*>.k proof let k be Nat; assume k in dom <*x4*>; then k in {1} by FINSEQ_1:2,def 8; then A13: k = 1 by TARSKI:def 1; hence p.( (len <*x1,x2,x3*>) + k) = p.(3+1) by FINSEQ_1:45 .=<*x4*>.k by A8,A13,FINSEQ_1:def 8; end; dom p = Seg(3+1) by A4,FINSEQ_1:def 3 .= Seg((len <*x1,x2,x3*>) + 1) by FINSEQ_1:45 .= Seg((len <*x1,x2,x3*>) + len <*x4*>) by FINSEQ_1:39; hence thesis by A9,A12,FINSEQ_1:def 7; end; canceled; theorem Th78: p = <*x1,x2,x3,x4,x5*> iff len p = 5 & p.1 = x1 & p.2 = x2 & p.3 =x3 & p.4= x4 & p.5= x5 proof set p4=<*x1,x2,x3,x4*>; thus p = <*x1,x2,x3,x4,x5*> implies len p = 5 & p.1 = x1 & p.2 = x2 & p.3 = x3 & p.4 = x4 & p.5 = x5 proof set p4=<*x1,x2,x3,x4*>; 1 in {1} by TARSKI:def 1; then A1: 1 in dom <*x5*> by FINSEQ_1:2,def 8; assume A2: p =<*x1,x2,x3,x4,x5*>; then A3: p = (p4^<*x5*>) by Th75; thus len p = len (<*x1,x2,x3,x4*>^<*x5*>) by A2,Th75 .=len <*x1,x2,x3,x4*> + len <*x5*> by FINSEQ_1:22 .=4 + len <*x5*> by Th76 .=4+1 by FINSEQ_1:40 .=5; A4: dom p4 ={1,2,3,4} by FINSEQ_1:89,FINSEQ_3:2; then 1 in dom p4 by ENUMSET1:def 2; hence p.1 = p4.1 by A3,FINSEQ_1:def 7 .=x1 by Th76; 2 in dom p4 by A4,ENUMSET1:def 2; hence p.2 = p4.2 by A3,FINSEQ_1:def 7 .=x2 by Th76; 3 in dom p4 by A4,ENUMSET1:def 2; hence p.3 = p4.3 by A3,FINSEQ_1:def 7 .=x3 by Th76; 4 in dom p4 by A4,ENUMSET1:def 2; hence p.4 = p4.4 by A3,FINSEQ_1:def 7 .=x4 by Th76; thus p.5 = (p4^<*x5*>).(4+1) by A2,Th75 .=(p4^<*x5*>).(len p4+ 1) by Th76 .= <*x5*>.1 by A1,FINSEQ_1:def 7 .= x5 by FINSEQ_1:def 8; end; assume that A5: len p = 5 and A6: p.1 = x1 and A7: p.2 = x2 and A8: p.3 = x3 and A9: p.4=x4 and A10: p.5=x5; A11: for k be Nat st k in dom p4 holds p.k=p4.k proof A12: len p4 = 4 by Th76; let k be Nat; assume k in dom p4; then A13: k in {1,2,3,4} by A12,FINSEQ_1:def 3,FINSEQ_3:2; per cases by A13,ENUMSET1:def 2; suppose k=1; hence thesis by A6,Th76; end; suppose k=2; hence thesis by A7,Th76; end; suppose k=3; hence thesis by A8,Th76; end; suppose k=4; hence thesis by A9,Th76; end; end; A14: for k be Nat st k in dom <*x5*> holds p.( len p4 + k) = <*x5*>.k proof let k be Nat; assume k in dom <*x5*>; then k in {1} by FINSEQ_1:2,def 8; then A15: k = 1 by TARSKI:def 1; hence p.( len p4 + k) = p.(4+1) by Th76 .=<*x5*>.k by A10,A15,FINSEQ_1:def 8; end; dom p = Seg(4+1) by A5,FINSEQ_1:def 3 .= Seg(len p4 + 1) by Th76 .= Seg(len p4 + len <*x5*>) by FINSEQ_1:39; hence p=p4^<*x5*> by A11,A14,FINSEQ_1:def 7 .=<*x1,x2,x3,x4,x5*> by Th75; end; reserve ND for non empty set; reserve y1,y2,y3,y4,y5 for Element of ND; canceled; theorem <*y1,y2,y3,y4*>/.1 = y1 & <*y1,y2,y3,y4*>/.2 = y2 & <*y1,y2,y3,y4*>/.3 = y3 & <*y1,y2,y3,y4*>/.4=y4 proof set s = <* y1,y2,y3,y4 *>; A1: 2 in {1,2,3,4} & 3 in {1,2,3,4} by FINSEQ_3:2; A2: s.2 = y2 & s.3 = y3 by Th76; A3: 4 in {1,2,3,4} by FINSEQ_3:2; A4: s.4 = y4 & 1 in {1,2,3,4} by Th76,FINSEQ_3:2; dom s = {1,2,3,4} & s.1 = y1 by Th76,FINSEQ_1:89,FINSEQ_3:2; hence thesis by A2,A4,A1,A3,PARTFUN1:def 6; end; theorem <*y1,y2,y3,y4,y5*>/.1 = y1 & <*y1,y2,y3,y4,y5*>/.2 = y2 & <*y1,y2,y3, y4,y5*>/.3 = y3 & <*y1,y2,y3,y4,y5*>/.4=y4 & <*y1,y2,y3,y4,y5*>/.5=y5 proof set s = <* y1,y2,y3,y4,y5 *>, i5={1,2,3,4,5}; A1: 1 in i5 & 2 in i5 by FINSEQ_3:3; A2: 3 in i5 & 4 in i5 by FINSEQ_3:3; A3: s.4 = y4 & s.5=y5 by Th78; A4: s.2 = y2 & s.3 = y3 by Th78; A5: 5 in i5 by FINSEQ_3:3; dom s =i5 & s.1 = y1 by Th78,FINSEQ_1:89,FINSEQ_3:3; hence thesis by A4,A3,A1,A2,A5,PARTFUN1:def 6; end; scheme Sch1{D()->non empty set, N()->Nat, P[set,set]}: ex f being FinSequence of D( ) st len f = N() & for n st n in Seg N() holds P[n,f/.n] provided A1: for n st n in Seg N() ex d being Element of D() st P[n,d] proof defpred P1[set,set] means P[$1,$2] & $2 in D(); reconsider X=D() as set; A2: now let x be set; assume A3: x in Seg N(); then reconsider x9=x as Element of NAT; consider d be Element of D() such that A4: P[x9,d] by A1,A3; reconsider y=d as set; take y; thus y in X & P1[x,y] by A4; end; consider f be Function such that A5: dom f = Seg N() & rng f c= X & for x be set st x in Seg N() holds P1 [x,f.x] from FUNCT_1:sch 5(A2); reconsider f as FinSequence by A5,FINSEQ_1:def 2; reconsider f as FinSequence of D() by A5,FINSEQ_1:def 4; take f; N() in NAT by ORDINAL1:def 12; hence len f = N() by A5,FINSEQ_1:def 3; let n; assume A6: n in Seg N(); then P[n,f.n] by A5; hence thesis by A5,A6,PARTFUN1:def 6; end; theorem Th82: for D being non empty set, p,q being FinSequence of D st p c= q holds ex p9 being FinSequence of D st p ^ p9 = q proof let D be non empty set, p,q be FinSequence of D; assume A1: p c= q; dom p = Seg len p & dom q = Seg len q by FINSEQ_1:def 3; then Seg len p c= Seg len q by A1,GRFUNC_1:2; then len p <= len q by FINSEQ_1:5; then reconsider N = len q - len p as Element of NAT by INT_1:3,XREAL_1:48; defpred P[Nat,set] means q/.(len p + $1) = $2; A2: for n being Nat st n in Seg N ex d being Element of D st P[n,d]; consider f being FinSequence of D such that A3: len f = N and A4: for n being Nat st n in Seg N holds P[n,f/.n] from Sch1(A2); take f; A5: len (p ^ f) = len p + N by A3,FINSEQ_1:22 .= len q; now let k be Nat; assume that A6: 1 <= k and A7: k <= len (p ^ f); A8: k in NAT by ORDINAL1:def 12; then k in Seg len q by A5,A6,A7; then A9: k in dom q by FINSEQ_1:def 3; per cases; suppose k <= len p; then k in Seg len p by A6,A8; then A10: k in dom p by FINSEQ_1:def 3; hence (p ^ f).k = p.k by FINSEQ_1:def 7 .= q.k by A1,A10,GRFUNC_1:2; end; suppose A11: len p < k; then k - len p > 0 by XREAL_1:50; then reconsider kk = k - len p as Element of NAT by INT_1:3; k <= len p + len f by A7,FINSEQ_1:22; then A12: kk <= len p + len f - len p by XREAL_1:9; k - len p >= 0 + 1 by A11,INT_1:7,XREAL_1:50; then A13: kk in Seg len f by A12; then A14: kk in dom f by FINSEQ_1:def 3; thus (p ^ f).k = f.kk by A7,A11,FINSEQ_1:24 .= f/.kk by A14,PARTFUN1:def 6 .= q/.(len p + kk) by A3,A4,A13 .= q.k by A9,PARTFUN1:def 6; end; end; hence thesis by A5,FINSEQ_1:14; end; theorem for D being non empty set, p,q being FinSequence of D, i being Element of NAT st p c= q & 1 <= i & i <= len p holds q.i = p.i proof let D be non empty set, p,q be FinSequence of D, i be Element of NAT; assume p c= q; then A1: ex p9 being FinSequence of D st p ^ p9 = q by Th82; assume 1 <= i & i <= len p; hence thesis by A1,FINSEQ_1:64; end; scheme PiLambdaD{D()-> non empty set, l()->Nat, F(set)-> Element of D()}: ex g being FinSequence of D() st len g=l() & for n being Nat st n in dom g holds g/. n=F(n) proof consider g being FinSequence of D() such that A1: len g=l() & for n be Nat st n in dom g holds g.n=F(n) from FINSEQ_2: sch 1; take g; thus len g=l() by A1; let n be Nat; assume A2: n in dom g; then g.n = F(n) by A1; hence thesis by A2,PARTFUN1:def 6; end; registration let x1,x2,x3,x4 be set; cluster <*x1,x2,x3,x4*> -> 4-element; coherence; let x5 be set; cluster <*x1,x2,x3,x4,x5*> -> 5-element; coherence; end; begin theorem for m, n being Nat holds m < n implies ex p being Element of NAT st n = m+p & 1 <= p proof let m, n be Nat; assume A1: m < n; then consider p being Nat such that A2: n=m+p by NAT_1:10; reconsider p as Element of NAT by ORDINAL1:def 12; take p; thus n = m+p by A2; assume p < 1; then p < 0+1; then p = 0 by NAT_1:13; hence contradiction by A1,A2; end; theorem for S being set, D1, D2 being non empty set, f1 being Function of S, D1, f2 being Function of D1, D2 holds f1 is bijective & f2 is bijective implies f2*f1 is bijective proof let S be set, D1, D2 be non empty set, f1 be Function of S, D1, f2 be Function of D1, D2; set f3 = f2*f1; A1: dom f2 = D1 by FUNCT_2:def 1; assume A2: f1 is bijective & f2 is bijective; then rng f2 = D2 & rng f1 = D1 by FUNCT_2:def 3; then rng f3 = D2 by A1,RELAT_1:28; then f3 is one-to-one onto by A2,FUNCT_2:def 3; hence thesis; end; theorem for Y being set, E1, E2 being Equivalence_Relation of Y holds Class E1 = Class E2 implies E1 = E2 proof let Y be set, E1, E2 be Equivalence_Relation of Y such that A1: Class E1 = Class E2; now let x be set; hereby assume A2: x in E1; then consider a, b being set such that A3: x = [a, b] and A4: a in Y and A5: b in Y by RELSET_1:2; reconsider a,b as Element of Y by A4,A5; Class (E1, b) in Class E2 by A1,A4,EQREL_1:def 3; then consider c being set such that c in Y and A6: Class (E1, b) = Class (E2, c) by EQREL_1:def 3; b in Class (E1, b) by A4,EQREL_1:20; then [b, c] in E2 by A6,EQREL_1:19; then A7: [c, b] in E2 by EQREL_1:6; a in Class (E1, b) by A2,A3,EQREL_1:19; then [a, c] in E2 by A6,EQREL_1:19; hence x in E2 by A3,A7,EQREL_1:7; end; assume A8: x in E2; then consider a, b being set such that A9: x = [a, b] and A10: a in Y and A11: b in Y by RELSET_1:2; reconsider a, b as Element of Y by A10,A11; Class (E2, b) in Class E1 by A1,A10,EQREL_1:def 3; then consider c being set such that c in Y and A12: Class (E2, b) = Class (E1, c) by EQREL_1:def 3; b in Class (E2, b) by A10,EQREL_1:20; then [b, c] in E1 by A12,EQREL_1:19; then A13: [c, b] in E1 by EQREL_1:6; a in Class (E2, b) by A8,A9,EQREL_1:19; then [a, c] in E1 by A12,EQREL_1:19; hence x in E1 by A9,A13,EQREL_1:7; end; hence thesis by TARSKI:1; end; registration let Z be finite set; cluster -> finite for a_partition of Z; coherence; end; registration let X be non empty finite set; cluster non empty finite for a_partition of X; existence proof set p = the a_partition of X; take p; thus thesis; end; end; reserve X, A for non empty finite set, PX for a_partition of X, PA1, PA2 for a_partition of A; theorem Th87: for X being non empty set, PX being a_partition of X for Pi being set st Pi in PX ex x being Element of X st x in Pi proof let X be non empty set, PX be a_partition of X; let Pi be set; assume Pi in PX; then reconsider Pi as Element of PX; set q = the Element of Pi; A1: Pi <> {} by EQREL_1:def 4; then q in Pi; then reconsider q as Element of X; take q; thus thesis by A1; end; theorem card PX <= card X proof assume card PX > card X; then card card X in card card PX by NAT_1:41; then consider Pi being set such that A1: Pi in PX and A2: for x being set st x in X holds (proj PX).x <> Pi by Th66; reconsider Pi as Element of PX by A1; consider q being Element of X such that A3: q in Pi by Th87; reconsider Pq = (proj PX).q as Element of PX; A4: Pq = Pi or Pq misses Pi by EQREL_1:def 4; q in Pq by EQREL_1:def 9; hence contradiction by A2,A3,A4,XBOOLE_0:3; end; theorem PA1 is_finer_than PA2 implies card PA2 <= card PA1 proof defpred P[set,set] means $1 c= $2; assume PA1 is_finer_than PA2; then A1: for e being set st e in PA1 ex u being set st u in PA2 & P[e,u] by SETFAM_1:def 2; consider f being Function of PA1, PA2 such that A2: for e being set st e in PA1 holds P[e,f.e] from FUNCT_2:sch 1 (A1); assume card PA1 < card PA2; then card card PA1 in card card PA2 by NAT_1:41; then consider p2i being set such that A3: p2i in PA2 and A4: for x being set st x in PA1 holds f.x <> p2i by Th66; reconsider p2i as Element of PA2 by A3; consider q being Element of A such that A5: q in p2i by Th87; reconsider p2q = f.((proj PA1).q) as Element of PA2; A6: p2q=p2i or p2q misses p2i by EQREL_1:def 4; q in (proj PA1).q & (proj PA1).q c= p2q by A2,EQREL_1:def 9; hence contradiction by A4,A5,A6,XBOOLE_0:3; end; theorem Th90: PA1 is_finer_than PA2 implies for p2 being Element of PA2 ex p1 being Element of PA1 st p1 c=p2 proof assume A1: PA1 is_finer_than PA2; let p2 be Element of PA2; consider E1 being Equivalence_Relation of A such that A2: PA1 = Class E1 by EQREL_1:34; reconsider p29 = p2 as Subset of A; consider E2 being Equivalence_Relation of A such that A3: PA2 = Class E2 by EQREL_1:34; consider a being set such that A4: a in A and A5: p29 = Class (E2, a) by A3,EQREL_1:def 3; A6: a in Class (E1, a) by A4,EQREL_1:20; reconsider E1a = Class (E1, a) as Element of PA1 by A2,A4,EQREL_1:def 3; consider p22 being set such that A7: p22 in PA2 and A8: E1a c= p22 by A1,SETFAM_1:def 2; reconsider p229 = p22 as Subset of A by A7; take E1a; ex b being set st b in A & p229 = Class (E2, b) by A3,A7,EQREL_1:def 3; hence thesis by A5,A8,A6,EQREL_1:23; end; theorem PA1 is_finer_than PA2 & card PA1 = card PA2 implies PA1 = PA2 proof defpred P[set,set] means $1 c= $2; assume that A1: PA1 is_finer_than PA2 and A2: card PA1 = card PA2; A3: for e being set st e in PA1 ex u being set st u in PA2 & P[e,u] by A1, SETFAM_1:def 2; consider f being Function of PA1, PA2 such that A4: for e being set st e in PA1 holds P[e,f.e] from FUNCT_2:sch 1 (A3); A5: dom f = PA1 by FUNCT_2:def 1; A6: PA2 c= rng f proof let p2 be set; assume p2 in PA2; then reconsider p29 = p2 as Element of PA2; consider p1 being Element of PA1 such that A7: p1 c= p29 by A1,Th90; reconsider fp1 = f.p1 as Subset of A by TARSKI:def 3; A8: p1 c= f.p1 by A4; p29 meets f.p1 proof ex x being Element of A st x in p1 by Th87; hence thesis by A7,A8,XBOOLE_0:3; end; then p29 = fp1 by EQREL_1:def 4; hence thesis by A5,FUNCT_1:def 3; end; rng f c= PA2 by RELAT_1:def 19; then rng f = PA2 by A6,XBOOLE_0:def 10; then A9: f is one-to-one by A2,Lm1; A10: for x being Element of PA1 holds x = f.x proof let x be Element of PA1; reconsider fx = f.x as Subset of A by TARSKI:def 3; consider E1 being Equivalence_Relation of A such that A11: PA1 = Class E1 by EQREL_1:34; assume x <> f.x; then consider a being set such that A12: a in x & not a in f.x or a in f.x & not a in x by TARSKI:1; A13: fx c= A; then A14: a in Class (E1, a) by A12,EQREL_1:20; reconsider CE1a = Class (E1, a) as Element of PA1 by A13,A12,A11, EQREL_1:def 3; reconsider fCE1a = f.CE1a as Subset of A by TARSKI:def 3; A15: x c= f.x by A4; CE1a c= f.CE1a by A4; then fx meets fCE1a by A15,A12,A14,XBOOLE_0:3; then fx = fCE1a by EQREL_1:def 4; hence contradiction by A5,A9,A15,A12,A14,FUNCT_1:def 4; end; now let x be set; hereby assume x in PA1; then reconsider x9 = x as Element of PA1; set fx = f.x9; fx in PA2; hence x in PA2 by A10; end; assume x in PA2; then consider y being set such that A16: y in dom f and A17: x = f.y by A6,FUNCT_1:def 3; reconsider y9 = y as Element of PA1 by A16,FUNCT_2:def 1; y9 = f.y9 by A10; hence x in PA1 by A17; end; hence thesis by TARSKI:1; end; registration let D be set, M be FinSequence of D*; let k; cluster M/.k -> Function-like Relation-like; coherence; end; registration let D be set, M be FinSequence of D*; let k; cluster M/.k -> FinSequence-like D-valued for Function; coherence by FINSEQ_1:def 11; end; begin reserve x,y,y1,y2 for set, D for non empty set, d,d1,d2,d3 for Element of D, F ,G,H,H1,H2 for FinSequence of D, f,f1,f2 for Function of NAT,D, g for BinOp of D, k,n,i,l for Element of NAT, P for Permutation of dom F; definition let D,F,g; assume A1: g is having_a_unity or len F >= 1; func g "**" F -> Element of D means :Def1: it = the_unity_wrt g if g is having_a_unity & len F = 0 otherwise ex f st f.1 = F.1 & (for n st 0 <> n & n < len F holds f.(n + 1) = g.(f.n,F.(n + 1))) & it = f.(len F); existence proof now per cases; suppose len F = 0; hence thesis by A1; end; suppose A2: len F <> 0; defpred P[Element of NAT] means for F st len F = $1 & len F <> 0 ex d, f st f.1 = F.1 & (for n st 0 <> n & n < len F holds f.(n + 1) = g.(f.n,F.(n + 1 ))) & d = f.(len F); A3: for k st P[k] holds P[k + 1] proof let k; assume A4: P[k]; let F; assume that A5: len F = k + 1 and len F <> 0; reconsider G = F | Seg k as FinSequence of D by FINSEQ_1:18; A6: len G = k by A5,FINSEQ_3:53; now per cases; suppose A7: len G = 0; set f = NAT --> F.1; A8: rng f c= D proof let x; assume x in rng f; then ex y st y in dom f & f.y = x by FUNCT_1:def 3; then A9: x = F.1 by FUNCOP_1:7; 1 in dom F by A5,A6,A7,FINSEQ_3:25; then A10: x in rng F by A9,FUNCT_1:def 3; rng F c= D by FINSEQ_1:def 4; hence thesis by A10; end; dom f = NAT by FUNCOP_1:13; then reconsider f as Function of NAT,D by A8,RELSET_1:4; take d = f.1,f; thus f.1 = F.1 by FUNCOP_1:7; thus for n st 0 <> n & n < len F holds f.(n + 1) = g.(f.n,F.(n + 1)) by A5,A6,A7,NAT_1:14; thus d = f.(len F) by A5,A6,A7; end; suppose A11: len G <> 0; reconsider j = len F as Element of NAT; 1 <= len F by A5,NAT_1:12; then len F in dom F by FINSEQ_3:25; then A12: F.(len F) in rng F by FUNCT_1:def 3; rng F c= D by FINSEQ_1:def 4; then reconsider t = F.(len F) as Element of D by A12; len G >= 1 by A11,NAT_1:14; then A13: 1 in dom G by FINSEQ_3:25; consider d,f such that A14: f.1 = G.1 and A15: for n st 0 <> n & n < len G holds f.(n + 1) = g.(f.n,G. (n + 1)) and A16: d = f.(len G) by A4,A5,A11,FINSEQ_3:53; deffunc F(Element of NAT) = f.$1; consider h being Function of NAT,D such that A17: h.j = g.(d,t) and A18: for n being Element of NAT st n <> j holds h.n = F(n) from FUNCT_2:sch 6; take a = h.j,h; 1 <> j by A5,A11,FINSEQ_3:53; hence h.1 = G.1 by A14,A18 .= F.1 by A13,FUNCT_1:47; thus for n st 0 <> n & n < len F holds h.(n + 1) = g.(h.n,F.(n + 1)) proof let n; assume that A19: n <> 0 and A20: n < len F; now per cases; suppose A21: n + 1 = len F; len G <> len F by A5,A6; hence thesis by A5,A6,A16,A17,A18,A21; end; suppose A22: n + 1 <> len F; n + 1 <= len F by A20,NAT_1:13; then A23: n + 1 < len F by A22,XXREAL_0:1; then A24: n < len G by A5,A6,XREAL_1:6; 1 <= n + 1 & n + 1 <= len G by A5,A6,A23,NAT_1:12,13; then A25: n + 1 in dom G by FINSEQ_3:25; h.(n + 1) = f.(n + 1) by A18,A22 .= g.(f.n,G.(n + 1)) by A15,A19,A24 .= g.(f.n,F.(n + 1)) by A25,FUNCT_1:47 .= g.(h.n,F.(n + 1)) by A18,A20; hence thesis; end; end; hence thesis; end; thus a = h.(len F); end; end; hence thesis; end; A26: P[0]; for k holds P[k] from NAT_1:sch 1(A26,A3); hence thesis by A2; end; end; hence thesis; end; uniqueness proof let d1,d2; thus g is having_a_unity & len F = 0 & d1 = the_unity_wrt g & d2 = the_unity_wrt g implies d1 = d2; assume A27: not g is having_a_unity or len F <> 0; given f1 such that A28: f1.1 = F.1 and A29: for n st 0 <> n & n < len F holds f1.(n + 1) = g.(f1.n,F.(n + 1)) and A30: d1 = f1.(len F); given f2 such that A31: f2.1 = F.1 and A32: for n st 0 <> n & n < len F holds f2.(n + 1) = g.(f2.n,F.(n + 1)) and A33: d2 = f2.(len F); defpred P[Element of NAT] means $1 <> 0 & $1 <= len F implies f1.$1 = f2. $1; A34: for n st P[n] holds P[n + 1] proof let n; assume A35: n <> 0 & n <= len F implies f1.n = f2.n; assume that n + 1 <> 0 and A36: n + 1 <= len F; now per cases; suppose n = 0; hence thesis by A28,A31; end; suppose A37: n <> 0; A38: n < len F by A36,NAT_1:13; then f1.(n + 1) = g.(f1.n,F.(n + 1)) by A29,A37; hence thesis by A32,A35,A37,A38; end; end; hence thesis; end; A39: P[0]; for n holds P[n] from NAT_1:sch 1(A39,A34); hence thesis by A1,A27,A30,A33; end; consistency; end; theorem len F >= 1 implies ex f st f.1 = F.1 & (for n st 0 <> n & n < len F holds f.(n + 1) = g.(f.n,F.(n + 1))) & g "**" F = f.(len F) by Def1; theorem len F >= 1 & (ex f st f.1 = F.1 & (for n st 0 <> n & n < len F holds f .(n + 1) = g.(f.n,F.(n + 1))) & d = f.(len F)) implies d = g "**" F by Def1; definition let A be non empty set, F be Function of NAT,A, p be FinSequence of A; redefine func F +* p -> Function of NAT,A; coherence proof A1: dom F = NAT by FUNCT_2:def 1; dom(F +* p) = dom F \/ dom p by FUNCT_4:def 1 .= NAT by A1,XBOOLE_1:12; hence thesis by FUNCT_2:def 1; end; end; notation let f be FinSequence; synonym findom f for dom f; end; definition let f be FinSequence; redefine func findom f -> Element of Fin NAT; coherence proof dom f = Seg len f by FINSEQ_1:def 3; hence thesis by FINSUB_1:def 5; end; end; Lm1: len F >= 1 & g is associative & g is commutative implies g "**" F = g $$( findom F,(NAT-->the_unity_wrt g)+*F) proof assume that A1: len F >= 1 and A2: g is associative & g is commutative; set A = findom F; set h = (NAT-->the_unity_wrt g)+*F; A3: dom F = Seg len F by FINSEQ_1:def 3; then consider G being Function of Fin NAT,D such that A4: g $$ (A,h) = G.A and for d st d is_a_unity_wrt g holds G.{} = d and A5: for n holds G.{n} = h.n and A6: for B being Element of Fin NAT st B c= A & B <> {} for n st n in A \ B holds G.(B \/ {n}) = g.(G.B,h.n) by A1,A2,SETWISEO:def 3; consider f such that A7: f.1 = F.1 and A8: for n st 0 <> n & n < len F holds f.(n + 1) = g.(f.n,F.(n + 1)) and A9: g "**" F = f.(len F) by A1,Def1; defpred P[Element of NAT] means $1 <> 0 & $1 <= len F implies f.$1 = G.(Seg $1); A10: for n st P[n] holds P[n + 1] proof let n; assume A11: n <> 0 & n <= len F implies f.n = G.(Seg n); assume that n + 1 <> 0 and A12: n + 1 <= len F; now per cases; suppose A13: n = 0; 1 in dom F by A1,A3,FINSEQ_1:1; then h.1 = F.1 by FUNCT_4:13; hence thesis by A7,A5,A13,FINSEQ_1:2; end; suppose A14: n <> 0; reconsider B = Seg n as Element of Fin NAT by FINSUB_1:def 5; n + 1 >= 1 by NAT_1:12; then A15: n + 1 in dom F by A12,FINSEQ_3:25; A16: n < len F by A12,NAT_1:13; then A17: f.(n + 1) = g.(f.n,F.(n + 1)) by A8,A14; not n + 1 in Seg n by FINSEQ_3:10; then A18: n + 1 in A \ Seg n by A15,XBOOLE_0:def 5; A19: Seg n c= A by A3,A16,FINSEQ_1:5; G.(Seg(n + 1)) = G.(Seg n \/ {n + 1}) by FINSEQ_1:9 .= g.(G.B,h.(n + 1)) by A6,A14,A19,A18; hence thesis by A11,A12,A14,A17,A15,FUNCT_4:13,NAT_1:13; end; end; hence thesis; end; A20: P[0]; for n holds P[n] from NAT_1:sch 1(A20,A10); hence thesis by A1,A9,A3,A4; end; Lm2: len F = 0 & g is having_a_unity & g is associative & g is commutative implies g "**" F = g $$(findom F,(NAT-->the_unity_wrt g)+*F) proof assume that A1: len F = 0 and A2: g is having_a_unity and A3: g is associative & g is commutative; F = {} by A1; then A4: dom F = {}.NAT; thus g "**" F = the_unity_wrt g by A1,A2,Def1 .= g $$(findom F,(NAT-->the_unity_wrt g)+*F) by A2,A3,A4,SETWISEO:31; end; theorem (g is having_a_unity or len F >= 1) & g is associative & g is commutative implies g "**" F = g $$(findom F,(NAT-->the_unity_wrt g)+*F) proof len F = 0 or len F >= 1 by NAT_1:14; hence thesis by Lm1,Lm2; end; Lm3: g is having_a_unity implies g "**" <*>D = the_unity_wrt g proof A1: len <*>D = 0; assume g is having_a_unity; hence thesis by A1,Def1; end; Lm4: g "**" <* d *> = d proof A1: len<* d *> = 1 by FINSEQ_1:39; then ex f st f.1 = <* d *>.1 & (for n st 0 <> n & n < len<* d *> holds f.(n + 1) = g.(f.n,<* d *>.(n + 1))) & g "**" <* d *> = f.len<* d *> by Def1; hence thesis by A1,FINSEQ_1:def 8; end; Lm5: len F >= 1 implies g "**" (F ^ <* d *>) = g.(g "**" F,d) proof set G = F ^ <* d *>; A1: G.(len F + 1) = d by FINSEQ_1:42; A2: len G = len F + len<* d *> by FINSEQ_1:22 .= len F + 1 by FINSEQ_1:39; then 1 <= len G by NAT_1:12; then consider f1 such that A3: f1.1 = G.1 and A4: for n st 0 <> n & n < len G holds f1.(n + 1) = g.(f1.n,G.(n + 1)) and A5: g "**" G = f1.(len G) by Def1; assume A6: len F >= 1; then consider f such that A7: f.1 = F.1 and A8: for n st 0 <> n & n < len F holds f.(n + 1) = g.(f.n,F.(n + 1)) and A9: g "**" F = f.(len F) by Def1; defpred P[Element of NAT] means 0 <> $1 & $1 < len G implies f.$1 = f1.$1; A10: for n st P[n] holds P[n + 1] proof let n; assume A11: P[n]; assume that A12: 0 <> n + 1 and A13: n + 1 < len G; A14: n + 1 >= 1 by A12,NAT_1:14; now per cases by A14,XXREAL_0:1; suppose A15: n + 1 = 1; 1 in dom F by A6,FINSEQ_3:25; hence thesis by A7,A3,A15,FINSEQ_1:def 7; end; suppose A16: n + 1 > 1; then n <> 0; then A17: f1.(n + 1) = g.(f1.n,G.(n + 1)) by A4,A13,NAT_1:12; A18: n + 1 <= len F by A2,A13,NAT_1:13; then A19: n < len F by NAT_1:13; 1 <= n + 1 by NAT_1:12; then A20: n + 1 in dom F by A18,FINSEQ_3:25; n + 1 > 0 + 1 by A16; then f.(n + 1) = g.(f.n,F.(n + 1)) by A8,A19; hence thesis by A11,A13,A16,A17,A20,FINSEQ_1:def 7,NAT_1:12; end; end; hence thesis; end; A21: P[0]; A22: for n holds P[n] from NAT_1:sch 1(A21,A10); g "**" G = g.(f1.(len F),G.(len F + 1)) by A6,A2,A4,A5,XREAL_1:29; hence thesis by A6,A9,A2,A1,A22,XREAL_1:29; end; Lm6: g is having_a_unity & len F = 0 implies g "**" (F ^ <* d *>) = g.(g "**" F,d) proof assume that A1: g is having_a_unity and A2: len F = 0; F = <*>D by A2; hence g "**" (F ^ <* d *>) = g "**" <* d *> by FINSEQ_1:34 .= d by Lm4 .= g.(the_unity_wrt g,d) by A1,SETWISEO:15 .= g.(g "**" F,d) by A1,A2,Def1; end; theorem Th4: g is having_a_unity or len F >= 1 implies g "**" (F ^ <* d *>) = g.(g "**" F,d) proof len F >= 1 or len F = 0 by NAT_1:14; hence thesis by Lm5,Lm6; end; theorem Th5: g is associative & (g is having_a_unity or len F >= 1 & len G >= 1) implies g "**" (F ^ G) = g.(g "**" F,g "**" G) proof defpred P[FinSequence of D] means for F,g st g is associative & (g is having_a_unity or len F >= 1 & len $1 >= 1) holds g "**" (F ^ $1) = g.(g "**" F ,g "**" $1); A1: for G,d st P[G] holds P[G ^ <* d *>] proof let G,d; assume A2: P[G]; let F,g; assume that A3: g is associative and A4: g is having_a_unity or len F >= 1 & len(G ^ <* d *>) >= 1; A5: now A6: len(F ^ G) = len F + len G by FINSEQ_1:22; assume not g is having_a_unity; hence len(F ^ G) >= 1 by A4,A6,NAT_1:12; end; A7: g "**" (F ^ (G ^ <* d *>)) = g "**" (F ^ G ^ <* d *>) by FINSEQ_1:32 .= g.(g "**" (F ^ G),d) by A5,Th4; now per cases; suppose A8: len G <> 0; then len G >= 1 by NAT_1:14; hence g "**" (F ^ (G ^ <* d *>)) = g.(g.(g "**" F,g "**" G),d) by A2,A3,A4,A7 .= g.(g "**" F,g.(g "**" G,d)) by A3,BINOP_1:def 3 .= g.(g "**" F,g "**" (G ^ <* d *>)) by A8,Th4,NAT_1:14; end; suppose len G = 0; then A9: G = {}; hence g "**" (F ^ (G ^ <* d *>)) = g "**" (F ^ <* d *>) by FINSEQ_1:34 .= g.(g "**" F,d) by A4,Th4 .= g.(g "**" F,g "**" <* d *>) by Lm4 .= g.(g "**" F,g "**" (G ^ <* d *>)) by A9,FINSEQ_1:34; end; end; hence thesis; end; A10: P[<*>D] proof let F,g; assume that g is associative and A11: g is having_a_unity or len F >= 1 & len <*>D >= 1; thus g "**" (F ^ <*>D) = g "**" F by FINSEQ_1:34 .= g.(g "**" F,the_unity_wrt g) by A11,SETWISEO:15 .= g.(g "**" F,g "**" <*>D) by A11,Lm3; end; for G holds P[G] from FINSEQ_2:sch 2(A10,A1); hence thesis; end; theorem Th6: g is associative & (g is having_a_unity or len F >= 1) implies g "**" (<* d *> ^ F) = g.(d,g "**" F) proof A1: len<* d *> = 1 by FINSEQ_1:39; assume g is associative &( g is having_a_unity or len F >= 1); hence g "**" (<* d *> ^ F) = g.(g "**" <* d *>,g "**" F) by A1,Th5 .= g.(d,g "**" F) by Lm4; end; Lm7: g is associative & g is commutative implies for f being Permutation of dom F st len F >= 1 & len F = len G & (for i st i in dom G holds G.i = F.(f.i)) holds g "**" F = g "**" G proof assume that A1: g is associative and A2: g is commutative; defpred P[Element of NAT] means for H1,H2 st len H1 >= 1 & len H1 = $1 & len H1 = len H2 for f being Permutation of dom H1 st (for i st i in dom H2 holds H2 .i = H1.(f.i)) holds g "**" H1 = g "**" H2; A3: now let k; assume A4: P[k]; thus P[k+1] proof let H1,H2; assume that len H1 >= 1 and A5: len H1 = k + 1 and A6: len H1 = len H2; reconsider p = H2 | (Seg k) as FinSequence of D by FINSEQ_1:18; let f be Permutation of dom H1; A7: dom H1 = Seg(k + 1) by A5,FINSEQ_1:def 3; then A8: rng f = Seg(k + 1) by FUNCT_2:def 3; A9: now let n; assume n in dom f; then f.n in Seg(k + 1) by A8,FUNCT_1:def 3; hence f.n is Element of NAT; end; A10: rng H2 c= D by FINSEQ_1:def 4; Seg(k + 1) = {} implies Seg(k + 1) = {}; then A11: dom f = Seg(k + 1) by A7,FUNCT_2:def 1; A12: k + 1 in Seg(k + 1) by FINSEQ_1:4; then A13: f.(k + 1) in Seg(k + 1) by A11,A8,FUNCT_1:def 3; then reconsider n = f.(k + 1) as Element of NAT; A14: dom H2 = Seg(k + 1) by A5,A6,FINSEQ_1:def 3; then H2.(k + 1) in rng H2 by A12,FUNCT_1:def 3; then reconsider d = H2.(k + 1) as Element of D by A10; A15: n <= k + 1 by A13,FINSEQ_1:1; then consider m2 being Nat such that A16: n + m2 = k + 1 by NAT_1:10; defpred P[Nat,set] means $2 = H1.(n + $1); 1 <= n by A13,FINSEQ_1:1; then consider m1 being Nat such that A17: 1 + m1 = n by NAT_1:10; reconsider m1, m2 as Element of NAT by ORDINAL1:def 12; A18: for j be Nat st j in Seg m2 ex x st P[j,x]; consider q2 being FinSequence such that A19: dom q2 = Seg m2 and A20: for k be Nat st k in Seg m2 holds P[k,q2.k] from FINSEQ_1:sch 1 (A18); rng q2 c= D proof let x; assume x in rng q2; then consider y such that A21: y in findom q2 and A22: x = q2.y by FUNCT_1:def 3; reconsider y as Element of NAT by A21,SETWISEO:9; 1 <= y by A19,A21,FINSEQ_1:1; then A23: 1 <= n + y by NAT_1:12; y <= m2 by A19,A21,FINSEQ_1:1; then n + y <= len H1 by A5,A16,XREAL_1:7; then n + y in Seg(len H1) by A23,FINSEQ_1:1; then n + y in dom H1 by FINSEQ_1:def 3; then A24: H1.(n + y) in rng H1 by FUNCT_1:def 3; rng H1 c= D by FINSEQ_1:def 4; then reconsider xx = H1.(n + y) as Element of D by A24; xx in D; hence thesis by A19,A20,A21,A22; end; then reconsider q2 as FinSequence of D by FINSEQ_1:def 4; reconsider q1 = H1 | (Seg m1) as FinSequence of D by FINSEQ_1:18; defpred P[Nat,set] means (f.$1 in dom q1 implies $2 = f.$1) & (not f.$1 in dom q1 implies for l st l = f.$1 holds $2 = l - 1); A25: k <= k + 1 by NAT_1:12; then A26: Seg k c= Seg(k + 1) by FINSEQ_1:5; A27: for i be Nat st i in Seg k ex y st P[i,y] proof let i be Nat; assume A28: i in Seg k; now f.i in Seg(k + 1) by A11,A8,A26,A28,FUNCT_1:def 3; then reconsider j = f.i as Element of NAT; assume A29: not f.i in dom q1; take y = j - 1; thus f.i in dom q1 implies y = f.i by A29; assume not f.i in dom q1; let t be Element of NAT; assume t = f.i; hence y = t - 1; end; hence thesis; end; consider gg being FinSequence such that A30: dom gg = Seg k and A31: for i be Nat st i in Seg k holds P[i,gg.i] from FINSEQ_1:sch 1( A27); A32: dom p = Seg k by A5,A6,A25,FINSEQ_1:17; m1 <= n by A17,NAT_1:11; then A33: m1 <= k + 1 by A15,XXREAL_0:2; then A34: dom q1 = Seg m1 by A5,FINSEQ_1:17; A35: now let i,l; assume that A36: l = f.i and A37: not f.i in dom q1 and A38: i in dom gg; A39: l < 1 or m1 < l by A34,A36,A37,FINSEQ_1:1; A40: now assume m1 + 1 = l; then k + 1 = i by A12,A11,A17,A26,A30,A36,A38,FUNCT_1:def 4; then k + 1 <= k + 0 by A30,A38,FINSEQ_1:1; hence contradiction by XREAL_1:6; end; f.i in rng f by A11,A26,A30,A38,FUNCT_1:def 3; then m1 + 1 <= l by A8,A36,A39,FINSEQ_1:1,NAT_1:13; then m1 + 1 < l by A40,XXREAL_0:1; then m1 + 1 + 1 <= l by NAT_1:13; hence m1 + 2 <= l; end; 1 + k = 1 + (m1 + m2) by A17,A16; then A41: m1 <= k by NAT_1:11; A42: rng gg c= dom p proof let y; assume y in rng gg; then consider x such that A43: x in findom gg and A44: gg.x = y by FUNCT_1:def 3; reconsider x as Element of NAT by A43,SETWISEO:9; now per cases; suppose A45: f.x in dom q1; A46: dom q1 c= dom p by A41,A34,A32,FINSEQ_1:5; f.x = gg.x by A30,A31,A43,A45; hence thesis by A44,A45,A46; end; suppose A47: not f.x in dom q1; reconsider j = f.x as Element of NAT by A11,A26,A9,A30,A43; A48: f.x in Seg(k + 1) by A11,A8,A26,A30,A43,FUNCT_1:def 3; j < 1 or m1 < j by A34,A47,FINSEQ_1:1; then reconsider l = j - 1 as Element of NAT by A48,FINSEQ_1:1 ,NAT_1:20; j <= k + 1 by A48,FINSEQ_1:1; then A49: l <= (k + 1) - 1 by XREAL_1:9; m1 + 2 <= j by A35,A43,A47; then A50: m1 + 2 - 1 <= l by XREAL_1:9; 1 <= m1 + 1 by NAT_1:12; then A51: 1 <= l by A50,XXREAL_0:2; gg.x = j - 1 by A30,A31,A43,A47; hence thesis by A32,A44,A51,A49,FINSEQ_1:1; end; end; hence thesis; end; A52: len q1 = m1 by A5,A33,FINSEQ_1:17; A53: now let j be Nat; assume A54: j in dom q2; len(q1 ^ <* d *>) = m1 + len<* d *> by A52,FINSEQ_1:22 .= n by A17,FINSEQ_1:39; hence H1.(len(q1 ^ <* d *>) + j) = q2.j by A19,A20,A54; end; set q = q1 ^ q2; A55: len q2 = m2 by A19,FINSEQ_1:def 3; then A56: len q = m1 + m2 by A52,FINSEQ_1:22; then A57: dom q = Seg k by A17,A16,FINSEQ_1:def 3; then reconsider gg as Function of dom q, dom q by A32,A30,A42, FUNCT_2:2; A58: len p = k by A5,A6,A25,FINSEQ_1:17; A59: rng gg = dom q proof thus rng gg c= dom q by A17,A16,A56,A32,A42,FINSEQ_1:def 3; let y; assume A60: y in dom q; then reconsider j = y as Element of NAT; consider x such that A61: x in dom f and A62: f.x = y by A8,A26,A57,A60,FUNCT_1:def 3; reconsider x as Element of NAT by A11,A61; now per cases; suppose A63: x in dom gg; now per cases; suppose f.x in dom q1; then gg.x = f.x by A30,A31,A63; hence thesis by A62,A63,FUNCT_1:def 3; end; suppose A64: not f.x in dom q1; j <= k by A57,A60,FINSEQ_1:1; then 1 <= j + 1 & j + 1 <= k + 1 by NAT_1:12,XREAL_1:7; then j + 1 in rng f by A8,FINSEQ_1:1; then consider x1 being set such that A65: x1 in dom f and A66: f.x1 = j + 1 by FUNCT_1:def 3; A67: now assume not x1 in dom gg; then x1 in Seg(k + 1) \ Seg k by A7,A30,A65,XBOOLE_0:def 5; then x1 in {k + 1} by FINSEQ_3:15; then A68: j + 1 = m1 +1 by A17,A66,TARSKI:def 1; 1 <= j by A57,A60,FINSEQ_1:1; hence contradiction by A34,A62,A64,A68,FINSEQ_1:1; end; j < 1 or m1 < j by A34,A62,A64,FINSEQ_1:1; then not j + 1 <= m1 by A57,A60,FINSEQ_1:1,NAT_1:13; then not f.x1 in dom q1 by A34,A66,FINSEQ_1:1; then gg.x1 = j + 1 - 1 by A30,A31,A66,A67 .= y; hence thesis by A67,FUNCT_1:def 3; end; end; hence thesis; end; suppose A69: not x in dom gg; j <= k by A57,A60,FINSEQ_1:1; then 1 <= j + 1 & j + 1 <= k + 1 by NAT_1:12,XREAL_1:7; then j + 1 in rng f by A8,FINSEQ_1:1; then consider x1 being set such that A70: x1 in dom f and A71: f.x1 = j + 1 by FUNCT_1:def 3; x in Seg(k + 1) \ Seg k by A7,A30,A61,A69,XBOOLE_0:def 5; then x in {k + 1} by FINSEQ_3:15; then A72: x = k + 1 by TARSKI:def 1; A73: now assume not x1 in dom gg; then x1 in Seg(k + 1) \ Seg k by A7,A30,A70,XBOOLE_0:def 5; then x1 in {k + 1} by FINSEQ_3:15; then j + 1 = j + 0 by A62,A72,A71,TARSKI:def 1; hence contradiction; end; m1 <= j by A17,A62,A72,XREAL_1:29; then not j + 1 <= m1 by NAT_1:13; then not f.x1 in dom q1 by A34,A71,FINSEQ_1:1; then gg.x1 = j + 1 - 1 by A30,A31,A71,A73 .= y; hence thesis by A73,FUNCT_1:def 3; end; end; hence thesis; end; assume A74: for i st i in dom H2 holds H2.i = H1.(f.i); then A75: H2.(k + 1) = H1.(f.(k + 1)) by A14,FINSEQ_1:4; A76: now let j be Nat; assume A77: j in dom(q1 ^ <* d *>); A78: now assume j in Seg m1; then A79: j in dom q1 by A5,A33,FINSEQ_1:17; then q1.j = H1.j by FUNCT_1:47; hence H1.j = (q1 ^ <* d *>).j by A79,FINSEQ_1:def 7; end; A80: now 1 in Seg 1 & len<* d *> = 1 by FINSEQ_1:1,39; then 1 in dom <* d *> by FINSEQ_1:def 3; then A81: (q1 ^ <* d *>).(len q1 + 1) = <* d *>.1 by FINSEQ_1:def 7; assume j in {n}; then j = n by TARSKI:def 1; hence (q1 ^ <* d *>).j = H1.j by A75,A17,A52,A81,FINSEQ_1:40; end; len(q1 ^ <* d *>) = m1 + len <* d *> by A52,FINSEQ_1:22 .= m1 + 1 by FINSEQ_1:40; then j in Seg(m1 + 1) by A77,FINSEQ_1:def 3; then j in Seg m1 \/ {n} by A17,FINSEQ_1:9; hence H1.j = (q1 ^ <* d *>).j by A78,A80,XBOOLE_0:def 3; end; gg is one-to-one proof let y1,y2; assume that A82: y1 in dom gg and A83: y2 in dom gg and A84: gg.y1 = gg.y2; reconsider j1 = y1, j2 = y2 as Element of NAT by A30,A82,A83; A85: f.y2 in Seg(k + 1) by A11,A8,A26,A30,A83,FUNCT_1:def 3; A86: f.y1 in Seg(k + 1) by A11,A8,A26,A30,A82,FUNCT_1:def 3; then reconsider a = f.y1, b = f.y2 as Element of NAT by A85; now per cases; suppose f.y1 in dom q1 & f.y2 in dom q1; then gg.j1 = f.y1 & gg.j2 = f.y2 by A30,A31,A82,A83; hence thesis by A11,A26,A30,A82,A83,A84,FUNCT_1:def 4; end; suppose A87: f.y1 in dom q1 & not f.y2 in dom q1; then A88: a <= m1 by A34,FINSEQ_1:1; gg.j1 = a & gg.j2 = b - 1 by A30,A31,A82,A83,A87; then A89: (b - 1) + 1 <= m1 + 1 by A84,A88,XREAL_1:6; 1 <= b by A85,FINSEQ_1:1; then A90: b in Seg(m1 + 1) by A89,FINSEQ_1:1; not b in Seg m1 by A5,A33,A87,FINSEQ_1:17; then b in Seg(m1 + 1) \ Seg m1 by A90,XBOOLE_0:def 5; then b in {m1 + 1} by FINSEQ_3:15; then b = m1 + 1 by TARSKI:def 1; then y2 = k + 1 by A12,A11,A17,A26,A30,A83,FUNCT_1:def 4; hence thesis by A30,A83,FINSEQ_3:8; end; suppose A91: not f.y1 in dom q1 & f.y2 in dom q1; then A92: b <= m1 by A34,FINSEQ_1:1; gg.j1 = a - 1 & gg.j2 = b by A30,A31,A82,A83,A91; then A93: (a - 1) + 1 <= m1 + 1 by A84,A92,XREAL_1:6; 1 <= a by A86,FINSEQ_1:1; then A94: a in Seg(m1 + 1) by A93,FINSEQ_1:1; not a in Seg m1 by A5,A33,A91,FINSEQ_1:17; then a in Seg(m1 + 1) \ Seg m1 by A94,XBOOLE_0:def 5; then a in {m1 + 1} by FINSEQ_3:15; then a = m1 + 1 by TARSKI:def 1; then y1 = k + 1 by A12,A11,A17,A26,A30,A82,FUNCT_1:def 4; hence thesis by A30,A82,FINSEQ_3:8; end; suppose A95: not f.y1 in dom q1 & not f.y2 in dom q1; then gg.j2 = b - 1 by A30,A31,A83; then A96: gg.y2 = b + (- 1); gg.j1 = a - 1 by A30,A31,A82,A95; then gg.j1 = a + (- 1); then a = b by A84,A96,XCMPLX_1:2; hence thesis by A11,A26,A30,A82,A83,FUNCT_1:def 4; end; end; hence thesis; end; then reconsider gg as Permutation of dom q by A59,FUNCT_2:57; len(q1 ^ <* d *>) + len q2 = len q1 + len<* d *> + m2 by A55,FINSEQ_1:22 .= k + 1 by A17,A16,A52,FINSEQ_1:40; then dom H1 = Seg(len(q1 ^ <* d *>) + len q2) by A5,FINSEQ_1:def 3; then A97: H1 = q1 ^ <* d *> ^ q2 by A76,A53,FINSEQ_1:def 7; A98: now let i; assume A99: i in dom p; then f.i in rng f by A11,A26,A32,FUNCT_1:def 3; then reconsider j = f.i as Element of NAT by A8; now per cases; suppose A100: f.i in dom q1; then A101: f.i = gg.i & H1.(j) = q1.(j) by A32,A31,A99,FUNCT_1:47; H2.i = p.i & H2.i = H1.(f.i) by A74,A14,A26,A32,A99,FUNCT_1:47; hence p.i = q.(gg.i) by A100,A101,FINSEQ_1:def 7; end; suppose A102: not f.i in dom q1; then m1 + 2 <= j by A32,A30,A35,A99; then A103: m1 + 2 - 1 <= j - 1 by XREAL_1:9; m1 < m1 + 1 by XREAL_1:29; then A104: m1 < j - 1 by A103,XXREAL_0:2; then m1 < j by XREAL_1:146,XXREAL_0:2; then reconsider j1 = j - 1 as Element of NAT by NAT_1:20; A105: not j1 in dom q1 by A34,A104,FINSEQ_1:1; A106: gg.i = j - 1 by A32,A31,A99,A102; then j - 1 in dom q by A32,A30,A59,A99,FUNCT_1:def 3; then consider a being Nat such that A107: a in dom q2 and A108: j1 = len q1 + a by A105,FINSEQ_1:25; A109: len<* d *> = 1 by FINSEQ_1:39; A110: H2.i = p.i & H2.i = H1.(f.i) by A74,A14,A26,A32,A99,FUNCT_1:47; A111: H1 = q1 ^ (<* d *> ^ q2) by A97,FINSEQ_1:32; j in dom H1 by A7,A11,A8,A26,A32,A99,FUNCT_1:def 3; then consider b being Nat such that A112: b in dom(<* d *> ^ q2) and A113: j = len q1 + b by A102,A111,FINSEQ_1:25; A114: H1.j = (<* d *> ^ q2).b by A111,A112,A113,FINSEQ_1:def 7; A115: b = 1 + a by A108,A113; q.(j - 1) = q2.a by A107,A108,FINSEQ_1:def 7; hence p.i = q.(gg.i) by A106,A110,A107,A114,A115,A109, FINSEQ_1:def 7; end; end; hence p.i = q.(gg.i); end; now per cases; suppose A116: len p <> 0; A117: H2 = p ^ <* d *> by A5,A6,FINSEQ_3:55; g "**" p = g "**" q by A4,A17,A16,A58,A56,A98,A116,NAT_1:14; then A118: g "**" H2 = g.(g "**" q,d) by A116,A117,Th4,NAT_1:14; now per cases; suppose A119: len q1 <> 0 & len q2 <> 0; len(<* d *> ^ q2) = len<* d *> + len q2 & len<* d *> = 1 by FINSEQ_1:22,40; then A120: len(<* d *> ^ q2) >= 1 by NAT_1:12; A121: len q1 >= 1 by A119,NAT_1:14; len q2 >= 1 by A119,NAT_1:14; then g "**" H2 = g.(g.(g "**" q1,g "**" q2),d) by A1,A118,A121 ,Th5 .= g.(g "**" q1,g.(g "**" q2,d)) by A1,BINOP_1:def 3 .= g.(g "**" q1,g.(d,g "**" q2)) by A2,BINOP_1:def 2 .= g.(g "**" q1,g "**" (<* d *> ^ q2)) by A1,A119,Th6,NAT_1:14 .= g "**" (q1 ^ (<* d *> ^ q2)) by A1,A121,A120,Th5 .= g "**" H1 by A97,FINSEQ_1:32; hence thesis; end; suppose len q1 = 0 & len q2 <> 0; then A122: q1 = {}; then A123: H1 = <* d *> ^ q2 by A97,FINSEQ_1:34 .= <* d *> ^ q by A122,FINSEQ_1:34; g "**" H2 = g.(d,g "**" q) by A2,A118,BINOP_1:def 2 .= g "**" (<* d *> ^ q) by A1,A17,A16,A58,A56,A116,Th6,NAT_1:14 ; hence thesis by A123; end; suppose len q1 <> 0 & len q2 = 0; then A124: q2 = {}; then H1 = q1 ^ <* d *> by A97,FINSEQ_1:34 .= q ^ <* d *> by A124,FINSEQ_1:34; hence thesis by A17,A16,A58,A56,A116,A118,Th4,NAT_1:14; end; suppose len q1 = 0 & len q2 = 0; then len q = 0 + 0 by FINSEQ_1:22; hence thesis by A5,A6,A17,A16,A56,A116,FINSEQ_1:17; end; end; hence thesis; end; suppose A125: len p = 0; then dom H1 = {1} by A5,A58,FINSEQ_1:2,def 3; then A126: dom f = {1} & rng f = {1} by FUNCT_2:def 1,def 3; 1 in {1} by TARSKI:def 1; then f.1 in {1} by A126,FUNCT_1:def 3; then H1.1 = H2.1 by A75,A58,A125,TARSKI:def 1; then H1 = <* d *> by A5,A58,A125,FINSEQ_1:40; hence thesis by A5,A6,A58,A125,FINSEQ_1:40; end; end; hence thesis; end; end; let f be Permutation of dom F; A127: P[0]; for k holds P[k] from NAT_1:sch 1(A127,A3); hence thesis; end; Lm8: g is having_a_unity & len F = 0 & G = F * P implies g "**" F = g "**" G proof assume that A1: g is having_a_unity and A2: len F = 0; assume A3: G = F * P; F = {} by A2; then G = {} by A3,RELAT_1:39; then A4: len G = 0; thus g "**" F = the_unity_wrt g by A1,A2,Def1 .= g "**" G by A1,A4,Def1; end; theorem Th7: g is commutative associative & (g is having_a_unity or len F >= 1 ) & G = F * P implies g "**" F = g "**" G proof assume that A1: g is commutative associative and A2: g is having_a_unity or len F >= 1; assume A3: G = F * P; now per cases; suppose len F = 0; hence thesis by A2,A3,Lm8; end; suppose A4: len F <> 0; len F = len G & for i st i in dom G holds G.i = F.(P.i) by A3,FINSEQ_2:44 ,FUNCT_1:12; hence thesis by A1,A4,Lm7,NAT_1:14; end; end; hence thesis; end; Lm9: g is associative commutative & F is one-to-one & G is one-to-one & rng F = rng G & len F >= 1 implies g "**" F = g "**" G proof assume that A1: g is associative commutative and A2: F is one-to-one and A3: G is one-to-one and A4: rng F = rng G and A5: len F >= 1; A6: len F = len G by A2,A3,A4,FINSEQ_1:48; set P = F" * G; A7: dom(F") = rng F by A2,FUNCT_1:33; then A8: dom P = dom G by A4,RELAT_1:27 .= Seg len F by A6,FINSEQ_1:def 3 .= dom F by FINSEQ_1:def 3; rng(F") = dom F by A2,FUNCT_1:33; then A9: rng P c= dom F by RELAT_1:26; dom F = Seg len F by FINSEQ_1:def 3; then reconsider P as Function of dom F, dom F by A5,A8,A9,FUNCT_2:def 1 ,RELSET_1:4; rng P = rng(F") by A4,A7,RELAT_1:28 .= dom F by A2,FUNCT_1:33; then reconsider P as Permutation of dom F by A2,A3,FUNCT_2:57; F * P = (F * F") * G by RELAT_1:36 .= id(rng G) * G by A2,A4,FUNCT_1:39 .= G by RELAT_1:54; hence thesis by A1,A5,Th7; end; Lm10: len F = 0 & g is having_a_unity & F is one-to-one & G is one-to-one & rng F = rng G implies g "**" F = g "**" G proof assume that A1: len F = 0 & g is having_a_unity and A2: F is one-to-one & G is one-to-one & rng F = rng G; len G = len F & g "**" F = the_unity_wrt g by A1,A2,Def1,FINSEQ_1:48; hence thesis by A1,Def1; end; theorem (g is having_a_unity or len F >= 1) & g is associative commutative & F is one-to-one & G is one-to-one & rng F = rng G implies g "**" F = g "**" G proof len F >= 1 or len F = 0 by NAT_1:14; hence thesis by Lm9,Lm10; end; Lm11: len F = 1 implies g "**" F = F.1 proof assume A1: len F = 1; then F = <* F.1 *> by FINSEQ_1:40 .= <* F/.1 *> by A1,FINSEQ_4:15; hence g "**" F = F/.1 by Lm4 .= F.1 by A1,FINSEQ_4:15; end; Lm12: g is associative & g is commutative & len F >= 1 & len F = len G & len F = len H & (for k st k in dom F holds H.k = g.(F.k,G.k)) implies g "**" H = g.(g "**" F,g "**" G) proof assume that A1: g is associative and A2: g is commutative; defpred P[Element of NAT] means for F,G,H st len F >= 1 & len F = $1 & len F = len G & len F = len H & (for k st k in dom F holds H.k = g.(F.k,G.k)) holds g "**" H = g.(g "**" F,g "**" G); A3: now let k; assume A4: P[k]; thus P[k+1] proof let F,G,H; assume that len F >= 1 and A5: len F = k + 1 and A6: len F = len G and A7: len F = len H and A8: for k st k in dom F holds H.k = g.(F.k,G.k); reconsider f = F | Seg k,gg = G | Seg k,h = H | Seg k as FinSequence of D by FINSEQ_1:18; A9: len h = k by A5,A7,FINSEQ_3:53; A10: len f = k by A5,FINSEQ_3:53; A11: len gg = k by A5,A6,FINSEQ_3:53; A12: now k <= k + 1 by NAT_1:12; then Seg len f c= Seg len F by A5,A10,FINSEQ_1:5; then Seg len f c= dom F by FINSEQ_1:def 3; then A13: dom f c= dom F by FINSEQ_1:def 3; let i; assume A14: i in dom f; then i in Seg len gg by A10,A11,FINSEQ_1:def 3; then i in dom gg by FINSEQ_1:def 3; then A15: G.i = gg.i by FUNCT_1:47; i in Seg len h by A10,A9,A14,FINSEQ_1:def 3; then i in dom h by FINSEQ_1:def 3; then A16: H.i = h.i by FUNCT_1:47; F.i = f.i by A14,FUNCT_1:47; hence h.i = g.(f.i,gg.i) by A8,A14,A15,A16,A13; end; now per cases by NAT_1:14; suppose A17: len f >= 1; A18: rng H c= D by FINSEQ_1:def 4; A19: rng F c= D & rng G c= D by FINSEQ_1:def 4; A20: k + 1 in Seg(k + 1) by FINSEQ_1:4; then k + 1 in dom G by A5,A6,FINSEQ_1:def 3; then A21: (G.(k + 1)) in rng G by FUNCT_1:def 3; k + 1 in dom H by A5,A7,A20,FINSEQ_1:def 3; then A22: (H.(k + 1)) in rng H by FUNCT_1:def 3; A23: k + 1 in dom F by A5,A20,FINSEQ_1:def 3; then (F.(k + 1)) in rng F by FUNCT_1:def 3; then reconsider d = F.(k + 1),d1 = G.(k + 1),d2 = H.(k + 1) as Element of D by A21,A22,A19,A18; A24: d2 = g.(F.(k + 1),G.(k + 1)) by A8,A23; F = f ^ <* d *> by A5,FINSEQ_3:55; then A25: g "**" F = g.(g "**" f,d) by A17,Th4; G = gg ^ <* d1 *> by A5,A6,FINSEQ_3:55; then A26: g "**" G = g.(g "**" gg,d1) by A10,A11,A17,Th4; A27: H = h ^ <* d2 *> by A5,A7,FINSEQ_3:55; g "**" h = g.(g "**" f,g "**" gg) by A4,A10,A11,A9,A12,A17; hence g "**" H = g.(g.(g "**" f,g "**" gg),g.(d,d1)) by A10,A9,A17 ,A27,A24,Th4 .= g.(g.(g.(g "**" f,g "**" gg),d),d1) by A1,BINOP_1:def 3 .= g.(g.(g "**" f,g.(g "**" gg,d)),d1) by A1,BINOP_1:def 3 .= g.(g.(g "**" f,g.(d,g "**" gg)),d1) by A2,BINOP_1:def 2 .= g.(g.(g "**" F,g "**" gg),d1) by A1,A25,BINOP_1:def 3 .= g.(g "**" F,g "**" G) by A1,A26,BINOP_1:def 3; end; suppose A28: len f = 0; then A29: g "**" G = G.1 & 1 in dom F by A5,A6,A10,Lm11,FINSEQ_3:25; g "**" H = H.1 & g "**" F = F.1 by A5,A7,A10,A28,Lm11; hence thesis by A8,A29; end; end; hence thesis; end; end; assume A30: len F >= 1 & len F = len G & len F = len H; A31: P[0]; for k holds P[k] from NAT_1:sch 1(A31,A3); hence thesis by A30; end; Lm13: g is having_a_unity & len F = 0 & len F = len G & len F = len H implies g "**" F = g.(g "**" G,g "**" H) proof assume that A1: g is having_a_unity and A2: len F = 0 and A3: len F = len G and A4: len F = len H; thus g "**" F = the_unity_wrt g by A1,A2,Def1 .= g.(the_unity_wrt g,the_unity_wrt g) by A1,SETWISEO:15 .= g.(g "**" G,the_unity_wrt g) by A1,A2,A3,Def1 .= g.(g "**" G,g "**" H) by A1,A2,A4,Def1; end; theorem g is associative commutative & (g is having_a_unity or len F >= 1) & len F = len G & len F = len H & (for k st k in dom F holds F.k = g.(G.k,H.k)) implies g "**" F = g.(g "**" G,g "**" H) proof A1: dom F = Seg len F & dom G = Seg len G by FINSEQ_1:def 3; A2: len F = 0 or len F >= 1 by NAT_1:14; assume g is associative commutative &( g is having_a_unity or len F >= 1); hence thesis by A1,A2,Lm12,Lm13; end; theorem g is having_a_unity implies g "**" <*>D = the_unity_wrt g by Lm3; theorem g "**" <* d *> = d by Lm4; theorem Th12: g "**" <* d1,d2 *> = g.(d1,d2) proof A1: len<* d1 *> = 1 by FINSEQ_1:39; thus g "**" <* d1,d2 *> = g "**" (<* d1 *> ^ <* d2 *>) by FINSEQ_1:def 9 .= g.(g "**" <* d1 *>,d2) by A1,Th4 .= g.(d1,d2) by Lm4; end; theorem g is commutative implies g "**" <* d1,d2 *> = g "**" <* d2,d1 *> proof assume A1: g is commutative; thus g "**" <* d1,d2 *> = g.(d1,d2) by Th12 .= g.(d2,d1) by A1,BINOP_1:def 2 .= g "**" <* d2,d1 *> by Th12; end; theorem Th14: g "**" <* d1,d2,d3 *> = g.(g.(d1,d2),d3) proof A1: len<* d1,d2 *> = 2 by FINSEQ_1:44; thus g "**" <* d1,d2,d3 *> = g "**" (<* d1,d2 *> ^ <* d3 *>) by FINSEQ_1:43 .= g.(g "**" <* d1,d2 *>,d3) by A1,Th4 .= g.(g.(d1,d2),d3) by Th12; end; theorem g is commutative implies g "**" <* d1,d2,d3 *> = g "**" <* d2,d1,d3 *> proof assume A1: g is commutative; thus g "**" <* d1,d2,d3 *> = g.(g.(d1,d2),d3) by Th14 .= g.(g.(d2,d1),d3) by A1,BINOP_1:def 2 .= g "**" <* d2,d1,d3 *> by Th14; end; theorem Th16: g "**" (1 |-> d) = d proof thus g "**" (1 |-> d) = g "**" <* d *> by FINSEQ_2:59 .= d by Lm4; end; theorem g "**" (2 |-> d) = g.(d,d) proof thus g "**" (2 |-> d) = g "**" <* d,d *> by FINSEQ_2:61 .= g.(d,d) by Th12; end; theorem Th18: g is associative & (g is having_a_unity or k <> 0 & l <> 0) implies g "**" ((k + l) |-> d) = g.(g "**" (k |-> d),g "**" (l |-> d)) proof k <> 0 & l <> 0 implies len(k |-> d) <> 0 & len(l |-> d) <> 0 by CARD_1:def 7 ; then A1: k <> 0 & l <> 0 implies len(k |-> d) >= 1 & len(l |-> d) >= 1 by NAT_1:14; (k + l) |-> d = (k |-> d) ^ (l |-> d) by FINSEQ_2:123; hence thesis by A1,Th5; end; theorem g is associative & (g is having_a_unity or k <> 0 & l <> 0) implies g "**" (k * l |-> d) = g "**" (l |-> (g "**" (k |-> d))) proof defpred P[Element of NAT] means for g,k,d st g is associative & (g is having_a_unity or k <> 0 & $1 <> 0) holds g "**" (k * $1 |-> d) = g "**" ($1 |-> (g "**" (k |-> d))); A1: for l st P[l] holds P[l + 1] proof let l; assume A2: P[l]; let g,k,d; assume that A3: g is associative and A4: g is having_a_unity or k <> 0 & l + 1 <> 0; now per cases; suppose l = 0; hence thesis by Th16; end; suppose A5: l <> 0; then A6: k <> 0 implies k * l <> 0 by XCMPLX_1:6; g "**" (k * (l + 1) |-> d) = g "**" ((k * l + k * 1) |-> d) .= g.(g "**" (k * l |-> d),g "**" (k |-> d)) by A3,A4,A6,Th18 .= g.(g "**" (l |-> (g "**" (k |-> d))),g "**" (k |-> d)) by A2,A3,A4 ,A5 .= g.(g "**" (l |-> (g "**" (k |-> d))),g "**" (1 |-> (g "**" (k |-> d)))) by Th16; hence thesis by A3,A5,Th18; end; end; hence thesis; end; A7: P[0]; for l holds P[l] from NAT_1:sch 1(A7,A1); hence thesis; end; theorem len F = 1 implies g "**" F = F.1 by Lm11; theorem len F = 2 implies g "**" F = g.(F.1,F.2) proof assume A1: len F = 2; then F = <* F.1,F.2 *> by FINSEQ_1:44 .= <* F/.1,F.2 *> by A1,FINSEQ_4:15 .= <* F/.1,F/.2 *> by A1,FINSEQ_4:15; hence g "**" F = g.(F/.1,F/.2) by Th12 .= g.(F.1,F/.2) by A1,FINSEQ_4:15 .= g.(F.1,F.2) by A1,FINSEQ_4:15; end; begin reserve x,y for set; reserve C,C9,D,E for non empty set; reserve c,c9,c1,c2,c3 for Element of C; reserve B,B9,B1,B2 for Element of Fin C; reserve A for Element of Fin C9; reserve d,d1,d2,d3,d4,e for Element of D; reserve F,G for BinOp of D; reserve u for UnOp of D; reserve f,f9 for Function of C,D; reserve g for Function of C9,D; reserve H for BinOp of E; reserve h for Function of D,E; reserve i,j for Nat; reserve s for Function; reserve p,q for FinSequence of D; reserve T1,T2 for Element of i-tuples_on D; Lm1: for i be Nat holds Seg i is Element of Fin NAT by FINSUB_1:def 5; Lm2: now let i; assume i+1 in Seg i; then i+1 <= i by FINSEQ_1:1; hence contradiction by XREAL_1:29; end; theorem Th1: F is commutative associative & c1 <> c2 implies F $$ ({.c1,c2.},f ) = F.(f.c1, f.c2) proof assume that A1: F is commutative associative and A2: c1 <> c2; consider g being Function of Fin C, D such that A3: F $$ ({.c1,c2.},f) = g.{c1,c2} and for e st e is_a_unity_wrt F holds g.{} = e and A4: for c holds g.{c} = f.c and A5: for B st B c= { c1,c2 } & B <> {} for c st c in { c1,c2 } \ B holds g.(B \/ {c}) = F.(g.B,f.c) by A1,SETWISEO:def 3; c1 in {c1} & not c2 in {c1} by A2,TARSKI:def 1; then {c1,c2} \ {c1} = {c2} by ZFMISC_1:62; then A6: c2 in {c1,c2} \ {c1} by TARSKI:def 1; thus F $$ ({.c1,c2.},f) = g.({.c1.} \/ {.c2.}) by A3,ENUMSET1:1 .= F.(g.{c1}, f.c2) by A5,A6,ZFMISC_1:7 .= F.(f.c1, f.c2) by A4; end; theorem Th2: F is commutative associative & (B <> {} or F is having_a_unity) & not c in B implies F $$(B \/ {.c.}, f) = F.(F $$(B,f),f.c) proof assume that A1: F is commutative associative and A2: B <> {} or F is having_a_unity and A3: not c in B; per cases; suppose A4: B = {}; then B = {}.C; then F $$(B,f) = the_unity_wrt F by A1,A2,SETWISEO:31; hence F.(F $$(B,f),f.c) = f.c by A2,A4,SETWISEO:15 .= F $$(B \/ {.c.}, f) by A1,A4,SETWISEO:17; end; suppose A5: B <> {}; consider g9 being Function of Fin C, D such that A6: F $$ (B,f) = g9.B and for e st e is_a_unity_wrt F holds g9.{} = e and A7: for c9 holds g9.{c9} = f.c9 and A8: for B9 st B9 c= B & B9 <> {} for c9 st c9 in B \ B9 holds g9.(B9 \/ {c9}) = F.(g9.B9,f.c9) by A1,A2,SETWISEO:def 3; consider g being Function of Fin C, D such that A9: F $$ (B \/ {.c.},f) = g.(B \/ {c}) and for e st e is_a_unity_wrt F holds g.{} = e and A10: for c9 holds g.{c9} = f.c9 and A11: for B9 st B9 c= B \/ {c} & B9 <> {} for c9 st c9 in (B \/ {c}) \ B9 holds g.(B9 \/ {c9}) = F.(g.B9,f.c9) by A1,SETWISEO:def 3; defpred X[set] means $1 <> {} & $1 c= B implies g.($1) = g9.($1); A12: for B9 being Element of Fin C, b being Element of C holds X[B9] & not b in B9 implies X[B9 \/ {b}] proof A13: B c= B \/ {c} by XBOOLE_1:7; let B9, c9 such that A14: B9 <> {} & B9 c= B implies g.B9 = g9.B9 and A15: not c9 in B9 and B9 \/ {c9} <> {} and A16: B9 \/ {c9} c= B; A17: c9 in B by A16,ZFMISC_1:137; then A18: c9 in B \ B9 by A15,XBOOLE_0:def 5; c9 in (B \/ {c}) by A17,XBOOLE_0:def 3; then A19: c9 in (B \/ {c}) \ B9 by A15,XBOOLE_0:def 5; B9 c= B by A16,XBOOLE_1:11; then A20: B9 c= B \/ {c} by A13,XBOOLE_1:1; per cases; suppose A21: B9 = {}; then g.(B9 \/ {c9}) = f.c9 by A10; hence thesis by A7,A21; end; suppose A22: B9 <> {}; hence g.(B9 \/ {c9}) = F.(g9.B9, f.c9) by A11,A14,A16,A20,A19, XBOOLE_1:11 .= g9.(B9 \/ {c9}) by A8,A16,A18,A22,XBOOLE_1:11; end; end; A23: X[{}.C]; A24: for B9 holds X[B9] from SETWISEO:sch 2(A23,A12); c in B \/ {c} by ZFMISC_1:136; then c in (B \/ {c}) \ B by A3,XBOOLE_0:def 5; hence F $$(B \/ {.c.}, f) = F.(g.B, f.c) by A5,A9,A11,XBOOLE_1:7 .= F.(F $$(B,f),f.c) by A5,A6,A24; end; end; theorem F is commutative associative & c1 <> c2 & c1 <> c3 & c2 <> c3 implies F $$ ({.c1,c2,c3.},f) = F.(F.(f.c1, f.c2),f.c3) proof assume that A1: F is commutative associative and A2: c1 <> c2; assume c1 <> c3 & c2 <> c3; then A3: not c3 in {c1,c2} by TARSKI:def 2; thus F $$ ({.c1,c2,c3.},f) = F $$ ({.c1,c2.} \/ {.c3.},f) by ENUMSET1:3 .= F.(F $$ ({.c1,c2.},f),f.c3) by A1,A3,Th2 .= F.(F.(f.c1, f.c2),f.c3) by A1,A2,Th1; end; theorem F is commutative associative & (B1 <> {} & B2 <> {} or F is having_a_unity) & B1 misses B2 implies F $$(B1 \/ B2, f) = F.(F $$(B1,f),F $$( B2,f)) proof assume that A1: F is commutative associative and A2: B1 <> {} & B2 <> {} or F is having_a_unity and A3: B1 /\ B2 = {}; now per cases; suppose A4: B1 = {} or B2 = {}; now per cases by A4; suppose A5: B1 = {}; hence F $$(B1 \/ B2, f) = F.(the_unity_wrt F,F $$(B2,f)) by A2, SETWISEO:15 .= F.(F $$({}.C,f),F $$(B2,f)) by A1,A2,A4,SETWISEO:31 .= F.(F $$(B1,f),F $$(B2,f)) by A5; end; suppose A6: B2 = {}; hence F $$(B1 \/ B2, f) = F.(F $$(B1,f),the_unity_wrt F) by A2, SETWISEO:15 .= F.(F $$(B1,f),F $$({}.C,f)) by A1,A2,A4,SETWISEO:31 .= F.(F $$(B1,f),F $$(B2,f)) by A6; end; end; hence thesis; end; suppose A7: B1 <> {} & B2 <> {}; defpred X[Element of Fin C] means $1 <> {} & B1 /\ $1 = {} implies F $$( B1 \/ $1,f) = F.(F $$(B1,f),F $$($1,f)); A8: for B9 being Element of Fin C, b being Element of C holds X[B9] & not b in B9 implies X[B9 \/ {.b.}] proof let B,c such that A9: B <> {} & B1 /\ B = {} implies F $$(B1 \/ B,f) = F.(F $$ (B1, f),F $$(B,f)) and A10: not c in B and B \/ {c} <> {}; assume A11: B1 /\ (B \/ {c}) = {}; then A12: B1 misses (B \/ {c}) by XBOOLE_0:def 7; c in B \/ {c} by ZFMISC_1:136; then A13: not c in B1 by A11,XBOOLE_0:def 4; A14: B <> {} & B1 misses B implies F $$(B1 \/ B,f) = F.(F $$ (B1,f),F $$(B,f)) by A9,XBOOLE_0:def 7; now per cases; suppose A15: B = {}; hence F $$ (B1 \/ (B \/ {.c.}),f) = F.(F $$ (B1,f), f.c) by A1,A7,A13,Th2 .= F.(F $$ (B1,f),F $$(B \/ {.c.},f)) by A1,A15,SETWISEO:17; end; suppose A16: B <> {}; A17: not c in B1 \/ B by A10,A13,XBOOLE_0:def 3; thus F $$ (B1 \/ (B \/ {.c.}),f) = F $$ (B1 \/ B \/ {.c.},f) by XBOOLE_1:4 .= F.(F.(F $$ (B1,f),F $$(B,f)), f.c) by A1,A14,A12,A16,A17,Th2, XBOOLE_1:7,63 .= F.(F $$ (B1,f),F.(F $$(B,f), f.c)) by A1,BINOP_1:def 3 .= F.(F $$(B1,f),F $$(B \/ {.c.},f)) by A1,A10,A16,Th2; end; end; hence thesis; end; A18: X[{}.C]; for B2 holds X[B2] from SETWISEO:sch 2(A18,A8); hence thesis by A3,A7; end; end; hence thesis; end; theorem Th5: F is commutative associative & (A <> {} or F is having_a_unity) & (ex s st dom s = A & rng s = B & s is one-to-one & g|A = f*s) implies F $$(A,g) = F $$(B,f) proof defpred X[Element of Fin C9] means $1 <> {} or F is having_a_unity implies for B st ex s st dom s = $1 & rng s = B & s is one-to-one & g|$1 = f*s holds F $$($1,g) = F $$(B,f); assume A1: F is commutative associative; A2: for B9 being Element of Fin C9, b being Element of C9 holds X[B9] & not b in B9 implies X[B9 \/ {.b.}] proof let A9 be Element of Fin C9,a be Element of C9 such that A3: A9 <> {} or F is having_a_unity implies for B st ex s st dom s = A9 & rng s = B & s is one-to-one & g|A9 = f*s holds F $$(A9,g) = F $$(B,f) and A4: not a in A9; assume A9 \/ {a} <> {} or F is having_a_unity; let B; set A = A9 \/ {.a.}; given s such that A5: dom s = A and A6: rng s = B and A7: s is one-to-one and A8: g|A = f*s; A9: a in A by ZFMISC_1:136; then A10: s.a in B by A5,A6,FUNCT_1:def 3; B c= C by FINSUB_1:def 5; then reconsider c = s.a as Element of C by A10; set B9 = B \ {.c.}; set s9 = s|A9; A11: s9 is one-to-one by A7,FUNCT_1:52; now let y; thus y in rng s9 implies y in B9 proof assume y in rng s9; then consider x such that A12: x in dom s9 and A13: y = s9.x by FUNCT_1:def 3; A14: s9.x = s.x by A12,FUNCT_1:47; A15: x in dom s /\ A9 by A12,RELAT_1:61; then x in dom s & x <> a by A4,XBOOLE_0:def 4; then s.x <> c by A5,A7,A9,FUNCT_1:def 4; then A16: not y in {c} by A13,A14,TARSKI:def 1; x in dom s by A15,XBOOLE_0:def 4; then y in B by A6,A13,A14,FUNCT_1:def 3; hence thesis by A16,XBOOLE_0:def 5; end; assume A17: y in B9; then y in B by XBOOLE_0:def 5; then consider x such that A18: x in dom s and A19: y = s.x by A6,FUNCT_1:def 3; A20: x in A9 or x in {a} by A5,A18,XBOOLE_0:def 3; not y in {c} by A17,XBOOLE_0:def 5; then x <> a by A19,TARSKI:def 1; then x in dom s /\ A9 by A18,A20,TARSKI:def 1,XBOOLE_0:def 4; then x in dom s9 & s9.x = s.x by FUNCT_1:48,RELAT_1:61; hence y in rng s9 by A19,FUNCT_1:def 3; end; then A21: rng s9 = B9 by TARSKI:1; now let x; thus x in dom(g|A9) implies x in dom(f*s9) proof assume x in dom(g|A9); then A22: x in dom g /\ A9 by RELAT_1:61; then A23: x in A9 by XBOOLE_0:def 4; A24: x in dom g by A22,XBOOLE_0:def 4; x in A by A23,ZFMISC_1:136; then x in dom g /\ A by A24,XBOOLE_0:def 4; then A25: x in dom(f*s) by A8,RELAT_1:61; then A26: s.x in dom f by FUNCT_1:11; x in dom s by A25,FUNCT_1:11; then x in dom s /\ A9 by A23,XBOOLE_0:def 4; then A27: x in dom s9 by RELAT_1:61; then s9.x = s.x by FUNCT_1:47; hence thesis by A26,A27,FUNCT_1:11; end; assume A28: x in dom(f*s9); then A29: x in dom s9 by FUNCT_1:11; then A30: x in dom s /\ A9 by RELAT_1:61; then A31: x in dom s by XBOOLE_0:def 4; s9.x in dom f by A28,FUNCT_1:11; then s.x in dom f by A29,FUNCT_1:47; then x in dom(g|A) by A8,A31,FUNCT_1:11; then x in dom g /\ A by RELAT_1:61; then A32: x in dom g by XBOOLE_0:def 4; x in A9 by A30,XBOOLE_0:def 4; then x in dom g /\ A9 by A32,XBOOLE_0:def 4; hence x in dom(g|A9) by RELAT_1:61; end; then A33: dom(g|A9) = dom(f*s9) by TARSKI:1; a in C9; then a in dom g by FUNCT_2:def 1; then a in dom g /\ A by A9,XBOOLE_0:def 4; then a in dom(f*s) & g.a = (f*s).a by A8,FUNCT_1:48,RELAT_1:61; then A34: g.a = f.c by FUNCT_1:12; B9 \/ {c} = B \/ {c} by XBOOLE_1:39; then A35: B = B9 \/ {c} by A10,ZFMISC_1:40; A36: dom s9 = A9 by A5,RELAT_1:62,XBOOLE_1:7; A37: for x st x in dom(g|A9) holds (g|A9).x = (f*s9).x proof let x; assume x in dom(g|A9); then A38: x in dom g /\ A9 by RELAT_1:61; then A39: x in A9 by XBOOLE_0:def 4; then A40: x in A by ZFMISC_1:136; x in dom g by A38,XBOOLE_0:def 4; then x in dom g /\ A by A40,XBOOLE_0:def 4; then x in dom(f*s) by A8,RELAT_1:61; then A41: x in dom s by FUNCT_1:11; then x in dom s /\ A9 by A39,XBOOLE_0:def 4; then A42: x in dom s9 by RELAT_1:61; then A43: s9.x = s.x by FUNCT_1:47; thus (g|A9).x = g.x by A39,FUNCT_1:49 .= (f*s).x by A8,A40,FUNCT_1:49 .= f.(s.x) by A41,FUNCT_1:13 .= (f*s9).x by A42,A43,FUNCT_1:13; end; then A44: g|A9 = f*s9 by A33,FUNCT_1:2; now let y; thus y in g.:A9 implies y in f.:B9 proof assume y in g.:A9; then consider x such that A45: x in dom g and A46: x in A9 and A47: y = g.x by FUNCT_1:def 6; x in dom g /\ A9 by A45,A46,XBOOLE_0:def 4; then A48: x in dom(g|A9) by RELAT_1:61; then x in dom s9 by A33,FUNCT_1:11; then A49: s9.x in B9 by A21,FUNCT_1:def 3; y = (f*s9).x by A44,A46,A47,FUNCT_1:49; then A50: y = f.(s9.x) by A33,A48,FUNCT_1:12; s9.x in dom f by A33,A48,FUNCT_1:11; hence thesis by A50,A49,FUNCT_1:def 6; end; assume y in f.:B9; then consider x such that x in dom f and A51: x in B9 and A52: y = f.x by FUNCT_1:def 6; set x9 = s9".x; A53: x9 in A9 by A11,A36,A21,A51,FUNCT_1:32; A9 c= C9 by FINSUB_1:def 5; then x9 in C9 by A53; then A54: x9 in dom g by FUNCT_2:def 1; s9.x9 = x by A11,A21,A51,FUNCT_1:35; then y = (f*s9).x9 by A36,A52,A53,FUNCT_1:13 .= g.x9 by A44,A53,FUNCT_1:49; hence y in g.:A9 by A53,A54,FUNCT_1:def 6; end; then A55: f.:B9 = g.:A9 by TARSKI:1; A56: not c in B9 by ZFMISC_1:56; now per cases; suppose A57: A9 = {}; B9 c= C by FINSUB_1:def 5; then B9 c= dom f by FUNCT_2:def 1; then A58: B9 = {} by A55,A57; thus F $$(A,g) = f.c by A1,A34,A57,SETWISEO:17 .= F $$(B,f) by A1,A35,A58,SETWISEO:17; end; suppose A59: A9 <> {}; A9 c= C9 by FINSUB_1:def 5; then A9 c= dom g by FUNCT_2:def 1; then A60: B9 <> {} by A55,A59; thus F $$(A,g) = F.(F $$(A9,g),g.a) by A1,A4,A59,Th2 .= F.(F $$(B9,f),f.c) by A3,A34,A11,A36,A21,A33,A37,A59,FUNCT_1:2 .= F $$(B,f) by A1,A35,A56,A60,Th2; end; end; hence thesis; end; A61: X[{}.C9] proof assume A62: {}.C9 <> {} or F is having_a_unity; let B; given s such that A63: dom s = {}.C9 & rng s = B & s is one-to-one and g|({}.C9) = f*s; B,{} are_equipotent by A63,WELLORD2:def 4; then A64: B = {}.C by CARD_1:26; F $$({}.C9,g) = the_unity_wrt F by A1,A62,SETWISEO:31; hence thesis by A1,A62,A64,SETWISEO:31; end; for A holds X[A] from SETWISEO:sch 2(A61,A2); hence thesis; end; theorem H is commutative associative & (B <> {} or H is having_a_unity) & f is one-to-one implies H $$(f.:B,h) = H $$(B,h*f) proof assume that A1: H is commutative associative &( B <> {} or H is having_a_unity) and A2: f is one-to-one; set s = f|B; A3: rng s = f.:B & (h*f)|B = h*s by RELAT_1:83,115; B c= C by FINSUB_1:def 5; then B c= dom f by FUNCT_2:def 1; then A4: dom s = B by RELAT_1:62; s is one-to-one by A2,FUNCT_1:52; hence thesis by A1,A4,A3,Th5; end; theorem F is commutative associative & (B <> {} or F is having_a_unity) & f|B = f9|B implies F $$(B,f) = F $$(B,f9) proof assume A1: F is commutative associative &( B <> {} or F is having_a_unity); set s = id B; A2: dom s = B & rng s = B; assume f|B = f9|B; then f|B = f9*s by RELAT_1:65; hence thesis by A1,A2,Th5; end; theorem F is commutative associative & F is having_a_unity & e = the_unity_wrt F & f.:B = {e} implies F$$(B,f) = e proof assume that A1: F is commutative associative and A2: F is having_a_unity and A3: e = the_unity_wrt F; defpred X[Element of Fin C] means f.:($1) = {e} implies F$$($1,f) = e; A4: for B9 being Element of Fin C, b being Element of C holds X[B9] & not b in B9 implies X[B9 \/ {.b.}] proof let B9,c such that A5: f.:(B9) = {e} implies F$$(B9,f) = e and A6: not c in B9 and A7: f.:(B9 \/ {c}) = {e}; A8: now per cases; suppose B9 = {}; then A9: B9 = {}.C; thus F$$(B9 \/ {.c.},f) = F.(F $$(B9,f),f.c) by A1,A2,A6,Th2 .= F.(e,f.c) by A1,A2,A3,A9,SETWISEO:31; end; suppose A10: B9 <> {}; B9 c= C by FINSUB_1:def 5; then A11: B9 c= dom f by FUNCT_2:def 1; f.:B9 c= {e} by A7,RELAT_1:123,XBOOLE_1:7; hence F$$(B9 \/ {.c.},f) = F.(e,f.c) by A1,A5,A6,A10,A11,Th2, ZFMISC_1:33; end; end; {.c.} c= C by FINSUB_1:def 5; then A12: {c} c= dom f by FUNCT_2:def 1; then A13: c in dom f by ZFMISC_1:31; Im(f,c) c= {e} by A7,RELAT_1:123,XBOOLE_1:7; then Im(f,c) = {e} by A12,ZFMISC_1:33; then {e} = {f.c} by A13,FUNCT_1:59; then f.c = e by ZFMISC_1:3; hence thesis by A2,A3,A8,SETWISEO:15; end; A14: X[{}.C]; for B holds X[B] from SETWISEO:sch 2(A14,A4); hence thesis; end; theorem Th9: F is commutative associative & F is having_a_unity & e = the_unity_wrt F & G.(e,e) = e & (for d1,d2,d3,d4 holds F.(G.(d1,d2),G.(d3,d4))= G.(F.(d1,d3),F.(d2,d4))) implies G.(F$$(B,f),F$$(B,f9)) = F $$(B,G.:(f,f9)) proof assume that A1: F is commutative associative & F is having_a_unity and A2: e = the_unity_wrt F and A3: G.(e,e) = e and A4: for d1,d2,d3,d4 holds F.(G.(d1,d2),G.(d3,d4))= G.(F.(d1,d3),F.(d2,d4 )); defpred X[Element of Fin C] means G.(F$$($1,f),F$$($1,f9)) = F $$($1,G.:(f, f9)); A5: for B9 being Element of Fin C, b being Element of C holds X[B9] & not b in B9 implies X[B9 \/ {.b.}] proof let B,c such that A6: G.(F$$(B,f),F$$(B,f9)) = F $$(B,G.:(f,f9)) and A7: not c in B; set s9 = F$$(B,f9); set s = F$$(B,f); F$$(B \/ {.c.},f) = F.(s,f.c) & F$$(B \/ {.c.},f9) = F.(s9,f9.c) by A1,A7 ,Th2; hence G.(F$$(B \/ {.c.},f),F$$(B \/ {.c.},f9)) = F.(G.(s,s9),G.(f.c,f9.c)) by A4 .= F.(G.(s,s9),G.:(f,f9).c) by FUNCOP_1:37 .= F $$(B \/ {.c.},G.:(f,f9)) by A1,A6,A7,Th2; end; F$$({}.C,f) = e & F$$({}.C,f9) = e by A1,A2,SETWISEO:31; then A8: X[{}.C] by A1,A2,A3,SETWISEO:31; for B holds X[B] from SETWISEO:sch 2(A8,A5); hence thesis; end; Lm3: F is commutative associative implies for d1,d2,d3,d4 holds F.(F.(d1,d2),F .(d3,d4))= F.(F.(d1,d3),F.(d2,d4)) proof assume that A1: F is commutative and A2: F is associative; let d1,d2,d3,d4; thus F.(F.(d1,d2),F.(d3,d4)) = F.(d1,F.(d2,F.(d3,d4))) by A2,BINOP_1:def 3 .= F.(d1,F.(F.(d2,d3),d4)) by A2,BINOP_1:def 3 .= F.(d1,F.(F.(d3,d2),d4)) by A1,BINOP_1:def 2 .= F.(d1,F.(d3,F.(d2,d4))) by A2,BINOP_1:def 3 .= F.(F.(d1,d3),F.(d2,d4)) by A2,BINOP_1:def 3; end; theorem F is commutative associative & F is having_a_unity implies F.(F$$(B,f) ,F$$(B,f9)) = F $$(B,F.:(f,f9)) proof set e = the_unity_wrt F; assume A1: F is commutative & F is associative & F is having_a_unity; then F.(e,e) = e & for d1,d2,d3,d4 holds F.(F.(d1,d2),F.(d3,d4))= F.(F.(d1,d3 ),F. (d2,d4)) by Lm3,SETWISEO:15; hence thesis by A1,Th9; end; theorem F is commutative associative & F is having_a_unity & F is having_an_inverseOp & G = F*(id D,the_inverseOp_wrt F) implies G.(F$$(B,f),F$$( B,f9)) = F $$(B,G.:(f,f9)) proof assume that A1: F is commutative associative & F is having_a_unity and A2: F is having_an_inverseOp & G = F*(id D,the_inverseOp_wrt F); set e = the_unity_wrt F; G.(e,e) = e & for d1,d2,d3,d4 holds F.(G.(d1,d2),G.(d3,d4))= G.(F.(d1,d3 ),F. (d2,d4)) by A1,A2,FINSEQOP:86,89; hence thesis by A1,Th9; end; theorem Th12: F is commutative associative & F is having_a_unity & e = the_unity_wrt F & G is_distributive_wrt F & G.(d,e) = e implies G.(d,F$$(B,f)) = F $$(B,G[;](d,f)) proof assume that A1: F is commutative associative & F is having_a_unity and A2: e = the_unity_wrt F and A3: G is_distributive_wrt F; defpred X[Element of Fin C] means G.(d,F$$($1,f)) = F $$($1,G[;](d,f)); A4: for B9 being Element of Fin C, b being Element of C holds X[B9] & not b in B9 implies X[B9 \/ {.b.}] proof let B9,c such that A5: G.(d,F$$(B9,f)) = F $$(B9,G[;](d,f)) and A6: not c in B9; thus G.(d,F$$(B9 \/ {.c.},f)) = G.(d,F.(F$$(B9,f),f.c)) by A1,A6,Th2 .= F.(G.(d,F$$(B9,f)),G.(d,f.c)) by A3,BINOP_1:11 .= F.(F $$(B9,G[;](d,f)),(G[;](d,f)).c) by A5,FUNCOP_1:53 .= F $$(B9 \/ {.c.},G[;](d,f)) by A1,A6,Th2; end; assume G.(d,e) = e; then G.(d,F$$({}.C,f)) = e by A1,A2,SETWISEO:31 .= F $$({}.C,G[;](d,f)) by A1,A2,SETWISEO:31; then A7: X[{}.C]; for B holds X[B] from SETWISEO:sch 2(A7,A4); hence thesis; end; theorem Th13: F is commutative associative & F is having_a_unity & e = the_unity_wrt F & G is_distributive_wrt F & G.(e,d) = e implies G.(F$$(B,f),d) = F $$(B,G[:](f,d)) proof assume that A1: F is commutative associative & F is having_a_unity and A2: e = the_unity_wrt F and A3: G is_distributive_wrt F; defpred X[Element of Fin C] means G.(F$$($1,f),d) = F $$($1,G[:](f,d)); A4: for B9 being (Element of Fin C), b being Element of C holds X[B9] & not b in B9 implies X[B9 \/ {.b.}] proof let B9,c such that A5: G.(F$$(B9,f),d) = F $$(B9,G[:](f,d)) and A6: not c in B9; thus G.(F$$(B9 \/ {.c.},f),d) = G.(F.(F$$(B9,f),f.c),d) by A1,A6,Th2 .= F.(G.(F$$(B9,f),d),G.(f.c,d)) by A3,BINOP_1:11 .= F.(F $$(B9,G[:](f,d)),(G[:](f,d)).c) by A5,FUNCOP_1:48 .= F $$(B9 \/ {.c.},G[:](f,d)) by A1,A6,Th2; end; assume G.(e,d) = e; then G.(F$$({}.C,f),d) = e by A1,A2,SETWISEO:31 .= F $$({}.C,G[:](f,d)) by A1,A2,SETWISEO:31; then A7: X[{}.C]; for B holds X[B] from SETWISEO:sch 2(A7,A4); hence thesis; end; theorem F is commutative associative & F is having_a_unity & F is having_an_inverseOp & G is_distributive_wrt F implies G.(d,F$$(B,f)) = F $$(B,G [;](d,f)) proof assume that A1: F is commutative associative & F is having_a_unity and A2: F is having_an_inverseOp and A3: G is_distributive_wrt F; set e = the_unity_wrt F; G.(d,e) = e by A1,A2,A3,FINSEQOP:66; hence thesis by A1,A3,Th12; end; theorem F is commutative associative & F is having_a_unity & F is having_an_inverseOp & G is_distributive_wrt F implies G.(F$$(B,f),d) = F $$(B,G [:](f,d)) proof assume that A1: F is commutative associative & F is having_a_unity and A2: F is having_an_inverseOp and A3: G is_distributive_wrt F; set e = the_unity_wrt F; G.(e,d) = e by A1,A2,A3,FINSEQOP:66; hence thesis by A1,A3,Th13; end; theorem Th16: F is commutative associative & F is having_a_unity & H is commutative associative & H is having_a_unity & h.the_unity_wrt F = the_unity_wrt H & (for d1,d2 holds h.(F.(d1,d2)) = H.(h.d1,h.d2)) implies h.(F $$(B,f)) = H $$(B,h*f) proof assume that A1: F is commutative associative & F is having_a_unity and A2: H is commutative associative & H is having_a_unity and A3: h.the_unity_wrt F = the_unity_wrt H and A4: for d1,d2 holds h.(F.(d1,d2)) = H.(h.d1,h.d2); defpred X[Element of Fin C] means h.(F$$($1,f)) = H $$($1,h*f); A5: for B9 being (Element of Fin C), b being Element of C holds X[B9] & not b in B9 implies X[B9 \/ {.b.}] proof let B,c such that A6: h.(F$$(B,f)) = H $$(B,h*f) and A7: not c in B; thus h.(F$$(B \/ {.c.},f)) = h.(F.(F$$(B,f),f.c)) by A1,A7,Th2 .= H.(H $$(B,h*f),h.(f.c)) by A4,A6 .= H.(H $$(B,h*f),(h*f).c) by FUNCT_2:15 .= H $$(B \/ {.c.},h*f) by A2,A7,Th2; end; h.(F$$({}.C,f)) = the_unity_wrt H by A1,A3,SETWISEO:31 .= H $$({}.C,h*f) by A2,SETWISEO:31; then A8: X[{}.C]; for B holds X[B] from SETWISEO:sch 2(A8,A5); hence thesis; end; theorem F is commutative associative & F is having_a_unity & u.the_unity_wrt F = the_unity_wrt F & u is_distributive_wrt F implies u.(F$$(B,f)) = F $$(B,u*f) proof assume A1: F is commutative associative & F is having_a_unity & u.the_unity_wrt F = the_unity_wrt F; assume for d1,d2 holds u.(F.(d1,d2)) = F.(u.d1,u.d2); hence thesis by A1,Th16; end; theorem F is commutative associative & F is having_a_unity & F is having_an_inverseOp & G is_distributive_wrt F implies G[;](d,id D).(F$$(B,f)) = F $$(B,G[;](d,id D)*f) proof assume that A1: F is commutative associative & F is having_a_unity and A2: F is having_an_inverseOp and A3: G is_distributive_wrt F; set e = the_unity_wrt F; set u = G[;](d,id D); u is_distributive_wrt F by A3,FINSEQOP:54; then A4: for d1,d2 holds u.(F.(d1,d2)) = F.(u.d1,u.d2) by BINOP_1:def 12; G[;](d,id D).e = e by A1,A2,A3,FINSEQOP:69; hence thesis by A1,A4,Th16; end; theorem F is commutative associative & F is having_a_unity & F is having_an_inverseOp implies (the_inverseOp_wrt F).(F$$(B,f)) = F $$(B,( the_inverseOp_wrt F)*f) proof assume that A1: F is commutative associative & F is having_a_unity and A2: F is having_an_inverseOp; set e = the_unity_wrt F, u = the_inverseOp_wrt F; u is_distributive_wrt F by A1,A2,FINSEQOP:63; then A3: for d1,d2 holds u.(F.(d1,d2)) = F.(u.d1,u.d2) by BINOP_1:def 12; u.e = e by A1,A2,FINSEQOP:61; hence thesis by A1,A3,Th16; end; definition let D,p,d; func [#](p,d) -> Function of NAT,D equals (NAT --> d) +* p; coherence; end; theorem Th20: (i in dom p implies [#](p,d).i = p.i) & (not i in dom p implies [#](p,d).i = d) proof thus i in dom p implies [#](p,d).i = p.i by FUNCT_4:13; A1: i in NAT by ORDINAL1:def 12; assume not i in dom p; hence [#](p,d).i = (NAT --> d).i by FUNCT_4:11 .= d by A1,FUNCOP_1:7; end; theorem [#](p,d)|(dom p) = p proof set k = len p, f = [#](p,d); Seg k c= NAT; then Seg k c= dom f by FUNCT_2:def 1; then A1: dom (f|Seg k) = Seg k by RELAT_1:62; A2: dom p = Seg k by FINSEQ_1:def 3; now let x; assume A3: x in Seg k; then (f|Seg k).x = f.x by A1,FUNCT_1:47; hence (f|Seg k).x = p.x by A2,A3,Th20; end; hence thesis by A1,A2,FUNCT_1:2; end; theorem [#](p^q,d)|(dom p) = p proof set k = len p, f = [#](p^q,d); Seg k c= NAT; then Seg k c= dom f by FUNCT_2:def 1; then A1: dom (f|Seg k) = Seg k by RELAT_1:62; A2: dom p = Seg k by FINSEQ_1:def 3; now let x; k <= k + len q by NAT_1:12; then k <= len (p^q) by FINSEQ_1:22; then A3: Seg(len(p^q)) = dom (p^q) & Seg k c= Seg len(p^q) by FINSEQ_1:5,def 3; assume A4: x in Seg k; then (f|Seg k).x = f.x by A1,FUNCT_1:47; hence (f|Seg k).x = (p^q).x by A4,A3,Th20 .= p.x by A2,A4,FINSEQ_1:def 7; end; hence thesis by A1,A2,FUNCT_1:2; end; theorem rng [#](p,d) = rng p \/ {d} proof now let y; thus y in rng [#](p,d) implies y in rng p \/ {d} proof assume y in rng [#](p,d); then consider x such that A1: x in dom [#](p,d) and A2: y = [#](p,d).x by FUNCT_1:def 3; reconsider i = x as Element of NAT by A1; now per cases; case A3: i in dom p; then y = p.i by A2,Th20; hence y in rng p by A3,FUNCT_1:def 3; end; case not i in dom p; then y = d by A2,Th20; hence y in {d} by TARSKI:def 1; end; end; hence thesis by XBOOLE_0:def 3; end; assume A4: y in rng p \/ {d}; now per cases by A4,XBOOLE_0:def 3; suppose y in rng p; then consider i being Nat such that A5: i in dom p and A6: y = p.i by FINSEQ_2:10; y = [#](p,d).i by A5,A6,Th20; hence y in rng [#](p,d) by A5,FUNCT_2:4; end; suppose A7: y in {d}; dom p = Seg len p by FINSEQ_1:def 3; then A8: not len p + 1 in dom p by Lm2; y = d by A7,TARSKI:def 1; then y = [#](p,d).(len p + 1) by A8,Th20; hence y in rng [#](p,d) by FUNCT_2:4; end; end; hence y in rng [#](p,d); end; hence thesis by TARSKI:1; end; theorem h*[#](p,d) = [#](h*p,h.d) proof now let i be Element of NAT; A1: dom(h*p)=Seg len(h*p) by FINSEQ_1:def 3; A2: len(h*p) = len p & Seg len p = dom p by FINSEQ_1:def 3,FINSEQ_2:33; now per cases; suppose A3: i in dom p; hence h.([#](p,d).i) = h.(p.i) by Th20 .= (h*p).i by A3,FUNCT_1:13 .= [#](h*p,h.d).i by A2,A1,A3,Th20; end; suppose A4: not i in dom p; hence h.([#](p,d).i) = h.d by Th20 .= [#](h*p,h.d).i by A2,A1,A4,Th20; end; end; hence (h*[#](p,d)).i = [#](h*p,h.d).i by FUNCT_2:15; end; hence thesis by FUNCT_2:63; end; Lm4: len p = len q & F.(e,e) = e implies F.:([#](p,e),[#](q,e)) = [#](F.:(p,q) ,e) proof assume that A1: len p = len q and A2: F.(e,e) = e; set r = F.:(p,q); A3: len r = len p by A1,FINSEQ_2:72; A4: dom r = Seg len r by FINSEQ_1:def 3; A5: dom p = Seg len p by FINSEQ_1:def 3; A6: dom q = Seg len q by FINSEQ_1:def 3; now let i be Element of NAT; now per cases; suppose A7: i in dom p; hence F.([#](p,e).i,[#](q,e).i) = F.(p.i,[#](q,e).i) by Th20 .= F.(p.i,q.i) by A1,A5,A6,A7,Th20 .= r.i by A3,A5,A4,A7,FUNCOP_1:22 .= [#](r,e).i by A3,A5,A4,A7,Th20; end; suppose A8: not i in dom p; hence F.([#](p,e).i,[#](q,e).i) = F.(e,[#](q,e).i) by Th20 .= e by A1,A2,A5,A6,A8,Th20 .= [#](r,e).i by A3,A5,A4,A8,Th20; end; end; hence F.:([#](p,e),[#](q,e)).i = [#](r,e).i by FUNCOP_1:37; end; hence thesis by FUNCT_2:63; end; Lm5: F.(e,d) = e implies F[:]([#](p,e),d) = [#](F[:](p,d),e) proof assume A1: F.(e,d) = e; now let i be Element of NAT; A2: dom p = Seg len p by FINSEQ_1:def 3; A3: len(F[:](p,d)) = len p & dom(F[:](p,d)) = Seg len(F[:](p,d)) by FINSEQ_1:def 3,FINSEQ_2:84; now per cases; suppose A4: i in dom p; hence F.([#](p,e).i,d) = F.(p.i,d) by Th20 .= (F[:](p,d)).i by A3,A2,A4,FUNCOP_1:27 .= ([#](F[:](p,d),e)).i by A3,A2,A4,Th20; end; suppose A5: not i in dom p; hence F.([#](p,e).i,d) = F.(e,d) by Th20 .= ([#](F[:](p,d),e)).i by A1,A3,A2,A5,Th20; end; end; hence (F[:]([#](p,e),d)).i = ([#](F[:](p,d),e)).i by FUNCOP_1:48; end; hence thesis by FUNCT_2:63; end; Lm6: F.(d,e) = e implies F[;](d,[#](p,e)) = [#](F[;](d,p),e) proof assume A1: F.(d,e) = e; now let i be Element of NAT; A2: dom p = Seg len p by FINSEQ_1:def 3; A3: len(F[;](d,p)) = len p & dom(F[;](d,p)) = Seg len(F[;](d,p)) by FINSEQ_1:def 3,FINSEQ_2:78; now per cases; suppose A4: i in dom p; hence F.(d,[#](p,e).i) = F.(d,p.i) by Th20 .= (F[;](d,p)).i by A3,A2,A4,FUNCOP_1:32 .= ([#](F[;](d,p),e)).i by A3,A2,A4,Th20; end; suppose A5: not i in dom p; hence F.(d,[#](p,e).i) = F.(d,e) by Th20 .= ([#](F[;](d,p),e)).i by A1,A3,A2,A5,Th20; end; end; hence (F[;](d,[#](p,e))).i = ([#](F[;](d,p),e)).i by FUNCOP_1:53; end; hence thesis by FUNCT_2:63; end; notation let i be Nat; synonym finSeg i for Seg i; end; definition let i be Nat; redefine func finSeg i -> Element of Fin NAT; coherence by Lm1; end; notation let D,p,F; synonym F $$ p for F "**" p; end; definition let D,p,F; assume A1: ( F is having_a_unity or len p >= 1)& F is associative commutative; redefine func F $$ p equals :Def2: F $$(findom p,[#](p,the_unity_wrt F)); compatibility by A1,FINSOP_1:3; end; theorem Th25: F is having_a_unity implies F"**"(i|->the_unity_wrt F) = the_unity_wrt F proof set e = the_unity_wrt F; defpred X[Nat] means F"**"($1|->e) = e; assume A1: F is having_a_unity; A2: for i st X[i] holds X[i+1] proof let i; assume A3: F"**"(i|->e) = e; thus F"**"((i+1)|->e) = F"**"((i|->e)^<*e*>) by FINSEQ_2:60 .= F.(F"**"(i|->e),e) by A1,FINSOP_1:4 .= e by A1,A3,SETWISEO:15; end; F"**"(0|->e) = F"**" <*>D .= e by A1,FINSOP_1:10; then A4: X[0]; for i holds X[i] from NAT_1:sch 2(A4,A2); hence thesis; end; theorem Th26: F is associative & (i>=1 & j>=1 or F is having_a_unity) implies F"**"((i+j)|->d) = F.(F"**"(i|->d),F"**"(j|->d)) proof assume A1: F is associative; set p1 = (i|->d),p2 = (j|->d); assume i>=1 & j>=1 or F is having_a_unity; then len p1 >= 1 & len p2 >= 1 or F is having_a_unity by CARD_1:def 7; then F "**"(p1^p2) = F.(F"**"p1,F"**"p2) by A1,FINSOP_1:5; hence thesis by FINSEQ_2:123; end; theorem F is commutative associative & (i>=1 & j>=1 or F is having_a_unity) implies F"**"((i*j)|->d) = F"**"(j|->(F"**"(i|->d))) proof assume that A1: F is commutative associative and A2: i>=1 & j>=1 or F is having_a_unity; per cases by NAT_1:3; suppose A3: i = 0 or j = 0; set e = the_unity_wrt F; A4: now per cases by A3; suppose i = 0; then i|->d = <*>D; then F"**"(i|->d) = e by A2,A3,FINSOP_1:10; hence F"**"(j|->(F"**"(i|->d))) = e by A2,A3,Th25; end; suppose j = 0; then j|->(F"**"(i|->d)) = <*>D; hence F"**"(j|->(F"**"(i|->d))) = e by A2,A3,FINSOP_1:10; end; end; (i*j)|->d = <*>D by A3; hence thesis by A2,A3,A4,FINSOP_1:10; end; suppose A5: i > 0 & j > 0; defpred X[Nat] means $1 <> 0 implies F"**"((i*$1)|->d) = F"**"($1|->(F"**" (i|->d))); A6: for j st X[j] holds X[j+1] proof let j such that A7: j <> 0 implies F"**"((i*j)|->d) = F"**"(j|->(F"**"(i|->d))); now per cases by NAT_1:14; suppose A8: j = 0; 1|->(F"**"(i|->d)) = <*F"**"(i|->d)*> by FINSEQ_2:59; hence thesis by A8,FINSOP_1:11; end; suppose A9: j >= 1+0; then j > 0 by NAT_1:13; then i*j > i*0 by A5,XREAL_1:68; then A10: i*j >= 1+0 by NAT_1:13; F"**"((i*(j+1))|->d) = F"**"((i*j+i*1)|->d) .= F.(F"**"((i*j)|->d),F"**"(i|->d)) by A1,A2,A10,Th26 .= F.(F"**"((i*j)|->d),F"**"(1|->(F"**"(i|->d)))) by FINSOP_1:16 .= F"**"((j+1)|->(F"**"(i|->d))) by A1,A7,A9,Th26; hence thesis; end; end; hence thesis; end; A11: X[0]; for j holds X[j] from NAT_1:sch 2(A11,A6); hence thesis by A5; end; end; theorem Th28: F is having_a_unity & H is having_a_unity & h.the_unity_wrt F = the_unity_wrt H & (for d1,d2 holds h.(F.(d1,d2)) = H.(h.d1,h.d2)) implies h.(F "**"p) = H "**"(h*p) proof assume that A1: F is having_a_unity and A2: H is having_a_unity and A3: h.the_unity_wrt F = the_unity_wrt H and A4: for d1,d2 holds h.(F.(d1,d2)) = H.(h.d1,h.d2); defpred X[FinSequence of D] means h.(F"**"$1) = H "**"(h*$1); A5: for q,d st X[q] holds X[q^<*d*>] proof let q,d such that A6: h.(F"**"q) = H "**"(h*q); thus h.(F"**"(q^<*d*>)) = h.(F.(F"**"q,d)) by A1,FINSOP_1:4 .= H.(H "**"(h*q),h.d) by A4,A6 .= H "**" ((h*q)^<*h.d*>) by A2,FINSOP_1:4 .= H "**"(h*(q^<*d*>)) by FINSEQOP:8; end; h.(F"**"<*>D) = h.(the_unity_wrt F) by A1,FINSOP_1:10 .= H "**"(<*>E) by A2,A3,FINSOP_1:10 .= H "**"(h*<*>D); then A7: X[<*>D]; X[q] from FINSEQ_2:sch 2(A7,A5); hence thesis; end; theorem F is having_a_unity & u.the_unity_wrt F = the_unity_wrt F & u is_distributive_wrt F implies u.(F"**"p) = F "**"(u*p) proof assume A1: F is having_a_unity & u.the_unity_wrt F = the_unity_wrt F; assume for d1,d2 holds u.(F.(d1,d2)) = F.(u.d1,u.d2); hence thesis by A1,Th28; end; theorem F is associative & F is having_a_unity & F is having_an_inverseOp & G is_distributive_wrt F implies G[;](d,id D).(F"**"p) = F "**"(G[;](d,id D)*p) proof assume that A1: F is associative and A2: F is having_a_unity and A3: F is having_an_inverseOp and A4: G is_distributive_wrt F; set e = the_unity_wrt F; set u = G[;](d,id D); u is_distributive_wrt F by A4,FINSEQOP:54; then A5: for d1,d2 holds u.(F.(d1,d2)) = F.(u.d1,u.d2) by BINOP_1:def 12; G[;](d,id D).e = e by A1,A2,A3,A4,FINSEQOP:69; hence thesis by A2,A5,Th28; end; theorem F is commutative associative & F is having_a_unity & F is having_an_inverseOp implies (the_inverseOp_wrt F).(F"**"p) = F "**"(( the_inverseOp_wrt F)*p) proof assume that A1: F is commutative associative and A2: F is having_a_unity and A3: F is having_an_inverseOp; set e = the_unity_wrt F, u = the_inverseOp_wrt F; u is_distributive_wrt F by A1,A2,A3,FINSEQOP:63; then A4: for d1,d2 holds u.(F.(d1,d2)) = F.(u.d1,u.d2) by BINOP_1:def 12; u.e = e by A1,A2,A3,FINSEQOP:61; hence thesis by A2,A4,Th28; end; theorem Th32: F is commutative associative & F is having_a_unity & e = the_unity_wrt F & G.(e,e) = e & (for d1,d2,d3,d4 holds F.(G.(d1,d2),G.(d3,d4))= G.(F.(d1,d3),F.(d2,d4))) & len p = len q implies G.(F"**"p,F"**"q) = F "**"(G.: (p,q)) proof assume that A1: F is commutative & F is associative & F is having_a_unity & e = the_unity_wrt F and A2: G.(e,e) = e and A3: F.(G.(d1,d2),G.(d3,d4))= G.(F.(d1,d3),F.(d2,d4)) and A4: len p = len q; A5: len p = len(G.:(p,q)) by A4,FINSEQ_2:72; A6: dom(G.:(p,q)) = Seg len(G.:(p,q)) by FINSEQ_1:def 3; A7: dom q = Seg len q by FINSEQ_1:def 3; A8: dom p = Seg len p by FINSEQ_1:def 3; thus G.(F "**"p,F "**"q) = G.(F $$(findom p,[#](p,e)),F "**"q) by A1,Def2 .= G.(F $$(findom p,[#](p,e)),F $$(findom q,[#](q,e))) by A1,Def2 .= F $$(findom p,G.:([#](p,e),[#](q,e))) by A1,A2,A3,A4,A8,A7,Th9 .= F $$(findom(G.:(p,q)),[#](G.:(p,q),e)) by A2,A4,A5,A8,A6,Lm4 .= F "**"(G.:(p,q)) by A1,Def2; end; theorem Th33: F is commutative associative & F is having_a_unity & e = the_unity_wrt F & G.(e,e) = e & (for d1,d2,d3,d4 holds F.(G.(d1,d2),G.(d3,d4))= G.(F.(d1,d3),F.(d2,d4))) implies G.(F"**"T1,F"**"T2) = F "**"(G.:(T1,T2)) proof len T1 = i & len T2 = i by CARD_1:def 7; hence thesis by Th32; end; theorem Th34: F is commutative associative & F is having_a_unity & len p = len q implies F.(F"**"p,F"**"q) = F "**"(F.:(p,q)) proof set e = the_unity_wrt F; assume A1: F is commutative & F is associative & F is having_a_unity; then F.(e,e) = e & for d1,d2,d3,d4 holds F.(F.(d1,d2),F.(d3,d4))= F.(F.(d1,d3 ),F. (d2,d4)) by Lm3,SETWISEO:15; hence thesis by A1,Th32; end; theorem Th35: F is commutative associative & F is having_a_unity implies F.(F"**"T1,F"**"T2) = F "**"(F.:(T1,T2)) proof len T1 = i & len T2 = i by CARD_1:def 7; hence thesis by Th34; end; theorem F is commutative associative & F is having_a_unity implies F"**"(i|->(F.(d1,d2))) = F.(F"**"(i|->d1),F"**"(i|->d2)) proof reconsider T1 = i|->d1, T2 = i|->d2 as Element of i-tuples_on D; i|->(F.(d1,d2)) = F.:(T1,T2) by FINSEQOP:17; hence thesis by Th35; end; theorem F is commutative associative & F is having_a_unity & F is having_an_inverseOp & G = F*(id D,the_inverseOp_wrt F) implies G.(F"**"T1,F"**" T2) = F "**"(G.:(T1,T2)) proof assume that A1: F is commutative associative & F is having_a_unity and A2: F is having_an_inverseOp & G = F*(id D,the_inverseOp_wrt F); set e = the_unity_wrt F; G.(e,e) = e & for d1,d2,d3,d4 holds F.(G.(d1,d2),G.(d3,d4))= G.(F.(d1,d3 ),F. (d2,d4)) by A1,A2,FINSEQOP:86,89; hence thesis by A1,Th33; end; theorem Th38: F is commutative associative & F is having_a_unity & e = the_unity_wrt F & G is_distributive_wrt F & G.(d,e) = e implies G.(d,F"**"p) = F "**"(G[;](d,p)) proof assume that A1: F is commutative & F is associative & F is having_a_unity & e = the_unity_wrt F and A2: G is_distributive_wrt F and A3: G.(d,e) = e; A4: len p = len(G[;](d,p)) & Seg len p = dom p by FINSEQ_1:def 3,FINSEQ_2:78; A5: Seg len(G[;](d,p)) = dom(G[;](d,p)) by FINSEQ_1:def 3; thus G.(d,F"**"p) = G.(d,F$$(findom p,[#](p,e))) by A1,Def2 .= F $$(findom p,G[;](d,[#](p,e))) by A1,A2,A3,Th12 .= F $$(findom p,[#](G[;](d,p),e)) by A3,Lm6 .= F "**"(G[;](d,p)) by A1,A4,A5,Def2; end; theorem Th39: F is commutative associative & F is having_a_unity & e = the_unity_wrt F & G is_distributive_wrt F & G.(e,d) = e implies G.(F"**"p,d) = F "**"(G[:](p,d)) proof assume that A1: F is commutative associative & F is having_a_unity & e = the_unity_wrt F and A2: G is_distributive_wrt F and A3: G.(e,d) = e; A4: len p = len(G[:](p,d)) & Seg len p = dom p by FINSEQ_1:def 3,FINSEQ_2:84; A5: Seg len(G[:](p,d)) = dom(G[:](p,d)) by FINSEQ_1:def 3; thus G.(F"**"p,d) = G.(F$$(findom p,[#](p,e)),d) by A1,Def2 .= F $$(findom p,G[:]([#](p,e),d)) by A1,A2,A3,Th13 .= F $$(findom p,[#](G[:](p,d),e)) by A3,Lm5 .= F "**"(G[:](p,d)) by A1,A4,A5,Def2; end; theorem F is commutative associative & F is having_a_unity & F is having_an_inverseOp & G is_distributive_wrt F implies G.(d,F"**"p) = F "**"(G [;](d,p)) proof assume that A1: F is commutative associative & F is having_a_unity and A2: F is having_an_inverseOp and A3: G is_distributive_wrt F; set e = the_unity_wrt F; G.(d,e) = e by A1,A2,A3,FINSEQOP:66; hence thesis by A1,A3,Th38; end; theorem F is commutative associative & F is having_a_unity & F is having_an_inverseOp & G is_distributive_wrt F implies G.(F"**"p,d) = F "**"(G [:](p,d)) proof assume that A1: F is commutative associative & F is having_a_unity and A2: F is having_an_inverseOp and A3: G is_distributive_wrt F; set e = the_unity_wrt F; G.(e,d) = e by A1,A2,A3,FINSEQOP:66; hence thesis by A1,A3,Th39; end; begin reserve x,X,Y for set; reserve C for non empty set; reserve c for Element of C; reserve f,f1,f2,f3,g,g1 for complex-valued Function; reserve r,p for complex number; Lm1: (-1)"=-1; definition let f1,f2 be complex-valued Function; func f1/f2 -> Function means :Def1: dom it = dom f1 /\ (dom f2 \ f2"{0}) & for c being set st c in dom it holds it.c = f1.c * (f2.c)"; existence proof deffunc F(set) = f1.$1 * (f2.$1)"; ex f being Function st dom f = dom f1 /\ (dom f2 \ f2"{0}) & for x st x in dom f1 /\ (dom f2 \ f2"{0}) holds f.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let f, g be Function such that A1: dom f = dom f1 /\ (dom f2 \ f2"{0}) and A2: for c being set st c in dom f holds f.c = f1.c * (f2.c)" and A3: dom g = dom f1 /\ (dom f2 \ f2"{0}) and A4: for c being set st c in dom g holds g.c = f1.c * (f2.c)"; now let x; assume A5: x in dom f; hence f.x = f1.x * (f2.x)" by A2 .= g.x by A1,A3,A4,A5; end; hence thesis by A1,A3,FUNCT_1:2; end; end; registration let f1, f2 be complex-valued Function; cluster f1/f2 -> complex-valued; coherence proof let x be set; set F = f1/f2; assume x in dom F; then F.x = f1.x * (f2.x)" by Def1; hence thesis; end; end; registration let f1, f2 be real-valued Function; cluster f1/f2 -> real-valued; coherence proof let x be set; set F = f1/f2; assume x in dom F; then F.x = f1.x * (f2.x)" by Def1; hence thesis; end; end; definition let C be set, D be complex-membered set; let f1, f2 be PartFunc of C,D; redefine func f1/f2 -> PartFunc of C,COMPLEX; coherence proof set F = f1/f2; A1: rng F c= COMPLEX by VALUED_0:def 1; dom F = dom f1 /\ (dom f2 \ f2"{0}) by Def1; hence thesis by A1,RELSET_1:4; end; end; definition let C be set, D be real-membered set; let f1, f2 be PartFunc of C,D; redefine func f1/f2 -> PartFunc of C,REAL; coherence proof set F = f1/f2; rng F c= REAL by VALUED_0:def 3; then F is PartFunc of dom F, REAL by RELSET_1:4; hence thesis by RELSET_1:5; end; end; definition let f be complex-valued Function; func f^ -> Function means :Def2: dom it = dom f \ f"{0} & for c being set st c in dom it holds it.c = (f.c)"; existence proof deffunc F(set) = (f.$1)"; ex h being Function st dom h = dom f \ f"{0} & for x st x in dom f \ f "{0} holds h.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let h, g be Function such that A1: dom h = dom f \ f"{0} and A2: for c being set st c in dom h holds h.c = (f.c)" and A3: dom g = dom f \ f"{0} and A4: for c being set st c in dom g holds g.c = (f.c)"; now let x; assume A5: x in dom h; hence h.x = (f.x)" by A2 .= g.x by A1,A3,A4,A5; end; hence thesis by A1,A3,FUNCT_1:2; end; end; registration let f be complex-valued Function; cluster f^ -> complex-valued; coherence proof let x be set; set F = f^; assume x in dom F; then F.x = (f.x)" by Def2; hence thesis; end; end; registration let f be real-valued Function; cluster f^ -> real-valued; coherence proof let x be set; set F = f^; assume x in dom F; then F.x = (f.x)" by Def2; hence thesis; end; end; definition let C be set, D be complex-membered set, f be PartFunc of C,D; redefine func f^ -> PartFunc of C,COMPLEX; coherence proof set F = f^; A1: rng F c= COMPLEX by VALUED_0:def 1; dom F = dom f \ f"{0} by Def2; hence thesis by A1,RELSET_1:4; end; end; definition let C be set, D be real-membered set, f be PartFunc of C,D; redefine func f^ -> PartFunc of C,REAL; coherence proof set F = f^; rng F c= REAL by VALUED_0:def 3; then F is PartFunc of dom F, REAL by RELSET_1:4; hence thesis by RELSET_1:5; end; end; theorem Th1: dom (g^) c= dom g & dom g /\ (dom g \ g"{0}) = dom g \ g"{0} proof dom (g^) = dom g \ g"{0} by Def2; hence dom (g^) c= dom g; thus thesis by XBOOLE_1:28; end; theorem Th2: dom (f1(#)f2) \ (f1(#)f2)"{0} = (dom f1 \ f1"{0}) /\ (dom f2 \ f2"{0}) proof thus dom (f1(#)f2) \ (f1(#)f2)"{0} c= (dom f1 \ (f1)"{0}) /\ (dom f2 \ (f2)" {0}) proof let x; assume A1: x in dom (f1(#)f2) \ (f1(#)f2)"{0}; then not x in (f1(#)f2)"{0} by XBOOLE_0:def 5; then not (f1(#)f2).x in {0} by A1,FUNCT_1:def 7; then (f1(#)f2).x <> 0 by TARSKI:def 1; then A2: f1.x * f2.x <> 0 by VALUED_1:5; then f2.x <> 0; then not f2.x in {0} by TARSKI:def 1; then A3: not x in (f2)"{0} by FUNCT_1:def 7; x in dom (f1(#)f2) by A1; then A4: x in dom f1 /\ dom f2 by VALUED_1:def 4; then x in dom f2 by XBOOLE_0:def 4; then A5: x in dom f2 \ (f2)"{0} by A3,XBOOLE_0:def 5; f1.x <> 0 by A2; then not f1.x in {0} by TARSKI:def 1; then A6: not x in (f1)"{0} by FUNCT_1:def 7; x in dom f1 by A4,XBOOLE_0:def 4; then x in dom f1 \ (f1)"{0} by A6,XBOOLE_0:def 5; hence thesis by A5,XBOOLE_0:def 4; end; thus (dom f1 \ (f1)"{0}) /\ (dom f2 \ (f2)"{0}) c= dom (f1(#)f2) \ (f1(#)f2) "{0} proof let x; assume A7: x in (dom f1 \ (f1)"{0}) /\ (dom f2 \ (f2)"{0}); then x in dom f2 \ (f2)"{0} by XBOOLE_0:def 4; then not x in (f2)"{0} by XBOOLE_0:def 5; then not f2.x in {0} by A7,FUNCT_1:def 7; then A8: f2.x <> 0 by TARSKI:def 1; A9: x in dom f1 \ (f1)"{0} by A7,XBOOLE_0:def 4; then not x in (f1)"{0} by XBOOLE_0:def 5; then not f1.x in {0} by A9,FUNCT_1:def 7; then f1.x <> 0 by TARSKI:def 1; then f1.x * f2.x <>0 by A8; then (f1(#)f2).x <> 0 by VALUED_1:5; then not (f1(#)f2).x in {0} by TARSKI:def 1; then A10: not x in (f1(#)f2)"{0} by FUNCT_1:def 7; x in dom f1 /\ dom f2 by A7,A9,XBOOLE_0:def 4; then x in dom (f1(#)f2) by VALUED_1:def 4; hence thesis by A10,XBOOLE_0:def 5; end; end; theorem Th3: c in dom (f^) implies f.c <> 0 proof assume that A1: c in dom (f^) and A2: f.c = 0; A3: c in dom f \ f"{0} by A1,Def2; then A4: not c in f"{0} by XBOOLE_0:def 5; now per cases by A4,FUNCT_1:def 7; suppose not c in dom f; hence contradiction by A3; end; suppose not f.c in {0}; hence contradiction by A2,TARSKI:def 1; end; end; hence contradiction; end; theorem Th4: (f^)"{0} = {} proof set x = the Element of (f^)"{0}; assume A1: (f^)"{0} <> {}; then A2: x in dom (f^) by FUNCT_1:def 7; then A3: x in dom f \ f"{0} by Def2; then not x in f"{0} by XBOOLE_0:def 5; then A4: not f.x in {0} by A3,FUNCT_1:def 7; ((f^) qua Function).x in {0} by A1,FUNCT_1:def 7; then (f^).x = 0 by TARSKI:def 1; then (f.x)" = 0 by A2,Def2; hence contradiction by A4,TARSKI:def 1,XCMPLX_1:202; end; theorem Th5: (abs(f))"{0} = f"{0} & (-f)"{0} = f"{0} proof now let c be set; thus c in (abs(f))"{0} implies c in f"{0} proof assume A1: c in (abs(f))"{0}; then (abs(f)).c in {0} by FUNCT_1:def 7; then (abs(f)).c = 0 by TARSKI:def 1; then abs(f.c) = 0 by VALUED_1:18; then f.c = 0 by COMPLEX1:45; then A2: f.c in {0} by TARSKI:def 1; c in dom (abs(f)) by A1,FUNCT_1:def 7; then c in dom f by VALUED_1:def 11; hence thesis by A2,FUNCT_1:def 7; end; assume A3: c in (f)"{0}; then f.c in {0} by FUNCT_1:def 7; then f.c = 0 by TARSKI:def 1; then abs(f.c) = 0 by ABSVALUE:2; then (abs(f)).c = 0 by VALUED_1:18; then A4: (abs(f)).c in {0} by TARSKI:def 1; c in dom f by A3,FUNCT_1:def 7; then c in dom (abs(f)) by VALUED_1:def 11; hence c in (abs(f))"{0} by A4,FUNCT_1:def 7; end; hence (abs(f))"{0} = f"{0} by TARSKI:1; now let c be set; thus c in (-f)"{0} implies c in f"{0} proof assume A5: c in (-f)"{0}; then (-f).c in {0} by FUNCT_1:def 7; then (-f).c = 0 by TARSKI:def 1; then --(f.c) = -0 by VALUED_1:8; then A6: f.c in {0} by TARSKI:def 1; c in dom (-f) by A5,FUNCT_1:def 7; then c in dom f by VALUED_1:8; hence thesis by A6,FUNCT_1:def 7; end; assume A7: c in (f)"{0}; then f.c in {0} by FUNCT_1:def 7; then f.c = 0 by TARSKI:def 1; then (-f).c = -0 by VALUED_1:8; then A8: (-f).c in {0} by TARSKI:def 1; c in dom f by A7,FUNCT_1:def 7; then c in dom (-f) by VALUED_1:8; hence c in (-f)"{0} by A8,FUNCT_1:def 7; end; hence thesis by TARSKI:1; end; theorem Th6: dom (f^^) = dom (f|(dom (f^))) proof A1: dom (f^) = dom f \ f"{0} by Def2; thus dom (f^^) = dom (f^) \(f^)"{0} by Def2 .= dom (f^) \ {} by Th4 .= dom f /\ dom (f^) by A1,XBOOLE_1:28 .= dom (f|(dom (f^))) by RELAT_1:61; end; theorem Th7: r<>0 implies (r(#)f)"{0} = f"{0} proof assume A1: r<>0; now let c be set; thus c in (r(#)f)"{0} implies c in f"{0} proof assume A2: c in (r(#)f)"{0}; then A3: c in dom (r(#)f) by FUNCT_1:def 7; (r(#)f).c in {0} by A2,FUNCT_1:def 7; then (r(#)f).c = 0 by TARSKI:def 1; then r*f.c = 0 by A3,VALUED_1:def 5; then f.c = 0 by A1; then A4: f.c in {0} by TARSKI:def 1; c in dom f by A3,VALUED_1:def 5; hence thesis by A4,FUNCT_1:def 7; end; assume A5: c in (f)"{0}; then f.c in {0} by FUNCT_1:def 7; then f.c = 0 by TARSKI:def 1; then A6: r*f.c = 0; A7: c in dom f by A5,FUNCT_1:def 7; then c in dom (r(#)f) by VALUED_1:def 5; then (r(#)f).c = 0 by A6,VALUED_1:def 5; then A8: (r(#)f).c in {0} by TARSKI:def 1; c in dom (r(#)f) by A7,VALUED_1:def 5; hence c in (r(#)f)"{0} by A8,FUNCT_1:def 7; end; hence thesis by TARSKI:1; end; theorem (f1 + f2) + f3 = f1 + (f2 + f3) proof A1: dom (f1 + f2 + f3) = dom (f1 + f2) /\ dom f3 by VALUED_1:def 1 .= dom f1 /\ dom f2 /\ dom f3 by VALUED_1:def 1 .= dom f1 /\ (dom f2 /\ dom f3) by XBOOLE_1:16 .= dom f1 /\ dom (f2 + f3) by VALUED_1:def 1 .= dom (f1 + (f2 + f3)) by VALUED_1:def 1; now let c be set; assume A2: c in dom (f1 + f2 + f3); then c in dom (f1 + f2) /\ dom f3 by VALUED_1:def 1; then A3: c in dom (f1 + f2) by XBOOLE_0:def 4; c in dom f1 /\ dom (f2 + f3) by A1,A2,VALUED_1:def 1; then A4: c in dom (f2 + f3) by XBOOLE_0:def 4; thus (f1 + f2 + f3).c = (f1 + f2).c + f3.c by A2,VALUED_1:def 1 .= f1.c + f2.c + f3.c by A3,VALUED_1:def 1 .= f1.c + (f2.c + f3.c) .= f1.c + (f2 + f3).c by A4,VALUED_1:def 1 .= (f1 + (f2 + f3)).c by A1,A2,VALUED_1:def 1; end; hence thesis by A1,FUNCT_1:2; end; theorem Th9: (f1 (#) f2) (#) f3 = f1 (#) (f2 (#) f3) proof A1: now let c be set; assume c in dom (f1(#)f2(#)f3); thus (f1 (#) f2 (#) f3).c = (f1 (#) f2).c * f3.c by VALUED_1:5 .= f1.c * f2.c * f3.c by VALUED_1:5 .= f1.c * (f2.c * f3.c) .= f1.c * (f2 (#) f3).c by VALUED_1:5 .= (f1 (#) (f2 (#) f3)).c by VALUED_1:5; end; dom (f1 (#) f2 (#) f3) = dom (f1 (#) f2) /\ dom f3 by VALUED_1:def 4 .= dom f1 /\ dom f2 /\ dom f3 by VALUED_1:def 4 .= dom f1 /\ (dom f2 /\ dom f3) by XBOOLE_1:16 .= dom f1 /\ dom (f2 (#) f3) by VALUED_1:def 4 .= dom (f1 (#) (f2 (#) f3)) by VALUED_1:def 4; hence thesis by A1,FUNCT_1:2; end; theorem Th10: (f1 + f2) (#) f3=f1 (#) f3 + f2 (#) f3 proof A1: dom ((f1 + f2) (#) f3) = dom (f1 + f2) /\ dom f3 by VALUED_1:def 4 .= dom f1 /\ dom f2 /\ (dom f3 /\ dom f3) by VALUED_1:def 1 .= dom f1 /\ dom f2 /\ dom f3 /\ dom f3 by XBOOLE_1:16 .= dom f1 /\ dom f3 /\ dom f2 /\ dom f3 by XBOOLE_1:16 .= dom f1 /\ dom f3 /\ (dom f2 /\ dom f3) by XBOOLE_1:16 .= dom (f1 (#) f3) /\ (dom f2 /\ dom f3) by VALUED_1:def 4 .= dom (f1 (#) f3) /\ dom (f2 (#) f3) by VALUED_1:def 4 .= dom (f1 (#) f3 + f2 (#) f3) by VALUED_1:def 1; now let c be set; assume A2: c in dom ((f1 + f2)(#)f3); then c in dom (f1 + f2) /\ dom f3 by VALUED_1:def 4; then A3: c in dom (f1 + f2) by XBOOLE_0:def 4; thus ((f1 + f2) (#) f3).c = (f1 + f2).c * f3.c by VALUED_1:5 .= (f1.c + f2.c) * f3.c by A3,VALUED_1:def 1 .= f1.c * f3.c + f2.c * f3.c .= (f1 (#) f3).c + f2.c* f3.c by VALUED_1:5 .= (f1 (#) f3).c + (f2 (#) f3).c by VALUED_1:5 .=((f1 (#) f3) + (f2 (#) f3)).c by A1,A2,VALUED_1:def 1; end; hence thesis by A1,FUNCT_1:2; end; theorem f3 (#) (f1 + f2)=f3(#)f1 + f3(#)f2 by Th10; theorem Th12: r(#)(f1(#)f2)=r(#)f1(#)f2 proof A1: dom (r(#)(f1 (#) f2)) = dom (f1 (#) f2) by VALUED_1:def 5 .= dom f1 /\ dom f2 by VALUED_1:def 4 .= dom (r(#)f1) /\ dom f2 by VALUED_1:def 5 .= dom (r(#)f1(#)f2) by VALUED_1:def 4; now let c be set; assume A2: c in dom (r(#)(f1(#)f2)); then c in dom (r(#)f1) /\ dom f2 by A1,VALUED_1:def 4; then A3: c in dom (r(#)f1) by XBOOLE_0:def 4; thus (r(#)(f1(#)f2)).c = r * (f1(#)f2).c by A2,VALUED_1:def 5 .= r*(f1.c * f2.c) by VALUED_1:5 .= (r*f1.c) * f2.c .= (r(#)f1).c * f2.c by A3,VALUED_1:def 5 .= (r(#)f1 (#) f2).c by VALUED_1:5; end; hence thesis by A1,FUNCT_1:2; end; theorem Th13: r(#)(f1(#)f2)=f1(#)(r(#)f2) proof A1: dom (r(#)(f1 (#) f2)) = dom (f1 (#) f2) by VALUED_1:def 5 .= dom f1 /\ dom f2 by VALUED_1:def 4 .= dom f1 /\ dom (r(#)f2) by VALUED_1:def 5 .= dom (f1(#)(r(#)f2)) by VALUED_1:def 4; now let c be set; assume A2: c in dom (r(#)(f1(#)f2)); then c in dom f1 /\ dom (r(#)f2) by A1,VALUED_1:def 4; then A3: c in dom (r(#)f2) by XBOOLE_0:def 4; thus (r(#)(f1(#)f2)).c = r * (f1(#)f2).c by A2,VALUED_1:def 5 .= r * (f1.c * f2.c) by VALUED_1:5 .= f1.c * (r * f2.c) .= f1.c * (r(#)f2).c by A3,VALUED_1:def 5 .= (f1(#)(r(#)f2)).c by VALUED_1:5; end; hence thesis by A1,FUNCT_1:2; end; theorem Th14: (f1 - f2)(#)f3=f1(#)f3 - f2(#)f3 proof A1: dom ((f1 - f2) (#) f3) = dom (f1 - f2) /\ dom f3 by VALUED_1:def 4 .= dom f1 /\ dom f2 /\ (dom f3 /\ dom f3) by VALUED_1:12 .= dom f1 /\ dom f2 /\ dom f3 /\ dom f3 by XBOOLE_1:16 .= dom f1 /\ dom f3 /\ dom f2 /\ dom f3 by XBOOLE_1:16 .= dom f1 /\ dom f3 /\ (dom f2 /\ dom f3) by XBOOLE_1:16 .= dom (f1 (#) f3) /\ (dom f2 /\ dom f3) by VALUED_1:def 4 .= dom (f1 (#) f3) /\ dom (f2 (#) f3) by VALUED_1:def 4 .= dom (f1 (#) f3 - f2 (#) f3) by VALUED_1:12; now let c be set; assume A2: c in dom ((f1 - f2)(#)f3); then c in dom (f1 - f2) /\ dom f3 by VALUED_1:def 4; then A3: c in dom (f1 - f2) by XBOOLE_0:def 4; thus ((f1 - f2) (#) f3).c = (f1 - f2).c * f3.c by VALUED_1:5 .= (f1.c - f2.c) * f3.c by A3,VALUED_1:13 .= f1.c * f3.c - f2.c * f3.c .= (f1 (#) f3).c - f2.c * f3.c by VALUED_1:5 .= (f1 (#) f3).c - (f2 (#) f3).c by VALUED_1:5 .=((f1 (#) f3) - (f2 (#) f3)).c by A1,A2,VALUED_1:13; end; hence thesis by A1,FUNCT_1:2; end; theorem f3(#)f1 - f3(#)f2 = f3(#)(f1 - f2) by Th14; theorem r(#)(f1 + f2) = r(#)f1 + r(#)f2 proof A1: dom (r(#)(f1 + f2)) = dom (f1 + f2) by VALUED_1:def 5 .= dom f1 /\ dom f2 by VALUED_1:def 1 .= dom f1 /\ dom (r(#)f2) by VALUED_1:def 5 .= dom (r(#)f1) /\ dom (r(#)f2) by VALUED_1:def 5 .= dom (r(#)f1 + r(#)f2) by VALUED_1:def 1; now let c be set; assume A2: c in dom (r(#)(f1 + f2)); then A3: c in dom (f1 + f2) by VALUED_1:def 5; A4: c in dom (r(#)f1) /\ dom (r(#)f2) by A1,A2,VALUED_1:def 1; then A5: c in dom (r(#)f1) by XBOOLE_0:def 4; A6: c in dom (r(#)f2) by A4,XBOOLE_0:def 4; thus (r(#)(f1 + f2)).c = r * (f1 + f2).c by A2,VALUED_1:def 5 .= r * (f1.c + f2.c) by A3,VALUED_1:def 1 .= r * f1.c + r * f2.c .= (r(#)f1).c + r * f2.c by A5,VALUED_1:def 5 .= (r(#)f1).c + (r(#)f2).c by A6,VALUED_1:def 5 .= (r(#)f1 + r(#)f2).c by A1,A2,VALUED_1:def 1; end; hence thesis by A1,FUNCT_1:2; end; theorem (r*p)(#)f = r(#)(p(#)f) proof A1: dom ((r*p) (#) f) = dom f by VALUED_1:def 5 .= dom (p(#)f) by VALUED_1:def 5 .= dom (r(#)(p(#)f)) by VALUED_1:def 5; now let c be set; assume A2: c in dom ((r*p)(#)f); then A3: c in dom (p(#)f) by A1,VALUED_1:def 5; thus ((r*p)(#)f).c = r*p * f.c by A2,VALUED_1:def 5 .= r*(p * f.c) .= r * (p(#)f).c by A3,VALUED_1:def 5 .= (r(#)(p(#)f)).c by A1,A2,VALUED_1:def 5; end; hence thesis by A1,FUNCT_1:2; end; theorem r(#)(f1 - f2) = r(#)f1 - r(#)f2 proof A1: dom (r(#)(f1 - f2)) = dom (f1 - f2) by VALUED_1:def 5 .= dom f1 /\ dom f2 by VALUED_1:12 .= dom f1 /\ dom (r(#)f2) by VALUED_1:def 5 .= dom (r(#)f1) /\ dom (r(#)f2) by VALUED_1:def 5 .= dom (r(#)f1 - r(#)f2) by VALUED_1:12; now let c be set; assume A2: c in dom (r(#)(f1 - f2)); then A3: c in dom (f1 - f2) by VALUED_1:def 5; A4: c in dom (r(#)f1) /\ dom (r(#)f2) by A1,A2,VALUED_1:12; then A5: c in dom (r(#)f1) by XBOOLE_0:def 4; A6: c in dom (r(#)f2) by A4,XBOOLE_0:def 4; thus (r(#)(f1 - f2)).c = r * (f1 - f2).c by A2,VALUED_1:def 5 .= r * (f1.c - f2.c) by A3,VALUED_1:13 .= r * f1.c - r * f2.c .= (r(#)f1).c - r * f2.c by A5,VALUED_1:def 5 .= (r(#)f1).c - (r(#)f2).c by A6,VALUED_1:def 5 .= (r(#)f1 - r(#)f2).c by A1,A2,VALUED_1:13; end; hence thesis by A1,FUNCT_1:2; end; theorem f1-f2 = (-1)(#)(f2-f1) proof A1: dom (f1 - f2) = dom f2 /\ dom f1 by VALUED_1:12 .= dom (f2 - f1) by VALUED_1:12 .= dom ((-1)(#)(f2 - f1)) by VALUED_1:def 5; now A2: dom (f1 - f2) = dom f2 /\ dom f1 by VALUED_1:12 .= dom (f2 - f1) by VALUED_1:12; let c be set such that A3: c in dom (f1-f2); thus (f1 - f2).c = f1.c - f2.c by A3,VALUED_1:13 .= (-1)*(f2.c - f1.c) .= (-1)*((f2 - f1).c) by A3,A2,VALUED_1:13 .= ((-1)(#)(f2 - f1)).c by A1,A3,VALUED_1:def 5; end; hence thesis by A1,FUNCT_1:2; end; theorem f1 - (f2 + f3) = f1 - f2 - f3 proof A1: dom (f1 - (f2 + f3)) = dom f1 /\ dom (f2 + f3) by VALUED_1:12 .= dom f1 /\ (dom f2 /\ dom f3) by VALUED_1:def 1 .= dom f1 /\ dom f2 /\ dom f3 by XBOOLE_1:16 .= dom (f1 - f2) /\ dom f3 by VALUED_1:12 .= dom (f1 - f2 - f3) by VALUED_1:12; now let c be set; assume A2: c in dom (f1 - (f2 + f3)); then c in dom f1 /\ dom (f2 + f3) by VALUED_1:12; then A3: c in dom (f2 + f3) by XBOOLE_0:def 4; c in dom (f1 - f2) /\ dom f3 by A1,A2,VALUED_1:12; then A4: c in dom (f1 - f2) by XBOOLE_0:def 4; thus (f1 - (f2 + f3)).c = f1.c - (f2 + f3).c by A2,VALUED_1:13 .= f1.c - (f2.c + f3.c) by A3,VALUED_1:def 1 .= f1.c - f2.c - f3.c .= (f1 - f2).c - f3.c by A4,VALUED_1:13 .= (f1 - f2 - f3).c by A1,A2,VALUED_1:13; end; hence thesis by A1,FUNCT_1:2; end; theorem 1(#)f = f proof A1: now let c be set; assume c in dom (1(#)f); hence (1(#)f).c = 1 * f.c by VALUED_1:def 5 .= f.c; end; dom (1(#)f) = dom f by VALUED_1:def 5; hence thesis by A1,FUNCT_1:2; end; theorem f1 - (f2 - f3) = f1 - f2 + f3 proof A1: dom (f1 - (f2 - f3)) = dom f1 /\ dom (f2 - f3) by VALUED_1:12 .= dom f1 /\ (dom f2 /\ dom f3) by VALUED_1:12 .= dom f1 /\ dom f2 /\ dom f3 by XBOOLE_1:16 .= dom (f1 - f2) /\ dom f3 by VALUED_1:12 .= dom (f1 - f2 + f3) by VALUED_1:def 1; now let c be set; assume A2: c in dom (f1 - (f2 - f3)); then c in dom f1 /\ dom (f2 - f3) by VALUED_1:12; then A3: c in dom (f2 - f3) by XBOOLE_0:def 4; c in dom (f1 - f2) /\ dom f3 by A1,A2,VALUED_1:def 1; then A4: c in dom (f1 - f2) by XBOOLE_0:def 4; thus (f1 - (f2 - f3)).c = f1.c - (f2 - f3).c by A2,VALUED_1:13 .= f1.c - (f2.c - f3.c) by A3,VALUED_1:13 .= f1.c - f2.c + f3.c .= (f1 - f2).c + f3.c by A4,VALUED_1:13 .= (f1 - f2 + f3).c by A1,A2,VALUED_1:def 1; end; hence thesis by A1,FUNCT_1:2; end; theorem f1 + (f2 - f3) = f1 + f2 - f3 proof A1: dom (f1 + (f2 - f3)) = dom f1 /\ dom (f2 - f3) by VALUED_1:def 1 .= dom f1 /\ (dom f2 /\ dom f3) by VALUED_1:12 .= dom f1 /\ dom f2 /\ dom f3 by XBOOLE_1:16 .= dom (f1 + f2) /\ dom f3 by VALUED_1:def 1 .= dom (f1 + f2 - f3) by VALUED_1:12; now let c be set; assume A2: c in dom (f1 + (f2 - f3)); then c in dom f1 /\ dom (f2 - f3) by VALUED_1:def 1; then A3: c in dom (f2 - f3) by XBOOLE_0:def 4; c in dom (f1 + f2) /\ dom f3 by A1,A2,VALUED_1:12; then A4: c in dom (f1 + f2) by XBOOLE_0:def 4; thus (f1 + (f2 - f3)).c = f1.c + (f2 - f3).c by A2,VALUED_1:def 1 .= f1.c + (f2.c - f3.c) by A3,VALUED_1:13 .= f1.c + f2.c - f3.c .= (f1 + f2).c - f3.c by A4,VALUED_1:def 1 .= (f1 + f2 - f3).c by A1,A2,VALUED_1:13; end; hence thesis by A1,FUNCT_1:2; end; theorem Th24: abs(f1(#)f2) = abs(f1)(#)abs(f2) proof A1: now let c be set; assume c in dom (abs(f1 (#) f2)); thus (abs(f1(#)f2)).c = abs((f1(#)f2).c) by VALUED_1:18 .= abs(f1.c * f2.c) by VALUED_1:5 .= abs(f1.c) * abs(f2.c) by COMPLEX1:65 .= ((abs(f1)).c) * abs(f2.c) by VALUED_1:18 .= ((abs(f1)).c) * (abs(f2)).c by VALUED_1:18 .= (abs(f1)(#)abs(f2)).c by VALUED_1:5; end; dom (abs(f1 (#) f2)) = dom (f1 (#) f2) by VALUED_1:def 11 .= dom f1 /\ dom f2 by VALUED_1:def 4 .= dom f1 /\ dom (abs(f2)) by VALUED_1:def 11 .= dom (abs(f1)) /\ dom (abs(f2)) by VALUED_1:def 11 .= dom (abs(f1)(#)abs(f2)) by VALUED_1:def 4; hence thesis by A1,FUNCT_1:2; end; theorem abs(r(#)f) = abs(r)(#)abs(f) proof A1: dom (abs(r(#)f)) = dom (r(#)f) by VALUED_1:def 11 .= dom f by VALUED_1:def 5 .= dom (abs(f)) by VALUED_1:def 11 .= dom (abs(r)(#)abs(f)) by VALUED_1:def 5; now let c be set; assume A2: c in dom (abs(r(#)f)); then A3: c in dom (r(#)f) by VALUED_1:def 11; thus (abs(r(#)f)).c = abs((r(#)f).c) by VALUED_1:18 .=abs(r*(f.c)) by A3,VALUED_1:def 5 .=abs(r)*abs(f.c) by COMPLEX1:65 .=abs(r)*(abs(f)).c by VALUED_1:18 .=(abs(r)(#)abs(f)).c by A1,A2,VALUED_1:def 5; end; hence thesis by A1,FUNCT_1:2; end; theorem Th26: f^^ = f|(dom (f^)) proof A1: dom (f^^) = dom (f|(dom (f^))) by Th6; now let c be set; assume A2: c in dom (f^^); then c in dom f /\ dom (f^) by A1,RELAT_1:61; then A3: c in dom (f^) by XBOOLE_0:def 4; thus (f^^).c = ((f^).c)" by A2,Def2 .= ((f.c)")" by A3,Def2 .= (f|(dom (f^))).c by A1,A2,FUNCT_1:47; end; hence thesis by A1,FUNCT_1:2; end; theorem Th27: (f1(#)f2)^ = (f1^)(#)(f2^) proof A1: dom ((f1(#)f2)^) = dom (f1(#)f2) \ (f1(#)f2)"{0} by Def2 .= (dom f1 \ f1"{0}) /\ (dom f2 \ (f2)"{0}) by Th2 .= dom (f1^) /\ (dom f2 \ (f2)"{0}) by Def2 .= dom (f1^) /\ dom (f2^) by Def2 .= dom ((f1^) (#) (f2^)) by VALUED_1:def 4; now let c be set; assume A2: c in dom ((f1(#)f2)^); then A3: c in dom (f1^) /\ dom (f2^) by A1,VALUED_1:def 4; then A4: c in dom (f1^) by XBOOLE_0:def 4; A5: c in dom (f2^) by A3,XBOOLE_0:def 4; thus ((f1(#)f2)^).c = ((f1(#)f2).c)" by A2,Def2 .= (f1.c * f2.c)" by VALUED_1:5 .= (f1.c)"* (f2.c)" by XCMPLX_1:204 .= ((f1^).c)*(f2.c)" by A4,Def2 .= ((f1^).c) *((f2^).c) by A5,Def2 .= ((f1^) (#) (f2^)).c by VALUED_1:5; end; hence thesis by A1,FUNCT_1:2; end; theorem Th28: r<>0 implies (r(#)f)^ = r" (#) (f^) proof assume A1: r<>0; A2: dom ((r(#)f)^) = dom (r(#)f) \ (r(#)f)"{0} by Def2 .= dom (r(#)f) \ f"{0} by A1,Th7 .= dom f \ f"{0} by VALUED_1:def 5 .= dom (f^) by Def2 .= dom (r"(#)(f^)) by VALUED_1:def 5; now let c be set; assume A3: c in dom ((r(#)f)^); then A4: c in dom (r(#)f) \ (r(#)f)"{0} by Def2; A5: c in dom (f^) by A2,A3,VALUED_1:def 5; thus ((r(#)f)^).c = ((r(#)f).c)" by A3,Def2 .= (r*(f.c))" by A4,VALUED_1:def 5 .= r"* (f.c)" by XCMPLX_1:204 .= r"* ((f^).c) by A5,Def2 .= (r" (#) (f^)).c by A2,A3,VALUED_1:def 5; end; hence thesis by A2,FUNCT_1:2; end; theorem (-f)^ = (-1)(#)(f^) by Lm1,Th28; theorem Th30: (abs(f))^ = abs(f^) proof A1: dom ((abs(f))^) = dom (abs(f)) \ (abs(f))"{0} by Def2 .= dom f \ (abs(f))"{0} by VALUED_1:def 11 .= dom f \ f"{0} by Th5 .= dom (f^) by Def2 .= dom (abs((f^))) by VALUED_1:def 11; now let c be set; assume A2: c in dom ((abs(f))^); then A3: c in dom (f^) by A1,VALUED_1:def 11; thus ((abs(f))^).c = ((abs(f)).c)" by A2,Def2 .= (abs(f.c))" by VALUED_1:18 .= 1/abs(f.c) by XCMPLX_1:215 .= abs(1/f.c) by COMPLEX1:80 .= abs((f.c)") by XCMPLX_1:215 .= abs(f^.c) by A3,Def2 .= (abs(f^)).c by VALUED_1:18; end; hence thesis by A1,FUNCT_1:2; end; theorem Th31: f/g = f(#) (g^) proof A1: now let c be set; assume A2: c in dom (f/g); then c in dom f /\ (dom g \ g"{0}) by Def1; then c in dom f /\ dom (g^) by Def2; then A3: c in dom (g^) by XBOOLE_0:def 4; thus (f/g).c = f.c * (g.c)" by A2,Def1 .= f.c * (g^).c by A3,Def2 .= (f (#) (g^)).c by VALUED_1:5; end; dom (f/g) = dom f /\ (dom g \ g"{0}) by Def1 .= dom f /\ dom (g^) by Def2 .= dom (f(#)(g^)) by VALUED_1:def 4; hence thesis by A1,FUNCT_1:2; end; theorem Th32: r(#)(g/f) = (r(#)g)/f proof thus r(#)(g/f) = r(#)(g(#)(f^)) by Th31 .= (r(#)g)(#)(f^) by Th12 .= (r(#)g)/f by Th31; end; theorem (f/g)(#)g = (f|dom(g^)) proof A1: dom ((f/g)(#)g) = dom (f/g) /\ dom g by VALUED_1:def 4 .= dom f /\ (dom g \ g"{0}) /\ dom g by Def1 .= dom f /\ ((dom g \ g"{0}) /\ dom g) by XBOOLE_1:16 .= dom f /\ (dom (g^) /\ dom g) by Def2 .= dom f /\ dom (g^) by Th1,XBOOLE_1:28 .= dom (f|(dom (g^))) by RELAT_1:61; now let c be set; assume A2: c in dom ((f/g)(#)g); then c in dom f /\ dom (g^) by A1,RELAT_1:61; then A3: c in dom (g^) by XBOOLE_0:def 4; then A4: g.c <> 0 by Th3; thus ((f/g)(#)g).c = ((f/g).c) * g.c by VALUED_1:5 .= (f(#)(g^)).c * g.c by Th31 .= (f.c) *((g^).c) * g.c by VALUED_1:5 .= (f.c)*(g.c)"*g.c by A3,Def2 .= (f.c)*((g.c)" * (g.c)) .= (f.c)*1 by A4,XCMPLX_0:def 7 .= (f|(dom (g^))).c by A1,A2,FUNCT_1:47; end; hence thesis by A1,FUNCT_1:2; end; theorem Th34: (f/g)(#)(f1/g1) = (f(#)f1)/(g(#)g1) proof A1: now let c be set; assume c in dom ((f/g)(#)(f1/g1)); thus ((f/g)(#)(f1/g1)).c = ((f/g).c)* (f1/g1).c by VALUED_1:5 .= ((f(#)(g^)).c) * (f1/g1).c by Th31 .= ((f(#)(g^)).c) * (f1(#)(g1^)).c by Th31 .= (f.c) * ((g^).c) * (f1(#)(g1^)).c by VALUED_1:5 .= (f.c) * ((g^).c) * ((f1.c)* (g1^).c) by VALUED_1:5 .= (f.c) * ((f1.c) * (((g^).c) * (g1^).c)) .= (f.c) * ((f1.c) * ((g^)(#)(g1^)).c) by VALUED_1:5 .= (f.c) * (f1.c) * ((g^)(#)(g1^)).c .= (f.c) * (f1.c) * ((g(#)g1)^).c by Th27 .= ((f(#)f1).c) * ((g(#)g1)^).c by VALUED_1:5 .= ((f(#)f1)(#)((g(#)g1)^)).c by VALUED_1:5 .= ((f(#)f1)/(g(#)g1)).c by Th31; end; dom ((f/g)(#)(f1/g1)) = dom (f/g) /\ dom (f1/g1) by VALUED_1:def 4 .= dom f /\ (dom g \ g"{0}) /\ dom (f1/g1) by Def1 .= dom f /\ (dom g \ g"{0}) /\ (dom f1 /\ (dom g1 \ g1"{0})) by Def1 .= dom f /\ ((dom g \ g"{0}) /\ (dom f1 /\ (dom g1 \ g1"{0}))) by XBOOLE_1:16 .= dom f /\ (dom f1 /\ ((dom g \ g"{0}) /\ (dom g1 \ g1"{0}))) by XBOOLE_1:16 .= dom f /\ dom f1 /\ ((dom g \ g"{0}) /\ (dom g1 \ g1"{0})) by XBOOLE_1:16 .= dom (f(#)f1) /\ ((dom g \ g"{0}) /\ (dom g1 \ g1"{0})) by VALUED_1:def 4 .= dom (f(#)f1) /\ (dom (g(#)g1) \ (g(#)g1)"{0}) by Th2 .= dom ((f(#)f1)/(g(#)g1)) by Def1; hence thesis by A1,FUNCT_1:2; end; theorem Th35: (f1/f2)^ = (f2|dom(f2^))/f1 proof thus (f1/f2)^ = (f1(#)(f2^))^ by Th31 .= (f1^)(#)(f2^^) by Th27 .= (f2|dom(f2^))(#)(f1^) by Th26 .= (f2|dom(f2^))/f1 by Th31; end; theorem Th36: g (#) (f1/f2) = (g (#) f1)/f2 proof thus g (#) (f1/f2) = g (#) (f1 (#) (f2^)) by Th31 .= g (#) f1 (#) (f2^) by Th9 .= (g (#) f1)/f2 by Th31; end; theorem g/(f1/f2) = (g(#)(f2|dom(f2^)))/f1 proof thus g/(f1/f2) = g (#) ((f1/f2)^) by Th31 .= g (#) ((f2|dom(f2^))/f1) by Th35 .= (g (#) (f2|dom(f2^)))/f1 by Th36; end; theorem -f/g = (-f)/g & f/(-g) = -f/g proof thus -f/g = (-f)/g by Th32; thus f/(-g) = f (#) ((-g)^) by Th31 .= f (#) ((-1) (#) (g^)) by Lm1,Th28 .= -(f (#) (g^)) by Th13 .= -(f/g) by Th31; end; theorem f1/f + f2/f = (f1 + f2)/f & f1/f - f2/f = (f1 - f2)/f proof thus f1/f + f2/f = f1(#)(f^) +f2/f by Th31 .= f1(#)(f^) + f2(#)(f^) by Th31 .= (f1+f2) (#) (f^) by Th10 .= (f1+f2)/f by Th31; thus f1/f - f2/f = f1(#)(f^) - f2/f by Th31 .= f1(#)(f^) -f2(#)(f^) by Th31 .= (f1-f2)(#)(f^) by Th14 .= (f1-f2)/f by Th31; end; theorem Th40: f1/f + g1/g = (f1(#)g + g1(#)f)/(f(#)g) proof A1: now let c be set; A2: dom (g^) c= dom g by Th1; assume A3: c in dom ((f1/f) + (g1/g)); then A4: c in dom (f1/f) /\ dom (g1/g) by VALUED_1:def 1; then A5: c in dom (f1/f) by XBOOLE_0:def 4; A6: c in dom (g1/g) by A4,XBOOLE_0:def 4; A7: dom (f^) c= dom f by Th1; A8: c in dom (f1 (#)(f^)) /\ dom (g1/g) by A4,Th31; then c in dom (f1 (#)(f^)) by XBOOLE_0:def 4; then A9: c in dom f1 /\ dom(f^) by VALUED_1:def 4; then A10: c in dom(f^) by XBOOLE_0:def 4; then A11: f.c <> 0 by Th3; c in dom (f1 (#)(f^)) /\ dom (g1(#)(g^)) by A8,Th31; then c in dom (g1(#)(g^)) by XBOOLE_0:def 4; then A12: c in dom g1 /\ dom(g^) by VALUED_1:def 4; then A13: c in dom(g^) by XBOOLE_0:def 4; then A14: g.c <> 0 by Th3; c in dom g1 by A12,XBOOLE_0:def 4; then c in dom g1 /\ dom f by A10,A7,XBOOLE_0:def 4; then A15: c in dom (g1(#)f) by VALUED_1:def 4; c in dom f1 by A9,XBOOLE_0:def 4; then c in dom f1 /\ dom g by A13,A2,XBOOLE_0:def 4; then c in dom (f1(#)g) by VALUED_1:def 4; then c in dom (f1(#)g) /\ dom (g1(#)f) by A15,XBOOLE_0:def 4; then A16: c in dom (f1(#)g + g1(#)f) by VALUED_1:def 1; c in dom (f^) /\ dom (g^) by A10,A13,XBOOLE_0:def 4; then c in dom ((f^)(#)(g^)) by VALUED_1:def 4; then c in dom ((f(#)g)^) by Th27; then c in dom (f1(#)g + g1(#)f) /\ dom ((f(#)g)^) by A16,XBOOLE_0:def 4; then c in dom ((f1(#)g + g1(#)f)(#)((f(#)g)^)) by VALUED_1:def 4; then A17: c in dom ((f1(#)g + g1(#)f)/(f(#)g)) by Th31; thus (f1/f + g1/g).c = (f1/f).c + (g1/g).c by A3,VALUED_1:def 1 .= (f1.c) * (f.c)" + (g1/g).c by A5,Def1 .= (f1.c) *(1*(f.c)") + (g1.c) * 1 * (g.c)" by A6,Def1 .= (f1.c) *((g.c) *(g.c)"* (f.c)") + (g1.c) * (1 * (g.c)") by A14, XCMPLX_0:def 7 .= (f1.c) *(g.c *((g.c)"* (f.c)")) + (g1.c) * ((f.c) *(f.c)" * (g.c)") by A11,XCMPLX_0:def 7 .= (f1.c) *((g.c) *((g.c * f.c)")) + (g1.c) * ((f.c) *((f.c)" * (g.c)" )) by XCMPLX_1:204 .= (f1.c) *((g.c) *((f.c* g.c)")) + (g1.c) * ((f.c) *((f.c * g.c)")) by XCMPLX_1:204 .= (f1.c) *((g.c) * ((f(#)g).c)") + (g1.c) * ((f.c) *((f.c * g.c)")) by VALUED_1:5 .= (f1.c) *(g.c) * ((f(#)g).c)" + (g1.c) * ((f.c) * ((f(#) g).c)") by VALUED_1:5 .= (f1(#)g).c * ((f(#)g).c)" + (g1.c) *f.c *((f(#)g).c)" by VALUED_1:5 .= (f1(#)g).c * ((f(#)g).c)" + (g1(#)f).c *((f(#)g).c)" by VALUED_1:5 .= ((f1(#)g).c + (g1(#)f).c) *((f(#)g).c)" .= (f1(#)g + g1(#)f).c *((f(#)g).c)" by A16,VALUED_1:def 1 .= ((f1(#)g + g1(#)f)/(f(#)g)).c by A17,Def1; end; dom ((f1/f) + (g1/g)) = dom (f1/f) /\ dom (g1/g) by VALUED_1:def 1 .= dom f1 /\ (dom f \ f"{0}) /\ dom (g1/g) by Def1 .= dom f1 /\ (dom f \ f"{0}) /\ (dom g1 /\ (dom g \ g"{0})) by Def1 .= dom f1 /\ (dom f /\ (dom f \ f"{0})) /\ (dom g1 /\ (dom g \ g"{0})) by Th1 .= dom f /\ (dom f \ f"{0}) /\ dom f1 /\ (dom g /\ (dom g \ g"{0}) /\ dom g1) by Th1 .= dom f /\ (dom f \ f"{0}) /\ (dom f1 /\ (dom g /\ (dom g \ g"{0}) /\ dom g1)) by XBOOLE_1:16 .= dom f /\ (dom f \ f"{0}) /\ (dom f1 /\ (dom g /\ (dom g \ g"{0})) /\ dom g1) by XBOOLE_1:16 .= dom f /\ (dom f \ f"{0}) /\ (dom f1 /\ dom g /\ (dom g \ g"{0}) /\ dom g1) by XBOOLE_1:16 .= dom f /\ (dom f \ f"{0}) /\ (dom (f1(#)g) /\ (dom g \ g"{0}) /\ dom g1) by VALUED_1:def 4 .= dom f /\ (dom f \ f"{0}) /\ (dom (f1(#)g) /\ (dom g1 /\ (dom g \ g"{0 }))) by XBOOLE_1:16 .= dom (f1(#)g) /\ ((dom f \ f"{0}) /\ dom f /\ (dom g1 /\ (dom g \ g"{0 }))) by XBOOLE_1:16 .= dom (f1(#)g) /\ ((dom f \ f"{0}) /\ (dom f /\ (dom g1 /\ (dom g \ g"{ 0})))) by XBOOLE_1:16 .= dom (f1(#)g) /\ ((dom f \ f"{0}) /\ (dom g1 /\ dom f /\ (dom g \ g"{0 }))) by XBOOLE_1:16 .= dom (f1(#)g) /\ ((dom f \ f"{0}) /\ (dom (g1(#)f) /\ (dom g \ g"{0})) ) by VALUED_1:def 4 .= dom (f1(#)g) /\ (dom (g1(#)f) /\ ((dom f \ f"{0}) /\ (dom g \ g"{0})) ) by XBOOLE_1:16 .= dom (f1(#)g) /\ dom (g1(#) f) /\ ((dom f \ f"{0}) /\ (dom g \ g"{0})) by XBOOLE_1:16 .= dom (f1(#)g + g1(#)f) /\ ((dom f \ f"{0}) /\ (dom g \ g"{0})) by VALUED_1:def 1 .= dom (f1(#)g + g1(#)f) /\ (dom (f(#)g) \ (f(#)g)"{0}) by Th2 .= dom ((f1(#)g + g1(#)f)/(f(#)g)) by Def1; hence thesis by A1,FUNCT_1:2; end; theorem (f/g)/(f1/g1) = (f(#)(g1|dom(g1^)))/(g(#)f1) proof thus (f/g)/(f1/g1) = (f/g)(#)((f1/g1)^) by Th31 .= (f/g)(#)(((g1|dom(g1^)))/f1) by Th35 .= (f(#)(g1|dom(g1^)))/(g(#)f1) by Th34; end; theorem f1/f - g1/g = (f1(#)g - g1(#)f)/(f(#)g) proof thus f1/f - g1/g = f1/f + ((-1)(#) g1)/g by Th32 .= (f1(#)g + (-1)(#) g1(#)f)/(f(#)g) by Th40 .= (f1(#)g - (g1(#)f))/(f(#)g) by Th12; end; theorem abs(f1/f2) = abs(f1)/abs(f2) proof thus abs(f1/f2) = abs(f1(#)(f2^)) by Th31 .= abs(f1)(#)abs((f2^)) by Th24 .= abs(f1)(#)((abs(f2))^) by Th30 .= abs(f1)/abs(f2) by Th31; end; theorem Th44: (f1+f2)|X = f1|X + f2|X & (f1+f2)|X = f1|X + f2 & (f1+f2)|X = f1 + f2|X proof A1: now let c be set; assume A2: c in dom ((f1+f2)|X); then A3: c in dom (f1+f2) /\ X by RELAT_1:61; then A4: c in X by XBOOLE_0:def 4; A5: c in dom (f1+f2) by A3,XBOOLE_0:def 4; then A6: c in dom f1 /\ dom f2 by VALUED_1:def 1; then c in dom f2 by XBOOLE_0:def 4; then c in dom f2 /\ X by A4,XBOOLE_0:def 4; then A7: c in dom (f2|X) by RELAT_1:61; c in dom f1 by A6,XBOOLE_0:def 4; then c in dom f1 /\ X by A4,XBOOLE_0:def 4; then A8: c in dom (f1|X) by RELAT_1:61; then c in dom (f1|X) /\ dom (f2|X) by A7,XBOOLE_0:def 4; then A9: c in dom ((f1|X) + (f2|X)) by VALUED_1:def 1; thus ((f1+f2)|X).c = (f1+f2).c by A2,FUNCT_1:47 .= (f1.c) + (f2.c) by A5,VALUED_1:def 1 .= ((f1|X).c) + (f2.c) by A8,FUNCT_1:47 .= ((f1|X).c) + ((f2|X).c) by A7,FUNCT_1:47 .= ((f1|X)+(f2|X)).c by A9,VALUED_1:def 1; end; dom ((f1+f2)|X) = dom (f1+f2) /\ X by RELAT_1:61 .= dom f1 /\ dom f2 /\ (X /\ X) by VALUED_1:def 1 .= dom f1 /\ (dom f2 /\ (X /\ X)) by XBOOLE_1:16 .= dom f1 /\ (dom f2 /\ X /\ X) by XBOOLE_1:16 .= dom f1 /\ (X /\ dom (f2|X)) by RELAT_1:61 .= dom f1 /\ X /\ dom (f2|X) by XBOOLE_1:16 .= dom (f1|X) /\ dom (f2|X) by RELAT_1:61 .= dom ((f1|X)+(f2|X)) by VALUED_1:def 1; hence (f1+f2)|X = f1|X + f2|X by A1,FUNCT_1:2; A10: now let c be set; assume A11: c in dom ((f1+f2)|X); then A12: c in dom (f1+f2) /\ X by RELAT_1:61; then A13: c in X by XBOOLE_0:def 4; A14: c in dom (f1+f2) by A12,XBOOLE_0:def 4; then A15: c in dom f1 /\ dom f2 by VALUED_1:def 1; then c in dom f1 by XBOOLE_0:def 4; then c in dom f1 /\ X by A13,XBOOLE_0:def 4; then A16: c in dom (f1|X) by RELAT_1:61; c in dom f2 by A15,XBOOLE_0:def 4; then c in dom (f1|X) /\ dom f2 by A16,XBOOLE_0:def 4; then A17: c in dom ((f1|X) + f2) by VALUED_1:def 1; thus ((f1+f2)|X).c = (f1+f2).c by A11,FUNCT_1:47 .= (f1.c) +(f2.c) by A14,VALUED_1:def 1 .= ((f1|X).c) +(f2.c) by A16,FUNCT_1:47 .= ((f1|X)+f2).c by A17,VALUED_1:def 1; end; dom ((f1+f2)|X) = dom (f1+f2) /\ X by RELAT_1:61 .= dom f1 /\ dom f2 /\ X by VALUED_1:def 1 .= dom f1 /\ X /\ dom f2 by XBOOLE_1:16 .= dom (f1|X) /\ dom f2 by RELAT_1:61 .= dom ((f1|X)+ f2) by VALUED_1:def 1; hence (f1+f2)|X = f1|X + f2 by A10,FUNCT_1:2; A18: now let c be set; assume A19: c in dom ((f1+f2)|X); then A20: c in dom (f1+f2) /\ X by RELAT_1:61; then A21: c in X by XBOOLE_0:def 4; A22: c in dom (f1+f2) by A20,XBOOLE_0:def 4; then A23: c in dom f1 /\ dom f2 by VALUED_1:def 1; then c in dom f2 by XBOOLE_0:def 4; then c in dom f2 /\ X by A21,XBOOLE_0:def 4; then A24: c in dom (f2|X) by RELAT_1:61; c in dom f1 by A23,XBOOLE_0:def 4; then c in dom f1 /\ dom (f2|X) by A24,XBOOLE_0:def 4; then A25: c in dom (f1 + (f2|X)) by VALUED_1:def 1; thus ((f1+f2)|X).c = (f1+f2).c by A19,FUNCT_1:47 .= (f1.c) +(f2.c) by A22,VALUED_1:def 1 .= (f1.c) +((f2|X).c) by A24,FUNCT_1:47 .= (f1+(f2|X)).c by A25,VALUED_1:def 1; end; dom ((f1+f2)|X) = dom (f1+f2) /\ X by RELAT_1:61 .= dom f1 /\ dom f2 /\ X by VALUED_1:def 1 .= dom f1 /\ (dom f2 /\ X) by XBOOLE_1:16 .= dom f1 /\ dom (f2|X) by RELAT_1:61 .= dom (f1 + (f2|X)) by VALUED_1:def 1; hence thesis by A18,FUNCT_1:2; end; theorem Th45: (f1(#)f2)|X = f1|X (#) f2|X & (f1(#)f2)|X = f1|X (#) f2 & (f1(#) f2)|X = f1 (#) f2|X proof A1: now let c be set; assume A2: c in dom ((f1(#)f2)|X); then A3: c in dom (f1(#)f2) /\ X by RELAT_1:61; then A4: c in X by XBOOLE_0:def 4; c in dom (f1(#)f2) by A3,XBOOLE_0:def 4; then A5: c in dom f1 /\ dom f2 by VALUED_1:def 4; then c in dom f1 by XBOOLE_0:def 4; then c in dom f1 /\ X by A4,XBOOLE_0:def 4; then A6: c in dom (f1|X) by RELAT_1:61; c in dom f2 by A5,XBOOLE_0:def 4; then c in dom f2 /\ X by A4,XBOOLE_0:def 4; then A7: c in dom (f2|X) by RELAT_1:61; thus ((f1(#)f2)|X).c = (f1(#)f2).c by A2,FUNCT_1:47 .= (f1.c) *(f2.c) by VALUED_1:5 .= ((f1|X).c) *(f2.c) by A6,FUNCT_1:47 .= ((f1|X).c) *((f2|X).c) by A7,FUNCT_1:47 .= ((f1|X)(#)(f2|X)).c by VALUED_1:5; end; dom ((f1(#)f2)|X) = dom (f1(#)f2) /\ X by RELAT_1:61 .= dom f1 /\ dom f2 /\ (X /\ X) by VALUED_1:def 4 .= dom f1 /\ (dom f2 /\ (X /\ X)) by XBOOLE_1:16 .= dom f1 /\ (dom f2 /\ X /\ X) by XBOOLE_1:16 .= dom f1 /\ (X /\ dom (f2|X)) by RELAT_1:61 .= dom f1 /\ X /\ dom (f2|X) by XBOOLE_1:16 .= dom (f1|X) /\ dom (f2|X) by RELAT_1:61 .= dom ((f1|X)(#)(f2|X)) by VALUED_1:def 4; hence (f1(#)f2)|X = f1|X (#) f2|X by A1,FUNCT_1:2; A8: now let c be set; assume A9: c in dom ((f1(#)f2)|X); then A10: c in dom (f1(#)f2) /\ X by RELAT_1:61; then c in dom (f1(#)f2) by XBOOLE_0:def 4; then c in dom f1 /\ dom f2 by VALUED_1:def 4; then A11: c in dom f1 by XBOOLE_0:def 4; c in X by A10,XBOOLE_0:def 4; then c in dom f1 /\ X by A11,XBOOLE_0:def 4; then A12: c in dom (f1|X) by RELAT_1:61; thus ((f1(#)f2)|X).c = (f1(#)f2).c by A9,FUNCT_1:47 .= (f1.c) *(f2.c) by VALUED_1:5 .= ((f1|X).c) *(f2.c) by A12,FUNCT_1:47 .= ((f1|X)(#)f2).c by VALUED_1:5; end; dom ((f1(#)f2)|X) = dom (f1(#)f2) /\ X by RELAT_1:61 .= dom f1 /\ dom f2 /\ X by VALUED_1:def 4 .= dom f1 /\ X /\ dom f2 by XBOOLE_1:16 .= dom (f1|X) /\ dom f2 by RELAT_1:61 .= dom ((f1|X)(#) f2) by VALUED_1:def 4; hence (f1(#)f2)|X = f1|X (#) f2 by A8,FUNCT_1:2; A13: now let c be set; assume A14: c in dom ((f1(#)f2)|X); then A15: c in dom (f1(#)f2) /\ X by RELAT_1:61; then c in dom (f1(#)f2) by XBOOLE_0:def 4; then c in dom f1 /\ dom f2 by VALUED_1:def 4; then A16: c in dom f2 by XBOOLE_0:def 4; c in X by A15,XBOOLE_0:def 4; then c in dom f2 /\ X by A16,XBOOLE_0:def 4; then A17: c in dom (f2|X) by RELAT_1:61; thus ((f1(#)f2)|X).c = (f1(#)f2).c by A14,FUNCT_1:47 .= (f1.c) *(f2.c) by VALUED_1:5 .= (f1.c) *((f2|X).c) by A17,FUNCT_1:47 .= (f1(#)(f2|X)).c by VALUED_1:5; end; dom ((f1(#)f2)|X) = dom (f1(#)f2) /\ X by RELAT_1:61 .= dom f1 /\ dom f2 /\ X by VALUED_1:def 4 .= dom f1 /\ (dom f2 /\ X) by XBOOLE_1:16 .= dom f1 /\ dom (f2|X) by RELAT_1:61 .= dom (f1 (#) (f2|X)) by VALUED_1:def 4; hence thesis by A13,FUNCT_1:2; end; theorem Th46: (-f)|X = -(f|X) & (f^)|X = (f|X)^ & (abs(f))|X = abs((f|X)) proof A1: now let c be set; assume A2: c in dom ((-f)|X); then A3: c in dom (-f) /\ X by RELAT_1:61; then c in dom (-f) by XBOOLE_0:def 4; then A4: c in dom f by VALUED_1:8; c in X by A3,XBOOLE_0:def 4; then c in dom f /\ X by A4,XBOOLE_0:def 4; then A5: c in dom (f|X) by RELAT_1:61; thus ((-f)|X).c = (-f).c by A2,FUNCT_1:47 .= -(f.c) by VALUED_1:8 .= -((f|X).c) by A5,FUNCT_1:47 .= (-(f|X)).c by VALUED_1:8; end; dom ((-f)|X) = dom (-f) /\ X by RELAT_1:61 .= dom f /\ X by VALUED_1:8 .= dom (f|X) by RELAT_1:61 .= dom (-(f|X)) by VALUED_1:8; hence (-f)|X = -(f|X) by A1,FUNCT_1:2; A6: dom ((f^)|X) = dom (f^) /\ X by RELAT_1:61 .= (dom f \ f"{0}) /\ X by Def2 .= dom f /\ X \ f"{0} /\ X by XBOOLE_1:50 .= dom (f|X) \ X /\ f"{0} by RELAT_1:61 .= dom (f|X) \ (f|X)"{0} by FUNCT_1:70 .= dom ((f|X)^) by Def2; A7: dom ((f|X)^) c= dom (f|X) by Th1; now let c be set; assume A8: c in dom ((f^)|X); then c in dom (f^) /\ X by RELAT_1:61; then A9: c in dom (f^) by XBOOLE_0:def 4; thus ((f^)|X).c = (f^).c by A8,FUNCT_1:47 .= (f.c)" by A9,Def2 .= ((f|X).c)" by A7,A6,A8,FUNCT_1:47 .= ((f|X)^).c by A6,A8,Def2; end; hence (f^)|X = (f|X)^ by A6,FUNCT_1:2; A10: dom ((abs(f))|X) = dom (abs(f)) /\ X by RELAT_1:61 .= dom f /\ X by VALUED_1:def 11 .= dom (f|X) by RELAT_1:61 .= dom (abs((f|X))) by VALUED_1:def 11; now let c be set; assume A11: c in dom ((abs(f))|X); then A12: c in dom (f|X) by A10,VALUED_1:def 11; thus ((abs(f))|X).c = (abs(f)).c by A11,FUNCT_1:47 .= abs(f.c) by VALUED_1:18 .= abs((f|X).c) by A12,FUNCT_1:47 .= (abs((f|X))).c by VALUED_1:18; end; hence thesis by A10,FUNCT_1:2; end; theorem (f1-f2)|X = f1|X - f2|X & (f1-f2)|X = f1|X - f2 & (f1-f2)|X = f1 - f2| X proof thus (f1-f2)|X = (f1|X)+ (-f2)|X by Th44 .= (f1|X) - (f2|X) by Th46; thus (f1-f2)|X = (f1|X) - f2 by Th44; thus (f1-f2)|X = f1+ (-f2)|X by Th44 .= f1 - (f2|X) by Th46; end; theorem (f1/f2)|X = f1|X / f2|X & (f1/f2)|X = f1|X / f2 &(f1/f2)|X = f1 / f2|X proof thus (f1/f2)|X = (f1(#)(f2^))|X by Th31 .= (f1|X) (#) (f2^|X) by Th45 .= (f1|X) (#) ((f2|X)^) by Th46 .= (f1|X)/(f2|X) by Th31; thus (f1/f2)|X = (f1(#)(f2^))|X by Th31 .= (f1|X) (#) (f2^) by Th45 .= (f1|X)/f2 by Th31; thus (f1/f2)|X = (f1(#)(f2^))|X by Th31 .= f1 (#) (f2^)|X by Th45 .= f1 (#) ((f2|X)^) by Th46 .= f1/(f2|X) by Th31; end; theorem Th49: (r(#)f)|X = r(#)(f|X) proof A1: now let c be set; assume A2: c in dom ((r(#)f)|X); then A3: c in dom (r(#)f) /\ X by RELAT_1:61; then A4: c in X by XBOOLE_0:def 4; A5: c in dom (r(#)f) by A3,XBOOLE_0:def 4; then c in dom f by VALUED_1:def 5; then c in dom f /\ X by A4,XBOOLE_0:def 4; then A6: c in dom (f|X) by RELAT_1:61; then A7: c in dom (r(#)(f|X)) by VALUED_1:def 5; thus ((r(#)f)|X).c = (r(#)f).c by A2,FUNCT_1:47 .= r*(f.c) by A5,VALUED_1:def 5 .= r*(f|X).c by A6,FUNCT_1:47 .= (r(#)(f|X)).c by A7,VALUED_1:def 5; end; dom ((r(#)f)|X) = dom (r(#)f) /\ X by RELAT_1:61 .= dom f /\ X by VALUED_1:def 5 .= dom (f|X) by RELAT_1:61 .= dom (r(#)(f|X)) by VALUED_1:def 5; hence thesis by A1,FUNCT_1:2; end; reserve r,r1,r2,p for real number; reserve f,f1,f2 for PartFunc of C,REAL; theorem Th50: (f1 is total & f2 is total iff f1+f2 is total) & (f1 is total & f2 is total iff f1-f2 is total) & (f1 is total & f2 is total iff f1(#)f2 is total) proof thus f1 is total & f2 is total iff f1+f2 is total proof thus f1 is total & f2 is total implies f1+f2 is total; assume f1+f2 is total; then dom (f1+f2) = C by PARTFUN1:def 2; then A4: dom f1 /\ dom f2 = C by VALUED_1:def 1; then A5: C c= dom f2 by XBOOLE_1:17; C c= dom f1 by A4,XBOOLE_1:17; hence dom f1 = C & dom f2 = C by A5,XBOOLE_0:def 10; end; thus f1 is total & f2 is total iff f1-f2 is total proof thus f1 is total & f2 is total implies f1-f2 is total; assume f1-f2 is total; then dom (f1-f2) = C by PARTFUN1:def 2; then A9: dom f1 /\ dom f2 = C by VALUED_1:12; then A10: C c= dom f2 by XBOOLE_1:17; C c= dom f1 by A9,XBOOLE_1:17; hence dom f1 = C & dom f2 = C by A10,XBOOLE_0:def 10; end; thus f1 is total & f2 is total implies f1(#)f2 is total; assume f1(#)f2 is total; then dom (f1(#)f2) = C by PARTFUN1:def 2; then A14: dom f1 /\ dom f2 = C by VALUED_1:def 4; then A15: C c= dom f2 by XBOOLE_1:17; C c= dom f1 by A14,XBOOLE_1:17; hence dom f1 = C & dom f2 = C by A15,XBOOLE_0:def 10; end; theorem Th51: f is total iff r(#)f is total proof thus f is total implies r(#)f is total; assume r(#)f is total; then dom (r(#)f) = C by PARTFUN1:def 2; hence dom f = C by VALUED_1:def 5; end; theorem f is total iff -f is total by Th51; theorem f is total iff abs(f) is total proof thus f is total implies abs(f) is total; assume abs(f) is total; then dom (abs(f)) = C by PARTFUN1:def 2; hence dom f = C by VALUED_1:def 11; end; theorem Th54: f^ is total iff f"{0} = {} & f is total proof thus f^ is total implies f"{0} = {} & f is total proof assume f^ is total; then A1: dom (f^) = C by PARTFUN1:def 2; f"{0} c= C; then f"{0} c= dom f \ f"{0} by A1,Def2; hence f"{0} = {} by XBOOLE_1:38; then C = dom f \ {} by A1,Def2; hence dom f = C; end; assume that A2: f"{0} = {} and A3: f is total; thus dom (f^) = dom f \ f"{0} by Def2 .= C by A2,A3,PARTFUN1:def 2; end; theorem Th55: f1 is total & f2"{0} = {} & f2 is total iff f1/f2 is total proof thus f1 is total & f2"{0} = {} & f2 is total implies f1/f2 is total proof assume that A1: f1 is total and A2: f2"{0} = {} and A3: f2 is total; f2^ is total by A2,A3,Th54; then f1(#)(f2^) is total by A1; hence thesis by Th31; end; assume f1/f2 is total; then A4: f1(#)(f2^) is total by Th31; hence f1 is total by Th50; f2^ is total by A4,Th50; hence thesis by Th54; end; theorem f1 is total & f2 is total implies (f1+f2).c = f1.c + f2.c & (f1-f2).c = f1.c - f2.c & (f1(#)f2).c = f1.c * f2.c proof assume that A1: f1 is total and A2: f2 is total; f1+f2 is total by A1,A2; then dom (f1+f2) = C by PARTFUN1:def 2; hence (f1+f2).c = f1.c + f2.c by VALUED_1:def 1; f1-f2 is total by A1,A2; then dom (f1-f2) = C by PARTFUN1:def 2; hence (f1-f2).c = f1.c - f2.c by VALUED_1:13; thus thesis by VALUED_1:5; end; theorem f is total implies (r(#)f).c = r * (f.c) proof assume f is total; then r(#)f is total; then dom (r(#)f) = C by PARTFUN1:def 2; hence thesis by VALUED_1:def 5; end; theorem f is total implies (-f).c = - f.c & (abs(f)).c = abs( f.c ) by VALUED_1:8,18; theorem f^ is total implies (f^).c = (f.c)" proof assume f^ is total; then dom (f^) = C by PARTFUN1:def 2; hence thesis by Def2; end; theorem f1 is total & f2^ is total implies (f1/f2).c = f1.c *(f2.c)" proof assume that A1: f1 is total and A2: f2^ is total; A3: f2 is total by A2,Th54; f2"{0} = {} by A2,Th54; then f1/f2 is total by A1,A3,Th55; then dom (f1/f2) = C by PARTFUN1:def 2; hence thesis by Def1; end; definition let X,C be set; redefine func chi(X,C) -> PartFunc of C,REAL; coherence proof now let x; assume x in rng chi(X,C); then x = 0 or x = 1 by TARSKI:def 2; hence x in REAL; end; then A1: rng chi(X,C) c= REAL by TARSKI:def 3; dom chi(X,C) =C by FUNCT_3:def 3; hence thesis by A1,RELSET_1:4; end; end; registration let X,C be set; cluster chi(X,C) -> total for PartFunc of C,REAL; coherence proof dom chi(X,C) =C by FUNCT_3:def 3; hence thesis by PARTFUN1:def 2; end; end; theorem Th61: f= chi(X,C) iff ( dom f = C & for c holds (c in X implies f.c = 1) & (not c in X implies f.c = 0)) proof thus f= chi(X,C) implies (dom f = C & for c holds (c in X implies f.c = 1) & (not c in X implies f.c = 0)) by FUNCT_3:def 3; assume that A1: dom f = C and A2: for c holds (c in X implies f.c = 1) & (not c in X implies f.c = 0); for x st x in C holds (x in X implies (f qua Function).x = 1) & (not x in X implies (f qua Function).x = 0) by A2; hence thesis by A1,FUNCT_3:def 3; end; theorem chi(X,C) is total; theorem c in X iff chi(X,C).c = 1 by Th61; theorem not c in X iff chi(X,C).c = 0 by Th61; theorem c in C \ X iff chi(X,C).c = 0 proof thus c in C \ X implies chi(X,C).c = 0 proof assume c in C \ X; then not c in X by XBOOLE_0:def 5; hence thesis by Th61; end; assume chi(X,C).c = 0; then not c in X by Th61; hence thesis by XBOOLE_0:def 5; end; theorem chi(C,C).c = 1 by Th61; theorem Th67: chi(X,C).c <> 1 iff chi(X,C).c = 0 proof thus chi(X,C).c <> 1 implies chi(X,C).c = 0 proof c in C; then c in dom chi(X,C) by Th61; then A1: chi(X,C).c in rng chi(X,C) by FUNCT_1:def 3; A2: rng chi(X,C) c= {0,1} by FUNCT_3:39; assume chi(X,C).c <> 1; hence thesis by A1,A2,TARSKI:def 2; end; assume that A3: chi(X,C).c = 0 and A4: chi(X,C).c = 1; thus contradiction by A3,A4; end; theorem X misses Y implies chi(X,C) + chi(Y,C) = chi(X \/ Y,C) proof assume A1: X /\ Y = {}; A2: now let c such that A3: c in dom (chi(X,C) + chi(Y,C)); now per cases; suppose A4: c in X; then not c in Y by A1,XBOOLE_0:def 4; then A5: chi(Y,C).c = 0 by Th61; A6: c in X \/ Y by A4,XBOOLE_0:def 3; chi(X,C).c = 1 by A4,Th61; hence chi(X,C).c + chi(Y,C).c = chi(X \/ Y,C).c by A5,A6,Th61; end; suppose A7: not c in X; then A8: chi(X,C).c = 0 by Th61; now per cases; suppose A9: c in Y; then A10: c in X \/ Y by XBOOLE_0:def 3; chi(Y,C).c = 1 by A9,Th61; hence chi(X,C).c + chi(Y,C).c = chi(X \/ Y,C).c by A8,A10,Th61; end; suppose A11: not c in Y; then A12: not c in X \/ Y by A7,XBOOLE_0:def 3; chi(Y,C).c = 0 by A11,Th61; hence chi(X,C).c + chi(Y,C).c = chi(X \/ Y,C).c by A8,A12,Th61; end; end; hence chi(X,C).c + chi(Y,C).c = chi(X \/ Y,C).c; end; end; hence (chi(X,C) + chi(Y,C)).c = chi(X \/ Y,C).c by A3,VALUED_1:def 1; end; dom (chi(X,C) + chi(Y,C)) = dom chi(X,C) /\ dom chi(Y,C) by VALUED_1:def 1 .= C /\ dom chi(Y,C) by Th61 .= C /\ C by Th61 .= dom chi(X \/ Y,C) by Th61; hence thesis by A2,PARTFUN1:5; end; theorem chi(X,C) (#) chi(Y,C) = chi(X /\ Y,C) proof A1: now let c such that c in dom (chi(X,C) (#) chi(Y,C)); now per cases; suppose A2: chi(X,C).c * chi(Y,C).c = 0; now per cases by A2; suppose chi(X,C).c = 0; then not c in X by Th61; then not c in X /\ Y by XBOOLE_0:def 4; hence chi(X,C).c * chi(Y,C).c = chi(X /\ Y,C).c by A2,Th61; end; suppose chi(Y,C).c = 0; then not c in Y by Th61; then not c in X /\ Y by XBOOLE_0:def 4; hence chi(X,C).c * chi(Y,C).c = chi(X /\ Y,C).c by A2,Th61; end; end; hence chi(X,C).c * chi(Y,C).c = chi(X /\ Y,C).c; end; suppose A3: chi(X,C).c * chi(Y,C).c <> 0; then A4: chi(Y,C).c <> 0; then A5: chi(Y,C).c = 1 by Th67; A6: c in Y by A4,Th61; A7: chi(X,C).c <> 0 by A3; then c in X by Th61; then A8: c in X /\ Y by A6,XBOOLE_0:def 4; chi(X,C).c = 1 by A7,Th67; hence chi(X,C).c * chi(Y,C).c = chi(X /\ Y,C).c by A5,A8,Th61; end; end; hence (chi(X,C)(#)chi(Y,C)).c = chi(X /\ Y,C).c by VALUED_1:5; end; dom (chi(X,C) (#) chi(Y,C)) = dom chi(X,C) /\ dom chi(Y,C) by VALUED_1:def 4 .= C /\ dom chi(Y,C) by Th61 .= C /\ C by Th61 .= dom chi(X /\ Y,C) by Th61; hence thesis by A1,PARTFUN1:5; end; reserve f for real-valued Function; theorem Th70: f|Y is bounded_above iff ex r st for c being set st c in Y /\ dom f holds f.c <= r proof thus f|Y is bounded_above implies ex r st for c being set st c in Y /\ dom f holds f.c <= r proof given r being real number such that A1: for p being set st p in dom(f|Y) holds (f|Y).p bounded for real-valued Function; coherence proof let f be real-valued Function; per cases; suppose A1: f is empty; reconsider z=0 as real number; assume f is constant; thus f is bounded_above proof take z; let x be set; thus thesis by A1; end; take z; let x be set; thus thesis by A1; end; suppose A2: f is not empty; assume f is constant; then consider r such that A3: for c being set st c in dom f holds f.c = r by A2,VALUED_0:15; thus f is bounded_above proof take r+1; let y be set; assume y in dom f; then f.y = r by A3; hence thesis by XREAL_1:39; end; take r-1; let y be set; assume y in dom f; then f.y = r by A3; hence thesis by XREAL_1:231; end; end; end; theorem X misses dom f implies f|X is bounded proof assume X /\ dom f = {}; then dom(f|X) = {} by RELAT_1:61; then f|X = {}; hence thesis; end; theorem (0(#)f)|Y is bounded proof reconsider p1 = 0 as Real; set r = 0; now take p=p1; let c be set; assume c in Y /\ dom (r(#)f); then A1: c in dom (r(#)f) by XBOOLE_0:def 4; r*f.c <= 0; hence (r(#)f).c <= p by A1,VALUED_1:def 5; end; hence (r(#)f)|Y is bounded_above by Th70; now take p=p1; let c be set; assume c in Y /\ dom (r(#)f); then A2: c in dom (r(#)f) by XBOOLE_0:def 4; 0 <= r*f.c; hence p <= (r(#)f).c by A2,VALUED_1:def 5; end; hence thesis by Th71; end; registration let f be bounded_above real-valued Function, X be set; cluster f|X -> bounded_above for real-valued Function; coherence proof consider r such that A1: for y being set st y in dom f holds f.y bounded_below for real-valued Function; coherence proof consider r such that A1: for y being set st y in dom f holds r < f.y by SEQ_2:def 2; f|X is bounded_below proof take r; let y be set; assume A2: y in dom(f|X); then y in dom f by RELAT_1:57; then r < f.y by A1; hence thesis by A2,FUNCT_1:47; end; hence thesis; end; end; registration let f be bounded_above real-valued Function; let r be non negative real number; cluster r(#)f -> bounded_above for real-valued Function; coherence proof consider r1 such that A1: for c being set st c in dom f holds f.c < r1 by SEQ_2:def 1; now take p = r*abs(r1)+1; let c be set; A2: r1 <= abs(r1) by ABSVALUE:4; assume A3: c in dom (r(#)f); then c in dom f by VALUED_1:def 5; then f.c < abs(r1) by A1,A2,XXREAL_0:2; then r * (f.c) <= abs(r1)*r by XREAL_1:64; then (r(#)f).c <= abs(r1)*r by A3,VALUED_1:def 5; hence (r(#)f).c < p by XREAL_1:39; end; hence thesis by SEQ_2:def 1; end; end; registration let f be bounded_below real-valued Function; let r be non negative real number; cluster r(#)f -> bounded_below for real-valued Function; coherence proof consider r1 such that A1: for c being set st c in dom f holds r1 < f.c by SEQ_2:def 2; now take p = r*(-(abs r1))-1; let c be set; A2: -abs(r1) <= r1 by ABSVALUE:4; assume A3: c in dom (r(#)f); then c in dom f by VALUED_1:def 5; then f.c >= -abs(r1) by A1,A2,XXREAL_0:2; then r * (f.c) >= (-abs(r1))*r by XREAL_1:64; then (r(#)f).c >= (-abs(r1))*r by A3,VALUED_1:def 5; hence (r(#)f).c > p by XREAL_1:231; end; hence thesis by SEQ_2:def 2; end; end; registration let f be bounded_above real-valued Function; let r be non positive real number; cluster r(#)f -> bounded_below for real-valued Function; coherence proof consider r1 such that A1: for c being set st c in dom f holds f.c < r1 by SEQ_2:def 1; now take p=r*abs(r1)-1; let c be set; A2: r1<=abs(r1) by ABSVALUE:4; assume A3: c in dom (r(#)f); then c in dom f by VALUED_1:def 5; then f.c <= abs(r1) by A1,A2,XXREAL_0:2; then r*abs(r1) <= r * f.c by XREAL_1:65; then r*abs(r1) <= (r(#)f).c by A3,VALUED_1:def 5; hence p < (r(#)f).c by XREAL_1:231; end; hence thesis by SEQ_2:def 2; end; end; registration let f be bounded_below real-valued Function; let r be non positive real number; cluster r(#)f -> bounded_above for real-valued Function; coherence proof consider r1 such that A1: for c being set st c in dom f holds r1 < f.c by SEQ_2:def 2; now take p=r*(-abs(r1))+1; let c be set; A2: -abs(r1) <= r1 by ABSVALUE:4; assume A3: c in dom (r(#)f); then c in dom f by VALUED_1:def 5; then -abs(r1) <= f.c by A1,A2,XXREAL_0:2; then r * f.c <= r*(-abs(r1)) by XREAL_1:65; then (r(#)f).c <= r*(-abs(r1)) by A3,VALUED_1:def 5; hence (r(#)f).c < p by XREAL_1:39; end; hence thesis by SEQ_2:def 1; end; end; theorem Th78: (f|Y is bounded_above & 0<=r implies (r(#)f)|Y is bounded_above) & (f|Y is bounded_above & r<=0 implies (r(#)f)|Y is bounded_below) proof (r(#)f)|Y = r(#)(f|Y) by Th49; hence thesis; end; theorem Th79: (f|Y is bounded_below & 0<=r implies (r(#)f)|Y is bounded_below) & (f|Y is bounded_below & r<=0 implies (r(#)f)|Y is bounded_above) proof (r(#)f)|Y = r(#)(f|Y) by Th49; hence thesis; end; theorem Th80: f|Y is bounded implies (r(#)f)|Y is bounded proof assume A1: f|Y is bounded; per cases; suppose A2: 0 <= r; hence (r(#)f)|Y is bounded_above by A1,Th78; thus thesis by A1,A2,Th79; end; suppose A3: r <= 0; hence (r(#)f)|Y is bounded_above by A1,Th79; thus thesis by A1,A3,Th78; end; end; registration let f; cluster abs f -> bounded_below; coherence proof now reconsider p = -1 as real number; take p; let c be set; assume c in dom (abs(f)); 0 <= abs(f.c) by COMPLEX1:46; hence p < (abs(f)).c by VALUED_1:18; end; hence thesis by SEQ_2:def 2; end; end; theorem (abs f)|X is bounded_below; registration let f be bounded real-valued Function; cluster abs f -> bounded for real-valued Function; coherence proof consider r1 such that A1: for c being set st c in dom f holds abs(f.c) <= r1 by Th72; now take r1; let c be set; assume c in dom abs f; then c in dom f by VALUED_1:def 11; then abs abs(f.c) <= r1 by A1; hence abs((abs f).c) <= r1 by VALUED_1:18; end; hence thesis by Th72; end; end; registration let f be bounded_above real-valued Function; cluster -f -> bounded_below for real-valued Function; coherence; end; theorem Th82: f|Y is bounded implies (abs f)|Y is bounded & (-f)|Y is bounded proof assume A1: f|Y is bounded; (abs f)|Y = abs(f|Y) by Th46; hence (abs f)|Y is bounded by A1; thus thesis by A1,Th80; end; reserve f1,f2 for real-valued Function; registration let f1,f2 be bounded_above real-valued Function; cluster f1+f2 -> bounded_above for real-valued Function; coherence proof consider r2 such that A1: for c being set st c in dom f2 holds f2.c < r2 by SEQ_2:def 1; consider r1 such that A2: for c being set st c in dom f1 holds f1.c < r1 by SEQ_2:def 1; now take r=r1+r2; let c be set; assume A3: c in dom (f1+f2); then A4: c in dom f1 /\ dom f2 by VALUED_1:def 1; then c in dom f1 by XBOOLE_0:def 4; then A5: f1.c < r1 by A2; c in dom f2 by A4,XBOOLE_0:def 4; then f1.c + f2.c < r by A1,A5,XREAL_1:8; hence (f1+f2).c < r by A3,VALUED_1:def 1; end; hence thesis by SEQ_2:def 1; end; end; registration let f1,f2 be bounded_below real-valued Function; cluster f1+f2 -> bounded_below for real-valued Function; coherence proof consider r2 such that A1: for c being set st c in dom f2 holds f2.c > r2 by SEQ_2:def 2; consider r1 such that A2: for c being set st c in dom f1 holds f1.c > r1 by SEQ_2:def 2; now take r=r1+r2; let c be set; assume A3: c in dom (f1+f2); then A4: c in dom f1 /\ dom f2 by VALUED_1:def 1; then c in dom f1 by XBOOLE_0:def 4; then A5: f1.c > r1 by A2; c in dom f2 by A4,XBOOLE_0:def 4; then f1.c + f2.c > r by A1,A5,XREAL_1:8; hence (f1+f2).c > r by A3,VALUED_1:def 1; end; hence thesis by SEQ_2:def 2; end; end; theorem Th83: (f1|X is bounded_above & f2|Y is bounded_above implies (f1+f2)| (X /\ Y) is bounded_above) & (f1|X is bounded_below & f2|Y is bounded_below implies (f1+f2)|(X /\ Y) is bounded_below) & (f1|X is bounded & f2|Y is bounded implies (f1+f2)|(X /\ Y) is bounded) proof (f1+f2)|(X /\ Y) = f1|(X /\ Y)+f2|(X /\ Y) by Th44 .= f1|(X /\ Y)+f2|Y|X by RELAT_1:71 .= f1|X|Y+f2|Y|X by RELAT_1:71; hence thesis; end; registration let f1,f2 be bounded real-valued Function; cluster f1(#)f2 -> bounded for real-valued Function; coherence proof consider r2 such that A1: for c being set st c in dom f2 holds abs(f2.c) <= r2 by Th72; consider r1 such that A2: for c being set st c in dom f1 holds abs(f1.c) <= r1 by Th72; now take r=r1*r2; let c be set; A3: 0<=abs(f2.c) by COMPLEX1:46; assume c in dom (f1(#)f2); then A4: c in dom f1 /\ dom f2 by VALUED_1:def 4; then c in dom f1 by XBOOLE_0:def 4; then A5: abs(f1.c) <= r1 by A2; c in dom f2 by A4,XBOOLE_0:def 4; then A6: abs(f2.c) <= r2 by A1; 0<=abs(f1.c) by COMPLEX1:46; then abs(f1.c)*abs(f2.c) <= r by A5,A6,A3,XREAL_1:66; then abs(f1.c * f2.c) <= r by COMPLEX1:65; hence abs((f1(#)f2).c) <= r by VALUED_1:5; end; hence thesis by Th72; end; end; theorem Th84: f1|X is bounded & f2|Y is bounded implies (f1(#)f2)|(X /\ Y) is bounded & (f1-f2)|(X /\ Y) is bounded proof assume that A1: f1|X is bounded and A2: f2|Y is bounded; (f1(#)f2)|(X /\ Y) = f1|(X /\ Y)(#)f2|(X /\ Y) by Th45 .= f1|(X /\ Y)(#)f2|Y|X by RELAT_1:71 .= f1|X|Y(#)f2|Y|X by RELAT_1:71; hence (f1(#)f2)|(X /\ Y) is bounded by A1,A2; (-f2)|Y is bounded by A2,Th82; hence thesis by A1,Th83; end; theorem Th85: f|X is bounded_above & f|Y is bounded_above implies f|(X \/ Y) is bounded_above proof assume that A1: f|X is bounded_above and A2: f|Y is bounded_above; consider r1 such that A3: for c being set st c in X /\ dom f holds f.c <= r1 by A1,Th70; consider r2 such that A4: for c being set st c in Y /\ dom f holds f.c <= r2 by A2,Th70; now take r = abs(r1) + abs(r2); let c be set; assume A5: c in (X \/ Y) /\ dom f; then A6: c in dom f by XBOOLE_0:def 4; A7: c in X \/ Y by A5,XBOOLE_0:def 4; now per cases by A7,XBOOLE_0:def 3; suppose c in X; then c in X /\ dom f by A6,XBOOLE_0:def 4; then A8: f.c <= r1 by A3; A9: 0 <= abs(r2) by COMPLEX1:46; r1 <= abs(r1) by ABSVALUE:4; then f.c <= abs(r1) by A8,XXREAL_0:2; then f.c + 0 <= r by A9,XREAL_1:7; hence f.c <= r; end; suppose c in Y; then c in Y /\ dom f by A6,XBOOLE_0:def 4; then A10: f.c <= r2 by A4; A11: 0 <= abs(r1) by COMPLEX1:46; r2 <= abs(r2) by ABSVALUE:4; then f.c <= abs(r2) by A10,XXREAL_0:2; then 0 + f.c <= r by A11,XREAL_1:7; hence f.c <= r; end; end; hence f.c <= r; end; hence thesis by Th70; end; theorem Th86: f|X is bounded_below & f|Y is bounded_below implies f|(X \/ Y) is bounded_below proof assume that A1: f|X is bounded_below and A2: f|Y is bounded_below; consider r1 such that A3: for c being set st c in X /\ dom f holds r1 <= f.c by A1,Th71; consider r2 such that A4: for c being set st c in Y /\ dom f holds r2 <= f.c by A2,Th71; now take r = -abs(r1) - abs(r2); let c be set; assume A5: c in (X \/ Y) /\ dom f; then A6: c in dom f by XBOOLE_0:def 4; A7: c in X \/ Y by A5,XBOOLE_0:def 4; now per cases by A7,XBOOLE_0:def 3; suppose c in X; then c in X /\ dom f by A6,XBOOLE_0:def 4; then A8: r1 <= f.c by A3; A9: 0 <= abs(r2) by COMPLEX1:46; -abs(r1) <= r1 by ABSVALUE:4; then -abs(r1) <= f.c by A8,XXREAL_0:2; then r <= f.c - 0 by A9,XREAL_1:13; hence r <= f.c; end; suppose c in Y; then c in Y /\ dom f by A6,XBOOLE_0:def 4; then A10: r2 <= f.c by A4; A11: 0 <= abs(r1) by COMPLEX1:46; -abs(r2) <= r2 by ABSVALUE:4; then -abs(r2) <= f.c by A10,XXREAL_0:2; then -abs(r2) - abs(r1) <= f.c - 0 by A11,XREAL_1:13; hence r <= f.c; end; end; hence r <= f.c; end; hence thesis by Th71; end; theorem f|X is bounded & f|Y is bounded implies f|(X \/ Y) is bounded proof assume that A1: f|X is bounded and A2: f|Y is bounded; thus f|(X \/ Y) is bounded_above by A1,A2,Th85; thus thesis by A1,A2,Th86; end; reserve f,f1,f2 for PartFunc of C,REAL; registration let C; let f1,f2 be constant PartFunc of C,REAL; cluster f1+f2 -> constant; coherence proof consider r2 being Real such that A1: for c st c in dom f2 holds f2.c = r2 by PARTFUN2:def 1; consider r1 being Real such that A2: for c st c in dom f1 holds f1.c = r1 by PARTFUN2:def 1; now let c; assume A3: c in dom(f1+f2); then A4: c in dom f1 /\ dom f2 by VALUED_1:def 1; then A5: c in dom f1 by XBOOLE_0:def 4; A6: c in dom f2 by A4,XBOOLE_0:def 4; thus (f1+f2).c = f1.c + f2.c by A3,VALUED_1:def 1 .= f1.c + r2 by A1,A6 .= r1+r2 by A2,A5; end; hence thesis by PARTFUN2:def 1; end; cluster f1-f2 -> constant; coherence proof consider r2 being Real such that A7: for c st c in dom f2 holds f2.c = r2 by PARTFUN2:def 1; consider r1 being Real such that A8: for c st c in dom f1 holds f1.c = r1 by PARTFUN2:def 1; now let c; assume A9: c in dom(f1-f2); then A10: c in dom f1 /\ dom f2 by VALUED_1:12; then A11: c in dom f1 by XBOOLE_0:def 4; A12: c in dom f2 by A10,XBOOLE_0:def 4; thus (f1-f2).c = f1.c - f2.c by A9,VALUED_1:13 .= f1.c - r2 by A7,A12 .= r1-r2 by A8,A11; end; hence thesis by PARTFUN2:def 1; end; cluster f1(#)f2 -> constant; coherence proof consider r2 being Real such that A13: for c st c in dom f2 holds f2.c = r2 by PARTFUN2:def 1; consider r1 being Real such that A14: for c st c in dom f1 holds f1.c = r1 by PARTFUN2:def 1; now let c; assume A15: c in dom(f1(#)f2); then A16: c in dom f1 /\ dom f2 by VALUED_1:def 4; then A17: c in dom f1 by XBOOLE_0:def 4; A18: c in dom f2 by A16,XBOOLE_0:def 4; thus (f1(#)f2).c = f1.c * f2.c by A15,VALUED_1:def 4 .= f1.c * r2 by A13,A18 .= r1*r2 by A14,A17; end; hence thesis by PARTFUN2:def 1; end; end; theorem f1|X is constant & f2|Y is constant implies (f1+f2)|(X /\ Y) is constant & (f1-f2)|(X /\ Y) is constant & (f1(#)f2)|(X /\ Y) is constant proof assume that A1: f1|X is constant and A2: f2|Y is constant; consider r1 be Real such that A3: for c st c in X /\ dom f1 holds f1.c = r1 by A1,PARTFUN2:57; consider r2 be Real such that A4: for c st c in Y /\ dom f2 holds f2.c = r2 by A2,PARTFUN2:57; now let c; assume A5: c in X /\ Y /\ dom (f1+f2); then A6: c in X /\ Y by XBOOLE_0:def 4; then A7: c in X by XBOOLE_0:def 4; A8: c in dom (f1+f2) by A5,XBOOLE_0:def 4; then A9: c in (dom f1 /\ dom f2) by VALUED_1:def 1; then c in dom f1 by XBOOLE_0:def 4; then A10: c in X /\ dom f1 by A7,XBOOLE_0:def 4; A11: c in Y by A6,XBOOLE_0:def 4; c in dom f2 by A9,XBOOLE_0:def 4; then A12: c in Y /\ dom f2 by A11,XBOOLE_0:def 4; thus (f1+f2).c =f1.c + f2.c by A8,VALUED_1:def 1 .= r1 + f2.c by A3,A10 .= r1 + r2 by A4,A12; end; hence (f1+f2)|(X /\ Y) is constant by PARTFUN2:57; now let c; assume A13: c in X /\ Y /\ dom (f1-f2); then A14: c in X /\ Y by XBOOLE_0:def 4; then A15: c in X by XBOOLE_0:def 4; A16: c in dom (f1-f2) by A13,XBOOLE_0:def 4; then A17: c in (dom f1 /\ dom f2) by VALUED_1:12; then c in dom f1 by XBOOLE_0:def 4; then A18: c in X /\ dom f1 by A15,XBOOLE_0:def 4; A19: c in Y by A14,XBOOLE_0:def 4; c in dom f2 by A17,XBOOLE_0:def 4; then A20: c in Y /\ dom f2 by A19,XBOOLE_0:def 4; thus (f1-f2).c = f1.c - f2.c by A16,VALUED_1:13 .= r1 - f2.c by A3,A18 .= r1 - r2 by A4,A20; end; hence (f1-f2)|(X /\ Y) is constant by PARTFUN2:57; now let c; assume A21: c in X /\ Y /\ dom (f1(#)f2); then A22: c in X /\ Y by XBOOLE_0:def 4; c in dom (f1(#)f2) by A21,XBOOLE_0:def 4; then A23: c in (dom f1 /\ dom f2) by VALUED_1:def 4; then A24: c in dom f1 by XBOOLE_0:def 4; A25: c in dom f2 by A23,XBOOLE_0:def 4; c in Y by A22,XBOOLE_0:def 4; then A26: c in Y /\ dom f2 by A25,XBOOLE_0:def 4; c in X by A22,XBOOLE_0:def 4; then A27: c in X /\ dom f1 by A24,XBOOLE_0:def 4; thus (f1(#)f2).c =f1.c * f2.c by VALUED_1:5 .= r1 * f2.c by A3,A27 .= r1 * r2 by A4,A26; end; hence thesis by PARTFUN2:57; end; registration let C; let f be constant PartFunc of C,REAL; cluster -f -> constant; coherence proof consider r be Real such that A1: for c be Element of C st c in dom f holds f.c = r by PARTFUN2:def 1; now take p=-r; let c be Element of C; assume c in dom (-f); then c in dom f by VALUED_1:8; then -f.c = p by A1; hence (-f).c = p by VALUED_1:8; end; hence thesis by PARTFUN2:def 1; end; cluster abs f -> constant; coherence proof consider r be Real such that A2: for c be Element of C st c in dom f holds f.c = r by PARTFUN2:def 1; now take p= abs r; let c be Element of C; assume c in dom (abs f); then c in dom f by VALUED_1:def 11; then abs(f.c) = p by A2; hence (abs f).c = p by VALUED_1:18; end; hence thesis by PARTFUN2:def 1; end; let p; cluster p(#)f -> constant; coherence proof consider r be Real such that A3: for c be Element of C st c in dom f holds f.c = r by PARTFUN2:def 1; now take r1= p*r; let c be Element of C; assume c in dom (p(#)f); then c in dom f by VALUED_1:def 5; then p*(f.c) = r1 by A3; hence (p(#)f).c = r1 by VALUED_1:6; end; hence thesis by PARTFUN2:def 1; end; end; theorem Th89: f|Y is constant implies (p(#)f)|Y is constant proof (p(#)f)|Y = p(#)(f|Y) by Th49; hence thesis; end; theorem Th90: f|Y is constant implies (-f)|Y is constant proof (-f)|Y = -(f|Y) by Th46; hence thesis; end; theorem Th91: f|Y is constant implies (abs f)|Y is constant proof (abs f)|Y = abs(f|Y) by Th46; hence thesis; end; theorem f|Y is constant implies (for r holds (r(#)f)|Y is bounded) & (-f)|Y is bounded & (abs f)|Y is bounded proof assume A1: f|Y is constant; hereby let r; (r(#)f)|Y is constant by A1,Th89; hence (r(#)f)|Y is bounded; end; (-f)|Y is constant by A1,Th90; hence (-f)|Y is bounded; (abs f)|Y is constant by A1,Th91; hence thesis; end; theorem (f1|X is bounded_above & f2|Y is constant implies (f1+f2)|(X /\ Y) is bounded_above) & (f1|X is bounded_below & f2|Y is constant implies (f1+f2)|(X /\ Y) is bounded_below) & (f1|X is bounded & f2|Y is constant implies (f1+f2)|( X /\ Y) is bounded) by Th83; theorem (f1|X is bounded_above & f2|Y is constant implies (f1-f2)|(X /\ Y) is bounded_above) & (f1|X is bounded_below & f2|Y is constant implies (f1-f2)|(X /\ Y) is bounded_below) & (f1|X is bounded & f2|Y is constant implies (f1-f2)|( X /\ Y) is bounded & (f2-f1)|(X /\ Y) is bounded& (f1(#)f2)|(X /\ Y) is bounded ) proof thus f1|X is bounded_above & f2|Y is constant implies (f1-f2)|(X /\ Y) is bounded_above proof assume that A1: f1|X is bounded_above and A2: f2|Y is constant; (-f2)|Y is constant by A2,Th90; hence thesis by A1,Th83; end; thus f1|X is bounded_below & f2|Y is constant implies (f1-f2)|(X /\ Y) is bounded_below proof assume that A3: f1|X is bounded_below and A4: f2|Y is constant; (-f2)|Y is constant by A4,Th90; hence thesis by A3,Th83; end; assume that A5: f1|X is bounded and A6: f2|Y is constant; (-f2)|Y is constant by A6,Th90; hence (f1-f2)|(X /\ Y) is bounded by A5,Th83; thus (f2-f1)|(X /\ Y) is bounded by A5,A6,Th84; thus thesis by A5,A6,Th84; end; begin registration let n be Nat; cluster n-element natural-valued for FinSequence; existence proof take n|->0; thus thesis; end; end; registration cluster real-valued for FinSequence; existence proof the FinSequence of REAL is real-valued; hence thesis; end; end; definition let F be real-valued Relation; redefine func rng F -> Subset of REAL; coherence by VALUED_0:def 3; end; registration let D be non empty set; let F be Function of REAL,D; let F1 be real-valued FinSequence; cluster F*F1 -> FinSequence-like; coherence proof consider n1 being Nat such that A1: dom F1 = Seg n1 by FINSEQ_1:def 2; take n1; dom F = REAL & rng F1 c= REAL by FUNCT_2:def 1; hence thesis by A1,RELAT_1:27; end; end; registration let r be real number; cluster <*r*> -> real-valued; coherence proof reconsider p = r as Element of REAL by XREAL_0:def 1; <*p*> is FinSequence-like; hence thesis; end; end; registration let r1, r2 be real number; cluster <*r1, r2*> -> real-valued; coherence proof reconsider p1 = r1, p2 = r2 as Element of REAL by XREAL_0:def 1; <*p1,p2*> is FinSequence-like; hence thesis; end; end; registration let r1, r2, r3 be real number; cluster <*r1, r2, r3*> -> real-valued; coherence proof reconsider p1 = r1, p2 = r2, p3 = r3 as Element of REAL by XREAL_0:def 1; <*p1,p2,p3*> is FinSequence-like; hence thesis; end; end; registration let r1, r2, r3, r4 be real number; cluster <*r1, r2, r3, r4*> -> real-valued; coherence proof reconsider p1 = r1, p2 = r2, p3 = r3, p4 = r4 as Element of REAL by XREAL_0:def 1; <*p1,p2,p3,p4*> is FinSequence-like; hence thesis; end; end; registration let j be Nat, r be real number; cluster j |-> r -> real-valued; coherence; end; registration let f, g be real-valued FinSequence; cluster f ^ g -> real-valued; coherence proof rng (f ^ g) = rng f \/ rng g by FINSEQ_1:31; then rng (f ^ g) c= REAL by XBOOLE_1:8; hence thesis by VALUED_0:def 3; end; end; reserve s for set, i,j,k for Nat, x,x1,x2,x3 for Element of REAL, r,r1,r2,r3,r4 for real number, F,F1,F2,F3 for real-valued FinSequence, R,R1,R2 for Element of i-tuples_on REAL; theorem 0 is_a_unity_wrt addreal by BINOP_2:2,SETWISEO:14; definition redefine func diffreal equals addreal*(id REAL,compreal); compatibility proof let b be BinOp of REAL; now let r1,r2 be Element of REAL; thus diffreal.(r1,r2) = r1 - r2 by BINOP_2:def 10 .= r1 + - r2 .= addreal.(r1,- r2) by BINOP_2:def 9 .= addreal.(r1,compreal.r2) by BINOP_2:def 7 .= (addreal*(id REAL,compreal)).(r1,r2) by FINSEQOP:82; end; hence thesis by BINOP_1:2; end; correctness; end; definition func sqrreal -> UnOp of REAL means :Def2: for r holds it.r = r^2; existence proof deffunc F(Element of REAL) = $1^2; consider G being Function of REAL,REAL such that A1: for x being Element of REAL holds G.x = F(x) from FUNCT_2:sch 4; take G; let r; r in REAL by XREAL_0:def 1; hence thesis by A1; end; uniqueness proof let G1,G2 be UnOp of REAL such that A2: for r holds G1.r = r^2 and A3: for r holds G2.r = r^2; now let x; G1.(x) = (x)^2 by A2; hence G1.x = G2.x by A3; end; hence thesis by FUNCT_2:63; end; end; theorem 1 is_a_unity_wrt multreal by BINOP_2:7,SETWISEO:14; theorem Th3: multreal is_distributive_wrt addreal proof now let x1,x2,x3; thus multreal.(x1,addreal.(x2,x3)) = multreal.(x1,x2+x3) by BINOP_2:def 9 .= x1*(x2+x3) by BINOP_2:def 11 .= x1*x2+x1*x3 .= addreal.(x1*x2,x1*x3) by BINOP_2:def 9 .= addreal.(multreal.(x1,x2),x1*x3) by BINOP_2:def 11 .= addreal.(multreal.(x1,x2),multreal.(x1,x3)) by BINOP_2:def 11; thus multreal.(addreal.(x1,x2),x3) = multreal.(x1+x2,x3) by BINOP_2:def 9 .= (x1+x2)*x3 by BINOP_2:def 11 .= x1*x3+x2*x3 .= addreal.(x1*x3,x2*x3) by BINOP_2:def 9 .= addreal.(multreal.(x1,x3),x2*x3) by BINOP_2:def 11 .= addreal.(multreal.(x1,x3),multreal.(x2,x3)) by BINOP_2:def 11; end; hence thesis by BINOP_1:11; end; theorem sqrreal is_distributive_wrt multreal proof let x1,x2; thus sqrreal.(multreal.(x1,x2)) = sqrreal.(x1*x2) by BINOP_2:def 11 .= (x1*x2)^2 by Def2 .= x1^2*x2^2 .= multreal.(x1^2,x2^2) by BINOP_2:def 11 .= multreal.(sqrreal.x1,x2^2) by Def2 .= multreal.(sqrreal.x1,sqrreal.x2) by Def2; end; definition let x be real number; func x multreal -> UnOp of REAL equals multreal[;](x,id REAL); coherence proof reconsider y = x as Real by XREAL_0:def 1; multreal[;](y,id REAL) is UnOp of REAL; hence thesis; end; end; Lm1: (multreal[;](r,id REAL)).r1 = r*r1 proof reconsider a=r, s=r1 as Element of REAL by XREAL_0:def 1; thus (multreal[;](r,id REAL)).r1 = multreal.(a,(id REAL).s) by FUNCOP_1:53 .= multreal.(a,s) by FUNCT_1:18 .= r*r1 by BINOP_2:def 11; end; theorem (r multreal).r1 = r*r1 by Lm1; theorem r multreal is_distributive_wrt addreal proof r in REAL by XREAL_0:def 1; hence thesis by Th3,FINSEQOP:54; end; theorem Th7: compreal is_an_inverseOp_wrt addreal proof let x; thus addreal.(x,compreal.x) = x+compreal.x by BINOP_2:def 9 .= x+-x by BINOP_2:def 7 .= the_unity_wrt addreal by BINOP_2:2; thus addreal.(compreal.x,x) = compreal.x+x by BINOP_2:def 9 .= -x+x by BINOP_2:def 7 .= the_unity_wrt addreal by BINOP_2:2; end; theorem Th8: addreal is having_an_inverseOp by Th7,FINSEQOP:def 2; theorem Th9: the_inverseOp_wrt addreal = compreal by Th7,Th8,FINSEQOP:def 3; theorem compreal is_distributive_wrt addreal by Th8,Th9,FINSEQOP:63; Lm2: F is FinSequence of REAL proof thus rng F c= REAL; end; definition let F1,F2; redefine func F1 + F2 -> FinSequence of REAL equals addreal.:(F1,F2); coherence by Lm2; compatibility proof reconsider F3=F1,F4=F2 as FinSequence of REAL by Lm2; let F be FinSequence of REAL; dom addreal = [:REAL,REAL:] by FUNCT_2:def 1; then [:rng F3, rng F4:] c= dom addreal by ZFMISC_1:96; then A1: dom(addreal.:(F1,F2)) = dom F1 /\ dom F2 by FUNCOP_1:69; A2: dom (F1+F2) = dom F1 /\ dom F2 by VALUED_1:def 1; thus F = F1+F2 implies F = addreal.:(F1,F2) proof assume A3: F = F1+F2; for z being set st z in dom(addreal.:(F1,F2)) holds F.z = addreal.( F1.z,F2.z) proof let z be set; assume z in dom(addreal.:(F1,F2)); hence F.z = F1.z + F2.z by A2,A1,A3,VALUED_1:def 1 .= addreal.(F1.z,F2.z) by BINOP_2:def 9; end; hence thesis by A2,A1,A3,FUNCOP_1:21; end; assume A4: F = addreal.:(F1,F2); now let c be set; assume c in dom F; hence F.c = addreal.(F1.c,F2.c) by A4,FUNCOP_1:22 .= F1.c + F2.c by BINOP_2:def 9; end; hence thesis by A1,A4,VALUED_1:def 1; end; commutativity proof let F be FinSequence of REAL; let F1,F2; assume A5: F = addreal.:(F1,F2); reconsider F1,F2 as FinSequence of REAL by Lm2; A6: dom addreal = [:REAL,REAL:] by FUNCT_2:def 1; then A7: [:rng F2, rng F1:] c= dom addreal by ZFMISC_1:96; [:rng F1, rng F2:] c= dom addreal by A6,ZFMISC_1:96; then A8: dom(addreal.:(F1,F2)) = dom F1 /\ dom F2 by FUNCOP_1:69 .= dom(addreal.:(F2,F1)) by A7,FUNCOP_1:69; for z being set st z in dom(addreal.:(F2,F1)) holds F.z = addreal.(F2 .z,F1.z) proof let z be set; assume z in dom(addreal.:(F2,F1)); hence F.z = addreal.(F1.z,F2.z) by A5,A8,FUNCOP_1:22 .= F1.z + F2.z by BINOP_2:def 9 .= addreal.(F2.z,F1.z) by BINOP_2:def 9; end; hence thesis by A5,A8,FUNCOP_1:21; end; end; definition let i,R1,R2; redefine func R1 + R2 -> Element of i-tuples_on REAL; coherence by FINSEQ_2:120; end; theorem (R1+R2).s = R1.s + R2.s proof per cases; suppose A1: not s in Seg i; then A2: not s in dom R2 by FINSEQ_2:124; A3: not s in dom R1 by A1,FINSEQ_2:124; not s in dom(R1+R2) by A1,FINSEQ_2:124; hence (R1+R2).s = (0 qua Element of NAT)+(0 qua Element of NAT) by FUNCT_1:def 2 .= R1.s + (0 qua Element of NAT) by A3,FUNCT_1:def 2 .= R1.s + R2.s by A2,FUNCT_1:def 2; end; suppose s in Seg i; then s in dom (R1 + R2) by FINSEQ_2:124; hence thesis by VALUED_1:def 1; end; end; theorem <*>REAL + F = <*>REAL proof F is FinSequence of REAL by Lm2; hence thesis by FINSEQ_2:73; end; theorem <*r1*> + <*r2*> = <*r1+r2*> proof reconsider s1=r1, s2=r2 as Element of REAL by XREAL_0:def 1; <*s1*> + <*s2*> = <*addreal.(s1,s2)*> by FINSEQ_2:74 .= <*r1+r2*> by BINOP_2:def 9; hence thesis; end; theorem (i|->r1) + (i|->r2) = i|->(r1+r2) proof reconsider s1=r1, s2=r2 as Element of REAL by XREAL_0:def 1; (i|->s1) + (i|->s2) = i|->(addreal.(s1,s2)) by FINSEQOP:17 .= i|->(r1+r2) by BINOP_2:def 9; hence thesis; end; theorem F1 + (F2 + F3) = F1 + F2 + F3 by RFUNCT_1:8; theorem R + (i|->(0 qua Real)) = R by BINOP_2:2,FINSEQOP:56; theorem (-F).s = -F.s by VALUED_1:8; definition let F; redefine func -F -> FinSequence of REAL equals compreal*F; coherence by Lm2; compatibility proof let F1 be FinSequence of REAL; A1: dom(-F) = dom F by VALUED_1:8; A2: rng F c= REAL & dom compreal = REAL by FUNCT_2:def 1; then A3: dom(compreal*F) = dom F by RELAT_1:27; thus F1 = -F implies F1 = compreal*F proof assume A4: F1 = -F; now let c be set; assume A5: c in dom F1; thus F1.c = -(F.c) by A4,VALUED_1:8 .= compreal.(F.c) by BINOP_2:def 7 .= (compreal*F).c by A1,A4,A5,FUNCT_1:13; end; hence thesis by A3,A4,FUNCT_1:2,VALUED_1:8; end; assume A6: F1 = compreal*F; now let c be set; assume A7: c in dom F1; thus (-F).c = -(F.c) by VALUED_1:8 .= compreal.(F.c) by BINOP_2:def 7 .= (compreal*F).c by A6,A7,FUNCT_1:12; end; hence thesis by A1,A2,A6,FUNCT_1:2,RELAT_1:27; end; end; definition let i,R; redefine func -R -> Element of i-tuples_on REAL; coherence by FINSEQ_2:113; end; theorem (-F).s = -(F.s) by VALUED_1:8; theorem -(<*>REAL) = <*>REAL; theorem -<*r*> = <*-r*> proof reconsider s=r as Element of REAL by XREAL_0:def 1; -<*s*> = <*compreal.s*> by FINSEQ_2:35 .= <*-r*> by BINOP_2:def 7; hence thesis; end; theorem Th21: -(i|->r) = i|->-r proof reconsider s=r as Element of REAL by XREAL_0:def 1; -(i|->s) = i|->(compreal.s) by FINSEQOP:16 .= i|->-r by BINOP_2:def 7; hence thesis; end; theorem R + -R = i|->0 by Th8,Th9,BINOP_2:2,FINSEQOP:73; theorem R1 + R2 = i|->0 implies R1 = -R2 by Th8,Th9,BINOP_2:2,FINSEQOP:74; theorem for R1, R2 being complex-valued Function st -R1 = -R2 holds R1 = R2 proof let R1, R2 be complex-valued Function; assume -R1 = -R2; hence R1 = --R2 .= R2; end; theorem R1 + R = R2 + R implies R1 = R2 proof assume R1 + R = R2 + R; then R1 + (R + -R)= (R2 + R)+-R by FINSEQOP:28; then A1: R1 + (R + -R)= R2 + (R + -R) by FINSEQOP:28; R + -R = i|->0 by Th8,Th9,BINOP_2:2,FINSEQOP:73; then R1 = R2 + (i|->(0 qua Real)) by A1,BINOP_2:2,FINSEQOP:56; hence thesis by BINOP_2:2,FINSEQOP:56; end; theorem Th26: -(F1 + F2) = -F1 + -F2 proof A1: dom -(F1 + F2) = dom(F1+F2) by VALUED_1:8; A2: dom(F1+F2) = dom F1 /\ dom F2 by VALUED_1:def 1; A3: dom (-F1 + -F2) = dom (-F1) /\ dom -F2 by VALUED_1:def 1 .= dom F1 /\ dom -F2 by VALUED_1:8 .= dom F1 /\ dom F2 by VALUED_1:8; now let i; assume A4: i in dom -(F1+F2); thus (-(F1 + F2)).i = -((F1+F2).i) by VALUED_1:8 .= -(F1.i+F2.i) by A1,A4,VALUED_1:def 1 .= -(F1.i)+-(F2.i) .= -(F1.i) + (-F2).i by VALUED_1:8 .= (-F1).i + (-F2).i by VALUED_1:8 .= (-F1 + -F2).i by A1,A2,A3,A4,VALUED_1:def 1; end; hence thesis by A2,A3,FINSEQ_1:13,VALUED_1:8; end; definition let F1,F2; redefine func F1 - F2 -> FinSequence of REAL equals diffreal.:(F1,F2); coherence by Lm2; compatibility proof reconsider F3=F1,F4=F2 as FinSequence of REAL by Lm2; let F be FinSequence of REAL; A1: dom (F1-F2) = dom F1 /\ dom F2 by VALUED_1:12; dom diffreal = [:REAL,REAL:] by FUNCT_2:def 1; then A2: [:rng F3, rng F4:] c= dom diffreal by ZFMISC_1:96; then A3: dom(diffreal.:(F1,F2)) = dom F1 /\ dom F2 by FUNCOP_1:69; thus F = F1-F2 implies F = diffreal.:(F1,F2) proof assume A4: F = F1-F2; for z being set st z in dom(diffreal.:(F1,F2)) holds F.z = diffreal. (F1.z,F2.z) proof let z be set; assume z in dom(diffreal.:(F1,F2)); hence F.z = F1.z - F2.z by A1,A3,A4,VALUED_1:13 .= diffreal.(F1.z,F2.z) by BINOP_2:def 10; end; hence thesis by A1,A3,A4,FUNCOP_1:21; end; assume A5: F = diffreal.:(F1,F2); now let c be set; assume c in dom F; hence F.c = diffreal.(F1.c,F2.c) by A5,FUNCOP_1:22 .= F1.c - F2.c by BINOP_2:def 10; end; hence thesis by A1,A2,A5,FUNCOP_1:69,VALUED_1:14; end; end; definition let i,R1,R2; redefine func R1 - R2 -> Element of i-tuples_on REAL; coherence by FINSEQ_2:120; end; theorem (R1-R2).s = R1.s - R2.s proof per cases; suppose A1: not s in Seg i; then A2: not s in dom R2 by FINSEQ_2:124; A3: not s in dom R1 by A1,FINSEQ_2:124; not s in dom(R1-R2) by A1,FINSEQ_2:124; hence (R1-R2).s = (0 qua Element of NAT)-(0 qua Element of NAT) by FUNCT_1:def 2 .= R1.s - (0 qua Element of NAT) by A3,FUNCT_1:def 2 .= R1.s - R2.s by A2,FUNCT_1:def 2; end; suppose s in Seg i; then s in dom (R1 - R2) by FINSEQ_2:124; hence thesis by VALUED_1:13; end; end; theorem <*>REAL - F = <*>REAL & F - <*>REAL = <*>REAL proof F is FinSequence of REAL by Lm2; hence thesis by FINSEQ_2:73; end; theorem <*r1*> - <*r2*> = <*r1-r2*> proof reconsider s1=r1, s2=r2 as Element of REAL by XREAL_0:def 1; <*s1*> - <*s2*> = <*diffreal.(s1,s2)*> by FINSEQ_2:74 .= <*r1-r2*> by BINOP_2:def 10; hence thesis; end; theorem (i|->r1) - (i|->r2) = i|->(r1-r2) proof reconsider s1=r1, s2=r2 as Element of REAL by XREAL_0:def 1; (i|->s1) - (i|->s2) = i|->(diffreal.(s1,s2)) by FINSEQOP:17 .= i|->(r1-r2) by BINOP_2:def 10; hence thesis; end; theorem F1 - F2 = F1 + - F2; theorem R - (i|->(0 qua Real)) = R proof thus R - (i|->(0 qua Real)) = R + (i|->(-(0 qua Element of NAT))) by Th21 .= R by BINOP_2:2,FINSEQOP:56; end; theorem (i|->(0 qua Real)) - R = -R by BINOP_2:2,FINSEQOP:56; theorem F1 - -F2 = F1 + F2; theorem -(F1 - F2) = F2 - F1 proof thus -(F1 - F2) = -F1 + --F2 by Th26 .= F2 - F1; end; theorem -(F1 - F2) = -F1 + F2 proof thus -(F1 - F2) = -F1 +--F2 by Th26 .= -F1 + F2; end; theorem R - R = i|->0 by Th8,Th9,BINOP_2:2,FINSEQOP:73; theorem R1 - R2 = i|->0 implies R1 = R2 proof assume R1 - R2 = i|->0; then R1 = --R2 by Th8,Th9,BINOP_2:2,FINSEQOP:74; hence thesis; end; theorem F1 - F2 - F3 = F1 - (F2 + F3) by RFUNCT_1:20; theorem F1 + (F2 - F3) = F1 + F2 - F3 by RFUNCT_1:23; theorem F1 - (F2 - F3) = F1 - F2 + F3 by RFUNCT_1:22; theorem R1 = R1 + R - R proof thus R1 = R1 + (i|->(0 qua Real)) by BINOP_2:2,FINSEQOP:56 .= R1 + (R - R) by Th8,Th9,BINOP_2:2,FINSEQOP:73 .= R1 + R - R by RFUNCT_1:23; end; theorem R1 = R1 - R + R proof thus R1 = R1 + (i|->(0 qua Real)) by BINOP_2:2,FINSEQOP:56 .= R1 + (-R + R) by Th8,Th9,BINOP_2:2,FINSEQOP:73 .= R1 - R + R by FINSEQOP:28; end; notation let F,r; synonym r*F for r(#)F; end; theorem (r*F).s = r*(F.s) by VALUED_1:6; definition let F,r; redefine func r*F -> FinSequence of REAL equals (r multreal)*F; coherence by Lm2; compatibility proof let F1 be FinSequence of REAL; A1: dom(r*F) = dom F by VALUED_1:def 5; A2: rng F c= REAL & dom(r multreal) = REAL by FUNCT_2:def 1; then A3: dom((r multreal)*F) = dom F by RELAT_1:27; thus F1 = r*F implies F1 = (r multreal)*F proof assume A4: F1 = r*F; now let c be set; assume A5: c in dom F1; hence F1.c = r*(F.c) by A4,VALUED_1:def 5 .= (r multreal).(F.c) by Lm1 .= ((r multreal)*F).c by A1,A4,A5,FUNCT_1:13; end; hence thesis by A1,A3,A4,FUNCT_1:2; end; assume A6: F1 = (r multreal)*F; now let c be set; assume A7: c in dom F1; thus (r*F).c = r*(F.c) by VALUED_1:6 .= (r multreal).(F.c) by Lm1 .= ((r multreal)*F).c by A6,A7,FUNCT_1:12; end; hence thesis by A1,A2,A6,FUNCT_1:2,RELAT_1:27; end; end; definition let i,R,r; redefine func r*R -> Element of i-tuples_on REAL; coherence by FINSEQ_2:113; end; theorem (r*F).s = r*(F.s) by VALUED_1:6; theorem r*(<*>REAL) = <*>REAL; theorem r*<*r1*> = <*r*r1*> proof reconsider s=r, s1=r1 as Element of REAL by XREAL_0:def 1; s*<*s1*> = <*(multreal[;](s,id REAL)).s1*> by FINSEQ_2:35 .= <*r*r1*> by Lm1; hence thesis; end; theorem Th48: r1*(i|->r2) = i|->(r1*r2) proof reconsider s1=r1, s2=r2 as Element of REAL by XREAL_0:def 1; s1*(i|->s2) = i|->((multreal[;](s1,id REAL)).s2) by FINSEQOP:16 .= i|->(r1*r2) by Lm1; hence thesis; end; theorem (r1*r2)*F = r1*(r2*F) by RFUNCT_1:17; theorem (r1 + r2)*F = r1*F + r2*F proof A1: dom ((r1 + r2)*F) = dom F by VALUED_1:def 5; A2: dom (r1*F + r2*F) = dom (r1*F) /\ dom (r2*F) by VALUED_1:def 1; A3: dom (r1*F) = dom F by VALUED_1:def 5; A4: dom (r2*F) = dom F by VALUED_1:def 5; now let i; assume A5: i in dom ((r1+r2)*F); thus ((r1+r2)*F).i = (r1+r2)*(F.i) by VALUED_1:6 .= r1*(F.i) + r2*(F.i) .= r1*(F.i) + (r2*F).i by VALUED_1:6 .= (r1*F).i + (r2*F).i by VALUED_1:6 .= (r1*F+r2*F).i by A1,A2,A3,A4,A5,VALUED_1:def 1; end; hence thesis by A1,A2,A3,A4,FINSEQ_1:13; end; theorem r*(F1+F2) = r*F1 + r*F2 by RFUNCT_1:16; theorem 1*F = F by RFUNCT_1:21; theorem 0*R = i|->0 proof A1: rng R c= REAL; thus 0*R = multreal[;](0,(id REAL)*R) by FUNCOP_1:34 .= multreal[;](0,R) by A1,RELAT_1:53 .= i|->0 by Th3,Th8,BINOP_2:2,FINSEQOP:76; end; theorem (-1)*F = -F; notation let F; synonym sqr F for F^2; end; definition let F; redefine func sqr F -> FinSequence of REAL equals sqrreal*F; compatibility proof let f be FinSequence of REAL; sqr F = sqrreal*F proof dom sqrreal = REAL by FUNCT_2:def 1; then A1: rng F c= dom sqrreal; A2: dom sqr F = dom F by VALUED_1:11 .= dom(sqrreal*F) by A1,RELAT_1:27; hence len sqr F = len(sqrreal*F) by FINSEQ_3:29; let k; assume 1 <= k & k <= len sqr F; then A3: k in dom sqr F by FINSEQ_3:25; thus (sqr F).k = (F.k)^2 by VALUED_1:11 .= sqrreal.(F.k) by Def2 .= (sqrreal*F).k by A2,A3,FUNCT_1:12; end; hence thesis; end; coherence by Lm2; end; definition let i,R; redefine func sqr R -> Element of i-tuples_on REAL; coherence by FINSEQ_2:113; end; theorem sqr <*r*> = <*r^2*> proof reconsider s=r as Element of REAL by XREAL_0:def 1; sqr <*s*> = <*sqrreal.s*> by FINSEQ_2:35 .= <*r^2*> by Def2; hence thesis; end; theorem sqr(i |-> r) = i |-> r^2 proof reconsider s=r as Element of REAL by XREAL_0:def 1; sqr(i |-> s) = i |-> (sqrreal.s) by FINSEQOP:16 .= i |-> r^2 by Def2; hence thesis; end; theorem Th57: sqr -F = sqr F proof A1: dom sqr -F = dom -F by VALUED_1:11 .= dom F by VALUED_1:8; A2: dom sqr F = dom F by VALUED_1:11; now let j; assume j in dom sqr -F; set r = F.j, r9 = (-F).j; thus (sqr -F).j = (r9)^2 by VALUED_1:11 .= (-r)^2 by VALUED_1:8 .= r^2 .= (sqr F).j by VALUED_1:11; end; hence thesis by A1,A2,FINSEQ_1:13; end; theorem Th58: sqr (r*F) = r^2 * sqr F proof A1: dom (r*F) = dom F by VALUED_1:def 5; A2: dom (r^2 * sqr F) = dom sqr F by VALUED_1:def 5; A3: dom sqr F = dom F by VALUED_1:11; now let i; assume i in dom sqr (r*F); thus (sqr (r*F)).i = ((r*F).i)^2 by VALUED_1:11 .= (r*(F.i))^2 by VALUED_1:6 .= r^2 * (F.i)^2 .= r^2 * (sqr F).i by VALUED_1:11 .= (r^2 * sqr F).i by VALUED_1:6; end; hence thesis by A1,A2,A3,FINSEQ_1:13,VALUED_1:11; end; notation let F1,F2; synonym mlt(F1,F2) for F1(#)F2; end; definition let F1,F2; redefine func mlt(F1,F2) -> FinSequence of REAL equals multreal.:(F1,F2); coherence by Lm2; compatibility proof reconsider F3=F1,F4=F2 as FinSequence of REAL by Lm2; let F be FinSequence of REAL; dom multreal = [:REAL,REAL:] by FUNCT_2:def 1; then [:rng F3, rng F4:] c= dom multreal by ZFMISC_1:96; then A1: dom(multreal.:(F1,F2)) = dom F1 /\ dom F2 by FUNCOP_1:69; A2: dom mlt(F1,F2) = dom F1 /\ dom F2 by VALUED_1:def 4; thus F = mlt(F1,F2) implies F = multreal.:(F1,F2) proof assume A3: F = mlt(F1,F2); for z being set st z in dom(multreal.:(F1,F2)) holds F.z = multreal. (F1.z,F2.z) proof let z be set; assume z in dom(multreal.:(F1,F2)); thus F.z = F1.z * F2.z by A3,VALUED_1:5 .= multreal.(F1.z,F2.z) by BINOP_2:def 11; end; hence thesis by A2,A1,A3,FUNCOP_1:21; end; assume A4: F = multreal.:(F1,F2); now let c be set; assume c in dom F; hence F.c = multreal.(F1.c,F2.c) by A4,FUNCOP_1:22 .= F1.c * F2.c by BINOP_2:def 11; end; hence thesis by A1,A4,VALUED_1:def 4; end; commutativity proof let F be FinSequence of REAL; let F1,F2; reconsider F3=F1,F4=F2 as FinSequence of REAL by Lm2; A5: dom multreal = [:REAL,REAL:] by FUNCT_2:def 1; then A6: [:rng F4, rng F3:] c= dom multreal by ZFMISC_1:96; [:rng F3, rng F4:] c= dom multreal by A5,ZFMISC_1:96; then A7: dom(multreal.:(F1,F2)) = dom F1 /\ dom F2 by FUNCOP_1:69 .= dom(multreal.:(F2,F1)) by A6,FUNCOP_1:69; assume A8: F = multreal.:(F1,F2); for z being set st z in dom(multreal.:(F2,F1)) holds F.z = multreal.( F2.z,F1.z) proof let z be set such that A9: z in dom(multreal.:(F2,F1)); set F1z = F1.z, F2z =F2.z; thus F.z = multreal.(F1.z,F2.z) by A8,A7,A9,FUNCOP_1:22 .= F1z * F2z by BINOP_2:def 11 .= multreal.(F2.z,F1.z) by BINOP_2:def 11; end; hence thesis by A8,A7,FUNCOP_1:21; end; end; theorem mlt(F1,F2).s = F1.s * F2.s by VALUED_1:5; definition let i,R1,R2; redefine func mlt(R1,R2) -> Element of i-tuples_on REAL; coherence by FINSEQ_2:120; end; theorem mlt(F1,F2).s = F1.s * F2.s by VALUED_1:5; theorem mlt(<*>REAL,F) = <*>REAL proof F is FinSequence of REAL by Lm2; hence thesis by FINSEQ_2:73; end; theorem mlt(<*r1*>,<*r2*>) = <*r1*r2*> proof reconsider s1=r1, s2=r2 as Element of REAL by XREAL_0:def 1; mlt(<*s1*>,<*s2*>) = <*multreal.(s1,s2)*> by FINSEQ_2:74 .= <*r1*r2*> by BINOP_2:def 11; hence thesis; end; theorem Th63: mlt(i|->r,R) = r*R proof reconsider s=r as Element of REAL by XREAL_0:def 1; mlt(i|->s,R) = multreal[;](s,R) by FINSEQOP:20 .= r*R by FINSEQOP:22; hence thesis; end; theorem mlt(i|->r1,i|->r2) = i|->(r1*r2) proof reconsider s1=r1, s2=r2 as Element of REAL by XREAL_0:def 1; mlt(i|->s1,i|->s2) = s1*(i|->s2) by Th63 .= i|->(r1*r2) by Th48; hence thesis; end; theorem r*mlt(F1,F2) = mlt(r*F1,F2) by RFUNCT_1:12; theorem r*R = mlt(i|->r,R) by Th63; theorem sqr(F) = mlt(F,F); theorem Th68: sqr(F1 + F2) = sqr F1 + 2*mlt(F1,F2) + sqr F2 proof A1: dom sqr(F1 + F2) = dom (F1+F2) by VALUED_1:11; A2: dom(F1+F2) = dom F1 /\ dom F2 by VALUED_1:def 1; A3: dom(sqr F1 + 2*mlt(F1,F2)) = dom(sqr F1) /\ dom (2*mlt(F1,F2)) by VALUED_1:def 1 .= dom F1 /\ dom (2*mlt(F1,F2)) by VALUED_1:11 .= dom F1 /\ dom (mlt(F1,F2)) by VALUED_1:def 5 .= dom F1 /\ (dom F1 /\ dom F2) by VALUED_1:def 4 .= dom F1 /\ dom F1 /\ dom F2 by XBOOLE_1:16 .= dom F1 /\ dom F2; then A4: dom(sqr F1 + 2*mlt(F1,F2) + sqr F2) = dom F1 /\ dom F2 /\ dom sqr F2 by VALUED_1:def 1 .= dom F1 /\ dom F2 /\ dom F2 by VALUED_1:11 .= dom F1 /\ (dom F2 /\ dom F2) by XBOOLE_1:16; now let j; assume A5: j in dom sqr(F1+F2); set r1r2 = (F1 + F2).j, r1 = F1.j, r2 = F2.j, r192 = (sqr F1).j, r292 = (sqr F2).j, r1r2a = mlt(F1,F2).j, 2r1r2 = (2*mlt(F1,F2)).j, r1922r1r2 = (sqr F1 + 2*mlt(F1,F2)).j; thus (sqr(F1 + F2)).j = r1r2^2 by VALUED_1:11 .= (r1 + r2)^2 by A1,A5,VALUED_1:def 1 .= r1^2+2*r1*r2+r2^2 .= r192+2*(r1*r2)+r2^2 by VALUED_1:11 .= r192+2*(r1*r2)+r292 by VALUED_1:11 .= r192+2*(r1r2a)+r292 by VALUED_1:5 .= r192+2r1r2+r292 by VALUED_1:6 .= r1922r1r2+r292 by A1,A2,A3,A5,VALUED_1:def 1 .= (sqr F1 + 2*mlt(F1,F2) + sqr F2).j by A1,A2,A4,A5,VALUED_1:def 1; end; hence thesis by A2,A4,FINSEQ_1:13,VALUED_1:11; end; theorem Th69: sqr(F1 - F2) = sqr F1 - 2*mlt(F1,F2) + sqr F2 proof thus sqr(F1 - F2) = sqr F1 + 2*mlt(F1,-F2) + sqr -F2 by Th68 .= sqr F1 + 2*mlt(F1,-F2) + sqr F2 by Th57 .= sqr F1 + 2*((-1)*mlt(F1,F2)) + sqr F2 by RFUNCT_1:12 .= sqr F1 + ((-1)*2)*mlt(F1,F2) + sqr F2 by RFUNCT_1:17 .= sqr F1 - 2*mlt(F1,F2) + sqr F2 by RFUNCT_1:17; end; theorem sqr mlt(F1,F2) = mlt(sqr F1,sqr F2) proof A1: dom mlt(F1,F2) = dom F1 /\ dom F2 by VALUED_1:def 4; A2: dom mlt(sqr F1,sqr F2) = dom sqr F1 /\ dom sqr F2 by VALUED_1:def 4; A3: dom sqr F1 = dom F1 by VALUED_1:11; A4: dom sqr F2 = dom F2 by VALUED_1:11; now let i; assume i in dom sqr mlt(F1,F2); thus (sqr mlt(F1,F2)).i = (mlt(F1,F2).i)^2 by VALUED_1:11 .= (F1.i*F2.i)^2 by VALUED_1:5 .= (F1.i)^2*(F2.i)^2 .= (sqr F1).i*(F2.i)^2 by VALUED_1:11 .= (sqr F1).i * (sqr F2).i by VALUED_1:11 .= (mlt(sqr F1,sqr F2)).i by VALUED_1:5; end; hence thesis by A1,A2,A3,A4,FINSEQ_1:13,VALUED_1:11; end; notation let F be Relation; synonym F is complex-yielding for F is complex-valued; end; registration cluster -> complex-valued for FinSequence of COMPLEX; coherence; cluster real-valued complex-valued for FinSequence; existence proof <*>REAL is real-valued; hence thesis; end; end; definition let F be complex-valued FinSequence; func Sum F -> complex number means :Def10: ex f being FinSequence of COMPLEX st f = F & it = addcomplex $$ f; existence proof rng F c= COMPLEX by VALUED_0:def 1; then reconsider f = F as FinSequence of COMPLEX by FINSEQ_1:def 4; take addcomplex $$ f; thus thesis; end; uniqueness; end; registration let F be real-valued FinSequence; cluster Sum F -> real; coherence proof set mc = addcomplex; consider f being FinSequence of COMPLEX such that A1: f = F and A2: Sum F = addcomplex $$ f by Def10; set g = [#](f,the_unity_wrt mc); defpred P[Nat] means mc $$ (finSeg $1,[#](f,the_unity_wrt mc)) is real; A3: for k being Nat st P[k] holds P[k+1] proof let k be Nat; assume A4: P[k]; reconsider k as Element of NAT by ORDINAL1:def 12; g.(k+1) is real proof per cases; suppose k+1 in dom f; then g.(k+1) = f.(k+1) by SETWOP_2:20; hence thesis by A1; end; suppose not k+1 in dom f; hence thesis by BINOP_2:1,SETWOP_2:20; end; end; then reconsider a = g.(k+1), b = mc $$(finSeg k,g) as real number by A4; not (k + 1) in Seg k by FINSEQ_3:8; then mc $$ (finSeg k \/ {.k+1.},g) = mc.(mc $$(finSeg k,g),g.(k+1)) by SETWOP_2:2 .= b + a by BINOP_2:def 3; hence thesis by FINSEQ_1:9; end; A5: mc $$ f = mc $$ (findom f,[#](f,the_unity_wrt mc)) & ex n being Nat st dom f = Seg n by FINSEQ_1:def 2,SETWOP_2:def 2; Seg 0 = {}.NAT; then A6: P[0] by BINOP_2:1,SETWISEO:31; for n being Nat holds P[n] from NAT_1:sch 2(A6,A3); hence thesis by A2,A5; end; end; theorem Th71: for F being FinSequence of REAL holds Sum F = addreal $$ F proof set g = addreal, h = addcomplex; let F be FinSequence of REAL; rng F c= COMPLEX by NUMBERS:11,XBOOLE_1:1; then reconsider f = F as FinSequence of COMPLEX by FINSEQ_1:def 4; defpred P[Nat] means g $$ (finSeg $1,[#](F,the_unity_wrt g)) = h $$ (finSeg $1,[#](f,the_unity_wrt h)); consider n being Nat such that A1: dom f = Seg n by FINSEQ_1:def 2; A2: g $$ F = g $$ (finSeg n,[#](F,the_unity_wrt g)) & h $$ f = h $$ (finSeg n, [#](f,the_unity_wrt h)) by A1,SETWOP_2:def 2; A3: for k being Nat st P[k] holds P[k+1] proof set j = [#](f,the_unity_wrt h); set i = [#](F,the_unity_wrt g); let k be Nat; assume A4: P[k]; reconsider k as Element of NAT by ORDINAL1:def 12; A5: i.(k+1) = j.(k+1) proof per cases; suppose A6: k+1 in dom f; then j.(k+1) = F.(k+1) by SETWOP_2:20 .= i.(k+1) by A6,SETWOP_2:20; hence thesis; end; suppose A7: not k+1 in dom f; then j.(k+1) = the_unity_wrt h by SETWOP_2:20 .= i.(k+1) by A7,BINOP_2:1,2,SETWOP_2:20; hence thesis; end; end; A8: not (k + 1) in Seg k by FINSEQ_3:8; g $$ (finSeg (k+1),i) = g $$ (finSeg k \/ {.k+1.},i) by FINSEQ_1:9 .= g.(g $$(finSeg k,i),i.(k+1)) by A8,SETWOP_2:2 .= g $$(finSeg k,i) + (i.(k+1)) by BINOP_2:def 9 .= h.(h $$(finSeg k,j),j.(k+1)) by A4,A5,BINOP_2:def 3 .= h $$ (finSeg k \/ {.k+1.},j) by A8,SETWOP_2:2 .= h $$ (finSeg (k+1),j) by FINSEQ_1:9; hence thesis; end; A9: Seg 0 = {}.NAT; then g $$ (finSeg 0,[#](F,the_unity_wrt g)) = the_unity_wrt h by BINOP_2:1,2 ,SETWISEO:31 .= h $$ (finSeg 0,[#](f,the_unity_wrt h)) by A9,SETWISEO:31; then A10: P[0]; for k being Nat holds P[k] from NAT_1:sch 2(A10,A3); then g $$ F = h $$ f by A2; hence thesis by Def10; end; definition let F be FinSequence of COMPLEX; redefine func Sum F -> Element of COMPLEX equals addcomplex $$ F; coherence by XCMPLX_0:def 2; compatibility by Def10; end; definition let F be FinSequence of REAL; redefine func Sum F -> Element of REAL equals addreal $$ F; coherence by XREAL_0:def 1; compatibility by Th71; end; theorem Th72: Sum(<*> REAL) = 0 by BINOP_2:2,FINSOP_1:10; theorem Sum <*r*> = r proof reconsider r as Element of REAL by XREAL_0:def 1; Sum <*r*> = r by FINSOP_1:11; hence thesis; end; theorem Th74: Sum(F^<*r*>) = Sum F + r proof reconsider s=r as Element of REAL by XREAL_0:def 1; reconsider F1=F as FinSequence of REAL by Lm2; thus Sum(F^<*r*>) = Sum(F1^<*s*>) .= addreal.(addreal $$ F1,s) by FINSOP_1:4 .= Sum F1 + r by BINOP_2:def 9 .= Sum F + r; end; theorem Th75: Sum(F1^F2) = Sum F1 + Sum F2 proof reconsider F3=F1,F4=F2 as FinSequence of REAL by Lm2; thus Sum(F1^F2) = Sum(F3^F4) .= addreal.(addreal $$ F3,addreal $$ F4) by FINSOP_1:5 .= Sum F3 + Sum F4 by BINOP_2:def 9 .= Sum F1 + Sum F2; end; theorem Sum(<*r*>^F) = r + Sum F proof reconsider s=r as Element of REAL by XREAL_0:def 1; thus Sum(<*r*>^F) = Sum <*s*> + Sum F by Th75 .= r + Sum F by FINSOP_1:11; end; theorem Th77: Sum<*r1,r2*> = r1 + r2 proof reconsider s1=r1 as Element of REAL by XREAL_0:def 1; thus Sum<*r1,r2*> = Sum<*s1*> + r2 by Th74 .= r1 + r2 by FINSOP_1:11; end; theorem Th78: Sum<*r1,r2,r3*> = r1 + r2 + r3 proof thus Sum<*r1,r2,r3*> = Sum<*r1,r2*> + r3 by Th74 .= r1 + r2 + r3 by Th77; end; theorem for R being Element of 0-tuples_on REAL holds Sum R = 0 by Th72; theorem Th80: Sum(i |-> r) = i*r proof reconsider r as Element of REAL by XREAL_0:def 1; defpred P[Nat] means Sum($1 |->r) = $1*r; A1: for i st P[i] holds P[(i+1)] proof let i such that A2: Sum(i |-> r) = i*r; thus Sum((i+1) |-> r) = Sum((i |-> r)^<*r*>) by FINSEQ_2:60 .= i*r + 1*r by A2,Th74 .= (i+1)*r; end; A3: P[0] by Th72; for i holds P[i] from NAT_1:sch 2(A3,A1); hence thesis; end; theorem Th81: Sum(i |-> (0 qua Real)) = 0 proof thus Sum(i |-> (0 qua Real)) = i*(0 qua Element of NAT) by Th80 .= 0; end; theorem Th82: (for j st j in Seg i holds R1.j <= R2.j) implies Sum R1 <= Sum R2 proof defpred P[Nat] means for R1,R2 being Element of $1-tuples_on REAL st for j st j in Seg $1 holds R1.j <= R2.j holds Sum R1 <= Sum R2; A1: for i st P[i] holds P[i+1] proof let i such that A2: for R1,R2 being Element of i-tuples_on REAL st for j st j in Seg i holds R1.j <= R2.j holds Sum R1 <= Sum R2; set n = i+1; let R1,R2 be Element of (i+1)-tuples_on REAL such that A3: for j st j in Seg (i+1) holds R1.j <= R2.j; consider R19 being (Element of i-tuples_on REAL), x1 such that A4: R1 = R19^<*x1*> by FINSEQ_2:117; consider R29 being (Element of i-tuples_on REAL), x2 such that A5: R2 = R29^<*x2*> by FINSEQ_2:117; for j st j in Seg i holds R19.j <= R29.j proof let j such that A6: j in Seg i; Seg len R29 = dom R29 & len R29 = i by CARD_1:def 7,FINSEQ_1:def 3; then A7: R29.j = R2.j by A5,A6,FINSEQ_1:def 7; Seg len R19 = dom R19 & len R19 = i by CARD_1:def 7,FINSEQ_1:def 3; then R19.j = R1.j by A4,A6,FINSEQ_1:def 7; hence thesis by A3,A6,A7,FINSEQ_2:8; end; then A8: Sum R19 <= Sum R29 by A2; A9: R2.n = x2 by A5,FINSEQ_2:116; R1.n = x1 by A4,FINSEQ_2:116; then A10: x1 <= x2 by A3,A9,FINSEQ_1:4; A11: Sum R2 = Sum R29 + x2 by A5,Th74; Sum R1 = Sum R19 + x1 by A4,Th74; hence thesis by A10,A8,A11,XREAL_1:7; end; A12: P[0]; for i holds P[i] from NAT_1:sch 2(A12,A1); hence thesis; end; theorem Th83: (for j st j in Seg i holds R1.j <= R2.j) & (ex j st j in Seg i & R1.j < R2.j) implies Sum R1 < Sum R2 proof defpred P[Nat] means for R1,R2 be Element of $1-tuples_on REAL st (for j st j in Seg $1 holds R1.j <= R2.j) & (ex j st j in Seg $1 & R1.j < R2.j) holds Sum R1 < Sum R2; now let i such that A1: P[i]; let R1,R2 be Element of (i+1)-tuples_on REAL such that A2: for j st j in Seg (i+1) holds R1.j <= R2.j; given j such that A3: j in Seg (i+1) and A4: R1.j < R2.j; consider R19 being (Element of i-tuples_on REAL), x1 such that A5: R1 = R19^<*x1*> by FINSEQ_2:117; consider R29 being (Element of i-tuples_on REAL), x2 such that A6: R2 = R29^<*x2*> by FINSEQ_2:117; A7: for j st j in Seg i holds R19.j <= R29.j proof let j such that A8: j in Seg i; Seg len R29 = dom R29 & len R29 = i by CARD_1:def 7,FINSEQ_1:def 3; then A9: R29.j = R2.j by A6,A8,FINSEQ_1:def 7; Seg len R19 = dom R19 & len R19 = i by CARD_1:def 7,FINSEQ_1:def 3; then R19.j = R1.j by A5,A8,FINSEQ_1:def 7; hence thesis by A2,A8,A9,FINSEQ_2:8; end; A10: R2.(i+1) = x2 by A6,FINSEQ_2:116; A11: R1.(i+1) = x1 by A5,FINSEQ_2:116; now per cases by A3,FINSEQ_2:7; suppose A12: j in Seg i; Seg len R29 = dom R29 & len R29 = i by CARD_1:def 7,FINSEQ_1:def 3; then A13: R29.j = R2.j by A6,A12,FINSEQ_1:def 7; A14: Sum R1 = Sum R19 + x1 & Sum R2 = Sum R29 + x2 by A5,A6,Th74; A15: x1 <= x2 by A2,A11,A10,FINSEQ_1:4; Seg len R19 = dom R19 & len R19 = i by CARD_1:def 7,FINSEQ_1:def 3; then R19.j = R1.j by A5,A12,FINSEQ_1:def 7; then Sum R19 < Sum R29 by A1,A4,A7,A12,A13; hence Sum R1 < Sum R2 by A14,A15,XREAL_1:8; end; suppose A16: j = i+1; A17: Sum R2 = Sum R29 + x2 by A6,Th74; Sum R19 <= Sum R29 & Sum R1 = Sum R19 + x1 by A5,A7,Th74,Th82; hence Sum R1 < Sum R2 by A4,A11,A10,A16,A17,XREAL_1:8; end; end; hence Sum R1 < Sum R2; end; then A18: for i st P[i] holds P[i+1]; A19: P[0]; for i holds P[i] from NAT_1:sch 2(A19,A18); hence thesis; end; theorem Th84: (for i st i in dom F holds 0 <= F.i) implies 0 <= Sum F proof reconsider F1 = F as FinSequence of REAL by Lm2; set i = len F; set R1 = i|->(0 qua Real); reconsider R2 = F1 as Element of i-tuples_on REAL by FINSEQ_2:92; A1: Seg len F = dom F by FINSEQ_1:def 3; assume A2: for i st i in dom F holds 0 <= F.i; for j st j in Seg i holds R1.j <= R2.j by A2,A1; then Sum R1 <= Sum R2 by Th82; hence thesis by Th81; end; theorem Th85: (for i st i in dom F holds 0 <= F.i) & (ex i st i in dom F & 0 < F.i) implies 0 < Sum F proof reconsider F1 = F as FinSequence of REAL by Lm2; set i = len F, R1 = i|->(0 qua Real); reconsider R2 = F1 as Element of i-tuples_on REAL by FINSEQ_2:92; A1: Seg len F = dom F by FINSEQ_1:def 3; assume A2: for i st i in dom F holds 0 <= F.i; A3: for j st j in Seg i holds R1.j <= R2.j by A2,A1; given j such that A5: j in dom F and A6: 0 < F.j; R1.j = 0; then Sum R1 < Sum R2 by A1,A3,A5,A6,Th83; hence thesis by Th81; end; theorem Th86: 0 <= Sum sqr F proof now let i such that i in dom sqr F; 0 <= (F.i)^2 by XREAL_1:63; hence 0 <= (sqr F).i by VALUED_1:11; end; hence thesis by Th84; end; theorem Th87: Sum(r*F) = r*(Sum F) proof reconsider F1=F as FinSequence of REAL by Lm2; reconsider s=r as Element of REAL by XREAL_0:def 1; set rM = multreal[;](s,id REAL); thus Sum (r*F) = rM.(addreal $$ F1) by Th3,Th8,SETWOP_2:30 .= r*(Sum F1) by Lm1 .= r*(Sum F); end; theorem Th88: Sum -F = -(Sum F) proof reconsider F1=F as FinSequence of REAL by Lm2; thus Sum -F = compreal.(addreal $$ F1) by Th8,Th9,SETWOP_2:31 .= -(Sum F1) by BINOP_2:def 7 .= -(Sum F); end; theorem Th89: Sum(R1 + R2) = Sum R1 + Sum R2 proof thus Sum(R1 + R2) = addreal.(addreal$$R1,addreal$$R2) by SETWOP_2:35 .= Sum R1 + Sum R2 by BINOP_2:def 9; end; theorem Th90: Sum(R1 - R2) = Sum R1 - Sum R2 proof thus Sum(R1 - R2)= Sum R1 + Sum -R2 by Th89 .= Sum R1 +- Sum R2 by Th88 .= Sum R1 - Sum R2; end; theorem Sum sqr R = 0 implies R = i |-> 0 proof assume A1: Sum sqr R = 0; A2: len R = i by CARD_1:def 7; A3: len(i |-> 0) = i by CARD_1:def 7; assume R <> i |-> 0; then consider j such that A4: j in dom R and A5: R.j <> (i |-> 0).j by A2,A3,FINSEQ_2:9; set x = R.j,x9 = (sqr R).j; A6: dom R = Seg len R by FINSEQ_1:def 3; x <> 0 by A5; then 0 < x^2 by SQUARE_1:12; then A7: 0 < x9 by VALUED_1:11; A8: now let k such that k in dom sqr R; set r = (sqr R).k; set x = R.k; 0 <= x^2 by XREAL_1:63; hence 0 <= r by VALUED_1:11; end; dom sqr R = Seg len sqr R by FINSEQ_1:def 3; then j in dom sqr R by A4,A6,FINSEQ_2:33; hence thesis by A1,A8,A7,Th85; end; theorem (Sum mlt(R1,R2))^2 <= (Sum sqr R1)*(Sum sqr R2) proof defpred P[Nat] means for R1,R2 being Element of $1-tuples_on REAL holds (Sum mlt(R1,R2))^2 <= (Sum sqr R1)*(Sum sqr R2); A1: for i st P[i] holds P[i+1] proof let i such that A2: for R1,R2 being Element of i-tuples_on REAL holds (Sum mlt(R1,R2)) ^2 <= (Sum sqr R1)*(Sum sqr R2); let R1,R2 be Element of (i+1)-tuples_on REAL; consider R19 being (Element of i-tuples_on REAL), x1 such that A3: R1 = R19^<*x1*> by FINSEQ_2:117; consider R29 being (Element of i-tuples_on REAL), x2 such that A4: R2 = R29^<*x2*> by FINSEQ_2:117; A5: Sum sqr (R^<*r*>) = Sum sqr R + r^2 proof reconsider s=r as Element of REAL by XREAL_0:def 1; sqr(R^<*s*>) = (sqrreal*R)^<*sqrreal.s*> by FINSEQOP:8 .= (sqr R)^<*r^2*> by Def2; hence thesis by Th74; end; then A6: (Sum sqr R29 + x2^2) = Sum sqr R2 by A4; (Sum mlt(R19,R29))^2 + (0 qua Element of NAT) <= (Sum sqr R19)*(Sum sqr R29) by A2; then A7: 0 <= (Sum sqr R19)*(Sum sqr R29) - (Sum mlt(R19,R29))^2 by XREAL_1:19; mlt(R19^<*x1*>,R29^<*x2*>) = (multreal.:(R19,R29))^<*multreal.(x1,x2) *> by FINSEQOP:10 .= (mlt(R19,R29))^<*x1*x2*> by BINOP_2:def 11; then A8: Sum mlt(R19^<*x1*>,R29^<*x2*>) = Sum mlt(R19,R29) + x1*x2 by Th74; A9: 2*(x1*x2)*Sum mlt(R19,R29) = 2*((x1*x2)*Sum mlt(R19,R29)) .= 2*Sum((x1*x2)*mlt(R19,R29)) by Th87 .= 2*Sum(x1*(x2*mlt(R19,R29))) by RFUNCT_1:17 .= 2*Sum(x1*mlt(R29,x2*R19)) by RFUNCT_1:12 .= 2*Sum(mlt(x1*R29,x2*R19)) by FINSEQOP:26; A10: -(Sum mlt(R19,R29)+x1*x2)^2 = -(x1*x2)^2+-(2*(x1*x2)*Sum mlt(R19,R29) +(Sum mlt(R19,R29))^2) .= -x1^2*x2^2+(-(Sum mlt(R19,R29))^2+ -2*Sum(mlt(x1*R29,x2*R19))) by A9; A11: 0 <= Sum sqr (x1*R29-x2*R19) by Th86; A12: (Sum sqr R19 + x1^2)*(Sum sqr R29 + x2^2) = (Sum sqr R19)*(Sum sqr R29 )+(x1^2*(Sum sqr R29)+(Sum sqr R19)*x2^2)+x1^2*x2^2 .= (Sum sqr R19)*(Sum sqr R29)+(Sum(x1^2*sqr R29)+(Sum sqr R19)*x2^2)+ x1^2*x2^2 by Th87 .= (Sum sqr R19)*(Sum sqr R29)+(Sum sqr(x1*R29)+x2^2*(Sum sqr R19))+x1 ^2*x2^2 by Th58 .= (Sum sqr R19)*(Sum sqr R29)+(Sum sqr(x1*R29)+Sum (x2^2*sqr R19))+x1 ^2*x2^2 by Th87 .= (Sum sqr R19)*(Sum sqr R29)+(Sum sqr(x1*R29)+Sum sqr(x2*R19))+x1^2* x2^2 by Th58; A13: Sum sqr(x1*R29)+Sum sqr(x2*R19) + -2*Sum(mlt(x1*R29,x2*R19)) = Sum sqr(x1*R29)-2*Sum(mlt(x1*R29,x2*R19))+Sum sqr(x2*R19) .= Sum sqr(x1*R29)-Sum(2*mlt(x1*R29,x2*R19))+Sum sqr(x2*R19) by Th87 .= Sum(sqr(x1*R29)-2*mlt(x1*R29,x2*R19))+Sum sqr(x2*R19) by Th90 .= Sum(sqr (x1*R29)-2*mlt(x1*R29,x2*R19)+sqr(x2*R19)) by Th89; (Sum sqr R19 + x1^2) = Sum sqr R1 by A3,A5; then (Sum sqr R1)*(Sum sqr R2) - (Sum mlt(R1,R2))^2 = (Sum sqr R19 + x1^2) *(Sum sqr R29 + x2^2) + -(Sum mlt(R19,R29)+x1*x2)^2 by A3,A4,A8,A6 .= (Sum sqr R19)*(Sum sqr R29)+-(Sum mlt(R19,R29))^2 + ((Sum sqr(x1* R29)+Sum sqr(x2*R19)) +- 2*Sum(mlt(x1*R29,x2*R19))) by A12,A10 .= (Sum sqr R19)*(Sum sqr R29)-(Sum mlt(R19,R29))^2 + Sum sqr (x1*R29- x2*R19) by A13,Th69; then (Sum mlt(R1,R2))^2 + (0 qua Element of NAT) <= (Sum sqr R1)*(Sum sqr R2) by A7,A11,XREAL_1:19; hence thesis; end; A14: P[0]; for i holds P[i] from NAT_1:sch 2(A14,A1); hence thesis; end; definition let F be complex-valued FinSequence; func Product F -> complex number means :Def13: ex f being FinSequence of COMPLEX st f = F & it = multcomplex $$ f; existence proof rng F c= COMPLEX by VALUED_0:def 1; then reconsider f = F as FinSequence of COMPLEX by FINSEQ_1:def 4; take multcomplex $$ f; thus thesis; end; uniqueness; end; registration let F be real-valued FinSequence; cluster Product F -> real; coherence proof set mc = multcomplex; consider f being FinSequence of COMPLEX such that A1: f = F and A2: Product F = multcomplex $$ f by Def13; set g = [#](f,the_unity_wrt mc); defpred P[Nat] means mc $$ (finSeg $1,[#](f,the_unity_wrt mc)) is real; A3: for k being Nat st P[k] holds P[k+1] proof let k be Nat; assume A4: P[k]; reconsider k as Element of NAT by ORDINAL1:def 12; g.(k+1) is real proof per cases; suppose k+1 in dom f; then g.(k+1) = f.(k+1) by SETWOP_2:20; hence thesis by A1; end; suppose not k+1 in dom f; hence thesis by BINOP_2:6,SETWOP_2:20; end; end; then reconsider a = g.(k+1), b = mc $$(finSeg k,g) as real number by A4; not (k + 1) in Seg k by FINSEQ_3:8; then mc $$ (finSeg k \/ {.k+1.},g) = mc.(mc $$(finSeg k,g),g.(k+1)) by SETWOP_2:2 .= b * a by BINOP_2:def 5; hence thesis by FINSEQ_1:9; end; A5: mc $$ f = mc $$ (findom f,[#](f,the_unity_wrt mc)) & ex n being Nat st dom f = Seg n by FINSEQ_1:def 2,SETWOP_2:def 2; Seg 0 = {}.NAT; then A6: P[0] by BINOP_2:6,SETWISEO:31; for n being Nat holds P[n] from NAT_1:sch 2(A6,A3); hence thesis by A2,A5; end; end; theorem Th93: for F being FinSequence of REAL holds Product F = multreal $$ F proof set g = multreal, h = multcomplex; let F be FinSequence of REAL; rng F c= COMPLEX by NUMBERS:11,XBOOLE_1:1; then reconsider f = F as FinSequence of COMPLEX by FINSEQ_1:def 4; defpred P[Nat] means g $$ (finSeg $1,[#](F,the_unity_wrt g)) = h $$ (finSeg $1,[#](f,the_unity_wrt h)); consider n being Nat such that A1: dom f = Seg n by FINSEQ_1:def 2; A2: g $$ F = g $$ (finSeg n,[#](F,the_unity_wrt g)) & h $$ f = h $$ (finSeg n, [#](f,the_unity_wrt h)) by A1,SETWOP_2:def 2; A3: for k being Nat st P[k] holds P[k+1] proof set j = [#](f,the_unity_wrt h); set i = [#](F,the_unity_wrt g); let k be Nat; assume A4: P[k]; A5: i.(k+1) = j.(k+1) proof per cases; suppose A6: k+1 in dom f; then j.(k+1) = F.(k+1) by SETWOP_2:20 .= i.(k+1) by A6,SETWOP_2:20; hence thesis; end; suppose A7: not k+1 in dom f; then j.(k+1) = the_unity_wrt h by SETWOP_2:20 .= i.(k+1) by A7,BINOP_2:6,7,SETWOP_2:20; hence thesis; end; end; A8: not (k + 1) in Seg k by FINSEQ_3:8; reconsider k as Element of NAT by ORDINAL1:def 12; g $$ (finSeg (k+1),i) = g $$ (finSeg k \/ {.k+1.},i) by FINSEQ_1:9 .= g.(g $$(finSeg k,i),i.(k+1)) by A8,SETWOP_2:2 .= g $$(finSeg k,i) * (i.(k+1)) by BINOP_2:def 11 .= h.(h $$(finSeg k,j),j.(k+1)) by A4,A5,BINOP_2:def 5 .= h $$ (finSeg k \/ {.k+1.},j) by A8,SETWOP_2:2 .= h $$ (finSeg (k+1),j) by FINSEQ_1:9; hence thesis; end; A9: Seg 0 = {}.NAT; then g $$ (finSeg 0,[#](F,the_unity_wrt g)) = the_unity_wrt h by BINOP_2:6,7 ,SETWISEO:31 .= h $$ (finSeg 0,[#](f,the_unity_wrt h)) by A9,SETWISEO:31; then A10: P[0]; for k being Nat holds P[k] from NAT_1:sch 2(A10,A3); then g $$ F = h $$ f by A2; hence thesis by Def13; end; definition let F be FinSequence of COMPLEX; redefine func Product F -> Element of COMPLEX equals multcomplex $$ F; coherence by XCMPLX_0:def 2; compatibility by Def13; end; definition let F be FinSequence of REAL; redefine func Product F -> Element of REAL equals multreal $$ F; coherence by XREAL_0:def 1; compatibility by Th93; end; Lm3: for F being empty FinSequence holds Product F = 1 proof Product <*>REAL = 1 by BINOP_2:7,FINSOP_1:10; hence thesis; end; theorem Th94: Product <*>REAL = 1 by Lm3; registration let r be complex number; cluster <*r*> -> complex-valued; coherence proof reconsider p = r as Element of COMPLEX by XCMPLX_0:def 2; reconsider f = <*p*> as FinSequence of COMPLEX; f is FinSequence-like; hence thesis; end; end; registration let r1, r2 be complex number; cluster <*r1, r2*> -> complex-valued; coherence proof reconsider p1 = r1, p2 = r2 as Element of COMPLEX by XCMPLX_0:def 2; reconsider f = <*p1,p2*> as FinSequence of COMPLEX; f is FinSequence-like; hence thesis; end; end; registration let r1, r2, r3 be complex number; cluster <*r1, r2, r3*> -> complex-valued; coherence proof reconsider p1 = r1, p2 = r2, p3 = r3 as Element of COMPLEX by XCMPLX_0:def 2; reconsider f = <*p1,p2,p3*> as FinSequence of COMPLEX; f is FinSequence-like; hence thesis; end; end; theorem Th95: for r being complex number holds Product <*r*> = r proof let r be complex number; reconsider r9 = r as Element of COMPLEX by XCMPLX_0:def 2; reconsider F = <*r9*> as FinSequence of COMPLEX; multcomplex $$ F = r by FINSOP_1:11; hence thesis by Def13; end; registration let f, g be complex-valued FinSequence; cluster f ^ g -> complex-valued; coherence proof A1: rng (f ^ g) = rng f \/ rng g by FINSEQ_1:31; rng f c= COMPLEX & rng g c= COMPLEX by VALUED_0:def 1; then rng (f ^ g) c= COMPLEX by A1,XBOOLE_1:8; hence thesis by VALUED_0:def 1; end; end; theorem Th96: for F being complex-valued FinSequence, r being complex number holds Product (F^<*r*>) = Product F * r proof let F be complex-valued FinSequence, r be complex number; reconsider p = r as Element of COMPLEX by XCMPLX_0:def 2; rng F c= COMPLEX & rng (F^<*p*>) c= COMPLEX by VALUED_0:def 1; then reconsider Fr = F^<*r*>, Ff = F as FinSequence of COMPLEX by FINSEQ_1:def 4; thus Product (F^<*r*>) = multcomplex $$ Fr by Def13 .= multcomplex.(Product Ff,p) by FINSOP_1:4 .= Product F * r by BINOP_2:def 5; end; theorem Th97: for F1, F2 being complex-valued FinSequence holds Product (F1^F2) = Product F1 * Product F2 proof let F1, F2 be complex-valued FinSequence; A1: rng (F1^F2) c= COMPLEX by VALUED_0:def 1; rng F1 c= COMPLEX & rng F2 c= COMPLEX by VALUED_0:def 1; then reconsider FF = F1^F2, f1 = F1, f2 = F2 as FinSequence of COMPLEX by A1,FINSEQ_1:def 4; thus Product (F1^F2) = multcomplex $$ FF by Def13 .= multcomplex.(Product f1,Product f2) by FINSOP_1:5 .= Product F1 * Product F2 by BINOP_2:def 5; end; theorem Product (<*r*>^F) = r * Product F proof thus Product (<*r*>^F) = Product <*r*> * Product F by Th97 .= r * Product F by Th95; end; theorem Th99: for r1, r2 being complex number holds Product <*r1,r2*> = r1 * r2 proof let r1, r2 be complex number; thus Product <*r1,r2*> = Product <*r1*> * r2 by Th96 .= r1 * r2 by Th95; end; theorem for r1, r2, r3 being complex number holds Product <*r1,r2,r3*> = r1 * r2 * r3 proof let r1, r2, r3 be complex number; thus Product <*r1,r2,r3*> = Product <*r1,r2*> * r3 by Th96 .= r1 * r2 * r3 by Th99; end; theorem for R being Element of 0-tuples_on REAL holds Product R = 1 by Lm3; theorem Product (i|->1) = 1 proof Product (i |-> the_unity_wrt multreal) = the_unity_wrt multreal by SETWOP_2:25; hence thesis by BINOP_2:7; end; Lm4: for p being complex-valued FinSequence st len p <> 0 ex q being complex-valued FinSequence, d being complex number st p = q^<*d*> proof let p be complex-valued FinSequence; assume len p <> 0; then consider q being FinSequence,d being set such that A1: p = q^<*d*> by CARD_1:27,FINSEQ_1:46; rng p c= COMPLEX by VALUED_0:def 1; then A2: p is FinSequence of COMPLEX by FINSEQ_1:def 4; for i st i in dom q holds q.i in COMPLEX proof let i; assume i in dom q; then p.i = q.i & i in dom p by A1,FINSEQ_1:def 7,FINSEQ_2:15; hence thesis by A2,FINSEQ_2:11; end; then A3: q is FinSequence of COMPLEX by FINSEQ_2:12; len p = len q + 1 by A1,FINSEQ_2:16; then p.(len p) = d by A1,FINSEQ_1:42; hence thesis by A1,A3; end; theorem for F being complex-valued FinSequence holds (ex k st k in dom F & F.k = 0) iff Product F = 0 proof defpred P[Nat] means for F being complex-valued FinSequence st len F = $1 holds (ex k st k in Seg $1 & F.k = 0) iff Product F = 0; let F be complex-valued FinSequence; A1: Seg len F = dom F by FINSEQ_1:def 3; A2: for i st P[i] holds P[i+1] proof let i such that A3: for F being complex-valued FinSequence st len F = i holds (ex k st k in Seg i & F.k = 0) iff Product F = 0; let F be complex-valued FinSequence; assume A4: len F = i+1; then consider F9 being complex-valued FinSequence, x being complex number such that A5: F = F9^<*x*> by Lm4; A6: len F = len F9 + 1 by A5,FINSEQ_2:16; A7: Product F = Product F9 * x by A5,Th96; thus (ex k st k in Seg (i+1) & F.k = 0) implies Product F = 0 proof given k such that A8: k in Seg (i+1) and A9: F.k = 0; now per cases by A8,FINSEQ_2:7; suppose A10: k in Seg i; Seg len F9 = dom F9 by FINSEQ_1:def 3; then F9.k = F.k by A4,A5,A6,A10,FINSEQ_1:def 7; then Product F9 = 0 by A3,A4,A6,A9,A10; hence thesis by A7; end; suppose k = i+1; then x = 0 by A4,A5,A6,A9,FINSEQ_1:42; hence thesis by A7; end; end; hence thesis; end; assume A11: Product F = 0; per cases by A7,A11; suppose Product F9 = 0; then consider k such that A12: k in Seg i and A13: F9.k = 0 by A3,A4,A6; Seg len F9 = dom F9 by FINSEQ_1:def 3; then F.k = 0 by A4,A5,A6,A12,A13,FINSEQ_1:def 7; hence thesis by A12,FINSEQ_2:8; end; suppose x = 0; then F.(i+1) = 0 by A4,A5,A6,FINSEQ_1:42; hence thesis by FINSEQ_1:4; end; end; A14: P[0] proof let F be complex-valued FinSequence; assume len F = 0; then F = <*>COMPLEX; hence thesis by Th94; end; for i holds P[i] from NAT_1:sch 2(A14,A2); hence thesis by A1; end; theorem Product ((i+j) |->r ) = (Product (i|->r))*(Product (j|->r)) proof reconsider s=r as Element of REAL by XREAL_0:def 1; Product ((i+j) |->s) = multreal.(multreal$$(i|->s),multreal$$(j|->s)) by SETWOP_2:26 .= (Product (i|->s))*(Product (j|->s)) by BINOP_2:def 11; hence thesis; end; theorem Product ((i*j) |->r) = Product (j |-> (Product (i|->r))) proof reconsider r as Element of REAL by XREAL_0:def 1; Product ((i*j) |->r) = Product (j |-> (Product (i|->r))) by SETWOP_2:27; hence thesis; end; theorem Product (i|->(r1*r2)) = (Product (i|->r1))*(Product (i|->r2)) proof reconsider s1=r1, s2=r2 as Element of REAL by XREAL_0:def 1; Product (i|->(s1*s2)) = multreal$$(i|->multreal.(s1,s2)) by BINOP_2:def 11 .= multreal.(multreal$$(i|->s1),multreal$$(i|->s2)) by SETWOP_2:36 .= (Product (i|->s1))*(Product (i|->s2)) by BINOP_2:def 11; hence thesis; end; theorem Th107: Product mlt(R1,R2) = Product R1 * Product R2 proof thus Product (mlt(R1,R2)) = multreal.(multreal$$R1,multreal$$R2) by SETWOP_2:35 .= Product R1 * Product R2 by BINOP_2:def 11; end; theorem Product (r*R) = Product (i|->r) * Product R proof reconsider s=r as Element of REAL by XREAL_0:def 1; thus Product (r*R) = Product mlt(i|->s,R) by Th63 .= Product (i|->r) * Product R by Th107; end; theorem Product sqr R = (Product R)^2 by Th107; begin reserve z,z1,z2 for Element of COMPLEX; theorem for F being FinSequence of COMPLEX holds Product F = multcomplex $$ F; theorem Product ((i+j) |->z) = (Product (i|->z))*(Product (j|->z)) proof thus Product ((i+j) |->z) = multcomplex.(multcomplex$$(i|->z),multcomplex$$(j |->z)) by SETWOP_2:26 .= (Product (i|->z))*(Product (j|->z)) by BINOP_2:def 5; end; theorem Product ((i*j) |->z) = Product (j |-> (Product (i|->z))) by SETWOP_2:27; theorem Product (i|->(z1*z2)) = (Product (i|->z1))*(Product (i|->z2)) proof thus Product (i|->(z1*z2)) = multcomplex$$(i|->multcomplex.(z1,z2)) by BINOP_2:def 5 .= multcomplex.(multcomplex$$(i|->z1),multcomplex$$(i|->z2)) by SETWOP_2:36 .= (Product (i|->z1))*(Product (i|->z2)) by BINOP_2:def 5; end; begin reserve n for Nat, x, y, a for real number, p, p1, p2, p3, q, q1, q2 for Element of n-tuples_on REAL; theorem Th114: for x being real-valued FinSequence holds len (-x)=len x proof let x be real-valued FinSequence; dom (-x)=dom x by VALUED_1:8; hence thesis by FINSEQ_3:29; end; theorem Th115: for x1,x2 being real-valued FinSequence st len x1=len x2 holds len (x1+x2)=len x1 proof let x1,x2 be real-valued FinSequence; set n=len x1; A1: x2 is FinSequence of REAL by Lm2; x1 is FinSequence of REAL by Lm2; then reconsider z1=x1 as Element of (len x1)-tuples_on REAL by FINSEQ_2:92; assume len x1=len x2; then reconsider z2=x2 as Element of n-tuples_on REAL by A1,FINSEQ_2:92; dom (z1+z2)=Seg n by FINSEQ_2:124; hence thesis by FINSEQ_1:def 3; end; theorem Th116: for x1,x2 being real-valued FinSequence st len x1=len x2 holds len (x1-x2)=len x1 proof let x1,x2 be real-valued FinSequence; set n=len x1; A1: x2 is FinSequence of REAL by Lm2; x1 is FinSequence of REAL by Lm2; then reconsider z1=x1 as Element of (len x1)-tuples_on REAL by FINSEQ_2:92; assume len x1=len x2; then reconsider z2=x2 as Element of n-tuples_on REAL by A1,FINSEQ_2:92; dom (z1-z2)=Seg n by FINSEQ_2:124; hence thesis by FINSEQ_1:def 3; end; theorem Th117: for a being real number, x being real-valued FinSequence holds len (a*x)=len x proof let a be real number, x be real-valued FinSequence; set n=len x; x is FinSequence of REAL by Lm2; then reconsider z=x as Element of n-tuples_on REAL by FINSEQ_2:92; len (a*z)=n by CARD_1:def 7; hence thesis; end; theorem Th118: for x,y,z being real-valued FinSequence st len x=len y & len y=len z holds mlt(x+y,z) = mlt(x,z)+mlt(y,z) proof let x,y,z be real-valued FinSequence; A1:x is FinSequence of REAL & y is FinSequence of REAL & z is FinSequence of REAL by Lm2; assume len x=len y & len y=len z; then reconsider x2=x, y2=y, z2=z as Element of (len x)-tuples_on REAL by A1, FINSEQ_2:92; A2: dom (mlt(x+y,z))=Seg len(mlt(x2+y2,z2)) by FINSEQ_1:def 3 .=Seg len x by CARD_1:def 7 .=Seg len (mlt(x2,z2)+mlt(y2,z2)) by CARD_1:def 7 .= dom (mlt(x2,z2)+mlt(y2,z2)) by FINSEQ_1:def 3; A3: dom (mlt(x,z))=Seg len(mlt(x2,z2)) by FINSEQ_1:def 3 .=Seg len x by CARD_1:def 7 .=Seg len (mlt(x2,z2)+mlt(y2,z2)) by CARD_1:def 7 .= dom (mlt(x2,z2)+mlt(y2,z2)) by FINSEQ_1:def 3; for i being Nat st i in dom (mlt(x+y,z)) holds mlt(x+y,z).i=(mlt(x,z)+ mlt(y,z)).i proof let i be Nat; assume A4: i in dom mlt(x+y,z); set a=x.i, b=y.i, d=(x+y).i, e=z.i; len (x2+y2)=len x by CARD_1:def 7; then dom (x2+y2)=Seg len x by FINSEQ_1:def 3 .=Seg len(mlt(x2,z2)) by CARD_1:def 7 .=dom (mlt(x,z)) by FINSEQ_1:def 3; then A5: d=a+b by A2,A3,A4,VALUED_1:def 1; thus mlt(x+y,z).i=d*e by VALUED_1:5 .=a*e+b*e by A5 .=mlt(x,z).i +b*e by VALUED_1:5 .=mlt(x,z).i +mlt(y,z).i by VALUED_1:5 .=(mlt(x,z)+mlt(y,z)).i by A2,A4,VALUED_1:def 1; end; hence thesis by A2,FINSEQ_1:13; end; begin definition let x1,x2 be real-valued FinSequence; func |( x1,x2 )| -> real number equals Sum mlt(x1,x2); correctness; commutativity; end; definition let x1,x2 be real-valued FinSequence; redefine func |( x1,x2 )| -> Element of REAL; correctness; commutativity; end; theorem Th119: for x being real-valued FinSequence holds |(x,x)| >= 0 proof let x be real-valued FinSequence; set n=len x; x is FinSequence of REAL by Lm2; then reconsider w = x as Element of n-tuples_on REAL by FINSEQ_2:92; |(x, x)| = Sum sqr(w); hence thesis by Th86; end; theorem Th120: for x,y,z being real-valued FinSequence st len x=len y & len y=len z holds |((x+y),z)| = |(x,z)| + |(y,z)| proof let x,y,z be real-valued FinSequence; A1:x is FinSequence of REAL & y is FinSequence of REAL & z is FinSequence of REAL by Lm2; assume A2: len x=len y & len y=len z; then reconsider x2=x,y2=y,z2=z as Element of (len x)-tuples_on REAL by A1, FINSEQ_2:92; |((x+y),z)|= Sum(mlt(x,z)+mlt(y,z)) by A2,Th118 .= Sum(mlt(x2,z2))+Sum(mlt(y2,z2)) by Th89 .= |(x,z)| + |(y,z)|; hence thesis; end; theorem Th121: for x,y being real-valued FinSequence,a being real number st len x= len y holds |(a*x,y)| = a*|(x,y)| proof let x,y be real-valued FinSequence,a be real number; reconsider a2=a as Element of REAL by XREAL_0:def 1; A1:x is FinSequence of REAL & y is FinSequence of REAL by Lm2; assume len x=len y; then reconsider x2=x, y2 = y as Element of (len x)-tuples_on REAL by A1, FINSEQ_2:92; |(a*x,y)| =Sum(a2*mlt(x2,y2)) by FINSEQOP:26 .=a*|(x,y)| by Th87; hence thesis; end; theorem Th122: for x1,x2 being real-valued FinSequence st len x1=len x2 holds |(-x1, x2)| = -|(x1, x2)| proof let x1,x2 be real-valued FinSequence; assume len x1=len x2; then |(-x1, x2)| = (-1)*|(x1, x2)| by Th121; hence thesis; end; theorem for x1,x2 being real-valued FinSequence st len x1=len x2 holds |(-x1, -x2)| = |(x1, x2)| proof let x1,x2 be real-valued FinSequence; assume A1: len x1=len x2; then len (-x2)=len x1 by Th114; then |(-x1, -x2)| = -|(x1, -x2)| by Th122 .= --|(x1, x2)| by A1,Th122; hence thesis; end; theorem Th124: for x1,x2,x3 being real-valued FinSequence st len x1=len x2 & len x2 =len x3 holds |(x1-x2, x3)| = |(x1, x3)| - |(x2, x3)| proof let x1,x2,x3 be real-valued FinSequence; assume that A1: len x1=len x2 and A2: len x2=len x3; len (-x2)=len x2 by Th114; then |(x1 - x2, x3)| = |(x1, x3)| + |(-x2, x3)| by A1,A2,Th120 .= |(x1, x3)| + - |(x2, x3)| by A2,Th122; hence thesis; end; theorem for x,y being real number,x1,x2,x3 being real-valued FinSequence st len x1 =len x2 & len x2=len x3 holds |((x*x1+y*x2), x3)| = x*|(x1,x3)| + y*|(x2,x3)| proof let x,y be real number,x1,x2,x3 be real-valued FinSequence; assume that A1: len x1=len x2 and A2: len x2=len x3; len (x*x1)=len x1 & len (y*x2)=len x2 by Th117; then |(x*x1 + y*x2, x3)| = |(x*x1, x3)| + |(y*x2, x3)| by A1,A2,Th120 .= x*|(x1,x3)| + |(y*x2,x3)| by A1,A2,Th121 .= x*|(x1,x3)| + y*|(x2,x3)| by A2,Th121; hence thesis; end; theorem Th126: for x1,x2,y1,y2 being real-valued FinSequence st len x1=len x2 & len x2=len y1 & len y1=len y2 holds |(x1+x2, y1+y2)| = |(x1, y1)| + |(x1, y2)| + |( x2, y1)| + |(x2, y2)| proof let x1,x2,y1,y2 be real-valued FinSequence; assume that A1: len x1=len x2 and A2: len x2=len y1 and A3: len y1=len y2; |(x1+x2, y2)| = |(x1, y2)| + |(x2, y2)| by A1,A2,A3,Th120; then A4: |(x1+x2, y1)| +|(x1+x2, y2)| = (|(x1, y1)|+|(x2, y1)|) + (|(x1, y2)| + |(x2, y2)|) by A1,A2,Th120; len (x1+x2)=len x1 by A1,Th115; hence thesis by A1,A2,A3,A4,Th120; end; theorem Th127: for x1,x2,y1,y2 being real-valued FinSequence st len x1=len x2 & len x2=len y1 & len y1=len y2 holds |(x1-x2, y1-y2)| = |(x1, y1)| - |(x1, y2)| - |( x2, y1)| + |(x2, y2)| proof let x1,x2,y1,y2 be real-valued FinSequence; assume that A1: len x1=len x2 and A2: len x2=len y1 and A3: len y1=len y2; |(x1,y1-y2)| = |(x1,y1)| - |(x1,y2)| by A1,A2,A3,Th124; then A4: |(x1,y1-y2)| - |(x2,y1-y2)| = (|(x1,y1)|-|(x1,y2)|)-(|(x2,y1)|-|(x2,y2)| ) by A2,A3,Th124; len (y1 - y2)=len y1 by A3,Th116; hence thesis by A1,A2,A4,Th124; end; theorem for x,y being real-valued FinSequence st len x=len y holds |(x+y, x+ y)| = |(x, x)| + 2*|(x, y)| + |(y, y)| proof let x,y be real-valued FinSequence; A1: |(x, x)| + |(x, y)| + |(x, y)| = |(x, x)| + 2*|(x, y)|; assume len x=len y; hence thesis by A1,Th126; end; theorem for x,y being real-valued FinSequence st len x=len y holds |(x-y, x- y)| = |(x, x)| - 2*|(x, y)| + |(y, y)| proof let x,y be real-valued FinSequence; assume len x=len y; then |(x-y, x-y)| = |(x,x)| - |(x,y)| - |(y,x)| + |(y, y)| by Th127 .= |(x,x)| - 2*|(x,y)| + |(y, y)|; hence thesis; end; theorem Th130: |(p1 + p2, p3)| = |(p1, p3)| + |(p2, p3)| proof reconsider f1=p1, f2=p2, f3=p3 as real-valued FinSequence; len f2=n by CARD_1:def 7; then len f1=len f2 & len f2=len f3 by CARD_1:def 7; hence thesis by Th120; end; theorem Th131: for x being real number holds |(x*p1, p2)| = x*|(p1, p2)| proof let x be real number; reconsider f1=p1,f2=p2 as real-valued FinSequence; len f1=n & len f2=n by CARD_1:def 7; hence thesis by Th121; end; theorem Th132: |(-p1, p2)| = -|(p1, p2)| proof |(-p1, p2)| = |((-1)*p1, p2)| .= (-1)*|(p1, p2)| by Th131; hence thesis; end; theorem |(-p1, -p2)| = |(p1, p2)| proof |(-p1, -p2)| = -|(p1, -p2)| by Th132 .= --|(p1, p2)| by Th132; hence thesis; end; theorem Th134: |(p1-p2, p3)| = |(p1, p3)| - |(p2, p3)| proof |(p1 - p2, p3)| = |(p1, p3)| + |(-p2, p3)| by Th130 .= |(p1, p3)| + - |(p2, p3)| by Th132; hence thesis; end; theorem |((x*p1+y*p2), p3)| = x*|(p1,p3)| + y*|(p2,p3)| proof |(x*p1 + y*p2, p3)| = |(x*p1, p3)| + |(y*p2, p3)| by Th130 .= x*|(p1,p3)| + |(y*p2,p3)| by Th131 .= x*|(p1,p3)| + y*|(p2,p3)| by Th131; hence thesis; end; theorem Th136: |(p1+p2, q1+q2)| = |(p1, q1)| + |(p1, q2)| + |(p2, q1)| + |(p2, q2)| proof A1: |(p1+p2, q1)| = |(p1, q1)| + |(p2, q1)| & |(p1+p2, q2)| = |(p1, q2)| + |(p2, q2)| by Th130; |(p1+p2, q1+q2)| = |(p1+p2, q1)| + |(p1+p2, q2)| by Th130 .= |(p1, q1)|+|(p1, q2)|+|(p2, q1)|+|(p2, q2)| by A1; hence thesis; end; theorem Th137: |(p1-p2, q1-q2)| = |(p1, q1)| - |(p1, q2)| - |(p2, q1)| + |(p2, q2)| proof A1: |(p1,q1-q2)| = |(p1,q1)| - |(p1,q2)| & |(p2,q1-q2)| = |(p2,q1)| - |(p2, q2)| by Th134; |(p1-p2, q1-q2)| = |(p1, q1-q2)| - |(p2, q1-q2)| by Th134 .= |(p1,q1)|-|(p1,q2)|-|(p2,q1)|+|(p2,q2)| by A1; hence thesis; end; theorem |(p+q, p+q)| = |(p, p)| + 2*|(p, q)| + |(q, q)| proof |(p, p)| + |(p, q)| + |(p, q)| = |(p, p)| + 2*|(p, q)|; hence thesis by Th136; end; theorem Th139: |(p-q, p-q)| = |(p, p)| - 2*|(p, q)| + |(q, q)| proof |(p-q, p-q)| = |(p,p)| - |(p,q)| - |(p,q)| + |(q, q)| by Th137 .= |(p,p)| - 2*|(p,q)| + |(q, q)|; hence thesis; end; theorem |(p,q)| <= |(p,p)| + |(q,q)| proof 0 <= |(p,p)| & 0 <= |(q,q)| by Th119; then A1: 0/2 <= (|(p,p)| + |(q,q)|)/2; |(p-q, p-q)| = |(p,p)| - 2*|(p,q)| + |(q,q)| by Th139 .= |(p,p)| + |(q,q)| - 2*|(p,q)|; then 2*|(p,q)| <= |(p,p)| + |(q,q)| - 0 by Th119,XREAL_1:11; then (2*|(p,q)|)/2 <= (|(p,p)| + |(q,q)|)/2 by XREAL_1:72; then (0 qua Element of NAT) + |(p,q)| <= (|(p,p)| + |(q,q)|)/2 + (|(p,p)| + |(q,q)|)/2 by A1,XREAL_1:7; hence thesis; end; definition let p, q be real-valued FinSequence; pred p,q are_orthogonal means :Def17: |(p,q)| = 0; symmetry; end; theorem p, q are_orthogonal implies a*p,q are_orthogonal proof assume p, q are_orthogonal; then |(p,q)|=0 by Def17; then a*(|(p,q)|)=0; then |(a*p,q)|=0 by Th131; hence thesis by Def17; end; theorem Sum<*r1,r2,r3,r4*> = r1 + r2 + r3 + r4 proof thus Sum<*r1,r2,r3,r4*> = Sum<*r1,r2,r3*> + r4 by Th74 .= r1 + r2 + r3 + r4 by Th78; end; reserve f,g for FinSequence of REAL; theorem Th143: len f = len sqr f & dom f = dom sqr f proof rng f c= REAL & dom sqrreal = REAL by FUNCT_2:def 1; hence len f = len (sqrreal*f) by FINSEQ_2:29 .= len sqr f; hence thesis by FINSEQ_3:29; end; theorem sqr (f^g) = sqr f ^ sqr g proof A1: len f = len sqr f by Th143; A2: len sqr (f^g) = len (f^g) by Th143; A3: len g = len sqr g & len(f^g) = len f + len g by Th143,FINSEQ_1:22; A4: for i be Nat st 1 <= i & i <= len sqr (f^g) holds sqr (f^g).i = (sqr f ^ sqr g).i proof let i be Nat; assume that A5: 1 <= i and A6: i <= len sqr (f^g); A7: i in dom (f^g) by A2,A5,A6,FINSEQ_3:25; per cases; suppose A8: i in dom f; then A9: i in dom sqr f by Th143; thus sqr (f^g).i = (sqrreal*(f^g)).i .= sqrreal.((f^g).i) by A7,FUNCT_1:13 .= sqrreal.(f.i) by A8,FINSEQ_1:def 7 .= (f.i)^2 by Def2 .= (sqr f).i by VALUED_1:11 .= (sqr f ^ sqr g).i by A9,FINSEQ_1:def 7; end; suppose not i in dom f; then A10: len f < i by A5,FINSEQ_3:25; then reconsider j = i - len f as Element of NAT by INT_1:5; A11: i <= len(f^g) by A6,Th143; A12: i <= len(sqr f ^ sqr g) by A1,A3,A2,A6,FINSEQ_1:22; thus sqr (f^g).i = (sqrreal*(f^g)).i .= sqrreal.((f^g).i) by A7,FUNCT_1:13 .= sqrreal.(g.j) by A10,A11,FINSEQ_1:24 .= (g.j)^2 by Def2 .= (sqr g).j by VALUED_1:11 .= (sqr f ^ sqr g).i by A1,A10,A12,FINSEQ_1:24; end; end; len (sqr (f^g)) = len (sqr f ^ sqr g) by A1,A3,A2,FINSEQ_1:22; hence thesis by A4,FINSEQ_1:14; end; theorem for F being real-valued FinSequence holds F is FinSequence of REAL proof let F be real-valued FinSequence; thus rng F c= REAL; end; begin reserve i,j,k,n,m,l,s,t,r for Nat; reserve a,b for real number; reserve F,G,H for FinSequence of REAL; theorem Th1: n>=1 implies Seg n = {1} \/ {k where k is Element of NAT: 1=1; A2: {1} \/ {k where k is Element of NAT: 11; reconsider l = d as Element of NAT by A5; A7: l <= n by A5,FINSEQ_1:1; 1 <= l by A5,FINSEQ_1:1; then 1 = l or 1 x -> complex-yielding; coherence; end; definition let x be complex number, n be Nat; func x |^ n equals Product (n |-> x); coherence; end; registration let x be real number, n be Nat; cluster x |^ n -> real; coherence; end; definition let x be Real, n be Nat; redefine func x |^ n -> Real; coherence by XREAL_0:def 1; end; reserve z for complex number; registration let z be complex number, n be Nat; cluster z|^n -> complex; coherence; end; theorem z|^0 = 1 by RVSUM_1:94; theorem Th5: z|^1 = z proof thus z|^1 = Product(<*z*>) by FINSEQ_2:59 .= z by RVSUM_1:95; end; theorem Th6: z|^(s+1) = z|^s * z proof thus z|^(s+1) = Product((s |-> z) ^ <*z*>) by FINSEQ_2:60 .= z|^s*z by RVSUM_1:96; end; registration let x, n be Nat; cluster x|^n -> natural; coherence proof defpred P[Nat] means x|^$1 is natural; A1: for a being Nat st P[a] holds P[a+1] proof let a be Nat; assume P[a]; then reconsider b = x|^a as Nat; x|^(a+1) = b*x by Th6; hence thesis; end; A2: P[0] by RVSUM_1:94; for a being Nat holds P[a] from NAT_1:sch 2(A2,A1); hence thesis; end; end; reserve x,y for complex number; theorem (x*y) |^ s = x|^s * y|^s proof reconsider x, y as Element of COMPLEX by XCMPLX_0:def 2; x|^s*y|^s = Product(s |-> (x*y)) by RVSUM_1:113; hence thesis; end; theorem Th8: x|^(s+t) = x|^s * x|^t proof reconsider x as Element of COMPLEX by XCMPLX_0:def 2; x|^s*x|^t = Product((s+t) |-> x) by RVSUM_1:111; hence thesis; end; theorem (x|^s) |^ t = x|^(s*t) proof reconsider x as Element of COMPLEX by XCMPLX_0:def 2; x|^(s*t) = Product(t |-> x|^s) by RVSUM_1:112; hence thesis; end; theorem Th10: 1|^s = 1 proof defpred P[Nat] means 1|^$1 = 1; A1: now let s; assume P[s]; then 1|^(s+1) = 1 * 1 by Th6; hence P[s+1]; end; A2: P[0] by RVSUM_1:94; for s holds P[s] from NAT_1:sch 2(A2,A1); hence thesis; end; theorem Th11: s >= 1 implies 0|^s = 0 proof defpred P[Nat] means 0|^$1 = 0; A1: now let n be Nat; assume n>=1 & P[n]; 0|^(n+1) = 0|^n * 0 by Th6 .= 0; hence P[n+1]; end; A2: P[1] by Th5; for n be Nat st n >=1 holds P[n] from NAT_1:sch 8(A2,A1); hence thesis; end; registration let n be Nat; cluster idseq n -> natural-valued; coherence; end; definition let n be Nat; func n! -> Element of REAL equals Product idseq n; coherence by XREAL_0:def 1; end; registration let n be Nat; cluster n! -> real; coherence; end; theorem Th12: 0! = 1 by RVSUM_1:94; theorem 1! = 1 by FINSEQ_2:50,RVSUM_1:95; theorem 2! = 2 proof thus 2! = 1*2 by FINSEQ_2:52,RVSUM_1:99 .= 2; end; theorem Th15: (s+1)! = (s!) * (s+1) proof idseq (s+1) = idseq s ^ <* s+1 *> by FINSEQ_2:51; hence thesis by RVSUM_1:96; end; theorem Th16: s! is Element of NAT proof defpred P[Nat] means $1! is Element of NAT; A1: now let s; assume P[s]; then reconsider k=s! as Element of NAT; (s+1)! = (s+1) * k by Th15; hence P[s+1]; end; A2: P[0] by RVSUM_1:94; for s holds P[s] from NAT_1:sch 2(A2,A1); hence thesis; end; registration let n; cluster n! -> natural; coherence by Th16; end; theorem Th17: s! > 0 proof defpred P[Nat] means $1!>0; A1: now let s; assume P[s]; then (s+1) * (s!)>(s+1) * 0; hence P[s+1] by Th15; end; A2: P[0] by RVSUM_1:94; for s holds P[s] from NAT_1:sch 2(A2,A1); hence thesis; end; registration let n; cluster n! -> positive; coherence by Th17; end; theorem (s!) * (t!) <> 0; definition let k,n be Nat; func n choose k means :Def3: for l be Nat st l = n-k holds it = (n!)/((k!) * (l!)) if n >= k otherwise it = 0; consistency; existence proof thus n >= k implies ex r1 be set st for l being Nat st l = n-k holds r1 = (n!)/((k!) * (l!)) proof assume n >= k; then reconsider m = n-k as Element of NAT by INT_1:5; take (n!)/((k!)*(m!)); thus thesis; end; thus thesis; end; uniqueness proof let r1,r2 be set; thus n>=k & (for l being Nat st l = n-k holds r1 = (n!)/((k!) * (l!))) & ( for l being Nat st l = n-k holds r2 = (n!)/((k!) * (l!))) implies r1 = r2 proof assume n>=k; then reconsider m = n-k as Element of NAT by INT_1:5; assume that A1: for l being Nat st l = n-k holds r1 = (n!)/((k!) * (l!)) and A2: for l being Nat st l = n-k holds r2 = (n!)/((k!) * (l!)); r1 = (n!)/((k!) * (m!)) by A1; hence thesis by A2; end; thus thesis; end; end; registration let k,n be Nat; cluster n choose k -> real; coherence proof per cases; suppose A1: n >= k; then reconsider l = n-k as Element of NAT by INT_1:5; n choose k = (n!)/((k!) * (l!)) by A1,Def3; hence thesis; end; suppose n < k; hence thesis by Def3; end; end; end; definition let k,n be Nat; redefine func n choose k -> Real; coherence by XREAL_0:def 1; end; theorem Th19: s choose 0 = 1 proof reconsider m = s-0 as Element of NAT by ORDINAL1:def 12; m = s; then (s choose 0) = (s!)/(1 * (s!)) by Def3,Th12 .= 1 by XCMPLX_1:60; hence thesis; end; theorem Th20: s >= t & r = s-t implies s choose t = s choose r proof assume A1: s>=t; t-s>=0-s by XREAL_1:9; then A2: --s>=-(t-s) by XREAL_1:24; assume A3: r = s-t; then t = s-r; then s choose r = (s!)/((r!) * (t!)) by A2,Def3; hence thesis by A1,A3,Def3; end; theorem Th21: s choose s = 1 proof reconsider m = s-s as Element of NAT by INT_1:5; m = 0; then s choose s = s choose 0 by Th20; hence thesis by Th19; end; theorem Th22: (t+1) choose (s+1) = (t choose (s+1)) + (t choose s) proof per cases by XXREAL_0:1; suppose A1: st; then s+1 >t+1 by XREAL_1:8; then A8: (t+1) choose (s+1)=0 by Def3; A9: s+1>t+0 by A7,XREAL_1:8; t choose s =0 by A7,Def3; hence thesis by A9,A8,Def3; end; end; theorem Th23: s >= 1 implies s choose 1 = s proof defpred P[Nat] means $1 choose 1 = $1; A1: now let n be Nat; assume that n>=1 and A2: P[n]; (n+1) choose 1 = (n+1) choose (0+1) .= n + n choose 0 by A2,Th22 .= n+1 by Th19; hence P[n+1]; end; A3: P[1] by Th21; for n be Nat st n >= 1 holds P[n] from NAT_1:sch 8(A3,A1); hence thesis; end; theorem s>=1 & t = s-1 implies s choose t = s proof assume that A1: s>=1 and A2: t = s-1; s choose t = s choose 1 by A1,A2,Th20; hence thesis by A1,Th23; end; theorem Th25: s choose r is Element of NAT proof defpred P[Nat] means for r holds ($1 choose r) is Element of NAT; A1: for s st P[s] holds P[s+1] proof let s; assume A2: P[s]; A3: for r st r <> 0 holds ((s+1) choose r) is Element of NAT proof let r; assume A4: r <> 0; ((s+1) choose r) is Element of NAT proof consider t being Nat such that A5: r = t+1 by A4,NAT_1:6; reconsider t as Element of NAT by ORDINAL1:def 12; reconsider m1 = (s choose t), m2 = (s choose (t+1)) as Element of NAT by A2; m1 + m2 =(s choose t) + (s choose (t+1)); hence thesis by A5,Th22; end; hence thesis; end; let r; r = 0 or r<>0; hence thesis by A3,Th19; end; A6: P[0] proof let r; r = 0 or r > 0; hence thesis by Def3,Th19; end; for s holds P[s] from NAT_1:sch 2(A6,A1); hence thesis; end; theorem for m,F st m <> 0 & len F = m & (for i,l st i in dom F & l = n+i-1 holds F.i = l choose n) holds Sum F = (n+m) choose (n+1) proof defpred P[Nat] means for F st $1 <> 0 & len F = $1 & (for i,l st i in dom F & l = n+i-1 holds F.i = l choose n) holds Sum F = (n+$1) choose (n+1); A1: for m st P[m] holds P[m+1] proof let m; assume A2: P[m]; let F; assume that m+1 <> 0 and A3: len F = m+1 and A4: for i,l st i in dom F & l = n+i-1 holds F.i = l choose n; consider G be FinSequence of REAL,x being Real such that A5: F = G^<*x*> by A3,FINSEQ_2:19; A6: m+1 = len G +1 by A3,A5,FINSEQ_2:16; per cases; suppose A7: m = 0; A8: n = n+1-1; A9: dom F = Seg 1 by A3,A7,FINSEQ_1:def 3; then 1 in dom F; then F.1 = n choose n by A4,A8; hence Sum F = Sum<*n choose n*> by A9,FINSEQ_1:def 8 .= n choose n by FINSOP_1:11 .= 1 by Th21 .= (n+(m+1)) choose (n+1) by A7,Th21; end; suppose A10: m <> 0; A11: n+m = n +(m+1)-1; A12: for i,l st i in dom G & l = n+i-1 holds G.i = l choose n proof A13: dom G c= dom F by A5,FINSEQ_1:26; let i,l; assume that A14: i in dom G and A15: l = n+i-1; G.i = F.i by A5,A14,FINSEQ_1:def 7; hence thesis by A4,A14,A15,A13; end; dom F = Seg (m+1) by A3,FINSEQ_1:def 3; then A16: (n+m) choose n = (G^<*x*>).(len G +1) by A4,A5,A6,A11,FINSEQ_1:4 .= x by FINSEQ_1:42; thus Sum F = Sum G + x by A5,RVSUM_1:74 .= (n+m) choose (n+1) + (n+m) choose n by A2,A6,A10,A12,A16 .= (n+m+1) choose (n+1) by Th22 .= (n+(m+1)) choose (n+1); end; end; A17: P[0]; thus for m holds P[m] from NAT_1:sch 2(A17,A1); end; registration let k,n be Nat; cluster n choose k -> natural; coherence by Th25; end; definition let k,n be Nat; redefine func n choose k -> Element of NAT; coherence by ORDINAL1:def 12; end; definition let a,b be real number; let n be Nat; func (a,b) In_Power n -> FinSequence of REAL means :Def4: len it = n+1 & for i,l,m being Nat st i in dom it & m = i - 1 & l = n-m holds it.i = (n choose m) * a|^l * b|^m; existence proof reconsider n as Element of NAT by ORDINAL1:def 12; defpred P[Nat,set] means for l,m be Nat st m = $1 - 1 & l = n-m holds $2 = (n choose m)* a|^l * b|^m; A1: for k be Nat st k in Seg(n+1) ex x being set st P[k,x] proof let k be Nat; assume A2: k in Seg (n+1); then k >= 1 by FINSEQ_1:1; then reconsider m1 = k-1 as Element of NAT by INT_1:5; k <= n+1 by A2,FINSEQ_1:1; then k-1<=n+1-1 by XREAL_1:9; then reconsider l1 = n-m1 as Element of NAT by INT_1:5; take (n choose m1)*a|^l1*b|^m1; thus thesis; end; consider p being FinSequence such that A3: dom p = Seg(n+1) and A4: for k be Nat st k in Seg(n+1) holds P[k,p.k] from FINSEQ_1:sch 1(A1); rng p c= REAL proof let x be set; assume x in rng p; then consider y be set such that A5: y in dom p and A6: x = p.y by FUNCT_1:def 3; reconsider y as Element of NAT by A5; y >= 1 by A3,A5,FINSEQ_1:1; then reconsider m1 = y-1 as Element of NAT by INT_1:5; y <= n+1 by A3,A5,FINSEQ_1:1; then y-1<=n+1-1 by XREAL_1:9; then reconsider l1 = n-m1 as Element of NAT by INT_1:5; p.y = (n choose m1) *a|^l1*b|^m1 by A3,A4,A5; then reconsider x as Real by A6; x in REAL; hence thesis; end; then reconsider p as FinSequence of REAL by FINSEQ_1:def 4; take p; thus thesis by A3,A4,FINSEQ_1:def 3; end; uniqueness proof let G,H; assume that A7: len G = n+1 and A8: for i,l,m be Nat st i in dom G & m = i - 1 & l = n-m holds G.i = (n choose m)* a|^l * b|^m; assume that A9: len H = n+1 and A10: for i,l,m be Nat st i in dom H & m = i - 1 & l = n-m holds H.i = (n choose m)* a|^l * b|^m; for i st i in dom G holds G.i = H.i proof let i; assume A11: i in dom G; then A12: i in Seg (n+1) by A7,FINSEQ_1:def 3; then i>=1 by FINSEQ_1:1; then reconsider m = i-1 as Element of NAT by INT_1:5; i<=n+1 by A12,FINSEQ_1:1; then i-1<=n+1-1 by XREAL_1:9; then reconsider l = n-m as Element of NAT by INT_1:5; i in dom H by A9,A12,FINSEQ_1:def 3; then H.i = (n choose m)* a|^l *b|^m by A10; hence thesis by A8,A11; end; hence thesis by A7,A9,FINSEQ_2:9; end; end; theorem Th27: (a,b) In_Power 0 = <*1*> proof set F = (a,b) In_Power 0; A1: len F = 0+1 by Def4 .= 1; then A2: dom F = {1} by FINSEQ_1:2,def 3; then 1 in dom F by TARSKI:def 1; then consider i be set such that A3: i in dom F; reconsider i as Element of NAT by A3; A4: i = 1 by A2,A3,TARSKI:def 1; then reconsider m1 = i-1 as Element of NAT by INT_1:5; reconsider l1 = 0-m1 as Element of NAT by A4; 1 in dom (a,b) In_Power 0 by A2,TARSKI:def 1; then F.1 = (0 choose 0)*a|^l1*b|^m1 by A4,Def4 .= 1*a|^0*b|^0 by A4,Th21 .= 1 by RVSUM_1:94; hence thesis by A1,FINSEQ_1:40; end; theorem Th28: ((a,b) In_Power s).1 = a|^s proof reconsider m1 = 1-1 as Element of NAT by INT_1:5; reconsider l1 = s-m1 as Nat; len ((a,b) In_Power s) = s+1 by Def4; then A1: dom ((a,b) In_Power s) = Seg (s+1) by FINSEQ_1:def 3; s+1>=0+1 by XREAL_1:6; then 1 in dom ((a,b) In_Power s) by A1; then ((a,b) In_Power s).1 = (s choose 0)*a|^l1*b|^m1 by Def4 .= 1*a|^l1*b|^m1 by Th19 .= a|^s by RVSUM_1:94; hence thesis; end; theorem Th29: ((a,b) In_Power s).(s+1) = b|^s proof reconsider m1 = s+1-1 as Element of NAT by INT_1:5,NAT_1:12; reconsider l1 = s-m1 as Element of NAT by INT_1:5; len ((a,b) In_Power s) = s+1 by Def4; then dom ((a,b) In_Power s) = Seg (s+1) by FINSEQ_1:def 3; then s+1 in dom ((a,b) In_Power s) by FINSEQ_1:4; then ((a,b) In_Power s).(s+1) = (s choose s)*a|^l1*b|^m1 by Def4 .= 1*a|^l1*b|^m1 by Th21 .= 1*b|^m1 by RVSUM_1:94 .= b|^s; hence thesis; end; theorem Th30: (a+b) |^ s = Sum((a,b) In_Power s) proof defpred P[Nat] means (a+b) |^ $1 = Sum((a,b) In_Power $1); A1: for n st P[n] holds P[n+1] proof reconsider a, b as Real by XREAL_0:def 1; let n; reconsider G1 = ((a*((a,b) In_Power n))^<*0 qua Real*>) as FinSequence of REAL; set G2 = (<*0 qua Real*>^(b*((a,b) In_Power n))); assume P[n]; then A2: (a+b) |^ (n+1) = (a+b)*Sum((a,b) In_Power n) by Th6 .= a*Sum((a,b) In_Power n) + b*Sum((a,b) In_Power n) .= Sum(a*((a,b) In_Power n)) + b*Sum((a,b) In_Power n) by RVSUM_1:87 .= Sum(a*((a,b) In_Power n)) + Sum(b*((a,b) In_Power n)) by RVSUM_1:87; len G2 = len <*0*> + len (b*((a,b) In_Power n)) by FINSEQ_1:22 .= 1+ len (b*((a,b) In_Power n)) by FINSEQ_1:40 .= 1+ len ((a,b) In_Power n) by Th2 .= n+1+1 by Def4; then reconsider F2 = G2 as Element of (n+1+1)-tuples_on REAL by FINSEQ_2:92 ; len G1 = len (a*((a,b) In_Power n)) + len <*0*> by FINSEQ_1:22 .= len (a*((a,b) In_Power n)) +1 by FINSEQ_1:40 .= len ((a,b) In_Power n) +1 by Th2 .= n+1+1 by Def4; then reconsider F1 = G1 as Element of (n+1+1)-tuples_on REAL by FINSEQ_2:92 ; A3: Sum F2 = 0+ Sum(b*((a,b) In_Power n)) by RVSUM_1:76 .= Sum(b*((a,b) In_Power n)); Sum F1 = Sum(a*((a,b) In_Power n)) +0 by RVSUM_1:74 .= Sum(a*((a,b) In_Power n)); then A4: Sum(G1+G2) = Sum(a*((a,b) In_Power n))+ Sum (b*((a,b) In_Power n)) by A3, RVSUM_1:89; set F = F1 + F2; A5: len F2 = n+1+1 by CARD_1:def 7; A6: len F = n+1+1 by CARD_1:def 7; A7: len F1 = n+1+1 by CARD_1:def 7; A8: for i st i in dom ((a,b) In_Power (n+1)) holds F.i = ((a,b) In_Power (n+1)).i proof let i; assume A9: i in dom ((a,b) In_Power (n+1)); set r2 = F2/.i; set r1 = F1/.i; set r = ((a,b) In_Power n)/.i; A10: len ((a,b) In_Power (n+1)) = n+1+1 by Def4; then A11: i in Seg (n+1+1) by A9,FINSEQ_1:def 3; then A12: i in dom F1 by A7,FINSEQ_1:def 3; A13: i in dom F2 by A5,A11,FINSEQ_1:def 3; A14: i in {1} implies F.i = ((a,b) In_Power (n+1)).i proof n+1>=0+1 by XREAL_1:6; then 1 in Seg (n+1); then 1 in Seg len (((a,b) In_Power n)) by Def4; then A15: 1 in dom ((a,b) In_Power n) by FINSEQ_1:def 3; then A16: 1 in dom (a*((a,b) In_Power n)) by VALUED_1:def 5; assume i in {1}; then A17: i = 1 by TARSKI:def 1; then A18: r = ((a,b) In_Power n).1 by A15,PARTFUN1:def 6; r = ((a,b) In_Power n).i by A17,A15,PARTFUN1:def 6; then A19: r = a|^n by A17,Th28; A20: r1 = ((a*((a,b) In_Power n))^<*0*>).1 by A12,A17,PARTFUN1:def 6 .= (a*((a,b) In_Power n)).1 by A16,FINSEQ_1:def 7 .= a *a|^n by A18,A19,RVSUM_1:44 .= a|^(n+1) by Th6; A21: r2 = F2.i by A13,PARTFUN1:def 6; A22: r1 = F1.i by A12,PARTFUN1:def 6; r2 = (<*0*>^(b*((a,b) In_Power n))).1 by A13,A17,PARTFUN1:def 6 .= 0 by FINSEQ_1:41; then F.i = r1+0 by A22,A21,RVSUM_1:11 .= ((a,b) In_Power (n+1)).i by A17,A20,Th28; hence thesis; end; i>=1 by A11,FINSEQ_1:1; then reconsider j = i-1 as Element of NAT by INT_1:5; set x = ((a,b) In_Power n)/.j; A23: i = j+1; A24: i in dom F by A6,A11,FINSEQ_1:def 3; A25: i in {k where k is Element of NAT: k>1 & k).i by A12,PARTFUN1:def 6; 1<=j by A23,A26,NAT_1:13; then reconsider m2 = j-1 as Element of NAT by INT_1:5; A28: j<=n+1 by A23,A26,XREAL_1:6; then j-1<=n+1-1 by XREAL_1:9; then reconsider l2 = n-m2 as Element of NAT by INT_1:5; 1<=j by A23,A26,NAT_1:13; then j in Seg (n+1) by A28; then j in Seg len ((a,b) In_Power n) by Def4; then A29: j in dom ((a,b) In_Power n) by FINSEQ_1:def 3; then A30: x = ((a,b) In_Power n).j by PARTFUN1:def 6; A31: i<=n+1 by A26,NAT_1:13; then i in Seg (n+1) by A26; then i in Seg len ((a,b) In_Power n) by Def4; then A32: i in dom ((a,b) In_Power n) by FINSEQ_1:def 3; then A33: r = ((a,b) In_Power n).i by PARTFUN1:def 6; i in dom (a*((a,b) In_Power n)) by A32,VALUED_1:def 5; then A34: r1 = (a*((a,b) In_Power n)).i by A27,FINSEQ_1:def 7 .= a*r by A33,RVSUM_1:44; i-1<=n+1-1 by A31,XREAL_1:9; then reconsider l1 = n-m1 as Element of NAT by INT_1:5; A35: l1+1 = n+1-(m2+1); A36: j in dom (b*((a,b) In_Power n)) by A29,VALUED_1:def 5; A37: r2 = (<*0*>^(b*((a,b) In_Power n))).i by A13,PARTFUN1:def 6; then r2 = (<*0*>^(b*((a,b) In_Power n))).(len <*0*> +j) by A23, FINSEQ_1:40 .= (b*((a,b) In_Power n)).j by A36,FINSEQ_1:def 7 .= b*x by A30,RVSUM_1:44; then F.i = a*r + b*x by A24,A27,A37,A34,VALUED_1:def 1 .= a*(a|^l1*(n choose m1)*b|^m1) + b*x by A32,A33,Def4 .= a*a|^l1*((n choose m1)*b|^m1) + b*x .= a|^(l1+1)*((n choose m1)*b|^m1) + b*x by Th6 .= a|^(l1+1)*((n choose m1)*b|^m1) + b*(b|^m2*((n choose m2)*a|^l2 )) by A29,A30,Def4 .= a|^(l1+1)*((n choose m1)*b|^m1) + b*b|^m2*((n choose m2)*a|^l2) .= a|^(l1+1)*((n choose (m2+1))*b|^(m2+1)) + b|^(m2+1)*((n choose m2)*a|^l2) by Th6 .= ((n choose (m2+1)) + (n choose m2))*a|^(l1+1)*b|^(m2+1) .= ((n+1) choose (m2+1))*a|^(l1+1)*b|^(m2+1) by Th22 .= ((a,b) In_Power (n+1)).i by A9,A35,Def4; hence thesis; end; A38: i in {n+1+1} implies F.i = ((a,b) In_Power (n+1)).i proof assume A39: i in {n+1+1}; then A40: i = n+1+1 by TARSKI:def 1; A41: j = n+1+1-1 by A39,TARSKI:def 1 .= n+1; n+1 in Seg (n+1) by FINSEQ_1:4; then j in Seg len (((a,b) In_Power n)) by A41,Def4; then A42: j in dom ((a,b) In_Power n) by FINSEQ_1:def 3; then A43: x = ((a,b) In_Power n).(n+1) by A41,PARTFUN1:def 6 .= b|^n by Th29; A44: x = ((a,b) In_Power n).j by A42,PARTFUN1:def 6; A45: j in dom (b*((a,b) In_Power n)) by A42,VALUED_1:def 5; A46: r2 = (<*0*>^(b*((a,b) In_Power n))).(1+n+1) by A13,A40,PARTFUN1:def 6 .= (<*0*>^(b*((a,b) In_Power n))).(len <*0*> +j) by A41,FINSEQ_1:39 .= (b*((a,b) In_Power n)).j by A45,FINSEQ_1:def 7 .= b*b|^n by A44,A43,RVSUM_1:44 .= b|^(n+1) by Th6; A47: r2 = F2.i by A13,PARTFUN1:def 6; n+1 = len ((a,b) In_Power n) by Def4 .= len (a*((a,b) In_Power n)) by Th2; then A48: r1 = ((a*((a,b) In_Power n))^<*0*>).(len (a*((a,b) In_Power n))+1 ) by A12,A40,PARTFUN1:def 6 .= 0 by FINSEQ_1:42; r1 = F1.i by A12,PARTFUN1:def 6; then F.i = 0+r2 by A48,A47,RVSUM_1:11 .= ((a,b) In_Power (n+1)).i by A40,A46,Th29; hence thesis; end; A49: now assume i in {1} \/ {k where k is Element of NAT: 1 by FINSOP_1:11,RVSUM_1:94 .= Sum((a,b) In_Power 0) by Th27; then A50: P[0]; for n holds P[n] from NAT_1:sch 2(A50,A1); hence thesis; end; definition let n be Nat; func Newton_Coeff n -> FinSequence of REAL means :Def5: len it = n+1 & for i,k be Nat st i in dom it & k = i-1 holds it.i = n choose k; existence proof reconsider n as Element of NAT by ORDINAL1:def 12; defpred P[Nat,set] means for s st s = $1-1 holds $2 = n choose s; A1: for l be Nat st l in Seg (n+1) ex x being set st P[l,x] proof let l be Nat; assume l in Seg (n+1); then l>=1 by FINSEQ_1:1; then reconsider k = l-1 as Element of NAT by INT_1:5; set x = n choose k; take x; thus thesis; end; consider F being FinSequence such that A2: dom F = Seg (n+1) & for l be Nat st l in Seg (n+1) holds P[l,F.l] from FINSEQ_1:sch 1(A1); rng F c= REAL proof let x be set; assume x in rng F; then consider y be set such that A3: y in dom F and A4: x = F.y by FUNCT_1:def 3; reconsider y as Element of NAT by A3; y >= 1 by A2,A3,FINSEQ_1:1; then reconsider m1 = y-1 as Element of NAT by INT_1:5; F.y = n choose m1 by A2,A3; then reconsider x as Real by A4; x in REAL; hence thesis; end; then reconsider F as FinSequence of REAL by FINSEQ_1:def 4; take F; thus thesis by A2,FINSEQ_1:def 3; end; uniqueness proof let G,H; assume that A5: len G = n+1 and A6: for i,m be Nat st i in dom G & m = i - 1 holds G.i = n choose m; assume that A7: len H = n+1 and A8: for i,m be Nat st i in dom H & m = i - 1 holds H.i = n choose m; for i st i in dom G holds G.i = H.i proof let i; assume A9: i in dom G; then A10: i in Seg (n+1) by A5,FINSEQ_1:def 3; then i>=1 by FINSEQ_1:1; then reconsider m = i-1 as Element of NAT by INT_1:5; i in dom H by A7,A10,FINSEQ_1:def 3; then H.i = n choose m by A8; hence thesis by A6,A9; end; hence thesis by A5,A7,FINSEQ_2:9; end; end; theorem Th31: Newton_Coeff s = (1,1) In_Power s proof A1: for i st i in dom (Newton_Coeff s) holds (Newton_Coeff s).i = ((1,1) In_Power s).i proof let i; assume A2: i in dom (Newton_Coeff s); A3: dom (Newton_Coeff s) = Seg len (Newton_Coeff s) by FINSEQ_1:def 3 .= Seg (s+1) by Def5; then i>=1 by A2,FINSEQ_1:1; then reconsider m1 = i-1 as Element of NAT by INT_1:5; i<=(s+1) by A2,A3,FINSEQ_1:1; then s+1-1>=i-1 by XREAL_1:9; then reconsider l1 = s-m1 as Element of NAT by INT_1:5; dom (Newton_Coeff s) = Seg len ((1,1) In_Power s) by A3,Def4 .= dom ((1,1) In_Power s) by FINSEQ_1:def 3; then ((1,1) In_Power s).i = (s choose m1)*1|^l1*1|^m1 by A2,Def4 .= (s choose m1)*1*1|^m1 by Th10 .= (s choose m1)*1 by Th10 .= (Newton_Coeff s).i by A2,Def5; hence thesis; end; len (Newton_Coeff s) = s+1 by Def5 .= len ((1,1) In_Power s) by Def4; hence thesis by A1,FINSEQ_2:9; end; theorem 2|^s = Sum(Newton_Coeff s) proof 2|^s = (1+1) |^ s .= Sum((1,1) In_Power s) by Th30 .= Sum(Newton_Coeff s) by Th31; hence thesis; end; begin theorem Th33: l >= 1 implies k*l >= k proof assume A1: l>=1; for k holds k*l>=k proof defpred P[Nat] means $1*l>=$1; A2: for k st P[k] holds P[k+1] proof let k; A3: (k + 1)*l = k * l + 1*l; A4: k+l>=k+1 by A1,XREAL_1:7; assume k*l>=k; then (k+1)*l>=k+l by A3,XREAL_1:7; hence (k+1)*l>=k+1 by A4,XXREAL_0:2; end; A5: P[0]; thus for k holds P[k] from NAT_1:sch 2(A5,A2); end; hence thesis; end; theorem Th34: l >= 1 & n >= k*l implies n >= k proof assume that A1: l>=1 and A2: n>=k*l; k*l>=k by A1,Th33; hence thesis by A2,XXREAL_0:2; end; definition let n; redefine func n! -> Element of NAT; coherence by Th16; end; theorem Th35: l <> 0 implies l divides l! proof assume l<>0; then consider n being Nat such that A1: l = n+1 by NAT_1:6; reconsider n as Element of NAT by ORDINAL1:def 12; (n+1)! = (n+1) * (n!) by Th15; hence thesis by A1,NAT_D:def 3; end; theorem n <> 0 implies (n+1)/n > 1 proof assume A1: n<>0; (n+1)/n=n/n+1/n by XCMPLX_1:62 .=1+1/n by A1,XCMPLX_1:60; hence thesis by A1,XREAL_1:29; end; theorem Th37: k/(k+1) < 1 proof m < m+1 by XREAL_1:29; hence thesis by XREAL_1:189; end; theorem Th38: l! >= l proof defpred P[Nat] means $1! >= $1; A1: for l st P[l] holds P[l+1] proof let l; assume A2: l!>=l; A3: l!*(l+1)=(l+1)! by Th15; l=0 & (l+1)!>=(l+1) or l>=1 & (l+1)!>=(l+1) proof per cases by NAT_1:14; case l=0; hence thesis by FINSEQ_2:50,RVSUM_1:95; end; case A4: l>=1; (l+1)!>=(l+1)*l by A2,A3,XREAL_1:64; hence thesis by A4,Th34; end; end; hence thesis; end; A5: P[0]; for l being Nat holds P[l] from NAT_1:sch 2(A5,A1); hence thesis; end; theorem Th39: m<>1 & m divides n implies not m divides (n+1) proof assume that A1: m<>1 and A2: m divides n and A3: m divides (n+1); consider t being Nat such that A4: n = m * t by A2,NAT_D:def 3; consider s being Nat such that A5: n+1 = m * s by A3,NAT_D:def 3; t <= s proof (n+1)*t=m*s*t by A5 .= n*s by A4; then A6: t=n*s/(n+1) by XCMPLX_1:89 .=s*(n/(n+1)) by XCMPLX_1:74; assume A7: t > s; s>0 by A5; hence contradiction by A7,A6,Th37,XREAL_1:157; end; then reconsider r =s-t as Element of NAT by INT_1:5; 1=m*s-m*t by A4,A5; then 1=m*r; hence contradiction by A1,NAT_1:15; end; theorem Th40: j<>0 implies j divides (j+k)! proof defpred P[Nat] means for j st j<>0 holds j divides (j+$1)!; A1: for k st P[k] holds P[k+1] proof let k; assume A2: for j st j<>0 holds j divides (j+k)!; let j; assume j<>0; then j divides ((j+k)!)*((j+k)+1) by A2,NAT_D:9; hence thesis by Th15; end; A3: P[0] by Th35; for k holds P[k] from NAT_1:sch 2(A3,A1); hence thesis; end; theorem Th41: j<=l & j<>0 implies j divides l! proof assume that A1: j<=l and A2: j<>0; ex k being Nat st l=j+k by A1,NAT_1:10; hence thesis by A2,Th40; end; theorem j<>1 & j<>0 & j divides (l!+1) implies j>l by Th39,Th41; theorem m lcm (n lcm k) = (m lcm n) lcm k proof set M = n lcm k; set K = m lcm M; set N = m lcm n; set L = N lcm k; A1: m divides K by NAT_D:def 4; A2: M divides K by NAT_D:def 4; n divides M by NAT_D:def 4; then n divides K by A2,NAT_D:4; then A3: N divides K by A1,NAT_D:def 4; k divides M by NAT_D:def 4; then k divides K by A2,NAT_D:4; then A4: L divides K by A3,NAT_D:def 4; A5: N divides L by NAT_D:def 4; A6: k divides L by NAT_D:def 4; n divides N by NAT_D:def 4; then n divides L by A5,NAT_D:4; then A7: M divides L by A6,NAT_D:def 4; m divides N by NAT_D:def 4; then m divides L by A5,NAT_D:4; then K divides L by A7,NAT_D:def 4; hence thesis by A4,NAT_D:5; end; theorem Th44: m divides n iff m lcm n = n proof thus m divides n implies m lcm n = n proof set M = m lcm n; assume m divides n; then A1: M divides n by NAT_D:def 4; n divides M by NAT_D:def 4; hence thesis by A1,NAT_D:5; end; thus thesis by NAT_D:def 4; end; theorem n divides m & k divides m iff n lcm k divides m proof n lcm k divides m implies n divides m & k divides m proof set M = n lcm k; A1: n divides M by NAT_D:def 4; A2: k divides M by NAT_D:def 4; assume n lcm k divides m; hence thesis by A1,A2,NAT_D:4; end; hence thesis by NAT_D:def 4; end; theorem m lcm 1 = m proof set M = m lcm 1; 1 divides m by NAT_D:6; then A1: M divides m by NAT_D:def 4; m divides M by NAT_D:def 4; hence thesis by A1,NAT_D:5; end; theorem Th47: m lcm n divides m*n proof set s=m*n; A1: n divides s by NAT_D:9; m divides s by NAT_D:9; hence thesis by A1,NAT_D:def 4; end; theorem m gcd (n gcd k) = (m gcd n) gcd k proof set M = n gcd k; set K = m gcd M; set N = m gcd n; set L = N gcd k; A1: K divides M by NAT_D:def 5; A2: K divides m by NAT_D:def 5; M divides n by NAT_D:def 5; then K divides n by A1,NAT_D:4; then A3: K divides N by A2,NAT_D:def 5; A4: L divides N by NAT_D:def 5; A5: L divides k by NAT_D:def 5; N divides n by NAT_D:def 5; then L divides n by A4,NAT_D:4; then A6: L divides M by A5,NAT_D:def 5; N divides m by NAT_D:def 5; then L divides m by A4,NAT_D:4; then A7: L divides K by A6,NAT_D:def 5; M divides k by NAT_D:def 5; then K divides k by A1,NAT_D:4; then K divides L by A3,NAT_D:def 5; hence thesis by A7,NAT_D:5; end; theorem Th49: n divides m implies n gcd m = n proof set N = n gcd m; assume n divides m; then A1: n divides N by NAT_D:def 5; N divides n by NAT_D:def 5; hence thesis by A1,NAT_D:5; end; theorem m divides n & m divides k iff m divides n gcd k proof m divides n gcd k implies m divides n & m divides k proof set M = n gcd k; A1: M divides n by NAT_D:def 5; A2: M divides k by NAT_D:def 5; assume m divides n gcd k; hence thesis by A1,A2,NAT_D:4; end; hence thesis by NAT_D:def 5; end; theorem m gcd 1 = 1 proof set M = m gcd 1; A1: 1 divides M by NAT_D:6; M divides 1 by NAT_D:def 5; hence thesis by A1,NAT_D:5; end; theorem m gcd 0 = m proof set M = m gcd 0; m divides 0 by NAT_D:6; then A1: m divides M by NAT_D:def 5; M divides m by NAT_D:def 5; hence thesis by A1,NAT_D:5; end; theorem Th53: (m gcd n) lcm n = n proof set M = m gcd n; M divides n by NAT_D:def 5; hence thesis by Th44; end; theorem Th54: m gcd (m lcm n) = m proof set M = m lcm n; m divides M by NAT_D:def 4; hence thesis by Th49; end; theorem m gcd (m lcm n) = (n gcd m) lcm m proof m gcd (m lcm n) = m by Th54; hence thesis by Th53; end; theorem m divides n implies m gcd k divides n gcd k proof set M = m gcd k; A1: M divides k by NAT_D:def 5; assume A2: m divides n; M divides m by NAT_D:def 5; then M divides n by A2,NAT_D:4; hence thesis by A1,NAT_D:def 5; end; theorem m divides n implies k gcd m divides k gcd n proof set M = k gcd m; A1: M divides k by NAT_D:def 5; assume A2: m divides n; M divides m by NAT_D:def 5; then M divides n by A2,NAT_D:4; hence thesis by A1,NAT_D:def 5; end; theorem Th58: n > 0 implies n gcd m > 0 proof assume that A1: n>0 and A2: n gcd m <= 0; A3: (n gcd m) divides n by NAT_D:def 5; n gcd m = 0 or n gcd m < 0 by A2; then ex r being Nat st n = 0*r by A3,NAT_D:def 3; hence contradiction by A1; end; theorem m > 0 & n > 0 implies m lcm n > 0 proof assume that A1: m>0 and A2: n>0 and A3: m lcm n <= 0; A4: (m lcm n) divides m*n by Th47; m lcm n = 0 or m lcm n < 0 by A3; then ex r being Nat st m*n = 0*r by A4,NAT_D:def 3; hence contradiction by A1,A2; end; theorem (n gcd m) lcm (n gcd k) divides n gcd (m lcm k) proof set M = m lcm k; set N = n gcd k; set P = n gcd m; set L = P lcm N; A1: N divides k by NAT_D:def 5; k divides M by NAT_D:def 4; then A2: N divides M by A1,NAT_D:4; A3: P divides m by NAT_D:def 5; m divides M by NAT_D:def 4; then P divides M by A3,NAT_D:4; then A4: L divides M by A2,NAT_D:def 4; A5: P divides n by NAT_D:def 5; N divides n by NAT_D:def 5; then L divides n by A5,NAT_D:def 4; hence thesis by A4,NAT_D:def 5; end; theorem m divides l implies m lcm (n gcd l) divides (m lcm n) gcd l proof set M = m lcm n; set K = M gcd l; set N = n gcd l; A1: m divides M by NAT_D:def 4; A2: N divides n by NAT_D:def 5; A3: N divides l by NAT_D:def 5; n divides M by NAT_D:def 4; then N divides M by A2,NAT_D:4; then A4: N divides K by A3,NAT_D:def 5; assume m divides l; then m divides K by A1,NAT_D:def 5; hence thesis by A4,NAT_D:def 4; end; theorem n gcd m divides n lcm m proof A1: n divides n lcm m by NAT_D:def 4; n gcd m divides n by NAT_D:def 5; hence thesis by A1,NAT_D:4; end; reserve p,q for Nat; reserve i0,i,i1,i2,i4 for Integer; theorem 0 < m implies n mod m = n - m * (n div m) proof reconsider z1=m * (n div m),z2=(n mod m) as Integer; assume m > 0; then n - z1 = z1 + z2 -z1 by NAT_D:2; hence thesis; end; theorem i2 >= 0 implies i1 mod i2 >= 0 by INT_1:57; theorem i2 > 0 implies i1 mod i2 < i2 by INT_1:58; theorem i2 <> 0 implies i1 = (i1 div i2) * i2 + (i1 mod i2) by INT_1:59; theorem m>0 or n>0 implies ex i,i1 st i*m + i1*n = m gcd n proof defpred P[Nat] means $1>0 & ex i,i1 st i*m+i1*n=$1; assume A1: m>0 or n>0; A2: ex p being Nat st P[p] proof per cases by A1; suppose A3: m>0; 1*m + 0*n=m; hence thesis by A3; end; suppose A4: n>0; 0*m + 1*n=n; hence thesis by A4; end; end; ex p be Nat st P[p] & for n be Nat st P[n] holds p <= n from NAT_1:sch 5 (A2); then consider p being Nat such that A5: p>0 and A6: ex i,i0 st i*m+i0*n=p and A7: for k be Nat st (k>0 & ex i1,i2 st i1*m+i2*n=k) holds p <= k; consider i,i0 such that A8: i*m+i0*n=p by A6; A9: for k st ex i1,i2 st i1*m+i2*n=k holds p divides k proof let k; given i1,i2 such that A10: i1*m+i2*n=k; consider l,s being Nat such that A11: k=p*l+s and A12: s

0; hence contradiction by A7,A12,A13; end; hence thesis by A11,NAT_D:def 3; end; A14: for s be Nat st s divides m & s divides n holds s divides p proof let s be Nat; assume that A15: s divides m and A16: s divides n; consider r being Nat such that A17: n = s*r by A16,NAT_D:def 3; reconsider p9=p,s9=s as Integer; consider l being Nat such that A18: m = s*l by A15,NAT_D:def 3; ex i4 st p9=s9*i4 proof take i*l+i0*r; thus thesis by A8,A18,A17; end; hence thesis by INT_1:def 3; end; 0*m + 1*n=n; then A19: p divides n by A9; 1*m + 0*n=m; then p divides m by A9; then p= m gcd n by A19,A14,NAT_D:def 5; hence thesis by A6; end; definition func SetPrimes -> Subset of NAT means :Def6: for n being Nat holds n in it iff n is prime; existence proof defpred P[Nat] means $1 is prime; consider X being Subset of NAT such that A1: for n being Element of NAT holds n in X iff P[n] from SUBSET_1:sch 3; take X; let n be Nat; thus n in X implies n is prime by A1; assume A2: n is prime; n in NAT by ORDINAL1:def 12; hence thesis by A1,A2; end; uniqueness proof let A, B be Subset of NAT such that A3: for n being Nat holds n in A iff n is prime and A4: for n being Nat holds n in B iff n is prime; thus A c= B proof let x be set; assume A5: x in A; then reconsider x as Element of NAT; x is prime by A3,A5; hence thesis by A4; end; let x be set; assume A6: x in B; then reconsider x as Element of NAT; x is prime by A4,A6; hence thesis by A3; end; end; registration cluster prime for Element of NAT; existence by INT_2:28; cluster prime for Nat; existence by INT_2:28; end; definition mode Prime is prime Nat; end; reserve x for set; definition let p be Nat; func SetPrimenumber p -> Subset of NAT means :Def7: for q being Nat holds q in it iff q < p & q is prime; existence proof defpred P[Nat] means $1 < p & $1 is prime; consider X being Subset of NAT such that A1: for q being Element of NAT holds q in X iff P[q] from SUBSET_1:sch 3; take X; let q be Nat; thus q in X implies q < p & q is prime by A1; assume that A2: q < p and A3: q is prime; q in NAT by ORDINAL1:def 12; hence thesis by A1,A2,A3; end; uniqueness proof let A, B be Subset of NAT such that A4: for q being Nat holds q in A iff q < p & q is prime and A5: for q being Nat holds q in B iff q < p & q is prime; thus A c= B proof let x be set; assume A6: x in A; then reconsider x as Element of NAT; A7: x is prime by A4,A6; x < p by A4,A6; hence thesis by A5,A7; end; let x be set; assume A8: x in B; then reconsider x as Element of NAT; A9: x is prime by A5,A8; x < p by A5,A8; hence thesis by A4,A9; end; end; theorem Th68: SetPrimenumber p c= SetPrimes proof let x; assume A1: x in SetPrimenumber p; then reconsider x9 = x as Element of NAT; x9 is prime by A1,Def7; hence thesis by Def6; end; theorem p <= q implies SetPrimenumber p c= SetPrimenumber q proof assume A1: p <= q; let x; assume A2: x in SetPrimenumber p; then reconsider x9 = x as Element of NAT; x9 < p by A2,Def7; then A3: x9 < q by A1,XXREAL_0:2; x9 is prime by A2,Def7; hence thesis by A3,Def7; end; theorem Th70: SetPrimenumber p c= Seg p proof let x be set; assume A1: x in SetPrimenumber p; then reconsider q = x as Element of NAT; q is prime by A1,Def7; then A2: 1 <= q by INT_2:def 4; q < p by A1,Def7; hence thesis by A2; end; theorem Th71: SetPrimenumber p is finite proof SetPrimenumber p c= Seg p by Th70; hence thesis; end; registration let n be Nat; cluster SetPrimenumber n -> finite; coherence by Th71; end; reserve p for Prime; theorem Th72: ex p st p is prime & p>l proof reconsider two = 2 as Prime by INT_2:28; reconsider l as Element of NAT by ORDINAL1:def 12; l=0 & (ex p st p is prime & p>l) or l=1 & (ex p st p is prime & p>l) or 2<=l & ex p st p is prime & p>l proof per cases by NAT_1:26; case A1: l=0; take two; thus thesis by A1; end; case A2: l=1; take two; thus thesis by A2; end; case A3: 2<=l; l<=l! by Th38; then 2<=l! by A3,XXREAL_0:2; then (2+0) <= (l!+1) by XREAL_1:7; then consider j being Element of NAT such that A4: j is prime and A5: j divides (l!+1) by INT_2:31; reconsider j9=j as Prime by A4; take j9; A6: j<>0 by A4,INT_2:def 4; j<>1 by A4,INT_2:def 4; hence thesis by A5,A6,Th39,Th41; end; end; hence thesis; end; Lm2: SetPrimenumber 2 = {} proof assume SetPrimenumber 2<>{}; then consider x being set such that A1: x in SetPrimenumber 2 by XBOOLE_0:def 1; reconsider x as Nat by A1; A2: x is prime by A1,Def7; x<2 by A1,Def7; then 0 is prime or 1 is prime by A2,NAT_1:26; hence contradiction by INT_2:def 4; end; registration cluster SetPrimes -> non empty; coherence by Def6,INT_2:28; end; registration cluster SetPrimenumber 2 -> empty; coherence by Lm2; end; theorem SetPrimenumber m c= Seg m proof let x be set; assume A1: x in SetPrimenumber m; then reconsider x as Element of NAT; x is prime by A1,Def7; then A2: 1 <= x by INT_2:def 4; x < m by A1,Def7; hence thesis by A2; end; theorem k>=m implies not k in SetPrimenumber m by Def7; theorem SetPrimenumber n \/ {n} is finite; theorem Th76: for f being Prime, g being Nat st f < g holds SetPrimenumber f \/ {f} c= SetPrimenumber g proof let f be Prime,g be Nat; assume A1: f=m implies not k in SetPrimenumber m by Def7; Lm3: SetPrimenumber n = {k where k is Element of NAT:k prime Element of NAT means :Def8: n = card SetPrimenumber it; existence proof defpred P1[Nat] means ex m st $1=card SetPrimenumber m & m is Prime; A1: for n st P1[n] holds P1[n+1] proof let n; given m such that A2: n=card SetPrimenumber m and A3: m is Prime; defpred P[Nat] means $1 is prime & $1>m; A4: not m in SetPrimenumber m by Def7; A5: ex k be Nat st P[k] proof ex p st p is prime & p>m by Th72; hence thesis; end; consider k be Nat such that A6: P[k] & for l be Nat st P[l] holds k <= l from NAT_1:sch 5(A5); take k; A7: SetPrimenumber k c= SetPrimenumber m\/{m} proof let s be set; assume A8: s in SetPrimenumber k; then reconsider s as Element of NAT; A9: s is prime by A8,Def7; sg; f non empty infinite; coherence by Th79; end; reserve i for Nat; theorem i is prime implies for m,n being Nat holds i divides m * n implies i divides m or i divides n proof defpred P[Nat] means $1 is prime & ex m,n being Nat st $1 divides m * n & not $1 divides m & not $1 divides n; assume A1: i is prime; given m,n being Nat such that A2: i divides m * n and A3: not( (i divides m or i divides n)); A4: ex i be Nat st P[i] by A1,A2,A3; consider p9 being Nat such that A5: P[p9] and A6: for p1 being Nat st P[p1] holds p9 <= p1 from NAT_1:sch 5(A4); defpred Q[Nat] means ex n being Nat st p9 divides $1 * n & not p9 divides $1 & not p9 divides n; A7: ex i be Nat st Q[i] by A5; consider m be Nat such that A8: Q[m] and A9: for m1 being Nat st Q[m1] holds m <= m1 from NAT_1:sch 5(A7); A10: m > 0 by A8; consider n being Nat such that A11: p9 divides m * n and A12: not p9 divides m and A13: not p9 divides n by A8; A14: m < p9 proof set m1 = m mod p9; assume A15: m >= p9; A16: p9 > 0 by A5,INT_2:def 4; then m = p9* (m div p9) + m1 by NAT_D:2; then A17: m * n = p9 * (m div p9) * n + m1 * n; m1 < p9 by A16,NAT_D:1; then A18: m1 < m by A15,XXREAL_0:2; A19: p9 divides p9 * (m div p9) by NAT_D:def 3; p9 divides p9 * ((m div p9) * n) by NAT_D:def 3; then A20: p9 divides m1 * n by A11,A17,NAT_D:10; m = p9* (m div p9) + m1 by A16,NAT_D:2; then not p9 divides m1 by A12,A19,NAT_D:8; hence contradiction by A9,A13,A18,A20; end; A21: m < 2 proof assume m >= 2; then consider p1 being Element of NAT such that A22: p1 is prime and A23: p1 divides m by INT_2:31; A24: p1 > 1 by A22,INT_2:def 4; A25: not p1 divides p9 proof assume p1 divides p9; then p1 = 1 or p1 = p9 by A5,INT_2:def 4; hence contradiction by A8,A22,A23,INT_2:def 4; end; p1 <= m by A10,A23,NAT_D:7; then A26: not p9 <= p1 by A14,XXREAL_0:2; A27: p1 <> 0 by A22,INT_2:def 4; consider k being Nat such that A28: m * n = p9 * k by A11,NAT_D:def 3; p1 divides p9 * k by A23,A28,NAT_D:9; then p1 divides k by A6,A22,A26,A25; then consider k1 being Nat such that A29: k = p1 * k1 by NAT_D:def 3; consider m1 being Nat such that A30: m = p1 * m1 by A23,NAT_D:def 3; A31: m1 > 0 by A8,A30; A32: m1 <> m proof assume m1 = m; then m = 1 * m1; hence contradiction by A24,A30,A31,XREAL_1:68; end; m1 divides m by A30,NAT_D:def 3; then m1 <= m by A10,NAT_D:7; then A33: m1 < m by A32,XXREAL_0:1; (p9 * k1) * p1 = p1 *(m1 * n) by A28,A29,A30; then m1 * n = p9 * k1 by A27,XCMPLX_1:5; then A34: p9 divides m1 * n by NAT_D:def 3; not p9 divides m1 by A12,A30,NAT_D:9; hence contradiction by A9,A13,A33,A34; end; m >= 2 proof A35: m >= 0 + 1 by A10,NAT_1:13; assume A36: m < 2; then m <= 1 + 1; then m = 1 by A36,A35,NAT_1:9; hence contradiction by A11,A13; end; hence thesis by A21; end; theorem for x being complex number holds x |^ 2 = x * x & x^2 = x |^ 2 proof let x be complex number; thus x * x = (x |^ 1) * x by Th5 .= x |^ (1+1) by Th6 .= x |^ 2; hence thesis; end; theorem m qua Integer div n = m div n & m qua Integer mod n = m mod n; reserve x for real number; theorem x > 0 implies x|^k > 0 proof defpred P[Nat] means for x st x > 0 holds x|^$1 > 0; A1: for k holds P[k] implies P[k+1] proof let k such that A2: for x st x > 0 holds x|^k > 0; let x; A3: x|^(k+1) = x * x|^k by Th6; assume A4: x > 0; then x|^k > 0 by A2; hence thesis by A4,A3; end; A5: P[0] by RVSUM_1:94; for k holds P[k] from NAT_1:sch 2(A5,A1); hence thesis; end; theorem n > 0 implies 0 |^ n = 0 proof assume n>0; then n>=1+0 by NAT_1:13; hence thesis by Th11; end; definition let m,n be Element of NAT; redefine func m|^n -> Element of NAT; coherence by ORDINAL1:def 12; end; defpred P[Nat] means 2|^$1 >= $1 + 1; Lm4: P[0] by RVSUM_1:94; Lm5: for n st P[n] holds P[n+1] proof let n; assume 2|^n >= n+1; then 2|^n - n >= 1 by XREAL_1:19; then A1: 2*(2|^n - n) >= 2*1 by XREAL_1:64; 2|^(n+1) - (n + 1 + 1) = 2*2|^n - (2*n - n + 2) by Th6 .= 2*(2|^n - n) + (n - 2); then 2|^(n+1) - (n + 1 + 1) >= 2 + (n - 2) by A1,XREAL_1:6; then 2|^(n+1) >= 0 + (n + 1 + 1) by XREAL_1:19; hence 2|^(n+1) >= n + 1 + 1; end; theorem Th85: 2|^n >= n + 1 proof for n holds P[n] from NAT_1:sch 2(Lm4,Lm5); hence thesis; end; theorem 2|^n > n proof 2|^n >= n + 1 by Th85; hence thesis by NAT_1:13; end; reserve k for Element of NAT; scheme Euklides9 { F(Nat) -> Element of NAT, G(Nat) -> Element of NAT, a() -> Element of NAT, b() -> Element of NAT } : ex k st F(k) = a() gcd b() & G(k) = 0 provided A1: 0 < b() and A2: b() < a() and A3: F(0) = a() and A4: G(0) = b() and A5: for k st G(k) > 0 holds F(k+1) = G(k) & G(k+1) = F(k) mod G(k) proof deffunc F(Nat,set) = IFEQ($2,0,0,G($1)); consider q being Function of NAT,NAT such that A6: q.0 = a() and A7: for i being Nat holds q.(i+1) = F(i,q.i) from NAT_1:sch 12; deffunc Q(Element of NAT) = q.$1; q.(0+1) = IFEQ(q.0,0,0,G(0)) by A7 .= G(0) by A2,A6,FUNCOP_1:def 8; then A8: Q(0) = a() & Q(1 qua Element of NAT) = b() by A4,A6; A9: for k st q.k qua Element of NAT > 0 holds q.k = F(k) proof let k such that A10: q.k qua Element of NAT > 0; now per cases; case k = 0; hence thesis by A3,A6; end; case k <> 0; then consider i being Nat such that A11: k = i+1 by NAT_1:6; reconsider i as Element of NAT by ORDINAL1:def 12; A12: now assume A13: q.i qua Element of NAT = 0; q.k = IFEQ(q.i,0,0,G(i)) by A7,A11 .= 0 by A13,FUNCOP_1:def 8; hence contradiction by A10; end; q.k = IFEQ(q.i,0,0,G(i)) by A7,A11 .= G(i) by A12,FUNCOP_1:def 8; hence thesis by A5,A10,A11; end; end; hence thesis; end; A14: for k holds Q(k+2) = Q(k) mod Q(k+1) proof let k; now per cases; case A15: q.(k+1) <> 0; A16: now A17: q.k = 0 or q.k <> 0; assume A18: G(k) = 0; q.(k+1) = IFEQ(q.k,0,0,G(k)) by A7 .= 0 by A18,A17,FUNCOP_1:def 8; hence contradiction by A15; end; A19: q.(k+(1+1)) = q.((k+1)+1) .= IFEQ(q.(k+1),0,0,G(k+1)) by A7 .= G(k+1) by A15,FUNCOP_1:def 8 .= F(k) mod G(k) by A5,A16; A20: now assume A21: q.k = 0; q.(k+1) = IFEQ(q.k,0,0,G(k)) by A7 .= 0 by A21,FUNCOP_1:def 8; hence contradiction by A15; end; q.(k+1) = IFEQ(q.k,0,0,G(k)) by A7 .= G(k) by A20,FUNCOP_1:def 8; hence thesis by A9,A19,A20; end; case A22: q.(k+1) = 0; thus q.(k+2) = q.((k+1)+1) .= IFEQ(q.(k+1),0,0,G(k+1)) by A7 .= 0 by A22,FUNCOP_1:def 8 .= q.(k) mod q.(k+1) by A22,NAT_D:def 2; end; end; hence thesis; end; A23: 0 < b() & b() < a() by A1,A2; consider k such that A24: Q(k) = a() gcd b() & Q(k + 1) = 0 from NAT_D:sch 1(A23,A8,A14); take k; thus F(k) = a() gcd b() by A1,A9,A24,Th58; a() gcd b() > 0 by A1,Th58; hence G(k) = IFEQ(q.k,0,0,G(k)) by A24,FUNCOP_1:def 8 .= 0 by A7,A24; end; reserve k,n,n1,n2,m1,m2 for Nat; theorem Th87: r <> 0 or n = 0 iff r|^n <> 0 proof defpred P[Nat] means r <> 0 or $1 = 0 iff r|^$1 <> 0; A1: P[k] implies P[k+1] proof assume A2: P[k]; r|^(k+1) = r|^k*r by Th6; hence thesis by A2; end; A3: P[0] by RVSUM_1:94; P[k] from NAT_1:sch 2(A3,A1); hence thesis; end; Lm6: (2|^n1)*(2*m1+1) = (2|^n2)*(2*m2+1) implies n1 <= n2 proof assume A1: (2|^n1)*(2*m1+1) = (2|^n2)*(2*m2+1); assume A2: n1 > n2; then consider n being Nat such that A3: n1 = n2+n by NAT_1:10; n <> 0 by A2,A3; then consider k being Nat such that A4: n = k+1 by NAT_1:6; A5: 2|^n2 <> 0 by Th87; reconsider k as Element of NAT by ORDINAL1:def 12; 2|^n1 = (2|^n2)*(2|^(k+1)) by A3,A4,Th8; then (2|^n1)*(2*m1+1) = 2|^n2*(2|^(k+1)*(2*m1+1)); then 2|^(k+1)*(2*m1+1) = 2*m2+1 by A1,A5,XCMPLX_1:5; then 2*m2+1 = 2|^k*(2|^1)*(2*m1+1) by Th8 .= 2*(2|^k)*(2*m1+1) by Th5 .= 2*((2|^k)*(2*m1+1)); then A6: 2 divides 2*m2+1 by NAT_D:def 3; 2 divides 2*m2 by NAT_D:def 3; hence contradiction by A6,NAT_D:7,10; end; theorem (2|^n1)*(2*m1+1) = (2|^n2)*(2*m2+1) implies n1 = n2 & m1 = m2 proof A1: 2|^n1 <> 0 by Th87; assume A2: (2|^n1)*(2*m1+1) = (2|^n2)*(2*m2+1); then A3: n2 <= n1 by Lm6; n1 <= n2 by A2,Lm6; hence n1 = n2 by A3,XXREAL_0:1; then 2*m1+1 = 2*m2+1 by A2,A1,XCMPLX_1:5; hence thesis; end; theorem k <= n implies m |^ k divides m |^ n proof assume k <= n; then consider t being Nat such that A1: n = k + t by NAT_1:10; reconsider t as Element of NAT by ORDINAL1:def 12; m |^ n = (m |^ k)*(m |^ t) by A1,Th8; hence thesis by NAT_D:def 3; end; begin reserve X,Y,Z,x,y,y1,y2 for set, D for non empty set, k,n,n1,n2,m2,m1 for Nat, L,K,M,N for Cardinal, f,g for Function; theorem X is finite implies X is countable; theorem omega is countable; reserve r for Real; theorem Th3: r <> 0 or n = 0 iff r|^n <> 0 proof defpred P[Nat] means r <> 0 or $1 = 0 iff r|^$1 <> 0; A1: P[k] implies P[k+1] proof A2: r|^(k+1) = r|^k*r by NEWTON:6; assume P[k]; hence thesis by A2; end; A3: P[0] by NEWTON:4; P[k] from NAT_1:sch 2(A3,A1); hence thesis; end; Lm1: (2|^n1)*(2*m1+1) = (2|^n2)*(2*m2+1) implies n1 <= n2 proof assume A1: (2|^n1)*(2*m1+1) = (2|^n2)*(2*m2+1); assume A2: n1 > n2; then consider n being Nat such that A3: n1 = n2+n by NAT_1:10; n <> 0 by A2,A3; then consider k being Nat such that A4: n = k+1 by NAT_1:6; A5: 2|^n2 <> 0 by Th3; reconsider k as Element of NAT by ORDINAL1:def 12; 2|^n1 = (2|^n2)*(2|^(k+1)) by A3,A4,NEWTON:8; then (2|^n1)*(2*m1+1) = 2|^n2*(2|^(k+1)*(2*m1+1)); then 2|^(k+1)*(2*m1+1) = 2*m2+1 by A1,A5,XCMPLX_1:5; then 2*m2+1 = 2|^k*(2|^1)*(2*m1+1) by NEWTON:8 .= 2*(2|^k)*(2*m1+1) by NEWTON:5 .= 2*((2|^k)*(2*m1+1)); then A6: 2 divides 2*m2+1 by NAT_D:def 3; 2 divides 2*m2 by NAT_D:def 3; hence contradiction by A6,NAT_D:7,10; end; theorem Th4: (2|^n1)*(2*m1+1) = (2|^n2)*(2*m2+1) implies n1 = n2 & m1 = m2 proof A1: 2|^n1 <> 0 by Th3; assume A2: (2|^n1)*(2*m1+1) = (2|^n2)*(2*m2+1); then n1 <= n2 & n2 <= n1 by Lm1; hence n1 = n2 by XXREAL_0:1; then 2*m1+1 = 2*m2+1 by A2,A1,XCMPLX_1:5; hence thesis; end; Lm2: x in [:NAT,NAT:] implies ex n1,n2 being Element of NAT st x = [n1,n2] proof assume A1: x in [:NAT,NAT:]; then reconsider n1 = x`1, n2 = x`2 as Element of NAT by MCART_1:10; take n1,n2; thus thesis by A1,MCART_1:21; end; theorem Th5: [:NAT,NAT:],NAT are_equipotent & card NAT = card [:NAT,NAT:] proof [:NAT,{0}:] c= [:NAT,NAT:] by ZFMISC_1:95; then card [:NAT,{0}:] c= card [:NAT,NAT:] by CARD_1:11; then A1: card NAT c= card [:NAT,NAT:] by CARD_1:69; deffunc f(Element of NAT,Element of NAT) = (2|^$1)*(2*$2+1); consider f being Function of [:NAT,NAT:],NAT such that A2: for n,m being Element of NAT holds f.(n,m) = f(n,m) from BINOP_1:sch 4; A3: f is one-to-one proof let x,y; assume x in dom f; then consider n1,m1 being Element of NAT such that A4: x = [n1,m1] by Lm2; assume y in dom f; then consider n2,m2 being Element of NAT such that A5: y = [n2,m2] by Lm2; assume A6: f.x = f.y; A7: (2|^n1)*(2*m1+1) = f.(n1,m1) by A2 .= f.(n2,m2) by A4,A5,A6 .= (2|^n2)*(2*m2+1) by A2; then n1 = n2 by Th4; hence thesis by A4,A5,A7,Th4; end; dom f = [:NAT,NAT:] & rng f c= NAT by FUNCT_2:def 1; then card [:NAT,NAT:] c= card NAT by A3,CARD_1:10; then card NAT = card [:NAT,NAT:] by A1,XBOOLE_0:def 10; hence thesis by CARD_1:5; end; theorem Th6: (omega)*`(omega) = omega by Th5,CARD_1:47,CARD_2:def 2; theorem Th7: X is countable & Y is countable implies [:X,Y:] is countable proof assume card X c= omega & card Y c= omega; then [:card X,card Y:] c= [:omega,omega:] by ZFMISC_1:96; then card [:card X,card Y:] c= card [:omega,omega:] by CARD_1:11; then card [:card X,card Y:] c= (omega)*`omega by CARD_2:def 2; hence card [:X,Y:] c= omega by Th6,CARD_2:7; end; theorem Th8: 1-tuples_on D,D are_equipotent & card (1-tuples_on D) = card D proof deffunc f(set) = <*$1*>; consider f such that A1: dom f = D & for x st x in D holds f.x = f(x) from FUNCT_1:sch 3; D,1-tuples_on D are_equipotent proof take f; thus f is one-to-one proof let x,y; assume x in dom f & y in dom f; then A2: f.x = <*x*> & f.y = <*y*> by A1; <*x*>.1 = x by FINSEQ_1:def 8; hence thesis by A2,FINSEQ_1:def 8; end; thus dom f = D by A1; thus rng f c= 1-tuples_on D proof let x; assume x in rng f; then consider y such that A3: y in dom f and A4: x = f.y by FUNCT_1:def 3; reconsider y as Element of D by A1,A3; x = <*y*> by A1,A4; then x in { <*d*> where d is Element of D : not contradiction }; hence thesis by FINSEQ_2:96; end; let x; assume x in 1-tuples_on D; then reconsider y = x as Element of 1-tuples_on D; consider z being Element of D such that A5: y = <*z*> by FINSEQ_2:97; x = f.z by A1,A5; hence thesis by A1,FUNCT_1:def 3; end; hence thesis by CARD_1:5; end; reserve p,q for FinSequence, k,m,n,n1,n2,n3 for Element of NAT; theorem Th9: [:n-tuples_on D, m-tuples_on D:],(n+m)-tuples_on D are_equipotent & card [:n-tuples_on D, m-tuples_on D:] = card ((n+m)-tuples_on D) proof defpred P[set,set] means ex p be Element of n-tuples_on D,q be Element of m -tuples_on D st $1 = [p,q] & $2 = p^q; set A = [:n-tuples_on D, m-tuples_on D:]; set B = (n+m)-tuples_on D; A1: for x st x in A ex y st P[x,y] proof let x; assume A2: x in A; then reconsider p = x`1 as Element of n-tuples_on D by MCART_1:10; reconsider q = x`2 as Element of m-tuples_on D by A2,MCART_1:10; reconsider y = p^q as set; take y; x = [x`1,x`2] by A2,MCART_1:21; hence thesis; end; consider f such that A3: dom f = A & for x st x in A holds P[x,f.x] from CLASSES1:sch 1(A1); thus [:n-tuples_on D, m-tuples_on D:],(n+m)-tuples_on D are_equipotent proof take f; thus f is one-to-one proof let x,y; assume x in dom f; then consider p1 be Element of n-tuples_on D, q1 be Element of m-tuples_on D such that A4: x = [p1,q1] and A5: f.x = p1^q1 by A3; assume y in dom f; then consider p2 be Element of n-tuples_on D, q2 be Element of m-tuples_on D such that A6: y = [p2,q2] and A7: f.y = p2^q2 by A3; assume A8: f.x = f.y; A9: len p1 = n & len p2 = n by CARD_1:def 7; then consider p such that A10: p1^p = p2 by A5,A7,A8,FINSEQ_1:47; consider q such that A11: p2^q = p1 by A5,A7,A8,A9,FINSEQ_1:47; len p1+0 = len(p1^p)+len q by A10,A11,FINSEQ_1:22 .= len p1+len p+len q by FINSEQ_1:22 .= len p1+(len p+len q); then p = {}; then p1 = p2 by A10,FINSEQ_1:34; hence thesis by A4,A5,A6,A7,A8,FINSEQ_1:33; end; thus dom f = A by A3; thus rng f c= B proof let x; assume x in rng f; then consider y such that A12: y in dom f & x = f.y by FUNCT_1:def 3; ex p being Element of n-tuples_on D, q being Element of m-tuples_on D st y = [p,q] & x = p^q by A3,A12; then x is Tuple of n+m, D; then x is Element of (n+m)-tuples_on D by FINSEQ_2:131; hence thesis; end; let x; assume x in B; then reconsider x as Element of B; consider p being Element of n-tuples_on D, q being Element of m-tuples_on D such that A13: x = p^q by FINSEQ_2:106; consider p1 being Element of n-tuples_on D, q1 being Element of m -tuples_on D such that A14: [p,q] = [p1,q1] and A15: f.[p,q] = p1^q1 by A3; p1 = p & q1 = q by A14,XTUPLE_0:1; hence thesis by A3,A13,A15,FUNCT_1:def 3; end; hence thesis by CARD_1:5; end; theorem Th10: D is countable implies n-tuples_on D is countable proof defpred P[Nat] means $1-tuples_on D is countable; assume card D c= omega; then card (1-tuples_on D) c= omega by Th8; then A1: 1-tuples_on D is countable by CARD_3:def 14; A2: for k being Nat holds P[k] implies P[k+1] proof let k be Nat; assume P[k]; then [:k-tuples_on D, 1-tuples_on D:] is countable by A1,Th7; then A3: card [:k-tuples_on D, 1-tuples_on D:] c= omega by CARD_3:def 14; k in NAT by ORDINAL1:def 12; then card [:k-tuples_on D, 1-tuples_on D:] = card ((k+1)-tuples_on D) by Th9; hence thesis by A3,CARD_3:def 14; end; { <*>D } is countable; then A4: P[0] by FINSEQ_2:94; for k being Nat holds P[k] from NAT_1:sch 2(A4,A2); hence thesis; end; theorem Th11: for f st dom f is countable & for x st x in dom f holds f.x is countable holds Union f is countable proof let f such that A1: card dom f c= omega and A2: for x st x in dom f holds f.x is countable; now let x; assume x in dom f; then f.x is countable by A2; hence card (f.x) c= omega by CARD_3:def 14; end; hence card Union f c= omega by A1,Th6,CARD_2:86; end; theorem (X is countable & for Y st Y in X holds Y is countable) implies union X is countable proof assume that A1: card X c= omega and A2: for Y st Y in X holds Y is countable; now let Y; assume Y in X; then Y is countable by A2; hence card Y c= omega by CARD_3:def 14; end; hence card union X c= omega by A1,Th6,CARD_2:87; end; theorem D is countable implies D* is countable proof defpred P[set,set] means ex n st $1 = n & $2 = n-tuples_on D; A1: for x st x in NAT ex y st P[x,y] proof let x; assume x in NAT; then reconsider n = x as Element of NAT; reconsider y = n-tuples_on D as set; take y,n; thus thesis; end; consider f such that A2: dom f = NAT & for x st x in NAT holds P[x,f.x] from CLASSES1:sch 1( A1); A3: D* = union { k-tuples_on D : not contradiction } by FINSEQ_2:108; A4: Union f = D* proof thus Union f c= D* proof let x; assume x in Union f; then consider X such that A5: x in X and A6: X in rng f by TARSKI:def 4; consider y such that A7: y in dom f and A8: X = f.y by A6,FUNCT_1:def 3; reconsider y as Element of NAT by A2,A7; ex n st y = n & X = n-tuples_on D by A2,A8; then X in { k-tuples_on D : not contradiction }; hence thesis by A3,A5,TARSKI:def 4; end; let x; assume x in D*; then consider X such that A9: x in X & X in { k-tuples_on D : not contradiction } by A3,TARSKI:def 4; consider n such that A10: X = n-tuples_on D by A9; ex k st n = k & f.n = k-tuples_on D by A2; then X in rng f by A2,A10,FUNCT_1:def 3; hence thesis by A9,TARSKI:def 4; end; assume A11: D is countable; now let x; assume x in dom f; then ex n st x = n & f.x = n-tuples_on D by A2; hence f.x is countable by A11,Th10; end; hence thesis by A2,A4,Th11; end; theorem omega c= card (D*) proof defpred P[set,set] means ex p st $1 = p & $2 = len p; A1: {} in D* & len {} = 0 by FINSEQ_1:49; A2: for x st x in D* ex y st P[x,y] proof let x; assume x in D*; then reconsider p = x as Element of (D*); reconsider p as FinSequence; reconsider y = len p as set; take y,p; thus thesis; end; consider f such that A3: dom f = D* & for x st x in D* holds P[x,f.x] from CLASSES1:sch 1(A2); defpred P[Nat] means $1 in f.:(D*); A4: for n being Nat holds P[n] implies P[n+1] proof set y = the Element of D; let n be Nat; assume n in f.:(D*); then consider x such that A5: x in dom f and A6: x in D* and A7: n = f.x by FUNCT_1:def 6; consider p such that A8: x = p and A9: n = len p by A3,A5,A7; reconsider p as FinSequence of D by A6,A8,FINSEQ_1:def 11; A10: len (p^<*y*>) = n+len <*y*> by A9,FINSEQ_1:22 .= n+1 by FINSEQ_1:40; A11: p^<*y*> in D* by FINSEQ_1:def 11; then ex q being FinSequence st p^<*y*> = q & f.(p^<*y*>) = len q by A3; hence thesis by A3,A11,A10,FUNCT_1:def 6; end; ex p st {} = p & f.{} = len p by A3,FINSEQ_1:49; then A12: P[0] by A3,A1,FUNCT_1:def 6; A13: for n being Nat holds P[n] from NAT_1:sch 2(A12,A4); NAT c= f.:(D*) proof let x; assume x in NAT; then reconsider n = x as Element of NAT; n in f.:(D*) by A13; hence thesis; end; hence thesis by CARD_1:47,66; end; scheme FraenCoun1 { f(set)->set, P[set] } : { f(n) : P[n] } is countable proof consider f such that A1: dom f = NAT & for x st x in NAT holds f.x = f(x) from FUNCT_1:sch 3; { f(n) : P[n] } c= rng f proof let x; assume x in { f(n) : P[n] }; then consider n such that A2: x = f(n) and P[n]; f.n = x by A1,A2; hence thesis by A1,FUNCT_1:def 3; end; hence thesis by A1,CARD_3:93; end; scheme FraenCoun2 { f(set,set)->set, P[set,set] } : { f(n1,n2) : P[n1,n2] } is countable proof consider N being Function such that N is one-to-one and A1: dom N = NAT and A2: rng N = [:NAT,NAT:] by Th5,WELLORD2:def 4; deffunc g(set) = f((N.$1)`1,(N.$1)`2); consider f such that A3: dom f = NAT & for x st x in NAT holds f.x = g(x) from FUNCT_1:sch 3; { f(n1,n2) : P[n1,n2] } c= rng f proof let x; assume x in { f(n1,n2) : P[n1,n2] }; then consider n1,n2 such that A4: x = f(n1,n2) and P[n1,n2]; consider y such that A5: y in dom N and A6: [n1,n2] = N.y by A2,FUNCT_1:def 3; [n1,n2]`1 = n1 & [n1,n2]`2 = n2; then x = f.y by A1,A3,A4,A5,A6; hence thesis by A1,A3,A5,FUNCT_1:def 3; end; hence thesis by A3,CARD_3:93; end; scheme FraenCoun3 { f(set,set,set)->set, P[set,set,set] } : { f(n1,n2,n3) : P[n1,n2 ,n3] } is countable proof [:NAT,NAT:],[:[:NAT,NAT:],NAT:] are_equipotent by Th5,CARD_2:8; then A1: NAT,[:[:NAT,NAT:],NAT:] are_equipotent by Th5,WELLORD2:15; [:[:NAT,NAT:],NAT:] = [:NAT,NAT,NAT:] by ZFMISC_1:def 3; then consider N being Function such that N is one-to-one and A2: dom N = NAT and A3: rng N = [:NAT,NAT,NAT:] by A1,WELLORD2:def 4; deffunc g(set) = f((N.$1)`1`1,(N.$1)`1`2,(N.$1)`2); consider f such that A4: dom f = NAT & for x st x in NAT holds f.x = g(x) from FUNCT_1:sch 3; { f(n1,n2,n3) : P[n1,n2,n3] } c= rng f proof reconsider NAT9 = NAT as non empty set; let x; assume x in { f(n1,n2,n3) : P[n1,n2,n3] }; then consider n1,n2,n3 such that A5: x = f(n1,n2,n3) and P[n1,n2,n3]; reconsider n1,n2,n3 as Element of NAT9; A6: [n1,n2,n3]`3_3 = n3 & [n1,n2,n3]`1_3 = [n1,n2,n3]`1`1; consider y such that A8: y in dom N and A9: [n1,n2,n3] = N.y by A3,FUNCT_1:def 3; [n1,n2,n3]`1_3 = n1 & [n1,n2,n3]`2_3 = n2; then x = f.y by A2,A4,A5,A8,A9,A6; hence thesis by A2,A4,A8,FUNCT_1:def 3; end; hence thesis by A4,CARD_3:93; end; reserve f,f1,f2 for Function, X1,X2 for set; theorem Th15: not M is finite implies M*`M = M proof defpred P[set] means ex f st f = $1 & f is one-to-one & dom f = [:rng f,rng f:]; consider X such that A1: x in X iff x in PFuncs([:M,M:],M) & P[x] from XBOOLE_0:sch 1; A2: x in X implies x is Function proof assume x in X; then ex f st f = x & f is one-to-one & dom f = [:rng f,rng f:] by A1; hence thesis; end; A3: for Z st Z <> {} & Z c= X & Z is c=-linear holds union Z in X proof let Z; assume that Z <> {} and A4: Z c= X and A5: Z is c=-linear; union Z is Relation-like Function-like proof set F = union Z; thus for x st x in F ex y1,y2 st [y1,y2] = x proof let x; assume x in F; then consider Y such that A6: x in Y and A7: Y in Z by TARSKI:def 4; reconsider f = Y as Function by A2,A4,A7; for x st x in f ex y1,y2 st [y1,y2] = x by RELAT_1:def 1; hence thesis by A6; end; let x,y1,y2; assume [x,y1] in F; then consider X1 such that A8: [x,y1] in X1 and A9: X1 in Z by TARSKI:def 4; assume [x,y2] in F; then consider X2 such that A10: [x,y2] in X2 and A11: X2 in Z by TARSKI:def 4; reconsider f1 = X1, f2 = X2 as Function by A2,A4,A9,A11; X1,X2 are_c=-comparable by A5,A9,A11,ORDINAL1:def 8; then X1 c= X2 or X2 c= X1 by XBOOLE_0:def 9; then [x,y2] in X1 & (for x,y1,y2 st [x,y1] in f1 & [x,y2] in f1 holds y1 = y2) or [x,y1] in X2 & for x,y1,y2 st [x,y1] in f2 & [x,y2] in f2 holds y1 = y2 by A8,A10,FUNCT_1:def 1; hence thesis by A8,A10; end; then reconsider f = union Z as Function; A12: f is one-to-one proof let x1,x2 be set; assume that A13: x1 in dom f and A14: x2 in dom f; [x1,f.x1] in f by A13,FUNCT_1:1; then consider X1 such that A15: [x1,f.x1] in X1 and A16: X1 in Z by TARSKI:def 4; [x2,f.x2] in f by A14,FUNCT_1:1; then consider X2 such that A17: [x2,f.x2] in X2 and A18: X2 in Z by TARSKI:def 4; consider f2 such that A19: f2 = X2 and A20: f2 is one-to-one and dom f2 = [:rng f2,rng f2:] by A1,A4,A18; consider f1 such that A21: f1 = X1 and A22: f1 is one-to-one and dom f1 = [:rng f1,rng f1:] by A1,A4,A16; X1, X2 are_c=-comparable by A5,A16,A18,ORDINAL1:def 8; then X1 c= X2 or X2 c= X1 by XBOOLE_0:def 9; then x1 in dom f1 & x2 in dom f1 & f.x1 = f1.x1 & f.x2 = f1.x2 or x1 in dom f2 & x2 in dom f2 & f.x1 = f2.x1 & f.x2 = f2.x2 by A15,A17,A21,A19, FUNCT_1:1; hence thesis by A22,A20,FUNCT_1:def 4; end; A23: dom f = [:rng f,rng f:] proof thus dom f c= [:rng f,rng f:] proof let x; assume x in dom f; then [x,f.x] in f by FUNCT_1:def 2; then consider Y such that A24: [x,f.x] in Y and A25: Y in Z by TARSKI:def 4; consider g being Function such that A26: g = Y and g is one-to-one and A27: dom g = [:rng g,rng g:] by A1,A4,A25; g c= f by A25,A26,ZFMISC_1:74; then rng g c= rng f by RELAT_1:11; then A28: dom g c= [:rng f,rng f:] by A27,ZFMISC_1:96; x in dom g by A24,A26,FUNCT_1:1; hence thesis by A28; end; let x1,x2 be set; assume A29: [x1,x2] in [:rng f,rng f:]; [x1,x2]`1 in rng f by A29,MCART_1:10; then consider y1 such that A31: y1 in dom f & [x1,x2]`1 = f.y1 by FUNCT_1:def 3; [x1,x2] `2 in rng f by A29,MCART_1:10; then consider y2 such that A32: y2 in dom f & [x1,x2]`2 = f.y2 by FUNCT_1:def 3; [y2,[x1,x2]`2] in f by A32,FUNCT_1:1; then consider X2 such that A33: [y2,[x1,x2]`2] in X2 and A34: X2 in Z by TARSKI:def 4; consider f2 such that A35: f2 = X2 and f2 is one-to-one and A36: dom f2 = [:rng f2,rng f2:] by A1,A4,A34; f2 c= f by A34,A35,ZFMISC_1:74; then A37: dom f2 c= dom f by RELAT_1:11; [y1,[x1,x2]`1] in f by A31,FUNCT_1:1; then consider X1 such that A38: [y1,[x1,x2]`1] in X1 and A39: X1 in Z by TARSKI:def 4; consider f1 such that A40: f1 = X1 and f1 is one-to-one and A41: dom f1 = [:rng f1,rng f1:] by A1,A4,A39; X1, X2 are_c=-comparable by A5,A39,A34,ORDINAL1:def 8; then X1 c= X2 or X2 c= X1 by XBOOLE_0:def 9; then y1 in dom f1 & y2 in dom f1 & f1.y1 = [x1,x2]`1 & f1.y2 = [x1,x2] `2 or y1 in dom f2 & y2 in dom f2 & f2.y1 = [x1,x2]`1 & f2.y2 = [x1,x2]`2 by A38,A33,A40,A35,FUNCT_1:1; then [x1,x2]`1 in rng f1 & [x1,x2]`2 in rng f1 or [x1,x2]`1 in rng f2 & [x1,x2]`2 in rng f2 by FUNCT_1:def 3; then A42: [x1,x2] in dom f1 or [x1,x2] in dom f2 by A41,A36,ZFMISC_1:87; f1 c= f by A39,A40,ZFMISC_1:74; then dom f1 c= dom f by RELAT_1:11; hence thesis by A42,A37; end; A43: rng f c= M proof let y; assume y in rng f; then consider x such that A44: x in dom f & y = f.x by FUNCT_1:def 3; [x,y] in union Z by A44,FUNCT_1:def 2; then consider Y such that A45: [x,y] in Y and A46: Y in Z by TARSKI:def 4; Y in PFuncs([:M,M:],M) by A1,A4,A46; then consider g being Function such that A47: Y = g and dom g c= [:M,M:] and A48: rng g c= M by PARTFUN1:def 3; x in dom g & g.x = y by A45,A47,FUNCT_1:1; then y in rng g by FUNCT_1:def 3; hence thesis by A48; end; dom f c= [:M,M:] proof let x; assume x in dom f; then [x,f.x] in union Z by FUNCT_1:def 2; then consider Y such that A49: [x,f.x] in Y and A50: Y in Z by TARSKI:def 4; Y in PFuncs([:M,M:],M) by A1,A4,A50; then consider g being Function such that A51: Y = g and A52: dom g c= [:M,M:] and rng g c= M by PARTFUN1:def 3; x in dom g by A49,A51,FUNCT_1:1; hence thesis by A52; end; then f in PFuncs([:M,M:],M) by A43,PARTFUN1:def 3; hence thesis by A1,A12,A23; end; consider f such that A53: f is one-to-one and A54: dom f = [:omega,omega:] & rng f = omega by Th5,WELLORD2:def 4; assume A55: not M is finite; then not M in omega; then A56: omega c= M by CARD_1:4; then [:omega,omega:] c= [:M,M:] by ZFMISC_1:96; then f in PFuncs([:M,M:],M) by A54,A56,PARTFUN1:def 3; then X <> {} by A1,A53,A54; then consider Y such that A57: Y in X and A58: for Z st Z in X & Z <> Y holds not Y c= Z by A3,ORDERS_1:67; consider f such that A59: f = Y and A60: f is one-to-one and A61: dom f = [:rng f,rng f:] by A1,A57; set A = rng f; A62: [:A,A:],A are_equipotent by A60,A61,WELLORD2:def 4; Y in PFuncs([:M,M:],M) by A1,A57; then A63: ex f st Y = f & dom f c= [:M,M:] & rng f c= M by PARTFUN1:def 3; set N = card A; A64: card M = M by CARD_1:def 2; then A65: N c= M by A59,A63,CARD_1:11; A66: now (omega \ A) misses A by XBOOLE_1:79; then A67: (omega \ A) /\ A = {} by XBOOLE_0:def 7; then [:(omega \ A) /\ A,A /\ (omega \ A):] = {} by ZFMISC_1:90; then A68: [:omega \ A,A:] /\ [:A,omega \ A:] = {} by ZFMISC_1:100; [:(omega \ A) /\ (omega \ A),(omega \ A) /\ A:] = {} by A67,ZFMISC_1:90; then [:omega \ A,omega \ A:] /\ [:omega \ A,A:] = {} by ZFMISC_1:100; then A69: [:omega \ A,omega \ A:] misses [:omega \ A,A:] by XBOOLE_0:def 7; [:A /\ A,(omega \ A) /\ A:] = {} by A67,ZFMISC_1:90; then A70: [:A,omega \ A:] /\ [:A,A:] = {} by ZFMISC_1:100; [:(omega \ A) /\ A,A /\ A:] = {} by A67,ZFMISC_1:90; then A71: {} \/ {} = {} & [:omega \ A,A:] /\ [:A,A:] = {} by ZFMISC_1:100; [:(omega \ A) /\ A,(omega \ A) /\ A:] = {} by A67,ZFMISC_1:90; then [:omega \ A,omega \ A:] /\ [:A,A:] = {} by ZFMISC_1:100; then A72: ([:omega \ A,omega \ A:] \/ [:omega \ A,A:]) /\ [:A,A:] = {} by A71, XBOOLE_1:23; A73: omega c= omega +` N & omega +` omega = omega by CARD_2:75,94; assume A74: A is finite; then N in omega by CARD_1:47,CARD_3:42; then omega +` N c= omega +` omega by CARD_2:83; then A75: omega = omega +` N by A73,XBOOLE_0:def 10; N = card card A; then (omega)*`N c= omega by A74,CARD_2:89; then A76: omega +` (omega)*`N = omega by CARD_2:76; card omega = omega by CARD_1:def 2; then A77: omega = card (omega \ A) by A74,A75,CARD_2:98,CARD_3:42; [:(omega \ A) /\ A,(omega \ A) /\ (omega \ A):] = {} by A67,ZFMISC_1:90; then [:omega \ A,omega \ A:] /\ [:A,omega \ A:] = {} by ZFMISC_1:100; then ([:omega \ A,omega \ A:] \/ [:omega \ A,A:]) /\ [:A,omega \ A:] = {} \/ {} by A68,XBOOLE_1:23 .= {}; then ([:omega \ A,omega \ A:] \/ [:omega \ A,A:]) misses [:A,omega \ A:] by XBOOLE_0:def 7; then card ([:omega \ A,omega \ A:] \/ [:omega \ A,A:] \/ [:A,omega \ A:]) = card ([:omega \ A,omega \ A:] \/ [:omega \ A,A:]) +` card [:A,omega \ A:] by CARD_2:35 .= card [:omega \ A,omega \ A:] +` card [:omega \ A,A:] +` card [:A, omega \ A:] by A69,CARD_2:35 .= card [:omega \ A,omega \ A:] +` card [:omega,N:] +` card [:A,omega \ A:] by A77,CARD_2:7 .= card [:omega,omega:] +` card [:omega,N:] +` card [:A,omega \ A:] by A77,CARD_2:7 .= omega +` card [:omega,N:] +` card [:N,omega:] by A77,Th5,CARD_2:7 .= omega +` (omega)*`N +` card [:N,omega:] by CARD_2:def 2 .= omega +` (omega)*`N +` N*`(omega) by CARD_2:def 2; then [:omega \ A,omega \ A:] \/ [:omega \ A,A:] \/ [:A,omega \ A:],omega \ A are_equipotent by A77,A76,CARD_1:5; then consider g being Function such that A78: g is one-to-one and A79: dom g = [:omega \ A,omega \ A:] \/ [:omega \ A,A:] \/ [:A,omega \ A:] and A80: rng g = omega \ A by WELLORD2:def 4; A81: dom (g+*f) = dom g \/ dom f by FUNCT_4:def 1; then A82: dom (g+*f) = [:omega \ A,(omega \ A) \/ A:] \/ [:A,omega \ A:] \/ [: A,A:] by A61,A79,ZFMISC_1:97 .= [:omega \ A,(omega \ A) \/ A:] \/ ([:A,omega \ A:] \/ [:A,A:]) by XBOOLE_1:4 .= [:omega \ A,(omega \ A) \/ A:] \/ [:A,(omega \ A) \/ A:] by ZFMISC_1:97 .= [:(omega \ A) \/ A,(omega \ A) \/ A:] by ZFMISC_1:97 .= [:omega \/ A,(omega \ A) \/ A:] by XBOOLE_1:39 .= [:omega \/ A,omega \/ A:] by XBOOLE_1:39; {} \/ {} = {}; then dom g /\ dom f = {} by A61,A79,A72,A70,XBOOLE_1:23; then A83: dom g misses dom f by XBOOLE_0:def 7; then g c= g+*f by FUNCT_4:32; then rng f c= rng (g+*f) & rng g c= rng (g+*f) by FUNCT_4:18,RELAT_1:11; then rng (g+*f) c= rng g \/ rng f & rng g \/ rng f c= rng (g+*f) by FUNCT_4:17,XBOOLE_1:8; then A84: rng (g+*f) = rng g \/ rng f by XBOOLE_0:def 10 .= omega \/ A by A80,XBOOLE_1:39; A85: g+*f is one-to-one proof rng f misses rng g by A80,XBOOLE_1:79; then A86: rng f /\ rng g = {} by XBOOLE_0:def 7; let x,y; assume that A87: x in dom (g+*f) and A88: y in dom (g+*f); A89: y in dom g or y in dom f by A81,A88,XBOOLE_0:def 3; x in dom f or x in dom g by A81,A87,XBOOLE_0:def 3; then (g+*f).x = f.x & (g+*f).y = f.y & (f.x = f.y implies x = y) or (g +*f).x = g.x & (g+*f).y = g.y & (g.x = g.y implies x = y) or (g+*f).x = f.x & ( g+*f).y = g.y & f.x in rng f & g.y in rng g or (g+*f).x = g.x & (g+*f).y = f.y & g.x in rng g & f.y in rng f by A60,A78,A83,A89,FUNCT_1:def 3,def 4 ,FUNCT_4:13,16; hence thesis by A86,XBOOLE_0:def 4; end; set x = the Element of omega \ A; omega \ A <> {} by A74,A75,CARD_1:68,CARD_3:42; then A90: x in omega & not x in A by XBOOLE_0:def 5; A91: omega \/ A c= M by A56,A59,A63,XBOOLE_1:8; then [:omega \/ A,omega \/ A:] c= [:M,M:] by ZFMISC_1:96; then g+*f in PFuncs([:M,M:],M) by A84,A82,A91,PARTFUN1:def 3; then g+*f in X by A1,A84,A82,A85; then g+*f = f by A58,A59,FUNCT_4:25; hence contradiction by A84,A90,XBOOLE_0:def 3; end; A92: now N*`N = card [:N,N:] by CARD_2:def 2; then A93: N*`N = card [:A,A:] by CARD_2:7; [:A,A:],A are_equipotent by A60,A61,WELLORD2:def 4; then A94: N*`N = N by A93,CARD_1:5; assume N <> M; then A95: N in M by A65,CARD_1:3; M+`N = M by A55,A65,CARD_2:76; then card (M \ A) = M by A64,A95,CARD_2:98; then consider h being Function such that A96: h is one-to-one & dom h = A and A97: rng h c= M \ A by A65,CARD_1:10; set B = rng h; A,B are_equipotent by A96,WELLORD2:def 4; then A98: N = card B by CARD_1:5; A misses (M \ A) & A /\ B c= A /\ (M \ A) by A97,XBOOLE_1:26,79; then A /\ B c= {} by XBOOLE_0:def 7; then A /\ B = {}; then A99: A misses B by XBOOLE_0:def 7; (A \/ B) \ A = B \ A by XBOOLE_1:40 .= B by A99,XBOOLE_1:83; then A100: [:B,B:] c= [:(A \/ B) \ A,A \/ B:] by ZFMISC_1:96; [:(A \/ B) \ A,A \/ B:] c= [:(A \/ B) \ A,A \/ B:] \/ [:A \/ B,(A \/ B ) \ A :] & [:A \/ B,A \/ B:] \ [:A,A:] = [:(A \/ B) \ A,A \/ B:] \/ [:A \/ B, (A \/ B ) \ A:] by XBOOLE_1:7,ZFMISC_1:103; then A101: [:B,B:] c= [:A \/ B,A \/ B:] \ [:A,A:] by A100,XBOOLE_1:1; N+`N = N by A66,CARD_2:75; then card (A \/ B) = N by A98,A99,CARD_2:35; then card [:A \/ B,A \/ B:] = card [:N,N:] by CARD_2:7 .= N by A94,CARD_2:def 2; then A102: card ([:A \/ B,A \/ B:] \ [:A,A:]) c= N by CARD_1:11; N = card [:N,N:] by A94,CARD_2:def 2; then N = card [:B,B:] by A98,CARD_2:7; then N c= card ([:A \/ B,A \/ B:] \ [:A,A:]) by A101,CARD_1:11; then card ([:A \/ B,A \/ B:] \ [:A,A:]) = N by A102,XBOOLE_0:def 10; then [:A \/ B,A \/ B:] \ [:A,A:],B are_equipotent by A98,CARD_1:5; then consider g such that A103: g is one-to-one and A104: dom g = [:A \/ B,A \/ B:] \ [:A,A:] and A105: rng g = B by WELLORD2:def 4; A106: dom (g+*f) = dom g \/ dom f by FUNCT_4:def 1; then A c= A \/ B & dom (g+*f) = [:A \/ B,A \/ B:] \/ [:A,A:] by A61,A104, XBOOLE_1:7,39; then A107: dom (g+*f) = [:A \/ B,A \/ B:] by XBOOLE_1:12,ZFMISC_1:96; A108: ([:A \/ B,A \/ B:] \ [:A,A:]) misses [:rng f,rng f:] by XBOOLE_1:79; A109: g+*f is one-to-one proof let x,y; assume that A110: x in dom (g+*f) and A111: y in dom (g+*f); A112: y in dom g or y in dom f by A106,A111,XBOOLE_0:def 3; x in dom f or x in dom g by A106,A110,XBOOLE_0:def 3; then A113: (g+*f).x = f.x & (g+*f).y = f.y & (f.x = f.y implies x = y) or (g +*f).x = g.x & (g+*f).y = g.y & (g.x = g.y implies x = y) or (g+*f).x = f.x & ( g+*f).y = g.y & f.x in rng f & g.y in rng g or (g+*f).x = g.x & (g+*f).y = f.y & g.x in rng g & f.y in rng f by A60,A61,A103,A104,A108,A112, FUNCT_1:def 3,def 4,FUNCT_4:13,16; A misses (M \ A) & A /\ B c= A /\ (M \ A) by A97,XBOOLE_1:26,79; then A114: rng f /\ rng g c= {} by A105,XBOOLE_0:def 7; assume (g+*f).x = (g+*f).y; hence thesis by A114,A113,XBOOLE_0:def 4; end; set x = the Element of B; A115: B <> {} by A66,A98; then x in M \ A by A97,TARSKI:def 3; then A116: not x in rng f by XBOOLE_0:def 5; g c= g+*f by A61,A104,FUNCT_4:32,XBOOLE_1:79; then rng f c= rng (g+*f) & rng g c= rng (g+*f) by FUNCT_4:18,RELAT_1:11; then A117: rng g \/ rng f c= rng(g+*f) by XBOOLE_1:8; rng(g+*f) c= rng g \/ rng f by FUNCT_4:17; then A118: rng (g+*f) = rng g \/ rng f by A117,XBOOLE_0:def 10; B c= M by A97,XBOOLE_1:1; then A119: A \/ B c= M by A59,A63,XBOOLE_1:8; then [:A \/ B,A \/ B:] c= [:M,M:] by ZFMISC_1:96; then g+*f in PFuncs([:M,M:],M) by A105,A118,A107,A119,PARTFUN1:def 3; then A120: g+*f in X by A1,A105,A118,A107,A109; x in rng (g+*f) by A105,A118,A115,XBOOLE_0:def 3; hence contradiction by A58,A59,A120,A116,FUNCT_4:25; end; then M*`M = card [:N,N:] by CARD_2:def 2 .= card [:A,A:] by CARD_2:7; hence thesis by A92,A62,CARD_1:5; end; theorem Th16: not M is finite & 0 in N & (N c= M or N in M) implies M*`N = M & N*`M = M proof A1: 1*`M = M by CARD_2:21; assume not M is finite; then A2: M*`M = M by Th15; assume 0 in N; then 1 c= N by CARD_2:68; then A3: 1*`M c= N*`M by CARD_2:90; assume N c= M or N in M; then N*`M c= M*`M by CARD_2:90; hence thesis by A2,A3,A1,XBOOLE_0:def 10; end; theorem Th17: not M is finite & (N c= M or N in M) implies M*`N c= M & N*`M c= M proof assume not M is finite & (N c= M or N in M); then M*`N = M or not 0 in N by Th16; then M*`N c= M or N = 0 & M*`0 = 0 & 0 c= M by CARD_2:20,ORDINAL3:8,XBOOLE_1:2; hence thesis; end; theorem not X is finite implies [:X,X:],X are_equipotent & card [:X,X:] = card X proof assume not X is finite; then (card X)*`(card X) = card X by Th15; then card [:card X,card X:] = card X by CARD_2:def 2; then card [:X,X:] = card X by CARD_2:7; hence thesis by CARD_1:5; end; theorem not X is finite & Y is finite & Y <> {} implies [:X,Y:],X are_equipotent & card [:X,Y:] = card X proof assume that A1: not X is finite and A2: Y is finite & Y <> {}; card Y c= card X & 0 in card Y by A1,A2,ORDINAL3:8; then (card X)*`(card Y) = card X by A1,Th16; then card [:card X,card Y:] = card X by CARD_2:def 2; then card [:X,Y:] = card X by CARD_2:7; hence thesis by CARD_1:5; end; theorem K in L & M in N implies K*`M in L*`N & M*`K in L*`N proof A1: for K,L,M,N st K in L & M in N & L c= N holds K*`M in L*`N proof let K,L,M,N; assume that A2: K in L and A3: M in N and A4: L c= N; A5: now assume A6: N is finite; then reconsider N as finite Cardinal; reconsider L,M,K as finite Cardinal by A2,A3,A4,A6,CARD_3:92; A7: card N = N by CARD_1:def 2; A8: card M = M by CARD_1:def 2; then card M < card N by A3,A7,NAT_1:41; then A9: card K * card M <= card K * card N by XREAL_1:64; A10: card L = L by CARD_1:def 2; then A11: L*`N = card (card L * card N) by A7,CARD_2:39; A12: card K = K by CARD_1:def 2; then card K < card L by A2,A10,NAT_1:41; then card K * card N < card L * card N by A3,XREAL_1:68; then A13: card K * card M < card L * card N by A9,XXREAL_0:2; K*`M = card (card K * card M) by A12,A8,CARD_2:39; hence thesis by A11,A13,NAT_1:41; end; A14: 0 in L by A2,ORDINAL3:8; now assume A15: not N is finite; then A16: L*`N = N by A4,A14,Th16; A17: omega c= N by A15,CARD_3:85; A18: now assume K is finite & M is finite; then reconsider K,M as finite Cardinal; card K = K & card M = M by CARD_1:def 2; then K*`M = card (card K * card M) by CARD_2:39 .= (card K * card M) by CARD_1:def 2; hence thesis by A16,A17,TARSKI:def 3; end; K c= M & (M is finite or not M is finite) or M c= K & (K is finite or not K is finite); then K is finite & M is finite or K*`M c= M or K*`M c= K & K in N by A2,A4 ,Th17; hence thesis by A3,A16,A18,ORDINAL1:12; end; hence thesis by A5; end; L c= N or N c= L; hence thesis by A1; end; theorem Th21: not X is finite implies card X = (omega)*`card X proof assume A1: not X is finite; then omega c= card X by CARD_3:85; hence thesis by A1,Th16; end; theorem X <> {} & X is finite & not Y is finite implies card Y *` card X = card Y proof assume that A1: X <> {} & X is finite and A2: not Y is finite; card X in card Y & 0 in card X by A1,A2,CARD_3:86,ORDINAL3:8; hence thesis by A2,Th16; end; theorem Th23: not D is finite & n <> 0 implies n-tuples_on D,D are_equipotent & card (n-tuples_on D) = card D proof assume that A1: not D is finite and A2: n <> 0; defpred P[Nat] means $1 <> 0 implies card ($1-tuples_on D) = card D; A3: for k being Nat holds P[k] implies P[k+1] proof let k be Nat; 0-tuples_on D = { <*>D } by FINSEQ_2:94; then A4: 0 in card (0-tuples_on D) & card (0-tuples_on D) c= card D by A1,ORDINAL3:8 ; k in NAT by ORDINAL1:def 12; then A5: card ((k+1)-tuples_on D) = card [:(k-tuples_on D),1-tuples_on D:] by Th9 .= card [:card (k-tuples_on D),card (1-tuples_on D):] by CARD_2:7 .= card [:card (k-tuples_on D),card D:] by Th8 .= card (k-tuples_on D) *` card D by CARD_2:def 2; assume P[k]; hence thesis by A1,A5,A4,Th16; end; A6: P[0]; for k being Nat holds P[k] from NAT_1:sch 2(A6,A3); then card (n-tuples_on D) = card D by A2; hence thesis by CARD_1:5; end; theorem not D is finite implies card D = card (D*) proof defpred P[set] means not contradiction; deffunc f(Element of NAT) = $1-tuples_on D; A1: D* = union {k-tuples_on D: not contradiction} by FINSEQ_2:108; assume A2: not D is finite; A3: for X st X in {k-tuples_on D: not contradiction} holds card X c= card D proof let X; assume X in {k-tuples_on D: not contradiction}; then consider k such that A4: X = k-tuples_on D; 0-tuples_on D = { <*>D } by FINSEQ_2:94; then card (0-tuples_on D) c= card D & k = 0 or k <> 0 by A2; hence thesis by A2,A4,Th23; end; 1-tuples_on D in {k-tuples_on D: not contradiction}; then card (1-tuples_on D) c= card (D*) by A1,CARD_1:11,ZFMISC_1:74; then A5: card D c= card (D*) by Th8; {f(k): P[k]} is countable from FraenCoun1; then card {k-tuples_on D: not contradiction} c= omega by CARD_3:def 14; then card union {k-tuples_on D: not contradiction} c= omega *` card D by A3, CARD_2:87; then card (D*) c= card D by A2,A1,Th21; hence thesis by A5,XBOOLE_0:def 10; end; begin reserve k,n,m for Element of NAT, A,B,C for Ordinal, X for set, x,y,z for set; Lm1: 1 = card 1 by CARD_1:def 2; Lm2: 2 = card 2 by CARD_1:def 2; begin reserve f,g,h,fx for Function, K,M,N for Cardinal, phi,psi for Ordinal-Sequence; theorem Th1: nextcard card X = nextcard X proof card card X in nextcard X & for M st card card X in M holds nextcard X c= M by CARD_1:def 3; hence thesis by CARD_1:def 3; end; theorem Th2: y in Union f iff ex x st x in dom f & y in f.x proof thus y in Union f implies ex x st x in dom f & y in f.x proof assume y in Union f; then consider X such that A1: y in X and A2: X in rng f by TARSKI:def 4; consider x such that A3: x in dom f & X = f.x by A2,FUNCT_1:def 3; take x; thus thesis by A1,A3; end; given x such that A4: x in dom f and A5: y in f.x; f.x in rng f by A4,FUNCT_1:def 3; hence thesis by A5,TARSKI:def 4; end; theorem Th3: alef A is infinite proof {} c= A by XBOOLE_1:2; then omega c= alef A by CARD_1:23,46; hence thesis; end; theorem Th4: M is infinite implies ex A st M = alef A proof defpred P[set] means $1 is infinite implies ex A st $1 = alef A; A1: P[K] implies P[nextcard K] proof assume that A2: P[K] and A3: not nextcard K is finite; now assume K is finite; then reconsider K9 = K as finite set; card K = K by CARD_1:def 2; then nextcard K = card (card K9 + 1) by NAT_1:42; hence contradiction by A3; end; then consider A such that A4: K = alef A by A2; take succ A; thus thesis by A4,CARD_1:19; end; A5: K <> {} & K is limit_cardinal & (for N st N in K holds P[N]) implies P[ K] proof deffunc a(Ordinal) = alef $1; defpred R[set,set] means ex A st $1 = alef A & $2 = A; assume that K <> {} and A6: K is limit_cardinal and A7: for N st N in K holds P[N] and A8: not K is finite; defpred P[set] means ex N st N = $1 & not N is finite; consider X such that A9: x in X iff x in K & P[x] from XBOOLE_0:sch 1; A10: for x st x in X ex y st R[x,y] proof let x; assume A11: x in X; then consider N such that A12: N = x and A13: not N is finite by A9; N in K by A9,A11,A12; then ex A st x = alef A by A7,A12,A13; hence thesis; end; consider f such that A14: dom f = X & for x st x in X holds R[x,f.x] from CLASSES1:sch 1( A10); now let x; assume x in rng f; then consider y such that A15: y in X and A16: x = f.y by A14,FUNCT_1:def 3; consider A such that A17: y = alef A and A18: x = A by A14,A15,A16; thus x is Ordinal by A18; thus x c= rng f proof let z; assume A19: z in x; then reconsider z9 = z as Ordinal by A18; A20: alef z9 in alef A by A18,A19,CARD_1:21; alef A in K by A9,A15,A17; then A21: alef z9 in K by A20,ORDINAL1:10; not alef z9 is finite by Th3; then A22: alef z9 in X by A9,A21; then ex A st alef z9 = alef A & f.(alef z9) = A by A14; then z9 = f.(alef z9) by CARD_1:22; hence thesis by A14,A22,FUNCT_1:def 3; end; end; then reconsider A = rng f as Ordinal by ORDINAL1:19; consider L being T-Sequence such that A23: dom L = A & for B st B in A holds L.B = a(B) from ORDINAL2:sch 2; now let B; assume B in A; then consider x such that A24: x in X and A25: B = f.x by A14,FUNCT_1:def 3; consider C such that A26: x = alef C and A27: B = C by A14,A24,A25; A28: alef succ C = nextcard alef C by CARD_1:19; alef C in K by A9,A24,A26; then A29: alef succ C c= K by A28,CARD_3:90; alef succ C <> K by A6,A28,CARD_1:def 4; then A30: alef succ C in K by A29,CARD_1:3; not alef succ C is finite by Th3; then A31: alef succ C in X by A9,A30; then consider D being Ordinal such that A32: alef succ C = alef D and A33: f.(alef succ C) = D by A14; succ C = D by A32,CARD_1:22; hence succ B in A by A14,A27,A31,A33,FUNCT_1:def 3; end; then A is limit_ordinal by ORDINAL1:28; then A34: A = {} or alef A = card sup L by A23,CARD_1:20; take A; sup L c= K proof let x; assume A35: x in sup L; then reconsider x9 = x as Ordinal; consider C such that A36: C in rng L and A37: x9 c= C by A35,ORDINAL2:21; consider y such that A38: y in dom L and A39: C = L.y by A36,FUNCT_1:def 3; reconsider y as Ordinal by A38; A40: C = alef y by A23,A38,A39; consider z such that A41: z in dom f and A42: y = f.z by A23,A38,FUNCT_1:def 3; ex D being Ordinal st z = alef D & y = D by A14,A41,A42; then C in K by A9,A14,A40,A41; hence thesis by A37,ORDINAL1:12; end; then card sup L c= card K by CARD_1:11; then A43: card sup L c= K by CARD_1:def 2; now per cases; case A = {}; then not omega in X by A14,RELAT_1:42; then not omega in K by A9; then A44: K c= omega by CARD_1:4; omega c= K by A8,CARD_3:85; hence K = omega by A44,XBOOLE_0:def 10; end; case A45: A <> {}; assume K <> alef A; then A46: card sup L in K by A34,A43,A45,CARD_1:3; not alef A is finite by Th3; then A47: card sup L in X by A9,A34,A45,A46; then consider B such that A48: card sup L = alef B and A49: f.(card sup L) = B by A14; A = B by A34,A45,A48,CARD_1:22; then A in A by A14,A47,A49,FUNCT_1:def 3; hence contradiction; end; end; hence thesis by CARD_1:46; end; A50: P[{}]; for M holds P[M] from CARD_1:sch 1(A50,A1,A5); hence thesis; end; registration let phi; cluster Union phi -> ordinal; coherence proof ex A st rng phi c= A by ORDINAL2:def 4; then On rng phi = rng phi by ORDINAL3:6; hence thesis by ORDINAL3:5; end; end; theorem Th5: X c= A implies ex phi st phi = canonical_isomorphism_of(RelIncl order_type_of RelIncl X, RelIncl X) & phi is increasing & dom phi = order_type_of RelIncl X & rng phi = X proof set R = RelIncl X; set B = order_type_of R; set phi = canonical_isomorphism_of (RelIncl B,R); assume A1: X c= A; then R is well-ordering by WELLORD2:8; then R, RelIncl B are_isomorphic by WELLORD2:def 2; then RelIncl B is well-ordering & RelIncl B, R are_isomorphic by WELLORD1:40 ,WELLORD2:8; then A2: phi is_isomorphism_of RelIncl B,R by WELLORD1:def 9; then A3: phi is one-to-one by WELLORD1:def 7; A4: field RelIncl B = B by WELLORD2:def 1; then A5: dom phi = B by A2,WELLORD1:def 7; A6: field R = X by WELLORD2:def 1; then A7: rng phi = X by A2,WELLORD1:def 7; reconsider phi as T-Sequence by A5,ORDINAL1:def 7; reconsider phi as Ordinal-Sequence by A1,A7,ORDINAL2:def 4; take phi; thus phi = canonical_isomorphism_of (RelIncl order_type_of RelIncl X, RelIncl X); thus phi is increasing proof let a,b be Ordinal; assume that A8: a in b and A9: b in dom phi; A10: a in dom phi by A8,A9,ORDINAL1:10; reconsider a9 = phi.a, b9 = phi.b as Ordinal; A11: b9 in X by A7,A9,FUNCT_1:def 3; a c= b by A8,ORDINAL1:def 2; then [a,b] in RelIncl B by A5,A9,A10,WELLORD2:def 1; then A12: [a9,b9] in R by A2,WELLORD1:def 7; a9 in X by A7,A10,FUNCT_1:def 3; then A13: a9 c= b9 by A12,A11,WELLORD2:def 1; a <> b by A8; then a9 <> b9 by A3,A9,A10,FUNCT_1:def 4; then a9 c< b9 by A13,XBOOLE_0:def 8; hence thesis by ORDINAL1:11; end; thus thesis by A2,A4,A6,WELLORD1:def 7; end; theorem Th6: X c= A implies sup X is_cofinal_with order_type_of RelIncl X proof assume A1: X c= A; then consider phi such that phi = canonical_isomorphism_of (RelIncl order_type_of RelIncl X, RelIncl X) and A2: phi is increasing & dom phi = order_type_of RelIncl X & rng phi = X by Th5; take phi; On X = X by A1,ORDINAL3:6; hence thesis by A2,ORDINAL2:def 3; end; theorem Th7: X c= A implies card X = card order_type_of RelIncl X proof set R = RelIncl X; set B = order_type_of R; set phi = canonical_isomorphism_of (RelIncl B,R); assume X c= A; then R is well-ordering by WELLORD2:8; then R, RelIncl B are_isomorphic by WELLORD2:def 2; then RelIncl B is well-ordering & RelIncl B, R are_isomorphic by WELLORD1:40 ,WELLORD2:8; then A1: phi is_isomorphism_of RelIncl B,R by WELLORD1:def 9; field R = X by WELLORD2:def 1; then A2: rng phi = X by A1,WELLORD1:def 7; field RelIncl B = B by WELLORD2:def 1; then A3: dom phi = B by A1,WELLORD1:def 7; phi is one-to-one by A1,WELLORD1:def 7; then B,X are_equipotent by A3,A2,WELLORD2:def 4; hence thesis by CARD_1:5; end; theorem Th8: ex B st B c= card A & A is_cofinal_with B proof set M = card A; M,A are_equipotent by CARD_1:def 2; then consider f such that A1: f is one-to-one and A2: dom f = M and A3: rng f = A by WELLORD2:def 4; defpred P[set] means not f.$1 in Union (f|$1); reconsider f as T-Sequence by A2,ORDINAL1:def 7; reconsider f as Ordinal-Sequence by A3,ORDINAL2:def 4; consider X such that A4: x in X iff x in M & P[x] from XBOOLE_0:sch 1; set R = RelIncl X; set B = order_type_of R; take B; A5: X c= M proof let x; thus thesis by A4; end; hence B c= card A by WELLORD2:14; set phi = canonical_isomorphism_of (RelIncl B,R); R is well-ordering by A5,WELLORD2:8; then R, RelIncl B are_isomorphic by WELLORD2:def 2; then RelIncl B is well-ordering & RelIncl B, R are_isomorphic by WELLORD1:40 ,WELLORD2:8; then A6: phi is_isomorphism_of RelIncl B,R by WELLORD1:def 9; then A7: phi is one-to-one by WELLORD1:def 7; field RelIncl B = B by WELLORD2:def 1; then A8: dom phi = B by A6,WELLORD1:def 7; field R = X by WELLORD2:def 1; then A9: rng phi = X by A6,WELLORD1:def 7; reconsider phi as T-Sequence by A8,ORDINAL1:def 7; reconsider phi as Ordinal-Sequence by A5,A9,ORDINAL2:def 4; A10: dom (f*phi) = B by A2,A5,A8,A9,RELAT_1:27; then reconsider xi = f*phi as T-Sequence by ORDINAL1:def 7; rng (f*phi) c= A by A3,RELAT_1:26; then reconsider xi as Ordinal-Sequence by ORDINAL2:def 4; take xi; thus dom xi = B & rng xi c= A by A2,A3,A5,A8,A9,RELAT_1:26,27; thus xi is increasing proof let a,b be Ordinal; assume that A11: a in b and A12: b in dom xi; A13: a in dom xi by A11,A12,ORDINAL1:10; then A14: phi.a in X by A8,A9,A10,FUNCT_1:def 3; a <> b by A11; then A15: phi.a <> phi.b by A8,A7,A10,A12,A13,FUNCT_1:def 4; reconsider a9 = phi.a, b9 = phi.b as Ordinal; reconsider a99 = f.a9, b99 = f.b9 as Ordinal; A16: phi.b in X by A8,A9,A10,A12,FUNCT_1:def 3; then not b99 in Union (f|b9) by A4; then A17: Union (f|b9) c= b99 by ORDINAL1:16; a c= b by A11,ORDINAL1:def 2; then [a,b] in RelIncl B by A10,A12,A13,WELLORD2:def 1; then [phi.a,phi.b] in R by A6,WELLORD1:def 7; then a9 c= b9 by A14,A16,WELLORD2:def 1; then a9 c< b9 by A15,XBOOLE_0:def 8; then a9 in b9 by ORDINAL1:11; then a99 c= Union (f|b9) by A2,A5,A14,FUNCT_1:50,ZFMISC_1:74; then A18: a99 c= b99 by A17,XBOOLE_1:1; a99 <> b99 by A1,A2,A5,A15,A14,A16,FUNCT_1:def 4; then A19: a99 c< b99 by A18,XBOOLE_0:def 8; a99 = xi.a & b99 = xi.b by A11,A12,FUNCT_1:12,ORDINAL1:10; hence thesis by A19,ORDINAL1:11; end; thus A c= sup xi proof let x; assume x in A; then consider y such that A20: y in dom f and A21: x = f.y by A3,FUNCT_1:def 3; reconsider x9 = x, y as Ordinal by A20,A21; now per cases; suppose not f.y in Union (f|y); then y in X by A2,A4,A20; then consider z such that A22: z in B & y = phi.z by A8,A9,FUNCT_1:def 3; x9 = xi.z & xi.z in rng xi by A10,A21,A22,FUNCT_1:12,def 3; hence thesis by ORDINAL2:19; end; suppose A23: f.y in Union (f|y); defpred P[Ordinal] means $1 in y & f.y in f.$1; consider z such that A24: z in dom (f|y) and A25: f.y in (f|y).z by A23,Th2; reconsider z as Ordinal by A24; A26: (f|y).z = f.z by A24,FUNCT_1:47; dom (f|y) = dom f /\ y by RELAT_1:61; then z in y by A24,XBOOLE_0:def 4; then A27: ex C st P[C] by A25,A26; consider C such that A28: P[C] & for B st P[B] holds C c= B from ORDINAL1:sch 1(A27); now thus C in M by A2,A20,A28,ORDINAL1:10; assume f.C in Union (f|C); then consider a be set such that A29: a in dom (f|C) and A30: f.C in (f|C).a by Th2; reconsider a as Ordinal by A29; reconsider fa = (f|C).a, fy = f.y as Ordinal; f.a = fa by A29,FUNCT_1:47; then A31: fy in f.a by A28,A30,ORDINAL1:10; dom (f|C) = dom f /\ C by RELAT_1:61; then A32: a in C by A29,XBOOLE_0:def 4; then a in y by A28,ORDINAL1:10; hence contradiction by A28,A32,A31,ORDINAL1:5; end; then C in X by A4; then consider z such that A33: z in B and A34: C = phi.z by A8,A9,FUNCT_1:def 3; reconsider z as Ordinal by A33; reconsider xz = xi.z as Ordinal; xz in rng xi by A10,A33,FUNCT_1:def 3; then A35: xz in sup xi by ORDINAL2:19; x9 in xz by A10,A21,A28,A33,A34,FUNCT_1:12; hence thesis by A35,ORDINAL1:10; end; end; hence thesis; end; sup A = A by ORDINAL2:18; hence thesis by A3,ORDINAL2:22,RELAT_1:26; end; theorem Th9: ex M st M c= card A & A is_cofinal_with M & for B st A is_cofinal_with B holds M c= B proof defpred P[Ordinal] means $1 c= card A & A is_cofinal_with $1; A1: ex B st P[B] by Th8; consider C such that A2: P[C] and A3: for B st P[B] holds C c= B from ORDINAL1:sch 1(A1); take M = card C; consider B such that A4: B c= M and A5: C is_cofinal_with B by Th8; A6: M c= C by CARD_1:8; then A7: B c= C by A4,XBOOLE_1:1; then B c= card A by A2,XBOOLE_1:1; then C c= B by A2,A3,A5,ORDINAL4:37; then A8: C = B by A7,XBOOLE_0:def 10; hence M c= card A & A is_cofinal_with M by A2,A4,A6,XBOOLE_0:def 10; let B; assume that A9: A is_cofinal_with B and A10: not M c= B; A11: C = M by A4,A6,A8,XBOOLE_0:def 10; then not B c= card A by A3,A9,A10; hence contradiction by A2,A11,A10,XBOOLE_1:1; end; Lm3: rng phi = rng psi & phi is increasing & psi is increasing implies for A st A in dom phi holds A in dom psi & phi.A = psi.A proof assume that A1: rng phi = rng psi and A2: phi is increasing; defpred P[Ordinal] means $1 in dom phi implies $1 in dom psi & phi.$1 = psi. $1; assume A3: for A,B st A in B & B in dom psi holds psi.A in psi.B; A4: for A st for B st B in A holds P[B] holds P[A] proof let A; assume that A5: for B st B in A & B in dom phi holds B in dom psi & phi.B = psi.B and A6: A in dom phi; phi.A in rng phi by A6,FUNCT_1:def 3; then consider x such that A7: x in dom psi and A8: phi.A = psi.x by A1,FUNCT_1:def 3; reconsider x as Ordinal by A7; A9: now assume A10: A in x; then A11: A in dom psi by A7,ORDINAL1:10; then psi.A in rng psi by FUNCT_1:def 3; then consider y such that A12: y in dom phi and A13: psi.A = phi.y by A1,FUNCT_1:def 3; reconsider y as Ordinal by A12; psi.A in psi.x by A3,A7,A10; then not A c= y by A2,A8,A12,A13,ORDINAL1:5,ORDINAL4:9; then A14: y in A by ORDINAL1:16; then A15: psi.y = phi.y by A5,A12; psi.y in psi.A by A3,A11,A14; hence contradiction by A13,A15; end; now assume A16: x in A; then phi.x in phi.A & x in dom phi by A2,A6,ORDINAL1:10,ORDINAL2:def 12; then phi.A in phi.A by A5,A8,A16; hence contradiction; end; hence thesis by A7,A8,A9,ORDINAL1:14; end; thus P[A] from ORDINAL1:sch 2(A4); end; theorem rng phi = rng psi & phi is increasing & psi is increasing implies phi = psi proof assume A1: rng phi = rng psi & phi is increasing & psi is increasing; A2: dom phi = dom psi proof thus dom phi c= dom psi proof let x; assume x in dom phi; hence thesis by A1,Lm3; end; let x; assume x in dom psi; hence thesis by A1,Lm3; end; for x st x in dom phi holds phi.x = psi.x by A1,Lm3; hence thesis by A2,FUNCT_1:2; end; theorem Th11: phi is increasing implies phi is one-to-one proof assume A1: for A,B st A in B & B in dom phi holds phi.A in phi.B; let x,y; assume that A2: x in dom phi & y in dom phi and A3: phi.x = phi.y; reconsider A = x, B = y as Ordinal by A2; A4: A in B or A = B or B in A by ORDINAL1:14; not phi.A in phi.B by A3; hence thesis by A1,A2,A3,A4; end; theorem Th12: (phi^psi)|(dom phi) = phi proof dom (phi^psi) = (dom phi)+^(dom psi) by ORDINAL4:def 1; then dom phi c= dom (phi^psi) by ORDINAL3:24; then A1: dom phi = (dom (phi^psi))/\(dom phi) by XBOOLE_1:28; for x st x in dom phi holds phi.x = (phi^psi).x by ORDINAL4:def 1; hence thesis by A1,FUNCT_1:46; end; theorem X <> {} implies card { Y where Y is Subset of X: card Y in M } c= M*` exp(card X,M) proof set Z = { Y where Y is Subset of X: card Y in M }; X,card X are_equipotent by CARD_1:def 2; then consider f such that A1: f is one-to-one and A2: dom f = X and A3: rng f = card X by WELLORD2:def 4; defpred P[set,set] means ex A be Ordinal, phi be Ordinal-Sequence st $2 = [A ,phi] & dom phi = M & phi|A is increasing & rng (phi|A) = f.:$1 & for B st A c= B & B in M holds phi.B = {}; A4: for x st x in Z ex y st P[x,y] proof deffunc f(set) = {}; let x; set A = order_type_of RelIncl (f.:x); consider xi2 being Ordinal-Sequence such that A5: dom xi2 = M -^ A & for B st B in M -^ A holds xi2.B = f(B) from ORDINAL2:sch 3; assume x in Z; then A6: ex Y being Subset of X st x = Y & card Y in M; consider xi1 being Ordinal-Sequence such that xi1 = canonical_isomorphism_of (RelIncl A, RelIncl (f.:x)) and A7: xi1 is increasing and A8: dom xi1 = A and A9: rng xi1 = f.:x by A3,Th5,RELAT_1:111; set phi = xi1^xi2; take y = [A,phi], A, phi; card (f.:x) = card A by A3,Th7,RELAT_1:111; then card A in M by A6,CARD_1:67,ORDINAL1:12; then A in M by CARD_3:44; then A c= M by ORDINAL1:def 2; then A+^( M -^ A) = M by ORDINAL3:def 5; hence y = [A,phi] & dom phi = M & phi|A is increasing & rng (phi|A) = f.:x by A7,A8,A9,A5,Th12,ORDINAL4:def 1; let B; assume that A10: A c= B and A11: B in M; A12: B-^A in M-^A by A10,A11,ORDINAL3:53; B = A+^(B-^A) by A10,ORDINAL3:def 5; then phi.B = xi2.(B-^A) by A8,A5,A12,ORDINAL4:def 1; hence thesis by A5,A12; end; consider g such that A13: dom g = Z & for x st x in Z holds P[x,g.x] from CLASSES1:sch 1(A4); assume A14: X <> {}; rng g c= [:M,Funcs(M,card X):] proof let x; assume x in rng g; then consider y such that A15: y in dom g and A16: x = g.y by FUNCT_1:def 3; consider A,phi such that A17: x = [A,phi] and A18: dom phi = M and A19: phi|A is increasing and A20: rng (phi|A) = f.:y and A21: for B st A c= B & B in M holds phi.B = {} by A13,A15,A16; A22: ex Y being Subset of X st y = Y & card Y in M by A13,A15; rng phi c= card X proof let x; assume x in rng phi; then consider z such that A23: z in dom phi and A24: x = phi.z by FUNCT_1:def 3; reconsider z as Ordinal by A23; z in A or A c= z by ORDINAL1:16; then x in f.:y & f.:y c= card X or x = {} by A3,A18,A20,A21,A23,A24, FUNCT_1:50,RELAT_1:111; hence thesis by A14,ORDINAL3:8; end; then A25: phi in Funcs(M,card X) by A18,FUNCT_2:def 2; A26: A c= M or M c= A; phi|A is one-to-one by A19,Th11; then dom (phi|A),f.:y are_equipotent by A20,WELLORD2:def 4; then card dom (phi|A) = card (f.:y) by CARD_1:5; then card dom (phi|A) in M by A22,CARD_1:67,ORDINAL1:12; then A27: dom (phi|A) in M by CARD_3:44; then dom (phi|A) <> M; then A in M by A18,A27,A26,RELAT_1:62,68; hence thesis by A17,A25,ZFMISC_1:87; end; then A28: card rng g c= card [:M,Funcs(M,card X):] by CARD_1:11; g is one-to-one proof let x,y; assume that A29: x in dom g and A30: y in dom g and A31: g.x = g.y; consider A2 be Ordinal, phi2 be Ordinal-Sequence such that A32: g.y = [A2,phi2] and dom phi2 = M and phi2|A2 is increasing and A33: rng (phi2|A2) = f.:y and for B st A2 c= B & B in M holds phi2.B = {} by A13,A30; consider A1 be Ordinal, phi1 be Ordinal-Sequence such that A34: g.x = [A1,phi1] and dom phi1 = M and phi1|A1 is increasing and A35: rng (phi1|A1) = f.:x and for B st A1 c= B & B in M holds phi1.B = {} by A13,A29; A36: A1 = A2 & phi1 = phi2 by A31,A34,A32,XTUPLE_0:1; A37: ex Y being Subset of X st x = Y & card Y in M by A13,A29; thus x c= y proof let z; assume A38: z in x; then f.z in f.:x by A2,A37,FUNCT_1:def 6; then ex x1 being set st x1 in dom f & x1 in y & f.z = f.x1 by A35,A33,A36 ,FUNCT_1:def 6; hence thesis by A1,A2,A37,A38,FUNCT_1:def 4; end; let z; A39: ex Y being Subset of X st y = Y & card Y in M by A13,A30; assume A40: z in y; then f.z in f.:y by A2,A39,FUNCT_1:def 6; then ex x1 being set st x1 in dom f & x1 in x & f.z = f.x1 by A35,A33,A36, FUNCT_1:def 6; hence thesis by A1,A2,A39,A40,FUNCT_1:def 4; end; then A41: Z,rng g are_equipotent by A13,WELLORD2:def 4; card [:M,Funcs(M,card X):] = card [:M,card Funcs(M,card X):] by CARD_2:7 .= M*`card Funcs(M,card X) by CARD_2:def 2 .= M*`exp(card X,M) by CARD_2:def 3; hence thesis by A41,A28,CARD_1:5; end; theorem Th14: M in exp(2,M) proof card bool M = exp(2,card M) & card M = M by CARD_1:def 2,CARD_2:31; hence thesis by CARD_1:14; end; registration cluster infinite for Cardinal; existence proof take omega; thus thesis; end; end; registration cluster infinite -> non empty for set; coherence; end; definition mode Aleph is infinite Cardinal; let M; func cf M -> Cardinal means :Def1: M is_cofinal_with it & for N st M is_cofinal_with N holds it c= N; existence proof defpred P[Ordinal] means M is_cofinal_with $1 & $1 is Cardinal; A1: ex A st P[A]; consider A such that A2: P[A] & for B st P[B] holds A c= B from ORDINAL1:sch 1(A1); reconsider K = A as Cardinal by A2; take K; thus M is_cofinal_with K by A2; let N; assume M is_cofinal_with N; hence thesis by A2; end; uniqueness proof let K1,K2 be Cardinal; assume M is_cofinal_with K1 & ( for N st M is_cofinal_with N holds K1 c= N)& M is_cofinal_with K2 & for N st M is_cofinal_with N holds K2 c= N; then K1 c= K2 & K2 c= K1; hence thesis by XBOOLE_0:def 10; end; let N; func N-powerfunc_of M -> Cardinal-Function means : Def2: (for x holds x in dom it iff x in M & x is Cardinal) & for K st K in M holds it.K = exp(K,N); existence proof deffunc f(set) = exp(card $1,N); defpred P[set] means $1 is Cardinal; consider X such that A3: x in X iff x in M & P[x] from XBOOLE_0:sch 1; consider f being Cardinal-Function such that A4: dom f = X & for x st x in X holds f.x = f(x) from CARD_3:sch 1; take f; thus x in dom f iff x in M & x is Cardinal by A3,A4; let K; assume K in M; then K = card K & K in X by A3,CARD_1:def 2; hence thesis by A4; end; uniqueness proof defpred P[set] means $1 in M & $1 is Cardinal; let f1,f2 be Cardinal-Function; assume that A5: for x holds x in dom f1 iff P[x] and A6: for K st K in M holds f1.K = exp(K,N) and A7: for x holds x in dom f2 iff P[x] and A8: for K st K in M holds f2.K = exp(K,N); A9: now let x; assume A10: x in dom f1; then reconsider K = x as Cardinal by A5; A11: K in M by A5,A10; hence f1.x = exp(K,N) by A6 .= f2.x by A8,A11; end; dom f1 = dom f2 from XBOOLE_0:sch 2(A5,A7); hence thesis by A9,FUNCT_1:2; end; end; registration let A; cluster alef A -> infinite; coherence by Th3; end; begin reserve a,b for Aleph; theorem ex A st a = alef A by Th4; theorem Th16: a <> 0 & a <> 1 & a <> 2 & a <> card n & card n in a & omega c= a proof omega c= a & card n in omega by CARD_3:85; hence thesis; end; theorem Th17: a c= M or a in M implies M is Aleph proof assume A1: a c= M or a in M; omega c= a by Th16; then omega c= M by A1,XBOOLE_1:1; hence thesis; end; theorem Th18: a c= M or a in M implies a +` M = M & M +` a = M & a *` M = M & M *` a = M proof A1: card 0 in a by Th16; assume A2: a c= M or a in M; then M is infinite by Th17; hence thesis by A2,A1,CARD_2:76,CARD_4:16; end; theorem a +` a = a & a *` a = a by CARD_2:75,CARD_4:15; theorem Th20: M c= exp(M,a) proof 1 in a by Lm1,Th16; then M = 0 & {} c= exp(M,a) or exp(M,1) c= exp(M,a) & exp(M,1) = M by CARD_2:27,93,XBOOLE_1:2; hence thesis; end; theorem union a = a by ORDINAL1:def 6; registration let a,M; cluster a +` M -> infinite; coherence proof a c= M or M c= a; then a +` M = M & M is Aleph or a +` M = a by Th18,CARD_2:76; hence thesis; end; end; registration let M,a; cluster M +` a -> infinite; coherence; end; registration let a,b; cluster a *` b -> infinite; coherence proof a c= b or b c= a; hence thesis by Th18; end; cluster exp(a,b) -> infinite; coherence proof 1 in b by Lm1,Th16; then A1: exp(a,1) c= exp(a,b) by CARD_2:92; exp(a,1) = a & omega c= a by Th16,CARD_2:27; then omega c= exp(a,b) by A1,XBOOLE_1:1; hence thesis; end; end; begin definition let IT be Aleph; attr IT is regular means cf IT = IT; end; notation let IT be Aleph; antonym IT is irregular for IT is regular; end; registration let a; cluster nextcard a -> infinite; coherence proof a in nextcard a by CARD_1:18; then omega c= nextcard a; hence thesis; end; end; theorem Th22: cf omega = omega proof defpred P[set,set] means $2 c= $1; assume A1: cf omega <> omega; cf omega c= omega by Def1; then cf omega in omega by A1,CARD_1:3; then reconsider B = cf omega as finite set; set n = card B; A2: for x,y st P[x,y] & P[y,x] holds x = y by XBOOLE_0:def 10; A3: for x,y,z st P[x,y] & P[y,z] holds P[x,z] by XBOOLE_1:1; card cf omega = cf omega by CARD_1:def 2; then omega is_cofinal_with n by Def1; then consider xi being Ordinal-Sequence such that A4: dom xi = n and A5: rng xi c= omega and xi is increasing and A6: omega = sup xi by ORDINAL2:def 17; reconsider rxi = rng xi as finite set by A4,FINSET_1:8; A7: rxi <> {} by A6,ORDINAL2:18; consider x such that A8: x in rxi & for y st y in rxi & y <> x holds not P[y,x] from CARD_2:sch 1(A7,A2,A3); reconsider x as Ordinal by A5,A8; now let A; assume A in rng xi; then A c= x or not x c= A by A8; hence A in succ x by ORDINAL1:22; end; then A9: omega c= succ x by A6,ORDINAL2:20; succ x in omega by A5,A8,ORDINAL1:28; hence contradiction by A9; end; Lm4: 1 = card 1 by CARD_1:def 2; theorem Th23: cf nextcard a = nextcard a proof nextcard a is_cofinal_with cf nextcard a by Def1; then consider xi being Ordinal-Sequence such that A1: dom xi = cf nextcard a and A2: rng xi c= nextcard a and xi is increasing and A3: nextcard a = sup xi by ORDINAL2:def 17; A4: card Union xi c= Sum Card xi & Sum (cf nextcard a --> a) = (cf nextcard a)*` a by CARD_2:65,CARD_3:39; A5: card nextcard a = nextcard a & succ Union xi = (Union xi) +^ 1 by CARD_1:def 2,ORDINAL2:31; A6: now let x; assume A7: x in cf nextcard a; xi.x in rng xi by A1,A7,FUNCT_1:def 3; then A8: card (xi.x) in nextcard a by A2,CARD_1:8,ORDINAL1:12; (Card xi).x = card (xi.x) & (cf nextcard a --> a).x = a by A1,A7, CARD_3:def 2,FUNCOP_1:7; hence (Card xi).x c= (cf nextcard a --> a).x by A8,CARD_3:91; end; dom Card xi = dom xi & dom (cf nextcard a --> a) = cf nextcard a by CARD_3:def 2,FUNCOP_1:13; then Sum Card xi c= Sum (cf nextcard a --> a) by A1,A6,CARD_3:30; then card Union xi c= (cf nextcard a)*`a by A4,XBOOLE_1:1; then A9: (card Union xi) +` 1 c= (cf nextcard a)*`a +` 1 by CARD_2:84; A10: card ((Union xi) +^ 1) = (card Union xi) +` card 1 by CARD_2:13; ex A st rng xi c= A by ORDINAL2:def 4; then On rng xi = rng xi by ORDINAL3:6; then A11: card nextcard a c= card succ Union xi by A3,CARD_1:11,ORDINAL3:72; A12: cf nextcard a c= nextcard a by Def1; now per cases; suppose cf nextcard a = 0; then A13: (cf nextcard a)*`a = 0 by CARD_2:20; 0+`1 = 1 & 1 in nextcard a by Lm1,Th16,CARD_2:18; hence thesis by A11,A5,A9,A10,A13,Lm4; end; suppose A14: cf nextcard a <> 0; 0 c= cf nextcard a by XBOOLE_1:2; then A15: 0 in cf nextcard a by A14,CARD_1:3; A16: cf nextcard a c= a or a c= cf nextcard a; 1 in a by Lm1,Th16; then A17: (cf nextcard a)*`a = a & a+`1 = a & a in nextcard a or (cf nextcard a)*`a = cf nextcard a & cf nextcard a is Aleph by A15,A16,Th18,CARD_1:18 ,CARD_2:76,CARD_4:16; then nextcard a c= (cf nextcard a) +` 1 & 1 in cf nextcard a by A11,A5,A9,A10 ,Lm1,Th16,CARD_1:4,XBOOLE_1:1; then nextcard a c= cf nextcard a by A11,A5,A9,A10,A17,Lm1,CARD_1:4 ,CARD_2:76; hence thesis by A12,XBOOLE_0:def 10; end; end; hence thesis; end; theorem Th24: omega c= cf a proof A1: a is_cofinal_with cf a by Def1; then cf a <> {} by ORDINAL2:50; then A2: {} in cf a by ORDINAL3:8; cf a is limit_ordinal by A1,ORDINAL4:38; hence thesis by A2,ORDINAL1:def 11; end; theorem cf 0 = 0 & cf card (n+1) = 1 proof A1: succ n is_cofinal_with 1 by ORDINAL3:73; card (n+1) = n+1 & n+1 = succ n by CARD_1:def 2,NAT_1:38; then cf card (n+1) c= 1 by A1,Def1; then A2: cf card (n+1) = 1 or cf card (n+1) = 0 & {} c= n & n in succ n by ORDINAL1:6,ORDINAL3:16,XBOOLE_1:2; cf 0 c= 0 & 0 c= cf 0 by Def1,XBOOLE_1:2; hence cf 0 = 0 by XBOOLE_0:def 10; card (n+1) is_cofinal_with cf card (n+1) by Def1; hence thesis by A2,ORDINAL2:50; end; theorem Th26: X c= M & card X in cf M implies sup X in M & union X in M proof assume that A1: X c= M and A2: card X in cf M; set A = order_type_of (RelIncl X); A3: card A = card X by A1,Th7; consider N such that A4: N c= card A and A5: A is_cofinal_with N and for C st A is_cofinal_with C holds N c= C by Th9; sup X is_cofinal_with A by A1,Th6; then A6: sup X is_cofinal_with N by A5,ORDINAL4:37; A7: now assume sup X = M; then cf M c= N by A6,Def1; hence contradiction by A2,A3,A4,CARD_1:4; end; for x st x in X holds x is Ordinal by A1; then reconsider A = union X as Ordinal by ORDINAL1:23; A8: sup M = M by ORDINAL2:18; sup X c= sup M by A1,ORDINAL2:22; then A9: sup X c< M by A8,A7,XBOOLE_0:def 8; hence sup X in M by ORDINAL1:11; A c= sup X proof let x; assume x in A; then consider Y being set such that A10: x in Y and A11: Y in X by TARSKI:def 4; reconsider Y as Ordinal by A1,A11; Y in sup X by A11,ORDINAL2:19; then Y c= sup X by ORDINAL1:def 2; hence thesis by A10; end; hence thesis by A9,ORDINAL1:11,12; end; theorem Th27: dom phi = M & rng phi c= N & M in cf N implies sup phi in N & Union phi in N proof assume that A1: dom phi = M and A2: rng phi c= N and A3: M in cf N; A4: card M = M by CARD_1:def 2; card rng phi c= card M by A1,CARD_1:12; then card rng phi in cf N by A3,A4,ORDINAL1:12; hence thesis by A2,Th26; end; registration let a; cluster cf a -> infinite; coherence by Th17,Th24; end; theorem Th28: cf a in a implies a is limit_cardinal proof assume A1: cf a in a; given M such that A2: a = nextcard M; cf a c= M by A1,A2,CARD_3:91; then reconsider M as Aleph; nextcard M in nextcard M by A1,A2,Th23; hence contradiction; end; theorem Th29: cf a in a implies ex xi being Ordinal-Sequence st dom xi = cf a & rng xi c= a & xi is increasing & a = sup xi & xi is Cardinal-Function & not 0 in rng xi proof a is_cofinal_with cf a by Def1; then consider xi being Ordinal-Sequence such that A1: dom xi = cf a and A2: rng xi c= a and xi is increasing and A3: a = sup xi by ORDINAL2:def 17; deffunc f(T-Sequence) = (nextcard (xi.dom $1)) \/ nextcard sup $1; consider phi being T-Sequence such that A4: dom phi = cf a & for A for psi being T-Sequence st A in cf a & psi = phi|A holds phi.A = f(psi) from ORDINAL1:sch 4; phi is Ordinal-yielding proof take sup rng phi; let x; assume A5: x in rng phi; then consider y such that A6: y in dom phi and A7: x = phi.y by FUNCT_1:def 3; reconsider y as Ordinal by A6; y c= dom phi by A6,ORDINAL1:def 2; then dom (phi|y) = y by RELAT_1:62; then x = ( nextcard (xi.y)) \/ nextcard sup (phi|y) by A4,A6,A7; hence thesis by A5,ORDINAL2:19; end; then reconsider phi as Ordinal-Sequence; defpred P[Ordinal] means $1 in cf a implies phi.$1 in a; assume cf a in a; then A8: a is limit_cardinal by Th28; A9: now let A such that A10: for B st B in A holds P[B]; thus P[A] proof assume A11: A in cf a; then A12: card A in cf a by CARD_1:9; A c= dom phi by A4,A11,ORDINAL1:def 2; then A13: dom (phi|A) = A by RELAT_1:62; then phi.A = (nextcard (xi.A)) \/ nextcard sup (phi|A) by A4,A11; then A14: phi.A = nextcard (xi.A) or phi.A = nextcard sup (phi|A) by ORDINAL3:12; A15: rng (phi|A) c= a proof let x; assume x in rng (phi|A); then consider y such that A16: y in dom (phi|A) and A17: x = (phi|A).y by FUNCT_1:def 3; reconsider y as Ordinal by A16; x = phi.y & y in cf a by A11,A13,A16,A17,FUNCT_1:47,ORDINAL1:10; hence thesis by A10,A13,A16; end; (phi|A).:A = rng (phi|A) by A13,RELAT_1:113; then card rng (phi|A) in cf a by A12,CARD_1:67,ORDINAL1:12; then sup rng (phi|A) in a by A15,Th26; then card sup (phi|A) in a by CARD_1:9; then A18: nextcard card sup (phi|A) c= a by CARD_3:90; xi.A in rng xi by A1,A11,FUNCT_1:def 3; then card (xi.A) in a by A2,CARD_1:9; then A19: nextcard card (xi.A) c= a by CARD_3:90; A20: nextcard card sup (phi|A) <> a & nextcard card sup (phi|A) = nextcard sup ( phi|A) by A8,Th1,CARD_1:def 4; a <> nextcard card (xi.A) & nextcard card (xi.A) = nextcard (xi.A) by A8,Th1,CARD_1:def 4; hence thesis by A19,A18,A20,A14,CARD_1:3; end; end; A21: for A holds P[A] from ORDINAL1:sch 2(A9); A22: rng phi c= a proof let x; assume x in rng phi; then ex y st y in dom phi & x = phi.y by FUNCT_1:def 3; hence thesis by A4,A21; end; take phi; thus dom phi = cf a by A4; thus rng phi c= a proof let x; assume x in rng phi; then ex y st y in dom phi & x = phi.y by FUNCT_1:def 3; hence thesis by A4,A21; end; thus phi is increasing proof let A,B; assume that A23: A in B and A24: B in dom phi; reconsider C = phi.A as Ordinal; A in dom phi by A23,A24,ORDINAL1:10; then C in rng (phi|B) by A23,FUNCT_1:50; then A25: C in sup (phi|B) by ORDINAL2:19; sup (phi|B) in nextcard sup (phi|B) by CARD_1:18; then A26: C in nextcard sup (phi|B) by A25,ORDINAL1:10; phi.B = ( nextcard (xi.dom (phi|B))) \/ nextcard sup (phi|B) by A4,A24; hence thesis by A26,XBOOLE_0:def 3; end; thus a c= sup phi proof let x; assume x in a; then reconsider x as Element of a; consider A such that A27: A in rng xi and A28: x c= A by A3,ORDINAL2:21; consider y such that A29: y in dom xi and A30: A = xi.y by A27,FUNCT_1:def 3; reconsider y as Ordinal by A29; y c= cf a by A1,A29,ORDINAL1:def 2; then dom (phi|y) = y by A4,RELAT_1:62; then A in nextcard A & phi.y = ( nextcard A) \/ nextcard sup (phi|y) by A1,A4 ,A29,A30,CARD_1:18; then A in phi.y by XBOOLE_0:def 3; then A31: A c= phi.y by ORDINAL1:def 2; phi.y in rng phi by A1,A4,A29,FUNCT_1:def 3; then phi.y in sup phi by ORDINAL2:19; hence thesis by A28,A31,ORDINAL1:12,XBOOLE_1:1; end; sup a = a by ORDINAL2:18; hence sup phi c= a by A22,ORDINAL2:22; phi is Cardinal-yielding proof let y; assume A32: y in dom phi; then reconsider y as Ordinal; y c= dom phi by A32,ORDINAL1:def 2; then dom (phi|y) = y by RELAT_1:62; then phi.y = ( nextcard (xi.y)) \/ nextcard sup (phi|y) by A4,A32; hence thesis by ORDINAL3:12; end; hence phi is Cardinal-Function; assume 0 in rng phi; then consider x such that A33: x in dom phi and A34: 0 = phi.x by FUNCT_1:def 3; reconsider x as Ordinal by A33; x c= dom phi by A33,ORDINAL1:def 2; then dom (phi|x) = x by RELAT_1:62; then 0 = ( nextcard (xi.x)) \/ nextcard sup (phi|x) by A4,A33,A34; then 0 = nextcard (xi.x) or 0 = nextcard sup (phi|x); hence contradiction by CARD_1:15; end; theorem omega is regular & nextcard a is regular proof thus cf omega = omega by Th22; thus cf nextcard a = nextcard a by Th23; end; begin reserve a,b for Aleph; theorem Th31: a c= b implies exp(a,b) = exp(2,b) proof A1: card bool a = exp(2,card a) by CARD_2:31; card a = a & card a in card bool a by CARD_1:14,def 2; then A2: exp(a,b) c= exp(exp(2,a),b) by A1,CARD_2:92; assume a c= b; then A3: exp(exp(2,a),b) = exp(2,a*`b) & a*`b = b by Th18,CARD_2:30; 2 in a by Lm2,Th16; then exp(2,b) c= exp(a,b) by CARD_2:92; hence thesis by A2,A3,XBOOLE_0:def 10; end; theorem exp(nextcard a,b) = exp(a,b) *` nextcard a proof now per cases by CARD_1:4; suppose A1: a in b; then a c= b by CARD_1:3; then A2: exp(a,b) = exp(2,b) by Th31; nextcard a c= b by A1,CARD_3:90; then exp(nextcard a,b) = exp(2,b) & nextcard a in exp(2,b) by Th14,Th31, ORDINAL1:12; hence thesis by A2,Th18; end; suppose A3: b c= a; deffunc f(Ordinal) = Funcs(b,$1); consider phi being T-Sequence such that A4: dom phi = nextcard a & for A st A in nextcard a holds phi.A = f (A) from ORDINAL2:sch 2; A5: cf nextcard a = nextcard a by Th23; A6: b in nextcard a by A3,CARD_3:91; Funcs(b,nextcard a) c= Union phi proof let x; assume x in Funcs(b,nextcard a); then consider f be Function such that A7: x = f and A8: dom f = b and A9: rng f c= nextcard a by FUNCT_2:def 2; reconsider f as T-Sequence by A8,ORDINAL1:def 7; reconsider f as Ordinal-Sequence by A9,ORDINAL2:def 4; sup f in nextcard a by A6,A5,A8,A9,Th27; then A10: phi.sup f in rng phi by A4,FUNCT_1:def 3; rng f c= sup f by ORDINAL2:49; then A11: f in Funcs(b,sup f) by A8,FUNCT_2:def 2; phi.sup f = Funcs(b,sup f) by A6,A5,A4,A8,A9,Th27; hence thesis by A7,A11,A10,TARSKI:def 4; end; then A12: card Funcs(b,nextcard a) c= card Union phi by CARD_1:11; card Funcs(b,nextcard a) = exp(nextcard a,b) & card Union phi c= Sum Card phi by CARD_2:def 3,CARD_3:39; then A13: exp(nextcard a,b) c= Sum Card phi by A12,XBOOLE_1:1; a in nextcard a by CARD_1:18; then A14: exp(nextcard a,b) *` exp(nextcard a,b) = exp(nextcard a,b) & exp(a, b) c= exp (nextcard a,b) by CARD_2:92,CARD_4:15; exp(nextcard a,1) = nextcard a & 1 in b by Lm1,Th16,CARD_2:27; then nextcard a c= exp(nextcard a,b) by CARD_2:92; then A15: exp(a,b)*`nextcard a c= exp(nextcard a,b) by A14,CARD_2:90; A16: now let x; A17: card card x = card x & card b = card b; assume A18: x in nextcard a; then reconsider x9 = x as Ordinal; A19: phi.x9 = Funcs(b,x9) by A4,A18; card x in nextcard a by A18,CARD_1:8,ORDINAL1:12; then card x c= a by CARD_3:91; then Funcs(b,card x) c= Funcs(b,a) by FUNCT_5:56; then A20: card Funcs(b,card x) c= card Funcs(b,a) by CARD_1:11; A21: card Funcs(b,a) = exp(a,b) by CARD_2:def 3; (nextcard a --> exp(a,b)).x = exp(a,b) & Card phi.x = card (phi.x ) by A4,A18,CARD_3:def 2,FUNCOP_1:7; hence Card phi.x c= (nextcard a --> exp(a,b)).x by A19,A17,A20,A21, FUNCT_5:61; end; dom Card phi = dom phi & dom (nextcard a --> exp(a,b)) = nextcard a by CARD_3:def 2,FUNCOP_1:13; then A22: Sum Card phi c= Sum (nextcard a --> exp(a,b)) by A4,A16,CARD_3:30; Sum (nextcard a --> exp(a,b)) = (nextcard a)*`exp(a,b) by CARD_2:65; then exp(nextcard a,b) c= exp(a,b)*`nextcard a by A13,A22,XBOOLE_1:1; hence thesis by A15,XBOOLE_0:def 10; end; end; hence thesis; end; theorem Th33: Sum (b-powerfunc_of a) c= exp(a,b) proof set X = { c where c is Element of a: c is Cardinal}; set f = X --> exp(a,b); X c= a proof let x; assume x in X; then ex c being Element of a st x = c & c is Cardinal; hence thesis; end; then A1: f c= a --> exp(a,b) by FUNCT_4:4; Sum (a --> exp(a,b)) = a*`exp( a,b) by CARD_2:65; then A2: Sum f c= a*`exp(a,b) by A1,CARD_3:33; A3: dom f = X & dom (b-powerfunc_of a) = X proof thus dom f = X by FUNCOP_1:13; thus dom (b-powerfunc_of a) c= X proof let x; assume x in dom (b-powerfunc_of a); then x in a & x is Cardinal by Def2; hence thesis; end; let x; assume x in X; then ex c being Element of a st x = c & c is Cardinal; hence thesis by Def2; end; 1 in b & exp(a,1) = a by Lm1,Th16,CARD_2:27; then a c= exp(a,b) by CARD_2:93; then A4: a*`exp(a,b) = exp(a,b) by Th18; now let x; assume A5: x in X; then consider c being Element of a such that A6: x = c and A7: c is Cardinal; reconsider c as Cardinal by A7; A8: f.x = exp(a,b) by A5,FUNCOP_1:7; (b-powerfunc_of a).x = exp(c,b) by A6,Def2; hence (b-powerfunc_of a).x c= f.x by A8,CARD_2:93; end; then Sum (b-powerfunc_of a) c= Sum f by A3,CARD_3:30; hence thesis by A2,A4,XBOOLE_1:1; end; theorem a is limit_cardinal & b in cf a implies exp(a,b) = Sum (b-powerfunc_of a) proof assume that A1: a is limit_cardinal and A2: b in cf a; deffunc f(Ordinal) = Funcs(b,$1); consider L being T-Sequence such that A3: dom L = a & for A st A in a holds L.A = f(A) from ORDINAL2:sch 2; A4: now let x; A5: card Union (b-powerfunc_of a) c= Sum (b-powerfunc_of a) by CARD_3:40; assume A6: x in a; then reconsider x9 = x as Ordinal; set m = card x9; A7: m in a by A6,CARD_1:8,ORDINAL1:12; then m in dom (b-powerfunc_of a) by Def2; then A8: (b-powerfunc_of a).(card x) in rng (b-powerfunc_of a) by FUNCT_1:def 3; x9,m are_equipotent by CARD_1:def 2; then A9: card Funcs(b,x9) = card Funcs(b,card x9) by FUNCT_5:60; L.x = Funcs(b,x9) & (Card L).x = card (L.x) by A3,A6,CARD_3:def 2; then A10: (Card L).x = exp(m,b) by A9,CARD_2:def 3; (b-powerfunc_of a).(card x) = exp(card x,b) by A7,Def2; then card exp(card x,b) c= card Union (b-powerfunc_of a) by A8,CARD_1:11 ,ZFMISC_1:74; then A11: card exp(card x,b) c= Sum (b-powerfunc_of a) by A5,XBOOLE_1:1; card exp(card x,b) = exp(card x,b) by CARD_1:def 2; hence (Card L).x c= (a --> Sum (b-powerfunc_of a)).x by A6,A10,A11, FUNCOP_1:7; end; dom (a --> Sum (b-powerfunc_of a)) = a & dom Card L = dom L by CARD_3:def 2 ,FUNCOP_1:13; then A12: Sum Card L c= Sum (a --> Sum (b-powerfunc_of a)) by A3,A4,CARD_3:30; a c= Sum (b-powerfunc_of a) proof let x; assume A13: x in a; then reconsider x9 = x as Ordinal; set m = card x9; m in a by A13,CARD_1:8,ORDINAL1:12; then A14: nextcard m c= a by CARD_3:90; nextcard m <> a by A1,CARD_1:def 4; then A15: nextcard m in a by A14,CARD_1:3; then nextcard m in dom (b-powerfunc_of a) by Def2; then A16: (b-powerfunc_of a).(nextcard m) in rng (b-powerfunc_of a) by FUNCT_1:def 3 ; (b-powerfunc_of a).(nextcard m) = exp(nextcard m,b) by A15,Def2; then A17: card exp(nextcard m,b) c= card Union (b-powerfunc_of a) by A16,CARD_1:11 ,ZFMISC_1:74; A18: nextcard m c= exp(nextcard m,b) by Th20; card x = card card x; then A19: x9 in nextcard x9 & nextcard card x = nextcard x by CARD_1:18,CARD_3:88; card exp(nextcard m,b) = exp(nextcard m,b) & card Union (b -powerfunc_of a) c= Sum (b-powerfunc_of a) by CARD_1:def 2,CARD_3:40; then exp(nextcard m,b) c= Sum (b-powerfunc_of a) by A17,XBOOLE_1:1; then nextcard card x c= Sum (b-powerfunc_of a) by A18,XBOOLE_1:1; hence thesis by A19; end; then A20: a*`Sum (b-powerfunc_of a) = Sum (b-powerfunc_of a) by Th18; Funcs(b,a) c= Union L proof let x; assume x in Funcs(b,a); then consider f such that A21: x = f and A22: dom f = b and A23: rng f c= a by FUNCT_2:def 2; reconsider f as T-Sequence by A22,ORDINAL1:def 7; reconsider f as Ordinal-Sequence by A23,ORDINAL2:def 4; rng f c= sup f by ORDINAL2:49; then A24: x in Funcs(b,sup f) by A21,A22,FUNCT_2:def 2; sup f in a by A2,A22,A23,Th27; then A25: L.sup f in rng L by A3,FUNCT_1:def 3; L.sup f = Funcs(b,sup f) by A2,A3,A22,A23,Th27; hence thesis by A24,A25,TARSKI:def 4; end; then A26: card Funcs(b,a) c= card Union L by CARD_1:11; card Union L c= Sum Card L by CARD_3:39; then card Funcs(b,a) c= Sum Card L by A26,XBOOLE_1:1; then A27: exp(a,b) c= Sum Card L by CARD_2:def 3; A28: Sum (b-powerfunc_of a) c= exp(a,b) by Th33; Sum (a --> Sum (b-powerfunc_of a)) = a*`Sum (b-powerfunc_of a) by CARD_2:65; then exp(a,b) c= a*`Sum (b-powerfunc_of a) by A27,A12,XBOOLE_1:1; hence thesis by A28,A20,XBOOLE_0:def 10; end; theorem cf a c= b & b in a implies exp(a,b) = exp(Sum (b-powerfunc_of a), cf a ) proof assume that A1: cf a c= b and A2: b in a; consider phi such that A3: dom phi = cf a and A4: rng phi c= a and phi is increasing and A5: a = sup phi and A6: phi is Cardinal-Function and A7: not 0 in rng phi by A1,A2,Th29,ORDINAL1:12; defpred R[set,set] means ex g,h st g = $1 & h = $2 & dom g = b & rng g c= a & dom h = cf a & for y st y in cf a ex fx st h.y = [fx,phi.y] & dom fx = b & for z st z in b holds (g.z in phi.y implies fx.z = g.z) & (not g.z in phi.y implies fx.z = 0); A8: for x st x in Funcs(b,a) ex x1 being set st R[x,x1] proof let x; assume x in Funcs(b,a); then consider g such that A9: x = g & dom g = b & rng g c= a by FUNCT_2:def 2; defpred P[set,set] means ex fx st $2 = [fx,phi.$1] & dom fx = b & for z st z in b holds (g.z in phi.$1 implies fx.z = g.z) & (not g.z in phi.$1 implies fx .z = 0); A10: for y st y in cf a ex x2 being set st P[y,x2] proof deffunc g(set) = 0; deffunc f(set) = g.$1; let y such that y in cf a; defpred C[set] means g.$1 in phi.y; consider fx such that A11: dom fx = b & for z st z in b holds (C[z] implies fx.z = f(z)) & (not C[z] implies fx.z = g(z)) from PARTFUN1:sch 1; take [fx,phi.y], fx; thus thesis by A11; end; consider h such that A12: dom h = cf a & for y st y in cf a holds P[y,h.y] from CLASSES1: sch 1 ( A10); take h, g, h; thus thesis by A9,A12; end; consider f such that A13: dom f = Funcs(b,a) & for x st x in Funcs(b,a) holds R[x,f.x] from CLASSES1:sch 1(A8); deffunc f(set) = Funcs(b,$1); consider F being Function such that A14: dom F = dom (b-powerfunc_of a) & for x st x in dom (b-powerfunc_of a) holds F.x = f(x) from FUNCT_1:sch 3; A15: rng f c= Funcs(cf a, Union disjoin F) proof let y; assume y in rng f; then consider x such that A16: x in dom f and A17: y = f.x by FUNCT_1:def 3; consider g,h such that g = x and A18: h = f.x and dom g = b and rng g c= a and A19: dom h = cf a and A20: for y st y in cf a ex fx st h.y = [fx,phi.y] & dom fx = b & for z st z in b holds (g.z in phi.y implies fx.z = g.z) & (not g.z in phi.y implies fx.z = 0) by A13,A16; rng h c= Union disjoin F proof let x1 be set; assume x1 in rng h; then consider x2 being set such that A21: x2 in dom h and A22: x1 = h.x2 by FUNCT_1:def 3; consider fx such that A23: x1 = [fx,phi.x2] and A24: dom fx = b and A25: for z st z in b holds (g.z in phi.x2 implies fx.z = g.z) & (not g.z in phi.x2 implies fx.z = 0) by A19,A20,A21,A22; rng fx c= phi.x2 proof reconsider x2 as Ordinal by A19,A21; let z; reconsider A = phi.x2 as Ordinal; assume z in rng fx; then consider z9 being set such that A26: z9 in dom fx & z = fx.z9 by FUNCT_1:def 3; A27: z = g.z9 & g.z9 in phi.x2 or z = 0 by A24,A25,A26; A <> 0 by A3,A7,A19,A21,FUNCT_1:def 3; hence thesis by A27,ORDINAL3:8; end; then A28: fx in Funcs(b,phi.x2) by A24,FUNCT_2:def 2; A29: [fx,phi.x2]`1 = fx & [fx,phi.x2]`2 = phi.x2; phi.x2 in rng phi & phi.x2 is Cardinal by A3,A6,A19,A21,CARD_3:def 1 ,FUNCT_1:def 3; then A30: phi.x2 in dom (b-powerfunc_of a) by A4,Def2; then F.(phi.x2) = Funcs(b,phi.x2) by A14; hence thesis by A14,A23,A28,A30,A29,CARD_3:22; end; hence thesis by A17,A18,A19,FUNCT_2:def 2; end; card card Union disjoin F = card Union disjoin F & card cf a = cf a by CARD_1:def 2; then A31: card Funcs(cf a, Union disjoin F) = card Funcs(cf a, card Union disjoin F) by FUNCT_5:61 .= exp(card Union disjoin F, cf a) by CARD_2:def 3; A32: dom Card F = dom F by CARD_3:def 2; A33: f is one-to-one proof let x,y; assume that A34: x in dom f and A35: y in dom f and A36: f.x = f.y; consider g1, h1 being Function such that A37: g1 = x and A38: h1 = f.x and A39: dom g1 = b and A40: rng g1 c= a and dom h1 = cf a and A41: for x1 being set st x1 in cf a ex fx st h1.x1 = [fx,phi.x1] & dom fx = b & for z st z in b holds (g1.z in phi.x1 implies fx.z = g1.z) & (not g1.z in phi.x1 implies fx.z = 0) by A13,A34; consider g2, h2 being Function such that A42: g2 = y and A43: h2 = f.y and A44: dom g2 = b and A45: rng g2 c= a and dom h2 = cf a and A46: for x2 being set st x2 in cf a ex fx st h2.x2 = [fx,phi.x2] & dom fx = b & for z st z in b holds (g2.z in phi.x2 implies fx.z = g2.z) & (not g2.z in phi.x2 implies fx.z = 0) by A13,A35; now let x1 be set; assume x1 in b; then reconsider X = x1 as Element of b; g1.X in rng g1 & g2.X in rng g2 by A39,A44,FUNCT_1:def 3; then reconsider A1 = g1.x1, A2 = g2.x1 as Element of a by A40,A45; set A = A1 \/ A2; A = A1 or A = A2 by ORDINAL3:12; then succ A in a by ORDINAL1:28; then consider B such that A47: B in rng phi and A48: succ A c= B by A5,ORDINAL2:21; consider x2 being set such that A49: x2 in dom phi and A50: B = phi.x2 by A47,FUNCT_1:def 3; A51: A in succ A by ORDINAL1:6; then A52: A2 in B by A48,ORDINAL1:12,XBOOLE_1:7; consider f1 being Function such that A53: h1.x2 = [f1,phi.x2] and dom f1 = b and A54: for z st z in b holds (g1.z in phi.x2 implies f1.z = g1.z) & ( not g1.z in phi.x2 implies f1.z = 0) by A3,A41,A49; A1 in B by A48,A51,ORDINAL1:12,XBOOLE_1:7; then A55: f1.X = g1.x1 by A50,A54; consider f2 being Function such that A56: h2.x2 = [f2,phi.x2] and dom f2 = b and A57: for z st z in b holds (g2.z in phi.x2 implies f2.z = g2.z) & ( not g2.z in phi.x2 implies f2.z = 0) by A3,A46,A49; f1 = f2 by A36,A38,A43,A53,A56,XTUPLE_0:1; hence g1.x1 = g2.x1 by A50,A57,A52,A55; end; hence thesis by A37,A39,A42,A44,FUNCT_1:2; end; A58: dom disjoin F = dom F by CARD_3:def 3; A59: now let x; assume A60: x in dom F; then A61: (disjoin F).x = [:F.x,{x}:] by CARD_3:def 3; (Card F).x = card (F.x) & (Card disjoin F).x = card ((disjoin F).x) by A58,A60,CARD_3:def 2; hence (Card disjoin F).x = (Card F).x by A61,CARD_1:69; end; now let x; assume A62: x in dom F; then reconsider M = x as Cardinal by A14,Def2; M in a by A14,A62,Def2; then A63: (b-powerfunc_of a).M = exp(M,b) by Def2; (Card F).x = card (F.x) & F.x = Funcs(b,x) by A14,A62,CARD_3:def 2; hence (Card F).x = (b-powerfunc_of a).x by A63,CARD_2:def 3; end; then A64: Card F = b-powerfunc_of a by A14,A32,FUNCT_1:2; dom Card disjoin F = dom disjoin F by CARD_3:def 2; then Card F = Card disjoin F by A58,A32,A59,FUNCT_1:2; then card Union disjoin F c= Sum (b-powerfunc_of a) by A64,CARD_3:39; then A65: exp(card Union disjoin F, cf a) c= exp(Sum (b-powerfunc_of a), cf a) by CARD_2:93; exp(a,b) = card Funcs(b,a) by CARD_2:def 3; then exp(a,b) c= card Funcs(cf a, Union disjoin F) by A13,A33,A15,CARD_1:10; then A66: exp(exp(a,b), cf a) = exp(a,b*`cf a) & exp(a,b) c= exp(Sum (b -powerfunc_of a ), cf a) by A31,A65,CARD_2:30,XBOOLE_1:1; Sum (b-powerfunc_of a) c= exp(a,b) by Th33; then A67: exp(Sum (b-powerfunc_of a), cf a) c= exp(exp(a,b), cf a) by CARD_2:93; b*`cf a = b by A1,Th18; hence thesis by A67,A66,XBOOLE_0:def 10; end; reserve O for Ordinal, F for Subset of omega; Lm5: for X being finite set st X c= O holds order_type_of RelIncl X is finite proof let X be finite set; assume X c= O; then RelIncl X is well-ordering by WELLORD2:8; then RelIncl X,RelIncl order_type_of RelIncl X are_isomorphic by WELLORD2:def 2; hence thesis by CARD_3:105; end; theorem Th36: for X being finite set st X c= O holds order_type_of RelIncl X = card X proof let X be finite set; assume A1: X c= O; then order_type_of RelIncl X is finite by Lm5; then reconsider o = order_type_of RelIncl X as Nat; card X = card order_type_of RelIncl X by A1,Th7; then o = card X by CARD_1:def 2; hence thesis; end; theorem Th37: {x} c= O implies order_type_of RelIncl {x} = 1 proof card {x} = 1 by CARD_2:42; hence thesis by Th36; end; theorem {x} c= O implies canonical_isomorphism_of (RelIncl order_type_of RelIncl {x}, RelIncl {x}) = 0 .--> x proof set X = {x}; set R = RelIncl X; set C = canonical_isomorphism_of (RelIncl order_type_of R,R); A1: RelIncl {0} = {[0,0]} by WELLORD2:22; assume A2: X c= O; then A3: order_type_of R = {0} by Th37,CARD_1:49; R is well-ordering by A2,WELLORD2:8; then R, RelIncl order_type_of R are_isomorphic by WELLORD2:def 2; then A4: RelIncl order_type_of R, R are_isomorphic by WELLORD1:40; RelIncl order_type_of R is well-ordering by WELLORD2:8; then A5: C is_isomorphism_of RelIncl order_type_of R, R by A4,WELLORD1:def 9; then A6: rng canonical_isomorphism_of(RelIncl {0}, R) = field R by A3,WELLORD1:def 7 .= X by WELLORD2:def 1; dom canonical_isomorphism_of(RelIncl {0}, R) = field RelIncl {0} by A5,A3, WELLORD1:def 7 .= {0} by A1,RELAT_1:173; hence thesis by A3,A6,FUNCT_4:112; end; registration let O be Ordinal, X be Subset of O, n be set; cluster canonical_isomorphism_of (RelIncl order_type_of RelIncl X,RelIncl X) .n -> ordinal; coherence proof consider phi being Ordinal-Sequence such that A1: phi = canonical_isomorphism_of(RelIncl order_type_of RelIncl X, RelIncl X) and phi is increasing and dom phi = order_type_of RelIncl X and A2: rng phi = X by Th5; per cases; suppose n in dom phi; then phi.n in rng phi by FUNCT_1:def 3; hence thesis by A1,A2; end; suppose not n in dom phi; hence thesis by A1,FUNCT_1:def 2; end; end; end; registration let X be natural-membered set, n be set; cluster canonical_isomorphism_of (RelIncl order_type_of RelIncl X,RelIncl X).n -> natural; coherence proof X c= NAT proof let x be set; assume x in X; hence thesis by ORDINAL1:def 12; end; then reconsider X as Subset of NAT; consider phi being Ordinal-Sequence such that A1: phi = canonical_isomorphism_of(RelIncl order_type_of RelIncl X, RelIncl X) and phi is increasing and dom phi = order_type_of RelIncl X and A2: rng phi = X by Th5; per cases; suppose A3: n in dom phi; phi.n in rng phi by A3,FUNCT_1:def 3; hence thesis by A1,A2; end; suppose not n in dom phi; hence thesis by A1,FUNCT_1:def 2; end; end; end; theorem card F c= order_type_of RelIncl F proof card F = card order_type_of RelIncl F by Th7; hence thesis by CARD_1:8; end; begin reserve x,y,z,a,b,c,X,X1,X2,Y,Z for set, W,W1,W2 for Tree, w,w9 for Element of W, f for Function, D,D9 for non empty set, i,k,k1,k2,l,m,n for Element of NAT, v,v1,v2 for FinSequence, p,q,r,r1,r2 for FinSequence of NAT; theorem Th1: for v1,v2,v st v1 is_a_prefix_of v & v2 is_a_prefix_of v holds v1,v2 are_c=-comparable proof let p,q,r be FinSequence; assume p is_a_prefix_of r; then A1: ex p9 being FinSequence st r = p^p9 by TREES_1:1; assume q is_a_prefix_of r; then A2: ex q9 being FinSequence st r = q^q9 by TREES_1:1; len p <= len q or len q <= len p; then (ex t being FinSequence st p^t = q) or ex t being FinSequence st q^t = p by A1,A2,FINSEQ_1:47; hence p is_a_prefix_of q or q is_a_prefix_of p by TREES_1:1; end; theorem Th2: for v1,v2,v st v1 is_a_proper_prefix_of v & v2 is_a_prefix_of v holds v1,v2 are_c=-comparable proof let p,q,r be FinSequence; assume p is_a_proper_prefix_of r; then p is_a_prefix_of r by XBOOLE_0:def 8; hence thesis by Th1; end; theorem Th3: len v1 = k+1 implies ex v2,x st v1 = v2^<*x*> & len v2 = k proof assume A1: len v1 = k+1; reconsider v2 = v1|Seg k as FinSequence by FINSEQ_1:15; v2 is_a_prefix_of v1 by TREES_1:def 1; then consider v such that A2: v1 = v2^v by TREES_1:1; take v2, v.1; A3: k <= k+1 by NAT_1:11; then len v2 = k by A1,FINSEQ_1:17; then k + len v = k+1 by A1,A2,FINSEQ_1:22; hence thesis by A1,A2,A3,FINSEQ_1:17,40; end; theorem Th4: ProperPrefixes (v^<*x*>) = ProperPrefixes v \/ {v} proof thus ProperPrefixes (v^<*x*>) c= ProperPrefixes v \/ {v} proof let y; assume y in ProperPrefixes (v^<*x*>); then consider v1 such that A1: y = v1 and A2: v1 is_a_proper_prefix_of v^<*x*> by TREES_1:def 2; v1 is_a_prefix_of v & v1 <> v or v1 = v by A2,TREES_1:9; then v1 is_a_proper_prefix_of v or v1 in {v} by TARSKI:def 1,XBOOLE_0:def 8; then y in ProperPrefixes v or y in {v} by A1,TREES_1:def 2; hence thesis by XBOOLE_0:def 3; end; let y; assume y in ProperPrefixes v \/ {v}; then A3: y in ProperPrefixes v or y in {v} by XBOOLE_0:def 3; A4: now assume y in ProperPrefixes v; then consider v1 such that A5: y = v1 and A6: v1 is_a_proper_prefix_of v by TREES_1:def 2; v is_a_prefix_of v^<*x*> by TREES_1:1; then v1 is_a_proper_prefix_of v^<*x*> by A6,XBOOLE_1:58; hence thesis by A5,TREES_1:def 2; end; v^{} = v by FINSEQ_1:34; then v is_a_prefix_of v^<*x*> & v <> v^<*x*> by FINSEQ_1:33,TREES_1:1; then v is_a_proper_prefix_of v^<*x*> by XBOOLE_0:def 8; then y in ProperPrefixes v or y = v & v in ProperPrefixes (v^<*x*>) by A3,TARSKI:def 1,TREES_1:def 2; hence thesis by A4; end; scheme TreeStructInd { T()->Tree, P[set] }: for t being Element of T() holds P[t] provided A1: P[{}] and A2: for t being Element of T(), n st P[t] & t^<*n*> in T() holds P[t^<*n*>] proof defpred X[set] means for t being Element of T() st len t = $1 holds P[t]; card x = 0 implies x = {}; then A3: X[0] by A1; A4: X[k] implies X[k+1] proof assume A5: for t being Element of T() st len t = k holds P[t]; let t be Element of T(); assume len t = k+1; then consider v, x such that A6: t = v^<*x*> and A7: len v = k by Th3; reconsider v as FinSequence of NAT by A6,FINSEQ_1:36; reconsider v as Element of T() by A6,TREES_1:21; rng <*x*> c= rng t by A6,FINSEQ_1:30; then rng <*x*> = {x} & rng <*x*> c= NAT by FINSEQ_1:39,XBOOLE_1:1; then reconsider x as Element of NAT by ZFMISC_1:31; A8: P[v] by A5,A7; x = x; hence thesis by A2,A6,A8; end; A9: X[k] from NAT_1:sch 1(A3,A4); let t be Element of T(); len t = len t; hence thesis by A9; end; theorem Th5: (for p holds p in W1 iff p in W2) implies W1 = W2 proof assume A1: for p holds p in W1 iff p in W2; thus W1 c= W2 proof let x; assume x in W1; then reconsider p = x as Element of W1; p in W2 by A1; hence thesis; end; let x; assume x in W2; then reconsider p = x as Element of W2; p in W1 by A1; hence thesis; end; definition let W1,W2; redefine pred W1 = W2 means for p holds p in W1 iff p in W2; compatibility by Th5; end; theorem p in W implies W = W with-replacement (p,W|p) proof assume A1: p in W; now let q; thus q in W implies q in W with-replacement (p,W|p) proof assume A2: q in W; now assume p is_a_proper_prefix_of q; then p is_a_prefix_of q by XBOOLE_0:def 8; then consider r being FinSequence such that A3: q = p^r by TREES_1:1; rng r c= rng q by A3,FINSEQ_1:30; then rng r c= NAT by XBOOLE_1:1; then reconsider r as FinSequence of NAT by FINSEQ_1:def 4; take r; thus r in W|p & q = p^r by A1,A2,A3,TREES_1:def 6; end; hence thesis by A1,A2,TREES_1:def 9; end; assume that A4: q in W with-replacement (p,W|p) and A5: not q in W; ex r st r in W|p & q = p^r by A1,A4,A5,TREES_1:def 9; hence contradiction by A1,A5,TREES_1:def 6; end; hence thesis by Th5; end; theorem Th7: p in W & q in W & not p is_a_prefix_of q implies q in W with-replacement (p,W1) proof not p is_a_prefix_of q implies not p is_a_proper_prefix_of q by XBOOLE_0:def 8; hence thesis by TREES_1:def 9; end; theorem p in W & q in W & not p,q are_c=-comparable implies (W with-replacement (p,W1)) with-replacement (q,W2) = (W with-replacement (q,W2)) with-replacement (p,W1) proof assume that A1: p in W and A2: q in W and A3: not p,q are_c=-comparable; A4: not p is_a_prefix_of q by A3,XBOOLE_0:def 9; not q is_a_prefix_of p by A3,XBOOLE_0:def 9; then A5: p in W with-replacement (q,W2) by A1,A2,Th7; A6: q in W with-replacement (p,W1) by A1,A2,A4,Th7; let r; thus r in (W with-replacement (p,W1)) with-replacement (q,W2) implies r in (W with-replacement (q,W2)) with-replacement (p,W1) proof assume r in (W with-replacement (p,W1)) with-replacement (q,W2); then r in W with-replacement (p,W1) & not q is_a_proper_prefix_of r or ex r1 st r1 in W2 & r = q^r1 by A6,TREES_1:def 9; then r in W & not p is_a_proper_prefix_of r & not q is_a_proper_prefix_of r or (ex r2 st r2 in W1 & r = p^r2) & not q is_a_proper_prefix_of r or q is_a_prefix_of r & ex r1 st r1 in W2 & r = q^r1 by A1,TREES_1:1,def 9 ; then r in W with-replacement (q,W2) & not p is_a_proper_prefix_of r or ex r1 st r1 in W1 & r = p^r1 by A2,A3,Th2,TREES_1:def 9; hence thesis by A5,TREES_1:def 9; end; assume r in (W with-replacement (q,W2)) with-replacement (p,W1); then r in W with-replacement (q,W2) & not p is_a_proper_prefix_of r or ex r1 st r1 in W1 & r = p^r1 by A5,TREES_1:def 9; then r in W & not q is_a_proper_prefix_of r & not p is_a_proper_prefix_of r or (ex r2 st r2 in W2 & r = q^r2) & not p is_a_proper_prefix_of r or p is_a_prefix_of r & ex r1 st r1 in W1 & r = p^r1 by A2,TREES_1:1,def 9; then r in W with-replacement (p,W1) & not q is_a_proper_prefix_of r or ex r1 st r1 in W2 & r = q^r1 by A1,A3,Th2,TREES_1:def 9; hence thesis by A6,TREES_1:def 9; end; definition let IT be Tree; attr IT is finite-order means ex n st for t being Element of IT holds not t^<*n*> in IT; end; registration cluster finite-order for Tree; existence proof reconsider T = {{}} as Tree; take T,0; let t be Element of T; thus thesis by TARSKI:def 1; end; end; definition let W; mode Chain of W -> Subset of W means : Def3: for p,q st p in it & q in it holds p,q are_c=-comparable; existence proof reconsider S = {} as Subset of W by XBOOLE_1:2; take S; let p,q; thus thesis; end; mode Level of W -> Subset of W means : Def4: ex n being Nat st it = { w: len w = n}; existence proof {} in W by TREES_1:22; then reconsider L = {{}} as Subset of W by ZFMISC_1:31; take L,0; thus L c= { w: len w = 0} proof let x; assume A1: x in L; then A2: x = {} by TARSKI:def 1; len {} = 0; hence thesis by A1,A2; end; let x; assume x in { w: len w = 0}; then ex w st x = w & len w = 0; then x = {}; hence thesis by TARSKI:def 1; end; let w; func succ w -> Subset of W equals { w^<*n*>: w^<*n*> in W }; coherence proof { w^<*n*>: w^<*n*> in W } c= W proof let x; assume x in { w^<*n*>: w^<*n*> in W }; then ex n st x = w^<*n*> & w^<*n*> in W; hence thesis; end; hence thesis; end; end; theorem for L being Level of W holds L is AntiChain_of_Prefixes of W proof let L be Level of W; consider n being Nat such that A1: L = { w: len w = n } by Def4; L is AntiChain_of_Prefixes-like proof thus for x st x in L holds x is FinSequence proof let x; assume x in L; then x is Element of W; hence thesis; end; let v1,v2; assume v1 in L; then A2: ex w1 be Element of W st v1 = w1 & len w1 = n by A1; assume v2 in L; then ex w2 be Element of W st v2 = w2 & len w2 = n by A1; hence thesis by A2,TREES_1:4; end; hence thesis by TREES_1:def 11; end; theorem succ w is AntiChain_of_Prefixes of W proof succ w is AntiChain_of_Prefixes-like proof thus for x st x in succ w holds x is FinSequence proof let x; assume x in succ w; then ex i st x = w^<*i*> & w^<*i*> in W; hence thesis; end; let v1,v2; assume v1 in succ w; then A1: ex k1 st v1 = w^<*k1*> & w^<*k1*> in W; assume v2 in succ w; then A2: ex k2 st v2 = w^<*k2*> & w^<*k2*> in W; A3: len v1 = len w + 1 by A1,FINSEQ_2:16; len v2 = len w + 1 by A2,FINSEQ_2:16; hence thesis by A3,TREES_1:4; end; hence thesis by TREES_1:def 11; end; theorem for A being AntiChain_of_Prefixes of W, C being Chain of W ex w st A /\ C c= {w} proof let A be AntiChain_of_Prefixes of W, C be Chain of W; A1: now let p,q; assume A2: p in A /\ C & q in A /\ C; then A3: p in A & q in A by XBOOLE_0:def 4; p in C & q in C by A2,XBOOLE_0:def 4; then p,q are_c=-comparable by Def3; hence p = q by A3,TREES_1:def 10; end; set w = the Element of W; now per cases; suppose A /\ C = {}; then A /\ C c= {w} by XBOOLE_1:2; hence thesis; end; suppose A4: A /\ C <> {}; set x = the Element of A /\ C; x in C by A4,XBOOLE_0:def 4; then reconsider x as Element of W; take x; thus A /\ C c= {x} proof let y; assume A5: y in A /\ C; then y is Element of W; then reconsider y9 = y as FinSequence of NAT; x = y9 by A1,A5; hence thesis by TARSKI:def 1; end; end; end; hence thesis; end; definition let W; let n be Nat; func W-level n -> Level of W equals { w: len w = n }; coherence proof defpred X[Element of W] means len $1 = n; { w: X[w] } is Subset of W from DOMAIN_1:sch 7; hence thesis by Def4; end; end; theorem w^<*n*> in succ w iff w^<*n*> in W; theorem w = {} implies W-level 1 = succ w proof assume A1: w = {}; thus W-level 1 c= succ w proof let x; assume x in W-level 1; then consider w9 such that A2: x = w9 and A3: len w9 = 1; A4: w9 = <*w9.1*> by A3,FINSEQ_1:40; then rng w9 = {w9.1} by FINSEQ_1:39; then reconsider n = w9.1 as Element of NAT by ZFMISC_1:31; w9 = w^<*n*> by A1,A4,FINSEQ_1:34; hence thesis by A2; end; let x; assume x in succ w; then consider i such that A5: x = w^<*i*> and A6: w^<*i*> in W; reconsider w9 = w^<*i*> as Element of W by A6; len <*i*> = 1 & w9 = <*i*> by A1,FINSEQ_1:34,39; hence thesis by A5; end; theorem Th14: W = union { W-level n: not contradiction } proof thus W c= union { W-level n: not contradiction } proof let x; assume x in W; then reconsider w = x as Element of W; A1: x in W-level len w; W-level len w in { W-level n: not contradiction }; hence thesis by A1,TARSKI:def 4; end; let x; assume x in union { W-level n: not contradiction }; then consider X such that A2: x in X & X in { W-level n: not contradiction } by TARSKI:def 4; ex n st X = W-level n by A2; hence thesis by A2; end; theorem for W being finite Tree holds W = union { W-level n: n <= height W } proof let W be finite Tree; thus W c= union { W-level n: n <= height W } proof let x; assume x in W; then reconsider w = x as Element of W; A1: len w <= height W by TREES_1:def 12; A2: w in W-level len w; W-level len w in { W-level n: n <= height W } by A1; hence thesis by A2,TARSKI:def 4; end; let x; assume x in union { W-level n: n <= height W }; then consider X such that A3: x in X & X in { W-level n: n <= height W } by TARSKI:def 4; ex n st X = W-level n & n <= height W by A3; hence thesis by A3; end; theorem for L being Level of W ex n st L = W-level n proof let L be Level of W; consider n being Nat such that A1: L = { w: len w = n} by Def4; reconsider n as Element of NAT by ORDINAL1:def 12; take n; thus thesis by A1; end; scheme FraenkelCard { A() ->non empty set, X() -> set, F(set) -> set }: card { F(w) where w is Element of A(): w in X() } c= card X() proof consider f such that A1: dom f = X() & for x st x in X() holds f.x = F(x) from FUNCT_1:sch 3; { F(w) where w is Element of A(): w in X() } c= rng f proof let x; assume x in { F(w) where w is Element of A(): w in X() }; then consider w being Element of A() such that A2: x = F(w) and A3: w in X(); f.w = x by A1,A2,A3; hence thesis by A1,A3,FUNCT_1:def 3; end; hence thesis by A1,CARD_1:12; end; scheme FraenkelFinCard { A() ->non empty set, X,Y() -> finite set, F(set) -> set }: card Y() <= card X() provided A1: Y() = { F(w) where w is Element of A(): w in X() } proof card { F(w) where w is Element of A(): w in X() } c= card X() from FraenkelCard; hence thesis by A1,NAT_1:39; end; theorem Th17: W is finite-order implies ex n st for w holds ex B being finite set st B = succ w & card B <= n proof given n such that A1: for w holds not w^<*n*> in W; A2: Seg n is finite; take n; let w; deffunc U(Real) = w^<*$1-1*>; A3: { U(r) where r is Real: r in Seg n } is finite from FRAENKEL:sch 21(A2 ); A4: succ w c= { w^<*r-1*> where r is Real: r in Seg n } proof let x; assume x in succ w; then consider k such that A5: x = w^<*k*> and A6: w^<*k*> in W; not w^<*n*> in W by A1; then k < n by A6,TREES_1:def 3; then A7: k+1 <= n by NAT_1:13; 1 <= k+1 by NAT_1:11; then A8: k+1 in Seg n by A7,FINSEQ_1:1; (k+1)-1 = k; hence thesis by A5,A8; end; then reconsider B = succ w as finite set by A3; take B; thus B = succ w; set C = { U(r) where r is Real: r in Seg n }; C is finite from FRAENKEL:sch 21(A2); then reconsider C as finite set; A9: C = { U(r) where r is Real: r in Seg n }; card C <= card Seg n from FraenkelFinCard(A9); then A10: card C <= n by FINSEQ_1:57; card B <= card C by A4,NAT_1:43; hence thesis by A10,XXREAL_0:2; end; theorem Th18: W is finite-order implies succ w is finite proof assume W is finite-order; then consider n such that A1: for w holds ex B being finite set st B = succ w & card B <= n by Th17; ex B being finite set st B = succ w & card B <= n by A1; hence thesis; end; registration let W be finite-order Tree; let w be Element of W; cluster succ w -> finite; coherence by Th18; end; theorem Th19: {} is Chain of W proof reconsider S = {} as Subset of W by XBOOLE_1:2; S is Chain of W proof let p,q; thus thesis; end; hence thesis; end; theorem Th20: {{}} is Chain of W proof {} in W by TREES_1:22; then reconsider S = {{}} as Subset of W by ZFMISC_1:31; S is Chain of W proof let p,q; assume that A1: p in S and A2: q in S; p = {} by A1,TARSKI:def 1; hence thesis by A2,TARSKI:def 1; end; hence thesis; end; registration let W; cluster non empty for Chain of W; existence proof {{}} is Chain of W by Th20; hence thesis; end; end; definition let W; let IT be Chain of W; attr IT is Branch-like means : Def7: (for p st p in IT holds ProperPrefixes p c= IT) & not ex p st p in W & for q st q in IT holds q is_a_proper_prefix_of p; end; registration let W; cluster Branch-like for Chain of W; existence proof defpred X[set] means $1 is Chain of W & for p st p in $1 holds ProperPrefixes p c= $1; consider X such that A1: Y in X iff Y in bool W & X[Y] from XBOOLE_0:sch 1; {} is Chain of W & for p st p in {} holds ProperPrefixes p c= {} by Th19; then A2: X <> {} by A1; now let Z; assume that Z <> {} and A3: Z c= X and A4: Z is c=-linear; union Z c= W proof let x; assume x in union Z; then consider Y such that A5: x in Y and A6: Y in Z by TARSKI:def 4; Y in bool W by A1,A3,A6; hence thesis by A5; end; then reconsider Z9 = union Z as Subset of W; A7: Z9 is Chain of W proof let p,q; assume p in Z9; then consider X1 such that A8: p in X1 and A9: X1 in Z by TARSKI:def 4; assume q in Z9; then consider X2 such that A10: q in X2 and A11: X2 in Z by TARSKI:def 4; X1,X2 are_c=-comparable by A4,A9,A11,ORDINAL1:def 8; then A12: X1 c= X2 or X2 c= X1 by XBOOLE_0:def 9; A13: X1 is Chain of W by A1,A3,A9; X2 is Chain of W by A1,A3,A11; hence thesis by A8,A10,A12,A13,Def3; end; now let p; assume p in union Z; then consider X1 such that A14: p in X1 & X1 in Z by TARSKI:def 4; ProperPrefixes p c= X1 & X1 c= union Z by A1,A3,A14,ZFMISC_1:74; hence ProperPrefixes p c= union Z by XBOOLE_1:1; end; hence union Z in X by A1,A7; end; then consider Y such that A15: Y in X and A16: Z in X & Z <> Y implies not Y c= Z by A2,ORDERS_1:67; reconsider Y as Chain of W by A1,A15; take Y; thus for p st p in Y holds ProperPrefixes p c= Y by A1,A15; given p such that A17: p in W and A18: for q st q in Y holds q is_a_proper_prefix_of p; set Z = (ProperPrefixes p) \/ {p}; ProperPrefixes p c= W & {p} c= W by A17,TREES_1:def 3,ZFMISC_1:31; then reconsider Z9 = Z as Subset of W by XBOOLE_1:8; A19: Z9 is Chain of W proof let q,r; assume that A20: q in Z9 and A21: r in Z9; A22: q in ProperPrefixes p or q in {p} by A20,XBOOLE_0:def 3; A23: r in ProperPrefixes p or r in {p} by A21,XBOOLE_0:def 3; A24: q is_a_proper_prefix_of p or q = p by A22,TARSKI:def 1,TREES_1:12; A25: r is_a_proper_prefix_of p or r = p by A23,TARSKI:def 1,TREES_1:12; A26: q is_a_prefix_of p by A24,XBOOLE_0:def 8; r is_a_prefix_of p by A25,XBOOLE_0:def 8; hence thesis by A26,Th1; end; now let q; assume q in Z; then q in ProperPrefixes p or q in {p} by XBOOLE_0:def 3; then q is_a_proper_prefix_of p or q = p by TARSKI:def 1,TREES_1:12; then q is_a_prefix_of p by XBOOLE_0:def 8; then A27: ProperPrefixes q c= ProperPrefixes p by TREES_1:17; ProperPrefixes p c= Z by XBOOLE_1:7; hence ProperPrefixes q c= Z by A27,XBOOLE_1:1; end; then A28: Z in X by A1,A19; A29: p in {p} by TARSKI:def 1; A30: not p in Y by A18; A31: p in Z by A29,XBOOLE_0:def 3; Y c= Z proof let x; assume A32: x in Y; then reconsider t = x as Element of W; t is_a_proper_prefix_of p by A18,A32; then t in ProperPrefixes p by TREES_1:12; hence thesis by XBOOLE_0:def 3; end; hence thesis by A16,A28,A30,A31; end; end; definition let W; mode Branch of W is Branch-like Chain of W; end; registration let W; cluster Branch-like -> non empty for Chain of W; coherence proof let B be Chain of W such that A1: B is Branch-like empty; set t = the Element of W; for q st q in B holds q is_a_proper_prefix_of t by A1; hence contradiction by A1,Def7; end; end; reserve C for Chain of W, B for Branch of W; theorem Th21: v1 in C & v2 in C implies v1 in ProperPrefixes v2 or v2 is_a_prefix_of v1 proof assume A1: v1 in C & v2 in C; then reconsider p = v1, q = v2 as Element of W; assume A2: not v1 in ProperPrefixes v2; A3: p,q are_c=-comparable by A1,Def3; A4: not v1 is_a_proper_prefix_of v2 by A2,TREES_1:12; v1 is_a_prefix_of v2 or v2 is_a_prefix_of v1 by A3,XBOOLE_0:def 9; hence thesis by A4,XBOOLE_0:def 8; end; theorem Th22: v1 in C & v2 in C & v is_a_prefix_of v2 implies v1 in ProperPrefixes v or v is_a_prefix_of v1 proof assume that A1: v1 in C & v2 in C and A2: v is_a_prefix_of v2; v1 in ProperPrefixes v2 or v2 is_a_prefix_of v1 by A1,Th21; then v1 is_a_proper_prefix_of v2 or v is_a_prefix_of v1 by A2,TREES_1:12,XBOOLE_1:1; then v,v1 are_c=-comparable by A2,Th2,XBOOLE_0:def 9; then v is_a_proper_prefix_of v1 or v = v1 or v1 is_a_proper_prefix_of v by XBOOLE_1:104; hence thesis by TREES_1:12,XBOOLE_0:def 8; end; registration let W; cluster finite for Chain of W; existence proof reconsider C = {} as Chain of W by Th19; take C; thus thesis; end; end; theorem Th23: for C being finite Chain of W st card C > n ex p st p in C & len p >= n proof let C be finite Chain of W; defpred X[Element of NAT] means $1 < card C implies ex p st p in C & len p >= $1; A1: X[0] proof assume A2: 0 < card C; then A3: C <> {}; set x = the Element of C; reconsider x as Element of W by A2,CARD_1:27,TARSKI:def 3; reconsider x as FinSequence of NAT; take x; thus thesis by A3; end; A4: X[k] implies X[k+1] proof assume that A5: k < card C implies ex p st p in C & len p >= k and A6: k+1 < card C; A7: k <= k+1 by NAT_1:11; then A8: k < card C by A6,XXREAL_0:2; consider p such that A9: p in C and A10: len p >= k by A5,A6,A7,XXREAL_0:2; reconsider q = p|Seg k as FinSequence by FINSEQ_1:15; A11: len q = k by A10,FINSEQ_1:17; then A12: card ProperPrefixes q = k by TREES_1:35; then card ProperPrefixes q in card C by A8,NAT_1:44; then A13: C \ ProperPrefixes q <> {} by CARD_1:68; set x = the Element of C \ ProperPrefixes q; A14: x in C by A13,XBOOLE_0:def 5; A15: not x in ProperPrefixes q by A13,XBOOLE_0:def 5; reconsider x as Element of W by A14; card (ProperPrefixes q \/ {x}) = k+1 by A12,A15,CARD_2:41; then card (ProperPrefixes q \/ {x}) in card C by A6,NAT_1:44; then A16: C \ (ProperPrefixes q \/ {x}) <> {} by CARD_1:68; set y = the Element of C \ (ProperPrefixes q \/ {x}); A17: y in C by A16,XBOOLE_0:def 5; A18: not y in ProperPrefixes q \/ {x} by A16,XBOOLE_0:def 5; reconsider y as Element of W by A17; A19: not y in ProperPrefixes q by A18,XBOOLE_0:def 3; A20: not y in {x} by A18,XBOOLE_0:def 3; A21: q is_a_prefix_of p by TREES_1:def 1; then A22: q is_a_prefix_of x by A9,A14,A15,Th22; A23: q is_a_prefix_of y by A9,A17,A19,A21,Th22; A24: x <> y by A20,TARSKI:def 1; x = q or x <> q; then q is_a_proper_prefix_of y or q is_a_proper_prefix_of x by A22,A23,A24,XBOOLE_0:def 8; then k < len x or k < len y by A11,TREES_1:6; then k+1 <= len x or k+1 <= len y by NAT_1:13; hence thesis by A14,A17; end; X[k] from NAT_1:sch 1(A1,A4); hence thesis; end; theorem Th24: for C holds { w: ex p st p in C & w is_a_prefix_of p } is Chain of W proof let C; { w: ex p st p in C & w is_a_prefix_of p } c= W proof let x; assume x in { w: ex p st p in C & w is_a_prefix_of p }; then ex w st x = w & ex p st p in C & w is_a_prefix_of p; hence thesis; end; then reconsider Z = { w: ex p st p in C & w is_a_prefix_of p } as Subset of W; Z is Chain of W proof let p,q; assume p in Z; then ex w st p = w & ex p st p in C & w is_a_prefix_of p; then consider r1 such that A1: r1 in C and A2: p is_a_prefix_of r1; assume q in Z; then ex w9 st q = w9 & ex p st p in C & w9 is_a_prefix_of p; then consider r2 such that A3: r2 in C and A4: q is_a_prefix_of r2; r1,r2 are_c=-comparable by A1,A3,Def3; then r1 is_a_prefix_of r2 or r2 is_a_prefix_of r1 by XBOOLE_0:def 9; then p is_a_prefix_of r2 or q is_a_prefix_of r1 by A2,A4,XBOOLE_1:1; hence thesis by A2,A4,Th1; end; hence thesis; end; theorem Th25: p is_a_prefix_of q & q in B implies p in B proof assume p is_a_prefix_of q; then p is_a_proper_prefix_of q or p = q by XBOOLE_0:def 8; then A1: p in ProperPrefixes q or p = q by TREES_1:def 2; assume A2: q in B; then ProperPrefixes q c= B by Def7; hence thesis by A1,A2; end; theorem Th26: {} in B proof set x = the Element of B; reconsider x as Element of W; <*> NAT is_a_prefix_of x by XBOOLE_1:2; hence thesis by Th25; end; theorem Th27: p in C & q in C & len p <= len q implies p is_a_prefix_of q proof assume p in C & q in C & len p <= len q & not p is_a_prefix_of q; then q in ProperPrefixes p & not q is_a_proper_prefix_of p by Th21,TREES_1:6; hence contradiction by TREES_1:12; end; theorem Th28: ex B st C c= B proof defpred X[set] means $1 is Chain of W & C c= $1 & for p st p in $1 holds ProperPrefixes p c= $1; consider X such that A1: Y in X iff Y in bool W & X[Y] from XBOOLE_0:sch 1; set Z = { w: ex p st p in C & w is_a_prefix_of p }; A2: Z is Chain of W by Th24; A3: C c= Z proof let x; assume A4: x in C; then reconsider w = x as Element of W; w is_a_prefix_of w; hence thesis by A4; end; now let p; assume p in Z; then A5: ex w st p = w & ex p st p in C & w is_a_prefix_of p; then consider q such that A6: q in C and A7: p is_a_prefix_of q; thus ProperPrefixes p c= Z proof let x; assume x in ProperPrefixes p; then consider r being FinSequence such that A8: x = r and A9: r is_a_proper_prefix_of p by TREES_1:def 2; r is_a_prefix_of p by A9,XBOOLE_0:def 8; then r is_a_prefix_of q & r in W by A5,A7,TREES_1:20,XBOOLE_1:1; hence thesis by A6,A8; end; end; then A10: X <> {} by A1,A2,A3; now let Z; assume that A11: Z <> {} and A12: Z c= X and A13: Z is c=-linear; union Z c= W proof let x; assume x in union Z; then consider Y such that A14: x in Y and A15: Y in Z by TARSKI:def 4; Y in bool W by A1,A12,A15; hence thesis by A14; end; then reconsider Z9 = union Z as Subset of W; A16: Z9 is Chain of W proof let p,q; assume p in Z9; then consider X1 such that A17: p in X1 and A18: X1 in Z by TARSKI:def 4; assume q in Z9; then consider X2 such that A19: q in X2 and A20: X2 in Z by TARSKI:def 4; X1,X2 are_c=-comparable by A13,A18,A20,ORDINAL1:def 8; then A21: X1 c= X2 or X2 c= X1 by XBOOLE_0:def 9; A22: X1 is Chain of W by A1,A12,A18; X2 is Chain of W by A1,A12,A20; hence thesis by A17,A19,A21,A22,Def3; end; A23: now let p; assume p in union Z; then consider X1 such that A24: p in X1 & X1 in Z by TARSKI:def 4; ProperPrefixes p c= X1 & X1 c= union Z by A1,A12,A24,ZFMISC_1:74; hence ProperPrefixes p c= union Z by XBOOLE_1:1; end; set x = the Element of Z; x in X by A11,A12,TARSKI:def 3; then A25: C c= x by A1; x c= union Z by A11,ZFMISC_1:74; then C c= union Z by A25,XBOOLE_1:1; hence union Z in X by A1,A16,A23; end; then consider Y such that A26: Y in X and A27: for Z st Z in X & Z <> Y holds not Y c= Z by A10,ORDERS_1:67; reconsider Y as Chain of W by A1,A26; now thus for p st p in Y holds ProperPrefixes p c= Y by A1,A26; given p such that A28: p in W and A29: for q st q in Y holds q is_a_proper_prefix_of p; set Z = (ProperPrefixes p) \/ {p}; ProperPrefixes p c= W & {p} c= W by A28,TREES_1:def 3,ZFMISC_1:31; then reconsider Z9 = Z as Subset of W by XBOOLE_1:8; A30: Z9 is Chain of W proof let q,r; assume that A31: q in Z9 and A32: r in Z9; A33: q in ProperPrefixes p or q in {p} by A31,XBOOLE_0:def 3; A34: r in ProperPrefixes p or r in {p} by A32,XBOOLE_0:def 3; A35: q is_a_proper_prefix_of p or q = p by A33,TARSKI:def 1,TREES_1:12; A36: r is_a_proper_prefix_of p or r = p by A34,TARSKI:def 1,TREES_1:12; A37: q is_a_prefix_of p by A35,XBOOLE_0:def 8; r is_a_prefix_of p by A36,XBOOLE_0:def 8; hence thesis by A37,Th1; end; A38: now let q; assume q in Z; then q in ProperPrefixes p or q in {p} by XBOOLE_0:def 3; then q is_a_proper_prefix_of p or q = p by TARSKI:def 1,TREES_1:12; then q is_a_prefix_of p by XBOOLE_0:def 8; then A39: ProperPrefixes q c= ProperPrefixes p by TREES_1:17; ProperPrefixes p c= Z by XBOOLE_1:7; hence ProperPrefixes q c= Z by A39,XBOOLE_1:1; end; A40: Y c= Z proof let x; assume A41: x in Y; then reconsider t = x as Element of W; t is_a_proper_prefix_of p by A29,A41; then t in ProperPrefixes p by TREES_1:12; hence thesis by XBOOLE_0:def 3; end; C c= Y by A1,A26; then C c= Z by A40,XBOOLE_1:1; then A42: Z in X by A1,A30,A38; A43: p in {p} by TARSKI:def 1; A44: not p in Y by A29; p in Z by A43,XBOOLE_0:def 3; hence contradiction by A27,A40,A42,A44; end; then reconsider Y as Branch of W by Def7; take Y; thus thesis by A1,A26; end; scheme FuncExOfMinNat { P[set,Nat], X()->set }: ex f st dom f = X() & for x st x in X() ex n st f.x = n & P[x,n] & for m st P[x,m] holds n <= m provided A1: for x st x in X() ex n st P[x,n] proof defpred Q[set,set] means ex n st $2 = n & P[$1,n] & for m st P[$1,m] holds n <= m; A2: for x st x in X() ex y st Q[x,y] proof let x; defpred X[Nat] means P[x,$1]; assume x in X(); then ex n st X[n] by A1; then A3: ex n be Nat st X[n]; consider n be Nat such that A4: X[n] & for m be Nat st X[m] holds n <= m from NAT_1:sch 5(A3); take n; n in NAT & for m st X[m] holds n <= m by A4,ORDINAL1:def 12; hence thesis by A4; end; thus ex f st dom f = X() & for x st x in X() holds Q[x,f.x] from CLASSES1:sch 1(A2); end; Lm1: X is finite implies ex n st for k st k in X holds k <= n proof assume A1: X is finite; defpred P[set,set] means ex k1,k2 being Element of NAT st $1 = k1 & $2 = k2 & k1 >= k2; now per cases; suppose A2: X /\ NAT = {}; thus thesis proof take 0; let k; assume k in X; hence thesis by A2,XBOOLE_0:def 4; end; end; suppose A3: X /\ NAT <> {}; reconsider XN = X /\ NAT as finite set by A1; A4: XN <> {} by A3; A5: for x,y holds P[x,y] & P[y,x] implies x = y by XXREAL_0:1; A6: for x,y,z st P[x,y] & P[y,z] holds P[x,z] by XXREAL_0:2; consider x such that A7: x in XN & for y st y in XN & y <> x holds not P[y,x] from CARD_2:sch 1(A4,A5,A6); reconsider n = x as Element of NAT by A7,XBOOLE_0:def 4; take n; let k; assume k in X; then k in X /\ NAT by XBOOLE_0:def 4; hence k <= n by A7; end; end; hence thesis; end; scheme InfiniteChain { X()->set, a()->set, Q[set], P[set,set] }: ex f st dom f = NAT & rng f c= X() & f.0 = a() & for k holds P[f.k,f.(k+1)] & Q[f.k] provided A1: a() in X() & Q[a()] and A2: for x st x in X() & Q[x] ex y st y in X() & P[x,y] & Q[y] proof consider Y such that A3: x in Y iff x in X() & Q[x] from XBOOLE_0:sch 1; defpred Q[set,set] means $2 in Y & P[$1,$2]; A4: for x st x in Y ex y st Q[x,y] proof let x; assume x in Y; then x in X() & Q[x] by A3; then consider y such that A5: y in X() & P[x,y] & Q[y] by A2; take y; thus thesis by A3,A5; end; consider g be Function such that A6: dom g = Y & for x st x in Y holds Q[x,g.x] from CLASSES1:sch 1(A4); deffunc U(set,set) = g.$2; consider f such that A7: dom f = NAT & f.0 = a() & for n being Nat holds f.(n+1) = U(n,f.n) from NAT_1:sch 11; take f; thus dom f = NAT by A7; defpred X[Element of NAT] means f.$1 in Y; A8: X[0] by A1,A3,A7; A9: X[k] implies X[k+1] proof assume f.k in Y; then g.(f.k) in Y by A6; hence thesis by A7; end; A10: X[k] from NAT_1:sch 1(A8,A9); thus rng f c= X() proof let x; assume x in rng f; then consider y such that A11: y in dom f and A12: x = f.y by FUNCT_1:def 3; reconsider y as Element of NAT by A7,A11; f.y in Y by A10; hence thesis by A3,A12; end; thus f.0 = a() by A7; let k; A13: f.k in Y by A10; then P[f.k,g.(f.k)] by A6; hence thesis by A3,A7,A13; end; theorem Th29: for T being Tree st (for n ex C being finite Chain of T st card C = n) & for t being Element of T holds succ t is finite ex B being Chain of T st not B is finite proof let T be Tree; assume that A1: for n ex X being finite Chain of T st card X = n and A2: for t being Element of T holds succ t is finite; defpred P[FinSequence] means for n ex B being Branch of T st $1 in B & ex p st p in B & len p >= len $1 + n; A3: for x being Element of T st P[x] ex n st x^<*n*> in T & P[x^<*n*>] proof let x be Element of T such that A4: P[x] and A5: for n st x^<*n*> in T holds not P[x^<*n*>]; A6: succ x is finite by A2; defpred X[set,Element of NAT] means for B being Branch of T,p,q st p = $1 & $1 in B & q in B holds len p + $2 > len q; A7: for y st y in succ x ex n st X[y,n] proof let y; assume y in succ x; then consider k such that A8: y = x^<*k*> and A9: x^<*k*> in T; consider n such that A10: for B being Branch of T st x^<*k*> in B for p st p in B holds len p < len (x^<*k*>) + n by A5,A9; take n; thus thesis by A8,A10; end; consider f such that A11: dom f = succ x and A12: for y st y in succ x ex n st f.y = n & X[y,n] & for m st X[y,m] holds n <= m from FuncExOfMinNat(A7); consider k such that A13: for m st m in rng f holds m <= k by A6,A11,Lm1,FINSET_1:8; consider B being Branch of T such that A14: x in B and A15: ex p st p in B & len p >= len x + (k+1) by A4; consider p such that A16: p in B and A17: len p >= len x + (k+1) by A15; reconsider r = p|Seg(len x + 1) as FinSequence of NAT by FINSEQ_1:18; len x + 1 <= len x + 1 + k by NAT_1:11; then A18: len p >= len x + 1 by A17,XXREAL_0:2; A19: r is_a_prefix_of p by TREES_1:def 1; A20: len r = len x + 1 by A18,FINSEQ_1:17; A21: r in B by A16,A19,Th25; then x is_a_prefix_of r by A14,A20,Th27,NAT_1:11; then consider j being FinSequence such that A22: r = x^j by TREES_1:1; len x + len j = len r by A22,FINSEQ_1:22; then A23: j = <*j.1*> by A20,FINSEQ_1:40; A24: dom r = Seg len r & 1 <= 1+len x by FINSEQ_1:def 3,NAT_1:11; len x+1 <= len r by A18,FINSEQ_1:17; then ( x^<*j.1*>).(len x+1) = j.1 & len x + 1 in dom r by A24,FINSEQ_1:1,42; then j.1 in rng r by A22,A23,FUNCT_1:def 3; then reconsider l = j.1 as Element of NAT; A25: x^<*l*> in succ x by A21,A22,A23; then consider n such that A26: f.(x^<*l*>) = n and A27: for B being Branch of T,p,q st p = x^<*l*> & x^<*l*> in B & q in B holds len p + n > len q and for m st for B being Branch of T,p,q st p = x^<*l*> & x^<*l*> in B & q in B holds len p + m > len q holds n <= m by A12; n in rng f by A11,A25,A26,FUNCT_1:def 3; then n <= k by A13; then len r + n <= len x + 1 + k by A20,XREAL_1:7; hence contradiction by A16,A17,A21,A22,A23,A27,XXREAL_0:2; end; reconsider e = {} as Element of T by TREES_1:22; A28: P[e] proof given n such that A29: for B being Branch of T st e in B for p st p in B holds len p < len e + n; consider C being finite Chain of T such that A30: card C = n+1 by A1; consider B being Branch of T such that A31: C c= B by Th28; n+0 < n+1 by XREAL_1:6; then A32: ex p st p in C & len p >= n by A30,Th23; e in B & len e = 0 by Th26; hence contradiction by A29,A31,A32; end; defpred QQ[set] means ex t being Element of T st t = $1 & P[t]; defpred PP[set,set] means ex p,n st $1 = p & p^<*n*> in T & $2 = p^<*n*>; A33: e in T & QQ[e] by A28; A34: for x st x in T & QQ[x] ex y st y in T & PP[x,y] & QQ[y] proof let x such that x in T; given t being Element of T such that A35: t = x and A36: P[t]; consider n such that A37: t^<*n*> in T and A38: P[t^<*n*>] by A3,A36; reconsider y = t^<*n*> as set; take y; thus y in T & PP[x,y] by A35,A37; reconsider t1 = t^<*n*> as Element of T by A37; take t1; thus thesis by A38; end; ex f st dom f = NAT & rng f c= T & f.0 = e & for k holds PP[f.k,f.(k+1)] & QQ[f.k] from InfiniteChain(A33,A34); then consider f such that A39: dom f = NAT and A40: rng f c= T and A41: f.0 = e and A42: for k holds (ex p,n st f.k = p & p^<*n*> in T & f.(k+1) = p^<*n*>) & ex t being Element of T st t = f.k & P[t]; reconsider C = rng f as Subset of T by A40; A43: now let k be Nat; defpred X[Nat] means for p,q st p = f.k & q = f.(k+$1) holds p is_a_prefix_of q; A44: X[0]; A45: for n be Nat st X[n] holds X[n+1] proof let n be Nat; assume A46: for p,q st p = f.k & q = f.(k+n) holds p is_a_prefix_of q; let p,q such that A47: p = f.k and A48: q = f.(k+(n+1)); reconsider k,n as Element of NAT by ORDINAL1:def 12; consider r,l such that A49: f.(k+n) = r and r^<*l*> in T and A50: f.((k+n)+1) = r^<*l*> by A42; A51: p is_a_prefix_of r by A46,A47,A49; r is_a_prefix_of r^<*l*> by TREES_1:1; hence thesis by A48,A50,A51,XBOOLE_1:1; end; thus for n be Nat holds X[n] from NAT_1:sch 2(A44,A45); end; A52: now let k,l; assume k <= l; then ex n be Nat st l = k+n by NAT_1:10; hence for p,q st p = f.k & q = f.l holds p is_a_prefix_of q by A43; end; C is Chain of T proof let p,q; assume that A53: p in C and A54: q in C; consider x such that A55: x in NAT and A56: p = f.x by A39,A53,FUNCT_1:def 3; consider y such that A57: y in NAT and A58: q = f.y by A39,A54,FUNCT_1:def 3; reconsider x, y as Element of NAT by A55,A57; x <= y or y <= x; hence p is_a_prefix_of q or q is_a_prefix_of p by A52,A56,A58; end; then reconsider C as Chain of T; take C; defpred X[Element of NAT] means for p st p = f.$1 holds len p = $1; A59: X[0] by A41; A60: X[k] implies X[k+1] proof assume A61: for p st p = f.k holds len p = k; let p such that A62: p = f.(k+1); consider q,n such that A63: f.k = q and q^<*n*> in T and A64: f.(k+1) = q^<*n*> by A42; thus len p = len q + len <*n*> by A62,A64,FINSEQ_1:22 .= len q + 1 by FINSEQ_1:39 .= k+1 by A61,A63; end; A65: X[k] from NAT_1:sch 1(A59,A60); f is one-to-one proof let x,y; assume x in dom f & y in dom f; then reconsider x9 = x, y9 = y as Element of NAT by A39; consider p,n such that A66: f.x9 = p and p^<*n*> in T and f.(x9+1) = p^<*n*> by A42; A67: ex q,k st f.y9 = q & q^<*k*> in T & f.(y9+1) = q^<*k*> by A42; len p = x9 by A65,A66; hence thesis by A65,A66,A67; end; then NAT,C are_equipotent by A39,WELLORD2:def 4; hence thesis by CARD_1:38; end; theorem for T being finite-order Tree st for n ex C being finite Chain of T st card C = n ex B being Chain of T st not B is finite proof let T be finite-order Tree; for t being Element of T holds succ t is finite; hence thesis by Th29; end; definition let IT be Relation; attr IT is DecoratedTree-like means :Def8: dom IT is Tree; end; registration cluster DecoratedTree-like for Function; existence proof set W = the Tree; take f = W --> 0; thus dom f is Tree by FUNCOP_1:13; end; end; definition mode DecoratedTree is DecoratedTree-like Function; end; reserve T,T1,T2 for DecoratedTree; registration let T; cluster dom T -> non empty Tree-like; coherence by Def8; end; registration let D; cluster DecoratedTree-like D-valued for Function; existence proof set W = the Tree; set d = the Element of D; set f = W --> d; dom f = W by FUNCOP_1:13; then reconsider f as DecoratedTree by Def8; f is D-valued; hence thesis; end; end; definition let D; mode DecoratedTree of D is D-valued DecoratedTree; end; definition let D be non empty set, T be DecoratedTree of D, t be Element of dom T; redefine func T.t -> Element of D; coherence proof T.t in rng T & rng T c= D by FUNCT_1:def 3; hence thesis; end; end; theorem Th31: dom T1 = dom T2 & (for p st p in dom T1 holds T1.p = T2.p) implies T1 = T2 proof assume that A1: dom T1 = dom T2 and A2: for p st p in dom T1 holds T1.p = T2.p; now let x; assume x in dom T1; then reconsider p = x as Element of dom T1; T1.p = T2.p by A2; hence T1.x = T2.x; end; hence thesis by A1,FUNCT_1:2; end; scheme DTreeEx { T() -> Tree, P[set,set] }: ex T st dom T = T() & for p st p in T() holds P[p,T.p] provided A1: for p st p in T() ex x st P[p,x] proof A2: for x st x in T() ex y st P[x,y] proof let x; assume x in T(); then reconsider p = x as Element of T(); ex y st P[p,y] by A1; hence thesis; end; consider f such that A3: dom f = T() & for x st x in T() holds P[x,f.x] from CLASSES1:sch 1(A2); reconsider T = f as DecoratedTree by A3,Def8; take T; thus thesis by A3; end; scheme DTreeLambda { T() -> Tree, f(set) -> set }: ex T st dom T = T() & for p st p in T() holds T.p = f(p) proof consider f such that A1: dom f = T() & for x st x in T() holds f.x = f(x) from FUNCT_1:sch 3; reconsider T = f as DecoratedTree by A1,Def8; take T; thus thesis by A1; end; definition let T; func Leaves T -> set equals T.:Leaves dom T; correctness; let p; func T|p -> DecoratedTree means : Def10: dom it = (dom T)|p & for q st q in (dom T)|p holds it.q = T.(p^q); existence proof deffunc U(FinSequence) = T.(p^$1); thus ex t being DecoratedTree st dom t = (dom T)|p & for q st q in (dom T)|p holds t.q = U(q) from DTreeLambda; end; uniqueness proof let T1,T2 such that A1: dom T1 = (dom T)|p and A2: for q st q in (dom T)|p holds T1.q = T.(p^q) and A3: dom T2 = (dom T)|p and A4: for q st q in (dom T)|p holds T2.q = T.(p^q); now let q; assume A5: q in (dom T)|p; then T1.q = T.(p^q) by A2; hence T1.q = T2.q by A4,A5; end; hence thesis by A1,A3,Th31; end; end; theorem Th32: p in dom T implies rng (T|p) c= rng T proof assume A1: p in dom T; let x; assume x in rng (T|p); then consider y such that A2: y in dom (T|p) and A3: x = (T|p).y by FUNCT_1:def 3; reconsider y as Element of dom (T|p) by A2; A4: dom (T|p) = (dom T)|p by Def10; then A5: p^y in dom T by A1,TREES_1:def 6; x = T.(p^y) by A3,A4,Def10; hence thesis by A5,FUNCT_1:def 3; end; definition let D; let T be DecoratedTree of D; redefine func Leaves T -> Subset of D; coherence proof T.:Leaves dom T c= rng T & rng T c= D by RELAT_1:111; hence thesis by XBOOLE_1:1; end; end; registration let D; let T be DecoratedTree of D; let p be Element of dom T; cluster T|p -> D-valued; coherence proof rng (T|p) c= rng T & rng T c= D by Th32; then rng (T|p) c= D by XBOOLE_1:1; hence thesis by RELAT_1:def 19; end; end; definition let T,p,T1; assume A1: p in dom T; func T with-replacement (p,T1) -> DecoratedTree means dom it = dom T with-replacement (p,dom T1) & for q st q in dom T with-replacement (p,dom T1) holds not p is_a_prefix_of q & it.q = T.q or ex r st r in dom T1 & q = p^r & it.q = T1.r; existence proof defpred X[FinSequence,set] means not p is_a_prefix_of $1 & $2 = T.$1 or ex r st r in dom T1 & $1 = p^r & $2 = T1.r; A2: for q st q in dom T with-replacement (p,dom T1) ex x st X[q,x] proof let q such that A3: q in dom T with-replacement (p,dom T1); now per cases by XBOOLE_0:def 8; suppose p is_a_proper_prefix_of q; then consider r such that A4: r in dom T1 & q = p^r by A1,A3,TREES_1:def 9; thus thesis proof take T1.r; thus thesis by A4; end; end; suppose A5: p = q; thus thesis proof take T1.({} NAT); {} NAT in dom T1 & q = p^(<*> NAT) by A5,FINSEQ_1:34,TREES_1:22; hence thesis; end; end; suppose not p is_a_prefix_of q; hence thesis; end; end; hence thesis; end; thus ex TT being DecoratedTree st dom TT = dom T with-replacement (p,dom T1) & for q st q in dom T with-replacement (p,dom T1) holds X[q,TT.q] from DTreeEx(A2); end; uniqueness proof let D1,D2 be DecoratedTree such that A6: dom D1 = dom T with-replacement (p,dom T1) and A7: for q st q in dom T with-replacement (p,dom T1) holds not p is_a_prefix_of q & D1.q = T.q or ex r st r in dom T1 & q = p^r & D1.q = T1.r and A8: dom D2 = dom T with-replacement (p,dom T1) and A9: for q st q in dom T with-replacement (p,dom T1) holds not p is_a_prefix_of q & D2.q = T.q or ex r st r in dom T1 & q = p^r & D2.q = T1.r; now let q; assume that A10: q in dom D1 and A11: D1.q <> D2.q; A12: not p is_a_prefix_of q & D1.q = T.q or ex r st r in dom T1 & q = p^r & D1.q = T1.r by A6,A7,A10; not p is_a_prefix_of q & D2.q = T.q or ex r st r in dom T1 & q = p^r & D2.q = T1.r by A6,A9,A10; hence contradiction by A11,A12,FINSEQ_1:33,TREES_1:1; end; hence thesis by A6,A8,Th31; end; end; registration let W,x; cluster W --> x -> DecoratedTree-like; coherence proof dom (W --> x) = W by FUNCOP_1:13; hence thesis by Def8; end; end; theorem Th33: (for x st x in D holds x is Tree) implies union D is Tree proof assume A1: for x st x in D holds x is Tree; then reconsider x = the Element of D as Tree; x c= union D by ZFMISC_1:74; then reconsider T = union D as non empty set; T is Tree-like proof for X st X in D holds X c= NAT* proof let X; assume X in D; then X is Tree by A1; hence thesis by TREES_1:def 3; end; hence T c= NAT* by ZFMISC_1:76; thus for p st p in T holds ProperPrefixes p c= T proof let p; assume p in T; then consider X such that A2: p in X and A3: X in D by TARSKI:def 4; reconsider X as Tree by A1,A3; ProperPrefixes p c= X & X c= T by A2,A3,TREES_1:def 3,ZFMISC_1:74; hence thesis by XBOOLE_1:1; end; let p,k,n; assume that A4: p^<*k*> in T and A5: n <= k; consider X such that A6: p^<*k*> in X and A7: X in D by A4,TARSKI:def 4; reconsider X as Tree by A1,A7; p^<*n*> in X by A5,A6,TREES_1:def 3; hence thesis by A7,TARSKI:def 4; end; hence thesis; end; theorem Th34: (for x st x in X holds x is Function) & X is c=-linear implies union X is Relation-like Function-like proof assume that A1: for x st x in X holds x is Function and A2: X is c=-linear; thus a in union X implies ex b,c st [b,c] = a proof assume a in union X; then consider x be set such that A3: a in x and A4: x in X by TARSKI:def 4; reconsider x as Function by A1,A4; x = x; hence thesis by A3,RELAT_1:def 1; end; let a,b,c; assume that A5: [a,b] in union X and A6: [a,c] in union X; consider x be set such that A7: [a,b] in x and A8: x in X by A5,TARSKI:def 4; consider y be set such that A9: [a,c] in y and A10: y in X by A6,TARSKI:def 4; reconsider x as Function by A1,A8; reconsider y as Function by A1,A10; x,y are_c=-comparable by A2,A8,A10,ORDINAL1:def 8; then x c= y or y c= x by XBOOLE_0:def 9; hence thesis by A7,A9,FUNCT_1:def 1; end; theorem Th35: (for x st x in D holds x is DecoratedTree) & D is c=-linear implies union D is DecoratedTree proof assume that A1: for x st x in D holds x is DecoratedTree and A2: D is c=-linear; for x holds x in D implies x is Function by A1; then reconsider T = union D as Function by A2,Th34; defpred X[set,set] means ex T1 st $1 = T1 & dom T1 = $2; A3: for x st x in D ex y st X[x,y] proof let x; assume x in D; then reconsider T1 = x as DecoratedTree by A1; dom T1 = dom T1; hence thesis; end; consider f such that A4: dom f = D & for x st x in D holds X[x,f.x] from CLASSES1:sch 1(A3); reconsider E = rng f as non empty set by A4,RELAT_1:42; now let x; assume x in E; then consider y such that A5: y in dom f & x = f.y by FUNCT_1:def 3; ex T1 st y = T1 & dom T1 = x by A4,A5; hence x is Tree; end; then A6: union E is Tree by Th33; dom T = union E proof thus dom T c= union E proof let x; assume x in dom T; then consider y such that A7: [x,y] in T by XTUPLE_0:def 12; consider X such that A8: [x,y] in X and A9: X in D by A7,TARSKI:def 4; consider T1 such that A10: X = T1 and A11: dom T1 = f.X by A4,A9; A12: dom T1 in rng f by A4,A9,A11,FUNCT_1:def 3; A13: x in dom T1 by A8,A10,XTUPLE_0:def 12; dom T1 c= union E by A12,ZFMISC_1:74; hence thesis by A13; end; let x; assume x in union E; then consider X such that A14: x in X and A15: X in E by TARSKI:def 4; consider y such that A16: y in dom f and A17: X = f.y by A15,FUNCT_1:def 3; consider T1 such that A18: y = T1 and A19: dom T1 = X by A4,A16,A17; [x,T1.x] in T1 by A14,A19,FUNCT_1:1; then [x,T1.x] in union D by A4,A16,A18,TARSKI:def 4; hence thesis by XTUPLE_0:def 12; end; hence thesis by A6,Def8; end; theorem Th36: (for x st x in D9 holds x is DecoratedTree of D) & D9 is c=-linear implies union D9 is DecoratedTree of D proof assume that A1: for x st x in D9 holds x is DecoratedTree of D and A2: D9 is c=-linear; for x st x in D9 holds x is DecoratedTree by A1; then reconsider T = union D9 as DecoratedTree by A2,Th35; rng T c= D proof let x; assume x in rng T; then consider y such that A3: y in dom T & x = T.y by FUNCT_1:def 3; [y,x] in T by A3,FUNCT_1:1; then consider X such that A4: [y,x] in X and A5: X in D9 by TARSKI:def 4; reconsider X as DecoratedTree of D by A1,A5; y in dom X & x = X.y by A4,FUNCT_1:1; then A6: x in rng X by FUNCT_1:def 3; thus thesis by A6; end; hence thesis by RELAT_1:def 19; end; scheme DTreeStructEx { D() -> non empty set, d() -> Element of D(), F(set) -> set, S() -> Function of [:D(),NAT:],D()}: ex T being DecoratedTree of D() st T.{} = d() & for t being Element of dom T holds succ t = { t^<*k*>: k in F(T.t)} & for n st n in F(T.t) holds T.(t^<*n*>) = S().(T.t,n) provided A1: for d being Element of D(), k1,k2 st k1 <= k2 & k2 in F(d) holds k1 in F(d) proof defpred P[Element of NAT] means ex T being DecoratedTree of D() st T.{} = d() & for t being Element of dom T holds len t <= $1 & (len t < $1 implies succ t = { t^<*k*>: k in F(T.t)} & for n,x st x = T.t & n in F(x) holds T.(t^<*n*>) = S().(x,n)); A2: P[0] proof reconsider W = {{}} as Tree; take T = W --> d(); {} in W by TREES_1:22; hence T.{} = d() by FUNCOP_1:7; let t be Element of dom T; dom T = W by FUNCOP_1:13; then t = {} by TARSKI:def 1; hence len t <= 0; assume len t < 0; hence thesis; end; A3: P[k] implies P[k+1] proof given T be DecoratedTree of D() such that A4: T.{} = d() & for t being Element of dom T holds len t <= k & (len t < k implies succ t = { t^<*m*>: m in F(T.t)} & for n,x st x = T.t & n in F(x) holds T.(t^<*n*>) = S().(x,n)); reconsider M = { t^<*n*> where t is Element of dom T: n in F(T.t) } \/ dom T as non empty set; M is Tree-like proof thus M c= NAT* proof let x; assume x in M; then A5: x in { t^<*n*> where t is Element of dom T: n in F(T.t) } or x in dom T & dom T c= NAT* by TREES_1:def 3,XBOOLE_0:def 3; assume A6: not x in NAT*; then ex n be Element of NAT,t being Element of dom T st x = t^<*n*> & n in F (T.t) by A5; hence thesis by A6,FINSEQ_1:def 11; end; thus for p st p in M holds ProperPrefixes p c= M proof let p; assume p in M; then A7: p in { t^<*n*> where t is Element of dom T: n in F(T.t) } or p in dom T by XBOOLE_0:def 3; now assume p in { t^<*n*> where t is Element of dom T: n in F(T.t) }; then consider n be Element of NAT, t be Element of dom T such that A8: p = t^<*n*> and n in F(T.t); A9: ProperPrefixes t c= dom T by TREES_1:def 3; A10: dom T c= M by XBOOLE_1:7; A11: t in dom T; A12: ProperPrefixes t c= M by A9,A10,XBOOLE_1:1; A13: {t} c= M by A10,A11,ZFMISC_1:31; ProperPrefixes p = ProperPrefixes t \/ {t} by A8,Th4; hence thesis by A12,A13,XBOOLE_1:8; end; then ProperPrefixes p c= M or ProperPrefixes p c= dom T & dom T c= M by A7,TREES_1:def 3,XBOOLE_1:7; hence thesis by XBOOLE_1:1; end; let p,m,n; assume p^<*m*> in M; then A14: p^<*m*> in { t^<*l*> where t is Element of dom T: l in F(T.t) } or p^<*m*> in dom T by XBOOLE_0:def 3; assume that A15: n <= m and A16: not p^<*n*> in M; not p^<*n*> in dom T by A16,XBOOLE_0:def 3; then consider l be Element of NAT, t be Element of dom T such that A17: p^<*m*> = t^<*l*> and A18: l in F(T.t) by A14,A15,TREES_1:def 3; A19: len (p^<*m*>) = len p + len <*m*> & len <*m*> = 1 by FINSEQ_1:22,40 ; A20: len (t^<*l*>) = len t + len <*l*> & len <*l*> = 1 by FINSEQ_1:22,40 ; A21: ( p^<*m*>).(len p + 1) = m & (t^<*l*>).(len t + 1) = l by FINSEQ_1:42; then A22: p = t by A17,A19,A20,FINSEQ_1:33; n in F(T.t) by A1,A15,A17,A18,A19,A20,A21; then p^<*n*> in { s^<*i*> where s is Element of dom T: i in F(T.s) } by A22; hence thesis by A16,XBOOLE_0:def 3; end; then reconsider M as Tree; defpred P[FinSequence,set] means $1 in dom T & $2 = T.$1 or not $1 in dom T & ex n,q st $1 = q^<*n*> & $2 = S().(T.q,n); A23: for p st p in M ex x st P[p,x] proof let p; assume p in M; then A24: p in { t^<*l*> where t is Element of dom T: l in F(T.t) } or p in dom T by XBOOLE_0:def 3; now assume A25: not p in dom T; then consider l be Element of NAT, t be Element of dom T such that A26: p = t^<*l*> and l in F(T.t) by A24; take x = S().(T.t,l); thus p in dom T & x = T.p or not p in dom T & ex n,q st p = q^<*n*> & x = S().(T.q,n) by A25,A26; end; hence thesis; end; consider T9 be DecoratedTree such that A27: dom T9 = M & for p st p in M holds P[p,T9.p] from DTreeEx(A23); rng T9 c= D() proof let x; assume x in rng T9; then consider y such that A28: y in dom T9 and A29: x = T9.y by FUNCT_1:def 3; reconsider y as Element of dom T9 by A28; A30: now assume y in dom T; then reconsider t = y as Element of dom T; T.t in D(); hence thesis by A27,A29; end; now assume A31: not y in dom T; then consider n,q such that A32: y = q^<*n*> and A33: T9.y = S().(T.q,n) by A27; y in { t^<*l*> where t is Element of dom T: l in F(T.t) } by A27,A31,XBOOLE_0:def 3; then consider l be Element of NAT, t be Element of dom T such that A34: y = t^<*l*> and l in F(T.t); A35: len <*n*> = 1 by FINSEQ_1:39; A36: len <*l*> = 1 by FINSEQ_1:39; A37: len (q^<*n*>) = len q + 1 by A35,FINSEQ_1:22; A38: len (t^<*l*>) = len t + 1 by A36,FINSEQ_1:22; ( q^<*n*>).(len q + 1) = n & (t^<*l*>).(len t + 1) = l by FINSEQ_1:42; then A39: q = t by A32,A34,A37,A38,FINSEQ_1:33; T.t in D(); then [T.q,n] in [:D(),NAT:] by A39,ZFMISC_1:87; hence thesis by A29,A33,FUNCT_2:5; end; hence thesis by A30; end; then reconsider T9 as DecoratedTree of D() by RELAT_1:def 19; take T9; <*> NAT in M & <*> NAT in dom T by TREES_1:22; hence T9. {} = d() by A4,A27; let t be Element of dom T9; A40: now assume t in { s^<*l*> where s is Element of dom T: l in F(T.s) }; then consider l be Element of NAT, s being Element of dom T such that A41: t = s^<*l*> and l in F(T.s); len s <= k by A4; then len <*l*> = 1 & len s + 1 <= k+1 by FINSEQ_1:39,XREAL_1:7; hence len t <= k+1 by A41,FINSEQ_1:22; end; now assume t in dom T; then reconsider s = t as Element of dom T; len s <= k & k <= k+1 by A4,NAT_1:11; hence len t <= k+1 by XXREAL_0:2; end; hence len t <= k+1 by A27,A40,XBOOLE_0:def 3; assume A42: len t < k+1; A43: now assume A44: not t in dom T; then t in { s^<*l*> where s is Element of dom T: l in F(T.s) } by A27,XBOOLE_0:def 3; then consider l be Element of NAT, s be Element of dom T such that A45: t = s^<*l*> and A46: l in F(T.s); A47: len t = len s + len <*l*> by A45,FINSEQ_1:22; len <*l*> = 1 & len t <= k by A42,FINSEQ_1:39,NAT_1:13; then len s < k by A47,NAT_1:13; then succ s = { s^<*m*>: m in F(T.s)} by A4; then t in succ s by A45,A46; hence contradiction by A44; end; then A48: T9.t = T.t by A27; reconsider t9 = t as Element of dom T by A43; thus succ t c= { t^<*i*>: i in F(T9.t)} proof let x; assume x in succ t; then consider n such that A49: x = t^<*n*> and A50: t^<*n*> in dom T9; now per cases; suppose A51: t^<*n*> in dom T; then reconsider s = t^<*n*>, t9 = t as Element of dom T by TREES_1:21; len s <= k & len s = len t + 1 by A4,FINSEQ_2:16; then len t < k by NAT_1:13; then succ t9 = { t9^<*m*>: m in F(T.t9) } by A4; hence thesis by A48,A49,A51; end; suppose not t^<*n*> in dom T; then t^<*n*> in { s^<*l*> where s is Element of dom T: l in F(T.s ) } by A27,A50,XBOOLE_0:def 3; then consider l be Element of NAT, s be Element of dom T such that A52: t^<*n*> = s^<*l*> and A53: l in F(T.s); t = s by A52,FINSEQ_2:17; hence thesis by A48,A49,A52,A53; end; end; hence thesis; end; thus A54: { t^<*i*>: i in F(T9.t)} c= succ t proof let x; assume x in { t^<*i*>: i in F(T9.t)}; then consider n such that A55: x = t^<*n*> and A56: n in F(T9.t); x = t9^<*n*> by A55; then x in { s^<*l*> where s is Element of dom T: l in F(T.s) } by A48,A56; then x in dom T9 by A27,XBOOLE_0:def 3; hence thesis by A55; end; let n,x; assume that A57: x = T9.t and A58: n in F(x); t^<*n*> in { t^<*i*>: i in F(T9.t)} by A57,A58; then A59: t^<*n*> in succ t by A54; now per cases; suppose A60: t^<*n*> in dom T; then reconsider s = t^<*n*> as Element of dom T; len s <= k & len s = len t + 1 by A4,FINSEQ_2:16; then len t9 < k by NAT_1:13; then T.(t9^<*n*>) = S().(x,n) by A4,A48,A57,A58; hence thesis by A27,A59,A60; end; suppose not t^<*n*> in dom T; then consider l,q such that A61: t^<*n*> = q^<*l*> and A62: T9.(t^<*n*>) = S().(T.q,l) by A27,A59; t = q & n = l by A61,FINSEQ_2:17; hence thesis by A27,A43,A57,A62; end; end; hence thesis; end; A63: P[k] from NAT_1:sch 1(A2,A3); defpred P[set,set] means ex T being DecoratedTree of D(), k st $1 = k & $2 = T & T.{} = d() & for t being Element of dom T holds len t <= k & (len t < k implies succ t = { t^<*i*>: i in F(T.t)} & for n,x st x = T.t & n in F(x) holds T.(t^<*n*>) = S().(x,n)); A64: for x st x in NAT ex y st P[x,y] proof let x; assume x in NAT; then reconsider n = x as Element of NAT; consider T being DecoratedTree of D() such that A65: T.{} = d() & for t being Element of dom T holds len t <= n & (len t < n implies succ t = { t^<*k*>: k in F(T.t)} & for n,x st x = T.t & n in F(x) holds T.(t^<*n*>) = S().(x,n)) by A63; reconsider y = T as set; take y,T,n; thus thesis by A65; end; consider f such that A66: dom f = NAT & for x st x in NAT holds P[x,f.x] from CLASSES1:sch 1(A64); reconsider E = rng f as non empty set by A66,RELAT_1:42; A67: for x st x in E holds x is DecoratedTree of D() proof let x; assume x in E; then consider y such that A68: y in dom f and A69: x = f.y by FUNCT_1:def 3; ex T being DecoratedTree of D(), k st y = k & f.y = T & T.{} = d() & for t being Element of dom T holds len t <= k & (len t < k implies succ t = { t^<*i*>: i in F(T.t)} & for n,x st x = T.t & n in F(x) holds T.(t^<*n*>) = S().(x,n)) by A66,A68; hence thesis by A69; end; A70: for T1,T2,k1,k2 st T1 = f.k1 & T2 = f.k2 & k1 <= k2 holds T1 c= T2 proof let T1,T2; let x,y be Element of NAT such that A71: T1 = f.x and A72: T2 = f.y and A73: x <= y; consider T19 being DecoratedTree of D(), k1 such that A74: x = k1 & f.x = T19 & T19.{} = d() & for t being Element of dom T19 holds len t <= k1 & (len t < k1 implies succ t = { t^<*i*>: i in F(T19.t)} & for n,x st x = T19.t & n in F(x) holds T19.(t^<*n*>) = S().(x,n)) by A66; consider T29 being DecoratedTree of D(), k2 such that A75: y = k2 & f.y = T29 & T29.{} = d() & for t being Element of dom T29 holds len t <= k2 & (len t < k2 implies succ t = { t^<*i*>: i in F(T29.t)} & for n,x st x = T29.t & n in F(x) holds T29.(t^<*n*>) = S().(x,n)) by A66; defpred I[Element of NAT] means for t being Element of dom T1 st len t <= $1 holds t in dom T2 & T1.t = T2.t; A76: I[0] proof let t be Element of dom T1 such that A77: len t <= 0; t = {} by A77; hence thesis by A71,A72,A74,A75,TREES_1:22; end; A78: I[k] implies I[k+1] proof assume A79: for t being Element of dom T1 st len t <= k holds t in dom T2 & T1.t = T2.t; let t be Element of dom T1; assume len t <= k+1; then A80: len t <= k or len t = k+1 by NAT_1:8; now assume A81: len t = k+1; reconsider p = t|Seg k as FinSequence of NAT by FINSEQ_1:18; p is_a_prefix_of t by TREES_1:def 1; then reconsider p as Element of dom T1 by TREES_1:20; A82: k <= k+1 by NAT_1:11; A83: k+1 <= k1 by A71,A74,A81; A84: len p = k by A81,A82,FINSEQ_1:17; A85: k < k1 by A83,NAT_1:13; A86: T1.p = T2.p by A79,A84; reconsider p9 = p as Element of dom T2 by A79,A84; t <> {} by A81; then consider q being FinSequence, x being set such that A87: t = q^<*x*> by FINSEQ_1:46; A88: p is_a_prefix_of t & q is_a_prefix_of t by A87,TREES_1:1,def 1; k+1 = len q + 1 by A81,A87,FINSEQ_2:16; then A89: p = q by A84,A88,Th1,TREES_1:4; <*x*> is FinSequence of NAT by A87,FINSEQ_1:36; then A90: rng <*x*> c= NAT by FINSEQ_1:def 4; rng <*x*> = {x} & x in {x} by FINSEQ_1:38,TARSKI:def 1; then reconsider x as Element of NAT by A90; A91: p^<*x*> in succ p by A87,A89; succ p = { p^<*i*>: i in F(T1.p)} by A71,A74,A84,A85; then consider i such that A92: p^<*x*> = p^<*i*> and A93: i in F(T1.p) by A91; A94: k < k2 by A73,A74,A75,A85,XXREAL_0:2; then A95: succ p9 = { p9^<*l*>: l in F(T2.p9) } by A72,A75,A84; A96: x = i by A92,FINSEQ_2:17; A97: t in succ p9 by A86,A87,A89,A92,A93,A95; T19.t = S().(T19.p,x) by A71,A74,A84,A85,A87,A89,A93,A96; hence thesis by A71,A72,A74,A75,A84,A86,A87,A89,A93,A94,A96,A97; end; hence thesis by A79,A80; end; A98: I[k] from NAT_1:sch 1(A76,A78); let x; assume A99: x in T1; then consider y,z such that A100: [y,z] = x by RELAT_1:def 1; A101: T1.y = z by A99,A100,FUNCT_1:1; reconsider y as Element of dom T1 by A99,A100,FUNCT_1:1; len y <= len y; then y in dom T2 & T1.y = T2.y by A98; hence thesis by A100,A101,FUNCT_1:1; end; E is c=-linear proof let T1,T2 be set; assume A102: T1 in E; then consider x such that A103: x in dom f and A104: T1 = f.x by FUNCT_1:def 3; assume A105: T2 in E; then consider y such that A106: y in dom f and A107: T2 = f.y by FUNCT_1:def 3; A108: T1 is DecoratedTree by A67,A102; A109: T2 is DecoratedTree by A67,A105; reconsider x,y as Element of NAT by A66,A103,A106; x <= y or y <= x; hence T1 c= T2 or T2 c= T1 by A70,A104,A107,A108,A109; end; then reconsider T = union rng f as DecoratedTree of D() by A67,Th36; take T; consider T9 being DecoratedTree of D(), k such that A110: 0 = k & f.0 = T9 & T9.{} = d() & for t being Element of dom T9 holds len t <= k & (len t < k implies succ t = { t^<*i*>: i in F(T9.t)} & for n,x st x = T9.t & n in F(x) holds T9.(t^<*n*>) = S().(x,n)) by A66; {} in dom T9 by TREES_1:22; then A111: [{},d()] in T9 by A110,FUNCT_1:1; T9 in rng f by A66,A110,FUNCT_1:def 3; then [{},d()] in T by A111,TARSKI:def 4; hence T.{} = d() by FUNCT_1:1; A112: for T1,x st T1 in E & x in dom T1 holds x in dom T & T1.x = T.x proof let T1,x; assume that A113: T1 in E and A114: x in dom T1; [x,T1.x] in T1 by A114,FUNCT_1:1; then [x,T1.x] in T by A113,TARSKI:def 4; hence thesis by FUNCT_1:1; end; let t be Element of dom T; thus succ t c= { t^<*i*>: i in F(T.t)} proof let x; assume x in succ t; then consider l such that A115: x = t^<*l*> and A116: t^<*l*> in dom T; [x,T.x] in T by A115,A116,FUNCT_1:1; then consider X such that A117: [x,T.x] in X and A118: X in rng f by TARSKI:def 4; consider y such that A119: y in NAT and A120: X = f.y by A66,A118,FUNCT_1:def 3; consider T1 being DecoratedTree of D(), k1 such that A121: y = k1 & f.y = T1 & T1.{} = d() & for t being Element of dom T1 holds len t <= k1 & (len t < k1 implies succ t = { t^<*i*>: i in F(T1.t)} & for n,x st x = T1.t & n in F(x) holds T1.(t^<*n*>) = S().(x,n)) by A66,A119; A122: t^<*l*> in dom T1 by A115,A117,A120,A121,FUNCT_1:1; then reconsider t9 = t, p = t^<*l*> as Element of dom T1 by TREES_1:21; len p <= k1 by A121; then len t + 1 <= k1 by FINSEQ_2:16; then A123: len t9 < k1 by NAT_1:13; then A124: succ t9 = { t9^<*i*>: i in F(T1.t9)} by A121; T1.t = T.t by A112,A118,A120,A121,A123; hence thesis by A115,A122,A124; end; [t,T.t] in T by FUNCT_1:1; then consider X such that A125: [t,T.t] in X and A126: X in E by TARSKI:def 4; consider y such that A127: y in NAT and A128: X = f.y by A66,A126,FUNCT_1:def 3; reconsider y as Element of NAT by A127; consider T1 being DecoratedTree of D(), k1 such that A129: y = k1 & f.y = T1 & T1.{} = d() & for t being Element of dom T1 holds len t <= k1 & (len t < k1 implies succ t = { t^<*i*>: i in F(T1.t)} & for n,x st x = T1.t & n in F(x) holds T1.(t^<*n*>) = S().(x,n)) by A66; consider T2 being DecoratedTree of D(), k2 such that A130: y+1 = k2 & f.(y+1) = T2 & T2.{} = d() & for t being Element of dom T2 holds len t <= k2 & (len t < k2 implies succ t = { t^<*i*>: i in F(T2.t)} & for n,x st x = T2.t & n in F(x) holds T2.(t^<*n*>) = S().(x,n)) by A66; y <= y+1 by NAT_1:11; then A131: T1 c= T2 by A70,A129,A130; reconsider t1 = t as Element of dom T1 by A125,A128,A129,FUNCT_1:1; A132: len t1 <= y by A129; A133: T2.t = T.t by A125,A128,A129,A131,FUNCT_1:1; reconsider t2 = t as Element of dom T2 by A125,A128,A129,A131,FUNCT_1:1; A134: len t2 < y+1 by A132,NAT_1:13; then A135: succ t2 = { t2^<*i*>: i in F(T2.t2)} by A130; thus { t^<*i*>: i in F(T.t)} c= succ t proof let x; assume A136: x in { t^<*i*>: i in F(T.t)}; then A137: ex l st x = t^<*l*> & l in F(T.t); A138: x in succ t2 by A130,A133,A134,A136; T2 in E by A66,A130,FUNCT_1:def 3; then x in dom T by A112,A138; hence thesis by A137; end; let n; assume A139: n in F(T.t); then A140: t^<*n*> in succ t2 by A133,A135; T2 in E by A66,A130,FUNCT_1:def 3; then T2.(t^<*n*>) = T.(t^<*n*>) by A112,A140; hence thesis by A130,A133,A134,A139; end; scheme DTreeStructFinEx { D() -> non empty set, d() -> Element of D(), F(set) -> Element of NAT, S() -> Function of [:D(),NAT:],D()}: ex T being DecoratedTree of D() st T.{} = d() & for t being Element of dom T holds succ t = { t^<*k*>: k < F(T.t)} & for n st n < F(T.t) holds T.(t^<*n*>) = S().(T.t,n) proof deffunc FF(Element of NAT) = { i: i < $1}; deffunc U(set) = FF(F($1)); A1: for d being Element of D(), k1,k2 st k1 <= k2 & k2 in U(d) holds k1 in U(d) proof let d be Element of D(), k1,k2; assume A2: k1 <= k2 & k2 in { i: i < F(d)}; then ex i st k2 = i & i < F(d); then k1 < F(d) by A2,XXREAL_0:2; hence thesis; end; consider T being DecoratedTree of D() such that A3: T.{} = d() & for t being Element of dom T holds succ t = { t^<*k*>: k in U(T.t)} & for n st n in U(T.t) holds T.(t^<*n*>) = S().(T.t,n) from DTreeStructEx(A1 ); take T; thus T.{} = d() by A3; let t be Element of dom T; A4: succ t = { t^<*k*>: k in FF(F(T.t))} by A3; thus succ t c= { t^<*i*>: i < F(T.t)} proof let x; assume x in succ t; then consider l such that A5: x = t^<*l*> and A6: l in FF(F(T.t)) by A4; ex i st l = i & i < F(T.t) by A6; hence thesis by A5; end; thus { t^<*i*>: i < F(T.t)} c= succ t proof let x; assume x in { t^<*i*>: i < F(T.t)}; then consider l such that A7: x = t^<*l*> and A8: l < F(T.t); l in FF(F(T.t)) by A8; hence thesis by A4,A7; end; let n; assume n < F(T.t); then n in FF(F(T.t)); hence thesis by A3; end; begin registration let Tr be finite Tree, v be Element of Tr; cluster succ v -> finite; coherence; end; definition let Tr be finite Tree, v be Element of Tr; func branchdeg v equals card succ v; correctness; end; registration cluster finite for DecoratedTree; existence proof reconsider T = { {} } as Tree; take T --> {}; thus thesis; end; end; registration let D be non empty set; cluster finite for DecoratedTree of D; existence proof set d = the Element of D; reconsider T = { {} } as Tree; take T --> d; thus thesis; end; end; registration let a,b be non empty set; cluster non empty for Relation of a,b; existence proof [:a,b:] c= [:a,b:]; hence thesis; end; end; reserve x1,x2 for set, w for FinSequence of NAT; theorem for Z1,Z2 being Tree,p being FinSequence of NAT st p in Z1 holds for v being Element of Z1 with-replacement (p,Z2),w being Element of Z2 st v = p^w holds succ v,succ w are_equipotent proof let Z1,Z2 be Tree,p be FinSequence of NAT such that A1: p in Z1; set T = Z1 with-replacement (p,Z2); let t be Element of Z1 with-replacement (p,Z2), t2 be Element of Z2; assume A2: t = p^t2; then A3: p is_a_prefix_of t by TREES_1:1; A4: for n holds t^<*n*> in T iff t2^<*n*> in Z2 proof let n; A5: p is_a_proper_prefix_of t^<*n*> by A3,TREES_1:8; A6: t^<*n*> = p^(t2^<*n*>) by A2,FINSEQ_1:32; thus t^<*n*> in T implies t2^<*n*> in Z2 proof assume t^<*n*> in T; then ex w st w in Z2 & t^<*n*> = p^w by A1,A5,TREES_1:def 9; hence thesis by A6,FINSEQ_1:33; end; assume t2^<*n*> in Z2; hence thesis by A1,A6,TREES_1:def 9; end; defpred P[set,set] means for n st $1 = t^<*n*> holds $2 = t2^<*n*>; A7: for x st x in succ t ex y st P[x,y] proof let x; assume x in succ t; then consider n such that A8: x = t^<*n*> and t^<*n*> in T; take t2^<*n*>; let m; assume x = t^<*m*>; hence thesis by A8,FINSEQ_1:33; end; consider f being Function such that A9: dom f = succ t & for x st x in succ t holds P[x,f.x] from CLASSES1:sch 1(A7); now let x; thus x in rng f implies x in succ t2 proof assume x in rng f; then consider y such that A10: y in dom f and A11: x = f.y by FUNCT_1:def 3; consider n such that A12: y = t^<*n*> and A13: t^<*n*> in T by A9,A10; A14: x = t2^<*n*> by A9,A10,A11,A12; t2^<*n*> in Z2 by A4,A13; hence thesis by A14; end; assume x in succ t2; then consider n such that A15: x = t2^<*n*> and A16: t2^<*n*> in Z2; t^<*n*> in T by A4,A16; then A17: t^<*n*> in dom f by A9; then f.(t^<*n*>) = x by A9,A15; hence x in rng f by A17,FUNCT_1:def 3; end; then A18: rng f = succ t2 by TARSKI:1; f is one-to-one proof let x1,x2; assume that A19: x1 in dom f and A20: x2 in dom f and A21: f.x1 = f.x2; consider m such that A22: x1 = t^<*m*> and t^<*m*> in T by A9,A19; consider k such that A23: x2 = t^<*k*> and t^<*k*> in T by A9,A20; t2^<*m*> = f.x1 by A9,A19,A22 .= t2^<*k*> by A9,A20,A21,A23; hence thesis by A22,A23,FINSEQ_1:33; end; hence thesis by A9,A18,WELLORD2:def 4; end; scheme DTreeStructEx { D() -> non empty set, d() -> Element of D(), Q[set,set], S() -> Function of [:D(),NAT:],D()}: ex T being DecoratedTree of D() st T.{} = d() & for t being Element of dom T holds succ t = { t^<*k*>: Q[k,T.t]} & for n st Q[n,T.t] holds T.(t^<*n*>) = S().(T.t,n) provided A1: for d being Element of D(), k1,k2 st k1 <= k2 & Q[k2,d] holds Q[k1,d] proof defpred P[Element of NAT] means ex T being DecoratedTree of D() st T.{} = d() & for t being Element of dom T holds len t <= $1 & (len t < $1 implies succ t = { t^<*k*>: Q[k,T.t]} & for n,x st x = T.t & Q[n,x] holds T.(t^<*n*>) = S().(x,n)); A2: P[0] proof reconsider W = {{}} as Tree; take T = W --> d(); {} in W by TREES_1:22; hence T.{} = d() by FUNCOP_1:7; let t be Element of dom T; dom T = W by FUNCOP_1:13; then t = {} by TARSKI:def 1; hence len t <= 0; assume len t < 0; hence thesis; end; A3: P[k] implies P[k+1] proof given T be DecoratedTree of D() such that A4: T.{} = d() & for t being Element of dom T holds len t <= k & (len t < k implies succ t = { t^<*m*>: Q[m,T.t]} & for n,x st x = T.t & Q[n,x] holds T.(t^<*n*>) = S().(x,n)); reconsider M = { t^<*n*> where t is Element of dom T: Q[n,T.t] } \/ dom T as non empty set; M is Tree-like proof thus M c= NAT* proof let x; assume x in M; then A5: x in { t^<*n*> where t is Element of dom T: Q[n,T.t] } or x in dom T & dom T c= NAT* by TREES_1:def 3,XBOOLE_0:def 3; assume A6: not x in NAT*; then ex n be Element of NAT,t being Element of dom T st x = t^<*n*> & Q[n,T.t] by A5; hence thesis by A6,FINSEQ_1:def 11; end; thus for p st p in M holds ProperPrefixes p c= M proof let p; assume p in M; then A7: p in { t^<*n*> where t is Element of dom T: Q[n,T.t] } or p in dom T by XBOOLE_0:def 3; now assume p in { t^<*n*> where t is Element of dom T: Q[n,T.t] }; then consider n be Element of NAT, t be Element of dom T such that A8: p = t^<*n*> and Q[n,T.t]; A9: ProperPrefixes t c= dom T by TREES_1:def 3; A10: dom T c= M by XBOOLE_1:7; A11: t in dom T; A12: ProperPrefixes t c= M by A9,A10,XBOOLE_1:1; A13: {t} c= M by A10,A11,ZFMISC_1:31; ProperPrefixes p = ProperPrefixes t \/ {t} by A8,Th4; hence thesis by A12,A13,XBOOLE_1:8; end; then ProperPrefixes p c= M or ProperPrefixes p c= dom T & dom T c= M by A7,TREES_1:def 3,XBOOLE_1:7; hence thesis by XBOOLE_1:1; end; let p,m,n; assume p^<*m*> in M; then A14: p^<*m*> in { t^<*l*> where t is Element of dom T: Q[l,T.t] } or p^<*m*> in dom T by XBOOLE_0:def 3; assume that A15: n <= m and A16: not p^<*n*> in M; not p^<*n*> in dom T by A16,XBOOLE_0:def 3; then consider l be Element of NAT, t be Element of dom T such that A17: p^<*m*> = t^<*l*> and A18: Q[l,T.t] by A14,A15,TREES_1:def 3; A19: len (p^<*m*>) = len p + len <*m*> & len <*m*> = 1 by FINSEQ_1:22,40 ; A20: len (t^<*l*>) = len t + len <*l*> & len <*l*> = 1 by FINSEQ_1:22,40 ; A21: ( p^<*m*>).(len p + 1) = m & (t^<*l*>).(len t + 1) = l by FINSEQ_1:42; then A22: p = t by A17,A19,A20,FINSEQ_1:33; Q[n,T.t] by A1,A15,A17,A18,A19,A20,A21; then p^<*n*> in { s^<*i*> where s is Element of dom T: Q[i,T.s] } by A22; hence thesis by A16,XBOOLE_0:def 3; end; then reconsider M as Tree; defpred P[FinSequence,set] means $1 in dom T & $2 = T.$1 or not $1 in dom T & ex n,q st $1 = q^<*n*> & $2 = S().(T.q,n); A23: for p st p in M ex x st P[p,x] proof let p; assume p in M; then A24: p in { t^<*l*> where t is Element of dom T: Q[l,T.t] } or p in dom T by XBOOLE_0:def 3; now assume A25: not p in dom T; then consider l be Element of NAT, t be Element of dom T such that A26: p = t^<*l*> and Q[l,T.t] by A24; take x = S().(T.t,l); thus p in dom T & x = T.p or not p in dom T & ex n,q st p = q^<*n*> & x = S().(T.q,n) by A25,A26; end; hence thesis; end; consider T9 be DecoratedTree such that A27: dom T9 = M & for p st p in M holds P[p,T9.p] from DTreeEx(A23); rng T9 c= D() proof let x; assume x in rng T9; then consider y such that A28: y in dom T9 and A29: x = T9.y by FUNCT_1:def 3; reconsider y as Element of dom T9 by A28; A30: now assume y in dom T; then reconsider t = y as Element of dom T; T.t in D(); hence thesis by A27,A29; end; now assume A31: not y in dom T; then consider n,q such that A32: y = q^<*n*> and A33: T9.y = S().(T.q,n) by A27; y in { t^<*l*> where t is Element of dom T: Q[l,T.t] } by A27,A31,XBOOLE_0:def 3; then consider l be Element of NAT, t be Element of dom T such that A34: y = t^<*l*> and Q[l,T.t]; A35: len <*n*> = 1 by FINSEQ_1:39; A36: len <*l*> = 1 by FINSEQ_1:39; A37: len (q^<*n*>) = len q + 1 by A35,FINSEQ_1:22; A38: len (t^<*l*>) = len t + 1 by A36,FINSEQ_1:22; ( q^<*n*>).(len q + 1) = n & (t^<*l*>).(len t + 1) = l by FINSEQ_1:42; then A39: q = t by A32,A34,A37,A38,FINSEQ_1:33; T.t in D(); then [T.q,n] in [:D(),NAT:] by A39,ZFMISC_1:87; hence thesis by A29,A33,FUNCT_2:5; end; hence thesis by A30; end; then reconsider T9 as DecoratedTree of D() by RELAT_1:def 19; take T9; <*> NAT in M & <*> NAT in dom T by TREES_1:22; hence T9. {} = d() by A4,A27; let t be Element of dom T9; A40: now assume t in { s^<*l*> where s is Element of dom T: Q[l,T.s] }; then consider l be Element of NAT, s being Element of dom T such that A41: t = s^<*l*> and Q[l,T.s]; len s <= k by A4; then len <*l*> = 1 & len s + 1 <= k+1 by FINSEQ_1:39,XREAL_1:7; hence len t <= k+1 by A41,FINSEQ_1:22; end; now assume t in dom T; then reconsider s = t as Element of dom T; len s <= k & k <= k+1 by A4,NAT_1:11; hence len t <= k+1 by XXREAL_0:2; end; hence len t <= k+1 by A27,A40,XBOOLE_0:def 3; assume A42: len t < k+1; A43: now assume A44: not t in dom T; then t in { s^<*l*> where s is Element of dom T: Q[l,T.s] } by A27,XBOOLE_0:def 3; then consider l be Element of NAT, s be Element of dom T such that A45: t = s^<*l*> and A46: Q[l,T.s]; A47: len t = len s + len <*l*> by A45,FINSEQ_1:22; len <*l*> = 1 & len t <= k by A42,FINSEQ_1:39,NAT_1:13; then len s < k by A47,NAT_1:13; then succ s = { s^<*m*>: Q[m,T.s]} by A4; then t in succ s by A45,A46; hence contradiction by A44; end; then A48: T9.t = T.t by A27; reconsider t9 = t as Element of dom T by A43; thus succ t c= { t^<*i*>: Q[i,T9.t]} proof let x; assume x in succ t; then consider n such that A49: x = t^<*n*> and A50: t^<*n*> in dom T9; now per cases; suppose A51: t^<*n*> in dom T; then reconsider s = t^<*n*>, t9 = t as Element of dom T by TREES_1:21; len s <= k & len s = len t + 1 by A4,FINSEQ_2:16; then len t < k by NAT_1:13; then succ t9 = { t9^<*m*>: Q[m,T.t9] } by A4; hence thesis by A48,A49,A51; end; suppose not t^<*n*> in dom T; then t^<*n*> in { s^<*l*> where s is Element of dom T: Q[l,T.s] } by A27,A50,XBOOLE_0:def 3; then consider l be Element of NAT, s be Element of dom T such that A52: t^<*n*> = s^<*l*> and A53: Q[l,T.s]; t = s by A52,FINSEQ_2:17; hence thesis by A48,A49,A52,A53; end; end; hence thesis; end; thus A54: { t^<*i*>: Q[i,T9.t]} c= succ t proof let x; assume x in { t^<*i*>: Q[i,T9.t]}; then consider n such that A55: x = t^<*n*> and A56: Q[n,T9.t]; x = t9^<*n*> by A55; then x in { s^<*l*> where s is Element of dom T: Q[l,T.s] } by A48,A56 ; then x in dom T9 by A27,XBOOLE_0:def 3; hence thesis by A55; end; let n,x; assume that A57: x = T9.t and A58: Q[n,x]; t^<*n*> in { t^<*i*>: Q[i,T9.t]} by A57,A58; then A59: t^<*n*> in succ t by A54; now per cases; suppose A60: t^<*n*> in dom T; then reconsider s = t^<*n*> as Element of dom T; len s <= k & len s = len t + 1 by A4,FINSEQ_2:16; then len t9 < k by NAT_1:13; then T.(t9^<*n*>) = S().(x,n) by A4,A48,A57,A58; hence thesis by A27,A59,A60; end; suppose not t^<*n*> in dom T; then consider l,q such that A61: t^<*n*> = q^<*l*> and A62: T9.(t^<*n*>) = S().(T.q,l) by A27,A59; t = q & n = l by A61,FINSEQ_2:17; hence thesis by A27,A43,A57,A62; end; end; hence thesis; end; A63: P[k] from NAT_1:sch 1(A2,A3); defpred P[set,set] means ex T being DecoratedTree of D(), k st $1 = k & $2 = T & T.{} = d() & for t being Element of dom T holds len t <= k & (len t < k implies succ t = { t^<*i*>: Q[i,T.t]} & for n,x st x = T.t & Q[n,x] holds T.(t^<*n*>) = S().(x,n)); A64: for x st x in NAT ex y st P[x,y] proof let x; assume x in NAT; then reconsider n = x as Element of NAT; consider T being DecoratedTree of D() such that A65: T.{} = d() & for t being Element of dom T holds len t <= n & (len t < n implies succ t = { t^<*k*>: Q[k,T.t]} & for n,x st x = T.t & Q[n,x] holds T.(t^<*n*>) = S().(x,n)) by A63; reconsider y = T as set; take y,T,n; thus thesis by A65; end; consider f such that A66: dom f = NAT & for x st x in NAT holds P[x,f.x] from CLASSES1:sch 1(A64 ); reconsider E = rng f as non empty set by A66,RELAT_1:42; A67: for x st x in E holds x is DecoratedTree of D() proof let x; assume x in E; then consider y such that A68: y in dom f and A69: x = f.y by FUNCT_1:def 3; ex T being DecoratedTree of D(), k st y = k & f.y = T & T.{} = d() & for t being Element of dom T holds len t <= k & (len t < k implies succ t = { t^<*i*>: Q[i,T.t]} & for n,x st x = T.t & Q[n,x] holds T.(t^<*n*>) = S().(x,n)) by A66,A68; hence thesis by A69; end; A70: for T1,T2,k1,k2 st T1 = f.k1 & T2 = f.k2 & k1 <= k2 holds T1 c= T2 proof let T1,T2; let x,y be Element of NAT such that A71: T1 = f.x and A72: T2 = f.y and A73: x <= y; consider T19 being DecoratedTree of D(), k1 such that A74: x = k1 & f.x = T19 & T19.{} = d() & for t being Element of dom T19 holds len t <= k1 & (len t < k1 implies succ t = { t^<*i*>: Q[i,T19.t]} & for n,x st x = T19.t & Q[n,x] holds T19.(t^<*n*>) = S().(x,n)) by A66; consider T29 being DecoratedTree of D(), k2 such that A75: y = k2 & f.y = T29 & T29.{} = d() & for t being Element of dom T29 holds len t <= k2 & (len t < k2 implies succ t = { t^<*i*>: Q[i,T29.t]} & for n,x st x = T29.t & Q[n,x] holds T29.(t^<*n*>) = S().(x,n)) by A66; defpred I[Element of NAT] means for t being Element of dom T1 st len t <= $1 holds t in dom T2 & T1.t = T2.t; A76: I[0] proof let t be Element of dom T1 such that A77: len t <= 0; t = {} by A77; hence thesis by A71,A72,A74,A75,TREES_1:22; end; A78: I[k] implies I[k+1] proof assume A79: for t being Element of dom T1 st len t <= k holds t in dom T2 & T1.t = T2.t; let t be Element of dom T1; assume len t <= k+1; then A80: len t <= k or len t = k+1 by NAT_1:8; now assume A81: len t = k+1; reconsider p = t|Seg k as FinSequence of NAT by FINSEQ_1:18; p is_a_prefix_of t by TREES_1:def 1; then reconsider p as Element of dom T1 by TREES_1:20; A82: k <= k+1 by NAT_1:11; A83: k+1 <= k1 by A71,A74,A81; A84: len p = k by A81,A82,FINSEQ_1:17; A85: k < k1 by A83,NAT_1:13; A86: T1.p = T2.p by A79,A84; reconsider p9 = p as Element of dom T2 by A79,A84; t <> {} by A81; then consider q being FinSequence, x being set such that A87: t = q^<*x*> by FINSEQ_1:46; A88: p is_a_prefix_of t & q is_a_prefix_of t by A87,TREES_1:1,def 1; k+1 = len q + 1 by A81,A87,FINSEQ_2:16; then A89: p = q by A84,A88,Th1,TREES_1:4; <*x*> is FinSequence of NAT by A87,FINSEQ_1:36; then A90: rng <*x*> c= NAT by FINSEQ_1:def 4; rng <*x*> = {x} & x in {x} by FINSEQ_1:38,TARSKI:def 1; then reconsider x as Element of NAT by A90; A91: p^<*x*> in succ p by A87,A89; succ p = { p^<*i*>: Q[i,T1.p]} by A71,A74,A84,A85; then consider i such that A92: p^<*x*> = p^<*i*> and A93: Q[i,T1.p] by A91; A94: k < k2 by A73,A74,A75,A85,XXREAL_0:2; then A95: succ p9 = { p9^<*l*>: Q[l,T2.p9] } by A72,A75,A84; A96: x = i by A92,FINSEQ_2:17; A97: t in succ p9 by A86,A87,A89,A92,A93,A95; T19.t = S().(T19.p,x) by A71,A74,A84,A85,A87,A89,A93,A96; hence thesis by A71,A72,A74,A75,A84,A86,A87,A89,A93,A94,A96,A97; end; hence thesis by A79,A80; end; A98: I[k] from NAT_1:sch 1(A76,A78); let x; assume A99: x in T1; then consider y,z such that A100: [y,z] = x by RELAT_1:def 1; A101: T1.y = z by A99,A100,FUNCT_1:1; reconsider y as Element of dom T1 by A99,A100,FUNCT_1:1; len y <= len y; then y in dom T2 & T1.y = T2.y by A98; hence thesis by A100,A101,FUNCT_1:1; end; E is c=-linear proof let T1,T2 be set; assume A102: T1 in E; then consider x such that A103: x in dom f and A104: T1 = f.x by FUNCT_1:def 3; assume A105: T2 in E; then consider y such that A106: y in dom f and A107: T2 = f.y by FUNCT_1:def 3; A108: T1 is DecoratedTree by A67,A102; A109: T2 is DecoratedTree by A67,A105; reconsider x,y as Element of NAT by A66,A103,A106; x <= y or y <= x; hence T1 c= T2 or T2 c= T1 by A70,A104,A107,A108,A109; end; then reconsider T = union rng f as DecoratedTree of D() by A67,Th36; take T; consider T9 being DecoratedTree of D(), k such that A110: 0 = k & f.0 = T9 & T9.{} = d() & for t being Element of dom T9 holds len t <= k & (len t < k implies succ t = { t^<*i*>: Q[i,T9.t]} & for n,x st x = T9.t & Q[n,x] holds T9.(t^<*n*>) = S().(x,n)) by A66; {} in dom T9 by TREES_1:22; then A111: [{},d()] in T9 by A110,FUNCT_1:1; T9 in rng f by A66,A110,FUNCT_1:def 3; then [{},d()] in T by A111,TARSKI:def 4; hence T.{} = d() by FUNCT_1:1; A112: for T1,x st T1 in E & x in dom T1 holds x in dom T & T1.x = T.x proof let T1,x; assume that A113: T1 in E and A114: x in dom T1; [x,T1.x] in T1 by A114,FUNCT_1:1; then [x,T1.x] in T by A113,TARSKI:def 4; hence thesis by FUNCT_1:1; end; let t be Element of dom T; thus succ t c= { t^<*i*>: Q[i,T.t]} proof let x; assume x in succ t; then consider l such that A115: x = t^<*l*> and A116: t^<*l*> in dom T; [x,T.x] in T by A115,A116,FUNCT_1:1; then consider X such that A117: [x,T.x] in X and A118: X in rng f by TARSKI:def 4; consider y such that A119: y in NAT and A120: X = f.y by A66,A118,FUNCT_1:def 3; consider T1 being DecoratedTree of D(), k1 such that A121: y = k1 & f.y = T1 & T1.{} = d() & for t being Element of dom T1 holds len t <= k1 & (len t < k1 implies succ t = { t^<*i*>: Q[i,T1.t]} & for n,x st x = T1.t & Q[n,x] holds T1.(t^<*n*>) = S().(x,n)) by A66,A119; A122: t^<*l*> in dom T1 by A115,A117,A120,A121,FUNCT_1:1; then reconsider t9 = t, p = t^<*l*> as Element of dom T1 by TREES_1:21; len p <= k1 by A121; then len t + 1 <= k1 by FINSEQ_2:16; then A123: len t9 < k1 by NAT_1:13; then A124: succ t9 = { t9^<*i*>: Q[i,T1.t9]} by A121; T1.t = T.t by A112,A118,A120,A121,A123; hence thesis by A115,A122,A124; end; [t,T.t] in T by FUNCT_1:1; then consider X such that A125: [t,T.t] in X and A126: X in E by TARSKI:def 4; consider y such that A127: y in NAT and A128: X = f.y by A66,A126,FUNCT_1:def 3; reconsider y as Element of NAT by A127; consider T1 being DecoratedTree of D(), k1 such that A129: y = k1 & f.y = T1 & T1.{} = d() & for t being Element of dom T1 holds len t <= k1 & (len t < k1 implies succ t = { t^<*i*>: Q[i,T1.t]} & for n,x st x = T1.t & Q[n,x] holds T1.(t^<*n*>) = S().(x,n)) by A66; consider T2 being DecoratedTree of D(), k2 such that A130: y+1 = k2 & f.(y+1) = T2 & T2.{} = d() & for t being Element of dom T2 holds len t <= k2 & (len t < k2 implies succ t = { t^<*i*>: Q[i,T2.t]} & for n,x st x = T2.t & Q[n,x] holds T2.(t^<*n*>) = S().(x,n)) by A66; y <= y+1 by NAT_1:11; then A131: T1 c= T2 by A70,A129,A130; reconsider t1 = t as Element of dom T1 by A125,A128,A129,FUNCT_1:1; A132: len t1 <= y by A129; A133: T2.t = T.t by A125,A128,A129,A131,FUNCT_1:1; reconsider t2 = t as Element of dom T2 by A125,A128,A129,A131,FUNCT_1:1; A134: len t2 < y+1 by A132,NAT_1:13; then A135: succ t2 = { t2^<*i*>: Q[i,T2.t2]} by A130; thus { t^<*i*>: Q[i,T.t]} c= succ t proof let x; assume A136: x in { t^<*i*>: Q[i,T.t]}; then A137: ex l st x = t^<*l*> & Q[l,T.t]; A138: x in succ t2 by A130,A133,A134,A136; T2 in E by A66,A130,FUNCT_1:def 3; then x in dom T by A112,A138; hence thesis by A137; end; let n; assume A139: Q[n,T.t]; then A140: t^<*n*> in succ t2 by A133,A135; T2 in E by A66,A130,FUNCT_1:def 3; then T2.(t^<*n*>) = T.(t^<*n*>) by A112,A140; hence thesis by A130,A133,A134,A139; end; theorem for T1, T2 being Tree st for n being Element of NAT holds T1-level n = T2-level n holds T1 = T2 proof let T1, T2 be Tree such that A1: for n being Element of NAT holds T1-level n = T2-level n; for p being FinSequence of NAT holds p in T1 iff p in T2 proof let p be FinSequence of NAT; A2: T1 = union { T1-level n where n is Element of NAT: not contradiction } by Th14; hereby assume p in T1; then consider Y being set such that A3: p in Y and A4: Y in { T1-level n where n is Element of NAT: not contradiction } by A2,TARSKI:def 4; consider n being Element of NAT such that A5: Y = T1-level n by A4; Y = T2-level n by A1,A5; hence p in T2 by A3; end; assume A6: p in T2; T2 = union { T2-level n where n is Element of NAT: not contradiction } by Th14; then consider Y being set such that A7: p in Y and A8: Y in { T2-level n where n is Element of NAT: not contradiction } by A6,TARSKI:def 4; consider n being Element of NAT such that A9: Y = T2-level n by A8; Y = T1-level n by A1,A9; hence thesis by A7; end; hence thesis by Th5; end; theorem for n being Element of NAT holds TrivialInfiniteTree-level n = { n |-> 0 } proof set T = TrivialInfiniteTree; let n be Element of NAT; set L = { w where w is Element of T: len w = n }; set f = n |-> 0; {f} = L proof hereby let a be set; assume a in {f}; then A1: a = f by TARSKI:def 1; f in T & len f = n by CARD_1:def 7; hence a in L by A1; end; let a be set; assume a in L; then consider w being Element of T such that A2: a = w & len w = n; w in T; then ex k being Element of NAT st w = k |-> 0; then a = f by A2,CARD_1:def 7; hence thesis by TARSKI:def 1; end; hence thesis; end; theorem for X,Y being set for B being c=-linear Subset of PFuncs(X,Y) holds union B in PFuncs(X,Y) proof let X,Y be set; let B be c=-linear Subset of PFuncs(X,Y); for x be set st x in B holds x is Function; then reconsider f = union B as Function by Th34; per cases; suppose B <> {}; then reconsider D = B as non empty functional set; A1: now let x be set; assume x in { dom g where g is Element of D: not contradiction }; then consider g being Element of D such that A2: x = dom g; g in PFuncs(X,Y) by TARSKI:def 3; then ex f being Function st g = f & dom f c= X & rng f c= Y by PARTFUN1:def 3; hence x c= X by A2; end; A3: now let x be set; assume x in { rng g where g is Element of D: not contradiction }; then consider g being Element of D such that A4: x = rng g; g in PFuncs(X,Y) by TARSKI:def 3; then ex f being Function st g = f & dom f c= X & rng f c= Y by PARTFUN1:def 3; hence x c= Y by A4; end; rng f = union { rng g where g is Element of D: not contradiction } by FUNCT_1:110; then A5: rng f c= Y by A3,ZFMISC_1:76; dom f = union { dom g where g is Element of D: not contradiction } by FUNCT_1:110; then dom f c= X by A1,ZFMISC_1:76; hence thesis by A5,PARTFUN1:def 3; end; suppose A6: B = {}; {} is PartFunc of X, Y by RELSET_1:12; hence thesis by A6,PARTFUN1:45,ZFMISC_1:2; end; end; begin reserve x, X, X1, X2 for set; Lm1: now let X1,X2,X3 be set; thus X1 /\ (X2 /\ X3) = X1 /\ X1 /\ X2 /\ X3 by XBOOLE_1:16 .= X1 /\ (X1 /\ X2) /\ X3 by XBOOLE_1:16 .= (X1 /\ X2) /\ (X1 /\ X3) by XBOOLE_1:16; end; definition let Y be functional set; func DOMS(Y) equals union {dom f where f is Element of Y: not contradiction}; coherence; end; definition let X; attr X is complex-functions-membered means :Def2: x in X implies x is complex-valued Function; end; definition let X; attr X is ext-real-functions-membered means :Def3: x in X implies x is ext-real-valued Function; end; definition let X; attr X is real-functions-membered means :Def4: x in X implies x is real-valued Function; end; definition let X; attr X is rational-functions-membered means :Def5: x in X implies x is RAT-valued Function; end; definition let X; attr X is integer-functions-membered means :Def6: x in X implies x is INT-valued Function; end; definition let X; attr X is natural-functions-membered means :Def7: x in X implies x is natural-valued Function; end; registration cluster natural-functions-membered -> integer-functions-membered for set; coherence proof let X; assume A1: for x being set st x in X holds x is natural-valued Function; let x; assume x in X; then x is natural-valued Function by A1; hence thesis; end; cluster integer-functions-membered -> rational-functions-membered for set; coherence proof let X; assume A2: for x being set st x in X holds x is INT-valued Function; let x; assume x in X; then x is INT-valued Function by A2; hence thesis; end; cluster rational-functions-membered -> real-functions-membered for set; coherence proof let X; assume A3: for x being set st x in X holds x is RAT-valued Function; let x; thus thesis by A3; end; cluster real-functions-membered -> complex-functions-membered for set; coherence proof let X; assume A4: for x being set st x in X holds x is real-valued Function; let x; thus thesis by A4; end; cluster real-functions-membered -> ext-real-functions-membered for set; coherence proof let X; assume A5: for x being set st x in X holds x is real-valued Function; let x; thus thesis by A5; end; end; registration cluster empty -> natural-functions-membered for set; coherence proof let X be set such that A1: X is empty; let x; thus thesis by A1; end; end; registration let f be complex-valued Function; cluster {f} -> complex-functions-membered; coherence proof let x; thus thesis by TARSKI:def 1; end; end; registration cluster complex-functions-membered -> functional for set; coherence proof let X; assume A1: X is complex-functions-membered; let x; thus thesis by A1,Def2; end; cluster ext-real-functions-membered -> functional for set; coherence proof let X; assume A2: X is ext-real-functions-membered; let x; thus thesis by A2,Def3; end; end; set ff = the natural-valued Function; registration cluster natural-functions-membered non empty for set; existence proof take {ff}; thus for x being set st x in {ff} holds x is natural-valued Function by TARSKI:def 1; thus thesis; end; end; registration let X be complex-functions-membered set; cluster -> complex-functions-membered for Subset of X; coherence proof let S be Subset of X; let x; thus thesis by Def2; end; end; registration let X be ext-real-functions-membered set; cluster -> ext-real-functions-membered for Subset of X; coherence proof let S be Subset of X; let x; thus thesis by Def3; end; end; registration let X be real-functions-membered set; cluster -> real-functions-membered for Subset of X; coherence proof let S be Subset of X; let x; thus thesis by Def4; end; end; registration let X be rational-functions-membered set; cluster -> rational-functions-membered for Subset of X; coherence proof let S be Subset of X; let x; thus thesis by Def5; end; end; registration let X be integer-functions-membered set; cluster -> integer-functions-membered for Subset of X; coherence proof let S be Subset of X; let x; thus thesis by Def6; end; end; registration let X be natural-functions-membered set; cluster -> natural-functions-membered for Subset of X; coherence proof let S be Subset of X; let x; thus thesis by Def7; end; end; definition set A = COMPLEX; let D be set; defpred P[set] means $1 is PartFunc of D,A; func C_PFuncs(D) -> set means :Def8: for f being set holds f in it iff f is PartFunc of D,COMPLEX; existence proof consider X being set such that A1: for x being set holds x in X iff x in PFuncs(D,A) & P[x] from XBOOLE_0:sch 1; take X; let f be set; thus f in X implies f is PartFunc of D,A by A1; assume A2: f is PartFunc of D,A; then f in PFuncs(D,A) by PARTFUN1:45; hence thesis by A1,A2; end; uniqueness proof let P, Q be set; assume for f being set holds f in P iff f is PartFunc of D,A; then A3: for f being set holds f in P iff P[f]; assume for f being set holds f in Q iff f is PartFunc of D,A; then A4: for f being set holds f in Q iff P[f]; thus P = Q from XBOOLE_0:sch 2(A3,A4); end; end; definition set A = COMPLEX; let D be set; defpred P[set] means $1 is Function of D,A; func C_Funcs(D) -> set means :Def9: for f being set holds f in it iff f is Function of D,COMPLEX; existence proof consider X being set such that A1: for x being set holds x in X iff x in Funcs(D,A) & P[x] from XBOOLE_0:sch 1; take X; let f be set; thus f in X implies f is Function of D,A by A1; assume A2: f is Function of D,A; then f in Funcs(D,A) by FUNCT_2:8; hence thesis by A1,A2; end; uniqueness proof let P, Q be set; assume for f being set holds f in P iff f is Function of D,A; then A3: for f being set holds f in P iff P[f]; assume for f being set holds f in Q iff f is Function of D,A; then A4: for f being set holds f in Q iff P[f]; thus P = Q from XBOOLE_0:sch 2(A3,A4); end; end; definition set A = ExtREAL; let D be set; defpred P[set] means $1 is PartFunc of D,A; func E_PFuncs(D) -> set means :Def10: for f being set holds f in it iff f is PartFunc of D,ExtREAL; existence proof consider X being set such that A1: for x being set holds x in X iff x in PFuncs(D,A) & P[x] from XBOOLE_0:sch 1; take X; let f be set; thus f in X implies f is PartFunc of D,A by A1; assume A2: f is PartFunc of D,A; then f in PFuncs(D,A) by PARTFUN1:45; hence thesis by A1,A2; end; uniqueness proof let P, Q be set; assume for f being set holds f in P iff f is PartFunc of D,A; then A3: for f being set holds f in P iff P[f]; assume for f being set holds f in Q iff f is PartFunc of D,A; then A4: for f being set holds f in Q iff P[f]; thus P = Q from XBOOLE_0:sch 2(A3,A4); end; end; definition set A = ExtREAL; let D be set; defpred P[set] means $1 is Function of D,A; func E_Funcs(D) -> set means :Def11: for f being set holds f in it iff f is Function of D,ExtREAL; existence proof consider X being set such that A1: for x being set holds x in X iff x in Funcs(D,A) & P[x] from XBOOLE_0:sch 1; take X; let f be set; thus f in X implies f is Function of D,A by A1; assume A2: f is Function of D,A; then f in Funcs(D,A) by FUNCT_2:8; hence thesis by A1,A2; end; uniqueness proof let P, Q be set; assume for f being set holds f in P iff f is Function of D,A; then A3: for f being set holds f in P iff P[f]; assume for f being set holds f in Q iff f is Function of D,A; then A4: for f being set holds f in Q iff P[f]; thus P = Q from XBOOLE_0:sch 2(A3,A4); end; end; definition set A = REAL; let D be set; defpred P[set] means $1 is PartFunc of D,A; func R_PFuncs(D) -> set means :Def12: for f being set holds f in it iff f is PartFunc of D,REAL; existence proof consider X being set such that A1: for x being set holds x in X iff x in PFuncs(D,A) & P[x] from XBOOLE_0:sch 1; take X; let f be set; thus f in X implies f is PartFunc of D,A by A1; assume A2: f is PartFunc of D,A; then f in PFuncs(D,A) by PARTFUN1:45; hence thesis by A1,A2; end; uniqueness proof let P, Q be set; assume for f being set holds f in P iff f is PartFunc of D,A; then A3: for f being set holds f in P iff P[f]; assume for f being set holds f in Q iff f is PartFunc of D,A; then A4: for f being set holds f in Q iff P[f]; thus P = Q from XBOOLE_0:sch 2(A3,A4); end; end; definition set A = REAL; let D be set; defpred P[set] means $1 is Function of D,A; func R_Funcs(D) -> set means :Def13: for f being set holds f in it iff f is Function of D,REAL; existence proof consider X being set such that A1: for x being set holds x in X iff x in Funcs(D,A) & P[x] from XBOOLE_0:sch 1; take X; let f be set; thus f in X implies f is Function of D,A by A1; assume A2: f is Function of D,A; then f in Funcs(D,A) by FUNCT_2:8; hence thesis by A1,A2; end; uniqueness proof let P, Q be set; assume for f being set holds f in P iff f is Function of D,A; then A3: for f being set holds f in P iff P[f]; assume for f being set holds f in Q iff f is Function of D,A; then A4: for f being set holds f in Q iff P[f]; thus P = Q from XBOOLE_0:sch 2(A3,A4); end; end; definition set A = RAT; let D be set; defpred P[set] means $1 is PartFunc of D,A; func Q_PFuncs(D) -> set means :Def14: for f being set holds f in it iff f is PartFunc of D,RAT; existence proof consider X being set such that A1: for x being set holds x in X iff x in PFuncs(D,A) & P[x] from XBOOLE_0:sch 1; take X; let f be set; thus f in X implies f is PartFunc of D,A by A1; assume A2: f is PartFunc of D,A; then f in PFuncs(D,A) by PARTFUN1:45; hence thesis by A1,A2; end; uniqueness proof let P, Q be set; assume for f being set holds f in P iff f is PartFunc of D,A; then A3: for f being set holds f in P iff P[f]; assume for f being set holds f in Q iff f is PartFunc of D,A; then A4: for f being set holds f in Q iff P[f]; thus P = Q from XBOOLE_0:sch 2(A3,A4); end; end; definition set A = RAT; let D be set; defpred P[set] means $1 is Function of D,A; func Q_Funcs(D) -> set means :Def15: for f being set holds f in it iff f is Function of D,RAT; existence proof consider X being set such that A1: for x being set holds x in X iff x in Funcs(D,A) & P[x] from XBOOLE_0:sch 1; take X; let f be set; thus f in X implies f is Function of D,A by A1; assume A2: f is Function of D,A; then f in Funcs(D,A) by FUNCT_2:8; hence thesis by A1,A2; end; uniqueness proof let P, Q be set; assume for f being set holds f in P iff f is Function of D,A; then A3: for f being set holds f in P iff P[f]; assume for f being set holds f in Q iff f is Function of D,A; then A4: for f being set holds f in Q iff P[f]; thus P = Q from XBOOLE_0:sch 2(A3,A4); end; end; definition set A = INT; let D be set; defpred P[set] means $1 is PartFunc of D,A; func I_PFuncs(D) -> set means :Def16: for f being set holds f in it iff f is PartFunc of D,INT; existence proof consider X being set such that A1: for x being set holds x in X iff x in PFuncs(D,A) & P[x] from XBOOLE_0:sch 1; take X; let f be set; thus f in X implies f is PartFunc of D,A by A1; assume A2: f is PartFunc of D,A; then f in PFuncs(D,A) by PARTFUN1:45; hence thesis by A1,A2; end; uniqueness proof let P, Q be set; assume for f being set holds f in P iff f is PartFunc of D,A; then A3: for f being set holds f in P iff P[f]; assume for f being set holds f in Q iff f is PartFunc of D,A; then A4: for f being set holds f in Q iff P[f]; thus P = Q from XBOOLE_0:sch 2(A3,A4); end; end; definition set A = INT; let D be set; defpred P[set] means $1 is Function of D,A; func I_Funcs(D) -> set means :Def17: for f being set holds f in it iff f is Function of D,INT; existence proof consider X being set such that A1: for x being set holds x in X iff x in Funcs(D,A) & P[x] from XBOOLE_0:sch 1; take X; let f be set; thus f in X implies f is Function of D,A by A1; assume A2: f is Function of D,A; then f in Funcs(D,A) by FUNCT_2:8; hence thesis by A1,A2; end; uniqueness proof let P, Q be set; assume for f being set holds f in P iff f is Function of D,A; then A3: for f being set holds f in P iff P[f]; assume for f being set holds f in Q iff f is Function of D,A; then A4: for f being set holds f in Q iff P[f]; thus P = Q from XBOOLE_0:sch 2(A3,A4); end; end; definition set A = NAT; let D be set; defpred P[set] means $1 is PartFunc of D,A; func N_PFuncs(D) -> set means :Def18: for f being set holds f in it iff f is PartFunc of D,NAT; existence proof consider X being set such that A1: for x being set holds x in X iff x in PFuncs(D,A) & P[x] from XBOOLE_0:sch 1; take X; let f be set; thus f in X implies f is PartFunc of D,A by A1; assume A2: f is PartFunc of D,A; then f in PFuncs(D,A) by PARTFUN1:45; hence thesis by A1,A2; end; uniqueness proof let P, Q be set; assume for f being set holds f in P iff f is PartFunc of D,A; then A3: for f being set holds f in P iff P[f]; assume for f being set holds f in Q iff f is PartFunc of D,A; then A4: for f being set holds f in Q iff P[f]; thus P = Q from XBOOLE_0:sch 2(A3,A4); end; end; definition set A = NAT; let D be set; defpred P[set] means $1 is Function of D,A; func N_Funcs(D) -> set means :Def19: for f being set holds f in it iff f is Function of D,NAT; existence proof consider X being set such that A1: for x being set holds x in X iff x in Funcs(D,A) & P[x] from XBOOLE_0:sch 1; take X; let f be set; thus f in X implies f is Function of D,A by A1; assume A2: f is Function of D,A; then f in Funcs(D,A) by FUNCT_2:8; hence thesis by A1,A2; end; uniqueness proof let P, Q be set; assume for f being set holds f in P iff f is Function of D,A; then A3: for f being set holds f in P iff P[f]; assume for f being set holds f in Q iff f is Function of D,A; then A4: for f being set holds f in Q iff P[f]; thus P = Q from XBOOLE_0:sch 2(A3,A4); end; end; theorem Th1: C_Funcs(X) is Subset of C_PFuncs(X) proof C_Funcs(X) c= C_PFuncs(X) proof let x; assume x in C_Funcs(X); then x is Function of X,COMPLEX by Def9; hence thesis by Def8; end; hence thesis; end; theorem Th2: E_Funcs(X) is Subset of E_PFuncs(X) proof E_Funcs(X) c= E_PFuncs(X) proof let x; assume x in E_Funcs(X); then x is Function of X,ExtREAL by Def11; hence thesis by Def10; end; hence thesis; end; theorem Th3: R_Funcs(X) is Subset of R_PFuncs(X) proof R_Funcs(X) c= R_PFuncs(X) proof let x; assume x in R_Funcs(X); then x is Function of X,REAL by Def13; hence thesis by Def12; end; hence thesis; end; theorem Th4: Q_Funcs(X) is Subset of Q_PFuncs(X) proof Q_Funcs(X) c= Q_PFuncs(X) proof let x; assume x in Q_Funcs(X); then x is Function of X,RAT by Def15; hence thesis by Def14; end; hence thesis; end; theorem Th5: I_Funcs(X) is Subset of I_PFuncs(X) proof I_Funcs(X) c= I_PFuncs(X) proof let x; assume x in I_Funcs(X); then x is Function of X,INT by Def17; hence thesis by Def16; end; hence thesis; end; theorem Th6: N_Funcs(X) is Subset of N_PFuncs(X) proof N_Funcs(X) c= N_PFuncs(X) proof let x; assume x in N_Funcs(X); then x is Function of X,NAT by Def19; hence thesis by Def18; end; hence thesis; end; registration let X; cluster C_PFuncs(X) -> complex-functions-membered; coherence proof let x; thus thesis by Def8; end; cluster C_Funcs(X) -> complex-functions-membered; coherence proof reconsider C = C_Funcs(X) as Subset of C_PFuncs(X) by Th1; C is complex-functions-membered; hence thesis; end; cluster E_PFuncs(X) -> ext-real-functions-membered; coherence proof let x; thus thesis by Def10; end; cluster E_Funcs(X) -> ext-real-functions-membered; coherence proof reconsider C = E_Funcs(X) as Subset of E_PFuncs(X) by Th2; C is ext-real-functions-membered; hence thesis; end; cluster R_PFuncs(X) -> real-functions-membered; coherence proof let x; thus thesis by Def12; end; cluster R_Funcs(X) -> real-functions-membered; coherence proof reconsider C = R_Funcs(X) as Subset of R_PFuncs(X) by Th3; C is real-functions-membered; hence thesis; end; cluster Q_PFuncs(X) -> rational-functions-membered; coherence proof let x; thus thesis by Def14; end; cluster Q_Funcs(X) -> rational-functions-membered; coherence proof reconsider C = Q_Funcs(X) as Subset of Q_PFuncs(X) by Th4; C is rational-functions-membered; hence thesis; end; cluster I_PFuncs(X) -> integer-functions-membered; coherence proof let x; thus thesis by Def16; end; cluster I_Funcs(X) -> integer-functions-membered; coherence proof reconsider C = I_Funcs(X) as Subset of I_PFuncs(X) by Th5; C is integer-functions-membered; hence thesis; end; cluster N_PFuncs(X) -> natural-functions-membered; coherence proof let x; thus thesis by Def18; end; cluster N_Funcs(X) -> natural-functions-membered; coherence proof reconsider C = N_Funcs(X) as Subset of N_PFuncs(X) by Th6; C is natural-functions-membered; hence thesis; end; end; registration let X be complex-functions-membered set; cluster -> complex-valued for Element of X; coherence proof X is empty or X is non empty; hence thesis by Def2,SUBSET_1:def 1; end; end; registration let X be ext-real-functions-membered set; cluster -> ext-real-valued for Element of X; coherence proof X is empty or X is non empty; hence thesis by Def3,SUBSET_1:def 1; end; end; registration let X be real-functions-membered set; cluster -> real-valued for Element of X; coherence proof X is empty or X is non empty; hence thesis by Def4,SUBSET_1:def 1; end; end; registration let X be rational-functions-membered set; cluster -> RAT-valued for Element of X; coherence proof X is empty or X is non empty; hence thesis by Def5,SUBSET_1:def 1; end; end; registration let X be integer-functions-membered set; cluster -> INT-valued for Element of X; coherence proof X is empty or X is non empty; hence thesis by Def6,SUBSET_1:def 1; end; end; registration let X be natural-functions-membered set; cluster -> natural-valued for Element of X; coherence proof X is empty or X is non empty; hence thesis by Def7,SUBSET_1:def 1; end; end; registration let X, x be set; let Y be complex-functions-membered set; let f be PartFunc of X,Y; cluster f.x -> Function-like Relation-like; coherence; end; registration let X, x be set; let Y be ext-real-functions-membered set; let f be PartFunc of X,Y; cluster f.x -> Function-like Relation-like; coherence; end; registration let X, x; let Y be complex-functions-membered set; let f be PartFunc of X,Y; cluster f.x -> complex-valued; coherence proof per cases; suppose x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis; end; suppose not x in dom f; hence thesis by FUNCT_1:def 2; end; end; end; registration let X, x; let Y be ext-real-functions-membered set; let f be PartFunc of X,Y; cluster f.x -> ext-real-valued; coherence proof per cases; suppose x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis; end; suppose not x in dom f; hence thesis by FUNCT_1:def 2; end; end; end; registration let X, x; let Y be real-functions-membered set; let f be PartFunc of X,Y; cluster f.x -> real-valued; coherence proof per cases; suppose x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis; end; suppose not x in dom f; hence thesis by FUNCT_1:def 2; end; end; end; registration let X, x; let Y be rational-functions-membered set; let f be PartFunc of X,Y; cluster f.x -> RAT-valued; coherence proof per cases; suppose x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis; end; suppose not x in dom f; hence thesis by FUNCT_1:def 2; end; end; end; registration let X, x; let Y be integer-functions-membered set; let f be PartFunc of X,Y; cluster f.x -> INT-valued; coherence proof per cases; suppose x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis; end; suppose not x in dom f; hence thesis by FUNCT_1:def 2; end; end; end; registration let X, x; let Y be natural-functions-membered set; let f be PartFunc of X,Y; cluster f.x -> natural-valued; coherence proof per cases; suppose x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis; end; suppose not x in dom f; hence thesis by FUNCT_1:def 2; end; end; end; registration let X; let Y be complex-membered set; cluster PFuncs(X,Y) -> complex-functions-membered; coherence proof let x; assume x in PFuncs(X,Y); then consider f being Function such that A1: x = f and A2: dom f c= X & rng f c= Y by PARTFUN1:def 3; reconsider f as PartFunc of X,Y by A2,RELSET_1:4; f is set; hence thesis by A1; end; end; registration let X; let Y be ext-real-membered set; cluster PFuncs(X,Y) -> ext-real-functions-membered; coherence proof let x; assume x in PFuncs(X,Y); then consider f being Function such that A1: x = f and A2: dom f c= X & rng f c= Y by PARTFUN1:def 3; reconsider f as PartFunc of X,Y by A2,RELSET_1:4; f is set; hence thesis by A1; end; end; registration let X; let Y be real-membered set; cluster PFuncs(X,Y) -> real-functions-membered; coherence proof let x; assume x in PFuncs(X,Y); then consider f being Function such that A1: x = f and A2: dom f c= X & rng f c= Y by PARTFUN1:def 3; reconsider f as PartFunc of X,Y by A2,RELSET_1:4; f is set; hence thesis by A1; end; end; registration let X; let Y be rational-membered set; cluster PFuncs(X,Y) -> rational-functions-membered; coherence proof let x; assume x in PFuncs(X,Y); then consider f being Function such that A1: x = f and A2: dom f c= X & rng f c= Y by PARTFUN1:def 3; reconsider f as PartFunc of X,Y by A2,RELSET_1:4; f is set; hence thesis by A1; end; end; registration let X; let Y be integer-membered set; cluster PFuncs(X,Y) -> integer-functions-membered; coherence proof let x; assume x in PFuncs(X,Y); then consider f being Function such that A1: x = f and A2: dom f c= X & rng f c= Y by PARTFUN1:def 3; reconsider f as PartFunc of X,Y by A2,RELSET_1:4; f is set; hence thesis by A1; end; end; registration let X; let Y be natural-membered set; cluster PFuncs(X,Y) -> natural-functions-membered; coherence proof let x; assume x in PFuncs(X,Y); then consider f being Function such that A1: x = f and A2: dom f c= X & rng f c= Y by PARTFUN1:def 3; reconsider f as PartFunc of X,Y by A2,RELSET_1:4; f is set; hence thesis by A1; end; end; registration let X; let Y be complex-membered set; cluster Funcs(X,Y) -> complex-functions-membered; coherence proof let x; assume x in Funcs(X,Y); then consider f being Function such that A1: x = f and A2: dom f = X & rng f c= Y by FUNCT_2:def 2; reconsider f as PartFunc of X,Y by A2,RELSET_1:4; f is set; hence thesis by A1; end; end; registration let X; let Y be ext-real-membered set; cluster Funcs(X,Y) -> ext-real-functions-membered; coherence proof let x; assume x in Funcs(X,Y); then consider f being Function such that A1: x = f and A2: dom f = X & rng f c= Y by FUNCT_2:def 2; reconsider f as PartFunc of X,Y by A2,RELSET_1:4; f is set; hence thesis by A1; end; end; registration let X; let Y be real-membered set; cluster Funcs(X,Y) -> real-functions-membered; coherence proof let x; assume x in Funcs(X,Y); then consider f being Function such that A1: x = f and A2: dom f = X & rng f c= Y by FUNCT_2:def 2; reconsider f as PartFunc of X,Y by A2,RELSET_1:4; f is set; hence thesis by A1; end; end; registration let X; let Y be rational-membered set; cluster Funcs(X,Y) -> rational-functions-membered; coherence proof let x; assume x in Funcs(X,Y); then consider f being Function such that A1: x = f and A2: dom f = X & rng f c= Y by FUNCT_2:def 2; reconsider f as PartFunc of X,Y by A2,RELSET_1:4; f is set; hence thesis by A1; end; end; registration let X; let Y be integer-membered set; cluster Funcs(X,Y) -> integer-functions-membered; coherence proof let x; assume x in Funcs(X,Y); then consider f being Function such that A1: x = f and A2: dom f = X & rng f c= Y by FUNCT_2:def 2; reconsider f as PartFunc of X,Y by A2,RELSET_1:4; f is set; hence thesis by A1; end; end; registration let X; let Y be natural-membered set; cluster Funcs(X,Y) -> natural-functions-membered; coherence proof let x; assume x in Funcs(X,Y); then consider f being Function such that A1: x = f and A2: dom f = X & rng f c= Y by FUNCT_2:def 2; reconsider f as PartFunc of X,Y by A2,RELSET_1:4; f is set; hence thesis by A1; end; end; definition let R be Relation; attr R is complex-functions-valued means :Def20: rng R is complex-functions-membered; attr R is ext-real-functions-valued means :Def21: rng R is ext-real-functions-membered; attr R is real-functions-valued means :Def22: rng R is real-functions-membered; attr R is rational-functions-valued means :Def23: rng R is rational-functions-membered; attr R is integer-functions-valued means :Def24: rng R is integer-functions-membered; attr R is natural-functions-valued means :Def25: rng R is natural-functions-membered; end; registration let Y be complex-functions-membered set; cluster -> complex-functions-valued for Y-valued Function; coherence proof let f be Y-valued Function; thus rng f is complex-functions-membered; end; end; definition let f be Function; redefine attr f is complex-functions-valued means for x being set st x in dom f holds f.x is complex-valued Function; compatibility proof thus f is complex-functions-valued implies for x being set st x in dom f holds f.x is complex-valued Function proof assume A1: rng f is complex-functions-membered; let x; assume x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis by A1; end; assume A2: for x being set st x in dom f holds f.x is complex-valued Function; let y be set; assume y in rng f; then ex x being set st x in dom f & f.x = y by FUNCT_1:def 3; hence thesis by A2; end; redefine attr f is ext-real-functions-valued means for x being set st x in dom f holds f.x is ext-real-valued Function; compatibility proof thus f is ext-real-functions-valued implies for x being set st x in dom f holds f.x is ext-real-valued Function proof assume A3: rng f is ext-real-functions-membered; let x; assume x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis by A3; end; assume A4: for x being set st x in dom f holds f.x is ext-real-valued Function; let y be set; assume y in rng f; then ex x being set st x in dom f & f.x = y by FUNCT_1:def 3; hence thesis by A4; end; redefine attr f is real-functions-valued means for x being set st x in dom f holds f.x is real-valued Function; compatibility proof thus f is real-functions-valued implies for x being set st x in dom f holds f.x is real-valued Function proof assume A5: rng f is real-functions-membered; let x; assume x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis by A5; end; assume A6: for x being set st x in dom f holds f.x is real-valued Function; let y be set; assume y in rng f; then ex x being set st x in dom f & f.x = y by FUNCT_1:def 3; hence thesis by A6; end; redefine attr f is rational-functions-valued means for x being set st x in dom f holds f.x is RAT-valued Function; compatibility proof thus f is rational-functions-valued implies for x being set st x in dom f holds f.x is RAT-valued Function proof assume A7: rng f is rational-functions-membered; let x; assume x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis by A7; end; assume A8: for x being set st x in dom f holds f.x is RAT-valued Function; let y be set; assume y in rng f; then ex x being set st x in dom f & f.x = y by FUNCT_1:def 3; hence thesis by A8; end; redefine attr f is integer-functions-valued means for x being set st x in dom f holds f.x is INT-valued Function; compatibility proof thus f is integer-functions-valued implies for x being set st x in dom f holds f.x is INT-valued Function proof assume A9: rng f is integer-functions-membered; let x; assume x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis by A9; end; assume A10: for x being set st x in dom f holds f.x is INT-valued Function; let y be set; assume y in rng f; then ex x being set st x in dom f & f.x = y by FUNCT_1:def 3; hence thesis by A10; end; redefine attr f is natural-functions-valued means for x being set st x in dom f holds f.x is natural-valued Function; compatibility proof thus f is natural-functions-valued implies for x being set st x in dom f holds f.x is natural-valued Function proof assume A11: rng f is natural-functions-membered; let x; assume x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis by A11; end; assume A12: for x being set st x in dom f holds f.x is natural-valued Function; let y be set; assume y in rng f; then ex x being set st x in dom f & f.x = y by FUNCT_1:def 3; hence thesis by A12; end; end; registration cluster natural-functions-valued -> integer-functions-valued for Relation; coherence proof let R be Relation such that A1: rng R is natural-functions-membered; let y be set; thus thesis by A1; end; cluster integer-functions-valued -> rational-functions-valued for Relation; coherence proof let R be Relation such that A2: rng R is integer-functions-membered; let y be set; thus thesis by A2; end; cluster rational-functions-valued -> real-functions-valued for Relation; coherence proof let R be Relation such that A3: rng R is rational-functions-membered; let y be set; thus thesis by A3; end; cluster real-functions-valued -> ext-real-functions-valued for Relation; coherence proof let R be Relation such that A4: rng R is real-functions-membered; let y be set; thus thesis by A4; end; cluster real-functions-valued -> complex-functions-valued for Relation; coherence proof let R be Relation such that A5: rng R is real-functions-membered; let y be set; thus thesis by A5; end; end; registration cluster empty -> natural-functions-valued for Relation; coherence proof let X be Relation such that A1: X is empty; let x; thus thesis by A1; end; end; registration cluster natural-functions-valued for Function; existence proof take {}; thus thesis; end; end; registration let R be complex-functions-valued Relation; cluster rng R -> complex-functions-membered; coherence by Def20; end; registration let R be ext-real-functions-valued Relation; cluster rng R -> ext-real-functions-membered; coherence by Def21; end; registration let R be real-functions-valued Relation; cluster rng R -> real-functions-membered; coherence by Def22; end; registration let R be rational-functions-valued Relation; cluster rng R -> rational-functions-membered; coherence by Def23; end; registration let R be integer-functions-valued Relation; cluster rng R -> integer-functions-membered; coherence by Def24; end; registration let R be natural-functions-valued Relation; cluster rng R -> natural-functions-membered; coherence by Def25; end; registration let X; let Y be complex-functions-membered set; cluster -> complex-functions-valued for PartFunc of X,Y; coherence; end; registration let X; let Y be ext-real-functions-membered set; cluster -> ext-real-functions-valued for PartFunc of X,Y; coherence proof let f be PartFunc of X,Y; let x; thus thesis; end; end; registration let X; let Y be real-functions-membered set; cluster -> real-functions-valued for PartFunc of X,Y; coherence proof let f be PartFunc of X,Y; let x; thus thesis; end; end; registration let X; let Y be rational-functions-membered set; cluster -> rational-functions-valued for PartFunc of X,Y; coherence proof let f be PartFunc of X,Y; let x; thus thesis; end; end; registration let X; let Y be integer-functions-membered set; cluster -> integer-functions-valued for PartFunc of X,Y; coherence proof let f be PartFunc of X,Y; let x; thus thesis; end; end; registration let X; let Y be natural-functions-membered set; cluster -> natural-functions-valued for PartFunc of X,Y; coherence proof let f be PartFunc of X,Y; let x; thus thesis; end; end; registration let f be complex-functions-valued Function; let x; cluster f.x -> Function-like Relation-like; coherence proof per cases; suppose x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis; end; suppose not x in dom f; hence thesis by FUNCT_1:def 2; end; end; end; registration let f be ext-real-functions-valued Function; let x; cluster f.x -> Function-like Relation-like; coherence proof per cases; suppose x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis; end; suppose not x in dom f; hence thesis by FUNCT_1:def 2; end; end; end; registration let f be complex-functions-valued Function; let x; cluster f.x -> complex-valued; coherence proof per cases; suppose x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis; end; suppose not x in dom f; hence thesis by FUNCT_1:def 2; end; end; end; registration let f be ext-real-functions-valued Function; let x; cluster f.x -> ext-real-valued; coherence proof per cases; suppose x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis; end; suppose not x in dom f; hence thesis by FUNCT_1:def 2; end; end; end; registration let f be real-functions-valued Function; let x; cluster f.x -> real-valued; coherence proof per cases; suppose x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis; end; suppose not x in dom f; hence thesis by FUNCT_1:def 2; end; end; end; registration let f be rational-functions-valued Function; let x; cluster f.x -> RAT-valued; coherence proof per cases; suppose x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis; end; suppose not x in dom f; hence thesis by FUNCT_1:def 2; end; end; end; registration let f be integer-functions-valued Function; let x; cluster f.x -> INT-valued; coherence proof per cases; suppose x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis; end; suppose not x in dom f; hence thesis by FUNCT_1:def 2; end; end; end; registration let f be natural-functions-valued Function; let x; cluster f.x -> natural-valued; coherence proof per cases; suppose x in dom f; then f.x in rng f by FUNCT_1:def 3; hence thesis; end; suppose not x in dom f; hence thesis by FUNCT_1:def 2; end; end; end; begin reserve Y, Y1, Y2 for complex-functions-membered set, c, c1, c2 for complex number, f for PartFunc of X,Y, f1 for PartFunc of X1,Y1, f2 for PartFunc of X2, Y2, g, h, k for complex-valued Function; theorem Th7: g <> {} & g + c1 = g + c2 implies c1 = c2 proof assume that A1: g <> {} and A2: g+c1 = g+c2; consider x such that A3: x in dom g by A1,XBOOLE_0:def 1; dom g = dom(g+c2) by VALUED_1:def 2; then A4: (g+c2).x = g.x+c2 by A3,VALUED_1:def 2; dom g = dom(g+c1) by VALUED_1:def 2; then (g+c1).x = g.x+c1 by A3,VALUED_1:def 2; hence c1 = c2 by A2,A4; end; theorem Th8: g <> {} & g - c1 = g - c2 implies c1 = c2 proof assume that A1: g <> {} and A2: g-c1 = g-c2; consider x such that A3: x in dom g by A1,XBOOLE_0:def 1; dom g = dom(g-c2) by VALUED_1:def 2; then A4: (g-c2).x = g.x-c2 by A3,VALUED_1:def 2; dom g = dom(g-c1) by VALUED_1:def 2; then (g-c1).x = g.x-c1 by A3,VALUED_1:def 2; hence c1 = c2 by A2,A4; end; theorem Th9: g <> {} & g is non-empty & g (#) c1 = g (#) c2 implies c1 = c2 proof assume that A1: g <> {} and A2: g is non-empty and A3: g(#)c1 = g(#)c2; consider x such that A4: x in dom g by A1,XBOOLE_0:def 1; g.x in rng g by A4,FUNCT_1:def 3; then A5: g.x <> {} by A2,RELAT_1:def 9; (g(#)c1).x = g.x*c1 & (g(#)c2).x = g.x*c2 by VALUED_1:6; hence c1 = c2 by A3,A5,XCMPLX_1:5; end; theorem Th10: - (g + c) = -g - c proof A1: dom -(g+c) = dom(g+c) by VALUED_1:8; A2: dom(g+c) = dom g & dom(-g-c) = dom -g by VALUED_1:def 2; hence dom -(g+c) = dom(-g-c) by A1,VALUED_1:8; let x; assume A3: x in dom -(g+c); A4: dom -g = dom g by VALUED_1:8; thus (-(g+c)).x = -(g+c).x by VALUED_1:8 .= -(g.x+c) by A1,A3,VALUED_1:def 2 .= -g.x-c .= (-g).x-c by VALUED_1:8 .= (-g-c).x by A2,A1,A4,A3,VALUED_1:def 2; end; theorem Th11: - (g - c) = -g + c proof A1: dom -(g-c) = dom(g-c) by VALUED_1:8; A2: dom(g-c) = dom g & dom(-g+c) = dom -g by VALUED_1:def 2; hence dom -(g-c) = dom(-g+c) by A1,VALUED_1:8; let x; assume A3: x in dom -(g-c); A4: dom -g = dom g by VALUED_1:8; thus (-(g-c)).x = -(g-c).x by VALUED_1:8 .= -(g.x-c) by A1,A3,VALUED_1:def 2 .= -g.x+c .= (-g).x+c by VALUED_1:8 .= (-g+c).x by A2,A1,A4,A3,VALUED_1:def 2; end; theorem Th12: (g + c1) + c2 = g + (c1 + c2) proof A1: dom((g+c1)+c2) = dom(g+c1) by VALUED_1:def 2; A2: dom(g+c1) = dom g by VALUED_1:def 2; hence dom((g+c1)+c2) = dom(g+(c1+c2)) by A1,VALUED_1:def 2; let x; A3: dom(g+(c1+c2)) = dom(g) by VALUED_1:def 2; assume A4: x in dom((g+c1)+c2); hence ((g+c1)+c2).x = (g+c1).x+c2 by VALUED_1:def 2 .= g.x+c1+c2 by A1,A4,VALUED_1:def 2 .= g.x+(c1+c2) .= (g+(c1+c2)).x by A1,A2,A3,A4,VALUED_1:def 2; end; theorem Th13: (g + c1) - c2 = g + (c1 - c2) proof A1: dom((g+c1)-c2) = dom(g+c1) by VALUED_1:def 2; A2: dom(g+c1) = dom g by VALUED_1:def 2; hence dom((g+c1)-c2) = dom(g+(c1-c2)) by A1,VALUED_1:def 2; let x; A3: dom(g+(c1-c2)) = dom(g) by VALUED_1:def 2; assume A4: x in dom((g+c1)-c2); hence ((g+c1)-c2).x = (g+c1).x-c2 by VALUED_1:def 2 .= g.x+c1-c2 by A1,A4,VALUED_1:def 2 .= g.x+(c1-c2) .= (g+(c1-c2)).x by A1,A2,A3,A4,VALUED_1:def 2; end; theorem Th14: (g - c1) + c2 = g - (c1 - c2) proof A1: dom((g-c1)+c2) = dom(g-c1) by VALUED_1:def 2; A2: dom(g-c1) = dom g by VALUED_1:def 2; hence dom((g-c1)+c2) = dom(g-(c1-c2)) by A1,VALUED_1:def 2; let x; A3: dom(g-(c1-c2)) = dom(g) by VALUED_1:def 2; assume A4: x in dom((g-c1)+c2); hence ((g-c1)+c2).x = (g-c1).x+c2 by VALUED_1:def 2 .= g.x-c1+c2 by A1,A4,VALUED_1:def 2 .= g.x-(c1-c2) .= (g-(c1-c2)).x by A1,A2,A3,A4,VALUED_1:def 2; end; theorem Th15: (g - c1) - c2 = g - (c1 + c2) proof A1: dom((g-c1)-c2) = dom(g-c1) by VALUED_1:def 2; A2: dom(g-c1) = dom g by VALUED_1:def 2; hence dom((g-c1)-c2) = dom(g-(c1+c2)) by A1,VALUED_1:def 2; let x; A3: dom(g-(c1+c2)) = dom(g) by VALUED_1:def 2; assume A4: x in dom((g-c1)-c2); hence ((g-c1)-c2).x = (g-c1).x-c2 by VALUED_1:def 2 .= g.x-c1-c2 by A1,A4,VALUED_1:def 2 .= g.x-(c1+c2) .= (g-(c1+c2)).x by A1,A2,A3,A4,VALUED_1:def 2; end; theorem Th16: g (#) c1 (#) c2 = g (#) (c1 * c2) proof dom((g(#)c1)(#)c2) = dom(g(#)c1) & dom(g(#)c1) = dom g by VALUED_1:def 5; hence dom((g(#)c1)(#)c2) = dom(g(#)(c1*c2)) by VALUED_1:def 5; let x; assume x in dom((g(#)c1)(#)c2); thus ((g(#)c1)(#)c2).x = (g(#)c1).x*c2 by VALUED_1:6 .= g.x*c1*c2 by VALUED_1:6 .= g.x*(c1*c2) .= (g(#)(c1*c2)).x by VALUED_1:6; end; theorem Th17: - (g + h) = (-g) - h proof A1: dom -(g+h) = dom(g+h) by VALUED_1:8; dom(g+h) = dom g /\ dom h & dom(-g-h) = dom(-g) /\ dom h by VALUED_1:12,def 1 ; hence A2: dom -(g+h) = dom(-g-h) by A1,VALUED_1:8; let x; assume A3: x in dom -(g+h); thus (-(g+h)).x = -(g+h).x by VALUED_1:8 .= -(g.x+h.x) by A1,A3,VALUED_1:def 1 .= -g.x-h.x .= (-g).x-h.x by VALUED_1:8 .= (-g-h).x by A2,A3,VALUED_1:13; end; theorem Th18: g - h = - (h - g) proof A1: dom -(h-g) = dom(h-g) by VALUED_1:8; dom(g-h) = dom g /\ dom h by VALUED_1:12; hence A2: dom(g-h) = dom -(h-g) by A1,VALUED_1:12; let x; assume A3: x in dom(g-h); hence (g-h).x = g.x-h.x by VALUED_1:13 .= -(h.x-g.x) .= -(h-g).x by A1,A2,A3,VALUED_1:13 .= (-(h-g)).x by VALUED_1:8; end; theorem Th19: g (#) h /" k = g (#) (h /" k) proof A1: dom(g (#) (h /" k)) = dom g /\ dom(h /" k) & dom(g (#) h /" k) = dom(g (#) h ) /\ dom k by VALUED_1:16,def 4; dom(g (#) h) = dom g /\ dom h & dom(h /" k) = dom h /\ dom k by VALUED_1:16 ,def 4; hence dom(g (#) h /" k) = dom(g (#) (h /" k)) by A1,XBOOLE_1:16; let x; assume x in dom(g (#) h /" k); thus (g (#) h /" k).x = (g (#) h).x / k.x by VALUED_1:17 .= g.x * h.x / k.x by VALUED_1:5 .= g.x * (h.x / k.x) .= g.x * (h /" k).x by VALUED_1:17 .= (g (#) (h /" k)).x by VALUED_1:5; end; theorem Th20: g /" h (#) k = g (#) k /" h proof A1: dom(g /" h (#) k) = dom(g /" h) /\ dom k & dom(g (#) k /" h) = dom(g (#) k) /\ dom h by VALUED_1:16,def 4; dom(g /" h) = dom g /\ dom h & dom(g (#) k) = dom g /\ dom k by VALUED_1:16 ,def 4; hence dom(g /" h (#) k) = dom(g (#) k /" h) by A1,XBOOLE_1:16; let x; assume x in dom(g /" h (#) k); thus (g /" h (#) k).x = (g /" h).x * k.x by VALUED_1:5 .= g.x / h.x * k.x by VALUED_1:17 .= g.x * k.x / h.x .= (g(#)k).x / h.x by VALUED_1:5 .= (g (#) k /" h).x by VALUED_1:17; end; theorem Th21: g /" h /" k = g /" (h (#) k) proof A1: dom(g /" h /" k) = dom(g /" h) /\ dom k & dom(g /" (h (#) k)) = dom g /\ dom (h (#) k) by VALUED_1:16; dom(g /" h) = dom g /\ dom h & dom(h (#) k) = dom h /\ dom k by VALUED_1:16 ,def 4; hence dom(g /" h /" k) = dom(g /" (h (#) k)) by A1,XBOOLE_1:16; let x; assume x in dom(g /" h /" k); thus (g /" h /" k).x = (g /" h).x / k.x by VALUED_1:17 .= g.x / h.x / k.x by VALUED_1:17 .= g.x / (h.x * k.x) by XCMPLX_1:78 .= g.x / (h (#) k).x by VALUED_1:5 .= (g /" (h (#) k)).x by VALUED_1:17; end; theorem Th22: c(#)-g = (-c)(#)g proof dom(c(#)-g) = dom -g by VALUED_1:def 5 .= dom g by VALUED_1:8; hence dom(c(#)-g) = dom((-c)(#)g) by VALUED_1:def 5; let x; assume x in dom(c(#)-g); thus (c(#)-g).x = c*((-g).x) by VALUED_1:6 .= c*(-g.x) by VALUED_1:8 .= (-c)*g.x .= ((-c)(#)g).x by VALUED_1:6; end; theorem Th23: c(#)-g = -(c(#)g) proof A1: dom(-(c(#)g)) = dom(c(#)g) by VALUED_1:8 .= dom g by VALUED_1:def 5; dom(c(#)-g) = dom -g by VALUED_1:def 5 .= dom g by VALUED_1:8; hence dom(c(#)-g) = dom -(c(#)g) by A1; let x; assume x in dom(c(#)-g); thus (c(#)-g).x = c*((-g).x) by VALUED_1:6 .= c*(-g.x) by VALUED_1:8 .= -(c*g.x) .= -(c(#)g).x by VALUED_1:6 .= (-(c(#)g)).x by VALUED_1:8; end; theorem Th24: (-c)(#)g = -(c(#)g) proof thus (-c)(#)g = c(#)-g by Th22 .= -(c(#)g) by Th23; end; theorem Th25: - (g (#) h) = (-g) (#) h proof A1: dom -(g(#)h) = dom(g(#)h) by VALUED_1:8; dom(g(#)h) = dom g /\ dom h & dom((-g)(#)h) = dom(-g) /\ dom h by VALUED_1:def 4; hence dom -(g(#)h) = dom((-g)(#)h) by A1,VALUED_1:8; let x; assume x in dom -(g(#)h); thus (-(g(#)h)).x = -(g(#)h).x by VALUED_1:8 .= -(g.x*h.x) by VALUED_1:5 .= (-g.x)*h.x .= (-g).x*h.x by VALUED_1:8 .= ((-g)(#)h).x by VALUED_1:5; end; theorem - (g /" h) = (-g) /" h proof A1: dom -(g/"h) = dom(g/"h) by VALUED_1:8; dom(g/"h) = dom g /\ dom h & dom((-g)/"h) = dom(-g) /\ dom h by VALUED_1:16; hence dom -(g/"h) = dom((-g)/"h) by A1,VALUED_1:8; let x; assume x in dom -(g/"h); thus (-(g/"h)).x = -(g/"h).x by VALUED_1:8 .= -(g.x/h.x) by VALUED_1:17 .= (-g.x)/h.x .= (-g).x/h.x by VALUED_1:8 .= ((-g)/"h).x by VALUED_1:17; end; theorem Th27: - (g /" h) = g /" -h proof A1: dom -h = dom h by VALUED_1:8; dom(g/"h) = dom g /\ dom h & dom(g/"-h) = dom g /\ dom -h by VALUED_1:16; hence dom -(g/"h) = dom(g/"-h) by A1,VALUED_1:8; let x; assume x in dom -(g/"h); thus (-(g/"h)).x = -(g/"h).x by VALUED_1:8 .= -(g.x/h.x) by VALUED_1:17 .= g.x/-h.x by XCMPLX_1:188 .= g.x/(-h).x by VALUED_1:8 .= (g/"-h).x by VALUED_1:17; end; definition let f be complex-valued Function, c be complex number; func f (/) c -> Function equals (1/c) (#) f; coherence; end; registration let f be complex-valued Function, c be complex number; cluster f (/) c -> complex-valued; coherence; end; registration let f be real-valued Function, r be real number; cluster f (/) r -> real-valued; coherence; end; registration let f be RAT-valued Function, r be rational number; cluster f (/) r -> RAT-valued; coherence; end; registration let f be complex-valued FinSequence, c be complex number; cluster f (/) c -> FinSequence-like; coherence; end; theorem dom(g(/)c) = dom g by VALUED_1:def 5; theorem (g(/)c).x = g.x / c by VALUED_1:6; theorem Th30: (-g) (/) c = -(g(/)c) proof thus (-g) (/) c = (-(1/c)) (#) g by Th22 .= -(g(/)c) by Th24; end; theorem Th31: g (/) -c = -(g(/)c) proof thus g (/) -c = (-1/c) (#) g by XCMPLX_1:188 .= -(g(/)c) by Th24; end; theorem g (/) -c = (-g) (/) c proof thus g (/) -c = - (g(/)c) by Th31 .= (-g) (/) c by Th30; end; theorem Th33: g <> {} & g is non-empty & g (/) c1 = g (/) c2 implies c1 = c2 proof assume that A1: g <> {} and A2: g is non-empty and A3: g(/)c1 = g(/)c2; consider x such that A4: x in dom g by A1,XBOOLE_0:def 1; g.x in rng g by A4,FUNCT_1:def 3; then A5: g.x <> {} by A2,RELAT_1:def 9; (g(/)c1).x = g.x/c1 & (g(/)c2).x = g.x/c2 by VALUED_1:6; then c1" = c2" by A3,A5,XCMPLX_1:5; hence c1 = c2 by XCMPLX_1:201; end; theorem g (#) c1 (/) c2 = g (#) (c1 / c2) proof dom(g(#)c1) = dom g & dom(g(#)c1(/)c2) = dom(g(#)c1) by VALUED_1:def 5; hence dom(g(#)c1(/)c2) = dom(g(#)(c1/c2)) by VALUED_1:def 5; let x; assume x in dom(g(#)c1(/)c2); thus (g(#)c1(/)c2).x = (g(#)c1).x * c2" by VALUED_1:6 .= g.x * c1 * c2" by VALUED_1:6 .= g.x*(c1/c2) .= (g(#)(c1/c2)).x by VALUED_1:6; end; theorem g (/) c1 (#) c2 = g (#) c2 (/) c1 proof A1: dom(g(/)c1(#)c2) = dom(g(/)c1) by VALUED_1:def 5; dom(g(/)c1) = dom g & dom(g(#)c2) = dom g by VALUED_1:def 5; hence dom(g(/)c1(#)c2) = dom(g(#)c2(/)c1) by A1,VALUED_1:def 5; let x; assume x in dom(g(/)c1(#)c2); thus (g(/)c1(#)c2).x = (g(/)c1).x * c2 by VALUED_1:6 .= g.x * c1" * c2 by VALUED_1:6 .= (g.x*c2)*c1" .= (g(#)c2).x*c1" by VALUED_1:6 .= (g(#)c2(/)c1).x by VALUED_1:6; end; theorem g (/) c1 (/) c2 = g (/) (c1*c2) proof dom(g(/)c1) = dom g & dom(g(/)(c1*c2)) = dom g by VALUED_1:def 5; hence dom(g(/)c1(/)c2) = dom(g(/)(c1*c2)) by VALUED_1:def 5; let x; assume x in dom(g(/)c1(/)c2); thus (g(/)c1(/)c2).x = (g(/)c1).x * c2" by VALUED_1:6 .= g.x * c1" * c2" by VALUED_1:6 .= g.x * (c1" * c2") .= g.x * (c1*c2)" by XCMPLX_1:204 .= (g(/)(c1*c2)).x by VALUED_1:6; end; theorem (g+h) (/) c = g(/)c + h(/)c proof A1: dom((g+h)(/)c) = dom(g+h) by VALUED_1:def 5; A2: dom(g+h) = dom g /\ dom h by VALUED_1:def 1; dom(g(/)c) = dom g & dom(h(/)c) = dom h by VALUED_1:def 5; hence A3: dom((g+h)(/)c) = dom(g(/)c+h(/)c) by A1,A2,VALUED_1:def 1; let x; assume A4: x in dom((g+h)(/)c); thus ((g+h)(/)c).x = (g+h).x * c" by VALUED_1:6 .= (g.x+h.x)*c" by A1,A4,VALUED_1:def 1 .= g.x*c" + h.x*c" .= (g(/)c).x + h.x*c" by VALUED_1:6 .= (g(/)c).x + (h(/)c).x by VALUED_1:6 .= (g(/)c+h(/)c).x by A3,A4,VALUED_1:def 1; end; theorem (g-h) (/) c = g(/)c - h(/)c proof A1: dom((g-h)(/)c) = dom(g-h) by VALUED_1:def 5; A2: dom(g-h) = dom g /\ dom h by VALUED_1:12; dom(g(/)c) = dom g & dom(h(/)c) = dom h by VALUED_1:def 5; hence A3: dom((g-h)(/)c) = dom(g(/)c-h(/)c) by A1,A2,VALUED_1:12; let x; assume A4: x in dom((g-h)(/)c); thus ((g-h)(/)c).x = (g-h).x * c" by VALUED_1:6 .= (g.x-h.x)*c" by A1,A4,VALUED_1:13 .= g.x*c" - h.x*c" .= (g(/)c).x - h.x*c" by VALUED_1:6 .= (g(/)c).x - (h(/)c).x by VALUED_1:6 .= (g(/)c-h(/)c).x by A3,A4,VALUED_1:13; end; theorem (g(#)h) (/) c = g (#) (h(/)c) proof A1: dom((g(#)h)(/)c) = dom(g(#)h) by VALUED_1:def 5; dom(g(#)h) = dom g /\ dom h & dom(h(/)c) = dom h by VALUED_1:def 4,def 5; hence dom((g(#)h)(/)c) = dom(g(#)(h(/)c)) by A1,VALUED_1:def 4; let x; assume x in dom((g(#)h)(/)c); thus ((g(#)h)(/)c).x = (g(#)h).x * c" by VALUED_1:6 .= g.x*h.x*c" by VALUED_1:5 .= g.x*(h.x*c") .= g.x * (h(/)c).x by VALUED_1:6 .= (g(#)(h(/)c)).x by VALUED_1:5; end; theorem (g/"h) (/) c = g /" (h(#)c) proof A1: dom((g/"h)(/)c) = dom(g/"h) by VALUED_1:def 5; dom(g/"h) = dom g /\ dom h & dom(h(#)c) = dom h by VALUED_1:16,def 5; hence dom((g/"h)(/)c) = dom(g/"(h(#)c)) by A1,VALUED_1:16; let x; assume x in dom((g/"h)(/)c); thus ((g/"h)(/)c).x = (g/"h).x * c" by VALUED_1:6 .= g.x/h.x/c by VALUED_1:17 .= g.x/(h.x*c) by XCMPLX_1:78 .= g.x / (h(#)c).x by VALUED_1:6 .= (g/"(h(#)c)).x by VALUED_1:17; end; definition let f be complex-functions-valued Function; deffunc F(set) = -f.$1; func <->f -> Function means :Def33: dom it = dom f & for x being set st x in dom it holds it.x = -f.x; existence proof ex F being Function st dom F = dom f & for x being set st x in dom f holds F.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let F,G be Function such that A1: dom F = dom f and A2: for x being set st x in dom F holds F.x = F(x) and A3: dom G = dom f and A4: for x being set st x in dom G holds G.x = F(x); thus dom F = dom G by A1,A3; let x; assume A5: x in dom F; hence F.x = F(x) by A2 .= G.x by A1,A3,A4,A5; end; end; definition let X; let Y be complex-functions-membered set; let f be PartFunc of X,Y; redefine func <->f -> PartFunc of X, C_PFuncs(DOMS(Y)); coherence proof set h = <->f; A1: dom h = dom f by Def33; rng h c= C_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; A4: h.x = -f.x by A2,Def33; then reconsider y as Function by A3; A5: rng y c= COMPLEX proof let b be set; thus thesis by A3,A4,XCMPLX_0:def 2; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:8; then y is PartFunc of DOMS(Y),COMPLEX by A6,A5,RELSET_1:4; hence thesis by Def8; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be real-functions-membered set; let f be PartFunc of X,Y; redefine func <->f -> PartFunc of X, R_PFuncs(DOMS(Y)); coherence proof set h = <->f; A1: dom h = dom f by Def33; rng h c= R_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = -f.x by A2,Def33; A5: rng y c= REAL proof let b be set; thus thesis by A3,A4,XREAL_0:def 1; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:8; then y is PartFunc of DOMS(Y),REAL by A6,A5,RELSET_1:4; hence thesis by Def12; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be rational-functions-membered set; let f be PartFunc of X,Y; redefine func <->f -> PartFunc of X, Q_PFuncs(DOMS(Y)); coherence proof set h = <->f; A1: dom h = dom f by Def33; rng h c= Q_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = -f.x by A2,Def33; A5: rng y c= RAT proof let b be set; thus thesis by A3,A4,RAT_1:def 2; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:8; then y is PartFunc of DOMS(Y),RAT by A6,A5,RELSET_1:4; hence thesis by Def14; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be integer-functions-membered set; let f be PartFunc of X,Y; redefine func <->f -> PartFunc of X, I_PFuncs(DOMS(Y)); coherence proof set h = <->f; A1: dom h = dom f by Def33; rng h c= I_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = -f.x by A2,Def33; A5: rng y c= INT proof let b be set; thus thesis by A3,A4,INT_1:def 2; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:8; then y is PartFunc of DOMS(Y),INT by A6,A5,RELSET_1:4; hence thesis by Def16; end; hence thesis by A1,RELSET_1:4; end; end; registration let Y be complex-functions-membered set; let f be FinSequence of Y; cluster <->f -> FinSequence-like; coherence proof dom<->f = dom f & ex n being Nat st dom f = Seg n by Def33,FINSEQ_1:def 2; hence thesis by FINSEQ_1:def 2; end; end; theorem <-><->f = f proof set f1 = <->f; A1: dom f1 = dom f by Def33; hence A2: dom<->f1 = dom f by Def33; let x; assume A3: x in dom<->f1; hence (<->f1).x = -f1.x by Def33 .= -(-f.x) by A1,A2,A3,Def33 .= f.x; end; theorem <->f1 = <->f2 implies f1 = f2 proof A1: dom <->f1 = dom f1 by Def33; assume A2: <->f1 = <->f2; hence dom f1 = dom f2 by A1,Def33; let x; assume A3: x in dom f1; thus f1.x = --f1.x .= -(<->f1).x by A1,A3,Def33 .= --f2.x by A2,A1,A3,Def33 .= f2.x; end; definition let X be complex-functions-membered set; let Y be set; let f be PartFunc of X,Y; defpred P[set,set] means ex a being complex-valued Function st $1 = a & $2 = f.-a; func f(-) -> Function means dom it = dom f & for x being complex-valued Function st x in dom it holds it.x = f.-x; existence proof A1: for x being set st x in dom f ex y being set st P[x,y] proof let x; assume x in dom f; then reconsider a = x as complex-valued Function; take f.-a, a; thus thesis; end; consider F being Function such that A2: dom F = dom f and A3: for x being set st x in dom f holds P[x,F.x] from CLASSES1:sch 1( A1); take F; thus dom F = dom f by A2; let x be complex-valued Function; assume x in dom F; then P[x,F.x] by A2,A3; hence thesis; end; uniqueness proof let F, G be Function such that A4: dom F = dom f and A5: for x being complex-valued Function st x in dom F holds F.x = f.- x and A6: dom G = dom f and A7: for x being complex-valued Function st x in dom G holds G.x = f.- x; thus dom F = dom G by A4,A6; let x; assume A8: x in dom F; then reconsider y = x as complex-valued Function by A4; thus F.x = f.-y by A5,A8 .= G.x by A4,A6,A7,A8; end; end; definition let f be complex-functions-valued Function; deffunc F(set) = (f.$1)"; func f -> Function means :Def35: dom it = dom f & for x being set st x in dom it holds it.x = (f.x)"; existence proof ex F being Function st dom F = dom f & for x being set st x in dom f holds F.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let F,G be Function such that A1: dom F = dom f and A2: for x being set st x in dom F holds F.x = F(x) and A3: dom G = dom f and A4: for x being set st x in dom G holds G.x = F(x); thus dom F = dom G by A1,A3; let x; assume A5: x in dom F; hence F.x = F(x) by A2 .= G.x by A1,A3,A4,A5; end; end; definition let X; let Y be complex-functions-membered set; let f be PartFunc of X,Y; redefine func f -> PartFunc of X, C_PFuncs(DOMS(Y)); coherence proof set h = f; A1: dom h = dom f by Def35; rng h c= C_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; A4: h.x = (f.x)" by A2,Def35; then reconsider y as Function by A3; A5: rng y c= COMPLEX proof let b be set; thus thesis by A3,A4,XCMPLX_0:def 2; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 7; then y is PartFunc of DOMS(Y),COMPLEX by A6,A5,RELSET_1:4; hence thesis by Def8; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be real-functions-membered set; let f be PartFunc of X,Y; redefine func f -> PartFunc of X, R_PFuncs(DOMS(Y)); coherence proof set h = f; A1: dom h = dom f by Def35; rng h c= R_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = (f.x)" by A2,Def35; A5: rng y c= REAL proof let b be set; thus thesis by A3,A4,XREAL_0:def 1; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 7; then y is PartFunc of DOMS(Y),REAL by A6,A5,RELSET_1:4; hence thesis by Def12; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be rational-functions-membered set; let f be PartFunc of X,Y; redefine func f -> PartFunc of X, Q_PFuncs(DOMS(Y)); coherence proof set h = f; A1: dom h = dom f by Def35; rng h c= Q_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = (f.x)" by A2,Def35; A5: rng y c= RAT proof let b be set; thus thesis by A3,A4,RAT_1:def 2; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 7; then y is PartFunc of DOMS(Y),RAT by A6,A5,RELSET_1:4; hence thesis by Def14; end; hence thesis by A1,RELSET_1:4; end; end; registration let Y be complex-functions-membered set; let f be FinSequence of Y; cluster f -> FinSequence-like; coherence proof dom f = dom f & ex n being Nat st dom f = Seg n by Def35,FINSEQ_1:def 2; hence thesis by FINSEQ_1:def 2; end; end; theorem f = f proof set f1 = f; A1: dom f1 = dom f by Def35; hence A2: dom f1 = dom f by Def35; let x; assume A3: x in dom f1; hence (f1).x = (f1.x)" by Def35 .= (f.x)"" by A1,A2,A3,Def35 .= f.x; end; definition let f be complex-functions-valued Function; deffunc F(set) = abs(f.$1); func abs(f) -> Function means :Def36: dom it = dom f & for x being set st x in dom it holds it.x = abs(f.x); existence proof ex F being Function st dom F = dom f & for x being set st x in dom f holds F.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let F,G be Function such that A1: dom F = dom f and A2: for x being set st x in dom F holds F.x = F(x) and A3: dom G = dom f and A4: for x being set st x in dom G holds G.x = F(x); thus dom F = dom G by A1,A3; let x; assume A5: x in dom F; hence F.x = F(x) by A2 .= G.x by A1,A3,A4,A5; end; end; definition let X; let Y be complex-functions-membered set; let f be PartFunc of X,Y; redefine func abs(f) -> PartFunc of X, C_PFuncs(DOMS(Y)); coherence proof set h = abs(f); A1: dom h = dom f by Def36; rng h c= C_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; A4: h.x = abs(f.x) by A2,Def36; then reconsider y as Function by A3; A5: rng y c= COMPLEX proof let b be set; thus thesis by A3,A4,XCMPLX_0:def 2; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 11; then y is PartFunc of DOMS(Y),COMPLEX by A6,A5,RELSET_1:4; hence thesis by Def8; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be real-functions-membered set; let f be PartFunc of X,Y; redefine func abs(f) -> PartFunc of X, R_PFuncs(DOMS(Y)); coherence proof set h = abs(f); A1: dom h = dom f by Def36; rng h c= R_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = abs(f.x) by A2,Def36; A5: rng y c= REAL proof let b be set; thus thesis by A3,A4,XREAL_0:def 1; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 11; then y is PartFunc of DOMS(Y),REAL by A6,A5,RELSET_1:4; hence thesis by Def12; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be rational-functions-membered set; let f be PartFunc of X,Y; redefine func abs(f) -> PartFunc of X, Q_PFuncs(DOMS(Y)); coherence proof set h = abs(f); A1: dom h = dom f by Def36; rng h c= Q_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = abs(f.x) by A2,Def36; A5: rng y c= RAT proof let b be set; thus thesis by A3,A4,RAT_1:def 2; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 11; then y is PartFunc of DOMS(Y),RAT by A6,A5,RELSET_1:4; hence thesis by Def14; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be integer-functions-membered set; let f be PartFunc of X,Y; redefine func abs(f) -> PartFunc of X, N_PFuncs(DOMS(Y)); coherence proof set h = abs(f); A1: dom h = dom f by Def36; rng h c= N_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = abs(f.x) by A2,Def36; A5: rng y c= NAT proof let b be set; thus thesis by A3,A4,ORDINAL1:def 12; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 11; then y is PartFunc of DOMS(Y),NAT by A6,A5,RELSET_1:4; hence thesis by Def18; end; hence thesis by A1,RELSET_1:4; end; end; registration let Y be complex-functions-membered set; let f be FinSequence of Y; cluster abs(f) -> FinSequence-like; coherence proof dom abs(f) = dom f & ex n being Nat st dom f = Seg n by Def36, FINSEQ_1:def 2; hence thesis by FINSEQ_1:def 2; end; end; theorem abs abs f = abs f proof set f1 = abs f; thus A1: dom abs f1 = dom abs f by Def36; let x; assume A2: x in dom abs f1; hence (abs f1).x = abs(f1.x) by Def36 .= abs(abs(f.x)) by A1,A2,Def36 .= (abs f).x by A1,A2,Def36; end; definition let Y be complex-functions-membered set; let f be Y-valued Function; let c be complex number; deffunc F(set) = c+(f.$1); func f[+]c -> Function means :Def37: dom it = dom f & for x being set st x in dom it holds it.x = c + f.x; existence proof ex F being Function st dom F = dom f & for x being set st x in dom f holds F.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let F,G be Function such that A1: dom F = dom f and A2: for x being set st x in dom F holds F.x = F(x) and A3: dom G = dom f and A4: for x being set st x in dom G holds G.x = F(x); thus dom F = dom G by A1,A3; let x; assume A5: x in dom F; hence F.x = F(x) by A2 .= G.x by A1,A3,A4,A5; end; end; definition let X; let Y be complex-functions-membered set; let f be PartFunc of X,Y; let c be complex number; redefine func f[+]c -> PartFunc of X, C_PFuncs(DOMS(Y)); coherence proof set h = f[+]c; A1: dom h = dom f by Def37; rng h c= C_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; A4: h.x = f.x + c by A2,Def37; then reconsider y as Function by A3; A5: rng y c= COMPLEX proof let b be set; thus thesis by A3,A4,XCMPLX_0:def 2; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 2; then y is PartFunc of DOMS(Y),COMPLEX by A6,A5,RELSET_1:4; hence thesis by Def8; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be real-functions-membered set; let f be PartFunc of X,Y; let c be real number; redefine func f[+]c -> PartFunc of X, R_PFuncs(DOMS(Y)); coherence proof set h = f[+]c; A1: dom h = dom f by Def37; rng h c= R_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x + c by A2,Def37; A5: rng y c= REAL proof let b be set; thus thesis by A3,A4,XREAL_0:def 1; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 2; then y is PartFunc of DOMS(Y),REAL by A6,A5,RELSET_1:4; hence thesis by Def12; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be rational-functions-membered set; let f be PartFunc of X,Y; let c be rational number; redefine func f[+]c -> PartFunc of X, Q_PFuncs(DOMS(Y)); coherence proof set h = f[+]c; A1: dom h = dom f by Def37; rng h c= Q_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x + c by A2,Def37; A5: rng y c= RAT proof let b be set; thus thesis by A3,A4,RAT_1:def 2; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 2; then y is PartFunc of DOMS(Y),RAT by A6,A5,RELSET_1:4; hence thesis by Def14; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be integer-functions-membered set; let f be PartFunc of X,Y; let c be integer number; redefine func f[+]c -> PartFunc of X, I_PFuncs(DOMS(Y)); coherence proof set h = f[+]c; A1: dom h = dom f by Def37; rng h c= I_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x + c by A2,Def37; A5: rng y c= INT proof let b be set; thus thesis by A3,A4,INT_1:def 2; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 2; then y is PartFunc of DOMS(Y),INT by A6,A5,RELSET_1:4; hence thesis by Def16; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be natural-functions-membered set; let f be PartFunc of X,Y; let c be Nat; redefine func f[+]c -> PartFunc of X, N_PFuncs(DOMS(Y)); coherence proof set h = f[+]c; A1: dom h = dom f by Def37; rng h c= N_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x + c by A2,Def37; A5: rng y c= NAT proof let b be set; thus thesis by A3,A4,ORDINAL1:def 12; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 2; then y is PartFunc of DOMS(Y),NAT by A6,A5,RELSET_1:4; hence thesis by Def18; end; hence thesis by A1,RELSET_1:4; end; end; theorem f [+] c1 [+] c2 = f [+] (c1+c2) proof set f1 = f[+]c1; A1: dom(f1[+]c2) = dom f1 by Def37; dom f1 = dom f by Def37; hence A2: dom(f1[+]c2) = dom(f[+](c1+c2)) by A1,Def37; let x; assume A3: x in dom(f1[+]c2); hence (f1[+]c2).x = f1.x + c2 by Def37 .= f.x + c1 + c2 by A1,A3,Def37 .= f.x + (c1 + c2) by Th12 .= (f[+](c1+c2)).x by A2,A3,Def37; end; theorem f <> {} & f is non-empty & f [+] c1 = f [+] c2 implies c1 = c2 proof assume that A1: f <> {} and A2: f is non-empty and A3: f[+]c1 = f[+]c2; consider x such that A4: x in dom f by A1,XBOOLE_0:def 1; f.x in rng f by A4,FUNCT_1:def 3; then A5: f.x <> {} by A2,RELAT_1:def 9; dom f = dom(f[+]c2) by Def37; then A6: (f[+]c2).x = f.x+c2 by A4,Def37; dom f = dom(f[+]c1) by Def37; then (f[+]c1).x = f.x+c1 by A4,Def37; hence c1 = c2 by A3,A5,A6,Th7; end; definition let Y be complex-functions-membered set; let f be Y-valued Function; let c be complex number; func f[-]c -> Function equals f [+] -c; coherence; end; theorem dom(f[-]c) = dom f by Def37; theorem x in dom(f[-]c) implies (f[-]c).x = f.x - c by Def37; definition let X; let Y be complex-functions-membered set; let f be PartFunc of X,Y; let c be complex number; redefine func f[-]c -> PartFunc of X, C_PFuncs(DOMS(Y)); coherence proof f[-]c = f [+] -c; hence thesis; end; end; definition let X; let Y be real-functions-membered set; let f be PartFunc of X,Y; let c be real number; redefine func f[-]c -> PartFunc of X, R_PFuncs(DOMS(Y)); coherence proof f[-]c = f [+] -c; hence thesis; end; end; definition let X; let Y be rational-functions-membered set; let f be PartFunc of X,Y; let c be rational number; redefine func f[-]c -> PartFunc of X, Q_PFuncs(DOMS(Y)); coherence proof f[-]c = f [+] -c; hence thesis; end; end; definition let X; let Y be integer-functions-membered set; let f be PartFunc of X,Y; let c be integer number; redefine func f[-]c -> PartFunc of X, I_PFuncs(DOMS(Y)); coherence proof f[-]c = f [+] -c; hence thesis; end; end; theorem f <> {} & f is non-empty & f [-] c1 = f [-] c2 implies c1 = c2 proof assume that A1: f <> {} and A2: f is non-empty and A3: f[-]c1 = f[-]c2; consider x such that A4: x in dom f by A1,XBOOLE_0:def 1; f.x in rng f by A4,FUNCT_1:def 3; then A5: f.x <> {} by A2,RELAT_1:def 9; dom f = dom(f[-]c2) by Def37; then A6: (f[-]c2).x = f.x-c2 by A4,Def37; dom f = dom(f[-]c1) by Def37; then (f[-]c1).x = f.x-c1 by A4,Def37; hence c1 = c2 by A3,A5,A6,Th8; end; theorem f [+] c1 [-] c2 = f [+] (c1-c2) proof set f1 = f[+]c1; A1: dom(f1[-]c2) = dom f1 by Def37; dom f1 = dom f by Def37; hence A2: dom(f1[-]c2) = dom(f[+](c1-c2)) by A1,Def37; let x; assume A3: x in dom(f1[-]c2); hence (f1[-]c2).x = f1.x - c2 by Def37 .= f.x + c1 - c2 by A1,A3,Def37 .= f.x + (c1 - c2) by Th12 .= (f[+](c1-c2)).x by A2,A3,Def37; end; theorem f [-] c1 [+] c2 = f [-] (c1-c2) proof set f1 = f[-]c1; A1: dom(f1[+]c2) = dom f1 by Def37; dom f1 = dom f by Def37; hence A2: dom(f1[+]c2) = dom(f[-](c1-c2)) by A1,Def37; let x; assume A3: x in dom(f1[+]c2); hence (f1[+]c2).x = f1.x + c2 by Def37 .= f.x - c1 + c2 by A1,A3,Def37 .= f.x - (c1 - c2) by Th14 .= (f[-](c1-c2)).x by A2,A3,Def37; end; theorem f [-] c1 [-] c2 = f [-] (c1+c2) proof set f1 = f[-]c1; A1: dom(f1[-]c2) = dom f1 by Def37; dom f1 = dom f by Def37; hence A2: dom(f1[-]c2) = dom(f[-](c1+c2)) by A1,Def37; let x; assume A3: x in dom(f1[-]c2); hence (f1[-]c2).x = f1.x - c2 by Def37 .= f.x - c1 - c2 by A1,A3,Def37 .= f.x - (c1 + c2) by Th15 .= (f[-](c1+c2)).x by A2,A3,Def37; end; definition let Y be complex-functions-membered set; let f be Y-valued Function; let c be complex number; deffunc F(set) = c(#)(f.$1); func f[#]c -> Function means :Def39: dom it = dom f & for x being set st x in dom it holds it.x = c (#) (f.x); existence proof ex F being Function st dom F = dom f & for x being set st x in dom f holds F.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let F,G be Function such that A1: dom F = dom f and A2: for x being set st x in dom F holds F.x = F(x) and A3: dom G = dom f and A4: for x being set st x in dom G holds G.x = F(x); thus dom F = dom G by A1,A3; let x; assume A5: x in dom F; hence F.x = F(x) by A2 .= G.x by A1,A3,A4,A5; end; end; definition let X; let Y be complex-functions-membered set; let f be PartFunc of X,Y; let c be complex number; redefine func f[#]c -> PartFunc of X, C_PFuncs(DOMS(Y)); coherence proof set h = f[#]c; A1: dom h = dom f by Def39; rng h c= C_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; A4: h.x = c (#) f.x by A2,Def39; then reconsider y as Function by A3; A5: rng y c= COMPLEX proof let b be set; thus thesis by A3,A4,XCMPLX_0:def 2; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 5; then y is PartFunc of DOMS(Y),COMPLEX by A6,A5,RELSET_1:4; hence thesis by Def8; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be real-functions-membered set; let f be PartFunc of X,Y; let c be real number; redefine func f[#]c -> PartFunc of X, R_PFuncs(DOMS(Y)); coherence proof set h = f[#]c; A1: dom h = dom f by Def39; rng h c= R_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = c (#) f.x by A2,Def39; A5: rng y c= REAL proof let b be set; thus thesis by A3,A4,XREAL_0:def 1; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 5; then y is PartFunc of DOMS(Y),REAL by A6,A5,RELSET_1:4; hence thesis by Def12; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be rational-functions-membered set; let f be PartFunc of X,Y; let c be rational number; redefine func f[#]c -> PartFunc of X, Q_PFuncs(DOMS(Y)); coherence proof set h = f[#]c; A1: dom h = dom f by Def39; rng h c= Q_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = c (#) f.x by A2,Def39; A5: rng y c= RAT proof let b be set; thus thesis by A3,A4,RAT_1:def 2; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 5; then y is PartFunc of DOMS(Y),RAT by A6,A5,RELSET_1:4; hence thesis by Def14; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be integer-functions-membered set; let f be PartFunc of X,Y; let c be integer number; redefine func f[#]c -> PartFunc of X, I_PFuncs(DOMS(Y)); coherence proof set h = f[#]c; A1: dom h = dom f by Def39; rng h c= I_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = c (#) f.x by A2,Def39; A5: rng y c= INT proof let b be set; thus thesis by A3,A4,INT_1:def 2; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 5; then y is PartFunc of DOMS(Y),INT by A6,A5,RELSET_1:4; hence thesis by Def16; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be natural-functions-membered set; let f be PartFunc of X,Y; let c be Nat; redefine func f[#]c -> PartFunc of X, N_PFuncs(DOMS(Y)); coherence proof set h = f[#]c; A1: dom h = dom f by Def39; rng h c= N_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = c (#) f.x by A2,Def39; A5: rng y c= NAT proof let b be set; thus thesis by A3,A4,ORDINAL1:def 12; end; f.x in Y by A1,A2,PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 5; then y is PartFunc of DOMS(Y),NAT by A6,A5,RELSET_1:4; hence thesis by Def18; end; hence thesis by A1,RELSET_1:4; end; end; theorem f [#] c1 [#] c2 = f [#] (c1*c2) proof set f1 = f[#]c1; A1: dom(f1[#]c2) = dom f1 by Def39; dom f1 = dom f by Def39; hence A2: dom(f1[#]c2) = dom(f[#](c1*c2)) by A1,Def39; let x; assume A3: x in dom(f1[#]c2); hence (f1[#]c2).x = f1.x (#) c2 by Def39 .= f.x (#) c1 (#) c2 by A1,A3,Def39 .= f.x (#) (c1 * c2) by Th16 .= (f[#](c1*c2)).x by A2,A3,Def39; end; theorem f <> {} & f is non-empty & (for x st x in dom f holds f.x is non-empty ) & f [#] c1 = f [#] c2 implies c1 = c2 proof assume that A1: f <> {} and A2: f is non-empty and A3: for x st x in dom f holds f.x is non-empty and A4: f[#]c1 = f[#]c2; consider x such that A5: x in dom f by A1,XBOOLE_0:def 1; dom f = dom(f[#]c2) by Def39; then A6: (f[#]c2).x = f.x(#)c2 by A5,Def39; dom f = dom(f[#]c1) by Def39; then A7: (f[#]c1).x = f.x(#)c1 by A5,Def39; f.x in rng f by A5,FUNCT_1:def 3; then A8: f.x <> {} by A2,RELAT_1:def 9; f.x is non-empty by A3,A5; hence c1 = c2 by A4,A8,A7,A6,Th9; end; definition let Y be complex-functions-membered set; let f be Y-valued Function; let c be complex number; func f[/]c -> Function equals f [#] (c"); coherence; end; theorem dom(f[/]c) = dom f by Def39; theorem x in dom(f[/]c) implies (f[/]c).x = c" (#) f.x by Def39; definition let X; let Y be complex-functions-membered set; let f be PartFunc of X,Y; let c be complex number; redefine func f[/]c -> PartFunc of X, C_PFuncs(DOMS(Y)); coherence proof f[/]c = f [#] (c"); hence thesis; end; end; definition let X; let Y be real-functions-membered set; let f be PartFunc of X,Y; let c be real number; redefine func f[/]c -> PartFunc of X, R_PFuncs(DOMS(Y)); coherence proof f[/]c = f [#] (c"); hence thesis; end; end; definition let X; let Y be rational-functions-membered set; let f be PartFunc of X,Y; let c be rational number; redefine func f[/]c -> PartFunc of X, Q_PFuncs(DOMS(Y)); coherence proof f[/]c = f [#] (c"); hence thesis; end; end; theorem f [/] c1 [/] c2 = f [/] (c1*c2) proof set f1 = f[/]c1; A1: dom(f1[/]c2) = dom f1 by Def39; dom f1 = dom f by Def39; hence A2: dom(f1[/]c2) = dom(f[/](c1*c2)) by A1,Def39; let x; assume A3: x in dom(f1[/]c2); hence (f1[/]c2).x = f1.x (#) c2" by Def39 .= f.x (#) c1" (#) c2" by A1,A3,Def39 .= f.x (#) (c1" * c2") by Th16 .= f.x (#) (c1*c2)" by XCMPLX_1:204 .= (f[/](c1*c2)).x by A2,A3,Def39; end; theorem f <> {} & f is non-empty & (for x st x in dom f holds f.x is non-empty ) & f [/] c1 = f [/] c2 implies c1 = c2 proof assume that A1: f <> {} and A2: f is non-empty and A3: for x st x in dom f holds f.x is non-empty and A4: f[/]c1 = f[/]c2; consider x such that A5: x in dom f by A1,XBOOLE_0:def 1; dom f = dom(f[/]c2) by Def39; then A6: (f[/]c2).x = f.x(/)c2 by A5,Def39; dom f = dom(f[/]c1) by Def39; then A7: (f[/]c1).x = f.x(/)c1 by A5,Def39; f.x in rng f by A5,FUNCT_1:def 3; then A8: f.x <> {} by A2,RELAT_1:def 9; f.x is non-empty by A3,A5; hence c1 = c2 by A4,A8,A7,A6,Th33; end; definition let Y be complex-functions-membered set; let f be Y-valued Function; let g be complex-valued Function; deffunc F(set) = f.$1+g.$1; func f<+>g -> Function means :Def41: dom it = dom f /\ dom g & for x being set st x in dom it holds it.x = f.x + g.x; existence proof ex F being Function st dom F = dom f /\ dom g & for x being set st x in dom f /\ dom g holds F.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let F,G be Function such that A1: dom F = dom f /\ dom g and A2: for x being set st x in dom F holds F.x = F(x) and A3: dom G = dom f /\ dom g and A4: for x being set st x in dom G holds G.x = F(x); thus dom F = dom G by A1,A3; let x; assume A5: x in dom F; hence F.x = F(x) by A2 .= G.x by A1,A3,A4,A5; end; end; definition let X; let Y be complex-functions-membered set; let f be PartFunc of X,Y; let g be complex-valued Function; redefine func f<+>g -> PartFunc of X /\ dom g, C_PFuncs(DOMS(Y)); coherence proof set h = f<+>g; A1: dom h = dom f /\ dom g by Def41; rng h c= C_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; A4: h.x = f.x + g.x by A2,Def41; then reconsider y as Function by A3; A5: rng y c= COMPLEX proof let b be set; thus thesis by A3,A4,XCMPLX_0:def 2; end; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 2; then y is PartFunc of DOMS(Y),COMPLEX by A6,A5,RELSET_1:4; hence thesis by Def8; end; hence thesis by A1,RELSET_1:4,XBOOLE_1:27; end; end; definition let X; let Y be real-functions-membered set; let f be PartFunc of X,Y; let g be real-valued Function; redefine func f<+>g -> PartFunc of X /\ dom g, R_PFuncs(DOMS(Y)); coherence proof set h = f<+>g; A1: dom h = dom f /\ dom g by Def41; rng h c= R_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x + g.x by A2,Def41; A5: rng y c= REAL proof let b be set; thus thesis by A3,A4,XREAL_0:def 1; end; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 2; then y is PartFunc of DOMS(Y),REAL by A6,A5,RELSET_1:4; hence thesis by Def12; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be rational-functions-membered set; let f be PartFunc of X,Y; let g be RAT-valued Function; redefine func f<+>g -> PartFunc of X /\ dom g, Q_PFuncs(DOMS(Y)); coherence proof set h = f<+>g; A1: dom h = dom f /\ dom g by Def41; rng h c= Q_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x + g.x by A2,Def41; A5: rng y c= RAT proof let b be set; thus thesis by A3,A4,RAT_1:def 2; end; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 2; then y is PartFunc of DOMS(Y),RAT by A6,A5,RELSET_1:4; hence thesis by Def14; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be integer-functions-membered set; let f be PartFunc of X,Y; let g be INT-valued Function; redefine func f<+>g -> PartFunc of X /\ dom g, I_PFuncs(DOMS(Y)); coherence proof set h = f<+>g; A1: dom h = dom f /\ dom g by Def41; rng h c= I_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x + g.x by A2,Def41; A5: rng y c= INT proof let b be set; thus thesis by A3,A4,INT_1:def 2; end; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 2; then y is PartFunc of DOMS(Y),INT by A6,A5,RELSET_1:4; hence thesis by Def16; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be natural-functions-membered set; let f be PartFunc of X,Y; let g be natural-valued Function; redefine func f<+>g -> PartFunc of X /\ dom g, N_PFuncs(DOMS(Y)); coherence proof set h = f<+>g; A1: dom h = dom f /\ dom g by Def41; rng h c= N_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x + g.x by A2,Def41; A5: rng y c= NAT proof let b be set; thus thesis by A3,A4,ORDINAL1:def 12; end; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 2; then y is PartFunc of DOMS(Y),NAT by A6,A5,RELSET_1:4; hence thesis by Def18; end; hence thesis by A1,RELSET_1:4; end; end; theorem f <+> g <+> h = f <+> (g+h) proof set f1 = f<+>g; A1: dom(g+h) = dom g /\ dom h by VALUED_1:def 1; A2: dom(f1<+>h) = dom f1 /\ dom h by Def41; dom f1 = dom f /\ dom g & dom(f<+>(g+h)) = dom f /\ dom(g+h) by Def41; hence A3: dom(f1<+>h) = dom(f<+>(g+h)) by A2,A1,XBOOLE_1:16; let x; assume A4: x in dom(f1<+>h); then A5: x in dom f1 by A2,XBOOLE_0:def 4; A6: x in dom(g+h) by A3,A4,XBOOLE_0:def 4; thus (f1<+>h).x = f1.x + h.x by A4,Def41 .= f.x + g.x + h.x by A5,Def41 .= f.x + (g.x + h.x) by Th12 .= f.x + ((g+h).x) by A6,VALUED_1:def 1 .= (f<+>(g+h)).x by A3,A4,Def41; end; theorem <->(f<+>g) = (<->f) <+> -g proof set f1 = f<+>g, f2 = <->f; A1: dom <->f1 = dom f1 by Def33; A2: dom f1 = dom f /\ dom g & dom f2 = dom f by Def33,Def41; dom -g = dom g by VALUED_1:8; hence A3: dom <->f1 = dom(f2<+>-g) by A1,A2,Def41; let x; assume A4: x in dom <->f1; then A5: x in dom f2 by A1,A2,XBOOLE_0:def 4; thus (<->f1).x = -f1.x by A4,Def33 .= -(f.x+g.x) by A1,A4,Def41 .= -f.x-g.x by Th10 .= -f.x+(-g).x by VALUED_1:8 .= f2.x+(-g).x by A5,Def33 .= (f2<+>-g).x by A3,A4,Def41; end; definition let Y be complex-functions-membered set; let f be Y-valued Function; let g be complex-valued Function; func f<->g -> Function equals f <+> -g; coherence; end; theorem Th61: dom(f<->g) = dom f /\ dom g proof thus dom(f<->g) = dom f /\ dom -g by Def41 .= dom f /\ dom g by VALUED_1:8; end; theorem Th62: x in dom(f<->g) implies (f<->g).x = f.x - g.x proof assume x in dom(f<->g); hence (f<->g).x = f.x + (-g).x by Def41 .= f.x - g.x by VALUED_1:8; end; definition let X; let Y be complex-functions-membered set; let f be PartFunc of X,Y; let g be complex-valued Function; redefine func f<->g -> PartFunc of X /\ dom g, C_PFuncs(DOMS(Y)); coherence proof set h = f<->g; A1: dom h = dom f /\ dom g by Th61; rng h c= C_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; A4: h.x = f.x - g.x by A2,Th62; then reconsider y as Function by A3; A5: rng y c= COMPLEX proof let b be set; thus thesis by A3,A4,XCMPLX_0:def 2; end; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; h.x = f.x - g.x by A2,Th62; then dom y = dom(f.x) by A3,VALUED_1:def 2; then y is PartFunc of DOMS(Y),COMPLEX by A6,A5,RELSET_1:4; hence thesis by Def8; end; hence thesis by A1,RELSET_1:4,XBOOLE_1:27; end; end; definition let X; let Y be real-functions-membered set; let f be PartFunc of X,Y; let g be real-valued Function; redefine func f<->g -> PartFunc of X /\ dom g, R_PFuncs(DOMS(Y)); coherence proof set h = f<->g; A1: dom h = dom f /\ dom g by Th61; rng h c= R_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x - g.x by A2,Th62; A5: rng y c= REAL proof let b be set; thus thesis by A3,A4,XREAL_0:def 1; end; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 2; then y is PartFunc of DOMS(Y),REAL by A6,A5,RELSET_1:4; hence thesis by Def12; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be rational-functions-membered set; let f be PartFunc of X,Y; let g be RAT-valued Function; redefine func f<->g -> PartFunc of X /\ dom g, Q_PFuncs(DOMS(Y)); coherence proof set h = f<->g; A1: dom h = dom f /\ dom g by Th61; rng h c= Q_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x - g.x by A2,Th62; A5: rng y c= RAT proof let b be set; thus thesis by A3,A4,RAT_1:def 2; end; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 2; then y is PartFunc of DOMS(Y),RAT by A6,A5,RELSET_1:4; hence thesis by Def14; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be integer-functions-membered set; let f be PartFunc of X,Y; let g be INT-valued Function; redefine func f<->g -> PartFunc of X /\ dom g, I_PFuncs(DOMS(Y)); coherence proof set h = f<->g; A1: dom h = dom f /\ dom g by Th61; rng h c= I_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x - g.x by A2,Th62; A5: rng y c= INT proof let b be set; thus thesis by A3,A4,INT_1:def 2; end; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 2; then y is PartFunc of DOMS(Y),INT by A6,A5,RELSET_1:4; hence thesis by Def16; end; hence thesis by A1,RELSET_1:4; end; end; theorem f <-> -g = f <+> g; theorem <->(f<->g) = (<->f) <+> g proof set f1 = f<->g, f2 = <->f; A1: dom <->f1 = dom f1 by Def33; A2: dom f1 = dom f /\ dom g & dom f2 = dom f by Def33,Th61; hence A3: dom <->f1 = dom(f2<+>g) by A1,Def41; let x; assume A4: x in dom <->f1; then A5: x in dom f2 by A1,A2,XBOOLE_0:def 4; thus (<->f1).x = -f1.x by A4,Def33 .= -(f.x-g.x) by A1,A4,Th62 .= -f.x+g.x by Th11 .= f2.x+g.x by A5,Def33 .= (f2<+>g).x by A3,A4,Def41; end; theorem f <+> g <-> h = f <+> (g-h) proof set f1 = f<+>g; A1: dom(g-h) = dom g /\ dom h by VALUED_1:12; A2: dom(f1<->h) = dom f1 /\ dom h by Th61; dom f1 = dom f /\ dom g & dom(f<+>(g-h)) = dom f /\ dom(g-h) by Def41; hence A3: dom(f1<->h) = dom(f<+>(g-h)) by A2,A1,XBOOLE_1:16; let x; assume A4: x in dom(f1<->h); then A5: x in dom f1 by A2,XBOOLE_0:def 4; A6: x in dom(g-h) by A3,A4,XBOOLE_0:def 4; thus (f1<->h).x = f1.x - h.x by A4,Th62 .= f.x + g.x - h.x by A5,Def41 .= f.x + (g.x - h.x) by Th13 .= f.x + ((g-h).x) by A6,VALUED_1:13 .= (f<+>(g-h)).x by A3,A4,Def41; end; theorem f <-> g <+> h = f <-> (g-h) proof set f1 = f<->g; A1: dom(g-h) = dom g /\ dom h by VALUED_1:12; A2: dom(f1<+>h) = dom f1 /\ dom h by Def41; dom f1 = dom f /\ dom g & dom(f<->(g-h)) = dom f /\ dom(g-h) by Th61; hence A3: dom(f1<+>h) = dom(f<->(g-h)) by A2,A1,XBOOLE_1:16; let x; assume A4: x in dom(f1<+>h); then A5: x in dom f1 by A2,XBOOLE_0:def 4; A6: x in dom(g-h) by A3,A4,XBOOLE_0:def 4; thus (f1<+>h).x = f1.x + h.x by A4,Def41 .= f.x - g.x + h.x by A5,Th62 .= f.x - (g.x - h.x) by Th14 .= f.x - ((g-h).x) by A6,VALUED_1:13 .= (f<->(g-h)).x by A3,A4,Th62; end; theorem f <-> g <-> h = f <-> (g+h) proof set f1 = f<->g; A1: dom(g+h) = dom g /\ dom h by VALUED_1:def 1; A2: dom(f1<->h) = dom f1 /\ dom h by Th61; dom f1 = dom f /\ dom g & dom(f<->(g+h)) = dom f /\ dom(g+h) by Th61; hence A3: dom(f1<->h) = dom(f<->(g+h)) by A2,A1,XBOOLE_1:16; let x; assume A4: x in dom(f1<->h); then A5: x in dom f1 by A2,XBOOLE_0:def 4; A6: x in dom(g+h) by A3,A4,XBOOLE_0:def 4; thus (f1<->h).x = f1.x - h.x by A4,Th62 .= f.x - g.x - h.x by A5,Th62 .= f.x - (g.x + h.x) by Th15 .= f.x - ((g+h).x) by A6,VALUED_1:def 1 .= (f<->(g+h)).x by A3,A4,Th62; end; definition let Y be complex-functions-membered set; let f be Y-valued Function; let g be complex-valued Function; deffunc F(set) = f.$1(#)g.$1; func f<#>g -> Function means :Def43: dom it = dom f /\ dom g & for x being set st x in dom it holds it.x = f.x (#) g.x; existence proof ex F being Function st dom F = dom f /\ dom g & for x being set st x in dom f /\ dom g holds F.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let F,G be Function such that A1: dom F = dom f /\ dom g and A2: for x being set st x in dom F holds F.x = F(x) and A3: dom G = dom f /\ dom g and A4: for x being set st x in dom G holds G.x = F(x); thus dom F = dom G by A1,A3; let x; assume A5: x in dom F; hence F.x = F(x) by A2 .= G.x by A1,A3,A4,A5; end; end; definition let X; let Y be complex-functions-membered set; let f be PartFunc of X,Y; let g be complex-valued Function; redefine func f<#>g -> PartFunc of X /\ dom g, C_PFuncs(DOMS(Y)); coherence proof set h = f<#>g; A1: dom h = dom f /\ dom g by Def43; rng h c= C_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; A4: h.x = f.x (#) g.x by A2,Def43; then reconsider y as Function by A3; A5: rng y c= COMPLEX proof let b be set; thus thesis by A3,A4,XCMPLX_0:def 2; end; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 5; then y is PartFunc of DOMS(Y),COMPLEX by A6,A5,RELSET_1:4; hence thesis by Def8; end; hence thesis by A1,RELSET_1:4,XBOOLE_1:27; end; end; definition let X; let Y be real-functions-membered set; let f be PartFunc of X,Y; let g be real-valued Function; redefine func f<#>g -> PartFunc of X /\ dom g, R_PFuncs(DOMS(Y)); coherence proof set h = f<#>g; A1: dom h = dom f /\ dom g by Def43; rng h c= R_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x (#) g.x by A2,Def43; A5: rng y c= REAL proof let b be set; thus thesis by A3,A4,XREAL_0:def 1; end; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 5; then y is PartFunc of DOMS(Y),REAL by A6,A5,RELSET_1:4; hence thesis by Def12; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be rational-functions-membered set; let f be PartFunc of X,Y; let g be RAT-valued Function; redefine func f<#>g -> PartFunc of X /\ dom g, Q_PFuncs(DOMS(Y)); coherence proof set h = f<#>g; A1: dom h = dom f /\ dom g by Def43; rng h c= Q_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x (#) g.x by A2,Def43; A5: rng y c= RAT proof let b be set; thus thesis by A3,A4,RAT_1:def 2; end; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 5; then y is PartFunc of DOMS(Y),RAT by A6,A5,RELSET_1:4; hence thesis by Def14; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be integer-functions-membered set; let f be PartFunc of X,Y; let g be INT-valued Function; redefine func f<#>g -> PartFunc of X /\ dom g, I_PFuncs(DOMS(Y)); coherence proof set h = f<#>g; A1: dom h = dom f /\ dom g by Def43; rng h c= I_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x (#) g.x by A2,Def43; A5: rng y c= INT proof let b be set; thus thesis by A3,A4,INT_1:def 2; end; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 5; then y is PartFunc of DOMS(Y),INT by A6,A5,RELSET_1:4; hence thesis by Def16; end; hence thesis by A1,RELSET_1:4; end; end; definition let X; let Y be natural-functions-membered set; let f be PartFunc of X,Y; let g be natural-valued Function; redefine func f<#>g -> PartFunc of X /\ dom g, N_PFuncs(DOMS(Y)); coherence proof set h = f<#>g; A1: dom h = dom f /\ dom g by Def43; rng h c= N_PFuncs(DOMS(Y)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x (#) g.x by A2,Def43; A5: rng y c= NAT proof let b be set; thus thesis by A3,A4,ORDINAL1:def 12; end; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y: not contradiction}; then A6: dom(f.x) c= DOMS(Y) by ZFMISC_1:74; dom y = dom(f.x) by A3,A4,VALUED_1:def 5; then y is PartFunc of DOMS(Y),NAT by A6,A5,RELSET_1:4; hence thesis by Def18; end; hence thesis by A1,RELSET_1:4; end; end; theorem f <#> -g = (<->f) <#> g proof set f1 = <->f; A1: dom f1 = dom f & dom(f<#>-g) = dom f /\ dom -g by Def33,Def43; dom(f1<#>g) = dom f1 /\ dom g by Def43; hence A2: dom(f<#>-g) = dom(f1<#>g) by A1,VALUED_1:8; let x; assume A3: x in dom(f<#>-g); then A4: x in dom f1 by A1,XBOOLE_0:def 4; thus (f<#>-g).x = f.x (#) (-g).x by A3,Def43 .= f.x(#)-g.x by VALUED_1:8 .= (-f.x)(#)g.x by Th22 .= f1.x(#)g.x by A4,Def33 .= (f1<#>g).x by A2,A3,Def43; end; theorem f <#> -g = <-> (f <#> g) proof set f1 = f<#>g; A1: dom(<->f1) = dom f1 by Def33; dom f1 = dom f /\ dom g & dom(f<#>-g) = dom f /\ dom -g by Def43; hence A2: dom(f<#>-g) = dom(<->f1) by A1,VALUED_1:8; let x; assume A3: x in dom(f<#>-g); hence (f<#>-g).x = f.x (#) (-g).x by Def43 .= f.x(#)-g.x by VALUED_1:8 .= -(f.x(#)g.x) by Th24 .= -f1.x by A1,A2,A3,Def43 .= (<->f1).x by A2,A3,Def33; end; theorem f <#> g <#> h = f <#> (g(#)h) proof set f1 = f<#>g; A1: dom(g(#)h) = dom g /\ dom h by VALUED_1:def 4; A2: dom(f1<#>h) = dom f1 /\ dom h by Def43; dom f1 = dom f /\ dom g & dom(f<#>(g(#)h)) = dom f /\ dom(g(#)h) by Def43; hence A3: dom(f1<#>h) = dom(f<#>(g(#)h)) by A2,A1,XBOOLE_1:16; let x; assume A4: x in dom(f1<#>h); then A5: x in dom f1 by A2,XBOOLE_0:def 4; A6: x in dom(g(#)h) by A3,A4,XBOOLE_0:def 4; thus (f1<#>h).x = f1.x (#) h.x by A4,Def43 .= f.x (#) g.x (#) h.x by A5,Def43 .= f.x (#) (g.x * h.x) by Th16 .= f.x (#) ((g(#)h).x) by A6,VALUED_1:def 4 .= (f<#>(g(#)h)).x by A3,A4,Def43; end; definition let Y be complex-functions-membered set; let f be Y-valued Function; let g be complex-valued Function; func fg -> Function equals f <#> (g"); coherence; end; theorem Th71: dom(fg) = dom f /\ dom g proof thus dom(fg) = dom f /\ dom(g") by Def43 .= dom f /\ dom g by VALUED_1:def 7; end; theorem Th72: x in dom(fg) implies (fg).x = f.x (/) g.x proof assume x in dom(fg); hence (fg).x = f.x (#) (g").x by Def43 .= f.x (/) g.x by VALUED_1:10; end; definition let X; let Y be complex-functions-membered set; let f be PartFunc of X,Y; let g be complex-valued Function; redefine func fg -> PartFunc of X /\ dom g, C_PFuncs(DOMS(Y)); coherence proof fg = f <#> (g"); hence thesis by VALUED_1:def 7; end; end; definition let X; let Y be real-functions-membered set; let f be PartFunc of X,Y; let g be real-valued Function; redefine func fg -> PartFunc of X /\ dom g, R_PFuncs(DOMS(Y)); coherence proof fg = f <#> (g"); hence thesis by VALUED_1:def 7; end; end; definition let X; let Y be rational-functions-membered set; let f be PartFunc of X,Y; let g be RAT-valued Function; redefine func fg -> PartFunc of X /\ dom g, Q_PFuncs(DOMS(Y)); coherence proof fg = f <#> (g"); hence thesis by VALUED_1:def 7; end; end; theorem f <#> g h = f <#> (g/"h) proof set f1 = f<#>g; A1: dom(g/"h) = dom g /\ dom h by VALUED_1:16; A2: dom(f1h) = dom f1 /\ dom h by Th71; dom f1 = dom f /\ dom g & dom(f<#>(g/"h)) = dom f /\ dom(g/"h) by Def43; hence A3: dom(f1h) = dom(f<#>(g/"h)) by A2,A1,XBOOLE_1:16; let x; assume A4: x in dom(f1h); then A5: x in dom f1 by A2,XBOOLE_0:def 4; thus (f1h).x = f1.x (/) h.x by A4,Th72 .= f.x (#) g.x (/) h.x by A5,Def43 .= f.x (#) (g.x / h.x) by Th16 .= f.x (#) ((g/"h).x) by VALUED_1:17 .= (f<#>(g/"h)).x by A3,A4,Def43; end; definition let Y1, Y2 be complex-functions-membered set; let f be Y1-valued Function; let g be Y2-valued Function; deffunc F(set) = f.$1+g.$1; func f<++>g -> Function means :Def45: dom it = dom f /\ dom g & for x being set st x in dom it holds it.x = f.x + g.x; existence proof ex F being Function st dom F = dom f /\ dom g & for x being set st x in dom f /\ dom g holds F.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let F,G be Function such that A1: dom F = dom f /\ dom g and A2: for x being set st x in dom F holds F.x = F(x) and A3: dom G = dom f /\ dom g and A4: for x being set st x in dom G holds G.x = F(x); thus dom F = dom G by A1,A3; let x; assume A5: x in dom F; hence F.x = F(x) by A2 .= G.x by A1,A3,A4,A5; end; end; definition let X1, X2 be set; let Y1, Y2 be complex-functions-membered set; let f be PartFunc of X1,Y1; let g be PartFunc of X2,Y2; redefine func f<++>g -> PartFunc of X1 /\ X2, C_PFuncs(DOMS(Y1)/\DOMS(Y2)); coherence proof set h = f<++>g; A1: dom h = dom f /\ dom g by Def45; rng h c= C_PFuncs(DOMS(Y1)/\DOMS(Y2)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; A4: h.x = f.x + g.x by A2,Def45; then reconsider y as Function by A3; A5: rng y c= COMPLEX proof let b be set; thus thesis by A3,A4,XCMPLX_0:def 2; end; x in dom g by A1,A2,XBOOLE_0:def 4; then g.x in Y2 by PARTFUN1:4; then dom(g.x) in {dom m where m is Element of Y2: not contradiction}; then A6: dom(g.x) c= DOMS(Y2) by ZFMISC_1:74; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y1 by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y1: not contradiction}; then A7: dom(f.x) c= DOMS(Y1) by ZFMISC_1:74; dom y = dom(f.x) /\ dom(g.x) by A3,A4,VALUED_1:def 1; then y is PartFunc of DOMS(Y1)/\DOMS(Y2),COMPLEX by A7,A6,A5,RELSET_1:4 ,XBOOLE_1:27; hence thesis by Def8; end; hence thesis by A1,RELSET_1:4,XBOOLE_1:27; end; end; definition let X1, X2 be set; let Y1, Y2 be real-functions-membered set; let f be PartFunc of X1,Y1; let g be PartFunc of X2,Y2; redefine func f<++>g -> PartFunc of X1 /\ X2, R_PFuncs(DOMS(Y1)/\DOMS(Y2)); coherence proof set h = f<++>g; A1: dom h = dom f /\ dom g by Def45; rng h c= R_PFuncs(DOMS(Y1)/\DOMS(Y2)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x + g.x by A2,Def45; A5: rng y c= REAL proof let b be set; thus thesis by A3,A4,XREAL_0:def 1; end; x in dom g by A1,A2,XBOOLE_0:def 4; then g.x in Y2 by PARTFUN1:4; then dom(g.x) in {dom m where m is Element of Y2: not contradiction}; then A6: dom(g.x) c= DOMS(Y2) by ZFMISC_1:74; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y1 by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y1: not contradiction}; then A7: dom(f.x) c= DOMS(Y1) by ZFMISC_1:74; dom y = dom(f.x) /\ dom(g.x) by A3,A4,VALUED_1:def 1; then y is PartFunc of DOMS(Y1)/\DOMS(Y2),REAL by A7,A6,A5,RELSET_1:4 ,XBOOLE_1:27; hence thesis by Def12; end; hence thesis by A1,RELSET_1:4; end; end; definition let X1, X2 be set; let Y1, Y2 be rational-functions-membered set; let f be PartFunc of X1,Y1; let g be PartFunc of X2,Y2; redefine func f<++>g -> PartFunc of X1 /\ X2, Q_PFuncs(DOMS(Y1)/\DOMS(Y2)); coherence proof set h = f<++>g; A1: dom h = dom f /\ dom g by Def45; rng h c= Q_PFuncs(DOMS(Y1)/\DOMS(Y2)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x + g.x by A2,Def45; A5: rng y c= RAT proof let b be set; thus thesis by A3,A4,RAT_1:def 2; end; x in dom g by A1,A2,XBOOLE_0:def 4; then g.x in Y2 by PARTFUN1:4; then dom(g.x) in {dom m where m is Element of Y2: not contradiction}; then A6: dom(g.x) c= DOMS(Y2) by ZFMISC_1:74; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y1 by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y1: not contradiction}; then A7: dom(f.x) c= DOMS(Y1) by ZFMISC_1:74; dom y = dom(f.x) /\ dom(g.x) by A3,A4,VALUED_1:def 1; then y is PartFunc of DOMS(Y1)/\DOMS(Y2),RAT by A7,A6,A5,RELSET_1:4 ,XBOOLE_1:27; hence thesis by Def14; end; hence thesis by A1,RELSET_1:4; end; end; definition let X1, X2 be set; let Y1, Y2 be integer-functions-membered set; let f be PartFunc of X1,Y1; let g be PartFunc of X2,Y2; redefine func f<++>g -> PartFunc of X1 /\ X2, I_PFuncs(DOMS(Y1)/\DOMS(Y2)); coherence proof set h = f<++>g; A1: dom h = dom f /\ dom g by Def45; rng h c= I_PFuncs(DOMS(Y1)/\DOMS(Y2)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x + g.x by A2,Def45; A5: rng y c= INT proof let b be set; thus thesis by A3,A4,INT_1:def 2; end; x in dom g by A1,A2,XBOOLE_0:def 4; then g.x in Y2 by PARTFUN1:4; then dom(g.x) in {dom m where m is Element of Y2: not contradiction}; then A6: dom(g.x) c= DOMS(Y2) by ZFMISC_1:74; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y1 by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y1: not contradiction}; then A7: dom(f.x) c= DOMS(Y1) by ZFMISC_1:74; dom y = dom(f.x) /\ dom(g.x) by A3,A4,VALUED_1:def 1; then y is PartFunc of DOMS(Y1)/\DOMS(Y2),INT by A7,A6,A5,RELSET_1:4 ,XBOOLE_1:27; hence thesis by Def16; end; hence thesis by A1,RELSET_1:4; end; end; definition let X1, X2 be set; let Y1, Y2 be natural-functions-membered set; let f be PartFunc of X1,Y1; let g be PartFunc of X2,Y2; redefine func f<++>g -> PartFunc of X1 /\ X2, N_PFuncs(DOMS(Y1)/\DOMS(Y2)); coherence proof set h = f<++>g; A1: dom h = dom f /\ dom g by Def45; rng h c= N_PFuncs(DOMS(Y1)/\DOMS(Y2)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x + g.x by A2,Def45; A5: rng y c= NAT proof let b be set; thus thesis by A3,A4,ORDINAL1:def 12; end; x in dom g by A1,A2,XBOOLE_0:def 4; then g.x in Y2 by PARTFUN1:4; then dom(g.x) in {dom m where m is Element of Y2: not contradiction}; then A6: dom(g.x) c= DOMS(Y2) by ZFMISC_1:74; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y1 by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y1: not contradiction}; then A7: dom(f.x) c= DOMS(Y1) by ZFMISC_1:74; dom y = dom(f.x) /\ dom(g.x) by A3,A4,VALUED_1:def 1; then y is PartFunc of DOMS(Y1)/\DOMS(Y2),NAT by A7,A6,A5,RELSET_1:4 ,XBOOLE_1:27; hence thesis by Def18; end; hence thesis by A1,RELSET_1:4; end; end; theorem f1 <++> f2 = f2 <++> f1 proof dom(f1<++>f2) = dom f1 /\ dom f2 by Def45; hence A1: dom(f1<++>f2) = dom(f2<++>f1) by Def45; let x; assume A2: x in dom(f1<++>f2); hence (f1<++>f2).x = f1.x + f2.x by Def45 .= (f2<++>f1).x by A1,A2,Def45; end; theorem f <++> f1 <++> f2 = f <++> (f1 <++> f2) proof set f3 = f<++>f1, f4 = f1<++>f2; A1: dom(f3<++>f2) = dom f3 /\ dom f2 by Def45; A2: dom(f<++>f4) = dom f /\ dom f4 by Def45; dom f3 = dom f /\ dom f1 & dom f4 = dom f1 /\ dom f2 by Def45; hence A3: dom(f3<++>f2) = dom(f<++>f4) by A1,A2,XBOOLE_1:16; let x; assume A4: x in dom(f3<++>f2); then A5: x in dom f4 by A2,A3,XBOOLE_0:def 4; A6: x in dom f3 by A1,A4,XBOOLE_0:def 4; thus (f3<++>f2).x = f3.x + f2.x by A4,Def45 .= f.x + f1.x + f2.x by A6,Def45 .= f.x + (f1.x + f2.x) by RFUNCT_1:8 .= f.x + f4.x by A5,Def45 .= (f<++>f4).x by A3,A4,Def45; end; theorem <-> (f1 <++> f2) = (<->f1) <++> (<->f2) proof set f3 = f1 <++> f2, f4 = <->f1, f5 = <->f2; A1: dom(f1 <++> f2) = dom f1 /\ dom f2 by Def45; A2: dom <->f2 = dom f2 by Def33; A3: dom <->f3 = dom f3 by Def33; A4: dom <->f1 = dom f1 by Def33; hence A5: dom(<->f3) = dom(f4<++>f5) by A1,A2,A3,Def45; let x; assume A6: x in dom(<->f3); then A7: x in dom f4 by A1,A4,A3,XBOOLE_0:def 4; A8: x in dom f5 by A1,A2,A3,A6,XBOOLE_0:def 4; thus (<->f3).x = -f3.x by A6,Def33 .= -(f1.x+f2.x) by A3,A6,Def45 .= -f1.x-f2.x by Th17 .= f4.x + -f2.x by A7,Def33 .= f4.x + f5.x by A8,Def33 .= (f4<++>f5).x by A5,A6,Def45; end; definition let Y1, Y2 be complex-functions-membered set; let f be Y1-valued Function; let g be Y2-valued Function; deffunc F(set) = f.$1-g.$1; func f<-->g -> Function means :Def46: dom it = dom f /\ dom g & for x being set st x in dom it holds it.x = f.x - g.x; existence proof ex F being Function st dom F = dom f /\ dom g & for x being set st x in dom f /\ dom g holds F.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let F,G be Function such that A1: dom F = dom f /\ dom g and A2: for x being set st x in dom F holds F.x = F(x) and A3: dom G = dom f /\ dom g and A4: for x being set st x in dom G holds G.x = F(x); thus dom F = dom G by A1,A3; let x; assume A5: x in dom F; hence F.x = F(x) by A2 .= G.x by A1,A3,A4,A5; end; end; definition let X1, X2 be set; let Y1, Y2 be complex-functions-membered set; let f be PartFunc of X1,Y1; let g be PartFunc of X2,Y2; redefine func f<-->g -> PartFunc of X1 /\ X2, C_PFuncs(DOMS(Y1)/\DOMS(Y2)); coherence proof set h = f<-->g; A1: dom h = dom f /\ dom g by Def46; rng h c= C_PFuncs(DOMS(Y1)/\DOMS(Y2)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; A4: h.x = f.x - g.x by A2,Def46; then reconsider y as Function by A3; A5: rng y c= COMPLEX proof let b be set; thus thesis by A3,A4,XCMPLX_0:def 2; end; x in dom g by A1,A2,XBOOLE_0:def 4; then g.x in Y2 by PARTFUN1:4; then dom(g.x) in {dom m where m is Element of Y2: not contradiction}; then A6: dom(g.x) c= DOMS(Y2) by ZFMISC_1:74; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y1 by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y1: not contradiction}; then A7: dom(f.x) c= DOMS(Y1) by ZFMISC_1:74; dom y = dom(f.x) /\ dom(g.x) by A3,A4,VALUED_1:12; then y is PartFunc of DOMS(Y1)/\DOMS(Y2),COMPLEX by A7,A6,A5,RELSET_1:4 ,XBOOLE_1:27; hence thesis by Def8; end; hence thesis by A1,RELSET_1:4,XBOOLE_1:27; end; end; definition let X1, X2 be set; let Y1, Y2 be real-functions-membered set; let f be PartFunc of X1,Y1; let g be PartFunc of X2,Y2; redefine func f<-->g -> PartFunc of X1 /\ X2, R_PFuncs(DOMS(Y1)/\DOMS(Y2)); coherence proof set h = f<-->g; A1: dom h = dom f /\ dom g by Def46; rng h c= R_PFuncs(DOMS(Y1)/\DOMS(Y2)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x - g.x by A2,Def46; A5: rng y c= REAL proof let b be set; thus thesis by A3,A4,XREAL_0:def 1; end; x in dom g by A1,A2,XBOOLE_0:def 4; then g.x in Y2 by PARTFUN1:4; then dom(g.x) in {dom m where m is Element of Y2: not contradiction}; then A6: dom(g.x) c= DOMS(Y2) by ZFMISC_1:74; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y1 by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y1: not contradiction}; then A7: dom(f.x) c= DOMS(Y1) by ZFMISC_1:74; dom y = dom(f.x) /\ dom(g.x) by A3,A4,VALUED_1:12; then y is PartFunc of DOMS(Y1)/\DOMS(Y2),REAL by A7,A6,A5,RELSET_1:4 ,XBOOLE_1:27; hence thesis by Def12; end; hence thesis by A1,RELSET_1:4; end; end; definition let X1, X2 be set; let Y1, Y2 be rational-functions-membered set; let f be PartFunc of X1,Y1; let g be PartFunc of X2,Y2; redefine func f<-->g -> PartFunc of X1 /\ X2, Q_PFuncs(DOMS(Y1)/\DOMS(Y2)); coherence proof set h = f<-->g; A1: dom h = dom f /\ dom g by Def46; rng h c= Q_PFuncs(DOMS(Y1)/\DOMS(Y2)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x - g.x by A2,Def46; A5: rng y c= RAT proof let b be set; thus thesis by A3,A4,RAT_1:def 2; end; x in dom g by A1,A2,XBOOLE_0:def 4; then g.x in Y2 by PARTFUN1:4; then dom(g.x) in {dom m where m is Element of Y2: not contradiction}; then A6: dom(g.x) c= DOMS(Y2) by ZFMISC_1:74; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y1 by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y1: not contradiction}; then A7: dom(f.x) c= DOMS(Y1) by ZFMISC_1:74; dom y = dom(f.x) /\ dom(g.x) by A3,A4,VALUED_1:12; then y is PartFunc of DOMS(Y1)/\DOMS(Y2),RAT by A7,A6,A5,RELSET_1:4 ,XBOOLE_1:27; hence thesis by Def14; end; hence thesis by A1,RELSET_1:4; end; end; definition let X1, X2 be set; let Y1, Y2 be integer-functions-membered set; let f be PartFunc of X1,Y1; let g be PartFunc of X2,Y2; redefine func f<-->g -> PartFunc of X1 /\ X2, I_PFuncs(DOMS(Y1)/\DOMS(Y2)); coherence proof set h = f<-->g; A1: dom h = dom f /\ dom g by Def46; rng h c= I_PFuncs(DOMS(Y1)/\DOMS(Y2)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x - g.x by A2,Def46; A5: rng y c= INT proof let b be set; thus thesis by A3,A4,INT_1:def 2; end; x in dom g by A1,A2,XBOOLE_0:def 4; then g.x in Y2 by PARTFUN1:4; then dom(g.x) in {dom m where m is Element of Y2: not contradiction}; then A6: dom(g.x) c= DOMS(Y2) by ZFMISC_1:74; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y1 by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y1: not contradiction}; then A7: dom(f.x) c= DOMS(Y1) by ZFMISC_1:74; dom y = dom(f.x) /\ dom(g.x) by A3,A4,VALUED_1:12; then y is PartFunc of DOMS(Y1)/\DOMS(Y2),INT by A7,A6,A5,RELSET_1:4 ,XBOOLE_1:27; hence thesis by Def16; end; hence thesis by A1,RELSET_1:4; end; end; theorem f1 <--> f2 = <-> (f2 <--> f1) proof set f = f2<-->f1; A1: dom(f1<-->f2) = dom f1 /\ dom f2 & dom(f2<-->f1) = dom f2 /\ dom f1 by Def46; hence A2: dom(f1<-->f2) = dom<->f by Def33; let x; assume A3: x in dom(f1<-->f2); hence (f1<-->f2).x = f1.x-f2.x by Def46 .= -(f2.x-f1.x) by Th18 .= -f.x by A1,A3,Def46 .= (<->f).x by A2,A3,Def33; end; theorem <-> (f1 <--> f2) = (<->f1) <++> f2 proof set f3 = f1 <--> f2, f4 = <->f1; A1: dom <->f3 = dom f3 by Def33; A2: dom(f1 <--> f2) = dom f1 /\ dom f2 & dom <->f1 = dom f1 by Def33,Def46; hence A3: dom(<->f3) = dom(f4<++>f2) by A1,Def45; let x; assume A4: x in dom(<->f3); then A5: x in dom f4 by A2,A1,XBOOLE_0:def 4; thus (<->f3).x = -f3.x by A4,Def33 .= -(f1.x-f2.x) by A1,A4,Def46 .= -f1.x--f2.x by Th17 .= f4.x + f2.x by A5,Def33 .= (f4<++>f2).x by A3,A4,Def45; end; theorem f <++> f1 <--> f2 = f <++> (f1<-->f2) proof set f3 = f<++>f1, f4 = f1<-->f2; A1: dom(f3<-->f2) = dom f3 /\ dom f2 by Def46; A2: dom(f<++>f4) = dom f /\ dom f4 by Def45; dom f3 = dom f /\ dom f1 & dom f4 = dom f1 /\ dom f2 by Def45,Def46; hence A3: dom(f3<-->f2) = dom(f<++>f4) by A1,A2,XBOOLE_1:16; let x; assume A4: x in dom(f3<-->f2); then A5: x in dom f4 by A2,A3,XBOOLE_0:def 4; A6: x in dom f3 by A1,A4,XBOOLE_0:def 4; thus (f3<-->f2).x = f3.x - f2.x by A4,Def46 .= f.x + f1.x - f2.x by A6,Def45 .= f.x + (f1.x - f2.x) by RFUNCT_1:8 .= f.x + f4.x by A5,Def46 .= (f<++>f4).x by A3,A4,Def45; end; theorem f <--> f1 <++> f2 = f <--> (f1 <--> f2) proof set f3 = f<-->f1, f4 = f1<-->f2; A1: dom(f3<++>f2) = dom f3 /\ dom f2 by Def45; A2: dom(f<-->f4) = dom f /\ dom f4 by Def46; dom f3 = dom f /\ dom f1 & dom f4 = dom f1 /\ dom f2 by Def46; hence A3: dom(f3<++>f2) = dom(f<-->f4) by A1,A2,XBOOLE_1:16; let x; assume A4: x in dom(f3<++>f2); then A5: x in dom f4 by A2,A3,XBOOLE_0:def 4; A6: x in dom f3 by A1,A4,XBOOLE_0:def 4; thus (f3<++>f2).x = f3.x + f2.x by A4,Def45 .= f.x - f1.x + f2.x by A6,Def46 .= f.x - (f1.x - f2.x) by RFUNCT_1:22 .= f.x - f4.x by A5,Def46 .= (f<-->f4).x by A3,A4,Def46; end; theorem f <--> f1 <--> f2 = f <--> (f1 <++> f2) proof set f3 = f<-->f1, f4 = f1<++>f2; A1: dom(f3<-->f2) = dom f3 /\ dom f2 by Def46; A2: dom(f<-->f4) = dom f /\ dom f4 by Def46; dom f3 = dom f /\ dom f1 & dom f4 = dom f1 /\ dom f2 by Def45,Def46; hence A3: dom(f3<-->f2) = dom(f<-->f4) by A1,A2,XBOOLE_1:16; let x; assume A4: x in dom(f3<-->f2); then A5: x in dom f4 by A2,A3,XBOOLE_0:def 4; A6: x in dom f3 by A1,A4,XBOOLE_0:def 4; thus (f3<-->f2).x = f3.x - f2.x by A4,Def46 .= f.x - f1.x - f2.x by A6,Def46 .= f.x - (f1.x + f2.x) by RFUNCT_1:20 .= f.x - f4.x by A5,Def45 .= (f<-->f4).x by A3,A4,Def46; end; theorem f <--> f1 <--> f2 = f <--> f2 <--> f1 proof set f3 = f<-->f1, f4 = f<-->f2; A1: dom(f3<-->f2) = dom f3 /\ dom f2 by Def46; A2: dom(f4<-->f1) = dom f4 /\ dom f1 by Def46; dom f3 = dom f /\ dom f1 & dom f4 = dom f /\ dom f2 by Def46; hence A3: dom(f3<-->f2) = dom(f4<-->f1) by A1,A2,XBOOLE_1:16; let x; assume A4: x in dom(f3<-->f2); then A5: x in dom f4 by A2,A3,XBOOLE_0:def 4; A6: x in dom f3 by A1,A4,XBOOLE_0:def 4; thus (f3<-->f2).x = f3.x - f2.x by A4,Def46 .= f.x - f1.x - f2.x by A6,Def46 .= f.x - f2.x - f1.x by RFUNCT_1:23 .= f4.x - f1.x by A5,Def46 .= (f4<-->f1).x by A3,A4,Def46; end; definition let Y1, Y2 be complex-functions-membered set; let f be Y1-valued Function; let g be Y2-valued Function; deffunc F(set) = f.$1(#)g.$1; func f<##>g -> Function means :Def47: dom it = dom f /\ dom g & for x being set st x in dom it holds it.x = f.x (#) g.x; existence proof ex F being Function st dom F = dom f /\ dom g & for x being set st x in dom f /\ dom g holds F.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let F,G be Function such that A1: dom F = dom f /\ dom g and A2: for x being set st x in dom F holds F.x = F(x) and A3: dom G = dom f /\ dom g and A4: for x being set st x in dom G holds G.x = F(x); thus dom F = dom G by A1,A3; let x; assume A5: x in dom F; hence F.x = F(x) by A2 .= G.x by A1,A3,A4,A5; end; end; definition let X1, X2 be set; let Y1, Y2 be complex-functions-membered set; let f be PartFunc of X1,Y1; let g be PartFunc of X2,Y2; redefine func f<##>g -> PartFunc of X1 /\ X2, C_PFuncs(DOMS(Y1)/\DOMS(Y2)); coherence proof set h = f<##>g; A1: dom h = dom f /\ dom g by Def47; rng h c= C_PFuncs(DOMS(Y1)/\DOMS(Y2)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; A4: h.x = f.x (#) g.x by A2,Def47; then reconsider y as Function by A3; A5: rng y c= COMPLEX proof let b be set; thus thesis by A3,A4,XCMPLX_0:def 2; end; x in dom g by A1,A2,XBOOLE_0:def 4; then g.x in Y2 by PARTFUN1:4; then dom(g.x) in {dom m where m is Element of Y2: not contradiction}; then A6: dom(g.x) c= DOMS(Y2) by ZFMISC_1:74; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y1 by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y1: not contradiction}; then A7: dom(f.x) c= DOMS(Y1) by ZFMISC_1:74; dom y = dom(f.x) /\ dom(g.x) by A3,A4,VALUED_1:def 4; then y is PartFunc of DOMS(Y1)/\DOMS(Y2),COMPLEX by A7,A6,A5,RELSET_1:4 ,XBOOLE_1:27; hence thesis by Def8; end; hence thesis by A1,RELSET_1:4,XBOOLE_1:27; end; end; definition let X1, X2 be set; let Y1, Y2 be real-functions-membered set; let f be PartFunc of X1,Y1; let g be PartFunc of X2,Y2; redefine func f<##>g -> PartFunc of X1 /\ X2, R_PFuncs(DOMS(Y1)/\DOMS(Y2)); coherence proof set h = f<##>g; A1: dom h = dom f /\ dom g by Def47; rng h c= R_PFuncs(DOMS(Y1)/\DOMS(Y2)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x (#) g.x by A2,Def47; A5: rng y c= REAL proof let b be set; thus thesis by A3,A4,XREAL_0:def 1; end; x in dom g by A1,A2,XBOOLE_0:def 4; then g.x in Y2 by PARTFUN1:4; then dom(g.x) in {dom m where m is Element of Y2: not contradiction}; then A6: dom(g.x) c= DOMS(Y2) by ZFMISC_1:74; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y1 by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y1: not contradiction}; then A7: dom(f.x) c= DOMS(Y1) by ZFMISC_1:74; dom y = dom(f.x) /\ dom(g.x) by A3,A4,VALUED_1:def 4; then y is PartFunc of DOMS(Y1)/\DOMS(Y2),REAL by A7,A6,A5,RELSET_1:4 ,XBOOLE_1:27; hence thesis by Def12; end; hence thesis by A1,RELSET_1:4; end; end; definition let X1, X2 be set; let Y1, Y2 be rational-functions-membered set; let f be PartFunc of X1,Y1; let g be PartFunc of X2,Y2; redefine func f<##>g -> PartFunc of X1 /\ X2, Q_PFuncs(DOMS(Y1)/\DOMS(Y2)); coherence proof set h = f<##>g; A1: dom h = dom f /\ dom g by Def47; rng h c= Q_PFuncs(DOMS(Y1)/\DOMS(Y2)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x (#) g.x by A2,Def47; A5: rng y c= RAT proof let b be set; thus thesis by A3,A4,RAT_1:def 2; end; x in dom g by A1,A2,XBOOLE_0:def 4; then g.x in Y2 by PARTFUN1:4; then dom(g.x) in {dom m where m is Element of Y2: not contradiction}; then A6: dom(g.x) c= DOMS(Y2) by ZFMISC_1:74; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y1 by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y1: not contradiction}; then A7: dom(f.x) c= DOMS(Y1) by ZFMISC_1:74; dom y = dom(f.x) /\ dom(g.x) by A3,A4,VALUED_1:def 4; then y is PartFunc of DOMS(Y1)/\DOMS(Y2),RAT by A7,A6,A5,RELSET_1:4 ,XBOOLE_1:27; hence thesis by Def14; end; hence thesis by A1,RELSET_1:4; end; end; definition let X1, X2 be set; let Y1, Y2 be integer-functions-membered set; let f be PartFunc of X1,Y1; let g be PartFunc of X2,Y2; redefine func f<##>g -> PartFunc of X1 /\ X2, I_PFuncs(DOMS(Y1)/\DOMS(Y2)); coherence proof set h = f<##>g; A1: dom h = dom f /\ dom g by Def47; rng h c= I_PFuncs(DOMS(Y1)/\DOMS(Y2)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x (#) g.x by A2,Def47; A5: rng y c= INT proof let b be set; thus thesis by A3,A4,INT_1:def 2; end; x in dom g by A1,A2,XBOOLE_0:def 4; then g.x in Y2 by PARTFUN1:4; then dom(g.x) in {dom m where m is Element of Y2: not contradiction}; then A6: dom(g.x) c= DOMS(Y2) by ZFMISC_1:74; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y1 by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y1: not contradiction}; then A7: dom(f.x) c= DOMS(Y1) by ZFMISC_1:74; dom y = dom(f.x) /\ dom(g.x) by A3,A4,VALUED_1:def 4; then y is PartFunc of DOMS(Y1)/\DOMS(Y2),INT by A7,A6,A5,RELSET_1:4 ,XBOOLE_1:27; hence thesis by Def16; end; hence thesis by A1,RELSET_1:4; end; end; definition let X1, X2 be set; let Y1, Y2 be natural-functions-membered set; let f be PartFunc of X1,Y1; let g be PartFunc of X2,Y2; redefine func f<##>g -> PartFunc of X1 /\ X2, N_PFuncs(DOMS(Y1)/\DOMS(Y2)); coherence proof set h = f<##>g; A1: dom h = dom f /\ dom g by Def47; rng h c= N_PFuncs(DOMS(Y1)/\DOMS(Y2)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x (#) g.x by A2,Def47; A5: rng y c= NAT proof let b be set; thus thesis by A3,A4,ORDINAL1:def 12; end; x in dom g by A1,A2,XBOOLE_0:def 4; then g.x in Y2 by PARTFUN1:4; then dom(g.x) in {dom m where m is Element of Y2: not contradiction}; then A6: dom(g.x) c= DOMS(Y2) by ZFMISC_1:74; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y1 by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y1: not contradiction}; then A7: dom(f.x) c= DOMS(Y1) by ZFMISC_1:74; dom y = dom(f.x) /\ dom(g.x) by A3,A4,VALUED_1:def 4; then y is PartFunc of DOMS(Y1)/\DOMS(Y2),NAT by A7,A6,A5,RELSET_1:4 ,XBOOLE_1:27; hence thesis by Def18; end; hence thesis by A1,RELSET_1:4; end; end; theorem Th83: f1 <##> f2 = f2 <##> f1 proof dom(f1<##>f2) = dom f1 /\ dom f2 by Def47; hence A1: dom(f1<##>f2) = dom(f2<##>f1) by Def47; let x; assume A2: x in dom(f1<##>f2); hence (f1<##>f2).x = f1.x (#) f2.x by Def47 .= (f2<##>f1).x by A1,A2,Def47; end; theorem (f <##> f1) <##> f2 = f <##> (f1 <##> f2) proof set f3 = f<##>f1, f4 = f1<##>f2; A1: dom(f3<##>f2) = dom f3 /\ dom f2 by Def47; A2: dom(f<##>f4) = dom f /\ dom f4 by Def47; dom f3 = dom f /\ dom f1 & dom f4 = dom f1 /\ dom f2 by Def47; hence A3: dom(f3<##>f2) = dom(f<##>f4) by A1,A2,XBOOLE_1:16; let x; assume A4: x in dom(f3<##>f2); then A5: x in dom f4 by A2,A3,XBOOLE_0:def 4; A6: x in dom f3 by A1,A4,XBOOLE_0:def 4; thus (f3<##>f2).x = f3.x (#) f2.x by A4,Def47 .= f.x (#) f1.x (#) f2.x by A6,Def47 .= f.x (#) (f1.x (#) f2.x) by RFUNCT_1:9 .= f.x (#) f4.x by A5,Def47 .= (f<##>f4).x by A3,A4,Def47; end; theorem (<->f1) <##> f2 = <-> (f1<##>f2) proof set f3 = f1<##>f2, f4 = <->f1; A1: dom f3 = dom f1 /\ dom f2 & dom f4 = dom f1 by Def33,Def47; dom(f4<##>f2) = dom f4 /\ dom f2 by Def47; hence A2: dom(f4<##>f2) = dom(<->f3) by A1,Def33; let x; assume A3: x in dom(f4<##>f2); then A4: x in dom f3 by A1,Def47; then A5: x in dom <->f1 by A1,XBOOLE_0:def 4; thus (f4<##>f2).x = f4.x (#) f2.x by A3,Def47 .= (-(f1.x)) (#) f2.x by A5,Def33 .= -(f1.x) (#) f2.x by Th25 .= -f3.x by A4,Def47 .= (<->f3).x by A2,A3,Def33; end; theorem f1 <##> <->f2 = <-> (f1<##>f2) proof set f3 = f1<##>f2, f4 = <->f2; A1: dom f3 = dom f1 /\ dom f2 & dom f4 = dom f2 by Def33,Def47; dom(f1<##>f4) = dom f1 /\ dom f4 by Def47; hence A2: dom(f1<##>f4) = dom(<->f3) by A1,Def33; let x; assume A3: x in dom(f1<##>f4); then A4: x in dom f3 by A1,Def47; then A5: x in dom <->f2 by A1,XBOOLE_0:def 4; thus (f1<##>f4).x = f1.x (#) f4.x by A3,Def47 .= f1.x (#) -f2.x by A5,Def33 .= -(f1.x) (#) f2.x by Th25 .= -f3.x by A4,Def47 .= (<->f3).x by A2,A3,Def33; end; theorem Th87: f <##> (f1<++>f2) = (f<##>f1) <++> (f<##>f2) proof set f3 = f<##>f1, f4 = f<##>f2, f5 = f1<++>f2; A1: dom(f<##>f5) = dom f /\ dom f5 by Def47; A2: dom f5 = dom f1 /\ dom f2 by Def45; A3: dom(f3<++>f4) = dom f3 /\ dom f4 by Def45; dom f3 = dom f /\ dom f1 & dom f4 = dom f /\ dom f2 by Def47; hence A4: dom(f<##>f5) = dom(f3<++>f4) by A1,A3,A2,Lm1; let x; assume A5: x in dom(f<##>f5); then A6: x in dom f3 by A3,A4,XBOOLE_0:def 4; A7: x in dom f5 by A1,A5,XBOOLE_0:def 4; A8: x in dom f4 by A3,A4,A5,XBOOLE_0:def 4; thus (f<##>f5).x = f.x (#) f5.x by A5,Def47 .= f.x (#) (f1.x + f2.x) by A7,Def45 .= f.x (#) f1.x + f.x (#) f2.x by RFUNCT_1:10 .= f3.x + f.x (#) f2.x by A6,Def47 .= f3.x + f4.x by A8,Def47 .= (f3<++>f4).x by A4,A5,Def45; end; theorem (f1<++>f2) <##> f = (f1<##>f) <++> (f2<##>f) proof set f3 = f1<##>f, f4 = f2<##>f, f5 = f1<++>f2; A1: f1<##>f = f<##>f1 & f2<##>f = f<##>f2 by Th83; thus f5 <##> f = f <##> f5 by Th83 .= f3 <++> f4 by A1,Th87; end; theorem Th89: f <##> (f1<-->f2) = (f<##>f1) <--> (f<##>f2) proof set f3 = f<##>f1, f4 = f<##>f2, f5 = f1<-->f2; A1: dom(f<##>f5) = dom f /\ dom f5 by Def47; A2: dom f5 = dom f1 /\ dom f2 by Def46; A3: dom(f3<-->f4) = dom f3 /\ dom f4 by Def46; dom f3 = dom f /\ dom f1 & dom f4 = dom f /\ dom f2 by Def47; hence A4: dom(f<##>f5) = dom(f3<-->f4) by A1,A3,A2,Lm1; let x; assume A5: x in dom(f<##>f5); then A6: x in dom f3 by A3,A4,XBOOLE_0:def 4; A7: x in dom f5 by A1,A5,XBOOLE_0:def 4; A8: x in dom f4 by A3,A4,A5,XBOOLE_0:def 4; thus (f<##>f5).x = f.x (#) f5.x by A5,Def47 .= f.x (#) (f1.x - f2.x) by A7,Def46 .= f.x (#) f1.x - f.x (#) f2.x by RFUNCT_1:15 .= f3.x - f.x (#) f2.x by A6,Def47 .= f3.x - f4.x by A8,Def47 .= (f3<-->f4).x by A4,A5,Def46; end; theorem (f1<-->f2) <##> f = (f1<##>f) <--> (f2<##>f) proof set f3 = f1<##>f, f4 = f2<##>f, f5 = f1<-->f2; A1: f1<##>f = f<##>f1 & f2<##>f = f<##>f2 by Th83; thus f5 <##> f = f <##> f5 by Th83 .= f3 <--> f4 by A1,Th89; end; definition let Y1, Y2 be complex-functions-membered set; let f be Y1-valued Function; let g be Y2-valued Function; deffunc F(set) = f.$1/"g.$1; func fg -> Function means :Def48: dom it = dom f /\ dom g & for x being set st x in dom it holds it.x = f.x /" g.x; existence proof ex F being Function st dom F = dom f /\ dom g & for x being set st x in dom f /\ dom g holds F.x = F(x) from FUNCT_1:sch 3; hence thesis; end; uniqueness proof let F,G be Function such that A1: dom F = dom f /\ dom g and A2: for x being set st x in dom F holds F.x = F(x) and A3: dom G = dom f /\ dom g and A4: for x being set st x in dom G holds G.x = F(x); thus dom F = dom G by A1,A3; let x; assume A5: x in dom F; hence F.x = F(x) by A2 .= G.x by A1,A3,A4,A5; end; end; definition let X1, X2 be set; let Y1, Y2 be complex-functions-membered set; let f be PartFunc of X1,Y1; let g be PartFunc of X2,Y2; redefine func fg -> PartFunc of X1 /\ X2, C_PFuncs(DOMS(Y1)/\DOMS(Y2)); coherence proof set h = fg; A1: dom h = dom f /\ dom g by Def48; rng h c= C_PFuncs(DOMS(Y1)/\DOMS(Y2)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; A4: h.x = f.x /" g.x by A2,Def48; then reconsider y as Function by A3; A5: rng y c= COMPLEX proof let b be set; thus thesis by A3,A4,XCMPLX_0:def 2; end; x in dom g by A1,A2,XBOOLE_0:def 4; then g.x in Y2 by PARTFUN1:4; then dom(g.x) in {dom m where m is Element of Y2: not contradiction}; then A6: dom(g.x) c= DOMS(Y2) by ZFMISC_1:74; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y1 by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y1: not contradiction}; then A7: dom(f.x) c= DOMS(Y1) by ZFMISC_1:74; dom y = dom(f.x) /\ dom(g.x) by A3,A4,VALUED_1:16; then y is PartFunc of DOMS(Y1)/\DOMS(Y2),COMPLEX by A7,A6,A5,RELSET_1:4 ,XBOOLE_1:27; hence thesis by Def8; end; hence thesis by A1,RELSET_1:4,XBOOLE_1:27; end; end; definition let X1, X2 be set; let Y1, Y2 be real-functions-membered set; let f be PartFunc of X1,Y1; let g be PartFunc of X2,Y2; redefine func fg -> PartFunc of X1 /\ X2, R_PFuncs(DOMS(Y1)/\DOMS(Y2)); coherence proof set h = fg; A1: dom h = dom f /\ dom g by Def48; rng h c= R_PFuncs(DOMS(Y1)/\DOMS(Y2)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x /" g.x by A2,Def48; A5: rng y c= REAL proof let b be set; thus thesis by A3,A4,XREAL_0:def 1; end; x in dom g by A1,A2,XBOOLE_0:def 4; then g.x in Y2 by PARTFUN1:4; then dom(g.x) in {dom m where m is Element of Y2: not contradiction}; then A6: dom(g.x) c= DOMS(Y2) by ZFMISC_1:74; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y1 by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y1: not contradiction}; then A7: dom(f.x) c= DOMS(Y1) by ZFMISC_1:74; dom y = dom(f.x) /\ dom(g.x) by A3,A4,VALUED_1:16; then y is PartFunc of DOMS(Y1)/\DOMS(Y2),REAL by A7,A6,A5,RELSET_1:4 ,XBOOLE_1:27; hence thesis by Def12; end; hence thesis by A1,RELSET_1:4; end; end; definition let X1, X2 be set; let Y1, Y2 be rational-functions-membered set; let f be PartFunc of X1,Y1; let g be PartFunc of X2,Y2; redefine func fg -> PartFunc of X1 /\ X2, Q_PFuncs(DOMS(Y1)/\DOMS(Y2)); coherence proof set h = fg; A1: dom h = dom f /\ dom g by Def48; rng h c= Q_PFuncs(DOMS(Y1)/\DOMS(Y2)) proof let y be set; assume y in rng h; then consider x such that A2: x in dom h and A3: h.x = y by FUNCT_1:def 3; reconsider y as Function by A3; A4: h.x = f.x /" g.x by A2,Def48; A5: rng y c= RAT proof let b be set; thus thesis by A3,A4,RAT_1:def 2; end; x in dom g by A1,A2,XBOOLE_0:def 4; then g.x in Y2 by PARTFUN1:4; then dom(g.x) in {dom m where m is Element of Y2: not contradiction}; then A6: dom(g.x) c= DOMS(Y2) by ZFMISC_1:74; x in dom f by A1,A2,XBOOLE_0:def 4; then f.x in Y1 by PARTFUN1:4; then dom(f.x) in {dom m where m is Element of Y1: not contradiction}; then A7: dom(f.x) c= DOMS(Y1) by ZFMISC_1:74; dom y = dom(f.x) /\ dom(g.x) by A3,A4,VALUED_1:16; then y is PartFunc of DOMS(Y1)/\DOMS(Y2),RAT by A7,A6,A5,RELSET_1:4 ,XBOOLE_1:27; hence thesis by Def14; end; hence thesis by A1,RELSET_1:4; end; end; theorem (<->f1) f2 = <-> (f1f2) proof set f3 = f1f2, f4 = <->f1; A1: dom f3 = dom f1 /\ dom f2 & dom f4 = dom f1 by Def33,Def48; dom(f4f2) = dom f4 /\ dom f2 by Def48; hence A2: dom(f4f2) = dom(<->f3) by A1,Def33; let x; assume A3: x in dom(f4f2); then A4: x in dom f3 by A1,Def48; then A5: x in dom <->f1 by A1,XBOOLE_0:def 4; thus (f4f2).x = f4.x /" f2.x by A3,Def48 .= (-(f1.x)) /" f2.x by A5,Def33 .= -(f1.x) /" f2.x by Th25 .= -f3.x by A4,Def48 .= (<->f3).x by A2,A3,Def33; end; theorem f1 <->f2 = <-> (f1f2) proof set f3 = f1f2, f4 = <->f2; A1: dom f3 = dom f1 /\ dom f2 & dom f4 = dom f2 by Def33,Def48; dom(f1f4) = dom f1 /\ dom f4 by Def48; hence A2: dom(f1f4) = dom(<->f3) by A1,Def33; let x; assume A3: x in dom(f1f4); then A4: x in dom f3 by A1,Def48; then A5: x in dom <->f2 by A1,XBOOLE_0:def 4; thus (f1f4).x = f1.x /" f4.x by A3,Def48 .= f1.x /" -f2.x by A5,Def33 .= -(f1.x) /" f2.x by Th27 .= -f3.x by A4,Def48 .= (<->f3).x by A2,A3,Def33; end; theorem f <##> f1 f2 = f <##> (f1f2) proof set f3 = f<##>f1, f4 = f1f2; A1: dom(f3f2) = dom f3 /\ dom f2 by Def48; A2: dom(f<##>f4) = dom f /\ dom f4 by Def47; dom f3 = dom f /\ dom f1 & dom f4 = dom f1 /\ dom f2 by Def47,Def48; hence A3: dom(f3f2) = dom(f<##>f4) by A1,A2,XBOOLE_1:16; let x; assume A4: x in dom(f3f2); then A5: x in dom f4 by A2,A3,XBOOLE_0:def 4; A6: x in dom f3 by A1,A4,XBOOLE_0:def 4; thus (f3f2).x = f3.x /" f2.x by A4,Def48 .= f.x (#) f1.x /" f2.x by A6,Def47 .= f.x (#) (f1.x /" f2.x) by Th19 .= f.x (#) f4.x by A5,Def48 .= (f<##>f4).x by A3,A4,Def47; end; theorem f f1 <##> f2 = f <##> f2 f1 proof set f3 = ff1, f4 = f<##>f2; A1: dom(f3<##>f2) = dom f3 /\ dom f2 by Def47; A2: dom(f4f1) = dom f4 /\ dom f1 by Def48; dom f3 = dom f /\ dom f1 & dom f4 = dom f /\ dom f2 by Def47,Def48; hence A3: dom(f3<##>f2) = dom(f4f1) by A1,A2,XBOOLE_1:16; let x; assume A4: x in dom(f3<##>f2); then A5: x in dom f4 by A2,A3,XBOOLE_0:def 4; A6: x in dom f3 by A1,A4,XBOOLE_0:def 4; thus (f3<##>f2).x = f3.x (#) f2.x by A4,Def47 .= f.x /" f1.x (#) f2.x by A6,Def48 .= f.x (#) f2.x /" f1.x by Th20 .= f4.x /" f1.x by A5,Def47 .= (f4f1).x by A3,A4,Def48; end; theorem f f1 f2 = f (f1 <##> f2) proof set f3 = ff1, f4 = f1<##>f2; A1: dom(f3f2) = dom f3 /\ dom f2 by Def48; A2: dom(ff4) = dom f /\ dom f4 by Def48; dom f3 = dom f /\ dom f1 & dom f4 = dom f1 /\ dom f2 by Def47,Def48; hence A3: dom(f3f2) = dom(ff4) by A1,A2,XBOOLE_1:16; let x; assume A4: x in dom(f3f2); then A5: x in dom f4 by A2,A3,XBOOLE_0:def 4; A6: x in dom f3 by A1,A4,XBOOLE_0:def 4; thus (f3f2).x = f3.x /" f2.x by A4,Def48 .= f.x /" f1.x /" f2.x by A6,Def48 .= f.x /" (f1.x (#) f2.x) by Th21 .= f.x /" f4.x by A5,Def47 .= (ff4).x by A3,A4,Def48; end; theorem (f1<++>f2) f = (f1f) <++> (f2f) proof set f3 = f1f, f4 = f2f, f5 = f1<++>f2; A1: dom(f5f) = dom f /\ dom f5 by Def48; A2: dom f5 = dom f1 /\ dom f2 by Def45; A3: dom(f3<++>f4) = dom f3 /\ dom f4 by Def45; dom f3 = dom f1 /\ dom f & dom f4 = dom f2 /\ dom f by Def48; hence A4: dom(f5f) = dom(f3<++>f4) by A1,A3,A2,Lm1; let x; assume A5: x in dom(f5f); then A6: x in dom f3 by A3,A4,XBOOLE_0:def 4; A7: x in dom f5 by A1,A5,XBOOLE_0:def 4; A8: x in dom f4 by A3,A4,A5,XBOOLE_0:def 4; thus (f5f).x = f5.x /" f.x by A5,Def48 .= (f1.x+f2.x) /" f.x by A7,Def45 .= f1.x /" f.x + f2.x /" f.x by RFUNCT_1:10 .= f3.x + f2.x /" f.x by A6,Def48 .= f3.x + f4.x by A8,Def48 .= (f3<++>f4).x by A4,A5,Def45; end; theorem (f1<-->f2) f = (f1f) <--> (f2f) proof set f3 = f1f, f4 = f2f, f5 = f1<-->f2; A1: dom(f5f) = dom f /\ dom f5 by Def48; A2: dom f5 = dom f1 /\ dom f2 by Def46; A3: dom(f3<-->f4) = dom f3 /\ dom f4 by Def46; dom f3 = dom f1 /\ dom f & dom f4 = dom f2 /\ dom f by Def48; hence A4: dom(f5f) = dom(f3<-->f4) by A1,A3,A2,Lm1; let x; assume A5: x in dom(f5f); then A6: x in dom f3 by A3,A4,XBOOLE_0:def 4; A7: x in dom f5 by A1,A5,XBOOLE_0:def 4; A8: x in dom f4 by A3,A4,A5,XBOOLE_0:def 4; thus (f5f).x = f5.x /" f.x by A5,Def48 .= (f1.x-f2.x) /" f.x by A7,Def46 .= f1.x /" f.x - f2.x /" f.x by RFUNCT_1:14 .= f3.x - f2.x /" f.x by A6,Def48 .= f3.x - f4.x by A8,Def48 .= (f3<-->f4).x by A4,A5,Def46; end; begin reserve n,m,k for Element of NAT; reserve r,r1 for real number; reserve f,seq,seq1 for Real_Sequence; reserve x,y for set; Lm1: n 0 by A1,A2; then consider n1 be Nat such that A3: k1=n1+1 by NAT_1:6; reconsider n1 as Element of NAT by ORDINAL1:def 12; take n1; thus thesis by A2,A3; end; Lm2: ((for n holds seq.n f.n; compatibility proof thus f is decreasing implies for m,n st m in dom f & n in dom f & m < n holds f.m > f.n by VALUED_0:def 14; assume A2: for m,n st m in dom f & n in dom f & m < n holds f.m > f.n; let e1,e2; dom f c= NAT by RELAT_1:def 18; hence thesis by A2; end; redefine attr f is non-decreasing means :Def3: for m,n st m in dom f & n in dom f & m <= n holds f.m <= f.n; compatibility proof thus f is non-decreasing implies for m,n st m in dom f & n in dom f & m <= n holds f.m <= f.n by VALUED_0:def 15; assume A3: for m,n st m in dom f & n in dom f & m <= n holds f.m <= f.n; let e1,e2; dom f c= NAT by RELAT_1:def 18; hence thesis by A3; end; redefine attr f is non-increasing means :Def4: for m,n st m in dom f & n in dom f & m <= n holds f.m >= f.n; compatibility proof thus f is non-increasing implies for m,n st m in dom f & n in dom f & m <= n holds f.m >= f.n by VALUED_0:def 16; assume A4: for m,n st m in dom f & n in dom f & m <= n holds f.m >= f.n; let e1,e2; dom f c= NAT by RELAT_1:def 18; hence thesis by A4; end; end; Lm6: f is increasing iff for n being Element of NAT holds f.n < f.(n+1) proof thus f is increasing implies for n being Element of NAT holds f.n < f.(n+1 ) proof assume A1: f is increasing; let n be Element of NAT; dom f = NAT & n < n+1 by FUNCT_2:def 1,NAT_1:13; hence thesis by A1,Def1; end; assume A2: for n being Element of NAT holds f.n < f.(n+1); let m,n; assume that m in dom f and n in dom f and A3: m < n; ex k st n = m+1+k by A3,Lm1; hence thesis by A2,Lm2; end; Lm7: f is decreasing iff for n being Element of NAT holds f.n > f.(n+1) proof thus f is decreasing implies for n being Element of NAT holds f.n > f.(n+1 ) proof assume A1: f is decreasing; let n be Element of NAT; dom f = NAT & n < n+1 by FUNCT_2:def 1,NAT_1:13; hence thesis by A1,Def2; end; assume A2: for n being Element of NAT holds f.n > f.(n+1); let m,n; assume that m in dom f and n in dom f and A3: m < n; ex k st n = m+1+k by A3,Lm1; hence thesis by A2,Lm3; end; Lm8: f is non-decreasing iff for n being Element of NAT holds f.n <= f.(n+1) proof thus f is non-decreasing implies for n being Element of NAT holds f.n <= f.( n+1) proof assume A1: f is non-decreasing; let n be Element of NAT; dom f = NAT & n < n+1 by FUNCT_2:def 1,NAT_1:13; hence thesis by A1,Def3; end; assume A2: for n being Element of NAT holds f.n <= f.(n+1); let m,n; assume that m in dom f and n in dom f and A3: m <= n; consider k be Nat such that A4: n = m+k by A3,NAT_1:10; k in NAT by ORDINAL1:def 12; hence thesis by A2,A4,Lm4; end; Lm9: f is non-increasing iff for n being Element of NAT holds f.n >= f.(n+1) proof thus f is non-increasing implies for n being Element of NAT holds f.n >= f.( n+1) proof assume A1: f is non-increasing; let n be Element of NAT; dom f = NAT & n < n+1 by FUNCT_2:def 1,NAT_1:13; hence thesis by A1,Def4; end; assume A2: for n being Element of NAT holds f.n >= f.(n+1); let m,n; assume that m in dom f and n in dom f and A3: m <= n; consider k be Nat such that A4: n = m+k by A3,NAT_1:10; k in NAT by ORDINAL1:def 12; hence thesis by A2,A4,Lm5; end; definition let seq; attr seq is monotone means :Def5: seq is non-decreasing or seq is non-increasing; end; theorem Th1: seq is increasing iff for n,m st n non-decreasing non-increasing for PartFunc of NAT, REAL; coherence proof let f be PartFunc of NAT, REAL such that A1: f is constant; thus f is non-decreasing proof let m,n; assume that A2: m in dom f & n in dom f and m <= n; thus thesis by A1,A2,FUNCT_1:def 10; end; let m,n; assume that A3: m in dom f & n in dom f and m <= n; thus thesis by A1,A3,FUNCT_1:def 10; end; cluster non-decreasing non-increasing -> constant for PartFunc of NAT, REAL; coherence proof let f be PartFunc of NAT, REAL such that A4: f is non-decreasing non-increasing; let x,y; assume A5: x in dom f & y in dom f; dom f c= NAT by RELAT_1:def 18; then reconsider m = x, n = y as Element of NAT by A5; m <= n or n <= m; then f.m <= f.n & f.n <= f.m by A4,A5,Def3,Def4; hence thesis by XXREAL_0:1; end; end; Lm10: incl NAT is increasing natural-valued proof set seq = incl NAT; now let n; seq.n=n & seq.(n+1)=n+1 by FUNCT_1:18; hence seq.n increasing natural-valued for ext-real-valued Function; coherence proof now let n; Nseq.(n+k) f.(n+1); compatibility by Lm7; redefine attr f is non-decreasing means for n being Element of NAT holds f.n <= f.(n+1); compatibility by Lm8; redefine attr f is non-increasing means for n being Element of NAT holds f.n >= f.(n+1); compatibility by Lm9; end; theorem for n holds n<=Nseq.n proof defpred X[Element of NAT] means $1<=Nseq.$1; A1: now let k such that A2: X[k]; Nseq.kreal-valued; coherence; end; theorem Th15: (seq+seq1) ^\k=(seq ^\k) + (seq1 ^\k) proof now let n; thus ((seq+seq1) ^\k).n=(seq+seq1).(n+k) by NAT_1:def 3 .=seq.(n+k) + seq1.(n+k) by SEQ_1:7 .=(seq ^\k).n +seq1.(n+k) by NAT_1:def 3 .=(seq ^\k).n +(seq1 ^\k).n by NAT_1:def 3 .=((seq ^\k) +(seq1 ^\k)).n by SEQ_1:7; end; hence thesis by FUNCT_2:63; end; theorem Th16: (-seq) ^\k=-(seq ^\k) proof now let n; thus ((-seq) ^\k).n=(-seq).(n+k) by NAT_1:def 3 .=-(seq.(n+k)) by SEQ_1:10 .=-((seq ^\ k).n) by NAT_1:def 3 .=(-(seq ^\k)).n by SEQ_1:10; end; hence thesis by FUNCT_2:63; end; theorem (seq-seq1) ^\k=(seq ^\k)-(seq1 ^\k) proof thus (seq-seq1) ^\k=(seq ^\k)+((-seq1) ^\k) by Th15 .=(seq ^\k)-(seq1 ^\k) by Th16; end; theorem Th18: (seq") ^\k=(seq ^\k)" proof now let n; thus ((seq") ^\k).n=(seq").(n+k) by NAT_1:def 3 .=(seq.(n+k))" by VALUED_1:10 .=((seq ^\k).n)" by NAT_1:def 3 .=((seq ^\k)").n by VALUED_1:10; end; hence thesis by FUNCT_2:63; end; theorem Th19: (seq(#)seq1) ^\k=(seq ^\k)(#)(seq1 ^\k) proof now let n; thus ((seq(#)seq1) ^\k).n=(seq(#)seq1).(n+k) by NAT_1:def 3 .=seq.(n+k)*seq1.(n+k) by SEQ_1:8 .=(seq ^\k).n*seq1.(n+k) by NAT_1:def 3 .=(seq ^\k).n*(seq1 ^\k).n by NAT_1:def 3 .=((seq ^\k)(#)(seq1 ^\k)).n by SEQ_1:8; end; hence thesis by FUNCT_2:63; end; theorem (seq/"seq1) ^\k=(seq ^\k)/"(seq1 ^\k) proof thus (seq/"seq1) ^\k=(seq ^\k)(#)((seq1") ^\k) by Th19 .=(seq ^\k)/"(seq1 ^\k) by Th18; end; theorem (r(#)seq) ^\k=r(#)(seq ^\k) proof now let n; thus ((r(#)seq) ^\k).n=(r(#)seq).(n+k) by NAT_1:def 3 .=r*(seq.(n+k)) by SEQ_1:9 .=r*((seq ^\k).n) by NAT_1:def 3 .=(r(#)(seq ^\k)).n by SEQ_1:9; end; hence thesis by FUNCT_2:63; end; theorem seq is increasing & seq1 is subsequence of seq implies seq1 is increasing proof assume that A1: seq is increasing and A2: seq1 is subsequence of seq; let n; consider Nseq such that A3: seq1=seq*Nseq by A2,VALUED_0:def 17; Nseq.n natural-valued for FinSequence of NAT; coherence; end; begin reserve v for FinSequence of REAL, r,s for Real, n,m,i,j,k for Element of NAT; theorem Th41: abs(r-s)=1 iff r>s & r=s+1 or rs & r=s+1 or rs; then 0s & r=s+1 or rs & r=s+1; hence thesis by ABSVALUE:def 1; end; suppose A6: s>r & s=r+1; thus abs(r-s)=abs(-(r-s)) by COMPLEX1:52 .= 1 by A6,ABSVALUE:def 1; end; end; theorem abs(i-j)+abs(n-m)=1 iff abs(i-j)=1 & n=m or abs(n-m)=1 & i=j proof thus abs(i-j)+abs(n-m)=1 implies abs(i-j)=1 & n=m or abs(n-m)=1 & i=j proof assume A1: abs(i-j)+abs(n-m)=1; now per cases; suppose A2: n=m; then 1=abs(i-j)+0 by A1,ABSVALUE:2 .= abs(i-j); hence thesis by A2; end; suppose A3: n<>m; now per cases by A3,XXREAL_0:1; suppose A4: nm; then reconsider l=n-m as Element of NAT by INT_1:5; 01 iff ex m st n=m+1 & m>0 proof thus n>1 implies ex m st n=m+1 & m>0 proof assume A1: 1 0 by A1,A2; hence thesis by A2; end; given m such that A3: n=m+1 & m>0; 0+1 real-valued for FinSequence of REAL; coherence; end; registration cluster non empty increasing for FinSequence of REAL; existence proof take v = <* 0 qua Real *>; thus v is non empty; let n,m; assume that A1: n in dom v and A2: m in dom v; A3: dom<* 0 *> = { 1 } by FINSEQ_1:2,38; then n = 1 by A1,TARSKI:def 1; hence thesis by A3,A2,TARSKI:def 1; end; end; registration cluster constant for FinSequence of REAL; existence proof take v = <*>REAL; let n,m; assume that n in dom v and m in dom v; thus thesis; end; end; theorem Th45: v<>{} & rng v c= Seg n & v.(len v) = n & (for k st 1<=k & k<=len v - 1 holds for r,s st r = v.k & s = v.(k+1) holds abs(r-s) = 1 or r=s) & i in Seg n & i+1 in Seg n & m in dom v & v.m = i & (for k st k in dom v & v.k = i holds k<=m) implies m+1 in dom v & v.(m+1)=i+1 proof assume that A1: v<>{} and A2: rng v c= Seg n and A3: v.(len v) = n and A4: for k st 1<=k & k<=len v - 1 holds for r,s st r = v.k & s = v.(k+1) holds abs(r-s) = 1 or r=s and A5: i in Seg n and A6: i+1 in Seg n and A7: m in dom v and A8: v.m = i and A9: for k st k in dom v & v.k = i holds k<=m; A10: m<=len v by A7,FINSEQ_3:25; 0+1<=len v by A1,NAT_1:13; then A11: len v in dom v by FINSEQ_3:25; reconsider r=v.(m+1) as Real; A12: i<=n by A5,FINSEQ_1:1; A13: 1<=m by A7,FINSEQ_3:25; A14: i+1<=n by A6,FINSEQ_1:1; A15: now assume not m+1 in dom v; then 1>m+1 or m+1>len v by FINSEQ_3:25; then A16: len v <=m by NAT_1:11,13; ir & i=r+1; defpred P[set] means for k,r st k=$1 & k>0 & m+k in dom v & r=v.(m+k ) holds r0 and A26: m+j in dom v and A27: s=v.(m+j); now per cases; suppose k=0; hence thesis by A21,A24,A27; end; suppose A28: k<>0; A29: m+k<=m+k+1 by NAT_1:11; m<=m+k by NAT_1:11; then A30: 1<=m+k by A13,XXREAL_0:2; A31: m+(k+1)<=len v by A24,A26,FINSEQ_3:25; then m+k<=len v by A29,XXREAL_0:2; then A32: m+k in dom v by A30,FINSEQ_3:25; then v.(m+k) in rng v by FUNCT_1:def 3; then v.(m+k) in Seg n by A2; then reconsider r1=v.(m+k) as Element of NAT; A33: r1s & r1=s+1; hence thesis by A33,XXREAL_0:2; end; suppose r1{} & rng v c= Seg n & v.1 = 1 & v.(len v) = n & (for k st 1<=k & k <=len v - 1 holds for r,s st r = v.k & s = v.(k+1) holds abs(r-s) = 1 or r=s) implies (for i st i in Seg n ex k st k in dom v & v.k = i) & for m,k,i,r st m in dom v & v.m = i & (for j st j in dom v & v.j = i holds j<=m) & m{} and A2: rng v c= Seg n and A3: v.1 = 1 and A4: v.(len v) = n and A5: for k st 1<=k & k<=len v - 1 holds for r,s st r = v.k & s = v.(k+1) holds abs(r-s) = 1 or r=s; defpred P[Element of NAT] means $1 in Seg n implies ex k st k in dom v & v.k = $1; A6: 0+1<=len v by A1,NAT_1:13; then A7: len v in dom v by FINSEQ_3:25; A8: for i st P[i] holds P[i+1] proof let i such that A9: i in Seg n implies ex k st k in dom v & v.k = i; assume A10: i+1 in Seg n; now per cases; suppose A11: i = 0; take k=1; thus k in dom v & v.k = i+1 by A3,A6,A11,FINSEQ_3:25; end; suppose A12: i<>0; defpred R[set] means $1 in dom v & v.$1 = i; A13: for k be Nat holds R[k] implies k<=len v by FINSEQ_3:25; i+1<=n by A10,FINSEQ_1:1; then A14: i<=n by NAT_1:13; A15: 0+1<=i by A12,NAT_1:13; then A16: ex k be Nat st R[k] by A9,A14,FINSEQ_1:1; consider m be Nat such that A17: R[m] & for k be Nat st R[k] holds k<=m from NAT_1:sch 6(A13, A16); A18: for k st R[k] holds k<=m by A17; reconsider m as Element of NAT by ORDINAL1:def 12; take k = m+1; i in Seg n by A15,A14,FINSEQ_1:1; hence k in dom v & v.k = i+1 by A1,A2,A4,A5,A10,A17,A18,Th45; end; end; hence thesis; end; A19: P[0] by FINSEQ_1:1; thus for i holds P[i] from NAT_1:sch 1(A19,A8); let m,k,i,r; assume that A20: m in dom v and A21: v.m = i and A22: for j st j in dom v & v.j = i holds j<=m and A23: mn; defpred P[set] means for j,s st j=$1 & j>0 & m+j in dom v & s=v.(m+j) holds i0 and A36: m+j in dom v and A37: s=v.(m+j); per cases; suppose k=0; hence thesis by A31,A34,A37,NAT_1:13; end; suppose A38: k<>0; m<=m+k by NAT_1:11; then A39: 1<=m+k by A27,XXREAL_0:2; s in rng v by A36,A37,FUNCT_1:def 3; then s in Seg n by A2; then reconsider s1=s as Element of NAT; A40: m+(k+1)<=len v by A34,A36,FINSEQ_3:25; m+k<=m+k+1 by NAT_1:11; then m+k<=len v by A40,XXREAL_0:2; then A41: m+k in dom v by A39,FINSEQ_3:25; then v.(m+k) in rng v by FUNCT_1:def 3; then v.(m+k) in Seg n by A2; then reconsider r1=v.(m+k) as Element of NAT; A42: is & r1=s+1; then A46: i<=s1 by A42,NAT_1:13; now per cases by A46,XXREAL_0:1; case i finite; coherence; end; theorem Th1: for f,g,h be FinSequence holds f,g are_fiberwise_equipotent iff f^h, g^h are_fiberwise_equipotent proof let f,g,h be FinSequence; thus f,g are_fiberwise_equipotent implies f^h, g^h are_fiberwise_equipotent proof assume A1: f,g are_fiberwise_equipotent; now let y; card Coim(f,y) = card Coim(g,y) by A1,CLASSES1:def 9; hence card Coim(f^h,y) = card Coim(g,y) + card Coim(h,y) by FINSEQ_3:57 .= card Coim(g^h,y) by FINSEQ_3:57; end; hence thesis by CLASSES1:def 9; end; assume A2: f^h,g^h are_fiberwise_equipotent; now let x; A3: card Coim(f^h,x) = card Coim(f,x)+card Coim(h,x) & card Coim(g^h,x) = card Coim(g,x)+card Coim(h,x) by FINSEQ_3:57; card Coim(f^h,x) = card Coim(g^h,x) by A2,CLASSES1:def 9; hence card Coim(f,x) = card Coim(g,x) by A3; end; hence thesis by CLASSES1:def 9; end; theorem for f,g be FinSequence holds f^g, g^f are_fiberwise_equipotent proof let f,g be FinSequence; let y; thus card Coim(f^g,y) = card(g"{y})+ card(f"{y}) by FINSEQ_3:57 .= card Coim(g^f,y) by FINSEQ_3:57; end; theorem Th3: for f,g be FinSequence st f,g are_fiberwise_equipotent holds len f = len g & dom f = dom g proof let f,g be FinSequence; A1: dom f = Seg len f by FINSEQ_1:def 3; assume f,g are_fiberwise_equipotent; then A2: card(f"(rng f)) = card(g"(rng f)) & rng f = rng g by CLASSES1:75,78; A3: Seg len g = dom g by FINSEQ_1:def 3; thus len f = card(Seg len f) by FINSEQ_1:57 .= card(g"(rng g)) by A1,A2,RELAT_1:134 .= card(Seg len g) by A3,RELAT_1:134 .= len g by FINSEQ_1:57; hence thesis by A1,FINSEQ_1:def 3; end; theorem Th4: for f,g be FinSequence holds f,g are_fiberwise_equipotent iff ex P be Permutation of dom g st f = g*P proof let f,g be FinSequence; thus f,g are_fiberwise_equipotent implies ex P be Permutation of dom g st f = g*P proof assume A1: f,g are_fiberwise_equipotent; then dom f = dom g by Th3; hence thesis by A1,CLASSES1:80; end; given P be Permutation of dom g such that A2: f = g*P; dom g = {} implies dom g = {}; then rng P c= dom g & dom P = dom g by FUNCT_2:def 1,RELAT_1:def 19; then dom f = dom g by A2,RELAT_1:27; hence thesis by A2,CLASSES1:80; end; defpred P[Nat] means for X be finite set,F be Function st card(dom(F|X)) = $1 ex a be FinSequence st F|X, a are_fiberwise_equipotent; Lm1: P[0] proof let X be finite set, F be Function; assume A1: card(dom(F|X)) = 0; take A = {}; let x; dom(F|X) = {} by A1; hence card Coim(F|X,x) = card Coim(A,x) by RELAT_1:132,XBOOLE_1:3; end; Lm2: for n st P[n] holds P[n+1] proof let n be Element of NAT; assume A1: P[n]; let X be finite set, F be Function; reconsider dx = dom(F|X) as finite set; set x = the Element of dx; set Y = X\{x}, dy = dom(F|Y); A2: dy = dom F /\ Y by RELAT_1:61; A3: dx = dom F /\ X by RELAT_1:61; A4: dy = dx \ {x} proof thus dy c= dx \ {x} proof let y; assume A5: y in dy; then y in X \ {x} by A2,XBOOLE_0:def 4; then A6: not y in {x} by XBOOLE_0:def 5; y in dom F by A2,A5,XBOOLE_0:def 4; then y in dx by A2,A3,A5,XBOOLE_0:def 4; hence thesis by A6,XBOOLE_0:def 5; end; let y; assume A7: y in dx \{x}; then ( not y in {x})& y in X by A3,XBOOLE_0:def 4,def 5; then A8: y in Y by XBOOLE_0:def 5; y in dom F by A3,A7,XBOOLE_0:def 4; hence thesis by A2,A8,XBOOLE_0:def 4; end; assume A9: card dom(F|X) = n+1; then {x} c= dx by CARD_1:27,ZFMISC_1:31; then card(dom(F|Y)) = card dx - card {x} by A4,CARD_2:44 .= n+1-1 by A9,CARD_1:30 .= n; then consider a be FinSequence such that A10: F|Y, a are_fiberwise_equipotent by A1; take A = a^<* F.x *>; dx <> {} by A9; then x in dx; then A11: x in dom F /\ X by RELAT_1:61; then x in dom F by XBOOLE_0:def 4; then A12: {x} c= dom F by ZFMISC_1:31; x in X by A11,XBOOLE_0:def 4; then A13: {x} c= X by ZFMISC_1:31; now let y; A14: Y misses {x} by XBOOLE_1:79; A15: (F|Y)"{y} \/ (F|{x})"{y} = (Y /\ F"{y}) \/ (F|{x})"{y} by FUNCT_1:70 .= (Y /\ F"{y}) \/ ({x} /\ F"{y}) by FUNCT_1:70 .= (Y \/ {x}) /\ F"{y} by XBOOLE_1:23 .= (X \/ {x}) /\ F"{y} by XBOOLE_1:39 .= X /\ F"{y} by A13,XBOOLE_1:12 .= (F|X)"{y} by FUNCT_1:70; reconsider FF = <*F.x*>"{y} as finite set; A16: card Coim(F|Y,y) = card Coim(a,y) by A10,CLASSES1:def 9; A17: dom(F|{x}) = {x} by A12,RELAT_1:62; A18: dom<*F.x*> = {1} by FINSEQ_1:2,38; A19: now per cases; case A20: y = F.x; A21: {x} c= (F|{x})"{y} proof let z be set; A22: y in {y} by TARSKI:def 1; assume A23: z in {x}; then z = x by TARSKI:def 1; then y = (F|{x}).z by A17,A20,A23,FUNCT_1:47; hence thesis by A17,A23,A22,FUNCT_1:def 7; end; (F|{x})"{y} c= {x} by A17,RELAT_1:132; then (F|{x})"{y} = {x} by A21,XBOOLE_0:def 10; then A24: card((F|{x})"{y}) = 1 by CARD_1:30; A25: {1} c= <*F.x*>"{y} proof let z be set; A26: y in {y} by TARSKI:def 1; assume A27: z in {1}; then z = 1 by TARSKI:def 1; then y = <*F.x*>.z by A20,FINSEQ_1:40; hence thesis by A18,A27,A26,FUNCT_1:def 7; end; <*F.x*>"{y} c= {1} by A18,RELAT_1:132; then <*F.x*>"{y} = {1} by A25,XBOOLE_0:def 10; hence card((F|{x})"{y}) = card FF by A24,CARD_1:30; end; case A28: y <> F.x; A29: now set z = the Element of <*F.x*>"{y}; assume A30: <*F.x*>"{y} <> {}; then <*F.x*>.z in {y} by FUNCT_1:def 7; then A31: <*F.x*>.z = y by TARSKI:def 1; z in {1} by A18,A30,FUNCT_1:def 7; then z = 1 by TARSKI:def 1; hence contradiction by A28,A31,FINSEQ_1:40; end; now set z = the Element of (F|{x})"{y}; assume A32: (F|{x})"{y} <> {}; then (F|{x}).z in {y} by FUNCT_1:def 7; then A33: (F|{x}).z = y by TARSKI:def 1; A34: z in {x} by A17,A32,FUNCT_1:def 7; then z = x by TARSKI:def 1; hence contradiction by A17,A28,A34,A33,FUNCT_1:47; end; hence card((F|{x})"{y}) = card FF by A29; end; end; (F|Y)"{y} /\ (F|{x})"{y} = Y /\ (F"{y}) /\ (F|{x})"{y} by FUNCT_1:70 .= Y /\ F"{y} /\ ({x} /\ F"{y}) by FUNCT_1:70 .= F"{y} /\ Y /\ {x} /\ F"{y} by XBOOLE_1:16 .= F"{y} /\ (Y /\ {x}) /\ F"{y} by XBOOLE_1:16 .= {} /\ F"{y} by A14,XBOOLE_0:def 7 .= {}; hence card Coim(F|X,y) = card((F|Y)"{y}) + card FF - card {} by A15,A19, CARD_2:45 .= card Coim(A,y) by A16,FINSEQ_3:57; end; hence thesis by CLASSES1:def 9; end; theorem for F be Function, X be finite set ex f be FinSequence st F|X, f are_fiberwise_equipotent proof let F be Function, X be finite set; A1: card(dom(F|X)) = card(dom(F|X)); for n holds P[n] from NAT_1:sch 1(Lm1,Lm2); hence thesis by A1; end; definition let n be Nat, f be FinSequence; func f /^ n -> FinSequence means :Def1: len it = len f - n & for m be Nat st m in dom it holds it.m = f.(m+n) if n<=len f otherwise it = {}; existence proof thus n<=len f implies ex p1 be FinSequence st len p1 = len f - n & for m be Nat st m in dom p1 holds p1.m = f.(m+n) proof assume n<=len f; then reconsider k = len f - n as Element of NAT by NAT_1:21; deffunc F(Nat)=f.($1+n); consider p be FinSequence such that A1: len p = k & for m be Nat st m in dom p holds p.m = F(m) from FINSEQ_1:sch 2; take p; thus len p = len f - n by A1; let m be Nat; assume m in dom p; hence thesis by A1; end; thus thesis; end; uniqueness proof let p1,p2 be FinSequence; thus n<=len f & (len p1 = len f - n & for m be Nat st m in dom p1 holds p1 .m = f.(m+n)) & (len p2 = len f - n & for m be Nat st m in dom p2 holds p2.m = f.(m+n)) implies p1 = p2 proof assume that n<=len f and A2: len p1 = len f - n and A3: for m be Nat st m in dom p1 holds p1.m = f.(m+n) and A4: len p2 = len f - n and A5: for m be Nat st m in dom p2 holds p2.m = f.(m+n); A6: dom p1 = Seg len p1 & Seg len p2 = dom p2 by FINSEQ_1:def 3; now let m be Nat; assume A7: m in dom p1; then p1.m = f.(m+n) by A3; hence p1.m = p2.m by A2,A4,A5,A6,A7; end; hence thesis by A2,A4,FINSEQ_2:9; end; thus thesis; end; consistency; end; definition let D be set, n be Nat, f be FinSequence of D; redefine func f /^ n -> FinSequence of D; coherence proof set p = f /^ n; per cases; suppose A1: n<=len f; then reconsider k = len f - n as Element of NAT by NAT_1:21; A2: len p = k by A1,Def1; rng p c= rng f proof let x; assume x in rng p; then consider m being Nat such that A3: m in dom p and A4: p.m = x by FINSEQ_2:10; m<=len p by A3,FINSEQ_3:25; then A5: m+n<=len f by A2,XREAL_1:19; A6: m<=m+n by NAT_1:11; 1<=m by A3,FINSEQ_3:25; then 1<=m+n by A6,XXREAL_0:2; then A7: m+n in dom f by A5,FINSEQ_3:25; p.m = f.(m+n) by A1,A3,Def1; hence thesis by A4,A7,FUNCT_1:def 3; end; then rng p c= D by XBOOLE_1:1; hence thesis by FINSEQ_1:def 4; end; suppose len f < n; then f /^ n = <*>D by Def1; hence thesis; end; end; end; Lm3: for n be Nat for D be non empty set, f be FinSequence of D st len f<=n holds (f|n) = f proof let n be Nat; let D be non empty set,f be FinSequence of D; A1: dom f = Seg len f by FINSEQ_1:def 3; assume len f<=n; then f|n = f|Seg n & dom f c= Seg n by A1,FINSEQ_1:5,def 15; hence thesis by RELAT_1:68; end; theorem Th6: for D be non empty set, f be FinSequence of D, n,m be Nat holds n in dom f & m in Seg n implies (f|n).m = f.m & m in dom f proof let D be non empty set,f be FinSequence of D, n,m be Nat; assume that A1: n in dom f and A2: m in Seg n; A3: f|n = f|Seg n by FINSEQ_1:def 15; dom f = Seg len f & n<=len f by A1,FINSEQ_1:def 3,FINSEQ_3:25; then A4: Seg n c= dom f by FINSEQ_1:5; then Seg n = dom f /\ Seg n by XBOOLE_1:28 .= dom(f|n) by A3,RELAT_1:61; hence thesis by A2,A3,A4,FUNCT_1:47; end; theorem Th7: for D be non empty set, f be FinSequence of D, n be Nat, x be set st len f = n+1 & x = f.(n+1) holds f = (f|n) ^ <*x*> proof let D be non empty set, f be FinSequence of D, n be Nat,x; assume that A1: len f = n+1 and A2: x = f.(n+1); set fn = f|n; A3: len fn = n by A1,FINSEQ_1:59,NAT_1:11; A4: dom f = Seg len f by FINSEQ_1:def 3; A5: n<=n+1 by NAT_1:11; A6: now let m be Nat; assume A7: m in dom f; then A8: 1<=m by A4,FINSEQ_1:1; A9: m<=len f by A4,A7,FINSEQ_1:1; now per cases; case m = len f; hence f.m = (fn^<*x*>).m by A1,A2,A3,FINSEQ_1:42; end; case m <> len f; then m).m = fn.m by FINSEQ_1:def 7 .= f.m by A3,A13,A11,A12,Th6; end; end; hence f.m = (fn^<*x*>).m; end; len (fn^<*x*>) = n + len <*x*> by A3,FINSEQ_1:22 .= len f by A1,FINSEQ_1:40; hence thesis by A6,FINSEQ_2:9; end; theorem Th8: for D be non empty set, f be FinSequence of D, n be Nat holds (f|n)^(f/^n) = f proof let D be non empty set, f be FinSequence of D,n be Nat; set fn = f/^n; now per cases; case len fD & f|n = f by Def1,Lm3; hence thesis by FINSEQ_1:34; end; case A1: n<=len f; A2: dom f = Seg len f by FINSEQ_1:def 3; A3: len (f|n) = n by A1,FINSEQ_1:59; A4: len fn = len f - n by A1,Def1; then A5: len ((f|n)^(f/^n)) = n+(len f - n) by A3,FINSEQ_1:22 .= len f; A6: dom(f|n) = Seg n by A3,FINSEQ_1:def 3; now let m be Nat; assume A7: m in dom f; then A8: m<=len f by A2,FINSEQ_1:1; A9: 1<=m by A2,A7,FINSEQ_1:1; now per cases; case A10: m<=n; then 1<=n by A9,XXREAL_0:2; then A11: n in dom f by A1,FINSEQ_3:25; A12: m in Seg n by A9,A10,FINSEQ_1:1; hence ((f|n)^(f/^n)).m = (f|n).m by A6,FINSEQ_1:def 7 .= f.m by A12,A11,Th6; end; case A13: n by A10,A12,Th7; set fn = f|n; A15: g = (g|m)^(g/^m) by Th8; A16: gm|m1 = gm|(Seg m1) by FINSEQ_1:def 15 .= (g|(Seg m))|(Seg m1) by FINSEQ_1:def 15 .= g|((Seg m)/\(Seg m1)) by RELAT_1:71 .= g|(Seg m1) by A13,XBOOLE_1:28 .= g|m1 by FINSEQ_1:def 15; A17: f = fn ^ <*a*> by A6,Th7; now let x; card Coim(f,x) = card Coim(g,x) by A5,CLASSES1:def 9; then card(fn"{x}) + card(<*a*>"{x}) = card(((g|m1)^<*a*>^(g/^m))"{x}) by A15 ,A14,A16,A17,FINSEQ_3:57 .= card(((g|m1)^<*a*>)"{x}) + card((g/^m)"{x}) by FINSEQ_3:57 .= card((g|m1)"{x})+ card(<*a*>"{x}) + card((g/^m)"{x}) by FINSEQ_3:57 .= card((g|m1)"{x}) + card((g/^m)"{x})+ card(<*a*>"{x}) .= card(((g|m1)^(g/^m))"{x})+ card(<*a*>"{x}) by FINSEQ_3:57; hence card Coim(fn,x) = card Coim((g|m1)^(g/^m),x); end; then A18: fn, (g|m1)^(g/^m) are_fiberwise_equipotent by CLASSES1:def 9; len fn = n by A6,FINSEQ_1:59,NAT_1:11; then Sum fn = Sum((g|m1)^gg) by A4,A18; hence Sum f = Sum((g|m1)^gg) + Sum <*a*> by A17,RVSUM_1:75 .= Sum(g|m1) + Sum gg+ Sum <*a*> by RVSUM_1:75 .= Sum(g|m1)+ Sum <*a*> + Sum gg .= Sum gm + Sum gg by A14,A16,RVSUM_1:75 .= Sum g by A15,RVSUM_1:75; end; A19: P[0] proof let f,g be FinSequence of REAL; assume f,g are_fiberwise_equipotent & len f = 0; then A20: len g = 0 & f = <*>REAL by Th3; then g = <*>REAL; hence thesis by A20; end; for n holds P[n] from NAT_1:sch 1(A19,A3); hence thesis by A1,A2; end; definition let R be FinSequence of REAL; func MIM(R) -> FinSequence of REAL means :Def2: len it = len R & it.(len it) = R.(len R) & for n be Nat st 1 <= n & n <= len it - 1 holds it.n = (R.n) - (R.(n+1)); existence proof per cases; suppose A1: len R = 0; take a = R; thus len a = len R & a.(len a) = R.(len R); let n be Nat; assume 1<=n & n<=len a - 1; hence thesis by A1,XXREAL_0:2; end; suppose len R <> 0; then 0; thus A4: len a = len p + len <*t*> by FINSEQ_1:22 .= l+len <*t*> by A3,FINSEQ_1:def 3 .= l+1 by FINSEQ_1:39 .= len R; hence a.(len a) = a.(l+1) .= a.(len p +1) by A3,FINSEQ_1:def 3 .= R.(len R) by FINSEQ_1:42; let n be Nat; assume 1<=n & n<=len a - 1; then A5: n in Seg l by A4,FINSEQ_1:1; then p.n = R.n - R.(n+1) by A3; hence thesis by A3,A5,FINSEQ_1:def 7; end; end; uniqueness proof let p1,p2 be FinSequence of REAL; assume that A6: len p1 = len R and A7: p1.(len p1) = R.(len R) and A8: for n be Nat st 1<=n & n<=len p1 - 1 holds p1.n = R.n - R.(n+1) and A9: len p2 = len R and A10: p2.(len p2) = R.(len R) and A11: for n be Nat st 1<=n & n<=len p2 - 1 holds p2.n = R.n - R.(n+1); A12: dom p1 = Seg len R by A6,FINSEQ_1:def 3; now let n be Nat; set r = R.n; assume A13: n in dom p1; then A14: 1<=n by A12,FINSEQ_1:1; A15: n<=len R by A12,A13,FINSEQ_1:1; now per cases; case n = len R; hence p1.n = p2.n by A6,A7,A9,A10; end; case A16: n <> len R; set s = R.(n+1); n proof let R be FinSequence of REAL, s,n; assume that A1: len R = n+2 and A2: R.(n+1) = s; set f1 = R|(n+1), m1 = MIM(f1), mf = MIM(R), fn = mf|n; 0).m by A13,A9,FINSEQ_1:42; end; case m <> n+1; then A19: m).m by A13,A10,A21,FINSEQ_1:def 7; 1<=m+1 & m+1<=n+1 by A19,NAT_1:11,13; then m+1 in Seg(n+1) by FINSEQ_1:1; then A24: f1.(m+1) = r2 by A1,A5,Th6; len m1 -1 = n & f1.m = r1 by A1,A7,A5,A8,A16,Th6; hence m1.m = (fn^<*s*>).m by A17,A20,A23,A24,Def2; end; end; hence m1.m = (fn^<*s*>).m; end; len(fn^<*s*>) = n + len <*s*> by A13,FINSEQ_1:22 .= n+1 by FINSEQ_1:40; hence thesis by A7,A15,FINSEQ_2:9; end; theorem Th11: for R be FinSequence of REAL, r,s be Real, n be Element of NAT st len R = n+2 & R.(n+1) = r & R.(n+2) = s holds MIM(R) = MIM(R)|n ^ <* r-s,s *> proof let R be FinSequence of REAL, r,s,n; set mf = MIM(R), nf = mf|n; assume that A1: len R = n+2 and A2: R.(n+1) = r and A3: R.(n+2) = s; A4: len mf = n+2 by A1,Def2; then A5: dom mf = Seg(n+2) by FINSEQ_1:def 3; A6: n+(1+1) = n+1+1; then n+1<=n+2 by NAT_1:11; then A7: n) = n + len <* r-s,s *> by FINSEQ_1:22; then A9: len(nf^<* r-s,s *>) = n+2 by FINSEQ_1:44; A10: n<=n+2 by NAT_1:11; now let m be Nat; assume A11: m in dom mf; then A12: 1<=m by A5,FINSEQ_1:1; A13: m<=n+2 by A5,A11,FINSEQ_1:1; now per cases; case A14: m = n+2; hence mf.m = s by A1,A3,A4,Def2 .= <* r-s,s *>.(n+2-n) by FINSEQ_1:44 .= (nf ^ <* r-s,s *>).m by A8,A9,A7,A14,FINSEQ_1:24; end; case m <> n+2; then m.(n+1-n) by FINSEQ_1:44 .= (nf ^ <* r-s,s *>).m by A8,A9,A13,A17,A18,FINSEQ_1:24; end; case m <> n+1; then m).m by A8,A20,A22,FINSEQ_1:def 7; end; end; hence mf.m = (nf ^ <* r-s,s *>).m; end; end; hence mf.m = (nf ^ <* r-s,s *>).m; end; hence thesis by A4,A9,FINSEQ_2:9; end; theorem Th12: MIM( <*>REAL ) = <*>REAL proof set o = <*>REAL, mo = MIM(o); len mo = len o by Def2; hence thesis; end; theorem Th13: for r be Real holds MIM(<*r*>) = <*r*> proof let r be Real; set f = <*r*>; A1: len f = 1 by FINSEQ_1:40; then A2: len MIM(f) = 1 by Def2; then A3: dom MIM(f) = Seg 1 by FINSEQ_1:def 3; now let n be Nat; assume n in dom MIM(f); then n = 1 by A3,FINSEQ_1:2,TARSKI:def 1; hence MIM(f).n = f.n by A1,A2,Def2; end; hence thesis by A1,A2,FINSEQ_2:9; end; theorem for r,s be Real holds MIM(<*r,s*>) = <*r-s,s*> proof let r,s be Real; set f = <*r,s*>; A1: len f = 2 & f.1 = r by FINSEQ_1:44; A2: f.2 = s by FINSEQ_1:44; 0 qua Nat+2 = 2 & 0 qua Nat +1 = 1; then MIM(f) = MIM(f)|0 ^ <*r-s,s*> by A1,A2,Th11; hence thesis by FINSEQ_1:34; end; theorem for R be FinSequence of REAL, n be Element of NAT holds MIM(R) /^ n = MIM(R/^n) proof let R be FinSequence of REAL,n; set mf = MIM(R), fn = R/^n, mn = MIM(fn); A1: len mf = len R by Def2; A2: len mn = len fn by Def2; now per cases; case A3: len RREAL by A1,Def1; hence thesis by A3,Def1,Th12; end; case A4: n<=len R; then A5: len(mf/^n) = len R - n by A1,Def1; A6: len mn = len fn by Def2; then A7: dom mn = Seg len fn by FINSEQ_1:def 3; A8: Seg len(mf/^n) = dom(mf/^n) by FINSEQ_1:def 3; A9: len fn = len R - n by A4,Def1; A10: Seg len fn = dom fn by FINSEQ_1:def 3; now let m be Nat; set r1 = R.(m+n); assume A11: m in dom mn; then A12: 1<=m by A7,FINSEQ_1:1; A13: m<=len fn by A7,A11,FINSEQ_1:1; A14: fn.m = r1 by A4,A10,A7,A11,Def1; m<=m+n by NAT_1:11; then A15: 1<=m+n by A12,XXREAL_0:2; now per cases; case A16: m = len fn; thus (mf/^n).m = mf.(m+n) by A1,A4,A5,A9,A8,A7,A11,Def1 .= r1 by A1,A9,A16,Def2 .= mn.m by A6,A14,A16,Def2; end; case m <> len fn; then m 0 holds Sum MIM(R) = R. 1 proof defpred P[Nat] means for R be FinSequence of REAL st len R <> 0 & len R = $1 holds Sum MIM(R) = R.1; let R be FinSequence of REAL; assume A1: len R <> 0; A2: for n st P[n] holds P[n+1] proof let n; assume A3: P[n]; let R be FinSequence of REAL; assume that len R <> 0 and A4: len R = n+1; now per cases; case n = 0; then A5: R = <*R.1*> by A4,FINSEQ_1:40; then MIM(R) = R by Th13; hence thesis by A5,FINSOP_1:11; end; case n <> 0; then 0) by A4,Th11 .= Sum(MIM(R)|n1) + Sum(<* r-s,s *>) by RVSUM_1:75 .= Sum(MIM(R)|n1) + (r-s + s) by RVSUM_1:77 .= Sum((MIM(R)|n1) ^<*r*>) by RVSUM_1:74 .= Sum MIM(f1) by A9,Th10 .= f1.1 by A3,A10 .= R.1 by A4,A8,A7,Th6; end; end; hence thesis; end; A11: P[0]; for n holds P[n] from NAT_1:sch 1(A11,A2); hence thesis by A1; end; theorem for R be FinSequence of REAL, n be Element of NAT st n 0 by A1,A2; hence Sum MIM(R/^n) = (R/^n).1 by Th16 .= R.(n+1) by A1,A3,Def1; end; definition let IT be FinSequence of REAL; redefine attr IT is non-increasing means :Def3: for n be Element of NAT st n in dom IT & n+1 in dom IT holds IT.n >= IT.(n+1); compatibility proof thus IT is non-increasing implies for n be Element of NAT st n in dom IT & n+1 in dom IT holds IT.n >= IT.(n+1) proof assume A1: IT is non-increasing; let n be Element of NAT such that A2: n in dom IT & n+1 in dom IT; n+(0 qua Nat) <= n+1 by XREAL_1:6; hence thesis by A1,A2,SEQM_3:def 4; end; assume A3: for n be Element of NAT st n in dom IT & n+1 in dom IT holds IT.n >= IT.(n+1); let m, n such that A4: m in dom IT and A5: n in dom IT & m <= n; defpred P[Nat] means $1 in dom IT & m <= $1 implies IT.m >= IT.$1; A6: for k being Element of NAT st P[k] holds P[k+1] proof let k be Element of NAT such that A7: P[k] and A8: k+1 in dom IT; assume m <= k+1; then A9: m < k+1 or m = k+1 by XXREAL_0:1; per cases by A9,NAT_1:13; suppose A10: m <= k; k+(0 qua Nat) <= k+1 & k+1 <= len IT by A8,FINSEQ_3:25,XREAL_1:6; then A11: k <= len IT by XXREAL_0:2; 1 <= m by A4,FINSEQ_3:25; then A12: 1 <= k by A10,XXREAL_0:2; then k in dom IT by A11,FINSEQ_3:25; then IT.k >= IT.(k+1) by A3,A8; hence thesis by A7,A10,A12,A11,FINSEQ_3:25,XXREAL_0:2; end; suppose m = k+1; hence thesis; end; end; A13: P[0] by FINSEQ_3:24; for k being Element of NAT holds P[k] from NAT_1:sch 1(A13,A6); hence thesis by A5; end; end; registration cluster non-increasing for FinSequence of REAL; existence proof take <*>REAL; let n; thus thesis; end; end; theorem Th18: for R be FinSequence of REAL st len R = 0 or len R = 1 holds R is non-increasing proof let R be FinSequence of REAL; assume A1: len R = 0 or len R = 1; now per cases by A1; case len R = 0; then R = <*>REAL; then for n st n in dom R & n+1 in dom R holds R.n>=R.(n+1); hence thesis by Def3; end; case len R = 1; then A2: dom R = {1} by FINSEQ_1:2,def 3; now let n; assume that A3: n in dom R and A4: n+1 in dom R; n = 1 by A2,A3,TARSKI:def 1; hence R.n>=R.(n+1) by A2,A4,TARSKI:def 1; end; hence thesis by Def3; end; end; hence thesis; end; theorem Th19: for R be FinSequence of REAL holds R is non-increasing iff for n ,m be Element of NAT st n in dom R & m in dom R & n=R.m proof let R be FinSequence of REAL; thus R is non-increasing implies for n,m st n in dom R & m in dom R & n=R.m proof defpred P[Nat] means $1 in dom R implies for n st n in dom R & n<$1 holds R.n>=R.$1; assume A1: R is non-increasing; A2: for m st P[m] holds P[m+1] proof let m; assume A3: P[m]; assume A4: m+1 in dom R; then m+1<=len R by FINSEQ_3:25; then A5: m<=len R by NAT_1:13; let n; assume that A6: n in dom R and A7: n m; then n=t by A3,A6,A9,A5,FINSEQ_3:25; t>=s by A1,A4,A10,Def3; hence thesis by A11,XXREAL_0:2; end; end; hence thesis; end; Seg len R = dom R by FINSEQ_1:def 3; then A12: P[0] by FINSEQ_1:1; for m holds P[m] from NAT_1:sch 1(A12,A2); hence thesis; end; assume A13: for n,m st n in dom R & m in dom R & n=R.m; let n; A14: n 0; then 0=fn.(m+1) by A5,Def3; end; hence thesis by Def3; end; end; hence thesis; end; end; hence thesis; end; theorem for R be non-increasing FinSequence of REAL, n be Element of NAT holds R /^ n is non-increasing proof let f be non-increasing FinSequence of REAL, n; set fn = f /^ n; now let m; assume that A1: m in dom fn and A2: m+1 in dom fn; A3: m<=m+n by NAT_1:11; 1<=m by A1,FINSEQ_3:25; then A4: 1<=m+n by A3,XXREAL_0:2; A5: 1<=m+n+1 by NAT_1:11; A6: m+1<=len fn by A2,FINSEQ_3:25; set r = fn.m, s = fn.(m+1); A7: m+1+n = m+n+1; A8: m<=len fn by A1,FINSEQ_3:25; now per cases; case A9: n<=len f; then A10: len fn = len f - n by Def1; then m+n<=len f by A8,XREAL_1:19; then A11: m+n in dom f by A4,FINSEQ_3:25; m+n+1<=len f by A6,A7,A10,XREAL_1:19; then A12: m+n+1 in dom f by A5,FINSEQ_3:25; r = f.(m+n) & s = f.(m+n+1) by A1,A2,A7,A9,Def1; hence r>=s by A11,A12,Def3; end; case len fREAL by Def1; hence r>=s; end; end; hence r>=s; end; hence thesis by Def3; end; Lm4: for f,g be non-increasing FinSequence of REAL, n st len f = n+1 & len f = len g & f,g are_fiberwise_equipotent holds f.(len f) = g.(len g) & f|n, g|n are_fiberwise_equipotent proof let f,g be non-increasing FinSequence of REAL, n; assume that A1: len f = n+1 and A2: len f = len g and A3: f,g are_fiberwise_equipotent; set r = f.(n+1), s = g.(n+1); 0 by A1,Th7; A7: n+1 in dom g by A1,A2,A4,FINSEQ_3:25; A8: now A9: rng f = rng g by A3,CLASSES1:75; assume A10: r <> s; now per cases by A10,XXREAL_0:1; case A11: r>s; s in rng f by A7,A9,FUNCT_1:def 3; then consider m be Nat such that A12: m in dom f and A13: f.m = s by FINSEQ_2:10; A14: m<=len f by A12,FINSEQ_3:25; now per cases; case m = len f; hence contradiction by A1,A11,A13; end; case m <> len f; then m len g; then m by A1,A2,A8,Th7; now let x; card Coim(f|n,x) + card(<*r*>"{x}) = card Coim(f,x) by A6,FINSEQ_3:57 .= card Coim(g,x) by A3,CLASSES1:def 9 .= card Coim(g|n,x) + card(<*r*>"{x}) by A19,FINSEQ_3:57; hence card Coim(f|n,x) = card Coim(g|n,x); end; hence thesis by CLASSES1:def 9; end; defpred P[Nat] means for R be FinSequence of REAL st $1 = len R ex b be non-increasing FinSequence of REAL st R,b are_fiberwise_equipotent; Lm5: P[0] proof let R be FinSequence of REAL; assume len R = 0; then reconsider a = R as non-increasing FinSequence of REAL by Th18; take a; thus thesis; end; Lm6: for n st P[n] holds P[n+1] proof let n; assume A1: P[n]; let R be FinSequence of REAL; set fn = R|(Seg n); A2: fn = R|n by FINSEQ_1:def 15; set q = R.(n+1); reconsider fn as FinSequence by FINSEQ_1:15; rng fn c= rng R by RELAT_1:70; then rng fn c= REAL by XBOOLE_1:1; then reconsider fn as FinSequence of REAL by FINSEQ_1:def 4; n<=n+1 by NAT_1:11; then A3: dom fn = dom R /\ Seg n & Seg n c= Seg(n+1) by FINSEQ_1:5,RELAT_1:61; assume A4: n+1 = len R; then dom R = Seg(n+1) by FINSEQ_1:def 3; then dom fn = Seg n by A3,XBOOLE_1:28; then A5: len fn = n by FINSEQ_1:def 3; then consider a be non-increasing FinSequence of REAL such that A6: fn,a are_fiberwise_equipotent by A1; A7: len fn = len a by A6,Th3; A8: Seg len a = dom a by FINSEQ_1:def 3; now per cases; case A9: for t be Real st t in rng a holds q<=t; set b = a^<*q*>; A10: len b = n + len <*q*> by A5,A7,FINSEQ_1:22 .= n+1 by FINSEQ_1:39; now let m; assume that A11: m in dom b and A12: m+1 in dom b; A13: 1<=m+1 by A12,FINSEQ_3:25; set r = b.m, s = b.(m+1); A14: 1<=m by A11,FINSEQ_3:25; A15: m+1<=len b by A12,FINSEQ_3:25; then m<=n+1-1 by A10,XREAL_1:19; then m in Seg n by A14,FINSEQ_1:1; then A16: m in dom a by A5,A7,FINSEQ_1:def 3; then A17: r = a.m by FINSEQ_1:def 7; A18: a.m in rng a by A16,FUNCT_1:def 3; now per cases; case m+1 = len b; then s = q by A5,A7,A10,FINSEQ_1:42; hence r>=s by A9,A17,A18; end; case m+1 <> len b; then m+1=s by A16,A17,A19,Def3; end; end; hence r>=s; end; then reconsider b as non-increasing FinSequence of REAL by Def3; take b; fn^<*q*> = R by A4,A2,Th7; hence R,b are_fiberwise_equipotent by A6,Th1; end; case A20: ex t be Real st t in rng a & not q<=t; defpred Q[Nat] means $1 in dom a & for r st r = a.$1 holds r) = Seg len((a|k)^<*q*>) by FINSEQ_1:def 3; A32: dom (a|k) c= dom((a|k)^<*q*>) by FINSEQ_1:26; set ak = a/^k, b = (a|k)^<*q*>^ak; A33: dom (a|k) = Seg len (a|k) by FINSEQ_1:def 3; A34: len(a|k) = k by A28,A27,FINSEQ_1:59,XXREAL_0:2; then A35: len((a|k)^<*q*>) = k+len <*q*> by FINSEQ_1:22 .= k+1 by FINSEQ_1:39; then A36: len b = k+1 + len(a/^k) by FINSEQ_1:22; k+1<=len a by A26,FINSEQ_3:25; then A37: 1<=len(a/^k) by A30,XREAL_1:19; now let m; assume that A38: m in dom b and A39: m+1 in dom b; A40: 1<=m+1 by A39,FINSEQ_3:25; A41: m+1<=len b by A39,FINSEQ_3:25; set r = b.m, s = b.(m+1); A42: 1<=m by A38,FINSEQ_3:25; A43: m<=len b by A38,FINSEQ_3:25; now per cases; case A44: m+1<=k; dom(a|k) c= dom((a|k)^(a/^k)) by FINSEQ_1:26; then A45: dom(a|k) c= dom a by Th8; A46: dom a = Seg len a by FINSEQ_1:def 3; m<=k by A44,NAT_1:13; then A47: m in Seg k by A42,FINSEQ_1:1; 1<=k by A40,A44,XXREAL_0:2; then A48: k in dom a by A29,A46,FINSEQ_1:1; then A49: a.m = (a|k).m by A47,Th6; A50: m+1 in Seg k by A40,A44,FINSEQ_1:1; then A51: a.(m+1) = (a|k).(m+1) by A48,Th6; A52: b.(m+1) = ((a|k)^<*q*>).(m+1) by A34,A33,A32,A50,FINSEQ_1:def 7 .= a.(m+1) by A34,A33,A50,A51,FINSEQ_1:def 7; b.m = ((a|k)^<*q*>).m by A34,A33,A32,A47,FINSEQ_1:def 7 .= a.m by A34,A33,A47,A49,FINSEQ_1:def 7; hence r>=s by A34,A33,A47,A50,A52,A45,Def3; end; case k) by A35,A31,FINSEQ_1:4; then A55: b.(m+1) = ((a|k)^<*q*>).(k+1) by A54,FINSEQ_1:def 7 .= q by A34,FINSEQ_1:42; A56: m in Seg k by A42,A54,FINSEQ_1:1; A57: k in dom a by A8,A29,A42,A54,FINSEQ_1:1; then A58: a.m = (a|k).m by A56,Th6; A59: b.m = ((a|k)^<*q*>).m by A34,A33,A32,A56,FINSEQ_1:def 7 .= a.m by A34,A33,A56,A58,FINSEQ_1:def 7; now assume s>r; then for t be Real st t = a.k holds t=s; end; case k <> m; then k).(k+1) by A35,A31,A70,FINSEQ_1:def 7 .= q by A34,FINSEQ_1:42; A72: 1 in dom(a/^k) by A37,FINSEQ_3:25; b.(m+1) = (a/^k).(k+1+1 - (k+1)) by A35,A41,A61,A70, FINSEQ_1:24 .= a.mi by A29,A72,Def1; hence r>=s by A26,A71; end; case k+1 <> m; then A73: k+1=s by A67,A77,A76,Def3; end; end; hence r>=s; end; end; hence r>=s; end; end; hence r>=s; end; then reconsider b as non-increasing FinSequence of REAL by Def3; take b; now let x; A78: card Coim(fn,x) = card Coim(a,x) by A6,CLASSES1:def 9; thus card Coim(b,x) = card (((a|k)^<*q*>)"{x}) + card(ak"{x}) by FINSEQ_3:57 .= card((a|k)"{x}) + card(<*q*>"{x}) + card(ak"{x}) by FINSEQ_3:57 .= card((a|k)"{x}) + card(ak"{x}) + card(<*q*>"{x}) .= card(((a|k)^ak)"{x}) + card(<*q*>"{x}) by FINSEQ_3:57 .= card(fn"{x}) + card(<*q*>"{x}) by A78,Th8 .= card((fn^<*q*>)"{x}) by FINSEQ_3:57 .= card Coim(R,x) by A4,A2,Th7; end; hence R,b are_fiberwise_equipotent by CLASSES1:def 9; end; end; hence thesis; end; theorem Th22: for R be FinSequence of REAL ex R1 be non-increasing FinSequence of REAL st R,R1 are_fiberwise_equipotent proof let R be FinSequence of REAL; A1: len R = len R; for n holds P[n] from NAT_1:sch 1(Lm5,Lm6); hence thesis by A1; end; Lm7: for n holds for g1,g2 be non-increasing FinSequence of REAL st n = len g1 & g1,g2 are_fiberwise_equipotent holds g1 = g2 proof defpred P[Nat] means for g1,g2 be non-increasing FinSequence of REAL st $1 = len g1 & g1,g2 are_fiberwise_equipotent holds g1 = g2; A1: for n st P[n] holds P[n+1] proof let n; assume A2: P[n]; let g1,g2 be non-increasing FinSequence of REAL; set r = g1.(n+1); reconsider g1n = g1|n, g2n = g2|n as non-increasing FinSequence of REAL by Th20; assume that A3: len g1 = n+1 and A4: g1,g2 are_fiberwise_equipotent; A5: len g2 = len g1 by A4,Th3; then A6: g1.(len g1) = g2.(len g2) by A3,A4,Lm4; A7: (g1|n)^<*r*> = g1 by A3,Th7; len(g1|n) = n by A3,FINSEQ_1:59,NAT_1:11; then g1n = g2n by A2,A3,A4,A5,Lm4; hence thesis by A3,A5,A6,A7,Th7; end; A8: P[0] proof let g1,g2 be non-increasing FinSequence of REAL; assume len g1 = 0 & g1,g2 are_fiberwise_equipotent; then len g2 = len g1 & g1 = <*>REAL by Th3; hence thesis; end; thus for n holds P[n] from NAT_1:sch 1(A8,A1); end; theorem for R1,R2 be non-increasing FinSequence of REAL st R1,R2 are_fiberwise_equipotent holds R1 = R2 proof let g1,g2 be non-increasing FinSequence of REAL; A1: len g1 = len g1; assume g1,g2 are_fiberwise_equipotent; hence thesis by A1,Lm7; end; theorem for R be FinSequence of REAL, r,s be Real st r <> 0 holds R"{s/r} = (r *R)"{ s } proof let R be FinSequence of REAL, r,s; A1: Seg len R = dom R & dom(r*R) = Seg len(r*R) by FINSEQ_1:def 3; assume A2: r <> 0; thus R"{s/r} c= (r*R)"{s} proof let x; assume A3: x in R"{s/r}; then reconsider i = x as Element of NAT; R.i in {s/r} by A3,FUNCT_1:def 7; then R.i = s/r by TARSKI:def 1; then r*(R.i) = s by A2,XCMPLX_1:87; then (r*R).i = s by RVSUM_1:44; then A4: (r*R).i in {s} by TARSKI:def 1; i in dom R by A3,FUNCT_1:def 7; then i in dom (r*R) by A1,FINSEQ_2:33; hence thesis by A4,FUNCT_1:def 7; end; let x; assume A5: x in (r*R)"{s}; then reconsider i = x as Element of NAT; (r*R).i in {s} by A5,FUNCT_1:def 7; then (r*R).i = s by TARSKI:def 1; then r*R.i = s by RVSUM_1:44; then R.i = s/r by A2,XCMPLX_1:89; then A6: R.i in {s/r} by TARSKI:def 1; i in dom(r*R) by A5,FUNCT_1:def 7; then i in dom R by A1,FINSEQ_2:33; hence thesis by A6,FUNCT_1:def 7; end; theorem for R be FinSequence of REAL holds (0*R)"{0} = dom R proof let R be FinSequence of REAL; A1: Seg len(0*R) = dom(0*R) by FINSEQ_1:def 3; A2: len(0*R) = len R & dom R = Seg len R by FINSEQ_1:def 3,FINSEQ_2:33; hence (0*R)"{0} c= dom R by A1,RELAT_1:132; let x; assume A3: x in dom R; then reconsider i = x as Element of NAT; (0*R).i = 0*R.i by RVSUM_1:44 .= 0; then (0*R).i in {0} by TARSKI:def 1; hence thesis by A2,A1,A3,FUNCT_1:def 7; end; begin reserve f, g for Function; theorem for f, g st rng f = rng g & f is one-to-one & g is one-to-one holds f,g are_fiberwise_equipotent proof let f, g be Function such that A1: rng f = rng g and A2: f is one-to-one and A3: g is one-to-one; let x; per cases; suppose A4: x in rng f; then card Coim(f,x) = 1 by A2,FINSEQ_4:73; hence thesis by A1,A3,A4,FINSEQ_4:73; end; suppose A5: not x in rng f; then card(f"{x}) = 0 by CARD_1:27,FUNCT_1:72; hence thesis by A1,A5,CARD_1:27,FUNCT_1:72; end; end; theorem for D being set, f being FinSequence of D holds f /^ len f = {} proof let D be set, f be FinSequence of D; len (f /^ len f) = len f - len f by Def1 .= 0; hence thesis; end; theorem for f,g be Function,m,n be set st f.m=g.n & f.n=g.m & m in dom f & n in dom f & dom f = dom g & (for k be set st k<>m & k<>n & k in dom f holds f.k= g.k) holds f,g are_fiberwise_equipotent proof let f,g be Function,m,n be set; assume that A1: f.m=g.n and A2: f.n=g.m and A3: m in dom f and A4: n in dom f and A5: dom f = dom g and A6: for k be set st k<>m & k<>n & k in dom f holds f.k=g.k; set t=id dom f, nm=n .--> m,mn=m .--> n, p=t +* nm +* mn; A7: dom nm ={ n } by FUNCOP_1:13; A8: dom t = dom f; A9: rng t = dom (t") by FUNCT_1:33 .= dom f by A8,FUNCT_1:45; dom mn ={ m } by FUNCOP_1:13; then A10: dom p = dom (t +* nm) \/ {m} by FUNCT_4:def 1 .= dom t \/ {n} \/ {m} by A7,FUNCT_4:def 1 .= dom f \/ {n} \/ {m} .= dom f \/ {m} by A4,ZFMISC_1:40 .= dom f by A3,ZFMISC_1:40; A11: now let x be set; assume A12: x in dom f; then A13: (p*p).x=p.(p.x) by A10,FUNCT_1:13; per cases; suppose A14: x=m; hence (p*p).x=p.n by A13,FUNCT_4:89 .=x by A14,FUNCT_4:90; end; suppose A15: x<>m; now per cases; suppose A16: x=n; hence (p*p).x=p.m by A13,FUNCT_4:90 .=x by A16,FUNCT_4:89; end; suppose A17: x<>n; hence (p*p).x=p.(t.x) by A13,A15,FUNCT_4:91 .=p.x by A12,FUNCT_1:17 .=t.x by A15,A17,FUNCT_4:91 .=x by A12,FUNCT_1:17; end; end; hence (p*p).x=x; end; end; rng nm ={m} by FUNCOP_1:8; then rng t \/ rng nm =dom f by A3,ZFMISC_1:40; then A18: rng(t +* nm) \/ rng mn c= dom f \/ rng mn by FUNCT_4:17,XBOOLE_1:9; for z be set st z in rng(p*p) holds z in rng p by FUNCT_1:14; then A19: rng(p*p) c= rng p by TARSKI:def 3; A20: rng p c= rng(t +* nm) \/ rng mn by FUNCT_4:17; A21: rng mn ={n} by FUNCOP_1:8; then dom f \/ rng mn =dom p by A4,A10,ZFMISC_1:40; then A22: dom (p*p) =dom f by A10,A18,A20,RELAT_1:27,XBOOLE_1:1; then p*p=t by A11,FUNCT_1:17; then A23: p is one-to-one by A10,FUNCT_1:31; rng p c= dom f \/ rng mn by A18,A20,XBOOLE_1:1; then A24: rng p c= dom p by A4,A10,A21,ZFMISC_1:40; then A25: dom (g*p) =dom f by A5,A10,RELAT_1:27; now let x be set; assume A26: x in dom f; then A27: (g*p).x=g.(p.x) by A25,FUNCT_1:12; per cases; suppose x=m; hence (g*p).x=f.x by A1,A27,FUNCT_4:89; end; suppose A28: x<>m; now per cases; suppose x=n; hence (g*p).x=f.x by A2,A27,FUNCT_4:90; end; suppose A29: x<>n; hence (g*p).x=g.(t.x) by A27,A28,FUNCT_4:91 .=g.x by A26,FUNCT_1:17 .=f.x by A6,A26,A28,A29; end; end; hence (g*p).x=f.x; end; end; then A30: f=g*p by A25,FUNCT_1:2; rng(p*p)=dom f by A9,A22,A11,FUNCT_1:17; then rng p = dom g by A5,A10,A24,A19,XBOOLE_0:def 10; hence thesis by A10,A23,A30,CLASSES1:77; end; theorem for D being non empty set, f being FinSequence of D, k being Nat holds len (f/^k)=len f-'k proof let D be non empty set, f be FinSequence of D,k be Nat; per cases; suppose A1: k<=len f; then len f-'k=len f-k by XREAL_1:233; hence thesis by A1,Def1; end; suppose A2: k>len f; then (f/^k)=<*>D by Def1; then A3: len (f/^k)=0; len f-k<0 by A2,XREAL_1:49; hence thesis by A3,XREAL_0:def 2; end; end; theorem Th30: for f,g be FinSequence,x be set st x in dom g & f,g are_fiberwise_equipotent holds ex y be set st y in dom g & f.x=g.y proof let f,g be FinSequence,x be set; assume that A1: x in dom g and A2: f,g are_fiberwise_equipotent; consider P be Permutation of dom g such that A3: f = g*P by A2,Th4; take y=P.x; thus y in dom g by A1,FUNCT_2:5; thus thesis by A1,A3,FUNCT_2:15; end; theorem Th31: for f,g,h be FinSequence holds f,g are_fiberwise_equipotent iff h^f, h^g are_fiberwise_equipotent proof let f,g,h be FinSequence; thus f,g are_fiberwise_equipotent implies h^f, h^g are_fiberwise_equipotent proof assume A1: f,g are_fiberwise_equipotent; now let y be set; card Coim(f,y) = card Coim(g,y) by A1,CLASSES1:def 9; hence card Coim(h^f,y) = card(g"{y}) + card(h"{y}) by FINSEQ_3:57 .= card Coim(h^g,y) by FINSEQ_3:57; end; hence thesis by CLASSES1:def 9; end; assume A2: h^f,h^g are_fiberwise_equipotent; now let x be set; A3: card Coim(h^f,x) = card Coim(f,x)+card(h"{x}) & card((h^g)"{x}) = card(g"{x} )+card(h"{x}) by FINSEQ_3:57; card Coim(h^f,x) = card Coim(h^g,x) by A2,CLASSES1:def 9; hence card Coim(f,x) = card Coim(g,x) by A3; end; hence thesis by CLASSES1:def 9; end; theorem for f,g be FinSequence,m,n,j be Element of NAT st f,g are_fiberwise_equipotent & m<=n & n <= len f & (for i be Element of NAT st 1<=i & i<=m holds f.i=g.i) & (for i be Element of NAT st n m by XREAL_1:29; len s2=m+m2 by A5; then consider p2,q2 be FinSequence such that A21: len p2 = m and A22: len q2 = m2 and A23: s2 = p2^q2 by FINSEQ_2:22; A24: Seg m = dom p2 by A21,FINSEQ_1:def 3; len s1=m+m2 by A9; then consider p1,q1 be FinSequence such that A25: len p1 = m and A26: len q1 = m2 and A27: s1 = p1^q1 by FINSEQ_2:22; A28: f=p1^(q1^r1) by A11,A27,FINSEQ_1:32; A29: dom p1 = Seg m by A25,FINSEQ_1:def 3; A30: g=p2^(q2^r2) by A7,A23,FINSEQ_1:32; now let i be Nat; reconsider a = i as Element of NAT by ORDINAL1:def 12; assume A31: i in dom p1; then A32: 1<= i & i <= m by A29,FINSEQ_1:1; thus p1.i=f.i by A28,A31,FINSEQ_1:def 7 .=g.a by A4,A32 .=p2.i by A30,A24,A29,A31,FINSEQ_1:def 7; end; then p1=p2 by A25,A21,FINSEQ_2:9; then A33: q1,q2 are_fiberwise_equipotent by A27,A23,A19,Th31; assume that A34: m 0 by A34,A25,XREAL_1:50; then reconsider x=j-len p1 as Element of NAT by INT_1:3; A36: x <= n-len p1 by A35,XREAL_1:9; A37: Seg m2 = dom q2 by A22,FINSEQ_1:def 3; A38: 1+ 0<= x by A34,A25,INT_1:7,XREAL_1:50; then x in dom q2 by A25,A37,A36,FINSEQ_1:1; then consider y be set such that A39: y in dom q2 and A40: q1.x=q2.y by A33,Th30; reconsider y as Element of NAT by A39; A41: len p2 + y in dom s2 by A23,A39,FINSEQ_1:28; reconsider k=len p2+y as Element of NAT by ORDINAL1:def 12; take k; 1<=y by A37,A39,FINSEQ_1:1; then k>=len p2+1 by XREAL_1:6; hence m Subset of REAL; coherence proof {r} c= REAL proof let x be set; assume x in {r}; hence thesis by XREAL_0:def 1; end; hence thesis; end; end; theorem Th5: for X being real-membered set holds X is non empty bounded_above implies ex g st (for r st r in X holds r<=g) & for s st 0 real number means :Def1: (for r st r in X holds r<=it) & for s st 0 real number means :Def2: (for r st r in X holds it<=r) & for s st 0= r) & for t st for s st s in X holds s >= t holds r >= t holds r = lower_bound X proof let X be non empty real-membered set; assume that A1: for s st s in X holds s >= r and A2: for t st for s st s in X holds s >= t holds r >= t; A3: now let s be real number such that A4: 0 < s; assume for t be real number st t in X holds t >= r+s; then r >= r+s by A2; hence contradiction by A4,XREAL_1:29; end; X is bounded_below proof take r; let s be ext-real number; assume s in X; hence thesis by A1; end; hence thesis by A1,A3,Def2; end; Lm2: for X being non empty real-membered set, r st (for s st s in X holds s <= r) & for t st for s st s in X holds s <= t holds r <= t holds r = upper_bound X proof let X be non empty real-membered set, r; assume that A1: for s st s in X holds s <= r and A2: for t st for s st s in X holds s <= t holds r <= t; A3: now let s be real number such that A4: 0 < s; assume for t be real number st t in X holds r-s >= t; then r <= r-s by A2; then r+s <= r by XREAL_1:19; hence contradiction by A4,XREAL_1:29; end; X is bounded_above proof take r; let s be ext-real number; assume s in X; hence thesis by A1; end; hence thesis by A1,A3,Def1; end; registration let X be non empty bounded_below real-membered set; identify lower_bound X with inf X; compatibility proof A1: now let t; assume for s st s in X holds s >= t; then for x being ext-real number st x in X holds t <= x; then t is LowerBound of X by XXREAL_2:def 2; hence inf X >= t by XXREAL_2:def 4; end; for s st s in X holds s >= inf X by XXREAL_2:3; hence thesis by A1,Lm1; end; end; registration let X be non empty bounded_above real-membered set; identify upper_bound X with sup X; compatibility proof A1: now let t; assume for s st s in X holds t >= s; then for x being ext-real number st x in X holds x <= t; then t is UpperBound of X by XXREAL_2:def 1; hence t >= sup X by XXREAL_2:def 3; end; for s st s in X holds s <= sup X by XXREAL_2:4; hence thesis by A1,Lm2; end; end; definition let X; redefine func upper_bound X -> Real; coherence by XREAL_0:def 1; redefine func lower_bound X -> Real; coherence by XREAL_0:def 1; end; theorem Th9: lower_bound {r} = r & upper_bound {r} = r by XXREAL_2:11,13; theorem Th10: lower_bound {r} = upper_bound {r} proof lower_bound {r}=r by XXREAL_2:13; hence thesis by XXREAL_2:11; end; theorem X is real-bounded non empty implies lower_bound X <= upper_bound X proof assume X is real-bounded non empty; then reconsider X as real-bounded non empty real-membered set; lower_bound X <= upper_bound X by XXREAL_2:40; hence thesis; end; theorem X is real-bounded non empty implies ((ex r,p st r in X & p in X & p<>r) iff lower_bound X < upper_bound X) proof assume that A1: X is real-bounded and A2: X is non empty; thus (ex r,p st r in X & p in X & p<>r) implies lower_bound Xr; A6: now assume A7: r convergent for Real_Sequence; coherence by Th13; end; theorem seq is convergent implies lim abs seq = abs lim seq proof assume A1: seq is convergent; now let p; assume 0 convergent for Real_Sequence; coherence; end; registration cluster constant for Real_Sequence; existence proof take the constant Real_Sequence; thus thesis; end; end; registration let seq be convergent Real_Sequence; let k; cluster seq ^\ k -> convergent for Real_Sequence; coherence by Th16; end; theorem seq is convergent implies lim (seq^\k)=lim seq by Th17; theorem Th21: seq^\k is convergent implies seq is convergent proof assume seq^\k is convergent; then consider g1 such that A1: for p st 0

0 implies ex k st (seq ^\k) is non-zero proof assume that A1: seq is convergent and A2: lim seq<>0; consider n1 such that A3: for m st n1<=m holds abs(lim seq)/20 by A4,ABSVALUE:2; end; hence thesis by SEQ_1:5; end; theorem seq is convergent & lim seq<>0 implies ex seq1 st seq1 is subsequence of seq & seq1 is non-zero proof assume seq is convergent & lim seq <>0; then consider k such that A1: seq ^\k is non-zero by Th23; take seq ^\k; thus thesis by A1; end; theorem Th25: seq is constant & (r in rng seq or ex n st seq.n=r ) implies lim seq=r proof assume A1: seq is constant; then consider r1 being Real such that A2: rng seq={r1} by FUNCT_2:111; A3: now assume that A4: r in rng seq; consider r2 being Real such that A5: for n being Nat holds seq.n=r2 by A1,VALUED_0:def 18; A6: r=r1 by A4,A2,TARSKI:def 1; now let p such that A7: 00 implies for seq1 st seq1 is subsequence of seq & seq1 is non-zero holds lim (seq1")=(lim seq)" proof assume that A1: seq is convergent and A2: lim seq<>0; let seq1 such that A3: seq1 is subsequence of seq and A4: seq1 is non-zero; lim seq1=lim seq by A1,A3,Th17; hence thesis by A1,A2,A3,A4,Th16,SEQ_2:22; end; theorem Th28: 0<=r & (for n holds seq.n=1/(n+r)) implies seq is convergent proof assume that A1: 0<=r and A2: for n holds seq.n=1/(n+r); take 0; let p; assume A3: 00 by A3; then k1>=1+(0 qua Nat) by NAT_1:13; then k1<=k1*k1 by XREAL_1:151; then A6: k1+r<=k1*k1+r by XREAL_1:6; take n=k1; let m such that A7: n<=m; n*n<=m*m by A7,XREAL_1:66; then A8: n*n+r<=m*m+r by XREAL_1:6; p"+(0 qua Nat)0 by A4; then k1>=1+(0 qua Nat) by NAT_1:13; then k1<=k1*k1 by XREAL_1:151; then A7: k1+r<=k1*k1+r by XREAL_1:6; take n=k1; let m; assume n<=m; then n*n<=m*m by XREAL_1:66; then A8: n*n+r<=m*m+r by XREAL_1:6; p"+(0 qua Nat) convergent for Real_Sequence; coherence proof let seq be Real_Sequence; assume that A1: seq is non-decreasing and A2: seq is bounded_above; consider r2 such that A3: for n holds seq.n convergent for Real_Sequence; coherence proof let seq be Real_Sequence; assume that A1: seq is non-increasing and A2: seq is bounded_below; defpred X[Real] means ex n st $1=seq.n; consider X such that A3: for p be Real holds p in X iff X[p] from SUBSET_1:sch 3; take g=lower_bound X; let s; assume A4: 0 convergent for Real_Sequence; coherence proof let seq be Real_Sequence; assume that A1: seq is monotone and A2: seq is bounded; A3: seq is non-increasing implies thesis by A2; seq is non-decreasing implies thesis by A2; hence thesis by A1,A3,SEQM_3:def 5; end; end; theorem Th36: seq is monotone & seq is bounded implies seq is convergent; theorem seq is bounded_above & seq is non-decreasing implies for n holds seq.n <=lim seq proof assume that A1: seq is bounded_above and A2: seq is non-decreasing; let m; set seq1 = NAT --> seq.m; deffunc U(Nat) = seq.($1+m); consider seq2 such that A3: for n holds seq2.n=U(n) from SEQ_1:sch 1; A4: now let n; seq1.n=seq.m & seq2.n=seq.(m+n) by A3,FUNCOP_1:7; hence seq1.n<=seq2.n by A2,SEQM_3:5; end; seq1.0=seq.m by FUNCOP_1:7; then A5: lim seq1=seq.m by Th25; now let n be Nat; n in NAT by ORDINAL1:def 12; hence seq2.n=U(n) by A3; end; then A6: seq2=seq^\m by NAT_1:def 3; then lim seq2=lim seq by A1,A2,Th17; hence thesis by A1,A2,A5,A6,A4,SEQ_2:18; end; theorem seq is bounded_below & seq is non-increasing implies for n holds lim seq <= seq.n proof assume that A1: seq is bounded_below and A2: seq is non-increasing; let m; set seq1 = NAT --> seq.m; deffunc U(Nat) = seq.($1+m); consider seq2 such that A3: for n holds seq2.n=U(n) from SEQ_1:sch 1; A4: now let n; seq1.n=seq.m & seq2.n=seq.(m+n) by A3,FUNCOP_1:7; hence seq2.n<=seq1.n by A2,SEQM_3:7; end; seq1.0=seq.m by FUNCOP_1:7; then A5: lim seq1=seq.m by Th25; now let n be Nat; n in NAT by ORDINAL1:def 12; hence seq2.n=U(n) by A3; end; then A6: seq2=seq^\m by NAT_1:def 3; then lim seq2=lim seq by A1,A2,Th17; hence thesis by A1,A2,A5,A6,A4,SEQ_2:18; end; theorem Th39: for seq ex Nseq st seq*Nseq is monotone proof let seq; defpred X[Element of NAT] means for m st $1= t holds lower_bound X >= t proof let X be non empty real-membered set; set r = lower_bound X; let t; assume A1: for s st s in X holds s >= t; set s = t-r; assume r < t; then A2: s > 0 by XREAL_1:50; X is bounded_below proof take t; let s be ext-real number; thus thesis by A1; end; then ex t9 be real number st t9 in X & t9 < r+s by A2,Def2; hence contradiction by A1; end; theorem Th44: for X being non empty real-membered set st (for s st s in X holds s >= r) & for t st for s st s in X holds s >= t holds r >= t holds r = lower_bound X by Lm1; theorem Th45: for X being non empty real-membered set, r for t st for s st s in X holds s <= t holds upper_bound X <= t proof let X be non empty real-membered set, r; set r = upper_bound X; let t; assume A1: for s st s in X holds s <= t; set s = r-t; assume r > t; then A2: s > 0 by XREAL_1:50; X is bounded_above proof take t; let s be ext-real number; thus thesis by A1; end; then ex t9 be real number st t9 in X & r-s < t9 by A2,Def1; hence contradiction by A1; end; theorem Th46: for X being non empty real-membered set, r st (for s st s in X holds s <= r) & for t st for s st s in X holds s <= t holds r <= t holds r = upper_bound X by Lm2; theorem for X being non empty real-membered set, Y being real-membered set st X c= Y & Y is bounded_below holds lower_bound Y <= lower_bound X proof let X be non empty real-membered set, Y be real-membered set; assume X c= Y & Y is bounded_below; then t in X implies t >= lower_bound Y by Def2; hence thesis by Th43; end; theorem for X being non empty real-membered set, Y being real-membered set st X c= Y & Y is bounded_above holds upper_bound X <= upper_bound Y proof let X be non empty real-membered set, Y be real-membered set; assume X c= Y & Y is bounded_above; then t in X implies t <= upper_bound Y by Def1; hence thesis by Th45; end; definition let A be non empty natural-membered set; redefine func min A -> Element of NAT; coherence by ORDINAL1:def 12; end; begin reserve k,n for Element of NAT, r,r9,r1,r2 for Real, c,c9,c1,c2,c3 for Element of COMPLEX; theorem 0c is_a_unity_wrt addcomplex by BINOP_2:1,SETWISEO:14; theorem Th50: compcomplex is_an_inverseOp_wrt addcomplex proof let c; thus addcomplex.(c,compcomplex.c) = c+compcomplex.c by BINOP_2:def 3 .= c+-c by BINOP_2:def 1 .= the_unity_wrt addcomplex by BINOP_2:1; thus addcomplex.(compcomplex.c,c) = compcomplex.c+c by BINOP_2:def 3 .= -c+c by BINOP_2:def 1 .= the_unity_wrt addcomplex by BINOP_2:1; end; theorem Th51: addcomplex is having_an_inverseOp by Th50,FINSEQOP:def 2; theorem Th52: the_inverseOp_wrt addcomplex = compcomplex by Th50,Th51,FINSEQOP:def 3; definition redefine func diffcomplex equals addcomplex*(id COMPLEX,compcomplex); compatibility proof let b be BinOp of COMPLEX; now let c1,c2; thus diffcomplex.(c1,c2) = c1 - c2 by BINOP_2:def 4 .= c1 + - c2 .= addcomplex.(c1,- c2) by BINOP_2:def 3 .= addcomplex.(c1,compcomplex.c2) by BINOP_2:def 1 .= (addcomplex*(id COMPLEX,compcomplex)).(c1,c2) by FINSEQOP:82; end; hence thesis by BINOP_1:2; end; end; theorem 1r is_a_unity_wrt multcomplex by BINOP_2:6,SETWISEO:14; theorem Th54: multcomplex is_distributive_wrt addcomplex proof now let c1,c2,c3; thus multcomplex.(c1,addcomplex.(c2,c3)) = multcomplex.(c1,c2+c3) by BINOP_2:def 3 .= c1*(c2+c3) by BINOP_2:def 5 .= c1*c2+c1*c3 .= addcomplex.(c1*c2,c1*c3) by BINOP_2:def 3 .= addcomplex.(multcomplex.(c1,c2),c1*c3) by BINOP_2:def 5 .= addcomplex.(multcomplex.(c1,c2),multcomplex.(c1,c3)) by BINOP_2:def 5; thus multcomplex.(addcomplex.(c1,c2),c3) = multcomplex.(c1+c2,c3) by BINOP_2:def 3 .= (c1+c2)*c3 by BINOP_2:def 5 .= c1*c3+c2*c3 .= addcomplex.(c1*c3,c2*c3) by BINOP_2:def 3 .= addcomplex.(multcomplex.(c1,c3),c2*c3) by BINOP_2:def 5 .= addcomplex.(multcomplex.(c1,c3),multcomplex.(c2,c3)) by BINOP_2:def 5; end; hence thesis by BINOP_1:11; end; definition let c be complex number; func c multcomplex -> UnOp of COMPLEX equals multcomplex[;](c,id COMPLEX); coherence proof reconsider c9 = c as Element of COMPLEX by XCMPLX_0:def 2; multcomplex[;](c9,id COMPLEX) is UnOp of COMPLEX; hence thesis; end; end; Lm3:(multcomplex[;](c,id COMPLEX)).c9 = c*c9 proof thus (multcomplex[;](c,id COMPLEX)).c9 = multcomplex.(c,(id COMPLEX).c9) by FUNCOP_1:53 .= multcomplex.(c,c9) by FUNCT_1:18 .= c*c9 by BINOP_2:def 5; end; theorem (c multcomplex).c9 = c*c9 by Lm3; theorem c multcomplex is_distributive_wrt addcomplex by Th54,FINSEQOP:54; definition func abscomplex -> Function of COMPLEX,REAL means :Def5: for c holds it.c = |.c.|; existence from FUNCT_2:sch 4; uniqueness from BINOP_2:sch 1; end; reserve z,z1,z2 for FinSequence of COMPLEX; definition let z1,z2; redefine func z1 + z2 -> FinSequence of COMPLEX equals addcomplex.:(z1,z2); coherence proof thus rng (z1+z2) c= COMPLEX; end; compatibility proof set g = addcomplex.:(z1,z2); dom addcomplex = [:COMPLEX,COMPLEX:] by FUNCT_2:def 1; then [:rng z1, rng z2:] c= dom addcomplex by ZFMISC_1:96; then A1: dom(z1+z2) = dom z1 /\ dom z2 & dom g = dom z1 /\ dom z2 by FUNCOP_1:69 ,VALUED_1:def 1; now let x be set; assume A2: x in dom (z1+z2); hence (z1+z2).x = z1.x + z2.x by VALUED_1:def 1 .= addcomplex.(z1.x,z2.x) by BINOP_2:def 3 .= g.x by A1,A2,FUNCOP_1:22; end; hence thesis by A1,FUNCT_1:2; end; redefine func z1 - z2 -> FinSequence of COMPLEX equals diffcomplex.:(z1,z2); coherence proof thus rng (z1-z2) c= COMPLEX; end; compatibility proof set g = diffcomplex.:(z1,z2); dom diffcomplex = [:COMPLEX,COMPLEX:] by FUNCT_2:def 1; then [:rng z1, rng z2:] c= dom diffcomplex by ZFMISC_1:96; then A3: dom g = dom z1 /\ dom z2 by FUNCOP_1:69; A4: dom(z1-z2) = dom z1 /\ dom z2 by VALUED_1:12; now let x be set; assume A5: x in dom (z1-z2); hence (z1-z2).x = z1.x - z2.x by VALUED_1:13 .= diffcomplex.(z1.x,z2.x) by BINOP_2:def 4 .= g.x by A4,A3,A5,FUNCOP_1:22; end; hence thesis by A3,FUNCT_1:2,VALUED_1:12; end; end; definition let z; redefine func -z -> FinSequence of COMPLEX equals compcomplex*z; coherence proof thus rng -z c= COMPLEX; end; compatibility proof set g = compcomplex*z; dom compcomplex = COMPLEX by FUNCT_2:def 1; then rng z c= dom compcomplex; then A1: dom g = dom z by RELAT_1:27; A2: dom -z = dom z by VALUED_1:8; now let x be set; assume A3: x in dom -z; thus (-z).x = -z.x by VALUED_1:8 .= compcomplex.(z.x) by BINOP_2:def 1 .= g.x by A2,A1,A3,FUNCT_1:12; end; hence thesis by A1,FUNCT_1:2,VALUED_1:8; end; end; notation let z; let c be complex number; synonym c*z for c(#)z; end; definition let z; let c be complex number; redefine func c*z -> FinSequence of COMPLEX equals (c multcomplex)*z; coherence proof thus rng (c(#)z) c= COMPLEX; end; compatibility proof set g = (c multcomplex)*z; dom (c multcomplex) = COMPLEX by FUNCT_2:def 1; then rng z c= dom (c multcomplex); then A1: dom (c(#)z) = dom z & dom g = dom z by RELAT_1:27,VALUED_1:def 5; now let x be set; assume A2: x in dom (c(#)z); A3: c is Element of COMPLEX & z.x is Element of COMPLEX by XCMPLX_0:def 2; thus (c(#)z).x = c*z.x by VALUED_1:6 .= (c multcomplex).(z.x) by A3,Lm3 .= g.x by A1,A2,FUNCT_1:12; end; hence thesis by A1,FUNCT_1:2; end; end; definition let z; redefine func abs z -> FinSequence of REAL equals abscomplex*z; coherence proof thus rng abs z c= REAL; end; compatibility proof set g = abscomplex*z; dom abscomplex = COMPLEX by FUNCT_2:def 1; then rng z c= dom abscomplex; then A1: dom abs z = dom z & dom g = dom z by RELAT_1:27,VALUED_1:def 11; now let x be set; assume A2: x in dom abs z; A3: z.x is Element of COMPLEX by XCMPLX_0:def 2; thus (abs z).x = abs(z.x) by VALUED_1:18 .= abscomplex.(z.x) by A3,Def5 .= g.x by A1,A2,FUNCT_1:12; end; hence thesis by A1,FUNCT_1:2; end; end; definition let n; func COMPLEX n -> FinSequenceSet of COMPLEX equals n-tuples_on COMPLEX; correctness; end; registration let n; cluster COMPLEX n -> non empty; coherence; end; reserve x,z,z1,z2,z3 for Element of COMPLEX n, A,B for Subset of COMPLEX n; Lm4: dom z = Seg n proof len z = n by CARD_1:def 7; hence thesis by FINSEQ_1:def 3; end; theorem Th57: k in Seg n implies z.k in COMPLEX proof len z = n by CARD_1:def 7; then Seg n = dom z by FINSEQ_1:def 3; hence thesis by FINSEQ_2:11; end; definition let n,z1,z2; redefine func z1 + z2 -> Element of COMPLEX n; coherence by FINSEQ_2:120; end; theorem Th58: k in Seg n & c1 = z1.k & c2 = z2.k implies (z1 + z2).k = c1 + c2 proof assume that A1: k in Seg n and A2: c1 = z1.k & c2 = z2.k; k in dom(z1+z2) by A1,Lm4; hence (z1 + z2).k = addcomplex.(c1,c2) by A2,FUNCOP_1:22 .= c1 + c2 by BINOP_2:def 3; end; definition let n; func 0c n -> FinSequence of COMPLEX equals n |-> 0c; correctness; end; definition let n; redefine func 0c n -> Element of COMPLEX n; coherence; end; theorem z + 0c n = z & z = 0c n + z by BINOP_2:1,FINSEQOP:56; definition let n,z; redefine func -z -> Element of COMPLEX n; coherence by FINSEQ_2:113; end; theorem Th60: k in Seg n & c = z.k implies (-z).k = -c proof assume that A1: k in Seg n and A2: c = z.k; k in dom(-z) by A1,Lm4; hence (-z).k = compcomplex.c by A2,FUNCT_1:12 .= -c by BINOP_2:def 1; end; Lm5: -0c n = 0c n proof thus -0c n = n|->(compcomplex.0c) by FINSEQOP:16 .= n|->-(0c qua complex number) by BINOP_2:def 1 .= 0c n; end; theorem z + -z = 0c n & -z + z = 0c n by Th51,Th52,BINOP_2:1,FINSEQOP:73; theorem z1 + z2 = 0c n implies z1 = -z2 & z2 = -z1 by Th51,Th52,BINOP_2:1,FINSEQOP:74 ; canceled; theorem -z1 = -z2 implies z1 = z2 proof assume -z1 = -z2; hence z1 = -(-z2) .= z2; end; Lm6: z1 + z = z2 + z implies z1 = z2 proof assume z1 + z = z2 + z; then z1 + (z + -z)= (z2 + z) + -z by FINSEQOP:28; then A1: z1 + (z + -z)= z2 + (z + -z) by FINSEQOP:28; z + -z = 0c n by Th51,Th52,BINOP_2:1,FINSEQOP:73; then z1 = z2 + 0c n by A1,BINOP_2:1,FINSEQOP:56; hence thesis by BINOP_2:1,FINSEQOP:56; end; theorem z1 + z = z2 + z or z1 + z = z + z2 implies z1 = z2 by Lm6; theorem Th66: -(z1 + z2) = -z1 + -z2 proof (z1 + z2) + (-z1 + -z2) = z2 + z1 + -z1 + -z2 by FINSEQOP:28 .= z2 + (z1 + -z1) + -z2 by FINSEQOP:28 .= z2 + 0c n + -z2 by Th51,Th52,BINOP_2:1,FINSEQOP:73 .= z2 + -z2 by BINOP_2:1,FINSEQOP:56 .= 0c n by Th51,Th52,BINOP_2:1,FINSEQOP:73; hence thesis by Th51,Th52,BINOP_2:1,FINSEQOP:74; end; definition let n,z1,z2; redefine func z1 - z2 -> Element of COMPLEX n; coherence by FINSEQ_2:120; end; theorem k in Seg n implies (z1 - z2).k = z1.k - z2.k proof assume that A1: k in Seg n; set c1 = z1.k, c2 = z2.k; k in dom(z1 - z2) by A1,Lm4; hence (z1 - z2).k = diffcomplex.(c1,c2) by FUNCOP_1:22 .= c1 - c2 by BINOP_2:def 4; end; theorem z - 0c n = z proof thus z - 0c n = z + 0c n by Lm5 .= z by BINOP_2:1,FINSEQOP:56; end; theorem 0c n - z = -z proof thus 0c n - z = 0c n + -z .= -z by BINOP_2:1,FINSEQOP:56; end; theorem z1 - -z2 = z1 + z2; theorem Th71: -(z1 - z2) = z2 - z1 proof thus -(z1 - z2) = -z1 + -(-z2) by Th66 .= z2 - z1; end; theorem Th72: -(z1 - z2) = -z1 + z2 proof thus -(z1 - z2) = -z1 + -(-z2) by Th66 .= -z1 + z2; end; theorem Th73: z - z = 0c n proof thus z - z = z + -z .= 0c n by Th51,Th52,BINOP_2:1,FINSEQOP:73; end; theorem Th74: z1 - z2 = 0c n implies z1 = z2 proof assume z1 - z2 = 0c n; then z1 + - z2 = 0c n; then z1 = -(-z2) by Th51,Th52,BINOP_2:1,FINSEQOP:74; hence thesis; end; theorem Th75: z1 - z2 - z3 = z1 - (z2 + z3) proof thus z1 - z2 - z3 = z1 + -z2 + -z3 .= z1 + (- z2 + -z3) by FINSEQOP:28 .= z1 - (z2 + z3) by Th66; end; theorem Th76: z1 + (z2 - z3) = z1 + z2 - z3 proof thus z1 + (z2 - z3) = z1 + (z2 + -z3) .= z1 + z2 + -z3 by FINSEQOP:28 .= z1 + z2 - z3; end; theorem z1 - (z2 - z3) = z1 - z2 + z3 proof thus z1 - (z2 - z3) = z1 + (-z2 + z3) by Th72 .= z1 + -z2 + z3 by FINSEQOP:28 .= z1 - z2 + z3; end; theorem z1 - z2 + z3 = z1 + z3 - z2 by Th76; theorem Th79: z1 = z1 + z - z proof thus z1 = z1 + 0c n by BINOP_2:1,FINSEQOP:56 .= z1 + (z - z) by Th73 .= z1 + z - z by Th76; end; theorem Th80: z1 + (z2 - z1) = z2 proof thus z1 + (z2 - z1) = z2 + -z1 + z1 .= z2 + (-z1 + z1) by FINSEQOP:28 .= z2 + 0c n by Th51,Th52,BINOP_2:1,FINSEQOP:73 .= z2 by BINOP_2:1,FINSEQOP:56; end; theorem Th81: z1 = z1 - z + z proof thus z1 = z1 + 0c n by BINOP_2:1,FINSEQOP:56 .= z1 + (-z + z) by Th51,Th52,BINOP_2:1,FINSEQOP:73 .= z1 + -z + z by FINSEQOP:28 .= z1 - z + z; end; definition let n,z,c; redefine func c*z -> Element of COMPLEX n; coherence by FINSEQ_2:113; end; theorem Th82: k in Seg n & c9 = z.k implies (c*z).k = c*c9 proof assume that A1: k in Seg n and A2: c9 = z.k; k in dom(c*z) by A1,Lm4; hence (c*z).k = (c multcomplex).c9 by A2,FUNCT_1:12 .= c*c9 by Lm3; end; theorem c1*(c2*z) = (c1*c2)*z proof thus (c1*c2)*z = multcomplex[;](multcomplex.(c1,c2),id COMPLEX)*z by BINOP_2:def 5 .= multcomplex[;](c1,multcomplex[;](c2,id COMPLEX))*z by FUNCOP_1:62 .= (multcomplex[;](c1,id COMPLEX)*multcomplex[;](c2,id COMPLEX))*z by FUNCOP_1:55 .= c1*(c2*z) by RELAT_1:36; end; theorem (c1 + c2)*z = c1*z + c2*z proof set c1M = multcomplex[;](c1,id COMPLEX), c2M = multcomplex[;](c2,id COMPLEX); thus (c1 + c2)*z = multcomplex[;](addcomplex.(c1,c2),id COMPLEX)*z by BINOP_2:def 3 .= addcomplex.:(c1M,c2M)*z by Th54,FINSEQOP:35 .= c1*z + c2*z by FUNCOP_1:25; end; theorem c*(z1+z2) = c*z1 + c*z2 by Th54,FINSEQOP:51,54; theorem 1r*z = z proof A1: rng z c= COMPLEX; thus 1r*z = (id COMPLEX)*z by BINOP_2:6,FINSEQOP:44 .= z by A1,RELAT_1:53; end; theorem 0c*z = 0c n proof A1: rng z c= COMPLEX; thus 0c*z = multcomplex[;](0c,(id COMPLEX)*z) by FUNCOP_1:34 .= multcomplex[;](0c,z) by A1,RELAT_1:53 .= 0c n by Th51,Th54,BINOP_2:1,FINSEQOP:76; end; theorem (-1r)*z = -z; definition let n,z; redefine func abs z -> Element of n-tuples_on REAL; correctness by FINSEQ_2:113; end; theorem Th89: k in Seg n & c = z.k implies (abs z).k = |.c.| proof assume that A1: k in Seg n and A2: c = z.k; len abs z = n by CARD_1:def 7; then k in dom abs z by A1,FINSEQ_1:def 3; hence (abs z).k = abscomplex.c by A2,FUNCT_1:12 .= |.c.| by Def5; end; theorem Th90: abs 0c n = n |-> 0 proof thus abs 0c n = n |-> abscomplex.0c by FINSEQOP:16 .= n |-> 0 by Def5,COMPLEX1:44; end; theorem Th91: abs -z = abs z proof now let j be Nat; assume A1: j in Seg n; then reconsider c = z.j, c9 = (-z).j as Element of COMPLEX by Th57; thus (abs -z).j = |.c9.| by A1,Th89 .= |.-c.| by A1,Th60 .= |.c.| by COMPLEX1:52 .= (abs z).j by A1,Th89; end; hence thesis by FINSEQ_2:119; end; theorem Th92: abs(c*z) = |.c.|*(abs z) proof now let j be Nat; reconsider w = j as Element of NAT by ORDINAL1:def 12; assume A1: j in Seg n; then reconsider c9 = z.j, cc = (c*z).j as Element of COMPLEX by Th57; reconsider ac = (abs z).w as Real; thus (abs(c*z)).j = |.cc.| by A1,Th89 .= |.c*c9.| by A1,Th82 .= |.c.|*|.c9.| by COMPLEX1:65 .= |.c.|*ac by A1,Th89 .= (|.c.|*(abs z)).j by RVSUM_1:45; end; hence thesis by FINSEQ_2:119; end; definition let z be FinSequence of COMPLEX; func |.z.| -> Real equals sqrt Sum sqr abs z; correctness; end; theorem Th93: |.0c n.| = 0 proof thus |.0c n .| = sqrt Sum sqr (n |-> (0 qua Real)) by Th90 .= sqrt Sum (n |-> (0 qua Real)^2) by RVSUM_1:56 .= sqrt (n*(0 qua Nat)) by RVSUM_1:80 .= 0 by SQUARE_1:17; end; theorem Th94: |.z.| = 0 implies z = 0c n proof assume A1: |.z.| = 0; now let j be Nat; assume A2: j in Seg n; then reconsider c = z.j as Element of COMPLEX by Th57; 0 <= Sum sqr abs z by RVSUM_1:86; then (abs z).j = (n|->0).j by A1,RVSUM_1:91,SQUARE_1:24; then |.c.| = (n|-> 0).j by A2,Th89; then c = 0c by COMPLEX1:45; hence z.j = (n|->0c).j; end; hence thesis by FINSEQ_2:119; end; theorem Th95: 0 <= |.z.| proof 0 <= Sum sqr abs z by RVSUM_1:86; hence thesis by SQUARE_1:def 2; end; theorem |.-z.| = |.z.| by Th91; theorem |.c*z.| = |.c.|*|.z.| proof A1: 0 <= |.c.|^2 & 0 <= Sum sqr abs z by RVSUM_1:86,XREAL_1:63; thus |.c*z.| = sqrt Sum sqr (|.c.|*abs z) by Th92 .= sqrt Sum (|.c.|^2 * sqr abs z) by RVSUM_1:58 .= sqrt (|.c.|^2 * Sum sqr abs z) by RVSUM_1:87 .= sqrt |.c.|^2 * sqrt Sum sqr abs z by A1,SQUARE_1:29 .= |.c.|*|.z.| by COMPLEX1:46,SQUARE_1:22; end; theorem Th98: |.z1 + z2.| <= |.z1.| + |.z2.| proof A1: 0 <= Sum sqr abs (z1 + z2) by RVSUM_1:86; A2: 0 <= Sum sqr abs z1 by RVSUM_1:86; then A3: 0 <= sqrt Sum sqr abs z1 by SQUARE_1:def 2; A4: for k be Nat holds k in Seg n implies 0 <= (mlt(abs z1,abs z2)).k proof let k be Nat; set r = (mlt(abs z1,abs z2)).k; assume A5: k in Seg n; then reconsider c1 = z1.k, c2 = z2.k as Element of COMPLEX by Th57; (abs z1).k = |.c1.| & (abs z2).k = |.c2.| by A5,Th89; then A6: r = |.c1.|*|.c2.| by RVSUM_1:60; 0 <= |.c1.| & 0 <= |.c2.| by COMPLEX1:46; hence thesis by A6; end; 0 <= (Sum mlt(abs z1,abs z2))^2 by XREAL_1:63; then A7: sqrt(Sum mlt(abs z1,abs z2))^2 <= sqrt((Sum sqr abs z1)*(Sum sqr abs z2 )) by RVSUM_1:92,SQUARE_1:26; len mlt(abs z1,abs z2) = n by CARD_1:def 7; then dom mlt(abs z1,abs z2) = Seg n by FINSEQ_1:def 3; then Sum mlt(abs z1,abs z2) <= sqrt((Sum sqr abs z1)*(Sum sqr abs z2)) by A4 ,A7,RVSUM_1:84,SQUARE_1:22; then 2*Sum mlt(abs z1,abs z2) <= 2*sqrt((Sum sqr abs z1)*(Sum sqr abs z2)) by XREAL_1:64; then Sum sqr abs z1+(2*Sum mlt(abs z1,abs z2)) <= Sum sqr abs z1+2*sqrt((Sum sqr abs z1)*(Sum sqr abs z2)) by XREAL_1:7; then A8: Sum sqr abs z1+(2*Sum mlt(abs z1,abs z2)) + Sum sqr abs z2 <= Sum sqr abs z1+2*sqrt((Sum sqr abs z1)*(Sum sqr abs z2)) + Sum sqr abs z2 by XREAL_1:7; A9: for k be Nat holds k in Seg n implies (sqr abs (z1 + z2)).k <= (sqr (abs z1 + abs z2)).k proof let k be Nat; set r2 = (sqr (abs z1 + abs z2)).k; len(abs z1 + abs z2) = n by CARD_1:def 7; then A10: dom (abs z1 + abs z2) = Seg n by FINSEQ_1:def 3; assume A11: k in Seg n; then reconsider c12 = (z1 + z2).k as Element of COMPLEX by Th57; reconsider abs912 = (abs (z1 + z2)).k as Real; 0 <= |.c12.| by COMPLEX1:46; then A12: 0 <= abs912 by A11,Th89; reconsider abs1 = (abs z1).k, abs2 = (abs z2).k as Real; reconsider c1 = z1.k, c2 = z2.k as Element of COMPLEX by A11,Th57; reconsider abs12 = (abs z1 + abs z2).k as Real; |.c1 + c2.| <= |.c1.| + |.c2.| by COMPLEX1:56; then |.c12.| <= |.c1.| + |.c2.| by A11,Th58; then |.c12.| <= |.c1.| + abs2 by A11,Th89; then |.c12.| <= abs1 + abs2 by A11,Th89; then |.c12.| <= abs12 by A11,A10,VALUED_1:def 1; then abs912 <= abs12 by A11,Th89; then (abs912)^2 <= (abs12)^2 by A12,SQUARE_1:15; then (abs912)^2 <= r2 by VALUED_1:11; hence thesis by VALUED_1:11; end; A13: 0 <= Sum sqr abs z2 by RVSUM_1:86; then A14: 0 <= sqrt Sum sqr abs z2 by SQUARE_1:def 2; A15: Sum sqr abs z1 = (sqrt Sum sqr abs z1)^2 by A2,SQUARE_1:def 2; A16: (sqrt Sum sqr abs z2)^2 = Sum sqr abs z2 by A13,SQUARE_1:def 2; Sum sqr (abs z1 + abs z2) = Sum (sqr abs z1 + 2*mlt(abs z1,abs z2) + sqr abs z2) by RVSUM_1:68 .= Sum(sqr abs z1 + 2*mlt(abs z1,abs z2)) + Sum sqr abs z2 by RVSUM_1:89 .= Sum sqr abs z1 + Sum(2*mlt(abs z1,abs z2)) + Sum sqr abs z2 by RVSUM_1:89 .= Sum sqr abs z1 + (2*Sum mlt(abs z1,abs z2))+Sum sqr abs z2 by RVSUM_1:87 ; then Sum sqr abs (z1 + z2) <= Sum sqr abs z1 + (2*Sum mlt(abs z1,abs z2))+ Sum sqr abs z2 by A9,RVSUM_1:82; then Sum sqr abs (z1 + z2) <= Sum sqr abs z1+2*sqrt((Sum sqr abs z1)*(Sum sqr abs z2)) + Sum sqr abs z2 by A8,XXREAL_0:2; then Sum sqr abs (z1 + z2) <= Sum sqr abs z1+2*((sqrt Sum sqr abs z1)*(sqrt Sum sqr abs z2)) + Sum sqr abs z2 by A2,A13,SQUARE_1:29; then sqrt Sum sqr abs (z1 + z2) <= sqrt(((sqrt Sum sqr abs z1) + (sqrt Sum sqr abs z2))^2) by A15,A16,A1,SQUARE_1:26; hence thesis by A3,A14,SQUARE_1:22; end; theorem Th99: |.z1 - z2.| <= |.z1.| + |.z2.| proof |.z1 - z2.| <= |.z1.| + |.-z2.| by Th98; hence thesis by Th91; end; theorem |.z1.| - |.z2.| <= |.z1 + z2.| proof z1 = z1 + z2 - z2 by Th79; then |.z1.| <= |.z1 + z2.| + |.z2.| by Th99; hence thesis by XREAL_1:20; end; theorem |.z1.| - |.z2.| <= |.z1 - z2.| proof z1 = z1 - z2 + z2 by Th81; then |.z1.| <= |.z1 - z2.| + |.z2.| by Th98; hence thesis by XREAL_1:20; end; theorem Th102: |.z1 - z2.| = 0 iff z1 = z2 proof thus |.z1 - z2.| = 0 implies z1 = z2 proof assume |.z1 - z2.| = 0; then z1 - z2 = 0c n by Th94; hence thesis by Th74; end; assume z1 = z2; then z1 - z2 = 0c n by Th73; hence thesis by Th93; end; theorem z1 <> z2 implies 0 < |.z1 - z2.| proof assume z1 <> z2; then 0 <> |.z1 - z2.| by Th102; hence thesis by Th95; end; theorem Th104: |.z1 - z2.| = |.z2 - z1.| proof thus |.z1 - z2.| = |.-(z2 - z1).| by Th71 .= |.z2 - z1.| by Th91; end; theorem Th105: |.z1 - z2.| <= |.z1 - z.| + |.z - z2.| proof |.z1 - z2.| = |.z1 - z + z - z2.| by Th81 .= |.(z1 - z) + (z - z2).| by Th76; hence thesis by Th98; end; definition let n; let A be Subset of COMPLEX n; attr A is open means :Def14: for x st x in A ex r st 0 < r & for z st |.z.| < r holds x + z in A; end; definition let n; let A be Subset of COMPLEX n; attr A is closed means for x st for r st r > 0 ex z st |.z.| < r & x + z in A holds x in A; end; theorem for A being Subset of COMPLEX n st A = {} holds A is open proof let A be Subset of COMPLEX n; assume A1: A = {}; let x; thus thesis by A1; end; theorem for A being Subset of COMPLEX n st A = COMPLEX n holds A is open proof let A be Subset of COMPLEX n; assume A1: A = COMPLEX n; let x such that x in A; take j=1; thus 0 < j; let z such that |.z.| < j; thus thesis by A1; end; theorem for AA being Subset-Family of COMPLEX n st for A being Subset of COMPLEX n st A in AA holds A is open for A being Subset of COMPLEX n st A = union AA holds A is open proof let AA be Subset-Family of COMPLEX n such that A1: for A being Subset of COMPLEX n st A in AA holds A is open; let A be Subset of COMPLEX n such that A2: A = union AA; let x; assume x in A; then consider B being set such that A3: x in B and A4: B in AA by A2,TARSKI:def 4; reconsider B as Subset of COMPLEX n by A4; B is open by A1,A4; then consider r such that A5: 0 < r and A6: for z st |.z.| < r holds x + z in B by A3,Def14; take r; thus 0 < r by A5; let z; assume |.z.| < r; then x + z in B by A6; hence thesis by A2,A4,TARSKI:def 4; end; theorem for A,B being Subset of COMPLEX n st A is open & B is open for C being Subset of COMPLEX n st C = A /\ B holds C is open proof let A,B be Subset of COMPLEX n such that A1: A is open and A2: B is open; let C be Subset of COMPLEX n such that A3: C = A /\ B; let x; assume A4: x in C; then x in A by A3,XBOOLE_0:def 4; then consider r1 such that A5: 0 < r1 and A6: for z st |.z.| < r1 holds x + z in A by A1,Def14; x in B by A3,A4,XBOOLE_0:def 4; then consider r2 such that A7: 0 < r2 and A8: for z st |.z.| < r2 holds x + z in B by A2,Def14; take min(r1,r2); thus 0 < min(r1,r2) by A5,A7,XXREAL_0:15; let z; assume A9: |.z.| < min(r1,r2); min(r1,r2) <= r2 by XXREAL_0:17; then |.z.| < r2 by A9,XXREAL_0:2; then A10: x + z in B by A8; min(r1,r2) <= r1 by XXREAL_0:17; then |.z.| < r1 by A9,XXREAL_0:2; then x + z in A by A6; hence thesis by A3,A10,XBOOLE_0:def 4; end; definition let n,x,r; func Ball(x,r) -> Subset of COMPLEX n equals { z : |.z - x.| < r }; coherence proof defpred P[FinSequence of COMPLEX] means |.$1 - x.| < r; { z : P[z] } c= COMPLEX n from FRAENKEL:sch 10; hence thesis; end; end; theorem Th110: z in Ball(x,r) iff |.x - z.| < r proof A1: z in { z2 : |.z2 - x.| < r } iff ex z1 st z = z1 & |.z1 - x.| < r; |.z - x.| = |.x - z.| by Th104; hence thesis by A1; end; theorem 0 < r implies x in Ball(x,r) proof assume A1: 0 < r; |.x - x.| = 0 by Th102; hence thesis by A1; end; theorem Ball(z1,r1) is open proof let x; assume x in Ball(z1,r1); then A1: |.z1 - x.| < r1 by Th110; take r = r1 - |.z1 - x.|; thus 0 < r by A1,XREAL_1:50; let z; assume |.z.| < r; then A2: |.z.| + |.z1 - x.| < r + |.z1 - x.| by XREAL_1:6; z1 - x - z = z1 - (x + z) by Th75; then |.z1 - (x + z).| <= |.z.| + |.z1 - x.| by Th99; then |.z1 - (x + z).| < r + |.z1 - x.| by A2,XXREAL_0:2; hence thesis by Th110; end; definition let n,x,A; func dist(x,A) -> Real means :Def17: for X being Subset of REAL st X = {|.x - z.| : z in A} holds it = lower_bound X; existence proof deffunc f(Element of COMPLEX n) = |.x - $1.|; defpred P[set] means $1 in A; reconsider X = {f(z) : P[z]} as Subset of REAL from DOMAIN_1:sch 8; take lower_bound X; thus thesis; end; uniqueness proof deffunc f(Element of COMPLEX n) = |.x - $1.|; defpred P[set] means $1 in A; reconsider X = {f(z) : P[z]} as Subset of REAL from DOMAIN_1:sch 8; let r1,r2 be Real such that A1: for X being Subset of REAL st X = {|.x - z.| : z in A} holds r1 = lower_bound X and A2: for X being Subset of REAL st X = {|.x - z.| : z in A} holds r2 = lower_bound X; r1 = lower_bound X by A1; hence thesis by A2; end; end; definition let n,A,r; func Ball(A,r) -> Subset of COMPLEX n equals { z : dist(z,A) < r }; coherence proof defpred P[Element of COMPLEX n] means dist($1,A) < r; { z : P[z] } c= COMPLEX n from FRAENKEL:sch 10; hence thesis; end; end; theorem Th113: for X being Subset of REAL, r st X <> {} & for r9 st r9 in X holds r <= r9 holds lower_bound X >= r proof let X be Subset of REAL, r such that A1: X <> {} and A2: for r9 st r9 in X holds r <= r9; for r9 be ext-real number st r9 in X holds r <= r9 by A2; then r is LowerBound of X by XXREAL_2:def 2; then A3: X is bounded_below by XXREAL_2:def 9; now let r9 be real number; assume r9 > 0; then consider r1 be real number such that A4: r1 in X and A5: r1 < lower_bound X + r9 by A1,A3,Def2; r <= r1 by A2,A4; hence lower_bound X + r9 >= r by A5,XXREAL_0:2; end; hence thesis by XREAL_1:41; end; theorem Th114: A <> {} implies dist(x,A) >= 0 proof defpred P[set] means $1 in A; deffunc f(Element of COMPLEX n) = |.x - $1.|; reconsider X = {f(z) : P[z]} as Subset of REAL from DOMAIN_1:sch 8; assume A <> {}; then consider z1 such that A1: z1 in A by SUBSET_1:4; A2: |.x - z1.| in X by A1; A3: now let r9; assume r9 in X; then ex z st r9 = |.x - z.| & z in A; hence r9>= 0 by Th95; end; dist(x,A) = lower_bound X by Def17; hence thesis by A2,A3,Th113; end; theorem Th115: A <> {} implies dist(x + z,A) <= dist(x,A) + |.z.| proof defpred P[set] means $1 in A; deffunc g(Element of COMPLEX n) = |.x + z - $1.|; reconsider Y = {g(z1) : P[z1]} as Subset of REAL from DOMAIN_1:sch 8; deffunc f(Element of COMPLEX n) = |.x - $1.|; A1: Y is bounded_below proof take 0; let r be ext-real number; assume r in Y; then ex z1 st r = |.x + z - z1 .| & z1 in A; hence thesis by Th95; end; reconsider X = {f(z1) : P[z1]} as Subset of REAL from DOMAIN_1:sch 8; assume A <> {}; then consider z2 such that A2: z2 in A by SUBSET_1:4; A3: dist(x+z,A) = lower_bound Y by Def17; A4: now let r9; assume r9 in X; then consider z3 such that A5: r9 = |.x - z3.| and A6: z3 in A; |.x + z - z3.| = |.x - z3 + z.| by Th76; then A7: |.x + z - z3.| <= r9 + |.z.| by A5,Th98; |.x + z - z3.| in Y by A6; then |.x + z - z3.| >= dist(x + z,A) by A3,A1,Def2; then r9+ |.z.| >= dist(x + z,A) by A7,XXREAL_0:2; hence r9 >= dist(x + z,A) - |.z.| by XREAL_1:20; end; A8: |.x - z2.| in X by A2; dist(x,A) = lower_bound X by Def17; then dist(x + z,A) - |.z.| <= dist(x,A) by A8,A4,Th113; hence thesis by XREAL_1:20; end; theorem Th116: x in A implies dist(x,A) = 0 proof defpred P[set] means $1 in A; deffunc f(Element of COMPLEX n) = |.x - $1.|; reconsider X = {f(z): P[z]} as Subset of REAL from DOMAIN_1:sch 8; assume A1: x in A; then A2: |.x - x.| in X; A3: now reconsider r = |.x - x.| as real number; let r1 be real number such that A4: 0 {} & A is closed implies dist(x,A) > 0 proof assume that A1: not x in A and A2: A <> {} and A3: for x st for r st r > 0 ex z st |.z.| < r & x + z in A holds x in A and A4: dist(x,A) <= 0; A5: dist(x,A) = 0 by A2,A4,Th114; now deffunc f(Element of COMPLEX n) = |.x - $1.|; defpred P[set] means $1 in A; reconsider X = {f(z) : P[z]} as Subset of REAL from DOMAIN_1:sch 8; let r such that A6: r > 0; consider z such that A7: z in A by A2,SUBSET_1:4; A8: X is bounded_below proof take 0; let r be ext-real number; assume r in X; then ex z st r = |.x - z .| & z in A; hence thesis by Th95; end; A9: |.x - z.| in X by A7; dist(x,A) = lower_bound X & (0 qua Nat)+r = r by Def17; then consider r9 be real number such that A10: r9 in X and A11: r9< r by A5,A6,A9,A8,Def2; consider z1 such that A12: r9 = |.x - z1.| & z1 in A by A10; take z = z1 - x; thus |.z.| < r & x + z in A by A11,A12,Th80,Th104; end; hence contradiction by A1,A3; end; theorem A <> {} implies |.z1 - x.| + dist(x,A) >= dist(z1,A) proof x + (z1 - x) = z1 by Th80; hence thesis by Th115; end; theorem Th119: z in Ball(A,r) iff dist(z,A) < r proof z in { z2 : dist(z2,A) < r } iff ex z1 st z = z1 & dist(z1,A) < r; hence thesis; end; theorem Th120: 0 < r & x in A implies x in Ball(A,r) proof assume that A1: 0 < r and A2: x in A; dist(x,A) = 0 by A2,Th116; hence thesis by A1; end; theorem 0 < r implies A c= Ball(A,r) proof assume A1: r > 0; let x be set; assume x in A; hence thesis by A1,Th120; end; theorem A <> {} implies Ball(A,r1) is open proof assume A1: A <> {}; let x; assume x in Ball(A,r1); then A2: dist(x,A) < r1 by Th119; take r = r1 - dist(x,A); thus 0 < r by A2,XREAL_1:50; let z; assume |.z.| < r; then A3: |.z.| + dist(x,A) < r + dist(x,A) by XREAL_1:6; dist(x + z,A) <= |.z.| + dist(x,A) by A1,Th115; then dist(x + z,A) < r + dist(x,A) by A3,XXREAL_0:2; hence thesis; end; definition let n,A,B; func dist(A,B) -> Real means :Def19: for X being Subset of REAL st X = {|.x - z.| : x in A & z in B} holds it = lower_bound X; existence proof deffunc f(Element of COMPLEX n,Element of COMPLEX n) = |.$1 - $2.|; defpred P[set,set] means $1 in A & $2 in B; reconsider X = {f(x,z) : P[x,z]} as Subset of REAL from DOMAIN_1:sch 9; take lower_bound X; thus thesis; end; uniqueness proof deffunc f(Element of COMPLEX n,Element of COMPLEX n) = |.$1 - $2.|; defpred P[set,set] means $1 in A & $2 in B; reconsider X = {f(x,z): P[x,z]} as Subset of REAL from DOMAIN_1:sch 9; let r1,r2 be Real such that A1: for X being Subset of REAL st X = {|.x - z.| : x in A & z in B} holds r1 = lower_bound X and A2: for X being Subset of REAL st X = {|.x - z.| : x in A & z in B} holds r2 = lower_bound X; r1 = lower_bound X by A1; hence thesis by A2; end; end; theorem for X,Y being Subset of REAL holds X <> {} & Y <> {} implies X ++ Y <> {}; theorem Th124: for X,Y being Subset of REAL holds X is bounded_below & Y is bounded_below implies X++Y is bounded_below proof let X,Y be Subset of REAL; assume X is bounded_below; then consider r1 be real number such that A1: r1 is LowerBound of X by XXREAL_2:def 9; A2: for r be real number st r in X holds r1<=r by A1,XXREAL_2:def 2; assume Y is bounded_below; then consider r2 be real number such that A3: r2 is LowerBound of Y by XXREAL_2:def 9; A4: for r be real number st r in Y holds r2<=r by A3,XXREAL_2:def 2; take r1 + r2; let r be ext-real number; assume r in X++Y; then r in {r22+r12 where r22 is Element of COMPLEX, r12 is Element of COMPLEX : r22 in X & r12 in Y} by MEMBER_1:def 6; then consider r22,r12 being Element of COMPLEX such that A5: r = r22 + r12 and A6: r22 in X and A7: r12 in Y; reconsider r9 = r22, r99 = r12 as real number by A6,A7; A8: r2 <= r99 by A4,A7; r1 <= r9 by A2,A6; hence thesis by A5,A8,XREAL_1:7; end; theorem Th125: for X,Y being Subset of REAL st X <> {} & X is bounded_below & Y <> {} & Y is bounded_below holds lower_bound (X ++ Y) = lower_bound X + lower_bound Y proof let X,Y be Subset of REAL such that A1: X <> {} and A2: X is bounded_below and A3: Y <> {} and A4: Y is bounded_below; A5: now let r9 be real number; assume 0 0 by XREAL_1:215; then consider r1 be real number such that A7: r1 in X and A8: r1= lower_bound X & r2 >= lower_bound Y by A2,A4,A13,Def2; hence lower_bound X + lower_bound Y<=r by A12,XREAL_1:7; end; X ++ Y <> {} & X ++ Y is bounded_below by A1,A2,A3,A4,Th124; hence thesis by A11,A5,Def2; end; theorem Th126: for X,Y being Subset of REAL st Y is bounded_below & X <> {} & for r st r in X ex r1 st r1 in Y & r1 <= r holds lower_bound X >= lower_bound Y proof let X,Y be Subset of REAL such that A1: Y is bounded_below and A2: X <> {} and A3: for r st r in X ex r1 st r1 in Y & r1 <= r; now let r1; assume r1 in X; then consider r2 such that A4: r2 in Y and A5: r2 <= r1 by A3; lower_bound Y <= r2 by A1,A4,Def2; hence r1 >= lower_bound Y by A5,XXREAL_0:2; end; hence thesis by A2,Th113; end; theorem Th127: A <> {} & B <> {} implies dist(A,B) >= 0 proof defpred P[set,set] means $1 in A & $2 in B; deffunc f(Element of COMPLEX n,Element of COMPLEX n) = |.$1 - $2.|; reconsider Z = {f(z1,z): P[z1,z]} as Subset of REAL from DOMAIN_1:sch 9; assume that A1: A <> {} and A2: B <> {}; consider z1 such that A3: z1 in A by A1,SUBSET_1:4; A4: now let r9; assume r9 in Z; then ex z1,z st r9 = |.z1 - z.| & z1 in A & z in B; hence r9>= 0 by Th95; end; consider z2 such that A5: z2 in B by A2,SUBSET_1:4; A6: dist(A,B) = lower_bound Z by Def19; |.z1 - z2.| in Z by A3,A5; hence thesis by A6,A4,Th113; end; theorem dist(A,B) = dist(B,A) proof defpred R[set,set] means $1 in B & $2 in A; deffunc f(Element of COMPLEX n,Element of COMPLEX n) = |.$1 - $2.|; reconsider Y = {f(z,z1) : R[z,z1]} as Subset of REAL from DOMAIN_1:sch 9; defpred P[set,set] means $1 in A & $2 in B; reconsider X = {f(z1,z) : P[z1,z]} as Subset of REAL from DOMAIN_1:sch 9; A1: now let r; A2: now given z,z1 such that A3: r =|.z - z1.| & z in B & z1 in A; take z1,z; thus r =|.z1 - z.| & z1 in A & z in B by A3,Th104; end; now given z1,z such that A4: r =|.z1 - z.| & z1 in A & z in B; take z,z1; thus r =|.z - z1.| & z in B & z1 in A by A4,Th104; end; hence r in X iff r in Y by A2; end; dist(A,B) = lower_bound X & dist(B,A) = lower_bound Y by Def19; hence thesis by A1,SUBSET_1:3; end; theorem Th129: A <> {} & B <> {} implies dist(x,A) + dist(x,B) >= dist(A,B) proof defpred Y[set] means $1 in B; deffunc g(Element of COMPLEX n) = |.x - $1.|; reconsider Y = {g(z) : Y[z]} as Subset of REAL from DOMAIN_1:sch 8; defpred P[set,set] means $1 in A & $2 in B; defpred X[set] means $1 in A; deffunc f(Element of COMPLEX n,Element of COMPLEX n) = |.$1 - $2.|; reconsider X = {g(z) : X[z]} as Subset of REAL from DOMAIN_1:sch 8; assume that A1: A <> {} and A2: B <> {}; consider z2 such that A3: z2 in B by A2,SUBSET_1:4; A4: Y <> {} & Y is bounded_below proof |.x - z2.| in Y by A3; hence Y <> {}; take 0; let r be ext-real number; assume r in Y; then ex z1 st r = |.x - z1 .| & z1 in B; hence thesis by Th95; end; A5: lower_bound X = dist(x,A) & lower_bound Y = dist(x,B) by Def17; A6: |.x - z2 .| in Y by A3; reconsider Z = {f(z1,z) : P[z1,z]} as Subset of REAL from DOMAIN_1:sch 9; consider z1 such that A7: z1 in A by A1,SUBSET_1:4; A8: now let r; assume r in X ++ Y; then r in {r2+r1 where r2 is Element of COMPLEX, r1 is Element of COMPLEX : r2 in X & r1 in Y} by MEMBER_1:def 6; then consider r2,r1 being Element of COMPLEX such that A9: r = r2 + r1 and A10: r2 in X and A11: r1 in Y; consider z2 such that A12: r1 = |.x - z2.| & z2 in B by A11; consider z1 such that A13: r2 = |.x - z1.| and A14: z1 in A by A10; take r3 = |.z1 - z2.|; r2 = |.z1 - x.| by A13,Th104; hence r3 in Z & r3 <= r by A9,A14,A12,Th105; end; A15: Z is bounded_below proof take 0; let r be ext-real number; assume r in Z; then ex z1,z st r = |.z1 - z .| & z1 in A & z in B; hence thesis by Th95; end; A16: X <> {} & X is bounded_below proof |.x - z1.| in X by A7; hence X <> {}; take 0; let r be ext-real number; assume r in X; then ex z st r = |.x - z .| & z in A; hence thesis by Th95; end; A17: lower_bound Z = dist(A,B) by Def19; A18: X++Y c= REAL by MEMBERED:3; |.x - z1.| in X by A7; then |.x - z1.| + |.x - z2 .| in X ++ Y by A6,MEMBER_1:46; then lower_bound (X ++ Y) >= lower_bound Z by A15,A8,Th126,A18; hence thesis by A16,A4,A5,A17,Th125; end; theorem A meets B implies dist(A,B) = 0 proof assume A meets B; then consider z being set such that A1: z in A and A2: z in B by XBOOLE_0:3; reconsider z as Element of COMPLEX n by A1; dist(z,A) = 0 & dist(z,B) = 0 by A1,A2,Th116; then (0 qua Nat) + (0 qua Nat) >= dist(A,B) by A1,A2,Th129; hence thesis by A1,A2,Th127; end; definition let n; func ComplexOpenSets(n) -> Subset-Family of COMPLEX n equals {A where A is Subset of COMPLEX n: A is open}; coherence proof set S = {A where A is Subset of COMPLEX n: A is open}; S c= bool COMPLEX n proof let x be set; assume x in S; then ex A being Subset of COMPLEX n st x = A & A is open; hence thesis; end; hence thesis; end; end; theorem for A being Subset of COMPLEX n holds A in ComplexOpenSets n iff A is open proof let B be Subset of COMPLEX n; B in {A where A is Subset of COMPLEX n: A is open} iff ex C being Subset of COMPLEX n st B = C & C is open; hence thesis; end; theorem for A being Subset of COMPLEX n holds A is closed iff A` is open proof let A be Subset of COMPLEX n; thus A is closed implies A` is open proof assume A1: for x st for r st r > 0 ex z st |.z.| < r & x + z in A holds x in A; let x; assume x in A`; then not x in A by XBOOLE_0:def 5; then consider r such that A2: r > 0 and A3: for z st |.z.| < r holds not x + z in A by A1; take r; thus 0 < r by A2; let z; assume |.z.| < r; hence thesis by A3,SUBSET_1:29; end; assume A4: for x st x in A` ex r st 0 < r & for z st |.z.| < r holds x + z in A`; let x such that A5: for r st r > 0 ex z st |.z.| < r & x + z in A; now let r; assume r > 0; then consider z such that A6: |.z.| < r & x + z in A by A5; take z; thus |.z.| < r & not x + z in A` by A6,XBOOLE_0:def 5; end; then not x in A` by A4; hence thesis by SUBSET_1:29; end; begin reserve v,v1,v2 for FinSequence of REAL, n,m,k for Element of NAT, x for set; defpred P[Nat] means for R being finite Subset of REAL st R <> {} & card R = $1 holds R is bounded_above & upper_bound(R) in R & R is bounded_below & lower_bound(R) in R; Lm7: P[0]; Lm8: for n st P[n] holds P[n+1] proof let n such that A1: P[n]; let R be finite Subset of REAL such that A2: R <> {} and A3: card R = n+1; now per cases; suppose A4: n=0; thus R is bounded_above; consider x such that A5: R={x} by A3,A4,CARD_2:42; x in R by A5,TARSKI:def 1; then reconsider r=x as Real; upper_bound R = r by A5,Th9; hence upper_bound R in R by A5,TARSKI:def 1; thus R is bounded_below; lower_bound R = r by A5,Th9; hence lower_bound R in R by A5,TARSKI:def 1; end; suppose A6: n<>0; set x = the Element of R; reconsider x as Real by A2,TARSKI:def 3; reconsider X = R \ {x} as finite Subset of REAL; set u = upper_bound X, m = max(x,u), l = lower_bound X, mi = min(x,l); {x} c= R by A2,ZFMISC_1:31; then card (R\{x}) = card R - card {x} by CARD_2:44; then A7: card X = n+1-1 by A3,CARD_1:30 .=n; then A8: upper_bound X in X by A1,A6,CARD_1:27; A9: now reconsider s = m as real number; let r be real number such that A10: 0x; then not s in {x} by TARSKI:def 1; then s in X by A16,XBOOLE_0:def 5; then s<=u by Def1; hence s<=m by A14,XXREAL_0:2; end; end; hence s<=m; end; now per cases by XXREAL_0:16; suppose m=x; hence m in R by A2; end; suppose m=u; hence m in R by A8,XBOOLE_0:def 5; end; end; hence upper_bound R in R by A15,A9,Def1; thus R is bounded_below; A17: mi<=l by XXREAL_0:17; A18: now let s be real number such that A19: s in R; now per cases; suppose s=x; hence mi<=s by XXREAL_0:17; end; suppose s<>x; then not s in {x} by TARSKI:def 1; then s in X by A19,XBOOLE_0:def 5; then l<=s by Def2; hence mi<=s by A17,XXREAL_0:2; end; end; hence mi<=s; end; now per cases by XXREAL_0:15; suppose mi=x; hence mi in R by A2; end; suppose mi=l; hence mi in R by A11,XBOOLE_0:def 5; end; end; hence lower_bound R in R by A18,A12,Def2; end; end; hence thesis; end; Lm9: for n holds P[n] from NAT_1:sch 1(Lm7,Lm8); theorem Th133: for R being finite Subset of REAL holds R <> {} implies R is bounded_above & upper_bound(R) in R & R is bounded_below & lower_bound(R) in R proof let R be finite Subset of REAL; assume A1: R <> {}; P[card R] by Lm9; hence thesis by A1; end; theorem for n being Nat for f being FinSequence holds 1 <= n & n+1 <= len f iff n in dom f & n+1 in dom f proof let n be Nat; let f be FinSequence; thus 1<=n & n+1 <= len f implies n in dom f & n+1 in dom f proof assume that A1: 1<=n and A2: n+1 <= len f; n<=n+1 by NAT_1:11; then 1<=n+1 & n<=len f by A2,NAT_1:11,XXREAL_0:2; hence thesis by A1,A2,FINSEQ_3:25; end; thus thesis by FINSEQ_3:25; end; theorem for n being Nat for f being FinSequence holds 1 <= n & n+2 <= len f iff n in dom f & n+1 in dom f & n+2 in dom f proof let n be Nat; let f be FinSequence; thus 1<=n & n+2 <= len f implies n in dom f & n+1 in dom f & n+2 in dom f proof assume that A1: 1<=n and A2: n+2 <= len f; n+1<=n+1+1 by NAT_1:11; then A3: 1<=n+1 & n+1<=len f by A2,NAT_1:11,XXREAL_0:2; n<=n+2 by NAT_1:11; then 1<=n+2 & n<=len f by A1,A2,XXREAL_0:2; hence thesis by A1,A2,A3,FINSEQ_3:25; end; assume that A4: n in dom f and n+1 in dom f and A5: n+2 in dom f; thus thesis by A4,A5,FINSEQ_3:25; end; theorem for D being non empty set, f1,f2 being FinSequence of D, n st 1 <= n & n <= len f2 holds (f1^f2)/.(n + len f1) = f2/.n proof let D be non empty set, f1,f2 be FinSequence of D, n such that A1: 1 <= n and A2: n <= len f2; A3: len f1 < n + len f1 by A1,NAT_1:19; len(f1^f2) = len f1 + len f2 by FINSEQ_1:22; then A4: n + len f1 <= len(f1^f2) by A2,XREAL_1:6; n + len f1 >= n by NAT_1:11; then n + len f1 >= 1 by A1,XXREAL_0:2; hence (f1^f2)/.(n + len f1) = (f1^f2).(n + len f1) by A4,FINSEQ_4:15 .= f2.(n + len f1 - len f1) by A3,A4,FINSEQ_1:24 .= f2/.n by A1,A2,FINSEQ_4:15; end; theorem v is increasing implies for n,m st n in dom v & m in dom v & n<=m holds v.n <= v.m proof assume A1: v is increasing; let n,m such that A2: n in dom v & m in dom v and A3: n<=m; now per cases; suppose n=m; hence thesis; end; suppose n<>m; then n m holds v.n<>v.m proof assume A1: v is increasing; let n,m; assume that A2: n in dom v & m in dom v and A3: n<>m; now per cases by A3,XXREAL_0:1; suppose nm; hence thesis by A1,A2,SEQM_3:def 1; end; end; hence thesis; end; theorem Th139: v is increasing & v1 = v|Seg n implies v1 is increasing proof assume that A1: v is increasing and A2: v1 = v|Seg n; now per cases; suppose n<=len v; then Seg n c= Seg len v by FINSEQ_1:5; then A3: Seg n c= dom v by FINSEQ_1:def 3; then Seg n = dom v /\ Seg n by XBOOLE_1:28; then A4: dom v1 = Seg n by A2,RELAT_1:61; now let m,k such that A5: m in dom v1 & k in dom v1 and A6: m; thus rng v1 = X \/ rng <*u*> by A3,A7,FINSEQ_1:31 .= (rng v \ {u}) \/ {u} by FINSEQ_1:39 .= rng v \/ {u} by XBOOLE_1:39 .= rng v by A4,XBOOLE_1:12; thus A10: len v1 = n+ len <*u*> by A2,A3,A5,A6,A8,FINSEQ_1:22 .= card rng v by A2,FINSEQ_1:39; now let k,m; assume that A11: k in dom v1 and A12: m in dom v1 and A13: ku by TARSKI:def 1; s=u by A2,A3,A5,A6,A8,A10,A18,FINSEQ_1:42; hence rlen v1; then m {} by A2,CARD_1:27,RELAT_1:41; then A7: upper_bound(X) in X by Th133; then consider m being Nat such that A8: m in dom v2 and A9: v2.m=u by A4,FINSEQ_2:10; reconsider m as Element of NAT by ORDINAL1:def 12; A10: m<=len v2 by A8,FINSEQ_3:25; A11: n<=n+1 by NAT_1:11; then Seg n c= Seg(n+1) by FINSEQ_1:5; then A12: Seg n = Seg(n+1) /\ Seg n by XBOOLE_1:28; dom v2=Seg len v2 by FINSEQ_1:def 3; then A13: dom (v2|Seg n) =Seg n by A3,A12,RELAT_1:61; dom v1 = Seg len v1 by FINSEQ_1:def 3; then A14: dom (v1|Seg n) = Seg n by A2,A12,RELAT_1:61; then reconsider f1 = v1|Seg n, f2 = v2|Seg n as FinSequence by A13, FINSEQ_1:def 2; rng f2 c= rng v2 by RELAT_1:70; then A15: rng f2 c= REAL by XBOOLE_1:1; rng f1 c= rng v1 by RELAT_1:70; then rng f1 c= REAL by XBOOLE_1:1; then reconsider f1, f2 as FinSequence of REAL by A15,FINSEQ_1:def 4; consider k being Nat such that A16: k in dom v1 and A17: v1.k=u by A7,FINSEQ_2:10; reconsider k as Element of NAT by ORDINAL1:def 12; A18: k<=len v1 by A16,FINSEQ_3:25; A19: 1<=k by A16,FINSEQ_3:25; A20: now assume k<>len v1; then klen v2; then mn+1 by NAT_1:13; then x<>u by A2,A5,A16,A17,A20,A30,A32,A34,Th138; then not x in {u} by TARSKI:def 1; hence thesis by A34,A35,XBOOLE_0:def 5; end; let x; assume A36: x in rng v1 \ {u}; then x in rng v1 by XBOOLE_0:def 5; then consider i being Nat such that A37: i in dom v1 and A38: v1.i=x by FINSEQ_2:10; A39: i<=len v1 by A37,FINSEQ_3:25; not x in {u} by A36,XBOOLE_0:def 5; then i <> len v1 by A17,A20,A38,TARSKI:def 1; then i).i=v1.i by A2,A17,A20,A29,FINSEQ_1:42; end; suppose i<>len f1+1; then i < len f1+1 by A46,XXREAL_0:1; then i<=len f1 by NAT_1:13; then A47: i in dom f1 by A14,A29,A45,FINSEQ_1:1; hence (f1^<*u*>).i=f1.i by FINSEQ_1:def 7 .= v1.i by A47,FUNCT_1:47; end; end; hence (f1^<*u*>).i=v1.i; end; len (f1^<*u*>) = n + len <*u*> by A29,FINSEQ_1:22 .= len v1 by A2,FINSEQ_1:39; then A48: v1=f1^<*u*> by A43,FINSEQ_2:9; A49: len f2 = n by A13,FINSEQ_1:def 3; then A50: len (f2^<*u*>) = n + len <*u*> by FINSEQ_1:22 .= len v2 by A3,FINSEQ_1:39; A51: dom f2 c= dom v2 by A3,A11,A49,FINSEQ_3:30; A52: rng f2 = rng v2 \ {u} proof thus rng f2 c= rng v2 \ {u} proof let x; assume x in rng f2; then consider i being Nat such that A53: i in dom f2 and A54: f2.i=x by FINSEQ_2:10; A55: x=v2.i by A53,A54,FUNCT_1:47; A56: v2.i in rng v2 by A51,A53,FUNCT_1:def 3; i<=n by A13,A53,FINSEQ_1:1; then i<>n+1 by NAT_1:13; then x<>u by A3,A6,A8,A9,A25,A51,A53,A55,Th138; then not x in {u} by TARSKI:def 1; hence thesis by A55,A56,XBOOLE_0:def 5; end; let x; assume A57: x in rng v2 \ {u}; then x in rng v2 by XBOOLE_0:def 5; then consider i being Nat such that A58: i in dom v2 and A59: v2.i=x by FINSEQ_2:10; A60: i<=len v2 by A58,FINSEQ_3:25; not x in {u} by A57,XBOOLE_0:def 5; then i <> len v2 by A9,A25,A59,TARSKI:def 1; then i).i=v2.i by A3,A9,A25,A49,FINSEQ_1:42; end; suppose i<>len f2+1; then i < len f2+1 by A67,XXREAL_0:1; then i<=len f2 by NAT_1:13; then A68: i in dom f2 by A13,A49,A66,FINSEQ_1:1; hence (f2^<*u*>).i=f2.i by FINSEQ_1:def 7 .= v2.i by A68,FUNCT_1:47; end; end; hence (f2^<*u*>).i=v2.i; end; f1 is increasing & f2 is increasing by A5,A6,Th139; then f1=f2 by A1,A4,A29,A49,A31,A52; hence thesis by A48,A50,A64,FINSEQ_2:9; end; Lm15: for n holds P3[n] from NAT_1:sch 1(Lm13,Lm14); theorem for v1,v2 st len v1 = len v2 & rng v1 = rng v2 & v1 is increasing & v2 is increasing holds v1 = v2 by Lm15; definition let v; func Incr(v) ->increasing FinSequence of REAL means :Def21: rng it = rng v & len it = card rng v; existence proof consider v1 such that A1: rng v1 = rng v & len v1 = card rng v and A2: v1 is increasing by Lm12; reconsider v1 as increasing FinSequence of REAL by A2; take v1; thus thesis by A1; end; uniqueness by Lm15; end; registration let v be non empty FinSequence of REAL; cluster Incr v -> non empty; coherence proof A1: len Incr(v)=card rng v by Def21; assume Incr(v) is empty; then rng v = {} by A1; hence contradiction; end; end; registration cluster non empty bounded_above bounded_below for Subset of REAL; existence proof reconsider A = {0} as Subset of REAL; take A; thus A is non empty; thus A is bounded_above; take 0; let t be ext-real number; assume t in A; hence thesis; end; end; theorem for A,B being non empty bounded_below Subset of REAL holds lower_bound(A \/ B) = min(lower_bound A,lower_bound B) proof let A,B be non empty bounded_below Subset of REAL; set r = min(lower_bound A,lower_bound B); A1: r <= lower_bound B by XXREAL_0:17; A2: for r1 being real number st for t being real number st t in A \/ B holds t >= r1 holds r >= r1 proof let r1 be real number; assume A3: for t being real number st t in A \/ B holds t >= r1; now let t be real number; assume t in B; then t in A \/ B by XBOOLE_0:def 3; hence t >= r1 by A3; end; then A4: lower_bound B >= r1 by Th43; now let t be real number; assume t in A; then t in A \/ B by XBOOLE_0:def 3; hence t >= r1 by A3; end; then lower_bound A >= r1 by Th43; hence thesis by A4,XXREAL_0:20; end; A5: r <= lower_bound A by XXREAL_0:17; for t being real number st t in A \/ B holds t >= r proof let t be real number; assume t in A \/ B; then t in A or t in B by XBOOLE_0:def 3; then lower_bound A <= t or lower_bound B <= t by Def2; hence thesis by A5,A1,XXREAL_0:2; end; hence thesis by A2,Th44; end; theorem for A,B being non empty bounded_above Subset of REAL holds upper_bound(A \/ B) = max(upper_bound A,upper_bound B) proof let A,B be non empty bounded_above Subset of REAL; set r = max(upper_bound A,upper_bound B); A1: r >= upper_bound B by XXREAL_0:25; A2: for r1 being real number st for t being real number st t in A \/ B holds t <= r1 holds r <= r1 proof let r1 be real number; assume A3: for t being real number st t in A \/ B holds t <= r1; now let t be real number; assume t in B; then t in A \/ B by XBOOLE_0:def 3; hence t <= r1 by A3; end; then A4: upper_bound B <= r1 by Th45; now let t be real number; assume t in A; then t in A \/ B by XBOOLE_0:def 3; hence t <= r1 by A3; end; then upper_bound A <= r1 by Th45; hence thesis by A4,XXREAL_0:28; end; A5: r >= upper_bound A by XXREAL_0:25; for t being real number st t in A \/ B holds t <= r proof let t be real number; assume t in A \/ B; then t in A or t in B by XBOOLE_0:def 3; then upper_bound A >= t or upper_bound B >= t by Def1; hence thesis by A5,A1,XXREAL_0:2; end; hence thesis by A2,Th46; end; theorem for R being non empty Subset of REAL,r0 being real number st for r being real number st r in R holds r <= r0 holds upper_bound R <= r0 proof let R be non empty Subset of REAL,r0 be real number; assume A1: for r being real number st r in R holds r<=r0; then for r being ext-real number st r in R holds r<=r0; then r0 is UpperBound of R by XXREAL_2:def 1; then A2: R is bounded_above by XXREAL_2:def 10; now set r1=(upper_bound R) -r0; assume upper_bound R >r0; then r1>0 by XREAL_1:50; then ex r being real number st r in R & (upper_bound R)-r1 Subset of REAL equals {r where r is Real: g<=r & r<=s }; coherence proof now let x; assume x in [. g,s .]; then A1: ex r being Element of ExtREAL st x = r & g <= r & r<=s; g in REAL & s in REAL by XREAL_0:def 1; hence x in REAL by A1,XXREAL_0:45; end; hence thesis by TARSKI:def 3; end; compatibility proof set Y = {r where r is Real: g<=r & r<=s }; let X be Subset of REAL; A2: [. g,s .] c= Y proof let x; assume x in [. g,s .]; then consider r being Element of ExtREAL such that A3: x = r and A4: g <= r & r<=s; g in REAL & s in REAL by XREAL_0:def 1; then r in REAL by A4,XXREAL_0:45; hence thesis by A3,A4; end; Y c= [. g,s .] proof let x; assume x in Y; then consider r being Element of REAL such that A5: x = r & g <= r & r<=s; r in REAL; hence thesis by A5,NUMBERS:31; end; hence thesis by A2,XBOOLE_0:def 10; end; end; definition let g,s be ext-real number; redefine func ]. g,s .[ -> Subset of REAL equals {r where r is Real : g=-2*g by XREAL_1:24; then (p+g)+-2*r>=(p+g)+-2*g by XREAL_1:7; then A2: p+g-2*r>=-(g-p); 2*p<=2*r by A1,XREAL_1:64; then -2*p>=-2*r by XREAL_1:24; then (p+g)+-2*p>=(p+g)+-2*r by XREAL_1:7; hence thesis by A2,ABSVALUE:5; end; assume A3: abs(p+g-2*r)<=g-p; then p+g-2*r>=-(g-p) by ABSVALUE:5; then p+g>=p-g+2*r by XREAL_1:19; then p+g-(p-g)>=2*r by XREAL_1:19; then A4: 1/2*(2*g)>=1/2*(2*r) by XREAL_1:64; g-p>=p+g-2*r by A3,ABSVALUE:5; then 2*r+(g-p)>=p+g by XREAL_1:20; then 2*r>=p+g-(g-p) by XREAL_1:20; then 1/2*(2*r)>=1/2*(2*p) by XREAL_1:64; hence thesis by A4; end; theorem r in ].p,g.[ iff abs(p+g-2*r)-2*g by XREAL_1:24; then (p+g)+-2*r>(p+g)+-2*g by XREAL_1:6; then A2: p+g-2*r>-(g-p); 2*p<2*r by A1,XREAL_1:68; then -2*p>-2*r by XREAL_1:24; then (p+g)+-2*p>(p+g)+-2*r by XREAL_1:6; hence thesis by A2,SEQ_2:1; end; assume A3: abs(p+g-2*r)-(g-p) by SEQ_2:1; then p+g>p-g+2*r by XREAL_1:20; then p+g-(p-g)>2*r by XREAL_1:20; then A4: 1/2*(2*g)>1/2*(2*r) by XREAL_1:68; g-p>p+g-2*r by A3,SEQ_2:1; then 2*r+(g-p)>p+g by XREAL_1:19; then 2*r>p+g-(g-p) by XREAL_1:19; then 1 /2*(2*r)>1/2*(2*p) by XREAL_1:68; hence thesis by A4; end; definition let X; attr X is compact means :Def3: for s1 st rng s1 c= X ex s2 st s2 is subsequence of s1 & s2 is convergent & lim s2 in X; end; definition let X; attr X is closed means :Def4: for s1 st rng s1 c= X & s1 is convergent holds lim s1 in X; end; definition let X; attr X is open means :Def5: X` is closed; end; theorem Th4: for s1 st rng s1 c= [.s,g.] holds s1 is bounded proof let s1 such that A1: rng s1 c= [.s,g.]; thus s1 is bounded_above proof take r = g + 1; A2: for t st t in rng s1 holds t < r proof let t; assume t in rng s1; then t in [.s,g.] by A1; then A3: ex p be Real st t = p & s <= p & p<=g; g < r by XREAL_1:29; hence thesis by A3,XXREAL_0:2; end; for n holds s1.n < r proof let n; n in NAT; then n in dom s1 by FUNCT_2:def 1; then s1.n in rng s1 by FUNCT_1:def 3; hence thesis by A2; end; hence thesis; end; thus s1 is bounded_below proof take r = s - 1; A4: r + 1 = s - (1-1); A5: for t st t in rng s1 holds r < t proof let t; assume t in rng s1; then t in [.s,g.] by A1; then A6: ex p be Real st t = p & s <= p & p<=g; r < s by A4,XREAL_1:29; hence thesis by A6,XXREAL_0:2; end; for n holds r < s1.n proof let n; n in NAT; then n in dom s1 by FUNCT_2:def 1; then s1.n in rng s1 by FUNCT_1:def 3; hence thesis by A5; end; hence thesis; end; end; theorem Th5: [.s,g.] is closed proof for s1 st rng s1 c= [.s,g.] & s1 is convergent holds lim s1 in [.s,g.] proof let s1; assume that A1: rng s1 c= [.s,g.] and A2: s1 is convergent; A3: s <= lim s1 proof s in REAL by XREAL_0:def 1; then reconsider s2 = NAT --> s as Real_Sequence by FUNCOP_1:45; A4: now let n; n in NAT; then n in dom s1 by FUNCT_2:def 1; then s1.n in rng s1 by FUNCT_1:def 3; then s1.n in [.s,g.] by A1; then ex p be Real st s1.n = p & s <= p & p<=g; hence s2.n<=s1.n by FUNCOP_1:7; end; s2.0 = s by FUNCOP_1:7; then lim s2 = s by SEQ_4:25; hence thesis by A2,A4,SEQ_2:18; end; lim s1 <= g proof g in REAL by XREAL_0:def 1; then reconsider s2 = NAT --> g as Real_Sequence by FUNCOP_1:45; A5: now let n; n in NAT; then n in dom s1 by FUNCT_2:def 1; then s1.n in rng s1 by FUNCT_1:def 3; then s1.n in [.s,g.] by A1; then ex p be Real st s1.n = p & s <= p & p<=g; hence s1.n<=s2.n by FUNCOP_1:7; end; s2.0 = g by FUNCOP_1:7; then lim s2 = g by SEQ_4:25; hence thesis by A2,A5,SEQ_2:18; end; hence thesis by A3; end; hence thesis by Def4; end; theorem [.s,g.] is compact proof for s1 st rng s1 c= [.s,g.] ex s2 st s2 is subsequence of s1 & s2 is convergent & lim s2 in [.s,g.] proof let s1; A1: [.s,g.] is closed by Th5; assume A2: (rng s1) c= [.s,g.]; then consider s2 be Real_Sequence such that A3: s2 is subsequence of s1 and A4: s2 is convergent by Th4,SEQ_4:40; take s2; ex Nseq st s2 = s1*Nseq by A3,VALUED_0:def 17; then rng s2 c= rng s1 by RELAT_1:26; then rng s2 c= [.s,g.] by A2,XBOOLE_1:1; hence thesis by A3,A4,A1,Def4; end; hence thesis by Def3; end; theorem Th7: ].p,q.[ is open proof defpred P[Real] means $1<=p or q<=$1; consider X such that A1: for r be Real holds r in X iff P[r] from SUBSET_1:sch 3; now let s1 such that A2: (rng s1) c= X and A3: s1 is convergent; lim s1<=p or q<=lim s1 proof assume A4: not thesis; then 0 open for Subset of REAL; coherence by Th7; cluster [.p,q.] -> closed for Subset of REAL; coherence by Th5; end; theorem Th8: X is compact implies X is closed proof assume A1: X is compact; assume not X is closed; then consider s1 such that A2: rng s1 c= X and A3: s1 is convergent & not lim s1 in X by Def4; ex s2 st s2 is subsequence of s1 & s2 is convergent & (lim s2) in X by A1,A2 ,Def3; hence contradiction by A3,SEQ_4:17; end; registration cluster compact -> closed for Subset of REAL; coherence by Th8; end; theorem Th9: (for p st p in X ex r,n st 0{} & X is closed & X is bounded_above holds upper_bound X in X proof let X such that A1: X<>{} and A2: X is closed and A3: X is bounded_above and A4: not upper_bound X in X; set s1=upper_bound X; defpred P[Element of NAT,Element of REAL] means ex q st q=$2 & q in X & s1 - q < 1/($1+1); A5: for n being Element of NAT ex p being Element of REAL st P[n,p] proof let n be Element of NAT; 0<(n+1)"; then 0<1/(n+1) by XCMPLX_1:215; then consider t such that A6: t in X and A7: s1 -1/(n+1) {} & X is closed & X is bounded_below holds lower_bound X in X proof let X such that A1: X<>{} and A2: X is closed and A3: X is bounded_below and A4: not lower_bound X in X; set i1=lower_bound X; defpred P[Element of NAT,Element of REAL] means ex q st q=$2 & q in X & q-i1 < 1/($1+1); A5: for n being Element of NAT ex p being Element of REAL st P[n,p] proof let n be Element of NAT; 0<(n+1)"; then 0<1/(n+1) by XCMPLX_1:215; then consider t such that A6: t in X and A7: t{} & X is compact holds upper_bound X in X & lower_bound X in X proof let X such that A1: X<>{} and A2: X is compact; X is real-bounded closed by A2,Th10; hence thesis by A1,Th12,Th13; end; theorem X is compact & (for g1,g2 st g1 in X & g2 in X holds [.g1,g2.] c= X) implies ex p,g st X = [.p,g.] proof assume that A1: X is compact and A2: for g1,g2 st g1 in X & g2 in X holds [.g1,g2.] c= X; per cases; suppose A3: X={}; take 1; take 0; thus thesis by A3,XXREAL_1:29; end; suppose A4: X<>{}; take p=lower_bound X, g=upper_bound X; A5: X is real-bounded closed by A1,Th10; now let r be Real; assume r in X; then r<=g & p<=r by A5,SEQ_4:def 1,def 2; hence r in [.p,g.]; end; then A6: X c= [.p,g.] by SUBSET_1:2; upper_bound X in X & lower_bound X in X by A4,A5,Th12,Th13; then [.p,g.] c= X by A2; hence thesis by A6,XBOOLE_0:def 10; end; end; registration cluster open for Subset of REAL; existence proof take ].0,1.[; thus thesis; end; end; definition let r be real number; mode Neighbourhood of r -> Subset of REAL means :Def6: ex g st 0 open for Neighbourhood of r; coherence proof let A be Neighbourhood of r; ex g st 00 and A5: N = ].upper_bound X-t,upper_bound X+t.[ by Def6; A6: upper_bound X + t/2 > upper_bound X by A4,XREAL_1:29,215; A7: upper_bound X + t/2 +t/2 > upper_bound X + t/2 by A4,XREAL_1:29,215; upper_bound X - t < upper_bound X by A4,XREAL_1:44; then upper_bound X - t < upper_bound X + t/2 by A6,XXREAL_0:2; then upper_bound X + t/2 in {s where s is Real: upper_bound X-t0 and A5: N = ].lower_bound X-t,lower_bound X+t.[ by Def6; A6: lower_bound X - t/2 < lower_bound X by A4,XREAL_1:44,215; A7: lower_bound X - t/2 - t/2 < lower_bound X - t/2 by A4,XREAL_1:44,215; lower_bound X < lower_bound X + t by A4,XREAL_1:29; then lower_bound X - t/2 < lower_bound X + t by A6,XXREAL_0:2; then lower_bound X - t/2 in {s where s is Real: lower_bound X-t{}; take p=lower_bound X, g=upper_bound X; now let r be Real; thus r in X implies r in ].p,g.[ proof assume A6: r in X; then p<>r & p<=r by A1,A2,Th22,SEQ_4:def 2; then A7: pr & r<=g by A1,A2,A6,Th21,SEQ_4:def 1; then r0 by XREAL_1:50; then consider g2 such that A9: g2 in X & g-(g-r)0 by A8,XREAL_1:50; then consider g1 such that A10: g1 in X & g1 Subset of REAL equals { r where r is Real : g<=r & r Subset of REAL equals { r where r is Real : g one-to-one; coherence by FUNCT_1:52; end; theorem for h being one-to-one Function holds (h|X)" = (h")|(h.:X) proof let h be one-to-one Function; reconsider hX = h|X as one-to-one Function; now let r be set; thus r in dom ((h|X)") implies r in dom ((h")|(h.:X)) proof assume r in dom ((h|X)"); then r in rng(hX) by FUNCT_1:33; then consider g being set such that A1: g in dom (h|X) and A2: (h|X).g=r by FUNCT_1:def 3; A3: h.g=r by A1,A2,FUNCT_1:47; A4: g in dom h /\ X by A1,RELAT_1:61; then g in dom h by XBOOLE_0:def 4; then r in rng h by A3,FUNCT_1:def 3; then A5: r in dom (h") by FUNCT_1:33; g in dom h & g in X by A4,XBOOLE_0:def 4; then r in h.:X by A3,FUNCT_1:def 6; then r in dom (h")/\(h.:X) by A5,XBOOLE_0:def 4; hence thesis by RELAT_1:61; end; assume r in dom ((h")|(h.:X)); then r in dom(h") /\ (h.:X) by RELAT_1:61; then r in h.:X by XBOOLE_0:def 4; then consider t being set such that A6: t in dom h and A7: t in X and A8: h.t=r by FUNCT_1:def 6; t in dom h/\X by A6,A7,XBOOLE_0:def 4; then A9: t in dom(h|X) by RELAT_1:61; (h|X).t=r by A7,A8,FUNCT_1:49; then r in rng(hX) by A9,FUNCT_1:def 3; hence r in dom((h|X)") by FUNCT_1:33; end; then A10: dom ((hX)")=dom ((h")|(h.:X)) by TARSKI:1; now given r being set such that A11: r in dom((h|X)") and A12: ((h|X)").r<>((h")|(h.:X)).r; r in dom(h")/\(h.:X) by A10,A11,RELAT_1:61; then r in h.:X by XBOOLE_0:def 4; then consider t be set such that t in dom h and t in X and A13: h.t=r by FUNCT_1:def 6; r in rng (hX) by A11,FUNCT_1:33; then consider g be set such that A14: g in dom(h|X) and A15: (h|X).g=r by FUNCT_1:def 3; A16: h.g=r by A14,A15,FUNCT_1:47; g in dom h /\ X by A14,RELAT_1:61; then A17: g in dom h by XBOOLE_0:def 4; ((hX)").r<>(h").r by A10,A11,A12,FUNCT_1:47; then g<>(h").(h.t) by A14,A15,A13,FUNCT_1:34; hence contradiction by A13,A17,A16,FUNCT_1:34; end; hence thesis by A10,FUNCT_1:2; end; theorem Th18: for h being PartFunc of W,REAL holds rng h is real-bounded & upper_bound (rng h) = lower_bound (rng h) implies h is constant proof let h be PartFunc of W,REAL; assume A1: rng h is real-bounded & upper_bound (rng h) = lower_bound (rng h); assume not h is constant; then consider x1,x2 being set such that A2: x1 in dom h & x2 in dom h and A3: h.x1 <> h.x2 by FUNCT_1:def 10; h.x1 in rng h & h.x2 in rng h by A2,FUNCT_1:def 3; hence contradiction by A1,A3,SEQ_4:12; end; theorem for h being PartFunc of W,REAL holds h.:Y is real-bounded & upper_bound(h.:Y) = lower_bound(h.:Y) implies h|Y is constant proof let h be PartFunc of W,REAL; rng (h|Y) = h.:Y by RELAT_1:115; hence thesis by Th18; end; reserve e1,e2 for ext-real number; reserve h,h1,h2 for PartFunc of REAL,REAL; definition let h; redefine attr h is increasing means :Def1: for r1,r2 st r1 in dom h & r2 in dom h & r1 h.r2 by VALUED_0:def 14; assume A2: for r1,r2 st r1 in dom h & r2 in dom h & r1 < r2 holds h.r1 > h.r2; let e1,e2; thus thesis by A2; end; redefine attr h is non-decreasing means :Def3: for r1,r2 st r1 in dom h & r2 in dom h & r1= h.r2 by VALUED_0:def 16; assume A5: for r1,r2 st r1 in dom h & r2 in dom h & r1 < r2 holds h.r1 >= h. r2; let e1,e2 such that A6: e1 in dom h & e2 in dom h; assume e1 <= e2; then e1 < e2 or e1 = e2 by XXREAL_0:1; hence thesis by A5,A6; end; end; theorem Th20: h|Y is increasing iff for r1,r2 st r1 in Y /\ dom h & r2 in Y /\ dom h & r1 h.r1 proof assume A1: h|Y is increasing; let r1,r2 such that A2: r1 in Y /\ dom h and A3: r2 in Y /\ dom h and A4: r1h.r1; let r1,r2; assume that A9: r1 in dom(h|Y) & r2 in dom(h|Y) and A10: r1 monotone for PartFunc of REAL,REAL; coherence by Def5; cluster non-increasing -> monotone for PartFunc of REAL,REAL; coherence by Def5; cluster non monotone -> non non-decreasing non non-increasing for PartFunc of REAL,REAL; coherence; end; theorem Th24: h|Y is non-decreasing iff for r1,r2 st r1 in Y /\ dom h & r2 in Y /\ dom h & r1<=r2 holds h.r1 <= h.r2 proof thus h|Y is non-decreasing implies for r1,r2 st r1 in Y /\ dom h & r2 in Y /\ dom h & r1<=r2 holds h.r1 <= h.r2 proof assume A1: h|Y is non-decreasing; let r1,r2 such that A2: r1 in Y /\ dom h & r2 in Y /\ dom h and A3: r1<=r2; now per cases by A3,XXREAL_0:1; suppose r1 < r2; hence thesis by A1,A2,Th22; end; suppose r1 = r2; hence thesis; end; end; hence thesis; end; assume A4: for r1,r2 st r1 in Y /\ dom h & r2 in Y /\ dom h & r1<=r2 holds h. r1 <= h.r2; let r1,r2; assume that A5: r1 in dom(h|Y) & r2 in dom(h|Y) and A6: r1 constant for PartFunc of REAL,REAL; coherence proof let h be PartFunc of REAL,REAL; assume A1: h is non-decreasing non-increasing; let r1,r2 be set; assume A2: r1 in dom h & r2 in dom h; then reconsider r1,r2 as Real; r1 < r2 or r1 = r2 or r2 < r1 by XXREAL_0:1; then h.r1 <= h.r2 & h.r2 <= h.r1 by A1,A2,Def3,Def4; hence thesis by XXREAL_0:1; end; end; registration cluster constant -> non-increasing non-decreasing for PartFunc of REAL,REAL; coherence proof let h be PartFunc of REAL,REAL; assume A1: h is constant; thus h is non-increasing proof let r1,r2; assume r1 in dom h & r2 in dom h; hence thesis by A1,FUNCT_1:def 10; end; let r1,r2; assume r1 in dom h & r2 in dom h; hence thesis by A1,FUNCT_1:def 10; end; end; registration cluster trivial for PartFunc of REAL,REAL; existence proof reconsider f = {} as PartFunc of REAL,REAL by RELSET_1:12; take f; thus thesis; end; end; registration let h be increasing PartFunc of REAL,REAL, X be set; cluster h|X -> increasing for PartFunc of REAL,REAL; coherence proof now let r1,r2; assume A1: r1 in dom(h|X) & r2 in dom(h|X); then A2: h.r1 = (h|X).r1 & h.r2 = (h|X).r2 by FUNCT_1:47; assume A3: r1 < r2; r1 in dom h & r2 in dom h by A1,RELAT_1:57; hence (h|X).r1 < (h|X).r2 by A2,A3,Def1; end; hence thesis by Def1; end; end; registration let h be decreasing PartFunc of REAL,REAL, X be set; cluster h|X -> decreasing for PartFunc of REAL,REAL; coherence proof now let r1,r2; assume A1: r1 in dom(h|X) & r2 in dom(h|X); then A2: h.r1 = (h|X).r1 & h.r2 = (h|X).r2 by FUNCT_1:47; assume A3: r1 < r2; r1 in dom h & r2 in dom h by A1,RELAT_1:57; hence (h|X).r1 > (h|X).r2 by A2,A3,Def2; end; hence thesis by Def2; end; end; registration let h be non-decreasing PartFunc of REAL,REAL, X be set; cluster h|X -> non-decreasing for PartFunc of REAL,REAL; coherence proof now let r1,r2; assume A1: r1 in dom(h|X) & r2 in dom(h|X); then A2: h.r1 = (h|X).r1 & h.r2 = (h|X).r2 by FUNCT_1:47; assume A3: r1 < r2; r1 in dom h & r2 in dom h by A1,RELAT_1:57; hence (h|X).r1 <= (h|X).r2 by A2,A3,Def3; end; hence thesis by Def3; end; end; theorem Y misses dom h implies h|Y is increasing & h|Y is decreasing & h|Y is non-decreasing & h|Y is non-increasing & h|Y is monotone proof assume A1: Y /\ dom h = {}; then for r1,r2 holds ( r1 in Y /\ dom h & r2 in Y /\ dom h & r1 {}; set x = the Element of Y /\ X /\ dom h; x in dom h by A2,XBOOLE_0:def 4; then reconsider x as Real; now take r1 = h.x; now let p; assume A3: p in Y /\ X /\ dom h; then A4: p in Y /\ X by XBOOLE_0:def 4; A5: p in dom h by A3,XBOOLE_0:def 4; p in X by A4,XBOOLE_0:def 4; then A6: p in (X /\ dom h) by A5,XBOOLE_0:def 4; A7: x in dom h by A2,XBOOLE_0:def 4; A8: x in Y /\ X by A2,XBOOLE_0:def 4; then x in Y by XBOOLE_0:def 4; then A9: x in (Y /\ dom h) by A7,XBOOLE_0:def 4; x in X by A8,XBOOLE_0:def 4; then A10: x in (X /\ dom h) by A7,XBOOLE_0:def 4; p in Y by A4,XBOOLE_0:def 4; then A11: p in (Y /\ dom h) by A5,XBOOLE_0:def 4; now per cases; suppose x <= p; then h.x <= h.p & h.p <= h.x by A1,A11,A6,A9,A10,Th24,Th25; hence h.p = h.x by XXREAL_0:1; end; suppose p <= x; then h.p <= h.x & h.x <= h.p by A1,A11,A6,A9,A10,Th24,Th25; hence h.p = h.x by XXREAL_0:1; end; end; hence h.p = r1; end; hence for p st p in Y /\ X /\ dom h holds h.p = r1; end; hence thesis by PARTFUN2:57; end; end; hence thesis; end; theorem X c= Y & h|Y is increasing implies h|X is increasing proof assume that A1: X c= Y and A2: h|Y is increasing; now A3: X /\ dom h c= Y /\ dom h by A1,XBOOLE_1:26; let r1,r2; assume r1 in X /\ dom h & r2 in X /\ dom h & r1 < r2; hence h.r1 < h.r2 by A2,A3,Th20; end; hence thesis by Th20; end; theorem X c= Y & h|Y is decreasing implies h|X is decreasing proof assume that A1: X c= Y and A2: h|Y is decreasing; now A3: X /\ dom h c= Y /\ dom h by A1,XBOOLE_1:26; let r1,r2; assume r1 in X /\ dom h & r2 in X /\ dom h & r1 < r2; hence h.r1 > h.r2 by A2,A3,Th21; end; hence thesis by Th21; end; theorem X c= Y & h|Y is non-decreasing implies h|X is non-decreasing proof assume that A1: X c= Y and A2: h|Y is non-decreasing; now A3: X /\ dom h c= Y /\ dom h by A1,XBOOLE_1:26; let r1,r2; assume r1 in X /\ dom h & r2 in X /\ dom h & r1 < r2; hence h.r1 <= h.r2 by A2,A3,Th22; end; hence thesis by Th22; end; theorem X c= Y & h|Y is non-increasing implies h|X is non-increasing proof assume that A1: X c= Y and A2: h|Y is non-increasing; now A3: X /\ dom h c= Y /\ dom h by A1,XBOOLE_1:26; let r1,r2; assume r1 in X /\ dom h & r2 in X /\ dom h & r1 < r2; hence h.r1 >= h.r2 by A2,A3,Th23; end; hence thesis by Th23; end; theorem Th32: (h|Y is increasing & 0= h.r2 by A3,TARSKI:def 1; end; hence thesis by Th23; end; theorem h|{x} is decreasing proof now let r1,r2; assume that A1: r1 in {x} /\ dom h and A2: r2 in {x} /\ dom h and A3: r1 h.r2 by A3,A4,TARSKI:def 1; end; hence thesis by Th21; end; theorem h|{x} is non-decreasing proof now let r1,r2; assume that A1: r1 in {x} /\ dom h and A2: r2 in {x} /\ dom h and r1p2; now per cases by A8,XXREAL_0:1; suppose p1p2; now per cases by A15,XXREAL_0:1; suppose p1= ((h|[.p,g.])").y2 by A2,Th20; y1 in h.:[.p,g.] by A3,XBOOLE_0:def 4; then A7: y1 in rng (h|[.p,g.]) by RELAT_1:115; y2 in h.:[.p,g.] by A4,XBOOLE_0:def 4; then A8: y2 in rng (h|[.p,g.]) by RELAT_1:115; A9: h|[.p,g.]|[.p,g.] is increasing by A1; now per cases; suppose ((h|[.p,g.])").y1 = ((h|[.p,g.])").y2; then y1 =(h|[.p,g.]).(((h|[.p,g.])").y2) by A7,FUNCT_1:35 .=y2 by A8,FUNCT_1:35; hence contradiction by A5; end; suppose A10: ((h|[.p,g.])").y1 <> ((h|[.p,g.])").y2; A11: dom (h|[.p,g.])=dom ((h|[.p,g.])|[.p,g.]) by RELAT_1:72 .=[.p,g.]/\dom(h|[.p,g.]) by RELAT_1:61; A12: ((h|[.p,g.])").y2 in dom (h|[.p,g.]) & ((h|[.p,g.])").y1 in dom (h| [.p,g.]) by A7,A8,PARTFUN2:60; ((h|[.p,g.])").y2 < ((h|[.p,g.])").y1 by A6,A10,XXREAL_0:1; then (h|[.p,g.]).(((h|[.p,g.])").y2) < (h|[.p,g.]).(((h|[.p,g.])").y1) by A9,A12,A11,Th20; then y2 < (h|[.p,g.]).(((h|[.p,g.])").y1) by A8,FUNCT_1:35; hence contradiction by A5,A7,FUNCT_1:35; end; end; hence contradiction; end; theorem for h being one-to-one PartFunc of REAL, REAL st h|[.p,g.] is decreasing holds (h|[.p,g.])"|(h.:[.p,g.]) is decreasing proof let h be one-to-one PartFunc of REAL, REAL; assume that A1: h|[.p,g.] is decreasing and A2: not (h|[.p,g.])"|(h.:[.p,g.]) is decreasing; consider y1,y2 be Real such that A3: y1 in h.:[.p,g.] /\ dom((h|[.p,g.])") and A4: y2 in h.:[.p,g.] /\ dom((h|[.p,g.])") and A5: y1= ((h|[.p,g.])").y1 by A2,Th21; y1 in h.:[.p,g.] by A3,XBOOLE_0:def 4; then A7: y1 in rng (h|[.p,g.]) by RELAT_1:115; y2 in h.:[.p,g.] by A4,XBOOLE_0:def 4; then A8: y2 in rng (h|[.p,g.]) by RELAT_1:115; A9: h|[.p,g.]|[.p,g.] is decreasing by A1; now per cases; suppose ((h|[.p,g.])").y1 = ((h|[.p,g.])").y2; then y1 =(h|[.p,g.]).(((h|[.p,g.])").y2) by A7,FUNCT_1:35 .=y2 by A8,FUNCT_1:35; hence contradiction by A5; end; suppose A10: ((h|[.p,g.])").y1 <> ((h|[.p,g.])").y2; A11: dom (h|[.p,g.])=dom ((h|[.p,g.])|[.p,g.]) by RELAT_1:72 .=[.p,g.]/\dom(h|[.p,g.]) by RELAT_1:61; A12: ((h|[.p,g.])").y2 in dom (h|[.p,g.]) & ((h|[.p,g.])").y1 in dom (h| [.p,g.]) by A7,A8,PARTFUN2:60; ((h|[.p,g.])").y2 > ((h|[.p,g.])").y1 by A6,A10,XXREAL_0:1; then (h|[.p,g.]).(((h|[.p,g.])").y2) < (h|[.p,g.]).(((h|[.p,g.])").y1) by A9,A12,A11,Th21; then y2 < (h|[.p,g.]).(((h|[.p,g.])").y1) by A8,FUNCT_1:35; hence contradiction by A5,A7,FUNCT_1:35; end; end; hence contradiction; end; begin reserve x,y,X,Y for set; reserve C for non empty set; reserve c for Element of C; reserve f,f1,f2,f3,g,g1 for PartFunc of C,COMPLEX; reserve r1,r2,p1 for real number; reserve r,q,cr1,cr2 for Element of COMPLEX; definition mode Complex is complex number; end; definition let C,f1,f2; deffunc F(set) = f1/.$1 * (f2/.$1)"; func f1/f2 -> PartFunc of C,COMPLEX means :Def1: dom it = dom f1 /\ (dom f2 \ f2"{0}) & for c st c in dom it holds it/.c = f1/.c * (f2/.c)"; existence proof defpred P[set] means $1 in dom f1 /\ (dom f2 \ f2"{0c}); consider F being PartFunc of C,COMPLEX such that A1: for c holds c in dom F iff P[c] and A2: for c st c in dom F holds F/.c = F(c) from PARTFUN2:sch 2; take F; thus dom F = dom f1 /\ (dom f2 \ f2"{0}) by A1,SUBSET_1:3; thus thesis by A2; end; uniqueness proof set X = dom f1 /\ (dom f2 \ f2"{0}); thus for f,g being PartFunc of C,COMPLEX st (dom f=X & for c be Element of C st c in dom f holds f/.c = F(c)) & (dom g=X & for c be Element of C st c in dom g holds g/.c = F(c)) holds f = g from PARTFUN2:sch 3; end; end; definition let C,f; deffunc F(set) = (f/.$1)"; func f^ -> PartFunc of C,COMPLEX means :Def2: dom it = dom f \ f"{0} & for c st c in dom it holds it/.c = (f/.c)"; existence proof defpred P[set] means $1 in dom f \ f"{0c}; consider F being PartFunc of C,COMPLEX such that A1: for c holds c in dom F iff P[c] and A2: for c st c in dom F holds F/.c = F(c) from PARTFUN2:sch 2; take F; thus dom F = dom f \ f"{0} by A1,SUBSET_1:3; let c; assume c in dom F; hence thesis by A2; end; uniqueness proof set X = dom f \ f"{0}; thus for f,g being PartFunc of C,COMPLEX st (dom f=X & for c be Element of C st c in dom f holds f/.c = F(c)) & (dom g=X & for c be Element of C st c in dom g holds g/.c = F(c)) holds f = g from PARTFUN2:sch 3; end; end; theorem Th1: dom (f1+f2) = dom f1 /\ dom f2 & for c st c in dom(f1+f2) holds ( f1+f2)/.c = (f1/.c) + (f2/.c) proof thus A1: dom (f1+f2) = dom f1 /\ dom f2 by VALUED_1:def 1; now let c; assume A2: c in dom (f1+f2); then c in dom f1 by A1,XBOOLE_0:def 4; then A3: f1.c = f1/.c by PARTFUN1:def 6; c in dom f2 by A1,A2,XBOOLE_0:def 4; then A4: f2.c = f2/.c by PARTFUN1:def 6; thus (f1+f2)/.c = (f1+f2).c by A2,PARTFUN1:def 6 .= f1/.c+f2/.c by A2,A3,A4,VALUED_1:def 1; end; hence thesis; end; theorem Th2: dom (f1-f2) = dom f1 /\ dom f2 & for c st c in dom(f1-f2) holds ( f1-f2)/.c = (f1/.c) - (f2/.c) proof A1: dom (f1-f2) = dom f1 /\ dom(-f2) by VALUED_1:def 1; hence dom (f1-f2) = dom f1 /\ dom f2 by VALUED_1:8; now let c; assume A2: c in dom (f1-f2); then A3: dom -f2 = dom f2 & c in dom -f2 by A1,VALUED_1:8,XBOOLE_0:def 4; c in dom f1 by A1,A2,XBOOLE_0:def 4; then A4: f1/.c = f1.c by PARTFUN1:def 6; thus (f1-f2)/.c = (f1-f2).c by A2,PARTFUN1:def 6 .= f1.c - f2.c by A2,VALUED_1:13 .= f1/.c - f2/.c by A3,A4,PARTFUN1:def 6; end; hence thesis; end; theorem Th3: dom(f1(#)f2)=dom f1 /\ dom f2 & for c st c in dom(f1(#)f2) holds (f1(#)f2)/.c =(f1/.c) * (f2/.c) proof thus A1: dom (f1(#)f2) = dom f1 /\ dom f2 by VALUED_1:def 4; now let c; assume A2: c in dom (f1(#)f2); then c in dom f1 by A1,XBOOLE_0:def 4; then A3: f1.c = f1/.c by PARTFUN1:def 6; c in dom f2 by A1,A2,XBOOLE_0:def 4; then A4: f2.c = f2/.c by PARTFUN1:def 6; thus (f1(#)f2)/.c = (f1(#)f2).c by A2,PARTFUN1:def 6 .= f1/.c * f2/.c by A2,A3,A4,VALUED_1:def 4; end; hence thesis; end; theorem Th4: dom (r(#)f) = dom f & for c st c in dom (r(#)f) holds (r(#)f)/.c = r * (f/.c) proof thus A1: dom (r(#)f) = dom f by VALUED_1:def 5; now let c; assume A2: c in dom (r(#)f); hence (r(#)f)/.c = (r(#)f).c by PARTFUN1:def 6 .= r *(f.c) by VALUED_1:6 .= r *(f/.c) by A1,A2,PARTFUN1:def 6; end; hence thesis; end; theorem Th5: dom (-f) = dom f & for c st c in dom (-f) holds (-f)/.c = -f/.c proof thus A1: dom (-f) = dom f by VALUED_1:8; now let c; assume A2: c in dom (-f); hence (-f)/.c = (-f).c by PARTFUN1:def 6 .=-f.c by VALUED_1:8 .=-f/.c by A1,A2,PARTFUN1:def 6; end; hence thesis; end; Lm1: x in f"Y iff x in dom f & f/.x in Y by PARTFUN2:26; theorem Th6: dom (g^) c= dom g & dom g /\ (dom g \ g"{0}) = dom g \ g"{0} proof dom (g^) = dom g \ g"{0c} by Def2; hence dom (g^) c= dom g by XBOOLE_1:36; thus thesis by XBOOLE_1:28,36; end; theorem Th7: dom (f1(#)f2) \ (f1(#)f2)"{0} = (dom f1 \ (f1)"{0}) /\ (dom f2 \ (f2)"{0}) proof thus dom (f1(#)f2) \ (f1(#)f2)"{0} c= (dom f1 \ (f1)"{0}) /\ (dom f2 \ (f2)" {0}) proof let x; assume A1: x in dom (f1(#)f2) \ (f1(#)f2)"{0}; then A2: x in dom (f1(#)f2) by XBOOLE_0:def 5; reconsider x1=x as Element of C by A1; not x in (f1(#)f2)"{0c} by A1,XBOOLE_0:def 5; then not (f1(#)f2)/.x1 in {0c} by A2,PARTFUN2:26; then (f1(#)f2)/.x1 <> 0c by TARSKI:def 1; then A3: (f1/.x1) * (f2/.x1) <> 0c by A2,Th3; then (f2/.x1) <> 0c; then not (f2/.x1) in {0c } by TARSKI:def 1; then A4: not x1 in (f2)"{0c} by PARTFUN2:26; A5: x1 in dom f1 /\ dom f2 by A2,Th3; then x1 in dom f2 by XBOOLE_0:def 4; then A6: x in dom f2 \ (f2)"{0c} by A4,XBOOLE_0:def 5; (f1/.x1) <> 0c by A3; then not (f1/.x1) in {0c} by TARSKI:def 1; then A7: not x1 in (f1)"{0c} by PARTFUN2:26; x1 in dom f1 by A5,XBOOLE_0:def 4; then x in dom f1 \ (f1)"{0c} by A7,XBOOLE_0:def 5; hence thesis by A6,XBOOLE_0:def 4; end; thus (dom f1 \ (f1)"{0}) /\ (dom f2 \ (f2)"{0}) c= dom (f1(#)f2) \ (f1(#)f2) "{0} proof let x; assume A8: x in (dom f1 \ (f1)"{0}) /\ (dom f2 \ (f2)"{0}); then reconsider x1=x as Element of C; A9: x in dom f2 \ (f2)"{0c} by A8,XBOOLE_0:def 4; then A10: x in dom f2 by XBOOLE_0:def 5; not x in (f2)"{0c } by A9,XBOOLE_0:def 5; then not (f2/.x1) in {0c} by A10,PARTFUN2:26; then A11: (f2/.x1) <> 0c by TARSKI:def 1; A12: x in dom f1 \ (f1)"{0c} by A8,XBOOLE_0:def 4; then A13: x in dom f1 by XBOOLE_0:def 5; then x1 in dom f1 /\ dom f2 by A10,XBOOLE_0:def 4; then A14: x1 in dom (f1(#)f2) by Th3; not x in (f1)"{0c} by A12,XBOOLE_0:def 5; then not (f1/.x1) in {0c} by A13,PARTFUN2:26; then (f1/.x1) <> 0c by TARSKI:def 1; then (f1/.x1) * (f2/.x1) <>0c by A11,XCMPLX_1:6; then (f1(#)f2)/.x1 <> 0c by A14,Th3; then not (f1(#)f2)/.x1 in {0c} by TARSKI:def 1; then not x in (f1(#)f2)"{0c} by PARTFUN2:26; hence thesis by A14,XBOOLE_0:def 5; end; end; theorem Th8: c in dom (f^) implies (f/.c) <> 0 proof assume that A1: c in dom (f^) and A2: (f/.c) = 0; A3: c in dom f \ f"{0c} by A1,Def2; then A4: not c in f"{0c} by XBOOLE_0:def 5; now per cases by A4,PARTFUN2:26; suppose not c in dom f; hence contradiction by A3,XBOOLE_0:def 5; end; suppose not (f/.c) in {0c}; hence contradiction by A2,TARSKI:def 1; end; end; hence contradiction; end; theorem Th9: (f^)"{0} = {} proof set x = the Element of (f^)"{0c}; assume A1: (f^)"{0} <> {}; then A2: x in dom (f^) by Lm1; A3: (f^)/.x in {0c} by A1,Lm1; reconsider x as Element of C by A2; x in dom f \ f"{0c} by A2,Def2; then x in dom f & not x in f"{0c} by XBOOLE_0:def 5; then A4: not f/.x in {0c} by PARTFUN2:26; (f^)/.x = 0c by A3,TARSKI:def 1; then (f/.x)" = 0c by A2,Def2; hence contradiction by A4,TARSKI:def 1,XCMPLX_1:202; end; theorem Th10: |.f.|"{0} = f"{0} & (-f)"{0} = f"{0} proof A1: dom |.f.| = dom f by VALUED_1:def 11; now let c; thus c in (|.f.|)"{0} implies c in f"{0c} proof assume A2: c in (|.f.|)"{0}; then c in dom (|.f.|) by FUNCT_1:def 7; then A3: c in dom f by VALUED_1:def 11; (|.f.|).c in {0} by A2,FUNCT_1:def 7; then (|.f.|).c = 0 by TARSKI:def 1; then A4: |.(f.c).| = 0 by VALUED_1:18; c in dom (|.f.|) by A2,FUNCT_1:def 7; then f.c = f/.c by A1,PARTFUN1:def 6; then (f/.c) = 0c by A4,COMPLEX1:45; then (f/.c) in {0c} by TARSKI:def 1; hence thesis by A3,PARTFUN2:26; end; assume A5: c in (f)"{0c}; then (f/.c) in {0c} by PARTFUN2:26; then A6: |.(f/.c).| = 0 by COMPLEX1:44,TARSKI:def 1; A7: c in dom f by A5,PARTFUN2:26; then f.c = f/.c by PARTFUN1:def 6; then (|.f.|).c = 0 by A6,VALUED_1:18; then A8: (|.f.|).c in {0} by TARSKI:def 1; c in dom (|.f.|) by A7,VALUED_1:def 11; hence c in (|.f.|)"{0} by A8,FUNCT_1:def 7; end; hence (|.f.|)"{0} = f"{0} by SUBSET_1:3; now let c; thus c in (-f)"{0c} implies c in f"{0c} proof assume A9: c in (-f)"{0c}; then A10: c in dom (-f) by PARTFUN2:26; (-f)/.c in {0c} by A9,PARTFUN2:26; then (-f)/.c = 0c by TARSKI:def 1; then --((f/.c)) = -0c by A10,Th5; then A11: (f/.c) in {0c} by TARSKI:def 1; c in dom f by A10,Th5; hence thesis by A11,PARTFUN2:26; end; assume A12: c in (f)"{0c}; then (f/.c) in {0c} by PARTFUN2:26; then A13: (f/.c) = 0c by TARSKI:def 1; A14: c in dom f by A12,PARTFUN2:26; then c in dom (-f) by Th5; then (-f)/.c = -0c by A13,Th5; then A15: (-f)/.c in {0c} by TARSKI:def 1; c in dom (-f) by A14,Th5; hence c in (-f)"{0c} by A15,PARTFUN2:26; end; hence thesis by SUBSET_1:3; end; theorem Th11: dom (f^^) = dom (f|(dom (f^))) proof A1: dom (f^) = dom f \ f"{0c} by Def2; thus dom (f^^) = dom (f^) \(f^)"{0c} by Def2 .= dom (f^) \ {} by Th9 .= dom f /\ dom (f^) by A1,XBOOLE_1:28,36 .= dom (f|(dom (f^))) by RELAT_1:61; end; theorem Th12: r<>0 implies (r(#)f)"{0} = f"{0} proof assume A1: r<>0; now let c; thus c in (r(#)f)"{0c} implies c in f"{0c} proof assume A2: c in (r(#)f)"{0c}; then A3: c in dom (r(#)f) by PARTFUN2:26; (r(#)f)/.c in {0c} by A2,PARTFUN2:26; then (r(#)f)/.c = 0c by TARSKI:def 1; then r*(f/.c) = 0c by A3,Th4; then (f/.c) = 0c by A1,XCMPLX_1:6; then A4: (f/.c) in {0c} by TARSKI:def 1; c in dom f by A3,Th4; hence thesis by A4,PARTFUN2:26; end; assume A5: c in (f)"{0c}; then (f/.c) in {0c} by PARTFUN2:26; then (f/.c) = 0c by TARSKI:def 1; then A6: r*(f/.c) = 0c; A7: c in dom f by A5,PARTFUN2:26; then c in dom (r(#)f) by Th4; then (r(#)f)/.c = 0c by A6,Th4; then A8: (r(#)f)/.c in {0c} by TARSKI:def 1; c in dom (r(#)f) by A7,Th4; hence c in (r(#)f)"{0c} by A8,PARTFUN2:26; end; hence thesis by SUBSET_1:3; end; begin theorem (f1 + f2) + f3 = f1 + (f2 + f3) proof A1: dom (f1 + f2 + f3) = dom (f1 + f2) /\ dom f3 by VALUED_1:def 1 .= dom f1 /\ dom f2 /\ dom f3 by VALUED_1:def 1 .= dom f1 /\ (dom f2 /\ dom f3) by XBOOLE_1:16 .= dom f1 /\ dom (f2 + f3) by VALUED_1:def 1 .= dom (f1 + (f2 + f3)) by VALUED_1:def 1; now let c; assume A2: c in dom (f1 + f2 + f3); then c in dom (f1 + f2) /\ dom f3 by VALUED_1:def 1; then A3: c in dom (f1 + f2) by XBOOLE_0:def 4; c in dom f1 /\ dom (f2 + f3) by A1,A2,VALUED_1:def 1; then A4: c in dom (f2 + f3) by XBOOLE_0:def 4; thus (f1 + f2 + f3)/.c = (f1 + f2)/.c + (f3/.c) by A2,Th1 .= ((f1/.c)) + ((f2/.c)) + (f3/.c) by A3,Th1 .= ((f1/.c)) + (((f2/.c)) + (f3/.c)) .= ((f1/.c)) + (f2 + f3)/.c by A4,Th1 .= (f1 + (f2 + f3))/.c by A1,A2,Th1; end; hence thesis by A1,PARTFUN2:1; end; theorem Th14: (f1 (#) f2) (#) f3 = f1 (#) (f2 (#) f3) proof A1: dom (f1 (#) f2 (#) f3) = dom (f1 (#) f2) /\ dom f3 by Th3 .= dom f1 /\ dom f2 /\ dom f3 by Th3 .= dom f1 /\ (dom f2 /\ dom f3) by XBOOLE_1:16 .= dom f1 /\ dom (f2 (#) f3) by Th3 .= dom (f1 (#) (f2 (#) f3)) by Th3; now let c; assume A2: c in dom (f1(#)f2(#)f3); then c in dom (f1 (#) f2) /\ dom f3 by Th3; then A3: c in dom (f1 (#) f2) by XBOOLE_0:def 4; c in dom f1 /\ dom (f2(#)f3) by A1,A2,Th3; then A4: c in dom (f2 (#) f3) by XBOOLE_0:def 4; thus (f1 (#) f2 (#) f3)/.c = (f1 (#) f2)/.c * (f3/.c) by A2,Th3 .= ((f1/.c)) * ((f2/.c)) * (f3/.c) by A3,Th3 .= ((f1/.c)) * (((f2/.c)) * (f3/.c)) .= ((f1/.c)) * ((f2 (#) f3)/.c) by A4,Th3 .= (f1 (#) (f2 (#) f3))/.c by A1,A2,Th3; end; hence thesis by A1,PARTFUN2:1; end; theorem Th15: (f1 + f2) (#) f3=f1 (#) f3 + f2 (#) f3 proof A1: dom ((f1 + f2) (#) f3) = dom (f1 + f2) /\ dom f3 by Th3 .= dom f1 /\ dom f2 /\ (dom f3 /\ dom f3) by VALUED_1:def 1 .= dom f1 /\ dom f2 /\ dom f3 /\ dom f3 by XBOOLE_1:16 .= dom f1 /\ dom f3 /\ dom f2 /\ dom f3 by XBOOLE_1:16 .= dom f1 /\ dom f3 /\ (dom f2 /\ dom f3) by XBOOLE_1:16 .= dom (f1 (#) f3) /\ (dom f2 /\ dom f3) by Th3 .= dom (f1 (#) f3) /\ dom (f2 (#) f3) by Th3 .= dom (f1 (#) f3 + f2 (#) f3) by VALUED_1:def 1; now let c; assume A2: c in dom ((f1 + f2)(#)f3); then A3: c in dom (f1(#)f3) /\ dom (f2(#)f3) by A1,VALUED_1:def 1; then A4: c in dom (f1(#)f3) by XBOOLE_0:def 4; c in dom (f1 + f2) /\ dom f3 by A2,Th3; then A5: c in dom (f1 + f2) by XBOOLE_0:def 4; A6: c in dom (f2 (#) f3) by A3,XBOOLE_0:def 4; thus ((f1 + f2) (#) f3)/.c = (f1 + f2)/.c * (f3/.c) by A2,Th3 .= (((f1/.c)) + ((f2/.c))) * (f3/.c) by A5,Th1 .= ((f1/.c)) * (f3/.c) + ((f2/.c)) * (f3/.c) .= (f1 (#) f3)/.c + ((f2/.c))* (f3/.c) by A4,Th3 .= (f1 (#) f3)/.c + (f2 (#) f3)/.c by A6,Th3 .=((f1 (#) f3) + (f2 (#) f3))/.c by A1,A2,Th1; end; hence thesis by A1,PARTFUN2:1; end; theorem f3 (#) (f1 + f2)=f3(#)f1 + f3(#)f2 by Th15; theorem Th17: r(#)(f1(#)f2)=r(#)f1(#)f2 proof A1: dom (r(#)(f1 (#) f2)) = dom (f1 (#) f2) by Th4 .= dom f1 /\ dom f2 by Th3 .= dom (r(#)f1) /\ dom f2 by Th4 .= dom (r(#)f1(#)f2) by Th3; now let c; assume A2: c in dom (r(#)(f1(#)f2)); then A3: c in dom (f1(#)f2) by Th4; c in dom (r(#)f1) /\ dom f2 by A1,A2,Th3; then A4: c in dom (r(#)f1) by XBOOLE_0:def 4; thus (r(#)(f1(#)f2))/.c = r * ((f1(#)f2)/.c) by A2,Th4 .= r*(((f1/.c)) * ((f2/.c))) by A3,Th3 .= (r*((f1/.c))) * ((f2/.c)) .= (r(#)f1)/.c * ((f2/.c)) by A4,Th4 .= (r(#)f1 (#) f2)/.c by A1,A2,Th3; end; hence thesis by A1,PARTFUN2:1; end; theorem Th18: r(#)(f1(#)f2)=f1(#)(r(#)f2) proof A1: dom (r(#)(f1 (#) f2)) = dom (f1 (#) f2) by Th4 .= dom f1 /\ dom f2 by Th3 .= dom f1 /\ dom (r(#)f2) by Th4 .= dom (f1(#)(r(#)f2)) by Th3; now let c; assume A2: c in dom (r(#)(f1(#)f2)); then A3: c in dom (f1(#)f2) by Th4; c in dom f1 /\ dom (r(#)f2) by A1,A2,Th3; then A4: c in dom (r(#)f2) by XBOOLE_0:def 4; thus (r(#)(f1(#)f2))/.c = r * ((f1(#)f2)/.c) by A2,Th4 .= r * (((f1/.c)) * ((f2/.c))) by A3,Th3 .= ((f1/.c)) * (r * ((f2/.c))) .= ((f1/.c)) * ((r(#)f2)/.c) by A4,Th4 .= (f1(#)(r(#)f2))/.c by A1,A2,Th3; end; hence thesis by A1,PARTFUN2:1; end; theorem Th19: (f1 - f2)(#)f3=f1(#)f3 - f2(#)f3 proof A1: dom ((f1 - f2) (#) f3) = dom (f1 - f2) /\ dom f3 by Th3 .= dom f1 /\ dom f2 /\ (dom f3 /\ dom f3) by Th2 .= dom f1 /\ dom f2 /\ dom f3 /\ dom f3 by XBOOLE_1:16 .= dom f1 /\ dom f3 /\ dom f2 /\ dom f3 by XBOOLE_1:16 .= dom f1 /\ dom f3 /\ (dom f2 /\ dom f3) by XBOOLE_1:16 .= dom (f1 (#) f3) /\ (dom f2 /\ dom f3) by Th3 .= dom (f1 (#) f3) /\ dom (f2 (#) f3) by Th3 .= dom (f1 (#) f3 - f2 (#) f3) by Th2; now let c; assume A2: c in dom ((f1 - f2)(#)f3); then c in dom (f1 - f2) /\ dom f3 by Th3; then A3: c in dom (f1 - f2) by XBOOLE_0:def 4; A4: c in dom (f1(#)f3) /\ dom (f2(#)f3) by A1,A2,Th2; then A5: c in dom (f1(#)f3) by XBOOLE_0:def 4; A6: c in dom (f2 (#) f3) by A4,XBOOLE_0:def 4; thus ((f1 - f2) (#) f3)/.c = (f1 - f2)/.c * (f3/.c) by A2,Th3 .= (((f1/.c)) - ((f2/.c))) * (f3/.c) by A3,Th2 .= ((f1/.c)) * (f3/.c) - ((f2/.c)) * (f3/.c) .= (f1 (#) f3)/.c - ((f2/.c)) * (f3/.c) by A5,Th3 .= (f1 (#) f3)/.c - (f2 (#) f3)/.c by A6,Th3 .=((f1 (#) f3) - (f2 (#) f3))/.c by A1,A2,Th2; end; hence thesis by A1,PARTFUN2:1; end; theorem f3(#)f1 - f3(#)f2 = f3(#)(f1 - f2) by Th19; theorem r(#)(f1 + f2) = r(#)f1 + r(#)f2 proof A1: dom (r(#)(f1 + f2)) = dom (f1 + f2) by Th4 .= dom f1 /\ dom f2 by VALUED_1:def 1 .= dom f1 /\ dom (r(#)f2) by Th4 .= dom (r(#)f1) /\ dom (r(#)f2) by Th4 .= dom (r(#)f1 + r(#)f2) by VALUED_1:def 1; now let c; assume A2: c in dom (r(#)(f1 + f2)); then A3: c in dom (f1 + f2) by Th4; A4: c in dom (r(#)f1) /\ dom (r(#)f2) by A1,A2,VALUED_1:def 1; then A5: c in dom (r(#)f1) by XBOOLE_0:def 4; A6: c in dom (r(#)f2) by A4,XBOOLE_0:def 4; thus (r(#)(f1 + f2))/.c = r * ((f1 + f2)/.c) by A2,Th4 .= r * (((f1/.c)) + ((f2/.c))) by A3,Th1 .= r * ((f1/.c)) + r * ((f2/.c)) .= (r(#)f1)/.c + r * ((f2/.c)) by A5,Th4 .= (r(#)f1)/.c + (r(#)f2)/.c by A6,Th4 .= (r(#)f1 + r(#)f2)/.c by A1,A2,Th1; end; hence thesis by A1,PARTFUN2:1; end; theorem (r*q)(#)f = r(#)(q(#)f) proof A1: dom ((r*q) (#) f) = dom f by Th4 .= dom (q(#)f) by Th4 .= dom (r(#)(q(#)f)) by Th4; now let c; assume A2: c in dom ((r*q)(#)f); then A3: c in dom (q(#)f) by A1,Th4; thus ((r*q)(#)f)/.c = r*q * (f/.c) by A2,Th4 .= r*(q * (f/.c)) .= r * ((q(#)f)/.c) by A3,Th4 .= (r(#)(q(#)f))/.c by A1,A2,Th4; end; hence thesis by A1,PARTFUN2:1; end; theorem r(#)(f1 - f2) = r(#)f1 - r(#)f2 proof A1: dom (r(#)(f1 - f2)) = dom (f1 - f2) by Th4 .= dom f1 /\ dom f2 by Th2 .= dom f1 /\ dom (r(#)f2) by Th4 .= dom (r(#)f1) /\ dom (r(#)f2) by Th4 .= dom (r(#)f1 - r(#)f2) by Th2; now let c; assume A2: c in dom (r(#)(f1 - f2)); then A3: c in dom (f1 - f2) by Th4; A4: c in dom (r(#)f1) /\ dom (r(#)f2) by A1,A2,Th2; then A5: c in dom (r(#)f1) by XBOOLE_0:def 4; A6: c in dom (r(#)f2) by A4,XBOOLE_0:def 4; thus (r(#)(f1 - f2))/.c = r * ((f1 - f2)/.c) by A2,Th4 .= r * (((f1/.c)) - ((f2/.c))) by A3,Th2 .= r * ((f1/.c)) - r * ((f2/.c)) .= (r(#)f1)/.c - r * ((f2/.c)) by A5,Th4 .= (r(#)f1)/.c - (r(#)f2)/.c by A6,Th4 .= (r(#)f1 - r(#)f2)/.c by A1,A2,Th2; end; hence thesis by A1,PARTFUN2:1; end; theorem f1-f2 = (-1r)(#)(f2-f1) proof A1: dom (f1 - f2) = dom f2 /\ dom f1 by Th2 .= dom (f2 - f1) by Th2 .= dom ((-1r)(#)(f2 - f1)) by Th4; now A2: dom (f1 - f2) = dom f2 /\ dom f1 by Th2 .= dom (f2 - f1) by Th2; let c such that A3: c in dom (f1-f2); thus (f1 - f2)/.c = ((f1/.c)) - ((f2/.c)) by A3,Th2 .= (-1)*(((f2/.c)) - ((f1/.c))) .= (-1r)*((f2 - f1)/.c) by A3,A2,Th2,COMPLEX1:def 4 .= ((-1r)(#)(f2 - f1))/.c by A1,A3,Th4; end; hence thesis by A1,PARTFUN2:1; end; theorem f1 - (f2 + f3) = f1 - f2 - f3 proof A1: dom (f1 - (f2 + f3)) = dom f1 /\ dom (f2 + f3) by Th2 .= dom f1 /\ (dom f2 /\ dom f3) by VALUED_1:def 1 .= dom f1 /\ dom f2 /\ dom f3 by XBOOLE_1:16 .= dom (f1 - f2) /\ dom f3 by Th2 .= dom (f1 - f2 - f3) by Th2; now let c; assume A2: c in dom (f1 - (f2 + f3)); then c in dom f1 /\ dom (f2 + f3) by Th2; then A3: c in dom (f2 + f3) by XBOOLE_0:def 4; c in dom (f1 - f2) /\ dom f3 by A1,A2,Th2; then A4: c in dom (f1 - f2) by XBOOLE_0:def 4; thus (f1 - (f2 + f3))/.c = ((f1/.c)) - (f2 + f3)/.c by A2,Th2 .= ((f1/.c)) - (((f2/.c)) + (f3/.c)) by A3,Th1 .= ((f1/.c)) - ((f2/.c)) - (f3/.c) .= (f1 - f2)/.c - (f3/.c) by A4,Th2 .= (f1 - f2 - f3)/.c by A1,A2,Th2; end; hence thesis by A1,PARTFUN2:1; end; theorem 1r(#)f = f proof A1: now let c; assume c in dom (1r(#)f); hence (1r(#)f)/.c = 1r * (f/.c) by Th4 .= (f/.c) by COMPLEX1:def 4; end; dom (1r(#)f) = dom f by Th4; hence thesis by A1,PARTFUN2:1; end; theorem f1 - (f2 - f3) = f1 - f2 + f3 proof A1: dom (f1 - (f2 - f3)) = dom f1 /\ dom (f2 - f3) by Th2 .= dom f1 /\ (dom f2 /\ dom f3) by Th2 .= dom f1 /\ dom f2 /\ dom f3 by XBOOLE_1:16 .= dom (f1 - f2) /\ dom f3 by Th2 .= dom (f1 - f2 + f3) by VALUED_1:def 1; now let c; assume A2: c in dom (f1 - (f2 - f3)); then c in dom (f1 - f2) /\ dom f3 by A1,VALUED_1:def 1; then A3: c in dom (f1 - f2) by XBOOLE_0:def 4; c in dom f1 /\ dom (f2 - f3) by A2,Th2; then A4: c in dom (f2 - f3) by XBOOLE_0:def 4; thus (f1 - (f2 - f3))/.c = ((f1/.c)) - (f2 - f3)/.c by A2,Th2 .= ((f1/.c)) - (((f2/.c)) - (f3/.c)) by A4,Th2 .= ((f1/.c)) - ((f2/.c)) + (f3/.c) .= (f1 - f2)/.c + (f3/.c) by A3,Th2 .= (f1 - f2 + f3)/.c by A1,A2,Th1; end; hence thesis by A1,PARTFUN2:1; end; theorem f1 + (f2 - f3) =f1 + f2 - f3 proof A1: dom (f1 + (f2 - f3)) = dom f1 /\ dom (f2 - f3) by VALUED_1:def 1 .= dom f1 /\ (dom f2 /\ dom f3) by Th2 .= dom f1 /\ dom f2 /\ dom f3 by XBOOLE_1:16 .= dom (f1 + f2) /\ dom f3 by VALUED_1:def 1 .= dom (f1 + f2 - f3) by Th2; now let c; assume A2: c in dom (f1 + (f2 - f3)); then c in dom f1 /\ dom (f2 - f3) by VALUED_1:def 1; then A3: c in dom (f2 - f3) by XBOOLE_0:def 4; c in dom (f1 + f2) /\ dom f3 by A1,A2,Th2; then A4: c in dom (f1 + f2) by XBOOLE_0:def 4; thus (f1 + (f2 - f3))/.c = ((f1/.c)) + (f2 - f3)/.c by A2,Th1 .= ((f1/.c)) + (((f2/.c)) - (f3/.c)) by A3,Th2 .= ((f1/.c)) + ((f2/.c)) - (f3/.c) .= (f1 + f2)/.c - (f3/.c) by A4,Th1 .= (f1 + f2 - f3)/.c by A1,A2,Th2; end; hence thesis by A1,PARTFUN2:1; end; theorem Th29: |.f1(#)f2.| = |.f1.|(#)|.f2.| proof A1: dom (|.f1 (#) f2.|) = dom (f1 (#) f2) by VALUED_1:def 11 .= dom f1 /\ dom f2 by Th3 .= dom f1 /\ dom (|.f2.|) by VALUED_1:def 11 .= dom (|.f1.|) /\ dom (|.f2.|) by VALUED_1:def 11 .= dom (|.f1.|(#)|.f2.|) by VALUED_1:def 4; now A2: dom |.f2.| = dom f2 by VALUED_1:def 11; let c; A3: dom |.f1.| = dom f1 by VALUED_1:def 11; assume A4: c in dom (|.f1 (#) f2.|); then A5: c in dom (f1 (#) f2) by VALUED_1:def 11; A6: c in dom (|.f1.|) /\ dom (|.f2.|) by A1,A4,VALUED_1:def 4; then c in dom (|.f1.|) by XBOOLE_0:def 4; then A7: f1.c = f1/.c by A3,PARTFUN1:def 6; c in dom (|.f2.|) by A6,XBOOLE_0:def 4; then A8: f2/.c = f2.c by A2,PARTFUN1:def 6; thus (|.(f1(#)f2).|).c = |.(f1(#)f2).c.| by VALUED_1:18 .= |.(f1(#)f2)/.c.| by A5,PARTFUN1:def 6 .= |.((f1/.c)) * ((f2/.c)).| by A5,Th3 .= |.((f1/.c)).| * |.((f2/.c)).| by COMPLEX1:65 .= ((|.f1.|).c) *( |.((f2/.c)).|) by A7,VALUED_1:18 .= ((|.f1.|).c) * ((|.f2.|).c) by A8,VALUED_1:18 .= (|.f1.|(#)|.f2.|).c by VALUED_1:5; end; hence thesis by A1,PARTFUN1:5; end; theorem Th30: |.r(#)f.| = |.r.|(#)|.f.| proof A1: dom f = dom (|.f.|) by VALUED_1:def 11; A2: dom (|.r(#)f.|) = dom (r(#)f) by VALUED_1:def 11 .= dom f by Th4 .= dom (|.r.|(#)|.f.|) by A1,VALUED_1:def 5; now let c; assume A3: c in dom (|.r(#)f.|); then A4: c in dom (r(#)f) by VALUED_1:def 11; A5: c in dom (|.f.|) by A2,A3,VALUED_1:def 5; thus (|.r(#)f.|).c = |.(r(#)f).c.| by VALUED_1:18 .=|.(r(#)f)/.c.| by A4,PARTFUN1:def 6 .=|.r*((f/.c)).| by A4,Th4 .=|.r.|*|.((f/.c)).| by COMPLEX1:65 .=|.r.|*|.((f.c)).| by A1,A5,PARTFUN1:def 6 .=|.r.|*((|.f.|).c) by VALUED_1:18 .=(|.r.|(#)|.f.|).c by A2,A3,VALUED_1:def 5; end; hence thesis by A2,PARTFUN1:5; end; theorem -f = (-1r)(#)f by COMPLEX1:def 4; canceled; theorem f1 - (-f2) = f1 + f2; theorem Th34: f^^ = f|(dom (f^)) proof A1: dom (f^^) = dom (f|(dom (f^))) by Th11; now let c; assume A2: c in dom (f^^); then c in dom f /\ dom (f^) by A1,RELAT_1:61; then A3: c in dom (f^) by XBOOLE_0:def 4; thus (f^^)/.c = ((f^)/.c)" by A2,Def2 .= (((f/.c))")" by A3,Def2 .= (f|(dom (f^)))/.c by A1,A2,PARTFUN2:15; end; hence thesis by A1,PARTFUN2:1; end; theorem Th35: (f1(#)f2)^ = (f1^)(#)(f2^) proof A1: dom ((f1(#)f2)^) = dom (f1(#)f2) \ (f1(#)f2)"{0c} by Def2 .= (dom f1 \ f1"{0c}) /\ (dom f2 \ (f2)"{0c}) by Th7 .= dom (f1^) /\ (dom f2 \ (f2)"{0c}) by Def2 .= dom (f1^) /\ dom (f2^) by Def2 .= dom ((f1^) (#) (f2^)) by Th3; now let c; assume A2: c in dom ((f1(#)f2)^); then c in dom (f1(#)f2) \ (f1(#)f2)"{0c} by Def2; then A3: c in dom (f1(#)f2) by XBOOLE_0:def 5; A4: c in dom (f1^) /\ dom (f2^) by A1,A2,Th3; then A5: c in dom (f1^) by XBOOLE_0:def 4; A6: c in dom (f2^) by A4,XBOOLE_0:def 4; thus ((f1(#)f2)^)/.c = ((f1(#)f2)/.c)" by A2,Def2 .= (((f1/.c)) * ((f2/.c)))" by A3,Th3 .= (((f1/.c)))"* (((f2/.c)))" by XCMPLX_1:204 .= ((f1^)/.c)*(((f2/.c)))" by A5,Def2 .= ((f1^)/.c) *((f2^)/.c) by A6,Def2 .= ((f1^) (#) (f2^))/.c by A1,A2,Th3; end; hence thesis by A1,PARTFUN2:1; end; theorem Th36: r<>0 implies (r(#)f)^ = r" (#) (f^) proof assume A1: r<>0; A2: dom ((r(#)f)^) = dom (r(#)f) \ (r(#)f)"{0c} by Def2 .= dom (r(#)f) \ f"{0c} by A1,Th12 .= dom f \ f"{0c} by Th4 .= dom (f^) by Def2 .= dom (r"(#)(f^)) by Th4; now let c; assume A3: c in dom ((r(#)f)^); then A4: c in dom (f^) by A2,Th4; c in dom (r(#)f) \ (r(#)f)"{0c} by A3,Def2; then A5: c in dom (r(#)f) by XBOOLE_0:def 5; thus ((r(#)f)^)/.c = ((r(#)f)/.c)" by A3,Def2 .= (r*((f/.c)))" by A5,Th4 .= r"* ((f/.c))" by XCMPLX_1:204 .= r"* ((f^)/.c) by A4,Def2 .= (r" (#) (f^))/.c by A2,A3,Th4; end; hence thesis by A2,PARTFUN2:1; end; Lm2: (-1r)"=-1r by COMPLEX1:def 4; theorem (-f)^ = (-1r)(#)(f^) by Lm2,Th36,COMPLEX1:def 4; theorem Th38: |.f.|^ = |. f^ .| proof A1: dom ((|.f.|)^) = dom (|.f.|) \ (|.f.|)"{0} by RFUNCT_1:def 2 .= dom f \ (|.f.|)"{0} by VALUED_1:def 11 .= dom f \ f"{0c} by Th10 .= dom (f^) by Def2 .= dom (|.(f^).|) by VALUED_1:def 11; now let c; A2: dom f = dom |.f.| by VALUED_1:def 11; assume A3: c in dom ((|.f.|)^); then A4: c in dom (f^) by A1,VALUED_1:def 11; c in dom (|.f.|) \ (|.f.|)"{0} by A3,RFUNCT_1:def 2; then A5: c in dom (|.f.|) by XBOOLE_0:def 5; thus ((|.f.|)^).c = ((|.f.|).c)" by A3,RFUNCT_1:def 2 .= (|.(f.c) .|)" by VALUED_1:18 .= (|.(f/.c) .|)" by A5,A2,PARTFUN1:def 6 .= |.1r.|/|.(f/.c) .| by COMPLEX1:48,XCMPLX_1:215 .= |.1r/(f/.c) .| by COMPLEX1:67 .= |.((f/.c))" .| by COMPLEX1:def 4,XCMPLX_1:215 .= |.(f^)/.c .| by A4,Def2 .= |.(f^).c .| by A4,PARTFUN1:def 6 .= (|.(f^).|).c by VALUED_1:18; end; hence thesis by A1,PARTFUN1:5; end; theorem Th39: f/g = f(#) (g^) proof A1: now let c; assume A2: c in dom (f/g); then c in dom f /\ (dom g \ g"{0c}) by Def1; then A3: c in dom f /\ dom (g^) by Def2; then A4: c in dom (g^) by XBOOLE_0:def 4; A5: c in dom (f (#) (g^)) by A3,Th3; thus (f/g)/.c = (f/.c) * (g/.c)" by A2,Def1 .= (f/.c) * ((g^)/.c) by A4,Def2 .= (f (#) (g^))/.c by A5,Th3; end; dom (f/g) = dom f /\ (dom g \ g"{0c}) by Def1 .= dom f /\ dom (g^) by Def2 .= dom (f(#)(g^)) by Th3; hence thesis by A1,PARTFUN2:1; end; theorem Th40: r(#)(g/f) = (r(#)g)/f proof thus r(#)(g/f) = r(#)(g(#)(f^)) by Th39 .= (r(#)g)(#)(f^) by Th17 .= (r(#)g)/f by Th39; end; theorem (f/g)(#)g = (f|dom(g^)) proof A1: dom ((f/g)(#)g) = dom (f/g) /\ dom g by Th3 .= dom f /\ (dom g \ g"{0c}) /\ dom g by Def1 .= dom f /\ ((dom g \ g"{0c}) /\ dom g) by XBOOLE_1:16 .= dom f /\ (dom (g^) /\ dom g) by Def2 .= dom f /\ dom (g^) by Th6,XBOOLE_1:28 .= dom (f|(dom (g^))) by RELAT_1:61; now let c; assume A2: c in dom ((f/g)(#)g); then A3: c in dom f /\ dom (g^) by A1,RELAT_1:61; then A4: c in dom (f(#)(g^)) by Th3; A5: c in dom (g^) by A3,XBOOLE_0:def 4; then A6: g/.c <> 0c by Th8; thus ((f/g)(#)g)/.c = ((f/g)/.c) * (g/.c )by A2,Th3 .= (f(#)(g^))/.c * (g/.c) by Th39 .= ((f/.c)) *((g^)/.c) * (g/.c) by A4,Th3 .= ((f/.c))*(g/.c)"*(g/.c) by A5,Def2 .= ((f/.c))*((g/.c)" * (g/.c)) .= ((f/.c))*1r by A6,COMPLEX1:def 4,XCMPLX_0:def 7 .= (f|(dom (g^)))/.c by A1,A2,COMPLEX1:def 4,PARTFUN2:15; end; hence thesis by A1,PARTFUN2:1; end; theorem Th42: (f/g)(#)(f1/g1) = (f(#)f1)/(g(#)g1) proof A1: now let c; assume A2: c in dom ((f/g)(#)(f1/g1)); then c in dom (f/g) /\ dom (f1/g1) by Th3; then A3: c in dom (f (#)(g^)) /\ dom (f1/g1) by Th39; then A4: c in dom (f (#)(g^)) by XBOOLE_0:def 4; then A5: c in dom f /\ dom(g^) by Th3; c in dom (f (#)(g^)) /\ dom (f1(#)(g1^)) by A3,Th39; then A6: c in dom (f1(#)(g1^)) by XBOOLE_0:def 4; then A7: c in dom f1 /\ dom(g1^) by Th3; then A8: c in dom f1 by XBOOLE_0:def 4; c in dom f by A5,XBOOLE_0:def 4; then c in dom f /\ dom f1 by A8,XBOOLE_0:def 4; then A9: c in dom (f(#)f1) by Th3; A10: c in dom(g1^) by A7,XBOOLE_0:def 4; c in dom(g^) by A5,XBOOLE_0:def 4; then c in dom (g^) /\ dom (g1^) by A10,XBOOLE_0:def 4; then A11: c in dom((g^)(#)(g1^)) by Th3; then c in dom((g(#)g1)^) by Th35; then c in dom (f(#)f1) /\ dom((g(#)g1)^) by A9,XBOOLE_0:def 4; then A12: c in dom ((f(#)f1)(#)((g(#)g1)^)) by Th3; thus ((f/g)(#)(f1/g1))/.c = ((f/g)/.c)* ((f1/g1)/.c) by A2,Th3 .= ((f(#)(g^))/.c) * ((f1/g1)/.c) by Th39 .= ((f(#)(g^))/.c) * ((f1(#)(g1^))/.c) by Th39 .= ((f/.c)) * ((g^)/.c) *((f1(#)(g1^))/.c) by A4,Th3 .= ((f/.c)) * ((g^)/.c) * ((((f1/.c)))* ((g1^)/.c)) by A6,Th3 .= ((f/.c)) * ((((f1/.c))) * (((g^)/.c) * ((g1^)/.c))) .= ((f/.c)) * ((((f1/.c))) * (((g^)(#)(g1^))/.c)) by A11,Th3 .= ((f/.c)) * (((f1/.c))) * (((g^)(#)(g1^))/.c) .= ((f/.c)) * (((f1/.c))) * (((g(#)g1)^)/.c) by Th35 .= ((f(#)f1)/.c) * (((g(#)g1)^)/.c) by A9,Th3 .= ((f(#)f1)(#)((g(#)g1)^))/.c by A12,Th3 .= ((f(#)f1)/(g(#)g1))/.c by Th39; end; dom ((f/g)(#)(f1/g1)) = dom (f/g) /\ dom (f1/g1) by Th3 .= dom f /\ (dom g \ g"{0c}) /\ dom (f1/g1) by Def1 .= dom f /\ (dom g \ g"{0c}) /\ (dom f1 /\ (dom g1 \ g1"{0c})) by Def1 .= dom f /\ ((dom g \ g"{0c}) /\ (dom f1 /\ (dom g1 \ g1"{0c}))) by XBOOLE_1:16 .= dom f /\ (dom f1 /\ ((dom g \ g"{0c}) /\ (dom g1 \ g1"{0c}))) by XBOOLE_1:16 .= dom f /\ dom f1 /\ ((dom g \ g"{0c}) /\ (dom g1 \ g1"{0c})) by XBOOLE_1:16 .= dom (f(#)f1) /\ ((dom g \ g"{0c}) /\ (dom g1 \ g1"{0c})) by Th3 .= dom (f(#)f1) /\ (dom (g(#)g1) \ (g(#)g1)"{0c}) by Th7 .= dom ((f(#)f1)/(g(#)g1)) by Def1; hence thesis by A1,PARTFUN2:1; end; theorem Th43: (f1/f2)^ = (f2|dom(f2^))/f1 proof thus (f1/f2)^ = (f1(#)(f2^))^ by Th39 .= (f1^)(#)(f2^^) by Th35 .= (f2|dom(f2^))(#)(f1^) by Th34 .= (f2|dom(f2^))/f1 by Th39; end; theorem Th44: g (#) (f1/f2) = (g (#) f1)/f2 proof thus g (#) (f1/f2) = g (#) (f1 (#) (f2^)) by Th39 .= g (#) f1 (#) (f2^) by Th14 .= (g (#) f1)/f2 by Th39; end; theorem g/(f1/f2) = (g(#)(f2|dom(f2^)))/f1 proof thus g/(f1/f2) = g (#) ((f1/f2)^) by Th39 .= g (#) ((f2|dom(f2^))/f1) by Th43 .= (g (#) (f2|dom(f2^)))/f1 by Th44; end; theorem -f/g = (-f)/g & f/(-g) = -f/g proof thus -f/g = (-1r)(#)(f/g) by COMPLEX1:def 4 .= (-f)/g by Th40,COMPLEX1:def 4; thus f/(-g) = f (#) ((-g)^) by Th39 .= f (#) ((-1r) (#) (g^)) by Lm2,Th36,COMPLEX1:def 4 .= -(f (#) (g^)) by Th18,COMPLEX1:def 4 .= -(f/g) by Th39; end; theorem f1/f + f2/f = (f1 + f2)/f & f1/f - f2/f = (f1 - f2)/f proof thus f1/f + f2/f = f1(#)(f^) +f2/f by Th39 .= f1(#)(f^) + f2(#)(f^) by Th39 .= (f1+f2) (#) (f^) by Th15 .= (f1+f2)/f by Th39; thus f1/f - f2/f = f1(#)(f^) - f2/f by Th39 .= f1(#)(f^) -f2(#)(f^) by Th39 .= (f1-f2)(#)(f^) by Th19 .= (f1-f2)/f by Th39; end; theorem Th48: f1/f + g1/g = (f1(#)g + g1(#)f)/(f(#)g) proof A1: now let c; A2: dom (f^) c= dom f by Th6; assume A3: c in dom ((f1/f) + (g1/g)); then A4: c in dom (f1/f) /\ dom (g1/g) by VALUED_1:def 1; then A5: c in dom (f1/f) by XBOOLE_0:def 4; A6: c in dom (g1/g) by A4,XBOOLE_0:def 4; A7: c in dom (f1 (#)(f^)) /\ dom (g1/g) by A4,Th39; then c in dom (f1 (#)(f^)) by XBOOLE_0:def 4; then A8: c in dom f1 /\ dom(f^) by Th3; then A9: c in dom(f^) by XBOOLE_0:def 4; then A10: (f/.c) <> 0c by Th8; c in dom (f1 (#)(f^)) /\ dom (g1(#)(g^)) by A7,Th39; then c in dom (g1(#)(g^)) by XBOOLE_0:def 4; then A11: c in dom g1 /\ dom(g^) by Th3; then A12: c in dom(g^) by XBOOLE_0:def 4; then A13: g/.c <> 0c by Th8; c in dom g1 by A11,XBOOLE_0:def 4; then c in dom g1 /\ dom f by A9,A2,XBOOLE_0:def 4; then A14: c in dom (g1(#)f) by Th3; A15: dom (g^) c= dom g by Th6; then c in dom f /\ dom g by A9,A12,A2,XBOOLE_0:def 4; then A16: c in dom (f(#)g) by Th3; c in dom f1 by A8,XBOOLE_0:def 4; then c in dom f1 /\ dom g by A12,A15,XBOOLE_0:def 4; then A17: c in dom (f1(#)g) by Th3; then c in dom (f1(#)g) /\ dom (g1(#)f) by A14,XBOOLE_0:def 4; then A18: c in dom (f1(#)g + g1(#)f) by VALUED_1:def 1; c in dom (f^) /\ dom (g^) by A9,A12,XBOOLE_0:def 4; then c in dom ((f^)(#)(g^)) by Th3; then c in dom ((f(#)g)^) by Th35; then c in dom (f1(#)g + g1(#)f) /\ dom ((f(#)g)^) by A18,XBOOLE_0:def 4; then c in dom ((f1(#)g + g1(#)f)(#)((f(#)g)^)) by Th3; then A19: c in dom ((f1(#)g + g1(#)f)/(f(#)g)) by Th39; thus (f1/f + g1/g)/.c = (f1/f)/.c + (g1/g)/.c by A3,Th1 .= (((f1/.c))) * ((f/.c))" + (g1/g)/.c by A5,Def1 .= (((f1/.c))) *(1r*((f/.c))") + (g1/.c) * 1r * (g/.c)" by A6,Def1, COMPLEX1:def 4 .= (((f1/.c))) *((g/.c) *(g/.c)"* ((f/.c))") + (g1/.c) * (1r * (g/.c)" ) by A13,COMPLEX1:def 4,XCMPLX_0:def 7 .= (((f1/.c))) *(g/.c *((g/.c)"* ((f/.c))")) + (g1/.c) * (((f/.c)) *(( f/.c))" * (g/.c)") by A10,COMPLEX1:def 4,XCMPLX_0:def 7 .= (((f1/.c))) *((g/.c) *((g/.c * (f/.c))")) + (g1/.c) * (((f/.c)) *(( (f/.c))" * (g/.c)")) by XCMPLX_1:204 .= (((f1/.c))) *((g/.c) *(((f/.c)* (g/.c))")) + (g1/.c) * (((f/.c)) *( ((f/.c) * (g/.c))")) by XCMPLX_1:204 .= (((f1/.c))) *((g/.c) * ((f(#)g)/.c)") + (g1/.c) * (((f/.c)) *(((f/. c) * (g/.c))")) by A16,Th3 .= (((f1/.c))) *(g/.c) * ((f(#)g)/.c)" + (g1/.c) * (((f/.c)) * ((f(#) g)/.c)") by A16,Th3 .= (f1(#)g)/.c * ((f(#)g)/.c)" + (g1/.c) *(f/.c) *((f(#)g)/.c)" by A17 ,Th3 .= (f1(#)g)/.c * ((f(#)g)/.c)" + (g1(#)f)/.c *((f(#)g)/.c)" by A14,Th3 .= ((f1(#)g)/.c + (g1(#)f)/.c) *((f(#)g)/.c)" .= (f1(#)g + g1(#)f)/.c *((f(#)g)/.c)" by A18,Th1 .= ((f1(#)g + g1(#)f)/(f(#)g))/.c by A19,Def1; end; dom ((f1/f) + (g1/g)) = dom (f1/f) /\ dom (g1/g) by VALUED_1:def 1 .= dom f1 /\ (dom f \ f"{0c}) /\ dom (g1/g) by Def1 .= dom f1 /\ (dom f \ f"{0c}) /\ (dom g1 /\ (dom g \ g"{0c})) by Def1 .= dom f1 /\ (dom f /\ (dom f \ f"{0c})) /\ (dom g1 /\ (dom g \ g"{0c})) by Th6 .= dom f /\ (dom f \ f"{0c}) /\ dom f1 /\ (dom g /\ (dom g \ g"{0c}) /\ dom g1) by Th6 .= dom f /\ (dom f \ f"{0c}) /\ (dom f1 /\ (dom g /\ (dom g \ g"{0c}) /\ dom g1)) by XBOOLE_1:16 .= dom f /\ (dom f \ f"{0c}) /\ (dom f1 /\ (dom g /\ (dom g \ g"{0c})) /\ dom g1) by XBOOLE_1:16 .= dom f /\ (dom f \ f"{0c}) /\ (dom f1 /\ dom g /\ (dom g \ g"{0c}) /\ dom g1) by XBOOLE_1:16 .= dom f /\ (dom f \ f"{0c}) /\ (dom (f1(#) g) /\ (dom g \ g"{0c}) /\ dom g1) by Th3 .= dom f /\ (dom f \ f"{0c}) /\ (dom (f1(#)g) /\ (dom g1 /\ (dom g \ g"{ 0c}))) by XBOOLE_1:16 .= dom (f1(#)g) /\ ((dom f \ f"{0c}) /\ dom f /\ (dom g1 /\ (dom g \ g"{ 0c}))) by XBOOLE_1:16 .= dom (f1(#)g) /\ ((dom f \ f"{0c}) /\ (dom f /\ (dom g1 /\ (dom g \ g" {0c})))) by XBOOLE_1:16 .= dom (f1(#)g) /\ ((dom f \ f"{0c}) /\ (dom g1 /\ dom f /\ (dom g \ g"{ 0c}))) by XBOOLE_1:16 .= dom (f1(#)g) /\ ((dom f \ f"{0c}) /\ (dom (g1(#)f) /\ (dom g \ g"{0c} ))) by Th3 .= dom (f1(#)g) /\ (dom (g1(#)f) /\ ((dom f \ f"{0c}) /\ (dom g \ g"{0c} ))) by XBOOLE_1:16 .= dom (f1(#)g) /\ dom (g1(#)f) /\ ((dom f \ f"{0c}) /\ (dom g \ g"{0c}) ) by XBOOLE_1:16 .= dom (f1(#)g + g1(#)f) /\ ((dom f \ f"{0c}) /\ (dom g \ g"{0c})) by VALUED_1:def 1 .= dom (f1(#)g + g1(#)f) /\ (dom (f(#)g) \ (f(#)g)"{0c}) by Th7 .= dom ((f1(#)g + g1(#)f)/(f(#)g)) by Def1; hence thesis by A1,PARTFUN2:1; end; theorem (f/g)/(f1/g1) = (f(#)(g1|dom(g1^)))/(g(#)f1) proof thus (f/g)/(f1/g1) = (f/g)(#)((f1/g1)^) by Th39 .= (f/g)(#)(((g1|dom(g1^)))/f1) by Th43 .= (f(#)(g1|dom(g1^)))/(g(#)f1) by Th42; end; theorem f1/f - g1/g = (f1(#)g - g1(#)f)/(f(#)g) proof thus f1/f - g1/g = f1/f + ((-1r)(#) g1)/g by Th40,COMPLEX1:def 4 .= (f1(#)g + (-1r)(#) g1(#)f)/(f(#)g) by Th48 .= (f1(#)g - (g1(#)f))/(f(#)g) by Th17,COMPLEX1:def 4; end; theorem |.f1/f2.| = |.f1.|/|.f2.| proof thus |.f1/f2.| = |.f1(#)(f2^).| by Th39 .= |.f1.|(#)|.(f2^).| by Th29 .= |.f1.|(#)((|.f2.|)^) by Th38 .= |.f1.|/|.f2.| by RFUNCT_1:31; end; theorem Th52: (f1+f2)|X = f1|X + f2|X & (f1+f2)|X = f1|X + f2 & (f1+f2)|X = f1 + f2|X proof A1: now let c; assume A2: c in dom ((f1+f2)|X); then A3: c in dom (f1+f2) /\ X by RELAT_1:61; then A4: c in X by XBOOLE_0:def 4; A5: c in dom (f1+f2) by A3,XBOOLE_0:def 4; then A6: c in dom f1 /\ dom f2 by VALUED_1:def 1; then c in dom f2 by XBOOLE_0:def 4; then c in dom f2 /\ X by A4,XBOOLE_0:def 4; then A7: c in dom (f2|X) by RELAT_1:61; c in dom f1 by A6,XBOOLE_0:def 4; then c in dom f1 /\ X by A4,XBOOLE_0:def 4; then A8: c in dom (f1|X) by RELAT_1:61; then c in dom (f1|X) /\ dom (f2|X) by A7,XBOOLE_0:def 4; then A9: c in dom ((f1|X) + (f2|X)) by VALUED_1:def 1; thus ((f1+f2)|X)/.c = (f1+f2)/.c by A2,PARTFUN2:15 .= (((f1/.c))) + (((f2/.c))) by A5,Th1 .= ((f1|X)/.c) + (((f2/.c))) by A8,PARTFUN2:15 .= ((f1|X)/.c) + ((f2|X)/.c) by A7,PARTFUN2:15 .= ((f1|X)+(f2|X))/.c by A9,Th1; end; dom ((f1+f2)|X) = dom (f1+f2) /\ X by RELAT_1:61 .= dom f1 /\ dom f2 /\ (X /\ X) by VALUED_1:def 1 .= dom f1 /\ (dom f2 /\ (X /\ X)) by XBOOLE_1:16 .= dom f1 /\ (dom f2 /\ X /\ X) by XBOOLE_1:16 .= dom f1 /\ (X /\ dom (f2|X)) by RELAT_1:61 .= dom f1 /\ X /\ dom (f2|X) by XBOOLE_1:16 .= dom (f1|X) /\ dom (f2|X) by RELAT_1:61 .= dom ((f1|X)+(f2|X)) by VALUED_1:def 1; hence (f1+f2)|X = f1|X + f2|X by A1,PARTFUN2:1; A10: now let c; assume A11: c in dom ((f1+f2)|X); then A12: c in dom (f1+f2) /\ X by RELAT_1:61; then A13: c in X by XBOOLE_0:def 4; A14: c in dom (f1+f2) by A12,XBOOLE_0:def 4; then A15: c in dom f1 /\ dom f2 by VALUED_1:def 1; then c in dom f1 by XBOOLE_0:def 4; then c in dom f1 /\ X by A13,XBOOLE_0:def 4; then A16: c in dom (f1|X) by RELAT_1:61; c in dom f2 by A15,XBOOLE_0:def 4; then c in dom (f1|X) /\ dom f2 by A16,XBOOLE_0:def 4; then A17: c in dom ((f1|X) + f2) by VALUED_1:def 1; thus ((f1+f2)|X)/.c = (f1+f2)/.c by A11,PARTFUN2:15 .= (((f1/.c))) +(((f2/.c))) by A14,Th1 .= ((f1|X)/.c) +(((f2/.c))) by A16,PARTFUN2:15 .= ((f1|X)+f2)/.c by A17,Th1; end; dom ((f1+f2)|X) = dom (f1+f2) /\ X by RELAT_1:61 .= dom f1 /\ dom f2 /\ X by VALUED_1:def 1 .= dom f1 /\ X /\ dom f2 by XBOOLE_1:16 .= dom (f1|X) /\ dom f2 by RELAT_1:61 .= dom ((f1|X)+ f2) by VALUED_1:def 1; hence (f1+f2)|X = f1|X + f2 by A10,PARTFUN2:1; A18: now let c; assume A19: c in dom ((f1+f2)|X); then A20: c in dom (f1+f2) /\ X by RELAT_1:61; then A21: c in X by XBOOLE_0:def 4; A22: c in dom (f1+f2) by A20,XBOOLE_0:def 4; then A23: c in dom f1 /\ dom f2 by VALUED_1:def 1; then c in dom f2 by XBOOLE_0:def 4; then c in dom f2 /\ X by A21,XBOOLE_0:def 4; then A24: c in dom (f2|X) by RELAT_1:61; c in dom f1 by A23,XBOOLE_0:def 4; then c in dom f1 /\ dom (f2|X) by A24,XBOOLE_0:def 4; then A25: c in dom (f1 + (f2|X)) by VALUED_1:def 1; thus ((f1+f2)|X)/.c = (f1+f2)/.c by A19,PARTFUN2:15 .= (((f1/.c))) +(((f2/.c))) by A22,Th1 .= (((f1/.c))) +((f2|X)/.c) by A24,PARTFUN2:15 .= (f1+(f2|X))/.c by A25,Th1; end; dom ((f1+f2)|X) = dom (f1+f2) /\ X by RELAT_1:61 .= dom f1 /\ dom f2 /\ X by VALUED_1:def 1 .= dom f1 /\ (dom f2 /\ X) by XBOOLE_1:16 .= dom f1 /\ dom (f2|X) by RELAT_1:61 .= dom (f1 + (f2|X)) by VALUED_1:def 1; hence thesis by A18,PARTFUN2:1; end; theorem Th53: (f1(#)f2)|X = f1|X (#) f2|X & (f1(#)f2)|X = f1|X (#) f2 & (f1(#) f2)|X = f1 (#) f2|X proof A1: now let c; assume A2: c in dom ((f1(#)f2)|X); then A3: c in dom (f1(#)f2) /\ X by RELAT_1:61; then A4: c in X by XBOOLE_0:def 4; A5: c in dom (f1(#)f2) by A3,XBOOLE_0:def 4; then A6: c in dom f1 /\ dom f2 by Th3; then c in dom f2 by XBOOLE_0:def 4; then c in dom f2 /\ X by A4,XBOOLE_0:def 4; then A7: c in dom (f2|X) by RELAT_1:61; c in dom f1 by A6,XBOOLE_0:def 4; then c in dom f1 /\ X by A4,XBOOLE_0:def 4; then A8: c in dom (f1|X) by RELAT_1:61; then c in dom (f1|X) /\ dom (f2|X) by A7,XBOOLE_0:def 4; then A9: c in dom ((f1|X) (#) (f2|X)) by Th3; thus ((f1(#)f2)|X)/.c = (f1(#)f2)/.c by A2,PARTFUN2:15 .= (((f1/.c))) *(((f2/.c))) by A5,Th3 .= ((f1|X)/.c) *(((f2/.c))) by A8,PARTFUN2:15 .= ((f1|X)/.c) *((f2|X)/.c) by A7,PARTFUN2:15 .= ((f1|X)(#)(f2|X))/.c by A9,Th3; end; dom ((f1(#)f2)|X) = dom (f1(#)f2) /\ X by RELAT_1:61 .= dom f1 /\ dom f2 /\ (X /\ X) by Th3 .= dom f1 /\ (dom f2 /\ (X /\ X)) by XBOOLE_1:16 .= dom f1 /\ (dom f2 /\ X /\ X) by XBOOLE_1:16 .= dom f1 /\ (X /\ dom (f2|X)) by RELAT_1:61 .= dom f1 /\ X /\ dom (f2|X) by XBOOLE_1:16 .= dom (f1|X) /\ dom (f2|X) by RELAT_1:61 .= dom ((f1|X)(#)(f2|X)) by Th3; hence (f1(#)f2)|X = f1|X (#) f2|X by A1,PARTFUN2:1; A10: now let c; assume A11: c in dom ((f1(#)f2)|X); then A12: c in dom (f1(#)f2) /\ X by RELAT_1:61; then A13: c in X by XBOOLE_0:def 4; A14: c in dom (f1(#)f2) by A12,XBOOLE_0:def 4; then A15: c in dom f1 /\ dom f2 by Th3; then c in dom f1 by XBOOLE_0:def 4; then c in dom f1 /\ X by A13,XBOOLE_0:def 4; then A16: c in dom (f1|X) by RELAT_1:61; c in dom f2 by A15,XBOOLE_0:def 4; then c in dom (f1|X) /\ dom f2 by A16,XBOOLE_0:def 4; then A17: c in dom ((f1|X) (#) f2) by Th3; thus ((f1(#)f2)|X)/.c = (f1(#)f2)/.c by A11,PARTFUN2:15 .= (((f1/.c))) *(((f2/.c))) by A14,Th3 .= ((f1|X)/.c) *(((f2/.c))) by A16,PARTFUN2:15 .= ((f1|X)(#)f2)/.c by A17,Th3; end; dom ((f1(#)f2)|X) = dom (f1(#)f2) /\ X by RELAT_1:61 .= dom f1 /\ dom f2 /\ X by Th3 .= dom f1 /\ X /\ dom f2 by XBOOLE_1:16 .= dom (f1|X) /\ dom f2 by RELAT_1:61 .= dom ((f1|X)(#) f2) by Th3; hence (f1(#)f2)|X = f1|X (#) f2 by A10,PARTFUN2:1; A18: now let c; assume A19: c in dom ((f1(#)f2)|X); then A20: c in dom (f1(#)f2) /\ X by RELAT_1:61; then A21: c in X by XBOOLE_0:def 4; A22: c in dom (f1(#)f2) by A20,XBOOLE_0:def 4; then A23: c in dom f1 /\ dom f2 by Th3; then c in dom f2 by XBOOLE_0:def 4; then c in dom f2 /\ X by A21,XBOOLE_0:def 4; then A24: c in dom (f2|X) by RELAT_1:61; c in dom f1 by A23,XBOOLE_0:def 4; then c in dom f1 /\ dom (f2|X) by A24,XBOOLE_0:def 4; then A25: c in dom (f1 (#) (f2|X)) by Th3; thus ((f1(#)f2)|X)/.c = (f1(#)f2)/.c by A19,PARTFUN2:15 .= (((f1/.c))) *(((f2/.c))) by A22,Th3 .= (((f1/.c))) *((f2|X)/.c) by A24,PARTFUN2:15 .= (f1(#)(f2|X))/.c by A25,Th3; end; dom ((f1(#)f2)|X) = dom (f1(#)f2) /\ X by RELAT_1:61 .= dom f1 /\ dom f2 /\ X by Th3 .= dom f1 /\ (dom f2 /\ X) by XBOOLE_1:16 .= dom f1 /\ dom (f2|X) by RELAT_1:61 .= dom (f1 (#) (f2|X)) by Th3; hence thesis by A18,PARTFUN2:1; end; theorem Th54: (-f)|X = -(f|X) & (f^)|X = (f|X)^ & (|.f.|)|X = |.(f|X).| proof A1: dom ((f^)|X) = dom (f^) /\ X by RELAT_1:61 .= (dom f \ f"{0c}) /\ X by Def2 .= dom f /\ X \ f"{0c} /\ X by XBOOLE_1:50 .= dom (f|X) \ X /\ f"{0c} by RELAT_1:61 .= dom (f|X) \ (f|X)"{0c} by FUNCT_1:70 .= dom ((f|X)^) by Def2; A2: now let c; assume A3: c in dom ((-f)|X); then A4: c in dom (-f) /\ X by RELAT_1:61; then A5: c in X by XBOOLE_0:def 4; A6: c in dom (-f) by A4,XBOOLE_0:def 4; then c in dom f by Th5; then c in dom f /\ X by A5,XBOOLE_0:def 4; then A7: c in dom (f|X) by RELAT_1:61; then A8: c in dom (-(f|X)) by Th5; thus ((-f)|X)/.c = (-f)/.c by A3,PARTFUN2:15 .= -((f/.c)) by A6,Th5 .= -((f|X)/.c) by A7,PARTFUN2:15 .= (-(f|X))/.c by A8,Th5; end; dom ((-f)|X) = dom (-f) /\ X by RELAT_1:61 .= dom f /\ X by Th5 .= dom (f|X) by RELAT_1:61 .= dom (-(f|X)) by Th5; hence (-f)|X = -(f|X) by A2,PARTFUN2:1; A9: dom ((f|X)^) c= dom (f|X) by Th6; now let c; assume A10: c in dom ((f^)|X); then c in dom (f^) /\ X by RELAT_1:61; then A11: c in dom (f^) by XBOOLE_0:def 4; thus ((f^)|X)/.c = (f^)/.c by A10,PARTFUN2:15 .= ((f/.c))" by A11,Def2 .= ((f|X)/.c)" by A9,A1,A10,PARTFUN2:15 .= ((f|X)^)/.c by A1,A10,Def2; end; hence (f^)|X = (f|X)^ by A1,PARTFUN2:1; A12: dom ((|.f.|)|X) = dom (|.f.|) /\ X by RELAT_1:61 .= dom f /\ X by VALUED_1:def 11 .= dom (f|X) by RELAT_1:61 .= dom (|.(f|X).|) by VALUED_1:def 11; now let c; A13: dom |.f.| = dom f by VALUED_1:def 11; assume A14: c in dom ((|.f.|)|X); then A15: c in dom (f|X) by A12,VALUED_1:def 11; c in dom (|.f.|) /\ X by A14,RELAT_1:61; then A16: c in dom (|.f.|) by XBOOLE_0:def 4; thus ((|.f.|)|X).c = (|.f.|).c by A14,FUNCT_1:47 .= |.(f.c).| by VALUED_1:18 .= |.(f/.c).| by A16,A13,PARTFUN1:def 6 .= |.(f|X)/.c.| by A15,PARTFUN2:15 .= |.(f|X).c.| by A15,PARTFUN1:def 6 .= (|.(f|X).|).c by VALUED_1:18; end; hence thesis by A12,PARTFUN1:5; end; theorem (f1-f2)|X = f1|X - f2|X & (f1-f2)|X = f1|X - f2 &(f1-f2)|X = f1 - f2|X proof thus (f1-f2)|X = (f1|X)+ (-f2)|X by Th52 .= (f1|X) - (f2|X) by Th54; thus (f1-f2)|X = (f1|X)+ -f2 by Th52 .= (f1|X) - f2; thus (f1-f2)|X = f1+ (-f2)|X by Th52 .= f1 - (f2|X) by Th54; end; theorem (f1/f2)|X = f1|X / f2|X & (f1/f2)|X = f1|X / f2 &(f1/f2)|X = f1 / f2|X proof thus (f1/f2)|X = (f1(#)(f2^))|X by Th39 .= (f1|X) (#) (f2^|X) by Th53 .= (f1|X) (#) ((f2|X)^) by Th54 .= (f1|X)/(f2|X) by Th39; thus (f1/f2)|X = (f1(#)(f2^))|X by Th39 .= (f1|X) (#) (f2^) by Th53 .= (f1|X)/f2 by Th39; thus (f1/f2)|X = (f1(#)(f2^))|X by Th39 .= f1 (#) (f2^)|X by Th53 .= f1 (#) ((f2|X)^) by Th54 .= f1/(f2|X) by Th39; end; theorem (r(#)f)|X = r(#)(f|X) proof A1: now let c; assume A2: c in dom ((r(#)f)|X); then A3: c in dom (r(#)f) /\ X by RELAT_1:61; then A4: c in X by XBOOLE_0:def 4; A5: c in dom (r(#)f) by A3,XBOOLE_0:def 4; then c in dom f by Th4; then c in dom f /\ X by A4,XBOOLE_0:def 4; then A6: c in dom (f|X) by RELAT_1:61; then A7: c in dom (r(#)(f|X)) by Th4; thus ((r(#)f)|X)/.c = (r(#)f)/.c by A2,PARTFUN2:15 .= r*((f/.c)) by A5,Th4 .= r*((f|X)/.c) by A6,PARTFUN2:15 .= (r(#)(f|X))/.c by A7,Th4; end; dom ((r(#)f)|X) = dom (r(#)f) /\ X by RELAT_1:61 .= dom f /\ X by Th4 .= dom (f|X) by RELAT_1:61 .= dom (r(#)(f|X)) by Th4; hence thesis by A1,PARTFUN2:1; end; begin theorem Th58: (f1 is total & f2 is total iff f1+f2 is total) & (f1 is total & f2 is total iff f1-f2 is total) & (f1 is total & f2 is total iff f1(#)f2 is total) proof thus f1 is total & f2 is total iff f1+f2 is total proof thus f1 is total & f2 is total implies f1+f2 is total proof assume f1 is total & f2 is total; then dom f1 = C & dom f2 = C by PARTFUN1:def 2; hence dom (f1+f2) = C /\ C by VALUED_1:def 1 .= C; end; assume f1+f2 is total; then dom (f1+f2) = C by PARTFUN1:def 2; then dom f1 /\ dom f2 = C by VALUED_1:def 1; then C c= dom f1 & C c= dom f2 by XBOOLE_1:17; hence dom f1 = C & dom f2 = C by XBOOLE_0:def 10; end; thus f1 is total & f2 is total iff f1-f2 is total proof thus f1 is total & f2 is total implies f1-f2 is total proof assume f1 is total & f2 is total; then dom f1 = C & dom f2 = C by PARTFUN1:def 2; hence dom (f1-f2) = C /\ C by Th2 .= C; end; assume f1-f2 is total; then dom (f1-f2) = C by PARTFUN1:def 2; then dom f1 /\ dom f2 = C by Th2; then C c= dom f1 & C c= dom f2 by XBOOLE_1:17; hence dom f1 = C & dom f2 = C by XBOOLE_0:def 10; end; thus f1 is total & f2 is total implies f1(#)f2 is total proof assume f1 is total & f2 is total; then dom f1 = C & dom f2 = C by PARTFUN1:def 2; hence dom (f1(#)f2) = C /\ C by Th3 .= C; end; assume f1(#)f2 is total; then dom (f1(#)f2) = C by PARTFUN1:def 2; then dom f1 /\ dom f2 = C by Th3; then C c= dom f1 & C c= dom f2 by XBOOLE_1:17; hence dom f1 = C & dom f2 = C by XBOOLE_0:def 10; end; theorem Th59: f is total iff r(#)f is total proof thus f is total implies r(#)f is total proof assume f is total; then dom f = C by PARTFUN1:def 2; hence dom (r(#)f) = C by Th4; end; assume r(#)f is total; then dom (r(#)f) = C by PARTFUN1:def 2; hence dom f = C by Th4; end; theorem Th60: f is total iff -f is total proof A1: -f = (-1r)(#)f by COMPLEX1:def 4; thus f is total implies -f is total proof A2: -f = (-1r)(#)f by COMPLEX1:def 4; assume f is total; hence thesis by A2,Th59; end; assume -f is total; hence thesis by A1,Th59; end; theorem Th61: f is total iff |.f.| is total proof thus f is total implies |.f.| is total proof assume f is total; then dom f = C by PARTFUN1:def 2; hence dom (|.f.|) = C by VALUED_1:def 11; end; assume |.f.| is total; then dom (|.f.|) = C by PARTFUN1:def 2; hence dom f = C by VALUED_1:def 11; end; theorem Th62: f^ is total iff f"{0} = {} & f is total proof thus f^ is total implies f"{0} = {} & f is total proof assume f^ is total; then A1: dom (f^) = C by PARTFUN1:def 2; f"{0c} c= C; then f"{0c} c= dom f \ f"{0c} by A1,Def2; hence f"{0} = {} by XBOOLE_1:38; then C = dom f \ {} by A1,Def2; hence dom f = C; end; assume A2: f"{0} = {} & f is total; thus dom (f^) = dom f \ f"{0c} by Def2 .= C by A2,PARTFUN1:def 2; end; theorem Th63: f1 is total & f2"{0} = {} & f2 is total iff f1/f2 is total proof thus f1 is total & f2"{0} = {} & f2 is total implies f1/f2 is total proof assume that A1: f1 is total and A2: f2"{0} = {} & f2 is total; f2^ is total by A2,Th62; then f1(#)(f2^) is total by A1,Th58; hence thesis by Th39; end; assume f1/f2 is total; then A3: f1(#)(f2^) is total by Th39; hence f1 is total by Th58; f2^ is total by A3,Th58; hence thesis by Th62; end; theorem f1 is total & f2 is total implies (f1+f2)/.c = ((f1/.c)) + ((f2/.c)) & (f1-f2)/.c = ((f1/.c)) - ((f2/.c)) & (f1(#) f2)/.c = ((f1/.c)) * ((f2/.c)) proof assume A1: f1 is total & f2 is total; then f1+f2 is total by Th58; then dom (f1+f2) = C by PARTFUN1:def 2; hence (f1+f2)/.c = ((f1/.c)) + ((f2/.c)) by Th1; f1-f2 is total by A1,Th58; then dom (f1-f2) = C by PARTFUN1:def 2; hence (f1-f2)/.c = ((f1/.c)) - ((f2/.c)) by Th2; f1(#)f2 is total by A1,Th58; then dom (f1(#)f2) = C by PARTFUN1:def 2; hence thesis by Th3; end; theorem f is total implies (r(#)f)/.c = r * ((f/.c)) proof assume f is total; then r(#)f is total by Th59; then dom (r(#)f) = C by PARTFUN1:def 2; hence thesis by Th4; end; theorem f is total implies (-f)/.c = - (f/.c) & (|.f.|).c = |. (f/.c) .| proof assume A1: f is total; then |.f.| is total by Th61; then A2: dom |.f.| = dom f & dom (|.f.|) = C by PARTFUN1:def 2,VALUED_1:def 11; -f is total by A1,Th60; then dom (-f) = C by PARTFUN1:def 2; hence (-f)/.c = - (f/.c) by Th5; thus (|.f.|).c = |. (f.c) .| by VALUED_1:18 .= |. (f/.c) .| by A2,PARTFUN1:def 6; end; theorem f^ is total implies (f^)/.c = ((f/.c))" proof assume f^ is total; then dom (f^) = C by PARTFUN1:def 2; hence thesis by Def2; end; theorem f1 is total & f2^ is total implies (f1/f2)/.c = ((f1/.c)) *(((f2/.c))) " proof assume that A1: f1 is total and A2: f2^ is total; f2"{0c} = {} & f2 is total by A2,Th62; then f1/f2 is total by A1,Th63; then dom (f1/f2) = C by PARTFUN1:def 2; hence thesis by Def1; end; begin Lm3: |.f.| is bounded iff f is bounded proof A1: dom f = dom |.f.| by VALUED_1:def 11; thus |.f.| is bounded implies f is bounded proof assume |.f.| is bounded; then consider r1 being real number such that A2: for y st y in dom |.f.| holds abs(|.f.|.y) < r1 by COMSEQ_2:def 3; take r1; let y; assume A3: y in dom f; then abs(|.f.|.y) < r1 by A1,A2; then abs(|.f.y.|) < r1 by A1,A3,VALUED_1:def 11; hence thesis; end; given r1 such that A4: for y st y in dom f holds abs(f.y) x0) holds f/*s1 is convergent & f.x0=lim(f/*s1 ) proof thus f is_continuous_in x0 implies for s1 st rng s1 c= dom f & s1 is convergent & lim s1=x0 & (for n holds s1.n<>x0) holds f/*s1 is convergent & f. x0=lim(f/*s1) by Def1; assume A1: for s1 st rng s1 c=dom f & s1 is convergent & lim s1=x0 & (for n holds s1.n<>x0) holds f/*s1 is convergent & f.x0=lim(f/*s1); let s2 such that A2: rng s2 c=dom f and A3: s2 is convergent & lim s2=x0; now per cases; suppose ex n st for m st n<=m holds s2.m=x0; then consider N be Element of NAT such that A4: for m st N<=m holds s2.m=x0; A5: for n holds (s2^\N).n=x0 proof let n; s2.(n+N)=x0 by A4,NAT_1:12; hence thesis by NAT_1:def 3; end; A6: f/*(s2^\N)=(f/*s2)^\N by A2,VALUED_0:27; A7: rng (s2^\N) c= rng s2 by VALUED_0:21; A8: now let p be real number such that A9: p>0; take n=0; let m such that n<=m; abs((f/*(s2^\N)).m-f.x0)=abs(f.((s2^\N).m)-f.x0) by A2,A7,FUNCT_2:108 ,XBOOLE_1:1 .=abs(f.x0-f.x0) by A5 .=0 by ABSVALUE:2; hence abs((f/*(s2^\N)).m-f.x0)

x0; defpred P[Element of NAT,set,set] means for n,m st $2=n & $3=m holds nx0 & for k st nx0 holds m<=k; defpred P[set] means s2.$1<>x0; ex m1 be Element of NAT st 0<=m1 & s2.m1<>x0 by A11; then A12: ex m be Nat st P[m]; consider M be Nat such that A13: P[M] & for n be Nat st P[n] holds M<=n from NAT_1:sch 5(A12); reconsider M9 = M as Element of NAT by ORDINAL1:def 12; A14: now let n; consider m such that A15: n+1<=m & s2.m<>x0 by A11; take m; thus nx0 by A15,NAT_1:13; end; A16: for n for x be Element of NAT ex y be Element of NAT st P[n,x,y] proof let n; let x be Element of NAT; defpred P[Nat] means x<$1 & s2.$1<>x0; ex m st P[m] by A14; then A17: ex m be Nat st P[m]; consider l be Nat such that A18: P[l] & for k be Nat st P[k] holds l<=k from NAT_1:sch 5(A17); take l; l in NAT by ORDINAL1:def 12; hence thesis by A18; end; consider F be Function of NAT,NAT such that A19: F.0=M9 & for n be Element of NAT holds P[n,F.n,F.(n+1)] from RECDEF_1:sch 2(A16); A20: rng F c= REAL by XBOOLE_1:1; A21: rng F c= NAT; A22: dom F=NAT by FUNCT_2:def 1; then reconsider F as Real_Sequence by A20,RELSET_1:4; A23: now let n; F.n in rng F by A22,FUNCT_1:def 3; hence F.n is Element of NAT by A21; end; now let n; F.n is Element of NAT & F.(n+1) is Element of NAT by A23; hence F.nx0 ex m st F.m=n proof defpred P[set] means s2.$1<>x0 & for m holds F.m<>$1; assume ex n st P[n]; then A26: ex n be Nat st P[n]; consider M1 be Nat such that A27: P[M1] & for n be Nat st P[n] holds M1<=n from NAT_1:sch 5(A26 ); defpred P[Nat] means $1x0 & ex m st F.m=$1; A28: ex n being Nat st P[n] proof take M; M<=M1 & M <> M1 by A13,A19,A27; hence Mx0 by A13; take 0; thus thesis by A19; end; A29: for n being Nat st P[n] holds n<=M1; consider MX be Nat such that A30: P[MX] & for n being Nat st P[n] holds n<=MX from NAT_1:sch 6( A29,A28); A31: for k st MXx0; now per cases; suppose ex m st F.m=k; hence contradiction by A30,A32,A33; end; suppose for m holds F.m<>k; hence contradiction by A27,A33; end; end; hence contradiction; end; consider m such that A34: F.m=MX by A30; A35: MXx0 by A19,A34; M1 in NAT by ORDINAL1:def 12; then A36: F.(m+1)<=M1 by A19,A27,A30,A34; now assume F.(m+1)<>M1; then F.(m+1)x0 proof defpred P[Element of NAT] means (s2*F).$1<>x0; A38: for k st P[k] holds P[k+1] proof let k such that (s2*F).k<>x0; P[k,F.k,F.(k+1)] by A19; then s2.(F.(k+1))<>x0; hence thesis by FUNCT_2:15; end; A39: P[0] by A13,A19,FUNCT_2:15; thus for n holds P[n] from NAT_1:sch 1(A39,A38); end; A40: rng (s2*F) c= rng s2 by VALUED_0:21; then rng (s2*F) c= dom f by A2,XBOOLE_1:1; then A41: f/*(s2*F) is convergent & f.x0=lim(f/*(s2*F)) by A1,A37,A24; A42: now let p be real number; assume A43: 0x0; then consider l be Element of NAT such that A46: m=F.l by A25; n<=l by A45,A46,SEQM_3:1; then abs((f/*(s2*F)).l-f.x0)

0 implies f^ is_continuous_in x0 proof assume that A1: f is_continuous_in x0 and A2: f.x0<>0; not f.x0 in {0} by A2,TARSKI:def 1; then A3: not x0 in f"{0} by FUNCT_1:def 7; let s1; assume that A4: rng s1 c= dom (f^) and A5: s1 is convergent & lim s1=x0; dom f \ f"{0} c= dom f & rng s1 c= dom f \ f"{0} by A4,RFUNCT_1:def 2 ,XBOOLE_1:36; then rng s1 c= dom f by XBOOLE_1:1; then A6: f/*s1 is convergent & f.x0 = lim (f/*s1) by A1,A5,Def1; then (f/*s1)" is convergent by A2,A4,RFUNCT_2:11,SEQ_2:21; hence (f^)/*s1 is convergent by A4,RFUNCT_2:12; x0 in dom f by A2,FUNCT_1:def 2; then x0 in dom f \ f"{0} by A3,XBOOLE_0:def 5; then x0 in dom (f^) by RFUNCT_1:def 2; hence (f^).x0 = (f.x0)" by RFUNCT_1:def 2 .= lim ((f/*s1)") by A2,A4,A6,RFUNCT_2:11,SEQ_2:22 .= lim ((f^)/*s1) by A4,RFUNCT_2:12; end; theorem x0 in dom f2 & f1 is_continuous_in x0 & f1.x0<>0 & f2 is_continuous_in x0 implies f2/f1 is_continuous_in x0 proof assume A1: x0 in dom f2; assume that A2: f1 is_continuous_in x0 and A3: f1.x0<>0 and A4: f2 is_continuous_in x0; not f1.x0 in {0} by A3,TARSKI:def 1; then A5: not x0 in f1"{0} by FUNCT_1:def 7; x0 in dom f1 by A3,FUNCT_1:def 2; then x0 in dom f1 \ f1"{0} by A5,XBOOLE_0:def 5; then x0 in dom(f1^) by RFUNCT_1:def 2; then A6: x0 in dom(f1^) /\ dom f2 by A1,XBOOLE_0:def 4; f1^ is_continuous_in x0 by A2,A3,Th10; then f2(#)(f1^) is_continuous_in x0 by A4,A6,Th7; hence thesis by RFUNCT_1:31; end; theorem Th12: x0 in dom (f2*f1) & f1 is_continuous_in x0 & f2 is_continuous_in f1.x0 implies f2*f1 is_continuous_in x0 proof assume A1: x0 in dom (f2*f1); assume that A2: f1 is_continuous_in x0 and A3: f2 is_continuous_in f1.x0; let s1 such that A4: rng s1 c= dom (f2*f1) and A5: s1 is convergent & lim s1 = x0; A6: dom (f2*f1) c= dom f1 by RELAT_1:25; now let x; assume x in rng (f1/*s1); then consider n such that A7: x=(f1/*s1).n by FUNCT_2:113; s1.n in rng s1 by VALUED_0:28; then f1.(s1.n) in dom f2 by A4,FUNCT_1:11; hence x in dom f2 by A4,A6,A7,FUNCT_2:108,XBOOLE_1:1; end; then A8: rng (f1/*s1) c= dom f2 by TARSKI:def 3; now let n; s1.n in rng s1 by VALUED_0:28; then A9: s1.n in dom f1 by A4,FUNCT_1:11; thus ((f2*f1)/*s1).n = (f2*f1).(s1.n) by A4,FUNCT_2:108 .= f2.(f1.(s1.n)) by A9,FUNCT_1:13 .= f2.((f1/*s1).n) by A4,A6,FUNCT_2:108,XBOOLE_1:1 .= (f2/*(f1/*s1)).n by A8,FUNCT_2:108; end; then A10: f2/*(f1/*s1) = (f2*f1)/*s1 by FUNCT_2:63; rng s1 c= dom f1 by A4,A6,XBOOLE_1:1; then A11: f1/*s1 is convergent & f1.x0 = lim (f1/*s1) by A2,A5,Def1; then f2.(f1.x0) = lim (f2/*(f1/*s1)) by A3,A8,Def1; hence thesis by A1,A3,A11,A8,A10,Def1,FUNCT_1:12; end; definition let f; attr f is continuous means :Def2: for x0 st x0 in dom f holds f is_continuous_in x0; end; theorem Th13: for X,f st X c= dom f holds f|X is continuous iff for s1 st rng s1 c= X & s1 is convergent & lim s1 in X holds f/*s1 is convergent & f.(lim s1) = lim (f/*s1) proof let X,f such that A1: X c= dom f; thus f|X is continuous implies for s1 st rng s1 c= X & s1 is convergent & lim s1 in X holds f/*s1 is convergent & f.(lim s1) = lim (f/*s1) proof assume A2: f|X is continuous; now let s1 such that A3: rng s1 c= X and A4: s1 is convergent and A5: lim s1 in X; A6: dom (f|X) = dom f /\ X by RELAT_1:61 .= X by A1,XBOOLE_1:28; then A7: f|X is_continuous_in (lim s1) by A2,A5,Def2; now let n; A8: s1.n in rng s1 by VALUED_0:28; thus ((f|X)/*s1).n = (f|X).(s1.n) by A3,A6,FUNCT_2:108 .= f.(s1.n) by A3,A6,A8,FUNCT_1:47 .= (f/*s1).n by A1,A3,FUNCT_2:108,XBOOLE_1:1; end; then A9: (f|X)/*s1 = f/*s1 by FUNCT_2:63; f.(lim s1) = (f|X).(lim s1) by A5,A6,FUNCT_1:47 .= lim (f/*s1) by A3,A4,A6,A7,A9,Def1; hence f/*s1 is convergent & f.(lim s1) = lim (f/*s1) by A3,A4,A6,A7,A9,Def1; end; hence thesis; end; assume A10: for s1 st rng s1 c= X & s1 is convergent & lim s1 in X holds f/*s1 is convergent & f.(lim s1) = lim (f/*s1); now A11: dom (f|X) = dom f /\ X by RELAT_1:61 .= X by A1,XBOOLE_1:28; let x1 such that A12: x1 in dom(f|X); now let s1 such that A13: rng s1 c= dom (f|X) and A14: s1 is convergent and A15: lim s1 = x1; now let n; A16: s1.n in rng s1 by VALUED_0:28; thus ((f|X)/*s1).n = (f|X).(s1.n) by A13,FUNCT_2:108 .= f.(s1.n) by A13,A16,FUNCT_1:47 .= (f/*s1).n by A1,A11,A13,FUNCT_2:108,XBOOLE_1:1; end; then A17: (f|X)/*s1 = f/*s1 by FUNCT_2:63; (f|X).(lim s1) = f.(lim s1) by A12,A15,FUNCT_1:47 .= lim ((f|X)/*s1) by A10,A12,A11,A13,A14,A15,A17; hence (f|X)/*s1 is convergent & (f|X).x1 = lim ((f|X)/*s1) by A10,A12,A11,A13 ,A14,A15,A17; end; hence f|X is_continuous_in x1 by Def1; end; hence thesis by Def2; end; theorem Th14: X c= dom f implies (f|X is continuous iff for x0,r st x0 in X & 0 continuous for PartFunc of REAL,REAL; coherence proof let f be PartFunc of REAL,REAL; assume A1: f is constant; now reconsider s = 1 as real number; let x0,r; assume that A2: x0 in dom f and A3: 0 continuous for PartFunc of REAL,REAL; coherence proof for x0 st x0 in dom(f|X) holds f|X is_continuous_in x0 proof let x0; assume A1: x0 in dom(f|X); then x0 in dom f by RELAT_1:57; then A2: f is_continuous_in x0 by Def2; x0 in X by A1; hence thesis by A2,Th1; end; hence thesis by Def2; end; end; theorem f|X is continuous iff f|X|X is continuous; theorem Th16: f|X is continuous & X1 c= X implies f|X1 is continuous proof assume A1: f|X is continuous; assume X1 c= X; then f|X1 = f|X|X1 by RELAT_1:74; hence thesis by A1; end; registration cluster empty -> continuous for PartFunc of REAL,REAL; coherence; end; registration let f; let X be trivial set; cluster f|X -> continuous for PartFunc of REAL,REAL; coherence proof per cases; suppose f|X is empty; hence thesis; end; suppose f|X is not empty; then consider x0 such that A1: x0 in dom(f|X qua PartFunc of REAL,REAL) by MEMBERED:9; x0 in X by A1,RELAT_1:57; then A2: X = {x0} by ZFMISC_1:132; now let p; assume p in dom(f|X); then A3: p in {x0} by A2; thus f|X is_continuous_in p proof let s1; assume that A4: rng s1 c= dom(f|X) and s1 is convergent and lim s1=p; A5: dom f /\ {x0} c= {x0} by XBOOLE_1:17; rng s1 c= dom f /\ {x0} by A2,A4,RELAT_1:61; then A6: rng s1 c= {x0} by A5,XBOOLE_1:1; A7: now let n; s1.n in rng s1 by VALUED_0:28; hence s1.n = x0 by A6,TARSKI:def 1; end; A8: p=x0 by A3,TARSKI:def 1; A9: now let g be real number such that A10: 0 continuous for PartFunc of REAL,REAL; coherence proof set X = dom(f1+f2); X c= dom f1 /\ dom f2 by VALUED_1:def 1; then A1: X c= dom f1 & X c= dom f2 by XBOOLE_1:18; A2: f1|X is continuous & f2|X is continuous; now let s1; assume that A3: rng s1 c= X and A4: s1 is convergent and A5: lim s1 in X; A6: f1/*s1 is convergent & f2/*s1 is convergent by A1,A2,A3,A4,A5,Th13; then A7: (f1/*s1)+(f2/*s1) is convergent; A8: rng s1 c= dom f1 /\ dom f2 by A3,VALUED_1:def 1; f1.(lim s1) = lim (f1/*s1) & f2.(lim s1) = lim (f2/*s1) by A1,A2,A3,A4,A5 ,Th13; then (f1+f2).(lim s1) = lim (f1/*s1) + lim (f2/*s1) by A5,VALUED_1:def 1 .= lim (f1/*s1 + f2/*s1) by A6,SEQ_2:6 .= lim ((f1+f2)/*s1) by A8,RFUNCT_2:8; hence (f1+f2)/*s1 is convergent & (f1+f2).(lim s1)=lim((f1+f2)/*s1) by A8 ,A7,RFUNCT_2:8; end; then (f1+f2)|X is continuous by Th13; hence thesis; end; cluster f1-f2 -> continuous for PartFunc of REAL,REAL; coherence proof set X = dom(f1-f2); X c= dom f1 /\ dom f2 by VALUED_1:12; then A9: X c= dom f1 & X c= dom f2 by XBOOLE_1:18; A10: f1|X is continuous & f2|X is continuous; now let s1; assume that A11: rng s1 c= X and A12: s1 is convergent and A13: lim s1 in X; A14: f1/*s1 is convergent & f2/*s1 is convergent by A9,A10,A11,A12,A13,Th13; then A15: (f1/*s1)-(f2/*s1) is convergent; A16: rng s1 c= dom f1 /\ dom f2 by A11,VALUED_1:12; f1.(lim s1) = lim (f1/*s1) & f2.(lim s1) = lim (f2/*s1) by A9,A10,A11,A12 ,A13,Th13; then (f1-f2).(lim s1) = lim (f1/*s1) - lim (f2/*s1) by A13,VALUED_1:13 .= lim (f1/*s1 - f2/*s1) by A14,SEQ_2:12 .= lim ((f1-f2)/*s1) by A16,RFUNCT_2:8; hence (f1-f2)/*s1 is convergent & (f1-f2).(lim s1)=lim((f1-f2)/*s1) by A16,A15,RFUNCT_2:8; end; then (f1-f2)|X is continuous by Th13; hence thesis; end; cluster f1(#)f2 -> continuous for PartFunc of REAL,REAL; coherence proof set X = dom(f1(#)f2); X c= dom f1 /\ dom f2 by VALUED_1:def 4; then A17: X c= dom f1 & X c= dom f2 by XBOOLE_1:18; A18: f1|X is continuous & f2|X is continuous; now let s1; assume that A19: rng s1 c= X and A20: s1 is convergent and A21: lim s1 in X; A22: f1/*s1 is convergent & f2/*s1 is convergent by A17,A18,A19,A20,A21,Th13; then A23: (f1/*s1)(#)(f2/*s1) is convergent; A24: rng s1 c= dom f1 /\ dom f2 by A19,VALUED_1:def 4; f1.(lim s1) = lim (f1/*s1) & f2.(lim s1) = lim (f2/*s1) by A17,A18,A19 ,A20,A21,Th13; then (f1(#)f2).(lim s1) = lim (f1/*s1) * lim (f2/*s1) by A21, VALUED_1:def 4 .= lim ((f1/*s1)(#)(f2/*s1)) by A22,SEQ_2:15 .= lim ((f1(#)f2)/*s1) by A24,RFUNCT_2:8; hence (f1(#)f2)/*s1 is convergent & (f1(#)f2).(lim s1)=lim((f1(#)f2)/*s1) by A24,A23,RFUNCT_2:8; end; then (f1(#)f2)|X is continuous by Th13; hence thesis; end; end; theorem Th18: for X,f1,f2 st X c= dom f1 /\ dom f2 & f1|X is continuous & f2|X is continuous holds (f1+f2)|X is continuous & (f1-f2)|X is continuous & (f1(#) f2)|X is continuous proof let X,f1,f2 such that A1: X c= dom f1 /\ dom f2; assume A2: f1|X is continuous & f2|X is continuous; A3: X c= dom f1 & X c= dom f2 by A1,XBOOLE_1:18; A4: now let s1; assume that A5: rng s1 c= X and A6: s1 is convergent & lim s1 in X; A7: rng s1 c= dom f1 /\ dom f2 by A1,A5,XBOOLE_1:1; A8: f1/*s1 is convergent & f2/*s1 is convergent by A3,A2,A5,A6,Th13; then A9: (f1/*s1)(#)(f2/*s1) is convergent; f1.(lim s1) = lim (f1/*s1) & f2.(lim s1) = lim (f2/*s1) by A3,A2,A5,A6,Th13 ; then (f1(#)f2).(lim s1) = lim (f1/*s1) * lim (f2/*s1) by VALUED_1:5 .= lim ((f1/*s1) (#) (f2/*s1)) by A8,SEQ_2:15 .= lim ((f1(#)f2)/*s1) by A7,RFUNCT_2:8; hence (f1(#)f2)/*s1 is convergent & (f1(#)f2).(lim s1)=lim((f1(#) f2)/*s1) by A7,A9,RFUNCT_2:8; end; A10: X c= dom (f1+f2) by A1,VALUED_1:def 1; now let s1; assume that A11: rng s1 c= X and A12: s1 is convergent and A13: lim s1 in X; A14: f1/*s1 is convergent & f2/*s1 is convergent by A3,A2,A11,A12,A13,Th13; then A15: (f1/*s1)+(f2/*s1) is convergent; A16: rng s1 c= dom f1 /\ dom f2 by A1,A11,XBOOLE_1:1; f1.(lim s1) = lim (f1/*s1) & f2.(lim s1) = lim (f2/*s1) by A3,A2,A11,A12 ,A13,Th13; then (f1+f2).(lim s1) = lim (f1/*s1) + lim (f2/*s1) by A10,A13, VALUED_1:def 1 .= lim (f1/*s1 + f2/*s1) by A14,SEQ_2:6 .= lim ((f1+f2)/*s1) by A16,RFUNCT_2:8; hence (f1+f2)/*s1 is convergent & (f1+f2).(lim s1)=lim((f1+f2)/*s1) by A16,A15, RFUNCT_2:8; end; hence (f1+f2)|X is continuous by A10,Th13; A17: X c= dom (f1-f2) by A1,VALUED_1:12; now let s1; assume that A18: rng s1 c= X and A19: s1 is convergent and A20: lim s1 in X; A21: f1/*s1 is convergent & f2/*s1 is convergent by A3,A2,A18,A19,A20,Th13; then A22: (f1/*s1)-(f2/*s1) is convergent; A23: rng s1 c= dom f1 /\ dom f2 by A1,A18,XBOOLE_1:1; f1.(lim s1) = lim (f1/*s1) & f2.(lim s1) = lim (f2/*s1) by A3,A2,A18,A19 ,A20,Th13; then (f1-f2).(lim s1) = lim (f1/*s1) - lim (f2/*s1) by A17,A20,VALUED_1:13 .= lim (f1/*s1 - f2/*s1) by A21,SEQ_2:12 .= lim ((f1-f2)/*s1) by A23,RFUNCT_2:8; hence (f1-f2)/*s1 is convergent & (f1-f2).(lim s1)=lim((f1-f2)/*s1) by A23,A22, RFUNCT_2:8; end; hence (f1-f2)|X is continuous by A17,Th13; X c= dom (f1(#)f2) by A1,VALUED_1:def 4; hence thesis by A4,Th13; end; theorem for X,X1,f1,f2 st X c= dom f1 & X1 c= dom f2 & f1|X is continuous & f2 |X1 is continuous holds (f1+f2)|(X /\ X1) is continuous & (f1-f2)|(X /\ X1) is continuous & (f1(#)f2)|(X /\ X1) is continuous proof let X,X1,f1,f2; assume X c= dom f1 & X1 c= dom f2; then A1: X /\ X1 c= dom f1 /\ dom f2 by XBOOLE_1:27; assume f1|X is continuous & f2|X1 is continuous; then f1|(X /\ X1) is continuous & f2|(X /\ X1) is continuous by Th16, XBOOLE_1:17; hence thesis by A1,Th18; end; registration let f be continuous PartFunc of REAL,REAL; let r; cluster r(#)f -> continuous for PartFunc of REAL,REAL; coherence proof set X = dom f; A1: X c= dom(r(#)f) by VALUED_1:def 5; A2: f|X is continuous; A3: now let s1; assume that A4: rng s1 c= X and A5: s1 is convergent and A6: lim s1 in X; A7: f/*s1 is convergent by A2,A4,A5,A6,Th13; then A8: r(#)(f/*s1) is convergent; f.(lim s1) = lim (f/*s1) by A2,A4,A5,A6,Th13; then (r(#)f).(lim s1) = r * lim (f/*s1) by A1,A6,VALUED_1:def 5 .= lim (r(#)(f/*s1)) by A7,SEQ_2:8 .= lim ((r(#)f)/*s1) by A4,RFUNCT_2:9; hence (r(#)f)/*s1 is convergent & (r(#)f).(lim s1)=lim((r(#)f)/*s1) by A4,A8, RFUNCT_2:9; end; dom(r(#)f) = X by VALUED_1:def 5; then (r(#)f)|X = r(#)f by RELAT_1:69; hence thesis by A1,A3,Th13; end; end; theorem Th20: for r,X,f st X c= dom f & f|X is continuous holds (r(#)f)|X is continuous proof let r,X,f such that A1: X c= dom f; assume A2: f|X is continuous; A3: X c= dom(r(#)f) by A1,VALUED_1:def 5; now let s1; assume that A4: rng s1 c= X and A5: s1 is convergent and A6: lim s1 in X; A7: f/*s1 is convergent by A1,A2,A4,A5,A6,Th13; then A8: r(#)(f/*s1) is convergent; f.(lim s1) = lim (f/*s1) by A1,A2,A4,A5,A6,Th13; then (r(#)f).(lim s1) = r * lim (f/*s1) by A3,A6,VALUED_1:def 5 .= lim (r(#)(f/*s1)) by A7,SEQ_2:8 .= lim ((r(#)f)/*s1) by A1,A4,RFUNCT_2:9,XBOOLE_1:1; hence (r(#)f)/*s1 is convergent & (r(#)f).(lim s1)=lim((r(#)f)/*s1) by A1 ,A4,A8,RFUNCT_2:9,XBOOLE_1:1; end; hence thesis by A3,Th13; end; theorem X c= dom f & f|X is continuous implies (abs f)|X is continuous & (-f)| X is continuous proof assume A1: X c= dom f; assume A2: f|X is continuous; thus (abs f)|X is continuous proof let r; assume A3: r in dom((abs f)|X); then r in dom abs f by RELAT_1:57; then A4: r in dom f by VALUED_1:def 11; r in X by A3; then A5: r in dom(f|X) by A4,RELAT_1:57; then A6: f|X is_continuous_in r by A2,Def2; thus (abs(f))|X is_continuous_in r proof let s1; assume that A7: rng s1 c= dom ((abs(f))|X) and A8: s1 is convergent & lim s1 = r; rng s1 c= dom (abs(f)) /\ X by A7,RELAT_1:61; then rng s1 c= dom f /\ X by VALUED_1:def 11; then A9: rng s1 c= dom (f|X) by RELAT_1:61; now let n; A10: s1.n in rng s1 by VALUED_0:28; then s1.n in dom (f|X) by A9; then s1.n in dom f /\ X by RELAT_1:61; then A11: s1.n in X by XBOOLE_0:def 4; thus (abs((f|X)/*s1)).n = abs( ((f|X)/*s1).n ) by SEQ_1:12 .=abs((f|X).(s1.n)) by A9,FUNCT_2:108 .=abs(f.(s1.n)) by A9,A10,FUNCT_1:47 .=(abs(f)).(s1.n) by VALUED_1:18 .=((abs(f))|X).(s1.n) by A11,FUNCT_1:49 .=(((abs(f))|X)/*s1).n by A7,FUNCT_2:108; end; then A12: abs((f|X)/*s1) = ((abs(f))|X)/*s1 by FUNCT_2:63; A13: abs((f|X).r) = abs(f.r) by A5,FUNCT_1:47 .= (abs(f)).r by VALUED_1:18 .= ((abs(f))|X).r by A3,FUNCT_1:47; A14: (f|X)/*s1 is convergent by A6,A8,A9,Def1; hence ((abs(f))|X)/*s1 is convergent by A12,SEQ_4:13; (f|X).r = lim ((f|X)/*s1) by A6,A8,A9,Def1; hence thesis by A14,A12,A13,SEQ_4:14; end; end; thus thesis by A1,A2,Th20; end; theorem Th22: f|X is continuous & f"{0} = {} implies f^|X is continuous proof assume that A1: f|X is continuous and A2: f"{0} = {}; A3: dom(f^) = dom f \ {} by A2,RFUNCT_1:def 2 .= dom f; let r; assume A4: r in dom(f^|X); then A5: r in dom(f^) by RELAT_1:57; r in X by A4; then A6: r in dom(f|X) by A3,A5,RELAT_1:57; then A7: f|X is_continuous_in r by A1,Def2; now A8: now assume f.r = 0; then f.r in {0} by TARSKI:def 1; hence contradiction by A2,A3,A5,FUNCT_1:def 7; end; let s1; assume that A9: rng s1 c= dom((f^)|X) and A10: s1 is convergent & lim s1= r; rng s1 c= dom(f^) /\ X by A9,RELAT_1:61; then A11: rng s1 c= dom(f|X) by A3,RELAT_1:61; then A12: (f|X)/*s1 is convergent by A7,A10,Def1; now let n; A13: s1.n in rng s1 by VALUED_0:28; rng s1 c= dom f /\ X & dom f /\ X c= dom f by A3,A9,RELAT_1:61 ,XBOOLE_1:17; then A14: rng s1 c= dom f by XBOOLE_1:1; A15: now assume f.(s1.n)=0; then f.(s1.n) in {0} by TARSKI:def 1; hence contradiction by A2,A14,A13,FUNCT_1:def 7; end; ((f|X)/*s1).n = (f|X).(s1.n) by A11,FUNCT_2:108 .= f.(s1.n) by A11,A13,FUNCT_1:47; hence ((f|X)/*s1).n <>0 by A15; end; then A16: (f|X)/*s1 is non-zero by SEQ_1:5; now let n; A17: s1.n in rng s1 by VALUED_0:28; then s1.n in dom((f^)|X) by A9; then s1.n in dom (f^) /\ X by RELAT_1:61; then A18: s1.n in dom (f^) by XBOOLE_0:def 4; thus (((f^)|X)/*s1).n = ((f^)|X).(s1.n) by A9,FUNCT_2:108 .= (f^).(s1.n) by A9,A17,FUNCT_1:47 .= (f.(s1.n))" by A18,RFUNCT_1:def 2 .= ((f|X).(s1.n))" by A11,A17,FUNCT_1:47 .= (((f|X)/*s1).n)" by A11,FUNCT_2:108 .= (((f|X)/*s1)").n by VALUED_1:10; end; then A19: ((f^)|X)/*s1 = ((f|X)/*s1)" by FUNCT_2:63; A20: (f|X).r = f.r by A6,FUNCT_1:47; then lim ((f|X)/*s1) <> 0 by A7,A10,A11,A8,Def1; hence ((f^)|X)/*s1 is convergent by A12,A16,A19,SEQ_2:21; (f|X).r = lim ((f|X)/*s1) by A7,A10,A11,Def1; hence lim (((f^)|X)/*s1) = ((f|X).r)" by A12,A20,A8,A16,A19,SEQ_2:22 .= (f.r)" by A6,FUNCT_1:47 .= (f^).r by A5,RFUNCT_1:def 2 .= ((f^)|X).r by A4,FUNCT_1:47; end; hence thesis by Def1; end; theorem f|X is continuous & (f|X)"{0} = {} implies f^|X is continuous proof assume that A1: f|X is continuous and A2: (f|X)"{0} = {}; f|X|X is continuous by A1; then (f|X)^|X is continuous by A2,Th22; then (f^)|X|X is continuous by RFUNCT_1:46; hence thesis; end; theorem X c= dom f1 /\ dom f2 & f1|X is continuous & f1"{0} = {} & f2|X is continuous implies (f2/f1)|X is continuous proof assume A1: X c= dom f1 /\ dom f2; assume that A2: f1|X is continuous and A3: f1"{0} = {} and A4: f2|X is continuous; A5: dom(f1^) = dom f1 \ {} by A3,RFUNCT_1:def 2 .= dom f1; (f1^)|X is continuous by A2,A3,Th22; then (f2(#)(f1^))|X is continuous by A1,A4,A5,Th18; hence thesis by RFUNCT_1:31; end; registration let f1,f2 be continuous PartFunc of REAL,REAL; cluster f2*f1 -> continuous for PartFunc of REAL,REAL; coherence proof now let x0; assume A1: x0 in dom(f2*f1); then f1.x0 in dom f2 by FUNCT_1:11; then A2: f2 is_continuous_in f1.x0 by Def2; x0 in dom f1 by A1,FUNCT_1:11; then f1 is_continuous_in x0 by Def2; hence f2*f1 is_continuous_in x0 by A1,A2,Th12; end; hence thesis by Def2; end; end; theorem f1|X is continuous & f2|(f1.:X) is continuous implies (f2*f1)|X is continuous proof (f2*f1)|X = (f2|(f1.:X))*(f1|X) by FUNCT_1:99; hence thesis; end; theorem f1|X is continuous & f2|X1 is continuous implies (f2*f1)|(X /\ (f1"X1) ) is continuous proof (f2|X1)*(f1|X) = (f2*f1)|(X /\ (f1"X1)) by FUNCT_1:100; hence thesis; end; theorem f is total & (for x1,x2 holds f.(x1+x2) = f.x1 + f.x2) & (ex x0 st f is_continuous_in x0) implies f|REAL is continuous proof assume that A1: f is total and A2: for x1,x2 holds f.(x1+x2) = f.x1 + f.x2; A3: dom f = REAL by A1,PARTFUN1:def 2; given x0 such that A4: f is_continuous_in x0; A5: f.x0 + (0 qua Nat) = f.(x0+(0 qua Nat)) .= f.x0+f.0 by A2; A6: now let x1; 0 = f.(x1+-x1) by A5 .= f.x1+f.(-x1) by A2; hence -(f.x1)=f.(-x1); end; A7: now let x1,x2; thus f.(x1-x2)=f.(x1+-x2) .= f.x1 + f.(-x2) by A2 .= f.x1 +- f.x2 by A6 .= f.x1 - f.x2; end; now let x1,r; assume that x1 in REAL and A8: r>0; set y=x1-x0; consider s such that A9: 00 by A9; let x2 such that x2 in REAL and A11: abs(x2-x1){} & (dom f) is compact & f|dom f is continuous ex x1,x2 st x1 in dom f & x2 in dom f & f.x1 = upper_bound (rng f) & f.x2 = lower_bound (rng f) proof let f; assume dom f <> {} & dom f is compact & f|dom f is continuous; then A1: rng f <> {} & rng f is compact by Th28,RELAT_1:42; then consider x being Element of REAL such that A2: x in dom f & upper_bound (rng f) = f.x by PARTFUN1:3,RCOMP_1:14; take x; consider y being Element of REAL such that A3: y in dom f & lower_bound (rng f) = f.y by A1,PARTFUN1:3,RCOMP_1:14; take y; thus thesis by A2,A3; end; theorem for f,Y st Y<>{} & Y c= dom f & Y is compact & f|Y is continuous ex x1 ,x2 st x1 in Y & x2 in Y & f.x1 = upper_bound (f.:Y) & f.x2 = lower_bound (f.:Y ) proof let f,Y such that A1: Y <> {} and A2: Y c= dom f and A3: Y is compact and A4: f|Y is continuous; A5: dom (f|Y) = dom f /\ Y by RELAT_1:61 .= Y by A2,XBOOLE_1:28; f|Y|Y is continuous by A4; then consider x1,x2 such that A6: x1 in dom (f|Y) & x2 in dom (f|Y) and A7: (f|Y).x1 = upper_bound (rng (f|Y)) & (f|Y).x2 = lower_bound (rng (f| Y)) by A1,A3,A5,Th30; take x1,x2; thus x1 in Y & x2 in Y by A6; f.x1=upper_bound(rng (f|Y)) & f.x2=lower_bound(rng (f|Y)) by A6,A7,FUNCT_1:47 ; hence thesis by RELAT_1:115; end; definition let f; attr f is Lipschitzian means :Def3: ex r st 0 Lipschitzian for PartFunc of REAL,REAL; coherence proof let f be PartFunc of REAL,REAL; assume A1: f is empty; take 1; thus thesis by A1; end; end; registration cluster empty for PartFunc of REAL,REAL; existence proof take the empty PartFunc of REAL,REAL; thus thesis; end; end; registration let f be Lipschitzian PartFunc of REAL,REAL, X be set; cluster f|X -> Lipschitzian for PartFunc of REAL,REAL; coherence proof consider r such that A1: 0 Lipschitzian for PartFunc of REAL,REAL; coherence proof set X = dom f1, X1 = dom f2; consider s such that A1: 0 Lipschitzian for PartFunc of REAL,REAL; coherence proof set X = dom f1, X1 = dom f2; consider s such that A9: 0 Lipschitzian for PartFunc of REAL,REAL; coherence proof set X = dom f1, X1 = dom f2; consider x1 such that A1: for r be set st r in dom f1 holds abs(f1.r)<=x1 by RFUNCT_1:72; consider x2 such that A2: for r be set st r in dom f2 holds abs(f2.r)<=x2 by RFUNCT_1:72; consider g such that A3: 0 Lipschitzian for PartFunc of REAL, REAL; coherence proof consider s such that A1: 00; then 0 Lipschitzian for PartFunc of REAL, REAL; coherence proof consider s such that A1: 0 Lipschitzian for PartFunc of REAL, REAL; coherence proof let f be PartFunc of REAL, REAL such that A1: f is constant; now let x1,x2; assume x1 in dom f & x2 in dom f; then f.x1 = f.x2 by A1,FUNCT_1:def 10; then abs(f.x1-f.x2) = 0 by ABSVALUE:2; hence abs(f.x1-f.x2) <= 1*abs(x1-x2) by COMPLEX1:46; end; hence thesis by Def3; end; end; registration let Y; cluster id Y -> Lipschitzian for PartFunc of REAL,REAL; coherence proof reconsider r=1 as Real; id Y is Lipschitzian proof take r; thus r>0; let x1,x2; assume that A1: x1 in dom id Y and A2: x2 in dom id Y; A3: x2 in Y by A2; x1 in Y by A1; then abs((id Y).x1-(id Y).x2) = abs(x1-(id Y).x2) by FUNCT_1:18 .= r*abs(x1-x2) by A3,FUNCT_1:18; hence thesis; end; hence thesis; end; end; registration cluster Lipschitzian -> continuous for PartFunc of REAL, REAL; coherence proof let f be PartFunc of REAL, REAL; set X = dom f; assume f is Lipschitzian; then consider r such that A1: 00 and A16: N3 = ].(f|X).x0-r,(f|X).x0+r.[ by RCOMP_1:def 6; reconsider r as Real by XREAL_0:def 1; A17: (f|X).x0+r/2 < (f|X).x0+r/2+r/2 by A15,XREAL_1:29,215; set M2 = (f|X).x0+r/2; A18: (f|X).x0 < (f|X).x0+r/2 by A15,XREAL_1:29,215; A19: (f|X).x0 < (f|X).x0+r by A15,XREAL_1:29; then (f|X).x0-r < (f|X).x0+r-r by XREAL_1:9; then (f|X).x0-r < (f|X).x0+r/2 by A18,XXREAL_0:2; then (f|X).x0+r/2 in {s where s is Real: (f|X).x0-r(f|X).x0 by A15,XREAL_1:29,215; A33: now assume A34: x2x2 by A15,A22,XREAL_1:29,215; then x00 by XREAL_1:50; set R = min(x0-x1,x2-x0); A36: R<=x2-x0 by XXREAL_0:17; x1<>x0 by A27,A28,XREAL_1:19; then x10 by XREAL_1:50; then R>0 by A35,XXREAL_0:15; then reconsider N=].x0-R,x0+R.[ as Neighbourhood of x0 by RCOMP_1:def 6; take N; let x be Real; assume that A37: x in dom(f|X) and A38: x in N; A39: x in X /\ dom(f|X) by A37,XBOOLE_1:28; x in {s where s is Real:x0-R-(x0-x1) by XREAL_1:24; then A42: x-x0+x0>x1-x0+x0 by XREAL_1:6; x1 in X /\ dom(f|X) by A26,XBOOLE_0:def 4; then A43: (f|X).x1 <= (f|X).x by A5,A42,A39,RFUNCT_2:22; x-x00 and A48: N1 = ].p-r,p+r.[ by RCOMP_1:def 6; reconsider r as Real by XREAL_0:def 1; set R=min(r,g-p)/2; g-p>0 by A4,XREAL_1:50; then A49: min(r,g-p)>0 by A47,XXREAL_0:15; then A50: R0 and A70: N1 = ].g-r,g+r.[ by A67,RCOMP_1:def 6; reconsider r as Real by XREAL_0:def 1; set R=min(r,g-p)/2; g-p>0 by A4,XREAL_1:50; then A71: min(r,g-p)>0 by A69,XXREAL_0:15; then A72: Rp by XREAL_1:20; then g-R in {s where s is Real: px0 by A67,A71,A75,XREAL_1:44,215; then x10 and A101: N3 = ].(f|X).x0-r,(f|X).x0+r.[ by RCOMP_1:def 6; reconsider r as Real by XREAL_0:def 1; A102: (f|X).x0+r/2 < (f|X).x0+r/2+r/2 by A100,XREAL_1:29,215; set M2 = (f|X).x0+r/2; A103: (f|X).x0 < (f|X).x0+r/2 by A100,XREAL_1:29,215; A104: (f|X).x0 < (f|X).x0+r by A100,XREAL_1:29; then (f|X).x0-r < (f|X).x0+r-r by XREAL_1:9; then (f|X).x0-r < (f|X).x0+r/2 by A103,XXREAL_0:2; then (f|X).x0+r/2 in {s where s is Real: (f|X).x0-rx1; x0 in X /\ dom(f|X) & x1 in X /\ dom(f|X) by A93,A111, XBOOLE_0:def 4; hence contradiction by A90,A112,A114,A116,RFUNCT_2:23; end; A117: M2>(f|X).x0 by A100,XREAL_1:29,215; A118: now assume A119: x2>x0; x0 in X /\ dom(f|X) & x2 in X /\ dom(f|X) by A93,A106, XBOOLE_0:def 4; hence contradiction by A90,A107,A117,A119,RFUNCT_2:23; end; x0<>x2 by A100,A107,XREAL_1:29,215; then x0>x2 by A118,XXREAL_0:1; then A120: x0-x2>0 by XREAL_1:50; set R = min(x1-x0,x0-x2); A121: R<=x1-x0 by XXREAL_0:17; x1<>x0 by A112,A113,XREAL_1:19; then x1>x0 by A115,XXREAL_0:1; then x1-x0>0 by XREAL_1:50; then R>0 by A120,XXREAL_0:15; then reconsider N=].x0-R,x0+R.[ as Neighbourhood of x0 by RCOMP_1:def 6; take N; let x be Real; assume that A122: x in dom(f|X) and A123: x in N; A124: x in X /\ dom(f|X) by A122,XBOOLE_1:28; x in {s where s is Real:x0-R-(x0-x2) by XREAL_1:24; then A129: x-x0+x0>x2-x0+x0 by XREAL_1:6; x2 in X /\ dom(f|X) by A106,XBOOLE_0:def 4; then (f|X).x <= (f|X).x2 by A90,A129,A124,RFUNCT_2:23; then (f|X).x in {s where s is Real: M1<=s & s<=M2} by A112 ,A107,A128; then A130: (f|X).x in [.M1,M2.] by RCOMP_1:def 1; [.M1,M2.] c= ].(f|X).x0-r,(f|X).x0+r.[ by A110,A105, XXREAL_2:def 12; then (f|X).x in N3 by A101,A130; hence (f|X).x in N1 by A98; end; suppose A131: (f|X).x0 = p; then consider r such that A132: r>0 and A133: N1 = ].p-r,p+r.[ by RCOMP_1:def 6; reconsider r as Real by XREAL_0:def 1; set R=min(r,g-p)/2; g-p>0 by A4,XREAL_1:50; then A134: min(r,g-p)>0 by A132,XXREAL_0:15; then A135: Rx0; x0 in X /\ dom(f|X) & x1 in X /\ dom(f|X) by A93,A143, XBOOLE_0:def 4; hence contradiction by A90,A131,A142,A144,A146,RFUNCT_2:23; end; then x0>x1 by A131,A142,A144,XXREAL_0:1; then reconsider N=].x0-(x0-x1),x0+(x0-x1).[ as Neighbourhood of x0 by RCOMP_1:def 6,XREAL_1:50; take N; let x be Real such that A147: x in dom(f|X) and A148: x in N; x in {s where s is Real: x0-(x0-x1)0 and A155: N1 = ].g-r,g+r.[ by A152,RCOMP_1:def 6; reconsider r as Real by XREAL_0:def 1; set R=min(r,g-p)/2; g-p>0 by A4,XREAL_1:50; then A156: min(r,g-p)>0 by A154,XXREAL_0:15; then A157: Rp by XREAL_1:20; then g-R in {s where s is Real: px1; x0 in X /\ dom(f|X) & x1 in X /\ dom(f|X) by A93,A159, XBOOLE_0:def 4; hence contradiction by A90,A152,A158,A160,A162,RFUNCT_2:23; end; min(r,g-p) <= r by XXREAL_0:17; then A163: Rx0 by A152,A156,A160,XREAL_1:44,215; then x1>x0 by A161,XXREAL_0:1; then reconsider N=].x0-(x1-x0),x0+(x1-x0).[ as Neighbourhood of x0 by RCOMP_1:def 6,XREAL_1:50; take N; let x be Real such that A169: x in dom(f|X) and A170: x in N; x in {s where s is Real: x0-(x1-x0) Function of REAL, REAL means :Def4: for x being real number holds it.x = a*x + b; existence proof reconsider a9 = a, b9 = b as Element of REAL by XREAL_0:def 1; deffunc F(Real)=a9*$1+b9; consider f being Function of REAL, REAL such that A1: for x being Element of REAL holds f.x =F(x) from FUNCT_2:sch 4; take f; let x be real number; reconsider x9 = x as Element of REAL by XREAL_0:def 1; f.x9 = a9*x+b9 by A1; hence thesis; end; uniqueness proof let f,f9 be Function of REAL, REAL such that A2: for x being real number holds f.x = a*x + b and A3: for x being real number holds f9.x = a*x + b; now let x be Element of REAL; thus f.x = a*x + b by A2 .= f9.x by A3; end; hence f = f9 by FUNCT_2:63; end; end; registration let a,b be real number; cluster AffineMap(a,b) -> continuous; coherence proof set f = AffineMap(a,b); for x0 being real number st x0 in REAL holds f.x0 = a*x0+b by Def4; then REAL = dom f & AffineMap(a,b)|REAL is continuous by Th41,FUNCT_2:def 1 ; hence thesis; end; end; registration cluster continuous for Function of REAL, REAL; existence proof take AffineMap(1,1); thus thesis; end; end; theorem Th48: for a,b being real number holds AffineMap(a,b).0 = b proof let a,b be real number; thus AffineMap(a,b).0 = a*0 + b by Def4 .= b; end; theorem Th49: for a,b being real number holds AffineMap(a,b).1 = a+b proof let a,b be real number; thus AffineMap(a,b).1 = a*1 + b by Def4 .= a + b; end; theorem Th50: for a,b being real number st a<> 0 holds AffineMap(a,b) is one-to-one proof let a,b be real number such that A1: a<> 0; let x1,x2 be set; set f = AffineMap(a,b); assume x1 in dom f; then reconsider r1 = x1 as real number; assume x2 in dom f; then reconsider r2 = x2 as real number; assume f.x1 = f.x2; then a*r1+b = f.x2 by Def4 .= a*r2 +b by Def4; hence thesis by A1,XCMPLX_1:5; end; theorem for a,b,x,y being real number st a > 0 & x < y holds AffineMap(a,b).x < AffineMap(a,b).y proof let a,b,x,y be real number; assume a > 0 & x < y; then A1: a*x < a*y by XREAL_1:68; AffineMap(a,b).x = a*x + b & AffineMap(a,b).y = a*y + b by Def4; hence thesis by A1,XREAL_1:8; end; theorem for a,b,x,y being real number st a < 0 & x < y holds AffineMap(a,b).x > AffineMap(a,b).y proof let a,b,x,y be real number; assume a < 0 & x < y; then A1: a*x > a*y by XREAL_1:69; AffineMap(a,b).x = a*x + b & AffineMap(a,b).y = a*y + b by Def4; hence thesis by A1,XREAL_1:8; end; theorem Th53: for a,b,x,y being real number st a >= 0 & x <= y holds AffineMap (a,b).x <= AffineMap(a,b).y proof let a,b,x,y be real number; assume a >= 0 & x <= y; then A1: a*x <= a*y by XREAL_1:64; AffineMap(a,b).x = a*x + b & AffineMap(a,b).y = a*y + b by Def4; hence thesis by A1,XREAL_1:7; end; theorem for a,b,x,y being real number st a <= 0 & x <= y holds AffineMap(a,b). x >= AffineMap(a,b).y proof let a,b,x,y be real number; assume a <= 0 & x <= y; then A1: a*x >= a*y by XREAL_1:65; AffineMap(a,b).x = a*x + b & AffineMap(a,b).y = a*y + b by Def4; hence thesis by A1,XREAL_1:7; end; theorem Th55: for a,b being real number st a <> 0 holds rng AffineMap(a,b) = REAL proof let a,b be real number such that A1: a <> 0; thus rng AffineMap(a,b) c= REAL; let e be set; assume e in REAL; then reconsider r = e as Element of REAL; set s = (r - b)/a; AffineMap(a,b).s = a*s + b by Def4 .= r - b + b by A1,XCMPLX_1:87 .= r; hence thesis by FUNCT_2:4; end; theorem for a,b being real number st a <> 0 holds (AffineMap(a,b) qua Function)" = AffineMap(a",-b/a) proof let a,b be real number such that A1: a <> 0; for x being Element of REAL holds (AffineMap(a",-b/a)*AffineMap(a,b)).x = (id REAL).x proof let x being Element of REAL; thus (AffineMap(a",-b/a)*AffineMap(a,b)).x = AffineMap(a",-b/a).(AffineMap (a,b).x) by FUNCT_2:15 .= AffineMap(a",-b/a).(a*x+b) by Def4 .= a"*(a*x+b)+-b/a by Def4 .= a"*a*x+a"*b +-b/a .= 1 *x+a"*b +-b/a by A1,XCMPLX_0:def 7 .= x+a"*b -b/a .= x+ b/a -b/a by XCMPLX_0:def 9 .= (id REAL).x by FUNCT_1:18; end; then A2: AffineMap(a",-b/a)*AffineMap(a,b) = id REAL by FUNCT_2:63; rng AffineMap(a,b) = REAL by A1,Th55; hence thesis by A1,A2,Th50,FUNCT_2:30; end; theorem for a,b being real number st a > 0 holds AffineMap(a,b).:[.0,1.] = [.b,a+b.] proof let a,b be real number such that A1: a > 0; thus AffineMap(a,b).:[.0,1.] c= [.b,a+b.] proof A2: AffineMap(a,b).1 = a+b by Th49; let u be set; assume u in AffineMap(a,b).:[.0,1.]; then consider r being Element of REAL such that A3: r in [.0,1.] and A4: u = AffineMap(a,b).r by FUNCT_2:65; reconsider s = u as real number by A4; r <= 1 by A3,XXREAL_1:1; then A5: s <= a+b by A1,A4,A2,Th53; A6: AffineMap(a,b).0 = b by Th48; 0 <= r by A3,XXREAL_1:1; then b <= s by A1,A4,A6,Th53; hence thesis by A5,XXREAL_1:1; end; let u be set; assume A7: u in [.b,a+b.]; then reconsider r = u as Element of REAL; set s = (r - b)/a; A8: AffineMap(a,b).s = a*s + b by Def4 .= r - b + b by A1,XCMPLX_1:87 .= r; r <= a+b by A7,XXREAL_1:1; then r-b <= a by XREAL_1:20; then s <= a/a by A1,XREAL_1:72; then A9: s <= 1 by A1,XCMPLX_1:60; b <= r by A7,XXREAL_1:1; then 0 <= r - b by XREAL_1:48; then s in [.0,1.] by A1,A9,XXREAL_1:1; hence thesis by A8,FUNCT_2:35; end; begin reserve n,m for Element of NAT; reserve x, X,X1,Z,Z1 for set; reserve s,g,r,t,p,x0,x1,x2 for Real; reserve s1,s2,q1 for Real_Sequence; reserve Y for Subset of REAL; reserve f,f1,f2 for PartFunc of REAL,REAL; definition let f; attr f is uniformly_continuous means :Def1: for r st 00; then A10: 0 abs(p) by A9,COMPLEX1:47; now let r; assume 0 {} & Y c= dom f & Y is compact & f|Y is uniformly_continuous ex x1,x2 st x1 in Y & x2 in Y & f.x1 = upper_bound (f.:Y) & f.x2 = lower_bound (f.:Y) proof let f,Y; assume that A1: Y <> {} and A2: Y c= dom f and A3: Y is compact and A4: f|Y is uniformly_continuous; ex x1,x2 be real number st x1 in Y & x2 in Y & f.x1 = upper_bound (f.:Y) & f.x2 = lower_bound (f.:Y) by A1,A2,A3,A4,Th9,FCONT_1:31; hence thesis; end; theorem X c= dom f & f|X is constant implies f|X is uniformly_continuous by Th10; theorem Th15: p<= g & [.p,g.] c= dom f & f|[.p,g.] is continuous implies for r st r in [.f.p,f.g.] \/ [.f.g,f.p.] ex s st s in [.p,g.] & r = f.s proof assume that A1: p<=g and A2: [.p,g.] c= dom f and A3: f|[.p,g.] is continuous; let r such that A4: r in [.f.p,f.g.] \/ [.f.g,f.p.]; A5: [.p,g.] is compact by RCOMP_1:6; A6: f.p < f.g implies ex s st s in [.p,g.] & r = f.s proof reconsider f1 = [.p,g.] --> r as Function of [.p,g.], REAL by FUNCOP_1:45; assume that A7: f.p < f.g and A8: for s st s in [.p,g.] holds r <> f.s; [.f.p,f.g.] \/ [.f.g,f.p.] = [.f.p,f.g.] \/ {} by A7,XXREAL_1:29 .= [.f.p,f.g.]; then r in {s: f.p<=s & s<= f.g} by A4,RCOMP_1:def 1; then A9: ex s st s=r & f.p<=s & s<=f.g; p in {s: p<=s & s<=g} by A1; then p in [.p,g.] by RCOMP_1:def 1; then A10: r<> f.p by A8; reconsider f1 as PartFunc of REAL, REAL; A11: dom f1 = [.p,g.] by FUNCOP_1:13; then A12: [.p,g.] c= dom f1 /\ dom f by A2,XBOOLE_1:19; then A13: [.p,g.] c= dom(f1-f) by VALUED_1:12; A14: abs(f1-f)"{0} = {} proof assume abs(f1-f)"{0} <> {}; then consider x2 such that A15: x2 in abs(f1-f)"{0} by SUBSET_1:4; x2 in dom (abs(f1-f)) by A15,FUNCT_1:def 7; then A16: x2 in dom (f1-f) by VALUED_1:def 11; then x2 in dom f1 /\ dom f by VALUED_1:12; then A17: x2 in [.p,g.] by A11,XBOOLE_0:def 4; (abs(f1-f)).x2 in {0} by A15,FUNCT_1:def 7; then (abs(f1-f)).x2 = 0 by TARSKI:def 1; then abs((f1-f).x2) = 0 by VALUED_1:18; then (f1-f).x2 = 0 by ABSVALUE:2; then f1.x2 -f.x2 = 0 by A16,VALUED_1:13; then r - f.x2 = 0 by A17,FUNCOP_1:7; hence contradiction by A8,A17; end; A18: dom (abs(f1-f)^) = dom (abs(f1-f)) \ abs(f1-f)"{0} by RFUNCT_1:def 2 .= dom (f1-f) by A14,VALUED_1:def 11 .= [.p,g.] /\ dom f by A11,VALUED_1:12 .= [.p,g.] by A2,XBOOLE_1:28; for x0 st x0 in [.p,g.] /\ dom f1 holds f1.x0=r by A11,FUNCOP_1:7; then f1|[.p,g.] is constant by PARTFUN2:57; then (f1-f)|[.p,g.] is continuous by A3,A12,FCONT_1:18; then abs(f1-f)|[.p,g.] is continuous by A13,FCONT_1:21; then abs(f1-f)^|[.p,g.] is continuous by A14,FCONT_1:22; then (abs(f1-f)^).:[.p,g.] is real-bounded by A5,A18,FCONT_1:29,RCOMP_1:10; then consider M being real number such that A19: M is UpperBound of (abs(f1-f)^).:[.p,g.] by XXREAL_2:def 10; A20: for x1 be real number st x1 in (abs(f1-f)^).:[.p,g.] holds x1<=M by A19,XXREAL_2:def 1; 0+00 by A8,A25; then A28: 0g; then p < g by A1,XXREAL_0:1; then A29: 0 < g-p by XREAL_1:50; then A30: 0 < (g-p)/s by A22,XREAL_1:139; consider k be Element of NAT such that A31: (g-p)/s < k by SEQ_4:3; (g-p)/s *s < s*k by A22,A31,XREAL_1:68; then (g-p) < s*k by A22,XCMPLX_1:87; then (g-p)/k < s*k/k by A31,A30,XREAL_1:74; then (g-p)/k < s*k*k" by XCMPLX_0:def 9; then (g-p)/k < s*(k*k"); then A32: (g-p)/k < s*1 by A31,A30,XCMPLX_0:def 7; deffunc F(Element of NAT) = p + (g-p)/k*$1; consider s1 such that A33: for n holds s1.n = F(n) from SEQ_1:sch 1; A34: 0<(g-p)/k by A29,A31,A30,XREAL_1:139; A35: now let n; A36: dom(f|[.p,g.]) = [.p,g.] by A2,RELAT_1:62; assume A37: n0 by A9,A10,A44,XXREAL_0:1; then consider l1 be Nat such that A45: l=l1+1 by NAT_1:6; reconsider l1 as Element of NAT by ORDINAL1:def 12; A46: r - f.(s1.l1) <= f.(s1.(l1+1)) - f.(s1.l1) by A44,A45,XREAL_1:9; l1+1 <= k by A9,A42,A44,A45; then A47: l1 r as Function of [.p,g.], REAL by FUNCOP_1:45; assume that A52: f.g < f.p and A53: for s st s in [.p,g.] holds r <> f.s; [.f.p,f.g.] \/ [.f.g,f.p.] = {} \/ [.f.g,f.p.] by A52,XXREAL_1:29 .= [.f.g,f.p.]; then r in {s: f.g<=s & s<=f.p} by A4,RCOMP_1:def 1; then A54: ex s st s=r & f.g<=s & s<=f.p; g in {s: p<=s & s<=g} by A1; then g in [.p,g.] by RCOMP_1:def 1; then A55: r<> f.g by A53; reconsider f1 as PartFunc of REAL, REAL; A56: dom f1 = [.p,g.] by FUNCOP_1:13; then A57: [.p,g.] c= dom f1 /\ dom f by A2,XBOOLE_1:19; then A58: [.p,g.] c= dom(f1-f) by VALUED_1:12; A59: abs(f1-f)"{0} = {} proof assume abs(f1-f)"{0} <> {}; then consider x2 such that A60: x2 in abs(f1-f)"{0} by SUBSET_1:4; x2 in dom (abs(f1-f)) by A60,FUNCT_1:def 7; then A61: x2 in dom (f1-f) by VALUED_1:def 11; then x2 in dom f1 /\ dom f by VALUED_1:12; then A62: x2 in [.p,g.] by A56,XBOOLE_0:def 4; (abs(f1-f)).x2 in {0} by A60,FUNCT_1:def 7; then (abs(f1-f)).x2 = 0 by TARSKI:def 1; then abs((f1-f).x2) = 0 by VALUED_1:18; then (f1-f).x2 = 0 by ABSVALUE:2; then f1.x2 -f.x2 = 0 by A61,VALUED_1:13; then r - f.x2 = 0 by A62,FUNCOP_1:7; hence contradiction by A53,A62; end; A63: dom (abs(f1-f)^) = dom (abs(f1-f)) \ abs(f1-f)"{0} by RFUNCT_1:def 2 .= dom (f1-f) by A59,VALUED_1:def 11 .= [.p,g.] /\ dom f by A56,VALUED_1:12 .= [.p,g.] by A2,XBOOLE_1:28; for x0 st x0 in [.p,g.] /\ dom f1 holds f1.x0=r by A56,FUNCOP_1:7; then f1|[.p,g.] is constant by PARTFUN2:57; then (f1-f)|[.p,g.] is continuous by A3,A57,FCONT_1:18; then abs(f1-f)|[.p,g.] is continuous by A58,FCONT_1:21; then abs(f1-f)^|[.p,g.] is continuous by A59,FCONT_1:22; then (abs(f1-f)^).:[.p,g.] is real-bounded by A5,A63,FCONT_1:29,RCOMP_1:10; then consider M being real number such that A64: M is UpperBound of (abs(f1-f)^).:[.p,g.] by XXREAL_2:def 10; A65: for x1 be real number st x1 in (abs(f1-f)^).:[.p,g.] holds x1<=M by A64,XXREAL_2:def 1; 0+00 by A53,A70; then A73: 0g; then p < g by A1,XXREAL_0:1; then A74: 0 < g-p by XREAL_1:50; then A75: 0 < (g-p)/s by A67,XREAL_1:139; consider k be Element of NAT such that A76: (g-p)/s < k by SEQ_4:3; (g-p)/s *s < s*k by A67,A76,XREAL_1:68; then (g-p) < s*k by A67,XCMPLX_1:87; then (g-p)/k < s*k/k by A76,A75,XREAL_1:74; then (g-p)/k < s*k*k" by XCMPLX_0:def 9; then (g-p)/k < s*(k*k"); then A77: (g-p)/k < s*1 by A76,A75,XCMPLX_0:def 7; deffunc F(Element of NAT) = g - (g-p)/k*$1; consider s1 such that A78: for n holds s1.n = F(n) from SEQ_1:sch 1; A79: 0<(g-p)/k by A74,A76,A75,XREAL_1:139; A80: now let n; A81: dom(f|[.p,g.]) = [.p,g.] by A2,RELAT_1:62; assume A82: n0 by A54,A55,A89,XXREAL_0:1; then consider l1 be Nat such that A90: l=l1+1 by NAT_1:6; reconsider l1 as Element of NAT by ORDINAL1:def 12; A91: r - f.(s1.l1) <= f.(s1.(l1+1)) - f.(s1.l1) by A89,A90,XREAL_1:9; l1+1 <= k by A54,A87,A89,A90; then A92: l1 {} by A1,XXREAL_1:1; then consider x2,x1 be real number such that A5: x2 in [.p,g.] and A6: x1 in [.p,g.] and A7: f.x2=ub and A8: f.x1=lb by A2,A3,FCONT_1:31,RCOMP_1:6; reconsider x1,x2 as Real by XREAL_0:def 1; let r such that A9: r in [.lb,ub.]; f.x1 in f.:[.p,g.] by A2,A6,FUNCT_1:def 6; then A10: [.lb,ub.] = [.lb,ub.] \/ [.ub,lb.] by A4,SEQ_4:11,XXREAL_1:222; now per cases; suppose A11: x1 <= x2; A12: [.x1,x2.] c= [.p,g.] by A5,A6,XXREAL_2:def 12; A13: [.x1,x2.] c= [.p,g.] by A5,A6,XXREAL_2:def 12; then f|[.x1,x2.] is continuous by A3,FCONT_1:16; then consider s such that A14: s in [.x1,x2.] and A15: r=f.s by A2,A9,A7,A8,A10,A11,A12,Th15,XBOOLE_1:1; take s; thus s in [.p,g.] & r=f.s by A13,A14,A15; end; suppose A16: x2 <= x1; A17: [.x2,x1.] c= [.p,g.] by A5,A6,XXREAL_2:def 12; A18: [.x2,x1.] c= [.p,g.] by A5,A6,XXREAL_2:def 12; then f|[.x2,x1.] is continuous by A3,FCONT_1:16; then consider s such that A19: s in [.x2,x1.] and A20: r=f.s by A2,A9,A7,A8,A10,A16,A17,Th15,XBOOLE_1:1; take s; thus s in [.p,g.] & r=f.s by A18,A19,A20; end; end; hence thesis; end; theorem Th17: f is one-to-one & [.p,g.] c= dom f & p<=g & f|[.p,g.] is continuous implies f|[.p,g.] is increasing or f|[.p,g.] is decreasing proof assume that A1: f is one-to-one and A2: [.p,g.] c= dom f and A3: p<=g and A4: f|[.p,g.] is continuous and A5: not f|[.p,g.] is increasing and A6: not f|[.p,g.] is decreasing; now per cases; suppose p=g; then [.p,g.]={p} by XXREAL_1:17; hence contradiction by A6,RFUNCT_2:44; end; suppose A7: p<>g; A8: g in [.p,g.] by A3,XXREAL_1:1; A9: p in [.p,g.] by A3,XXREAL_1:1; then A10: f.p<>f.g by A1,A2,A7,A8,FUNCT_1:def 4; now per cases by A10,XXREAL_0:1; suppose A11: f.pp by A13,A16,XXREAL_0:1; s in [.p,g.] by A19,A20; hence contradiction by A1,A2,A9,A23,A21,A22,FUNCT_1:def 4; end; suppose A24: f.gf.g; A45: for x1 st p<=x1 & x1<=g holds f.g<=f.x1 & f.x1<=f.p proof let x1; assume that A46: p<=x1 and A47: x1<=g and A48: not (f.g<=f.x1 & f.x1 <=f.p); now per cases by A48; suppose A49: f.x1x1; x1 in {r: p<=r & r<=g} by A46,A47; then A51: x1 in [.p,g.] by RCOMP_1:def 1; f.g in {r:f.x1<=r & r<=f.p} by A44,A49; then f.g in [.f.x1,f.p.] by RCOMP_1:def 1; then A52: f.g in [.f.p,f.x1.] \/ [.f.x1,f.p.] by XBOOLE_0:def 3; p in [.p,g.] by A3,XXREAL_1:1; then A53: [.p,x1.] c= [.p,g.] by A51,XXREAL_2:def 12; then f|[.p,x1.] is continuous by A4,FCONT_1:16; then consider s such that A54: s in [.p,x1.] and A55: f.s=f.g by A2,A46,A53,A52,Th15,XBOOLE_1:1; s in {t: p<=t & t<=x1} by A54,RCOMP_1:def 1; then A56: ex r st r=s & p<=r & r<=x1; s in [.p,g.] by A53,A54; then s=g by A1,A2,A8,A55,FUNCT_1:def 4; hence contradiction by A47,A50,A56,XXREAL_0:1; end; end; hence contradiction; end; suppose A57: f.px1; x1 in {r:p<=r & r<=g} by A46,A47; then A59: x1 in [.p,g.] by RCOMP_1:def 1; f.p in {r:f.g<=r & r<=f.x1} by A44,A57; then f.p in [.f.g,f.x1.] by RCOMP_1:def 1; then A60: f.p in [.f.x1,f.g.] \/ [.f.g,f.x1.] by XBOOLE_0:def 3; g in [.p,g.] by A3,XXREAL_1:1; then A61: [.x1,g.] c= [.p,g.] by A59,XXREAL_2:def 12; then f|[.x1,g.] is continuous by A4,FCONT_1:16; then consider s such that A62: s in [.x1,g.] and A63: f.s=f.p by A2,A47,A61,A60,Th15,XBOOLE_1:1; s in {t: x1<=t & t<=g} by A62,RCOMP_1:def 1; then A64: ex r st r=s & x1<=r & r<=g; s in [.p,g.] by A61,A62; then s=p by A1,A2,A9,A63,FUNCT_1:def 4; hence contradiction by A46,A58,A64,XXREAL_0:1; end; end; hence contradiction; end; end; hence contradiction; end; consider x1,x2 such that A65: x1 in [.p,g.] /\ dom f and A66: x2 in [.p,g.] /\ dom f and A67: x1 {} by A2,XXREAL_1:1; then consider x1,x2 be real number such that A11: x1 in [.p,g.] and A12: x2 in [.p,g.] and A13: f.x1=upper_bound (f.:[.p,g.]) and A14: f.x2=lower_bound (f.:[.p,g.]) by A3,A4,FCONT_1:31,RCOMP_1:6; A15: x2 in [.p,g.]/\dom f by A3,A12,XBOOLE_0:def 4; x2 in {t: p<=t & t<=g} by A12,RCOMP_1:def 1; then A16: ex r st r=x2 & p<=r & r<=g; x1 in {r: p<=r & r<=g} by A11,RCOMP_1:def 1; then A17: ex r st r=x1 & p<=r & r<=g; [.p,g.] is compact by RCOMP_1:6; then A18: f.:[.p,g.] is real-bounded by A3,A4,FCONT_1:29,RCOMP_1:10; A19: x1 in [.p,g.]/\dom f by A3,A11,XBOOLE_0:def 4; now per cases by A1,A2,A3,A4,Th17; suppose A20: f|[.p,g.] is increasing; A21: now assume x1<>g; then x1p; then pg; then x2p; then p=lower_bound(f.:[.p,g.]) by A4,SEQ_4:def 2; y<=upper_bound(f.:[.p,g.]) by A4,A5,SEQ_4:def 1; then y in {s: lower_bound(f.:[.p,g.])<=s & s<=upper_bound(f.:[.p,g.])} by A6; hence thesis by RCOMP_1:def 1; end; assume y in [.lower_bound(f.:[.p,g.]),upper_bound(f.:[.p,g.]).]; then ex x0 st x0 in [.p,g.] & y=f.x0 by A1,A2,A3,Th16; hence y in f.:[.p,g.] by A2,FUNCT_1:def 6; end; hence thesis by SUBSET_1:3; end; theorem for f be one-to-one PartFunc of REAL,REAL st p<=g & [.p,g.] c= dom f & f|[.p,g.] is continuous holds f"|[.lower_bound (f.:[.p,g.]),upper_bound (f.:[.p ,g.]).] is continuous proof let f be one-to-one PartFunc of REAL,REAL; assume that A1: p<=g and A2: [.p,g.] c= dom f and A3: f|[.p,g.] is continuous; now per cases by A1,A2,A3,Th17; suppose f|[.p,g.] is increasing; then (f|[.p,g.])"|(f.:[.p,g.]) is increasing by RFUNCT_2:51; then f"|(f.:[.p,g.])|(f.:[.p,g.]) is increasing by RFUNCT_2:17; then f"|(f.:[.p,g.]) is monotone by RELAT_1:72; then A4: f"|[.lower_bound (f.:[.p,g.]),upper_bound (f.: [.p,g .]).] is monotone by A1,A2,A3,Th19; (f").:([.lower_bound (f.:[.p,g.]),upper_bound (f.:[.p,g.]).])=(f") .:(f .: [.p,g.]) by A1,A2,A3,Th19 .=((f")|(f.:[.p,g.])).:(f.:[.p,g.]) by RELAT_1:129 .=((f|[.p,g.])").:(f.:[.p,g.]) by RFUNCT_2:17 .= ((f|[.p,g.])").:(rng (f|[.p,g.])) by RELAT_1:115 .= ((f|[.p,g.])").:(dom ((f|[.p,g.])")) by FUNCT_1:33 .= rng ((f|[.p,g.])") by RELAT_1:113 .= dom (f|[.p,g.]) by FUNCT_1:33 .= dom f /\ [.p,g.] by RELAT_1:61 .= [.p,g.] by A2,XBOOLE_1:28; hence thesis by A1,A4,FCONT_1:46; end; suppose f|[.p,g.] is decreasing; then (f|[.p,g.])"|(f.:[.p,g.]) is decreasing by RFUNCT_2:52; then f"|(f.:[.p,g.])|(f.:[.p,g.]) is decreasing by RFUNCT_2:17; then f"|(f.:[.p,g.]) is monotone by RELAT_1:72; then A5: f"|[.lower_bound (f.:[.p,g.]),upper_bound (f.: [.p,g .]).] is monotone by A1,A2,A3,Th19; (f").:([.lower_bound (f.:[.p,g.]),upper_bound (f.:[.p,g.]).])=(f") .:(f .: [.p,g.]) by A1,A2,A3,Th19 .=((f")|(f.:[.p,g.])).:(f.:[.p,g.]) by RELAT_1:129 .=((f|[.p,g.])").:(f.:[.p,g.]) by RFUNCT_2:17 .=((f|[.p,g.])").:(rng (f|[.p,g.])) by RELAT_1:115 .=((f|[.p,g.])").:(dom ((f|[.p,g.])")) by FUNCT_1:33 .=rng((f|[.p,g.])") by RELAT_1:113 .=dom(f|[.p,g.]) by FUNCT_1:33 .=dom f /\ [.p,g.] by RELAT_1:61 .=[.p,g.] by A2,XBOOLE_1:28; hence thesis by A1,A5,FCONT_1:46; end; end; hence thesis; end; begin reserve y,X for set; reserve x,x0,x1,x2,g,g1,g2,r,r1,s,p,p1 for Real; reserve n,m,k for Element of NAT; reserve Y for Subset of REAL; reserve Z for open Subset of REAL; reserve s1,s3 for Real_Sequence; reserve f,f1,f2 for PartFunc of REAL,REAL; theorem Th1: (for r holds r in Y iff r in REAL) iff Y = REAL proof thus (for r holds r in Y iff r in REAL) implies Y=REAL proof assume for r holds r in Y iff r in REAL; then for y holds y in Y iff y in REAL; hence thesis by TARSKI:1; end; assume A1: Y=REAL; let r; thus r in Y implies r in REAL; thus thesis by A1; end; definition let x be real number; let IT be Real_Sequence; attr IT is x-convergent means :Def1: IT is convergent & lim IT = x; end; registration cluster 0-convergent non-zero for Real_Sequence; existence proof deffunc F(Element of NAT) = 1/($1+1); consider s1 such that A1: for n holds s1.n=F(n) from SEQ_1:sch 1; take s1; now let n; (n+1)" <> 0; then 1/(n+1) <> 0 by XCMPLX_1:215; hence s1.n <> 0 by A1; end; then A2: s1 is non-zero by SEQ_1:5; lim s1 = 0 & s1 is convergent by A1,SEQ_4:30; then s1 is 0-convergent by Def1; hence thesis by A2; end; end; registration let f be 0-convergent Real_Sequence; cluster lim f -> empty; coherence proof thus thesis by Def1; end; end; registration cluster 0-convergent -> convergent for Real_Sequence; coherence proof let f be Real_Sequence; assume f is 0-convergent; then f is 0-convergent; hence thesis by Def1; end; end; reconsider cs = NAT --> 0 as Real_Sequence by FUNCOP_1:45; reserve h for non-zero 0-convergent Real_Sequence; reserve c for constant Real_Sequence; definition let IT be PartFunc of REAL,REAL; attr IT is RestFunc-like means :Def2: IT is total & for h holds (h")(#)(IT/*h) is convergent & lim ((h")(#)(IT/*h)) = 0; end; reconsider cf = REAL --> 0 as Function of REAL, REAL by FUNCOP_1:45; registration cluster RestFunc-like for PartFunc of REAL,REAL; existence proof take f = cf; thus f is total; A1: dom f = REAL by FUNCOP_1:13; now let h; now let n be Nat; A2: rng h c= dom f by A1; A3: n in NAT by ORDINAL1:def 12; hence ((h")(#)(f/*h)).n = (h").n*((f/*h).n) by SEQ_1:8 .= (h").n*(f.(h.n)) by A3,A2,FUNCT_2:108 .= (h").n*0 by FUNCOP_1:7 .= 0; end; then (h")(#)(f/*h) is constant & ((h")(#)(f/*h)).0 = 0 by VALUED_0:def 18 ; hence (h")(#)(f/*h) is convergent & lim ((h")(#)(f/*h)) = 0 by SEQ_4:25; end; hence thesis; end; end; definition mode RestFunc is RestFunc-like PartFunc of REAL,REAL; end; definition let IT be PartFunc of REAL,REAL; attr IT is linear means :Def3: IT is total & ex r st for p holds IT.p = r*p; end; registration cluster linear for PartFunc of REAL,REAL; existence proof deffunc F(Real) = 1*$1; defpred P[set] means $1 in REAL; consider f such that A1: (for r holds r in dom f iff P[r]) & for r st r in dom f holds f.r= F(r) from SEQ_1:sch 3; take f; for y holds y in REAL implies y in dom f by A1; then REAL c= dom f by TARSKI:def 3; then dom f = REAL by XBOOLE_0:def 10; hence f is total by PARTFUN1:def 2; for p holds f.p = 1*p by A1; hence thesis; end; end; definition mode LinearFunc is linear PartFunc of REAL,REAL; end; reserve R,R1,R2 for RestFunc; reserve L,L1,L2 for LinearFunc; theorem Th2: L1+L2 is LinearFunc & L1-L2 is LinearFunc proof consider g1 such that A1: for p holds L1.p = g1*p by Def3; consider g2 such that A2: for p holds L2.p = g2*p by Def3; A3: L1 is total & L2 is total by Def3; now let p; thus (L1+L2).p = L1.p + L2.p by A3,RFUNCT_1:56 .= g1*p + L2.p by A1 .= g1*p + g2*p by A2 .= (g1+g2)*p; end; hence L1+L2 is LinearFunc by A3,Def3; now let p; thus (L1-L2).p = L1.p - L2.p by A3,RFUNCT_1:56 .= g1*p - L2.p by A1 .= g1*p - g2*p by A2 .= (g1-g2)*p; end; hence thesis by A3,Def3; end; theorem Th3: r(#)L is LinearFunc proof consider g such that A1: for p holds L.p = g*p by Def3; A2: L is total by Def3; now let p; thus (r(#)L).p = r*L.p by A2,RFUNCT_1:57 .= r*(g*p) by A1 .= r*g*p; end; hence thesis by A2,Def3; end; theorem Th4: R1+R2 is RestFunc & R1-R2 is RestFunc & R1(#)R2 is RestFunc proof A1: R1 is total & R2 is total by Def2; now let h; A2: (h")(#)((R1+R2)/*h) = (h")(#)((R1/*h)+(R2/*h)) by A1,RFUNCT_2:13 .= ((h")(#)(R1/*h))+((h")(#)(R2/*h)) by SEQ_1:16; A3: (h")(#)(R1/*h) is convergent & (h")(#)(R2/*h) is convergent by Def2; hence (h")(#)((R1+R2)/*h) is convergent by A2,SEQ_2:5; lim ((h")(#)(R1/*h)) = 0 & lim ((h")(#)(R2/*h)) = 0 by Def2; hence lim ((h")(#)((R1+R2)/*h)) = 0+0 by A3,A2,SEQ_2:6 .= 0; end; hence R1+R2 is RestFunc by A1,Def2; now let h; A4: (h")(#)((R1-R2)/*h) = (h")(#)((R1/*h)-(R2/*h)) by A1,RFUNCT_2:13 .= ((h")(#)(R1/*h))-((h")(#)(R2/*h)) by SEQ_1:21; A5: (h")(#)(R1/*h) is convergent & (h")(#)(R2/*h) is convergent by Def2; hence (h")(#)((R1-R2)/*h) is convergent by A4,SEQ_2:11; lim ((h")(#)(R1/*h)) = 0 & lim ((h")(#)(R2/*h)) = 0 by Def2; hence lim ((h")(#)((R1-R2)/*h)) = 0-0 by A5,A4,SEQ_2:12 .= 0; end; hence R1-R2 is RestFunc by A1,Def2; now let h; A6: (h")(#)(R2/*h) is convergent by Def2; A7: h" is non-zero by SEQ_1:33; A8: (h")(#)(R1/*h) is convergent & h is convergent by Def2; then A9: h(#)((h")(#)(R1/*h)) is convergent by SEQ_2:14; lim ((h")(#)(R1/*h)) = 0 & lim h = 0 by Def2; then A10: lim (h(#)((h")(#)(R1/*h))) = 0*0 by A8,SEQ_2:15 .= 0; A11: (h")(#)((R1(#)R2)/*h) = ((R1/*h)(#)(R2/*h))/"h by A1,RFUNCT_2:13 .= ((R1/*h)(#)(R2/*h)(#)(h"))/"(h(#)(h")) by SEQ_1:43,A7 .= ((R1/*h)(#)(R2/*h)(#)(h"))(#)((h"")(#)(h")) by SEQ_1:36 .= h(#)(h")(#)((R1/*h)(#)((h")(#)(R2/*h))) by SEQ_1:14 .= h(#)(h")(#)(R1/*h)(#)((h")(#)(R2/*h)) by SEQ_1:14 .= h(#)((h")(#)(R1/*h))(#)((h")(#)(R2/*h)) by SEQ_1:14; hence (h")(#)((R1(#)R2)/*h) is convergent by A6,A9,SEQ_2:14; lim ((h")(#)(R2/*h)) = 0 by Def2; hence lim ((h")(#)((R1(#)R2)/*h)) = 0*0 by A6,A9,A10,A11,SEQ_2:15 .= 0; end; hence thesis by A1,Def2; end; theorem Th5: r(#)R is RestFunc proof A1: R is total by Def2; now let h; A2: (h")(#)((r(#)R)/*h) = (h")(#)(r(#)(R/*h)) by A1,RFUNCT_2:14 .= r(#)((h")(#)(R/*h)) by SEQ_1:19; A3: (h")(#)(R/*h) is convergent by Def2; hence (h")(#)((r(#)R)/*h) is convergent by A2,SEQ_2:7; lim ((h")(#)(R/*h)) = 0 by Def2; hence lim ((h")(#)((r(#)R)/*h)) = r*0 by A3,A2,SEQ_2:8 .= 0; end; hence thesis by A1,Def2; end; theorem Th6: L1(#)L2 is RestFunc-like proof consider x1 such that A1: for p holds L1.p=x1*p by Def3; A2: L1 is total & L2 is total by Def3; hence L1(#)L2 is total; consider x2 such that A3: for p holds L2.p=x2*p by Def3; now let h; now let n; A4: h.n<>0 by SEQ_1:5; thus ((h")(#)((L1(#)L2)/*h)).n=(h").n *((L1(#)L2)/*h).n by SEQ_1:8 .=(h").n*(L1(#)L2).(h.n) by A2,FUNCT_2:115 .=(h").n*(L1.(h.n)*L2.(h.n)) by A2,RFUNCT_1:56 .=(h").n*L1.(h.n)*L2.(h.n) .=((h.n)")*L1.(h.n)*L2.(h.n) by VALUED_1:10 .=((h.n)")*((h.n)*x1)*L2.(h.n) by A1 .=((h.n)")*(h.n)*x1*L2.(h.n) .=1*x1*L2.(h.n) by A4,XCMPLX_0:def 7 .=x1*(x2*(h.n)) by A3 .=x1*x2*(h.n) .=((x1*x2)(#)h).n by SEQ_1:9; end; then A5: (h")(#)((L1(#)L2)/*h)=(x1*x2)(#)h by FUNCT_2:63; thus (h")(#)((L1(#)L2)/*h) is convergent by A5,SEQ_2:7; lim h=0; hence lim ((h")(#)((L1(#)L2)/*h)) = (x1*x2)*0 by A5,SEQ_2:8 .=0; end; hence thesis; end; theorem Th7: R(#)L is RestFunc & L(#)R is RestFunc proof A1: L is total by Def3; consider x1 such that A2: for p holds L.p=x1*p by Def3; A3: R is total by Def2; A4: now let h; A5: (h")(#)(R/*h) is convergent by Def2; now let n; thus (L/*h).n=L.(h.n) by A1,FUNCT_2:115 .=x1*(h.n) by A2 .=(x1(#)h).n by SEQ_1:9; end; then A6: (L/*h)=x1(#)h by FUNCT_2:63; A7: L/*h is convergent by A6,SEQ_2:7; lim h=0; then A8: lim (L/*h)=x1*0 by A6,SEQ_2:8 .=0; A9: (h")(#)((R(#)L)/*h)=(h")(#)((R/*h)(#)(L/*h)) by A3,A1,RFUNCT_2:13 .=((h")(#)(R/*h))(#)(L/*h) by SEQ_1:14; hence (h")(#)((R(#)L)/*h) is convergent by A7,A5,SEQ_2:14; lim ((h")(#)(R/*h))=0 by Def2; hence lim ((h")(#)((R(#)L)/*h))=0*0 by A9,A7,A8,A5,SEQ_2:15 .=0; end; hence R(#)L is RestFunc by A3,A1,Def2; thus thesis by A3,A1,A4,Def2; end; definition let f; let x0 be real number; pred f is_differentiable_in x0 means :Def4: ex N being Neighbourhood of x0 st N c= dom f & ex L,R st for x st x in N holds f.x - f.x0 = L.(x-x0) + R.(x-x0 ); end; definition let f; let x0 be real number; assume A1: f is_differentiable_in x0; func diff(f,x0) -> Real means :Def5: ex N being Neighbourhood of x0 st N c= dom f & ex L,R st it=L.1 & for x st x in N holds f.x-f.x0 = L.(x-x0) + R.(x-x0); existence proof consider N being Neighbourhood of x0 such that A2: N c= dom f and A3: ex L,R st for x st x in N holds f.x - f.x0 = L.(x-x0) + R.(x-x0) by A1,Def4; consider L,R such that A4: for x st x in N holds f.x - f.x0 = L.(x-x0) + R.(x-x0) by A3; consider r such that A5: for p holds L.p = r*p by Def3; take r; L.1=r*1 by A5 .=r; hence thesis by A2,A4; end; uniqueness proof let r,s; assume that A6: ex N being Neighbourhood of x0 st N c= dom f & ex L,R st r=L.1 & for x st x in N holds f.x-f.x0 = L.(x-x0)+R.(x-x0) and A7: ex N being Neighbourhood of x0 st N c= dom f & ex L,R st s=L.1 & for x st x in N holds f.x-f.x0 = L.(x-x0) + R.(x-x0); consider N being Neighbourhood of x0 such that N c= dom f and A8: ex L,R st r=L.1 & for x st x in N holds f.x-f.x0 = L.(x-x0)+R.(x- x0) by A6; consider L,R such that A9: r=L.1 and A10: for x st x in N holds f.x-f.x0 = L.(x-x0) + R.(x-x0) by A8; consider r1 such that A11: for p holds L.p = r1*p by Def3; consider N1 being Neighbourhood of x0 such that N1 c= dom f and A12: ex L,R st s=L.1 & for x st x in N1 holds f.x-f.x0=L.(x-x0)+R.(x- x0) by A7; consider L1,R1 such that A13: s =L1.1 and A14: for x st x in N1 holds f.x-f.x0 = L1.(x-x0) + R1.(x-x0) by A12; consider p1 such that A15: for p holds L1.p = p1*p by Def3; consider N0 be Neighbourhood of x0 such that A16: N0 c= N & N0 c= N1 by RCOMP_1:17; consider g be real number such that A17: 0g/(n+2) by A17,XREAL_1:139; hence 0<>s1.n by A19; end; then A20: s1 is non-zero by SEQ_1:5; s1 is convergent & lim s1 = 0 by A19,SEQ_4:31; then s1 is 0-convergent by Def1; then reconsider h = s1 as non-zero 0-convergent Real_Sequence by A20; A21: for n ex x st x in N & x in N1 & h.n=x-x0 proof let n; take x0+g/(n+2); 0+1 0 by A30,SEQ_1:5; A34: (R1.(h.n))/(h.n) = (R1.(h.n))*(h.n)" by XCMPLX_0:def 9 .= (R1.(h.n))*(h".n) by VALUED_1:10 .= ((R1/*h).n)*(h".n) by A30,A28,FUNCT_2:108 .= ((h")(#)(R1/*h)).n by A30,SEQ_1:8; A35: (s*(h.n))/(h.n) = s*((h.n)/(h.n)) by XCMPLX_1:74 .= s*1 by A33,XCMPLX_1:60 .= s; (r*(h.n))/(h.n) = r*((h.n)/(h.n)) by XCMPLX_1:74 .= r*1 by A33,XCMPLX_1:60 .= r; then r + (R.(h.n))/(h.n) = s + (R1.(h.n))/(h.n) by A31,A35,XCMPLX_1:62; then r = s + (((h")(#)(R1/*h)).n - ((h")(#)(R/*h)).n) by A32,A34; hence r - s = (((h")(#)(R1/*h))-((h")(#)(R/*h))).n by A30,RFUNCT_2:1; end; then ((h")(#)(R1/*h))-((h")(#)(R/*h)) is constant & (((h")(#)(R1/*h))-((h" )(#)(R /*h))).1 = r-s by VALUED_0:def 18; then A36: lim (((h")(#)(R1/*h))-((h")(#)(R/*h))) = r-s by SEQ_4:25; A37: (h")(#)(R1/*h) is convergent & lim ((h")(#)(R1/*h)) = 0 by Def2; (h")(#)(R/*h) is convergent & lim ((h")(#)(R/*h)) = 0 by Def2; then r-s = 0-0 by A36,A37,SEQ_2:12; hence thesis; end; end; definition let f,X; pred f is_differentiable_on X means :Def6: X c= dom f & for x st x in X holds f|X is_differentiable_in x; end; theorem Th8: f is_differentiable_on X implies X is Subset of REAL proof assume f is_differentiable_on X; then X c=dom f by Def6; hence thesis by XBOOLE_1:1; end; theorem Th9: f is_differentiable_on Z iff Z c= dom f & for x st x in Z holds f is_differentiable_in x proof thus f is_differentiable_on Z implies Z c=dom f & for x st x in Z holds f is_differentiable_in x proof assume A1: f is_differentiable_on Z; hence Z c=dom f by Def6; let x0; assume A2: x0 in Z; then f|Z is_differentiable_in x0 by A1,Def6; then consider N being Neighbourhood of x0 such that A3: N c= dom(f|Z) and A4: ex L,R st for x st x in N holds (f|Z).x-(f|Z).x0=L.(x-x0)+R.(x-x0) by Def4; take N; dom(f|Z)=dom f/\Z by RELAT_1:61; then dom(f|Z) c=dom f by XBOOLE_1:17; hence N c= dom f by A3,XBOOLE_1:1; consider L,R such that A5: for x st x in N holds (f|Z).x - (f|Z).x0 = L.(x-x0) + R.(x-x0) by A4; take L,R; let x; assume A6: x in N; then (f|Z).x-(f|Z).x0=L.(x-x0)+R.(x-x0) by A5; then f.x-(f|Z).x0=L.(x-x0)+R.(x-x0) by A3,A6,FUNCT_1:47; hence thesis by A2,FUNCT_1:49; end; assume that A7: Z c=dom f and A8: for x st x in Z holds f is_differentiable_in x; thus Z c=dom f by A7; let x0; assume A9: x0 in Z; then consider N1 being Neighbourhood of x0 such that A10: N1 c= Z by RCOMP_1:18; f is_differentiable_in x0 by A8,A9; then consider N being Neighbourhood of x0 such that A11: N c= dom f and A12: ex L,R st for x st x in N holds f.x-f.x0=L.(x-x0)+R.(x-x0) by Def4; consider N2 being Neighbourhood of x0 such that A13: N2 c= N1 and A14: N2 c= N by RCOMP_1:17; A15: N2 c= Z by A10,A13,XBOOLE_1:1; take N2; N2 c= dom f by A11,A14,XBOOLE_1:1; then N2 c= dom f/\Z by A15,XBOOLE_1:19; hence A16: N2 c= dom(f|Z) by RELAT_1:61; consider L,R such that A17: for x st x in N holds f.x-f.x0=L.(x-x0)+R.(x-x0) by A12; A18: x0 in N2 by RCOMP_1:16; take L,R; let x; assume A19: x in N2; then f.x-f.x0=L.(x-x0)+R.(x-x0) by A14,A17; then (f|Z).x-f.x0=L.(x-x0)+R.(x-x0) by A16,A19,FUNCT_1:47; hence thesis by A16,A18,FUNCT_1:47; end; theorem f is_differentiable_on Y implies Y is open proof assume A1: f is_differentiable_on Y; now let x0 be real number; assume x0 in Y; then f|Y is_differentiable_in x0 by A1,Def6; then consider N being Neighbourhood of x0 such that A2: N c= dom(f|Y) and ex L,R st for x st x in N holds (f|Y).x-(f|Y).x0=L.(x-x0)+R.(x-x0) by Def4; take N; thus N c= Y by A2,XBOOLE_1:1; end; hence thesis by RCOMP_1:20; end; definition let f,X; assume A1: f is_differentiable_on X; func f`|X -> PartFunc of REAL,REAL means :Def7: dom it = X & for x st x in X holds it.x = diff(f,x); existence proof deffunc F(Real) = diff(f,$1); defpred P[set] means $1 in X; consider F being PartFunc of REAL,REAL such that A2: (for x holds x in dom F iff P[x]) & for x st x in dom F holds F.x = F(x) from SEQ_1:sch 3; take F; now A3: X is Subset of REAL by A1,Th8; let y; assume y in X; hence y in dom F by A2,A3; end; then A4: X c= dom F by TARSKI:def 3; for y st y in dom F holds y in X by A2; then dom F c= X by TARSKI:def 3; hence dom F = X by A4,XBOOLE_0:def 10; now let x; assume x in X; then x in dom F by A2; hence F.x = diff(f,x) by A2; end; hence thesis; end; uniqueness proof let F,G be PartFunc of REAL,REAL; assume that A5: dom F = X and A6: for x st x in X holds F.x = diff(f,x) and A7: dom G = X and A8: for x st x in X holds G.x = diff(f,x); now let x; assume A9: x in dom F; then F.x = diff(f,x) by A5,A6; hence F.x=G.x by A5,A8,A9; end; hence thesis by A5,A7,PARTFUN1:5; end; end; theorem (Z c= dom f & ex r st rng f = {r}) implies f is_differentiable_on Z & for x st x in Z holds (f`|Z).x = 0 proof set R = cf; A1: dom R = REAL by FUNCOP_1:13; now let h; A2: now let n be Nat; A3: rng h c= dom R by A1; A4: n in NAT by ORDINAL1:def 12; hence ((h")(#)(R/*h)).n = (h".n)*((R/*h).n) by SEQ_1:8 .= (h".n)*(R.(h.n)) by A4,A3,FUNCT_2:108 .= (h".n)*0 by FUNCOP_1:7 .= 0; end; then A5: (h")(#)(R/*h) is constant by VALUED_0:def 18; hence (h")(#)(R/*h) is convergent; ((h")(#)(R/*h)).0 = 0 by A2; hence lim ((h")(#)(R/*h)) = 0 by A5,SEQ_4:25; end; then reconsider R as RestFunc by Def2; set L = cf; for p holds L.p = 0*p by FUNCOP_1:7; then reconsider L as LinearFunc by Def3; assume A6: Z c= dom f; given r such that A7: rng f = {r}; A8: now let x0; assume x0 in dom f; then f.x0 in {r} by A7,FUNCT_1:def 3; hence f.x0 = r by TARSKI:def 1; end; A9: now let x0; assume A10: x0 in Z; then consider N being Neighbourhood of x0 such that A11: N c= Z by RCOMP_1:18; A12: N c= dom f by A6,A11,XBOOLE_1:1; for x st x in N holds f.x - f.x0 = L.(x-x0) + R.(x-x0) proof let x; assume x in N; hence f.x - f.x0 = r - f.x0 by A8,A12 .= r - r by A6,A8,A10 .= L.(x-x0)+0 by FUNCOP_1:7 .= L.(x-x0)+R.(x-x0) by FUNCOP_1:7; end; hence f is_differentiable_in x0 by A12,Def4; end; hence A13: f is_differentiable_on Z by A6,Th9; let x0; assume A14: x0 in Z; then A15: f is_differentiable_in x0 by A9; then ex N being Neighbourhood of x0 st N c= dom f & ex L,R st for x st x in N holds f.x-f.x0=L.(x-x0)+R.(x-x0) by Def4; then consider N being Neighbourhood of x0 such that A16: N c= dom f; A17: for x st x in N holds f.x - f.x0 = L.(x-x0) + R.(x-x0) proof let x; assume x in N; hence f.x - f.x0 = r - f.x0 by A8,A16 .=r - r by A6,A8,A14 .=L.(x-x0) + 0 by FUNCOP_1:7 .=L.(x-x0) + R.(x-x0) by FUNCOP_1:7; end; thus (f`|Z).x0 = diff(f,x0) by A13,A14,Def7 .= L.1 by A15,A16,A17,Def5 .=0 by FUNCOP_1:7; end; registration let h,n; cluster h^\n -> non-zero 0-convergent for Real_Sequence; coherence proof lim h = 0; then lim (h^\n) = 0 by SEQ_4:20; then h^\n is 0-convergent by Def1; hence thesis; end; end; theorem Th12: for x0 being real number for N being Neighbourhood of x0 st f is_differentiable_in x0 & N c= dom f holds for h,c st rng c = {x0} & rng (h+c) c= N holds h"(#)(f/*(h+c) - f/*c) is convergent & diff(f,x0) = lim (h"(#)(f/*(h +c) - f/*c)) proof let x0 be real number; let N be Neighbourhood of x0; assume that A1: f is_differentiable_in x0 and A2: N c= dom f; consider N1 be Neighbourhood of x0 such that N1 c= dom f and A3: ex L,R st for x st x in N1 holds f.x - f.x0 = L.(x-x0) + R.(x-x0) by A1 ,Def4; consider N2 be Neighbourhood of x0 such that A4: N2 c= N and A5: N2 c= N1 by RCOMP_1:17; A6: N2 c= dom f by A2,A4,XBOOLE_1:1; let h,c such that A7: rng c = {x0} and A8: rng (h+c) c= N; consider g be real number such that A9: 0 0 by SEQ_1:5; thus ((L/*(h^\n) + R/*(h^\n))(#)(h^\n)").m = ((L/*(h^\n) + R/*(h^\n)).m) *((h^\n)").m by SEQ_1:8 .= ((L/*(h^\n)).m + (R/*(h^\n)).m) *((h^\n)").m by SEQ_1:7 .= ((L/*(h^\n)).m)*((h^\n)").m+((R/*(h^\n)).m)*((h^\n)").m .= ((L/*(h^\n)).m)*((h^\n)").m + ((R/*(h^\n))(#)(h^\n)").m by SEQ_1:8 .= ((L/*(h^\n)).m)*((h^\n).m)" + ((R/*(h^\n))(#)(h^\n)").m by VALUED_1:10 .= (L.((h^\n).m))*((h^\n).m)" + ((R/*(h^\n))(#) (h^\n)").m by A24, FUNCT_2:115 .= (s*((h^\n).m))*((h^\n).m)" + ((R/*(h^\n))(#)(h^\n)").m by A31 .= s*(((h^\n).m)*((h^\n).m)") + ((R/*(h^\n))(#)(h^\n)").m .= s*1 + ((R/*(h^\n))(#)(h^\n)").m by A33,XCMPLX_0:def 7 .= s1.m by A26,A32; end; then A34: (L/*(h^\n) + R/*(h^\n))(#)(h^\n)" = s1 by FUNCT_2:63; hence (L/*(h^\n) + R/*(h^\n))(#)(h^\n)" is convergent by A27,SEQ_2:def 6; hence thesis by A34,A27,SEQ_2:def 7; end; A35: rng ((h+c)^\n) c= dom f proof let y; assume y in rng ((h+c)^\n); then y in N2 by A20; then y in N by A4; hence thesis by A2; end; A36: rng (h+c) c= dom f proof let y; assume y in rng (h+c); then y in N by A8; hence thesis by A2; end; A37: for k holds f.(((h+c)^\n).k) - f.((c^\n).k) = L.((h^\n).k) + R.((h^\n). k) proof let k; ((h+c)^\n).k in rng ((h+c)^\n) by VALUED_0:28; then A38: ((h+c)^\n).k in N2 by A20; (c^\n).k in rng (c^\n) & rng (c^\n) = rng c by VALUED_0:26,28; then A39: (c^\n).k = x0 by A7,TARSKI:def 1; ((h+c)^\n).k - (c^\n).k = (h^\n + c^\n).k - (c^\n).k by SEQM_3:15 .= (h^\n).k + (c^\n).k - (c^\n).k by SEQ_1:7 .= (h^\n).k; hence thesis by A21,A5,A38,A39; end; A40: R is total by Def2; now let k; thus (f/*((h+c)^\n)-f/*(c^\n)).k = (f/*((h+c)^\n)).k-(f/*(c^\n)).k by RFUNCT_2:1 .= f.(((h+c)^\n).k) - (f/*(c^\n)).k by A35,FUNCT_2:108 .= f.(((h+c)^\n).k) - f.((c^\n).k) by A22,FUNCT_2:108 .= L.((h^\n).k) + R.((h^\n).k) by A37 .= (L/*(h^\n)).k + R.((h^\n).k) by A24,FUNCT_2:115 .= (L/*(h^\n)).k + (R/*(h^\n)).k by A40,FUNCT_2:115 .= (L/*(h^\n) + R/*(h^\n)).k by SEQ_1:7; end; then f/*((h+c)^\n) - f/*(c^\n) = L/*(h^\n) + R/*(h^\n) by FUNCT_2:63; then A41: ((L/*(h^\n) + R/*(h^\n))(#)(h^\n)") = ((((f/*(h+c))^\n)-f/*(c^\n))(#) ( h^\n)") by A36,VALUED_0:27 .=((((f/*(h+c))^\n)-((f/*c)^\n))(#)(h^\n)") by A12,VALUED_0:27 .=((((f/*(h+c))-(f/*c))^\n)(#)(h^\n)") by SEQM_3:17 .=((((f/*(h+c))-(f/*c))^\n)(#)((h")^\n)) by SEQM_3:18 .=((((f/*(h+c))-(f/*c))(#) h")^\n) by SEQM_3:19; then A42: L.1 = lim ((h")(#)((f/*(h+c)) - (f/*c))) by A25,SEQ_4:22; thus h" (#) (f/*(h+c) - f/*c) is convergent by A25,A41,SEQ_4:21; for x st x in N2 holds f.x - f.x0 = L.(x-x0) + R.(x-x0) by A21,A5; hence thesis by A1,A6,A42,Def5; end; theorem Th13: f1 is_differentiable_in x0 & f2 is_differentiable_in x0 implies f1+f2 is_differentiable_in x0 & diff(f1+f2,x0)=diff(f1,x0)+diff(f2,x0) proof assume that A1: f1 is_differentiable_in x0 and A2: f2 is_differentiable_in x0; consider N1 be Neighbourhood of x0 such that A3: N1 c= dom f1 and A4: ex L,R st for x st x in N1 holds f1.x - f1.x0 = L.(x-x0) + R.(x-x0) by A1,Def4; consider L1,R1 such that A5: for x st x in N1 holds f1.x - f1.x0 = L1.(x-x0) + R1.(x-x0) by A4; consider N2 be Neighbourhood of x0 such that A6: N2 c= dom f2 and A7: ex L,R st for x st x in N2 holds f2.x - f2.x0 = L.(x-x0) + R.(x-x0) by A2,Def4; consider L2,R2 such that A8: for x st x in N2 holds f2.x - f2.x0 = L2.(x-x0) + R2.(x-x0) by A7; reconsider R=R1+R2 as RestFunc by Th4; reconsider L=L1+L2 as LinearFunc by Th2; A9: L1 is total & L2 is total by Def3; consider N be Neighbourhood of x0 such that A10: N c= N1 and A11: N c= N2 by RCOMP_1:17; A12: N c= dom f2 by A6,A11,XBOOLE_1:1; N c= dom f1 by A3,A10,XBOOLE_1:1; then N /\ N c= dom f1 /\ dom f2 by A12,XBOOLE_1:27; then A13: N c= dom (f1+f2) by VALUED_1:def 1; A14: R1 is total & R2 is total by Def2; A15: now let x; A16: x0 in N by RCOMP_1:16; assume A17: x in N; hence (f1+f2).x - (f1+f2).x0 = (f1.x+f2.x) - (f1+f2).x0 by A13, VALUED_1:def 1 .=f1.x+f2.x - (f1.x0+f2.x0) by A13,A16,VALUED_1:def 1 .=(f1.x - f1.x0) + (f2.x - f2.x0) .=L1.(x-x0)+R1.(x-x0) + (f2.x - f2.x0) by A5,A10,A17 .=L1.(x-x0)+R1.(x-x0) + (L2.(x-x0) + R2.(x-x0)) by A8,A11,A17 .=(L1.(x-x0)+L2.(x-x0)) + (R1.(x-x0) + R2.(x-x0)) .=L.(x-x0)+(R1.(x-x0) + R2.(x-x0)) by A9,RFUNCT_1:56 .=L.(x-x0)+R.(x-x0) by A14,RFUNCT_1:56; end; hence f1+f2 is_differentiable_in x0 by A13,Def4; hence diff(f1+f2,x0)=L.1 by A13,A15,Def5 .=L1.1 + L2.1 by A9,RFUNCT_1:56 .=diff(f1,x0) + L2.1 by A1,A3,A5,Def5 .=diff(f1,x0) + diff(f2,x0) by A2,A6,A8,Def5; end; theorem Th14: f1 is_differentiable_in x0 & f2 is_differentiable_in x0 implies f1-f2 is_differentiable_in x0 & diff(f1-f2,x0)=diff(f1,x0)-diff(f2,x0) proof assume that A1: f1 is_differentiable_in x0 and A2: f2 is_differentiable_in x0; consider N1 be Neighbourhood of x0 such that A3: N1 c= dom f1 and A4: ex L,R st for x st x in N1 holds f1.x - f1.x0 = L.(x-x0) + R.(x-x0) by A1,Def4; consider L1,R1 such that A5: for x st x in N1 holds f1.x - f1.x0 = L1.(x-x0) + R1.(x-x0) by A4; consider N2 be Neighbourhood of x0 such that A6: N2 c= dom f2 and A7: ex L,R st for x st x in N2 holds f2.x - f2.x0 = L.(x-x0) + R.(x-x0) by A2,Def4; consider L2,R2 such that A8: for x st x in N2 holds f2.x - f2.x0 = L2.(x-x0) + R2.(x-x0) by A7; reconsider R=R1-R2 as RestFunc by Th4; reconsider L=L1-L2 as LinearFunc by Th2; A9: L1 is total & L2 is total by Def3; consider N be Neighbourhood of x0 such that A10: N c= N1 and A11: N c= N2 by RCOMP_1:17; A12: N c= dom f2 by A6,A11,XBOOLE_1:1; N c= dom f1 by A3,A10,XBOOLE_1:1; then N /\ N c= dom f1 /\ dom f2 by A12,XBOOLE_1:27; then A13: N c= dom (f1-f2) by VALUED_1:12; A14: R1 is total & R2 is total by Def2; A15: now let x; A16: x0 in N by RCOMP_1:16; assume A17: x in N; hence (f1-f2).x - (f1-f2).x0 = (f1.x-f2.x) - (f1-f2).x0 by A13,VALUED_1:13 .=f1.x - f2.x - (f1.x0-f2.x0) by A13,A16,VALUED_1:13 .=f1.x - f1.x0 - (f2.x - f2.x0) .=L1.(x-x0) + R1.(x-x0) - (f2.x - f2.x0) by A5,A10,A17 .=L1.(x-x0) + R1.(x-x0) - (L2.(x-x0) + R2.(x-x0)) by A8,A11,A17 .=L1.(x-x0) - L2.(x-x0) + (R1.(x-x0) - R2.(x-x0)) .=L.(x-x0) + (R1.(x-x0) - R2.(x-x0)) by A9,RFUNCT_1:56 .=L.(x-x0) + R.(x-x0) by A14,RFUNCT_1:56; end; hence f1-f2 is_differentiable_in x0 by A13,Def4; hence diff(f1-f2,x0)=L.1 by A13,A15,Def5 .=L1.1 - L2.1 by A9,RFUNCT_1:56 .=diff(f1,x0) - L2.1 by A1,A3,A5,Def5 .=diff(f1,x0) - diff(f2,x0) by A2,A6,A8,Def5; end; theorem Th15: f is_differentiable_in x0 implies r(#)f is_differentiable_in x0 & diff((r(#)f),x0) = r*diff(f,x0) proof assume A1: f is_differentiable_in x0; then consider N1 be Neighbourhood of x0 such that A2: N1 c= dom f and A3: ex L,R st for x st x in N1 holds f.x - f.x0 = L.(x-x0) + R.(x-x0) by Def4; consider L1,R1 such that A4: for x st x in N1 holds f.x - f.x0 = L1.(x-x0) + R1.(x-x0) by A3; reconsider R = r(#)R1 as RestFunc by Th5; reconsider L = r(#)L1 as LinearFunc by Th3; A5: L1 is total by Def3; A6: N1 c= dom(r(#)f) by A2,VALUED_1:def 5; A7: R1 is total by Def2; A8: now let x; A9: x0 in N1 by RCOMP_1:16; assume A10: x in N1; hence (r(#)f).x - (r(#)f).x0 = r*(f.x) - (r(#)f).x0 by A6,VALUED_1:def 5 .= r*f.x - r*f.x0 by A6,A9,VALUED_1:def 5 .= r*(f.x - f.x0) .= r*(L1.(x-x0) + R1.(x-x0)) by A4,A10 .= r*L1.(x-x0) + r*R1.(x-x0) .= L.(x-x0) + r*R1.(x-x0) by A5,RFUNCT_1:57 .= L.(x-x0) + R.(x-x0) by A7,RFUNCT_1:57; end; hence r(#)f is_differentiable_in x0 by A6,Def4; hence diff((r(#)f),x0) = L.1 by A6,A8,Def5 .= r*L1.1 by A5,RFUNCT_1:57 .= r*diff(f,x0) by A1,A2,A4,Def5; end; theorem Th16: f1 is_differentiable_in x0 & f2 is_differentiable_in x0 implies f1(#)f2 is_differentiable_in x0 & diff(f1(#)f2,x0)=(f2.x0)*diff(f1,x0)+(f1.x0)* diff(f2,x0) proof assume that A1: f1 is_differentiable_in x0 and A2: f2 is_differentiable_in x0; consider N1 be Neighbourhood of x0 such that A3: N1 c= dom f1 and A4: ex L,R st for x st x in N1 holds f1.x - f1.x0 = L.(x-x0) + R.(x-x0) by A1,Def4; consider L1,R1 such that A5: for x st x in N1 holds f1.x - f1.x0 = L1.(x-x0) + R1.(x-x0) by A4; consider N2 be Neighbourhood of x0 such that A6: N2 c= dom f2 and A7: ex L,R st for x st x in N2 holds f2.x - f2.x0 = L.(x-x0) + R.(x-x0) by A2,Def4; consider L2,R2 such that A8: for x st x in N2 holds f2.x - f2.x0 = L2.(x-x0) + R2.(x-x0) by A7; reconsider R18=R2(#)L1 as RestFunc by Th7; reconsider R17=R1(#)R2 as RestFunc by Th4; A9: R18 is total by Def2; reconsider R16=R1(#)L2 as RestFunc by Th7; reconsider R14=L1(#)L2 as RestFunc by Th6; reconsider R19=R16+R17 as RestFunc by Th4; reconsider R20=R19+R18 as RestFunc by Th4; A10: R14 is total by Def2; reconsider R12=(f1.x0)(#)R2 as RestFunc by Th5; A11: R2 is total by Def2; reconsider L11=(f2.x0)(#)L1 as LinearFunc by Th3; A12: L1 is total by Def3; reconsider R11=(f2.x0)(#)R1 as RestFunc by Th5; A13: R1 is total by Def2; reconsider R13=R11+R12 as RestFunc by Th4; reconsider R15=R13+R14 as RestFunc by Th4; reconsider R=R15+R20 as RestFunc by Th4; consider N be Neighbourhood of x0 such that A14: N c= N1 and A15: N c= N2 by RCOMP_1:17; A16: N c= dom f2 by A6,A15,XBOOLE_1:1; N c= dom f1 by A3,A14,XBOOLE_1:1; then N /\ N c= dom f1 /\ dom f2 by A16,XBOOLE_1:27; then A17: N c= dom (f1(#)f2) by VALUED_1:def 4; reconsider L12=(f1.x0)(#)L2 as LinearFunc by Th3; A18: L2 is total by Def3; reconsider L=L11+L12 as LinearFunc by Th2; A19: R16 is total by Def2; A20: L11 is total & L12 is total by Def3; A21: now let x; assume A22: x in N; then A23: f1.x - f1.x0 + f1.x0 = L1.(x-x0) + R1.(x-x0) + f1.x0 by A5,A14; thus (f1(#)f2).x - (f1(#)f2).x0 = (f1.x) * (f2.x) - (f1(#) f2).x0 by VALUED_1:5 .=(f1.x)*(f2.x)+-(f1.x)*(f2.x0)+(f1.x)*(f2.x0)-(f1.x0)*(f2.x0) by VALUED_1:5 .=(f1.x)*((f2.x)-(f2.x0))+((f1.x)-(f1.x0))*(f2.x0) .=(f1.x)*((f2.x)-(f2.x0))+(L1.(x-x0)+R1.(x-x0))*(f2.x0) by A5,A14,A22 .=(f1.x)*((f2.x)-(f2.x0))+((f2.x0)*L1.(x-x0)+R1.(x-x0)*(f2.x0)) .=(f1.x)*((f2.x)-(f2.x0))+(L11.(x-x0)+(f2.x0)*R1.(x-x0)) by A12, RFUNCT_1:57 .=(L1.(x-x0) + R1.(x-x0) + f1.x0)*((f2.x)-(f2.x0))+(L11.(x-x0)+R11.(x- x0)) by A13,A23,RFUNCT_1:57 .=(L1.(x-x0) + R1.(x-x0) + f1.x0)*(L2.(x-x0) + R2.(x-x0))+ (L11.(x-x0) +R11.(x-x0)) by A8,A15,A22 .=(L1.(x-x0) + R1.(x-x0))*(L2.(x-x0) + R2.(x-x0))+ ((f1.x0)*L2.(x-x0)+ (f1.x0)*R2.(x-x0)) + (L11.(x-x0)+R11.(x-x0)) .=(L1.(x-x0) + R1.(x-x0))*(L2.(x-x0) + R2.(x-x0))+ (L12.(x-x0)+(f1.x0) *R2.(x-x0)) + (L11.(x-x0)+R11.(x-x0)) by A18,RFUNCT_1:57 .=(L1.(x-x0) + R1.(x-x0))*(L2.(x-x0) + R2.(x-x0))+ (L12.(x-x0)+R12.(x- x0)) + (L11.(x-x0)+R11.(x-x0)) by A11,RFUNCT_1:57 .=(L1.(x-x0) + R1.(x-x0))*(L2.(x-x0) + R2.(x-x0))+ (L12.(x-x0)+(L11.(x -x0)+(R11.(x-x0)+R12.(x-x0)))) .=(L1.(x-x0) + R1.(x-x0))*(L2.(x-x0) + R2.(x-x0))+ (L12.(x-x0)+(L11.(x -x0)+R13.(x-x0))) by A13,A11,RFUNCT_1:56 .=(L1.(x-x0) + R1.(x-x0))*(L2.(x-x0) + R2.(x-x0))+ (L11.(x-x0)+L12.(x- x0)+R13.(x-x0)) .=(L1.(x-x0)*L2.(x-x0)+L1.(x-x0)*R2.(x-x0))+R1.(x-x0)*(L2.(x-x0)+R2.(x -x0))+ (L.(x-x0)+R13.(x-x0)) by A20,RFUNCT_1:56 .=R14.(x-x0) + R2.(x-x0)*L1.(x-x0)+R1.(x-x0)*(L2.(x-x0)+R2.(x-x0))+ (L .(x-x0)+R13.(x-x0)) by A12,A18,RFUNCT_1:56 .=R14.(x-x0) + R18.(x-x0)+(R1.(x-x0)*L2.(x-x0)+R1.(x-x0)*R2.(x-x0))+ ( L.(x-x0)+R13.(x-x0)) by A12,A11,RFUNCT_1:56 .=R14.(x-x0) + R18.(x-x0)+(R16.(x-x0)+R1.(x-x0)*R2.(x-x0))+ (L.(x-x0)+ R13.(x-x0)) by A18,A13,RFUNCT_1:56 .=R14.(x-x0) + R18.(x-x0)+(R16.(x-x0)+R17.(x-x0))+ (L.(x-x0)+R13.(x-x0 )) by A13,A11,RFUNCT_1:56 .=R14.(x-x0) + R18.(x-x0)+R19.(x-x0)+(L.(x-x0)+R13.(x-x0)) by A13,A11,A19 ,RFUNCT_1:56 .=R14.(x-x0) + (R19.(x-x0)+R18.(x-x0))+(L.(x-x0)+R13.(x-x0)) .=L.(x-x0)+R13.(x-x0)+(R14.(x-x0) + R20.(x-x0)) by A13,A11,A19,A9, RFUNCT_1:56 .=L.(x-x0)+(R13.(x-x0)+R14.(x-x0) + R20.(x-x0)) .=L.(x-x0)+(R15.(x-x0)+R20.(x-x0)) by A13,A11,A10,RFUNCT_1:56 .=L.(x-x0)+R.(x-x0) by A13,A11,A10,A19,A9,RFUNCT_1:56; end; hence f1(#)f2 is_differentiable_in x0 by A17,Def4; hence diff(f1(#)f2,x0)=L.1 by A17,A21,Def5 .= L11.1 + L12.1 by A20,RFUNCT_1:56 .= f2.x0 * L1.1 + L12.1 by A12,RFUNCT_1:57 .= f2.x0 * L1.1 + f1.x0 *L2.1 by A18,RFUNCT_1:57 .= f2.x0 * diff(f1,x0) + f1.x0 * L2.1 by A1,A3,A5,Def5 .= f2.x0 * diff(f1,x0) + f1.x0 * diff(f2,x0) by A2,A6,A8,Def5; end; theorem Th17: Z c= dom f & f|Z = id Z implies f is_differentiable_on Z & for x st x in Z holds (f`|Z).x = 1 proof set R = cf; A1: dom R = REAL by FUNCOP_1:13; now let h; A2: now let n be Nat; A3: rng h c= dom R by A1; A4: n in NAT by ORDINAL1:def 12; hence ((h")(#)(R/*h)).n = (h".n)*((R/*h).n) by SEQ_1:8 .= (h".n)*(R.(h.n)) by A4,A3,FUNCT_2:108 .= (h".n)*0 by FUNCOP_1:7 .= 0; end; then A5: (h")(#)(R/*h) is constant by VALUED_0:def 18; hence (h")(#)(R/*h) is convergent; ((h")(#)(R/*h)).0 = 0 by A2; hence lim ((h")(#)(R/*h)) = 0 by A5,SEQ_4:25; end; then reconsider R as RestFunc by Def2; reconsider L = id REAL as PartFunc of REAL,REAL; for p holds L.p = 1*p by FUNCT_1:18; then reconsider L as LinearFunc by Def3; assume that A6: Z c= dom f and A7: f|Z = id Z; A8: now let x; assume A9: x in Z; then f|Z.x = x by A7,FUNCT_1:18; hence f.x = x by A9,FUNCT_1:49; end; A10: now let x0; assume A11: x0 in Z; then consider N being Neighbourhood of x0 such that A12: N c= Z by RCOMP_1:18; A13: for x st x in N holds f.x - f.x0 = L.(x-x0) + R.(x-x0) proof let x; assume x in N; hence f.x - f.x0 = x - f.x0 by A8,A12 .= x - x0 by A8,A11 .= L.(x-x0)+0 by FUNCT_1:18 .= L.(x-x0) + R.(x-x0) by FUNCOP_1:7; end; N c= dom f by A6,A12,XBOOLE_1:1; hence f is_differentiable_in x0 by A13,Def4; end; hence A14: f is_differentiable_on Z by A6,Th9; let x0; assume A15: x0 in Z; then consider N1 being Neighbourhood of x0 such that A16: N1 c= Z by RCOMP_1:18; A17: f is_differentiable_in x0 by A10,A15; then ex N being Neighbourhood of x0 st N c= dom f & ex L,R st for x st x in N holds f.x - f.x0 = L.(x-x0) + R.(x-x0) by Def4; then consider N being Neighbourhood of x0 such that A18: N c= dom f; consider N2 being Neighbourhood of x0 such that A19: N2 c= N1 and A20: N2 c= N by RCOMP_1:17; A21: N2 c= dom f by A18,A20,XBOOLE_1:1; A22: for x st x in N2 holds f.x - f.x0 = L.(x-x0) + R.(x-x0) proof let x; assume x in N2; then x in N1 by A19; hence f.x - f.x0 = x - f.x0 by A8,A16 .= x - x0 by A8,A15 .= L.(x-x0)+0 by FUNCT_1:18 .= L.(x-x0) + R.(x-x0) by FUNCOP_1:7; end; thus (f`|Z).x0 = diff(f,x0) by A14,A15,Def7 .= L.1 by A17,A21,A22,Def5 .= 1 by FUNCT_1:18; end; theorem Z c= dom (f1+f2) & f1 is_differentiable_on Z & f2 is_differentiable_on Z implies f1+f2 is_differentiable_on Z & for x st x in Z holds ((f1+f2)`|Z).x = diff(f1,x) + diff(f2,x) proof assume that A1: Z c= dom (f1+f2) and A2: f1 is_differentiable_on Z & f2 is_differentiable_on Z; now let x0; assume x0 in Z; then f1 is_differentiable_in x0 & f2 is_differentiable_in x0 by A2,Th9; hence f1+f2 is_differentiable_in x0 by Th13; end; hence A3: f1+f2 is_differentiable_on Z by A1,Th9; now let x; assume A4: x in Z; then A5: f1 is_differentiable_in x & f2 is_differentiable_in x by A2,Th9; thus ((f1+f2)`|Z).x = diff((f1+f2),x) by A3,A4,Def7 .= diff(f1,x) + diff(f2,x) by A5,Th13; end; hence thesis; end; theorem Z c= dom (f1-f2) & f1 is_differentiable_on Z & f2 is_differentiable_on Z implies f1-f2 is_differentiable_on Z & for x st x in Z holds ((f1-f2)`|Z).x = diff(f1,x) - diff(f2,x) proof assume that A1: Z c= dom (f1-f2) and A2: f1 is_differentiable_on Z & f2 is_differentiable_on Z; now let x0; assume x0 in Z; then f1 is_differentiable_in x0 & f2 is_differentiable_in x0 by A2,Th9; hence f1-f2 is_differentiable_in x0 by Th14; end; hence A3: f1-f2 is_differentiable_on Z by A1,Th9; now let x; assume A4: x in Z; then A5: f1 is_differentiable_in x & f2 is_differentiable_in x by A2,Th9; thus ((f1-f2)`|Z).x = diff((f1-f2),x) by A3,A4,Def7 .= diff(f1,x) - diff(f2,x) by A5,Th14; end; hence thesis; end; theorem Z c= dom (r(#)f) & f is_differentiable_on Z implies r(#)f is_differentiable_on Z & for x st x in Z holds ((r(#) f)`|Z).x =r*diff(f,x) proof assume that A1: Z c= dom (r(#)f) and A2: f is_differentiable_on Z; now let x0; assume x0 in Z; then f is_differentiable_in x0 by A2,Th9; hence r(#)f is_differentiable_in x0 by Th15; end; hence A3: r(#)f is_differentiable_on Z by A1,Th9; now let x; assume A4: x in Z; then A5: f is_differentiable_in x by A2,Th9; thus ((r(#)f)`|Z).x = diff((r(#)f),x) by A3,A4,Def7 .= r*diff(f,x) by A5,Th15; end; hence thesis; end; theorem Z c= dom (f1(#)f2) & f1 is_differentiable_on Z & f2 is_differentiable_on Z implies f1(#)f2 is_differentiable_on Z & for x st x in Z holds ((f1(#)f2)`|Z).x = (f2.x)*diff(f1,x) + (f1.x)*diff(f2,x) proof assume that A1: Z c= dom (f1(#)f2) and A2: f1 is_differentiable_on Z & f2 is_differentiable_on Z; now let x0; assume x0 in Z; then f1 is_differentiable_in x0 & f2 is_differentiable_in x0 by A2,Th9; hence f1(#)f2 is_differentiable_in x0 by Th16; end; hence A3: f1(#)f2 is_differentiable_on Z by A1,Th9; now let x; assume A4: x in Z; then A5: f1 is_differentiable_in x & f2 is_differentiable_in x by A2,Th9; thus ((f1(#)f2)`|Z).x = diff((f1(#)f2),x) by A3,A4,Def7 .= f2.x*diff(f1,x) + f1.x*diff(f2,x) by A5,Th16; end; hence thesis; end; theorem Z c= dom f & f|Z is constant implies f is_differentiable_on Z & for x st x in Z holds (f`|Z).x = 0 proof set R = cf; A1: dom R = REAL by FUNCOP_1:13; now let h; A2: now let n be Nat; A3: rng h c= dom R by A1; A4: n in NAT by ORDINAL1:def 12; hence ((h")(#)(R/*h)).n = (h".n)*((R/*h).n) by SEQ_1:8 .=(h".n)*(R.(h.n)) by A4,A3,FUNCT_2:108 .=(h".n)*0 by FUNCOP_1:7 .=0; end; then A5: (h")(#)(R/*h) is constant by VALUED_0:def 18; hence (h")(#)(R/*h) is convergent; ((h")(#)(R/*h)).0 = 0 by A2; hence lim ((h")(#)(R/*h)) = 0 by A5,SEQ_4:25; end; then reconsider R as RestFunc by Def2; set L = cf; for p holds L.p=0*p by FUNCOP_1:7; then reconsider L as LinearFunc by Def3; assume that A6: Z c= dom f and A7: f|Z is constant; consider r such that A8: for x st x in Z/\dom f holds f.x=r by A7,PARTFUN2:57; A9: now let x0; assume A10: x0 in Z; then consider N being Neighbourhood of x0 such that A11: N c= Z by RCOMP_1:18; A12: N c= dom f by A6,A11,XBOOLE_1:1; A13: x0 in Z/\dom f by A6,A10,XBOOLE_0:def 4; for x st x in N holds f.x-f.x0=L.(x-x0)+R.(x-x0) proof let x; assume x in N; then x in Z/\dom f by A11,A12,XBOOLE_0:def 4; hence f.x-f.x0=r-f.x0 by A8 .=r - r by A8,A13 .=L.(x-x0)+0 by FUNCOP_1:7 .=L.(x-x0)+R.(x-x0) by FUNCOP_1:7; end; hence f is_differentiable_in x0 by A12,Def4; end; hence A14: f is_differentiable_on Z by A6,Th9; let x0; assume A15: x0 in Z; then consider N being Neighbourhood of x0 such that A16: N c= Z by RCOMP_1:18; A17: N c= dom f by A6,A16,XBOOLE_1:1; A18: x0 in Z/\dom f by A6,A15,XBOOLE_0:def 4; A19: for x st x in N holds f.x-f.x0=L.(x-x0)+R.(x-x0) proof let x; assume x in N; then x in Z/\dom f by A16,A17,XBOOLE_0:def 4; hence f.x - f.x0 = r - f.x0 by A8 .=r - r by A8,A18 .=L.(x-x0) + 0 by FUNCOP_1:7 .=L.(x-x0) + R.(x-x0) by FUNCOP_1:7; end; A20: f is_differentiable_in x0 by A9,A15; thus (f`|Z).x0 = diff(f,x0) by A14,A15,Def7 .=L.1 by A20,A17,A19,Def5 .=0 by FUNCOP_1:7; end; theorem Z c= dom f & (for x st x in Z holds f.x = r*x + p) implies f is_differentiable_on Z & for x st x in Z holds (f`|Z).x = r proof set R = cf; defpred P[set] means $1 in REAL; A1: dom R = REAL by FUNCOP_1:13; now let h; A2: now let n be Nat; A3: rng h c= dom R by A1; A4: n in NAT by ORDINAL1:def 12; hence ((h")(#)(R/*h)).n = (h".n)*((R/*h).n) by SEQ_1:8 .=(h".n)*(R.(h.n)) by A4,A3,FUNCT_2:108 .=(h".n)*0 by FUNCOP_1:7 .=0; end; then A5: (h")(#)(R/*h) is constant by VALUED_0:def 18; hence (h")(#)(R/*h) is convergent; ((h")(#)(R/*h)).0 = 0 by A2; hence lim ((h")(#)(R/*h)) = 0 by A5,SEQ_4:25; end; then reconsider R as RestFunc by Def2; assume that A6: Z c= dom f and A7: for x st x in Z holds f.x = r*x + p; deffunc G(Real) = r*$1; consider L being PartFunc of REAL,REAL such that A8: (for x holds x in dom L iff P[x]) & for x st x in dom L holds L.x=G( x) from SEQ_1:sch 3; dom L = REAL by A8,Th1; then A9: L is total by PARTFUN1:def 2; A10: now let x; thus L.x=r*x by A8; end; then reconsider L as LinearFunc by A9,Def3; A11: now let x0; assume A12: x0 in Z; then consider N being Neighbourhood of x0 such that A13: N c= Z by RCOMP_1:18; A14: for x st x in N holds f.x-f.x0=L.(x-x0)+R.(x-x0) proof let x; assume x in N; hence f.x-f.x0=r*x+p-f.x0 by A7,A13 .=r*x+p - (r*x0+p) by A7,A12 .=r*(x-x0)+0 .=L.(x-x0)+0 by A10 .=L.(x-x0)+R.(x-x0) by FUNCOP_1:7; end; N c= dom f by A6,A13,XBOOLE_1:1; hence f is_differentiable_in x0 by A14,Def4; end; hence A15: f is_differentiable_on Z by A6,Th9; let x0; assume A16: x0 in Z; then consider N being Neighbourhood of x0 such that A17: N c= Z by RCOMP_1:18; A18: for x st x in N holds f.x-f.x0=L.(x-x0)+R.(x-x0) proof let x; assume x in N; hence f.x - f.x0 = r*x+p - f.x0 by A7,A17 .=r*x+p-(r*x0+p) by A7,A16 .=r*(x-x0)+0 .=L.(x-x0) + 0 by A10 .=L.(x-x0) + R.(x-x0) by FUNCOP_1:7; end; A19: N c= dom f by A6,A17,XBOOLE_1:1; A20: f is_differentiable_in x0 by A11,A16; thus (f`|Z).x0 = diff(f,x0) by A15,A16,Def7 .=L.1 by A20,A19,A18,Def5 .=r*1 by A10 .=r; end; theorem Th24: for x0 being real number holds f is_differentiable_in x0 implies f is_continuous_in x0 proof let x0 be real number; assume A1: f is_differentiable_in x0; then consider N being Neighbourhood of x0 such that A2: N c= dom f and ex L,R st for x st x in N holds f.x - f.x0 = L.(x-x0) + R.(x-x0) by Def4; now consider g be real number such that A3: 0 x0 as Real_Sequence by FUNCOP_1:45; let s1 such that A5: rng s1 c= dom f and A6: s1 is convergent and A7: lim s1 = x0 and A8: for n holds s1.n<>x0; consider l be Element of NAT such that A9: for m st l<=m holds abs(s1.m-x0)0 by A22; thus (h(#)(h"(#)(f/*(h+c) - f/*c))).n =h.n *(h"(#)(f/*(h+c) - f/*c)).n by SEQ_1:8 .=h.n*((h").n*(f/*(h+c) - f/*c).n) by SEQ_1:8 .=h.n*(((h.n)")*(f/*(h+c) - f/*c).n) by VALUED_1:10 .=h.n*((h.n)")*(f/*(h+c) - f/*c).n .=1*(f/*(h+c) - f/*c).n by A29,XCMPLX_0:def 7 .=(f/*(h+c) - f/*c).n; end; then A30: h(#)(h"(#)(f/*(h+c) - f/*c))=f/*(h+c)-f/*c by FUNCT_2:63; then A31: f/*(h+c)-f/*c is convergent by A27,SEQ_2:14; then A32: f/*(h+c)-f/*c+f/*c is convergent by A18,SEQ_2:5; hence f/*s1 is convergent by A25,SEQ_4:21; lim(f/*c)=f.x0 by A16,A18,SEQ_2:def 7; then lim(f/*(h+c)-f/*c+f/*c)=0+f.x0 by A28,A30,A31,A18,SEQ_2:6 .=f.x0; hence f.x0=lim(f/*s1) by A32,A25,SEQ_4:22; end; hence thesis by FCONT_1:2; end; theorem f is_differentiable_on X implies f|X is continuous proof assume A1: f is_differentiable_on X; let x be real number; assume x in dom(f|X); then x is Real & x in X by XREAL_0:def 1; then f|X is_differentiable_in x by A1,Def6; hence thesis by Th24; end; theorem Th26: f is_differentiable_on X & Z c= X implies f is_differentiable_on Z proof assume that A1: f is_differentiable_on X and A2: Z c= X; X c= dom f by A1,Def6; hence Z c= dom f by A2,XBOOLE_1:1; let x0; assume A3: x0 in Z; then f|X is_differentiable_in x0 by A1,A2,Def6; then consider N being Neighbourhood of x0 such that A4: N c= dom(f|X) and A5: ex L,R st for x st x in N holds (f|X).x-(f|X).x0=L.(x-x0)+R.(x-x0) by Def4; consider N1 being Neighbourhood of x0 such that A6: N1 c= Z by A3,RCOMP_1:18; consider N2 being Neighbourhood of x0 such that A7: N2 c= N and A8: N2 c= N1 by RCOMP_1:17; A9: N2 c= Z by A6,A8,XBOOLE_1:1; take N2; dom(f|X)=dom f/\X by RELAT_1:61; then dom(f|X) c=dom f by XBOOLE_1:17; then N c= dom f by A4,XBOOLE_1:1; then N2 c=dom f by A7,XBOOLE_1:1; then N2 c=dom f/\Z by A9,XBOOLE_1:19; hence A10: N2 c=dom(f|Z) by RELAT_1:61; consider L,R such that A11: for x st x in N holds (f|X).x-(f|X).x0=L.(x-x0)+R.(x-x0) by A5; take L,R; let x; assume A12: x in N2; then (f|X).x-(f|X).x0=L.(x-x0)+R.(x-x0) by A7,A11; then A13: (f|X).x-f.x0=L.(x-x0)+R.(x-x0) by A2,A3,FUNCT_1:49; x in N by A7,A12; then f.x-f.x0=L.(x-x0)+R.(x-x0) by A4,A13,FUNCT_1:47; then f.x-(f|Z).x0=L.(x-x0)+R.(x-x0) by A3,FUNCT_1:49; hence thesis by A10,A12,FUNCT_1:47; end; theorem ex R st R.0=0 & R is_continuous_in 0 proof A1: {} REAL is closed proof let a be Real_Sequence; assume rng a c= {} REAL & a is convergent; hence lim a in {}REAL by XBOOLE_1:3; end; ([#] REAL)` = {} REAL & REAL c= REAL & [#]REAL = REAL by XBOOLE_1:37; then reconsider Z = [#]REAL as open Subset of REAL by A1,RCOMP_1:def 5; set R = cf; reconsider f=R as PartFunc of REAL,REAL; A2: dom R = REAL by FUNCOP_1:13; now let h; A3: now let n be Nat; A4: rng h c= dom R by A2; A5: n in NAT by ORDINAL1:def 12; hence ((h")(#)(R/*h)).n = (h".n)*((R/*h).n) by SEQ_1:8 .= (h".n)*(R.(h.n)) by A5,A4,FUNCT_2:108 .= (h".n)*0 by FUNCOP_1:7 .= 0; end; then A6: (h")(#)(R/*h) is constant by VALUED_0:def 18; hence (h")(#)(R/*h) is convergent; ((h")(#)(R/*h)).0 = 0 by A3; hence lim ((h")(#)(R/*h)) = 0 by A6,SEQ_4:25; end; then reconsider R as RestFunc by Def2; set L = cf; for p holds L.p=0*p by FUNCOP_1:7; then reconsider L as LinearFunc by Def3; f|Z is constant; then consider r such that A7: for x st x in Z/\dom f holds f.x=r by PARTFUN2:57; A8: now let x0; assume x0 in Z; set N = the Neighbourhood of x0; A9: N c= dom f by A2; A10: x0 in Z/\dom f by A2; for x st x in N holds f.x-f.x0=L.(x-x0)+R.(x-x0) proof let x; assume x in N; then x in Z/\dom f by A9,XBOOLE_0:def 4; hence f.x-f.x0=r-f.x0 by A7 .=r - r by A7,A10 .=L.(x-x0)+0 by FUNCOP_1:7 .=L.(x-x0)+R.(x-x0) by FUNCOP_1:7; end; hence f is_differentiable_in x0 by A9,Def4; end; set x0 = the Real; f is_differentiable_in x0 by A8; then consider N being Neighbourhood of x0 such that N c= dom f and A11: ex L,R st for x st x in N holds f.x - f.x0 = L.(x-x0) + R.(x-x0) by Def4; c