:: JORDAN3 semantic presentation begin theorem :: JORDAN3:1 for n being Element of NAT for f being FinSequence of (TOP-REAL n) st 2 <= len f holds ( f . 1 in L~ f & f /. 1 in L~ f & f . (len f) in L~ f & f /. (len f) in L~ f ) proof let n be Element of NAT ; ::_thesis: for f being FinSequence of (TOP-REAL n) st 2 <= len f holds ( f . 1 in L~ f & f /. 1 in L~ f & f . (len f) in L~ f & f /. (len f) in L~ f ) let f be FinSequence of (TOP-REAL n); ::_thesis: ( 2 <= len f implies ( f . 1 in L~ f & f /. 1 in L~ f & f . (len f) in L~ f & f /. (len f) in L~ f ) ) assume A1: 2 <= len f ; ::_thesis: ( f . 1 in L~ f & f /. 1 in L~ f & f . (len f) in L~ f & f /. (len f) in L~ f ) then A2: 1 + 1 <= len f ; then A3: LSeg (f,1) in { (LSeg (f,i)) where i is Element of NAT : ( 1 <= i & i + 1 <= len f ) } ; f /. 1 in LSeg ((f /. 1),(f /. (1 + 1))) by RLTOPSP1:68; then f /. 1 in LSeg (f,1) by A1, TOPREAL1:def_3; then f /. 1 in union { (LSeg (f,i)) where i is Element of NAT : ( 1 <= i & i + 1 <= len f ) } by A3, TARSKI:def_4; then A4: f /. 1 in L~ f by TOPREAL1:def_4; A5: ((len f) -' 1) + 1 = len f by A2, NAT_D:46, XREAL_1:235; A6: 1 <= (len f) -' 1 by A2, NAT_D:49; then A7: LSeg (f,((len f) -' 1)) in { (LSeg (f,i)) where i is Element of NAT : ( 1 <= i & i + 1 <= len f ) } by A5; f /. (len f) in LSeg ((f /. ((len f) -' 1)),(f /. (((len f) -' 1) + 1))) by A5, RLTOPSP1:68; then f /. (len f) in LSeg (f,((len f) -' 1)) by A6, A5, TOPREAL1:def_3; then f /. (len f) in union { (LSeg (f,i)) where i is Element of NAT : ( 1 <= i & i + 1 <= len f ) } by A7, TARSKI:def_4; then A8: f /. (len f) in L~ f by TOPREAL1:def_4; 1 <= len f by A2, NAT_D:46; hence ( f . 1 in L~ f & f /. 1 in L~ f & f . (len f) in L~ f & f /. (len f) in L~ f ) by A4, A8, FINSEQ_4:15; ::_thesis: verum end; theorem Th2: :: JORDAN3:2 for p1, p2, q1, q2 being Point of (TOP-REAL 2) st ( p1 `1 = p2 `1 or p1 `2 = p2 `2 ) & q1 in LSeg (p1,p2) & q2 in LSeg (p1,p2) & not q1 `1 = q2 `1 holds q1 `2 = q2 `2 proof let p1, p2, q1, q2 be Point of (TOP-REAL 2); ::_thesis: ( ( p1 `1 = p2 `1 or p1 `2 = p2 `2 ) & q1 in LSeg (p1,p2) & q2 in LSeg (p1,p2) & not q1 `1 = q2 `1 implies q1 `2 = q2 `2 ) assume that A1: ( p1 `1 = p2 `1 or p1 `2 = p2 `2 ) and A2: q1 in LSeg (p1,p2) and A3: q2 in LSeg (p1,p2) ; ::_thesis: ( q1 `1 = q2 `1 or q1 `2 = q2 `2 ) consider r2 being Real such that A4: q2 = ((1 - r2) * p1) + (r2 * p2) and 0 <= r2 and r2 <= 1 by A3; consider r1 being Real such that A5: q1 = ((1 - r1) * p1) + (r1 * p2) and 0 <= r1 and r1 <= 1 by A2; q1 `1 = (((1 - r1) * p1) `1) + ((r1 * p2) `1) by A5, TOPREAL3:2; then q1 `1 = ((1 - r1) * (p1 `1)) + ((r1 * p2) `1) by TOPREAL3:4; then A6: q1 `1 = ((1 - r1) * (p1 `1)) + (r1 * (p2 `1)) by TOPREAL3:4; q2 `1 = (((1 - r2) * p1) `1) + ((r2 * p2) `1) by A4, TOPREAL3:2; then q2 `1 = ((1 - r2) * (p1 `1)) + ((r2 * p2) `1) by TOPREAL3:4; then A7: q2 `1 = ((1 - r2) * (p1 `1)) + (r2 * (p2 `1)) by TOPREAL3:4; q1 `2 = (((1 - r1) * p1) `2) + ((r1 * p2) `2) by A5, TOPREAL3:2; then q1 `2 = ((1 - r1) * (p1 `2)) + ((r1 * p2) `2) by TOPREAL3:4; then A8: q1 `2 = ((1 - r1) * (p1 `2)) + (r1 * (p2 `2)) by TOPREAL3:4; q2 `2 = (((1 - r2) * p1) `2) + ((r2 * p2) `2) by A4, TOPREAL3:2; then q2 `2 = ((1 - r2) * (p1 `2)) + ((r2 * p2) `2) by TOPREAL3:4; then A9: q2 `2 = ((1 - r2) * (p1 `2)) + (r2 * (p2 `2)) by TOPREAL3:4; percases ( p1 `1 = p2 `1 or p1 `2 = p2 `2 ) by A1; suppose p1 `1 = p2 `1 ; ::_thesis: ( q1 `1 = q2 `1 or q1 `2 = q2 `2 ) hence ( q1 `1 = q2 `1 or q1 `2 = q2 `2 ) by A6, A7; ::_thesis: verum end; suppose p1 `2 = p2 `2 ; ::_thesis: ( q1 `1 = q2 `1 or q1 `2 = q2 `2 ) hence ( q1 `1 = q2 `1 or q1 `2 = q2 `2 ) by A8, A9; ::_thesis: verum end; end; end; theorem Th3: :: JORDAN3:3 for p1, p2, q1, q2 being Point of (TOP-REAL 2) st ( p1 `1 = p2 `1 or p1 `2 = p2 `2 ) & LSeg (q1,q2) c= LSeg (p1,p2) & not q1 `1 = q2 `1 holds q1 `2 = q2 `2 proof let p1, p2, q1, q2 be Point of (TOP-REAL 2); ::_thesis: ( ( p1 `1 = p2 `1 or p1 `2 = p2 `2 ) & LSeg (q1,q2) c= LSeg (p1,p2) & not q1 `1 = q2 `1 implies q1 `2 = q2 `2 ) A1: q2 in LSeg (q1,q2) by RLTOPSP1:68; q1 in LSeg (q1,q2) by RLTOPSP1:68; hence ( ( p1 `1 = p2 `1 or p1 `2 = p2 `2 ) & LSeg (q1,q2) c= LSeg (p1,p2) & not q1 `1 = q2 `1 implies q1 `2 = q2 `2 ) by A1, Th2; ::_thesis: verum end; theorem Th4: :: JORDAN3:4 for f being FinSequence of (TOP-REAL 2) for n being Element of NAT st 2 <= n & f is being_S-Seq holds f | n is being_S-Seq proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for n being Element of NAT st 2 <= n & f is being_S-Seq holds f | n is being_S-Seq let n be Element of NAT ; ::_thesis: ( 2 <= n & f is being_S-Seq implies f | n is being_S-Seq ) assume that A1: 2 <= n and A2: f is being_S-Seq ; ::_thesis: f | n is being_S-Seq A3: len f >= 2 by A2, TOPREAL1:def_8; A4: now__::_thesis:_(_(_n_<=_len_f_&_len_(f_|_n)_>=_2_)_or_(_n_>_len_f_&_len_(f_|_n)_>=_2_)_) percases ( n <= len f or n > len f ) ; case n <= len f ; ::_thesis: len (f | n) >= 2 hence len (f | n) >= 2 by A1, FINSEQ_1:59; ::_thesis: verum end; case n > len f ; ::_thesis: len (f | n) >= 2 hence len (f | n) >= 2 by A3, FINSEQ_1:58; ::_thesis: verum end; end; end; reconsider f9 = f as one-to-one special unfolded s.n.c. FinSequence of (TOP-REAL 2) by A2; f9 | n is one-to-one ; hence f | n is being_S-Seq by A4, TOPREAL1:def_8; ::_thesis: verum end; theorem Th5: :: JORDAN3:5 for f being FinSequence of (TOP-REAL 2) for n being Element of NAT st n <= len f & 2 <= (len f) -' n & f is being_S-Seq holds f /^ n is being_S-Seq proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for n being Element of NAT st n <= len f & 2 <= (len f) -' n & f is being_S-Seq holds f /^ n is being_S-Seq let n be Element of NAT ; ::_thesis: ( n <= len f & 2 <= (len f) -' n & f is being_S-Seq implies f /^ n is being_S-Seq ) assume that A1: n <= len f and A2: 2 <= (len f) -' n and A3: f is being_S-Seq ; ::_thesis: f /^ n is being_S-Seq reconsider f9 = f as one-to-one special unfolded s.n.c. FinSequence of (TOP-REAL 2) by A3; len (f /^ n) = (len f) - n by A1, RFINSEQ:def_1; then len (f9 /^ n) >= 2 by A1, A2, XREAL_1:233; hence f /^ n is being_S-Seq by TOPREAL1:def_8; ::_thesis: verum end; theorem :: JORDAN3:6 for f being FinSequence of (TOP-REAL 2) for k1, k2 being Element of NAT st f is being_S-Seq & 1 <= k1 & k1 <= len f & 1 <= k2 & k2 <= len f & k1 <> k2 holds mid (f,k1,k2) is being_S-Seq proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for k1, k2 being Element of NAT st f is being_S-Seq & 1 <= k1 & k1 <= len f & 1 <= k2 & k2 <= len f & k1 <> k2 holds mid (f,k1,k2) is being_S-Seq let k1, k2 be Element of NAT ; ::_thesis: ( f is being_S-Seq & 1 <= k1 & k1 <= len f & 1 <= k2 & k2 <= len f & k1 <> k2 implies mid (f,k1,k2) is being_S-Seq ) assume that A1: f is being_S-Seq and A2: 1 <= k1 and A3: k1 <= len f and A4: 1 <= k2 and A5: k2 <= len f and A6: k1 <> k2 ; ::_thesis: mid (f,k1,k2) is being_S-Seq percases ( k1 <= k2 or k1 > k2 ) ; supposeA7: k1 <= k2 ; ::_thesis: mid (f,k1,k2) is being_S-Seq then k1 < k2 by A6, XXREAL_0:1; then A8: k1 + 1 <= k2 by NAT_1:13; then (k1 + 1) - k1 <= k2 - k1 by XREAL_1:9; then 1 <= k2 -' k1 by NAT_D:39; then A9: 1 + 1 <= (k2 -' k1) + 1 by XREAL_1:6; k1 + 1 <= len f by A5, A8, XXREAL_0:2; then (k1 + 1) - k1 <= (len f) - k1 by XREAL_1:9; then A10: 1 + 1 <= ((len f) - k1) + 1 by XREAL_1:6; (len f) -' (k1 -' 1) = (len f) - (k1 -' 1) by A3, NAT_D:50, XREAL_1:233 .= (len f) - (k1 - 1) by A2, XREAL_1:233 .= ((len f) - k1) + 1 ; then A11: f /^ (k1 -' 1) is being_S-Seq by A1, A3, A10, Th5, NAT_D:50; mid (f,k1,k2) = (f /^ (k1 -' 1)) | ((k2 -' k1) + 1) by A7, FINSEQ_6:def_3; hence mid (f,k1,k2) is being_S-Seq by A11, A9, Th4; ::_thesis: verum end; supposeA12: k1 > k2 ; ::_thesis: mid (f,k1,k2) is being_S-Seq then A13: k2 + 1 <= k1 by NAT_1:13; then (k2 + 1) - k2 <= k1 - k2 by XREAL_1:9; then 1 <= k1 -' k2 by NAT_D:39; then A14: 1 + 1 <= (k1 -' k2) + 1 by XREAL_1:6; k2 + 1 <= len f by A3, A13, XXREAL_0:2; then (k2 + 1) - k2 <= (len f) - k2 by XREAL_1:9; then A15: 1 + 1 <= ((len f) - k2) + 1 by XREAL_1:6; (len f) -' (k2 -' 1) = (len f) - (k2 -' 1) by A5, NAT_D:50, XREAL_1:233 .= (len f) - (k2 - 1) by A4, XREAL_1:233 .= ((len f) - k2) + 1 ; then f /^ (k2 -' 1) is being_S-Seq by A1, A5, A15, Th5, NAT_D:50; then A16: (f /^ (k2 -' 1)) | ((k1 -' k2) + 1) is S-Sequence_in_R2 by A14, Th4; mid (f,k1,k2) = Rev ((f /^ (k2 -' 1)) | ((k1 -' k2) + 1)) by A12, FINSEQ_6:def_3; hence mid (f,k1,k2) is being_S-Seq by A16; ::_thesis: verum end; end; end; begin definition let f be FinSequence of (TOP-REAL 2); let p be Point of (TOP-REAL 2); assume A1: p in L~ f ; func Index (p,f) -> Element of NAT means :Def1: :: JORDAN3:def 1 ex S being non empty Subset of NAT st ( it = min S & S = { i where i is Element of NAT : p in LSeg (f,i) } ); existence ex b1 being Element of NAT ex S being non empty Subset of NAT st ( b1 = min S & S = { i where i is Element of NAT : p in LSeg (f,i) } ) proof set S = { i where i is Element of NAT : p in LSeg (f,i) } ; A2: { i where i is Element of NAT : p in LSeg (f,i) } c= NAT proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { i where i is Element of NAT : p in LSeg (f,i) } or x in NAT ) assume x in { i where i is Element of NAT : p in LSeg (f,i) } ; ::_thesis: x in NAT then ex i being Element of NAT st ( x = i & p in LSeg (f,i) ) ; hence x in NAT ; ::_thesis: verum end; consider i2 being Element of NAT such that 1 <= i2 and i2 + 1 <= len f and A3: p in LSeg (f,i2) by A1, SPPOL_2:13; i2 in { i where i is Element of NAT : p in LSeg (f,i) } by A3; then reconsider S = { i where i is Element of NAT : p in LSeg (f,i) } as non empty Subset of NAT by A2; take min S ; ::_thesis: ex S being non empty Subset of NAT st ( min S = min S & S = { i where i is Element of NAT : p in LSeg (f,i) } ) take S ; ::_thesis: ( min S = min S & S = { i where i is Element of NAT : p in LSeg (f,i) } ) thus ( min S = min S & S = { i where i is Element of NAT : p in LSeg (f,i) } ) ; ::_thesis: verum end; uniqueness for b1, b2 being Element of NAT st ex S being non empty Subset of NAT st ( b1 = min S & S = { i where i is Element of NAT : p in LSeg (f,i) } ) & ex S being non empty Subset of NAT st ( b2 = min S & S = { i where i is Element of NAT : p in LSeg (f,i) } ) holds b1 = b2 ; end; :: deftheorem Def1 defines Index JORDAN3:def_1_:_ for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st p in L~ f holds for b3 being Element of NAT holds ( b3 = Index (p,f) iff ex S being non empty Subset of NAT st ( b3 = min S & S = { i where i is Element of NAT : p in LSeg (f,i) } ) ); theorem Th7: :: JORDAN3:7 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) for i being Element of NAT st p in LSeg (f,i) holds Index (p,f) <= i proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) for i being Element of NAT st p in LSeg (f,i) holds Index (p,f) <= i let p be Point of (TOP-REAL 2); ::_thesis: for i being Element of NAT st p in LSeg (f,i) holds Index (p,f) <= i let i0 be Element of NAT ; ::_thesis: ( p in LSeg (f,i0) implies Index (p,f) <= i0 ) assume A1: p in LSeg (f,i0) ; ::_thesis: Index (p,f) <= i0 LSeg (f,i0) c= L~ f by TOPREAL3:19; then consider S being non empty Subset of NAT such that A2: Index (p,f) = min S and A3: S = { i where i is Element of NAT : p in LSeg (f,i) } by A1, Def1; i0 in S by A1, A3; hence Index (p,f) <= i0 by A2, XXREAL_2:def_7; ::_thesis: verum end; theorem Th8: :: JORDAN3:8 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st p in L~ f holds ( 1 <= Index (p,f) & Index (p,f) < len f ) proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st p in L~ f holds ( 1 <= Index (p,f) & Index (p,f) < len f ) let p be Point of (TOP-REAL 2); ::_thesis: ( p in L~ f implies ( 1 <= Index (p,f) & Index (p,f) < len f ) ) assume p in L~ f ; ::_thesis: ( 1 <= Index (p,f) & Index (p,f) < len f ) then consider S being non empty Subset of NAT such that A1: Index (p,f) = min S and A2: S = { i where i is Element of NAT : p in LSeg (f,i) } by Def1; Index (p,f) in S by A1, XXREAL_2:def_7; then A3: ex i being Element of NAT st ( i = Index (p,f) & p in LSeg (f,i) ) by A2; hence 1 <= Index (p,f) by TOPREAL1:def_3; ::_thesis: Index (p,f) < len f (Index (p,f)) + 1 <= len f by A3, TOPREAL1:def_3; hence Index (p,f) < len f by NAT_1:13; ::_thesis: verum end; theorem Th9: :: JORDAN3:9 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st p in L~ f holds p in LSeg (f,(Index (p,f))) proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st p in L~ f holds p in LSeg (f,(Index (p,f))) let p be Point of (TOP-REAL 2); ::_thesis: ( p in L~ f implies p in LSeg (f,(Index (p,f))) ) assume p in L~ f ; ::_thesis: p in LSeg (f,(Index (p,f))) then consider S being non empty Subset of NAT such that A1: Index (p,f) = min S and A2: S = { i where i is Element of NAT : p in LSeg (f,i) } by Def1; Index (p,f) in S by A1, XXREAL_2:def_7; then ex i being Element of NAT st ( i = Index (p,f) & p in LSeg (f,i) ) by A2; hence p in LSeg (f,(Index (p,f))) ; ::_thesis: verum end; theorem Th10: :: JORDAN3:10 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st p in LSeg (f,1) holds Index (p,f) = 1 proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st p in LSeg (f,1) holds Index (p,f) = 1 let p be Point of (TOP-REAL 2); ::_thesis: ( p in LSeg (f,1) implies Index (p,f) = 1 ) assume A1: p in LSeg (f,1) ; ::_thesis: Index (p,f) = 1 then A2: Index (p,f) <= 1 by Th7; LSeg (f,1) c= L~ f by TOPREAL3:19; then Index (p,f) >= 1 by A1, Th8; hence Index (p,f) = 1 by A2, XXREAL_0:1; ::_thesis: verum end; theorem Th11: :: JORDAN3:11 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st len f >= 2 holds Index ((f /. 1),f) = 1 proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st len f >= 2 holds Index ((f /. 1),f) = 1 let p be Point of (TOP-REAL 2); ::_thesis: ( len f >= 2 implies Index ((f /. 1),f) = 1 ) assume len f >= 2 ; ::_thesis: Index ((f /. 1),f) = 1 then len f >= 1 + 1 ; then f /. 1 in LSeg (f,1) by TOPREAL1:21; hence Index ((f /. 1),f) = 1 by Th10; ::_thesis: verum end; theorem Th12: :: JORDAN3:12 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) for i1 being Nat st f is being_S-Seq & 1 < i1 & i1 <= len f & p = f . i1 holds (Index (p,f)) + 1 = i1 proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) for i1 being Nat st f is being_S-Seq & 1 < i1 & i1 <= len f & p = f . i1 holds (Index (p,f)) + 1 = i1 let p be Point of (TOP-REAL 2); ::_thesis: for i1 being Nat st f is being_S-Seq & 1 < i1 & i1 <= len f & p = f . i1 holds (Index (p,f)) + 1 = i1 let i1 be Nat; ::_thesis: ( f is being_S-Seq & 1 < i1 & i1 <= len f & p = f . i1 implies (Index (p,f)) + 1 = i1 ) assume A1: f is being_S-Seq ; ::_thesis: ( not 1 < i1 or not i1 <= len f or not p = f . i1 or (Index (p,f)) + 1 = i1 ) assume that A2: 1 < i1 and A3: i1 <= len f ; ::_thesis: ( not p = f . i1 or (Index (p,f)) + 1 = i1 ) A4: i1 in dom f by A2, A3, FINSEQ_3:25; assume p = f . i1 ; ::_thesis: (Index (p,f)) + 1 = i1 then A5: p = f /. i1 by A4, PARTFUN1:def_6; assume A6: (Index (p,f)) + 1 <> i1 ; ::_thesis: contradiction consider j being Nat such that A7: i1 = j + 1 by A2, NAT_1:6; reconsider j = j as Element of NAT by ORDINAL1:def_12; A8: 1 + 0 <= j by A2, A7, NAT_1:13; then A9: p in LSeg (f,j) by A3, A7, A5, TOPREAL1:21; then Index (p,f) <= j by Th7; then Index (p,f) < j by A7, A6, XXREAL_0:1; then A10: (Index (p,f)) + 1 <= j by NAT_1:13; A11: LSeg (f,j) c= L~ f by TOPREAL3:19; then A12: p in LSeg (f,(Index (p,f))) by A9, Th9; percases ( (Index (p,f)) + 1 = j or (Index (p,f)) + 1 < j ) by A10, XXREAL_0:1; supposeA13: (Index (p,f)) + 1 = j ; ::_thesis: contradiction then A14: (Index (p,f)) + (1 + 1) <= len f by A3, A7; 1 <= Index (p,f) by A9, A11, Th8; then (LSeg (f,(Index (p,f)))) /\ (LSeg (f,j)) = {(f /. j)} by A1, A13, A14, TOPREAL1:def_6; then p in {(f /. j)} by A9, A12, XBOOLE_0:def_4; then A15: p = f /. j by TARSKI:def_1; j < len f by A3, A7, NAT_1:13; then A16: j in dom f by A8, FINSEQ_3:25; j < i1 by A7, NAT_1:13; hence contradiction by A1, A4, A5, A15, A16, PARTFUN2:10; ::_thesis: verum end; supposeA17: (Index (p,f)) + 1 < j ; ::_thesis: contradiction p in (LSeg (f,(Index (p,f)))) /\ (LSeg (f,j)) by A9, A12, XBOOLE_0:def_4; then LSeg (f,(Index (p,f))) meets LSeg (f,j) by XBOOLE_0:4; hence contradiction by A1, A17, TOPREAL1:def_7; ::_thesis: verum end; end; end; theorem Th13: :: JORDAN3:13 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) for i1 being Element of NAT st f is s.n.c. & p in LSeg (f,i1) & not i1 = Index (p,f) holds i1 = (Index (p,f)) + 1 proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) for i1 being Element of NAT st f is s.n.c. & p in LSeg (f,i1) & not i1 = Index (p,f) holds i1 = (Index (p,f)) + 1 let p be Point of (TOP-REAL 2); ::_thesis: for i1 being Element of NAT st f is s.n.c. & p in LSeg (f,i1) & not i1 = Index (p,f) holds i1 = (Index (p,f)) + 1 let i1 be Element of NAT ; ::_thesis: ( f is s.n.c. & p in LSeg (f,i1) & not i1 = Index (p,f) implies i1 = (Index (p,f)) + 1 ) assume that A1: f is s.n.c. and A2: p in LSeg (f,i1) ; ::_thesis: ( i1 = Index (p,f) or i1 = (Index (p,f)) + 1 ) p in L~ f by A2, SPPOL_2:17; then p in LSeg (f,(Index (p,f))) by Th9; then p in (LSeg (f,(Index (p,f)))) /\ (LSeg (f,i1)) by A2, XBOOLE_0:def_4; then A3: LSeg (f,(Index (p,f))) meets LSeg (f,i1) by XBOOLE_0:4; assume A4: ( not i1 = Index (p,f) & not i1 = (Index (p,f)) + 1 ) ; ::_thesis: contradiction Index (p,f) <= i1 by A2, Th7; then Index (p,f) < i1 by A4, XXREAL_0:1; then (Index (p,f)) + 1 <= i1 by NAT_1:13; then (Index (p,f)) + 1 < i1 by A4, XXREAL_0:1; hence contradiction by A1, A3, TOPREAL1:def_7; ::_thesis: verum end; theorem Th14: :: JORDAN3:14 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) for i1 being Element of NAT st f is unfolded & f is s.n.c. & i1 + 1 <= len f & p in LSeg (f,i1) & p <> f . i1 holds i1 = Index (p,f) proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) for i1 being Element of NAT st f is unfolded & f is s.n.c. & i1 + 1 <= len f & p in LSeg (f,i1) & p <> f . i1 holds i1 = Index (p,f) let p be Point of (TOP-REAL 2); ::_thesis: for i1 being Element of NAT st f is unfolded & f is s.n.c. & i1 + 1 <= len f & p in LSeg (f,i1) & p <> f . i1 holds i1 = Index (p,f) let i1 be Element of NAT ; ::_thesis: ( f is unfolded & f is s.n.c. & i1 + 1 <= len f & p in LSeg (f,i1) & p <> f . i1 implies i1 = Index (p,f) ) assume that A1: ( f is unfolded & f is s.n.c. ) and A2: i1 + 1 <= len f and A3: p in LSeg (f,i1) ; ::_thesis: ( not p <> f . i1 or i1 = Index (p,f) ) A4: i1 < len f by A2, NAT_1:13; A5: 1 <= (Index (p,f)) + 1 by NAT_1:11; Index (p,f) <= i1 by A3, Th7; then Index (p,f) < len f by A4, XXREAL_0:2; then (Index (p,f)) + 1 <= len f by NAT_1:13; then A6: (Index (p,f)) + 1 in dom f by A5, FINSEQ_3:25; assume A7: p <> f . i1 ; ::_thesis: i1 = Index (p,f) A8: p in L~ f by A3, SPPOL_2:17; then p in LSeg (f,(Index (p,f))) by Th9; then A9: p in (LSeg (f,(Index (p,f)))) /\ (LSeg (f,i1)) by A3, XBOOLE_0:def_4; A10: 1 <= Index (p,f) by A8, Th8; now__::_thesis:_not_i1_=_(Index_(p,f))_+_1 assume A11: i1 = (Index (p,f)) + 1 ; ::_thesis: contradiction then (Index (p,f)) + (1 + 1) <= len f by A2; then p in {(f /. ((Index (p,f)) + 1))} by A1, A9, A10, A11, TOPREAL1:def_6; then p = f /. ((Index (p,f)) + 1) by TARSKI:def_1; hence contradiction by A7, A6, A11, PARTFUN1:def_6; ::_thesis: verum end; hence i1 = Index (p,f) by A1, A3, Th13; ::_thesis: verum end; definition let g be FinSequence of (TOP-REAL 2); let p1, p2 be Point of (TOP-REAL 2); predg is_S-Seq_joining p1,p2 means :Def2: :: JORDAN3:def 2 ( g is being_S-Seq & g . 1 = p1 & g . (len g) = p2 ); end; :: deftheorem Def2 defines is_S-Seq_joining JORDAN3:def_2_:_ for g being FinSequence of (TOP-REAL 2) for p1, p2 being Point of (TOP-REAL 2) holds ( g is_S-Seq_joining p1,p2 iff ( g is being_S-Seq & g . 1 = p1 & g . (len g) = p2 ) ); theorem Th15: :: JORDAN3:15 for g being FinSequence of (TOP-REAL 2) for p1, p2 being Point of (TOP-REAL 2) st g is_S-Seq_joining p1,p2 holds Rev g is_S-Seq_joining p2,p1 proof let g be FinSequence of (TOP-REAL 2); ::_thesis: for p1, p2 being Point of (TOP-REAL 2) st g is_S-Seq_joining p1,p2 holds Rev g is_S-Seq_joining p2,p1 let p1, p2 be Point of (TOP-REAL 2); ::_thesis: ( g is_S-Seq_joining p1,p2 implies Rev g is_S-Seq_joining p2,p1 ) assume that A1: g is being_S-Seq and A2: g . 1 = p1 and A3: g . (len g) = p2 ; :: according to JORDAN3:def_2 ::_thesis: Rev g is_S-Seq_joining p2,p1 thus Rev g is being_S-Seq by A1; :: according to JORDAN3:def_2 ::_thesis: ( (Rev g) . 1 = p2 & (Rev g) . (len (Rev g)) = p1 ) thus (Rev g) . 1 = p2 by A3, FINSEQ_5:62; ::_thesis: (Rev g) . (len (Rev g)) = p1 dom g = dom (Rev g) by FINSEQ_5:57; hence (Rev g) . (len (Rev g)) = (Rev g) . (len g) by FINSEQ_3:29 .= p1 by A2, FINSEQ_5:62 ; ::_thesis: verum end; theorem Th16: :: JORDAN3:16 for f, g being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) for j being Nat st p in L~ f & g = <*p*> ^ (mid (f,((Index (p,f)) + 1),(len f))) & 1 <= j & j + 1 <= len g holds LSeg (g,j) c= LSeg (f,(((Index (p,f)) + j) -' 1)) proof let f, g be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) for j being Nat st p in L~ f & g = <*p*> ^ (mid (f,((Index (p,f)) + 1),(len f))) & 1 <= j & j + 1 <= len g holds LSeg (g,j) c= LSeg (f,(((Index (p,f)) + j) -' 1)) let p be Point of (TOP-REAL 2); ::_thesis: for j being Nat st p in L~ f & g = <*p*> ^ (mid (f,((Index (p,f)) + 1),(len f))) & 1 <= j & j + 1 <= len g holds LSeg (g,j) c= LSeg (f,(((Index (p,f)) + j) -' 1)) let j be Nat; ::_thesis: ( p in L~ f & g = <*p*> ^ (mid (f,((Index (p,f)) + 1),(len f))) & 1 <= j & j + 1 <= len g implies LSeg (g,j) c= LSeg (f,(((Index (p,f)) + j) -' 1)) ) assume that A1: p in L~ f and A2: g = <*p*> ^ (mid (f,((Index (p,f)) + 1),(len f))) and A3: 1 <= j and A4: j + 1 <= len g ; ::_thesis: LSeg (g,j) c= LSeg (f,(((Index (p,f)) + j) -' 1)) A5: j <= len g by A4, NAT_1:13; len g = (len <*p*>) + (len (mid (f,((Index (p,f)) + 1),(len f)))) by A2, FINSEQ_1:22; then A6: len g = 1 + (len (mid (f,((Index (p,f)) + 1),(len f)))) by FINSEQ_1:39; then A7: (j + 1) - 1 <= (1 + (len (mid (f,((Index (p,f)) + 1),(len f))))) - 1 by A4, XREAL_1:9; j -' 1 <= j by NAT_D:35; then A8: j -' 1 <= len (mid (f,((Index (p,f)) + 1),(len f))) by A7, XXREAL_0:2; 1 <= (Index (p,f)) + j by A3, NAT_1:12; then A9: 1 - 1 <= ((Index (p,f)) + j) - 1 by XREAL_1:9; A10: j -' 1 = j - 1 by A3, XREAL_1:233; A11: j = 1 + (j - 1) .= (len <*p*>) + (j -' 1) by A10, FINSEQ_1:39 ; 1 <= Index (p,f) by A1, Th8; then 1 + 1 <= (Index (p,f)) + j by A3, XREAL_1:7; then 1 <= ((Index (p,f)) + j) - 1 by XREAL_1:19; then A12: 1 <= ((Index (p,f)) + j) -' 1 by NAT_D:39; consider i being Element of NAT such that 1 <= i and A13: i + 1 <= len f and p in LSeg (f,i) by A1, SPPOL_2:13; 1 <= i + 1 by NAT_1:12; then A14: 1 <= len f by A13, XXREAL_0:2; A15: Index (p,f) < len f by A1, Th8; then A16: (Index (p,f)) + 1 <= len f by NAT_1:13; (Index (p,f)) + 1 <= len f by A15, NAT_1:13; then ((Index (p,f)) + 1) - (Index (p,f)) <= (len f) - (Index (p,f)) by XREAL_1:9; then A17: 1 - 1 <= ((len f) - (Index (p,f))) - 1 by XREAL_1:9; then A18: (len f) -' ((Index (p,f)) + 1) = (len f) - ((Index (p,f)) + 1) by XREAL_0:def_2 .= ((len f) - (Index (p,f))) - 1 ; A19: 0 + 1 <= (Index (p,f)) + 1 by NAT_1:13; then A20: 1 <= len f by A15, NAT_1:13; (Index (p,f)) + 1 <= len f by A15, NAT_1:13; then A21: len (mid (f,((Index (p,f)) + 1),(len f))) = ((len f) -' ((Index (p,f)) + 1)) + 1 by A14, A19, FINSEQ_6:118; A22: len g = (len <*p*>) + (len (mid (f,((Index (p,f)) + 1),(len f)))) by A2, FINSEQ_1:22 .= 1 + (len (mid (f,((Index (p,f)) + 1),(len f)))) by FINSEQ_1:39 ; then len g = 1 + (((len f) - ((Index (p,f)) + 1)) + 1) by A17, A21, XREAL_0:def_2 .= 1 + ((len f) - (Index (p,f))) ; then j <= (len f) - (Index (p,f)) by A4, XREAL_1:6; then A23: j + (Index (p,f)) <= ((len f) - (Index (p,f))) + (Index (p,f)) by XREAL_1:6; then A24: (((Index (p,f)) + j) -' 1) + 1 <= len f by A3, NAT_1:12, XREAL_1:235; A25: 1 <= j + 1 by A3, NAT_1:13; then A26: g /. (j + 1) = g . (j + 1) by A4, FINSEQ_4:15; A27: j + 1 = (len <*p*>) + ((j + 1) - 1) by FINSEQ_1:39 .= (len <*p*>) + ((j + 1) -' 1) by A25, XREAL_1:233 ; A28: (j + 1) -' 1 = (j + 1) - 1 by A25, XREAL_1:233; then (j + 1) -' 1 in dom (mid (f,((Index (p,f)) + 1),(len f))) by A3, A7, FINSEQ_3:25; then g . (j + 1) = (mid (f,((Index (p,f)) + 1),(len f))) . ((j + 1) -' 1) by A2, A27, FINSEQ_1:def_7 .= f . ((((j + 1) -' 1) + ((Index (p,f)) + 1)) -' 1) by A3, A19, A16, A20, A28, A7, FINSEQ_6:118 .= f . (((((j + 1) -' 1) + 1) + (Index (p,f))) -' 1) .= f . (((j + 1) + (Index (p,f))) -' 1) by A25, XREAL_1:235 .= f . ((((Index (p,f)) + j) + 1) -' 1) .= f . ((Index (p,f)) + j) by NAT_D:34 .= f . ((((Index (p,f)) + j) -' 1) + 1) by A3, NAT_1:12, XREAL_1:235 ; then A29: f /. ((((Index (p,f)) + j) -' 1) + 1) = g /. (j + 1) by A24, A26, FINSEQ_4:15, NAT_1:11; (j + 1) - 1 <= (1 + (len (mid (f,((Index (p,f)) + 1),(len f))))) - 1 by A4, A6, XREAL_1:9; then j + (Index (p,f)) <= ((len f) - (Index (p,f))) + (Index (p,f)) by A21, A18, XREAL_1:6; then ((Index (p,f)) + (j - 1)) + 1 <= len f ; then (((Index (p,f)) + j) -' 1) + 1 <= len f by A9, XREAL_0:def_2; then A30: LSeg (f,(((Index (p,f)) + j) -' 1)) = LSeg ((f /. (((Index (p,f)) + j) -' 1)),(f /. ((((Index (p,f)) + j) -' 1) + 1))) by A12, TOPREAL1:def_3; A31: 1 <= len g by A22, NAT_1:11; now__::_thesis:_(_(_1_<_j_&_LSeg_(g,j)_c=_LSeg_(f,(((Index_(p,f))_+_j)_-'_1))_)_or_(_1_=_j_&_LSeg_(g,j)_c=_LSeg_(f,(((Index_(p,f))_+_j)_-'_1))_)_) percases ( 1 < j or 1 = j ) by A3, XXREAL_0:1; caseA32: 1 < j ; ::_thesis: LSeg (g,j) c= LSeg (f,(((Index (p,f)) + j) -' 1)) then A33: j -' 1 = j - 1 by XREAL_1:233; then A34: 1 <= j -' 1 by A32, SPPOL_1:1; j - 1 <= (1 + (len (mid (f,((Index (p,f)) + 1),(len f))))) - 1 by A6, A5, XREAL_1:9; then j -' 1 in dom (mid (f,((Index (p,f)) + 1),(len f))) by A33, A34, FINSEQ_3:25; then A35: g . j = (mid (f,((Index (p,f)) + 1),(len f))) . (j -' 1) by A2, A11, FINSEQ_1:def_7 .= f . (((j -' 1) + ((Index (p,f)) + 1)) -' 1) by A19, A16, A20, A8, A34, FINSEQ_6:118 .= f . ((((j -' 1) + 1) + (Index (p,f))) -' 1) .= f . (((Index (p,f)) + j) -' 1) by A3, XREAL_1:235 ; g /. j = g . j by A3, A5, FINSEQ_4:15; then LSeg (f,(((Index (p,f)) + j) -' 1)) = LSeg ((g /. j),(g /. (j + 1))) by A23, A29, A12, A30, A35, FINSEQ_4:15, NAT_D:50 .= LSeg (g,j) by A3, A4, TOPREAL1:def_3 ; hence LSeg (g,j) c= LSeg (f,(((Index (p,f)) + j) -' 1)) ; ::_thesis: verum end; caseA36: 1 = j ; ::_thesis: LSeg (g,j) c= LSeg (f,(((Index (p,f)) + j) -' 1)) then j <= len <*p*> by FINSEQ_1:39; then j in dom <*p*> by A36, FINSEQ_3:25; then A37: g . j = <*p*> . j by A2, FINSEQ_1:def_7 .= p by A36, FINSEQ_1:40 ; A38: f /. ((((Index (p,f)) + j) -' 1) + 1) in LSeg ((f /. (((Index (p,f)) + j) -' 1)),(f /. ((((Index (p,f)) + j) -' 1) + 1))) by RLTOPSP1:68; A39: g /. j = g . j by A31, A36, FINSEQ_4:15; A40: ((Index (p,f)) + j) -' 1 = Index (p,f) by A36, NAT_D:34; p in LSeg (f,(Index (p,f))) by A1, Th9; then LSeg (p,(g /. (j + 1))) c= LSeg (f,(((Index (p,f)) + j) -' 1)) by A29, A30, A38, A40, TOPREAL1:6; hence LSeg (g,j) c= LSeg (f,(((Index (p,f)) + j) -' 1)) by A3, A4, A37, A39, TOPREAL1:def_3; ::_thesis: verum end; end; end; hence LSeg (g,j) c= LSeg (f,(((Index (p,f)) + j) -' 1)) ; ::_thesis: verum end; theorem :: JORDAN3:17 for f, g being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & p <> f . ((Index (p,f)) + 1) & g = <*p*> ^ (mid (f,((Index (p,f)) + 1),(len f))) holds g is_S-Seq_joining p,f /. (len f) proof let f, g be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & p <> f . ((Index (p,f)) + 1) & g = <*p*> ^ (mid (f,((Index (p,f)) + 1),(len f))) holds g is_S-Seq_joining p,f /. (len f) let p be Point of (TOP-REAL 2); ::_thesis: ( f is being_S-Seq & p in L~ f & p <> f . ((Index (p,f)) + 1) & g = <*p*> ^ (mid (f,((Index (p,f)) + 1),(len f))) implies g is_S-Seq_joining p,f /. (len f) ) assume that A1: f is being_S-Seq and A2: p in L~ f and A3: p <> f . ((Index (p,f)) + 1) and A4: g = <*p*> ^ (mid (f,((Index (p,f)) + 1),(len f))) ; ::_thesis: g is_S-Seq_joining p,f /. (len f) len g = (len <*p*>) + (len (mid (f,((Index (p,f)) + 1),(len f)))) by A4, FINSEQ_1:22; then A5: len g = 1 + (len (mid (f,((Index (p,f)) + 1),(len f)))) by FINSEQ_1:39; consider i being Element of NAT such that 1 <= i and A6: i + 1 <= len f and p in LSeg (f,i) by A2, SPPOL_2:13; 1 <= 1 + i by NAT_1:12; then A7: 1 <= len f by A6, XXREAL_0:2; A8: for j1, j2 being Nat st j1 + 1 < j2 holds LSeg (g,j1) misses LSeg (g,j2) proof let j1, j2 be Nat; ::_thesis: ( j1 + 1 < j2 implies LSeg (g,j1) misses LSeg (g,j2) ) assume A9: j1 + 1 < j2 ; ::_thesis: LSeg (g,j1) misses LSeg (g,j2) A10: ( j1 = 0 or j1 >= 0 + 1 ) by NAT_1:13; now__::_thesis:_(_(_j1_=_0_&_LSeg_(g,j1)_misses_LSeg_(g,j2)_)_or_(_(_j1_=_1_or_j1_>_1_)_&_j2_+_1_<=_len_g_&_LSeg_(g,j1)_misses_LSeg_(g,j2)_)_or_(_j2_+_1_>_len_g_&_LSeg_(g,j1)_misses_LSeg_(g,j2)_)_) percases ( j1 = 0 or ( ( j1 = 1 or j1 > 1 ) & j2 + 1 <= len g ) or j2 + 1 > len g ) by A10, XXREAL_0:1; case j1 = 0 ; ::_thesis: LSeg (g,j1) misses LSeg (g,j2) then LSeg (g,j1) = {} by TOPREAL1:def_3; then (LSeg (g,j1)) /\ (LSeg (g,j2)) = {} ; hence LSeg (g,j1) misses LSeg (g,j2) by XBOOLE_0:def_7; ::_thesis: verum end; casethat A11: ( j1 = 1 or j1 > 1 ) and A12: j2 + 1 <= len g ; ::_thesis: LSeg (g,j1) misses LSeg (g,j2) 1 < j1 + 1 by A11, NAT_1:13; then 1 <= j2 by A9, XXREAL_0:2; then A13: LSeg (g,j2) c= LSeg (f,(((Index (p,f)) + j2) -' 1)) by A2, A4, A12, Th16; 1 <= (Index (p,f)) + j1 by A2, Th8, NAT_1:12; then 1 - 1 <= ((Index (p,f)) + j1) - 1 by XREAL_1:9; then A14: ((Index (p,f)) + j1) - 1 = ((Index (p,f)) + j1) -' 1 by XREAL_0:def_2; (Index (p,f)) + (j1 + 1) < (Index (p,f)) + j2 by A9, XREAL_1:6; then (((Index (p,f)) + j1) + 1) - 1 < ((Index (p,f)) + j2) - 1 by XREAL_1:9; then (((Index (p,f)) + j1) -' 1) + 1 < ((Index (p,f)) + j2) -' 1 by A14, XREAL_0:def_2; then LSeg (f,(((Index (p,f)) + j1) -' 1)) misses LSeg (f,(((Index (p,f)) + j2) -' 1)) by A1, TOPREAL1:def_7; then A15: (LSeg (f,(((Index (p,f)) + j1) -' 1))) /\ (LSeg (f,(((Index (p,f)) + j2) -' 1))) = {} by XBOOLE_0:def_7; j2 < len g by A12, NAT_1:13; then j1 + 1 <= len g by A9, XXREAL_0:2; then LSeg (g,j1) c= LSeg (f,(((Index (p,f)) + j1) -' 1)) by A2, A4, A11, Th16; then (LSeg (g,j1)) /\ (LSeg (g,j2)) = {} by A13, A15, XBOOLE_1:3, XBOOLE_1:27; hence LSeg (g,j1) misses LSeg (g,j2) by XBOOLE_0:def_7; ::_thesis: verum end; case j2 + 1 > len g ; ::_thesis: LSeg (g,j1) misses LSeg (g,j2) then LSeg (g,j2) = {} by TOPREAL1:def_3; then (LSeg (g,j1)) /\ (LSeg (g,j2)) = {} ; hence LSeg (g,j1) misses LSeg (g,j2) by XBOOLE_0:def_7; ::_thesis: verum end; end; end; hence LSeg (g,j1) misses LSeg (g,j2) ; ::_thesis: verum end; A16: Index (p,f) < len f by A2, Th8; then A17: (Index (p,f)) + 1 <= len f by NAT_1:13; (Index (p,f)) + 1 <= len f by A16, NAT_1:13; then A18: ((Index (p,f)) + 1) - (Index (p,f)) <= (len f) - (Index (p,f)) by XREAL_1:9; then A19: 1 - 1 <= ((len f) - (Index (p,f))) - 1 by XREAL_1:9; then A20: (len f) -' ((Index (p,f)) + 1) = (len f) - ((Index (p,f)) + 1) by XREAL_0:def_2 .= ((len f) - (Index (p,f))) - 1 ; A21: 0 + 1 <= (Index (p,f)) + 1 by NAT_1:11; then A22: len (mid (f,((Index (p,f)) + 1),(len f))) = ((len f) -' ((Index (p,f)) + 1)) + 1 by A7, A17, FINSEQ_6:118; A23: for j being Nat st 1 <= j & j + 2 <= len g holds (LSeg (g,j)) /\ (LSeg (g,(j + 1))) = {(g /. (j + 1))} proof let j be Nat; ::_thesis: ( 1 <= j & j + 2 <= len g implies (LSeg (g,j)) /\ (LSeg (g,(j + 1))) = {(g /. (j + 1))} ) assume that A24: 1 <= j and A25: j + 2 <= len g ; ::_thesis: (LSeg (g,j)) /\ (LSeg (g,(j + 1))) = {(g /. (j + 1))} A26: j + 2 = (j + 1) + 1 ; then A27: j + 1 <= len g by A25, NAT_1:13; then A28: LSeg (g,j) c= LSeg (f,(((Index (p,f)) + j) -' 1)) by A2, A4, A24, Th16; 1 <= j + 1 by A24, NAT_1:13; then LSeg (g,(j + 1)) c= LSeg (f,(((Index (p,f)) + (j + 1)) -' 1)) by A2, A4, A25, A26, Th16; then A29: (LSeg (g,j)) /\ (LSeg (g,(j + 1))) c= (LSeg (f,(((Index (p,f)) + j) -' 1))) /\ (LSeg (f,(((Index (p,f)) + (j + 1)) -' 1))) by A28, XBOOLE_1:27; A30: 1 <= Index (p,f) by A2, Th8; 1 <= Index (p,f) by A2, Th8; then 1 + 1 <= (Index (p,f)) + j by A24, XREAL_1:7; then 1 <= ((Index (p,f)) + j) - 1 by XREAL_1:19; then A31: 1 <= ((Index (p,f)) + j) -' 1 by NAT_D:39; 1 <= (Index (p,f)) + j by A2, Th8, NAT_1:12; then A32: 1 - 1 <= ((Index (p,f)) + j) - 1 by XREAL_1:9; ((j + 1) + 1) - 1 <= (1 + (len (mid (f,((Index (p,f)) + 1),(len f))))) - 1 by A5, A25, XREAL_1:9; then A33: (j + 1) + (Index (p,f)) <= ((len f) - (Index (p,f))) + (Index (p,f)) by A22, A20, XREAL_1:6; then ((Index (p,f)) + j) + 1 <= len f ; then ((Index (p,f)) + (j - 1)) + 1 <= len f by NAT_D:46; then A34: (((Index (p,f)) + j) -' 1) + 1 <= len f by A32, XREAL_0:def_2; (((Index (p,f)) + j) - 1) + (1 + 1) <= len f by A33; then (((Index (p,f)) + j) -' 1) + 2 <= len f by A32, XREAL_0:def_2; then A35: {(f /. ((((Index (p,f)) + j) -' 1) + 1))} = (LSeg (f,(((Index (p,f)) + j) -' 1))) /\ (LSeg (f,((((Index (p,f)) + j) -' 1) + 1))) by A1, A31, TOPREAL1:def_6; A36: 1 < j + 1 by A24, NAT_1:13; then A37: g /. (j + 1) = g . (j + 1) by A27, FINSEQ_4:15; A38: g /. (j + 1) in LSeg ((g /. (j + 1)),(g /. ((j + 1) + 1))) by RLTOPSP1:68; g /. (j + 1) in LSeg ((g /. j),(g /. (j + 1))) by RLTOPSP1:68; then A39: g /. (j + 1) in (LSeg ((g /. j),(g /. (j + 1)))) /\ (LSeg ((g /. (j + 1)),(g /. ((j + 1) + 1)))) by A38, XBOOLE_0:def_4; A40: LSeg (g,j) = LSeg ((g /. j),(g /. (j + 1))) by A24, A27, TOPREAL1:def_3; LSeg ((g /. (j + 1)),(g /. ((j + 1) + 1))) = LSeg (g,(j + 1)) by A25, A36, TOPREAL1:def_3; then A41: {(g /. (j + 1))} c= (LSeg (g,j)) /\ (LSeg (g,(j + 1))) by A40, A39, ZFMISC_1:31; A42: j + 1 = ((j + 1) - 1) + 1 .= ((j + 1) -' 1) + 1 by A36, XREAL_1:233 ; then A43: j + 1 = (len <*p*>) + ((j + 1) -' 1) by FINSEQ_1:39; A44: (j + 1) -' 1 <= len (mid (f,((Index (p,f)) + 1),(len f))) by A5, A27, A42, XREAL_1:6; then (j + 1) -' 1 in dom (mid (f,((Index (p,f)) + 1),(len f))) by A24, A42, FINSEQ_3:25; then g . (j + 1) = (mid (f,((Index (p,f)) + 1),(len f))) . ((j + 1) -' 1) by A4, A43, FINSEQ_1:def_7 .= f . ((((j + 1) -' 1) + ((Index (p,f)) + 1)) -' 1) by A7, A17, A21, A24, A42, A44, FINSEQ_6:118 .= f . (((((j + 1) -' 1) + 1) + (Index (p,f))) -' 1) .= f . (((j + 1) + (Index (p,f))) -' 1) by A36, XREAL_1:235 .= f . ((((Index (p,f)) + j) + 1) -' 1) .= f . ((Index (p,f)) + j) by NAT_D:34 .= f . ((((Index (p,f)) + j) -' 1) + 1) by A30, NAT_1:12, XREAL_1:235 ; then A45: f /. ((((Index (p,f)) + j) -' 1) + 1) = g /. (j + 1) by A37, A34, FINSEQ_4:15, NAT_1:11; ((Index (p,f)) + (j + 1)) -' 1 = (((Index (p,f)) + j) + 1) - 1 by NAT_1:11, XREAL_1:233 .= (((Index (p,f)) + j) - 1) + 1 .= (((Index (p,f)) + j) -' 1) + 1 by A30, NAT_1:12, XREAL_1:233 ; hence (LSeg (g,j)) /\ (LSeg (g,(j + 1))) = {(g /. (j + 1))} by A29, A35, A45, A41, XBOOLE_0:def_10; ::_thesis: verum end; A46: len g = (len <*p*>) + (len (mid (f,((Index (p,f)) + 1),(len f)))) by A4, FINSEQ_1:22 .= 1 + (len (mid (f,((Index (p,f)) + 1),(len f)))) by FINSEQ_1:39 ; then A47: len g = 1 + (((len f) - ((Index (p,f)) + 1)) + 1) by A19, A22, XREAL_0:def_2 .= 1 + ((len f) - (Index (p,f))) ; then A48: (len g) -' 1 = (len g) - 1 by A18, XREAL_0:def_2; then A49: (len g) -' 1 in dom (mid (f,((Index (p,f)) + 1),(len f))) by A18, A22, A47, A20, FINSEQ_3:25; A50: (len f) - (Index (p,f)) >= 0 by A2, Th8, XREAL_1:50; then A51: (len f) - (Index (p,f)) = (len f) -' (Index (p,f)) by XREAL_0:def_2; then A52: (mid (f,((Index (p,f)) + 1),(len f))) . ((len f) -' (Index (p,f))) = f . ((((len f) -' (Index (p,f))) + ((Index (p,f)) + 1)) -' 1) by A7, A18, A17, A21, A22, A20, FINSEQ_6:118; A53: (len g) -' 1 = (len f) -' (Index (p,f)) by A47, A48, XREAL_0:def_2; for x1, x2 being set st x1 in dom g & x2 in dom g & g . x1 = g . x2 holds x1 = x2 proof let x1, x2 be set ; ::_thesis: ( x1 in dom g & x2 in dom g & g . x1 = g . x2 implies x1 = x2 ) assume that A54: x1 in dom g and A55: x2 in dom g and A56: g . x1 = g . x2 ; ::_thesis: x1 = x2 reconsider n1 = x1, n2 = x2 as Element of NAT by A54, A55; A57: n1 <= len g by A54, FINSEQ_3:25; A58: 1 <= n2 by A55, FINSEQ_3:25; A59: n2 <= len g by A55, FINSEQ_3:25; A60: 1 <= n1 by A54, FINSEQ_3:25; now__::_thesis:_(_(_n1_=_1_&_n2_=_1_&_x1_=_x2_)_or_(_n1_=_1_&_n2_>_1_&_contradiction_)_or_(_n1_>_1_&_n2_=_1_&_contradiction_)_or_(_n1_>_1_&_n2_>_1_&_x1_=_x2_)_) percases ( ( n1 = 1 & n2 = 1 ) or ( n1 = 1 & n2 > 1 ) or ( n1 > 1 & n2 = 1 ) or ( n1 > 1 & n2 > 1 ) ) by A60, A58, XXREAL_0:1; case ( n1 = 1 & n2 = 1 ) ; ::_thesis: x1 = x2 hence x1 = x2 ; ::_thesis: verum end; casethat A61: n1 = 1 and A62: n2 > 1 ; ::_thesis: contradiction A63: n2 - 1 <= (1 + (len (mid (f,((Index (p,f)) + 1),(len f))))) - 1 by A5, A59, XREAL_1:9; n1 <= len <*p*> by A61, FINSEQ_1:39; then n1 in dom <*p*> by A61, FINSEQ_3:25; then A64: g . n1 = <*p*> . n1 by A4, FINSEQ_1:def_7; n2 - 1 > 0 by A62, XREAL_1:50; then A65: n2 -' 1 = n2 - 1 by XREAL_0:def_2; then A66: (len <*p*>) + (n2 -' 1) = 1 + (n2 - 1) by FINSEQ_1:39 .= n2 ; A67: 1 <= n2 -' 1 by A62, A65, SPPOL_1:1; then n2 -' 1 in dom (mid (f,((Index (p,f)) + 1),(len f))) by A65, A63, FINSEQ_3:25; then g . n2 = (mid (f,((Index (p,f)) + 1),(len f))) . (n2 -' 1) by A4, A66, FINSEQ_1:def_7 .= f . (((n2 -' 1) + ((Index (p,f)) + 1)) -' 1) by A7, A17, A21, A65, A63, A67, FINSEQ_6:118 .= f . ((n2 + (Index (p,f))) -' 1) by A65 ; then A68: f . ((n2 + (Index (p,f))) -' 1) = p by A56, A61, A64, FINSEQ_1:40; n2 -' 1 <= (len f) - (Index (p,f)) by A47, A48, A59, NAT_D:42; then n2 - 1 <= (len f) - (Index (p,f)) by A62, XREAL_1:233; then A69: (n2 - 1) + (Index (p,f)) <= ((len f) - (Index (p,f))) + (Index (p,f)) by XREAL_1:6; 1 + 1 < n2 + (Index (p,f)) by A2, A62, Th8, XREAL_1:8; then A70: 1 < (n2 + (Index (p,f))) - 1 by XREAL_1:20; then (n2 + (Index (p,f))) -' 1 = (n2 + (Index (p,f))) - 1 by XREAL_0:def_2; hence contradiction by A1, A3, A70, A68, A69, Th12; ::_thesis: verum end; casethat A71: n1 > 1 and A72: n2 = 1 ; ::_thesis: contradiction A73: n1 - 1 <= (1 + (len (mid (f,((Index (p,f)) + 1),(len f))))) - 1 by A5, A57, XREAL_1:9; n2 <= len <*p*> by A72, FINSEQ_1:39; then n2 in dom <*p*> by A72, FINSEQ_3:25; then A74: g . n2 = <*p*> . n2 by A4, FINSEQ_1:def_7; n1 - 1 > 0 by A71, XREAL_1:50; then A75: n1 -' 1 = n1 - 1 by XREAL_0:def_2; then A76: (len <*p*>) + (n1 -' 1) = 1 + (n1 - 1) by FINSEQ_1:39 .= n1 ; A77: 1 <= n1 -' 1 by A71, A75, SPPOL_1:1; then n1 -' 1 in dom (mid (f,((Index (p,f)) + 1),(len f))) by A75, A73, FINSEQ_3:25; then g . n1 = (mid (f,((Index (p,f)) + 1),(len f))) . (n1 -' 1) by A4, A76, FINSEQ_1:def_7 .= f . (((n1 -' 1) + ((Index (p,f)) + 1)) -' 1) by A7, A17, A21, A75, A73, A77, FINSEQ_6:118 .= f . ((n1 + (Index (p,f))) -' 1) by A75 ; then A78: f . ((n1 + (Index (p,f))) -' 1) = p by A56, A72, A74, FINSEQ_1:40; n1 -' 1 <= (len f) - (Index (p,f)) by A47, A48, A57, NAT_D:42; then n1 - 1 <= (len f) - (Index (p,f)) by A71, XREAL_1:233; then A79: (n1 - 1) + (Index (p,f)) <= ((len f) - (Index (p,f))) + (Index (p,f)) by XREAL_1:6; 1 + 1 < n1 + (Index (p,f)) by A2, A71, Th8, XREAL_1:8; then A80: 1 < (n1 + (Index (p,f))) - 1 by XREAL_1:20; then (n1 + (Index (p,f))) -' 1 = (n1 + (Index (p,f))) - 1 by XREAL_0:def_2; hence contradiction by A1, A3, A80, A78, A79, Th12; ::_thesis: verum end; casethat A81: n1 > 1 and A82: n2 > 1 ; ::_thesis: x1 = x2 A83: n2 - 1 > 0 by A82, XREAL_1:50; then A84: n2 -' 1 = n2 - 1 by XREAL_0:def_2; then A85: (len <*p*>) + (n2 -' 1) = 1 + (n2 - 1) by FINSEQ_1:39 .= n2 ; A86: n1 - 1 > 0 by A81, XREAL_1:50; then A87: n1 -' 1 = n1 - 1 by XREAL_0:def_2; then A88: 0 + 1 <= n1 -' 1 by A86, NAT_1:13; then A89: 1 <= (n1 - 1) + (Index (p,f)) by A87, NAT_1:12; then A90: (n1 + (Index (p,f))) -' 1 = (n1 + (Index (p,f))) - 1 by XREAL_0:def_2; A91: (len <*p*>) + (n1 -' 1) = 1 + (n1 - 1) by A87, FINSEQ_1:39 .= n1 ; A92: n1 - 1 <= (1 + (len (mid (f,((Index (p,f)) + 1),(len f))))) - 1 by A5, A57, XREAL_1:9; then n1 -' 1 in dom (mid (f,((Index (p,f)) + 1),(len f))) by A87, A88, FINSEQ_3:25; then A93: g . n1 = (mid (f,((Index (p,f)) + 1),(len f))) . (n1 -' 1) by A4, A91, FINSEQ_1:def_7 .= f . (((n1 -' 1) + ((Index (p,f)) + 1)) -' 1) by A7, A17, A21, A87, A88, A92, FINSEQ_6:118 .= f . ((n1 + (Index (p,f))) -' 1) by A87 ; n1 -' 1 <= (len f) -' (Index (p,f)) by A53, A57, NAT_D:42; then (n1 -' 1) + (Index (p,f)) <= ((len f) - (Index (p,f))) + (Index (p,f)) by A51, XREAL_1:6; then A94: (n1 + (Index (p,f))) -' 1 in dom f by A87, A89, A90, FINSEQ_3:25; A95: 0 + 1 <= n2 -' 1 by A83, A84, NAT_1:13; then A96: 1 <= (n2 -' 1) + (Index (p,f)) by NAT_1:12; then A97: (n2 + (Index (p,f))) -' 1 = (n2 + (Index (p,f))) - 1 by A84, XREAL_0:def_2; A98: n2 - 1 <= (1 + (len (mid (f,((Index (p,f)) + 1),(len f))))) - 1 by A5, A59, XREAL_1:9; then n2 -' 1 in dom (mid (f,((Index (p,f)) + 1),(len f))) by A84, A95, FINSEQ_3:25; then A99: g . n2 = (mid (f,((Index (p,f)) + 1),(len f))) . (n2 -' 1) by A4, A85, FINSEQ_1:def_7 .= f . (((n2 -' 1) + ((Index (p,f)) + 1)) -' 1) by A7, A17, A21, A84, A95, A98, FINSEQ_6:118 .= f . ((n2 + (Index (p,f))) -' 1) by A84 ; n2 -' 1 <= (len f) -' (Index (p,f)) by A53, A59, NAT_D:42; then (n2 -' 1) + (Index (p,f)) <= ((len f) - (Index (p,f))) + (Index (p,f)) by A51, XREAL_1:6; then (n2 + (Index (p,f))) -' 1 in dom f by A84, A96, A97, FINSEQ_3:25; then (n1 + (Index (p,f))) -' 1 = (n2 + (Index (p,f))) -' 1 by A1, A56, A99, A93, A94, FUNCT_1:def_4; hence x1 = x2 by A97, A90; ::_thesis: verum end; end; end; hence x1 = x2 ; ::_thesis: verum end; then A100: g is one-to-one by FUNCT_1:def_4; A101: ((len g) - 1) + 1 >= 1 + 1 by A18, A47, XREAL_1:6; A102: ((len f) -' ((Index (p,f)) + 1)) + 1 = (len f) - (Index (p,f)) by A20; for j being Nat st 1 <= j & j + 1 <= len g & not (g /. j) `1 = (g /. (j + 1)) `1 holds (g /. j) `2 = (g /. (j + 1)) `2 proof 1 <= Index (p,f) by A2, Th8; then A103: 1 < (Index (p,f)) + 1 by NAT_1:13; let j be Nat; ::_thesis: ( 1 <= j & j + 1 <= len g & not (g /. j) `1 = (g /. (j + 1)) `1 implies (g /. j) `2 = (g /. (j + 1)) `2 ) assume that A104: 1 <= j and A105: j + 1 <= len g ; ::_thesis: ( (g /. j) `1 = (g /. (j + 1)) `1 or (g /. j) `2 = (g /. (j + 1)) `2 ) A106: LSeg (g,j) = LSeg ((g /. j),(g /. (j + 1))) by A104, A105, TOPREAL1:def_3; (j + 1) - 1 <= (1 + (len (mid (f,((Index (p,f)) + 1),(len f))))) - 1 by A5, A105, XREAL_1:9; then (j + 1) - 1 <= (len f) - (Index (p,f)) by A7, A17, A21, A102, FINSEQ_6:118; then A107: j + (Index (p,f)) <= ((len f) - (Index (p,f))) + (Index (p,f)) by XREAL_1:6; (Index (p,f)) + 1 <= (Index (p,f)) + j by A104, XREAL_1:6; then 1 < (Index (p,f)) + j by A103, XXREAL_0:2; then A108: 1 <= ((Index (p,f)) + j) - 1 by SPPOL_1:1; then A109: ((Index (p,f)) + j) - 1 = ((Index (p,f)) + j) -' 1 by XREAL_0:def_2; then A110: LSeg (f,(((Index (p,f)) + j) -' 1)) = LSeg ((f /. (((Index (p,f)) + j) -' 1)),(f /. ((((Index (p,f)) + j) -' 1) + 1))) by A108, A107, TOPREAL1:def_3; A111: ( (f /. (((Index (p,f)) + j) -' 1)) `1 = (f /. ((((Index (p,f)) + j) -' 1) + 1)) `1 or (f /. (((Index (p,f)) + j) -' 1)) `2 = (f /. ((((Index (p,f)) + j) -' 1) + 1)) `2 ) by A1, A108, A109, A107, TOPREAL1:def_5; LSeg (g,j) c= LSeg (f,(((Index (p,f)) + j) -' 1)) by A2, A4, A104, A105, Th16; hence ( (g /. j) `1 = (g /. (j + 1)) `1 or (g /. j) `2 = (g /. (j + 1)) `2 ) by A106, A110, A111, Th3; ::_thesis: verum end; then ( g is unfolded & g is s.n.c. & g is special ) by A23, A8, TOPREAL1:def_5, TOPREAL1:def_6, TOPREAL1:def_7; then A112: g is being_S-Seq by A101, A100, TOPREAL1:def_8; A113: ((len f) -' (Index (p,f))) + ((Index (p,f)) + 1) = ((len f) - (Index (p,f))) + ((Index (p,f)) + 1) by A50, XREAL_0:def_2 .= (len f) + 1 ; 1 + ((len g) -' 1) = 1 + ((len g) - 1) by A46, XREAL_0:def_2 .= len g ; then g . (len g) = g . ((len <*p*>) + ((len g) -' 1)) by FINSEQ_1:39 .= (mid (f,((Index (p,f)) + 1),(len f))) . ((len g) -' 1) by A4, A49, FINSEQ_1:def_7 ; then g . (len g) = f . (len f) by A47, A48, A52, A113, NAT_D:34; then A114: g . (len g) = f /. (len f) by A7, FINSEQ_4:15; g . 1 = p by A4, FINSEQ_1:41; hence g is_S-Seq_joining p,f /. (len f) by A112, A114, Def2; ::_thesis: verum end; theorem Th18: :: JORDAN3:18 for f, g being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) for j being Nat st p in L~ f & 1 <= j & j + 1 <= len g & g = (mid (f,1,(Index (p,f)))) ^ <*p*> holds LSeg (g,j) c= LSeg (f,j) proof let f, g be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) for j being Nat st p in L~ f & 1 <= j & j + 1 <= len g & g = (mid (f,1,(Index (p,f)))) ^ <*p*> holds LSeg (g,j) c= LSeg (f,j) let p be Point of (TOP-REAL 2); ::_thesis: for j being Nat st p in L~ f & 1 <= j & j + 1 <= len g & g = (mid (f,1,(Index (p,f)))) ^ <*p*> holds LSeg (g,j) c= LSeg (f,j) let j be Nat; ::_thesis: ( p in L~ f & 1 <= j & j + 1 <= len g & g = (mid (f,1,(Index (p,f)))) ^ <*p*> implies LSeg (g,j) c= LSeg (f,j) ) assume that A1: p in L~ f and A2: 1 <= j and A3: j + 1 <= len g and A4: g = (mid (f,1,(Index (p,f)))) ^ <*p*> ; ::_thesis: LSeg (g,j) c= LSeg (f,j) A5: Index (p,f) < len f by A1, Th8; A6: j in NAT by ORDINAL1:def_12; A7: 1 <= j + 1 by NAT_1:11; A8: 1 <= Index (p,f) by A1, Th8; 1 <= Index (p,f) by A1, Th8; then A9: 1 <= len f by A5, XXREAL_0:2; j <= j + 1 by NAT_1:11; then A10: j <= len g by A3, XXREAL_0:2; now__::_thesis:_LSeg_(g,j)_c=_LSeg_(f,j) len g = (len (mid (f,1,(Index (p,f))))) + (len <*p*>) by A4, FINSEQ_1:22 .= (len (mid (f,1,(Index (p,f))))) + 1 by FINSEQ_1:39 ; then len g = (((Index (p,f)) -' 1) + 1) + 1 by A5, A9, A8, FINSEQ_6:118; then A11: len g = (Index (p,f)) + 1 by A1, Th8, XREAL_1:235; then A12: j <= Index (p,f) by A3, XREAL_1:6; (Index (p,f)) + 1 <= (len f) + 1 by A5, XREAL_1:6; then j + 1 <= (len f) + 1 by A3, A11, XXREAL_0:2; then A13: (j + 1) - 1 <= ((len f) + 1) - 1 by XREAL_1:9; A14: len (mid (f,1,(Index (p,f)))) = ((Index (p,f)) -' 1) + 1 by A5, A9, A8, FINSEQ_6:118 .= Index (p,f) by A1, Th8, XREAL_1:235 ; then A15: j in dom (mid (f,1,(Index (p,f)))) by A2, A12, FINSEQ_3:25; A16: g /. j = g . j by A2, A10, FINSEQ_4:15 .= (mid (f,1,(Index (p,f)))) . j by A4, A15, FINSEQ_1:def_7 .= f . ((j + 1) -' 1) by A2, A6, A5, A9, A8, A12, A14, FINSEQ_6:118 .= f . j by NAT_D:34 .= f /. j by A2, A13, FINSEQ_4:15 ; now__::_thesis:_(_(_j_+_1_<=_Index_(p,f)_&_LSeg_(g,j)_c=_LSeg_(f,j)_)_or_(_j_+_1_>_Index_(p,f)_&_LSeg_(g,j)_c=_LSeg_(f,j)_)_) percases ( j + 1 <= Index (p,f) or j + 1 > Index (p,f) ) ; caseA17: j + 1 <= Index (p,f) ; ::_thesis: LSeg (g,j) c= LSeg (f,j) A18: len (mid (f,1,(Index (p,f)))) = ((Index (p,f)) -' 1) + 1 by A5, A9, A8, FINSEQ_6:118 .= Index (p,f) by A1, Th8, XREAL_1:235 ; then A19: j + 1 in dom (mid (f,1,(Index (p,f)))) by A7, A17, FINSEQ_3:25; A20: LSeg (g,j) = LSeg ((g /. j),(g /. (j + 1))) by A2, A3, TOPREAL1:def_3; A21: j + 1 <= len f by A5, A17, XXREAL_0:2; g /. (j + 1) = g . (j + 1) by A3, FINSEQ_4:15, NAT_1:11 .= (mid (f,1,(Index (p,f)))) . (j + 1) by A4, A19, FINSEQ_1:def_7 .= f . (((j + 1) + 1) -' 1) by A5, A9, A8, A7, A17, A18, FINSEQ_6:118 .= f . (j + 1) by NAT_D:34 .= f /. (j + 1) by A21, FINSEQ_4:15, NAT_1:11 ; hence LSeg (g,j) c= LSeg (f,j) by A2, A16, A21, A20, TOPREAL1:def_3; ::_thesis: verum end; case j + 1 > Index (p,f) ; ::_thesis: LSeg (g,j) c= LSeg (f,j) then j >= Index (p,f) by NAT_1:13; then A22: j = Index (p,f) by A12, XXREAL_0:1; then A23: p in LSeg (f,j) by A1, Th9; now__::_thesis:_not_j_+_1_>_len_f assume j + 1 > len f ; ::_thesis: contradiction then j >= len f by NAT_1:13; hence contradiction by A1, A22, Th8; ::_thesis: verum end; then A24: LSeg (f,j) = LSeg ((f /. j),(f /. (j + 1))) by A2, TOPREAL1:def_3; 1 <= len <*p*> by FINSEQ_1:40; then A25: 1 in dom <*p*> by FINSEQ_3:25; A26: len (mid (f,1,(Index (p,f)))) = ((Index (p,f)) -' 1) + 1 by A5, A9, A8, FINSEQ_6:118 .= Index (p,f) by A1, Th8, XREAL_1:235 ; A27: f /. j in LSeg ((f /. j),(f /. (j + 1))) by RLTOPSP1:68; g /. (j + 1) = g . (j + 1) by A3, FINSEQ_4:15, NAT_1:11 .= <*p*> . 1 by A4, A22, A25, A26, FINSEQ_1:def_7 .= p by FINSEQ_1:def_8 ; then LSeg ((g /. j),(g /. (j + 1))) c= LSeg ((f /. j),(f /. (j + 1))) by A16, A27, A23, A24, TOPREAL1:6; hence LSeg (g,j) c= LSeg (f,j) by A2, A3, A24, TOPREAL1:def_3; ::_thesis: verum end; end; end; hence LSeg (g,j) c= LSeg (f,j) ; ::_thesis: verum end; hence LSeg (g,j) c= LSeg (f,j) ; ::_thesis: verum end; theorem Th19: :: JORDAN3:19 for f, g being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & p <> f . 1 & g = (mid (f,1,(Index (p,f)))) ^ <*p*> holds g is_S-Seq_joining f /. 1,p proof let f, g be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & p <> f . 1 & g = (mid (f,1,(Index (p,f)))) ^ <*p*> holds g is_S-Seq_joining f /. 1,p let p be Point of (TOP-REAL 2); ::_thesis: ( f is being_S-Seq & p in L~ f & p <> f . 1 & g = (mid (f,1,(Index (p,f)))) ^ <*p*> implies g is_S-Seq_joining f /. 1,p ) assume that A1: f is being_S-Seq and A2: p in L~ f and A3: p <> f . 1 and A4: g = (mid (f,1,(Index (p,f)))) ^ <*p*> ; ::_thesis: g is_S-Seq_joining f /. 1,p A5: Index (p,f) <= len f by A2, Th8; A6: for j1, j2 being Nat st j1 + 1 < j2 holds LSeg (g,j1) misses LSeg (g,j2) proof let j1, j2 be Nat; ::_thesis: ( j1 + 1 < j2 implies LSeg (g,j1) misses LSeg (g,j2) ) assume A7: j1 + 1 < j2 ; ::_thesis: LSeg (g,j1) misses LSeg (g,j2) A8: ( j1 = 0 or j1 >= 0 + 1 ) by NAT_1:13; now__::_thesis:_(_(_j1_=_0_&_LSeg_(g,j1)_misses_LSeg_(g,j2)_)_or_(_(_j1_=_1_or_j1_>_1_)_&_j2_+_1_<=_len_g_&_LSeg_(g,j1)_misses_LSeg_(g,j2)_)_or_(_j2_+_1_>_len_g_&_LSeg_(g,j1)_misses_LSeg_(g,j2)_)_) percases ( j1 = 0 or ( ( j1 = 1 or j1 > 1 ) & j2 + 1 <= len g ) or j2 + 1 > len g ) by A8, XXREAL_0:1; case j1 = 0 ; ::_thesis: LSeg (g,j1) misses LSeg (g,j2) then LSeg (g,j1) = {} by TOPREAL1:def_3; then (LSeg (g,j1)) /\ (LSeg (g,j2)) = {} ; hence LSeg (g,j1) misses LSeg (g,j2) by XBOOLE_0:def_7; ::_thesis: verum end; casethat A9: ( j1 = 1 or j1 > 1 ) and A10: j2 + 1 <= len g ; ::_thesis: LSeg (g,j1) misses LSeg (g,j2) j2 < len g by A10, NAT_1:13; then j1 + 1 < len g by A7, XXREAL_0:2; then A11: LSeg (g,j1) c= LSeg (f,j1) by A2, A4, A9, Th18; 1 + 1 <= j1 + 1 by A9, XREAL_1:6; then 2 <= j2 by A7, XXREAL_0:2; then 1 <= j2 by XXREAL_0:2; then A12: LSeg (g,j2) c= LSeg (f,j2) by A2, A4, A10, Th18; LSeg (f,j1) misses LSeg (f,j2) by A1, A7, TOPREAL1:def_7; then (LSeg (f,j1)) /\ (LSeg (f,j2)) = {} by XBOOLE_0:def_7; then (LSeg (g,j1)) /\ (LSeg (g,j2)) = {} by A11, A12, XBOOLE_1:3, XBOOLE_1:27; hence LSeg (g,j1) misses LSeg (g,j2) by XBOOLE_0:def_7; ::_thesis: verum end; case j2 + 1 > len g ; ::_thesis: LSeg (g,j1) misses LSeg (g,j2) then LSeg (g,j2) = {} by TOPREAL1:def_3; then (LSeg (g,j1)) /\ (LSeg (g,j2)) = {} ; hence LSeg (g,j1) misses LSeg (g,j2) by XBOOLE_0:def_7; ::_thesis: verum end; end; end; hence LSeg (g,j1) misses LSeg (g,j2) ; ::_thesis: verum end; A13: for n1, n2 being Element of NAT st 1 <= n1 & n1 <= len f & 1 <= n2 & n2 <= len f & f . n1 = f . n2 holds n1 = n2 proof let n1, n2 be Element of NAT ; ::_thesis: ( 1 <= n1 & n1 <= len f & 1 <= n2 & n2 <= len f & f . n1 = f . n2 implies n1 = n2 ) assume that A14: 1 <= n1 and A15: n1 <= len f and A16: 1 <= n2 and A17: n2 <= len f and A18: f . n1 = f . n2 ; ::_thesis: n1 = n2 A19: n2 in dom f by A16, A17, FINSEQ_3:25; n1 in dom f by A14, A15, FINSEQ_3:25; hence n1 = n2 by A1, A18, A19, FUNCT_1:def_4; ::_thesis: verum end; A20: len g = (len (mid (f,1,(Index (p,f))))) + (len <*p*>) by A4, FINSEQ_1:22 .= (len (mid (f,1,(Index (p,f))))) + 1 by FINSEQ_1:39 ; consider i being Element of NAT such that 1 <= i and A21: i + 1 <= len f and p in LSeg (f,i) by A2, SPPOL_2:13; A22: 1 <= Index (p,f) by A2, Th8; 1 <= 1 + i by NAT_1:12; then A23: 1 <= len f by A21, XXREAL_0:2; then A24: len (mid (f,1,(Index (p,f)))) = ((Index (p,f)) -' 1) + 1 by A22, A5, FINSEQ_6:118; then A25: len (mid (f,1,(Index (p,f)))) = Index (p,f) by A2, Th8, XREAL_1:235; then g . 1 = (mid (f,1,(Index (p,f)))) . 1 by A4, A22, FINSEQ_6:109; then g . 1 = f . 1 by A22, A5, A23, FINSEQ_6:118; then A26: g . 1 = f /. 1 by A23, FINSEQ_4:15; A27: for j being Nat st 1 <= j & j + 2 <= len g holds (LSeg (g,j)) /\ (LSeg (g,(j + 1))) = {(g /. (j + 1))} proof let j be Nat; ::_thesis: ( 1 <= j & j + 2 <= len g implies (LSeg (g,j)) /\ (LSeg (g,(j + 1))) = {(g /. (j + 1))} ) assume that A28: 1 <= j and A29: j + 2 <= len g ; ::_thesis: (LSeg (g,j)) /\ (LSeg (g,(j + 1))) = {(g /. (j + 1))} A30: j + 1 <= len g by A29, NAT_D:47; then LSeg (g,j) = LSeg ((g /. j),(g /. (j + 1))) by A28, TOPREAL1:def_3; then A31: g /. (j + 1) in LSeg (g,j) by RLTOPSP1:68; A32: 1 <= j + 1 by A28, NAT_D:48; then LSeg (g,(j + 1)) = LSeg ((g /. (j + 1)),(g /. ((j + 1) + 1))) by A29, TOPREAL1:def_3; then g /. (j + 1) in LSeg (g,(j + 1)) by RLTOPSP1:68; then g /. (j + 1) in (LSeg (g,j)) /\ (LSeg (g,(j + 1))) by A31, XBOOLE_0:def_4; then A33: {(g /. (j + 1))} c= (LSeg (g,j)) /\ (LSeg (g,(j + 1))) by ZFMISC_1:31; j + 1 <= len g by A29, NAT_D:47; then A34: LSeg (g,j) c= LSeg (f,j) by A2, A4, A28, Th18; A35: Index (p,f) <= len f by A2, Th8; A36: (j + 1) + 1 <= len g by A29; then LSeg (g,(j + 1)) c= LSeg (f,(j + 1)) by A2, A4, A32, Th18; then A37: (LSeg (g,j)) /\ (LSeg (g,(j + 1))) c= (LSeg (f,j)) /\ (LSeg (f,(j + 1))) by A34, XBOOLE_1:27; A38: g /. (j + 1) = g . (j + 1) by A32, A30, FINSEQ_4:15; now__::_thesis:_(LSeg_(g,j))_/\_(LSeg_(g,(j_+_1)))_=_{(g_/._(j_+_1))} A39: len g = (len (mid (f,1,(Index (p,f))))) + 1 by A4, FINSEQ_2:16; Index (p,f) <= len f by A2, Th8; then A40: len g <= (len f) + 1 by A25, A39, XREAL_1:6; now__::_thesis:_(_(_len_g_=_(len_f)_+_1_&_contradiction_)_or_(_len_g_<_(len_f)_+_1_&_(LSeg_(g,j))_/\_(LSeg_(g,(j_+_1)))_=_{(g_/._(j_+_1))}_)_) percases ( len g = (len f) + 1 or len g < (len f) + 1 ) by A40, XXREAL_0:1; case len g = (len f) + 1 ; ::_thesis: contradiction hence contradiction by A2, A25, A39, Th8; ::_thesis: verum end; case len g < (len f) + 1 ; ::_thesis: (LSeg (g,j)) /\ (LSeg (g,(j + 1))) = {(g /. (j + 1))} then len g <= len f by NAT_1:13; then j + 2 <= len f by A29, XXREAL_0:2; then A41: (LSeg (g,j)) /\ (LSeg (g,(j + 1))) c= {(f /. (j + 1))} by A1, A28, A37, TOPREAL1:def_6; A42: j + 1 <= Index (p,f) by A25, A36, A39, XREAL_1:6; then j + 1 <= len f by A35, XXREAL_0:2; then A43: f . (j + 1) = f /. (j + 1) by A32, FINSEQ_4:15; g . (j + 1) = (mid (f,1,(Index (p,f)))) . (j + 1) by A4, A25, A32, A42, FINSEQ_1:64 .= f . (j + 1) by A5, A32, A42, FINSEQ_6:123 ; hence (LSeg (g,j)) /\ (LSeg (g,(j + 1))) = {(g /. (j + 1))} by A38, A33, A41, A43, XBOOLE_0:def_10; ::_thesis: verum end; end; end; hence (LSeg (g,j)) /\ (LSeg (g,(j + 1))) = {(g /. (j + 1))} ; ::_thesis: verum end; hence (LSeg (g,j)) /\ (LSeg (g,(j + 1))) = {(g /. (j + 1))} ; ::_thesis: verum end; for j being Nat st 1 <= j & j + 1 <= len g & not (g /. j) `1 = (g /. (j + 1)) `1 holds (g /. j) `2 = (g /. (j + 1)) `2 proof A44: Index (p,f) < len f by A2, Th8; let j be Nat; ::_thesis: ( 1 <= j & j + 1 <= len g & not (g /. j) `1 = (g /. (j + 1)) `1 implies (g /. j) `2 = (g /. (j + 1)) `2 ) assume that A45: 1 <= j and A46: j + 1 <= len g ; ::_thesis: ( (g /. j) `1 = (g /. (j + 1)) `1 or (g /. j) `2 = (g /. (j + 1)) `2 ) A47: LSeg (g,j) = LSeg ((g /. j),(g /. (j + 1))) by A45, A46, TOPREAL1:def_3; j + 1 <= (Index (p,f)) + 1 by A4, A25, A46, FINSEQ_2:16; then j <= Index (p,f) by XREAL_1:6; then j < len f by A44, XXREAL_0:2; then A48: j + 1 <= len f by NAT_1:13; then A49: LSeg (f,j) = LSeg ((f /. j),(f /. (j + 1))) by A45, TOPREAL1:def_3; A50: ( (f /. j) `1 = (f /. (j + 1)) `1 or (f /. j) `2 = (f /. (j + 1)) `2 ) by A1, A45, A48, TOPREAL1:def_5; LSeg (g,j) c= LSeg (f,j) by A2, A4, A45, A46, Th18; hence ( (g /. j) `1 = (g /. (j + 1)) `1 or (g /. j) `2 = (g /. (j + 1)) `2 ) by A47, A49, A50, Th3; ::_thesis: verum end; then A51: ( g is unfolded & g is s.n.c. & g is special ) by A27, A6, TOPREAL1:def_5, TOPREAL1:def_6, TOPREAL1:def_7; 1 <= len <*p*> by FINSEQ_1:39; then A52: 1 in dom <*p*> by FINSEQ_3:25; for x1, x2 being set st x1 in dom g & x2 in dom g & g . x1 = g . x2 holds x1 = x2 proof let x1, x2 be set ; ::_thesis: ( x1 in dom g & x2 in dom g & g . x1 = g . x2 implies x1 = x2 ) assume that A53: x1 in dom g and A54: x2 in dom g and A55: g . x1 = g . x2 ; ::_thesis: x1 = x2 reconsider n1 = x1, n2 = x2 as Element of NAT by A53, A54; A56: 1 <= n1 by A53, FINSEQ_3:25; A57: n2 <= len g by A54, FINSEQ_3:25; A58: 1 <= n2 by A54, FINSEQ_3:25; A59: n1 <= len g by A53, FINSEQ_3:25; now__::_thesis:_x1_=_x2 A60: g . (len g) = <*p*> . 1 by A4, A52, A20, FINSEQ_1:def_7 .= p by FINSEQ_1:def_8 ; now__::_thesis:_(_(_n1_=_len_g_&_x1_=_x2_)_or_(_n2_=_len_g_&_x1_=_x2_)_or_(_n1_<>_len_g_&_n2_<>_len_g_&_x1_=_x2_)_) percases ( n1 = len g or n2 = len g or ( n1 <> len g & n2 <> len g ) ) ; caseA61: n1 = len g ; ::_thesis: x1 = x2 now__::_thesis:_not_n2_<>_len_g assume A62: n2 <> len g ; ::_thesis: contradiction then n2 < len g by A57, XXREAL_0:1; then A63: n2 <= len (mid (f,1,(Index (p,f)))) by A20, NAT_1:13; then A64: n2 <= len f by A5, A25, XXREAL_0:2; g . n2 = (mid (f,1,(Index (p,f)))) . n2 by A4, A58, A63, FINSEQ_1:64; then g . n2 = f . ((n2 + 1) -' 1) by A22, A5, A23, A58, A63, FINSEQ_6:118; then A65: p = f . n2 by A55, A60, A61, NAT_D:34; then 1 < n2 by A3, A58, XXREAL_0:1; then (Index (p,f)) + 1 = n2 by A1, A65, A64, Th12; hence contradiction by A2, A24, A20, A62, Th8, XREAL_1:235; ::_thesis: verum end; hence x1 = x2 by A61; ::_thesis: verum end; caseA66: n2 = len g ; ::_thesis: x1 = x2 now__::_thesis:_not_n1_<>_len_g assume A67: n1 <> len g ; ::_thesis: contradiction then n1 < len g by A59, XXREAL_0:1; then A68: n1 <= len (mid (f,1,(Index (p,f)))) by A20, NAT_1:13; then A69: n1 <= len f by A5, A25, XXREAL_0:2; g . n1 = (mid (f,1,(Index (p,f)))) . n1 by A4, A56, A68, FINSEQ_1:64; then g . n1 = f . ((n1 + 1) -' 1) by A22, A5, A23, A56, A68, FINSEQ_6:118; then A70: p = f . n1 by A55, A60, A66, NAT_D:34; then 1 < n1 by A3, A56, XXREAL_0:1; then (Index (p,f)) + 1 = n1 by A1, A70, A69, Th12; hence contradiction by A2, A24, A20, A67, Th8, XREAL_1:235; ::_thesis: verum end; hence x1 = x2 by A66; ::_thesis: verum end; casethat A71: n1 <> len g and A72: n2 <> len g ; ::_thesis: x1 = x2 n1 < len g by A59, A71, XXREAL_0:1; then A73: n1 <= len (mid (f,1,(Index (p,f)))) by A20, NAT_1:13; then A74: n1 <= len f by A5, A25, XXREAL_0:2; n2 < len g by A57, A72, XXREAL_0:1; then A75: n2 <= len (mid (f,1,(Index (p,f)))) by A20, NAT_1:13; then A76: g . n2 = (mid (f,1,(Index (p,f)))) . n2 by A4, A58, FINSEQ_1:64 .= f . n2 by A5, A25, A58, A75, FINSEQ_6:123 ; A77: n2 <= len f by A5, A25, A75, XXREAL_0:2; g . n1 = (mid (f,1,(Index (p,f)))) . n1 by A4, A56, A73, FINSEQ_1:64 .= f . n1 by A5, A25, A56, A73, FINSEQ_6:123 ; hence x1 = x2 by A13, A55, A56, A58, A74, A77, A76; ::_thesis: verum end; end; end; hence x1 = x2 ; ::_thesis: verum end; hence x1 = x2 ; ::_thesis: verum end; then A78: g is one-to-one by FUNCT_1:def_4; 1 + 1 <= len g by A22, A25, A20, XREAL_1:6; then A79: g is being_S-Seq by A78, A51, TOPREAL1:def_8; g . (len g) = p by A4, A20, FINSEQ_1:42; hence g is_S-Seq_joining f /. 1,p by A26, A79, Def2; ::_thesis: verum end; begin definition let f be FinSequence of (TOP-REAL 2); let p be Point of (TOP-REAL 2); func L_Cut (f,p) -> FinSequence of (TOP-REAL 2) equals :Def3: :: JORDAN3:def 3 <*p*> ^ (mid (f,((Index (p,f)) + 1),(len f))) if p <> f . ((Index (p,f)) + 1) otherwise mid (f,((Index (p,f)) + 1),(len f)); correctness coherence ( ( p <> f . ((Index (p,f)) + 1) implies <*p*> ^ (mid (f,((Index (p,f)) + 1),(len f))) is FinSequence of (TOP-REAL 2) ) & ( not p <> f . ((Index (p,f)) + 1) implies mid (f,((Index (p,f)) + 1),(len f)) is FinSequence of (TOP-REAL 2) ) ); consistency for b1 being FinSequence of (TOP-REAL 2) holds verum; ; func R_Cut (f,p) -> FinSequence of (TOP-REAL 2) equals :Def4: :: JORDAN3:def 4 (mid (f,1,(Index (p,f)))) ^ <*p*> if p <> f . 1 otherwise <*p*>; correctness coherence ( ( p <> f . 1 implies (mid (f,1,(Index (p,f)))) ^ <*p*> is FinSequence of (TOP-REAL 2) ) & ( not p <> f . 1 implies <*p*> is FinSequence of (TOP-REAL 2) ) ); consistency for b1 being FinSequence of (TOP-REAL 2) holds verum; ; end; :: deftheorem Def3 defines L_Cut JORDAN3:def_3_:_ for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) holds ( ( p <> f . ((Index (p,f)) + 1) implies L_Cut (f,p) = <*p*> ^ (mid (f,((Index (p,f)) + 1),(len f))) ) & ( not p <> f . ((Index (p,f)) + 1) implies L_Cut (f,p) = mid (f,((Index (p,f)) + 1),(len f)) ) ); :: deftheorem Def4 defines R_Cut JORDAN3:def_4_:_ for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) holds ( ( p <> f . 1 implies R_Cut (f,p) = (mid (f,1,(Index (p,f)))) ^ <*p*> ) & ( not p <> f . 1 implies R_Cut (f,p) = <*p*> ) ); theorem Th20: :: JORDAN3:20 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & p = f . ((Index (p,f)) + 1) & p <> f . (len f) holds ((Index (p,(Rev f))) + (Index (p,f))) + 1 = len f proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & p = f . ((Index (p,f)) + 1) & p <> f . (len f) holds ((Index (p,(Rev f))) + (Index (p,f))) + 1 = len f let p be Point of (TOP-REAL 2); ::_thesis: ( f is being_S-Seq & p in L~ f & p = f . ((Index (p,f)) + 1) & p <> f . (len f) implies ((Index (p,(Rev f))) + (Index (p,f))) + 1 = len f ) assume that A1: f is being_S-Seq and A2: p in L~ f and A3: p = f . ((Index (p,f)) + 1) and A4: p <> f . (len f) ; ::_thesis: ((Index (p,(Rev f))) + (Index (p,f))) + 1 = len f A5: len f <= (len f) + (Index (p,f)) by NAT_1:11; len f = len (Rev f) by FINSEQ_5:def_3; then A6: (len f) - (Index (p,f)) <= len (Rev f) by A5, XREAL_1:20; Index (p,f) <= len f by A2, Th8; then A7: (len f) - (Index (p,f)) = (len f) -' (Index (p,f)) by XREAL_1:233; Index (p,f) < len f by A2, Th8; then A8: (Index (p,f)) + 1 <= len f by NAT_1:13; then (Index (p,f)) + 1 < len f by A3, A4, XXREAL_0:1; then A9: 1 < (len f) - (Index (p,f)) by XREAL_1:20; 1 <= (Index (p,f)) + 1 by NAT_1:11; then (Index (p,f)) + 1 in dom f by A8, FINSEQ_3:25; then A10: (Index (p,f)) + 1 in dom (Rev f) by FINSEQ_5:57; p = (Rev (Rev f)) . ((Index (p,f)) + 1) by A3 .= (Rev f) . (((len (Rev f)) - ((Index (p,f)) + 1)) + 1) by A10, FINSEQ_5:58 .= (Rev f) . ((len (Rev f)) - (Index (p,f))) .= (Rev f) . ((len f) - (Index (p,f))) by FINSEQ_5:def_3 ; then (Index (p,(Rev f))) + 1 = (len f) -' (Index (p,f)) by A1, A6, A9, A7, Th12; hence ((Index (p,(Rev f))) + (Index (p,f))) + 1 = len f by A7; ::_thesis: verum end; theorem Th21: :: JORDAN3:21 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st f is unfolded & f is s.n.c. & p in L~ f & p <> f . ((Index (p,f)) + 1) holds (Index (p,(Rev f))) + (Index (p,f)) = len f proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st f is unfolded & f is s.n.c. & p in L~ f & p <> f . ((Index (p,f)) + 1) holds (Index (p,(Rev f))) + (Index (p,f)) = len f let p be Point of (TOP-REAL 2); ::_thesis: ( f is unfolded & f is s.n.c. & p in L~ f & p <> f . ((Index (p,f)) + 1) implies (Index (p,(Rev f))) + (Index (p,f)) = len f ) assume that A1: ( f is unfolded & f is s.n.c. ) and A2: p in L~ f and A3: p <> f . ((Index (p,f)) + 1) ; ::_thesis: (Index (p,(Rev f))) + (Index (p,f)) = len f A4: Index (p,f) < len f by A2, Th8; then A5: ((len f) -' (Index (p,f))) + (Index (p,f)) = len f by XREAL_1:235; 0 + 1 <= Index (p,f) by A2, Th8; then (len f) + 0 < (len f) + (Index (p,f)) by XREAL_1:6; then (len f) - (Index (p,f)) < len f by XREAL_1:19; then A6: (len f) -' (Index (p,f)) < len f by A4, XREAL_1:233; A7: Index (p,f) < len f by A2, Th8; then (Index (p,f)) + 1 <= len f by NAT_1:13; then 1 <= (len f) - (Index (p,f)) by XREAL_1:19; then 1 <= (len f) -' (Index (p,f)) by NAT_D:39; then (len f) -' (Index (p,f)) in dom f by A6, FINSEQ_3:25; then A8: (Rev f) . ((len f) -' (Index (p,f))) = f . (((len f) - ((len f) -' (Index (p,f)))) + 1) by FINSEQ_5:58 .= f . (((len f) - ((len f) - (Index (p,f)))) + 1) by A7, XREAL_1:233 .= f . ((0 + (Index (p,f))) + 1) ; p in LSeg (f,(Index (p,f))) by A2, Th9; then A9: p in LSeg ((Rev f),((len f) -' (Index (p,f)))) by A5, SPPOL_2:2; len f = len (Rev f) by FINSEQ_5:def_3; then A10: ((len f) -' (Index (p,f))) + 1 <= len (Rev f) by A6, NAT_1:13; Rev f is s.n.c. by A1, SPPOL_2:35; then (len f) -' (Index (p,f)) = Index (p,(Rev f)) by A1, A3, A9, A10, A8, Th14, SPPOL_2:28; hence (Index (p,(Rev f))) + (Index (p,f)) = len f by A7, XREAL_1:235; ::_thesis: verum end; theorem Th22: :: JORDAN3:22 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f holds L_Cut ((Rev f),p) = Rev (R_Cut (f,p)) proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f holds L_Cut ((Rev f),p) = Rev (R_Cut (f,p)) let p be Point of (TOP-REAL 2); ::_thesis: ( f is being_S-Seq & p in L~ f implies L_Cut ((Rev f),p) = Rev (R_Cut (f,p)) ) assume that A1: f is being_S-Seq and A2: p in L~ f ; ::_thesis: L_Cut ((Rev f),p) = Rev (R_Cut (f,p)) A3: len f = len (Rev f) by FINSEQ_5:def_3; A4: p in L~ (Rev f) by A2, SPPOL_2:22; A5: 1 <= Index (p,f) by A2, Th8; A6: Rev f is being_S-Seq by A1; A7: Rev (Rev f) = f ; A8: Index (p,f) < len f by A2, Th8; L~ f = L~ (Rev f) by SPPOL_2:22; then Index (p,(Rev f)) < len (Rev f) by A2, Th8; then A9: (Index (p,(Rev f))) + 1 <= len f by A3, NAT_1:13; 1 <= (Index (p,(Rev f))) + 1 by NAT_1:11; then A10: (Index (p,(Rev f))) + 1 in dom f by A9, FINSEQ_3:25; A11: 1 + 1 <= len f by A1, TOPREAL1:def_8; then A12: 1 < len f by NAT_1:13; then A13: 1 in dom f by FINSEQ_3:25; A14: len f in dom f by A12, FINSEQ_3:25; A15: 2 in dom f by A11, FINSEQ_3:25; A16: dom (Rev f) = dom f by FINSEQ_5:57; percases ( p = f . (len f) or p = f . 1 or ( p <> f . 1 & p <> f . (len f) & p = f . ((Index (p,f)) + 1) ) or ( p <> f . 1 & p <> f . ((Index (p,f)) + 1) ) ) ; supposeA17: p = f . (len f) ; ::_thesis: L_Cut ((Rev f),p) = Rev (R_Cut (f,p)) then A18: p <> f . 1 by A1, A12, A13, A14, FUNCT_1:def_4; A19: p = (Rev f) . 1 by A17, FINSEQ_5:62; then A20: p <> (Rev f) . (1 + 1) by A1, A16, A13, A15, FUNCT_1:def_4; p = (Rev f) /. 1 by A16, A13, A19, PARTFUN1:def_6; then A21: Index (p,(Rev f)) = 1 by A3, A11, Th11; then (Index (p,(Rev f))) + (Index (p,f)) = len f by A6, A4, A7, A3, A20, Th21; then A22: Index (p,(Rev f)) = (len f) - (Index (p,f)) ; thus L_Cut ((Rev f),p) = <*p*> ^ (mid ((Rev f),((Index (p,(Rev f))) + 1),(len f))) by A3, A21, A20, Def3 .= <*p*> ^ (mid ((Rev f),(((len f) -' (Index (p,f))) + 1),(len f))) by A8, A22, XREAL_1:233 .= <*p*> ^ (mid ((Rev f),(((len f) -' (Index (p,f))) + 1),(((len f) -' 1) + 1))) by A12, XREAL_1:235 .= <*p*> ^ (Rev (mid (f,1,(Index (p,f))))) by A12, A5, A8, FINSEQ_6:113 .= Rev ((mid (f,1,(Index (p,f)))) ^ <*p*>) by FINSEQ_5:63 .= Rev (R_Cut (f,p)) by A18, Def4 ; ::_thesis: verum end; supposeA23: p = f . 1 ; ::_thesis: L_Cut ((Rev f),p) = Rev (R_Cut (f,p)) A24: ((len (Rev f)) -' 1) + 1 = len (Rev f) by A3, A12, XREAL_1:235; then A25: ((Rev f) /^ ((len (Rev f)) -' 1)) . 1 = (Rev f) . (len (Rev f)) by FINSEQ_6:114; A26: len ((Rev f) /^ ((len (Rev f)) -' 1)) = (len (Rev f)) -' ((len (Rev f)) -' 1) by RFINSEQ:29; 1 <= (len (Rev f)) - ((len (Rev f)) -' 1) by A24; then A27: 1 <= len ((Rev f) /^ ((len (Rev f)) -' 1)) by A26, NAT_D:39; ((len (Rev f)) -' (len (Rev f))) + 1 = ((len (Rev f)) - (len (Rev f))) + 1 by XREAL_1:233 .= 1 ; then A28: mid ((Rev f),(len (Rev f)),(len (Rev f))) = ((Rev f) /^ ((len (Rev f)) -' 1)) | 1 by FINSEQ_6:def_3 .= <*(((Rev f) /^ ((len (Rev f)) -' 1)) /. 1)*> by A27, CARD_1:27, FINSEQ_5:20 .= <*((Rev f) . (len (Rev f)))*> by A25, A27, FINSEQ_4:15 ; A29: p = (Rev f) . (len f) by A23, FINSEQ_5:62; then (Index (p,(Rev f))) + 1 = len f by A1, A3, A12, Th12; hence L_Cut ((Rev f),p) = <*p*> by A3, A29, A28, Def3 .= Rev <*p*> by FINSEQ_5:60 .= Rev (R_Cut (f,p)) by A23, Def4 ; ::_thesis: verum end; supposethat A30: p <> f . 1 and A31: p <> f . (len f) and A32: p = f . ((Index (p,f)) + 1) ; ::_thesis: L_Cut ((Rev f),p) = Rev (R_Cut (f,p)) A33: len f = ((Index (p,(Rev f))) + (Index (p,f))) + 1 by A1, A2, A31, A32, Th20 .= (Index (p,f)) + ((Index (p,(Rev f))) + 1) ; len f = ((Index (p,(Rev f))) + (Index (p,f))) + 1 by A1, A2, A31, A32, Th20 .= (Index (p,(Rev f))) + ((Index (p,f)) + 1) ; then A34: p = f . (((len f) - ((Index (p,(Rev f))) + 1)) + 1) by A32 .= (Rev f) . ((Index (p,(Rev f))) + 1) by A10, FINSEQ_5:58 ; A35: (len f) -' (Index (p,f)) = (len f) - (Index (p,f)) by A8, XREAL_1:233 .= (Index (p,(Rev f))) + 1 by A33 ; p <> (Rev f) . (len f) by A30, FINSEQ_5:62; then A36: (Index (p,(Rev f))) + 1 < len f by A9, A34, XXREAL_0:1; thus L_Cut ((Rev f),p) = mid ((Rev f),((Index (p,(Rev f))) + 1),(len f)) by A3, A34, Def3 .= <*p*> ^ (mid ((Rev f),(((len f) -' (Index (p,f))) + 1),(len f))) by A16, A10, A34, A35, A36, FINSEQ_6:126 .= <*p*> ^ (mid ((Rev f),(((len f) -' (Index (p,f))) + 1),(((len f) -' 1) + 1))) by A12, XREAL_1:235 .= <*p*> ^ (Rev (mid (f,1,(Index (p,f))))) by A12, A5, A8, FINSEQ_6:113 .= Rev ((mid (f,1,(Index (p,f)))) ^ <*p*>) by FINSEQ_5:63 .= Rev (R_Cut (f,p)) by A30, Def4 ; ::_thesis: verum end; supposethat A37: p <> f . 1 and A38: p <> f . ((Index (p,f)) + 1) ; ::_thesis: L_Cut ((Rev f),p) = Rev (R_Cut (f,p)) A39: p <> (Rev f) . (len f) by A37, FINSEQ_5:62; A40: now__::_thesis:_not_p_=_(Rev_f)_._((Index_(p,(Rev_f)))_+_1) assume A41: p = (Rev f) . ((Index (p,(Rev f))) + 1) ; ::_thesis: contradiction then A42: len (Rev f) = ((Index (p,(Rev (Rev f)))) + (Index (p,(Rev f)))) + 1 by A1, A4, A3, A39, Th20 .= ((Index (p,f)) + 1) + (Index (p,(Rev f))) ; p = f . (((len f) - ((Index (p,(Rev f))) + 1)) + 1) by A10, A41, FINSEQ_5:58 .= f . ((Index (p,f)) + 1) by A3, A42 ; hence contradiction by A38; ::_thesis: verum end; A43: Index (p,f) < len f by A2, Th8; len f = (Index (p,(Rev f))) + (Index (p,f)) by A1, A2, A38, Th21; then Index (p,(Rev f)) = (len f) - (Index (p,f)) .= (len f) -' (Index (p,f)) by A43, XREAL_1:233 ; hence L_Cut ((Rev f),p) = <*p*> ^ (mid ((Rev f),(((len f) -' (Index (p,f))) + 1),(len f))) by A3, A40, Def3 .= <*p*> ^ (mid ((Rev f),(((len f) -' (Index (p,f))) + 1),(((len f) -' 1) + 1))) by A12, XREAL_1:235 .= <*p*> ^ (Rev (mid (f,1,(Index (p,f))))) by A12, A5, A8, FINSEQ_6:113 .= Rev ((mid (f,1,(Index (p,f)))) ^ <*p*>) by FINSEQ_5:63 .= Rev (R_Cut (f,p)) by A37, Def4 ; ::_thesis: verum end; end; end; theorem Th23: :: JORDAN3:23 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st p in L~ f holds ( (L_Cut (f,p)) . 1 = p & ( for i being Element of NAT st 1 < i & i <= len (L_Cut (f,p)) holds ( ( p = f . ((Index (p,f)) + 1) implies (L_Cut (f,p)) . i = f . ((Index (p,f)) + i) ) & ( p <> f . ((Index (p,f)) + 1) implies (L_Cut (f,p)) . i = f . (((Index (p,f)) + i) - 1) ) ) ) ) proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st p in L~ f holds ( (L_Cut (f,p)) . 1 = p & ( for i being Element of NAT st 1 < i & i <= len (L_Cut (f,p)) holds ( ( p = f . ((Index (p,f)) + 1) implies (L_Cut (f,p)) . i = f . ((Index (p,f)) + i) ) & ( p <> f . ((Index (p,f)) + 1) implies (L_Cut (f,p)) . i = f . (((Index (p,f)) + i) - 1) ) ) ) ) let p be Point of (TOP-REAL 2); ::_thesis: ( p in L~ f implies ( (L_Cut (f,p)) . 1 = p & ( for i being Element of NAT st 1 < i & i <= len (L_Cut (f,p)) holds ( ( p = f . ((Index (p,f)) + 1) implies (L_Cut (f,p)) . i = f . ((Index (p,f)) + i) ) & ( p <> f . ((Index (p,f)) + 1) implies (L_Cut (f,p)) . i = f . (((Index (p,f)) + i) - 1) ) ) ) ) ) assume A1: p in L~ f ; ::_thesis: ( (L_Cut (f,p)) . 1 = p & ( for i being Element of NAT st 1 < i & i <= len (L_Cut (f,p)) holds ( ( p = f . ((Index (p,f)) + 1) implies (L_Cut (f,p)) . i = f . ((Index (p,f)) + i) ) & ( p <> f . ((Index (p,f)) + 1) implies (L_Cut (f,p)) . i = f . (((Index (p,f)) + i) - 1) ) ) ) ) then Index (p,f) < len f by Th8; then A2: (Index (p,f)) + 1 <= len f by NAT_1:13; A3: not f is empty by A1, CARD_1:27, TOPREAL1:22; now__::_thesis:_(L_Cut_(f,p))_._1_=_p percases ( p = f . ((Index (p,f)) + 1) or p <> f . ((Index (p,f)) + 1) ) ; supposeA4: p = f . ((Index (p,f)) + 1) ; ::_thesis: (L_Cut (f,p)) . 1 = p 1 in dom f by A3, FINSEQ_5:6; then A5: 1 <= len f by FINSEQ_3:25; Index (p,f) < len f by A1, Th8; then A6: (Index (p,f)) + 1 <= len f by NAT_1:13; A7: 1 <= (Index (p,f)) + 1 by NAT_1:11; L_Cut (f,p) = mid (f,((Index (p,f)) + 1),(len f)) by A4, Def3; hence (L_Cut (f,p)) . 1 = p by A4, A7, A6, A5, FINSEQ_6:118; ::_thesis: verum end; suppose p <> f . ((Index (p,f)) + 1) ; ::_thesis: (L_Cut (f,p)) . 1 = p then L_Cut (f,p) = <*p*> ^ (mid (f,((Index (p,f)) + 1),(len f))) by Def3; hence (L_Cut (f,p)) . 1 = p by FINSEQ_1:41; ::_thesis: verum end; end; end; hence (L_Cut (f,p)) . 1 = p ; ::_thesis: for i being Element of NAT st 1 < i & i <= len (L_Cut (f,p)) holds ( ( p = f . ((Index (p,f)) + 1) implies (L_Cut (f,p)) . i = f . ((Index (p,f)) + i) ) & ( p <> f . ((Index (p,f)) + 1) implies (L_Cut (f,p)) . i = f . (((Index (p,f)) + i) - 1) ) ) let i be Element of NAT ; ::_thesis: ( 1 < i & i <= len (L_Cut (f,p)) implies ( ( p = f . ((Index (p,f)) + 1) implies (L_Cut (f,p)) . i = f . ((Index (p,f)) + i) ) & ( p <> f . ((Index (p,f)) + 1) implies (L_Cut (f,p)) . i = f . (((Index (p,f)) + i) - 1) ) ) ) assume that A8: 1 < i and A9: i <= len (L_Cut (f,p)) ; ::_thesis: ( ( p = f . ((Index (p,f)) + 1) implies (L_Cut (f,p)) . i = f . ((Index (p,f)) + i) ) & ( p <> f . ((Index (p,f)) + 1) implies (L_Cut (f,p)) . i = f . (((Index (p,f)) + i) - 1) ) ) A10: len <*p*> <= i by A8, FINSEQ_1:40; A11: 1 <= (Index (p,f)) + 1 by NAT_1:11; then A12: 1 <= len f by A2, XXREAL_0:2; then len (mid (f,((Index (p,f)) + 1),(len f))) = ((len f) -' ((Index (p,f)) + 1)) + 1 by A11, A2, FINSEQ_6:118; then A13: (len <*p*>) + (len (mid (f,((Index (p,f)) + 1),(len f)))) = 1 + (((len f) -' ((Index (p,f)) + 1)) + 1) by FINSEQ_1:40 .= 1 + (((len f) - ((Index (p,f)) + 1)) + 1) by A2, XREAL_1:233 .= ((len f) - (Index (p,f))) + 1 ; A14: (i -' 1) + 1 = (i - 1) + 1 by A8, XREAL_1:233 .= i ; A15: 1 <= i - 1 by A8, SPPOL_1:1; then A16: 1 <= i -' 1 by NAT_D:39; hereby ::_thesis: ( p <> f . ((Index (p,f)) + 1) implies (L_Cut (f,p)) . i = f . (((Index (p,f)) + i) - 1) ) assume p = f . ((Index (p,f)) + 1) ; ::_thesis: (L_Cut (f,p)) . i = f . ((Index (p,f)) + i) then L_Cut (f,p) = mid (f,((Index (p,f)) + 1),(len f)) by Def3; hence (L_Cut (f,p)) . i = f . ((i + ((Index (p,f)) + 1)) -' 1) by A8, A9, A11, A2, A12, FINSEQ_6:118 .= f . (((i + (Index (p,f))) + 1) -' 1) .= f . ((Index (p,f)) + i) by NAT_D:34 ; ::_thesis: verum end; A17: i <= i + (Index (p,f)) by NAT_1:11; assume p <> f . ((Index (p,f)) + 1) ; ::_thesis: (L_Cut (f,p)) . i = f . (((Index (p,f)) + i) - 1) then A18: L_Cut (f,p) = <*p*> ^ (mid (f,((Index (p,f)) + 1),(len f))) by Def3; then i <= (len <*p*>) + (len (mid (f,((Index (p,f)) + 1),(len f)))) by A9, FINSEQ_1:22; then i - 1 <= (((len f) - (Index (p,f))) + 1) - 1 by A13, XREAL_1:9; then A19: i -' 1 <= ((len f) - ((Index (p,f)) + 1)) + 1 by A15, NAT_D:39; len <*p*> < i by A8, FINSEQ_1:39; then (L_Cut (f,p)) . i = (mid (f,((Index (p,f)) + 1),(len f))) . (i - (len <*p*>)) by A9, A18, FINSEQ_6:108 .= (mid (f,((Index (p,f)) + 1),(len f))) . (i -' (len <*p*>)) by A10, XREAL_1:233 .= (mid (f,((Index (p,f)) + 1),(len f))) . (i -' 1) by FINSEQ_1:39 .= f . (((i -' 1) + ((Index (p,f)) + 1)) -' 1) by A11, A2, A16, A19, FINSEQ_6:122 .= f . (((Index (p,f)) + i) -' 1) by A14 ; hence (L_Cut (f,p)) . i = f . (((Index (p,f)) + i) - 1) by A8, A17, XREAL_1:233, XXREAL_0:2; ::_thesis: verum end; theorem Th24: :: JORDAN3:24 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st p in L~ f holds ( (R_Cut (f,p)) . (len (R_Cut (f,p))) = p & ( for i being Element of NAT st 1 <= i & i <= Index (p,f) holds (R_Cut (f,p)) . i = f . i ) ) proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st p in L~ f holds ( (R_Cut (f,p)) . (len (R_Cut (f,p))) = p & ( for i being Element of NAT st 1 <= i & i <= Index (p,f) holds (R_Cut (f,p)) . i = f . i ) ) let p be Point of (TOP-REAL 2); ::_thesis: ( p in L~ f implies ( (R_Cut (f,p)) . (len (R_Cut (f,p))) = p & ( for i being Element of NAT st 1 <= i & i <= Index (p,f) holds (R_Cut (f,p)) . i = f . i ) ) ) assume A1: p in L~ f ; ::_thesis: ( (R_Cut (f,p)) . (len (R_Cut (f,p))) = p & ( for i being Element of NAT st 1 <= i & i <= Index (p,f) holds (R_Cut (f,p)) . i = f . i ) ) then A2: Index (p,f) < len f by Th8; now__::_thesis:_(R_Cut_(f,p))_._(len_(R_Cut_(f,p)))_=_p percases ( p <> f . 1 or p = f . 1 ) ; supposeA3: p <> f . 1 ; ::_thesis: (R_Cut (f,p)) . (len (R_Cut (f,p))) = p A4: len ((mid (f,1,(Index (p,f)))) ^ <*p*>) = (len (mid (f,1,(Index (p,f))))) + (len <*p*>) by FINSEQ_1:22 .= (len (mid (f,1,(Index (p,f))))) + 1 by FINSEQ_1:39 ; R_Cut (f,p) = (mid (f,1,(Index (p,f)))) ^ <*p*> by A3, Def4; hence (R_Cut (f,p)) . (len (R_Cut (f,p))) = p by A4, FINSEQ_1:42; ::_thesis: verum end; suppose p = f . 1 ; ::_thesis: (R_Cut (f,p)) . (len (R_Cut (f,p))) = p then A5: R_Cut (f,p) = <*p*> by Def4; then len (R_Cut (f,p)) = 1 by FINSEQ_1:40; hence (R_Cut (f,p)) . (len (R_Cut (f,p))) = p by A5, FINSEQ_1:40; ::_thesis: verum end; end; end; hence (R_Cut (f,p)) . (len (R_Cut (f,p))) = p ; ::_thesis: for i being Element of NAT st 1 <= i & i <= Index (p,f) holds (R_Cut (f,p)) . i = f . i A6: 1 <= Index (p,f) by A1, Th8; then len f > 1 by A2, XXREAL_0:2; then A7: len (mid (f,1,(Index (p,f)))) = ((Index (p,f)) -' 1) + 1 by A6, A2, FINSEQ_6:118 .= Index (p,f) by A1, Th8, XREAL_1:235 ; thus for i being Element of NAT st 1 <= i & i <= Index (p,f) holds (R_Cut (f,p)) . i = f . i ::_thesis: verum proof let i be Element of NAT ; ::_thesis: ( 1 <= i & i <= Index (p,f) implies (R_Cut (f,p)) . i = f . i ) assume that A8: 1 <= i and A9: i <= Index (p,f) ; ::_thesis: (R_Cut (f,p)) . i = f . i now__::_thesis:_(_(_p_<>_f_._1_&_(R_Cut_(f,p))_._i_=_f_._i_)_or_(_p_=_f_._1_&_(R_Cut_(f,p))_._i_=_f_._i_)_) percases ( p <> f . 1 or p = f . 1 ) ; case p <> f . 1 ; ::_thesis: (R_Cut (f,p)) . i = f . i then (R_Cut (f,p)) . i = ((mid (f,1,(Index (p,f)))) ^ <*p*>) . i by Def4 .= (mid (f,1,(Index (p,f)))) . i by A7, A8, A9, FINSEQ_1:64 .= f . i by A2, A8, A9, FINSEQ_6:123 ; hence (R_Cut (f,p)) . i = f . i ; ::_thesis: verum end; caseA10: p = f . 1 ; ::_thesis: (R_Cut (f,p)) . i = f . i A11: len f > 1 by A6, A2, XXREAL_0:2; then 1 in dom f by FINSEQ_3:25; then A12: p = f /. 1 by A10, PARTFUN1:def_6; len f >= 1 + 1 by A11, NAT_1:13; then Index (p,f) = 1 by A12, Th11; then A13: i = 1 by A8, A9, XXREAL_0:1; R_Cut (f,p) = <*p*> by A10, Def4; hence (R_Cut (f,p)) . i = f . i by A10, A13, FINSEQ_1:40; ::_thesis: verum end; end; end; hence (R_Cut (f,p)) . i = f . i ; ::_thesis: verum end; end; theorem :: JORDAN3:25 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st p in L~ f holds ( ( p <> f . 1 implies len (R_Cut (f,p)) = (Index (p,f)) + 1 ) & ( p = f . 1 implies len (R_Cut (f,p)) = Index (p,f) ) ) proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st p in L~ f holds ( ( p <> f . 1 implies len (R_Cut (f,p)) = (Index (p,f)) + 1 ) & ( p = f . 1 implies len (R_Cut (f,p)) = Index (p,f) ) ) let p be Point of (TOP-REAL 2); ::_thesis: ( p in L~ f implies ( ( p <> f . 1 implies len (R_Cut (f,p)) = (Index (p,f)) + 1 ) & ( p = f . 1 implies len (R_Cut (f,p)) = Index (p,f) ) ) ) assume A1: p in L~ f ; ::_thesis: ( ( p <> f . 1 implies len (R_Cut (f,p)) = (Index (p,f)) + 1 ) & ( p = f . 1 implies len (R_Cut (f,p)) = Index (p,f) ) ) then consider i being Element of NAT such that A2: 1 <= i and A3: i + 1 <= len f and p in LSeg (f,i) by SPPOL_2:13; A4: 1 <= Index (p,f) by A1, Th8; A5: Index (p,f) <= len f by A1, Th8; i <= len f by A3, NAT_D:46; then A6: 1 <= len f by A2, XXREAL_0:2; now__::_thesis:_(_(_p_<>_f_._1_&_len_(R_Cut_(f,p))_=_(Index_(p,f))_+_1_)_or_(_p_=_f_._1_&_len_(R_Cut_(f,p))_=_Index_(p,f)_)_) percases ( p <> f . 1 or p = f . 1 ) ; case p <> f . 1 ; ::_thesis: len (R_Cut (f,p)) = (Index (p,f)) + 1 then R_Cut (f,p) = (mid (f,1,(Index (p,f)))) ^ <*p*> by Def4; hence len (R_Cut (f,p)) = (len (mid (f,1,(Index (p,f))))) + (len <*p*>) by FINSEQ_1:22 .= (len (mid (f,1,(Index (p,f))))) + 1 by FINSEQ_1:39 .= (((Index (p,f)) -' 1) + 1) + 1 by A6, A4, A5, FINSEQ_6:118 .= (Index (p,f)) + 1 by A1, Th8, XREAL_1:235 ; ::_thesis: verum end; caseA7: p = f . 1 ; ::_thesis: len (R_Cut (f,p)) = Index (p,f) len f > i by A3, NAT_1:13; then len f > 1 by A2, XXREAL_0:2; then A8: len f >= 1 + 1 by NAT_1:13; 1 in dom f by A3, CARD_1:27, FINSEQ_5:6; then A9: p = f /. 1 by A7, PARTFUN1:def_6; R_Cut (f,p) = <*p*> by A7, Def4; hence len (R_Cut (f,p)) = 1 by FINSEQ_1:39 .= Index (p,f) by A8, A9, Th11 ; ::_thesis: verum end; end; end; hence ( ( p <> f . 1 implies len (R_Cut (f,p)) = (Index (p,f)) + 1 ) & ( p = f . 1 implies len (R_Cut (f,p)) = Index (p,f) ) ) ; ::_thesis: verum end; theorem Th26: :: JORDAN3:26 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st p in L~ f holds ( ( p = f . ((Index (p,f)) + 1) implies len (L_Cut (f,p)) = (len f) - (Index (p,f)) ) & ( p <> f . ((Index (p,f)) + 1) implies len (L_Cut (f,p)) = ((len f) - (Index (p,f))) + 1 ) ) proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st p in L~ f holds ( ( p = f . ((Index (p,f)) + 1) implies len (L_Cut (f,p)) = (len f) - (Index (p,f)) ) & ( p <> f . ((Index (p,f)) + 1) implies len (L_Cut (f,p)) = ((len f) - (Index (p,f))) + 1 ) ) let p be Point of (TOP-REAL 2); ::_thesis: ( p in L~ f implies ( ( p = f . ((Index (p,f)) + 1) implies len (L_Cut (f,p)) = (len f) - (Index (p,f)) ) & ( p <> f . ((Index (p,f)) + 1) implies len (L_Cut (f,p)) = ((len f) - (Index (p,f))) + 1 ) ) ) assume A1: p in L~ f ; ::_thesis: ( ( p = f . ((Index (p,f)) + 1) implies len (L_Cut (f,p)) = (len f) - (Index (p,f)) ) & ( p <> f . ((Index (p,f)) + 1) implies len (L_Cut (f,p)) = ((len f) - (Index (p,f))) + 1 ) ) then consider i being Element of NAT such that A2: 1 <= i and A3: i + 1 <= len f and p in LSeg (f,i) by SPPOL_2:13; i <= len f by A3, NAT_D:46; then A4: 1 <= len f by A2, XXREAL_0:2; 1 <= Index (p,f) by A1, Th8; then A5: 1 < (Index (p,f)) + 1 by NAT_1:13; Index (p,f) < len f by A1, Th8; then A6: ((Index (p,f)) + 1) + 0 <= len f by NAT_1:13; then A7: (len f) - ((Index (p,f)) + 1) >= 0 by XREAL_1:19; now__::_thesis:_(_(_p_<>_f_._((Index_(p,f))_+_1)_&_len_(L_Cut_(f,p))_=_((len_f)_-_(Index_(p,f)))_+_1_)_or_(_p_=_f_._((Index_(p,f))_+_1)_&_len_(L_Cut_(f,p))_=_(len_f)_-_(Index_(p,f))_)_) percases ( p <> f . ((Index (p,f)) + 1) or p = f . ((Index (p,f)) + 1) ) ; case p <> f . ((Index (p,f)) + 1) ; ::_thesis: len (L_Cut (f,p)) = ((len f) - (Index (p,f))) + 1 then L_Cut (f,p) = <*p*> ^ (mid (f,((Index (p,f)) + 1),(len f))) by Def3; hence len (L_Cut (f,p)) = 1 + (len (mid (f,((Index (p,f)) + 1),(len f)))) by FINSEQ_5:8 .= (((len f) -' ((Index (p,f)) + 1)) + 1) + 1 by A4, A5, A6, FINSEQ_6:118 .= (((len f) - ((Index (p,f)) + 1)) + 1) + 1 by A7, XREAL_0:def_2 .= ((len f) - (Index (p,f))) + 1 ; ::_thesis: verum end; case p = f . ((Index (p,f)) + 1) ; ::_thesis: len (L_Cut (f,p)) = (len f) - (Index (p,f)) then L_Cut (f,p) = mid (f,((Index (p,f)) + 1),(len f)) by Def3; hence len (L_Cut (f,p)) = ((len f) -' ((Index (p,f)) + 1)) + 1 by A4, A5, A6, FINSEQ_6:118 .= ((len f) - ((Index (p,f)) + 1)) + 1 by A7, XREAL_0:def_2 .= (len f) - (Index (p,f)) ; ::_thesis: verum end; end; end; hence ( ( p = f . ((Index (p,f)) + 1) implies len (L_Cut (f,p)) = (len f) - (Index (p,f)) ) & ( p <> f . ((Index (p,f)) + 1) implies len (L_Cut (f,p)) = ((len f) - (Index (p,f))) + 1 ) ) ; ::_thesis: verum end; definition let p1, p2, q1, q2 be Point of (TOP-REAL 2); pred LE q1,q2,p1,p2 means :Def5: :: JORDAN3:def 5 ( q1 in LSeg (p1,p2) & q2 in LSeg (p1,p2) & ( for r1, r2 being Real st 0 <= r1 & r1 <= 1 & q1 = ((1 - r1) * p1) + (r1 * p2) & 0 <= r2 & r2 <= 1 & q2 = ((1 - r2) * p1) + (r2 * p2) holds r1 <= r2 ) ); end; :: deftheorem Def5 defines LE JORDAN3:def_5_:_ for p1, p2, q1, q2 being Point of (TOP-REAL 2) holds ( LE q1,q2,p1,p2 iff ( q1 in LSeg (p1,p2) & q2 in LSeg (p1,p2) & ( for r1, r2 being Real st 0 <= r1 & r1 <= 1 & q1 = ((1 - r1) * p1) + (r1 * p2) & 0 <= r2 & r2 <= 1 & q2 = ((1 - r2) * p1) + (r2 * p2) holds r1 <= r2 ) ) ); definition let p1, p2, q1, q2 be Point of (TOP-REAL 2); pred LT q1,q2,p1,p2 means :Def6: :: JORDAN3:def 6 ( LE q1,q2,p1,p2 & q1 <> q2 ); end; :: deftheorem Def6 defines LT JORDAN3:def_6_:_ for p1, p2, q1, q2 being Point of (TOP-REAL 2) holds ( LT q1,q2,p1,p2 iff ( LE q1,q2,p1,p2 & q1 <> q2 ) ); theorem :: JORDAN3:27 for p1, p2, q1, q2 being Point of (TOP-REAL 2) st LE q1,q2,p1,p2 & LE q2,q1,p1,p2 holds q1 = q2 proof let p1, p2, q1, q2 be Point of (TOP-REAL 2); ::_thesis: ( LE q1,q2,p1,p2 & LE q2,q1,p1,p2 implies q1 = q2 ) assume that A1: LE q1,q2,p1,p2 and A2: LE q2,q1,p1,p2 ; ::_thesis: q1 = q2 q1 in LSeg (p1,p2) by A1, Def5; then consider r1 being Real such that A3: q1 = ((1 - r1) * p1) + (r1 * p2) and A4: 0 <= r1 and A5: r1 <= 1 ; q2 in LSeg (p1,p2) by A1, Def5; then consider r2 being Real such that A6: q2 = ((1 - r2) * p1) + (r2 * p2) and A7: 0 <= r2 and A8: r2 <= 1 ; A9: r2 <= r1 by A2, A3, A4, A5, A6, A8, Def5; r1 <= r2 by A1, A3, A5, A6, A7, A8, Def5; then r1 = r2 by A9, XXREAL_0:1; hence q1 = q2 by A3, A6; ::_thesis: verum end; theorem Th28: :: JORDAN3:28 for p1, p2, q1, q2 being Point of (TOP-REAL 2) st q1 in LSeg (p1,p2) & q2 in LSeg (p1,p2) & p1 <> p2 holds ( ( LE q1,q2,p1,p2 or LT q2,q1,p1,p2 ) & ( not LE q1,q2,p1,p2 or not LT q2,q1,p1,p2 ) ) proof let p1, p2, q1, q2 be Point of (TOP-REAL 2); ::_thesis: ( q1 in LSeg (p1,p2) & q2 in LSeg (p1,p2) & p1 <> p2 implies ( ( LE q1,q2,p1,p2 or LT q2,q1,p1,p2 ) & ( not LE q1,q2,p1,p2 or not LT q2,q1,p1,p2 ) ) ) assume that A1: q1 in LSeg (p1,p2) and A2: q2 in LSeg (p1,p2) and A3: p1 <> p2 ; ::_thesis: ( ( LE q1,q2,p1,p2 or LT q2,q1,p1,p2 ) & ( not LE q1,q2,p1,p2 or not LT q2,q1,p1,p2 ) ) consider r1 being Real such that A4: q1 = ((1 - r1) * p1) + (r1 * p2) and A5: 0 <= r1 and A6: r1 <= 1 by A1; consider r2 being Real such that A7: q2 = ((1 - r2) * p1) + (r2 * p2) and A8: 0 <= r2 and A9: r2 <= 1 by A2; A10: now__::_thesis:_(_(_r1_<=_r2_&_(_LE_q1,q2,p1,p2_or_LT_q2,q1,p1,p2_)_)_or_(_r1_>_r2_&_(_LE_q1,q2,p1,p2_or_LT_q2,q1,p1,p2_)_)_) percases ( r1 <= r2 or r1 > r2 ) ; caseA11: r1 <= r2 ; ::_thesis: ( LE q1,q2,p1,p2 or LT q2,q1,p1,p2 ) for s1, s2 being Real st 0 <= s1 & s1 <= 1 & q1 = ((1 - s1) * p1) + (s1 * p2) & 0 <= s2 & s2 <= 1 & q2 = ((1 - s2) * p1) + (s2 * p2) holds s1 <= s2 proof let s1, s2 be Real; ::_thesis: ( 0 <= s1 & s1 <= 1 & q1 = ((1 - s1) * p1) + (s1 * p2) & 0 <= s2 & s2 <= 1 & q2 = ((1 - s2) * p1) + (s2 * p2) implies s1 <= s2 ) assume that 0 <= s1 and s1 <= 1 and A12: q1 = ((1 - s1) * p1) + (s1 * p2) and 0 <= s2 and s2 <= 1 and A13: q2 = ((1 - s2) * p1) + (s2 * p2) ; ::_thesis: s1 <= s2 ((1 - s2) * p1) + ((s2 * p2) - (s2 * p2)) = (((1 - r2) * p1) + (r2 * p2)) - (s2 * p2) by A7, A13, EUCLID:45; then ((1 - s2) * p1) + ((s2 * p2) - (s2 * p2)) = ((1 - r2) * p1) + ((r2 * p2) - (s2 * p2)) by EUCLID:45; then ((1 - s2) * p1) + (0. (TOP-REAL 2)) = ((1 - r2) * p1) + ((r2 * p2) - (s2 * p2)) by EUCLID:42; then (1 - s2) * p1 = ((1 - r2) * p1) + ((r2 * p2) - (s2 * p2)) by EUCLID:27; then (1 - s2) * p1 = ((1 - r2) * p1) + ((r2 - s2) * p2) by EUCLID:50; then ((1 - s2) * p1) - ((1 - r2) * p1) = ((r2 - s2) * p2) + (((1 - r2) * p1) - ((1 - r2) * p1)) by EUCLID:45; then ((1 - s2) * p1) - ((1 - r2) * p1) = ((r2 - s2) * p2) + (0. (TOP-REAL 2)) by EUCLID:42; then ((1 - s2) * p1) - ((1 - r2) * p1) = (r2 - s2) * p2 by EUCLID:27; then ((1 - s2) - (1 - r2)) * p1 = (r2 - s2) * p2 by EUCLID:50; then A14: ( r2 - s2 = 0 or p1 = p2 ) by EUCLID:34; ((1 - s1) * p1) + ((s1 * p2) - (s1 * p2)) = (((1 - r1) * p1) + (r1 * p2)) - (s1 * p2) by A4, A12, EUCLID:45; then ((1 - s1) * p1) + ((s1 * p2) - (s1 * p2)) = ((1 - r1) * p1) + ((r1 * p2) - (s1 * p2)) by EUCLID:45; then ((1 - s1) * p1) + (0. (TOP-REAL 2)) = ((1 - r1) * p1) + ((r1 * p2) - (s1 * p2)) by EUCLID:42; then (1 - s1) * p1 = ((1 - r1) * p1) + ((r1 * p2) - (s1 * p2)) by EUCLID:27; then (1 - s1) * p1 = ((1 - r1) * p1) + ((r1 - s1) * p2) by EUCLID:50; then ((1 - s1) * p1) - ((1 - r1) * p1) = ((r1 - s1) * p2) + (((1 - r1) * p1) - ((1 - r1) * p1)) by EUCLID:45; then ((1 - s1) * p1) - ((1 - r1) * p1) = ((r1 - s1) * p2) + (0. (TOP-REAL 2)) by EUCLID:42; then ((1 - s1) * p1) - ((1 - r1) * p1) = (r1 - s1) * p2 by EUCLID:27; then ((1 - s1) - (1 - r1)) * p1 = (r1 - s1) * p2 by EUCLID:50; then ( r1 - s1 = 0 or p1 = p2 ) by EUCLID:34; hence s1 <= s2 by A3, A11, A14; ::_thesis: verum end; hence ( LE q1,q2,p1,p2 or LT q2,q1,p1,p2 ) by A1, A2, Def5; ::_thesis: verum end; caseA15: r1 > r2 ; ::_thesis: ( LE q1,q2,p1,p2 or LT q2,q1,p1,p2 ) A16: for s2, s1 being Real st 0 <= s2 & s2 <= 1 & q2 = ((1 - s2) * p1) + (s2 * p2) & 0 <= s1 & s1 <= 1 & q1 = ((1 - s1) * p1) + (s1 * p2) holds s1 >= s2 proof let s2, s1 be Real; ::_thesis: ( 0 <= s2 & s2 <= 1 & q2 = ((1 - s2) * p1) + (s2 * p2) & 0 <= s1 & s1 <= 1 & q1 = ((1 - s1) * p1) + (s1 * p2) implies s1 >= s2 ) assume that 0 <= s2 and s2 <= 1 and A17: q2 = ((1 - s2) * p1) + (s2 * p2) and 0 <= s1 and s1 <= 1 and A18: q1 = ((1 - s1) * p1) + (s1 * p2) ; ::_thesis: s1 >= s2 ((1 - s1) * p1) + ((s1 * p2) - (s1 * p2)) = (((1 - r1) * p1) + (r1 * p2)) - (s1 * p2) by A4, A18, EUCLID:45; then ((1 - s1) * p1) + ((s1 * p2) - (s1 * p2)) = ((1 - r1) * p1) + ((r1 * p2) - (s1 * p2)) by EUCLID:45; then ((1 - s1) * p1) + (0. (TOP-REAL 2)) = ((1 - r1) * p1) + ((r1 * p2) - (s1 * p2)) by EUCLID:42; then (1 - s1) * p1 = ((1 - r1) * p1) + ((r1 * p2) - (s1 * p2)) by EUCLID:27; then (1 - s1) * p1 = ((1 - r1) * p1) + ((r1 - s1) * p2) by EUCLID:50; then ((1 - s1) * p1) - ((1 - r1) * p1) = ((r1 - s1) * p2) + (((1 - r1) * p1) - ((1 - r1) * p1)) by EUCLID:45; then ((1 - s1) * p1) - ((1 - r1) * p1) = ((r1 - s1) * p2) + (0. (TOP-REAL 2)) by EUCLID:42; then ((1 - s1) * p1) - ((1 - r1) * p1) = (r1 - s1) * p2 by EUCLID:27; then ((1 - s1) - (1 - r1)) * p1 = (r1 - s1) * p2 by EUCLID:50; then A19: ( r1 - s1 = 0 or p1 = p2 ) by EUCLID:34; ((1 - s2) * p1) + ((s2 * p2) - (s2 * p2)) = (((1 - r2) * p1) + (r2 * p2)) - (s2 * p2) by A7, A17, EUCLID:45; then ((1 - s2) * p1) + ((s2 * p2) - (s2 * p2)) = ((1 - r2) * p1) + ((r2 * p2) - (s2 * p2)) by EUCLID:45; then ((1 - s2) * p1) + (0. (TOP-REAL 2)) = ((1 - r2) * p1) + ((r2 * p2) - (s2 * p2)) by EUCLID:42; then (1 - s2) * p1 = ((1 - r2) * p1) + ((r2 * p2) - (s2 * p2)) by EUCLID:27 .= ((r2 - s2) * p2) + ((1 - r2) * p1) by EUCLID:50 ; then ((1 - s2) * p1) - ((1 - r2) * p1) = ((r2 - s2) * p2) + (((1 - r2) * p1) - ((1 - r2) * p1)) by EUCLID:45; then ((1 - s2) * p1) - ((1 - r2) * p1) = ((r2 - s2) * p2) + (0. (TOP-REAL 2)) by EUCLID:42; then ((1 - s2) * p1) - ((1 - r2) * p1) = (r2 - s2) * p2 by EUCLID:27; then ((1 - s2) - (1 - r2)) * p1 = (r2 - s2) * p2 by EUCLID:50; then ( r2 - s2 = 0 or p1 = p2 ) by EUCLID:34; hence s1 >= s2 by A3, A15, A19; ::_thesis: verum end; then A20: LE q2,q1,p1,p2 by A1, A2, Def5; q1 <> q2 by A4, A6, A7, A8, A9, A15, A16; hence ( LE q1,q2,p1,p2 or LT q2,q1,p1,p2 ) by A20, Def6; ::_thesis: verum end; end; end; now__::_thesis:_(_LE_q1,q2,p1,p2_implies_not_LT_q2,q1,p1,p2_) assume that A21: LE q1,q2,p1,p2 and A22: LT q2,q1,p1,p2 ; ::_thesis: contradiction LE q2,q1,p1,p2 by A22, Def6; then A23: r2 <= r1 by A4, A5, A6, A7, A9, Def5; r1 <= r2 by A4, A6, A7, A8, A9, A21, Def5; then r1 = r2 by A23, XXREAL_0:1; hence contradiction by A4, A7, A22, Def6; ::_thesis: verum end; hence ( ( LE q1,q2,p1,p2 or LT q2,q1,p1,p2 ) & ( not LE q1,q2,p1,p2 or not LT q2,q1,p1,p2 ) ) by A10; ::_thesis: verum end; theorem Th29: :: JORDAN3:29 for f being FinSequence of (TOP-REAL 2) for p, q being Point of (TOP-REAL 2) st p in L~ f & q in L~ f & Index (p,f) < Index (q,f) holds q in L~ (L_Cut (f,p)) proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p, q being Point of (TOP-REAL 2) st p in L~ f & q in L~ f & Index (p,f) < Index (q,f) holds q in L~ (L_Cut (f,p)) let p, q be Point of (TOP-REAL 2); ::_thesis: ( p in L~ f & q in L~ f & Index (p,f) < Index (q,f) implies q in L~ (L_Cut (f,p)) ) assume that A1: p in L~ f and A2: q in L~ f and A3: Index (p,f) < Index (q,f) ; ::_thesis: q in L~ (L_Cut (f,p)) A4: Index (q,f) < len f by A2, Th8; then A5: (Index (q,f)) - (Index (p,f)) <= (len f) - (Index (p,f)) by XREAL_1:9; then A6: ((Index (q,f)) - (Index (p,f))) + 1 <= ((len f) - (Index (p,f))) + 1 by XREAL_1:6; (Index (q,f)) - (Index (p,f)) <= (((len f) - (Index (p,f))) - 1) + 1 by A4, XREAL_1:9; then A7: (Index (q,f)) -' (Index (p,f)) <= ((len f) - ((Index (p,f)) + 1)) + 1 by A3, XREAL_1:233; set i1 = ((Index (q,f)) -' (Index (p,f))) + 1; A8: 1 <= (Index (p,f)) + 1 by NAT_1:11; A9: (Index (p,f)) + 1 <= Index (q,f) by A3, NAT_1:13; then A10: ((Index (p,f)) + 1) - (Index (p,f)) <= (Index (q,f)) - (Index (p,f)) by XREAL_1:9; then A11: 1 <= (Index (q,f)) -' (Index (p,f)) by XREAL_0:def_2; then A12: 1 <= ((Index (q,f)) -' (Index (p,f))) + 1 by NAT_D:48; 1 + 1 <= ((Index (q,f)) -' (Index (p,f))) + 1 by A11, XREAL_1:6; then A13: 1 < ((Index (q,f)) -' (Index (p,f))) + 1 by XXREAL_0:2; then A14: len <*p*> < ((Index (q,f)) -' (Index (p,f))) + 1 by FINSEQ_1:40; then A15: len <*p*> < (((Index (q,f)) -' (Index (p,f))) + 1) + 1 by NAT_1:13; A16: (Index (p,f)) + 1 <= len f by A4, A9, XXREAL_0:2; A17: 1 <= Index (q,f) by A2, Th8; then 1 < len f by A4, XXREAL_0:2; then len (mid (f,((Index (p,f)) + 1),(len f))) = ((len f) -' ((Index (p,f)) + 1)) + 1 by A8, A16, FINSEQ_6:118; then A18: (len <*p*>) + (len (mid (f,((Index (p,f)) + 1),(len f)))) = 1 + (((len f) -' ((Index (p,f)) + 1)) + 1) by FINSEQ_1:40 .= 1 + (((len f) - ((Index (p,f)) + 1)) + 1) by A4, A9, XREAL_1:233, XXREAL_0:2 .= ((len f) - (Index (p,f))) + 1 ; then A19: ((Index (q,f)) -' (Index (p,f))) + 1 <= (len <*p*>) + (len (mid (f,((Index (p,f)) + 1),(len f)))) by A3, A6, XREAL_1:233; percases ( p = f . ((Index (p,f)) + 1) or p <> f . ((Index (p,f)) + 1) ) ; supposeA20: p = f . ((Index (p,f)) + 1) ; ::_thesis: q in L~ (L_Cut (f,p)) then A21: len (L_Cut (f,p)) = (len f) - (Index (p,f)) by A1, Th26; then len (L_Cut (f,p)) >= (Index (q,f)) -' (Index (p,f)) by A3, A5, XREAL_1:233; then (L_Cut (f,p)) /. ((Index (q,f)) -' (Index (p,f))) = (L_Cut (f,p)) . ((Index (q,f)) -' (Index (p,f))) by A11, FINSEQ_4:15 .= (mid (f,((Index (p,f)) + 1),(len f))) . ((Index (q,f)) -' (Index (p,f))) by A20, Def3 .= f . ((((Index (p,f)) + 1) + ((Index (q,f)) -' (Index (p,f)))) - 1) by A11, A8, A16, A7, FINSEQ_6:122 .= f . ((((Index (p,f)) + 1) + ((Index (q,f)) - (Index (p,f)))) - 1) by A3, XREAL_1:233 .= f . (Index (q,f)) ; then A22: (L_Cut (f,p)) /. ((Index (q,f)) -' (Index (p,f))) = f /. (Index (q,f)) by A2, A4, Th8, FINSEQ_4:15; 1 <= Index (q,f) by A2, Th8; then A23: 1 <= (Index (q,f)) + 1 by NAT_D:48; A24: q in LSeg (f,(Index (q,f))) by A2, Th9; A25: Index (q,f) < len f by A2, Th8; then A26: (Index (q,f)) + 1 <= len f by NAT_1:13; then A27: ((Index (q,f)) + 1) - (Index (p,f)) <= (len f) - (Index (p,f)) by XREAL_1:9; then ((Index (q,f)) - (Index (p,f))) + 1 <= (len f) - (Index (p,f)) ; then A28: ((Index (q,f)) -' (Index (p,f))) + 1 <= ((len f) - ((Index (p,f)) + 1)) + 1 by A3, XREAL_1:233; ((Index (q,f)) + 1) - (Index (p,f)) <= (len f) - (Index (p,f)) by A26, XREAL_1:9; then ((Index (q,f)) - (Index (p,f))) + 1 <= (len f) - (Index (p,f)) ; then A29: ((Index (q,f)) -' (Index (p,f))) + 1 <= len (L_Cut (f,p)) by A10, A21, XREAL_0:def_2; A30: (Index (q,f)) + 1 <= len f by A25, NAT_1:13; ((Index (q,f)) - (Index (p,f))) + 1 <= (len f) - (Index (p,f)) by A27; then len (L_Cut (f,p)) >= ((Index (q,f)) -' (Index (p,f))) + 1 by A3, A21, XREAL_1:233; then (L_Cut (f,p)) /. (((Index (q,f)) -' (Index (p,f))) + 1) = (L_Cut (f,p)) . (((Index (q,f)) -' (Index (p,f))) + 1) by A13, FINSEQ_4:15 .= (mid (f,((Index (p,f)) + 1),(len f))) . (((Index (q,f)) -' (Index (p,f))) + 1) by A20, Def3 .= f . ((((Index (p,f)) + 1) + (((Index (q,f)) -' (Index (p,f))) + 1)) - 1) by A12, A8, A16, A28, FINSEQ_6:122 .= f . ((((Index (p,f)) + 1) + (((Index (q,f)) - (Index (p,f))) + 1)) - 1) by A3, XREAL_1:233 .= f /. ((Index (q,f)) + 1) by A23, A30, FINSEQ_4:15 ; then q in LSeg (((L_Cut (f,p)) /. ((Index (q,f)) -' (Index (p,f)))),((L_Cut (f,p)) /. (((Index (q,f)) -' (Index (p,f))) + 1))) by A17, A22, A26, A24, TOPREAL1:def_3; hence q in L~ (L_Cut (f,p)) by A11, A29, SPPOL_2:15; ::_thesis: verum end; supposeA31: p <> f . ((Index (p,f)) + 1) ; ::_thesis: q in L~ (L_Cut (f,p)) A32: len (L_Cut (f,p)) = ((len f) - (Index (p,f))) + 1 by A1, A31, Th26; then len (L_Cut (f,p)) >= ((Index (q,f)) -' (Index (p,f))) + 1 by A3, A6, XREAL_1:233; then (L_Cut (f,p)) /. (((Index (q,f)) -' (Index (p,f))) + 1) = (L_Cut (f,p)) . (((Index (q,f)) -' (Index (p,f))) + 1) by FINSEQ_4:15, NAT_1:11 .= (<*p*> ^ (mid (f,((Index (p,f)) + 1),(len f)))) . (((Index (q,f)) -' (Index (p,f))) + 1) by A31, Def3 .= (mid (f,((Index (p,f)) + 1),(len f))) . ((((Index (q,f)) -' (Index (p,f))) + 1) - (len <*p*>)) by A14, A19, FINSEQ_6:108 .= (mid (f,((Index (p,f)) + 1),(len f))) . ((((Index (q,f)) -' (Index (p,f))) + 1) - 1) by FINSEQ_1:40 .= f . ((((Index (p,f)) + 1) + ((Index (q,f)) -' (Index (p,f)))) - 1) by A11, A8, A16, A7, FINSEQ_6:122 .= f . ((((Index (p,f)) + 1) + ((Index (q,f)) - (Index (p,f)))) - 1) by A3, XREAL_1:233 .= f . (Index (q,f)) ; then A33: (L_Cut (f,p)) /. (((Index (q,f)) -' (Index (p,f))) + 1) = f /. (Index (q,f)) by A2, A4, Th8, FINSEQ_4:15; A34: Index (q,f) < len f by A2, Th8; then A35: (Index (q,f)) + 1 <= len f by NAT_1:13; then A36: ((Index (q,f)) + 1) - (Index (p,f)) <= (len f) - (Index (p,f)) by XREAL_1:9; then ((Index (q,f)) - (Index (p,f))) + 1 <= (len f) - (Index (p,f)) ; then A37: ((Index (q,f)) -' (Index (p,f))) + 1 <= ((len f) - ((Index (p,f)) + 1)) + 1 by A3, XREAL_1:233; ((Index (q,f)) + 1) - (Index (p,f)) <= (len f) - (Index (p,f)) by A35, XREAL_1:9; then ((Index (q,f)) - (Index (p,f))) + 1 <= (len f) - (Index (p,f)) ; then ((Index (q,f)) -' (Index (p,f))) + 1 <= (len f) - (Index (p,f)) by A10, XREAL_0:def_2; then A38: (((Index (q,f)) -' (Index (p,f))) + 1) + 1 <= len (L_Cut (f,p)) by A32, XREAL_1:6; 1 <= Index (q,f) by A2, Th8; then A39: 1 <= (Index (q,f)) + 1 by NAT_D:48; A40: q in LSeg (f,(Index (q,f))) by A2, Th9; A41: (Index (q,f)) + 1 <= len f by A34, NAT_1:13; A42: (((Index (q,f)) - (Index (p,f))) + 1) + 1 <= ((len f) - (Index (p,f))) + 1 by A36, XREAL_1:6; then A43: (((Index (q,f)) -' (Index (p,f))) + 1) + 1 <= (len <*p*>) + (len (mid (f,((Index (p,f)) + 1),(len f)))) by A3, A18, XREAL_1:233; len (L_Cut (f,p)) >= (((Index (q,f)) -' (Index (p,f))) + 1) + 1 by A3, A32, A42, XREAL_1:233; then (L_Cut (f,p)) /. ((((Index (q,f)) -' (Index (p,f))) + 1) + 1) = (L_Cut (f,p)) . ((((Index (q,f)) -' (Index (p,f))) + 1) + 1) by FINSEQ_4:15, NAT_1:11 .= (<*p*> ^ (mid (f,((Index (p,f)) + 1),(len f)))) . ((((Index (q,f)) -' (Index (p,f))) + 1) + 1) by A31, Def3 .= (mid (f,((Index (p,f)) + 1),(len f))) . (((((Index (q,f)) -' (Index (p,f))) + 1) + 1) - (len <*p*>)) by A15, A43, FINSEQ_6:108 .= (mid (f,((Index (p,f)) + 1),(len f))) . (((((Index (q,f)) -' (Index (p,f))) + 1) + 1) - 1) by FINSEQ_1:40 .= f . ((((Index (p,f)) + 1) + (((Index (q,f)) -' (Index (p,f))) + 1)) - 1) by A12, A8, A16, A37, FINSEQ_6:122 .= f . ((((Index (p,f)) + 1) + (((Index (q,f)) - (Index (p,f))) + 1)) - 1) by A3, XREAL_1:233 .= f /. ((Index (q,f)) + 1) by A39, A41, FINSEQ_4:15 ; then q in LSeg (((L_Cut (f,p)) /. (((Index (q,f)) -' (Index (p,f))) + 1)),((L_Cut (f,p)) /. ((((Index (q,f)) -' (Index (p,f))) + 1) + 1))) by A17, A33, A35, A40, TOPREAL1:def_3; hence q in L~ (L_Cut (f,p)) by A38, NAT_1:11, SPPOL_2:15; ::_thesis: verum end; end; end; theorem Th30: :: JORDAN3:30 for p, q, p1, p2 being Point of (TOP-REAL 2) st LE p,q,p1,p2 holds ( q in LSeg (p,p2) & p in LSeg (p1,q) ) proof let p, q, p1, p2 be Point of (TOP-REAL 2); ::_thesis: ( LE p,q,p1,p2 implies ( q in LSeg (p,p2) & p in LSeg (p1,q) ) ) assume A1: LE p,q,p1,p2 ; ::_thesis: ( q in LSeg (p,p2) & p in LSeg (p1,q) ) then p in LSeg (p1,p2) by Def5; then consider s1 being Real such that A2: p = ((1 - s1) * p1) + (s1 * p2) and A3: 0 <= s1 and A4: s1 <= 1 ; q in LSeg (p1,p2) by A1, Def5; then consider s2 being Real such that A5: q = ((1 - s2) * p1) + (s2 * p2) and A6: 0 <= s2 and A7: s2 <= 1 ; A8: s1 <= s2 by A1, A2, A4, A5, A6, A7, Def5; A9: 1 - s1 >= 0 by A4, XREAL_1:48; A10: now__::_thesis:_(_(_1_-_s1_<>_0_&_q_in_LSeg_(p,p2)_)_or_(_1_-_s1_=_0_&_q_in_LSeg_(p,p2)_)_) percases ( 1 - s1 <> 0 or 1 - s1 = 0 ) ; caseA11: 1 - s1 <> 0 ; ::_thesis: q in LSeg (p,p2) set s = (s2 - s1) / (1 - s1); A12: (1 - s1) * ((1 - s2) / (1 - s1)) = 1 - s2 by A11, XCMPLX_1:87; A13: (1 - s1) * ((s2 - s1) / (1 - s1)) = s2 - s1 by A11, XCMPLX_1:87; 1 - ((s2 - s1) / (1 - s1)) = ((1 * (1 - s1)) - (s2 - s1)) / (1 - s1) by A11, XCMPLX_1:127 .= (((1 - s1) + s1) - s2) / (1 - s1) ; then (1 - s1) * (((1 - ((s2 - s1) / (1 - s1))) * p) + (((s2 - s1) / (1 - s1)) * p2)) = ((1 - s1) * (((1 - s2) / (1 - s1)) * (((1 - s1) * p1) + (s1 * p2)))) + ((1 - s1) * (((s2 - s1) / (1 - s1)) * p2)) by A2, EUCLID:32 .= (((1 - s1) * ((1 - s2) / (1 - s1))) * (((1 - s1) * p1) + (s1 * p2))) + ((1 - s1) * (((s2 - s1) / (1 - s1)) * p2)) by EUCLID:30 .= ((1 - s2) * (((1 - s1) * p1) + (s1 * p2))) + (((1 - s1) * ((s2 - s1) / (1 - s1))) * p2) by A12, EUCLID:30 .= (((1 - s2) * ((1 - s1) * p1)) + ((1 - s2) * (s1 * p2))) + ((s2 - s1) * p2) by A13, EUCLID:32 .= ((((1 - s2) * (1 - s1)) * p1) + ((1 - s2) * (s1 * p2))) + ((s2 - s1) * p2) by EUCLID:30 .= ((((1 - s2) * (1 - s1)) * p1) + (((1 - s2) * s1) * p2)) + ((s2 - s1) * p2) by EUCLID:30 .= (((1 - s2) * (1 - s1)) * p1) + ((((1 - s2) * s1) * p2) + ((s2 - s1) * p2)) by EUCLID:26 .= (((1 - s2) * (1 - s1)) * p1) + ((((1 * s1) - (s2 * s1)) + (s2 - s1)) * p2) by EUCLID:33 .= ((1 - s1) * ((1 - s2) * p1)) + (((1 - s1) * s2) * p2) by EUCLID:30 .= ((1 - s1) * ((1 - s2) * p1)) + ((1 - s1) * (s2 * p2)) by EUCLID:30 .= (1 - s1) * q by A5, EUCLID:32 ; then A14: q = ((1 - ((s2 - s1) / (1 - s1))) * p) + (((s2 - s1) / (1 - s1)) * p2) by A11, EUCLID:34; 1 - s1 >= s2 - s1 by A7, XREAL_1:9; then (1 - s1) / (1 - s1) >= (s2 - s1) / (1 - s1) by A9, XREAL_1:72; then A15: 1 >= (s2 - s1) / (1 - s1) by A11, XCMPLX_1:60; s2 - s1 >= 0 by A8, XREAL_1:48; hence q in LSeg (p,p2) by A9, A15, A14; ::_thesis: verum end; case 1 - s1 = 0 ; ::_thesis: q in LSeg (p,p2) then s2 = 1 by A7, A8, XXREAL_0:1; then q = (0. (TOP-REAL 2)) + (1 * p2) by A5, EUCLID:29 .= (0. (TOP-REAL 2)) + p2 by EUCLID:29 .= p2 by EUCLID:27 ; hence q in LSeg (p,p2) by RLTOPSP1:68; ::_thesis: verum end; end; end; now__::_thesis:_(_(_s2_<>_0_&_p_in_LSeg_(p1,q)_)_or_(_s2_=_0_&_p_in_LSeg_(p1,q)_)_) percases ( s2 <> 0 or s2 = 0 ) ; caseA16: s2 <> 0 ; ::_thesis: p in LSeg (p1,q) set s = s1 / s2; s2 / s2 >= s1 / s2 by A6, A8, XREAL_1:72; then A17: 1 >= s1 / s2 by A16, XCMPLX_1:60; A18: (s2 - s1) + (s1 * (1 - s2)) = s2 * (1 - s1) ; A19: s2 * (s1 / s2) = s1 by A16, XCMPLX_1:87; A20: s2 * ((s2 - s1) / s2) = s2 - s1 by A16, XCMPLX_1:87; s2 * (((1 - (s1 / s2)) * p1) + ((s1 / s2) * q)) = s2 * (((((1 * s2) - s1) / s2) * p1) + ((s1 / s2) * (((1 - s2) * p1) + (s2 * p2)))) by A5, A16, XCMPLX_1:127 .= (s2 * (((s2 - s1) / s2) * p1)) + (s2 * ((s1 / s2) * (((1 - s2) * p1) + (s2 * p2)))) by EUCLID:32 .= ((s2 * ((s2 - s1) / s2)) * p1) + (s2 * ((s1 / s2) * (((1 - s2) * p1) + (s2 * p2)))) by EUCLID:30 .= ((s2 - s1) * p1) + ((s2 * (s1 / s2)) * (((1 - s2) * p1) + (s2 * p2))) by A20, EUCLID:30 .= ((s2 - s1) * p1) + ((s1 * ((1 - s2) * p1)) + (s1 * (s2 * p2))) by A19, EUCLID:32 .= ((s2 - s1) * p1) + (((s1 * (1 - s2)) * p1) + (s1 * (s2 * p2))) by EUCLID:30 .= ((s2 - s1) * p1) + (((s1 * (1 - s2)) * p1) + ((s1 * s2) * p2)) by EUCLID:30 .= (((s2 - s1) * p1) + ((s1 * (1 - s2)) * p1)) + ((s1 * s2) * p2) by EUCLID:26 .= (((s2 - s1) + (s1 * (1 - s2))) * p1) + ((s1 * s2) * p2) by EUCLID:33 .= (s2 * ((1 - s1) * p1)) + ((s2 * s1) * p2) by A18, EUCLID:30 .= (s2 * ((1 - s1) * p1)) + (s2 * (s1 * p2)) by EUCLID:30 .= s2 * p by A2, EUCLID:32 ; then p = ((1 - (s1 / s2)) * p1) + ((s1 / s2) * q) by A16, EUCLID:34; hence p in LSeg (p1,q) by A3, A6, A17; ::_thesis: verum end; case s2 = 0 ; ::_thesis: p in LSeg (p1,q) then s1 = 0 by A1, A2, A3, A4, A5, Def5; then p = (1 * p1) + (0. (TOP-REAL 2)) by A2, EUCLID:29 .= p1 + (0. (TOP-REAL 2)) by EUCLID:29 .= p1 by EUCLID:27 ; hence p in LSeg (p1,q) by RLTOPSP1:68; ::_thesis: verum end; end; end; hence ( q in LSeg (p,p2) & p in LSeg (p1,q) ) by A10; ::_thesis: verum end; theorem Th31: :: JORDAN3:31 for f being FinSequence of (TOP-REAL 2) for p, q being Point of (TOP-REAL 2) st p in L~ f & q in L~ f & p <> q & Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) holds q in L~ (L_Cut (f,p)) proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p, q being Point of (TOP-REAL 2) st p in L~ f & q in L~ f & p <> q & Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) holds q in L~ (L_Cut (f,p)) let p, q be Point of (TOP-REAL 2); ::_thesis: ( p in L~ f & q in L~ f & p <> q & Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) implies q in L~ (L_Cut (f,p)) ) assume that A1: p in L~ f and A2: q in L~ f and A3: p <> q and A4: Index (p,f) = Index (q,f) and A5: LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ; ::_thesis: q in L~ (L_Cut (f,p)) A6: (Index (q,f)) -' (Index (p,f)) = (Index (q,f)) - (Index (p,f)) by A4, XREAL_1:233 .= 0 by A4 ; Index (q,f) < len f by A2, Th8; then A7: (Index (q,f)) + 1 <= len f by NAT_1:13; A8: now__::_thesis:_not_p_=_f_._((Index_(p,f))_+_1) q in LSeg ((f /. (Index (p,f))),(f /. ((Index (p,f)) + 1))) by A5, Def5; then consider r being Real such that A9: q = ((1 - r) * (f /. (Index (p,f)))) + (r * (f /. ((Index (p,f)) + 1))) and A10: 0 <= r and A11: r <= 1 ; A12: p = 1 * p by EUCLID:29 .= (0. (TOP-REAL 2)) + (1 * p) by EUCLID:27 .= ((1 - 1) * (f /. (Index (p,f)))) + (1 * p) by EUCLID:29 ; assume A13: p = f . ((Index (p,f)) + 1) ; ::_thesis: contradiction then p = f /. ((Index (p,f)) + 1) by A4, A7, FINSEQ_4:15, NAT_1:11; then 1 <= r by A5, A9, A10, A12, Def5; then r = 1 by A11, XXREAL_0:1; hence contradiction by A3, A4, A7, A13, A9, A12, FINSEQ_4:15, NAT_1:11; ::_thesis: verum end; then A14: len (L_Cut (f,p)) = ((len f) - (Index (p,f))) + 1 by A1, Th26; 1 <= Index (q,f) by A2, Th8; then A15: 1 <= (Index (q,f)) + 1 by NAT_D:48; 1 < (0 + 1) + 1 ; then A16: len <*p*> < (((Index (q,f)) -' (Index (p,f))) + 1) + 1 by A6, FINSEQ_1:40; A17: Index (q,f) < len f by A2, Th8; then A18: (Index (q,f)) + 1 <= len f by NAT_1:13; then A19: ((Index (q,f)) + 1) - (Index (p,f)) <= (len f) - (Index (p,f)) by XREAL_1:9; then A20: (((Index (q,f)) - (Index (p,f))) + 1) + 1 <= ((len f) - (Index (p,f))) + 1 by XREAL_1:6; ((Index (q,f)) - (Index (p,f))) + 1 <= (len f) - (Index (p,f)) by A19; then A21: ((Index (q,f)) -' (Index (p,f))) + 1 <= ((len f) - ((Index (p,f)) + 1)) + 1 by A4, XREAL_1:233; A22: 1 <= (Index (p,f)) + 1 by NAT_1:11; A23: Index (q,f) < len f by A2, Th8; then (Index (q,f)) - (Index (p,f)) <= (len f) - (Index (p,f)) by XREAL_1:9; then ((Index (q,f)) - (Index (p,f))) + 1 <= ((len f) - (Index (p,f))) + 1 by XREAL_1:6; then A24: (L_Cut (f,p)) /. (((Index (q,f)) -' (Index (p,f))) + 1) = (L_Cut (f,p)) . (((Index (q,f)) -' (Index (p,f))) + 1) by A4, A6, A14, FINSEQ_4:15 .= (<*p*> ^ (mid (f,((Index (p,f)) + 1),(len f)))) . (((Index (q,f)) -' (Index (p,f))) + 1) by A8, Def3 .= p by A6, FINSEQ_1:41 ; set i1 = ((Index (q,f)) -' (Index (p,f))) + 1; A25: (Index (q,f)) + 1 <= len f by A17, NAT_1:13; ((Index (q,f)) + 1) - (Index (p,f)) <= (len f) - (Index (p,f)) by A18, XREAL_1:9; then ((Index (q,f)) - (Index (p,f))) + 1 <= (len f) - (Index (p,f)) ; then ((Index (q,f)) -' (Index (p,f))) + 1 <= (len f) - (Index (p,f)) by A4, XREAL_0:def_2; then A26: (((Index (q,f)) -' (Index (p,f))) + 1) + 1 <= len (L_Cut (f,p)) by A14, XREAL_1:6; 1 <= Index (q,f) by A2, Th8; then 1 < len f by A23, XXREAL_0:2; then len (mid (f,((Index (p,f)) + 1),(len f))) = ((len f) -' ((Index (p,f)) + 1)) + 1 by A4, A7, A22, FINSEQ_6:118; then (len <*p*>) + (len (mid (f,((Index (p,f)) + 1),(len f)))) = 1 + (((len f) -' ((Index (p,f)) + 1)) + 1) by FINSEQ_1:40 .= 1 + (((len f) - ((Index (p,f)) + 1)) + 1) by A4, A7, XREAL_1:233 .= ((len f) - (Index (p,f))) + 1 ; then A27: (((Index (q,f)) -' (Index (p,f))) + 1) + 1 <= (len <*p*>) + (len (mid (f,((Index (p,f)) + 1),(len f)))) by A4, A20, XREAL_1:233; (L_Cut (f,p)) /. ((((Index (q,f)) -' (Index (p,f))) + 1) + 1) = (L_Cut (f,p)) . ((((Index (q,f)) -' (Index (p,f))) + 1) + 1) by A4, A6, A14, A20, FINSEQ_4:15 .= (<*p*> ^ (mid (f,((Index (p,f)) + 1),(len f)))) . ((((Index (q,f)) -' (Index (p,f))) + 1) + 1) by A8, Def3 .= (mid (f,((Index (p,f)) + 1),(len f))) . (((((Index (q,f)) -' (Index (p,f))) + 1) + 1) - (len <*p*>)) by A16, A27, FINSEQ_6:108 .= (mid (f,((Index (p,f)) + 1),(len f))) . (((((Index (q,f)) -' (Index (p,f))) + 1) + 1) - 1) by FINSEQ_1:40 .= f . ((((Index (p,f)) + 1) + (((Index (q,f)) - (Index (p,f))) + 1)) - 1) by A4, A7, A6, A22, A21, FINSEQ_6:122 .= f /. ((Index (q,f)) + 1) by A15, A25, FINSEQ_4:15 ; then q in LSeg (((L_Cut (f,p)) /. (((Index (q,f)) -' (Index (p,f))) + 1)),((L_Cut (f,p)) /. ((((Index (q,f)) -' (Index (p,f))) + 1) + 1))) by A4, A5, A24, Th30; hence q in L~ (L_Cut (f,p)) by A6, A26, SPPOL_2:15; ::_thesis: verum end; begin definition let f be FinSequence of (TOP-REAL 2); let p, q be Point of (TOP-REAL 2); func B_Cut (f,p,q) -> FinSequence of (TOP-REAL 2) equals :Def7: :: JORDAN3:def 7 R_Cut ((L_Cut (f,p)),q) if ( ( p in L~ f & q in L~ f & Index (p,f) < Index (q,f) ) or ( Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ) ) otherwise Rev (R_Cut ((L_Cut (f,q)),p)); correctness coherence ( ( ( ( p in L~ f & q in L~ f & Index (p,f) < Index (q,f) ) or ( Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ) ) implies R_Cut ((L_Cut (f,p)),q) is FinSequence of (TOP-REAL 2) ) & ( ( p in L~ f & q in L~ f & Index (p,f) < Index (q,f) ) or ( Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ) or Rev (R_Cut ((L_Cut (f,q)),p)) is FinSequence of (TOP-REAL 2) ) ); consistency for b1 being FinSequence of (TOP-REAL 2) holds verum; ; end; :: deftheorem Def7 defines B_Cut JORDAN3:def_7_:_ for f being FinSequence of (TOP-REAL 2) for p, q being Point of (TOP-REAL 2) holds ( ( ( ( p in L~ f & q in L~ f & Index (p,f) < Index (q,f) ) or ( Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ) ) implies B_Cut (f,p,q) = R_Cut ((L_Cut (f,p)),q) ) & ( ( p in L~ f & q in L~ f & Index (p,f) < Index (q,f) ) or ( Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ) or B_Cut (f,p,q) = Rev (R_Cut ((L_Cut (f,q)),p)) ) ); theorem Th32: :: JORDAN3:32 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & p <> f . 1 holds R_Cut (f,p) is_S-Seq_joining f /. 1,p proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & p <> f . 1 holds R_Cut (f,p) is_S-Seq_joining f /. 1,p let p be Point of (TOP-REAL 2); ::_thesis: ( f is being_S-Seq & p in L~ f & p <> f . 1 implies R_Cut (f,p) is_S-Seq_joining f /. 1,p ) assume that A1: f is being_S-Seq and A2: p in L~ f and A3: p <> f . 1 ; ::_thesis: R_Cut (f,p) is_S-Seq_joining f /. 1,p R_Cut (f,p) = (mid (f,1,(Index (p,f)))) ^ <*p*> by A3, Def4; hence R_Cut (f,p) is_S-Seq_joining f /. 1,p by A1, A2, A3, Th19; ::_thesis: verum end; theorem Th33: :: JORDAN3:33 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & p <> f . (len f) holds L_Cut (f,p) is_S-Seq_joining p,f /. (len f) proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & p <> f . (len f) holds L_Cut (f,p) is_S-Seq_joining p,f /. (len f) let p be Point of (TOP-REAL 2); ::_thesis: ( f is being_S-Seq & p in L~ f & p <> f . (len f) implies L_Cut (f,p) is_S-Seq_joining p,f /. (len f) ) assume that A1: f is being_S-Seq and A2: p in L~ f and A3: p <> f . (len f) ; ::_thesis: L_Cut (f,p) is_S-Seq_joining p,f /. (len f) A4: f <> {} by A2, CARD_1:27, TOPREAL1:22; A5: Rev f is being_S-Seq by A1; A6: p in L~ (Rev f) by A2, SPPOL_2:22; A7: p <> (Rev f) . 1 by A3, FINSEQ_5:62; L_Cut (f,p) = L_Cut ((Rev (Rev f)),p) .= Rev (R_Cut ((Rev f),p)) by A1, A6, Th22 ; then L_Cut (f,p) is_S-Seq_joining p,(Rev f) /. 1 by A5, A6, A7, Th15, Th32; hence L_Cut (f,p) is_S-Seq_joining p,f /. (len f) by A4, FINSEQ_5:65; ::_thesis: verum end; theorem Th34: :: JORDAN3:34 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & p <> f . (len f) holds L_Cut (f,p) is being_S-Seq proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & p <> f . (len f) holds L_Cut (f,p) is being_S-Seq let p be Point of (TOP-REAL 2); ::_thesis: ( f is being_S-Seq & p in L~ f & p <> f . (len f) implies L_Cut (f,p) is being_S-Seq ) assume that A1: f is being_S-Seq and A2: p in L~ f and A3: p <> f . (len f) ; ::_thesis: L_Cut (f,p) is being_S-Seq L_Cut (f,p) is_S-Seq_joining p,f /. (len f) by A1, A2, A3, Th33; hence L_Cut (f,p) is being_S-Seq by Def2; ::_thesis: verum end; theorem Th35: :: JORDAN3:35 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & p <> f . 1 holds R_Cut (f,p) is being_S-Seq proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & p <> f . 1 holds R_Cut (f,p) is being_S-Seq let p be Point of (TOP-REAL 2); ::_thesis: ( f is being_S-Seq & p in L~ f & p <> f . 1 implies R_Cut (f,p) is being_S-Seq ) assume that A1: f is being_S-Seq and A2: p in L~ f and A3: p <> f . 1 ; ::_thesis: R_Cut (f,p) is being_S-Seq R_Cut (f,p) is_S-Seq_joining f /. 1,p by A1, A2, A3, Th32; hence R_Cut (f,p) is being_S-Seq by Def2; ::_thesis: verum end; Lm1: for f being FinSequence of (TOP-REAL 2) for p, q being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & q in L~ f & p <> q & ( Index (p,f) < Index (q,f) or ( Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ) ) holds B_Cut (f,p,q) is_S-Seq_joining p,q proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p, q being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & q in L~ f & p <> q & ( Index (p,f) < Index (q,f) or ( Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ) ) holds B_Cut (f,p,q) is_S-Seq_joining p,q let p, q be Point of (TOP-REAL 2); ::_thesis: ( f is being_S-Seq & p in L~ f & q in L~ f & p <> q & ( Index (p,f) < Index (q,f) or ( Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ) ) implies B_Cut (f,p,q) is_S-Seq_joining p,q ) assume that A1: f is being_S-Seq and A2: p in L~ f and A3: q in L~ f and A4: p <> q ; ::_thesis: ( ( not Index (p,f) < Index (q,f) & not ( Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ) ) or B_Cut (f,p,q) is_S-Seq_joining p,q ) assume A5: ( Index (p,f) < Index (q,f) or ( Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ) ) ; ::_thesis: B_Cut (f,p,q) is_S-Seq_joining p,q then A6: B_Cut (f,p,q) = R_Cut ((L_Cut (f,p)),q) by A2, A3, Def7; Index (p,f) < len f by A2, Th8; then A7: (Index (p,f)) + 1 <= len f by NAT_1:13; A8: Index (q,f) < len f by A3, Th8; 1 <= Index (q,f) by A3, Th8; then A9: 1 < len f by A8, XXREAL_0:2; A10: now__::_thesis:_(_(_Index_(p,f)_<_Index_(q,f)_&_not_p_=_f_._(len_f)_)_or_(_Index_(p,f)_=_Index_(q,f)_&_LE_p,q,f_/._(Index_(p,f)),f_/._((Index_(p,f))_+_1)_&_not_p_=_f_._(len_f)_)_) percases ( Index (p,f) < Index (q,f) or ( Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ) ) by A5; caseA11: Index (p,f) < Index (q,f) ; ::_thesis: not p = f . (len f) assume A12: p = f . (len f) ; ::_thesis: contradiction (Index (p,f)) + 1 <= Index (q,f) by A11, NAT_1:13; then len f <= Index (q,f) by A1, A9, A12, Th12; hence contradiction by A3, Th8; ::_thesis: verum end; caseA13: ( Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ) ; ::_thesis: not p = f . (len f) A14: now__::_thesis:_not_p_=_f_._((Index_(p,f))_+_1) q in LSeg ((f /. (Index (p,f))),(f /. ((Index (p,f)) + 1))) by A13, Def5; then consider r being Real such that A15: q = ((1 - r) * (f /. (Index (p,f)))) + (r * (f /. ((Index (p,f)) + 1))) and A16: 0 <= r and A17: r <= 1 ; A18: p = 1 * p by EUCLID:29 .= (0. (TOP-REAL 2)) + (1 * p) by EUCLID:27 .= ((1 - 1) * (f /. (Index (p,f)))) + (1 * p) by EUCLID:29 ; assume A19: p = f . ((Index (p,f)) + 1) ; ::_thesis: contradiction then p = f /. ((Index (p,f)) + 1) by A7, FINSEQ_4:15, NAT_1:11; then 1 <= r by A13, A15, A16, A18, Def5; then r = 1 by A17, XXREAL_0:1; hence contradiction by A4, A7, A19, A15, A18, FINSEQ_4:15, NAT_1:11; ::_thesis: verum end; assume p = f . (len f) ; ::_thesis: contradiction hence contradiction by A1, A9, A14, Th12; ::_thesis: verum end; end; end; then L_Cut (f,p) is_S-Seq_joining p,f /. (len f) by A1, A2, Th33; then A20: (L_Cut (f,p)) . 1 = p by Def2; now__::_thesis:_(_(_Index_(p,f)_<_Index_(q,f)_&_ex_i1_being_Element_of_NAT_st_ (_1_<=_i1_&_i1_+_1_<=_len_(L_Cut_(f,p))_&_q_in_LSeg_((L_Cut_(f,p)),i1)_)_)_or_(_Index_(p,f)_=_Index_(q,f)_&_LE_p,q,f_/._(Index_(p,f)),f_/._((Index_(p,f))_+_1)_&_ex_i1_being_Element_of_NAT_st_ (_1_<=_i1_&_i1_+_1_<=_len_(L_Cut_(f,p))_&_q_in_LSeg_((L_Cut_(f,p)),i1)_)_)_) percases ( Index (p,f) < Index (q,f) or ( Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ) ) by A5; case Index (p,f) < Index (q,f) ; ::_thesis: ex i1 being Element of NAT st ( 1 <= i1 & i1 + 1 <= len (L_Cut (f,p)) & q in LSeg ((L_Cut (f,p)),i1) ) then q in L~ (L_Cut (f,p)) by A2, A3, Th29; hence ex i1 being Element of NAT st ( 1 <= i1 & i1 + 1 <= len (L_Cut (f,p)) & q in LSeg ((L_Cut (f,p)),i1) ) by SPPOL_2:13; ::_thesis: verum end; case ( Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ) ; ::_thesis: ex i1 being Element of NAT st ( 1 <= i1 & i1 + 1 <= len (L_Cut (f,p)) & q in LSeg ((L_Cut (f,p)),i1) ) then q in L~ (L_Cut (f,p)) by A2, A3, A4, Th31; hence ex i1 being Element of NAT st ( 1 <= i1 & i1 + 1 <= len (L_Cut (f,p)) & q in LSeg ((L_Cut (f,p)),i1) ) by SPPOL_2:13; ::_thesis: verum end; end; end; then A21: q in L~ (L_Cut (f,p)) by SPPOL_2:17; then A22: Index (q,(L_Cut (f,p))) < len (L_Cut (f,p)) by Th8; 1 <= Index (q,(L_Cut (f,p))) by A21, Th8; then 1 <= len (L_Cut (f,p)) by A22, XXREAL_0:2; then p = (L_Cut (f,p)) /. 1 by A20, FINSEQ_4:15; hence B_Cut (f,p,q) is_S-Seq_joining p,q by A1, A2, A4, A6, A10, A21, A20, Th32, Th34; ::_thesis: verum end; theorem Th36: :: JORDAN3:36 for f being FinSequence of (TOP-REAL 2) for p, q being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & q in L~ f & p <> q holds B_Cut (f,p,q) is_S-Seq_joining p,q proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p, q being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & q in L~ f & p <> q holds B_Cut (f,p,q) is_S-Seq_joining p,q let p, q be Point of (TOP-REAL 2); ::_thesis: ( f is being_S-Seq & p in L~ f & q in L~ f & p <> q implies B_Cut (f,p,q) is_S-Seq_joining p,q ) assume that A1: f is being_S-Seq and A2: p in L~ f and A3: q in L~ f and A4: p <> q ; ::_thesis: B_Cut (f,p,q) is_S-Seq_joining p,q percases ( Index (p,f) < Index (q,f) or ( Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ) or ( not Index (p,f) < Index (q,f) & not ( Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ) ) ) ; suppose ( Index (p,f) < Index (q,f) or ( Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ) ) ; ::_thesis: B_Cut (f,p,q) is_S-Seq_joining p,q hence B_Cut (f,p,q) is_S-Seq_joining p,q by A1, A2, A3, A4, Lm1; ::_thesis: verum end; supposeA5: ( not Index (p,f) < Index (q,f) & not ( Index (p,f) = Index (q,f) & LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ) ) ; ::_thesis: B_Cut (f,p,q) is_S-Seq_joining p,q A6: now__::_thesis:_(_Index_(p,f)_=_Index_(q,f)_&_not_LE_p,q,f_/._(Index_(p,f)),f_/._((Index_(p,f))_+_1)_implies_LE_q,p,f_/._(Index_(q,f)),f_/._((Index_(q,f))_+_1)_) A7: Index (p,f) < len f by A2, Th8; then A8: (Index (p,f)) + 1 <= len f by NAT_1:13; 1 <= (Index (p,f)) + 1 by NAT_1:11; then A9: (Index (p,f)) + 1 in dom f by A8, FINSEQ_3:25; A10: (Index (p,f)) + 0 <> (Index (p,f)) + 1 ; A11: 1 <= Index (p,f) by A2, Th8; then A12: LSeg (f,(Index (p,f))) = LSeg ((f /. (Index (p,f))),(f /. ((Index (p,f)) + 1))) by A8, TOPREAL1:def_3; then A13: p in LSeg ((f /. (Index (p,f))),(f /. ((Index (p,f)) + 1))) by A2, Th9; Index (p,f) in dom f by A11, A7, FINSEQ_3:25; then A14: f /. (Index (p,f)) <> f /. ((Index (p,f)) + 1) by A1, A9, A10, PARTFUN2:10; assume that A15: Index (p,f) = Index (q,f) and A16: not LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ; ::_thesis: LE q,p,f /. (Index (q,f)),f /. ((Index (q,f)) + 1) q in LSeg ((f /. (Index (p,f))),(f /. ((Index (p,f)) + 1))) by A3, A15, A12, Th9; then LT q,p,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) by A16, A13, A14, Th28; hence LE q,p,f /. (Index (q,f)),f /. ((Index (q,f)) + 1) by A15, Def6; ::_thesis: verum end; A17: ( Index (q,f) < Index (p,f) or ( Index (p,f) = Index (q,f) & not LE p,q,f /. (Index (p,f)),f /. ((Index (p,f)) + 1) ) ) by A5, XXREAL_0:1; B_Cut (f,p,q) = Rev (R_Cut ((L_Cut (f,q)),p)) by A5, Def7; then A18: Rev (B_Cut (f,q,p)) = B_Cut (f,p,q) by A2, A3, A17, A6, Def7; B_Cut (f,q,p) is_S-Seq_joining q,p by A1, A2, A3, A4, A17, A6, Lm1; hence B_Cut (f,p,q) is_S-Seq_joining p,q by A18, Th15; ::_thesis: verum end; end; end; theorem :: JORDAN3:37 for f being FinSequence of (TOP-REAL 2) for p, q being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & q in L~ f & p <> q holds B_Cut (f,p,q) is being_S-Seq proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p, q being Point of (TOP-REAL 2) st f is being_S-Seq & p in L~ f & q in L~ f & p <> q holds B_Cut (f,p,q) is being_S-Seq let p, q be Point of (TOP-REAL 2); ::_thesis: ( f is being_S-Seq & p in L~ f & q in L~ f & p <> q implies B_Cut (f,p,q) is being_S-Seq ) assume that A1: f is being_S-Seq and A2: p in L~ f and A3: q in L~ f and A4: p <> q ; ::_thesis: B_Cut (f,p,q) is being_S-Seq B_Cut (f,p,q) is_S-Seq_joining p,q by A1, A2, A3, A4, Th36; hence B_Cut (f,p,q) is being_S-Seq by Def2; ::_thesis: verum end; theorem Th38: :: JORDAN3:38 for f, g being FinSequence of (TOP-REAL 2) st f . (len f) = g . 1 & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} holds f ^ (mid (g,2,(len g))) is being_S-Seq proof let f, g be FinSequence of (TOP-REAL 2); ::_thesis: ( f . (len f) = g . 1 & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} implies f ^ (mid (g,2,(len g))) is being_S-Seq ) assume that A1: f . (len f) = g . 1 and A2: f is being_S-Seq and A3: g is being_S-Seq and A4: (L~ f) /\ (L~ g) = {(g . 1)} ; ::_thesis: f ^ (mid (g,2,(len g))) is being_S-Seq A5: len f >= 2 by A2, TOPREAL1:def_8; A6: len (f ^ (mid (g,2,(len g)))) = (len f) + (len (mid (g,2,(len g)))) by FINSEQ_1:22; then len f <= len (f ^ (mid (g,2,(len g)))) by NAT_1:11; then A7: len (f ^ (mid (g,2,(len g)))) >= 2 by A5, XXREAL_0:2; A8: len g >= 2 by A3, TOPREAL1:def_8; then A9: 1 <= len g by XXREAL_0:2; then A10: len (mid (g,2,(len g))) = ((len g) -' 2) + 1 by A8, FINSEQ_6:118 .= ((len g) - 2) + 1 by A8, XREAL_1:233 .= (len g) - 1 ; for x1, x2 being set st x1 in dom (f ^ (mid (g,2,(len g)))) & x2 in dom (f ^ (mid (g,2,(len g)))) & (f ^ (mid (g,2,(len g)))) . x1 = (f ^ (mid (g,2,(len g)))) . x2 holds x1 = x2 proof A11: rng g c= L~ g by A8, SPPOL_2:18; A12: rng (f ^ (mid (g,2,(len g)))) c= the carrier of (TOP-REAL 2) by FINSEQ_1:def_4; let x1, x2 be set ; ::_thesis: ( x1 in dom (f ^ (mid (g,2,(len g)))) & x2 in dom (f ^ (mid (g,2,(len g)))) & (f ^ (mid (g,2,(len g)))) . x1 = (f ^ (mid (g,2,(len g)))) . x2 implies x1 = x2 ) assume that A13: x1 in dom (f ^ (mid (g,2,(len g)))) and A14: x2 in dom (f ^ (mid (g,2,(len g)))) and A15: (f ^ (mid (g,2,(len g)))) . x1 = (f ^ (mid (g,2,(len g)))) . x2 ; ::_thesis: x1 = x2 reconsider n1 = x1, n2 = x2 as Element of NAT by A13, A14; A16: x2 in Seg (len (f ^ (mid (g,2,(len g))))) by A14, FINSEQ_1:def_3; then A17: 1 <= n2 by FINSEQ_1:1; (f ^ (mid (g,2,(len g)))) . x1 in rng (f ^ (mid (g,2,(len g)))) by A13, FUNCT_1:def_3; then reconsider q = (f ^ (mid (g,2,(len g)))) . x1 as Point of (TOP-REAL 2) by A12; A18: rng (mid (g,2,(len g))) c= rng g by FINSEQ_6:119; A19: rng f c= L~ f by A5, SPPOL_2:18; A20: now__::_thesis:_(_q_in_rng_f_implies_not_q_in_rng_(mid_(g,2,(len_g)))_) A21: now__::_thesis:_not_g_._1_in_rng_(mid_(g,2,(len_g))) g | 1 = g | (Seg 1) by FINSEQ_1:def_15; then A22: (g | 1) . 1 = g . 1 by FINSEQ_1:3, FUNCT_1:49; len (g | 1) = 1 by A8, FINSEQ_1:59, XXREAL_0:2; then 1 in dom (g | 1) by FINSEQ_3:25; then A23: g . 1 in rng (g | 1) by A22, FUNCT_1:def_3; A24: 2 -' 1 = 2 - 1 by XREAL_1:233; assume g . 1 in rng (mid (g,2,(len g))) ; ::_thesis: contradiction then A25: g . 1 in rng (g /^ 1) by A8, A24, FINSEQ_6:117; rng (g | 1) misses rng (g /^ 1) by A3, FINSEQ_5:34; hence contradiction by A25, A23, XBOOLE_0:3; ::_thesis: verum end; assume that A26: q in rng f and A27: q in rng (mid (g,2,(len g))) ; ::_thesis: contradiction q in rng g by A18, A27; then q in (L~ f) /\ (L~ g) by A19, A11, A26, XBOOLE_0:def_4; hence contradiction by A4, A27, A21, TARSKI:def_1; ::_thesis: verum end; n2 <= len (f ^ (mid (g,2,(len g)))) by A16, FINSEQ_1:1; then A28: n2 - (len f) <= ((len f) + (len (mid (g,2,(len g))))) - (len f) by A6, XREAL_1:9; A29: x1 in Seg (len (f ^ (mid (g,2,(len g))))) by A13, FINSEQ_1:def_3; then n1 <= len (f ^ (mid (g,2,(len g)))) by FINSEQ_1:1; then A30: n1 - (len f) <= ((len f) + (len (mid (g,2,(len g))))) - (len f) by A6, XREAL_1:9; A31: 1 <= n1 by A29, FINSEQ_1:1; now__::_thesis:_(_(_n1_<=_len_f_&_x1_=_x2_)_or_(_n1_>_len_f_&_x1_=_x2_)_) percases ( n1 <= len f or n1 > len f ) ; case n1 <= len f ; ::_thesis: x1 = x2 then A32: n1 in dom f by A31, FINSEQ_3:25; then A33: (f ^ (mid (g,2,(len g)))) . x1 = f . n1 by FINSEQ_1:def_7; now__::_thesis:_(_(_n2_<=_len_f_&_x1_=_x2_)_or_(_n2_>_len_f_&_contradiction_)_) percases ( n2 <= len f or n2 > len f ) ; case n2 <= len f ; ::_thesis: x1 = x2 then A34: n2 in dom f by A17, FINSEQ_3:25; then (f ^ (mid (g,2,(len g)))) . x2 = f . n2 by FINSEQ_1:def_7; hence x1 = x2 by A2, A15, A32, A33, A34, FUNCT_1:def_4; ::_thesis: verum end; caseA35: n2 > len f ; ::_thesis: contradiction then (len f) + 1 <= n2 by NAT_1:13; then A36: ((len f) + 1) - (len f) <= n2 - (len f) by XREAL_1:9; then A37: 1 <= n2 -' (len f) by NAT_D:39; A38: (len f) + (n2 -' (len f)) = (len f) + (n2 - (len f)) by A35, XREAL_1:233 .= n2 ; n2 -' (len f) <= len (mid (g,2,(len g))) by A28, A36, NAT_D:39; then A39: n2 -' (len f) in dom (mid (g,2,(len g))) by A37, FINSEQ_3:25; then (f ^ (mid (g,2,(len g)))) . ((len f) + (n2 -' (len f))) = (mid (g,2,(len g))) . (n2 -' (len f)) by FINSEQ_1:def_7; hence contradiction by A15, A20, A32, A33, A39, A38, FUNCT_1:def_3; ::_thesis: verum end; end; end; hence x1 = x2 ; ::_thesis: verum end; caseA40: n1 > len f ; ::_thesis: x1 = x2 then (len f) + 1 <= n1 by NAT_1:13; then A41: ((len f) + 1) - (len f) <= n1 - (len f) by XREAL_1:9; then A42: 1 <= n1 -' (len f) by NAT_D:39; then A43: 1 <= (n1 -' (len f)) + 1 by NAT_D:48; n1 -' (len f) <= (n1 -' (len f)) + 2 by NAT_1:11; then A44: ((n1 -' (len f)) + 2) -' 1 = ((n1 -' (len f)) + 2) - 1 by A42, XREAL_1:233, XXREAL_0:2 .= (n1 -' (len f)) + ((1 + 1) - 1) ; A45: (len f) + (n1 -' (len f)) = (len f) + (n1 - (len f)) by A40, XREAL_1:233 .= n1 ; A46: n1 -' (len f) <= len (mid (g,2,(len g))) by A30, A41, NAT_D:39; then A47: n1 -' (len f) in dom (mid (g,2,(len g))) by A42, FINSEQ_3:25; then A48: (f ^ (mid (g,2,(len g)))) . ((len f) + (n1 -' (len f))) = (mid (g,2,(len g))) . (n1 -' (len f)) by FINSEQ_1:def_7; (n1 -' (len f)) + 1 <= ((len g) - 1) + 1 by A10, A46, XREAL_1:6; then A49: (n1 -' (len f)) + 1 in dom g by A43, FINSEQ_3:25; (len f) + (n1 -' (len f)) = (len f) + (n1 - (len f)) by A40, XREAL_1:233 .= n1 ; then A50: (f ^ (mid (g,2,(len g)))) . n1 = g . ((n1 -' (len f)) + 1) by A8, A9, A30, A41, A48, A44, FINSEQ_6:118; now__::_thesis:_(_(_n2_<=_len_f_&_contradiction_)_or_(_n2_>_len_f_&_x1_=_x2_)_) percases ( n2 <= len f or n2 > len f ) ; case n2 <= len f ; ::_thesis: contradiction then A51: n2 in dom f by A17, FINSEQ_3:25; then (f ^ (mid (g,2,(len g)))) . x2 = f . n2 by FINSEQ_1:def_7; hence contradiction by A15, A20, A47, A48, A45, A51, FUNCT_1:def_3; ::_thesis: verum end; caseA52: n2 > len f ; ::_thesis: x1 = x2 then (len f) + 1 <= n2 by NAT_1:13; then A53: ((len f) + 1) - (len f) <= n2 - (len f) by XREAL_1:9; then A54: 1 <= n2 -' (len f) by NAT_D:39; then A55: 1 <= (n2 -' (len f)) + 1 by NAT_D:48; A56: n2 -' (len f) <= len (mid (g,2,(len g))) by A28, A53, NAT_D:39; then (n2 -' (len f)) + 1 <= ((len g) - 1) + 1 by A10, XREAL_1:6; then A57: (n2 -' (len f)) + 1 in dom g by A55, FINSEQ_3:25; n2 -' (len f) <= (n2 -' (len f)) + 2 by NAT_1:11; then A58: ((n2 -' (len f)) + 2) -' 1 = ((n2 -' (len f)) + 2) - 1 by A54, XREAL_1:233, XXREAL_0:2 .= (n2 -' (len f)) + 1 ; 1 <= n2 -' (len f) by A53, NAT_D:39; then n2 -' (len f) in dom (mid (g,2,(len g))) by A56, FINSEQ_3:25; then A59: (f ^ (mid (g,2,(len g)))) . ((len f) + (n2 -' (len f))) = (mid (g,2,(len g))) . (n2 -' (len f)) by FINSEQ_1:def_7; (len f) + (n2 -' (len f)) = (len f) + (n2 - (len f)) by A52, XREAL_1:233 .= n2 ; then (f ^ (mid (g,2,(len g)))) . n2 = g . ((n2 -' (len f)) + 1) by A8, A9, A28, A53, A59, A58, FINSEQ_6:118; then (n1 -' (len f)) + 1 = (n2 -' (len f)) + 1 by A3, A15, A49, A50, A57, FUNCT_1:def_4; then n1 - (len f) = n2 -' (len f) by A40, XREAL_1:233; then n1 - (len f) = n2 - (len f) by A52, XREAL_1:233; hence x1 = x2 ; ::_thesis: verum end; end; end; hence x1 = x2 ; ::_thesis: verum end; end; end; hence x1 = x2 ; ::_thesis: verum end; then A60: f ^ (mid (g,2,(len g))) is one-to-one by FUNCT_1:def_4; A61: 1 <= len f by A5, XXREAL_0:2; A62: for i, j being Nat st i + 1 < j holds LSeg ((f ^ (mid (g,2,(len g)))),i) misses LSeg ((f ^ (mid (g,2,(len g)))),j) proof let i, j be Nat; ::_thesis: ( i + 1 < j implies LSeg ((f ^ (mid (g,2,(len g)))),i) misses LSeg ((f ^ (mid (g,2,(len g)))),j) ) assume A63: i + 1 < j ; ::_thesis: LSeg ((f ^ (mid (g,2,(len g)))),i) misses LSeg ((f ^ (mid (g,2,(len g)))),j) now__::_thesis:_(_(_j_<_len_f_&_j_+_1_<=_len_(f_^_(mid_(g,2,(len_g))))_&_LSeg_((f_^_(mid_(g,2,(len_g)))),i)_misses_LSeg_((f_^_(mid_(g,2,(len_g)))),j)_)_or_(_i_+_1_<=_len_f_&_len_f_<=_j_&_j_+_1_<=_len_(f_^_(mid_(g,2,(len_g))))_&_LSeg_((f_^_(mid_(g,2,(len_g)))),i)_misses_LSeg_((f_^_(mid_(g,2,(len_g)))),j)_)_or_(_len_f_<_i_+_1_&_j_+_1_<=_len_(f_^_(mid_(g,2,(len_g))))_&_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),j))_=_{}_)_or_(_j_+_1_>_len_(f_^_(mid_(g,2,(len_g))))_&_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),j))_=_{}_)_) percases ( ( j < len f & j + 1 <= len (f ^ (mid (g,2,(len g)))) ) or ( i + 1 <= len f & len f <= j & j + 1 <= len (f ^ (mid (g,2,(len g)))) ) or ( len f < i + 1 & j + 1 <= len (f ^ (mid (g,2,(len g)))) ) or j + 1 > len (f ^ (mid (g,2,(len g)))) ) ; caseA64: ( j < len f & j + 1 <= len (f ^ (mid (g,2,(len g)))) ) ; ::_thesis: LSeg ((f ^ (mid (g,2,(len g)))),i) misses LSeg ((f ^ (mid (g,2,(len g)))),j) then A65: i + 1 < len f by A63, XXREAL_0:2; then A66: i < len f by NAT_1:13; A67: j <= len (f ^ (mid (g,2,(len g)))) by A64, NAT_D:46; then A68: i + 1 < len (f ^ (mid (g,2,(len g)))) by A63, XXREAL_0:2; then A69: i <= len (f ^ (mid (g,2,(len g)))) by NAT_D:46; now__::_thesis:_(_(_1_<=_i_&_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),j))_=_{}_)_or_(_i_<_1_&_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),j))_=_{}_)_) percases ( 1 <= i or i < 1 ) ; caseA70: 1 <= i ; ::_thesis: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} then A71: f /. i = f . i by A66, FINSEQ_4:15; (f ^ (mid (g,2,(len g)))) /. i = (f ^ (mid (g,2,(len g)))) . i by A69, A70, FINSEQ_4:15; then A72: (f ^ (mid (g,2,(len g)))) /. i = f /. i by A66, A70, A71, FINSEQ_1:64; A73: LSeg (((f ^ (mid (g,2,(len g)))) /. i),((f ^ (mid (g,2,(len g)))) /. (i + 1))) = LSeg ((f ^ (mid (g,2,(len g)))),i) by A68, A70, TOPREAL1:def_3; A74: 1 <= i + 1 by A70, NAT_D:48; then A75: f /. (i + 1) = f . (i + 1) by A65, FINSEQ_4:15; (f ^ (mid (g,2,(len g)))) /. (i + 1) = (f ^ (mid (g,2,(len g)))) . (i + 1) by A68, A74, FINSEQ_4:15; then LSeg (((f ^ (mid (g,2,(len g)))) /. i),((f ^ (mid (g,2,(len g)))) /. (i + 1))) = LSeg ((f /. i),(f /. (i + 1))) by A65, A74, A72, A75, FINSEQ_1:64; then A76: LSeg ((f ^ (mid (g,2,(len g)))),i) = LSeg (f,i) by A65, A70, A73, TOPREAL1:def_3; A77: 1 < j by A63, A74, XXREAL_0:2; then A78: f /. j = f . j by A64, FINSEQ_4:15; (f ^ (mid (g,2,(len g)))) /. j = (f ^ (mid (g,2,(len g)))) . j by A67, A77, FINSEQ_4:15; then A79: (f ^ (mid (g,2,(len g)))) /. j = f /. j by A64, A77, A78, FINSEQ_1:64; A80: 1 <= j + 1 by A77, NAT_D:48; then A81: (f ^ (mid (g,2,(len g)))) /. (j + 1) = (f ^ (mid (g,2,(len g)))) . (j + 1) by A64, FINSEQ_4:15; A82: j + 1 <= len f by A64, NAT_1:13; then A83: LSeg (f,j) = LSeg ((f /. j),(f /. (j + 1))) by A77, TOPREAL1:def_3; f /. (j + 1) = f . (j + 1) by A80, A82, FINSEQ_4:15; then A84: LSeg (((f ^ (mid (g,2,(len g)))) /. j),((f ^ (mid (g,2,(len g)))) /. (j + 1))) = LSeg ((f /. j),(f /. (j + 1))) by A80, A82, A79, A81, FINSEQ_1:64; LSeg (((f ^ (mid (g,2,(len g)))) /. j),((f ^ (mid (g,2,(len g)))) /. (j + 1))) = LSeg ((f ^ (mid (g,2,(len g)))),j) by A64, A77, TOPREAL1:def_3; then LSeg ((f ^ (mid (g,2,(len g)))),i) misses LSeg ((f ^ (mid (g,2,(len g)))),j) by A2, A63, A76, A84, A83, TOPREAL1:def_7; hence (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} by XBOOLE_0:def_7; ::_thesis: verum end; case i < 1 ; ::_thesis: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} then LSeg ((f ^ (mid (g,2,(len g)))),i) = {} by TOPREAL1:def_3; hence (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} ; ::_thesis: verum end; end; end; hence LSeg ((f ^ (mid (g,2,(len g)))),i) misses LSeg ((f ^ (mid (g,2,(len g)))),j) by XBOOLE_0:def_7; ::_thesis: verum end; caseA85: ( i + 1 <= len f & len f <= j & j + 1 <= len (f ^ (mid (g,2,(len g)))) ) ; ::_thesis: LSeg ((f ^ (mid (g,2,(len g)))),i) misses LSeg ((f ^ (mid (g,2,(len g)))),j) now__::_thesis:_(_(_i_+_1_<_len_f_&_len_f_<=_j_&_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),j))_=_{}_)_or_(_i_+_1_<=_len_f_&_len_f_<_j_&_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),j))_=_{}_)_) percases ( ( i + 1 < len f & len f <= j ) or ( i + 1 <= len f & len f < j ) ) by A63, A85, XXREAL_0:1; caseA86: ( i + 1 < len f & len f <= j ) ; ::_thesis: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} len f <= (len f) + (len (mid (g,2,(len g)))) by NAT_1:11; then A87: i + 1 < len (f ^ (mid (g,2,(len g)))) by A6, A86, XXREAL_0:2; A88: len f <= j + 1 by A86, NAT_D:48; A89: 1 + 1 <= j by A5, A86, XXREAL_0:2; then A90: 1 <= j by NAT_D:46; now__::_thesis:_(_(_1_<=_i_&_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),j))_=_{}_)_or_(_i_<_1_&_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),j))_=_{}_)_) percases ( 1 <= i or i < 1 ) ; caseA91: 1 <= i ; ::_thesis: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} i <= len f by A85, NAT_D:46; then A92: f /. i = f . i by A91, FINSEQ_4:15; i <= len (f ^ (mid (g,2,(len g)))) by A87, NAT_D:46; then A93: (f ^ (mid (g,2,(len g)))) /. i = (f ^ (mid (g,2,(len g)))) . i by A91, FINSEQ_4:15; i <= len f by A85, NAT_D:46; then A94: (f ^ (mid (g,2,(len g)))) /. i = f /. i by A91, A93, A92, FINSEQ_1:64; A95: j <= len (f ^ (mid (g,2,(len g)))) by A85, NAT_D:46; A96: now__::_thesis:_(_1_>_j_-'_(len_f)_implies_(f_^_(mid_(g,2,(len_g))))_._j_=_g_._((j_-'_(len_f))_+_1)_) assume 1 > j -' (len f) ; ::_thesis: (f ^ (mid (g,2,(len g)))) . j = g . ((j -' (len f)) + 1) then (j -' (len f)) + 1 <= 0 + 1 by NAT_1:13; then A97: j -' (len f) = 0 by XREAL_1:6; then j - (len f) = 0 by A85, XREAL_1:233; hence (f ^ (mid (g,2,(len g)))) . j = g . ((j -' (len f)) + 1) by A1, A61, A97, FINSEQ_1:64; ::_thesis: verum end; 1 <= j + 1 by A90, NAT_D:48; then A98: (f ^ (mid (g,2,(len g)))) /. (j + 1) = (f ^ (mid (g,2,(len g)))) . (j + 1) by A85, FINSEQ_4:15; A99: LSeg (((f ^ (mid (g,2,(len g)))) /. i),((f ^ (mid (g,2,(len g)))) /. (i + 1))) = LSeg ((f ^ (mid (g,2,(len g)))),i) by A87, A91, TOPREAL1:def_3; A100: 1 <= i + 1 by A91, NAT_D:48; then A101: f /. (i + 1) = f . (i + 1) by A85, FINSEQ_4:15; A102: now__::_thesis:_(_1_>_(j_+_1)_-'_(len_f)_implies_(f_^_(mid_(g,2,(len_g))))_._(j_+_1)_=_g_._(((j_+_1)_-'_(len_f))_+_1)_) assume 1 > (j + 1) -' (len f) ; ::_thesis: (f ^ (mid (g,2,(len g)))) . (j + 1) = g . (((j + 1) -' (len f)) + 1) then ((j + 1) -' (len f)) + 1 <= 0 + 1 by NAT_1:13; then A103: (j + 1) -' (len f) = 0 by XREAL_1:6; then (j + 1) - (len f) = 0 by A88, XREAL_1:233; hence (f ^ (mid (g,2,(len g)))) . (j + 1) = g . (((j + 1) -' (len f)) + 1) by A1, A61, A103, FINSEQ_1:64; ::_thesis: verum end; (j + 1) + 1 <= ((len f) + ((len g) - 1)) + 1 by A6, A10, A85, XREAL_1:6; then ((j + 1) + 1) - (len f) <= ((len f) + (len g)) - (len f) by XREAL_1:9; then ((j - (len f)) + 1) + 1 <= len g ; then A104: ((j -' (len f)) + 1) + 1 <= len g by A86, XREAL_1:233; then (j -' (len f)) + 1 <= len g by NAT_D:46; then A105: g /. ((j -' (len f)) + 1) = g . ((j -' (len f)) + 1) by FINSEQ_4:15, NAT_1:11; (((j -' (len f)) + 1) + 1) - 1 <= (len g) - 1 by A104, XREAL_1:9; then A106: (j -' (len f)) + 1 <= ((len g) - 2) + 1 ; then (j -' (len f)) + 1 <= ((len g) -' 2) + 1 by A8, XREAL_1:233; then A107: j -' (len f) <= ((len g) -' 2) + 1 by NAT_D:46; A108: now__::_thesis:_(_1_<=_j_-'_(len_f)_implies_(f_^_(mid_(g,2,(len_g))))_._j_=_g_._((j_-'_(len_f))_+_1)_) assume A109: 1 <= j -' (len f) ; ::_thesis: (f ^ (mid (g,2,(len g)))) . j = g . ((j -' (len f)) + 1) then 1 <= j - (len f) by NAT_D:39; then 1 + (len f) <= (j - (len f)) + (len f) by XREAL_1:6; then A110: len f < j by NAT_1:13; then (f ^ (mid (g,2,(len g)))) . j = (mid (g,2,(len g))) . (j - (len f)) by A95, FINSEQ_6:108; then (f ^ (mid (g,2,(len g)))) . j = (mid (g,2,(len g))) . (j -' (len f)) by A110, XREAL_1:233; then (f ^ (mid (g,2,(len g)))) . j = g . (((j -' (len f)) + 2) - 1) by A8, A107, A109, FINSEQ_6:122; hence (f ^ (mid (g,2,(len g)))) . j = g . ((j -' (len f)) + 1) ; ::_thesis: verum end; A111: (j -' (len f)) + 1 = (j - (len f)) + 1 by A85, XREAL_1:233 .= (j + 1) - (len f) .= (j + 1) -' (len f) by A88, XREAL_1:233 ; A112: now__::_thesis:_(_1_<=_(j_+_1)_-'_(len_f)_implies_(f_^_(mid_(g,2,(len_g))))_._(j_+_1)_=_g_._(((j_+_1)_-'_(len_f))_+_1)_) assume A113: 1 <= (j + 1) -' (len f) ; ::_thesis: (f ^ (mid (g,2,(len g)))) . (j + 1) = g . (((j + 1) -' (len f)) + 1) then 1 <= (j + 1) - (len f) by NAT_D:39; then 1 + (len f) <= ((j + 1) - (len f)) + (len f) by XREAL_1:6; then A114: len f < j + 1 by NAT_1:13; then (f ^ (mid (g,2,(len g)))) . (j + 1) = (mid (g,2,(len g))) . ((j + 1) - (len f)) by A85, FINSEQ_6:108; then (f ^ (mid (g,2,(len g)))) . (j + 1) = (mid (g,2,(len g))) . ((j + 1) -' (len f)) by A114, XREAL_1:233; then (f ^ (mid (g,2,(len g)))) . (j + 1) = g . ((((j + 1) -' (len f)) + 2) - 1) by A8, A106, A111, A113, FINSEQ_6:122; hence (f ^ (mid (g,2,(len g)))) . (j + 1) = g . (((j + 1) -' (len f)) + 1) ; ::_thesis: verum end; 1 <= 1 + (j -' (len f)) by NAT_1:11; then A115: LSeg (g,((j -' (len f)) + 1)) = LSeg ((g /. ((j -' (len f)) + 1)),(g /. (((j -' (len f)) + 1) + 1))) by A104, TOPREAL1:def_3; 1 <= j by A89, NAT_D:46; then A116: (f ^ (mid (g,2,(len g)))) /. j = g /. ((j -' (len f)) + 1) by A95, A105, A108, A96, FINSEQ_4:15; g /. (((j -' (len f)) + 1) + 1) = g . (((j -' (len f)) + 1) + 1) by A104, FINSEQ_4:15, NAT_1:11; then LSeg ((f ^ (mid (g,2,(len g)))),j) = LSeg (g,((j -' (len f)) + 1)) by A85, A90, A111, A115, A116, A98, A112, A102, TOPREAL1:def_3; then A117: LSeg ((f ^ (mid (g,2,(len g)))),j) c= L~ g by TOPREAL3:19; A118: (i + 1) + 1 <= len f by A86, NAT_1:13; (f ^ (mid (g,2,(len g)))) /. (i + 1) = (f ^ (mid (g,2,(len g)))) . (i + 1) by A87, A100, FINSEQ_4:15; then LSeg (((f ^ (mid (g,2,(len g)))) /. i),((f ^ (mid (g,2,(len g)))) /. (i + 1))) = LSeg ((f /. i),(f /. (i + 1))) by A85, A100, A94, A101, FINSEQ_1:64; then A119: LSeg ((f ^ (mid (g,2,(len g)))),i) = LSeg (f,i) by A85, A91, A99, TOPREAL1:def_3; then LSeg ((f ^ (mid (g,2,(len g)))),i) c= L~ f by TOPREAL3:19; then A120: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) c= {(g . 1)} by A4, A117, XBOOLE_1:27; now__::_thesis:_(_(_i_+_1_<_(len_f)_-'_1_&_LSeg_((f_^_(mid_(g,2,(len_g)))),i)_misses_LSeg_((f_^_(mid_(g,2,(len_g)))),j)_)_or_(_i_+_1_>=_(len_f)_-'_1_&_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),j))_=_{}_)_) percases ( i + 1 < (len f) -' 1 or i + 1 >= (len f) -' 1 ) ; caseA121: i + 1 < (len f) -' 1 ; ::_thesis: LSeg ((f ^ (mid (g,2,(len g)))),i) misses LSeg ((f ^ (mid (g,2,(len g)))),j) A122: 1 <= len f by A5, XXREAL_0:2; A123: ((len f) -' 1) + 1 = ((len f) - 1) + 1 by A5, XREAL_1:233, XXREAL_0:2 .= len f ; A124: (1 + 1) - 1 <= (len f) - 1 by A5, XREAL_1:9; now__::_thesis:_for_x_being_set_holds_not_x_in_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),j)) f /. (len f) in LSeg (f,((len f) -' 1)) by A124, A123, TOPREAL1:21; then A125: g . 1 in LSeg (f,((len f) -' 1)) by A1, A122, FINSEQ_4:15; given x being set such that A126: x in (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) ; ::_thesis: contradiction A127: x in LSeg (f,i) by A119, A126, XBOOLE_0:def_4; x = g . 1 by A120, A126, TARSKI:def_1; then x in (LSeg (f,i)) /\ (LSeg (f,((len f) -' 1))) by A127, A125, XBOOLE_0:def_4; then LSeg (f,i) meets LSeg (f,((len f) -' 1)) by XBOOLE_0:4; hence contradiction by A2, A121, TOPREAL1:def_7; ::_thesis: verum end; hence LSeg ((f ^ (mid (g,2,(len g)))),i) misses LSeg ((f ^ (mid (g,2,(len g)))),j) by XBOOLE_0:4; ::_thesis: verum end; case i + 1 >= (len f) -' 1 ; ::_thesis: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} then i + 1 >= (len f) - 1 by A5, XREAL_1:233, XXREAL_0:2; then A128: (i + 1) + 1 >= ((len f) - 1) + 1 by XREAL_1:6; then A129: (i + 1) + 1 = len f by A118, XXREAL_0:1; then A130: i + 1 <= len f by NAT_1:11; i + 1 = (len f) - 1 by A129; then A131: i + 1 = (len f) -' 1 by A5, XREAL_1:233, XXREAL_0:2; A132: ((len f) -' 1) + 1 = ((len f) - 1) + 1 by A5, XREAL_1:233, XXREAL_0:2 .= len f ; then 1 + 1 <= ((len f) -' 1) + 1 by A2, TOPREAL1:def_8; then A133: 1 <= (len f) -' 1 by XREAL_1:6; A134: i + (1 + 1) = len f by A118, A128, XXREAL_0:1; now__::_thesis:_for_x_being_set_holds_not_x_in_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),j)) (1 + 1) - 1 <= (len f) - 1 by A5, XREAL_1:9; then A135: 1 <= (len f) -' 1 by NAT_D:39; (len f) -' 1 <= len f by NAT_D:35; then A136: (len f) -' 1 in dom f by A135, FINSEQ_3:25; A137: (LSeg (f,i)) /\ (LSeg (f,((len f) -' 1))) = {(f /. (i + 1))} by A2, A91, A131, A134, TOPREAL1:def_6; f /. (len f) in LSeg (f,((len f) -' 1)) by A132, A133, TOPREAL1:21; then A138: g . 1 in LSeg (f,((len f) -' 1)) by A1, A61, FINSEQ_4:15; given x being set such that A139: x in (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) ; ::_thesis: contradiction A140: x = g . 1 by A120, A139, TARSKI:def_1; x in LSeg (f,i) by A119, A139, XBOOLE_0:def_4; then x in (LSeg (f,i)) /\ (LSeg (f,((len f) -' 1))) by A140, A138, XBOOLE_0:def_4; then f . (len f) = f /. (i + 1) by A1, A140, A137, TARSKI:def_1; then A141: f . (len f) = f . ((len f) -' 1) by A131, A130, FINSEQ_4:15, NAT_1:11; len f in dom f by A61, FINSEQ_3:25; then len f = (len f) -' 1 by A2, A141, A136, FUNCT_1:def_4; then len f = (len f) - 1 by A5, XREAL_1:233, XXREAL_0:2; hence contradiction ; ::_thesis: verum end; hence (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} by XBOOLE_0:def_1; ::_thesis: verum end; end; end; hence (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} by XBOOLE_0:def_7; ::_thesis: verum end; case i < 1 ; ::_thesis: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} then LSeg ((f ^ (mid (g,2,(len g)))),i) = {} by TOPREAL1:def_3; hence (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} ; ::_thesis: verum end; end; end; hence (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} ; ::_thesis: verum end; caseA142: ( i + 1 <= len f & len f < j ) ; ::_thesis: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} (1 + 1) - 1 <= (len g) - 1 by A8, XREAL_1:9; then (len f) + 1 <= (len f) + (len (mid (g,2,(len g)))) by A10, XREAL_1:7; then len f < (len f) + (len (mid (g,2,(len g)))) by NAT_1:13; then A143: i + 1 < len (f ^ (mid (g,2,(len g)))) by A6, A142, XXREAL_0:2; A144: len f <= j + 1 by A142, NAT_D:48; A145: 1 + 1 <= j by A5, A142, XXREAL_0:2; then A146: 1 <= j by NAT_D:46; now__::_thesis:_(_(_1_<=_i_&_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),j))_=_{}_)_or_(_i_<_1_&_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),j))_=_{}_)_) percases ( 1 <= i or i < 1 ) ; caseA147: 1 <= i ; ::_thesis: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} i <= len f by A85, NAT_D:46; then A148: f /. i = f . i by A147, FINSEQ_4:15; i <= len (f ^ (mid (g,2,(len g)))) by A143, NAT_D:46; then A149: (f ^ (mid (g,2,(len g)))) /. i = (f ^ (mid (g,2,(len g)))) . i by A147, FINSEQ_4:15; i <= len f by A85, NAT_D:46; then A150: (f ^ (mid (g,2,(len g)))) /. i = f /. i by A147, A149, A148, FINSEQ_1:64; A151: LSeg (((f ^ (mid (g,2,(len g)))) /. i),((f ^ (mid (g,2,(len g)))) /. (i + 1))) = LSeg ((f ^ (mid (g,2,(len g)))),i) by A143, A147, TOPREAL1:def_3; A152: 1 <= i + 1 by A147, NAT_D:48; then A153: f /. (i + 1) = f . (i + 1) by A85, FINSEQ_4:15; (f ^ (mid (g,2,(len g)))) /. (i + 1) = (f ^ (mid (g,2,(len g)))) . (i + 1) by A143, A152, FINSEQ_4:15; then LSeg (((f ^ (mid (g,2,(len g)))) /. i),((f ^ (mid (g,2,(len g)))) /. (i + 1))) = LSeg ((f /. i),(f /. (i + 1))) by A85, A152, A150, A153, FINSEQ_1:64; then LSeg ((f ^ (mid (g,2,(len g)))),i) = LSeg (f,i) by A85, A147, A151, TOPREAL1:def_3; then A154: LSeg ((f ^ (mid (g,2,(len g)))),i) c= L~ f by TOPREAL3:19; A155: j <= len (f ^ (mid (g,2,(len g)))) by A85, NAT_D:46; A156: now__::_thesis:_(_1_>_j_-'_(len_f)_implies_(f_^_(mid_(g,2,(len_g))))_._j_=_g_._((j_-'_(len_f))_+_1)_) assume 1 > j -' (len f) ; ::_thesis: (f ^ (mid (g,2,(len g)))) . j = g . ((j -' (len f)) + 1) then (j -' (len f)) + 1 <= 0 + 1 by NAT_1:13; then A157: j -' (len f) = 0 by XREAL_1:6; then j - (len f) = 0 by A85, XREAL_1:233; hence (f ^ (mid (g,2,(len g)))) . j = g . ((j -' (len f)) + 1) by A1, A61, A157, FINSEQ_1:64; ::_thesis: verum end; 1 <= j + 1 by A146, NAT_D:48; then A158: (f ^ (mid (g,2,(len g)))) /. (j + 1) = (f ^ (mid (g,2,(len g)))) . (j + 1) by A85, FINSEQ_4:15; A159: now__::_thesis:_(_1_>_(j_+_1)_-'_(len_f)_implies_(f_^_(mid_(g,2,(len_g))))_._(j_+_1)_=_g_._(((j_+_1)_-'_(len_f))_+_1)_) assume 1 > (j + 1) -' (len f) ; ::_thesis: (f ^ (mid (g,2,(len g)))) . (j + 1) = g . (((j + 1) -' (len f)) + 1) then ((j + 1) -' (len f)) + 1 <= 0 + 1 by NAT_1:13; then A160: (j + 1) -' (len f) = 0 by XREAL_1:6; then (j + 1) - (len f) = 0 by A144, XREAL_1:233; hence (f ^ (mid (g,2,(len g)))) . (j + 1) = g . (((j + 1) -' (len f)) + 1) by A1, A61, A160, FINSEQ_1:64; ::_thesis: verum end; (j + 1) + 1 <= ((len f) + ((len g) - 1)) + 1 by A6, A10, A85, XREAL_1:6; then ((j + 1) + 1) - (len f) <= ((len f) + (len g)) - (len f) by XREAL_1:9; then ((j - (len f)) + 1) + 1 <= len g ; then A161: ((j -' (len f)) + 1) + 1 <= len g by A142, XREAL_1:233; then (j -' (len f)) + 1 <= len g by NAT_D:46; then A162: g /. ((j -' (len f)) + 1) = g . ((j -' (len f)) + 1) by FINSEQ_4:15, NAT_1:11; (((j -' (len f)) + 1) + 1) - 1 <= (len g) - 1 by A161, XREAL_1:9; then A163: (j -' (len f)) + 1 <= ((len g) - 2) + 1 ; then (j -' (len f)) + 1 <= ((len g) -' 2) + 1 by A8, XREAL_1:233; then A164: j -' (len f) <= ((len g) -' 2) + 1 by NAT_D:46; A165: now__::_thesis:_(_1_<=_j_-'_(len_f)_implies_(f_^_(mid_(g,2,(len_g))))_._j_=_g_._((j_-'_(len_f))_+_1)_) assume A166: 1 <= j -' (len f) ; ::_thesis: (f ^ (mid (g,2,(len g)))) . j = g . ((j -' (len f)) + 1) then 1 <= j - (len f) by NAT_D:39; then 1 + (len f) <= (j - (len f)) + (len f) by XREAL_1:6; then A167: len f < j by NAT_1:13; then (f ^ (mid (g,2,(len g)))) . j = (mid (g,2,(len g))) . (j - (len f)) by A155, FINSEQ_6:108; then (f ^ (mid (g,2,(len g)))) . j = (mid (g,2,(len g))) . (j -' (len f)) by A167, XREAL_1:233; then (f ^ (mid (g,2,(len g)))) . j = g . (((j -' (len f)) + 2) - 1) by A8, A164, A166, FINSEQ_6:122; hence (f ^ (mid (g,2,(len g)))) . j = g . ((j -' (len f)) + 1) ; ::_thesis: verum end; A168: (j -' (len f)) + 1 = (j - (len f)) + 1 by A85, XREAL_1:233 .= (j + 1) - (len f) .= (j + 1) -' (len f) by A144, XREAL_1:233 ; A169: now__::_thesis:_(_1_<=_(j_+_1)_-'_(len_f)_implies_(f_^_(mid_(g,2,(len_g))))_._(j_+_1)_=_g_._(((j_+_1)_-'_(len_f))_+_1)_) assume A170: 1 <= (j + 1) -' (len f) ; ::_thesis: (f ^ (mid (g,2,(len g)))) . (j + 1) = g . (((j + 1) -' (len f)) + 1) then 1 <= (j + 1) - (len f) by NAT_D:39; then 1 + (len f) <= ((j + 1) - (len f)) + (len f) by XREAL_1:6; then A171: len f < j + 1 by NAT_1:13; then (f ^ (mid (g,2,(len g)))) . (j + 1) = (mid (g,2,(len g))) . ((j + 1) - (len f)) by A85, FINSEQ_6:108; then (f ^ (mid (g,2,(len g)))) . (j + 1) = (mid (g,2,(len g))) . ((j + 1) -' (len f)) by A171, XREAL_1:233; then (f ^ (mid (g,2,(len g)))) . (j + 1) = g . ((((j + 1) -' (len f)) + 2) - 1) by A8, A163, A168, A170, FINSEQ_6:122; hence (f ^ (mid (g,2,(len g)))) . (j + 1) = g . (((j + 1) -' (len f)) + 1) ; ::_thesis: verum end; 1 <= 1 + (j -' (len f)) by NAT_1:11; then A172: LSeg (g,((j -' (len f)) + 1)) = LSeg ((g /. ((j -' (len f)) + 1)),(g /. (((j -' (len f)) + 1) + 1))) by A161, TOPREAL1:def_3; 1 <= j by A145, NAT_D:46; then A173: (f ^ (mid (g,2,(len g)))) /. j = g /. ((j -' (len f)) + 1) by A155, A162, A165, A156, FINSEQ_4:15; g /. (((j -' (len f)) + 1) + 1) = g . (((j -' (len f)) + 1) + 1) by A161, FINSEQ_4:15, NAT_1:11; then A174: LSeg ((f ^ (mid (g,2,(len g)))),j) = LSeg (g,((j -' (len f)) + 1)) by A85, A146, A168, A172, A173, A158, A169, A159, TOPREAL1:def_3; then LSeg ((f ^ (mid (g,2,(len g)))),j) c= L~ g by TOPREAL3:19; then A175: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) c= {(g . 1)} by A4, A154, XBOOLE_1:27; now__::_thesis:_for_x_being_set_holds_not_x_in_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),j)) A176: 1 + 1 in dom g by A8, FINSEQ_3:25; A177: (j -' (len f)) + 1 = (j - (len f)) + 1 by A142, XREAL_1:233; A178: 1 + 1 <= len g by A3, TOPREAL1:def_8; given x being set such that A179: x in (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) ; ::_thesis: contradiction A180: x in LSeg (g,((j -' (len f)) + 1)) by A174, A179, XBOOLE_0:def_4; A181: x = g . 1 by A175, A179, TARSKI:def_1; then g /. 1 = x by A9, FINSEQ_4:15; then x in LSeg (g,1) by A178, TOPREAL1:21; then A182: x in (LSeg (g,1)) /\ (LSeg (g,((j -' (len f)) + 1))) by A180, XBOOLE_0:def_4; then LSeg (g,1) meets LSeg (g,((j -' (len f)) + 1)) by XBOOLE_0:4; then 1 + 1 >= (j -' (len f)) + 1 by A3, TOPREAL1:def_7; then 1 >= j -' (len f) by XREAL_1:6; then 1 >= j - (len f) by NAT_D:39; then A183: 1 + (len f) >= (j - (len f)) + (len f) by XREAL_1:6; j >= (len f) + 1 by A142, NAT_1:13; then A184: j = (len f) + 1 by A183, XXREAL_0:1; LSeg (g,((j -' (len f)) + 1)) <> {} by A174, A179; then 1 + 2 <= len g by A184, A177, TOPREAL1:def_3; then (LSeg (g,1)) /\ (LSeg (g,((j -' (len f)) + 1))) = {(g /. (1 + 1))} by A3, A184, A177, TOPREAL1:def_6; then A185: x = g /. (1 + 1) by A182, TARSKI:def_1 .= g . (1 + 1) by A8, FINSEQ_4:15 ; 1 in dom g by A9, FINSEQ_3:25; hence contradiction by A3, A181, A185, A176, FUNCT_1:def_4; ::_thesis: verum end; hence (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} by XBOOLE_0:def_1; ::_thesis: verum end; case i < 1 ; ::_thesis: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} then LSeg ((f ^ (mid (g,2,(len g)))),i) = {} by TOPREAL1:def_3; hence (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} ; ::_thesis: verum end; end; end; hence (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} ; ::_thesis: verum end; end; end; hence LSeg ((f ^ (mid (g,2,(len g)))),i) misses LSeg ((f ^ (mid (g,2,(len g)))),j) by XBOOLE_0:def_7; ::_thesis: verum end; caseA186: ( len f < i + 1 & j + 1 <= len (f ^ (mid (g,2,(len g)))) ) ; ::_thesis: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} then A187: len f <= i by NAT_1:13; then A188: i -' (len f) = i - (len f) by XREAL_1:233; A189: 1 + 1 <= i by A5, A187, XXREAL_0:2; then A190: 1 <= i by NAT_D:46; then A191: 1 <= i + 1 by NAT_D:48; then A192: 1 <= j by A63, XXREAL_0:2; A193: 1 <= (j -' (len f)) + 1 by NAT_1:11; A194: len f < j by A63, A186, XXREAL_0:2; j <= j + 1 by NAT_1:11; then A195: len f < j + 1 by A194, XXREAL_0:2; A196: 1 <= (i -' (len f)) + 1 by NAT_1:11; A197: j -' (len f) = j - (len f) by A63, A186, XREAL_1:233, XXREAL_0:2; (i + 1) - (len f) < j - (len f) by A63, XREAL_1:9; then A198: ((i -' (len f)) + 1) + 1 < (j -' (len f)) + 1 by A188, A197, XREAL_1:6; now__::_thesis:_(_(_j_+_1_<=_len_(f_^_(mid_(g,2,(len_g))))_&_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),j))_=_{}_)_or_(_j_+_1_>_len_(f_^_(mid_(g,2,(len_g))))_&_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),j))_=_{}_)_) percases ( j + 1 <= len (f ^ (mid (g,2,(len g)))) or j + 1 > len (f ^ (mid (g,2,(len g)))) ) ; caseA199: j + 1 <= len (f ^ (mid (g,2,(len g)))) ; ::_thesis: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} A200: 1 <= j by A63, A191, XXREAL_0:2; then 1 <= j + 1 by NAT_D:48; then A201: (f ^ (mid (g,2,(len g)))) /. (j + 1) = (f ^ (mid (g,2,(len g)))) . (j + 1) by A199, FINSEQ_4:15; (len f) + 1 <= j by A194, NAT_1:13; then A202: ((len f) + 1) - (len f) <= j - (len f) by XREAL_1:9; A203: 1 <= i by A189, NAT_D:46; then A204: 1 <= i + 1 by NAT_D:48; A205: j <= len (f ^ (mid (g,2,(len g)))) by A199, NAT_D:46; then A206: i + 1 < len (f ^ (mid (g,2,(len g)))) by A63, XXREAL_0:2; then A207: i <= len (f ^ (mid (g,2,(len g)))) by NAT_D:46; i + 1 < (len f) + ((len g) - 1) by A10, A206, FINSEQ_1:22; then A208: (i + 1) - (len f) < ((len f) + ((len g) - 1)) - (len f) by XREAL_1:9; then A209: ((i - (len f)) + 1) + 1 < ((len g) - 1) + 1 by XREAL_1:6; then ((i -' (len f)) + 1) + 1 <= len g by A187, XREAL_1:233; then A210: g /. (((i -' (len f)) + 1) + 1) = g . (((i -' (len f)) + 1) + 1) by FINSEQ_4:15, NAT_1:11; i + 1 <= len (f ^ (mid (g,2,(len g)))) by A63, A205, XXREAL_0:2; then A211: (f ^ (mid (g,2,(len g)))) /. (i + 1) = (f ^ (mid (g,2,(len g)))) . (i + 1) by A204, FINSEQ_4:15; A212: LSeg (((f ^ (mid (g,2,(len g)))) /. j),((f ^ (mid (g,2,(len g)))) /. (j + 1))) = LSeg ((f ^ (mid (g,2,(len g)))),j) by A192, A199, TOPREAL1:def_3; A213: LSeg (((f ^ (mid (g,2,(len g)))) /. i),((f ^ (mid (g,2,(len g)))) /. (i + 1))) = LSeg ((f ^ (mid (g,2,(len g)))),i) by A190, A206, TOPREAL1:def_3; A214: (i -' (len f)) + 1 <= len g by A188, A209, NAT_D:46; then A215: g /. ((i -' (len f)) + 1) = g . ((i -' (len f)) + 1) by FINSEQ_4:15, NAT_1:11; A216: now__::_thesis:_(_(_i_<=_len_f_&_(f_^_(mid_(g,2,(len_g))))_/._i_=_g_/._((i_-'_(len_f))_+_1)_)_or_(_i_>_len_f_&_(f_^_(mid_(g,2,(len_g))))_/._i_=_g_/._((i_-'_(len_f))_+_1)_)_) percases ( i <= len f or i > len f ) ; case i <= len f ; ::_thesis: (f ^ (mid (g,2,(len g)))) /. i = g /. ((i -' (len f)) + 1) then A217: i = len f by A187, XXREAL_0:1; then (f ^ (mid (g,2,(len g)))) . i = g . (0 + 1) by A1, A190, FINSEQ_1:64 .= g . ((i -' (len f)) + 1) by A217, XREAL_1:232 ; hence (f ^ (mid (g,2,(len g)))) /. i = g /. ((i -' (len f)) + 1) by A203, A207, A215, FINSEQ_4:15; ::_thesis: verum end; caseA218: i > len f ; ::_thesis: (f ^ (mid (g,2,(len g)))) /. i = g /. ((i -' (len f)) + 1) then (len f) + 1 <= i by NAT_1:13; then A219: ((len f) + 1) - (len f) <= i - (len f) by XREAL_1:9; ((i -' (len f)) + 1) - 1 <= (len g) - 1 by A214, XREAL_1:9; then A220: i -' (len f) <= ((len g) - 2) + 1 ; (f ^ (mid (g,2,(len g)))) . i = (mid (g,2,(len g))) . (i -' (len f)) by A188, A207, A218, FINSEQ_6:108 .= g . (((i -' (len f)) + 2) - 1) by A8, A188, A219, A220, FINSEQ_6:122 .= g . ((i -' (len f)) + 1) ; hence (f ^ (mid (g,2,(len g)))) /. i = g /. ((i -' (len f)) + 1) by A203, A207, A215, FINSEQ_4:15; ::_thesis: verum end; end; end; j + 1 <= (len f) + ((len g) - 1) by A10, A199, FINSEQ_1:22; then A221: (j + 1) - (len f) <= ((len f) + ((len g) - 1)) - (len f) by XREAL_1:9; then A222: (j -' (len f)) + 1 <= ((len g) - 2) + 1 by A197; A223: (((j -' (len f)) + 1) + 2) - 1 = ((j -' (len f)) + 1) + 1 ; A224: (f ^ (mid (g,2,(len g)))) . (j + 1) = (mid (g,2,(len g))) . ((j + 1) - (len f)) by A195, A199, FINSEQ_6:108 .= g . (((j -' (len f)) + 1) + 1) by A8, A197, A193, A222, A223, FINSEQ_6:122 ; A225: (((i -' (len f)) + 1) + 2) - 1 = ((i -' (len f)) + 1) + 1 ; A226: (i -' (len f)) + 1 <= ((len g) - 2) + 1 by A188, A208; (f ^ (mid (g,2,(len g)))) . (i + 1) = (mid (g,2,(len g))) . ((i + 1) - (len f)) by A186, A206, FINSEQ_6:108 .= g . (((i -' (len f)) + 1) + 1) by A8, A188, A196, A226, A225, FINSEQ_6:122 ; then A227: LSeg ((f ^ (mid (g,2,(len g)))),i) = LSeg (g,((i -' (len f)) + 1)) by A188, A196, A209, A216, A211, A210, A213, TOPREAL1:def_3; A228: ((j - (len f)) + 1) + 1 <= ((len g) - 1) + 1 by A221, XREAL_1:6; then A229: (j -' (len f)) + 1 <= len g by A197, NAT_D:46; then A230: g /. ((j -' (len f)) + 1) = g . ((j -' (len f)) + 1) by FINSEQ_4:15, NAT_1:11; A231: j <= len (f ^ (mid (g,2,(len g)))) by A199, NAT_D:46; then A232: (f ^ (mid (g,2,(len g)))) /. j = (f ^ (mid (g,2,(len g)))) . j by A200, FINSEQ_4:15; ((j -' (len f)) + 1) + 1 <= len g by A63, A186, A228, XREAL_1:233, XXREAL_0:2; then A233: g /. (((j -' (len f)) + 1) + 1) = g . (((j -' (len f)) + 1) + 1) by FINSEQ_4:15, NAT_1:11; ((j -' (len f)) + 1) - 1 <= (len g) - 1 by A229, XREAL_1:9; then A234: j -' (len f) <= ((len g) - 2) + 1 ; (f ^ (mid (g,2,(len g)))) . j = (mid (g,2,(len g))) . (j - (len f)) by A194, A231, FINSEQ_6:108 .= g . (((j -' (len f)) + 2) - 1) by A8, A197, A202, A234, FINSEQ_6:122 .= g . ((j -' (len f)) + 1) ; then LSeg ((f ^ (mid (g,2,(len g)))),j) = LSeg (g,((j -' (len f)) + 1)) by A197, A193, A228, A232, A230, A201, A233, A224, A212, TOPREAL1:def_3; then LSeg ((f ^ (mid (g,2,(len g)))),i) misses LSeg ((f ^ (mid (g,2,(len g)))),j) by A3, A198, A227, TOPREAL1:def_7; hence (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} by XBOOLE_0:def_7; ::_thesis: verum end; case j + 1 > len (f ^ (mid (g,2,(len g)))) ; ::_thesis: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} then LSeg ((f ^ (mid (g,2,(len g)))),j) = {} by TOPREAL1:def_3; hence (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} ; ::_thesis: verum end; end; end; hence (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} ; ::_thesis: verum end; case j + 1 > len (f ^ (mid (g,2,(len g)))) ; ::_thesis: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} then LSeg ((f ^ (mid (g,2,(len g)))),j) = {} by TOPREAL1:def_3; hence (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),j)) = {} ; ::_thesis: verum end; end; end; hence LSeg ((f ^ (mid (g,2,(len g)))),i) misses LSeg ((f ^ (mid (g,2,(len g)))),j) by XBOOLE_0:def_7; ::_thesis: verum end; A235: for i being Nat st 1 <= i & i + 2 <= len (f ^ (mid (g,2,(len g)))) holds (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),(i + 1))) = {((f ^ (mid (g,2,(len g)))) /. (i + 1))} proof let i be Nat; ::_thesis: ( 1 <= i & i + 2 <= len (f ^ (mid (g,2,(len g)))) implies (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),(i + 1))) = {((f ^ (mid (g,2,(len g)))) /. (i + 1))} ) assume that A236: 1 <= i and A237: i + 2 <= len (f ^ (mid (g,2,(len g)))) ; ::_thesis: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),(i + 1))) = {((f ^ (mid (g,2,(len g)))) /. (i + 1))} A238: 1 <= i + 1 by A236, NAT_D:48; A239: i <= len (f ^ (mid (g,2,(len g)))) by A237, NAT_D:47; A240: 1 <= (i + 1) + 1 by A236, NAT_D:48; A241: i + 1 <= len (f ^ (mid (g,2,(len g)))) by A237, NAT_D:47; (i + 1) + 1 <= (len f) + (len (mid (g,2,(len g)))) by A237, FINSEQ_1:22; then (i + 1) + 1 <= (len f) + (((len g) -' 2) + 1) by A8, A9, FINSEQ_6:118; then (i + 1) + 1 <= (len f) + (((len g) - (1 + 1)) + 1) by A8, XREAL_1:233; then A242: ((i + 1) + 1) - (len f) <= ((len f) + (((len g) - (1 + 1)) + 1)) - (len f) by XREAL_1:9; then A243: (((i + 1) - (len f)) + 1) + 1 <= ((len g) - 1) + 1 by XREAL_1:6; then A244: (((i - (len f)) + 1) + 1) + 1 <= len g ; now__::_thesis:_(_(_i_+_2_<=_len_f_&_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),(i_+_1)))_=_{((f_^_(mid_(g,2,(len_g))))_/._(i_+_1))}_)_or_(_i_+_2_>_len_f_&_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),(i_+_1)))_=_{((f_^_(mid_(g,2,(len_g))))_/._(i_+_1))}_)_) percases ( i + 2 <= len f or i + 2 > len f ) ; caseA245: i + 2 <= len f ; ::_thesis: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),(i + 1))) = {((f ^ (mid (g,2,(len g)))) /. (i + 1))} A246: (f ^ (mid (g,2,(len g)))) /. (i + 1) = (f ^ (mid (g,2,(len g)))) . (i + 1) by A238, A241, FINSEQ_4:15; (i + 1) + 1 <= len f by A245; then A247: i + 1 <= len f by NAT_D:46; then f /. (i + 1) = f . (i + 1) by A238, FINSEQ_4:15; then A248: (f ^ (mid (g,2,(len g)))) /. (i + 1) = f /. (i + 1) by A238, A247, A246, FINSEQ_1:64; A249: f /. ((i + 1) + 1) = f . ((i + 1) + 1) by A240, A245, FINSEQ_4:15; A250: LSeg (((f ^ (mid (g,2,(len g)))) /. (i + 1)),((f ^ (mid (g,2,(len g)))) /. ((i + 1) + 1))) = LSeg ((f ^ (mid (g,2,(len g)))),(i + 1)) by A237, A238, TOPREAL1:def_3; A251: (f ^ (mid (g,2,(len g)))) /. i = (f ^ (mid (g,2,(len g)))) . i by A236, A239, FINSEQ_4:15; A252: i <= len f by A247, NAT_D:46; then f /. i = f . i by A236, FINSEQ_4:15; then A253: (f ^ (mid (g,2,(len g)))) /. i = f /. i by A236, A252, A251, FINSEQ_1:64; (f ^ (mid (g,2,(len g)))) /. ((i + 1) + 1) = (f ^ (mid (g,2,(len g)))) . ((i + 1) + 1) by A237, A240, FINSEQ_4:15; then LSeg (((f ^ (mid (g,2,(len g)))) /. (i + 1)),((f ^ (mid (g,2,(len g)))) /. ((i + 1) + 1))) = LSeg ((f /. (i + 1)),(f /. ((i + 1) + 1))) by A240, A245, A248, A249, FINSEQ_1:64; then A254: LSeg ((f ^ (mid (g,2,(len g)))),(i + 1)) = LSeg (f,(i + 1)) by A238, A245, A250, TOPREAL1:def_3; LSeg (((f ^ (mid (g,2,(len g)))) /. i),((f ^ (mid (g,2,(len g)))) /. (i + 1))) = LSeg ((f ^ (mid (g,2,(len g)))),i) by A236, A241, TOPREAL1:def_3; then LSeg ((f ^ (mid (g,2,(len g)))),i) = LSeg (f,i) by A236, A247, A253, A248, TOPREAL1:def_3; hence (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),(i + 1))) = {((f ^ (mid (g,2,(len g)))) /. (i + 1))} by A2, A236, A245, A248, A254, TOPREAL1:def_6; ::_thesis: verum end; case i + 2 > len f ; ::_thesis: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),(i + 1))) = {((f ^ (mid (g,2,(len g)))) /. (i + 1))} then A255: i + 2 >= (len f) + 1 by NAT_1:13; now__::_thesis:_(_(_i_+_2_>_(len_f)_+_1_&_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),(i_+_1)))_=_{((f_^_(mid_(g,2,(len_g))))_/._(i_+_1))}_)_or_(_i_+_2_=_(len_f)_+_1_&_(LSeg_((f_^_(mid_(g,2,(len_g)))),i))_/\_(LSeg_((f_^_(mid_(g,2,(len_g)))),(i_+_1)))_=_{((f_^_(mid_(g,2,(len_g))))_/._(i_+_1))}_)_) percases ( i + 2 > (len f) + 1 or i + 2 = (len f) + 1 ) by A255, XXREAL_0:1; caseA256: i + 2 > (len f) + 1 ; ::_thesis: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),(i + 1))) = {((f ^ (mid (g,2,(len g)))) /. (i + 1))} then (i + 1) + 1 > (len f) + 1 ; then A257: i + 1 >= (len f) + 1 by NAT_1:13; then A258: i >= len f by XREAL_1:6; A259: now__::_thesis:_(_1_>_i_-'_(len_f)_implies_(f_^_(mid_(g,2,(len_g))))_._i_=_g_._((i_-'_(len_f))_+_1)_) assume 1 > i -' (len f) ; ::_thesis: (f ^ (mid (g,2,(len g)))) . i = g . ((i -' (len f)) + 1) then (i -' (len f)) + 1 <= 0 + 1 by NAT_1:13; then A260: i -' (len f) = 0 by XREAL_1:6; then i - (len f) = 0 by A258, XREAL_1:233; hence (f ^ (mid (g,2,(len g)))) . i = g . ((i -' (len f)) + 1) by A1, A61, A260, FINSEQ_1:64; ::_thesis: verum end; A261: i + 1 >= len f by A257, NAT_D:48; A262: now__::_thesis:_(_1_>_(i_+_1)_-'_(len_f)_implies_(f_^_(mid_(g,2,(len_g))))_._(i_+_1)_=_g_._(((i_+_1)_-'_(len_f))_+_1)_) assume 1 > (i + 1) -' (len f) ; ::_thesis: (f ^ (mid (g,2,(len g)))) . (i + 1) = g . (((i + 1) -' (len f)) + 1) then ((i + 1) -' (len f)) + 1 <= 0 + 1 by NAT_1:13; then A263: (i + 1) -' (len f) = 0 by XREAL_1:6; then (i + 1) - (len f) = 0 by A261, XREAL_1:233; hence (f ^ (mid (g,2,(len g)))) . (i + 1) = g . (((i + 1) -' (len f)) + 1) by A1, A61, A263, FINSEQ_1:64; ::_thesis: verum end; (i + 1) + 1 >= ((len f) + 1) + 1 by A256, NAT_1:13; then ((i + 1) + 1) - ((len f) + 1) >= (((len f) + 1) + 1) - ((len f) + 1) by XREAL_1:9; then (i - (len f)) + 1 >= 1 ; then A264: (i -' (len f)) + 1 >= 1 by A258, XREAL_1:233; then A265: ((i -' (len f)) + 1) + 1 >= 1 by NAT_D:48; then A266: ((i - (len f)) + 1) + 1 >= 1 by A258, XREAL_1:233; then ((i + 1) - (len f)) + 1 >= 1 ; then A267: ((i + 1) -' (len f)) + 1 >= 1 by A261, XREAL_1:233; then A268: (((i + 1) -' (len f)) + 1) + 1 >= 1 by NAT_D:48; ((i + 1) - (len f)) + 1 >= 0 + 1 by A266; then A269: (i + 1) - (len f) >= 0 by XREAL_1:6; then (((i + 1) -' (len f)) + 1) + 1 <= len g by A243, XREAL_0:def_2; then A270: g /. ((((i + 1) -' (len f)) + 1) + 1) = g . ((((i + 1) -' (len f)) + 1) + 1) by A268, FINSEQ_4:15; (((i + 1) -' (len f)) + 1) + 1 <= len g by A243, A261, XREAL_1:233; then A271: LSeg (g,(((i + 1) -' (len f)) + 1)) = LSeg ((g /. (((i + 1) -' (len f)) + 1)),(g /. ((((i + 1) -' (len f)) + 1) + 1))) by A267, TOPREAL1:def_3; (((i + 1) + 1) - (len f)) + 1 = (((i + 1) - (len f)) + 1) + 1 ; then A272: (((i + 1) + 1) - (len f)) + 1 = (((i + 1) -' (len f)) + 1) + 1 by A269, XREAL_0:def_2; A273: (((i -' (len f)) + 1) + 1) + 1 <= len g by A244, A258, XREAL_1:233; then A274: ((i -' (len f)) + 1) + 1 <= len g by NAT_D:46; then A275: LSeg (g,((i -' (len f)) + 1)) = LSeg ((g /. ((i -' (len f)) + 1)),(g /. (((i -' (len f)) + 1) + 1))) by A264, TOPREAL1:def_3; (((i -' (len f)) + 1) + 1) - 1 <= (len g) - 1 by A274, XREAL_1:9; then (i -' (len f)) + 1 <= ((len g) - 2) + 1 ; then A276: (i -' (len f)) + 1 <= ((len g) -' 2) + 1 by A8, XREAL_1:233; then A277: i -' (len f) <= ((len g) -' 2) + 1 by NAT_D:46; A278: now__::_thesis:_(_1_<=_i_-'_(len_f)_implies_(f_^_(mid_(g,2,(len_g))))_._i_=_g_._((i_-'_(len_f))_+_1)_) assume A279: 1 <= i -' (len f) ; ::_thesis: (f ^ (mid (g,2,(len g)))) . i = g . ((i -' (len f)) + 1) then 1 <= i - (len f) by NAT_D:39; then 1 + (len f) <= (i - (len f)) + (len f) by XREAL_1:6; then A280: len f < i by NAT_1:13; then (f ^ (mid (g,2,(len g)))) . i = (mid (g,2,(len g))) . (i - (len f)) by A239, FINSEQ_6:108; then (f ^ (mid (g,2,(len g)))) . i = (mid (g,2,(len g))) . (i -' (len f)) by A280, XREAL_1:233; then (f ^ (mid (g,2,(len g)))) . i = g . (((i -' (len f)) + 2) - 1) by A8, A277, A279, FINSEQ_6:122; hence (f ^ (mid (g,2,(len g)))) . i = g . ((i -' (len f)) + 1) ; ::_thesis: verum end; (i -' (len f)) + 1 <= len g by A274, NAT_D:46; then g /. ((i -' (len f)) + 1) = g . ((i -' (len f)) + 1) by A264, FINSEQ_4:15; then A281: (f ^ (mid (g,2,(len g)))) /. i = g /. ((i -' (len f)) + 1) by A236, A239, A278, A259, FINSEQ_4:15; A282: ((i -' (len f)) + 1) + (1 + 1) <= len g by A273; A283: g /. (((i -' (len f)) + 1) + 1) = g . (((i -' (len f)) + 1) + 1) by A274, A265, FINSEQ_4:15; (i - (len f)) + 1 <= ((len g) -' 2) + 1 by A258, A276, XREAL_1:233; then (i + 1) - (len f) <= ((len g) -' 2) + 1 ; then A284: (i + 1) -' (len f) <= ((len g) -' 2) + 1 by A261, XREAL_1:233; A285: now__::_thesis:_(_1_<=_(i_+_1)_-'_(len_f)_implies_(f_^_(mid_(g,2,(len_g))))_._(i_+_1)_=_g_._(((i_+_1)_-'_(len_f))_+_1)_) assume A286: 1 <= (i + 1) -' (len f) ; ::_thesis: (f ^ (mid (g,2,(len g)))) . (i + 1) = g . (((i + 1) -' (len f)) + 1) then 1 <= (i + 1) - (len f) by NAT_D:39; then 1 + (len f) <= ((i + 1) - (len f)) + (len f) by XREAL_1:6; then A287: len f < i + 1 by NAT_1:13; then (f ^ (mid (g,2,(len g)))) . (i + 1) = (mid (g,2,(len g))) . ((i + 1) - (len f)) by A241, FINSEQ_6:108; then (f ^ (mid (g,2,(len g)))) . (i + 1) = (mid (g,2,(len g))) . ((i + 1) -' (len f)) by A287, XREAL_1:233; then (f ^ (mid (g,2,(len g)))) . (i + 1) = g . ((((i + 1) -' (len f)) + 2) - 1) by A8, A284, A286, FINSEQ_6:122; hence (f ^ (mid (g,2,(len g)))) . (i + 1) = g . (((i + 1) -' (len f)) + 1) ; ::_thesis: verum end; A288: now__::_thesis:_(_1_>_((i_+_1)_+_1)_-'_(len_f)_implies_(f_^_(mid_(g,2,(len_g))))_._((i_+_1)_+_1)_=_g_._((((i_+_1)_+_1)_-'_(len_f))_+_1)_) assume 1 > ((i + 1) + 1) -' (len f) ; ::_thesis: (f ^ (mid (g,2,(len g)))) . ((i + 1) + 1) = g . ((((i + 1) + 1) -' (len f)) + 1) then A289: (((i + 1) + 1) -' (len f)) + 1 <= 0 + 1 by NAT_1:13; then ((i + 1) + 1) -' (len f) <= 0 by XREAL_1:6; then A290: ((i + 1) + 1) - (len f) = 0 by A266, XREAL_0:def_2; ((i + 1) + 1) -' (len f) = 0 by A289, XREAL_1:6; hence (f ^ (mid (g,2,(len g)))) . ((i + 1) + 1) = g . ((((i + 1) + 1) -' (len f)) + 1) by A1, A61, A290, FINSEQ_1:64; ::_thesis: verum end; ((i + 1) - (len f)) + 1 = ((i - (len f)) + 1) + 1 ; then A291: ((i + 1) - (len f)) + 1 = ((i -' (len f)) + 1) + 1 by A258, XREAL_1:233; then A292: ((i + 1) -' (len f)) + 1 = ((i -' (len f)) + 1) + 1 by A261, XREAL_1:233; A293: ((i + 1) + 1) -' (len f) <= ((len g) - 2) + 1 by A242, A266, XREAL_0:def_2; A294: now__::_thesis:_(_1_<=_((i_+_1)_+_1)_-'_(len_f)_implies_(f_^_(mid_(g,2,(len_g))))_._((i_+_1)_+_1)_=_g_._((((i_+_1)_+_1)_-'_(len_f))_+_1)_) assume A295: 1 <= ((i + 1) + 1) -' (len f) ; ::_thesis: (f ^ (mid (g,2,(len g)))) . ((i + 1) + 1) = g . ((((i + 1) + 1) -' (len f)) + 1) then 1 <= ((i + 1) + 1) - (len f) by NAT_D:39; then 1 + (len f) <= (((i + 1) + 1) - (len f)) + (len f) by XREAL_1:6; then A296: len f < (i + 1) + 1 by NAT_1:13; then (f ^ (mid (g,2,(len g)))) . ((i + 1) + 1) = (mid (g,2,(len g))) . (((i + 1) + 1) - (len f)) by A237, FINSEQ_6:108; then (f ^ (mid (g,2,(len g)))) . ((i + 1) + 1) = (mid (g,2,(len g))) . (((i + 1) + 1) -' (len f)) by A296, XREAL_1:233; then (f ^ (mid (g,2,(len g)))) . ((i + 1) + 1) = g . (((((i + 1) + 1) -' (len f)) + 2) - 1) by A8, A293, A295, FINSEQ_6:122; hence (f ^ (mid (g,2,(len g)))) . ((i + 1) + 1) = g . ((((i + 1) + 1) -' (len f)) + 1) ; ::_thesis: verum end; A297: (f ^ (mid (g,2,(len g)))) /. ((i + 1) + 1) = (f ^ (mid (g,2,(len g)))) . ((i + 1) + 1) by A237, A240, FINSEQ_4:15; A298: LSeg ((f ^ (mid (g,2,(len g)))),i) = LSeg (((f ^ (mid (g,2,(len g)))) /. i),((f ^ (mid (g,2,(len g)))) /. (i + 1))) by A236, A241, TOPREAL1:def_3; A299: (f ^ (mid (g,2,(len g)))) /. (i + 1) = (f ^ (mid (g,2,(len g)))) . (i + 1) by A238, A241, FINSEQ_4:15; LSeg ((f ^ (mid (g,2,(len g)))),(i + 1)) = LSeg (((f ^ (mid (g,2,(len g)))) /. (i + 1)),((f ^ (mid (g,2,(len g)))) /. ((i + 1) + 1))) by A237, A238, TOPREAL1:def_3; then LSeg ((f ^ (mid (g,2,(len g)))),(i + 1)) = LSeg (g,(((i + 1) -' (len f)) + 1)) by A291, A272, A299, A283, A285, A262, A271, A297, A270, A294, A288, XREAL_0:def_2; hence (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),(i + 1))) = {((f ^ (mid (g,2,(len g)))) /. (i + 1))} by A3, A264, A292, A298, A275, A281, A299, A283, A285, A282, TOPREAL1:def_6; ::_thesis: verum end; caseA300: i + 2 = (len f) + 1 ; ::_thesis: (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),(i + 1))) = {((f ^ (mid (g,2,(len g)))) /. (i + 1))} then A301: f /. (i + 1) = f . (i + 1) by A238, FINSEQ_4:15; then A302: f /. (i + 1) = g /. 1 by A1, A9, A300, FINSEQ_4:15; (f ^ (mid (g,2,(len g)))) /. (i + 1) = (f ^ (mid (g,2,(len g)))) . (i + 1) by A238, A241, FINSEQ_4:15; then A303: (f ^ (mid (g,2,(len g)))) /. (i + 1) = f /. (i + 1) by A238, A300, A301, FINSEQ_1:64; A304: LSeg (f,i) = LSeg ((f /. i),(f /. (i + 1))) by A236, A300, TOPREAL1:def_3; A305: (f ^ (mid (g,2,(len g)))) /. i = (f ^ (mid (g,2,(len g)))) . i by A236, A239, FINSEQ_4:15; (i + 1) + 1 = (len f) + 1 by A300; then A306: i <= len f by NAT_D:46; then f /. i = f . i by A236, FINSEQ_4:15; then A307: (f ^ (mid (g,2,(len g)))) /. i = f /. i by A236, A306, A305, FINSEQ_1:64; A308: LSeg (((f ^ (mid (g,2,(len g)))) /. i),((f ^ (mid (g,2,(len g)))) /. (i + 1))) = LSeg ((f ^ (mid (g,2,(len g)))),i) by A236, A241, TOPREAL1:def_3; i = (len f) - 1 by A300; then A309: i = (len f) -' 1 by A5, XREAL_1:233, XXREAL_0:2; A310: g /. 1 in LSeg ((g /. 1),(g /. (1 + 1))) by RLTOPSP1:68; A311: g /. 1 = g . 1 by A9, FINSEQ_4:15; then g /. 1 = f /. (len f) by A1, A61, FINSEQ_4:15; then A312: g /. 1 in LSeg ((f /. ((len f) -' 1)),(f /. (len f))) by RLTOPSP1:68; (len g) - 2 >= 0 by A8, XREAL_1:48; then A313: 0 + 1 <= ((len g) - 2) + 1 by XREAL_1:6; len f < (i + 1) + 1 by A300, NAT_1:13; then (f ^ (mid (g,2,(len g)))) . ((i + 1) + 1) = (mid (g,2,(len g))) . (((i + 1) + 1) - (len f)) by A237, FINSEQ_6:108; then A314: (f ^ (mid (g,2,(len g)))) . ((i + 1) + 1) = g . ((2 + 1) -' 1) by A8, A300, A313, FINSEQ_6:122 .= g . 2 by NAT_D:34 ; A315: LSeg (g,1) c= L~ g by TOPREAL3:19; LSeg (f,i) c= L~ f by TOPREAL3:19; then A316: (LSeg (f,i)) /\ (LSeg (g,1)) c= {(g /. 1)} by A4, A311, A315, XBOOLE_1:27; A317: ((i + 1) -' (len f)) + 1 = 0 + 1 by A300, XREAL_1:232 .= 1 ; then A318: g /. ((((i + 1) -' (len f)) + 1) + 1) = g . ((((i + 1) -' (len f)) + 1) + 1) by A8, FINSEQ_4:15; LSeg (g,1) = LSeg ((g /. 1),(g /. (1 + 1))) by A8, TOPREAL1:def_3; then g /. 1 in (LSeg (f,i)) /\ (LSeg (g,1)) by A300, A309, A304, A312, A310, XBOOLE_0:def_4; then A319: {(g /. 1)} c= (LSeg (f,i)) /\ (LSeg (g,1)) by ZFMISC_1:31; A320: (f ^ (mid (g,2,(len g)))) /. ((i + 1) + 1) = (f ^ (mid (g,2,(len g)))) . ((i + 1) + 1) by A237, A240, FINSEQ_4:15; A321: LSeg ((f ^ (mid (g,2,(len g)))),(i + 1)) = LSeg (((f ^ (mid (g,2,(len g)))) /. (i + 1)),((f ^ (mid (g,2,(len g)))) /. ((i + 1) + 1))) by A237, A238, TOPREAL1:def_3; LSeg (g,(((i + 1) -' (len f)) + 1)) = LSeg ((g /. (((i + 1) -' (len f)) + 1)),(g /. ((((i + 1) -' (len f)) + 1) + 1))) by A8, A317, TOPREAL1:def_3; hence (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),(i + 1))) = {((f ^ (mid (g,2,(len g)))) /. (i + 1))} by A307, A302, A303, A308, A304, A321, A317, A320, A318, A314, A319, A316, XBOOLE_0:def_10; ::_thesis: verum end; end; end; hence (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),(i + 1))) = {((f ^ (mid (g,2,(len g)))) /. (i + 1))} ; ::_thesis: verum end; end; end; hence (LSeg ((f ^ (mid (g,2,(len g)))),i)) /\ (LSeg ((f ^ (mid (g,2,(len g)))),(i + 1))) = {((f ^ (mid (g,2,(len g)))) /. (i + 1))} ; ::_thesis: verum end; for i being Nat st 1 <= i & i + 1 <= len (f ^ (mid (g,2,(len g)))) & not ((f ^ (mid (g,2,(len g)))) /. i) `1 = ((f ^ (mid (g,2,(len g)))) /. (i + 1)) `1 holds ((f ^ (mid (g,2,(len g)))) /. i) `2 = ((f ^ (mid (g,2,(len g)))) /. (i + 1)) `2 proof let i be Nat; ::_thesis: ( 1 <= i & i + 1 <= len (f ^ (mid (g,2,(len g)))) & not ((f ^ (mid (g,2,(len g)))) /. i) `1 = ((f ^ (mid (g,2,(len g)))) /. (i + 1)) `1 implies ((f ^ (mid (g,2,(len g)))) /. i) `2 = ((f ^ (mid (g,2,(len g)))) /. (i + 1)) `2 ) assume that A322: 1 <= i and A323: i + 1 <= len (f ^ (mid (g,2,(len g)))) ; ::_thesis: ( ((f ^ (mid (g,2,(len g)))) /. i) `1 = ((f ^ (mid (g,2,(len g)))) /. (i + 1)) `1 or ((f ^ (mid (g,2,(len g)))) /. i) `2 = ((f ^ (mid (g,2,(len g)))) /. (i + 1)) `2 ) now__::_thesis:_(_(_i_<_len_f_&_(_((f_^_(mid_(g,2,(len_g))))_/._i)_`1_=_((f_^_(mid_(g,2,(len_g))))_/._(i_+_1))_`1_or_((f_^_(mid_(g,2,(len_g))))_/._i)_`2_=_((f_^_(mid_(g,2,(len_g))))_/._(i_+_1))_`2_)_)_or_(_i_>=_len_f_&_(_((f_^_(mid_(g,2,(len_g))))_/._i)_`1_=_((f_^_(mid_(g,2,(len_g))))_/._(i_+_1))_`1_or_((f_^_(mid_(g,2,(len_g))))_/._i)_`2_=_((f_^_(mid_(g,2,(len_g))))_/._(i_+_1))_`2_)_)_) percases ( i < len f or i >= len f ) ; caseA324: i < len f ; ::_thesis: ( ((f ^ (mid (g,2,(len g)))) /. i) `1 = ((f ^ (mid (g,2,(len g)))) /. (i + 1)) `1 or ((f ^ (mid (g,2,(len g)))) /. i) `2 = ((f ^ (mid (g,2,(len g)))) /. (i + 1)) `2 ) i <= len (f ^ (mid (g,2,(len g)))) by A323, NAT_D:46; then A325: (f ^ (mid (g,2,(len g)))) /. i = (f ^ (mid (g,2,(len g)))) . i by A322, FINSEQ_4:15; f /. i = f . i by A322, A324, FINSEQ_4:15; then A326: (f ^ (mid (g,2,(len g)))) /. i = f /. i by A322, A324, A325, FINSEQ_1:64; A327: 1 <= i + 1 by A322, NAT_D:48; then A328: (f ^ (mid (g,2,(len g)))) /. (i + 1) = (f ^ (mid (g,2,(len g)))) . (i + 1) by A323, FINSEQ_4:15; A329: i + 1 <= len f by A324, NAT_1:13; then A330: (f ^ (mid (g,2,(len g)))) . (i + 1) = f . (i + 1) by A327, FINSEQ_1:64; f /. (i + 1) = f . (i + 1) by A327, A329, FINSEQ_4:15; hence ( ((f ^ (mid (g,2,(len g)))) /. i) `1 = ((f ^ (mid (g,2,(len g)))) /. (i + 1)) `1 or ((f ^ (mid (g,2,(len g)))) /. i) `2 = ((f ^ (mid (g,2,(len g)))) /. (i + 1)) `2 ) by A2, A322, A329, A326, A328, A330, TOPREAL1:def_5; ::_thesis: verum end; caseA331: i >= len f ; ::_thesis: ( ((f ^ (mid (g,2,(len g)))) /. i) `1 = ((f ^ (mid (g,2,(len g)))) /. (i + 1)) `1 or ((f ^ (mid (g,2,(len g)))) /. i) `2 = ((f ^ (mid (g,2,(len g)))) /. (i + 1)) `2 ) 1 <= 1 + (i -' (len f)) by NAT_1:11; then 1 <= 1 + (i - (len f)) by A331, XREAL_1:233; then 1 <= (1 + i) - (len f) ; then A332: 1 <= (i + 1) -' (len f) by NAT_D:39; A333: i <= len (f ^ (mid (g,2,(len g)))) by A323, NAT_D:46; A334: i - (len f) >= 0 by A331, XREAL_1:48; then A335: i -' (len f) = i - (len f) by XREAL_0:def_2; A336: now__::_thesis:_(_1_>_i_-'_(len_f)_implies_(f_^_(mid_(g,2,(len_g))))_._i_=_g_._((i_-'_(len_f))_+_1)_) assume 1 > i -' (len f) ; ::_thesis: (f ^ (mid (g,2,(len g)))) . i = g . ((i -' (len f)) + 1) then (i -' (len f)) + 1 <= 0 + 1 by NAT_1:13; then i -' (len f) = 0 by XREAL_1:6; hence (f ^ (mid (g,2,(len g)))) . i = g . ((i -' (len f)) + 1) by A1, A61, A335, FINSEQ_1:64; ::_thesis: verum end; A337: i + 1 >= len f by A331, NAT_D:48; then A338: ((i + 1) -' (len f)) + 1 = ((i + 1) - (len f)) + 1 by XREAL_1:233 .= ((i - (len f)) + 1) + 1 .= ((i -' (len f)) + 1) + 1 by A331, XREAL_1:233 ; A339: (i + 1) - (len f) <= ((len f) + ((len g) - 1)) - (len f) by A6, A10, A323, XREAL_1:9; then A340: ((i - (len f)) + 1) + 1 <= ((len g) - 1) + 1 by XREAL_1:6; then A341: ((i -' (len f)) + 1) + 1 <= len g by A334, XREAL_0:def_2; i -' (len f) <= (i -' (len f)) + 1 by NAT_1:11; then A342: i -' (len f) <= ((len g) - 2) + 1 by A335, A339, XXREAL_0:2; A343: now__::_thesis:_(_1_<=_i_-'_(len_f)_implies_(f_^_(mid_(g,2,(len_g))))_._i_=_g_._((i_-'_(len_f))_+_1)_) assume A344: 1 <= i -' (len f) ; ::_thesis: (f ^ (mid (g,2,(len g)))) . i = g . ((i -' (len f)) + 1) then 1 <= i - (len f) by NAT_D:39; then 1 + (len f) <= (i - (len f)) + (len f) by XREAL_1:6; then A345: len f < i by NAT_1:13; then (f ^ (mid (g,2,(len g)))) . i = (mid (g,2,(len g))) . (i - (len f)) by A333, FINSEQ_6:108; then (f ^ (mid (g,2,(len g)))) . i = (mid (g,2,(len g))) . (i -' (len f)) by A345, XREAL_1:233; then (f ^ (mid (g,2,(len g)))) . i = g . (((i -' (len f)) + 2) - 1) by A8, A342, A344, FINSEQ_6:122; hence (f ^ (mid (g,2,(len g)))) . i = g . ((i -' (len f)) + 1) ; ::_thesis: verum end; 1 <= i + 1 by A322, NAT_D:48; then A346: (f ^ (mid (g,2,(len g)))) /. (i + 1) = (f ^ (mid (g,2,(len g)))) . (i + 1) by A323, FINSEQ_4:15; A347: 1 <= (i -' (len f)) + 1 by NAT_1:11; (i + 1) - (len f) <= ((len g) - 2) + 1 by A339; then (i + 1) - (len f) <= ((len g) -' 2) + 1 by A8, XREAL_1:233; then A348: (i + 1) -' (len f) <= ((len g) -' 2) + 1 by A337, XREAL_1:233; len f < i + 1 by A331, NAT_1:13; then (f ^ (mid (g,2,(len g)))) . (i + 1) = (mid (g,2,(len g))) . ((i + 1) - (len f)) by A323, FINSEQ_6:108; then (f ^ (mid (g,2,(len g)))) . (i + 1) = (mid (g,2,(len g))) . ((i + 1) -' (len f)) by A337, XREAL_1:233; then A349: (f ^ (mid (g,2,(len g)))) . (i + 1) = g . ((((i + 1) -' (len f)) + 2) - 1) by A8, A348, A332, FINSEQ_6:122; ((i -' (len f)) + 1) + 1 <= len g by A334, A340, XREAL_0:def_2; then A350: g /. (((i -' (len f)) + 1) + 1) = g . (((i -' (len f)) + 1) + 1) by FINSEQ_4:15, NAT_1:11; (i -' (len f)) + 1 <= len g by A335, A340, NAT_D:46; then g /. ((i -' (len f)) + 1) = g . ((i -' (len f)) + 1) by FINSEQ_4:15, NAT_1:11; then (f ^ (mid (g,2,(len g)))) /. i = g /. ((i -' (len f)) + 1) by A322, A333, A343, A336, FINSEQ_4:15; hence ( ((f ^ (mid (g,2,(len g)))) /. i) `1 = ((f ^ (mid (g,2,(len g)))) /. (i + 1)) `1 or ((f ^ (mid (g,2,(len g)))) /. i) `2 = ((f ^ (mid (g,2,(len g)))) /. (i + 1)) `2 ) by A3, A347, A341, A338, A346, A350, A349, TOPREAL1:def_5; ::_thesis: verum end; end; end; hence ( ((f ^ (mid (g,2,(len g)))) /. i) `1 = ((f ^ (mid (g,2,(len g)))) /. (i + 1)) `1 or ((f ^ (mid (g,2,(len g)))) /. i) `2 = ((f ^ (mid (g,2,(len g)))) /. (i + 1)) `2 ) ; ::_thesis: verum end; then ( f ^ (mid (g,2,(len g))) is unfolded & f ^ (mid (g,2,(len g))) is s.n.c. & f ^ (mid (g,2,(len g))) is special ) by A235, A62, TOPREAL1:def_5, TOPREAL1:def_6, TOPREAL1:def_7; hence f ^ (mid (g,2,(len g))) is being_S-Seq by A60, A7, TOPREAL1:def_8; ::_thesis: verum end; theorem Th39: :: JORDAN3:39 for f, g being FinSequence of (TOP-REAL 2) st f . (len f) = g . 1 & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} holds f ^ (mid (g,2,(len g))) is_S-Seq_joining f /. 1,g /. (len g) proof let f, g be FinSequence of (TOP-REAL 2); ::_thesis: ( f . (len f) = g . 1 & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} implies f ^ (mid (g,2,(len g))) is_S-Seq_joining f /. 1,g /. (len g) ) assume that A1: f . (len f) = g . 1 and A2: f is being_S-Seq and A3: g is being_S-Seq and A4: (L~ f) /\ (L~ g) = {(g . 1)} ; ::_thesis: f ^ (mid (g,2,(len g))) is_S-Seq_joining f /. 1,g /. (len g) A5: f ^ (mid (g,2,(len g))) is being_S-Seq by A1, A2, A3, A4, Th38; A6: len g >= 2 by A3, TOPREAL1:def_8; then A7: (1 + 1) - 1 <= (len g) - 1 by XREAL_1:9; len f >= 2 by A2, TOPREAL1:def_8; then A8: 1 <= len f by XXREAL_0:2; then A9: (f ^ (mid (g,2,(len g)))) . 1 = f . 1 by FINSEQ_1:64 .= f /. 1 by A8, FINSEQ_4:15 ; A10: len (f ^ (mid (g,2,(len g)))) = (len f) + (len (mid (g,2,(len g)))) by FINSEQ_1:22; A11: 1 <= len g by A6, XXREAL_0:2; then A12: len (mid (g,2,(len g))) = ((len g) -' 2) + 1 by A6, FINSEQ_6:118; then A13: len (mid (g,2,(len g))) = ((len g) - 2) + 1 by A6, XREAL_1:233 .= (len g) - 1 ; then A14: ((len (mid (g,2,(len g)))) + 2) - 1 = len g ; (len g) - 1 >= (1 + 1) - 1 by A6, XREAL_1:9; then (len f) + 1 <= len (f ^ (mid (g,2,(len g)))) by A10, A13, XREAL_1:6; then len f < len (f ^ (mid (g,2,(len g)))) by NAT_1:13; then (f ^ (mid (g,2,(len g)))) . (len (f ^ (mid (g,2,(len g))))) = (mid (g,2,(len g))) . ((len (f ^ (mid (g,2,(len g))))) - (len f)) by FINSEQ_6:108 .= g . (len g) by A6, A10, A12, A7, A14, FINSEQ_6:122 .= g /. (len g) by A11, FINSEQ_4:15 ; hence f ^ (mid (g,2,(len g))) is_S-Seq_joining f /. 1,g /. (len g) by A5, A9, Def2; ::_thesis: verum end; theorem :: JORDAN3:40 for f being FinSequence of (TOP-REAL 2) for n being Element of NAT holds L~ (f /^ n) c= L~ f proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for n being Element of NAT holds L~ (f /^ n) c= L~ f let n be Element of NAT ; ::_thesis: L~ (f /^ n) c= L~ f let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in L~ (f /^ n) or x in L~ f ) assume x in L~ (f /^ n) ; ::_thesis: x in L~ f then x in union { (LSeg ((f /^ n),i)) where i is Element of NAT : ( 1 <= i & i + 1 <= len (f /^ n) ) } by TOPREAL1:def_4; then consider Y being set such that A1: ( x in Y & Y in { (LSeg ((f /^ n),i)) where i is Element of NAT : ( 1 <= i & i + 1 <= len (f /^ n) ) } ) by TARSKI:def_4; consider i being Element of NAT such that A2: Y = LSeg ((f /^ n),i) and A3: 1 <= i and A4: i + 1 <= len (f /^ n) by A1; now__::_thesis:_(_(_n_<=_len_f_&_x_in_L~_f_)_or_(_n_>_len_f_&_contradiction_)_) percases ( n <= len f or n > len f ) ; case n <= len f ; ::_thesis: x in L~ f then LSeg ((f /^ n),i) = LSeg (f,(n + i)) by A3, SPPOL_2:4; then Y c= L~ f by A2, TOPREAL3:19; hence x in L~ f by A1; ::_thesis: verum end; case n > len f ; ::_thesis: contradiction then f /^ n = <*> the carrier of (TOP-REAL 2) by RFINSEQ:def_1; hence contradiction by A4; ::_thesis: verum end; end; end; hence x in L~ f ; ::_thesis: verum end; theorem Th41: :: JORDAN3:41 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st p in L~ f holds L~ (R_Cut (f,p)) c= L~ f proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st p in L~ f holds L~ (R_Cut (f,p)) c= L~ f let p be Point of (TOP-REAL 2); ::_thesis: ( p in L~ f implies L~ (R_Cut (f,p)) c= L~ f ) assume A1: p in L~ f ; ::_thesis: L~ (R_Cut (f,p)) c= L~ f A2: 1 <= Index (p,f) by A1, Th8; len f <> 0 by A1, TOPREAL1:22; then A3: len f >= 0 + 1 by NAT_1:13; A4: Index (p,f) <= len f by A1, Th8; percases ( p = f . 1 or p <> f . 1 ) ; suppose p = f . 1 ; ::_thesis: L~ (R_Cut (f,p)) c= L~ f then R_Cut (f,p) = <*p*> by Def4; then len (R_Cut (f,p)) = 1 by FINSEQ_1:39; then L~ (R_Cut (f,p)) = {} by TOPREAL1:22; hence L~ (R_Cut (f,p)) c= L~ f by XBOOLE_1:2; ::_thesis: verum end; supposeA5: p <> f . 1 ; ::_thesis: L~ (R_Cut (f,p)) c= L~ f A6: f /. (Index (p,f)) in LSeg ((f /. (Index (p,f))),(f /. ((Index (p,f)) + 1))) by RLTOPSP1:68; A7: len (mid (f,1,(Index (p,f)))) = ((Index (p,f)) -' 1) + 1 by A3, A2, A4, FINSEQ_6:118 .= Index (p,f) by A1, Th8, XREAL_1:235 ; then mid (f,1,(Index (p,f))) <> <*> the carrier of (TOP-REAL 2) by A2; then A8: L~ ((mid (f,1,(Index (p,f)))) ^ <*p*>) = (L~ (mid (f,1,(Index (p,f))))) \/ (LSeg (((mid (f,1,(Index (p,f)))) /. (Index (p,f))),p)) by A7, SPPOL_2:19; mid (f,1,(Index (p,f))) = (f /^ (1 -' 1)) | (((Index (p,f)) -' 1) + 1) by A2, FINSEQ_6:def_3 .= (f /^ 0) | (((Index (p,f)) -' 1) + 1) by XREAL_1:232 .= f | (((Index (p,f)) -' 1) + 1) by FINSEQ_5:28 .= f | (Index (p,f)) by A1, Th8, XREAL_1:235 ; then A9: L~ (mid (f,1,(Index (p,f)))) c= L~ f by TOPREAL3:20; Index (p,f) < len f by A1, Th8; then A10: (Index (p,f)) + 1 <= len f by NAT_1:13; then A11: LSeg ((f /. (Index (p,f))),(f /. ((Index (p,f)) + 1))) c= L~ f by A1, Th8, SPPOL_2:16; p in LSeg (f,(Index (p,f))) by A1, Th9; then A12: p in LSeg ((f /. (Index (p,f))),(f /. ((Index (p,f)) + 1))) by A2, A10, TOPREAL1:def_3; (mid (f,1,(Index (p,f)))) /. (Index (p,f)) = (mid (f,1,(Index (p,f)))) . (Index (p,f)) by A2, A7, FINSEQ_4:15 .= f . (Index (p,f)) by A2, A4, FINSEQ_6:123 .= f /. (Index (p,f)) by A1, A4, Th8, FINSEQ_4:15 ; then LSeg (((mid (f,1,(Index (p,f)))) /. (Index (p,f))),p) c= LSeg ((f /. (Index (p,f))),(f /. ((Index (p,f)) + 1))) by A12, A6, TOPREAL1:6; then A13: LSeg (((mid (f,1,(Index (p,f)))) /. (Index (p,f))),p) c= L~ f by A11, XBOOLE_1:1; R_Cut (f,p) = (mid (f,1,(Index (p,f)))) ^ <*p*> by A5, Def4; hence L~ (R_Cut (f,p)) c= L~ f by A8, A13, A9, XBOOLE_1:8; ::_thesis: verum end; end; end; Lm2: for i being Element of NAT for D being non empty set holds (<*> D) | i = <*> D proof let i be Element of NAT ; ::_thesis: for D being non empty set holds (<*> D) | i = <*> D let D be non empty set ; ::_thesis: (<*> D) | i = <*> D len (<*> D) = 0 ; hence (<*> D) | i = <*> D by FINSEQ_1:58; ::_thesis: verum end; Lm3: for D being non empty set for f1 being FinSequence of D for k being Element of NAT st 1 <= k & k <= len f1 holds ( mid (f1,k,k) = <*(f1 /. k)*> & len (mid (f1,k,k)) = 1 ) proof let D be non empty set ; ::_thesis: for f1 being FinSequence of D for k being Element of NAT st 1 <= k & k <= len f1 holds ( mid (f1,k,k) = <*(f1 /. k)*> & len (mid (f1,k,k)) = 1 ) let f1 be FinSequence of D; ::_thesis: for k being Element of NAT st 1 <= k & k <= len f1 holds ( mid (f1,k,k) = <*(f1 /. k)*> & len (mid (f1,k,k)) = 1 ) let k be Element of NAT ; ::_thesis: ( 1 <= k & k <= len f1 implies ( mid (f1,k,k) = <*(f1 /. k)*> & len (mid (f1,k,k)) = 1 ) ) assume that A1: 1 <= k and A2: k <= len f1 ; ::_thesis: ( mid (f1,k,k) = <*(f1 /. k)*> & len (mid (f1,k,k)) = 1 ) A3: f1 /. k = f1 . k by A1, A2, FINSEQ_4:15; (k -' 1) + 1 <= len f1 by A1, A2, XREAL_1:235; then A4: ((k -' 1) + 1) - (k -' 1) <= (len f1) - (k -' 1) by XREAL_1:9; len (f1 /^ (k -' 1)) = (len f1) -' (k -' 1) by RFINSEQ:29; then A5: 1 <= len (f1 /^ (k -' 1)) by A4, NAT_D:39; (k -' 1) + 1 = k by A1, XREAL_1:235; then A6: (f1 /^ (k -' 1)) . 1 = f1 . k by A2, FINSEQ_6:114; (k -' k) + 1 = (k - k) + 1 by XREAL_1:233 .= 1 ; then mid (f1,k,k) = (f1 /^ (k -' 1)) | 1 by FINSEQ_6:def_3 .= <*((f1 /^ (k -' 1)) /. 1)*> by A5, CARD_1:27, FINSEQ_5:20 ; hence ( mid (f1,k,k) = <*(f1 /. k)*> & len (mid (f1,k,k)) = 1 ) by A6, A3, A5, FINSEQ_1:39, FINSEQ_4:15; ::_thesis: verum end; Lm4: for D being non empty set for f1 being FinSequence of D holds mid (f1,0,0) = f1 | 1 proof let D be non empty set ; ::_thesis: for f1 being FinSequence of D holds mid (f1,0,0) = f1 | 1 let f1 be FinSequence of D; ::_thesis: mid (f1,0,0) = f1 | 1 0 - 1 < 0 ; then A1: 0 -' 1 = 0 by XREAL_0:def_2; (0 -' 0) + 1 = (0 - 0) + 1 by XREAL_1:233 .= 1 ; then mid (f1,0,0) = (f1 /^ (0 -' 1)) | 1 by FINSEQ_6:def_3; hence mid (f1,0,0) = f1 | 1 by A1, FINSEQ_5:28; ::_thesis: verum end; Lm5: for D being non empty set for f1 being FinSequence of D for k being Element of NAT st len f1 < k holds mid (f1,k,k) = <*> D proof let D be non empty set ; ::_thesis: for f1 being FinSequence of D for k being Element of NAT st len f1 < k holds mid (f1,k,k) = <*> D let f1 be FinSequence of D; ::_thesis: for k being Element of NAT st len f1 < k holds mid (f1,k,k) = <*> D let k be Element of NAT ; ::_thesis: ( len f1 < k implies mid (f1,k,k) = <*> D ) assume A1: len f1 < k ; ::_thesis: mid (f1,k,k) = <*> D then (len f1) + 1 <= k by NAT_1:13; then A2: ((len f1) + 1) - 1 <= k - 1 by XREAL_1:9; 0 + 1 <= k by A1, NAT_1:13; then len f1 <= k -' 1 by A2, XREAL_1:233; then A3: f1 /^ (k -' 1) = <*> D by FINSEQ_5:32; (k -' k) + 1 = (k - k) + 1 by XREAL_1:233 .= 1 ; then mid (f1,k,k) = (f1 /^ (k -' 1)) | 1 by FINSEQ_6:def_3; hence mid (f1,k,k) = <*> D by A3, Lm2; ::_thesis: verum end; Lm6: for D being non empty set for f1 being FinSequence of D for i1, i2 being Element of NAT holds mid (f1,i1,i2) = Rev (mid (f1,i2,i1)) proof let D be non empty set ; ::_thesis: for f1 being FinSequence of D for i1, i2 being Element of NAT holds mid (f1,i1,i2) = Rev (mid (f1,i2,i1)) let f1 be FinSequence of D; ::_thesis: for i1, i2 being Element of NAT holds mid (f1,i1,i2) = Rev (mid (f1,i2,i1)) let k1, k2 be Element of NAT ; ::_thesis: mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) now__::_thesis:_(_(_k1_<=_k2_&_mid_(f1,k1,k2)_=_Rev_(mid_(f1,k2,k1))_)_or_(_k1_>_k2_&_mid_(f1,k1,k2)_=_Rev_(mid_(f1,k2,k1))_)_) percases ( k1 <= k2 or k1 > k2 ) ; caseA1: k1 <= k2 ; ::_thesis: mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) then A2: mid (f1,k1,k2) = (f1 /^ (k1 -' 1)) | ((k2 -' k1) + 1) by FINSEQ_6:def_3; now__::_thesis:_(_(_k1_<_k2_&_mid_(f1,k1,k2)_=_Rev_(mid_(f1,k2,k1))_)_or_(_k1_=_k2_&_mid_(f1,k1,k2)_=_Rev_(mid_(f1,k2,k1))_)_) percases ( k1 < k2 or k1 = k2 ) by A1, XXREAL_0:1; case k1 < k2 ; ::_thesis: mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) then mid (f1,k2,k1) = Rev (mid (f1,k1,k2)) by A2, FINSEQ_6:def_3; hence mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) ; ::_thesis: verum end; caseA3: k1 = k2 ; ::_thesis: mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) A4: ( k1 = 0 or 0 + 1 <= k1 ) by NAT_1:13; now__::_thesis:_(_(_k1_=_0_&_mid_(f1,k1,k2)_=_Rev_(mid_(f1,k2,k1))_)_or_(_1_<=_k1_&_k1_<=_len_f1_&_mid_(f1,k1,k2)_=_Rev_(mid_(f1,k2,k1))_)_or_(_len_f1_<_k1_&_mid_(f1,k1,k2)_=_Rev_(mid_(f1,k2,k1))_)_) percases ( k1 = 0 or ( 1 <= k1 & k1 <= len f1 ) or len f1 < k1 ) by A4; case k1 = 0 ; ::_thesis: mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) then A5: mid (f1,k1,k2) = f1 | 1 by A3, Lm4; now__::_thesis:_(_(_len_f1_=_0_&_mid_(f1,k1,k2)_=_Rev_(mid_(f1,k2,k1))_)_or_(_len_f1_<>_0_&_mid_(f1,k1,k2)_=_Rev_(mid_(f1,k2,k1))_)_) percases ( len f1 = 0 or len f1 <> 0 ) ; case len f1 = 0 ; ::_thesis: mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) then f1 = <*> D ; then f1 | 1 = <*> D by Lm2; hence mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) by A3, A5; ::_thesis: verum end; case len f1 <> 0 ; ::_thesis: mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) then f1 <> <*> D ; then f1 | 1 = <*(f1 /. 1)*> by FINSEQ_5:20; hence mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) by A3, A5, FINSEQ_5:60; ::_thesis: verum end; end; end; hence mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) ; ::_thesis: verum end; case ( 1 <= k1 & k1 <= len f1 ) ; ::_thesis: mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) then mid (f1,k1,k1) = <*(f1 /. k1)*> by Lm3; hence mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) by A3, FINSEQ_5:60; ::_thesis: verum end; case len f1 < k1 ; ::_thesis: mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) then mid (f1,k1,k1) = <*> D by Lm5; hence mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) by A3; ::_thesis: verum end; end; end; hence mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) ; ::_thesis: verum end; end; end; hence mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) ; ::_thesis: verum end; caseA6: k1 > k2 ; ::_thesis: mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) then mid (f1,k1,k2) = Rev ((f1 /^ (k2 -' 1)) | ((k1 -' k2) + 1)) by FINSEQ_6:def_3; hence mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) by A6, FINSEQ_6:def_3; ::_thesis: verum end; end; end; hence mid (f1,k1,k2) = Rev (mid (f1,k2,k1)) ; ::_thesis: verum end; Lm7: for h being FinSequence of (TOP-REAL 2) for i1, i2 being Element of NAT st 1 <= i1 & i1 <= len h & 1 <= i2 & i2 <= len h holds L~ (mid (h,i1,i2)) c= L~ h proof let h be FinSequence of (TOP-REAL 2); ::_thesis: for i1, i2 being Element of NAT st 1 <= i1 & i1 <= len h & 1 <= i2 & i2 <= len h holds L~ (mid (h,i1,i2)) c= L~ h let i1, i2 be Element of NAT ; ::_thesis: ( 1 <= i1 & i1 <= len h & 1 <= i2 & i2 <= len h implies L~ (mid (h,i1,i2)) c= L~ h ) assume that A1: 1 <= i1 and A2: i1 <= len h and A3: 1 <= i2 and A4: i2 <= len h ; ::_thesis: L~ (mid (h,i1,i2)) c= L~ h thus L~ (mid (h,i1,i2)) c= L~ h ::_thesis: verum proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in L~ (mid (h,i1,i2)) or x in L~ h ) assume A5: x in L~ (mid (h,i1,i2)) ; ::_thesis: x in L~ h now__::_thesis:_(_(_i1_<=_i2_&_x_in_L~_h_)_or_(_i1_>_i2_&_x_in_L~_h_)_) percases ( i1 <= i2 or i1 > i2 ) ; caseA6: i1 <= i2 ; ::_thesis: x in L~ h x in union { (LSeg ((mid (h,i1,i2)),i)) where i is Element of NAT : ( 1 <= i & i + 1 <= len (mid (h,i1,i2)) ) } by A5, TOPREAL1:def_4; then consider Y being set such that A7: ( x in Y & Y in { (LSeg ((mid (h,i1,i2)),i)) where i is Element of NAT : ( 1 <= i & i + 1 <= len (mid (h,i1,i2)) ) } ) by TARSKI:def_4; consider i being Element of NAT such that A8: Y = LSeg ((mid (h,i1,i2)),i) and A9: 1 <= i and A10: i + 1 <= len (mid (h,i1,i2)) by A7; A11: LSeg ((mid (h,i1,i2)),i) = LSeg (((mid (h,i1,i2)) /. i),((mid (h,i1,i2)) /. (i + 1))) by A9, A10, TOPREAL1:def_3; len (mid (h,i1,i2)) = (i2 -' i1) + 1 by A1, A2, A3, A4, A6, FINSEQ_6:118; then (i + 1) - 1 <= ((i2 -' i1) + 1) - 1 by A10, XREAL_1:9; then i <= i2 - i1 by A6, XREAL_1:233; then A12: i + i1 <= (i2 - i1) + i1 by XREAL_1:6; then A13: i + i1 <= len h by A4, XXREAL_0:2; 1 + 1 <= i + i1 by A1, A9, XREAL_1:7; then A14: (1 + 1) - 1 <= (i + i1) - 1 by XREAL_1:9; then 1 <= (i + i1) -' 1 by A1, NAT_1:12, XREAL_1:233; then A15: h /. ((i + i1) -' 1) = h . ((i + i1) -' 1) by A13, FINSEQ_4:15, NAT_D:44; 1 <= i + 1 by NAT_1:11; then A16: (mid (h,i1,i2)) . (i + 1) = h . (((i + 1) + i1) -' 1) by A1, A2, A3, A4, A6, A10, FINSEQ_6:118; A17: ((i + 1) + i1) -' 1 = ((i + 1) + i1) - 1 by A1, NAT_1:12, XREAL_1:233 .= i + i1 ; then A18: ((i + 1) + i1) -' 1 = ((i + i1) - 1) + 1 .= ((i + i1) -' 1) + 1 by A1, NAT_1:12, XREAL_1:233 ; i <= i + 1 by NAT_1:11; then A19: i <= len (mid (h,i1,i2)) by A10, XXREAL_0:2; then A20: (mid (h,i1,i2)) /. i = (mid (h,i1,i2)) . i by A9, FINSEQ_4:15; A21: (mid (h,i1,i2)) /. (i + 1) = (mid (h,i1,i2)) . (i + 1) by A10, FINSEQ_4:15, NAT_1:11; A22: i + i1 <= len h by A4, A12, XXREAL_0:2; (mid (h,i1,i2)) . i = h . ((i + i1) -' 1) by A1, A2, A3, A4, A6, A9, A19, FINSEQ_6:118; then LSeg ((mid (h,i1,i2)),i) = LSeg ((h /. ((i + i1) -' 1)),(h /. (((i + 1) + i1) -' 1))) by A1, A11, A16, A20, A21, A15, A17, A22, FINSEQ_4:15, NAT_1:12 .= LSeg (h,((i + i1) -' 1)) by A14, A13, A17, A18, TOPREAL1:def_3 ; then LSeg ((mid (h,i1,i2)),i) in { (LSeg (h,j)) where j is Element of NAT : ( 1 <= j & j + 1 <= len h ) } by A14, A17, A18, A22; then x in union { (LSeg (h,j)) where j is Element of NAT : ( 1 <= j & j + 1 <= len h ) } by A7, A8, TARSKI:def_4; hence x in L~ h by TOPREAL1:def_4; ::_thesis: verum end; caseA23: i1 > i2 ; ::_thesis: x in L~ h mid (h,i1,i2) = Rev (mid (h,i2,i1)) by Lm6; then x in L~ (mid (h,i2,i1)) by A5, SPPOL_2:22; then x in union { (LSeg ((mid (h,i2,i1)),i)) where i is Element of NAT : ( 1 <= i & i + 1 <= len (mid (h,i2,i1)) ) } by TOPREAL1:def_4; then consider Y being set such that A24: ( x in Y & Y in { (LSeg ((mid (h,i2,i1)),i)) where i is Element of NAT : ( 1 <= i & i + 1 <= len (mid (h,i2,i1)) ) } ) by TARSKI:def_4; consider i being Element of NAT such that A25: Y = LSeg ((mid (h,i2,i1)),i) and A26: 1 <= i and A27: i + 1 <= len (mid (h,i2,i1)) by A24; A28: LSeg ((mid (h,i2,i1)),i) = LSeg (((mid (h,i2,i1)) /. i),((mid (h,i2,i1)) /. (i + 1))) by A26, A27, TOPREAL1:def_3; len (mid (h,i2,i1)) = (i1 -' i2) + 1 by A1, A2, A3, A4, A23, FINSEQ_6:118; then (i + 1) - 1 <= ((i1 -' i2) + 1) - 1 by A27, XREAL_1:9; then i <= i1 - i2 by A23, XREAL_1:233; then A29: i + i2 <= (i1 - i2) + i2 by XREAL_1:6; then A30: i + i2 <= len h by A2, XXREAL_0:2; 1 + 1 <= i + i2 by A3, A26, XREAL_1:7; then A31: (1 + 1) - 1 <= (i + i2) - 1 by XREAL_1:9; then 1 <= (i + i2) -' 1 by A3, NAT_1:12, XREAL_1:233; then A32: h /. ((i + i2) -' 1) = h . ((i + i2) -' 1) by A30, FINSEQ_4:15, NAT_D:44; 1 <= i + 1 by NAT_1:11; then A33: (mid (h,i2,i1)) . (i + 1) = h . (((i + 1) + i2) -' 1) by A1, A2, A3, A4, A23, A27, FINSEQ_6:118; A34: ((i + 1) + i2) -' 1 = ((i + 1) + i2) - 1 by A3, NAT_1:12, XREAL_1:233 .= i + i2 ; then A35: ((i + 1) + i2) -' 1 = ((i + i2) - 1) + 1 .= ((i + i2) -' 1) + 1 by A3, NAT_1:12, XREAL_1:233 ; i <= i + 1 by NAT_1:11; then A36: i <= len (mid (h,i2,i1)) by A27, XXREAL_0:2; then A37: (mid (h,i2,i1)) /. i = (mid (h,i2,i1)) . i by A26, FINSEQ_4:15; A38: (mid (h,i2,i1)) /. (i + 1) = (mid (h,i2,i1)) . (i + 1) by A27, FINSEQ_4:15, NAT_1:11; A39: i + i2 <= len h by A2, A29, XXREAL_0:2; (mid (h,i2,i1)) . i = h . ((i + i2) -' 1) by A1, A2, A3, A4, A23, A26, A36, FINSEQ_6:118; then LSeg ((mid (h,i2,i1)),i) = LSeg ((h /. ((i + i2) -' 1)),(h /. (((i + 1) + i2) -' 1))) by A3, A28, A33, A37, A38, A32, A34, A39, FINSEQ_4:15, NAT_1:12 .= LSeg (h,((i + i2) -' 1)) by A31, A30, A34, A35, TOPREAL1:def_3 ; then LSeg ((mid (h,i2,i1)),i) in { (LSeg (h,j)) where j is Element of NAT : ( 1 <= j & j + 1 <= len h ) } by A31, A34, A35, A39; then x in union { (LSeg (h,j)) where j is Element of NAT : ( 1 <= j & j + 1 <= len h ) } by A24, A25, TARSKI:def_4; hence x in L~ h by TOPREAL1:def_4; ::_thesis: verum end; end; end; hence x in L~ h ; ::_thesis: verum end; end; Lm8: for i, j being Element of NAT for D being non empty set for f being FinSequence of D st i in dom f & j in dom f holds len (mid (f,i,j)) >= 1 proof let i, j be Element of NAT ; ::_thesis: for D being non empty set for f being FinSequence of D st i in dom f & j in dom f holds len (mid (f,i,j)) >= 1 let D be non empty set ; ::_thesis: for f being FinSequence of D st i in dom f & j in dom f holds len (mid (f,i,j)) >= 1 let f be FinSequence of D; ::_thesis: ( i in dom f & j in dom f implies len (mid (f,i,j)) >= 1 ) A1: ( i <= j or j < i ) ; assume A2: i in dom f ; ::_thesis: ( not j in dom f or len (mid (f,i,j)) >= 1 ) then A3: i <= len f by FINSEQ_3:25; assume A4: j in dom f ; ::_thesis: len (mid (f,i,j)) >= 1 then A5: 1 <= j by FINSEQ_3:25; A6: j <= len f by A4, FINSEQ_3:25; 1 <= i by A2, FINSEQ_3:25; then ( len (mid (f,i,j)) = (i -' j) + 1 or len (mid (f,i,j)) = (j -' i) + 1 ) by A3, A5, A6, A1, FINSEQ_6:118; hence len (mid (f,i,j)) >= 1 by NAT_1:11; ::_thesis: verum end; Lm9: for i, j being Element of NAT for D being non empty set for f being FinSequence of D st i in dom f & j in dom f holds not mid (f,i,j) is empty proof let i, j be Element of NAT ; ::_thesis: for D being non empty set for f being FinSequence of D st i in dom f & j in dom f holds not mid (f,i,j) is empty let D be non empty set ; ::_thesis: for f being FinSequence of D st i in dom f & j in dom f holds not mid (f,i,j) is empty let f be FinSequence of D; ::_thesis: ( i in dom f & j in dom f implies not mid (f,i,j) is empty ) assume that A1: i in dom f and A2: j in dom f ; ::_thesis: not mid (f,i,j) is empty len (mid (f,i,j)) >= 1 by A1, A2, Lm8; hence not mid (f,i,j) is empty ; ::_thesis: verum end; Lm10: for i, j being Element of NAT for D being non empty set for f being FinSequence of D st i in dom f & j in dom f holds (mid (f,i,j)) /. 1 = f /. i proof let i, j be Element of NAT ; ::_thesis: for D being non empty set for f being FinSequence of D st i in dom f & j in dom f holds (mid (f,i,j)) /. 1 = f /. i let D be non empty set ; ::_thesis: for f being FinSequence of D st i in dom f & j in dom f holds (mid (f,i,j)) /. 1 = f /. i let f be FinSequence of D; ::_thesis: ( i in dom f & j in dom f implies (mid (f,i,j)) /. 1 = f /. i ) assume A1: i in dom f ; ::_thesis: ( not j in dom f or (mid (f,i,j)) /. 1 = f /. i ) then A2: 1 <= i by FINSEQ_3:25; A3: i <= len f by A1, FINSEQ_3:25; assume A4: j in dom f ; ::_thesis: (mid (f,i,j)) /. 1 = f /. i then A5: 1 <= j by FINSEQ_3:25; A6: j <= len f by A4, FINSEQ_3:25; not mid (f,i,j) is empty by A1, A4, Lm9; then 1 in dom (mid (f,i,j)) by FINSEQ_5:6; hence (mid (f,i,j)) /. 1 = (mid (f,i,j)) . 1 by PARTFUN1:def_6 .= f . i by A2, A3, A5, A6, FINSEQ_6:118 .= f /. i by A1, PARTFUN1:def_6 ; ::_thesis: verum end; theorem Th42: :: JORDAN3:42 for f being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st p in L~ f holds L~ (L_Cut (f,p)) c= L~ f proof let f be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st p in L~ f holds L~ (L_Cut (f,p)) c= L~ f let p be Point of (TOP-REAL 2); ::_thesis: ( p in L~ f implies L~ (L_Cut (f,p)) c= L~ f ) assume A1: p in L~ f ; ::_thesis: L~ (L_Cut (f,p)) c= L~ f Index (p,f) < len f by A1, Th8; then A2: (Index (p,f)) + 1 <= len f by NAT_1:13; A3: 1 <= Index (p,f) by A1, Th8; then A4: 1 < (Index (p,f)) + 1 by NAT_1:13; then A5: (Index (p,f)) + 1 in dom f by A2, FINSEQ_3:25; len f <> 0 by A1, TOPREAL1:22; then A6: len f >= 0 + 1 by NAT_1:13; then A7: len f in dom f by FINSEQ_3:25; percases ( p = f . ((Index (p,f)) + 1) or p <> f . ((Index (p,f)) + 1) ) ; suppose p = f . ((Index (p,f)) + 1) ; ::_thesis: L~ (L_Cut (f,p)) c= L~ f then L_Cut (f,p) = mid (f,((Index (p,f)) + 1),(len f)) by Def3; hence L~ (L_Cut (f,p)) c= L~ f by A6, A4, A2, Lm7; ::_thesis: verum end; suppose p <> f . ((Index (p,f)) + 1) ; ::_thesis: L~ (L_Cut (f,p)) c= L~ f then A8: L_Cut (f,p) = <*p*> ^ (mid (f,((Index (p,f)) + 1),(len f))) by Def3; A9: f /. ((Index (p,f)) + 1) in LSeg ((f /. (Index (p,f))),(f /. ((Index (p,f)) + 1))) by RLTOPSP1:68; p in LSeg (f,(Index (p,f))) by A1, Th9; then A10: p in LSeg ((f /. (Index (p,f))),(f /. ((Index (p,f)) + 1))) by A3, A2, TOPREAL1:def_3; A11: LSeg ((f /. (Index (p,f))),(f /. ((Index (p,f)) + 1))) c= L~ f by A1, A2, Th8, SPPOL_2:16; (mid (f,((Index (p,f)) + 1),(len f))) /. 1 = f /. ((Index (p,f)) + 1) by A7, A5, Lm10; then LSeg (p,((mid (f,((Index (p,f)) + 1),(len f))) /. 1)) c= LSeg ((f /. (Index (p,f))),(f /. ((Index (p,f)) + 1))) by A10, A9, TOPREAL1:6; then A12: LSeg (p,((mid (f,((Index (p,f)) + 1),(len f))) /. 1)) c= L~ f by A11, XBOOLE_1:1; mid (f,((Index (p,f)) + 1),(len f)) <> {} by A7, A5, Lm8, CARD_1:27; then A13: L~ (<*p*> ^ (mid (f,((Index (p,f)) + 1),(len f)))) = (LSeg (p,((mid (f,((Index (p,f)) + 1),(len f))) /. 1))) \/ (L~ (mid (f,((Index (p,f)) + 1),(len f)))) by SPPOL_2:20; L~ (mid (f,((Index (p,f)) + 1),(len f))) c= L~ f by A6, A4, A2, Lm7; hence L~ (L_Cut (f,p)) c= L~ f by A8, A13, A12, XBOOLE_1:8; ::_thesis: verum end; end; end; theorem Th43: :: JORDAN3:43 for f, g being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st f . (len f) = g . 1 & p in L~ f & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} & p <> f . (len f) holds (L_Cut (f,p)) ^ (mid (g,2,(len g))) is_S-Seq_joining p,g /. (len g) proof let f, g be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st f . (len f) = g . 1 & p in L~ f & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} & p <> f . (len f) holds (L_Cut (f,p)) ^ (mid (g,2,(len g))) is_S-Seq_joining p,g /. (len g) let p be Point of (TOP-REAL 2); ::_thesis: ( f . (len f) = g . 1 & p in L~ f & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} & p <> f . (len f) implies (L_Cut (f,p)) ^ (mid (g,2,(len g))) is_S-Seq_joining p,g /. (len g) ) assume that A1: f . (len f) = g . 1 and A2: p in L~ f and A3: f is being_S-Seq and A4: g is being_S-Seq and A5: (L~ f) /\ (L~ g) = {(g . 1)} and A6: p <> f . (len f) ; ::_thesis: (L_Cut (f,p)) ^ (mid (g,2,(len g))) is_S-Seq_joining p,g /. (len g) L_Cut (f,p) is_S-Seq_joining p,f /. (len f) by A2, A3, A6, Th33; then A7: (L_Cut (f,p)) . (len (L_Cut (f,p))) = f /. (len f) by Def2; A8: len g >= 2 by A4, TOPREAL1:def_8; then A9: 1 <= len g by XXREAL_0:2; g /. 1 in LSeg ((g /. 1),(g /. (1 + 1))) by RLTOPSP1:68; then g /. 1 in LSeg (g,1) by A8, TOPREAL1:def_3; then g . 1 in LSeg (g,1) by A9, FINSEQ_4:15; then A10: g . 1 in L~ g by SPPOL_2:17; L~ (L_Cut (f,p)) c= L~ f by A2, Th42; then A11: (L~ (L_Cut (f,p))) /\ (L~ g) c= (L~ f) /\ (L~ g) by XBOOLE_1:27; len f >= 2 by A3, TOPREAL1:def_8; then A12: 1 <= len f by XXREAL_0:2; A13: L_Cut (f,p) is being_S-Seq by A2, A3, A6, Th34; then A14: 1 + 1 <= len (L_Cut (f,p)) by TOPREAL1:def_8; then A15: (1 + 1) - 1 <= (len (L_Cut (f,p))) - 1 by XREAL_1:9; A16: 1 <= len (L_Cut (f,p)) by A14, XXREAL_0:2; then (L_Cut (f,p)) . 1 = (L_Cut (f,p)) /. 1 by FINSEQ_4:15; then A17: (L_Cut (f,p)) /. 1 = p by A2, Th23; A18: ((len (L_Cut (f,p))) -' 1) + 1 = len (L_Cut (f,p)) by A14, XREAL_1:235, XXREAL_0:2; then (L_Cut (f,p)) /. (len (L_Cut (f,p))) in LSeg (((L_Cut (f,p)) /. ((len (L_Cut (f,p))) -' 1)),((L_Cut (f,p)) /. (((len (L_Cut (f,p))) -' 1) + 1))) by RLTOPSP1:68; then (L_Cut (f,p)) . (len (L_Cut (f,p))) in LSeg (((L_Cut (f,p)) /. ((len (L_Cut (f,p))) -' 1)),((L_Cut (f,p)) /. (((len (L_Cut (f,p))) -' 1) + 1))) by A16, FINSEQ_4:15; then (L_Cut (f,p)) . (len (L_Cut (f,p))) in LSeg ((L_Cut (f,p)),((len (L_Cut (f,p))) -' 1)) by A15, A18, TOPREAL1:def_3; then f /. (len f) in L~ (L_Cut (f,p)) by A7, SPPOL_2:17; then f . (len f) in L~ (L_Cut (f,p)) by A12, FINSEQ_4:15; then g . 1 in (L~ (L_Cut (f,p))) /\ (L~ g) by A1, A10, XBOOLE_0:def_4; then {(g . 1)} c= (L~ (L_Cut (f,p))) /\ (L~ g) by ZFMISC_1:31; then (L~ (L_Cut (f,p))) /\ (L~ g) = {(g . 1)} by A5, A11, XBOOLE_0:def_10; hence (L_Cut (f,p)) ^ (mid (g,2,(len g))) is_S-Seq_joining p,g /. (len g) by A1, A4, A12, A13, A7, A17, Th39, FINSEQ_4:15; ::_thesis: verum end; theorem :: JORDAN3:44 for f, g being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st f . (len f) = g . 1 & p in L~ f & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} & p <> f . (len f) holds (L_Cut (f,p)) ^ (mid (g,2,(len g))) is being_S-Seq proof let f, g be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st f . (len f) = g . 1 & p in L~ f & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} & p <> f . (len f) holds (L_Cut (f,p)) ^ (mid (g,2,(len g))) is being_S-Seq let p be Point of (TOP-REAL 2); ::_thesis: ( f . (len f) = g . 1 & p in L~ f & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} & p <> f . (len f) implies (L_Cut (f,p)) ^ (mid (g,2,(len g))) is being_S-Seq ) assume that A1: f . (len f) = g . 1 and A2: p in L~ f and A3: f is being_S-Seq and A4: g is being_S-Seq and A5: (L~ f) /\ (L~ g) = {(g . 1)} and A6: p <> f . (len f) ; ::_thesis: (L_Cut (f,p)) ^ (mid (g,2,(len g))) is being_S-Seq (L_Cut (f,p)) ^ (mid (g,2,(len g))) is_S-Seq_joining p,g /. (len g) by A1, A2, A3, A4, A5, A6, Th43; hence (L_Cut (f,p)) ^ (mid (g,2,(len g))) is being_S-Seq by Def2; ::_thesis: verum end; theorem Th45: :: JORDAN3:45 for f, g being FinSequence of (TOP-REAL 2) st f . (len f) = g . 1 & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} holds (mid (f,1,((len f) -' 1))) ^ g is being_S-Seq proof let f, g be FinSequence of (TOP-REAL 2); ::_thesis: ( f . (len f) = g . 1 & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} implies (mid (f,1,((len f) -' 1))) ^ g is being_S-Seq ) assume that A1: f . (len f) = g . 1 and A2: f is being_S-Seq and A3: g is being_S-Seq and A4: (L~ f) /\ (L~ g) = {(g . 1)} ; ::_thesis: (mid (f,1,((len f) -' 1))) ^ g is being_S-Seq A5: Rev f is being_S-Seq by A2; L~ (Rev f) = L~ f by SPPOL_2:22; then A6: (L~ (Rev g)) /\ (L~ (Rev f)) = {(g . 1)} by A4, SPPOL_2:22; A7: (Rev f) . 1 = f . (len f) by FINSEQ_5:62; A8: Rev g is being_S-Seq by A3; (Rev g) . (len (Rev g)) = (Rev (Rev g)) . 1 by FINSEQ_5:62 .= (Rev f) . 1 by A1, A7 ; then A9: (Rev g) ^ (mid ((Rev f),2,(len (Rev f)))) is being_S-Seq by A1, A5, A8, A6, A7, Th38; A10: (len f) -' 1 <= len f by NAT_D:50; A11: len (Rev f) = len f by FINSEQ_5:def_3; A12: len f >= 2 by A2, TOPREAL1:def_8; then A13: (len f) - 1 >= (1 + 1) - 1 by XREAL_1:9; A14: ((len f) -' 1) + 1 = ((len f) - 1) + 1 by A12, XREAL_1:233, XXREAL_0:2 .= len f ; A15: ((len f) -' ((len f) -' 1)) + 1 = ((len f) - ((len f) -' 1)) + 1 by NAT_D:50, XREAL_1:233 .= ((len f) - ((len f) - 1)) + 1 by A12, XREAL_1:233, XXREAL_0:2 .= 2 ; 1 <= len f by A12, XXREAL_0:2; then (Rev g) ^ (Rev (mid (f,1,((len f) -' 1)))) is being_S-Seq by A13, A10, A15, A11, A14, A9, FINSEQ_6:113; then Rev ((mid (f,1,((len f) -' 1))) ^ g) is being_S-Seq by FINSEQ_5:64; then Rev (Rev ((mid (f,1,((len f) -' 1))) ^ g)) is being_S-Seq ; hence (mid (f,1,((len f) -' 1))) ^ g is being_S-Seq ; ::_thesis: verum end; theorem Th46: :: JORDAN3:46 for f, g being FinSequence of (TOP-REAL 2) st f . (len f) = g . 1 & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} holds (mid (f,1,((len f) -' 1))) ^ g is_S-Seq_joining f /. 1,g /. (len g) proof let f, g be FinSequence of (TOP-REAL 2); ::_thesis: ( f . (len f) = g . 1 & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} implies (mid (f,1,((len f) -' 1))) ^ g is_S-Seq_joining f /. 1,g /. (len g) ) assume that A1: f . (len f) = g . 1 and A2: f is being_S-Seq and A3: g is being_S-Seq and A4: (L~ f) /\ (L~ g) = {(g . 1)} ; ::_thesis: (mid (f,1,((len f) -' 1))) ^ g is_S-Seq_joining f /. 1,g /. (len g) A5: (len f) -' 1 <= len f by NAT_D:50; A6: len f >= 2 by A2, TOPREAL1:def_8; then (1 + 1) - 1 <= (len f) - 1 by XREAL_1:9; then A7: 1 <= (len f) -' 1 by NAT_D:39; A8: 1 <= len f by A6, XXREAL_0:2; then len (mid (f,1,((len f) -' 1))) = (((len f) -' 1) -' 1) + 1 by A5, A7, FINSEQ_6:118 .= (((len f) -' 1) - 1) + 1 by A7, XREAL_1:233 .= (len f) -' 1 ; then A9: ((mid (f,1,((len f) -' 1))) ^ g) . 1 = (mid (f,1,((len f) -' 1))) . 1 by A7, FINSEQ_1:64 .= f . 1 by A5, A7, FINSEQ_6:123 .= f /. 1 by A8, FINSEQ_4:15 ; A10: len ((mid (f,1,((len f) -' 1))) ^ g) = (len (mid (f,1,((len f) -' 1)))) + (len g) by FINSEQ_1:22; A11: len g >= 2 by A3, TOPREAL1:def_8; then A12: 1 <= len g by XXREAL_0:2; 0 + (len (mid (f,1,((len f) -' 1)))) < (len g) + (len (mid (f,1,((len f) -' 1)))) by A11, XREAL_1:6; then A13: ((mid (f,1,((len f) -' 1))) ^ g) . (len ((mid (f,1,((len f) -' 1))) ^ g)) = g . ((len ((mid (f,1,((len f) -' 1))) ^ g)) - (len (mid (f,1,((len f) -' 1))))) by A10, FINSEQ_6:108 .= g /. (len g) by A12, A10, FINSEQ_4:15 ; (mid (f,1,((len f) -' 1))) ^ g is being_S-Seq by A1, A2, A3, A4, Th45; hence (mid (f,1,((len f) -' 1))) ^ g is_S-Seq_joining f /. 1,g /. (len g) by A9, A13, Def2; ::_thesis: verum end; theorem Th47: :: JORDAN3:47 for f, g being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st f . (len f) = g . 1 & p in L~ g & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} & p <> g . 1 holds (mid (f,1,((len f) -' 1))) ^ (R_Cut (g,p)) is_S-Seq_joining f /. 1,p proof let f, g be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st f . (len f) = g . 1 & p in L~ g & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} & p <> g . 1 holds (mid (f,1,((len f) -' 1))) ^ (R_Cut (g,p)) is_S-Seq_joining f /. 1,p let p be Point of (TOP-REAL 2); ::_thesis: ( f . (len f) = g . 1 & p in L~ g & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} & p <> g . 1 implies (mid (f,1,((len f) -' 1))) ^ (R_Cut (g,p)) is_S-Seq_joining f /. 1,p ) assume that A1: f . (len f) = g . 1 and A2: p in L~ g and A3: f is being_S-Seq and A4: g is being_S-Seq and A5: (L~ f) /\ (L~ g) = {(g . 1)} and A6: p <> g . 1 ; ::_thesis: (mid (f,1,((len f) -' 1))) ^ (R_Cut (g,p)) is_S-Seq_joining f /. 1,p len g >= 2 by A4, TOPREAL1:def_8; then A7: 1 <= len g by XXREAL_0:2; R_Cut (g,p) is_S-Seq_joining g /. 1,p by A2, A4, A6, Th32; then A8: (R_Cut (g,p)) . 1 = g /. 1 by Def2; then A9: (R_Cut (g,p)) . 1 = f . (len f) by A1, A7, FINSEQ_4:15; A10: len f >= 2 by A3, TOPREAL1:def_8; then A11: 1 <= len f by XXREAL_0:2; A12: (1 + 1) - 1 <= (len f) - 1 by A10, XREAL_1:9; A13: ((len f) -' 1) + 1 = len f by A10, XREAL_1:235, XXREAL_0:2; then f /. (len f) in LSeg ((f /. ((len f) -' 1)),(f /. (((len f) -' 1) + 1))) by RLTOPSP1:68; then f /. (len f) in LSeg (f,((len f) -' 1)) by A12, A13, TOPREAL1:def_3; then f . (len f) in LSeg (f,((len f) -' 1)) by A11, FINSEQ_4:15; then A14: f . (len f) in L~ f by SPPOL_2:17; A15: R_Cut (g,p) is being_S-Seq by A2, A4, A6, Th35; then A16: 1 + 1 <= len (R_Cut (g,p)) by TOPREAL1:def_8; then A17: 1 <= len (R_Cut (g,p)) by XXREAL_0:2; then (R_Cut (g,p)) . (len (R_Cut (g,p))) = (R_Cut (g,p)) /. (len (R_Cut (g,p))) by FINSEQ_4:15; then A18: (R_Cut (g,p)) /. (len (R_Cut (g,p))) = p by A2, Th24; (R_Cut (g,p)) /. 1 in LSeg (((R_Cut (g,p)) /. 1),((R_Cut (g,p)) /. (1 + 1))) by RLTOPSP1:68; then (R_Cut (g,p)) . 1 in LSeg (((R_Cut (g,p)) /. 1),((R_Cut (g,p)) /. (1 + 1))) by A17, FINSEQ_4:15; then (R_Cut (g,p)) . 1 in LSeg ((R_Cut (g,p)),1) by A16, TOPREAL1:def_3; then g /. 1 in L~ (R_Cut (g,p)) by A8, SPPOL_2:17; then g . 1 in L~ (R_Cut (g,p)) by A7, FINSEQ_4:15; then f . (len f) in (L~ f) /\ (L~ (R_Cut (g,p))) by A1, A14, XBOOLE_0:def_4; then A19: {(f . (len f))} c= (L~ f) /\ (L~ (R_Cut (g,p))) by ZFMISC_1:31; L~ (R_Cut (g,p)) c= L~ g by A2, Th41; then (L~ f) /\ (L~ (R_Cut (g,p))) c= (L~ f) /\ (L~ g) by XBOOLE_1:27; then (L~ f) /\ (L~ (R_Cut (g,p))) = {((R_Cut (g,p)) . 1)} by A1, A5, A9, A19, XBOOLE_0:def_10; hence (mid (f,1,((len f) -' 1))) ^ (R_Cut (g,p)) is_S-Seq_joining f /. 1,p by A3, A15, A9, A18, Th46; ::_thesis: verum end; theorem :: JORDAN3:48 for f, g being FinSequence of (TOP-REAL 2) for p being Point of (TOP-REAL 2) st f . (len f) = g . 1 & p in L~ g & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} & p <> g . 1 holds (mid (f,1,((len f) -' 1))) ^ (R_Cut (g,p)) is being_S-Seq proof let f, g be FinSequence of (TOP-REAL 2); ::_thesis: for p being Point of (TOP-REAL 2) st f . (len f) = g . 1 & p in L~ g & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} & p <> g . 1 holds (mid (f,1,((len f) -' 1))) ^ (R_Cut (g,p)) is being_S-Seq let p be Point of (TOP-REAL 2); ::_thesis: ( f . (len f) = g . 1 & p in L~ g & f is being_S-Seq & g is being_S-Seq & (L~ f) /\ (L~ g) = {(g . 1)} & p <> g . 1 implies (mid (f,1,((len f) -' 1))) ^ (R_Cut (g,p)) is being_S-Seq ) assume that A1: f . (len f) = g . 1 and A2: p in L~ g and A3: f is being_S-Seq and A4: g is being_S-Seq and A5: (L~ f) /\ (L~ g) = {(g . 1)} and A6: p <> g . 1 ; ::_thesis: (mid (f,1,((len f) -' 1))) ^ (R_Cut (g,p)) is being_S-Seq (mid (f,1,((len f) -' 1))) ^ (R_Cut (g,p)) is_S-Seq_joining f /. 1,p by A1, A2, A3, A4, A5, A6, Th47; hence (mid (f,1,((len f) -' 1))) ^ (R_Cut (g,p)) is being_S-Seq by Def2; ::_thesis: verum end;