let y be set ; for n, i being Nat st y c= Seg (n + 1) & i in Seg (n + 1) & not i in y holds
ex x being set st
( Sgm x = ((Sgm ((Seg (n + 1)) \ {i})) ") * (Sgm y) & x c= Seg n )
let n, i be Nat; ( y c= Seg (n + 1) & i in Seg (n + 1) & not i in y implies ex x being set st
( Sgm x = ((Sgm ((Seg (n + 1)) \ {i})) ") * (Sgm y) & x c= Seg n ) )
set x1 = { k where k is Element of NAT : ( k in y & k < i ) } ;
set x2 = { (k - 1) where k is Element of NAT : ( k in y & k > i ) } ;
set x = { k where k is Element of NAT : ( k in y & k < i ) } \/ { (k - 1) where k is Element of NAT : ( k in y & k > i ) } ;
set f1 = id { k where k is Element of NAT : ( k in y & k < i ) } ;
assume A1:
y c= Seg (n + 1)
; ( not i in Seg (n + 1) or i in y or ex x being set st
( Sgm x = ((Sgm ((Seg (n + 1)) \ {i})) ") * (Sgm y) & x c= Seg n ) )
then A2:
y = rng (Sgm y)
by FINSEQ_1:def 13;
assume A3:
i in Seg (n + 1)
; ( i in y or ex x being set st
( Sgm x = ((Sgm ((Seg (n + 1)) \ {i})) ") * (Sgm y) & x c= Seg n ) )
then A4:
1 <= i
by FINSEQ_1:1;
A5:
i <= n + 1
by A3, FINSEQ_1:1;
then A14:
{ k where k is Element of NAT : ( k in y & k < i ) } \/ { (k - 1) where k is Element of NAT : ( k in y & k > i ) } c= Seg n
by TARSKI:def 3;
then reconsider x9 = { k where k is Element of NAT : ( k in y & k < i ) } \/ { (k - 1) where k is Element of NAT : ( k in y & k > i ) } , y9 = y as finite set by A1;
set f2 = { [(k - 1),k] where k is Element of NAT : ( k in y9 & k > i ) } ;
now let x be
set ;
( x in { [(k - 1),k] where k is Element of NAT : ( k in y9 & k > i ) } implies ex y, z being set st x = [y,z] )assume
x in { [(k - 1),k] where k is Element of NAT : ( k in y9 & k > i ) }
;
ex y, z being set st x = [y,z]then consider k being
Element of
NAT such that A15:
[(k - 1),k] = x
and
k in y9
and
k > i
;
reconsider y =
k - 1,
z =
k as
set ;
take y =
y;
ex z being set st x = [y,z]take z =
z;
x = [y,z]thus
x = [y,z]
by A15;
verum end;
then reconsider f2 = { [(k - 1),k] where k is Element of NAT : ( k in y9 & k > i ) } as Relation by RELAT_1:def 1;
set f = (id { k where k is Element of NAT : ( k in y & k < i ) } ) \/ f2;
then A21:
dom f2 = { (k - 1) where k is Element of NAT : ( k in y & k > i ) }
by A16, TARSKI:1;
A39:
now let x,
y1,
y2 be
set ;
( [x,y1] in f2 & [x,y2] in f2 implies y1 = y2 )assume
[x,y1] in f2
;
( [x,y2] in f2 implies y1 = y2 )then consider k being
Element of
NAT such that A40:
[(k - 1),k] = [x,y1]
and
k in y9
and
k > i
;
A41:
k - 1
= x
by A40, ZFMISC_1:27;
assume
[x,y2] in f2
;
y1 = y2then consider k9 being
Element of
NAT such that A42:
[(k9 - 1),k9] = [x,y2]
and
k9 in y9
and
k9 > i
;
k9 - 1
= x
by A42, ZFMISC_1:27;
hence
y1 = y2
by A40, A42, A41, ZFMISC_1:27;
verum end;
reconsider f = (id { k where k is Element of NAT : ( k in y & k < i ) } ) \/ f2 as Function by A22, FUNCT_1:def 1;
reconsider f2 = f2 as Function by A39, FUNCT_1:def 1;
assume A47:
not i in y
; ex x being set st
( Sgm x = ((Sgm ((Seg (n + 1)) \ {i})) ") * (Sgm y) & x c= Seg n )
then A53:
rng f = y9
by A48, TARSKI:1;
now let a,
b be
set ;
( ( [a,b] in f implies [a,b] in (rng f) | (Sgm ((Seg (n + 1)) \ {i})) ) & ( [a,b] in (rng f) | (Sgm ((Seg (n + 1)) \ {i})) implies [b1,b2] in f ) )hereby ( [a,b] in (rng f) | (Sgm ((Seg (n + 1)) \ {i})) implies [b1,b2] in f )
assume A54:
[a,b] in f
;
[a,b] in (rng f) | (Sgm ((Seg (n + 1)) \ {i}))per cases
( [a,b] in id { k where k is Element of NAT : ( k in y & k < i ) } or [a,b] in f2 )
by A54, XBOOLE_0:def 3;
suppose A55:
[a,b] in id { k where k is Element of NAT : ( k in y & k < i ) }
;
[a,b] in (rng f) | (Sgm ((Seg (n + 1)) \ {i}))reconsider i9 =
i,
n9 =
n as
Element of
NAT by ORDINAL1:def 12;
A56:
a = b
by A55, RELAT_1:def 10;
a in { k where k is Element of NAT : ( k in y & k < i ) }
by A55, RELAT_1:def 10;
then consider a9 being
Element of
NAT such that A57:
a9 = a
and A58:
a9 in y
and A59:
a9 < i
;
A60:
1
<= a9
by A1, A58, FINSEQ_1:1;
i <= n + 1
by A3, FINSEQ_1:1;
then
a9 < n + 1
by A59, XXREAL_0:2;
then
a9 <= n
by NAT_1:13;
then A61:
a in Seg n
by A57, A60;
then
a in Seg (len (Sgm ((Seg (n + 1)) \ {i})))
by A3, FINSEQ_3:107;
then A62:
a in dom (Sgm ((Seg (n + 1)) \ {i}))
by FINSEQ_1:def 3;
a9 = (Sgm ((Seg (n9 + 1)) \ {i9})) . a9
by A3, A57, A59, A60, A61, FINSEQ_3:108;
then
[a,b] in Sgm ((Seg (n + 1)) \ {i})
by A56, A57, A62, FUNCT_1:1;
hence
[a,b] in (rng f) | (Sgm ((Seg (n + 1)) \ {i}))
by A53, A56, A57, A58, RELAT_1:def 12;
verum end; suppose A63:
[a,b] in f2
;
[a,b] in (rng f) | (Sgm ((Seg (n + 1)) \ {i}))reconsider i9 =
i,
n9 =
n as
Element of
NAT by ORDINAL1:def 12;
consider b9 being
Element of
NAT such that A64:
[a,b] = [(b9 - 1),b9]
and A65:
b9 in y9
and A66:
b9 > i
by A63;
A67:
a = b9 - 1
by A64, ZFMISC_1:27;
reconsider a9 =
b9 - 1 as
integer number ;
i + 1
<= b9
by A66, NAT_1:13;
then A68:
(i + 1) - 1
<= b9 - 1
by XREAL_1:9;
then A69:
1
<= a9
by A4, XXREAL_0:2;
reconsider a9 =
a9 as
Element of
NAT by A68, INT_1:3;
b9 <= n + 1
by A1, A65, FINSEQ_1:1;
then A70:
b9 - 1
<= (n + 1) - 1
by XREAL_1:9;
then A71:
a9 in Seg n
by A69;
then
a in Seg n
by A64, ZFMISC_1:27;
then
a in Seg (len (Sgm ((Seg (n + 1)) \ {i})))
by A3, FINSEQ_3:107;
then A72:
a in dom (Sgm ((Seg (n + 1)) \ {i}))
by FINSEQ_1:def 3;
a9 + 1
= (Sgm ((Seg (n9 + 1)) \ {i9})) . a9
by A3, A70, A68, A71, FINSEQ_3:108;
then
[a,b] in Sgm ((Seg (n + 1)) \ {i})
by A64, A67, A72, FUNCT_1:1;
hence
[a,b] in (rng f) | (Sgm ((Seg (n + 1)) \ {i}))
by A53, A64, A65, RELAT_1:def 12;
verum end; end;
end; assume A73:
[a,b] in (rng f) | (Sgm ((Seg (n + 1)) \ {i}))
;
[b1,b2] in fthen A74:
[a,b] in Sgm ((Seg (n + 1)) \ {i})
by RELAT_1:def 12;
then A75:
a in dom (Sgm ((Seg (n + 1)) \ {i}))
by RELAT_1:def 4;
b in rng f
by A73, RELAT_1:def 12;
then
b in Seg (n + 1)
by A1, A53;
then reconsider a9 =
a,
b9 =
b as
Element of
NAT by A75;
A76:
a in Seg (len (Sgm ((Seg (n + 1)) \ {i})))
by A75, FINSEQ_1:def 3;
then A77:
1
<= a9
by FINSEQ_1:1;
A78:
b in y
by A53, A73, RELAT_1:def 12;
A79:
a in Seg n
by A3, A76, FINSEQ_3:107;
reconsider i =
i,
n =
n as
Element of
NAT by ORDINAL1:def 12;
A80:
a9 <= n
by A79, FINSEQ_1:1;
per cases
( a9 < i or i <= a9 )
;
suppose A83:
i <= a9
;
[b1,b2] in fthen
(Sgm ((Seg (n + 1)) \ {i})) . a9 = a9 + 1
by A3, A79, A80, FINSEQ_3:108;
then A84:
b9 = a9 + 1
by A74, FUNCT_1:1;
then A85:
b9 > i
by A83, NAT_1:13;
A86:
a = b9 - 1
by A84;
b9 in y9
by A53, A73, RELAT_1:def 12;
then
[a,b] in f2
by A85, A86;
hence
[a,b] in f
by XBOOLE_0:def 3;
verum end; end; end;
then A87:
f = (rng f) | (Sgm ((Seg (n + 1)) \ {i}))
by RELAT_1:def 2;
reconsider g = f " as PartFunc of (dom (f ")),(rng (f ")) by RELSET_1:4;
then A108:
f is one-to-one
by FUNCT_1:def 4;
then
f " = f ~
by FUNCT_1:def 5;
then A109:
f " = ((Sgm ((Seg (n + 1)) \ {i})) ~) | (dom (f "))
by A87, Lm36;
dom (id { k where k is Element of NAT : ( k in y & k < i ) } ) = { k where k is Element of NAT : ( k in y & k < i ) }
by RELAT_1:45;
then A110:
dom f = x9
by A21, RELAT_1:1;
then
dom f c= NAT
by A14, XBOOLE_1:1;
then
rng g c= NAT
by A108, FUNCT_1:33;
then A111:
rng g c= REAL
by XBOOLE_1:1;
rng f c= NAT
by A1, A53, XBOOLE_1:1;
then
dom g c= NAT
by A108, FUNCT_1:33;
then
dom g c= REAL
by XBOOLE_1:1;
then reconsider g = g as PartFunc of REAL,REAL by A111, RELSET_1:7;
A112:
dom (f ") = y
by A108, A53, FUNCT_1:33;
then A127:
g | y is increasing
by RFUNCT_2:20;
A128:
rng (f ") = { k where k is Element of NAT : ( k in y & k < i ) } \/ { (k - 1) where k is Element of NAT : ( k in y & k > i ) }
by A108, A110, FUNCT_1:33;
then A129:
{ k where k is Element of NAT : ( k in y & k < i ) } \/ { (k - 1) where k is Element of NAT : ( k in y & k > i ) } = (f ") .: y
by A112, RELAT_1:113;
then A132:
g .: y c= NAT \ {0}
by TARSKI:def 3;
take
{ k where k is Element of NAT : ( k in y & k < i ) } \/ { (k - 1) where k is Element of NAT : ( k in y & k > i ) }
; ( Sgm ( { k where k is Element of NAT : ( k in y & k < i ) } \/ { (k - 1) where k is Element of NAT : ( k in y & k > i ) } ) = ((Sgm ((Seg (n + 1)) \ {i})) ") * (Sgm y) & { k where k is Element of NAT : ( k in y & k < i ) } \/ { (k - 1) where k is Element of NAT : ( k in y & k > i ) } c= Seg n )
Sgm ((Seg (n + 1)) \ {i}) is one-to-one
by FINSEQ_3:92, XBOOLE_1:36;
then A133:
(Sgm ((Seg (n + 1)) \ {i})) " = (Sgm ((Seg (n + 1)) \ {i})) ~
by FUNCT_1:def 5;
Sgm ( { k where k is Element of NAT : ( k in y & k < i ) } \/ { (k - 1) where k is Element of NAT : ( k in y & k > i ) } ) =
Sgm (g .: y)
by A112, A128, RELAT_1:113
.=
(((Sgm ((Seg (n + 1)) \ {i})) ") | y) * (Sgm y)
by A1, A112, A127, A132, A133, A109, Lm38
.=
((Sgm ((Seg (n + 1)) \ {i})) ") * (y | (Sgm y))
by Lm37
.=
((Sgm ((Seg (n + 1)) \ {i})) ") * (Sgm y)
by A2, RELAT_1:95
;
hence
Sgm ( { k where k is Element of NAT : ( k in y & k < i ) } \/ { (k - 1) where k is Element of NAT : ( k in y & k > i ) } ) = ((Sgm ((Seg (n + 1)) \ {i})) ") * (Sgm y)
; { k where k is Element of NAT : ( k in y & k < i ) } \/ { (k - 1) where k is Element of NAT : ( k in y & k > i ) } c= Seg n
thus
{ k where k is Element of NAT : ( k in y & k < i ) } \/ { (k - 1) where k is Element of NAT : ( k in y & k > i ) } c= Seg n
by A6, TARSKI:def 3; verum