:: FUNCT_2 semantic presentation

definition
let X be set ;
let Y be set ;
let R be Relation of X,Y;
attr a3 is quasi_total means :Def1: :: FUNCT_2:def 1
X = dom R if ( Y = {} implies X = {} )
otherwise R = {} ;
consistency
verum
;
end;

:: deftheorem Def1 defines quasi_total FUNCT_2:def 1 :
for X, Y being set
for R being Relation of X,Y holds
( ( ( Y = {} implies X = {} ) implies ( R is quasi_total iff X = dom R ) ) & ( Y = {} implies X = {} ( R is quasi_total iff R = {} ) ) );

registration
let X be set ;
let Y be set ;
cluster quasi_total Relation of a1,a2;
existence
ex b1 being PartFunc of X,Y st b1 is quasi_total
proof end;
end;

registration
let X be set ;
let Y be set ;
cluster total -> quasi_total Relation of a1,a2;
coherence
for b1 being PartFunc of X,Y st b1 is total holds
b1 is quasi_total
proof end;
end;

definition
let X be set ;
let Y be set ;
mode Function of a1,a2 is quasi_total PartFunc of a1,a2;
end;

theorem Th1: :: FUNCT_2:1
canceled;

theorem Th2: :: FUNCT_2:2
canceled;

theorem Th3: :: FUNCT_2:3
for f being Function holds f is Function of dom f, rng f
proof end;

theorem Th4: :: FUNCT_2:4
for Y being set
for f being Function st rng f c= Y holds
f is Function of dom f,Y
proof end;

theorem Th5: :: FUNCT_2:5
for X, Y being set
for f being Function st dom f = X & ( for x being set st x in X holds
f . x in Y ) holds
f is Function of X,Y
proof end;

theorem Th6: :: FUNCT_2:6
for X, Y, x being set
for f being Function of X,Y st Y <> {} & x in X holds
f . x in rng f
proof end;

theorem Th7: :: FUNCT_2:7
for X, Y, x being set
for f being Function of X,Y st Y <> {} & x in X holds
f . x in Y
proof end;

theorem Th8: :: FUNCT_2:8
for X, Y, Z being set
for f being Function of X,Y st ( Y = {} implies X = {} ) & rng f c= Z holds
f is Function of X,Z
proof end;

theorem Th9: :: FUNCT_2:9
for X, Y, Z being set
for f being Function of X,Y st ( Y = {} implies X = {} ) & Y c= Z holds
f is Function of X,Z
proof end;

scheme :: FUNCT_2:sch 28
s28{ F1() -> set , F2() -> set , P1[ set , set ] } :
ex f being Function of F1(),F2() st
for x being set st x in F1() holds
P1[x,f . x]
provided
E20: for x being set st x in F1() holds
ex y being set st
( y in F2() & P1[x,y] )
proof end;

scheme :: FUNCT_2:sch 48
s48{ F1() -> set , F2() -> set , F3( set ) -> set } :
ex f being Function of F1(),F2() st
for x being set st x in F1() holds
f . x = F3(x)
provided
E20: for x being set st x in F1() holds
F3(x) in F2()
proof end;

definition
let X be set ;
let Y be set ;
func Funcs c1,c2 -> set means :Def2: :: FUNCT_2:def 2
for x being set holds
( x in it iff ex f being Function st
( x = f & dom f = X & rng f c= Y ) );
existence
ex b1 being set st
for x being set holds
( x in b1 iff ex f being Function st
( x = f & dom f = X & rng f c= Y ) )
proof end;
uniqueness
for b1, b2 being set st ( for x being set holds
( x in b1 iff ex f being Function st
( x = f & dom f = X & rng f c= Y ) ) ) & ( for x being set holds
( x in b2 iff ex f being Function st
( x = f & dom f = X & rng f c= Y ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def2 defines Funcs FUNCT_2:def 2 :
for X, Y, b3 being set holds
( b3 = Funcs X,Y iff for x being set holds
( x in b3 iff ex f being Function st
( x = f & dom f = X & rng f c= Y ) ) );

theorem Th10: :: FUNCT_2:10
canceled;

theorem Th11: :: FUNCT_2:11
for X, Y being set
for f being Function of X,Y st ( Y = {} implies X = {} ) holds
f in Funcs X,Y
proof end;

theorem Th12: :: FUNCT_2:12
for X being set
for f being Function of X,X holds f in Funcs X,X
proof end;

registration
let X be set ;
let Y be non empty set ;
cluster Funcs a1,a2 -> non empty ;
coherence
not Funcs X,Y is empty
by ;
end;

registration
let X be set ;
cluster Funcs a1,a1 -> non empty ;
coherence
not Funcs X,X is empty
by ;
end;

theorem Th13: :: FUNCT_2:13
canceled;

theorem Th14: :: FUNCT_2:14
for X being set st X <> {} holds
Funcs X,{} = {}
proof end;

theorem Th15: :: FUNCT_2:15
canceled;

theorem Th16: :: FUNCT_2:16
for X, Y being set
for f being Function of X,Y st Y <> {} & ( for y being set st y in Y holds
ex x being set st
( x in X & y = f . x ) ) holds
rng f = Y
proof end;

theorem Th17: :: FUNCT_2:17
for X, Y, y being set
for f being Function of X,Y st y in rng f holds
ex x being set st
( x in X & f . x = y )
proof end;

theorem Th18: :: FUNCT_2:18
for X, Y being set
for f1, f2 being Function of X,Y st ( for x being set st x in X holds
f1 . x = f2 . x ) holds
f1 = f2
proof end;

theorem Th19: :: FUNCT_2:19
for X, Y, Z being set
for f being quasi_total Relation of X,Y
for g being quasi_total Relation of Y,Z st ( not Y = {} or Z = {} or X = {} ) holds
f * g is quasi_total
proof end;

theorem Th20: :: FUNCT_2:20
for X, Y, Z being set
for f being Function of X,Y
for g being Function of Y,Z st Y <> {} & Z <> {} & rng f = Y & rng g = Z holds
rng (g * f) = Z
proof end;

theorem Th21: :: FUNCT_2:21
for X, Y, x being set
for f being Function of X,Y
for g being Function st Y <> {} & x in X holds
(g * f) . x = g . (f . x)
proof end;

theorem Th22: :: FUNCT_2:22
for X, Y being set
for f being Function of X,Y st Y <> {} holds
( rng f = Y iff for Z being set st Z <> {} holds
for g, h being Function of Y,Z st g * f = h * f holds
g = h )
proof end;

theorem Th23: :: FUNCT_2:23
for X, Y being set
for f being Relation of X,Y holds
( (id X) * f = f & f * (id Y) = f )
proof end;

theorem Th24: :: FUNCT_2:24
for X, Y being set
for f being Function of X,Y
for g being Function of Y,X st f * g = id Y holds
rng f = Y
proof end;

theorem Th25: :: FUNCT_2:25
for X, Y being set
for f being Function of X,Y st ( Y = {} implies X = {} ) holds
( f is one-to-one iff for x1, x2 being set st x1 in X & x2 in X & f . x1 = f . x2 holds
x1 = x2 )
proof end;

theorem Th26: :: FUNCT_2:26
for X, Y, Z being set
for f being Function of X,Y
for g being Function of Y,Z st ( Z = {} implies Y = {} ) & ( Y = {} implies X = {} ) & g * f is one-to-one holds
f is one-to-one
proof end;

theorem Th27: :: FUNCT_2:27
for X, Y being set
for f being Function of X,Y st X <> {} & Y <> {} holds
( f is one-to-one iff for Z being set
for g, h being Function of Z,X st f * g = f * h holds
g = h )
proof end;

theorem Th28: :: FUNCT_2:28
for X, Y, Z being set
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 end;

theorem Th29: :: FUNCT_2:29
for X, Y being set
for f being Function of X,Y
for g being Function of Y,X st Y <> {} & g * f = id X holds
( f is one-to-one & rng g = X )
proof end;

theorem Th30: :: FUNCT_2:30
for X, Y, Z being set
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 end;

theorem Th31: :: FUNCT_2:31
for X, Y being set
for f being Function of X,Y st f is one-to-one & rng f = Y holds
f " is Function of Y,X
proof end;

theorem Th32: :: FUNCT_2:32
for X, Y, x being set
for f being Function of X,Y st Y <> {} & f is one-to-one & x in X holds
(f " ) . (f . x) = x
proof end;

theorem Th33: :: FUNCT_2:33
canceled;

theorem Th34: :: FUNCT_2:34
for X, Y being set
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 being set holds
( y in Y & g . y = x iff ( x in X & f . x = y ) ) ) holds
g = f "
proof end;

theorem Th35: :: FUNCT_2:35
for X, Y being set
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 end;

theorem Th36: :: FUNCT_2:36
for X, Y being set
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 end;

theorem Th37: :: FUNCT_2:37
for X, Y being set
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 end;

theorem Th38: :: FUNCT_2:38
for X, Y, Z being set
for f being Function of X,Y st ( Y = {} implies X = {} ) & Z c= X holds
f | Z is Function of Z,Y
proof end;

theorem Th39: :: FUNCT_2:39
canceled;

theorem Th40: :: FUNCT_2:40
for X, Y, Z being set
for f being Function of X,Y st X c= Z holds
f | Z = f
proof end;

theorem Th41: :: FUNCT_2:41
for X, Y, x, Z being set
for f being Function of X,Y st Y <> {} & x in X & f . x in Z holds
(Z | f) . x = f . x
proof end;

theorem Th42: :: FUNCT_2:42
canceled;

theorem Th43: :: FUNCT_2:43
for X, Y, P being set
for f being Function of X,Y st Y <> {} holds
for y being set st ex x being set st
( x in X & x in P & y = f . x ) holds
y in f .: P
proof end;

theorem Th44: :: FUNCT_2:44
for X, Y, P being set
for f being Function of X,Y holds f .: P c= Y ;

theorem Th45: :: FUNCT_2:45
for X, Y being set
for f being Function of X,Y st ( Y = {} implies X = {} ) holds
f .: X = rng f
proof end;

theorem Th46: :: FUNCT_2:46
for X, Y, Q being set
for f being Function of X,Y st Y <> {} holds
for x being set holds
( x in f " Q iff ( x in X & f . x in Q ) )
proof end;

theorem Th47: :: FUNCT_2:47
for X, Y, Q being set
for f being PartFunc of X,Y holds f " Q c= X ;

theorem Th48: :: FUNCT_2:48
for X, Y being set
for f being Function of X,Y st ( Y = {} implies X = {} ) holds
f " Y = X
proof end;

theorem Th49: :: FUNCT_2:49
for X, Y being set
for f being Function of X,Y holds
( ( for y being set st y in Y holds
f " {y} <> {} ) iff rng f = Y )
proof end;

theorem Th50: :: FUNCT_2:50
for X, Y, P being set
for f being Function of X,Y st ( Y = {} implies X = {} ) & P c= X holds
P c= f " (f .: P)
proof end;

theorem Th51: :: FUNCT_2:51
for X, Y being set
for f being Function of X,Y st ( Y = {} implies X = {} ) holds
f " (f .: X) = X
proof end;

theorem Th52: :: FUNCT_2:52
canceled;

theorem Th53: :: FUNCT_2:53
for X, Y, Z, Q being set
for f being Function of X,Y
for g being Function of Y,Z st ( Z = {} implies Y = {} ) & ( Y = {} implies X = {} ) holds
f " Q c= (g * f) " (g .: Q)
proof end;

theorem Th54: :: FUNCT_2:54
canceled;

theorem Th55: :: FUNCT_2:55
for Y being set
for f being Function st dom f = {} holds
f is Function of {} ,Y
proof end;

theorem Th56: :: FUNCT_2:56
canceled;

theorem Th57: :: FUNCT_2:57
canceled;

theorem Th58: :: FUNCT_2:58
canceled;

theorem Th59: :: FUNCT_2:59
for Y, P being set
for f being Function of {} ,Y holds f .: P = {}
proof end;

theorem Th60: :: FUNCT_2:60
for Y, Q being set
for f being Function of {} ,Y holds f " Q = {}
proof end;

theorem Th61: :: FUNCT_2:61
for x, Y being set
for f being Function of {x},Y st Y <> {} holds
f . x in Y
proof end;

theorem Th62: :: FUNCT_2:62
for x, Y being set
for f being Function of {x},Y st Y <> {} holds
rng f = {(f . x)}
proof end;

theorem Th63: :: FUNCT_2:63
canceled;

theorem Th64: :: FUNCT_2:64
for x, Y, P being set
for f being Function of {x},Y st Y <> {} holds
f .: P c= {(f . x)}
proof end;

theorem Th65: :: FUNCT_2:65
for X, y, x being set
for f being Function of X,{y} st x in X holds
f . x = y
proof end;

theorem Th66: :: FUNCT_2:66
for X, y being set
for f1, f2 being Function of X,{y} holds f1 = f2
proof end;

registration
let X be set ;
let f be quasi_total PartFunc of X,X, g be quasi_total PartFunc of X,X;
cluster a2 * a3 -> quasi_total PartFunc of a1,a1;
coherence
g * f is quasi_total PartFunc of X,X
proof end;
end;

theorem Th67: :: FUNCT_2:67
for X being set
for f being Function of X,X holds dom f = X
proof end;

theorem Th68: :: FUNCT_2:68
canceled;

theorem Th69: :: FUNCT_2:69
canceled;

theorem Th70: :: FUNCT_2:70
for X, x being set
for f being Function of X,X
for g being Function st x in X holds
(g * f) . x = g . (f . x)
proof end;

theorem Th71: :: FUNCT_2:71
canceled;

theorem Th72: :: FUNCT_2:72
canceled;

theorem Th73: :: FUNCT_2:73
for X being set
for f, g being Relation of X,X st rng f = X & rng g = X holds
rng (g * f) = X
proof end;

theorem Th74: :: FUNCT_2:74
canceled;

theorem Th75: :: FUNCT_2:75
for X being set
for f, g being Function of X,X st g * f = f & rng f = X holds
g = id X
proof end;

theorem Th76: :: FUNCT_2:76
for X being set
for f, g being Function of X,X st f * g = f & f is one-to-one holds
g = id X
proof end;

theorem Th77: :: FUNCT_2:77
for X being set
for f being Function of X,X holds
( f is one-to-one iff for x1, x2 being set st x1 in X & x2 in X & f . x1 = f . x2 holds
x1 = x2 )
proof end;

theorem Th78: :: FUNCT_2:78
canceled;

theorem Th79: :: FUNCT_2:79
for X being set
for f being Function of X,X holds f .: X = rng f
proof end;

theorem Th80: :: FUNCT_2:80
canceled;

theorem Th81: :: FUNCT_2:81
canceled;

theorem Th82: :: FUNCT_2:82
for X being set
for f being Function of X,X holds f " (f .: X) = X
proof end;

definition
let X be set , Y be set ;
let f be Relation of X,Y;
attr a3 is onto means :Def3: :: FUNCT_2:def 3
rng f = Y;
end;

:: deftheorem Def3 defines onto FUNCT_2:def 3 :
for X, Y being set
for f being Relation of X,Y holds
( f is onto iff rng f = Y );

definition
let X be set ;
let Y be set ;
let f be Function of X,Y;
attr a3 is bijective means :Def4: :: FUNCT_2:def 4
( f is one-to-one & f is onto );
end;

:: deftheorem Def4 defines bijective FUNCT_2:def 4 :
for X, Y being set
for f being Function of X,Y holds
( f is bijective iff ( f is one-to-one & f is onto ) );

registration
let X be set , Y be set ;
cluster bijective -> one-to-one onto Relation of a1,a2;
coherence
for b1 being Function of X,Y st b1 is bijective holds
( b1 is one-to-one & b1 is onto )
by ;
cluster one-to-one onto -> bijective Relation of a1,a2;
coherence
for b1 being Function of X,Y st b1 is one-to-one & b1 is onto holds
b1 is bijective
by ;
end;

registration
let X be set ;
cluster one-to-one onto bijective Relation of a1,a1;
existence
ex b1 being Function of X,X st b1 is bijective
proof end;
end;

definition
let X be set ;
mode Permutation of a1 is bijective Function of a1,a1;
end;

theorem Th83: :: FUNCT_2:83
for X being set
for f being Function of X,X st f is one-to-one & rng f = X holds
f is Permutation of X
proof end;

theorem Th84: :: FUNCT_2:84
canceled;

theorem Th85: :: FUNCT_2:85
for X being set
for f being Function of X,X st f is one-to-one holds
for x1, x2 being set st x1 in X & x2 in X & f . x1 = f . x2 holds
x1 = x2 by ;

registration
let X be set ;
let f be onto PartFunc of X,X, g be onto PartFunc of X,X;
cluster a3 * a2 -> onto PartFunc of a1,a1;
coherence
f * g is onto PartFunc of X,X
proof end;
end;

registration
let f be one-to-one Function, g be one-to-one Function;
cluster a1 * a2 -> one-to-one Function;
coherence
g * f is one-to-one Function
by FUNCT_1:46;
end;

registration
let X be set ;
let f be bijective Function of X,X, g be bijective Function of X,X;
cluster a2 * a3 -> one-to-one onto bijective Function of a1,a1;
coherence
g * f is bijective Function of X,X
;
end;

registration
let X be set ;
cluster reflexive total -> one-to-one onto bijective Relation of a1,a1;
coherence
for b1 being Function of X,X st b1 is reflexive & b1 is total holds
b1 is bijective
proof end;
end;

definition
let X be set ;
let f be Permutation of X;
redefine func " as c2 " -> Permutation of a1;
coherence
f " is Permutation of X
proof end;
end;

theorem Th86: :: FUNCT_2:86
for X being set
for f, g being Permutation of X st g * f = g holds
f = id X
proof end;

theorem Th87: :: FUNCT_2:87
for X being set
for f, g being Permutation of X st g * f = id X holds
g = f "
proof end;

theorem Th88: :: FUNCT_2:88
for X being set
for f being Permutation of X holds
( (f " ) * f = id X & f * (f " ) = id X )
proof end;

theorem Th89: :: FUNCT_2:89
canceled;

theorem Th90: :: FUNCT_2:90
canceled;

theorem Th91: :: FUNCT_2:91
canceled;

theorem Th92: :: FUNCT_2:92
for X, P being set
for f being Permutation of X st P c= X holds
( f .: (f " P) = P & f " (f .: P) = P )
proof end;

registration
let X be set ;
let D be non empty set ;
cluster quasi_total -> total quasi_total Relation of a1,a2;
coherence
for b1 being PartFunc of X,D st b1 is quasi_total holds
b1 is total
proof end;
end;

registration
let X be set ;
let D be non empty set ;
let Z be set ;
let f be Function of X,D;
let g be Function of D,Z;
cluster a4 * a5 -> quasi_total PartFunc of a1,a3;
coherence
g * f is quasi_total PartFunc of X,Z
by ;
end;

definition
let C be non empty set ;
let D be set ;
let f be Function of C,D;
let c be Element of C;
redefine func . as c3 . c4 -> Element of a2;
coherence
f . c is Element of D
proof end;
end;

scheme :: FUNCT_2:sch 76
s76{ F1() -> non empty set , F2() -> non empty set , P1[ set , set ] } :
ex f being Function of F1(),F2() st
for x being Element of F1() holds P1[x,f . x]
provided
E20: for x being Element of F1() ex y being Element of F2() st P1[x,y]
proof end;

scheme :: FUNCT_2:sch 77
s77{ F1() -> non empty set , F2() -> non empty set , F3( Element of F1()) -> Element of F2() } :
ex f being Function of F1(),F2() st
for x being Element of F1() holds f . x = F3(x)
proof end;

theorem Th93: :: FUNCT_2:93
canceled;

theorem Th94: :: FUNCT_2:94
canceled;

theorem Th95: :: FUNCT_2:95
canceled;

theorem Th96: :: FUNCT_2:96
canceled;

theorem Th97: :: FUNCT_2:97
canceled;

theorem Th98: :: FUNCT_2:98
canceled;

theorem Th99: :: FUNCT_2:99
canceled;

theorem Th100: :: FUNCT_2:100
canceled;

theorem Th101: :: FUNCT_2:101
canceled;

theorem Th102: :: FUNCT_2:102
canceled;

theorem Th103: :: FUNCT_2:103
canceled;

theorem Th104: :: FUNCT_2:104
canceled;

theorem Th105: :: FUNCT_2:105
canceled;

theorem Th106: :: FUNCT_2:106
canceled;

theorem Th107: :: FUNCT_2:107
canceled;

theorem Th108: :: FUNCT_2:108
canceled;

theorem Th109: :: FUNCT_2:109
canceled;

theorem Th110: :: FUNCT_2:110
canceled;

theorem Th111: :: FUNCT_2:111
canceled;

theorem Th112: :: FUNCT_2:112
canceled;

theorem Th113: :: FUNCT_2:113
for X, Y being set
for f1, f2 being Function of X,Y st ( for x being Element of X holds f1 . x = f2 . x ) holds
f1 = f2
proof end;

theorem Th114: :: FUNCT_2:114
canceled;

theorem Th115: :: FUNCT_2:115
for X, Y, P being set
for f being Function of X,Y
for y being set st y in f .: P holds
ex x being set st
( x in X & x in P & y = f . x )
proof end;

theorem Th116: :: FUNCT_2:116
for X, Y, P being set
for f being Function of X,Y
for y being set st y in f .: P holds
ex c being Element of X st
( c in P & y = f . c )
proof end;

theorem Th117: :: FUNCT_2:117
canceled;

theorem Th118: :: FUNCT_2:118
canceled;

theorem Th119: :: FUNCT_2:119
canceled;

theorem Th120: :: FUNCT_2:120
canceled;

theorem Th121: :: FUNCT_2:121
for X, Y, f being set st f in Funcs X,Y holds
f is Function of X,Y
proof end;

scheme :: FUNCT_2:sch 82
s82{ F1() -> set , F2() -> set , P1[ set ], F3( set ) -> set , F4( set ) -> set } :
ex f being Function of F1(),F2() st
for x being set st x in F1() holds
( ( P1[x] implies f . x = F3(x) ) & ( P1[x] implies f . x = F4(x) ) )
provided
E20: for x being set st x in F1() holds
( ( P1[x] implies F3(x) in F2() ) & ( P1[x] implies F4(x) in F2() ) )
proof end;

theorem Th122: :: FUNCT_2:122
canceled;

theorem Th123: :: FUNCT_2:123
canceled;

theorem Th124: :: FUNCT_2:124
canceled;

theorem Th125: :: FUNCT_2:125
canceled;

theorem Th126: :: FUNCT_2:126
canceled;

theorem Th127: :: FUNCT_2:127
canceled;

theorem Th128: :: FUNCT_2:128
canceled;

theorem Th129: :: FUNCT_2:129
canceled;

theorem Th130: :: FUNCT_2:130
for X, Y being set
for f being PartFunc of X,Y st dom f = X holds
f is Function of X,Y
proof end;

theorem Th131: :: FUNCT_2:131
for X, Y being set
for f being PartFunc of X,Y st f is total holds
f is Function of X,Y
proof end;

theorem Th132: :: FUNCT_2:132
for X, Y being set
for f being PartFunc of X,Y st ( Y = {} implies X = {} ) & f is Function of X,Y holds
f is total
proof end;

theorem Th133: :: FUNCT_2:133
for X, Y being set
for f being Function of X,Y st ( Y = {} implies X = {} ) holds
<:f,X,Y:> is total
proof end;

theorem Th134: :: FUNCT_2:134
for X being set
for f being Function of X,X holds <:f,X,X:> is total
proof end;

theorem Th135: :: FUNCT_2:135
canceled;

theorem Th136: :: FUNCT_2:136
for X, Y being set
for f being PartFunc of X,Y st ( Y = {} implies X = {} ) holds
ex g being Function of X,Y st
for x being set st x in dom f holds
g . x = f . x
proof end;

theorem Th137: :: FUNCT_2:137
canceled;

theorem Th138: :: FUNCT_2:138
canceled;

theorem Th139: :: FUNCT_2:139
canceled;

theorem Th140: :: FUNCT_2:140
canceled;

theorem Th141: :: FUNCT_2:141
for X, Y being set holds Funcs X,Y c= PFuncs X,Y
proof end;

theorem Th142: :: FUNCT_2:142
for X, Y being set
for f, g being Function of X,Y st ( Y = {} implies X = {} ) & f tolerates g holds
f = g
proof end;

theorem Th143: :: FUNCT_2:143
for X being set
for f, g being Function of X,X st f tolerates g holds
f = g
proof end;

theorem Th144: :: FUNCT_2:144
canceled;

theorem Th145: :: FUNCT_2:145
for X, Y being set
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 being set st x in dom f holds
f . x = g . x )
proof end;

theorem Th146: :: FUNCT_2:146
for X being set
for f being PartFunc of X,X
for g being Function of X,X holds
( f tolerates g iff for x being set st x in dom f holds
f . x = g . x )
proof end;

theorem Th147: :: FUNCT_2:147
canceled;

theorem Th148: :: FUNCT_2:148
for X, Y being set
for f being PartFunc of X,Y st ( Y = {} implies X = {} ) holds
ex g being Function of X,Y st f tolerates g
proof end;

theorem Th149: :: FUNCT_2:149
for X being set
for f being PartFunc of X,X ex g being Function of X,X st f tolerates g
proof end;

theorem Th150: :: FUNCT_2:150
canceled;

theorem Th151: :: FUNCT_2:151
for X, Y being set
for f, g being PartFunc of X,Y
for h being Function of X,Y st ( Y = {} implies X = {} ) & f tolerates h & g tolerates h holds
f tolerates g
proof end;

theorem Th152: :: FUNCT_2:152
for X being set
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
proof end;

theorem Th153: :: FUNCT_2:153
canceled;

theorem Th154: :: FUNCT_2:154
for X, Y being set
for f, g being PartFunc of X,Y st ( Y = {} implies X = {} ) & f tolerates g holds
ex h being Function of X,Y st
( f tolerates h & g tolerates h )
proof end;

theorem Th155: :: FUNCT_2:155
for X, Y being set
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
proof end;

theorem Th156: :: FUNCT_2:156
for X being set
for f being PartFunc of X,X
for g being Function of X,X st f tolerates g holds
g in TotFuncs f
proof end;

theorem Th157: :: FUNCT_2:157
canceled;

theorem Th158: :: FUNCT_2:158
for X, Y being set
for f being PartFunc of X,Y
for g being set st g in TotFuncs f holds
g is Function of X,Y
proof end;

theorem Th159: :: FUNCT_2:159
for X, Y being set
for f being PartFunc of X,Y holds TotFuncs f c= Funcs X,Y
proof end;

theorem Th160: :: FUNCT_2:160
for X, Y being set holds TotFuncs <:{} ,X,Y:> = Funcs X,Y
proof end;

theorem Th161: :: FUNCT_2:161
for X, Y being set
for f being Function of X,Y st ( Y = {} implies X = {} ) holds
TotFuncs <:f,X,Y:> = {f}
proof end;

theorem Th162: :: FUNCT_2:162
for X being set
for f being Function of X,X holds TotFuncs <:f,X,X:> = {f}
proof end;

theorem Th163: :: FUNCT_2:163
canceled;

theorem Th164: :: FUNCT_2:164
for X, y being set
for f being PartFunc of X,{y}
for g being Function of X,{y} holds TotFuncs f = {g}
proof end;

theorem Th165: :: FUNCT_2:165
for X, Y being set
for f, g being PartFunc of X,Y st g c= f holds
TotFuncs f c= TotFuncs g
proof end;

theorem Th166: :: FUNCT_2:166
for X, Y being set
for f, g being PartFunc of X,Y st dom g c= dom f & TotFuncs f c= TotFuncs g holds
g c= f
proof end;

theorem Th167: :: FUNCT_2:167
for X, Y being set
for f, g being PartFunc of X,Y st TotFuncs f c= TotFuncs g & ( for y being set holds Y <> {y} ) holds
g c= f
proof end;

theorem Th168: :: FUNCT_2:168
for X, Y being set
for f, g being PartFunc of X,Y st ( for y being set holds Y <> {y} ) & TotFuncs f = TotFuncs g holds
f = g
proof end;

registration
let A be non empty set , B be non empty set ;
cluster -> non empty total Relation of a1,a2;
coherence
for b1 being Function of A,B holds not b1 is empty
by , RELAT_1:60;
end;

definition
let o be set , m be set , r be set ;
func c1,c2 :-> c3 -> Function of [:{a1},{a2}:],{a3} means :: FUNCT_2:def 5
verum;
existence
ex b1 being Function of [:{o},{m}:],{r} st verum
;
uniqueness
for b1, b2 being Function of [:{o},{m}:],{r} holds b1 = b2
by ;
end;

:: deftheorem Def5 defines :-> FUNCT_2:def 5 :
for o, m, r being set
for b4 being Function of [:{o},{m}:],{r} holds
( b4 = o,m :-> r iff verum );

scheme :: FUNCT_2:sch 104
s104{ F1() -> non empty set , F2() -> non empty set , F3() -> Element of F1(), F4() -> Element of F2(), F5( set ) -> Element of F2() } :
ex f being Function of F1(),F2() st
( f . F3() = F4() & ( for x being Element of F1() st x <> F3() holds
f . x = F5(x) ) )
proof end;

scheme :: FUNCT_2:sch 105
s105{ F1() -> non empty set , F2() -> non empty set , F3() -> Element of F1(), F4() -> Element of F1(), F5() -> Element of F2(), F6() -> Element of F2(), F7( set ) -> Element of F2() } :
ex f being Function of F1(),F2() st
( f . F3() = F5() & f . F4() = F6() & ( for x being Element of F1() st x <> F3() & x <> F4() holds
f . x = F7(x) ) )
provided
E20: F3() <> F4()
proof end;

theorem Th169: :: FUNCT_2:169
for A, B being set
for f being Function st f in Funcs A,B holds
( dom f = A & rng f c= B )
proof end;

scheme :: FUNCT_2:sch 108
s108{ F1() -> non empty set , F2() -> set , F3( set ) -> set } :
ex f being Function of F1(),F2() st
for x being Element of F1() holds f . x = F3(x)
provided
E20: for x being Element of F1() holds F3(x) in F2()
proof end;

scheme :: FUNCT_2:sch 109
s109{ F1() -> non empty set , F2() -> non empty set , F3( set ) -> set } :
ex f being Function of F1(),F2() st
for x being Element of F1() holds f . x = F3(x)
provided
E20: for x being Element of F1() holds F3(x) is Element of F2()
proof end;

scheme :: FUNCT_2:sch 110
s110{ F1() -> non empty set , F2() -> non empty set , P1[ set , set ] } :
ex f being Function of F1(),F2() st
for x being Element of F1() holds P1[x,f . x]
provided
E20: for x being Element of F1() ex y being Element of F2() st P1[x,y]
proof end;

definition
let A be non empty set , B be non empty set , C be non empty set ;
let f be Function of A,[:B,C:];
redefine func pr1 as pr1 c4 -> Function of a1,a2 means :: FUNCT_2:def 6
for x being Element of A holds it . x = (f . x) `1 ;
coherence
pr1 f is Function of A,B
proof end;
compatibility
for b1 being Function of A,B holds
( b1 = pr1 f iff for x being Element of A holds b1 . x = (f . x) `1 )
proof end;
redefine func pr2 as pr2 c4 -> Function of a1,a3 means :: FUNCT_2:def 7
for x being Element of A holds it . x = (f . x) `2 ;
coherence
pr2 f is Function of A,C
proof end;
compatibility
for b1 being Function of A,C holds
( b1 = pr2 f iff for x being Element of A holds b1 . x = (f . x) `2 )
proof end;
end;

:: deftheorem Def6 defines pr1 FUNCT_2:def 6 :
for A, B, C being non empty set
for f being Function of A,[:B,C:]
for b5 being Function of A,B holds
( b5 = pr1 f iff for x being Element of A holds b5 . x = (f . x) `1 );

:: deftheorem Def7 defines pr2 FUNCT_2:def 7 :
for A, B, C being non empty set
for f being Function of A,[:B,C:]
for b5 being Function of A,C holds
( b5 = pr2 f iff for x being Element of A holds b5 . x = (f . x) `2 );

definition
let A1 be set ;
let B1 be non empty set ;
let A2 be set ;
let B2 be non empty set ;
let f1 be Function of A1,B1;
let f2 be Function of A2,B2;
redefine pred = as c5 = c6 means :: FUNCT_2:def 8
( A1 = A2 & ( for a being Element of A1 holds f1 . a = f2 . a ) );
compatibility
( f1 = f2 iff ( A1 = A2 & ( for a being Element of A1 holds f1 . a = f2 . a ) ) )
proof end;
end;

:: deftheorem Def8 defines = FUNCT_2:def 8 :
for A1 being set
for B1 being non empty set
for A2 being set
for B2 being non empty set
for f1 being Function of A1,B1
for f2 being Function of A2,B2 holds
( f1 = f2 iff ( A1 = A2 & ( for a being Element of A1 holds f1 . a = f2 . a ) ) );

definition
let A be set ;
let B be non empty set ;
let f1 be Function of A,B, f2 be Function of A,B;
redefine pred = as c3 = c4 means :: FUNCT_2:def 9
for a being Element of A holds f1 . a = f2 . a;
compatibility
( f1 = f2 iff for a being Element of A holds f1 . a = f2 . a )
by Th4;
end;

:: deftheorem Def9 defines = FUNCT_2:def 9 :
for A being set
for B being non empty set
for f1, f2 being Function of A,B holds
( f1 = f2 iff for a being Element of A holds f1 . a = f2 . a );

theorem Th170: :: FUNCT_2:170
for N being set
for f being Function of N, bool N ex R being Relation of N st
for i being set st i in N holds
R .: {i} = f . i
proof end;