:: FUNCOP_1 semantic presentation

theorem Th1: :: FUNCOP_1:1
for R being Relation
for A, B being set st A <> {} & B <> {} & R = [:A,B:] holds
( dom R = A & rng R = B )
proof end;

theorem Th2: :: FUNCOP_1:2
for A being set holds delta A = <:(id A),(id A):>
proof end;

theorem Th3: :: FUNCOP_1:3
for f, g, h being Function st dom f = dom g holds
dom (f * h) = dom (g * h)
proof end;

theorem Th4: :: FUNCOP_1:4
for f, g being Function st dom f = {} & dom g = {} holds
f = g
proof end;

definition
let f be Function;
func c1 ~ -> Function means :Def1: :: FUNCOP_1:def 1
( dom it = dom f & ( for x being set st x in dom f holds
( ( for y, z being set st f . x = [y,z] holds
it . x = [z,y] ) & ( f . x = it . x or ex y, z being set st f . x = [y,z] ) ) ) );
existence
ex b1 being Function st
( dom b1 = dom f & ( for x being set st x in dom f holds
( ( for y, z being set st f . x = [y,z] holds
b1 . x = [z,y] ) & ( f . x = b1 . x or ex y, z being set st f . x = [y,z] ) ) ) )
proof end;
uniqueness
for b1, b2 being Function st dom b1 = dom f & ( for x being set st x in dom f holds
( ( for y, z being set st f . x = [y,z] holds
b1 . x = [z,y] ) & ( f . x = b1 . x or ex y, z being set st f . x = [y,z] ) ) ) & dom b2 = dom f & ( for x being set st x in dom f holds
( ( for y, z being set st f . x = [y,z] holds
b2 . x = [z,y] ) & ( f . x = b2 . x or ex y, z being set st f . x = [y,z] ) ) ) holds
b1 = b2
proof end;
involutiveness
for b1, b2 being Function st dom b1 = dom b2 & ( for x being set st x in dom b2 holds
( ( for y, z being set st b2 . x = [y,z] holds
b1 . x = [z,y] ) & ( b2 . x = b1 . x or ex y, z being set st b2 . x = [y,z] ) ) ) holds
( dom b2 = dom b1 & ( for x being set st x in dom b1 holds
( ( for y, z being set st b1 . x = [y,z] holds
b2 . x = [z,y] ) & ( b1 . x = b2 . x or ex y, z being set st b1 . x = [y,z] ) ) ) )
proof end;
end;

:: deftheorem Def1 defines ~ FUNCOP_1:def 1 :
for f, b2 being Function holds
( b2 = f ~ iff ( dom b2 = dom f & ( for x being set st x in dom f holds
( ( for y, z being set st f . x = [y,z] holds
b2 . x = [z,y] ) & ( f . x = b2 . x or ex y, z being set st f . x = [y,z] ) ) ) ) );

theorem Th5: :: FUNCOP_1:5
canceled;

theorem Th6: :: FUNCOP_1:6
for f, g being Function holds <:f,g:> = <:g,f:> ~
proof end;

theorem Th7: :: FUNCOP_1:7
for f being Function
for A being set holds (f | A) ~ = (f ~ ) | A
proof end;

theorem Th8: :: FUNCOP_1:8
canceled;

theorem Th9: :: FUNCOP_1:9
for A being set holds (delta A) ~ = delta A
proof end;

theorem Th10: :: FUNCOP_1:10
for f, g being Function
for A being set holds <:f,g:> | A = <:(f | A),g:>
proof end;

theorem Th11: :: FUNCOP_1:11
for f, g being Function
for A being set holds <:f,g:> | A = <:f,(g | A):>
proof end;

definition
let A be set , z be set ;
func c1 --> c2 -> set equals :: FUNCOP_1:def 2
[:A,{z}:];
coherence
[:A,{z}:] is set
;
end;

:: deftheorem Def2 defines --> FUNCOP_1:def 2 :
for A, z being set holds A --> z = [:A,{z}:];

registration
let A be set , z be set ;
cluster a1 --> a2 -> Relation-like Function-like ;
coherence
( A --> z is Function-like & A --> z is Relation-like )
proof end;
end;

theorem Th12: :: FUNCOP_1:12
canceled;

theorem Th13: :: FUNCOP_1:13
for A, x, z being set st x in A holds
(A --> z) . x = z
proof end;

theorem Th14: :: FUNCOP_1:14
for A, x being set st A <> {} holds
rng (A --> x) = {x} by ;

theorem Th15: :: FUNCOP_1:15
for f being Function
for x being set st rng f = {x} holds
f = (dom f) --> x
proof end;

registration
let x be set ;
cluster {} --> a1 -> Relation-like Function-like empty ;
coherence
{} --> x is empty
by ZFMISC_1:113;
end;

registration
let x be set ;
let A be empty set ;
cluster a2 --> a1 -> Relation-like Function-like empty ;
coherence
A --> x is empty
proof end;
end;

theorem Th16: :: FUNCOP_1:16
for x being set holds
( dom ({} --> x) = {} & rng ({} --> x) = {} ) ;

theorem Th17: :: FUNCOP_1:17
for f being Function
for x being set st ( for z being set st z in dom f holds
f . z = x ) holds
f = (dom f) --> x
proof end;

theorem Th18: :: FUNCOP_1:18
for A, x, B being set holds (A --> x) | B = (A /\ B) --> x
proof end;

theorem Th19: :: FUNCOP_1:19
for A, x being set holds
( dom (A --> x) = A & rng (A --> x) c= {x} )
proof end;

theorem Th20: :: FUNCOP_1:20
for A, x, B being set st x in B holds
(A --> x) " B = A
proof end;

theorem Th21: :: FUNCOP_1:21
for A, x being set holds (A --> x) " {x} = A
proof end;

theorem Th22: :: FUNCOP_1:22
for A, x, B being set st not x in B holds
(A --> x) " B = {}
proof end;

theorem Th23: :: FUNCOP_1:23
for h being Function
for A, x being set st x in dom h holds
h * (A --> x) = A --> (h . x)
proof end;

theorem Th24: :: FUNCOP_1:24
for h being Function
for A, x being set st A <> {} & x in dom h holds
dom (h * (A --> x)) <> {}
proof end;

theorem Th25: :: FUNCOP_1:25
for h being Function
for A, x being set holds (A --> x) * h = (h " A) --> x
proof end;

theorem Th26: :: FUNCOP_1:26
for A, x, y being set holds (A --> [x,y]) ~ = A --> [y,x]
proof end;

definition
let F be Function;
let f be Function;
let g be Function;
func c1 .: c2,c3 -> set equals :: FUNCOP_1:def 3
F * <:f,g:>;
correctness
coherence
F * <:f,g:> is set
;
;
end;

:: deftheorem Def3 defines .: FUNCOP_1:def 3 :
for F, f, g being Function holds F .: f,g = F * <:f,g:>;

registration
let F be Function;
let f be Function;
let g be Function;
cluster a1 .: a2,a3 -> Relation-like Function-like ;
coherence
( F .: f,g is Function-like & F .: f,g is Relation-like )
;
end;

Lemma61: for f, g, F being Function
for x being set st x in dom (F * <:f,g:>) holds
(F * <:f,g:>) . x = F . (f . x),(g . x)
proof end;

theorem Th27: :: FUNCOP_1:27
for f, g, F, h being Function 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 end;

theorem Th28: :: FUNCOP_1:28
for f, g, F being Function
for x being set st x in dom (F .: f,g) holds
(F .: f,g) . x = F . (f . x),(g . x) by ;

theorem Th29: :: FUNCOP_1:29
for f, g, h being Function
for A being set
for F being Function st f | A = g | A holds
(F .: f,h) | A = (F .: g,h) | A
proof end;

theorem Th30: :: FUNCOP_1:30
for f, g, h being Function
for A being set
for F being Function st f | A = g | A holds
(F .: h,f) | A = (F .: h,g) | A
proof end;

theorem Th31: :: FUNCOP_1:31
for f, g, h, F being Function holds (F .: f,g) * h = F .: (f * h),(g * h)
proof end;

theorem Th32: :: FUNCOP_1:32
for h, f, g, F being Function holds h * (F .: f,g) = (h * F) .: f,g by RELAT_1:55;

definition
let F be Function;
let f be Function;
let x be set ;
func c1 [:] c2,c3 -> set equals :: FUNCOP_1:def 4
F * <:f,((dom f) --> x):>;
correctness
coherence
F * <:f,((dom f) --> x):> is set
;
;
end;

:: deftheorem Def4 defines [:] FUNCOP_1:def 4 :
for F, f being Function
for x being set holds F [:] f,x = F * <:f,((dom f) --> x):>;

registration
let F be Function;
let f be Function;
let x be set ;
cluster a1 [:] a2,a3 -> Relation-like Function-like ;
coherence
( F [:] f,x is Function-like & F [:] f,x is Relation-like )
;
end;

theorem Th33: :: FUNCOP_1:33
canceled;

theorem Th34: :: FUNCOP_1:34
for f, F being Function
for x being set holds F [:] f,x = F .: f,((dom f) --> x) ;

theorem Th35: :: FUNCOP_1:35
for f, F being Function
for x, z being set st x in dom (F [:] f,z) holds
(F [:] f,z) . x = F . (f . x),z
proof end;

theorem Th36: :: FUNCOP_1:36
for f, g being Function
for A being set
for F being Function
for x being set st f | A = g | A holds
(F [:] f,x) | A = (F [:] g,x) | A
proof end;

theorem Th37: :: FUNCOP_1:37
for f, h, F being Function
for x being set holds (F [:] f,x) * h = F [:] (f * h),x
proof end;

theorem Th38: :: FUNCOP_1:38
for h, f, F being Function
for x being set holds h * (F [:] f,x) = (h * F) [:] f,x by RELAT_1:55;

theorem Th39: :: FUNCOP_1:39
for f being Function
for A being set
for F being Function
for x being set holds (F [:] f,x) * (id A) = F [:] (f | A),x
proof end;

definition
let F be Function;
let x be set ;
let g be Function;
func c1 [;] c2,c3 -> set equals :: FUNCOP_1:def 5
F * <:((dom g) --> x),g:>;
correctness
coherence
F * <:((dom g) --> x),g:> is set
;
;
end;

:: deftheorem Def5 defines [;] FUNCOP_1:def 5 :
for F being Function
for x being set
for g being Function holds F [;] x,g = F * <:((dom g) --> x),g:>;

registration
let F be Function;
let x be set ;
let g be Function;
cluster a1 [;] a2,a3 -> Relation-like Function-like ;
coherence
( F [;] x,g is Function-like & F [;] x,g is Relation-like )
;
end;

theorem Th40: :: FUNCOP_1:40
canceled;

theorem Th41: :: FUNCOP_1:41
for g, F being Function
for x being set holds F [;] x,g = F .: ((dom g) --> x),g ;

theorem Th42: :: FUNCOP_1:42
for f, F being Function
for x, z being set st x in dom (F [;] z,f) holds
(F [;] z,f) . x = F . z,(f . x)
proof end;

theorem Th43: :: FUNCOP_1:43
for f, g being Function
for A being set
for F being Function
for x being set st f | A = g | A holds
(F [;] x,f) | A = (F [;] x,g) | A
proof end;

theorem Th44: :: FUNCOP_1:44
for f, h, F being Function
for x being set holds (F [;] x,f) * h = F [;] x,(f * h)
proof end;

theorem Th45: :: FUNCOP_1:45
for h, f, F being Function
for x being set holds h * (F [;] x,f) = (h * F) [;] x,f by RELAT_1:55;

theorem Th46: :: FUNCOP_1:46
for f being Function
for A being set
for F being Function
for x being set holds (F [;] x,f) * (id A) = F [;] x,(f | A)
proof end;

theorem Th47: :: FUNCOP_1:47
for Y, X being non empty set
for F being BinOp of X
for f, g being Function of Y,X holds F .: f,g is Function of Y,X
proof end;

definition
let X be non empty set , Z be non empty set ;
let F be BinOp of X;
let f be Function of Z,X, g be Function of Z,X;
redefine func .: as c3 .: c4,c5 -> Function of a2,a1;
coherence
F .: f,g is Function of Z,X
by ;
end;

theorem Th48: :: FUNCOP_1:48
for X, Y being non empty set
for F being BinOp of X
for f, g being Function of Y,X
for z being Element of Y holds (F .: f,g) . z = F . (f . z),(g . z)
proof end;

theorem Th49: :: FUNCOP_1:49
for Y, X being non empty set
for F being BinOp of X
for f, g, h being Function of Y,X st ( for z being Element of Y holds h . z = F . (f . z),(g . z) ) holds
h = F .: f,g
proof end;

theorem Th50: :: FUNCOP_1:50
canceled;

theorem Th51: :: FUNCOP_1:51
for Y, X being non empty set
for F being BinOp of X
for f being Function of Y,X
for g being Function of X,X holds (F .: (id X),g) * f = F .: f,(g * f)
proof end;

theorem Th52: :: FUNCOP_1:52
for Y, X being non empty set
for F being BinOp of X
for f being Function of Y,X
for g being Function of X,X holds (F .: g,(id X)) * f = F .: (g * f),f
proof end;

theorem Th53: :: FUNCOP_1:53
for Y, X being non empty set
for F being BinOp of X
for f being Function of Y,X holds (F .: (id X),(id X)) * f = F .: f,f
proof end;

theorem Th54: :: FUNCOP_1:54
for X being non empty set
for F being BinOp of X
for x being Element of X
for g being Function of X,X holds (F .: (id X),g) . x = F . x,(g . x)
proof end;

theorem Th55: :: FUNCOP_1:55
for X being non empty set
for F being BinOp of X
for x being Element of X
for g being Function of X,X holds (F .: g,(id X)) . x = F . (g . x),x
proof end;

theorem Th56: :: FUNCOP_1:56
for X being non empty set
for F being BinOp of X
for x being Element of X holds (F .: (id X),(id X)) . x = F . x,x
proof end;

theorem Th57: :: FUNCOP_1:57
for A, B, x being set st x in B holds
A --> x is Function of A,B
proof end;

theorem Th58: :: FUNCOP_1:58
for A being set
for X being non empty set
for x being Element of X holds A --> x is Function of A,X by ;

theorem Th59: :: FUNCOP_1:59
for Y, X being non empty set
for F being BinOp of X
for f being Function of Y,X
for x being Element of X holds F [:] f,x is Function of Y,X
proof end;

definition
let X be non empty set , Z be non empty set ;
let F be BinOp of X;
let f be Function of Z,X;
let x be Element of X;
redefine func [:] as c3 [:] c4,c5 -> Function of a2,a1;
coherence
F [:] f,x is Function of Z,X
by ;
end;

theorem Th60: :: FUNCOP_1:60
for X, Y being non empty set
for F being BinOp of X
for f being Function of Y,X
for x being Element of X
for y being Element of Y holds (F [:] f,x) . y = F . (f . y),x
proof end;

theorem Th61: :: FUNCOP_1:61
for X, Y being non empty set
for F being BinOp of X
for g, f being Function of Y,X
for x being Element of X st ( for y being Element of Y holds g . y = F . (f . y),x ) holds
g = F [:] f,x
proof end;

theorem Th62: :: FUNCOP_1:62
canceled;

theorem Th63: :: FUNCOP_1:63
for Y, X being non empty set
for F being BinOp of X
for f being Function of Y,X
for x being Element of X holds (F [:] (id X),x) * f = F [:] f,x
proof end;

theorem Th64: :: FUNCOP_1:64
for X being non empty set
for F being BinOp of X
for x being Element of X holds (F [:] (id X),x) . x = F . x,x
proof end;

theorem Th65: :: FUNCOP_1:65
for Y, X being non empty set
for F being BinOp of X
for g being Function of Y,X
for x being Element of X holds F [;] x,g is Function of Y,X
proof end;

definition
let X be non empty set , Z be non empty set ;
let F be BinOp of X;
let x be Element of X;
let g be Function of Z,X;
redefine func [;] as c3 [;] c4,c5 -> Function of a2,a1;
coherence
F [;] x,g is Function of Z,X
by Def1;
end;

theorem Th66: :: FUNCOP_1:66
for X, Y being non empty set
for F being BinOp of X
for f being Function of Y,X
for x being Element of X
for y being Element of Y holds (F [;] x,f) . y = F . x,(f . y)
proof end;

theorem Th67: :: FUNCOP_1:67
for X, Y being non empty set
for F being BinOp of X
for g, f being Function of Y,X
for x being Element of X st ( for y being Element of Y holds g . y = F . x,(f . y) ) holds
g = F [;] x,f
proof end;

theorem Th68: :: FUNCOP_1:68
canceled;

theorem Th69: :: FUNCOP_1:69
for Y, X being non empty set
for F being BinOp of X
for f being Function of Y,X
for x being Element of X holds (F [;] x,(id X)) * f = F [;] x,f
proof end;

theorem Th70: :: FUNCOP_1:70
for X being non empty set
for F being BinOp of X
for x being Element of X holds (F [;] x,(id X)) . x = F . x,x
proof end;

theorem Th71: :: FUNCOP_1:71
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 end;

theorem Th72: :: FUNCOP_1:72
for X, Y, Z being non empty set
for f being Function of X,[:Y,Z:] holds rng f is Relation of Y,Z
proof end;

definition
let X be non empty set , Y be non empty set , Z be non empty set ;
let f be Function of X,[:Y,Z:];
redefine func rng as rng c4 -> Relation of a2,a3;
coherence
rng f is Relation of Y,Z
by ;
end;

definition
let X be non empty set , Y be non empty set , Z be non empty set ;
let f be Function of X,[:Y,Z:];
redefine func ~ as c4 ~ -> Function of a1,[:a3,a2:];
coherence
f ~ is Function of X,[:Z,Y:]
proof end;
end;

theorem Th73: :: FUNCOP_1:73
for X, Y, Z being non empty set
for f being Function of X,[:Y,Z:] holds rng (f ~ ) = (rng f) ~
proof end;

theorem Th74: :: FUNCOP_1:74
for Y, X being non empty set
for F being BinOp of X
for f being Function of Y,X
for x1, x2 being Element of X st F is associative holds
F [:] (F [;] x1,f),x2 = F [;] x1,(F [:] f,x2)
proof end;

theorem Th75: :: FUNCOP_1:75
for Y, X being non empty set
for F being BinOp of X
for f, g being Function of Y,X
for x being Element of X st F is associative holds
F .: (F [:] f,x),g = F .: f,(F [;] x,g)
proof end;

theorem Th76: :: FUNCOP_1:76
for Y, X being non empty set
for F being BinOp of X
for f, g, h being Function of Y,X st F is associative holds
F .: (F .: f,g),h = F .: f,(F .: g,h)
proof end;

theorem Th77: :: FUNCOP_1:77
for Y, X being non empty set
for F being BinOp of X
for f being Function of Y,X
for x1, x2 being Element of X st F is associative holds
F [;] (F . x1,x2),f = F [;] x1,(F [;] x2,f)
proof end;

theorem Th78: :: FUNCOP_1:78
for Y, X being non empty set
for F being BinOp of X
for f being Function of Y,X
for x1, x2 being Element of X st F is associative holds
F [:] f,(F . x1,x2) = F [:] (F [:] f,x1),x2
proof end;

theorem Th79: :: FUNCOP_1:79
for Y, X being non empty set
for F being BinOp of X
for f being Function of Y,X
for x being Element of X st F is commutative holds
F [;] x,f = F [:] f,x
proof end;

theorem Th80: :: FUNCOP_1:80
for Y, X being non empty set
for F being BinOp of X
for f, g being Function of Y,X st F is commutative holds
F .: f,g = F .: g,f
proof end;

theorem Th81: :: FUNCOP_1:81
for Y, X being non empty set
for F being BinOp of X
for f being Function of Y,X st F is idempotent holds
F .: f,f = f
proof end;

theorem Th82: :: FUNCOP_1:82
for X, Y being non empty set
for F being BinOp of X
for f being Function of Y,X
for y being Element of Y st F is idempotent holds
(F [;] (f . y),f) . y = f . y
proof end;

theorem Th83: :: FUNCOP_1:83
for X, Y being non empty set
for F being BinOp of X
for f being Function of Y,X
for y being Element of Y st F is idempotent holds
(F [:] f,(f . y)) . y = f . y
proof end;

theorem Th84: :: FUNCOP_1:84
for F, f, g being Function st [:(rng f),(rng g):] c= dom F holds
dom (F .: f,g) = (dom f) /\ (dom g)
proof end;

definition
let IT be Function;
attr a1 is Function-yielding means :Def6: :: FUNCOP_1:def 6
for x being set st x in dom IT holds
IT . x is Function;
end;

:: deftheorem Def6 defines Function-yielding FUNCOP_1:def 6 :
for IT being Function holds
( IT is Function-yielding iff for x being set st x in dom IT holds
IT . x is Function );

registration
cluster Function-yielding set ;
existence
ex b1 being Function st b1 is Function-yielding
proof end;
end;

registration
let B be Function-yielding Function;
let j be set ;
cluster a1 . a2 -> Relation-like Function-like ;
coherence
( B . j is Function-like & B . j is Relation-like )
proof end;
end;

registration
let F be Function-yielding Function;
let f be Function;
cluster a2 * a1 -> Function-yielding ;
coherence
F * f is Function-yielding
proof end;
end;

registration
let B be set ;
let c be non empty set ;
cluster a1 --> a2 -> Relation-like non-empty Function-like ;
coherence
B --> c is non-empty
proof end;
end;

theorem Th85: :: FUNCOP_1:85
for z being set
for X, Y being non empty set
for x being Element of X
for y being Element of Y holds ([:X,Y:] --> z) . x,y = z
proof end;