|
|
|
|
Impressum finseq_3.miz
Sprache: Mizar
|
|
:: Non-contiguous Substrings and One-to-one Finite Sequences
:: by Wojciech A. Trybulec
::
:: Received April 8, 1990
:: Copyright (c) 1990-2026 Association of Mizar Users
:: (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
:: This code can be distributed under the GNU General Public Licence
:: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
:: License version 3.0 or later, subject to the binding interpretation
:: detailed in file COPYING.interpretation.
:: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these
:: licenses, or see http://www.gnu.org/licenses/gpl.html and
:: http://creativecommons.org/licenses/by-sa/3.0/.
environ
vocabularies NUMBERS, FINSEQ_1, XBOOLE_0, ARYTM_3, CARD_1, XXREAL_0, ARYTM_1,
NAT_1, SUBSET_1, TARSKI, RELAT_1, ORDINAL4, FUNCT_1, FINSET_1, FINSEQ_2,
FUNCT_2, CARD_3, FUNCOP_1, FINSEQ_3, EQREL_1, ALG_1, FUNCT_6, SETFAM_1,
FINSEQ_4, ZFMISC_1, FUNCT_5, PARTFUN1, XCMPLX_0, ORDINAL1, NUMBER09;
notations TARSKI, XBOOLE_0, ENUMSET1, SUBSET_1, SETFAM_1, CARD_1, ORDINAL1,
ZFMISC_1, NUMBERS, XCMPLX_0, RELAT_1, FUNCT_1, FINSEQ_1, RELSET_1,
PARTFUN1, FUNCT_2, BINOP_1, FUNCOP_1, FINSEQ_2, FINSET_1, NAT_1,
FINSEQOP, XXREAL_0, CARD_3, FUNCT_3, FUNCT_5, FUNCT_6, EQREL_1;
constructors ENUMSET1, PARTFUN1, WELLORD2, XXREAL_0, REAL_1, NAT_1, INT_1,
FINSEQOP, RELSET_1, CARD_3, DOMAIN_1, CARD_2, EQREL_1, FUNCT_6, BINOP_1,
FUNCT_3, FUNCT_5, FINSEQ_2, VALUED_0;
registrations XBOOLE_0, RELAT_1, FUNCT_1, ORDINAL1, FINSET_1, XXREAL_0,
XREAL_0, NAT_1, INT_1, FINSEQ_1, CARD_1, FINSEQ_2, FUNCOP_1, CARD_3,
CARD_2, VALUED_0;
requirements NUMERALS, REAL, SUBSET, BOOLE, ARITHM;
definitions FUNCT_1, TARSKI, WELLORD2, XBOOLE_0, CARD_3, FUNCOP_1;
equalities FINSEQ_2, CARD_3, FUNCOP_1, FUNCT_6;
expansions FUNCT_1, TARSKI, WELLORD2, XBOOLE_0;
theorems CARD_1, CARD_2, ENUMSET1, FINSEQ_1, FINSEQ_2, FINSET_1, FUNCT_1,
INT_1, NAT_1, TARSKI, WELLORD2, ZFMISC_1, RELAT_1, XREAL_1, XBOOLE_0,
XBOOLE_1, FUNCT_2, GRFUNC_1, SUBSET_1, XXREAL_0, ORDINAL1, NUMBERS,
CARD_3, FUNCOP_1, EQREL_1, FUNCT_6, SETFAM_1, FUNCT_5, FUNCT_3, XTUPLE_0;
schemes FINSEQ_1, FUNCT_1, NAT_1, CLASSES1, RELSET_1;
begin
reserve p,q,r for FinSequence;
reserve u,v,x,y,y1,y2,z for object, A,D,X,Y for set;
reserve i,j,k,l,m,n for Nat;
theorem Th1:
Seg 3 = { 1, 2, 3}
proof
thus Seg 3 = { 1, 2} \/ { 2 + 1} by FINSEQ_1: 2, 9
.= { 1, 2, 3} by ENUMSET1: 3;
end;
theorem Th2:
Seg 4 = { 1, 2, 3, 4}
proof
thus Seg 4 = { 1, 2, 3} \/ { 3 + 1} by Th1,FINSEQ_1: 9
.= { 1, 2, 3, 4} by ENUMSET1: 6;
end;
theorem Th3:
Seg 5 = { 1, 2, 3, 4, 5}
proof
thus Seg 5 = { 1, 2, 3, 4} \/ { 4 + 1} by Th2,FINSEQ_1: 9
.= { 1, 2, 3, 4, 5} by ENUMSET1: 10;
end;
theorem Th4:
Seg 6 = { 1, 2, 3, 4, 5, 6}
proof
thus Seg 6 = { 1, 2, 3, 4, 5} \/ { 5 + 1} by Th3,FINSEQ_1: 9
.= { 1, 2, 3, 4, 5, 6} by ENUMSET1: 15;
end;
theorem Th5:
Seg 7 = { 1, 2, 3, 4, 5, 6, 7}
proof
thus Seg 7 = { 1, 2, 3, 4, 5, 6} \/ { 6 + 1} by Th4,FINSEQ_1: 9
.= { 1, 2, 3, 4, 5, 6, 7} by ENUMSET1: 21;
end;
theorem
Seg 8 = { 1, 2, 3, 4, 5, 6, 7, 8}
proof
thus Seg 8 = { 1, 2, 3, 4, 5, 6, 7} \/ { 7 + 1} by Th5,FINSEQ_1: 9
.= { 1, 2, 3, 4, 5, 6, 7, 8} by ENUMSET1: 28;
end;
theorem Th7:
Seg k = {} iff not k in Seg k
proof
thus Seg k = {} implies not k in Seg k;
assume not k in Seg k;
then k = 0 by FINSEQ_1: 3;
hence Seg k = {};
end;
theorem Th8:
not k + 1 in Seg k
proof
assume k + 1 in Seg k;
then
A1: k + 1 <= k by FINSEQ_1: 1;
k <= k + 1 by NAT_1: 12;
then k + 0 = k + 1 by A1,XXREAL_0: 1;
hence thesis;
end;
theorem
k <> 0 implies k in Seg(k + n)
proof
assume k <> 0;
then
A1: 0 + 1 <= k by NAT_1: 13;
k <= k + n by NAT_1: 12;
hence thesis by A1,FINSEQ_1: 1;
end;
theorem Th10:
k + n in Seg k implies n = 0
proof
assume k + n in Seg k;
then k + n <= k + 0 by FINSEQ_1: 1;
hence thesis by XREAL_1: 6;
end;
theorem
k < n implies k + 1 in Seg n
proof
assume k < n;
then
A1: k + 1 <= n by NAT_1: 13;
1 <= k + 1 by NAT_1: 12;
hence thesis by A1,FINSEQ_1: 1;
end;
theorem Th12:
k in Seg n & m < k implies k - m in Seg n
proof
assume that
A1: k in Seg n and
A2: m < k;
consider i being Nat such that
A3: k = m + i by A2,NAT_1: 10;
reconsider x = k - m as Element of NAT by A3,ORDINAL1:def 12;
A4: now
assume not 1 <= x;
then x = 0 by NAT_1: 14;
hence contradiction by A2;
end;
A5: k <= n by A1,FINSEQ_1: 1;
i <= k by A3,NAT_1: 12;
then x <= n by A3,A5,XXREAL_0: 2;
hence thesis by A4,FINSEQ_1: 1;
end;
theorem
k - n in Seg k iff n < k
proof
thus k - n in Seg k implies n < k
proof
assume
A1: k - n in Seg k;
then reconsider x = k - n as Element of NAT;
assume not n < k;
then k - n <= n - n by XREAL_1: 9;
then x = 0;
hence contradiction by A1,FINSEQ_1: 1;
end;
thus thesis by Th12,FINSEQ_1: 3;
end;
theorem Th14:
Seg k misses {k + 1}
proof
set x = the Element of Seg k /\ {k + 1};
assume not thesis;
then
A1: Seg k /\ {k + 1} <> {};
then
A2: x in Seg k by XBOOLE_0:def 4;
then reconsider x as Element of NAT;
x in {k + 1} by A1,XBOOLE_0:def 4;
then
A3: x = k + 1 by TARSKI:def 1;
x <= k by A2,FINSEQ_1: 1;
hence thesis by A3,XREAL_1: 29;
end;
theorem
Seg(k + 1) \ Seg k = {k + 1}
proof
A1: Seg(k + 1) = Seg k \/ {k + 1} by FINSEQ_1: 9;
Seg k misses {k + 1} by Th14;
hence thesis by A1,XBOOLE_1: 88;
end;
:: Theorem Seg(k + 1) \ {k + 1} = Seg k is
:: proved in RLVECT_1 and has a number 104.
theorem
Seg k <> Seg(k + 1) by Th8,FINSEQ_1: 4;
theorem
Seg k = Seg(k + n) implies n = 0 by Th10,FINSEQ_1: 3;
theorem Th18:
Seg k c= Seg(k + n) by FINSEQ_1: 5,NAT_1: 12;
theorem Th19:
Seg k, Seg n are_c=-comparable
proof
n <= k or k <= n;
then Seg n c= Seg k or Seg k c= Seg n by FINSEQ_1: 5;
hence thesis;
end;
theorem Th20:
for y being object st Seg k = {y} holds k = 1 & y = 1
proof let y be object;
assume
A1: Seg k = {y};
now
per cases;
suppose
k = 0;
hence thesis by A1;
end;
suppose
k <> 0; then
A2: k in Seg k by FINSEQ_1: 3;
then 1 <= k by FINSEQ_1: 1;
then Seg 1 c= Seg k by FINSEQ_1: 5;
then Seg 1 = {y} by A1,ZFMISC_1: 33;
hence thesis by A1,A2,FINSEQ_1: 2,TARSKI:def 1,ZFMISC_1: 3;
end;
end;
hence thesis;
end;
theorem
Seg k = {x,y} & x <> y implies k = 2 & {x,y} = { 1, 2}
proof
assume that
A1: Seg k = {x,y} and
A2: x <> y;
now
per cases;
suppose
k = 0;
hence thesis by A1;
end;
suppose
A3: k <> 0;
now
per cases;
suppose
k = 1;
hence thesis by A1,A2,FINSEQ_1: 2,ZFMISC_1: 5;
end;
suppose
A4: k <> 1;
1 <= k by A3,NAT_1: 14;
then 1 < k by A4,XXREAL_0: 1;
then
A5: 1 + 1 <= k by NAT_1: 13;
then Seg 2 c= Seg k by FINSEQ_1: 5;
then
A6: 1 = x & 2 = x or 1 = x & 2 = y or 2 = x & 1 = y or 1 = y & 2 =
y by A1,FINSEQ_1: 2,ZFMISC_1: 22;
now
k in Seg k by A1,Th7;
then
A7: k = 1 or k = 2 by A1,A6,TARSKI:def 2;
assume not k <= 2;
hence contradiction by A7;
end;
hence thesis by A1,A5,FINSEQ_1: 2,XXREAL_0: 1;
end;
end;
hence thesis;
end;
end;
hence thesis;
end;
theorem Th22:
x in dom p implies x in dom(p ^ q)
proof
dom p c= dom(p ^ q) by FINSEQ_1: 26;
hence thesis;
end;
theorem
x in dom p implies x is Element of NAT;
theorem Th24:
x in dom p implies x <> 0
proof
assume x in dom p;
then x in Seg(len p) by FINSEQ_1:def 3;
hence thesis by FINSEQ_1: 1;
end;
theorem Th25:
n in dom p iff 1 <= n & n <= len p
proof
thus n in dom p implies 1 <= n & n <= len p
proof
assume n in dom p;
then n in Seg(len p) by FINSEQ_1:def 3;
hence thesis by FINSEQ_1: 1;
end;
assume that
A1: 1 <= n and
A2: n <= len p;
n in Seg(len p) by A1,A2,FINSEQ_1: 1;
hence thesis by FINSEQ_1:def 3;
end;
theorem
n in dom p iff n - 1 is Element of NAT & len p - n is Element of NAT
proof
thus n in dom p implies n - 1 is Element of NAT & len p - n is Element of NAT
proof
assume
A1: n in dom p; then
A2: n <= len p by Th25;
1 <= n by A1,Th25;
hence thesis by A2,INT_1: 5;
end;
assume that
A3: n - 1 is Element of NAT and
A4: len p - n is Element of NAT;
A5: 0 + n <= len p by A4,XREAL_1: 19;
0 + 1 <= n by A3,XREAL_1: 19;
hence thesis by A5,Th25;
end;
::$CT 2
theorem Th27:
len p = len q iff dom p = dom q
proof
dom p = Seg(len p) by FINSEQ_1:def 3;
hence thesis by FINSEQ_1:def 3;
end;
theorem Th28:
len p <= len q iff dom p c= dom q
proof
A1: dom q = Seg(len q) by FINSEQ_1:def 3;
dom p = Seg(len p) by FINSEQ_1:def 3;
hence thesis by A1,FINSEQ_1: 5;
end;
theorem Th29:
x in rng p implies 1 in dom p
proof
assume x in rng p;
then p <> {};
then
A1: 1 <= len p by NAT_1: 14;
dom p = Seg(len p) by FINSEQ_1:def 3;
hence thesis by A1,FINSEQ_1: 1;
end;
theorem
rng p <> {} implies 1 in dom p
proof
set y = the Element of rng p;
assume rng p <> {};
then y in rng p;
hence thesis by Th29;
end;
theorem
{} <> <* x,y *>;
theorem
{} <> <* x,y,z *>;
theorem Th33:
<* x *> <> <* y,z *>
proof
len<* x *> = 1 by FINSEQ_1: 40;
hence thesis by FINSEQ_1: 44;
end;
theorem
<* u *> <> <* x,y,z *>
proof
len<* u *> = 1 by FINSEQ_1: 40;
hence thesis by FINSEQ_1: 45;
end;
theorem
<* u,v *> <> <* x,y,z *>
proof
len<* u,v *> = 2 by FINSEQ_1: 44;
hence thesis by FINSEQ_1: 45;
end;
theorem Th36:
len r = len p + len q & ( for k being Nat st k in dom p holds r.k = p.k) &
( for k being Nat st k in dom q holds r.(len p + k) = q.k)
implies r = p ^ q
proof
assume len r = len p + len q;
then
A1: dom r = Seg(len p + len q) by FINSEQ_1:def 3;
assume that
A2: for k being Nat st k in dom p holds r.k = p.k and
A3: for k being Nat st k in dom q holds r.(len p + k) = q.k;
A4: for k being Nat st k in dom q holds r.(len p + k) = q.k by A3;
for k being Nat st k in dom p holds r.k = p.k by A2;
hence thesis by A1,A4,FINSEQ_1:def 7;
end;
registration
let A be included_in_Seg set;
cluster Sgm A -> one-to-one;
coherence
proof
consider k being Nat such that
A1: A c= Seg k by FINSEQ_1:def 13;
A2: rng Sgm A = A by FINSEQ_1:def 14;
let x,y be object;
assume that
A3: x in dom Sgm A and
A4: y in dom Sgm A and
A5: Sgm(A).x = Sgm(A).y and
A6: x <> y;
Sgm(A).y in rng Sgm A by A4,FUNCT_1:def 3; then
A7: Sgm(A).y in Seg k by A1,A2;
Sgm(A).x in rng Sgm A by A3,FUNCT_1:def 3;
then Sgm(A).x in Seg k by A1,A2; then
reconsider m = Sgm(A).x, n = Sgm(A).y as Element of NAT by A7;
reconsider i = x, j = y as Element of NAT by A3,A4;
A8: dom Sgm A = Seg len Sgm A by FINSEQ_1:def 3;
now
per cases by A6,XXREAL_0: 1;
suppose
A9: i < j;
A10: j <= len Sgm A by A4,A8,FINSEQ_1: 1;
1 <= i by A3,A8,FINSEQ_1: 1;
then m < n by A9,A10,FINSEQ_1:def 14;
hence contradiction by A5;
end;
suppose
A11: j < i;
A12: i <= len Sgm A by A3,A8,FINSEQ_1: 1;
1 <= j by A4,A8,FINSEQ_1: 1;
then n < m by A11,A12,FINSEQ_1:def 14;
hence contradiction by A5;
end;
end;
hence thesis;
end;
end;
theorem Th37:
for A being included_in_Seg set holds len Sgm A = card A
proof
let A be included_in_Seg set;
A1: dom Sgm A = Seg len Sgm A by FINSEQ_1:def 3;
A2: card Seg len Sgm A = len Sgm A by FINSEQ_1: 57;
A4: rng Sgm A = A by FINSEQ_1:def 14;
Seg len Sgm A,A are_equipotent by A1,A4;
hence thesis by A2,CARD_1: 5;
end;
theorem Th38:
for A being included_in_Seg set holds dom Sgm A = Seg card A
proof
let A be included_in_Seg set;
len Sgm A = card A by Th37;
hence thesis by FINSEQ_1:def 3;
end;
theorem Th39:
X is included_in_Seg & k < l & 1 <= n & m <= len Sgm X & Sgm(X).m = k &
Sgm(X).n = l implies m < n
proof
assume that
A1: X is included_in_Seg and
A2: k < l and
A3: 1 <= n and
A4: m <= len(Sgm X) and
A5: Sgm(X).m = k and
A6: Sgm(X).n = l and
A7: not m < n;
n < m by A2,A5,A6,A7,XXREAL_0: 1;
hence thesis by A1,A2,A3,A4,A5,A6,FINSEQ_1:def 14;
end;
theorem Th40:
X is included_in_Seg & Y is included_in_Seg implies
( ( for m,n being Nat st m in X & n in Y holds m < n) iff
Sgm(X \/ Y) = Sgm(X) ^ Sgm(Y) )
proof
assume that
a1: X is included_in_Seg and
a2: Y is included_in_Seg;
consider i such that
A1: X c= Seg i by a1,FINSEQ_1:def 13;
consider j such that
A2: Y c= Seg j by a2,FINSEQ_1:def 13;
set r = Sgm(X \/ Y);
set q = Sgm Y;
set p = Sgm X;
:: Non-contiguous Substrings :: by Wojciech A. Trybulec
then :: This code can be distributed :: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
then
X c= Seg j
then
A4: X \/ Y c= Seg i or X \/ Y c= Seg j by A1,A2,XBOOLE_1: 8;
reconsider X1 = X, Y1 = Y as finite set by A1,A2;
bbb: X1 \/ Y1 is included_in_Seg by NAT_1, SUBSET_1, TARSKI, RELAT_1, java.lang.StringIndex OutOfBoundsException: Range [78, 77) out of bounds for length 78
(, stminX&holdsm< )
Sgm(X \/ Y) = Sgm(XFINSEQOP,XXREAL_0 CARD_3,FUNCT_3 ,FUNCT_6,EQREL_1;
proof
PNat1 p.1 =p.1java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 52
\={}
setx ofX \Yjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
EQ_1:def java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
then
A6: X c= NAT;
assume
A7: not thesis;
then x in , java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 79
thenm=x by;
A8: java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
defjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
Yjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
= / a2
=+Y1Cjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
.= len p
. p+qa2Th37
A11: now
bejava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
A12: P[k];
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 17
assume
;
:p. )in FUNCT_1 3;
thenend;
A15: n in
< java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 39
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 52
then dom p c= Seg(lennotkinSegkjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
then
A16 domp rbydef ;
then
A17: .k+ )in rng r A13FUNCT_1:def ;
then reconsider m = r.(k + 1) as Element ofproof
A1: k + 1 by FINSEQ_11java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
then
A18hence ;
A19 r( +)< ( )
A20 k+1indomrbyA13A;
now
java.lang.StringIndexOutOfBoundsException: Range [20, 21) out of bounds for length 20
A21:
kin by:ef ;
then reconsider n1
r.in by A16,21FUNCT_1:ef ;
then reconsider m1endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
now
per cases by A19,java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 13
A22: mjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
A23: 1 <= A3 by 10
not m in Y by A5,A15,A22;
m X byA18,: 3;
then m in java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 54
dom
A25: p. < A3A5:;
reconsider xend
x= by A24,;
A26: Seg;
+1inSegl r java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 58
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 41
inSegl )by :def3java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
A28: 1 <= k byjava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 20
k in ydef;
then
A29: n1 < in {k + 1} by A1,XBOOLE_0:def 4;
A30: =,java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 26
1java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
thenk byA25A29,,;
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 52
end;
suppose
A31java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
A32: 1 <= k + 1 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
n in X
nrngr bydefjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
x
A33: x in java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
A34 . by FUNCT_1:3java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
Th20
< rby A33T;
then
A35: x < k
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 14
A37: k <;
1 <= k by A21,then Seg 1 c= Seg k by FINSEQ
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 63
A38java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
A39: =xy >y= xy {2java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
1 = Th25
then A2 java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
hence
endjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 16
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 32
end;
suppose
;
A41: k < k + 1 by XREAL_1:29;
k < 1 or java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 14
then
A42: k = 0 or len p < k + 1 & k + 1 <= A1:,:;
,XXREAL_0:2;
now
2A6:;
suppose
A43: m < n byjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
then not m in Y by A5,A15;
then m in X by A18,XBOOLE_0:def 3;
then m in rng p by a1,FINSEQ_1:def 14;
then consider x being object such that
A44: x in dom p and
A45: p.x = m by FUNCT_1:def 3;
A46: 1 <= k + 1 by A13,Th25;
reconsider x as Element of NAT by A44;
x <= len p by A44,Th25;
then x < k + 1 by a1,A43,A45,A46,Th39;
hence contradiction by A42,A44,Th24,NAT_1:14;
end;
suppose
A47: n < m;
A48: 1 <= k + 1 by A13,Th25;
n in X \/ Y by A15,XBOOLE_0:def 3;
then n in rng r by bbb,FINSEQ_1:def 14;
then consider x being object such that
A49: x in dom r and
A50: r.x = n by FUNCT_1:def 3;
reconsider x as Element of NAT by A49;
x <= len r by A49,Th25;
then x < k + 1 by bbb,A47,A50,A48,Th39;
hence contradiction by A42,A49,Th24,NAT_1:14;
end;
end;
hence contradiction;
end;
end;
hence contradiction;
end;
end;
A51: P[0] by Th24;
A52: for k being Nat holds P[k] from NAT_1:sch 2(A51,A11);
defpred P[Nat] means $1 in dom q implies r.(len p + $1) = q.$1;
A53: now
let k be Nat;
assume
A54: P[k];
thus P[k+1]
proof
set a = len p + (k + 1);
assume
A55: k + 1 in dom q;
then k + 1 <= len q by Th25;
then
A56: a <= len r by A10,XREAL_1:7;
A57: 1 <= k + 1 by NAT_1:12;
then 1 <= a by NAT_1:12;
then
A58: a in dom r by A56,Th25;
then
A59: java.lang.StringIndexOutOfBoundsException: Range [15, 9) out of bounds for length 15
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 52
A60: now
assume
then m rng a1def
that
A1: n in dom p; then
A62: p.x:n< pjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
reconsider x as Element,5
< Tjava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 33
A4: len p - n java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 32
1=19java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
one-;
1 <= x by A61,Th25
then
A65: java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 5
x . ,;
then x ;
len p <= len q iff dom p c= dom q
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 44
end;
A66java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 13
then java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 20
then
assume
+ k ))>q(+;
:min /,defjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
now
per;
suppose
hencejava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 23
krngqFjava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 47
then}>*yz*;
= A70Th25java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
then
A71e;
A72: k << ><< ,yz*java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
+< byX7java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
then
then r.(java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 65
now
1java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
A73: m < n;
A74: 1 <= k + 1 by A55,Th25;
m in Y by java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
qFjava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 54
java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 54
:x and
A76: q.x = m by FUNCT_1:def 3;
reconsiderxElementof java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
< by;
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 39
len p XREAL_129java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
java.lang.StringIndexOutOfBoundsException: Range [20, 21) out of bounds for length 20
n1 bbbA70Fjava.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 62
A79: k <= lenA2 Sgm java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 37
1 <= x java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 22
< by,A76A78,79,h39;
contradiction A77,NAT_1:;
endjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
. kA2
<java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
A81: 1 <= a byA8 =Seg len SgmA3java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
X\ def3java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
ind java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
then consider x being then m < n by A9,A10,FINSEQ_1:def A10java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 45
A82: x in:=A81
A83: r.x = n by FUNCT_1java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
x
p k+ java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
by a1,a2,A80,A83,A4: rng Sgm A = A by FINSEQ_1:def 14
A85: k java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 32
A86: k < beingjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 62
A
then
A87: java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 13
A88:lenp =r A,java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 56
1=byTh25
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
by a1,a2:< java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
hence java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 20
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
end; forn mX <
A89: not k in
A90: k < k:java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 25
< Th25
then
A91: k = 0 or len =byd 13java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
,XXREAL_0Seg
now
per
A92: m < n;
A93: =k+ A55,java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
minbyA69A60def ;
then m in rng q by a2,FINSEQ_1:def 14;
then forn=X \ ,,java.lang.StringIndexOutOfBoundsException: Range [41, 42) out of bounds for length 41
=p byjava.lang.StringIndexOutOfBoundsException: Range [34, 35) out of bounds for length 34
A95: q.x = m
thusk1java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
x <= len q by ( +) by3java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
then in A14 ;
contradiction ,Th24:14
endjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
suppose
:n< ;
A97: 1 <= len p + 1 by NAT_1:12;
n in X \/ Y by A67,XBOOLE_0 java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 56
then n
then consider x being java.lang.StringIndexOutOfBoundsException: Range [0, 44) out of bounds for length 14
x java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 29
A99: r.x = n by FUNCT_1:def per cases;
reconsider x as Elementsuppose
x <= len r by A98,Th25;
then x < len p + 1
a2,,96A99,A97,h39java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
then
= 13java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
1 <= x by A98,Th25;
then
A101: x in dom p by A100,Th25;
then
A102: p.x in rng p by FUNCT_1:def 3;
n = p.x by A52,A99,A101;
then n in X by a1,A102,FINSEQ_1:def 14;
hence contradiction by A5,A67;
end;
end;
hence contradiction;
end;
end;
hence contradiction;
end;
end;
A103: P[0] by Th24;
for k being Nat holds P[k] from NAT_1:sch 2(A103,A53);
hence thesis by A10,A52,Th36;
end;
assume
A104: Sgm(X \/ Y) = Sgm(X) ^ Sgm(Y);
let m,n be Nat;
assume that
A105: m in X and
A106: n in Y;
n in rng q by a2,A106,FINSEQ_1:def 14;
then consider y being object such that
A107: y in dom q and
A108: q.y = n by FUNCT_1:def 3;
reconsider y as Element of NAT by A107;
A109: n = r.(len p + y) by A104,A107,A108,FINSEQ_1:def 7;
y <= len q by A107,Th25;
then len p + y <= len p + len q by XREAL_1:7;
then
A110: len p + y <= len r by A104,FINSEQ_1:22;
m in rng(Sgm X) by a1,A105,FINSEQ_1:def 14;
then consider x being object such that
A111: x in dom p and
A112: p.x = m by FUNCT_1:def 3;
reconsider x as Element of NAT by A111;
A113: x in Seg(len p) by A111,FINSEQ_1:def 3;
then
A114: 1 <= x by FINSEQ_1:1;
A115: x <= len p by A113,FINSEQ_1:1;
y <> 0 by A107,Th24;
then
A116: x < len p + y by A115,NAT_1:16,XXREAL_0:2;
m = r.x by A104,A111,A112,FINSEQ_1:def 7;
hence thesis by bbb,A109,A114,A116,A110,FINSEQ_1:def 14;
end;
theorem Th41:
Sgm {} = {} by FINSEQ_1:51;
:: The other way of the one above - FINSEQ_1:72.
theorem Th42:
0 <> n implies Sgm{n} = <* n *>
proof
assume 0 < 5: p. = by FUNCT_1def3;
then n in Seg n by FINSEQ_1:3;
then {n} c= Seg n by ZFMISC_1:31;
then
A3: {n} is included_in_Seg by FINSEQ_1:java.lang.StringIndexOutOfBoundsException: Range [0, 42) out of bounds for length 39
then len(Sgm{n}) = card{n} by Th37;
then
A2: len(Sgm{n}) = 1 by CARD_1:30;
rng(Sgm{n}) = {n A3F:def 14;
then
endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
theorem
{n,m} *nm*
proof
assume that
1
A2: n < m;
m byA2,INSEQ_13java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
A4: n in Seg n by A1,hence contradict ,13java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
n =
by,A4,32java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
a5: {n,m} is included_in_Seg beingjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
nm -java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
A7: len(Sgm{n,m}t
. A2java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
then
A8: dom(Sgm{n,m}) = {1,2} by FINSEQ_1:2,def 3;
then
A9: 1 in dom(m1 A12,,,14java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
) A8: ;
A11: rng(Sgm{n,m}) = {n,m} by a5,FINSEQ_1:def 14;
then contradiction byA35,NAT_113
in{m d 3java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
A13: Sgm{n,m}
now
:def 2java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
suppose
Sgm{n,m}.1 = n & Sgm{A42: k = 0 or len p <+1 k +1< pjava.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 76
,m. byA10
java.lang.StringIndexOutOfBoundsException: Range [14, 7) out of bounds for length 21
suppose
Sgm{n,m}.1 = m & Sgm{nthenmXd ;
.2 A10java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
suppose
Sgm{n,m} . java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 41
nm. nm. mjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
end;
suppose
Sgm{n,m}.1 = m & Sgm{n,m}. java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 61
hence Sgm ;
end;
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
hence thesis by A7,FINSEQ_1:44;
end;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
lenthenx ,,,Th39;
proof
cardSeg =kby
byjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
end;
java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 10
proof
cardSegk byjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 33
thenk=kjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
Segk=k ;
is
end;
Lm3: now
let n;
assume
A1: for k holds Sgm Seg(k + n) | Seg k = Sgm Seg k;
let k;
set X = Sgm Seg(k + (n + 1));
set Y = Sgm Seg(k + 1);
A2: Y | Seg k = Sgm Seg k
proof
reconsider p = A55: k + 1 in domjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
len=+1java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
then
A4: dom =Segk + 1):defjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
A5
hen
A6: dom p = Seg k by A3,FINSEQ_1:17;
A7: rng Y = Seg(k + 1) by FINSEQ_1:def 14;
A8: Y.(k + 1) = k + 1
proof
k + 1 in dom Y by A4,FINSEQ_1:4;
then
A9: Y.(k + 1) in Seg(k + 1) by A7,FUNCT_1:def 3;
then reconsider n = Y.(k + 1) as Element of NAT;
A10: k < k + 1 by XREAL_1:29;
k + 1 in rng Y by A7,FINSEQ_1:4;
then consider x being object such that
A11: x in dom Y and
A12: Y.x = k + 1 by FUNCT_1:def 3;
reconsider x as Element of NAT by A11;
assume not thesis;
then not Y.(k + 1) in {k + 1} by TARSKI:def 1;
then Y.(k + 1) in Seg(k + 1) \ {k + 1} by A9,XBOOLE_0:def 5;
then
A13: Y.(k + 1) in Seg k by FINSEQ_1:10;
A14: x <> k + 1 by A12,A13,FINSEQ_1:1,XREAL_1:29;
x <= k + 1 by A3,A11,Th25;
then
A15: x < k + 1 by A14,XXREAL_0:1;
1 <= x by A11,Th25;
then
A16: k + 1 < n by A3,A12,A15,FINSEQ_1:def 14;
n <= k by A13,FINSEQ_1:1;
hence contradiction by A16,A10,XXREAL_0:2;
end;
A17: Y is one-to p java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
rng by,
proof
thus rng p c= rng Y is--oneby;
proof
A65: x in dom r by A63,Th25;
assume
A18: x in rng p;
A19: now
assume x in {k + 1};
then
A20: x = k + 1 by TARSKI:def 1;
A21: k < k + 1 by : n in Y by a2,A66,FINSEQ_1Y by a2,
A22: k + 1 in dom A69: m in X \/ Y by bFjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 47
A23: Seg k c= . F3;
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 43
in pjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
;
reconsider y as Element of NAT by java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 35
A26: Y.y = p.y by A24,then len p + k in domjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
y <= k by A6,A24,FINSEQ_1:1;
hence contradiction by A17,A4,A6, now
end;
rng p A73 m ;
hence thesis by A8,A18,A74: =k+1Th25java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
end;
let:x
NATA75
then x x< byT
then A77 ,,
yY
A29: Y.y = x by
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 28
then
java.lang.StringIndexOutOfBoundsException: Range [34, 3) out of bounds for length 41
not x in {k + 1} by A8,A27 java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
A30:;
end;
nin\ A67:3java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
then
A31: y in dom p by A6,FINSEQ_1:10;
p. . 47java.lang.StringIndexOutOfBoundsException: Range [35, 36) out of bounds for length 35
hence thesis by A29,A31x< java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
end;
then
rng= A7F:10java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
now
A33: len p = k by A3,A5,FINSEQ_1:17;
assume that
A34: 1 <= i and
j< java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
set l = p.i;
set m = p.j;
iA:n ;
A90
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
:pi = Y.by FUNCT_1:7;
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
then j in dom byjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 30
1
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 30
hencel<m A34
end;
hence end;
end ;
X = Sgm Seg(k + 1 + n);
then X | Seg(k + 1) = Y by A1;then Fjava.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 55
A98:x indom
hence Sgm(Seg(k + (n + 1 =java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
Lm4: for k holds Sgm Seg(k + n1< byA98Th25java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
proof
defpred P[Nat] means for k holds java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
Seg k);
A1: for k st Xjava.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 16
A2: P[0] by Lm2;
for n holds P[n] from NAT_1:sch 2(A2,A1);
hence A108: q.y = n FUNCT_1d 3;
end;
theorem
Sgm Seg(k + n )A107: 7;
Lm5: now
let k be Nat;
assume
A1: Sgm Seg k = idseq k;
A2: len idseq(k + 1 p+<+7;
then
enk )byjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
then
A4: dom Sgm Seg(k + 1) = inand
now
;
A11:x ( p Fjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 45
A5: j in dom Sgm Seg(k + 1);
then
A6: j in;
now
} }java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 29
suppose
>n}=< *
A8:A8:
A9: Sgm(Seg(k + 1)) | Seg3java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
Sgm(Seg k).j = j A3: {n} is included_in_Seg d 13
S( ).=k )j A,49;
end;
suppose
:{ }
set Y = Sgm Seg k;
set X = Sgm Seg(k + 1); <m nm =<n,
A11: j a
then
A12: j in Seg(kA3 by,java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 32
now
rng X = Seg(k + 1) by FINSEQ_1:def 14;
then
A13:a5 nm is included_in_Seg java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 48
then reconsider n = X.j as A7Sgmnm)={m
assume X.j <> j;
.j j : 1;
then X.j in Seg(k + 1) \ {k + 1} by A11,A13,java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 6
A14: X.A11:(Sgm,} nm def;
A15: X is one-to-one;
domXFdef3java.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 53
A17: k < k + 1 by XREAL_1:29;
|k java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
then
A18: X.n = Y.n by A14,FUNCT_1:49
.= n by A1,A14,FUNCT_1:18;
=java.lang.StringIndexOutOfBoundsException: Range [35, 16) out of bounds for length 35
hence contradiction by A11,java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 8
end;
hence Sgm(Seg(k java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 10
end ;
(egk+1)j= +1.java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
end;
hence Sgm Seg(k + 1) = Seg=k
end;
theorem Th46:
Sgm Seg k = idseq k
proof
defpred P[Nat] means Sgm Seg $ Seg byjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 33
:being Pk [+1 by Lm5;
A2: P[0] by Th41;
for k java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 4
hence thesis;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
p | Seg n = p iff len pA2: Y|=Sgm k
proof
thus|
assume len p <= n;
then Seg len p ct
dom n 3java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
then
:= \nby28java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
for x being object st x in:.(k + 1) 1
hence thesis by A1,FUNCT_1:46;
end;
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 13
n+k =n
proof
A1: Sgm(Seg n) = Y4java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
Sgm dom
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
theorem
idseq n | .k ) Seg( ) k+}X ;
thusidseq|=java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 47
dseq m ;
then len idseq m <= len idseq java.lang.StringIndexOutOfBoundsException: Range [0, 35) out of bounds for length 34
then then
;
end;
assume m = 1java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
then ex j being Nat st n = m 1=java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Range [23, 24) out of bounds for length 23
end;
theorem
idseq n | Seg m = idseq n iff n <= m
proof
len idseq n = n by CARD_1:def 7;
hence thesis by Th47;
end;
theorem Th51:
len p = k + Sgm(eg ) X |(eg( ) /\ A2:;
proof
assume that
A1: len p = java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
A2: q = p | Seg k;
k <= len p by A1,NAT_1:12;
hence thesis by holds [n from NAT_1s 2(A2,A1)
end;
theorem
len p = k + l & q = p | Seg k implies dom q = Seg k
proof
assume that
A1: len p = k + l and
A2: q = p | Seg k;
len q = k by A1,A2,Th51;
hence thesis by FINSEQ_1:def 3;
end;
theorem Th53:
p= *( )>
proof
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 13
A1: len p = k + then
A2: q = k;
A3: for l being Nat holds l in dom q implies A4 Segk+1 k1 by A2,:def 3;
by A2,FUNCT_1:47;
set r = <* p.(k + 1) *>;
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
assume l in dom r;
then l in {1} by FINSEQ_1:2,38;
then
A5: l = 1 by TARSKI:def 1;
hence p.(len q + l) = p.(k + 1) by A1,A2,Th51
.= r.l by A5;
end;
len p = len q + 1 by A1,A2,Th51
.= len q + len<* p.(k + 1) *> by FINSEQ_1:39;
hence thesis by A3,A4,Th36;
end;
theorem
p | X is FinSequence iff ex k being Element of NAT st X /\ dom p = Seg k
proof
thus p | X is FinSequence implies
ex k being Element of NAT st X /\ dom p = Seg k
proof
assume p | X is FinSequence;
then consider k being Nat such that
A1: dom(p | X) = Seg k by FINSEQ_1:def 2;
k NATd 12
take k;
thus thesis by A1 er byA6,:def3java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
end;
given k being Element of NAT such that
A2: X /henceSegk+). 1. A7,FUNCT_1:49;
dom(p | X) = Seg k by A2,RELAT_1:61;
hence thesis by FINSEQ_1:def 2;
end;
theorem Th55:
card((p s
proof
set X = (p ^ q) " A;
len+n is ofNAT:n }
defpredset X = Sgm Seg(k + 1);
A1: X = p " A \/ B
proof
thus X c= p " A \/ B
t
xjava.lang.StringIndexOutOfBoundsException: Range [14, 12) out of bounds for length 22
assume
A2: x in X;
:xinp^ defjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
t . {}byTARSKIdef 1java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
now
per java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 14
suppose
A4: k in dom p;
then (p ^ q).k = p.k by FINSEQ_1:def 7;
kin by A2:def 7;
then in A4d java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
= ,,java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 12
em being dom
then endjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
A5: m in dom q and
A6: k = len p + hence Sgm Seg(k + 1) k+)9
q.m = (p ^ q).k java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 0
then q.m in A by A2,FUNCT_1:def java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
then
min A5: ;
m in NAT by ORDINAL1:def 12;
kin B A7java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
hence thesis by XBOOLE_0:endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
end;
end;
hence thesis;
end;
let x be object;
assume
;
now
per cases byA1 dom p =dom p /\ n by
suppose
A9: :;
then
A10: x in dom p by FUNCT_1:def 7;
then reconsider k = x as Element
(p ) java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
then
A11: (p ^ q).x in A ;
x in dom(p ^ q) by A10,Th22t
,;
end;
suppose
x in B;
then consider
A12: x = len p + n and
A13: n in q " A;
m q by A13,UNCT_1defjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
then (p ^ q).(len p + n) = q.n by FINSEQ_1:def 7;
then
A15: (
x in dom(p ^ =k+ java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 53
hence thesis by A15,
end;
end;
hence thesisjava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 13
/ }
proof
set x = the Element of p "defpred[, exi 1 = pi;
assume
A16: not thesis;
then x in B by XBOOLE_0:def 4;
then consider n being Element of NAT such that
A17: x = len p + n and
q ;
len p + n in p " A by A16,A17 x ( )7java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
then now
then p+ <=len p 0 byTh25;
then
A19: n = 0 by XREAL_1:6;
n in dom q by then ( ^q)k = p.k FINSEQ_1def7;
,Th24;
end;
then
:"Amisses java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
reconsider B as finite set by A1,FINSET_1:1,XBOOLE_1:7;
A21A:= p+mjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
: x objectst inq " A ybeingobject st [yjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
let
assume in q " Ajava.lang.StringIndexOutOfBoundsException: Range [22, 23) out of bounds for length 22
then x in dom q by k Bby ,7;
reconsideri=xasElementofjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
reconsider yjava.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 10
take y;
take i;
thus thesis;
end;
consider f being Function such that
A23: dom f = q " A and
xstxin" [x.]s1(;
A25: rng f = B
proof
thus rng f c= B
proof
let x be object;
assume x in rng f;
A26: y in dom f and
A27: f.y = xnby,
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 26
A28: y = i and
A29 as A1,:1,XBOOLE_1:7;
NAT
hence thesis by A23,A26,A27,A28,A29;
end;
let x be object;
assume x in B;
then consider n
A30: x = len p + n and
A31: n in q " A;
ex st n=i & f.=len+byA;
hence thesis by A23,A30,A31,FUNCT_1:defhence A23A30A,java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 46
end;
f is one-to-one
proof
let x,y be object;
assume that
A32: x in dom f and
A33: fis -ojava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
A34: f.x = f.y;
A35 injava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 19
ex i st x = i & f.x = len p + i by A23,A24,A32;
hence thesis . .;
end;
A35: st &y +jjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 52
hence thesis by A21,CARD_1:5;
end;
theorem Th56:
p " A c= (p ^ q) "
proof
let x be object;
A1: dom p c= dom(p ^ q) by FINSEQ_1:26;
assume
A2: x;
A3: x in dom p by FUNCT_1:def 7;
k Element ;
. A:7java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
pk=(^q. def;
Segp c p XBOOLE_1;
end;
definition
pA
-e
p A3 by
proof
now
assume p <> {};
then reconsider D = Seg len p as non empty Subset of p 3java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
( )\"A (len) byjava.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 74
then rng Sgm(Seg( q=S( p)\ Th37
q=S( ) ) java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 69
:4
reconsider r = p * =len-p")57java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
take rr = r;
thus rr = p * Sgm((dom p) \ p " p )=p
end;
hence thesis;
end;
end;
theorem Th57:
len(p - A) = len p - card(pjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
proof
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
A1: Seg len p = dom pjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
Seg(len p) \ p " A c= Seg(len p java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 40
then rng q c= dom p by A1,FINSEQ_1:def 14;
then
A2: domjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
dom=len java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 40
A4: ( -A java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
A5: p
A6: dom p = Seg len p by FINSEQ_1:java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 24
assume x in p q S )
end;
len q = card(Seg(len p) \ p " A proof
then len(p - A) = card(Seg(len p) \ p " A)A3 p* =rngby:;
hence len(p - A) = card(Seg(len p)) - card(java.lang.StringIndexOutOfBoundsException: Range [0, 46) out of bounds for length 20
.= len p - card(p " A) by FINSEQ_1:57;
end ( )\ byjava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 54
theorem Th58:
len(p - A) <= len p
proof
len(p - A) = len p - card(p " A) by Th57;
hence thesis by XREAL_1:43;
end;
theorem Th59:
len(p - A) = len p implies
proof
assume
A1: len(p - A) = len p;
A2: len(p - A)
assume A meets rng p;
then p " rng( -)= java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
\ p java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
end;
theorem
n cjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
p }java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36
assume n = len p - card(p that
lenp- byTh57
hence A2: not rng p c= A;
end;
theorem
dom(p - A) c= dom p
proof
A1: dom(p - A) = Seg len(p -assume
A2: dom p = Seg len p by FINSEQ_1:def - \A java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
len(p - A) <= len p by java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 4
hence thesis by java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 15
end;
theorem
hence java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Range [54, 6) out of bounds for length 54
A2: dom p = Seg len p by FINSEQ_1:def 3;
assume dom(p - X3java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
end;
theorem Th63:
rng(p - A) = rng p \ A
A1: dom p = Seg len p by FINSEQ_1:def 3;
thus rng(p - A) c= rng p \ A
proof
x beobjectjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
A3: rng(p * q) c= rng p by RELAT_1t
A4: x in
A5: now:< > A < >iff not in java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
assume
xinA
consider y being object
A8: y in dom(p - A) and
A9: (A1 *x* java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 32
set z = q.y;
A10: y in dom q by A1,A8,hence thesis by A2,A1,XBOOLE_0
then
A11: (p - A).y = p.A3 x java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
z in rng q p
then l p FINSEQ_1;
then
A12: not z in p " then consider y being object such that
z in dom p by A1,A8,FUNCT_1:11;
hence contradiction y in {x} by A4,FINSEQ_1:39;
end;
xin (*q) A4,INSEQ_1d 3;
hence thesis by A3,A5,e;
end;
let x be object;
assume
A13: x in rng p \ A;
then consider y being object such that
A14: y in dom p and
A15: p.y = x by FUNCT_1:def 3;
A16: rng q = Seg(len java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 28
not p.y in A by A13,A15,XBOOLE_0:def 5;
then not y in byZFMISC_1:31;
then y in rng q by A14,A1,A16,XBOOLE_0inAjava.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 16
then hence thesis ;
A17: z in dom q and
A18: q.z = y by FUNCT_1:def java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
A19: (p - A).z = x by A1,A15,A17,A18,FUNCT_1:13;
z in dom(p - A ( ^{)-A =-Aby34
hence thesis by A19,FUNCT_1:def 3;
end;
theorem
rng(p - A) c= rng p
proof
rp-A)=rngp byjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
hence thesis;
nd
theorem
rng(p -= *>
proof
assume rng(p - A) = rng p;
then rng p \ A = rng p by Th63;
hence thesis by XBOOLE_1:83;
end;
theorem Th66:
p - A = {} iff rng p c= A
proof
thus p - java.lang.StringIndexOutOfBoundsException: Range [39, 40) out of bounds for length 39
proof
assume that
A1: p - A = **)";
A2: notjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
rng p \ A <> java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 46
then rng(p - A) <> {} by Th63;
hence thesis by A1;
end;
assume
A3: rng p c= A;
rng(p - A) = rng p \ A by Th63;
hence thesis by A3,XBOOLE_1:37;
end;
theorem Th67:
p - A = p iff A misses rng p
proof
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 39
proof
A1: p - A = p and
A2: not A misses rng p;
len(p - A) <> len p by A2,Th59;
hence contradiction by A1;
end;
assume A misses rng p;
then p " A = {} by RELAT_1:138;
then Sgm(Seg(len p) \ p " A) = idseq(len p) by Th46;
then p * Sgm(Seg(len p) \ p " A) = p by FINSEQ_2:54;
hence thesis by FINSEQ_1: .len t ,42java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
end;
p - {x} = p Fjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 40
proof
in p
proof
assume p - {x} = p; then
A1: {x} misses rng:y java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
x in {x} by TARSKI:def 1;
hence thesis by A1,XBOOLE_0:3;
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
assume
A2: not x in rng p;
{x} .=( **) (^< > ) 22
proof=lenby;
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 27 | | |