:: FUNCT_7 semantic presentation  Show TPTP formulae Show IDV graph for whole article:: Showing IDV graph ... (Click the Palm Trees again to close it)

theorem :: FUNCT_7:1  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for X being set st rng f c= X holds
(id X) * f = f
proof end;

theorem :: FUNCT_7:2  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X being set
for Y being non empty set
for f being Function of X,Y st f is one-to-one holds
for B being Subset of X
for C being Subset of Y st C c= f .: B holds
f " C c= B
proof end;

theorem Th3: :: FUNCT_7:3  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X, Y being non empty set
for f being Function of X,Y st f is one-to-one holds
for x being Element of X
for A being Subset of X st f . x in f .: A holds
x in A
proof end;

theorem Th4: :: FUNCT_7:4  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X, Y being non empty set
for f being Function of X,Y st f is one-to-one holds
for x being Element of X
for A being Subset of X
for B being Subset of Y st f . x in (f .: A) \ B holds
x in A \ (f " B)
proof end;

theorem :: FUNCT_7:5  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X, Y being non empty set
for f being Function of X,Y st f is one-to-one holds
for y being Element of Y
for A being Subset of X
for B being Subset of Y st y in (f .: A) \ B holds
(f " ) . y in A \ (f " B)
proof end;

theorem Th6: :: FUNCT_7:6  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for a being set st a in dom f holds
f | {a} = a .--> (f . a)
proof end;

registration
let x, y be set ;
cluster x .--> y -> non empty ;
coherence
not x .--> y is empty
proof end;
end;

registration
let x, y, a, b be set ;
cluster x,y --> a,b -> non empty ;
coherence
not x,y --> a,b is empty
proof end;
end;

theorem Th7: :: FUNCT_7:7  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for I being set
for M being ManySortedSet of I
for i being set st i in I holds
i .--> (M . i) = M | {i}
proof end;

theorem :: FUNCT_7:8  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for I, J being set
for M being ManySortedSet of [:I,J:]
for i, j being set st i in I & j in J holds
i,j :-> (M . i,j) = M | [:{i},{j}:]
proof end;

theorem :: FUNCT_7:9  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
canceled;

theorem :: FUNCT_7:10  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f, g, h being Function st rng g c= dom f & rng h c= dom f holds
f * (g +* h) = (f * g) +* (f * h)
proof end;

theorem Th11: :: FUNCT_7:11  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f, g, h being Function holds (g +* h) * f = (g * f) +* (h * f)
proof end;

theorem :: FUNCT_7:12  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f, g, h being Function st rng f misses dom g holds
(h +* g) * f = h * f
proof end;

theorem Th13: :: FUNCT_7:13  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for A, B, y being set st A meets rng ((id B) +* (A --> y)) holds
y in A
proof end;

theorem :: FUNCT_7:14  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for x, y, A being set st x <> y holds
not x in rng ((id A) +* (x .--> y))
proof end;

theorem :: FUNCT_7:15  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X, a being set
for f being Function st dom f = X \/ {a} holds
f = (f | X) +* (a .--> (f . a))
proof end;

theorem :: FUNCT_7:16  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for X, y, z being set holds (f +* (X --> y)) +* (X --> z) = f +* (X --> z)
proof end;

theorem :: FUNCT_7:17  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
canceled;

theorem :: FUNCT_7:18  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
INT <> INT *
proof end;

theorem :: FUNCT_7:19  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
{} * = {{} }
proof end;

theorem Th20: :: FUNCT_7:20  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for x, A being set holds
( <*x*> in A * iff x in A )
proof end;

theorem :: FUNCT_7:21  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for A, B being set st A * c= B * holds
A c= B
proof end;

theorem :: FUNCT_7:22  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for A being Subset of NAT st ( for n, m being Nat st n in A & m < n holds
m in A ) holds
A is Cardinal
proof end;

theorem :: FUNCT_7:23  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for A being finite set
for X being non empty Subset-Family of A ex C being Element of X st
for B being Element of X st B c= C holds
B = C
proof end;

theorem Th24: :: FUNCT_7:24  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p, q being FinSequence st len p = (len q) + 1 holds
for i being Nat holds
( i in dom q iff ( i in dom p & i + 1 in dom p ) )
proof end;

registration
cluster non empty non-empty Function-yielding set ;
existence
ex b1 being FinSequence st
( b1 is Function-yielding & not b1 is empty & b1 is non-empty )
proof end;
end;

registration
cluster {} -> Function-yielding ;
coherence
{} is Function-yielding
proof end;
let f be Function;
cluster <*f*> -> Function-yielding ;
coherence
<*f*> is Function-yielding
proof end;
let g be Function;
cluster <*f,g*> -> Function-yielding ;
coherence
<*f,g*> is Function-yielding
proof end;
let h be Function;
cluster <*f,g,h*> -> Function-yielding ;
coherence
<*f,g,h*> is Function-yielding
proof end;
end;

registration
let n be Nat;
let f be Function;
cluster n |-> f -> Function-yielding ;
coherence
n |-> f is Function-yielding
proof end;
end;

registration
let p, q be Function-yielding FinSequence;
cluster p ^ q -> Function-yielding ;
coherence
p ^ q is Function-yielding
proof end;
end;

theorem Th25: :: FUNCT_7:25  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p, q being FinSequence st p ^ q is Function-yielding holds
( p is Function-yielding & q is Function-yielding )
proof end;

scheme :: FUNCT_7:sch 1
Kappa2D{ F1() -> non empty set , F2() -> non empty set , F3() -> non empty set , F4( Element of F1(), Element of F2()) -> set } :
ex f being Function of [:F1(),F2():],F3() st
for x being Element of F1()
for y being Element of F2() holds f . [x,y] = F4(x,y)
provided
A1: for x being Element of F1()
for y being Element of F2() holds F4(x,y) in F3()
proof end;

scheme :: FUNCT_7:sch 2
FinMono{ F1() -> set , F2() -> non empty set , F3( set ) -> set , F4( set ) -> set } :
{ F3(d) where d is Element of F2() : F4(d) in F1() } is finite
provided
A1: F1() is finite and
A2: for d1, d2 being Element of F2() st F4(d1) = F4(d2) holds
d1 = d2
proof end;

scheme :: FUNCT_7:sch 3
CardMono{ F1() -> set , F2() -> non empty set , F3( set ) -> set } :
F1(),{ d where d is Element of F2() : F3(d) in F1() } are_equipotent
provided
A1: for x being set st x in F1() holds
ex d being Element of F2() st x = F3(d) and
A2: for d1, d2 being Element of F2() st F3(d1) = F3(d2) holds
d1 = d2
proof end;

scheme :: FUNCT_7:sch 4
CardMono'{ F1() -> set , F2() -> non empty set , F3( set ) -> set } :
F1(),{ F3(d) where d is Element of F2() : d in F1() } are_equipotent
provided
A1: F1() c= F2() and
A2: for d1, d2 being Element of F2() st F3(d1) = F3(d2) holds
d1 = d2
proof end;

scheme :: FUNCT_7:sch 5
FuncSeqInd{ P1[ set ] } :
for p being Function-yielding FinSequence holds P1[p]
provided
A1: P1[ {} ] and
A2: for p being Function-yielding FinSequence st P1[p] holds
for f being Function holds P1[p ^ <*f*>]
proof end;

definition
let x, y be set ;
assume A1: x in y ;
func In x,y -> Element of y equals :Def1: :: FUNCT_7:def 1
x;
correctness
coherence
x is Element of y
;
by A1;
end;

:: deftheorem Def1 defines In FUNCT_7:def 1 :
for x, y being set st x in y holds
In x,y = x;

theorem :: FUNCT_7:26  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for x, A, B being set st x in A /\ B holds
In x,A = In x,B
proof end;

definition
let f, g be Function;
let A be set ;
pred f,g equal_outside A means :: FUNCT_7:def 2
f | ((dom f) \ A) = g | ((dom g) \ A);
end;

:: deftheorem defines equal_outside FUNCT_7:def 2 :
for f, g being Function
for A being set holds
( f,g equal_outside A iff f | ((dom f) \ A) = g | ((dom g) \ A) );

theorem :: FUNCT_7:27  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for A being set holds f,f equal_outside A
proof end;

theorem :: FUNCT_7:28  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f, g being Function
for A being set st f,g equal_outside A holds
g,f equal_outside A
proof end;

theorem :: FUNCT_7:29  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f, g, h being Function
for A being set st f,g equal_outside A & g,h equal_outside A holds
f,h equal_outside A
proof end;

theorem :: FUNCT_7:30  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f, g being Function
for A being set st f,g equal_outside A holds
(dom f) \ A = (dom g) \ A
proof end;

theorem :: FUNCT_7:31  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f, g being Function
for A being set st dom g c= A holds
f,f +* g equal_outside A
proof end;

definition
let f be Function;
let i, x be set ;
func f +* i,x -> Function equals :Def3: :: FUNCT_7:def 3
f +* (i .--> x) if i in dom f
otherwise f;
correctness
coherence
( ( i in dom f implies f +* (i .--> x) is Function ) & ( not i in dom f implies f is Function ) )
;
consistency
for b1 being Function holds verum
;
;
end;

:: deftheorem Def3 defines +* FUNCT_7:def 3 :
for f being Function
for i, x being set holds
( ( i in dom f implies f +* i,x = f +* (i .--> x) ) & ( not i in dom f implies f +* i,x = f ) );

theorem Th32: :: FUNCT_7:32  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for d, i being set holds dom (f +* i,d) = dom f
proof end;

theorem Th33: :: FUNCT_7:33  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for d, i being set st i in dom f holds
(f +* i,d) . i = d
proof end;

theorem Th34: :: FUNCT_7:34  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for d, i, j being set st i <> j holds
(f +* i,d) . j = f . j
proof end;

theorem :: FUNCT_7:35  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for d, e, i, j being set st i <> j holds
(f +* i,d) +* j,e = (f +* j,e) +* i,d
proof end;

theorem :: FUNCT_7:36  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for d, e, i being set holds (f +* i,d) +* i,e = f +* i,e
proof end;

theorem Th37: :: FUNCT_7:37  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for i being set holds f +* i,(f . i) = f
proof end;

registration
let f be FinSequence;
let i be Nat;
let x be set ;
cluster f +* i,x -> FinSequence-like ;
coherence
f +* i,x is FinSequence-like
proof end;
end;

definition
let D be set ;
let f be FinSequence of D;
let i be Nat;
let d be Element of D;
:: original: +*
redefine func f +* i,d -> FinSequence of D;
coherence
f +* i,d is FinSequence of D
proof end;
end;

theorem :: FUNCT_7:38  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for D being non empty set
for f being FinSequence of D
for d being Element of D
for i being Nat st i in dom f holds
(f +* i,d) /. i = d
proof end;

theorem :: FUNCT_7:39  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for D being non empty set
for f being FinSequence of D
for d being Element of D
for i, j being Nat st i <> j & j in dom f holds
(f +* i,d) /. j = f /. j
proof end;

theorem :: FUNCT_7:40  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for D being non empty set
for f being FinSequence of D
for d, e being Element of D
for i being Nat holds f +* i,(f /. i) = f
proof end;

definition
let X be set ;
let p be Function-yielding FinSequence;
func compose p,X -> Function means :Def4: :: FUNCT_7:def 4
ex f being ManySortedFunction of NAT st
( it = f . (len p) & f . 0 = id X & ( for i being Nat st i + 1 in dom p holds
for g, h being Function st g = f . i & h = p . (i + 1) holds
f . (i + 1) = h * g ) );
uniqueness
for b1, b2 being Function st ex f being ManySortedFunction of NAT st
( b1 = f . (len p) & f . 0 = id X & ( for i being Nat st i + 1 in dom p holds
for g, h being Function st g = f . i & h = p . (i + 1) holds
f . (i + 1) = h * g ) ) & ex f being ManySortedFunction of NAT st
( b2 = f . (len p) & f . 0 = id X & ( for i being Nat st i + 1 in dom p holds
for g, h being Function st g = f . i & h = p . (i + 1) holds
f . (i + 1) = h * g ) ) holds
b1 = b2
proof end;
correctness
existence
ex b1 being Function ex f being ManySortedFunction of NAT st
( b1 = f . (len p) & f . 0 = id X & ( for i being Nat st i + 1 in dom p holds
for g, h being Function st g = f . i & h = p . (i + 1) holds
f . (i + 1) = h * g ) )
;
proof end;
end;

:: deftheorem Def4 defines compose FUNCT_7:def 4 :
for X being set
for p being Function-yielding FinSequence
for b3 being Function holds
( b3 = compose p,X iff ex f being ManySortedFunction of NAT st
( b3 = f . (len p) & f . 0 = id X & ( for i being Nat st i + 1 in dom p holds
for g, h being Function st g = f . i & h = p . (i + 1) holds
f . (i + 1) = h * g ) ) );

definition
let p be Function-yielding FinSequence;
let x be set ;
func apply p,x -> FinSequence means :Def5: :: FUNCT_7:def 5
( len it = (len p) + 1 & it . 1 = x & ( for i being Nat
for f being Function st i in dom p & f = p . i holds
it . (i + 1) = f . (it . i) ) );
existence
ex b1 being FinSequence st
( len b1 = (len p) + 1 & b1 . 1 = x & ( for i being Nat
for f being Function st i in dom p & f = p . i holds
b1 . (i + 1) = f . (b1 . i) ) )
proof end;
correctness
uniqueness
for b1, b2 being FinSequence st len b1 = (len p) + 1 & b1 . 1 = x & ( for i being Nat
for f being Function st i in dom p & f = p . i holds
b1 . (i + 1) = f . (b1 . i) ) & len b2 = (len p) + 1 & b2 . 1 = x & ( for i being Nat
for f being Function st i in dom p & f = p . i holds
b2 . (i + 1) = f . (b2 . i) ) holds
b1 = b2
;
proof end;
end;

:: deftheorem Def5 defines apply FUNCT_7:def 5 :
for p being Function-yielding FinSequence
for x being set
for b3 being FinSequence holds
( b3 = apply p,x iff ( len b3 = (len p) + 1 & b3 . 1 = x & ( for i being Nat
for f being Function st i in dom p & f = p . i holds
b3 . (i + 1) = f . (b3 . i) ) ) );

theorem Th41: :: FUNCT_7:41  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X being set holds compose {} ,X = id X
proof end;

theorem Th42: :: FUNCT_7:42  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for x being set holds apply {} ,x = <*x*>
proof end;

theorem Th43: :: FUNCT_7:43  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X being set
for p being Function-yielding FinSequence
for f being Function holds compose (p ^ <*f*>),X = f * (compose p,X)
proof end;

theorem Th44: :: FUNCT_7:44  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for x being set
for p being Function-yielding FinSequence
for f being Function holds apply (p ^ <*f*>),x = (apply p,x) ^ <*(f . ((apply p,x) . ((len p) + 1)))*>
proof end;

theorem :: FUNCT_7:45  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X being set
for p being Function-yielding FinSequence
for f being Function holds compose (<*f*> ^ p),X = (compose p,(f .: X)) * (f | X)
proof end;

theorem :: FUNCT_7:46  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for x being set
for p being Function-yielding FinSequence
for f being Function holds apply (<*f*> ^ p),x = <*x*> ^ (apply p,(f . x))
proof end;

theorem Th47: :: FUNCT_7:47  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X being set
for f being Function holds compose <*f*>,X = f * (id X)
proof end;

theorem :: FUNCT_7:48  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X being set
for f being Function st dom f c= X holds
compose <*f*>,X = f
proof end;

theorem Th49: :: FUNCT_7:49  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for x being set
for f being Function holds apply <*f*>,x = <*x,(f . x)*>
proof end;

theorem :: FUNCT_7:50  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X, Y being set
for p, q being Function-yielding FinSequence st rng (compose p,X) c= Y holds
compose (p ^ q),X = (compose q,Y) * (compose p,X)
proof end;

theorem Th51: :: FUNCT_7:51  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for x being set
for p, q being Function-yielding FinSequence holds (apply (p ^ q),x) . ((len (p ^ q)) + 1) = (apply q,((apply p,x) . ((len p) + 1))) . ((len q) + 1)
proof end;

theorem :: FUNCT_7:52  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for x being set
for p, q being Function-yielding FinSequence holds apply (p ^ q),x = (apply p,x) $^ (apply q,((apply p,x) . ((len p) + 1)))
proof end;

theorem Th53: :: FUNCT_7:53  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X being set
for f, g being Function holds compose <*f,g*>,X = (g * f) * (id X)
proof end;

theorem :: FUNCT_7:54  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X being set
for f, g being Function st ( dom f c= X or dom (g * f) c= X ) holds
compose <*f,g*>,X = g * f
proof end;

theorem Th55: :: FUNCT_7:55  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for x being set
for f, g being Function holds apply <*f,g*>,x = <*x,(f . x),(g . (f . x))*>
proof end;

theorem Th56: :: FUNCT_7:56  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X being set
for f, g, h being Function holds compose <*f,g,h*>,X = ((h * g) * f) * (id X)
proof end;

theorem :: FUNCT_7:57  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X being set
for f, g, h being Function st ( dom f c= X or dom (g * f) c= X or dom ((h * g) * f) c= X ) holds
compose <*f,g,h*>,X = (h * g) * f
proof end;

theorem :: FUNCT_7:58  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for x being set
for f, g, h being Function holds apply <*f,g,h*>,x = <*x*> ^ <*(f . x),(g . (f . x)),(h . (g . (f . x)))*>
proof end;

definition
let F be FinSequence;
func firstdom F -> set means :Def6: :: FUNCT_7:def 6
it is empty if F is empty
otherwise it = proj1 (F . 1);
correctness
consistency
for b1 being set holds verum
;
existence
( ( for b1 being set holds verum ) & ( F is empty implies ex b1 being set st b1 is empty ) & ( not F is empty implies ex b1 being set st b1 = proj1 (F . 1) ) )
;
uniqueness
for b1, b2 being set holds
( ( F is empty & b1 is empty & b2 is empty implies b1 = b2 ) & ( not F is empty & b1 = proj1 (F . 1) & b2 = proj1 (F . 1) implies b1 = b2 ) )
;
;
func lastrng F -> set means :Def7: :: FUNCT_7:def 7
it is empty if F is empty
otherwise it = proj2 (F . (len F));
correctness
consistency
for b1 being set holds verum
;
existence
( ( for b1 being set holds verum ) & ( F is empty implies ex b1 being set st b1 is empty ) & ( not F is empty implies ex b1 being set st b1 = proj2 (F . (len F)) ) )
;
uniqueness
for b1, b2 being set holds
( ( F is empty & b1 is empty & b2 is empty implies b1 = b2 ) & ( not F is empty & b1 = proj2 (F . (len F)) & b2 = proj2 (F . (len F)) implies b1 = b2 ) )
;
;
end;

:: deftheorem Def6 defines firstdom FUNCT_7:def 6 :
for F being FinSequence
for b2 being set holds
( ( F is empty implies ( b2 = firstdom F iff b2 is empty ) ) & ( not F is empty implies ( b2 = firstdom F iff b2 = proj1 (F . 1) ) ) );

:: deftheorem Def7 defines lastrng FUNCT_7:def 7 :
for F being FinSequence
for b2 being set holds
( ( F is empty implies ( b2 = lastrng F iff b2 is empty ) ) & ( not F is empty implies ( b2 = lastrng F iff b2 = proj2 (F . (len F)) ) ) );

theorem Th59: :: FUNCT_7:59  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
( firstdom {} = {} & lastrng {} = {} ) by Def6, Def7;

theorem Th60: :: FUNCT_7:60  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for p being FinSequence holds
( firstdom (<*f*> ^ p) = dom f & lastrng (p ^ <*f*>) = rng f )
proof end;

theorem Th61: :: FUNCT_7:61  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X being set
for p being Function-yielding FinSequence st p <> {} holds
rng (compose p,X) c= lastrng p
proof end;

definition
let IT be FinSequence;
attr IT is FuncSeq-like means :Def8: :: FUNCT_7:def 8
ex p being FinSequence st
( len p = (len IT) + 1 & ( for i being Nat st i in dom IT holds
IT . i in Funcs (p . i),(p . (i + 1)) ) );
end;

:: deftheorem Def8 defines FuncSeq-like FUNCT_7:def 8 :
for IT being FinSequence holds
( IT is FuncSeq-like iff ex p being FinSequence st
( len p = (len IT) + 1 & ( for i being Nat st i in dom IT holds
IT . i in Funcs (p . i),(p . (i + 1)) ) ) );

theorem Th62: :: FUNCT_7:62  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p, q being FinSequence st p ^ q is FuncSeq-like holds
( p is FuncSeq-like & q is FuncSeq-like )
proof end;

registration
cluster FuncSeq-like -> Function-yielding set ;
coherence
for b1 being FinSequence st b1 is FuncSeq-like holds
b1 is Function-yielding
proof end;
end;

registration
cluster empty -> Function-yielding FuncSeq-like set ;
coherence
for b1 being FinSequence st b1 is empty holds
b1 is FuncSeq-like
proof end;
end;

registration
let f be Function;
cluster <*f*> -> Function-yielding FuncSeq-like ;
coherence
<*f*> is FuncSeq-like
proof end;
end;

registration
cluster non empty non-empty Function-yielding FuncSeq-like set ;
existence
ex b1 being FinSequence st
( b1 is FuncSeq-like & not b1 is empty & b1 is non-empty )
proof end;
end;

definition
mode FuncSequence is FuncSeq-like FinSequence;
end;

theorem Th63: :: FUNCT_7:63  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X being set
for p being FuncSequence st p <> {} holds
dom (compose p,X) = (firstdom p) /\ X
proof end;

theorem Th64: :: FUNCT_7:64  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p being FuncSequence holds dom (compose p,(firstdom p)) = firstdom p
proof end;

theorem :: FUNCT_7:65  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p being FuncSequence
for f being Function st rng f c= firstdom p holds
<*f*> ^ p is FuncSequence
proof end;

theorem :: FUNCT_7:66  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for p being FuncSequence
for f being Function st lastrng p c= dom f holds
p ^ <*f*> is FuncSequence
proof end;

theorem :: FUNCT_7:67  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for x, X being set
for p being FuncSequence st x in firstdom p & x in X holds
(apply p,x) . ((len p) + 1) = (compose p,X) . x
proof end;

definition
let X, Y be set ;
assume A1: ( Y is empty implies X is empty ) ;
mode FuncSequence of X,Y -> FuncSequence means :Def9: :: FUNCT_7:def 9
( firstdom it = X & lastrng it c= Y );
existence
ex b1 being FuncSequence st
( firstdom b1 = X & lastrng b1 c= Y )
proof end;
end;

:: deftheorem Def9 defines FuncSequence FUNCT_7:def 9 :
for X, Y being set st ( Y is empty implies X is empty ) holds
for b3 being FuncSequence holds
( b3 is FuncSequence of X,Y iff ( firstdom b3 = X & lastrng b3 c= Y ) );

definition
let Y be non empty set ;
let X be set ;
let F be FuncSequence of X,Y;
:: original: compose
redefine func compose F,X -> Function of X,Y;
coherence
compose F,X is Function of X,Y
proof end;
end;

definition
let q be non empty non-empty FinSequence;
mode FuncSequence of q -> FinSequence means :Def10: :: FUNCT_7:def 10
( (len it) + 1 = len q & ( for i being Nat st i in dom it holds
it . i in Funcs (q . i),(q . (i + 1)) ) );
existence
ex b1 being FinSequence st
( (len b1) + 1 = len q & ( for i being Nat st i in dom b1 holds
b1 . i in Funcs (q . i),(q . (i + 1)) ) )
proof end;
end;

:: deftheorem Def10 defines FuncSequence FUNCT_7:def 10 :
for q being non empty non-empty FinSequence
for b2 being FinSequence holds
( b2 is FuncSequence of q iff ( (len b2) + 1 = len q & ( for i being Nat st i in dom b2 holds
b2 . i in Funcs (q . i),(q . (i + 1)) ) ) );

registration
let q be non empty non-empty FinSequence;
cluster -> non-empty FuncSeq-like FuncSequence of q;
coherence
for b1 being FuncSequence of q holds
( b1 is FuncSeq-like & b1 is non-empty )
proof end;
end;

theorem Th68: :: FUNCT_7:68  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for q being non empty non-empty FinSequence
for p being FuncSequence of q st p <> {} holds
( firstdom p = q . 1 & lastrng p c= q . (len q) )
proof end;

theorem :: FUNCT_7:69  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for q being non empty non-empty FinSequence
for p being FuncSequence of q holds
( dom (compose p,(q . 1)) = q . 1 & rng (compose p,(q . 1)) c= q . (len q) )
proof end;

Lm1: for X being set
for f being Function of X,X holds rng f c= dom f
proof end;

Lm2: for f being Function
for n being Element of NAT
for p1, p2 being Function of NAT , PFuncs ((dom f) \/ (rng f)),((dom f) \/ (rng f)) st p1 . 0 = id ((dom f) \/ (rng f)) & ( for k being Element of NAT ex g being Function st
( g = p1 . k & p1 . (k + 1) = g * f ) ) & p2 . 0 = id ((dom f) \/ (rng f)) & ( for k being Element of NAT ex g being Function st
( g = p2 . k & p2 . (k + 1) = g * f ) ) holds
p1 = p2
proof end;

definition
let f be Function;
let n be Element of NAT ;
func iter f,n -> Function means :Def11: :: FUNCT_7:def 11
ex p being Function of NAT , PFuncs ((dom f) \/ (rng f)),((dom f) \/ (rng f)) st
( it = p . n & p . 0 = id ((dom f) \/ (rng f)) & ( for k being Element of NAT ex g being Function st
( g = p . k & p . (k + 1) = g * f ) ) );
existence
ex b1 being Function ex p being Function of NAT , PFuncs ((dom f) \/ (rng f)),((dom f) \/ (rng f)) st
( b1 = p . n & p . 0 = id ((dom f) \/ (rng f)) & ( for k being Element of NAT ex g being Function st
( g = p . k & p . (k + 1) = g * f ) ) )
proof end;
uniqueness
for b1, b2 being Function st ex p being Function of NAT , PFuncs ((dom f) \/ (rng f)),((dom f) \/ (rng f)) st
( b1 = p . n & p . 0 = id ((dom f) \/ (rng f)) & ( for k being Element of NAT ex g being Function st
( g = p . k & p . (k + 1) = g * f ) ) ) & ex p being Function of NAT , PFuncs ((dom f) \/ (rng f)),((dom f) \/ (rng f)) st
( b2 = p . n & p . 0 = id ((dom f) \/ (rng f)) & ( for k being Element of NAT ex g being Function st
( g = p . k & p . (k + 1) = g * f ) ) ) holds
b1 = b2
by Lm2;
end;

:: deftheorem Def11 defines iter FUNCT_7:def 11 :
for f being Function
for n being Element of NAT
for b3 being Function holds
( b3 = iter f,n iff ex p being Function of NAT , PFuncs ((dom f) \/ (rng f)),((dom f) \/ (rng f)) st
( b3 = p . n & p . 0 = id ((dom f) \/ (rng f)) & ( for k being Element of NAT ex g being Function st
( g = p . k & p . (k + 1) = g * f ) ) ) );

Lm3: for f being Function holds
( (id ((dom f) \/ (rng f))) * f = f & f * (id ((dom f) \/ (rng f))) = f )
proof end;

theorem Th70: :: FUNCT_7:70  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function holds iter f,0 = id ((dom f) \/ (rng f))
proof end;

Lm4: for f being Function st rng f c= dom f holds
iter f,0 = id (dom f)
proof end;

theorem Th71: :: FUNCT_7:71  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for n being Nat holds iter f,(n + 1) = (iter f,n) * f
proof end;

theorem Th72: :: FUNCT_7:72  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function holds iter f,1 = f
proof end;

theorem Th73: :: FUNCT_7:73  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for n being Nat holds iter f,(n + 1) = f * (iter f,n)
proof end;

theorem Th74: :: FUNCT_7:74  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for n being Nat holds
( dom (iter f,n) c= (dom f) \/ (rng f) & rng (iter f,n) c= (dom f) \/ (rng f) )
proof end;

theorem :: FUNCT_7:75  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for n being Nat st n <> 0 holds
( dom (iter f,n) c= dom f & rng (iter f,n) c= rng f )
proof end;

theorem Th76: :: FUNCT_7:76  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for n being Nat st rng f c= dom f holds
( dom (iter f,n) = dom f & rng (iter f,n) c= dom f )
proof end;

theorem Th77: :: FUNCT_7:77  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for n being Nat holds (iter f,n) * (id ((dom f) \/ (rng f))) = iter f,n
proof end;

theorem :: FUNCT_7:78  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for n being Nat holds (id ((dom f) \/ (rng f))) * (iter f,n) = iter f,n
proof end;

theorem Th79: :: FUNCT_7:79  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for n, m being Nat holds (iter f,n) * (iter f,m) = iter f,(n + m)
proof end;

Lm5: for f being Function
for m, k being Nat st iter (iter f,m),k = iter f,(m * k) holds
iter (iter f,m),(k + 1) = iter f,(m * (k + 1))
proof end;

theorem :: FUNCT_7:80  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for n, m being Nat st n <> 0 holds
iter (iter f,m),n = iter f,(m * n)
proof end;

theorem Th81: :: FUNCT_7:81  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for m, n being Nat st rng f c= dom f holds
iter (iter f,m),n = iter f,(m * n)
proof end;

theorem :: FUNCT_7:82  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for n being Nat holds iter {} ,n = {}
proof end;

theorem :: FUNCT_7:83  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X being set
for n being Nat holds iter (id X),n = id X
proof end;

theorem :: FUNCT_7:84  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function st rng f misses dom f holds
iter f,2 = {}
proof end;

theorem :: FUNCT_7:85  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X being set
for n being Nat
for f being Function of X,X holds iter f,n is Function of X,X
proof end;

theorem :: FUNCT_7:86  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X being set
for f being Function of X,X holds iter f,0 = id X
proof end;

theorem :: FUNCT_7:87  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X being set
for m, n being Nat
for f being Function of X,X holds iter (iter f,m),n = iter f,(m * n)
proof end;

theorem :: FUNCT_7:88  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X being set
for n being Nat
for f being PartFunc of X,X holds iter f,n is PartFunc of X,X
proof end;

theorem :: FUNCT_7:89  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for a, X being set
for f being Function
for n being Nat st n <> 0 & a in X & f = X --> a holds
iter f,n = f
proof end;

theorem :: FUNCT_7:90  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f being Function
for n being Nat holds iter f,n = compose (n |-> f),((dom f) \/ (rng f))
proof end;