:: Stirling Numbers of the Second Kind
:: by Karol P\c{a}k
::
:: Received March 15, 2005
:: Copyright (c) 2005 Association of Mizar Users


theorem Th1: :: STIRL2_1:1
for N being non empty Subset of NAT holds min N = min* N
proof end;

theorem Th2: :: STIRL2_1:2
for K, N being non empty Subset of NAT holds min (min K),(min N) = min (K \/ N)
proof end;

theorem :: STIRL2_1:3
for Ke, Ne being Subset of NAT holds min (min* Ke),(min* Ne) <= min* (Ke \/ Ne)
proof end;

theorem :: STIRL2_1:4
for Ne, Ke being Subset of NAT st not min* Ne in Ne /\ Ke holds
min* Ne = min* (Ne \ Ke)
proof end;

theorem Th5: :: STIRL2_1:5
for n being Element of NAT holds
( min* {n} = n & min {n} = n )
proof end;

theorem Th6: :: STIRL2_1:6
for n, k being Element of NAT holds
( min* {n,k} = min n,k & min {n,k} = min n,k )
proof end;

theorem :: STIRL2_1:7
for n, k, l being Element of NAT holds min* {n,k,l} = min n,(min k,l)
proof end;

theorem Th8: :: STIRL2_1:8
for n being Element of NAT holds n is Subset of NAT
proof end;

registration
let n be Element of NAT ;
cluster -> natural Element of n;
coherence
for b1 being Element of n holds b1 is natural
;
end;

theorem :: STIRL2_1:9
for n being Element of NAT
for N being non empty Subset of NAT st N c= n holds
n - 1 is Element of NAT
proof end;

theorem Th10: :: STIRL2_1:10
for k, n being Element of NAT st k in n holds
( k <= n - 1 & n - 1 is Element of NAT )
proof end;

theorem :: STIRL2_1:11
for n being Element of NAT holds min* n = 0
proof end;

theorem Th12: :: STIRL2_1:12
for n being Element of NAT
for N being non empty Subset of NAT st N c= n holds
min* N <= n - 1
proof end;

theorem :: STIRL2_1:13
for n being Element of NAT
for N being non empty Subset of NAT st N c= n & N <> {(n - 1)} holds
min* N < n - 1
proof end;

theorem Th14: :: STIRL2_1:14
for n being Element of NAT
for Ne being Subset of NAT st Ne c= n & n > 0 holds
min* Ne <= n - 1
proof end;

definition
let n be Element of NAT ;
let X be set ;
let f be Function of n,X;
let x be set ;
:: original: "
redefine func f " x -> Subset of NAT ;
coherence
f " x is Subset of NAT
proof end;
end;

definition
let X be set ;
let k be Element of NAT ;
let f be Function of X,k;
let x be set ;
:: original: .
redefine func f . x -> Element of k;
coherence
f . x is Element of k
proof end;
end;

registration
let X be set ;
let Ne be Subset of NAT ;
let f be Function of X,Ne;
let x be set ;
cluster f . x -> natural ;
coherence
f . x is natural
;
end;

definition
let n, k be Nat;
let f be Function of n,k;
attr f is "increasing means :Def1: :: STIRL2_1:def 1
( ( n = 0 implies k = 0 ) & ( k = 0 implies n = 0 ) & ( for l, m being Element of NAT st l in rng f & m in rng f & l < m holds
min* (f " {l}) < min* (f " {m}) ) );
end;

:: deftheorem Def1 defines "increasing STIRL2_1:def 1 :
for n, k being Nat
for f being Function of n,k holds
( f is "increasing iff ( ( n = 0 implies k = 0 ) & ( k = 0 implies n = 0 ) & ( for l, m being Element of NAT st l in rng f & m in rng f & l < m holds
min* (f " {l}) < min* (f " {m}) ) ) );

theorem Th15: :: STIRL2_1:15
for n, k being Element of NAT
for f being Function of n,k st n = 0 & k = 0 holds
( f is onto & f is "increasing )
proof end;

theorem Th16: :: STIRL2_1:16
for k, n, m being Element of NAT
for f being Function of n,k st n > 0 holds
min* (f " {m}) <= n - 1
proof end;

theorem Th17: :: STIRL2_1:17
for n, k being Element of NAT
for f being Function of n,k st f is onto holds
n >= k
proof end;

theorem Th18: :: STIRL2_1:18
for n, k being Element of NAT
for f being Function of n,k st f is onto & f is "increasing holds
for m being Element of NAT st m < k holds
m <= min* (f " {m})
proof end;

theorem Th19: :: STIRL2_1:19
for k, n being Element of NAT
for f being Function of n,k st f is onto & f is "increasing holds
for m being Element of NAT st m < k holds
min* (f " {m}) <= (n - k) + m
proof end;

theorem Th20: :: STIRL2_1:20
for n, k being Element of NAT
for f being Function of n,k st f is onto & f is "increasing & n = k holds
f = id n
proof end;

theorem :: STIRL2_1:21
for k, n being Element of NAT
for f being Function of n,k st f = id n & n > 0 holds
f is "increasing
proof end;

theorem :: STIRL2_1:22
for n, k being Element of NAT holds
not ( ( n = 0 implies k = 0 ) & ( k = 0 implies n = 0 ) & ( for f being Function of n,k holds not f is "increasing ) )
proof end;

theorem Th23: :: STIRL2_1:23
for n, k being Element of NAT holds
not ( ( n = 0 implies k = 0 ) & ( k = 0 implies n = 0 ) & n >= k & ( for f being Function of n,k holds
( not f is onto or not f is "increasing ) ) )
proof end;

scheme :: STIRL2_1:sch 1
Sch1{ F1() -> Nat, F2() -> Nat, P1[ set ] } :
{ f where f is Function of F1(),F2() : P1[f] } is finite
proof end;

theorem Th24: :: STIRL2_1:24
for n, k being Nat holds { f where f is Function of n,k : ( f is onto & f is "increasing ) } is finite
proof end;

theorem Th25: :: STIRL2_1:25
for n, k being Nat holds card { f where f is Function of n,k : ( f is onto & f is "increasing ) } is Element of NAT
proof end;

definition
let n, k be Nat;
func n block k -> Element of NAT equals :: STIRL2_1:def 2
card { f where f is Function of n,k : ( f is onto & f is "increasing ) } ;
coherence
card { f where f is Function of n,k : ( f is onto & f is "increasing ) } is Element of NAT
by Th25;
end;

:: deftheorem defines block STIRL2_1:def 2 :
for n, k being Nat holds n block k = card { f where f is Function of n,k : ( f is onto & f is "increasing ) } ;

theorem Th26: :: STIRL2_1:26
for n being Element of NAT holds n block n = 1
proof end;

theorem Th27: :: STIRL2_1:27
for k being Element of NAT st k <> 0 holds
0 block k = 0
proof end;

theorem :: STIRL2_1:28
for k being Element of NAT holds
( 0 block k = 1 iff k = 0 ) by Th26, Th27;

theorem Th29: :: STIRL2_1:29
for n, k being Element of NAT st n < k holds
n block k = 0
proof end;

theorem :: STIRL2_1:30
for n being Element of NAT holds
( n block 0 = 1 iff n = 0 )
proof end;

theorem Th31: :: STIRL2_1:31
for n being Element of NAT st n <> 0 holds
n block 0 = 0
proof end;

theorem Th32: :: STIRL2_1:32
for n being Element of NAT st n <> 0 holds
n block 1 = 1
proof end;

theorem :: STIRL2_1:33
for k, n being Element of NAT holds
( ( ( 1 <= k & k <= n ) or k = n ) iff n block k > 0 )
proof end;

scheme :: STIRL2_1:sch 2
Sch2{ F1() -> set , F2() -> set , F3() -> set , F4() -> set , F5() -> Function of F1(),F2(), F6( set ) -> set } :
ex h being Function of F3(),F4() st
( h | F1() = F5() & ( for x being set st x in F3() \ F1() holds
h . x = F6(x) ) )
provided
A1: for x being set st x in F3() \ F1() holds
F6(x) in F4() and
A2: ( F1() c= F3() & F2() c= F4() ) and
A3: ( F2() is empty implies F1() is empty )
proof end;

scheme :: STIRL2_1:sch 3
Sch3{ F1() -> set , F2() -> set , F3() -> set , F4() -> set , F5( set ) -> set , P1[ set , set , set ] } :
card { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } = card { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
provided
A1: for x being set st x in F3() \ F1() holds
F5(x) in F4() and
A2: ( F1() c= F3() & F2() c= F4() ) and
A3: ( F2() is empty implies F1() is empty ) and
A4: for f being Function of F3(),F4() st ( for x being set st x in F3() \ F1() holds
F5(x) = f . x ) holds
( P1[f,F3(),F4()] iff P1[f | F1(),F1(),F2()] )
proof end;

scheme :: STIRL2_1:sch 4
Sch4{ F1() -> set , F2() -> set , F3() -> set , F4() -> set , P1[ set , set , set ] } :
card { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } = card { f where f is Function of F1() \/ {F3()},F2() \/ {F4()} : ( P1[f,F1() \/ {F3()},F2() \/ {F4()}] & rng (f | F1()) c= F2() & f . F3() = F4() ) }
provided
A1: ( F2() is empty implies F1() is empty ) and
A2: not F3() in F1() and
A3: for f being Function of F1() \/ {F3()},F2() \/ {F4()} st f . F3() = F4() holds
( P1[f,F1() \/ {F3()},F2() \/ {F4()}] iff P1[f | F1(),F1(),F2()] )
proof end;

theorem Th34: :: STIRL2_1:34
for n, k being Element of NAT
for f being Function of n + 1,k + 1 st f is onto & f is "increasing & f " {(f . n)} = {n} holds
f . n = k
proof end;

theorem Th35: :: STIRL2_1:35
for n, k being Element of NAT
for f being Function of n + 1,k st k <> 0 & f " {(f . n)} <> {n} holds
ex m being Element of NAT st
( m in f " {(f . n)} & m <> n )
proof end;

theorem Th36: :: STIRL2_1:36
for n, k, m, l being Element of NAT
for f being Function of n,k
for g being Function of n + m,k + l st g is "increasing & f = g | n holds
for i, j being Element of NAT st i in rng f & j in rng f & i < j holds
min* (f " {i}) < min* (f " {j})
proof end;

theorem Th37: :: STIRL2_1:37
for n, k being Element of NAT
for f being Function of n + 1,k + 1 st f is onto & f is "increasing & f " {(f . n)} = {n} holds
( rng (f | n) c= k & ( for g being Function of n,k st g = f | n holds
( g is onto & g is "increasing ) ) )
proof end;

theorem Th38: :: STIRL2_1:38
for n, k being Element of NAT
for f being Function of n + 1,k
for g being Function of n,k st f is onto & f is "increasing & f " {(f . n)} <> {n} & f | n = g holds
( g is onto & g is "increasing )
proof end;

theorem Th39: :: STIRL2_1:39
for n, k, m being Element of NAT
for f being Function of n,k
for g being Function of n + 1,k + m st f is onto & f is "increasing & f = g | n holds
for i, j being Element of NAT st i in rng g & j in rng g & i < j holds
min* (g " {i}) < min* (g " {j})
proof end;

theorem Th40: :: STIRL2_1:40
for n, k being Element of NAT
for f being Function of n,k
for g being Function of n + 1,k + 1 st f is onto & f is "increasing & f = g | n & g . n = k holds
( g is onto & g is "increasing & g " {(g . n)} = {n} )
proof end;

theorem Th41: :: STIRL2_1:41
for n, k being Element of NAT
for f being Function of n,k
for g being Function of n + 1,k st f is onto & f is "increasing & f = g | n & g . n < k holds
( g is onto & g is "increasing & g " {(g . n)} <> {n} )
proof end;

Lm1: for k, n being Element of NAT st k < n holds
n \/ {k} = n
proof end;

theorem Th42: :: STIRL2_1:42
for n, k being Element of NAT holds card { f where f is Function of n + 1,k + 1 : ( f is onto & f is "increasing & f " {(f . n)} = {n} ) } = card { f where f is Function of n,k : ( f is onto & f is "increasing ) }
proof end;

theorem Th43: :: STIRL2_1:43
for k, n, l being Element of NAT st l < k holds
card { f where f is Function of n + 1,k : ( f is onto & f is "increasing & f " {(f . n)} <> {n} & f . n = l ) } = card { f where f is Function of n,k : ( f is onto & f is "increasing ) }
proof end;

definition
let D be non empty set ;
let F be XFinSequence of D;
let b be BinOp of D;
assume A1: ( b is having_a_unity or len F >= 1 ) ;
func b "**" F -> Element of D means :Def3: :: STIRL2_1:def 3
it = the_unity_wrt b if ( b is having_a_unity & len F = 0 )
otherwise ex f being Function of NAT ,D st
( f . 0 = F . 0 & ( for n being Element of NAT st n + 1 < len F holds
f . (n + 1) = b . (f . n),(F . (n + 1)) ) & it = f . ((len F) - 1) );
existence
( ( b is having_a_unity & len F = 0 implies ex b1 being Element of D st b1 = the_unity_wrt b ) & ( ( not b is having_a_unity or not len F = 0 ) implies ex b1 being Element of D ex f being Function of NAT ,D st
( f . 0 = F . 0 & ( for n being Element of NAT st n + 1 < len F holds
f . (n + 1) = b . (f . n),(F . (n + 1)) ) & b1 = f . ((len F) - 1) ) ) )
proof end;
uniqueness
for b1, b2 being Element of D holds
( ( b is having_a_unity & len F = 0 & b1 = the_unity_wrt b & b2 = the_unity_wrt b implies b1 = b2 ) & ( ( not b is having_a_unity or not len F = 0 ) & ex f being Function of NAT ,D st
( f . 0 = F . 0 & ( for n being Element of NAT st n + 1 < len F holds
f . (n + 1) = b . (f . n),(F . (n + 1)) ) & b1 = f . ((len F) - 1) ) & ex f being Function of NAT ,D st
( f . 0 = F . 0 & ( for n being Element of NAT st n + 1 < len F holds
f . (n + 1) = b . (f . n),(F . (n + 1)) ) & b2 = f . ((len F) - 1) ) implies b1 = b2 ) )
proof end;
consistency
for b1 being Element of D holds verum
;
end;

:: deftheorem Def3 defines "**" STIRL2_1:def 3 :
for D being non empty set
for F being XFinSequence of D
for b being BinOp of D st ( b is having_a_unity or len F >= 1 ) holds
for b4 being Element of D holds
( ( b is having_a_unity & len F = 0 implies ( b4 = b "**" F iff b4 = the_unity_wrt b ) ) & ( ( not b is having_a_unity or not len F = 0 ) implies ( b4 = b "**" F iff ex f being Function of NAT ,D st
( f . 0 = F . 0 & ( for n being Element of NAT st n + 1 < len F holds
f . (n + 1) = b . (f . n),(F . (n + 1)) ) & b4 = f . ((len F) - 1) ) ) ) );

theorem Th44: :: STIRL2_1:44
for D being non empty set
for b being BinOp of D
for d being Element of D holds b "**" <%d%> = d
proof end;

theorem Th45: :: STIRL2_1:45
for D being non empty set
for F being XFinSequence of D
for b being BinOp of D
for d being Element of D st ( b is having_a_unity or len F > 0 ) holds
b "**" (F ^ <%d%>) = b . (b "**" F),d
proof end;

theorem Th46: :: STIRL2_1:46
for D being non empty set
for F being XFinSequence of D st F <> <%> D holds
ex G being XFinSequence of D ex d being Element of D st F = G ^ <%d%>
proof end;

scheme :: STIRL2_1:sch 5
Sch5{ F1() -> non empty set , P1[ set ] } :
for F being XFinSequence of F1() holds P1[F]
provided
A1: P1[ <%> F1()] and
A2: for F being XFinSequence of F1()
for d being Element of F1() st P1[F] holds
P1[F ^ <%d%>]
proof end;

theorem :: STIRL2_1:47
for D being non empty set
for F, G being XFinSequence of D
for b being BinOp of D st b is associative & ( b is having_a_unity or ( len F >= 1 & len G >= 1 ) ) holds
b "**" (F ^ G) = b . (b "**" F),(b "**" G)
proof end;

definition
let D be non empty set ;
let d, d1 be Element of D;
:: original: <%
redefine func <%d,d1%> -> XFinSequence of D;
coherence
<%d,d1%> is XFinSequence of D
proof end;
let d2 be Element of D;
:: original: <%
redefine func <%d,d1,d2%> -> XFinSequence of D;
coherence
<%d,d1,d2%> is XFinSequence of D
proof end;
end;

theorem :: STIRL2_1:48
for D being non empty set
for b being BinOp of D
for d1, d2 being Element of D holds b "**" <%d1,d2%> = b . d1,d2
proof end;

theorem :: STIRL2_1:49
for D being non empty set
for b being BinOp of D
for d, d1, d2 being Element of D holds b "**" <%d,d1,d2%> = b . (b . d,d1),d2
proof end;

definition
let Fn be XFinSequence of NAT ;
func Sum Fn -> Element of NAT equals :: STIRL2_1:def 4
addnat "**" Fn;
coherence
addnat "**" Fn is Element of NAT
;
end;

:: deftheorem defines Sum STIRL2_1:def 4 :
for Fn being XFinSequence of NAT holds Sum Fn = addnat "**" Fn;

theorem Th50: :: STIRL2_1:50
for k being Element of NAT
for Fn being XFinSequence of NAT st ( for n being Element of NAT st n in dom Fn holds
Fn . n <= k ) holds
Sum Fn <= (len Fn) * k
proof end;

theorem Th51: :: STIRL2_1:51
for k being Element of NAT
for Fn being XFinSequence of NAT st ( for n being Element of NAT st n in dom Fn holds
Fn . n >= k ) holds
Sum Fn >= (len Fn) * k
proof end;

theorem Th52: :: STIRL2_1:52
for k being Element of NAT
for Fn being XFinSequence of NAT st len Fn > 0 & ex x being set st
( x in dom Fn & Fn . x = k ) holds
Sum Fn >= k
proof end;

theorem :: STIRL2_1:53
for Fn being XFinSequence of NAT holds
( Sum Fn = 0 iff ( len Fn = 0 or for n being Element of NAT st n in dom Fn holds
Fn . n = 0 ) )
proof end;

theorem Th54: :: STIRL2_1:54
for f being Function
for n being Element of NAT holds (union (rng (f | n))) \/ (f . n) = union (rng (f | (n + 1)))
proof end;

scheme :: STIRL2_1:sch 6
Sch6{ F1() -> non empty set , F2() -> Element of NAT , P1[ set , set ] } :
ex p being XFinSequence of F1() st
( dom p = F2() & ( for k being Element of NAT st k in F2() holds
P1[k,p . k] ) )
provided
A1: for k being Element of NAT st k in F2() holds
ex x being Element of F1() st P1[k,x]
proof end;

scheme :: STIRL2_1:sch 7
Sch7{ F1() -> non empty set , F2() -> XFinSequence of F1() } :
ex CardF being XFinSequence of NAT st
( dom CardF = dom F2() & ( for i being Element of NAT st i in dom CardF holds
CardF . i = card (F2() . i) ) & card (union (rng F2())) = Sum CardF )
provided
A1: for i being Element of NAT st i in dom F2() holds
F2() . i is finite and
A2: for i, j being Element of NAT st i in dom F2() & j in dom F2() & i <> j holds
F2() . i misses F2() . j
proof end;

scheme :: STIRL2_1:sch 8
Sch8{ F1() -> finite set , F2() -> finite set , F3() -> set , P1[ set ], F4() -> Function of card F2(),F2() } :
ex F being XFinSequence of NAT st
( dom F = card F2() & card { g where g is Function of F1(),F2() : P1[g] } = Sum F & ( for i being Element of NAT st i in dom F holds
F . i = card { g where g is Function of F1(),F2() : ( P1[g] & g . F3() = F4() . i ) } ) )
provided
A1: ( F4() is onto & F4() is one-to-one ) and
A2: not F2() is empty and
A3: F3() in F1()
proof end;

theorem Th55: :: STIRL2_1:55
for n, k being Nat holds k * (n block k) = card { f where f is Function of n + 1,k : ( f is onto & f is "increasing & f " {(f . n)} <> {n} ) }
proof end;

theorem Th56: :: STIRL2_1:56
for n, k being Nat holds (n + 1) block (k + 1) = ((k + 1) * (n block (k + 1))) + (n block k)
proof end;

theorem Th57: :: STIRL2_1:57
for n being Nat st n >= 1 holds
n block 2 = (1 / 2) * ((2 |^ n) - 2)
proof end;

theorem Th58: :: STIRL2_1:58
for n being Element of NAT st n >= 2 holds
n block 3 = (1 / 6) * (((3 |^ n) - (3 * (2 |^ n))) + 3)
proof end;

Lm2: for n being Element of NAT holds n |^ 3 = (n * n) * n
proof end;

theorem :: STIRL2_1:59
for n being Element of NAT st n >= 3 holds
n block 4 = (1 / 24) * ((((4 |^ n) - (4 * (3 |^ n))) + (6 * (2 |^ n))) - 4)
proof end;

theorem Th60: :: STIRL2_1:60
( 3 ! = 6 & 4 ! = 24 )
proof end;

theorem Th61: :: STIRL2_1:61
for n being Element of NAT holds
( n choose 1 = n & n choose 2 = (n * (n - 1)) / 2 & n choose 3 = ((n * (n - 1)) * (n - 2)) / 6 & n choose 4 = (((n * (n - 1)) * (n - 2)) * (n - 3)) / 24 )
proof end;

theorem Th62: :: STIRL2_1:62
for n being Element of NAT holds (n + 1) block n = (n + 1) choose 2
proof end;

theorem :: STIRL2_1:63
for n being Element of NAT holds (n + 2) block n = (3 * ((n + 2) choose 4)) + ((n + 2) choose 3)
proof end;

theorem Th64: :: STIRL2_1:64
for F being Function
for y being set holds
( rng (F | ((dom F) \ (F " {y}))) = (rng F) \ {y} & ( for x being set st x <> y holds
(F | ((dom F) \ (F " {y}))) " {x} = F " {x} ) )
proof end;

theorem Th65: :: STIRL2_1:65
for k being Element of NAT
for X, x being set st card X = k + 1 & x in X holds
card (X \ {x}) = k
proof end;

scheme :: STIRL2_1:sch 9
Sch9{ P1[ set ], P2[ set , Function] } :
for F being Function st rng F is finite holds
P1[F]
provided
A1: P1[ {} ] and
A2: for F being Function st ( for x being set st x in rng F & P2[x,F] holds
P1[F | ((dom F) \ (F " {x}))] ) holds
P1[F]
proof end;

theorem Th66: :: STIRL2_1:66
for N being Subset of NAT st N is finite holds
ex k being Element of NAT st
for n being Element of NAT st n in N holds
n <= k
proof end;

theorem Th67: :: STIRL2_1:67
for X, Y, x, y being set st ( Y is empty implies X is empty ) & not x in X holds
for F being Function of X,Y ex G being Function of X \/ {x},Y \/ {y} st
( G | X = F & G . x = y )
proof end;

theorem Th68: :: STIRL2_1:68
for X, Y, x, y being set st ( Y is empty implies X is empty ) holds
for F being Function of X,Y
for G being Function of X \/ {x},Y \/ {y} st G | X = F & G . x = y holds
( ( F is onto implies G is onto ) & ( not y in Y & F is one-to-one implies G is one-to-one ) )
proof end;

theorem Th69: :: STIRL2_1:69
for N being finite Subset of NAT ex Order being Function of N, card N st
( Order is bijective & ( for n, k being Element of NAT st n in dom Order & k in dom Order & n < k holds
Order . n < Order . k ) )
proof end;

Lm3: for X being finite set
for x being set st x in X holds
card (X \ {x}) < card X
proof end;

theorem Th70: :: STIRL2_1:70
for X, Y being finite set
for F being Function of X,Y st card X = card Y holds
( F is onto iff F is one-to-one )
proof end;

Lm4: for n being Element of NAT
for N being finite Subset of NAT
for F being Function of N, card N st n in N & F is bijective & ( for n, k being Element of NAT st n in dom F & k in dom F & n < k holds
F . n < F . k ) holds
ex P being Permutation of N st
for k being Element of NAT st k in N holds
( ( k < n implies P . k = (F " ) . ((F . k) + 1) ) & ( k = n implies P . k = (F " ) . 0 ) & ( k > n implies P . k = k ) )
proof end;

theorem Th71: :: STIRL2_1:71
for F, G being Function
for y being set st y in rng (G * F) & G is one-to-one holds
ex x being set st
( x in dom G & x in rng F & G " {y} = {x} & F " {x} = (G * F) " {y} )
proof end;

definition
let Ne, Ke be Subset of NAT ;
let f be Function of Ne,Ke;
attr f is "increasing means :Def5: :: STIRL2_1:def 5
for l, m being Element of NAT st l in rng f & m in rng f & l < m holds
min* (f " {l}) < min* (f " {m});
end;

:: deftheorem Def5 defines "increasing STIRL2_1:def 5 :
for Ne, Ke being Subset of NAT
for f being Function of Ne,Ke holds
( f is "increasing iff for l, m being Element of NAT st l in rng f & m in rng f & l < m holds
min* (f " {l}) < min* (f " {m}) );

theorem Th72: :: STIRL2_1:72
for Ne, Ke being Subset of NAT
for F being Function of Ne,Ke st F is "increasing holds
min* (rng F) = F . (min* (dom F))
proof end;

theorem :: STIRL2_1:73
for Ne, Ke being Subset of NAT
for F being Function of Ne,Ke st rng F is finite holds
ex I being Function of Ne,Ke ex P being Permutation of rng F st
( F = P * I & rng F = rng I & I is "increasing )
proof end;

theorem Th74: :: STIRL2_1:74
for Ne, Ke, Me being Subset of NAT
for F being Function of Ne,Ke st rng F is finite holds
for I1, I2 being Function of Ne,Me
for P1, P2 being Function st P1 is one-to-one & P2 is one-to-one & rng I1 = rng I2 & rng I1 = dom P1 & dom P1 = dom P2 & F = P1 * I1 & F = P2 * I2 & I1 is "increasing & I2 is "increasing holds
( P1 = P2 & I1 = I2 )
proof end;

theorem :: STIRL2_1:75
for Ne, Ke being Subset of NAT
for F being Function of Ne,Ke st rng F is finite holds
for I1, I2 being Function of Ne,Ke
for P1, P2 being Permutation of rng F st F = P1 * I1 & F = P2 * I2 & rng F = rng I1 & rng F = rng I2 & I1 is "increasing & I2 is "increasing holds
( P1 = P2 & I1 = I2 )
proof end;