JORDAN9

index · ← TOPREAL8 · JORDAN10 →
:: Cages, external approximation of Jordan's curve
::  by Czes{\l}aw Byli\'nski and Mariusz \.Zynel
::
:: Received June 22, 1999
:: Copyright (c) 1999-2026 Association of Mizar Users
::           (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
:: This code can be distributed under the GNU General Public Licence
:: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
:: License version 3.0 or later, subject to the binding interpretation
:: detailed in file COPYING.interpretation.
:: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these
:: licenses, or see http://www.gnu.org/licenses/gpl.html and
:: http://creativecommons.org/licenses/by-sa/3.0/.

environ

 vocabularies NUMBERS, SUBSET_1, XBOOLE_0, FINSEQ_1, XXREAL_0, ARYTM_1,
      ARYTM_3, PRE_TOPC, RELAT_2, CONNSP_1, TARSKI, RELAT_1, FINSEQ_5,
      PARTFUN1, GOBOARD1, EUCLID, REAL_1, MATRIX_1, COMPLEX1, GOBRD13, FUNCT_1,
      TOPREAL1, RFINSEQ, RLTOPSP1, GOBOARD5, TOPS_1, TREES_1, SPPOL_1, MCART_1,
      CARD_1, GOBOARD9, RCOMP_1, NAT_1, JORDAN8, PSCOMP_1, NEWTON, SPRECT_2,
      ORDINAL4, STRUCT_0, PCOMPS_1, METRIC_1, JORDAN9, CONVEX1;
 notations TARSKI, XBOOLE_0, SUBSET_1, GOBOARD5, ORDINAL1, CARD_1, NUMBERS,
      XCMPLX_0, XREAL_0, REAL_1, NAT_1, NAT_D, RELAT_1, FUNCT_1, PARTFUN1,
      FUNCT_2, COMPLEX1, FINSEQ_1, FINSEQ_2, FINSEQ_4, FINSEQ_5, NEWTON,
      RFINSEQ, STRUCT_0, XXREAL_0, MATRIX_0, MATRIX_1, METRIC_1, PRE_TOPC,
      TOPS_1, COMPTS_1, CONNSP_1, PCOMPS_1, RLTOPSP1, EUCLID, TOPREAL1,
      GOBOARD1, SPPOL_1, PSCOMP_1, SPRECT_2, GOBOARD9, JORDAN8, GOBRD13;
 constructors REAL_1, FINSEQ_4, NEWTON, RFINSEQ, NAT_D, TOPS_1, CONNSP_1,
      COMPTS_1, SPPOL_1, PSCOMP_1, GOBOARD9, SPRECT_2, JORDAN8, GOBRD13,
      RELSET_1, FUNCSDOM, PCOMPS_1, CONVEX1, MATRIX_1;
 registrations RELAT_1, FUNCT_1, ORDINAL1, XXREAL_0, XREAL_0, NAT_1, FINSEQ_1,
      STRUCT_0, EUCLID, SPPOL_2, PSCOMP_1, GOBOARD9, SPRECT_1, SPRECT_2,
      JORDAN8, NEWTON, FINSET_1, SPPOL_1, JORDAN1, MATRIX_0;
 requirements REAL, NUMERALS, SUBSET, BOOLE, ARITHM;
 definitions TARSKI, GOBOARD5, GOBRD13, XBOOLE_0, SEQM_3;
 equalities GOBOARD5, XBOOLE_0, PSCOMP_1;
 expansions TARSKI, GOBRD13;
 theorems NAT_1, FINSEQ_1, GOBOARD1, FINSEQ_4, EUCLID, FINSEQ_3, SPPOL_2,
      TARSKI, JORDAN3, PSCOMP_1, FINSEQ_5, FINSEQ_6, GOBOARD7, TOPREAL1,
      JORDAN5B, GOBOARD5, SPRECT_2, SPPOL_1, ABSVALUE, FUNCT_1, FUNCT_2,
      GOBOARD9, FINSEQ_2, UNIFORM1, SUBSET_1, GOBRD11, SPRECT_3, CARD_1,
      RFINSEQ, GOBOARD6, TOPREAL3, TOPMETR, TOPS_1, JORDAN8, GOBRD13, SPRECT_4,
      CONNSP_1, PARTFUN2, RELSET_1, SPRECT_1, XBOOLE_0, XBOOLE_1, XREAL_0,
      XCMPLX_1, XREAL_1, NEWTON, XXREAL_0, ORDINAL1, PARTFUN1, MATRIX_0, NAT_D,
      RLTOPSP1, SEQ_4;
 schemes NAT_1, RECDEF_1;

begin :: Generalities

reserve i,j,k,n for Nat,
  D for non empty set,
  f, g for FinSequence of D;

Lm1: for n st 1 <= n holds n-'1+2 = n+1
proof
  let n;
  assume 1 <= n;
  hence n-'1+2 = n+2-'1 by NAT_D:38
    .= n+1+1 - 1 by NAT_D:37
    .= n+1;
end;

theorem Th1:
  for T being non empty TopSpace for B,C1,C2,D being Subset of T st
B is connected & C1 is_a_component_of D & C2 is_a_component_of D & B meets C1 &
  B meets C2 & B c= D holds C1 = C2
proof
  let T be non empty TopSpace;
  let B,C1,C2,D be Subset of T;
  assume that
A1: B is connected and
A2: C1 is_a_component_of D & C2 is_a_component_of D and
A3: B meets C1 and
A4: B meets C2 & B c= D;
A5: B <> {} by A3,XBOOLE_1:65;
  B c= C1 & B c= C2 by A1,A2,A3,A4,GOBOARD9:4;
  hence thesis by A2,A5,GOBOARD9:1,XBOOLE_1:68;
end;

theorem Th2:
  (for n holds f|n = g|n) implies f = g
proof
  assume
A1: for n holds f|n = g|n;
A2: now
    assume
A3: len f <> len g;
    per cases by A3,XXREAL_0:1;
    suppose
A4:   len f < len g;
A5:   g|len g = g by FINSEQ_1:58;
      f|len g = f by A4,FINSEQ_1:58;
      hence contradiction by A1,A4,A5;
    end;
    suppose
A6:   len g < len f;
      then f|len f = f & g|len f = g by FINSEQ_1:58;
      hence contradiction by A1,A6;
    end;
  end;
  f|len f = f & g|len g = g by FINSEQ_1:58;
  hence thesis by A1,A2;
end;

theorem Th3:
  n in dom f implies ex k st k in dom Rev f & n+k = len f+1 & f/.n = (Rev f)/.k
proof
  assume
A1: n in dom f;
  take k = len f+1-'n;
  1 <= n by A1,FINSEQ_3:25;
  then k+1 <= k+n by XREAL_1:6;
  then
A2: k+1-'1 <= k+n -'1 by NAT_D:42;
A3: n <= len f by A1,FINSEQ_3:25;
  then n+1 <= len f+1 by XREAL_1:6;
  then
A4: 1 <= k by NAT_D:55;
  n <= len f+1 by A3,XREAL_1:145;
  then
A5: k+n = len f+1 by XREAL_1:235;
  then k+n-'1 = len f by NAT_D:34;
  then k <= len f by A2,NAT_D:34;
  then k in dom f by A4,FINSEQ_3:25;
  hence thesis by A1,A5,FINSEQ_5:57,66;
end;

theorem Th4:
  n in dom Rev f implies ex k st k in dom f & n+k = len f+1 & (Rev f)/.n = f/.k
proof
  assume n in dom Rev f;
  then n in dom f by FINSEQ_5:57;
  then consider k such that
A1: k in dom Rev f & n+k = len f+1 and
  f/.n = (Rev f)/.k by Th3;
A2: dom f = dom Rev f by FINSEQ_5:57;
  then (Rev f)/.n = f/.k by A1,FINSEQ_5:66;
  hence thesis by A1,A2;
end;

begin :: Go-board preliminaries

reserve G for Go-board,
  f, g for FinSequence of TOP-REAL 2,
  p for Point of TOP-REAL 2,
  r, s for Real,
  x for set;

theorem Th5:
  for D being non empty set for G being Matrix of D for f being
  FinSequence of D holds f is_sequence_on G iff Rev f is_sequence_on G
proof
  let D be non empty set;
  let G be Matrix of D;
  let f be FinSequence of D;
  hereby
    assume
A1: f is_sequence_on G;
A2: for n being Nat st n in dom Rev f & n+1 in dom Rev f
    for m,k,i,j being Nat
    st [m,k] in Indices G & [i,j] in Indices G & (Rev f)/.n = G*(m,k
    ) & (Rev f)/.(n+1) = G*(i,j) holds |.m-i.|+|.k-j.| = 1
    proof
      let n be Nat such that
A3:   n in dom Rev f and
A4:   n+1 in dom Rev f;
      consider l being Nat such that
A5:   l in dom f and
A6:   n+l = len f+1 and
A7:   (Rev f)/.n = f/.l by A3,Th4;
      let m,k,i,j be Nat such that
A8:   [m,k] in Indices G & [i,j] in Indices G & (Rev f)/.n = G*(m,k)
      & (Rev f)/.(n+1) = G*(i,j);
A9:   |.i-m.| = |.m-i.| & |.j-k.| = |.k-j.| by UNIFORM1:11;
      consider l9 being Nat such that
A10:  l9 in dom f and
A11:  n+1+l9 = len f+1 and
A12:  (Rev f)/.(n+1) = f/.l9 by A4,Th4;
      n+(1+l9) = n+l by A6,A11;
      hence thesis by A1,A8,A5,A7,A10,A12,A9,GOBOARD1:def 9;
    end;
    for n being Nat st n in dom Rev f
      ex i,j being Nat st [i,j] in Indices G & (Rev f)/.n = G*(i,j)
    proof
      let n be Nat;
      assume n in dom Rev f;
      then consider k such that
A13:  k in dom f and
      n+k = len f+1 and
A14:  (Rev f)/.n = f/.k by Th4;
      consider i,j being Nat such that
A15:  [i,j] in Indices G & f/.k = G*(i,j) by A1,A13,GOBOARD1:def 9;
      take i,j;
      thus thesis by A14,A15;
    end;
    hence Rev f is_sequence_on G by A2,GOBOARD1:def 9;
  end;
  assume
A16: Rev f is_sequence_on G;
A17: for n being Nat st n in dom f & n+1 in dom f
  for m,k,i,j being Nat
   st [m,k] in Indices G & [i,j] in Indices G & f/.n = G*(m,k) & f/.(n+1) = G*
  (i,j) holds |.m-i.|+|.k-j.| = 1
  proof
    let n be Nat such that
A18: n in dom f and
A19: n+1 in dom f;
    consider l being Nat such that
A20: l in dom Rev f and
A21: n+l = len f+1 and
A22: f/.n = (Rev f)/.l by A18,Th3;
    let m,k,i,j be Nat such that
A23: [m,k] in Indices G & [i,j] in Indices G & f/.n = G*(m,k) & f/.(n+
    1) = G*(i,j);
A24: |.i-m.| = |.m-i.| & |.j-k.| = |.k-j.| by UNIFORM1:11;
    consider l9 being Nat such that
A25: l9 in dom Rev f and
A26: n+1+l9 = len f+1 and
A27: f/.(n+1) = (Rev f)/.l9 by A19,Th3;
    n+(1+l9) = n+l by A21,A26;
    hence thesis by A16,A23,A20,A22,A25,A27,A24,GOBOARD1:def 9;
  end;
  for n being Nat  st n in dom f
    ex i,j being Nat st [i,j] in Indices G & f/.n = G*(i,j)
  proof
    let n be Nat;
    assume n in dom f;
    then consider k such that
A28: k in dom Rev f and
    n+k = len f+1 and
A29: f/.n = (Rev f)/.k by Th3;
    consider i,j being Nat such that
A30: [i,j] in Indices G & (Rev f)/.k = G*(i,j) by A16,A28,GOBOARD1:def 9;
    take i,j;
    thus thesis by A29,A30;
  end;
  hence thesis by A17,GOBOARD1:def 9;
end;

theorem Th6:
  for G being Matrix of TOP-REAL 2 for f being FinSequence of
  TOP-REAL 2 st f is_sequence_on G
  for k being Nat st 1 <= k & k <= len f holds f/.k in
  Values G
proof
  let G be Matrix of TOP-REAL 2;
  let f be FinSequence of TOP-REAL 2;
  assume that
A1: f is_sequence_on G;
  let k be Nat such that
A2: 1 <= k & k <= len f;
A3: k in dom f by A2,FINSEQ_3:25;
  then f/.k = f.k by PARTFUN1:def 6;
  then
A4: f/.k in rng f by A3,FUNCT_1:def 3;
  rng f c= Values G by A1,GOBRD13:8;
  hence thesis by A4;
end;

Lm2: f is_sequence_on G & 1 <= k & k <= len f
  implies ex i,j being Nat st [i,j] in Indices G & f/.k = G*(i,j)
proof
  assume that
A1: f is_sequence_on G and
A2: 1 <= k & k <= len f;
  k in dom f by A2,FINSEQ_3:25;
  then consider i,j being Nat such that
A3: [i,j] in Indices G & f/.k = G*(i,j) by A1,GOBOARD1:def 9;
  take i,j;
  thus thesis by A3;
end;

theorem Th7:
  n <= len f & x in L~(f/^n)
  implies ex i being Nat st n+1 <= i & i+1 <= len f & x in LSeg(f,i)
proof
  assume that
A1: n <= len f and
A2: x in L~(f/^n);
  consider j being Nat such that
A3: 1 <= j and
A4: j+1 <= len(f/^n) and
A5: x in LSeg(f/^n,j) by A2,SPPOL_2:13;
  j+1 <= len f - n by A1,A4,RFINSEQ:def 1;
  then
A6: n+(j+1) <= len f by XREAL_1:19;
  take n+j;
  j+1 <= len f - n by A1,A4,RFINSEQ:def 1;
  hence thesis by A3,A5,A6,SPPOL_2:5,XREAL_1:6;
end;

theorem Th8:
  f is_sequence_on G implies
 for k being Nat st 1 <= k & k+1 <= len f
  holds f/.k in left_cell(f,k,G) & f/.k in right_cell(f,k,G)
proof
  assume that
A1: f is_sequence_on G;
  let k be Nat such that
A2: 1 <= k & k+1 <= len f;
  set p = f/.k;
  LSeg(f,k) = LSeg(f/.k, f/.(k+1)) by A2,TOPREAL1:def 3;
  then p in LSeg(f,k) by RLTOPSP1:68;
  then p in left_cell(f,k,G) /\ right_cell(f,k,G) by A1,A2,GOBRD13:29;
  hence thesis by XBOOLE_0:def 4;
end;

theorem Th9:
  f is_sequence_on G implies
 for k being Nat st 1 <= k & k+1 <= len f
  holds Int left_cell(f,k,G) <> {} & Int right_cell(f,k,G) <> {}
proof
  assume
A1: f is_sequence_on G;
  let k be Nat;
  assume
A2:  1 <= k & k+1 <= len f;
  then consider i1,j1,i2,j2 being Nat such that
A3: [i1,j1] in Indices G and
A4: f/.k = G*(i1,j1) and
A5: [i2,j2] in Indices G and
A6: f/.(k+1) = G*(i2,j2) and
A7: i1 = i2 & j1+1 = j2 or i1+1 = i2 & j1 = j2 or i1 = i2+1 & j1 = j2 or
  i1 = i2 & j1 = j2+1 by A1,JORDAN8:3;
A8: i2 <= len G by A5,MATRIX_0:32;
A9: i1 <= len G by A3,MATRIX_0:32;
  then
A10: i1-'1 <= len G by NAT_D:44;
A11: j2 <= width G by A5,MATRIX_0:32;
  then
A12: j2-'1 <= width G by NAT_D:44;
A13: j1+1 > j1 & j2+1 > j2 by NAT_1:13;
A14: j1 <= width G by A3,MATRIX_0:32;
  then
A15: j1-'1 <= width G by NAT_D:44;
A16: i1+1 > i1 & i2+1 > i2 by NAT_1:13;
  per cases by A7;
  suppose
     i1 = i2 & j1+1 = j2;
    then right_cell(f,k,G) = cell(G,i1,j1) & left_cell(f,k,G) = cell(G,i1-'1,
    j1) by A1,A3,A4,A5,A6,A13,GOBRD13:def 2,def 3,A2;
    hence thesis by A9,A14,A10,GOBOARD9:14;
  end;
  suppose
    i1+1 = i2 & j1 = j2;
    then right_cell(f,k,G) = cell(G,i1,j1-'1) & left_cell(f,k,G) = cell(G,i1,
    j1) by A1,A3,A4,A5,A6,A16,GOBRD13:def 2,def 3,A2;
    hence thesis by A9,A14,A15,GOBOARD9:14;
  end;
  suppose
    i1 = i2+1 & j1 = j2;
    then
    right_cell(f,k,G) = cell(G,i2,j2) & left_cell(f,k,G) = cell(G,i2,j2-'
    1) by A1,A3,A4,A5,A6,A16,GOBRD13:def 2,def 3,A2;
    hence thesis by A8,A11,A12,GOBOARD9:14;
  end;
  suppose
    i1 = i2 & j1 = j2+1;
    then right_cell(f,k,G) = cell(G,i1-'1,j2) & left_cell(f,k,G) = cell(G,i1,
    j2) by A1,A3,A4,A5,A6,A13,GOBRD13:def 2,def 3,A2;
    hence thesis by A9,A11,A10,GOBOARD9:14;
  end;
end;

theorem Th10:
  f is_sequence_on G implies
 for k being Nat st 1 <= k & k+1 <= len f
  holds Int left_cell(f,k,G) is convex & Int right_cell(f,k,G) is convex
proof
  assume
A1: f is_sequence_on G;
  let k be Nat;
  assume
A2:  1 <= k & k+1 <= len f;
  then consider i1,j1,i2,j2 being Nat such that
A3: [i1,j1] in Indices G and
A4: f/.k = G*(i1,j1) and
A5: [i2,j2] in Indices G and
A6: f/.(k+1) = G*(i2,j2) and
A7: i1 = i2 & j1+1 = j2 or i1+1 = i2 & j1 = j2 or i1 = i2+1 & j1 = j2 or
  i1 = i2 & j1 = j2+1 by A1,JORDAN8:3;
A8: i2 <= len G by A5,MATRIX_0:32;
A9: i1 <= len G by A3,MATRIX_0:32;
  then
A10: i1-'1 <= len G by NAT_D:44;
A11: j2 <= width G by A5,MATRIX_0:32;
  then
A12: j2-'1 <= width G by NAT_D:44;
A13: j1+1 > j1 & j2+1 > j2 by NAT_1:13;
A14: j1 <= width G by A3,MATRIX_0:32;
  then
A15: j1-'1 <= width G by NAT_D:44;
A16: i1+1 > i1 & i2+1 > i2 by NAT_1:13;
  per cases by A7;
  suppose
    i1 = i2 & j1+1 = j2;
    then right_cell(f,k,G) = cell(G,i1,j1) & left_cell(f,k,G) = cell(G,i1-'1,
    j1) by A1,A3,A4,A5,A6,A13,GOBRD13:def 2,def 3,A2;
    hence thesis by A9,A14,A10,GOBOARD9:17;
  end;
  suppose
    i1+1 = i2 & j1 = j2;
    then right_cell(f,k,G) = cell(G,i1,j1-'1) & left_cell(f,k,G) = cell(G,i1,
    j1) by A1,A3,A4,A5,A6,A16,GOBRD13:def 2,def 3,A2;
    hence thesis by A9,A14,A15,GOBOARD9:17;
  end;
  suppose
    i1 = i2+1 & j1 = j2;
    then
    right_cell(f,k,G) = cell(G,i2,j2) & left_cell(f,k,G) = cell(G,i2,j2-'
    1) by A1,A3,A4,A5,A6,A16,GOBRD13:def 2,def 3,A2;
    hence thesis by A8,A11,A12,GOBOARD9:17;
  end;
  suppose
    i1 = i2 & j1 = j2+1;
    then right_cell(f,k,G) = cell(G,i1-'1,j2) & left_cell(f,k,G) = cell(G,i1,
    j2) by A1,A3,A4,A5,A6,A13,GOBRD13:def 2,def 3,A2;
    hence thesis by A9,A11,A10,GOBOARD9:17;
  end;
end;

theorem Th11:
  f is_sequence_on G & 1 <= k & k+1 <= len f implies Cl Int
left_cell(f,k,G) = left_cell(f,k,G) & Cl Int right_cell(f,k,G) = right_cell(f,k
  ,G)
proof
  assume
A1: f is_sequence_on G & 1 <= k & k+1 <= len f;
  then consider i1,j1,i2,j2 being Nat such that
A2: [i1,j1] in Indices G and
A3: f/.k = G*(i1,j1) and
A4: [i2,j2] in Indices G and
A5: f/.(k+1) = G*(i2,j2) and
A6: i1 = i2 & j1+1 = j2 or i1+1 = i2 & j1 = j2 or i1 = i2+1 & j1 = j2 or
  i1 = i2 & j1 = j2+1 by JORDAN8:3;
A7: i2 <= len G by A4,MATRIX_0:32;
A8: i1 <= len G by A2,MATRIX_0:32;
  then
A9: i1-'1 <= len G by NAT_D:44;
A10: j2 <= width G by A4,MATRIX_0:32;
  then
A11: j2-'1 <= width G by NAT_D:44;
A12: j1+1 > j1 & j2+1 > j2 by NAT_1:13;
A13: j1 <= width G by A2,MATRIX_0:32;
  then
A14: j1-'1 <= width G by NAT_D:44;
A15: i1+1 > i1 & i2+1 > i2 by NAT_1:13;
  per cases by A6;
  suppose
    i1 = i2 & j1+1 = j2;
    then right_cell(f,k,G) = cell(G,i1,j1) & left_cell(f,k,G) = cell(G,i1-'1,
    j1) by A1,A2,A3,A4,A5,A12,GOBRD13:def 2,def 3;
    hence thesis by A8,A13,A9,GOBRD11:35;
  end;
  suppose
    i1+1 = i2 & j1 = j2;
    then right_cell(f,k,G) = cell(G,i1,j1-'1) & left_cell(f,k,G) = cell(G,i1,
    j1) by A1,A2,A3,A4,A5,A15,GOBRD13:def 2,def 3;
    hence thesis by A8,A13,A14,GOBRD11:35;
  end;
  suppose
    i1 = i2+1 & j1 = j2;
    then
    right_cell(f,k,G) = cell(G,i2,j2) & left_cell(f,k,G) = cell(G,i2,j2-'
    1) by A1,A2,A3,A4,A5,A15,GOBRD13:def 2,def 3;
    hence thesis by A7,A10,A11,GOBRD11:35;
  end;
  suppose
    i1 = i2 & j1 = j2+1;
    then right_cell(f,k,G) = cell(G,i1-'1,j2) & left_cell(f,k,G) = cell(G,i1,
    j2) by A1,A2,A3,A4,A5,A12,GOBRD13:def 2,def 3;
    hence thesis by A8,A10,A9,GOBRD11:35;
  end;
end;

theorem Th12:
  f is_sequence_on G & LSeg(f,k) is horizontal implies ex j st 1
  <= j & j <= width G & for p st p in LSeg(f,k) holds p`2 = G*(1,j)`2
proof
  assume that
A1: f is_sequence_on G and
A2: LSeg(f,k) is horizontal;
  per cases;
  suppose
A3: 1 <= k & k+1 <= len f;
    k <= k+1 by NAT_1:11;
    then k <= len f by A3,XXREAL_0:2;
    then consider i,j being Nat such that
A4: [i,j] in Indices G and
A5: f/.k = G*(i,j) by A1,A3,Lm2;
     reconsider j as Nat;
    take j;
    thus
A6: 1 <= j & j <= width G by A4,MATRIX_0:32;
A7: f/.k in LSeg(f,k) by A3,TOPREAL1:21;
    let p;
A8: 1 <= i & i <= len G by A4,MATRIX_0:32;
    assume p in LSeg(f,k);
    hence p`2 = (f/.k)`2 by A2,A7,SPPOL_1:def 2
      .= G*(1,j)`2 by A5,A6,A8,GOBOARD5:1;
  end;
  suppose
A9: not(1 <= k & k+1 <= len f);
    take 1;
    width G <> 0 by MATRIX_0:def 10;
    hence 1 <= 1 & 1 <= width G by NAT_1:14;
    thus thesis by A9,TOPREAL1:def 3;
  end;
end;

theorem Th13:
  f is_sequence_on G & LSeg(f,k) is vertical implies ex i st 1 <=
  i & i <= len G & for p st p in LSeg(f,k) holds p`1 = G*(i,1)`1
proof
  assume that
A1: f is_sequence_on G and
A2: LSeg(f,k) is vertical;
  per cases;
  suppose
A3: 1 <= k & k+1 <= len f;
    k <= k+1 by NAT_1:11;
    then k <= len f by A3,XXREAL_0:2;
    then consider i,j being Nat such that
A4: [i,j] in Indices G and
A5: f/.k = G*(i,j) by A1,A3,Lm2;
     reconsider i as Nat;
    take i;
    thus
A6: 1 <= i & i <= len G by A4,MATRIX_0:32;
A7: f/.k in LSeg(f,k) by A3,TOPREAL1:21;
    let p;
A8: 1 <= j & j <= width G by A4,MATRIX_0:32;
    assume p in LSeg(f,k);
    hence p`1 = (f/.k)`1 by A2,A7,SPPOL_1:def 3
      .= G*(i,1)`1 by A5,A6,A8,GOBOARD5:2;
  end;
  suppose
A9: not(1 <= k & k+1 <= len f);
    take 1;
    0 <> len G by MATRIX_0:def 10;
    hence 1 <= 1 & 1 <= len G by NAT_1:14;
    thus thesis by A9,TOPREAL1:def 3;
  end;
end;

theorem Th14:
  f is_sequence_on G & f is special
 implies for i,j being Nat st i <= len G & j <= width G
  holds Int cell(G,i,j) misses L~f
proof
  assume that
A1: f is_sequence_on G and
A2: f is special;
  let i,j be Nat such that
A3: i <= len G and
A4: j <= width G;
A5: Int cell(G,i,j) = Int v_strip(G,i) /\ Int h_strip(G,j) by TOPS_1:17;
  assume Int cell(G,i,j) meets L~f;
  then consider x being object such that
A6: x in Int cell(G,i,j) and
A7: x in L~f by XBOOLE_0:3;
  L~f = union { LSeg(f,k) where k is Nat:
     1 <= k & k+1 <= len f } by TOPREAL1:def 4;
  then consider X being set such that
A8: x in X and
A9: X in { LSeg(f,k) where k is Nat
    : 1 <= k & k+1 <= len f } by A7,TARSKI:def 4;
  consider k being Nat such that
A10: X = LSeg(f,k) and
  1 <= k and
  k+1 <= len f by A9;
  reconsider p = x as Point of TOP-REAL 2 by A8,A10;
  per cases by A2,SPPOL_1:19;
  suppose
    LSeg(f,k) is horizontal;
    then consider j0 being Nat such that
A11: 1 <= j0 and
A12: j0 <= width G and
A13: for p being Point of TOP-REAL 2 st p in LSeg(f,k) holds p`2 = G*(
    1,j0)`2 by A1,Th12;
    now
A14:  j0 > j implies j0 >= j+1 by NAT_1:13;
      assume
A15:  p in Int h_strip(G,j);
      per cases by A14,XXREAL_0:1;
      suppose
A16:    j0 < j;
        0 <> len G by MATRIX_0:def 10;
        then 1 <= len G by NAT_1:14;
        then
A17:    G*(1,j)`2 > G*(1,j0)`2 by A4,A11,A16,GOBOARD5:4;
        j >= 1 by A11,A16,XXREAL_0:2;
        then p`2 > G*(1,j)`2 by A4,A15,GOBOARD6:27;
        hence contradiction by A8,A10,A13,A17;
      end;
      suppose
        j0 = j;
        then p`2 > G*(1,j0)`2 by A11,A12,A15,GOBOARD6:27;
        hence contradiction by A8,A10,A13;
      end;
      suppose
A18:    j0 > j+1;
        then j+1 <= width G by A12,XXREAL_0:2;
        then j < width G by NAT_1:13;
        then
A19:    p`2 < G*(1,j+1)`2 by A15,GOBOARD6:28;
        0 <> len G by MATRIX_0:def 10;
        then
A20:    1 <= len G by NAT_1:14;
        j+1 >= 1 by NAT_1:14;
        then G*(1,j+1)`2 < G*(1,j0)`2 by A12,A18,A20,GOBOARD5:4;
        hence contradiction by A8,A10,A13,A19;
      end;
      suppose
A21:    j0 = j+1;
        then j < width G by A12,NAT_1:13;
        then p`2 < G*(1,j0)`2 by A15,A21,GOBOARD6:28;
        hence contradiction by A8,A10,A13;
      end;
    end;
    hence contradiction by A6,A5,XBOOLE_0:def 4;
  end;
  suppose
    LSeg(f,k) is vertical;
    then consider i0 being Nat such that
A22: 1 <= i0 and
A23: i0 <= len G and
A24: for p being Point of TOP-REAL 2 st p in LSeg(f,k) holds p`1 = G*(
    i0,1)`1 by A1,Th13;
    now
A25:  i0 > i implies i0 >= i+1 by NAT_1:13;
      assume
A26:  p in Int v_strip(G,i);
      per cases by A25,XXREAL_0:1;
      suppose
A27:    i0 < i;
        0 <> width G by MATRIX_0:def 10;
        then 1 <= width G by NAT_1:14;
        then
A28:    G*(i,1)`1 > G*(i0,1)`1 by A3,A22,A27,GOBOARD5:3;
        i >= 1 by A22,A27,XXREAL_0:2;
        then p`1 > G*(i,1)`1 by A3,A26,GOBOARD6:29;
        hence contradiction by A8,A10,A24,A28;
      end;
      suppose
        i0 = i;
        then p`1 > G*(i0,1)`1 by A22,A23,A26,GOBOARD6:29;
        hence contradiction by A8,A10,A24;
      end;
      suppose
A29:    i0 > i+1;
        then i+1 <= len G by A23,XXREAL_0:2;
        then i < len G by NAT_1:13;
        then
A30:    p`1 < G*(i+1,1)`1 by A26,GOBOARD6:30;
        0 <> width G by MATRIX_0:def 10;
        then
A31:    1 <= width G by NAT_1:14;
        i+1 >= 1 by NAT_1:14;
        then G*(i+1,1)`1 < G*(i0,1)`1 by A23,A29,A31,GOBOARD5:3;
        hence contradiction by A8,A10,A24,A30;
      end;
      suppose
A32:    i0 = i+1;
        then i < len G by A23,NAT_1:13;
        then p`1 < G*(i0,1)`1 by A26,A32,GOBOARD6:30;
        hence contradiction by A8,A10,A24;
      end;
    end;
    hence contradiction by A6,A5,XBOOLE_0:def 4;
  end;
end;

theorem Th15:
  f is_sequence_on G & f is special implies
 for k being Nat st 1 <= k & k+1 <= len f
  holds Int left_cell(f,k,G) misses L~f & Int right_cell(f,k,G) misses L~f
proof
  assume that
A1: f is_sequence_on G and
A2: f is special;
  let k be Nat such that
A3: 1 <= k & k+1 <= len f;
  consider i1,j1,i2,j2 being Nat such that
A4: [i1,j1] in Indices G and
A5: f/.k = G*(i1,j1) and
A6: [i2,j2] in Indices G and
A7: f/.(k+1) = G*(i2,j2) and
A8: i1 = i2 & j1+1 = j2 or i1+1 = i2 & j1 = j2 or i1 = i2+1 & j1 = j2 or
  i1 = i2 & j1 = j2+1 by A1,A3,JORDAN8:3;
A9: i2 <= len G by A6,MATRIX_0:32;
A10: i1 <= len G by A4,MATRIX_0:32;
  then
A11: i1-'1 <= len G by NAT_D:44;
A12: j2 <= width G by A6,MATRIX_0:32;
  then
A13: j2-'1 <= width G by NAT_D:44;
A14: j1+1 > j1 & j2+1 > j2 by NAT_1:13;
A15: j1 <= width G by A4,MATRIX_0:32;
  then
A16: j1-'1 <= width G by NAT_D:44;
A17: i1+1 > i1 & i2+1 > i2 by NAT_1:13;
  per cases by A8;
  suppose
    i1 = i2 & j1+1 = j2;
    then right_cell(f,k,G) = cell(G,i1,j1) & left_cell(f,k,G) = cell(G,i1-'1,
    j1) by A1,A3,A4,A5,A6,A7,A14,GOBRD13:def 2,def 3;
    hence thesis by A1,A2,A10,A15,A11,Th14;
  end;
  suppose
    i1+1 = i2 & j1 = j2;
    then right_cell(f,k,G) = cell(G,i1,j1-'1) & left_cell(f,k,G) = cell(G,i1,
    j1) by A1,A3,A4,A5,A6,A7,A17,GOBRD13:def 2,def 3;
    hence thesis by A1,A2,A10,A15,A16,Th14;
  end;
  suppose
    i1 = i2+1 & j1 = j2;
    then
    right_cell(f,k,G) = cell(G,i2,j2) & left_cell(f,k,G) = cell(G,i2,j2-'
    1) by A1,A3,A4,A5,A6,A7,A17,GOBRD13:def 2,def 3;
    hence thesis by A1,A2,A9,A12,A13,Th14;
  end;
  suppose
    i1 = i2 & j1 = j2+1;
    then right_cell(f,k,G) = cell(G,i1-'1,j2) & left_cell(f,k,G) = cell(G,i1,
    j2) by A1,A3,A4,A5,A6,A7,A14,GOBRD13:def 2,def 3;
    hence thesis by A1,A2,A10,A12,A11,Th14;
  end;
end;

theorem Th16:
  1 <= i & i+1 <= len G & 1 <= j & j+1 <= width G implies G*(i,j)
`1 = G*(i,j+1)`1 & G*(i,j)`2 = G*(i+1,j)`2 & G*(i+1,j+1)`1 = G*(i+1,j)`1 & G*(i
  +1,j+1)`2 = G*(i,j+1)`2
proof
  assume that
A1: 1 <= i and
A2: i+1 <= len G and
A3: 1 <= j and
A4: j+1 <= width G;
A5: j < width G by A4,NAT_1:13;
A6: 1 <= j+1 by NAT_1:11;
A7: i < len G by A2,NAT_1:13;
  hence G*(i,j)`1 = G*(i,1)`1 by A1,A3,A5,GOBOARD5:2
    .= G*(i,j+1)`1 by A1,A4,A7,A6,GOBOARD5:2;
A8: 1 <= i+1 by NAT_1:11;
  thus G*(i,j)`2 = G*(1,j)`2 by A1,A3,A7,A5,GOBOARD5:1
    .= G*(i+1,j)`2 by A2,A3,A5,A8,GOBOARD5:1;
  thus G*(i+1,j+1)`1 = G*(i+1,1)`1 by A2,A4,A8,A6,GOBOARD5:2
    .= G*(i+1,j)`1 by A2,A3,A5,A8,GOBOARD5:2;
  thus G*(i+1,j+1)`2 = G*(1,j+1)`2 by A2,A4,A8,A6,GOBOARD5:1
    .= G*(i,j+1)`2 by A1,A4,A7,A6,GOBOARD5:1;
end;

theorem Th17:
  for i,j being Nat st 1 <= i & i+1 <= len G & 1 <= j &
j+1 <= width G holds p in cell(G,i,j) iff G*(i,j)`1 <= p`1 & p`1 <= G*(i+1,j)`1
  & G*(i,j)`2 <= p`2 & p`2 <= G*(i,j+1)`2
proof
  let i,j be Nat such that
A1: 1 <= i and
A2: i+1 <= len G and
A3: 1 <= j and
A4: j+1 <= width G;
A5: i < len G & j < width G by A2,A4,NAT_1:13;
  then
A6: h_strip(G,j) = { |[r,s]| : G*(i,j)`2 <= s & s <= G*(i,j+1)`2 } by A1,A3,
GOBOARD5:5;
A7: v_strip(G,i) = { |[r,s]| : G*(i,j)`1 <= r & r <= G*(i+1,j)`1 } by A1,A3,A5,
GOBOARD5:8;
  hereby
    assume
A8: p in cell(G,i,j);
    then p in v_strip(G,i) by XBOOLE_0:def 4;
    then ex r,s st |[r,s]| = p & G*(i,j)`1 <= r & r <= G*(i+1,j)`1 by A7;
    hence G*(i,j)`1 <= p`1 & p`1 <= G*(i+1,j)`1 by EUCLID:52;
    p in h_strip(G,j) by A8,XBOOLE_0:def 4;
    then ex r,s st |[r,s]| = p & G*(i,j)`2 <= s & s <= G*(i,j+1)`2 by A6;
    hence G*(i,j)`2 <= p`2 & p`2 <= G*(i,j+1)`2 by EUCLID:52;
  end;
  assume that
A9: G*(i,j)`1 <= p`1 & p`1 <= G*(i+1,j)`1 and
A10: G*(i,j)`2 <= p`2 & p`2 <= G*(i,j+1)`2;
A11: p = |[p`1,p`2]| by EUCLID:53;
  then
A12: p in h_strip(G,j) by A6,A10;
  p in v_strip(G,i) by A7,A9,A11;
  hence thesis by A12,XBOOLE_0:def 4;
end;

theorem
  1 <= i & i+1 <= len G & 1 <= j & j+1 <= width G implies cell(G,i,j) =
{ |[r,s]| : G*(i,j)`1 <= r & r <= G*(i+1,j)`1 & G*(i,j)`2 <= s & s <= G*(i,j+1)
  `2 }
proof
  set A = { |[r,s]| : G*(i,j)`1 <= r & r <= G*(i+1,j)`1 & G*(i,j)`2 <= s & s
  <= G*(i,j+1)`2 };
  assume
A1: 1 <= i & i+1 <= len G & 1 <= j & j+1 <= width G;
  now
    let p be object;
    assume
A2: p in cell(G,i,j);
    then reconsider q=p as Point of TOP-REAL 2;
A3: G*(i,j)`2 <= q`2 & q`2 <= G*(i,j+1)`2 by A1,A2,Th17;
A4: p = |[q`1,q`2]| by EUCLID:53;
    G*(i,j)`1 <= q`1 & q`1 <= G*(i+1,j)`1 by A1,A2,Th17;
    hence p in A by A4,A3;
  end;
  hence cell(G,i,j) c= A;
  now
    let p be object;
    assume p in A;
    then consider r,s such that
A5: |[r,s]| = p and
A6: G*(i,j)`1 <= r & r <= G*(i+1,j)`1 & G*(i,j)`2 <= s & s <= G*(i,j+ 1)`2;
    reconsider q=p as Point of TOP-REAL 2 by A5;
    r = q`1 & s = q`2 by A5,EUCLID:52;
    hence p in cell(G,i,j) by A1,A6,Th17;
  end;
  hence thesis;
end;

theorem Th19:
  1 <= i & i+1 <= len G & 1 <= j & j+1 <= width G & p in Values G
& p in cell(G,i,j) implies p = G*(i,j) or p = G*(i,j+1) or p = G*(i+1,j+1) or p
  = G*(i+1,j)
proof
  assume that
A1: 1 <= i and
A2: i+1 <= len G and
A3: 1 <= j and
A4: j+1 <= width G and
A5: p in Values G and
A6: p in cell(G,i,j);
A7: Values G = { G*(k,l) where k,l is Nat: [k,l] in Indices G }
  by MATRIX_0:39;
A8: i < len G by A2,NAT_1:13;
A9: j < width G by A4,NAT_1:13;
  consider k,l being Nat such that
A10: p = G*(k,l) and
A11: [k,l] in Indices G by A5,A7;
A12: 1 <= k by A11,MATRIX_0:32;
A13: l <= width G by A11,MATRIX_0:32;
A14: 1 <= l by A11,MATRIX_0:32;
A15: k <= len G by A11,MATRIX_0:32;
A16: 1 <= j+1 by NAT_1:11;
A17: now
    assume
A18: l <> j & l <> j+1;
    per cases by A18,NAT_1:9;
    suppose
      l < j;
      then G*(k,l)`2 < G*(k,j)`2 by A9,A12,A15,A14,GOBOARD5:4;
      then G*(k,l)`2 < G*(1,j)`2 by A3,A9,A12,A15,GOBOARD5:1;
      then G*(k,l)`2 < G*(i,j)`2 by A1,A3,A8,A9,GOBOARD5:1;
      hence contradiction by A1,A2,A3,A4,A6,A10,Th17;
    end;
    suppose
      j+1 < l;
      then G*(k,j+1)`2 < G*(k,l)`2 by A16,A12,A15,A13,GOBOARD5:4;
      then G*(1,j+1)`2 < G*(k,l)`2 by A4,A16,A12,A15,GOBOARD5:1;
      then G*(i,j+1)`2 < G*(k,l)`2 by A1,A4,A8,A16,GOBOARD5:1;
      hence contradiction by A1,A2,A3,A4,A6,A10,Th17;
    end;
  end;
A19: 1 <= i+1 by NAT_1:11;
  now
    assume
A20: k <> i & k <> i+1;
    per cases by A20,NAT_1:9;
    suppose
      k < i;
      then G*(k,l)`1 < G*(i,l)`1 by A8,A12,A14,A13,GOBOARD5:3;
      then G*(k,l)`1 < G*(i,1)`1 by A1,A8,A14,A13,GOBOARD5:2;
      then G*(k,l)`1 < G*(i,j)`1 by A1,A3,A8,A9,GOBOARD5:2;
      hence contradiction by A1,A2,A3,A4,A6,A10,Th17;
    end;
    suppose
      i+1 < k;
      then G*(i+1,l)`1 < G*(k,l)`1 by A19,A15,A14,A13,GOBOARD5:3;
      then G*(i+1,1)`1 < G*(k,l)`1 by A2,A19,A14,A13,GOBOARD5:2;
      then G*(i+1,j)`1 < G*(k,l)`1 by A2,A3,A9,A19,GOBOARD5:2;
      hence contradiction by A1,A2,A3,A4,A6,A10,Th17;
    end;
  end;
  hence thesis by A10,A17;
end;

theorem Th20:
  1 <= i & i+1 <= len G & 1 <= j & j+1 <= width G implies G*(i,j)
in cell(G,i,j) & G*(i,j+1) in cell(G,i,j) & G*(i+1,j+1) in cell(G,i,j) & G*(i+1
  ,j) in cell(G,i,j)
proof
  assume that
A1: 1 <= i and
A2: i+1 <= len G and
A3: 1 <= j and
A4: j+1 <= width G;
A5: i < i+1 & j < width G by A4,NAT_1:13;
  then
A6: G*(i,j)`1 <= G*(i+1,j)`1 by A1,A2,A3,GOBOARD5:3;
A7: G*(i,j)`1 <= G*(i+1,j)`1 by A1,A2,A3,A5,GOBOARD5:3;
A8: j < j+1 & i < len G by A2,NAT_1:13;
  then
A9: G*(i,j)`2 <= G*(i,j+1)`2 by A1,A3,A4,GOBOARD5:4;
A10: G*(i+1,j+1)`1 = G*(i+1,j)`1 by A1,A2,A3,A4,Th16;
  then
A11: G*(i,j)`1 <= G*(i+1,j+1)`1 by A1,A2,A3,A5,GOBOARD5:3;
  G*(i,j)`2 <= G*(i,j+1)`2 by A1,A3,A4,A8,GOBOARD5:4;
  hence G*(i,j) in cell(G,i,j) by A1,A2,A3,A4,A6,Th17;
A12: G*(i,j)`1 = G*(i,j+1)`1 by A1,A2,A3,A4,Th16;
  then G*(i,j+1)`1 <= G*(i+1,j)`1 by A1,A2,A3,A5,GOBOARD5:3;
  hence G*(i,j+1) in cell(G,i,j) by A1,A2,A3,A4,A12,A9,Th17;
A13: G*(i+1,j+1)`2 = G*(i,j+1)`2 by A1,A2,A3,A4,Th16;
  then G*(i,j)`2 <= G*(i+1,j+1)`2 by A1,A3,A4,A8,GOBOARD5:4;
  hence G*(i+1,j+1) in cell(G,i,j) by A1,A2,A3,A4,A10,A11,A13,Th17;
A14: G*(i,j)`2 = G*(i+1,j)`2 by A1,A2,A3,A4,Th16;
  then G*(i+1,j)`2 <= G*(i,j+1)`2 by A1,A3,A4,A8,GOBOARD5:4;
  hence thesis by A1,A2,A3,A4,A7,A14,Th17;
end;

theorem Th21:
  1 <= i & i+1 <= len G & 1 <= j & j+1 <= width G & p in Values G
  & p in cell(G,i,j) implies p is_extremal_in cell(G,i,j)
proof
  assume that
A1: 1 <= i & i+1 <= len G & 1 <= j & j+1 <= width G and
A2: p in Values G and
A3: p in cell(G,i,j);
  for a,b being Point of TOP-REAL 2 st p in LSeg(a,b) & LSeg(a,b) c= cell(
  G,i,j) holds p = a or p = b
  proof
    let a,b be Point of TOP-REAL 2 such that
A4: p in LSeg(a,b) and
A5: LSeg(a,b) c= cell(G,i,j);
A6: a in LSeg(a,b) by RLTOPSP1:68;
A7: b in LSeg(a,b) by RLTOPSP1:68;
    assume that
A8: a <> p and
A9: b <> p;
    per cases by A1,A2,A3,Th19;
    suppose
A10:  p = G*(i,j);
      then
A11:  p`2 <= b`2 by A1,A5,A7,Th17;
A12:  p`1 <= a`1 by A1,A5,A6,A10,Th17;
A13:  p`1 <= b`1 by A1,A5,A7,A10,Th17;
A14:  p`2 <= a`2 by A1,A5,A6,A10,Th17;
      now
        per cases;
        suppose
A15:      a`1 <= b`1 & a`2 <= b`2;
          then a`2 <= p`2 by A4,TOPREAL1:4;
          then
A16:      a`2 = p`2 by A14,XXREAL_0:1;
          a`1 <= p`1 by A4,A15,TOPREAL1:3;
          then a`1 = p`1 by A12,XXREAL_0:1;
          hence contradiction by A8,A16,TOPREAL3:6;
        end;
        suppose
A17:      a`1 <= b`1 & b`2 < a`2;
          then b`2 <= p`2 by A4,TOPREAL1:4;
          then
A18:      b`2 = p`2 by A11,XXREAL_0:1;
A19:      a`1 <= p`1 by A4,A17,TOPREAL1:3;
          then
A20:      a`1 = p`1 by A12,XXREAL_0:1;
          then a`2 <> p`2 by A8,TOPREAL3:6;
          then LSeg(a,b) is vertical by A4,A6,A12,A19,SPPOL_1:18,XXREAL_0:1;
          then a`1 = b`1 by SPPOL_1:16;
          hence contradiction by A9,A20,A18,TOPREAL3:6;
        end;
        suppose
A21:      b`1 < a`1 & a`2 <= b`2;
          then a`2 <= p`2 by A4,TOPREAL1:4;
          then
A22:      a`2 = p`2 by A14,XXREAL_0:1;
A23:      b`1 <= p`1 by A4,A21,TOPREAL1:3;
          then
A24:      b`1 = p`1 by A13,XXREAL_0:1;
          then b`2 <> p`2 by A9,TOPREAL3:6;
          then LSeg(a,b) is vertical by A4,A7,A13,A23,SPPOL_1:18,XXREAL_0:1;
          then a`1 = b`1 by SPPOL_1:16;
          hence contradiction by A8,A24,A22,TOPREAL3:6;
        end;
        suppose
A25:      b`1 < a`1 & b`2 < a`2;
          then b`2 <= p`2 by A4,TOPREAL1:4;
          then
A26:      b`2 = p`2 by A11,XXREAL_0:1;
          b`1 <= p`1 by A4,A25,TOPREAL1:3;
          then b`1 = p`1 by A13,XXREAL_0:1;
          hence contradiction by A9,A26,TOPREAL3:6;
        end;
      end;
      hence contradiction;
    end;
    suppose
A27:  p = G*(i,j+1);
      then
A28:  b`2 <= p`2 by A1,A5,A7,Th17;
A29:  p`1 = G*(i,j)`1 by A1,A27,Th16;
      then
A30:  p`1 <= a`1 by A1,A5,A6,Th17;
A31:  p`1 <= b`1 by A1,A5,A7,A29,Th17;
A32:  a`2 <= p`2 by A1,A5,A6,A27,Th17;
      now
        per cases;
        suppose
A33:      a`1 <= b`1 & a`2 <= b`2;
          then p`2 <= b`2 by A4,TOPREAL1:4;
          then
A34:      b`2 = p`2 by A28,XXREAL_0:1;
A35:      a`1 <= p`1 by A4,A33,TOPREAL1:3;
          then
A36:      a`1 = p`1 by A30,XXREAL_0:1;
          then a`2 <> p`2 by A8,TOPREAL3:6;
          then LSeg(a,b) is vertical by A4,A6,A30,A35,SPPOL_1:18,XXREAL_0:1;
          then a`1 = b`1 by SPPOL_1:16;
          hence contradiction by A9,A36,A34,TOPREAL3:6;
        end;
        suppose
A37:      a`1 <= b`1 & b`2 < a`2;
          then p`2 <= a`2 by A4,TOPREAL1:4;
          then
A38:      a`2 = p`2 by A32,XXREAL_0:1;
          a`1 <= p`1 by A4,A37,TOPREAL1:3;
          then a`1 = p`1 by A30,XXREAL_0:1;
          hence contradiction by A8,A38,TOPREAL3:6;
        end;
        suppose
A39:      b`1 < a`1 & a`2 <= b`2;
          then p`2 <= b`2 by A4,TOPREAL1:4;
          then
A40:      b`2 = p`2 by A28,XXREAL_0:1;
          b`1 <= p`1 by A4,A39,TOPREAL1:3;
          then b`1 = p`1 by A31,XXREAL_0:1;
          hence contradiction by A9,A40,TOPREAL3:6;
        end;
        suppose
A41:      b`1 < a`1 & b`2 < a`2;
          then p`2 <= a`2 by A4,TOPREAL1:4;
          then
A42:      a`2 = p`2 by A32,XXREAL_0:1;
A43:      b`1 <= p`1 by A4,A41,TOPREAL1:3;
          then
A44:      b`1 = p`1 by A31,XXREAL_0:1;
          then b`2 <> p`2 by A9,TOPREAL3:6;
          then LSeg(a,b) is vertical by A4,A7,A31,A43,SPPOL_1:18,XXREAL_0:1;
          then a`1 = b`1 by SPPOL_1:16;
          hence contradiction by A8,A44,A42,TOPREAL3:6;
        end;
      end;
      hence contradiction;
    end;
    suppose
A45:  p = G*(i+1,j+1);
      then
A46:  p`1 = G*(i+1,j)`1 by A1,Th16;
      then
A47:  a`1 <= p`1 by A1,A5,A6,Th17;
A48:  p`2 = G*(i,j+1)`2 by A1,A45,Th16;
      then
A49:  b`2 <= p`2 by A1,A5,A7,Th17;
A50:  b`1 <= p`1 by A1,A5,A7,A46,Th17;
A51:  a`2 <= p`2 by A1,A5,A6,A48,Th17;
      now
        per cases;
        suppose
A52:      a`1 <= b`1 & a`2 <= b`2;
          then p`2 <= b`2 by A4,TOPREAL1:4;
          then
A53:      b`2 = p`2 by A49,XXREAL_0:1;
          p`1 <= b`1 by A4,A52,TOPREAL1:3;
          then b`1 = p`1 by A50,XXREAL_0:1;
          hence contradiction by A9,A53,TOPREAL3:6;
        end;
        suppose
A54:      a`1 <= b`1 & b`2 < a`2;
          then p`2 <= a`2 by A4,TOPREAL1:4;
          then
A55:      a`2 = p`2 by A51,XXREAL_0:1;
A56:      p`1 <= b`1 by A4,A54,TOPREAL1:3;
          then
A57:      b`1 = p`1 by A50,XXREAL_0:1;
          then b`2 <> p`2 by A9,TOPREAL3:6;
          then LSeg(a,b) is vertical by A4,A7,A50,A56,SPPOL_1:18,XXREAL_0:1;
          then a`1 = b`1 by SPPOL_1:16;
          hence contradiction by A8,A57,A55,TOPREAL3:6;
        end;
        suppose
A58:      b`1 < a`1 & a`2 <= b`2;
          then p`2 <= b`2 by A4,TOPREAL1:4;
          then
A59:      b`2 = p`2 by A49,XXREAL_0:1;
A60:      p`1 <= a`1 by A4,A58,TOPREAL1:3;
          then
A61:      a`1 = p`1 by A47,XXREAL_0:1;
          then a`2 <> p`2 by A8,TOPREAL3:6;
          then LSeg(a,b) is vertical by A4,A6,A47,A60,SPPOL_1:18,XXREAL_0:1;
          then a`1 = b`1 by SPPOL_1:16;
          hence contradiction by A9,A61,A59,TOPREAL3:6;
        end;
        suppose
A62:      b`1 < a`1 & b`2 < a`2;
          then p`2 <= a`2 by A4,TOPREAL1:4;
          then
A63:      a`2 = p`2 by A51,XXREAL_0:1;
          p`1 <= a`1 by A4,A62,TOPREAL1:3;
          then a`1 = p`1 by A47,XXREAL_0:1;
          hence contradiction by A8,A63,TOPREAL3:6;
        end;
      end;
      hence contradiction;
    end;
    suppose
A64:  p = G*(i+1,j);
      then
A65:  p`2 = G*(i,j)`2 by A1,Th16;
      then
A66:  p`2 <= b`2 by A1,A5,A7,Th17;
A67:  a`1 <= p`1 by A1,A5,A6,A64,Th17;
A68:  b`1 <= p`1 by A1,A5,A7,A64,Th17;
A69:  p`2 <= a`2 by A1,A5,A6,A65,Th17;
      now
        per cases;
        suppose
A70:      a`1 <= b`1 & a`2 <= b`2;
          then a`2 <= p`2 by A4,TOPREAL1:4;
          then
A71:      a`2 = p`2 by A69,XXREAL_0:1;
A72:      p`1 <= b`1 by A4,A70,TOPREAL1:3;
          then
A73:      b`1 = p`1 by A68,XXREAL_0:1;
          then b`2 <> p`2 by A9,TOPREAL3:6;
          then LSeg(a,b) is vertical by A4,A7,A68,A72,SPPOL_1:18,XXREAL_0:1;
          then a`1 = b`1 by SPPOL_1:16;
          hence contradiction by A8,A73,A71,TOPREAL3:6;
        end;
        suppose
A74:      a`1 <= b`1 & b`2 < a`2;
          then b`2 <= p`2 by A4,TOPREAL1:4;
          then
A75:      b`2 = p`2 by A66,XXREAL_0:1;
          p`1 <= b`1 by A4,A74,TOPREAL1:3;
          then b`1 = p`1 by A68,XXREAL_0:1;
          hence contradiction by A9,A75,TOPREAL3:6;
        end;
        suppose
A76:      b`1 < a`1 & a`2 <= b`2;
          then a`2 <= p`2 by A4,TOPREAL1:4;
          then
A77:      a`2 = p`2 by A69,XXREAL_0:1;
          p`1 <= a`1 by A4,A76,TOPREAL1:3;
          then a`1 = p`1 by A67,XXREAL_0:1;
          hence contradiction by A8,A77,TOPREAL3:6;
        end;
        suppose
A78:      b`1 < a`1 & b`2 < a`2;
          then b`2 <= p`2 by A4,TOPREAL1:4;
          then
A79:      b`2 = p`2 by A66,XXREAL_0:1;
A80:      p`1 <= a`1 by A4,A78,TOPREAL1:3;
          then
A81:      a`1 = p`1 by A67,XXREAL_0:1;
          then a`2 <> p`2 by A8,TOPREAL3:6;
          then LSeg(a,b) is vertical by A4,A6,A67,A80,SPPOL_1:18,XXREAL_0:1;
          then a`1 = b`1 by SPPOL_1:16;
          hence contradiction by A9,A81,A79,TOPREAL3:6;
        end;
      end;
      hence contradiction;
    end;
  end;
  hence thesis by A3,SPPOL_1:def 1;
end;

theorem Th22:
  2 <= len G & 2 <= width G & f is_sequence_on G & 1 <= k & k+1 <= len f
 implies
 ex i,j being Nat st 1 <= i & i+1 <= len G & 1 <= j & j+1 <= width G & LSeg(
  f,k) c= cell(G,i,j)
proof
  assume that
A1: 2 <= len G and
A2: 2 <= width G and
A3: f is_sequence_on G and
A4: 1 <= k & k+1 <= len f;
  consider i1,j1,i2,j2 being Nat such that
A5: [i1,j1] in Indices G and
A6: f/.k = G*(i1,j1) and
A7: [i2,j2] in Indices G and
A8: f/.(k+1) = G*(i2,j2) and
A9: i1 = i2 & j1+1 = j2 or i1+1 = i2 & j1 = j2 or i1 = i2+1 & j1 = j2
  or i1 = i2 & j1 = j2+1 by A3,A4,JORDAN8:3;
A10: LSeg(f,k) = LSeg(f/.k, f/.(k+1)) by A4,TOPREAL1:def 3;
A11: 1 <= i2 by A7,MATRIX_0:32;
A12: 1 <= i1 by A5,MATRIX_0:32;
A13: 1 <= j2 by A7,MATRIX_0:32;
A14: 1 <= j1 by A5,MATRIX_0:32;
A15: i2 <= len G by A7,MATRIX_0:32;
A16: i1 <= len G by A5,MATRIX_0:32;
A17: j2 <= width G by A7,MATRIX_0:32;
A18: j1 <= width G by A5,MATRIX_0:32;
  per cases by A9;
  suppose
A19: i1 = i2 & j1+1 = j2;
    then
A20: j1 < width G by A17,XREAL_1:145;
    now
      per cases by A16,XXREAL_0:1;
      suppose
A21:    i1 < len G;
        take i1,j1;
A22:    i1+1 <= len G by A21,NAT_1:13;
        LSeg(f,k) c= cell(G,i1,j1) by A10,A6,A8,A12,A16,A14,A17,A19,GOBOARD5:19
,XREAL_1:145;
        hence thesis by A12,A14,A17,A19,A22;
      end;
      suppose
A23:    i1 = len G;
        reconsider i19=i1-'1,j1 as Nat;
        take i19,j1;
        2-1 <= 2-'1 & 2-'1 <= i19 by A1,A23,NAT_D:42,XREAL_0:def 2;
        then
A24:    1 <= i19 by XXREAL_0:2;
A25:    i19+1 = i1 by A12,XREAL_1:235;
        then i19 < len G by A16,NAT_1:13;
        then LSeg(f,k) c= cell(G,i19,j1) by A10,A6,A8,A14,A19,A20,A25,
GOBOARD5:18;
        hence thesis by A16,A14,A17,A19,A24,A25;
      end;
    end;
    hence thesis;
  end;
  suppose
A26: i1+1 = i2 & j1 = j2;
    then
A27: i1 < len G by A15,XREAL_1:145;
    now
      per cases by A18,XXREAL_0:1;
      suppose
A28:    j1 < width G;
        take i1,j1;
A29:    j1+1 <= width G by A28,NAT_1:13;
        LSeg(f,k) c= cell(G,i1,j1) by A10,A6,A8,A12,A14,A18,A15,A26,GOBOARD5:22
,XREAL_1:145;
        hence thesis by A12,A14,A15,A26,A29;
      end;
      suppose
A30:    j1 = width G;
        reconsider i1,j19=j1-'1 as Nat;
        take i1,j19;
        2-1 <= 2-'1 & 2-'1 <= j19 by A2,A30,NAT_D:42,XREAL_0:def 2;
        then
A31:    1 <= j19 by XXREAL_0:2;
A32:    j19+1=j1 by A14,XREAL_1:235;
        then j19 < width G by A30,NAT_1:13;
        then LSeg(f,k) c= cell(G,i1,j19) by A10,A6,A8,A12,A26,A27,A32,
GOBOARD5:21;
        hence thesis by A12,A18,A15,A26,A31,A32;
      end;
    end;
    hence thesis;
  end;
  suppose
A33: i1 = i2+1 & j1 = j2;
    then
A34: i2 < len G by A16,XREAL_1:145;
    now
      per cases by A18,XXREAL_0:1;
      suppose
A35:    j1 < width G;
        take i2,j1;
A36:    j1+1 <= width G by A35,NAT_1:13;
        LSeg(f,k) c= cell(G,i2,j1) by A10,A6,A8,A16,A11,A13,A17,A33,GOBOARD5:22
,XREAL_1:145;
        hence thesis by A16,A14,A11,A33,A36;
      end;
      suppose
A37:    j1 = width G;
        reconsider i2,j19=j1-'1 as Nat;
        take i2,j19;
        2-1 <= 2-'1 & 2-'1 <= j19 by A2,A37,NAT_D:42,XREAL_0:def 2;
        then
A38:    1 <= j19 by XXREAL_0:2;
A39:    j19+1=j1 by A14,XREAL_1:235;
        then j19 < width G by A37,NAT_1:13;
        then LSeg(f,k) c= cell(G,i2,j19) by A10,A6,A8,A11,A33,A34,A39,
GOBOARD5:21;
        hence thesis by A16,A18,A11,A33,A38,A39;
      end;
    end;
    hence thesis;
  end;
  suppose
A40: i1 = i2 & j1 = j2+1;
    then
A41: j2 < width G by A18,XREAL_1:145;
    now
      per cases by A16,XXREAL_0:1;
      suppose
A42:    i1 < len G;
        take i1,j2;
A43:    i1+1 <= len G by A42,NAT_1:13;
        LSeg(f,k) c= cell(G,i1,j2) by A10,A6,A8,A18,A11,A15,A13,A40,GOBOARD5:19
,XREAL_1:145;
        hence thesis by A12,A18,A13,A40,A43;
      end;
      suppose
A44:    i1 = len G;
        reconsider i19=i1-'1,j2 as Nat;
        take i19,j2;
        2-1 <= 2-'1 & 2-'1 <= i19 by A1,A44,NAT_D:42,XREAL_0:def 2;
        then
A45:    1 <= i19 by XXREAL_0:2;
A46:    i19+1 = i1 by A12,XREAL_1:235;
        then i19 < len G by A16,NAT_1:13;
        then LSeg(f,k) c= cell(G,i19,j2) by A10,A6,A8,A13,A40,A41,A46,
GOBOARD5:18;
        hence thesis by A16,A18,A13,A40,A45,A46;
      end;
    end;
    hence thesis;
  end;
end;

theorem Th23:
  2 <= len G & 2 <= width G & f is_sequence_on G & 1 <= k & k+1 <=
  len f & p in Values G & p in LSeg(f,k) implies p = f/.k or p = f/.(k+1)
proof
  assume that
A1: 2 <= len G & 2 <= width G & f is_sequence_on G and
A2: 1 <= k & k+1 <= len f and
A3: p in Values G and
A4: p in LSeg(f,k);
A5: LSeg(f,k) = LSeg(f/.k, f/.(k+1)) by A2,TOPREAL1:def 3;
  consider i,j being Nat such that
A6: 1 <= i & i+1 <= len G & 1 <= j & j+1 <= width G and
A7: LSeg(f,k) c= cell(G,i,j) by A1,A2,Th22;
  p is_extremal_in cell(G,i,j) by A3,A4,A6,A7,Th21;
  hence thesis by A4,A7,A5,SPPOL_1:def 1;
end;

theorem
  [i,j] in Indices G & 1 <= k & k <= width G implies G*(i,j)`1 <= G* (
  len G,k)`1
proof
  assume that
A1: [i,j] in Indices G and
A2: 1 <= k & k <= width G;
A3: 1 <= i by A1,MATRIX_0:32;
A4: i <= len G by A1,MATRIX_0:32;
  then
A5: i < len G or i = len G by XXREAL_0:1;
  1 <= j & j <= width G by A1,MATRIX_0:32;
  then G*(i,j)`1 = G*(i,1)`1 by A3,A4,GOBOARD5:2
    .= G*(i,k)`1 by A2,A3,A4,GOBOARD5:2;
  hence thesis by A2,A3,A5,GOBOARD5:3;
end;

theorem
  [i,j] in Indices G & 1 <= k & k <= len G implies G*(i,j)`2 <= G* (k,
  width G)`2
proof
  assume that
A1: [i,j] in Indices G and
A2: 1 <= k & k <= len G;
A3: 1 <= j by A1,MATRIX_0:32;
A4: j <= width G by A1,MATRIX_0:32;
  then
A5: j < width G or j = width G by XXREAL_0:1;
  1 <= i & i <= len G by A1,MATRIX_0:32;
  then G*(i,j)`2 = G*(1,j)`2 by A3,A4,GOBOARD5:1
    .= G*(k,j)`2 by A2,A3,A4,GOBOARD5:1;
  hence thesis by A2,A3,A5,GOBOARD5:4;
end;

theorem Th26:
  f is_sequence_on G & f is special & L~g c= L~f & 1 <= k & k+1 <=
len f implies for A being Subset of TOP-REAL 2 st A = right_cell(f,k,G)\L~g or
  A = left_cell(f,k,G)\L~g holds A is connected
proof
  assume that
A1: f is_sequence_on G and
A2: f is special and
A3: L~g c= L~f and
A4: 1 <= k & k+1 <= len f;
  let A be Subset of TOP-REAL 2 such that
A5: A = right_cell(f,k,G)\L~g or A = left_cell(f,k,G)\L~g;
  per cases by A5;
  suppose
A6: A = right_cell(f,k,G)\L~g;
    Int right_cell(f,k,G) misses L~f by A1,A2,A4,Th15;
    then Int right_cell(f,k,G) misses L~g by A3,XBOOLE_1:63;
    then
A7: Int right_cell(f,k,G) c= (L~g)` by SUBSET_1:23;
    A c= right_cell(f,k,G) by A6,XBOOLE_1:36;
    then
A8: A c= Cl Int right_cell(f,k,G) by A1,A4,Th11;
A9: A = right_cell(f,k,G) /\ (L~g)` by A6,SUBSET_1:13;
    Int right_cell(f,k,G) is convex & Int right_cell(f,k,G) c=
    right_cell(f,k,G) by A1,A4,Th10,TOPS_1:16;
    hence thesis by A9,A7,A8,CONNSP_1:18,XBOOLE_1:19;
  end;
  suppose
A10: A = left_cell(f,k,G)\L~g;
    Int left_cell(f,k,G) misses L~f by A1,A2,A4,Th15;
    then Int left_cell(f,k,G) misses L~g by A3,XBOOLE_1:63;
    then
A11: Int left_cell(f,k,G) c= (L~g)` by SUBSET_1:23;
    A c= left_cell(f,k,G) by A10,XBOOLE_1:36;
    then
A12: A c= Cl Int left_cell(f,k,G) by A1,A4,Th11;
A13: A = left_cell(f,k,G) /\ (L~g)` by A10,SUBSET_1:13;
    Int left_cell(f,k,G) is convex & Int left_cell(f,k,G) c= left_cell
    (f,k,G) by A1,A4,Th10,TOPS_1:16;
    hence thesis by A13,A11,A12,CONNSP_1:18,XBOOLE_1:19;
  end;
end;

theorem Th27:
  for f being non constant standard special_circular_sequence st f
is_sequence_on G for k st 1 <= k & k+1 <= len f holds right_cell(f,k,G)\L~f c=
  RightComp f & left_cell(f,k,G)\L~f c= LeftComp f
proof
  let f be non constant standard special_circular_sequence such that
A1: f is_sequence_on G;
  let k such that
A2: 1 <= k & k+1 <= len f;
A3: Int right_cell(f,k,G) <> {} by A1,A2,Th9;
  set rc = right_cell(f,k,G)\L~f;
  rc \/ L~f = right_cell(f,k,G) \/ L~f by XBOOLE_1:39;
  then
  Int right_cell(f,k,G) c= right_cell(f,k,G) & right_cell(f,k,G) c= rc \/
  L~f by TOPS_1:16,XBOOLE_1:7;
  then
A4: Int right_cell(f,k,G) c= rc \/ L~f;
  set lc = left_cell(f,k,G)\L~f;
  rc = right_cell(f,k,G) /\ (L~f)` by SUBSET_1:13;
  then
A5: RightComp f is_a_component_of (L~f)` & rc c= (L~f)` by GOBOARD9:def 2
,XBOOLE_1:17;
  rc c= right_cell(f,k,G) & right_cell(f,k,G) c= right_cell(f,k) by A1,A2,
GOBRD13:33,XBOOLE_1:36;
  then rc c= right_cell(f,k);
  then
A6: Int rc c= Int right_cell(f,k) by TOPS_1:19;
  Int right_cell(f,k) c= RightComp f by A2,GOBOARD9:25;
  then
A7: Int rc c= RightComp f by A6;
  Int right_cell(f,k,G) misses L~f by A1,A2,Th15;
  then
A8: Int Int right_cell(f,k,G) c= Int rc by A4,TOPS_1:19,XBOOLE_1:73;
  Int right_cell(f,k,G) c= rc by A1,A2,A4,Th15,XBOOLE_1:73;
  then
A9: rc meets Int rc by A3,A8,XBOOLE_1:68;
  rc is connected by A1,A2,Th26;
  hence right_cell(f,k,G)\L~f c= RightComp f by A7,A9,A5,GOBOARD9:4;
  lc = left_cell(f,k,G) /\ (L~f)` by SUBSET_1:13;
  then
A10: LeftComp f is_a_component_of (L~f)` & lc c= (L~f)` by GOBOARD9:def 1
,XBOOLE_1:17;
  lc \/ L~f = left_cell(f,k,G) \/ L~f by XBOOLE_1:39;
  then
  Int left_cell(f,k,G) c= left_cell(f,k,G) & left_cell(f,k,G) c= lc \/ L~
  f by TOPS_1:16,XBOOLE_1:7;
  then
A11: Int left_cell(f,k,G) c= lc \/ L~f;
  lc c= left_cell(f,k,G) & left_cell(f,k,G) c= left_cell(f,k) by A1,A2,
GOBRD13:33,XBOOLE_1:36;
  then lc c= left_cell(f,k);
  then
A12: Int lc c= Int left_cell(f,k) by TOPS_1:19;
  Int left_cell(f,k) c= LeftComp f by A2,GOBOARD9:21;
  then
A13: Int lc c= LeftComp f by A12;
A14: Int left_cell(f,k,G) <> {} by A1,A2,Th9;
  Int left_cell(f,k,G) misses L~f by A1,A2,Th15;
  then
A15: Int Int left_cell(f,k,G) c= Int lc by A11,TOPS_1:19,XBOOLE_1:73;
  Int left_cell(f,k,G) c= lc by A1,A2,A11,Th15,XBOOLE_1:73;
  then
A16: lc meets Int lc by A14,A15,XBOOLE_1:68;
  lc is connected by A1,A2,Th26;
  hence thesis by A13,A16,A10,GOBOARD9:4;
end;

begin :: Cages

reserve C for compact non vertical non horizontal non empty Subset of TOP-REAL
  2,
  l, m, i1, i2, j1, j2 for Nat;

theorem Th28:
  for n being Nat ex i st 1 <= i & i+1 <= len Gauge(C,n) & N-min C
  in cell(Gauge(C,n),i,width Gauge(C,n)-'1) & N-min C <> Gauge(C,n)*(i,width
  Gauge(C,n)-'1)
proof
  let n be Nat;
  set G = Gauge(C,n);
  defpred P[Nat] means 1 <= $1 & $1 < len G & G*($1,(width G)-'1)`1 < (N-min C
  )`1;
A1: for k be Nat st P[k] holds k <= len G;
A2: len G = width G by JORDAN8:def 1;
  (NW-corner C)`1 <= (N-min C)`1 by PSCOMP_1:38;
  then
A3: W-bound C <= (N-min C)`1 by EUCLID:52;
A4: len G >= 4 by JORDAN8:10;
  then
A5: (len G)-'1 <= len G & 2 <= len G by NAT_D:35,XXREAL_0:2;
A6: 1 < len G by A4,XXREAL_0:2;
  then
A7: 1 <= (len G)-'1 by NAT_D:49;
A8: n in NAT & len G = width G by JORDAN8:def 1,ORDINAL1:def 12;
  then G*(2,(width G)-'1)`1 = W-bound C by A7,JORDAN8:11,NAT_D:35;
  then G*(1,(width G)-'1)`1 < W-bound C by A2,A7,A5,GOBOARD5:3;
  then G*(1,(width G)-'1)`1 < (N-min C)`1 by A3,XXREAL_0:2;
  then
A9: ex k be Nat st P[k] by A6;
  ex i being Nat st P[i] & for n be Nat st P[n] holds n <= i from NAT_1:
  sch 6(A1,A9);
  then consider i being Nat such that
A10: 1 <= i and
A11: i < len G and
A12: G*(i,(width G)-'1)`1 < (N-min C)`1 and
A13: for n be Nat st P[n] holds n <= i;
  reconsider i as Nat;
A14: 1 <= i+1 & i < i+1 by NAT_1:12,13;
A15: (N-min C)`2 = N-bound C by EUCLID:52;
A16: i+1 <= len G by A11,NAT_1:13;
  then
A17: (N-min C)`2 = G* (i+1,(width G)-'1)`2 by A8,A15,JORDAN8:14,NAT_1:12;
  now
    assume i+1 = len G;
    then len G-'1 = i by NAT_D:34;
    then
A18: G*(i,(width G)-'1)`1 = E-bound C by A8,A7,JORDAN8:12,NAT_D:35;
    (NE-corner C)`1 >= (N-min C)`1 by PSCOMP_1:38;
    hence contradiction by A12,A18,EUCLID:52;
  end;
  then i+1 < len G by A16,XXREAL_0:1;
  then
A19: (N-min C)`1 <= G*(i+1,(width G)-'1)`1 by A13,A14;
  G*(i,(width G)-'1)`2 = (N-min C)`2 by A8,A10,A11,A15,JORDAN8:14;
  then
A20: N-min C in LSeg(G*(i,(width G)-'1),G*(i+1,(width G)-'1)) by A12,A17,A19,
GOBOARD7:8;
  take i;
  thus 1 <= i & i+1 <= len G by A10,A11,NAT_1:13;
  LSeg(G*(i,(width G)-'1),G*(i+1,(width G)-'1)) c= cell(G,i,(width G)-'1)
  by A2,A7,A10,A11,GOBOARD5:22,NAT_D:35;
  hence N-min C in cell(G,i,(width G)-'1) by A20;
  thus thesis by A12;
end;

theorem Th29:
  for n, i1, i2 being Nat holds 1 <= i1 & i1+1 <= len Gauge(C,n) &
N-min C in cell(Gauge(C,n),i1,width Gauge(C,n)-'1) & N-min C <> Gauge(C,n)*(i1,
width Gauge(C,n)-'1) & 1 <= i2 & i2+1 <= len Gauge(C,n) & N-min C in cell(Gauge
(C,n),i2,width Gauge(C,n)-'1) & N-min C <> Gauge(C,n)*(i2,width Gauge(C,n)-'1)
  implies i1 = i2
proof
  let n, i1, i2 be Nat;
  set G = Gauge(C,n), j = width G-'1;
A1: 2|^n >= n+1 by NEWTON:85;
A2: 1+ (n+3) > 1+0 by XREAL_1:6;
A3: len G = width G by JORDAN8:def 1;
A4: len G = 2|^n+3 by JORDAN8:def 1;
  then
A5: len G >= n+1+3 by A1,XREAL_1:6;
  then len G > 1 by A2,XXREAL_0:2;
  then
A6: len G >= 1+1 by NAT_1:13;
  then
A7: 1 <= j by A3,JORDAN5B:2;
A8: j+1 = len G by A3,A5,A2,XREAL_1:235,XXREAL_0:2;
  then
A9: j < len G by NAT_1:13;
  assume that
A10: 1 <= i1 and
A11: i1+1 <= len G and
A12: N-min C in cell(G,i1,j) and
A13: N-min C <> G*(i1,j) and
A14: 1 <= i2 and
A15: i2+1 <= len G and
A16: N-min C in cell(G,i2,j) and
A17: N-min C <> G*(i2,j) and
A18: i1 <> i2;
A19: cell(G,i1,j) meets cell(G,i2,j) by A12,A16,XBOOLE_0:3;
A20: i1 < len G by A11,NAT_1:13;
A21: i2 < len G by A15,NAT_1:13;
  per cases by A18,XXREAL_0:1;
  suppose
A22: i1 < i2;
    then
A23: i2-'i1+i1 = i2 by XREAL_1:235;
    then i2-'i1 <= 1 by A21,A3,A19,A7,A9,JORDAN8:7;
    then i2-'i1 < 1 or i2-'i1 = 1 by XXREAL_0:1;
    then i2-'i1 = 0 or i2-'i1 = 1 by NAT_1:14;
    then cell(G,i1,j) /\ cell(G,i2,j) = LSeg(G*(i2,j),G*(i2,j+1)) by A20,A3
,A6,A9,A22,A23,GOBOARD5:25,JORDAN5B:2;
    then
A24: N-min C in LSeg(G*(i2,j),G*(i2,j+1)) by A12,A16,XBOOLE_0:def 4;
    1 <= j+1 by NAT_1:12;
    then
A25: [i2,j+1] in Indices G by A14,A21,A3,A8,MATRIX_0:30;
    set y2 = (S-bound C)+(((N-bound C)-(S-bound C))/(2|^n))*(j-1);
    set y1 = (S-bound C)+(((N-bound C)-(S-bound C))/(2|^n))*(j-2);
    set x = (W-bound C)+(((E-bound C)-(W-bound C))/(2|^n))*(i2-2);
    j = (2|^n+2+1)-'1 by A4,JORDAN8:def 1
      .= (2|^n+2) by NAT_D:34;
    then
A26: (((N-bound C)-(S-bound C))/(2|^n))*(j-2) = (N-bound C)-(S-bound C) by A1,
XCMPLX_1:87;
    [i2,j] in Indices G by A14,A21,A3,A7,A9,MATRIX_0:30;
    then
A27: G*(i2,j) = |[x,y1]| by JORDAN8:def 1;
    then
A28: G*(i2,j)`1 = x by EUCLID:52;
    j+1-(1+1) = j-1;
    then G*(i2,j+1) = |[x,y2]| by A25,JORDAN8:def 1;
    then G*(i2,j+1)`1 = x by EUCLID:52;
    then LSeg(G*(i2,j),G*(i2,j+1)) is vertical by A28,SPPOL_1:16;
    then (N-min C)`1 = G*(i2,j)`1 by A24,SPPOL_1:41;
    hence contradiction by A17,A27,A28,A26,EUCLID:52;
  end;
  suppose
A29: i2 < i1;
    then
A30: i1-'i2+i2 = i1 by XREAL_1:235;
    then i1-'i2 <= 1 by A20,A3,A19,A7,A9,JORDAN8:7;
    then i1-'i2 < 1 or i1-'i2 = 1 by XXREAL_0:1;
    then i1-'i2 = 0 or i1-'i2 = 1 by NAT_1:14;
    then cell(G,i2,j) /\ cell(G,i1,j) = LSeg(G*(i1,j),G*(i1,j+1)) by A21,A3
,A6,A9,A29,A30,GOBOARD5:25,JORDAN5B:2;
    then
A31: N-min C in LSeg(G*(i1,j),G*(i1,j+1)) by A12,A16,XBOOLE_0:def 4;
    1 <= j+1 by NAT_1:12;
    then
A32: [i1,j+1] in Indices G by A10,A20,A3,A8,MATRIX_0:30;
    set y2 = (S-bound C)+(((N-bound C)-(S-bound C))/(2|^n))*(j-1);
    set y1 = (S-bound C)+(((N-bound C)-(S-bound C))/(2|^n))*(j-2);
    set x = (W-bound C)+(((E-bound C)-(W-bound C))/(2|^n))*(i1-2);
    j = (2|^n+2+1)-'1 by A4,JORDAN8:def 1
      .= (2|^n+2) by NAT_D:34;
    then
A33: (((N-bound C)-(S-bound C))/(2|^n))*(j-2) = (N-bound C)-(S-bound C) by A1,
XCMPLX_1:87;
    [i1,j] in Indices G by A10,A20,A3,A7,A9,MATRIX_0:30;
    then
A34: G*(i1,j) = |[x,y1]| by JORDAN8:def 1;
    then
A35: G*(i1,j)`1 = x by EUCLID:52;
    j+1-(1+1) = j-1;
    then G*(i1,j+1) = |[x,y2]| by A32,JORDAN8:def 1;
    then G*(i1,j+1)`1 = x by EUCLID:52;
    then LSeg(G*(i1,j),G*(i1,j+1)) is vertical by A35,SPPOL_1:16;
    then (N-min C)`1 = G*(i1,j)`1 by A31,SPPOL_1:41;
    hence contradiction by A13,A34,A35,A33,EUCLID:52;
  end;
end;

theorem Th30:
 for n being Nat for f being standard non constant
special_circular_sequence st f is_sequence_on Gauge(C,n) &
(for k being Nat st 1 <= k & k
+1 <= len f holds left_cell(f,k,Gauge(C,n)) misses C & right_cell(f,k,Gauge(C,n
  )) meets C) &
 (ex i being Nat st 1 <= i & i+1 <= len Gauge(C,n) & f/.1 = Gauge(C,n)*(i,
width Gauge(C,n)) & f/.2 = Gauge(C,n)*(i+1,width Gauge(C,n)) & N-min C in cell(
Gauge(C,n),i,width Gauge(C,n)-'1) & N-min C <> Gauge(C,n)*(i,width Gauge(C,n)-'
  1)) holds N-min L~f = f/.1
proof
  let n be Nat;
  set G = Gauge(C,n);
  let f be standard non constant special_circular_sequence such that
A1: f is_sequence_on G and
A2: for k being Nat st 1 <= k & k+1 <= len f holds left_cell(f,k,G)
    misses C & right_cell(f,k,G) meets C;
  N-min L~f in rng f by SPRECT_2:39;
  then consider m being Nat such that
A3: m in dom f and
A4: f.m = N-min L~f by FINSEQ_2:10;
  reconsider m as Nat;
  consider i,j being Nat such that
A5: [i,j] in Indices G and
A6: f/.m = G*(i,j) by A1,A3,GOBOARD1:def 9;
A7: f/.m = f.m by A3,PARTFUN1:def 6;
A8: (N-min L~f)`2 = N-bound L~f by EUCLID:52;
  set W = W-bound C, S = S-bound C, E = E-bound C, N = N-bound C;
  given i9 being Nat such that
A9: 1 <= i9 and
A10: i9+1 <= len G and
A11: f/.1 = G*(i9,width G) and
A12: f/.2 = G*(i9+1,width G) and
A13: N-min C in cell(G,i9,width G-'1) and
A14: N-min C <> G*(i9,width G-'1);
A15: G*(i9,len G-'1) = |[G*(i9,len G-'1)`1,G*(i9,len G-'1)`2]| & (N-min C)`2
  = N by EUCLID:52,53;
  G*(i,j) = |[W+((E-W)/(2|^n))*(i-2), S+((N-S)/(2|^n))*(j-2)]| by A5,
JORDAN8:def 1;
  then
A16: S+((N-S)/(2|^n))*(j-2) = N-bound L~f by A4,A7,A8,A6,EUCLID:52;
  N > S by JORDAN8:9;
  then 2|^n > 0 & N-S > 0 by NEWTON:83,XREAL_1:50;
  then
A17: (N-S)/(2|^n) > 0 by XREAL_1:139;
A18: (NW-corner L~f)`1 = W-bound L~f & (NE-corner L~f)`1 = E-bound L~f by
EUCLID:52;
A19: 1 <= i by A5,MATRIX_0:32;
A20: (NW-corner L~f)`2 = N-bound L~f & (NE-corner L~f)`2 = N-bound L~f by
EUCLID:52;
A21: m <= len f by A3,FINSEQ_3:25;
A22: 1 <= j by A5,MATRIX_0:32;
  len G = 2|^n+3 by JORDAN8:def 1;
  then
A23: len G >= 3 by NAT_1:12;
  then
A24: 1 < len G by XXREAL_0:2;
  then
A25: 1 <= len G-'1 by NAT_D:49;
  then
A26: len G-'1 < len G by NAT_D:51;
A27: i <= len G by A5,MATRIX_0:32;
A28: j <= width G by A5,MATRIX_0:32;
  then
A29: G*(i,j)`2 = G* (1,j)`2 by A19,A27,A22,GOBOARD5:1;
A30: len f > 4 by GOBOARD7:34;
  1 in dom f by FINSEQ_5:6;
  then
A31: f/.1 in L~f by A30,GOBOARD1:1,XXREAL_0:2;
  then
A32: N-bound L~f >= (f/.1)`2 by PSCOMP_1:24;
A33: len G = width G by JORDAN8:def 1;
A34: i9 < len G by A10,NAT_1:13;
  then G*(i9,j)`2 = G*(1,j)`2 by A9,A22,A28,GOBOARD5:1;
  then G*(i,j)`2 <= G*(i9,len G)`2 by A9,A34,A33,A22,A28,A29,SPRECT_3:12;
  then
A35: N-bound L~f = (f/.1)`2 by A11,A33,A4,A7,A8,A6,A32,XXREAL_0:1;
  [i9,len G] in Indices G by A9,A34,A33,A24,MATRIX_0:30;
  then G*(i9,len G)=|[W+((E-W)/(2|^n))*(i9-2),S+((N-S)/(2|^n))*(len G-2)]| by
JORDAN8:def 1;
  then S+((N-S)/(2|^n))*(len G-2) = N-bound L~f by A11,A33,A35,EUCLID:52;
  then
A36: len G-2 = j-2 by A17,A16,XCMPLX_1:5;
  then
A37: G*(i9,len G)`1 = G*(i9,1)`1 by A9,A34,A33,A22,GOBOARD5:2;
  W-bound L~f <= (f/.1)`1 & (f/.1)`1 <= E-bound L~f by A31,PSCOMP_1:24;
  then f/.1 in LSeg(NW-corner L~f, NE-corner L~f) by A35,A18,A20,GOBOARD7:8;
  then f/.1 in LSeg(NW-corner L~f, NE-corner L~f) /\ L~f by A31,XBOOLE_0:def 4;
  then
A38: (N-min L~f)`1 <= (f/.1)`1 by PSCOMP_1:39;
  then
A39: i <= i9 by A9,A11,A33,A4,A7,A6,A27,A22,A36,GOBOARD5:3;
  then
A40: i < len G by A34,XXREAL_0:2;
  then
A41: i+1 <= len G by NAT_1:13;
A42: len G-'1+1 = len G by A23,XREAL_1:235,XXREAL_0:2;
  then
  N-min C in { |[r9,s9]| where r9,s9 is Real:
   G*(i9,1)`1 <= r9 & r9 <= G*
(i9+1,1)`1 & G*(1,len G-'1)`2 <= s9 & s9 <= G*(1,len G)`2 } by A9,A13,A34,A33
,A25,A26,GOBRD11:32;
  then
  ex r9,s9 being Real
   st N-min C = |[r9,s9]| & G*(i9,1)`1 <= r9 & r9 <= G*
  (i9+1,1)`1 & G*(1,len G-'1)`2 <= s9 & s9 <= G*(1,len G)`2;
  then
A43: (f/.1)`1 <= (N-min C)`1 by A11,A33,A37,EUCLID:52;
  then
A44: (N-min L~f)`1 <= (N-min C)`1 by A38,XXREAL_0:2;
A45: 1 <= m by A3,FINSEQ_3:25;
A46: G*(i9,len G-'1)`2 = N by A9,A34,JORDAN8:14;
A47: N-min C = |[(N-min C)`1,(N-min C)`2]| by EUCLID:53;
A48: (NW-corner C)`2 = N & (NE-corner C)`2 = N by EUCLID:52;
A49: (NW-corner C)`1 = W & (NE-corner C)`1 = E by EUCLID:52;
A50: len G = width G by JORDAN8:def 1;
  G*(i9,len G-'1)`1 = G*(i9,1)`1 by A9,A34,A33,A25,A26,GOBOARD5:2;
  then
A51: G*(i9,len G-'1)`1 < (N-min C)`1 by A11,A14,A33,A37,A43,A47,A15,A46,
XXREAL_0:1;
A52: G*(i,len G)`1 = G*(i,1)`1 by A19,A27,A22,A28,A36,GOBOARD5:2;
  per cases by A21,XXREAL_0:1;
  suppose
    m = len f;
    hence thesis by A4,A7,FINSEQ_6:def 1;
  end;
  suppose
    m < len f;
    then
A53: m+1 <= len f by NAT_1:13;
    then consider i1,j1,i2,j2 being Nat such that
A54: [i1,j1] in Indices G & f/.m = G*(i1,j1) and
A55: [i2,j2] in Indices G and
A56: f/.(m+1) = G*(i2,j2) and
A57: i1 = i2 & j1+1 = j2 or i1+1 = i2 & j1 = j2 or i1 = i2+1 & j1 = j2
    or i1 = i2 & j1 = j2+1 by A1,A45,JORDAN8:3;
A58: right_cell(f,m,G) meets C by A2,A45,A53;
    then consider p being object such that
A59: p in right_cell(f,m,G) and
A60: p in C by XBOOLE_0:3;
    reconsider p as Point of TOP-REAL 2 by A59;
A61: W <= p`1 & p`1 <= E by A60,PSCOMP_1:24;
A62: (N-min C)`2 = N by EUCLID:52;
    then
A63: p`2 <= (N-min C)`2 by A60,PSCOMP_1:24;
A64: G*(1,len G-'1)`2 < G*(1,len G)`2 by A50,A24,A25,A26,GOBOARD5:4;
A65: G*(1,len G-'1)`2 = N by A24,JORDAN8:14;
A66: j2 <= len G by A50,A55,MATRIX_0:32;
    now
      per cases by A5,A6,A36,A54,A57,GOBOARD1:5;
      suppose
        i = i2 & len G+1 = j2;
        hence thesis by A66,NAT_1:13;
      end;
      suppose
A67:    i+1 = i2 & len G = j2;
A68:    cell(G,i,len G-'1) = {|[r,s]| : G*(i,1)`1 <= r & r <= G*(i+1,1)`1
& G*(1,len G-'1)`2 <= s & s <= G*(1,len G-'1+1)`2 } by A50,A19,A25,A26,A40,
GOBRD11:32;
        right_cell(f,m,G) = cell(G,i,len G-'1) by A1,A45,A5,A6,A36,A53,A55,A56
,A67,GOBRD13:24;
        then consider r,s such that
A69:    p = |[r,s]| and
        G*(i,1)`1 <= r and
A70:    r <= G*(i+1,1)`1 and
A71:    G*(1,len G-'1)`2 <= s and
        s <= G*(1,len G-'1+1)`2 by A59,A68;
        p`2 = s by A69,EUCLID:52;
        then p`2 = N by A62,A63,A65,A71,XXREAL_0:1;
        then p in LSeg(NW-corner C, NE-corner C) by A49,A48,A61,GOBOARD7:8;
        then p in LSeg(NW-corner C, NE-corner C) /\ C by A60,XBOOLE_0:def 4;
        then
A72:    (N-min C)`1 <= p`1 by PSCOMP_1:39;
        p`1 = r by A69,EUCLID:52;
        then (N-min C)`1 <= G*(i+1,1)`1 by A70,A72,XXREAL_0:2;
        then
A73:    N-min C in cell(G,i,width G-'1) by A33,A4,A7,A6,A36,A52,A42,A44,A47,A62
,A65,A64,A68;
        N-min C <> G*(i,len G-'1) by A34,A33,A19,A25,A26,A51,A39,SPRECT_3:13;
        hence thesis by A9,A10,A11,A13,A14,A33,A4,A7,A6,A19,A36,A41,A73,Th29;
      end;
      suppose
        i = i2+1 & len G = j2;
        then right_cell(f,m,G) = cell(G,i2,len G) & i2 < len G by A1,A45,A5,A6
,A27,A36,A53,A55,A56,GOBRD13:26,NAT_1:13;
        hence thesis by A2,A45,A53,JORDAN8:15;
      end;
      suppose
A74:    i = i2 & len G = j2+1;
        then
A75:    j2 = len G-'1 by NAT_D:34;
        then
A76:    right_cell(f,m,G) = cell(G,i-'1,len G-'1) by A1,A45,A5,A6,A36,A53,A55
,A56,A74,GOBRD13:28;
        m-'1 <= m by NAT_D:35;
        then
A77:    m-'1 <= len f by A21,XXREAL_0:2;
        now
          1 <= i9+1 by A9,NAT_1:13;
          then
A78:      G*(i9+1,len G)`2 = G* (1,len G)`2 by A10,A33,A24,GOBOARD5:1;
          assume
A79:      m = 1;
          G*(i9,len G)`2 = G*(1,len G)`2 by A9,A34,A33,A24,GOBOARD5:1;
          hence contradiction by A11,A12,A33,A6,A19,A27,A36,A25,A26,A56,A74,A75
,A79,A78,GOBOARD5:4;
        end;
        then m > 1 by A45,XXREAL_0:1;
        then
A80:    m-'1 >= 1 by NAT_D:49;
A81:    m-'1+1 = m by A45,XREAL_1:235;
        then consider i19,j19,i29,j29 being Nat such that
A82:    [i19,j19] in Indices G and
A83:    f/.(m-'1) = G*(i19,j19) and
A84:    [i29,j29] in Indices G & f/.m = G*(i29,j29) &( i19 = i29 &
j19+1 = j29 or i19+1 = i29 & j19 = j29 or i19 = i29+1 & j19 = j29 or i19 = i29
        & j19 = j29+1) by A1,A21,A80,JORDAN8:3;
A85:    1 <= i19 by A82,MATRIX_0:32;
A86:    i19 <= len G by A82,MATRIX_0:32;
        now
          per cases by A5,A6,A36,A84,GOBOARD1:5;
          suppose
A87:        i19 = i & j19+1 = len G;
            then j19 = len G-'1 by NAT_D:34;
            then left_cell(f,m-'1,G) = cell(G,i-'1,len G-'1) by A1,A21,A5,A6
,A36,A80,A81,A82,A83,A87,GOBRD13:21;
            hence contradiction by A2,A21,A58,A76,A80,A81;
          end;
          suppose
A88:        i19+1 = i & j19 = len G;
A89:        G*(i19,j)`2 = G*(1,j)`2 & G*(i,j)`2 = G*(1,j)`2 by A19,A27,A22,A28
,A85,A86,GOBOARD5:1;
            m-'1 in dom f by A80,A77,FINSEQ_3:25;
            then
A90:        f/.(m-'1) in L~f by A30,GOBOARD1:1,XXREAL_0:2;
            then W-bound L~f <= (f/.(m-'1))`1 & (f/.(m-'1))`1 <= E-bound L~f
            by PSCOMP_1:24;
            then f/.(m-'1) in LSeg(NW-corner L~f, NE-corner L~f) by A4,A7,A8,A6
,A36,A18,A20,A83,A88,A89,GOBOARD7:8;
            then
A91:        f/.(m-'1) in LSeg(NW-corner L~f, NE-corner L~f) /\ L~f by A90,
XBOOLE_0:def 4;
            i19 < i by A88,NAT_1:13;
            then (f/.(m-'1))`1 < (f/.m)`1 by A6,A27,A22,A28,A36,A83,A85,A88,
GOBOARD5:3;
            hence contradiction by A4,A7,A91,PSCOMP_1:39;
          end;
          suppose
            i19 = i+1 & j19 = len G;
            then right_cell(f,m-'1,G) = cell(G,i,len G) by A1,A21,A5,A6,A36,A80
,A81,A82,A83,GOBRD13:26;
            hence contradiction by A2,A21,A27,A80,A81,JORDAN8:15;
          end;
          suppose
            i19 = i & j19 = len G+1;
            then len G+1 <= len G+0 by A50,A82,MATRIX_0:32;
            hence contradiction by XREAL_1:6;
          end;
        end;
        hence thesis;
      end;
    end;
    hence thesis;
  end;
end;

definition
  let C be compact non vertical non horizontal non empty Subset of TOP-REAL 2;
  let n be Nat;
  assume
A1: C is connected;
  func Cage(C,n) -> clockwise_oriented standard non constant
  special_circular_sequence means
  :Def1:
  it is_sequence_on Gauge(C,n) &
  (ex i being Nat st 1 <= i & i+1 <= len Gauge(C,n) &
   it/.1 = Gauge(C,n)*(i,width Gauge(C,n)) &
   it/.2 = Gauge(C,n)*(i+1,width Gauge(C,n)) &
    N-min C in cell(Gauge(C,n),i,width Gauge(C,n)-'1) &
    N-min C <> Gauge(C,n)*(i,width Gauge(C,n)-'1)) &
 for k being Nat st 1 <=
  k & k+2 <= len it holds (front_left_cell(it,k,Gauge(C,n)) misses C &
front_right_cell(it,k,Gauge(C,n)) misses C implies it turns_right k,Gauge(C,n))
& (front_left_cell(it,k,Gauge(C,n)) misses C & front_right_cell(it,k,Gauge(C,n)
) meets C implies it goes_straight k,Gauge(C,n)) & (front_left_cell(it,k,Gauge(
  C,n)) meets C implies it turns_left k,Gauge(C,n));
  existence
  proof
    set W = W-bound C, E = E-bound C, S = S-bound C, N = N-bound C;
    set G = Gauge(C,n);
    defpred P[Nat,set,set] means ($1 = 0 implies ex i st 1 <= i & i
+1 <= len G & N-min C in cell(G,i,width G-'1) & N-min C <> G*(i,width G-'1) &
$3 = <*G*(i,width G)*>) & ($1 = 1 implies ex i st 1 <= i & i+1 <= len G & N-min
C in cell(G,i,width G-'1) & N-min C <> G*(i,width G-'1) & $3 = <*G*(i,width G),
G*(i+1,width G)*>) & ($1 > 1 & $2 is FinSequence of TOP-REAL 2 implies for f
    being FinSequence of TOP-REAL 2 st $2 = f holds (len f = $1 implies (f
is_sequence_on G & right_cell(f,len f-'1,G) meets C implies (front_left_cell(f,
(len f)-'1,G) misses C & front_right_cell(f,(len f)-'1,G) misses C implies ex i
    ,j st f^<*G*(i,j)*> turns_right (len f)-'1,G & $3 = f^<*G*(i,j)*>) & (
    front_left_cell(f,(len f)-'1,G) misses C & front_right_cell(f,(len f)-'1,G)
meets C implies ex i,j st f^<*G*(i,j)*> goes_straight (len f)-'1,G & $3 = f^<*G
*(i,j)*>) & (front_left_cell(f,(len f)-'1,G) meets C implies ex i,j st f^<*G*(i
,j)*> turns_left (len f)-'1,G & $3 = f^<*G*(i,j)*>)) & (not f is_sequence_on G
or right_cell(f,len f-'1,G) misses C implies $3 = f^<*G*(1,1)*>)) & (len f <>
$1 implies $3 = {})) & ($1 > 1 & $2 is not FinSequence of TOP-REAL 2 implies $3
    = {});
A2: len G = width G by JORDAN8:def 1;
A3: for k being Nat, x being set ex y being set st P[k,x,y]
    proof
      let k be Nat, x be set;
      consider m being Nat such that
A4:   1 <= m & m+1 <= len G & N-min C in cell(G,m,width G-'1) & N-min
      C <> G*(m,width G-'1) by Th28;
      per cases by NAT_1:25;
      suppose
A5:     k=0;
        take <*G*(m,width G)*>;
        thus thesis by A4,A5;
      end;
      suppose
A6:     k = 1;
        take <*G*(m,width G),G*(m+1,width G)*>;
        thus thesis by A4,A6;
      end;
      suppose that
A7:     k > 1 and
A8:     x is FinSequence of TOP-REAL 2;
        reconsider f = x as FinSequence of TOP-REAL 2 by A8;
          per cases;
          suppose
A9:         len f = k;
              per cases;
              suppose
A10:            f is_sequence_on G & right_cell(f,len f-'1,G) meets C;
A11:            (len f) -'1 +1 = len f by A7,A9,XREAL_1:235;
                then
A12:            (len f)-'1+(1+1) = (len f)+1;
A13:            (len f)-'1+1 in dom f by A7,A9,A11,FINSEQ_3:25;
A14:            1 <= (len f)-'1 by A7,A9,NAT_D:49;
                then consider i1,j1,i2,j2 being Nat such that
A15:            [i1,j1] in Indices G and
A16:            f/.((len f) -'1) = G*(i1,j1) and
A17:            [i2,j2] in Indices G and
A18:            f/.((len f) -'1+1) = G*(i2,j2) and
A19:            i1 = i2 & j1+1 = j2 or i1+1 = i2 & j1 = j2 or i1 = i2
                +1 & j1 = j2 or i1 = i2 & j1 = j2+1 by A10,A11,JORDAN8:3;
A20:            i1 <= len G by A15,MATRIX_0:32;
A21:            1 <= j2+1 by NAT_1:12;
A22:            1 <= i2 by A17,MATRIX_0:32;
A23:            j1 <= width G by A15,MATRIX_0:32;
A24:            1 <= i2+1 by NAT_1:12;
A25:            1 <= j2 by A17,MATRIX_0:32;
                (len f)-'1 <= len f by NAT_D:35;
                then
A26:            (len f)-'1 in dom f by A14,FINSEQ_3:25;
A27:            j2 <= width G by A17,MATRIX_0:32;
                then
A28:            j2-'1 <= width G by NAT_D:44;
A29:            i2 <= len G by A17,MATRIX_0:32;
                then
A30:            i2-'1 <= len G by NAT_D:44;
                  per cases;
                  suppose
A31:                front_left_cell(f,(len f)-'1,G) misses C &
                    front_right_cell(f,(len f)-'1,G) misses C;
                      per cases by A19;
                      suppose
A32:                    i1 = i2 & j1+1 = j2;
                        take f1 = f^<*G*(i2+1,j2)*>;
                        now take i=i2+1,j=j2;
                          thus f1 turns_right (len f)-'1,G
                          proof
                            let i19,j19,i29,j29 be Nat;
                            assume that
A33:                        [i19,j19] in Indices G and
A34:                        [i29,j29] in Indices G and
A35:                        f1/.((len f)-'1) = G*(i19,j19) and
A36:                        f1/.((len f)-'1+1) = G*(i29,j29);
A37:                        f/.((len f)-'1) = G*(i19,j19) by A26,A35,
FINSEQ_4:68;
                            then
A38:                        i1 = i19 by A15,A16,A33,GOBOARD1:5;
A39:                        j1 = j19 by A15,A16,A33,A37,GOBOARD1:5;
A40:                        f/.((len f)-'1+1) = G*(i29,j29) by A13,A36,
FINSEQ_4:68;
                            then
A41:                        i2 = i29 by A17,A18,A34,GOBOARD1:5;
A42:                        j2 = j29 by A17,A18,A34,A40,GOBOARD1:5;
                            per cases by A15,A16,A19,A33,A37,A41,A42,GOBOARD1:5
;
                            case
                              i19 = i29 & j19+1 = j29;
                              now
                                assume i2+1 > len G;
                                then
A43:                            (len G)+1 <= i2+1 by NAT_1:13;
                                i2+1 <= (len G)+1 by A29,XREAL_1:6;
                                then i2+1 = (len G)+1 by A43,XXREAL_0:1;
                                then cell(G,len G,j1) meets C by A10,A14,A11
,A15,A16,A17,A18,A32,GOBRD13:22;
                                hence contradiction by A2,A23,JORDAN8:16;
                              end;
                              hence
                              [i29+1,j29] in Indices G by A25,A27,A24,A41,A42,
MATRIX_0:30;
                              thus thesis by A12,A41,A42,FINSEQ_4:67;
                            end;
                            case
                              i19+1 = i29 & j19 = j29;
                              hence thesis by A32,A38,A41;
                            end;
                            case
                              i19 = i29+1 & j19 = j29;
                              hence thesis by A32,A38,A41;
                            end;
                            case
                              i19 = i29 & j19 = j29+1;
                              hence thesis by A32,A39,A42;
                            end;
                          end;
                        end;
                        hence thesis by A7,A9,A10,A31;
                      end;
                      suppose
A44:                    i1+1 = i2 & j1 = j2;
                        take f1 = f^<*G*(i2,j2-'1)*>;
                        now
                          take i=i2,j=j2-'1;
                          thus f1 turns_right (len f)-'1,G
                          proof
                            let i19,j19,i29,j29 be Nat;
                            assume that
A45:                        [i19,j19] in Indices G and
A46:                        [i29,j29] in Indices G and
A47:                        f1/.((len f)-'1) = G*(i19,j19) and
A48:                        f1/.((len f)-'1+1) = G*(i29,j29);
A49:                        f/.((len f)-'1+1) = G*(i29,j29) by A13,A48,
FINSEQ_4:68;
                            then
A50:                        i2 = i29 by A17,A18,A46,GOBOARD1:5;
A51:                        f/.((len f)-'1) = G*(i19,j19) by A26,A47,
FINSEQ_4:68;
                            then
A52:                        i1 = i19 by A15,A16,A45,GOBOARD1:5;
A53:                        j2 = j29 by A17,A18,A46,A49,GOBOARD1:5;
                            per cases by A15,A16,A19,A45,A51,A50,A53,GOBOARD1:5
;
                            case
                              i19 = i29 & j19+1 = j29;
                              hence thesis by A44,A52,A50;
                            end;
                            case
                              i19+1 = i29 & j19 = j29;
                              now
                                assume j2-'1 < 1;
                                then j2 <= 1 by NAT_1:14,NAT_D:36;
                                then j2 = 1 by A25,XXREAL_0:1;
                                then cell(G,i1,1-'1) meets C by A10,A14,A11,A15
,A16,A17,A18,A44,GOBRD13:24;
                                then cell(G,i1,0) meets C by XREAL_1:232;
                                hence contradiction by A20,JORDAN8:17;
                              end;
                              hence [i29,j29-'1] in Indices G by A22,A29,A28
,A50,A53,MATRIX_0:30;
                              thus thesis by A12,A50,A53,FINSEQ_4:67;
                            end;
                            case
                              i19 = i29+1 & j19 = j29;
                              hence thesis by A44,A52,A50;
                            end;
                            case
                              i19 = i29 & j19 = j29+1;
                              hence thesis by A44,A52,A50;
                            end;
                          end;
                        end;
                        hence thesis by A7,A9,A10,A31;
                      end;
                      suppose
A54:                    i1 = i2+1 & j1 = j2;
                        take f1 = f^<*G*(i2,j2+1)*>;
                        now
                          take i=i2,j=j2+1;
                          thus f1 turns_right (len f)-'1,G
                          proof
                            let i19,j19,i29,j29 be Nat;
                            assume that
A55:                        [i19,j19] in Indices G and
A56:                        [i29,j29] in Indices G and
A57:                        f1/.((len f)-'1) = G*(i19,j19) and
A58:                        f1/.((len f)-'1+1) = G*(i29,j29);
A59:                        f/.((len f)-'1+1) = G*(i29,j29) by A13,A58,
FINSEQ_4:68;
                            then
A60:                        i2 = i29 by A17,A18,A56,GOBOARD1:5;
A61:                        f/.((len f)-'1) = G*(i19,j19) by A26,A57,
FINSEQ_4:68;
                            then
A62:                        i1 = i19 by A15,A16,A55,GOBOARD1:5;
A63:                        j2 = j29 by A17,A18,A56,A59,GOBOARD1:5;
                            per cases by A15,A16,A19,A55,A61,A60,A63,GOBOARD1:5
;
                            case
                              i19 = i29 & j19+1 = j29;
                              hence thesis by A54,A62,A60;
                            end;
                            case
                              i19+1 = i29 & j19 = j29;
                              hence thesis by A54,A62,A60;
                            end;
                            case
                              i19 = i29+1 & j19 = j29;
                              now
                                assume j2+1 > len G;
                                then
A64:                            (len G)+1 <= j2+1 by NAT_1:13;
                                j2+1 <= (len G)+1 by A2,A27,XREAL_1:6;
                                then j2+1 = (len G)+1 by A64,XXREAL_0:1;
                                then cell(G,i2,len G) meets C by A10,A14,A11
,A15,A16,A17,A18,A54,GOBRD13:26;
                                hence contradiction by A29,JORDAN8:15;
                              end;
                              hence
                              [i29,j29+1] in Indices G by A2,A22,A29,A21,A60
,A63,MATRIX_0:30;
                              thus thesis by A12,A60,A63,FINSEQ_4:67;
                            end;
                            case
                              i19 = i29 & j19 = j29+1;
                              hence thesis by A54,A62,A60;
                            end;
                          end;
                        end;
                        hence thesis by A7,A9,A10,A31;
                      end;
                      suppose
A65:                    i1 = i2 & j1 = j2+1;
                        take f1 = f^<*G*(i2-'1,j2)*>;
                        now
                          reconsider i=i2-'1 ,j=j2 as Nat;
                         take i,j;
                          thus f1 turns_right (len f)-'1,G
                          proof
                            let i19,j19,i29,j29 be Nat;
                            assume that
A66:                        [i19,j19] in Indices G and
A67:                        [i29,j29] in Indices G and
A68:                        f1/.((len f)-'1) = G*(i19,j19) and
A69:                        f1/.((len f)-'1+1) = G*(i29,j29);
A70:                        f/.((len f)-'1) = G*(i19,j19) by A26,A68,
FINSEQ_4:68;
                            then
A71:                        i1 = i19 by A15,A16,A66,GOBOARD1:5;
A72:                        j1 = j19 by A15,A16,A66,A70,GOBOARD1:5;
A73:                        f/.((len f)-'1+1) = G*(i29,j29) by A13,A69,
FINSEQ_4:68;
                            then
A74:                        i2 = i29 by A17,A18,A67,GOBOARD1:5;
A75:                        j2 = j29 by A17,A18,A67,A73,GOBOARD1:5;
                            per cases by A15,A16,A19,A66,A70,A74,A75,GOBOARD1:5
;
                            case
                              i19 = i29 & j19+1 = j29;
                              hence thesis by A65,A72,A75;
                            end;
                            case
                              i19+1 = i29 & j19 = j29;
                              hence thesis by A65,A71,A74;
                            end;
                            case
                              i19 = i29+1 & j19 = j29;
                              hence thesis by A65,A71,A74;
                            end;
                            case
                              i19 = i29 & j19 = j29+1;
                              now
                                assume i2-'1 < 1;
                                then i2 <= 1 by NAT_1:14,NAT_D:36;
                                then i2 = 1 by A22,XXREAL_0:1;
                                then cell(G,1-'1,j2) meets C by A10,A14,A11,A15
,A16,A17,A18,A65,GOBRD13:28;
                                then cell(G,0,j2) meets C by XREAL_1:232;
                                hence contradiction by A2,A27,JORDAN8:18;
                              end;
                              hence [i29-'1,j29] in Indices G by A25,A27,A30
,A74,A75,MATRIX_0:30;
                              thus thesis by A12,A74,A75,FINSEQ_4:67;
                            end;
                          end;
                        end;
                        hence thesis by A7,A9,A10,A31;
                      end;
                  end;
                  suppose
A76:                front_left_cell(f,(len f)-'1,G) misses C &
                    front_right_cell(f,(len f)-'1,G) meets C;
                      per cases by A19;
                      suppose
A77:                    i1 = i2 & j1+1 = j2;
                        take f1 = f^<*G*(i2,j2+1)*>;
                        now
                          take i=i2,j=j2+1;
                          thus f1 goes_straight (len f)-'1,G
                          proof
                            let i19,j19,i29,j29 be Nat;
                            assume that
A78:                        [i19,j19] in Indices G and
A79:                        [i29,j29] in Indices G and
A80:                        f1/.((len f)-'1) = G*(i19,j19) and
A81:                        f1/.((len f)-'1+1) = G*(i29,j29);
A82:                        f/.((len f)-'1) = G*(i19,j19) by A26,A80,
FINSEQ_4:68;
                            then
A83:                        i1 = i19 by A15,A16,A78,GOBOARD1:5;
A84:                        j1 = j19 by A15,A16,A78,A82,GOBOARD1:5;
A85:                        f/.((len f)-'1+1) = G*(i29,j29) by A13,A81,
FINSEQ_4:68;
                            then
A86:                        i2 = i29 by A17,A18,A79,GOBOARD1:5;
A87:                        j2 = j29 by A17,A18,A79,A85,GOBOARD1:5;
                            per cases by A15,A16,A19,A78,A82,A86,A87,GOBOARD1:5
;
                            case
                              i19 = i29 & j19+1 = j29;
                              now
                                assume j2+1 > len G;
                                then
A88:                            (len G)+1 <= j2+1 by NAT_1:13;
                                j2+1 <= (len G)+1 by A2,A27,XREAL_1:6;
                                then j2+1 = (len G)+1 by A88,XXREAL_0:1;
                                then cell(G,i1,len G) meets C by A10,A14,A11
,A15,A16,A17,A18,A76,A77,GOBRD13:35;
                                hence contradiction by A20,JORDAN8:15;
                              end;
                              hence
                              [i29,j29+1] in Indices G by A2,A22,A29,A21,A86
,A87,MATRIX_0:30;
                              thus thesis by A12,A86,A87,FINSEQ_4:67;
                            end;
                            case
                              i19+1 = i29 & j19 = j29;
                              hence thesis by A77,A83,A86;
                            end;
                            case
                              i19 = i29+1 & j19 = j29;
                              hence thesis by A77,A83,A86;
                            end;
                            case
                              i19 = i29 & j19 = j29+1;
                              hence thesis by A77,A84,A87;
                            end;
                          end;
                        end;
                        hence thesis by A7,A9,A10,A76;
                      end;
                      suppose
A89:                    i1+1 = i2 & j1 = j2;
                        take f1 = f^<*G*(i2+1,j2)*>;
                        now
                          take i=i2+1 ,j=j2;
                          thus f1 goes_straight (len f)-'1,G
                          proof
                            let i19,j19,i29,j29 be Nat;
                            assume that
A90:                        [i19,j19] in Indices G and
A91:                        [i29,j29] in Indices G and
A92:                        f1/.((len f)-'1) = G*(i19,j19) and
A93:                        f1/.((len f)-'1+1) = G*(i29,j29);
A94:                        f/.((len f)-'1+1) = G*(i29,j29) by A13,A93,
FINSEQ_4:68;
                            then
A95:                        i2 = i29 by A17,A18,A91,GOBOARD1:5;
A96:                        f/.((len f)-'1) = G*(i19,j19) by A26,A92,
FINSEQ_4:68;
                            then
A97:                        i1 = i19 by A15,A16,A90,GOBOARD1:5;
A98:                        j2 = j29 by A17,A18,A91,A94,GOBOARD1:5;
                            per cases by A15,A16,A19,A90,A96,A95,A98,GOBOARD1:5
;
                            case
                              i19 = i29 & j19+1 = j29;
                              hence thesis by A89,A97,A95;
                            end;
                            case
                              i19+1 = i29 & j19 = j29;
                              now
                                assume i2+1 > len G;
                                then
A99:                            (len G)+1 <= i2+1 by NAT_1:13;
                                i2+1 <= (len G)+1 by A29,XREAL_1:6;
                                then i2+1 = (len G)+1 by A99,XXREAL_0:1;
                                then cell(G,len G,j1-'1) meets C by A10,A14,A11
,A15,A16,A17,A18,A76,A89,GOBRD13:37;
                                hence contradiction by A2,A23,JORDAN8:16
,NAT_D:44;
                              end;
                              hence [i29+1,j29] in Indices G by A25,A27,A24,A95
,A98,MATRIX_0:30;
                              thus thesis by A12,A95,A98,FINSEQ_4:67;
                            end;
                            case
                              i19 = i29+1 & j19 = j29;
                              hence thesis by A89,A97,A95;
                            end;
                            case
                              i19 = i29 & j19 = j29+1;
                              hence thesis by A89,A97,A95;
                            end;
                          end;
                        end;
                        hence thesis by A7,A9,A10,A76;
                      end;
                      suppose
A100:                   i1 = i2+1 & j1 = j2;
                        take f1 = f^<*G*(i2-'1,j2)*>;
                        now
                          take i=i2-'1 ,j=j2;
                          thus f1 goes_straight (len f)-'1,G
                          proof
                            let i19,j19,i29,j29 be Nat;
                            assume that
A101:                       [i19,j19] in Indices G and
A102:                       [i29,j29] in Indices G and
A103:                       f1/.((len f)-'1) = G*(i19,j19) and
A104:                       f1/.((len f)-'1+1) = G*(i29,j29);
A105:                       f/.((len f)-'1+1) = G*(i29,j29) by A13,A104,
FINSEQ_4:68;
                            then
A106:                       i2 = i29 by A17,A18,A102,GOBOARD1:5;
A107:                       f/.((len f)-'1) = G*(i19,j19) by A26,A103,
FINSEQ_4:68;
                            then
A108:                       i1 = i19 by A15,A16,A101,GOBOARD1:5;
A109:                       j2 = j29 by A17,A18,A102,A105,GOBOARD1:5;
                            per cases by A15,A16,A19,A101,A107,A106,A109,
GOBOARD1:5;
                            case
                              i19 = i29 & j19+1 = j29;
                              hence thesis by A100,A108,A106;
                            end;
                            case
                              i19+1 = i29 & j19 = j29;
                              hence thesis by A100,A108,A106;
                            end;
                            case
                              i19 = i29+1 & j19 = j29;
                              now
                                assume i2-'1 < 1;
                                then i2 <= 1 by NAT_1:14,NAT_D:36;
                                then i2 = 1 by A22,XXREAL_0:1;
                                then cell(G,1-'1,j1) meets C by A10,A14,A11,A15
,A16,A17,A18,A76,A100,GOBRD13:39;
                                then cell(G,0,j1) meets C by XREAL_1:232;
                                hence contradiction by A2,A23,JORDAN8:18;
                              end;
                              hence [i29-'1,j29] in Indices G by A25,A27,A30
,A106,A109,MATRIX_0:30;
                              thus thesis by A12,A106,A109,FINSEQ_4:67;
                            end;
                            case
                              i19 = i29 & j19 = j29+1;
                              hence thesis by A100,A108,A106;
                            end;
                          end;
                        end;
                        hence thesis by A7,A9,A10,A76;
                      end;
                      suppose
A110:                   i1 = i2 & j1 = j2+1;
                        take f1 = f^<*G*(i2,j2-'1)*>;
                        now
                          take i=i2,j=j2-'1;
                          thus f1 goes_straight (len f)-'1,G
                          proof
                            let i19,j19,i29,j29 be Nat;
                            assume that
A111:                       [i19,j19] in Indices G and
A112:                       [i29,j29] in Indices G and
A113:                       f1/.((len f)-'1) = G*(i19,j19) and
A114:                       f1/.((len f)-'1+1) = G*(i29,j29);
A115:                       f/.((len f)-'1) = G*(i19,j19) by A26,A113,
FINSEQ_4:68;
                            then
A116:                       i1 = i19 by A15,A16,A111,GOBOARD1:5;
A117:                       j1 = j19 by A15,A16,A111,A115,GOBOARD1:5;
A118:                       f/.((len f)-'1+1) = G*(i29,j29) by A13,A114,
FINSEQ_4:68;
                            then
A119:                       i2 = i29 by A17,A18,A112,GOBOARD1:5;
A120:                       j2 = j29 by A17,A18,A112,A118,GOBOARD1:5;
                            per cases by A15,A16,A19,A111,A115,A119,A120,
GOBOARD1:5;
                            case
                              i19 = i29 & j19+1 = j29;
                              hence thesis by A110,A117,A120;
                            end;
                            case
                              i19+1 = i29 & j19 = j29;
                              hence thesis by A110,A116,A119;
                            end;
                            case
                              i19 = i29+1 & j19 = j29;
                              hence thesis by A110,A116,A119;
                            end;
                            case
                              i19 = i29 & j19 = j29+1;
                              now
                                assume j2-'1 < 1;
                                then j2 <= 1 by NAT_1:14,NAT_D:36;
                                then j2 = 1 by A25,XXREAL_0:1;
                                then cell(G,i1-'1,1-'1) meets C by A10,A14,A11
,A15,A16,A17,A18,A76,A110,GOBRD13:41;
                                then cell(G,i1-'1,0) meets C by XREAL_1:232;
                                hence contradiction by A20,JORDAN8:17,NAT_D:44;
                              end;
                              hence [i29,j29-'1] in Indices G by A22,A29,A28
,A119,A120,MATRIX_0:30;
                              thus thesis by A12,A119,A120,FINSEQ_4:67;
                            end;
                          end;
                        end;
                        hence thesis by A7,A9,A10,A76;
                      end;
                  end;
                  suppose
A121:               front_left_cell(f,(len f)-'1,G) meets C;
                      per cases by A19;
                      suppose
A122:                   i1 = i2 & j1+1 = j2;
                        take f1 = f^<*G*(i2-'1,j2)*>;
                        now
                          take i=i2-'1 ,j=j2;
                          thus f1 turns_left (len f)-'1,G
                          proof
                            let i19,j19,i29,j29 be Nat;
                            assume that
A123:                       [i19,j19] in Indices G and
A124:                       [i29,j29] in Indices G and
A125:                       f1/.((len f)-'1) = G*(i19,j19) and
A126:                       f1/.((len f)-'1+1) = G*(i29,j29);
A127:                       f/.((len f)-'1) = G*(i19,j19) by A26,A125,
FINSEQ_4:68;
                            then
A128:                       i1 = i19 by A15,A16,A123,GOBOARD1:5;
A129:                       j1 = j19 by A15,A16,A123,A127,GOBOARD1:5;
A130:                       f/.((len f)-'1+1) = G*(i29,j29) by A13,A126,
FINSEQ_4:68;
                            then
A131:                       i2 = i29 by A17,A18,A124,GOBOARD1:5;
A132:                       j2 = j29 by A17,A18,A124,A130,GOBOARD1:5;
                            per cases by A15,A16,A19,A123,A127,A131,A132,
GOBOARD1:5;
                            case
                              i19 = i29 & j19+1 = j29;
                              now
                                assume i2-'1 < 1;
                                then i2 <= 1 by NAT_1:14,NAT_D:36;
                                then i2 = 1 by A22,XXREAL_0:1;
                                then cell(G,1-'1,j2) meets C by A10,A14,A11,A15
,A16,A17,A18,A121,A122,GOBRD13:34;
                                then cell(G,0,j2) meets C by XREAL_1:232;
                                hence contradiction by A2,A27,JORDAN8:18;
                              end;
                              hence [i29-'1,j29] in Indices G by A25,A27,A30
,A131,A132,MATRIX_0:30;
                              thus thesis by A12,A131,A132,FINSEQ_4:67;
                            end;
                            case
                              i19+1 = i29 & j19 = j29;
                              hence thesis by A122,A128,A131;
                            end;
                            case
                              i19 = i29+1 & j19 = j29;
                              hence thesis by A122,A128,A131;
                            end;
                            case
                              i19 = i29 & j19 = j29+1;
                              hence thesis by A122,A129,A132;
                            end;
                          end;
                        end;
                        hence thesis by A7,A9,A10,A121;
                      end;
                      suppose
A133:                   i1+1 = i2 & j1 = j2;
                        take f1 = f^<*G*(i2,j2+1)*>;
                        now
                          take i=i2,j=j2+1;
                          thus f1 turns_left (len f)-'1,G
                          proof
                            let i19,j19,i29,j29 be Nat;
                            assume that
A134:                       [i19,j19] in Indices G and
A135:                       [i29,j29] in Indices G and
A136:                       f1/.((len f)-'1) = G*(i19,j19) and
A137:                       f1/.((len f)-'1+1) = G*(i29,j29);
A138:                       f/.((len f)-'1+1) = G*(i29,j29) by A13,A137,
FINSEQ_4:68;
                            then
A139:                       i2 = i29 by A17,A18,A135,GOBOARD1:5;
A140:                       f/.((len f)-'1) = G*(i19,j19) by A26,A136,
FINSEQ_4:68;
                            then
A141:                       i1 = i19 by A15,A16,A134,GOBOARD1:5;
A142:                       j2 = j29 by A17,A18,A135,A138,GOBOARD1:5;
                            per cases by A15,A16,A19,A134,A140,A139,A142,
GOBOARD1:5;
                            case
                              i19 = i29 & j19+1 = j29;
                              hence thesis by A133,A141,A139;
                            end;
                            case
                              i19+1 = i29 & j19 = j29;
                              now
                                assume j2+1 > len G;
                                then
A143:                           (len G)+1 <= j2+1 by NAT_1:13;
                                j2+1 <= (len G)+1 by A2,A27,XREAL_1:6;
                                then j2+1 = (len G)+1 by A143,XXREAL_0:1;
                                then cell(G,i2,len G) meets C by A10,A14,A11
,A15,A16,A17,A18,A121,A133,GOBRD13:36;
                                hence contradiction by A29,JORDAN8:15;
                              end;
                              hence
                              [i29,j29+1] in Indices G by A2,A22,A29,A21,A139
,A142,MATRIX_0:30;
                              thus thesis by A12,A139,A142,FINSEQ_4:67;
                            end;
                            case
                              i19 = i29+1 & j19 = j29;
                              hence thesis by A133,A141,A139;
                            end;
                            case
                              i19 = i29 & j19 = j29+1;
                              hence thesis by A133,A141,A139;
                            end;
                          end;
                        end;
                        hence thesis by A7,A9,A10,A121;
                      end;
                      suppose
A144:                   i1 = i2+1 & j1 = j2;
                        take f1 = f^<*G*(i2,j2-'1)*>;
                        now
                          take i=i2,j=j2-'1;
                          thus f1 turns_left (len f)-'1,G
                          proof
                            let i19,j19,i29,j29 be Nat;
                            assume that
A145:                       [i19,j19] in Indices G and
A146:                       [i29,j29] in Indices G and
A147:                       f1/.((len f)-'1) = G*(i19,j19) and
A148:                       f1/.((len f)-'1+1) = G*(i29,j29);
A149:                       f/.((len f)-'1+1) = G*(i29,j29) by A13,A148,
FINSEQ_4:68;
                            then
A150:                       i2 = i29 by A17,A18,A146,GOBOARD1:5;
A151:                       f/.((len f)-'1) = G*(i19,j19) by A26,A147,
FINSEQ_4:68;
                            then
A152:                       i1 = i19 by A15,A16,A145,GOBOARD1:5;
A153:                       j2 = j29 by A17,A18,A146,A149,GOBOARD1:5;
                            per cases by A15,A16,A19,A145,A151,A150,A153,
GOBOARD1:5;
                            case
                              i19 = i29 & j19+1 = j29;
                              hence thesis by A144,A152,A150;
                            end;
                            case
                              i19+1 = i29 & j19 = j29;
                              hence thesis by A144,A152,A150;
                            end;
                            case
                              i19 = i29+1 & j19 = j29;
                              now
                                assume j2-'1 < 1;
                                then j2 <= 1 by NAT_1:14,NAT_D:36;
                                then j2 = 1 by A25,XXREAL_0:1;
                                then cell(G,i2-'1,1-'1) meets C by A10,A14,A11
,A15,A16,A17,A18,A121,A144,GOBRD13:38;
                                then cell(G,i2-'1,0) meets C by XREAL_1:232;
                                hence contradiction by A29,JORDAN8:17,NAT_D:44;
                              end;
                              hence [i29,j29-'1] in Indices G by A22,A29,A28
,A150,A153,MATRIX_0:30;
                              thus thesis by A12,A150,A153,FINSEQ_4:67;
                            end;
                            case
                              i19 = i29 & j19 = j29+1;
                              hence thesis by A144,A152,A150;
                            end;
                          end;
                        end;
                        hence thesis by A7,A9,A10,A121;
                      end;
                      suppose
A154:                   i1 = i2 & j1 = j2+1;
                        take f1 = f^<*G*(i2+1,j2)*>;
                        now
                          take i=i2+1 ,j=j2;
                          thus f1 turns_left (len f)-'1,G
                          proof
                            let i19,j19,i29,j29 be Nat;
                            assume that
A155:                       [i19,j19] in Indices G and
A156:                       [i29,j29] in Indices G and
A157:                       f1/.((len f)-'1) = G*(i19,j19) and
A158:                       f1/.((len f)-'1+1) = G*(i29,j29);
A159:                       f/.((len f)-'1) = G*(i19,j19) by A26,A157,
FINSEQ_4:68;
                            then
A160:                       i1 = i19 by A15,A16,A155,GOBOARD1:5;
A161:                       j1 = j19 by A15,A16,A155,A159,GOBOARD1:5;
A162:                       f/.((len f)-'1+1) = G*(i29,j29) by A13,A158,
FINSEQ_4:68;
                            then
A163:                       i2 = i29 by A17,A18,A156,GOBOARD1:5;
A164:                       j2 = j29 by A17,A18,A156,A162,GOBOARD1:5;
                            per cases by A15,A16,A19,A155,A159,A163,A164,
GOBOARD1:5;
                            case
                              i19 = i29 & j19+1 = j29;
                              hence thesis by A154,A161,A164;
                            end;
                            case
                              i19+1 = i29 & j19 = j29;
                              hence thesis by A154,A160,A163;
                            end;
                            case
                              i19 = i29+1 & j19 = j29;
                              hence thesis by A154,A160,A163;
                            end;
                            case
                              i19 = i29 & j19 = j29+1;
                              now
                                assume i2+1 > len G;
                                then
A165:                           (len G)+1 <= i2+1 by NAT_1:13;
                                i2+1 <= (len G)+1 by A29,XREAL_1:6;
                                then i2+1 = (len G)+1 by A165,XXREAL_0:1;
                                then cell(G,len G,j2-'1) meets C by A10,A14,A11
,A15,A16,A17,A18,A121,A154,GOBRD13:40;
                                hence contradiction by A2,A27,JORDAN8:16
,NAT_D:44;
                              end;
                              hence [i29+1,j29] in Indices G by A25,A27,A24
,A163,A164,MATRIX_0:30;
                              thus thesis by A12,A163,A164,FINSEQ_4:67;
                            end;
                          end;
                        end;
                        hence thesis by A7,A9,A10,A121;
                      end;
                end;
              end;
              suppose
A166:           not f is_sequence_on G or right_cell(f,len f-'1,G) misses C;
                take f^<*G*(1,1)*>;
                thus thesis by A7,A9,A166;
              end;
          end;
          suppose
A167:       len f <> k;
            take {};
            thus thesis by A7,A167;
          end;
      end;
      suppose
A168:   k > 1 & x is not FinSequence of TOP-REAL 2;
        take {};
        thus thesis by A168;
      end;
    end;
    consider F being Function such that
A169: dom F = NAT and
A170: F.0 = {} and
A171: for k being Nat holds P[k,F.k,F.(k+1)] from RECDEF_1:
    sch 1 (A3);
    defpred P[Nat] means F.$1 is FinSequence of TOP-REAL 2;
A172: {} = <*>(the carrier of TOP-REAL 2);
A173: for k st P[k] holds P[k+1]
    proof
      let k such that
A174: F.k is FinSequence of TOP-REAL 2;
      reconsider k as Element of NAT by ORDINAL1:def 12;
A175: P[k,F.k,F.(k+1)] by A171;
      per cases by NAT_1:25;
      suppose
        k = 0;
        hence thesis by A175;
      end;
      suppose
        k = 1;
        hence thesis by A175;
      end;
      suppose
A176:   k > 1;
          reconsider f = F.k as FinSequence of TOP-REAL 2 by A174;
          per cases;
          suppose
A177:       len f = k;
              per cases;
              suppose
A178:           f is_sequence_on G & right_cell(f,len f-'1,G) meets C;
                then
A179:           front_left_cell(f,(len f)-'1,G) meets C implies ex i,j
st f^<*G*(i,j) *> turns_left (len f)-'1,G & F.(k+1) = f^<*G*(i,j)*> by A171
,A176,A177;
A180:           front_left_cell(f,(len f)-'1,G) misses C &
front_right_cell(f,(len f) -'1,G) meets C implies ex i,j st f^<*G*(i,j)*>
goes_straight (len f)-'1,G & F.( k+1) = f^<*G*(i,j)*> by A171,A176,A177,A178;
                front_left_cell(f,(len f)-'1,G) misses C &
front_right_cell(f,(len f) -'1,G) misses C implies ex i,j st f^<*G*(i,j)*>
turns_right (len f)-'1,G & F.(k +1) = f^<*G*(i,j)*> by A171,A176,A177,A178;
                hence thesis by A180,A179;
              end;
              suppose
A181:           not f is_sequence_on G or right_cell(f,len f-'1,G) misses C;
                f^<*G*(1,1)*> is FinSequence of TOP-REAL 2;
                hence thesis by A171,A176,A177,A181;
              end;
          end;
          suppose
            len f <> k;
            hence thesis by A171,A172,A176;
          end;
      end;
    end;
A182: P[0] by A170,A172;
A183: for k holds P[k] from NAT_1:sch 2(A182,A173);
    rng F c= (the carrier of TOP-REAL 2)*
    proof
      let y be object;
      assume y in rng F;
      then ex x being object st x in dom F & F.x = y by FUNCT_1:def 3;
      then y is FinSequence of TOP-REAL 2 by A169,A183;
      hence thesis by FINSEQ_1:def 11;
    end;
    then reconsider F as sequence of (the carrier of TOP-REAL 2)* by A169,
FUNCT_2:def 1,RELSET_1:4;
    defpred P[Nat] means len(F.$1) = $1;
A184: for k st P[k] holds P[k+1]
    proof
      let k such that
A185: len(F.k) = k;
A186: P[k,F.k,F.(k+1)] by A171;
      per cases by NAT_1:25;
      suppose
        k = 0;
        hence thesis by A186,FINSEQ_1:39;
      end;
      suppose
        k = 1;
        hence thesis by A186,FINSEQ_1:44;
      end;
      suppose
A187:   k > 1;
        thus thesis
        proof
          per cases;
          suppose
A188:       F.k is_sequence_on G & right_cell(F.k,len(F.k)-'1,G) meets C;
            then
A189:       front_left_cell(F.k,(len(F.k))-'1,G) meets C implies ex i,j
st (F.k)^ <*G*(i,j)*> turns_left (len(F.k))-'1,G & F.(k+1) = (F.k)^<*G*(i,j)*>
            by A171,A185,A187;
A190:       front_left_cell(F.k,(len(F.k))-'1,G) misses C &
front_right_cell(F.k, (len(F.k))-'1,G) meets C implies ex i,j st (F.k)^<*G*(i,j
)*> goes_straight (len (F.k))-'1,G & F.(k+1) = (F.k)^<*G*(i,j)*> by A171,A185
,A187,A188;
            front_left_cell(F.k,(len(F.k))-'1,G) misses C &
front_right_cell(F.k, (len(F.k))-'1,G) misses C implies ex i,j st (F.k)^<*G*(i,
j)*> turns_right (len( F.k))-'1,G & F.(k+1) = (F.k)^<*G*(i,j)*> by A171,A185
,A187,A188;
            hence thesis by A185,A190,A189,FINSEQ_2:16;
          end;
          suppose
            not F.k is_sequence_on G or right_cell(F.k,len(F.k)-'1,G
            ) misses C;
            then F.(k+1) = (F.k)^<*G*(1,1)*> by A171,A185,A187;
            hence thesis by A185,FINSEQ_2:16;
          end;
        end;
      end;
    end;
A191: P[0] by A170,CARD_1:27;
A192: for k holds P[k] from NAT_1:sch 2(A191,A184);
A193: now
      let k such that
A194: F.k is_sequence_on G and
A195: for m st 1 <= m & m+1 <= len(F.k) holds left_cell(F.k,m,G)
      misses C & right_cell(F.k,m,G) meets C and
A196: k > 1;
      len(F.k) = k by A192;
      then
A197: 1 <= (len(F.k))-'1 & (len(F.k)) -'1 +1 = len(F.k) by A196,NAT_D:49
,XREAL_1:235;
      then
A198: right_cell(F.k,(len(F.k))-'1,G) meets C by A195;
      let i1,j1,i2,j2 be Nat such that
A199: [i1,j1] in Indices G and
A200: (F.k)/.((len(F.k)) -'1) = G*(i1,j1) and
A201: [i2,j2] in Indices G and
A202: (F.k)/.len(F.k) = G*(i2,j2);
A203: i2 <= len G by A201,MATRIX_0:32;
A204: 1 <= i2+1 by NAT_1:12;
A205: 1 <= j2 by A201,MATRIX_0:32;
A206: j2 <= width G by A201,MATRIX_0:32;
A207: j1 <= width G by A199,MATRIX_0:32;
      hereby
        assume
A208:   i1 = i2 & j1+1 = j2;
        now
          assume i2+1 > len G;
          then
A209:     (len G)+1 <= i2+1 by NAT_1:13;
          i2+1 <= (len G)+1 by A203,XREAL_1:6;
          then i2+1 = (len G)+1 by A209,XXREAL_0:1;
          then cell(G,len G,j1) meets C by A194,A199,A200,A201,A202,A197,A198
,A208,GOBRD13:22;
          hence contradiction by A2,A207,JORDAN8:16;
        end;
        hence [i2+1,j2] in Indices G by A205,A206,A204,MATRIX_0:30;
      end;
A210: i1 <= len G by A199,MATRIX_0:32;
A211: 1 <= i2 by A201,MATRIX_0:32;
A212: j2-'1 <= width G by A206,NAT_D:44;
      hereby
        assume
A213:   i1+1 = i2 & j1 = j2;
        now
          assume j2-'1 < 1;
          then j2 <= 1 by NAT_1:14,NAT_D:36;
          then j2 = 1 by A205,XXREAL_0:1;
          then cell(G,i1,1-'1) meets C by A194,A199,A200,A201,A202,A197,A198
,A213,GOBRD13:24;
          then cell(G,i1,0) meets C by XREAL_1:232;
          hence contradiction by A210,JORDAN8:17;
        end;
        hence [i2,j2-'1] in Indices G by A211,A203,A212,MATRIX_0:30;
      end;
A214: 1 <= j2+1 by NAT_1:12;
      hereby
        assume
A215:   i1 = i2+1 & j1 = j2;
        now
          assume j2+1 > len G;
          then
A216:     (len G)+1 <= j2+1 by NAT_1:13;
          j2+1 <= (len G)+1 by A2,A206,XREAL_1:6;
          then j2+1 = (len G)+1 by A216,XXREAL_0:1;
          then cell(G,i2,len G) meets C by A194,A199,A200,A201,A202,A197,A198
,A215,GOBRD13:26;
          hence contradiction by A203,JORDAN8:15;
        end;
        hence [i2,j2+1] in Indices G by A2,A211,A203,A214,MATRIX_0:30;
      end;
A217: i2-'1 <= len G by A203,NAT_D:44;
      hereby
        assume
A218:   i1 = i2 & j1 = j2+1;
        now
          assume i2-'1 < 1;
          then i2 <= 1 by NAT_1:14,NAT_D:36;
          then i2 = 1 by A211,XXREAL_0:1;
          then cell(G,1-'1,j2) meets C by A194,A199,A200,A201,A202,A197,A198
,A218,GOBRD13:28;
          then cell(G,0,j2) meets C by XREAL_1:232;
          hence contradiction by A2,A206,JORDAN8:18;
        end;
        hence [i2-'1,j2] in Indices G by A205,A206,A217,MATRIX_0:30;
      end;
      hereby
        assume
A219:   front_right_cell(F.k,(len(F.k))-'1,G) meets C & i1 = i2 & j1 +1 = j2;
        now
          assume j2+1 > len G;
          then
A220:     (len G)+1 <= j2+1 by NAT_1:13;
          j2+1 <= (len G)+1 by A2,A206,XREAL_1:6;
          then j2+1 = (len G)+1 by A220,XXREAL_0:1;
          then cell(G,i1,len G) meets C by A194,A199,A200,A201,A202,A197,A219,
GOBRD13:35;
          hence contradiction by A210,JORDAN8:15;
        end;
        hence [i2,j2+1] in Indices G by A2,A211,A203,A214,MATRIX_0:30;
      end;
      hereby
        assume
A221:   front_right_cell(F.k,(len(F.k))-'1,G) meets C & i1+1 = i2 & j1 = j2;
        now
          assume i2+1 > len G;
          then
A222:     (len G)+1 <= i2+1 by NAT_1:13;
          i2+1 <= (len G)+1 by A203,XREAL_1:6;
          then i2+1 = (len G)+1 by A222,XXREAL_0:1;
          then cell(G,len G,j1-'1) meets C by A194,A199,A200,A201,A202,A197
,A221,GOBRD13:37;
          hence contradiction by A2,A207,JORDAN8:16,NAT_D:44;
        end;
        hence [i2+1,j2] in Indices G by A205,A206,A204,MATRIX_0:30;
      end;
      hereby
        assume
A223:   front_right_cell(F.k,(len(F.k))-'1,G) meets C & i1 = i2+1 & j1 = j2;
        now
          assume i2-'1 < 1;
          then i2 <= 1 by NAT_1:14,NAT_D:36;
          then i2 = 1 by A211,XXREAL_0:1;
          then cell(G,1-'1,j1) meets C by A194,A199,A200,A201,A202,A197,A223,
GOBRD13:39;
          then cell(G,0,j1) meets C by XREAL_1:232;
          hence contradiction by A2,A207,JORDAN8:18;
        end;
        hence [i2-'1,j2] in Indices G by A205,A206,A217,MATRIX_0:30;
      end;
      hereby
        assume
A224:   front_right_cell(F.k,(len(F.k))-'1,G) meets C & i1 = i2 & j1 = j2+1;
        now
          assume j2-'1 < 1;
          then j2 <= 1 by NAT_1:14,NAT_D:36;
          then j2 = 1 by A205,XXREAL_0:1;
          then cell(G,i1-'1,1-'1) meets C by A194,A199,A200,A201,A202,A197,A224
,GOBRD13:41;
          then cell(G,i1-'1,0) meets C by XREAL_1:232;
          hence contradiction by A210,JORDAN8:17,NAT_D:44;
        end;
        hence [i2,j2-'1] in Indices G by A211,A203,A212,MATRIX_0:30;
      end;
      hereby
        assume
A225:   front_left_cell(F.k,(len(F.k))-'1,G) meets C & i1 = i2 & j1+ 1 = j2;
        now
          assume i2-'1 < 1;
          then i2 <= 1 by NAT_1:14,NAT_D:36;
          then i2 = 1 by A211,XXREAL_0:1;
          then cell(G,1-'1,j2) meets C by A194,A199,A200,A201,A202,A197,A225,
GOBRD13:34;
          then cell(G,0,j2) meets C by XREAL_1:232;
          hence contradiction by A2,A206,JORDAN8:18;
        end;
        hence [i2-'1,j2] in Indices G by A205,A206,A217,MATRIX_0:30;
      end;
      hereby
        assume
A226:   front_left_cell(F.k,(len(F.k))-'1,G) meets C & i1+1 = i2 & j1 = j2;
        now
          assume j2+1 > len G;
          then
A227:     (len G)+1 <= j2+1 by NAT_1:13;
          j2+1 <= (len G)+1 by A2,A206,XREAL_1:6;
          then j2+1 = (len G)+1 by A227,XXREAL_0:1;
          then cell(G,i2,len G) meets C by A194,A199,A200,A201,A202,A197,A226,
GOBRD13:36;
          hence contradiction by A203,JORDAN8:15;
        end;
        hence [i2,j2+1] in Indices G by A2,A211,A203,A214,MATRIX_0:30;
      end;
      hereby
        assume
A228:   front_left_cell(F.k,(len(F.k))-'1,G) meets C & i1 = i2+1 & j1 = j2;
        now
          assume j2-'1 < 1;
          then j2 <= 1 by NAT_1:14,NAT_D:36;
          then j2 = 1 by A205,XXREAL_0:1;
          then cell(G,i2-'1,1-'1) meets C by A194,A199,A200,A201,A202,A197,A228
,GOBRD13:38;
          then cell(G,i2-'1,0) meets C by XREAL_1:232;
          hence contradiction by A203,JORDAN8:17,NAT_D:44;
        end;
        hence [i2,j2-'1] in Indices G by A211,A203,A212,MATRIX_0:30;
      end;
      hereby
        assume
A229:   front_left_cell(F.k,(len(F.k))-'1,G) meets C & i1 = i2 & j1 = j2+1;
        now
          assume i2+1 > len G;
          then
A230:     (len G)+1 <= i2+1 by NAT_1:13;
          i2+1 <= (len G)+1 by A203,XREAL_1:6;
          then i2+1 = (len G)+1 by A230,XXREAL_0:1;
          then cell(G,len G,j2-'1) meets C by A194,A199,A200,A201,A202,A197
,A229,GOBRD13:40;
          hence contradiction by A2,A206,JORDAN8:16,NAT_D:44;
        end;
        hence [i2+1,j2] in Indices G by A205,A206,A204,MATRIX_0:30;
      end;
    end;
    defpred P[Nat] means F.$1 is_sequence_on G & for m st 1 <= m &
    m+1 <= len(F.$1) holds left_cell(F.$1,m,G) misses C & right_cell(F.$1,m,G)
    meets C;
A231: len G = 2|^n+3 by JORDAN8:def 1;
A232: for k st P[k] holds P[k+1]
    proof
A233: 2|^n > 0 by NEWTON:83;
A234: 1 <= len G by A231,NAT_1:12;
      let k such that
A235: F.k is_sequence_on G and
A236: for m st 1 <= m & m+1 <= len(F.k) holds left_cell(F.k,m,G)
      misses C & right_cell(F.k,m,G) meets C;
A237: len(F.k) = k by A192;
A238: len(F.(k+1)) = k+1 by A192;
      per cases by NAT_1:25;
      suppose
A239:   k = 0;
        then consider i such that
A240:   1 <= i and
A241:   i+1 <= len G and
        N-min C in cell(G,i,width G-'1) and
        N-min C <> G*(i,width G-'1) and
A242:   F.(k+1) = <*G*(i,width G)*> by A171;
        i < len G by A241,NAT_1:13;
        then
A243:   [i,len G] in Indices G by A2,A234,A240,MATRIX_0:30;
A244:   now
          let l;
          assume l in dom(F.(k+1));
          then 1 <= l & l <= 1 by A238,A239,FINSEQ_3:25;
          then l = 1 by XXREAL_0:1;
          hence ex i,j st [i,j] in Indices G & (F.(k+1))/.l = G* (i,j) by A2
,A242,A243,FINSEQ_4:16;
        end;
        now
          let l;
          assume that
A245:     l in dom(F.(k+1)) and
A246:     l+1 in dom(F.(k+1));
          1 <= l & l <= 1 by A238,A239,A245,FINSEQ_3:25;
          then l = 1 by XXREAL_0:1;
          hence for i1,j1,i2,j2 st [i1,j1] in Indices G & [i2,j2] in Indices G
& (F.(k+1))/.l = G*(i1,j1) & (F.(k+1))/.(l+1) = G*(i2,j2)
     holds |.i1-i2.|+|.j1-j2.| = 1 by A238,A239,A246,FINSEQ_3:25;
        end;
        hence F.(k+1) is_sequence_on G by A244,GOBOARD1:def 9;
        let m;
        assume that
A247:   1 <= m and
A248:   m+1 <= len(F.(k+1));
        1 <= m+1 by NAT_1:12;
        then m+1 = 0+1 by A238,A239,A248,XXREAL_0:1;
        hence thesis by A247;
      end;
      suppose
A249:   k = 1;
        then consider i such that
A250:   1 <= i and
A251:   i+1 <= len G and
A252:   N-min C in cell(G,i,width G-'1) and
        N-min C <> G*(i,width G-'1) and
A253:   F.(k+1) = <*G*(i,width G),G*(i+1,width G)*> by A171;
A254:   i < len G by A251,NAT_1:13;
        then
A255:   [i,len G] in Indices G by A2,A234,A250,MATRIX_0:30;
        1 <= i+1 by A250,NAT_1:13;
        then
A256:   [i+1,len G] in Indices G by A2,A234,A251,MATRIX_0:30;
A257:   (F.(k+1))/.1 = G*(i,width G) & (F.(k+1))/.2 = G*(i+1,width G) by A253,
FINSEQ_4:17;
A258:   now
          let l;
          assume that
A259:     l in dom(F.(k+1)) and
A260:     l+1 in dom(F.(k+1));
          l <= 2 by A238,A249,A259,FINSEQ_3:25;
          then
A261:     l = 0 or ... or l = 2;
          let i1,j1,i2,j2 such that
A262:     [i1,j1] in Indices G & [i2,j2] in Indices G & (F.(k+1))/.l
          = G*(i1,j1) & (F.(k+1))/.(l+1) = G*(i2,j2);
          j1 = len G & j2 = len G by A2,A238,A249,A257,A255,A256,A259,A260,A261
,A262,FINSEQ_3:25,GOBOARD1:5;
          then
A263:     |.j1-j2.| = 0 by ABSVALUE:def 1;
          i1 = i & i2 = i+1 by A2,A238,A249,A257,A255,A256,A259,A260,A261,A262,
FINSEQ_3:25,GOBOARD1:5;
          then |.i2-i1.| = 1 by ABSVALUE:def 1;
          hence |.i1-i2.|+|.j1-j2.| = 1 by A263,UNIFORM1:11;
        end;
        now
          let l;
          assume
A264:     l in dom(F.(k+1));
          then l <= 2 by A238,A249,FINSEQ_3:25;
          then l = 0 or ... or l = 2;
          hence ex i,j st [i,j] in Indices G & (F.(k+1))/.l = G*(i,j) by A2
,A257,A255,A256,A264,FINSEQ_3:25;
        end;
        hence
A265:   F.(k+1) is_sequence_on G by A258,GOBOARD1:def 9;
A266:   i < i+1 & i+1 < (i+1)+1 by NAT_1:13;
        let m;
        assume that
A267:   1 <= m and
A268:   m+1 <= len(F.(k+1));
        1+1 <= m+1 by A267,XREAL_1:6;
        then
A269:   m+1 = 1+1 by A238,A249,A268,XXREAL_0:1;
        then
A270:   left_cell(F.(k+1),m,G) = cell(G,i,len G) by A2,A257,A255,A256,A265,A268
,A266,GOBRD13:def 3;
        now
          N > S by JORDAN8:9;
          then N-S > S-S by XREAL_1:9;
          then (N-S)/(2|^n) > 0 by A233,XREAL_1:139;
          then
A271:     N+0 < N+(N-S)/(2|^n) by XREAL_1:6;
          [1,len G] in Indices G by A2,A234,MATRIX_0:30;
          then G* (1,len G) = |[W+((E-W)/(2|^n))*(1-2),S+((N-S)/(2|^n))*((len
          G)-2)]| by JORDAN8:def 1;
          then
A272:     G*(1,len G)`2 = S+((N-S)/(2|^n))*((len G)-2) by EUCLID:52;
A273:     cell(G,i,len G) = { |[r,s]|: G*(i,1)`1 <= r & r <= G*(i+1,1)`1
          & G*(1,len G)`2 <= s } by A2,A250,A254,GOBRD11:31;
          assume left_cell(F.(k+1),m,G) meets C;
          then consider p being object such that
A274:     p in cell(G,i,len G) and
A275:     p in C by A270,XBOOLE_0:3;
          reconsider p as Point of TOP-REAL 2 by A274;
          reconsider p as Element of TOP-REAL 2;
A276:     p`2 <= N by A275,PSCOMP_1:24;
          consider r,s such that
A277:     p = |[r,s]| and
          G*(i,1)`1 <= r and
          r <= G*(i+1,1)`1 and
A278:     G*(1,len G)`2 <= s by A274,A273;
          ((N-S)/(2|^n))*((len G)-2) = ((N-S)/(2|^n))*(2|^n)+((N-S)/(2|^
          n))*1 by A231
            .= (N-S)+(N-S)/(2|^n) by A233,XCMPLX_1:87;
          then N < s by A278,A272,A271,XXREAL_0:2;
          hence contradiction by A277,A276,EUCLID:52;
        end;
        hence left_cell(F.(k+1),m,G) misses C;
        N-min C in C & N-min C in right_cell(F.(k+1),m,G) by A2,A252,A257,A255
,A256,A265,A268,A269,A266,GOBRD13:def 2,SPRECT_1:11;
        hence thesis by XBOOLE_0:3;
      end;
      suppose
A279:   k > 1;
        then
A280:   len(F.k) in dom(F.k) by A237,FINSEQ_3:25;
A281:   (len(F.k)) -'1 +1 = len(F.k) by A237,A279,XREAL_1:235;
A282:   1 <= (len(F.k))-'1 by A237,A279,NAT_D:49;
        then consider i1,j1,i2,j2 being Nat such that
A283:   [i1,j1] in Indices G and
A284:   (F.k)/.((len(F.k)) -'1) = G*(i1,j1) and
A285:   [i2,j2] in Indices G and
A286:   (F.k)/.len(F.k) = G*(i2,j2) and
        i1 = i2 & j1+1 = j2 or i1+1 = i2 & j1 = j2 or i1 = i2+1 & j1 = j2
        or i1 = i2 & j1 = j2+1 by A235,A281,JORDAN8:3;
A287:   i1 = i2 & j1+1 = j2 implies [i2+1,j2] in Indices G by A193,A235,A236
,A279,A283,A284,A285,A286;
A288:   front_left_cell(F.k,(len(F.k))-'1,G) meets C & i1 = i2+1 & j1 =
j2 implies [i2,j2-'1] in Indices G by A193,A235,A236,A279,A283,A284,A285,A286;
A289:   front_left_cell(F.k,(len(F.k))-'1,G) meets C & i1+1 = i2 & j1 =
j2 implies [i2,j2+1] in Indices G by A193,A235,A236,A279,A283,A284,A285,A286;
A290:   front_left_cell(F.k,(len(F.k))-'1,G) meets C & i1 = i2 & j1+1 =
j2 implies [i2-'1,j2] in Indices G by A193,A235,A236,A279,A283,A284,A285,A286;
A291:   front_right_cell(F.k,(len(F.k))-'1,G) meets C & i1 = i2 & j1 =
j2+1 implies [i2,j2-'1] in Indices G by A193,A235,A236,A279,A283,A284,A285,A286
;
A292:   i1 = i2+1 & j1 = j2 implies [i2,j2+1] in Indices G by A193,A235,A236
,A279,A283,A284,A285,A286;
A293:   i1 +1 = i2 & j1 = j2 implies [i2,j2-'1] in Indices G by A193,A235,A236
,A279,A283,A284,A285,A286;
A294:   1 <= j2 by A285,MATRIX_0:32;
A295:   right_cell(F.k,(len(F.k))-'1,G) meets C by A236,A282,A281;
A296:   front_right_cell(F.k,(len(F.k))-'1,G) meets C & i1 = i2+1 & j1 =
j2 implies [i2-'1,j2] in Indices G by A193,A235,A236,A279,A283,A284,A285,A286;
A297:   front_right_cell(F.k,(len(F.k))-'1,G) meets C & i1+1 = i2 & j1 =
j2 implies [i2+1,j2] in Indices G by A193,A235,A236,A279,A283,A284,A285,A286;
A298:   front_right_cell(F.k,(len(F.k))-'1,G) meets C & i1 = i2 & j1+1 =
j2 implies [i2,j2+1] in Indices G by A193,A235,A236,A279,A283,A284,A285,A286;
A299:   i1 = i2 & j1 = j2+1 implies [i2-'1,j2] in Indices G by A193,A235,A236
,A279,A283,A284,A285,A286;
A300:   front_left_cell(F.k,(len(F.k))-'1,G) meets C & i1 = i2 & j1 = j2
+1 implies [i2+1,j2] in Indices G by A193,A235,A236,A279,A283,A284,A285,A286;
        (len(F.k))-'1 <= len(F.k) by NAT_D:35;
        then
A301:   (len(F.k))-'1 in dom(F.k) by A282,FINSEQ_3:25;
A302:   1 <= i2 by A285,MATRIX_0:32;
        thus
A303:   F.(k+1) is_sequence_on G
        proof
          per cases;
          suppose
            front_left_cell(F.k,(len(F.k))-'1,G) misses C &
            front_right_cell(F.k,(len(F.k))-'1,G) misses C;
            then consider i,j such that
A304:       (F.k)^<*G*(i,j)*> turns_right (len(F.k))-'1,G and
A305:       F.(k+1) = (F.k)^<*G*(i,j)*> by A171,A235,A237,A279,A295;
            thus thesis
            proof
              set f = (F.k)^<*G*(i,j)*>;
A306:         f/.(len(F.k)+1) = G*(i,j) by FINSEQ_4:67;
A307:         f/.(len(F.k)-'1) = G*(i1,j1) & f/.len(F.k) = G*(i2,j2) by A284
,A286,A301,A280,FINSEQ_4:68;
              per cases by A281,A283,A285,A304,A307;
              suppose that
A308:           i1 = i2 & j1+1 = j2 and
A309:           f/.(len(F.k)+1) = G*(i2+1,j2);
                now
                  let i19,j19,i29,j29 be Nat;
                  assume
A310:             [i19,j19] in Indices G & [i29,j29] in Indices G &
                  (F.k)/.len(F.k) = G* (i19,j19) & G*(i2+1,j2) = G*(i29,j29);
                  then j2 = j19 & j2 = j29 by A285,A286,A287,A308,GOBOARD1:5;
                  then
A311:             |.j29-j19.| = 0 by ABSVALUE:def 1;
                  i2 = i19 & i2+1 = i29 by A285,A286,A287,A308,A310,GOBOARD1:5;
                  hence |.i29-i19.|+|.j29-j19.| = 1 by A311,ABSVALUE:def 1;
                end;
                hence thesis by A235,A237,A279,A287,A305,A306,A308,A309,
CARD_1:27,JORDAN8:6;
              end;
              suppose that
A312:           i1+1 = i2 & j1 = j2 and
A313:           f/.(len(F.k)+1) = G*(i2,j2-'1);
                now
                  let i19,j19,i29,j29 be Nat;
                  assume
A314:             [i19,j19] in Indices G & [i29,j29] in Indices G &
                  (F.k)/.len(F.k) = G* (i19,j19) & G*(i2,j2-'1) = G* (i29,j29);
                  then j2 = j19 & j2-'1 = j29 by A285,A286,A293,A312,GOBOARD1:5
;
                  then j19-j29 = j2-(j2-1) by A294,XREAL_1:233;
                  then
A315:             |.j19-j29.| = 1 by ABSVALUE:def 1;
                  i2 = i19 & i2 = i29 by A285,A286,A293,A312,A314,GOBOARD1:5;
                  then |.i29-i19.| = 0 by ABSVALUE:def 1;
                  hence |.i29-i19.|+|.j29-j19.| = 1 by A315,UNIFORM1:11;
                end;
                hence thesis by A235,A237,A279,A293,A305,A306,A312,A313,
CARD_1:27,JORDAN8:6;
              end;
              suppose that
A316:           i1 = i2+1 & j1 = j2 and
A317:           f/.(len(F.k)+1) = G*(i2,j2+1);
                now
                  let i19,j19,i29,j29 be Nat;
                  assume
A318:             [i19,j19] in Indices G & [i29,j29] in Indices G &
                  (F.k)/.len(F.k) = G* (i19,j19) & G*(i2,j2+1) = G*(i29,j29);
                  then i2 = i19 & i2 = i29 by A285,A286,A292,A316,GOBOARD1:5;
                  then
A319:             |.i29-i19.| = 0 by ABSVALUE:def 1;
                  j2 = j19 & j2+1 = j29 by A285,A286,A292,A316,A318,GOBOARD1:5;
                  hence |.i29-i19.|+|.j29-j19.| = 1 by A319,ABSVALUE:def 1;
                end;
                hence thesis by A235,A237,A279,A292,A305,A306,A316,A317,
CARD_1:27,JORDAN8:6;
              end;
              suppose that
A320:           i1 = i2 & j1 = j2+1 and
A321:           f/.(len(F.k)+1) = G*(i2-'1,j2);
                now
                  let i19,j19,i29,j29 be Nat;
                  assume
A322:             [i19,j19] in Indices G & [i29,j29] in Indices G &
                  (F.k)/.len(F.k) = G* (i19,j19) & G*(i2-'1,j2) = G* (i29,j29);
                  then i2 = i19 & i2-'1 = i29 by A285,A286,A299,A320,GOBOARD1:5
;
                  then i19-i29 = i2-(i2-1) by A302,XREAL_1:233;
                  then
A323:             |.i19-i29.| = 1 by ABSVALUE:def 1;
                  j2 = j19 & j2 = j29 by A285,A286,A299,A320,A322,GOBOARD1:5;
                  then |.j29-j19.| = 0 by ABSVALUE:def 1;
                  hence |.i29-i19.|+|.j29-j19.| = 1 by A323,UNIFORM1:11;
                end;
                hence thesis by A235,A237,A279,A299,A305,A306,A320,A321,
CARD_1:27,JORDAN8:6;
              end;
            end;
          end;
          suppose
A324:       front_left_cell(F.k,(len(F.k))-'1,G) misses C &
            front_right_cell(F.k,(len(F.k))-'1,G) meets C;
            then consider i,j such that
A325:       (F.k)^<*G*(i,j)*> goes_straight (len(F.k))-'1,G and
A326:       F.(k+1) = (F.k)^<*G*(i,j)*> by A171,A235,A237,A279,A295;
            thus thesis
            proof
              set f = (F.k)^<*G*(i,j)*>;
A327:         f/.(len(F.k)+1) = G*(i,j) by FINSEQ_4:67;
A328:         f/.(len(F.k)-'1) = G*(i1,j1) & f/.len(F.k) = G*(i2,j2) by A284
,A286,A301,A280,FINSEQ_4:68;
              per cases by A281,A283,A285,A325,A328;
              suppose that
A329:           i1 = i2 & j1+1 = j2 and
A330:           f/.(len(F.k)+1) = G*(i2,j2+1);
                now
                  let i19,j19,i29,j29 be Nat;
                  assume
A331:             [i19,j19] in Indices G & [i29,j29] in Indices G &
                  (F.k)/.len(F.k) = G* (i19,j19) & G*(i2,j2+1) = G*(i29,j29);
                  then i2 = i19 & i2 = i29 by A285,A286,A298,A324,A329,
GOBOARD1:5;
                  then
A332:             |.i29-i19.| = 0 by ABSVALUE:def 1;
                  j2 = j19 & j2+1 = j29 by A285,A286,A298,A324,A329,A331,
GOBOARD1:5;
                  hence |.i29-i19.|+|.j29-j19.| = 1 by A332,ABSVALUE:def 1;
                end;
                hence thesis by A235,A237,A279,A298,A324,A326,A327,A329,A330,
CARD_1:27,JORDAN8:6;
              end;
              suppose that
A333:           i1+1 = i2 & j1 = j2 and
A334:           f/.(len(F.k)+1) = G*(i2+1,j2);
                now
                  let i19,j19,i29,j29 be Nat;
                  assume
A335:             [i19,j19] in Indices G & [i29,j29] in Indices G &
                  (F.k)/.len(F.k) = G* (i19,j19) & G*(i2+1,j2) = G* (i29,j29);
                  then j2 = j19 & j2 = j29 by A285,A286,A297,A324,A333,
GOBOARD1:5;
                  then
A336:             |.j29-j19.| = 0 by ABSVALUE:def 1;
                  i2 = i19 & i2+1 = i29 by A285,A286,A297,A324,A333,A335,
GOBOARD1:5;
                  hence |.i29-i19.|+|.j29-j19.| = 1 by A336,ABSVALUE:def 1;
                end;
                hence thesis by A235,A237,A279,A297,A324,A326,A327,A333,A334,
CARD_1:27,JORDAN8:6;
              end;
              suppose that
A337:           i1 = i2+1 & j1 = j2 and
A338:           f/.(len(F.k)+1) = G*(i2-'1,j2);
                now
                  let i19,j19,i29,j29 be Nat;
                  assume
A339:             [i19,j19] in Indices G & [i29,j29] in Indices G &
                  (F.k)/.len(F.k) = G* (i19,j19) & G*(i2-'1,j2) = G*(i29,j29);
                  then i2 = i19 & i2-'1 = i29 by A285,A286,A296,A324,A337,
GOBOARD1:5;
                  then i19-i29 = i2-(i2-1) by A302,XREAL_1:233;
                  then
A340:             |.i19-i29.| = 1 by ABSVALUE:def 1;
                  j2 = j19 & j2 = j29 by A285,A286,A296,A324,A337,A339,
GOBOARD1:5;
                  then |.j29-j19.| = 0 by ABSVALUE:def 1;
                  hence |.i29-i19.|+|.j29-j19.| = 1 by A340,UNIFORM1:11;
                end;
                hence thesis by A235,A237,A279,A296,A324,A326,A327,A337,A338,
CARD_1:27,JORDAN8:6;
              end;
              suppose that
A341:           i1 = i2 & j1 = j2+1 and
A342:           f/.(len(F.k)+1) = G*(i2,j2-'1);
                now
                  let i19,j19,i29,j29 be Nat;
                  assume
A343:             [i19,j19] in Indices G & [i29,j29] in Indices G &
                  (F.k)/.len(F.k) = G* (i19,j19) & G*(i2,j2-'1) = G* (i29,j29);
                  then j2 = j19 & j2-'1 = j29 by A285,A286,A291,A324,A341,
GOBOARD1:5;
                  then j19-j29 = j2-(j2-1) by A294,XREAL_1:233;
                  then
A344:             |.j19-j29.| = 1 by ABSVALUE:def 1;
                  i2 = i19 & i2 = i29 by A285,A286,A291,A324,A341,A343,
GOBOARD1:5;
                  then |.i29-i19.| = 0 by ABSVALUE:def 1;
                  hence |.i29-i19.|+|.j29-j19.| = 1 by A344,UNIFORM1:11;
                end;
                hence thesis by A235,A237,A279,A291,A324,A326,A327,A341,A342,
CARD_1:27,JORDAN8:6;
              end;
            end;
          end;
          suppose
A345:       front_left_cell(F.k,(len(F.k))-'1,G) meets C;
            then consider i,j such that
A346:       (F.k)^<*G*(i,j)*> turns_left (len(F.k))-'1,G and
A347:       F.(k+1) = (F.k)^<*G*(i,j)*> by A171,A235,A237,A279,A295;
            thus thesis
            proof
              set f = (F.k)^<*G*(i,j)*>;
A348:         f/.(len(F.k)+1) = G*(i,j) by FINSEQ_4:67;
A349:         f/.(len(F.k)-'1) = G*(i1,j1) & f/.len(F.k) = G*(i2,j2) by A284
,A286,A301,A280,FINSEQ_4:68;
              per cases by A281,A283,A285,A346,A349;
              suppose that
A350:           i1 = i2 & j1+1 = j2 and
A351:           f/.(len(F.k)+1) = G*(i2-'1,j2);
                now
                  let i19,j19,i29,j29 be Nat;
                  assume
A352:             [i19,j19] in Indices G & [i29,j29] in Indices G &
                  (F.k)/.len(F.k) = G* (i19,j19) & G*(i2-'1,j2) = G*(i29,j29);
                  then i2 = i19 & i2-'1 = i29 by A285,A286,A290,A345,A350,
GOBOARD1:5;
                  then i19-i29 = i2-(i2-1) by A302,XREAL_1:233;
                  then
A353:             |.i19-i29.| = 1 by ABSVALUE:def 1;
                  j2 = j19 & j2 = j29 by A285,A286,A290,A345,A350,A352,
GOBOARD1:5;
                  then |.j29-j19.| = 0 by ABSVALUE:def 1;
                  hence |.i29-i19.|+|.j29-j19.| = 1 by A353,UNIFORM1:11;
                end;
                hence thesis by A235,A237,A279,A290,A345,A347,A348,A350,A351,
CARD_1:27,JORDAN8:6;
              end;
              suppose that
A354:           i1+1 = i2 & j1 = j2 and
A355:           f/.(len(F.k)+1) = G*(i2,j2+1);
                now
                  let i19,j19,i29,j29 be Nat;
                  assume
A356:             [i19,j19] in Indices G & [i29,j29] in Indices G &
                  (F.k)/.len(F.k) = G* (i19,j19) & G*(i2,j2+1) = G* (i29,j29);
                  then i2 = i19 & i2 = i29 by A285,A286,A289,A345,A354,
GOBOARD1:5;
                  then
A357:             |.i29-i19.| = 0 by ABSVALUE:def 1;
                  j2 = j19 & j2+1 = j29 by A285,A286,A289,A345,A354,A356,
GOBOARD1:5;
                  hence |.i29-i19.|+|.j29-j19.| = 1 by A357,ABSVALUE:def 1;
                end;
                hence thesis by A235,A237,A279,A289,A345,A347,A348,A354,A355,
CARD_1:27,JORDAN8:6;
              end;
              suppose that
A358:           i1 = i2+1 & j1 = j2 and
A359:           f/.(len(F.k)+1) = G*(i2,j2-'1);
                now
                  let i19,j19,i29,j29 be Nat;
                  assume
A360:             [i19,j19] in Indices G & [i29,j29] in Indices G &
                  (F.k)/.len(F.k) = G* (i19,j19) & G*(i2,j2-'1) = G*(i29,j29);
                  then j2 = j19 & j2-'1 = j29 by A285,A286,A288,A345,A358,
GOBOARD1:5;
                  then j19-j29 = j2-(j2-1) by A294,XREAL_1:233;
                  then
A361:             |.j19-j29.| = 1 by ABSVALUE:def 1;
                  i2 = i19 & i2 = i29 by A285,A286,A288,A345,A358,A360,
GOBOARD1:5;
                  then |.i29-i19.| = 0 by ABSVALUE:def 1;
                  hence |.i29-i19.|+|.j29-j19.| = 1 by A361,UNIFORM1:11;
                end;
                hence thesis by A235,A237,A279,A288,A345,A347,A348,A358,A359,
CARD_1:27,JORDAN8:6;
              end;
              suppose that
A362:           i1 = i2 & j1 = j2+1 and
A363:           f/.(len(F.k)+1) = G*(i2+1,j2);
                now
                  let i19,j19,i29,j29 be Nat;
                  assume
A364:             [i19,j19] in Indices G & [i29,j29] in Indices G &
                  (F.k)/.len(F.k) = G* (i19,j19) & G*(i2+1,j2) = G* (i29,j29);
                  then j2 = j19 & j2 = j29 by A285,A286,A300,A345,A362,
GOBOARD1:5;
                  then
A365:             |.j29-j19.| = 0 by ABSVALUE:def 1;
                  i2 = i19 & i2+1 = i29 by A285,A286,A300,A345,A362,A364,
GOBOARD1:5;
                  hence |.i29-i19.|+|.j29-j19.| = 1 by A365,ABSVALUE:def 1;
                end;
                hence thesis by A235,A237,A279,A300,A345,A347,A348,A362,A363,
CARD_1:27,JORDAN8:6;
              end;
            end;
          end;
        end;
        let m such that
A366:   1 <= m and
A367:   m+1 <= len(F.(k+1));
A368:   left_cell(F.k,(len(F.k))-'1,G) misses C by A236,A282,A281;
        now
          per cases;
          suppose
A369:       m+1 = len(F.(k+1));
A370:       (j2-'1)+1 = j2 by A294,XREAL_1:235;
A371:       (i2-'1)+1 = i2 by A302,XREAL_1:235;
            thus thesis
            proof
              per cases;
              suppose
A372:           front_left_cell(F.k,(len(F.k))-'1,G) misses C &
                front_right_cell(F.k,(len(F.k))-'1,G) misses C;
                then
A373:           ex i,j st (F.k)^<*G*(i,j)*> turns_right (len(F.k))-'1,G &
                F.(k+1) = (F.k)^<*G*(i,j)*> by A171,A235,A237,A279,A295;
                then
A374:           (F.(k+1))/.len(F.k) = G* (i2,j2) by A286,A280,FINSEQ_4:68;
A375:           (F.(k+1))/.(len(F.k)-'1) = G*(i1,j1) by A284,A301,A373,
FINSEQ_4:68;
                now
                  per cases by A281,A283,A285,A373,A375,A374;
                  suppose that
A376:               i1 = i2 & j1+1 = j2 and
A377:               (F.(k+1))/.((len(F.k))+1) = G*(i2+1,j2);
                    front_right_cell(F.k,(len(F.k))-'1,G) = cell(G,i1,j2
                    ) by A235,A282,A281,A283,A284,A285,A286,A376,GOBRD13:35;
                    hence left_cell(F.(k+1),m,G) misses C by A237,A238,A285
,A287,A303,A366,A369,A372,A374,A376,A377,GOBRD13:23;
                    j2-'1 = j1 & cell(G,i1,j1) meets C by A235,A282,A281,A283
,A284,A285,A286,A295,A376,GOBRD13:22,NAT_D:34;
                    hence right_cell(F.(k+1),m,G) meets C by A237,A238,A285
,A287,A303,A366,A369,A374,A376,A377,GOBRD13:24;
                  end;
                  suppose that
A378:               i1+1 = i2 & j1 = j2 and
A379:               (F.(k+1))/.((len(F.k))+1) = G*(i2,j2-'1);
                    front_right_cell(F.k,(len(F.k))-'1,G) = cell(G,i2,j2
                    -'1) by A235,A282,A281,A283,A284,A285,A286,A378,GOBRD13:37;
                    hence left_cell(F.(k+1),m,G) misses C by A237,A238,A285
,A293,A303,A366,A369,A370,A372,A374,A378,A379,GOBRD13:27;
                    i2-'1 = i1 & cell(G,i1,j1-'1) meets C by A235,A282,A281
,A283,A284,A285,A286,A295,A378,GOBRD13:24,NAT_D:34;
                    hence right_cell(F.(k+1),m,G) meets C by A237,A238,A285
,A293,A303,A366,A369,A370,A374,A378,A379,GOBRD13:28;
                  end;
                  suppose that
A380:               i1 = i2+1 & j1 = j2 and
A381:               (F.(k+1))/.((len(F.k))+1) = G*(i2,j2+1);
                    front_right_cell(F.k,(len(F.k))-'1,G) = cell(G,i2-'1
                    ,j2) by A235,A282,A281,A283,A284,A285,A286,A380,GOBRD13:39;
                    hence left_cell(F.(k+1),m,G) misses C by A237,A238,A285
,A292,A303,A366,A369,A372,A374,A380,A381,GOBRD13:21;
                    cell(G,i2,j2) meets C by A235,A282,A281,A283,A284,A285,A286
,A295,A380,GOBRD13:26;
                    hence right_cell(F.(k+1),m,G) meets C by A237,A238,A285
,A292,A303,A366,A369,A374,A380,A381,GOBRD13:22;
                  end;
                  suppose that
A382:               i1 = i2 & j1 = j2+1 and
A383:               (F.(k+1))/.((len(F.k))+1) = G*(i2-'1,j2);
                    front_right_cell(F.k,(len(F.k))-'1,G) = cell(G,i2-'1
,j2-'1 ) by A235,A282,A281,A283,A284,A285,A286,A382,GOBRD13:41;
                    hence left_cell(F.(k+1),m,G) misses C by A237,A238,A285
,A299,A303,A366,A369,A371,A372,A374,A382,A383,GOBRD13:25;
                    cell(G,i2-'1,j2) meets C by A235,A282,A281,A283,A284,A285
,A286,A295,A382,GOBRD13:28;
                    hence right_cell(F.(k+1),m,G) meets C by A237,A238,A285
,A299,A303,A366,A369,A371,A374,A382,A383,GOBRD13:26;
                  end;
                end;
                hence thesis;
              end;
              suppose
A384:           front_left_cell(F.k,(len(F.k))-'1,G) misses C &
                front_right_cell(F.k,(len(F.k))-'1,G) meets C;
                then
A385:           ex i,j st (F.k)^<*G*(i,j)*> goes_straight (len(F.k))-'1,G
                & F.(k+1) = (F.k)^<*G*(i,j)*> by A171,A235,A237,A279,A295;
                then
A386:           (F.(k+1))/.len(F.k) = G*(i2,j2) by A286,A280,FINSEQ_4:68;
A387:           (F.(k+1))/.(len(F.k)-'1) = G*(i1,j1) by A284,A301,A385,
FINSEQ_4:68;
                now
                  per cases by A281,A283,A285,A385,A387,A386;
                  suppose that
A388:               i1 = i2 & j1+1 = j2 and
A389:               (F.(k+1))/.(len(F.k)+1) = G*(i2,j2+1);
                    front_left_cell(F.k,(len(F.k))-'1,G) = cell(G,i1-'1,
                    j2) by A235,A282,A281,A283,A284,A285,A286,A388,GOBRD13:34;
                    hence left_cell(F.(k+1),m,G) misses C by A237,A238,A285
,A298,A303,A366,A369,A384,A386,A388,A389,GOBRD13:21;
                    front_right_cell(F.k,(len(F.k))-'1,G) = cell(G,i1,j2
                    ) by A235,A282,A281,A283,A284,A285,A286,A388,GOBRD13:35;
                    hence right_cell(F.(k+1),m,G) meets C by A237,A238,A285
,A298,A303,A366,A369,A384,A386,A388,A389,GOBRD13:22;
                  end;
                  suppose that
A390:               i1+1 = i2 & j1 = j2 and
A391:               (F.(k+1))/.(len(F.k)+1) = G*(i2+1,j2);
                    front_left_cell(F.k,(len(F.k))-'1,G) = cell(G,i2,j2)
                    by A235,A282,A281,A283,A284,A285,A286,A390,GOBRD13:36;
                    hence left_cell(F.(k+1),m,G) misses C by A237,A238,A285
,A297,A303,A366,A369,A384,A386,A390,A391,GOBRD13:23;
                    front_right_cell(F.k,(len(F.k))-'1,G) = cell(G,i2,j2
                    -'1) by A235,A282,A281,A283,A284,A285,A286,A390,GOBRD13:37;
                    hence right_cell(F.(k+1),m,G) meets C by A237,A238,A285
,A297,A303,A366,A369,A384,A386,A390,A391,GOBRD13:24;
                  end;
                  suppose that
A392:               i1 = i2+1 & j1 = j2 and
A393:               (F.(k+1))/.(len(F.k)+1) = G*(i2-'1,j2);
                    front_left_cell(F.k,(len(F.k))-'1,G) = cell(G,i2-'1,
j2-'1) by A235,A282,A281,A283,A284,A285,A286,A392,GOBRD13:38;
                    hence left_cell(F.(k+1),m,G) misses C by A237,A238,A285
,A296,A303,A366,A369,A371,A384,A386,A392,A393,GOBRD13:25;
                    front_right_cell(F.k,(len(F.k))-'1,G) = cell(G,i2-'1
                    ,j2) by A235,A282,A281,A283,A284,A285,A286,A392,GOBRD13:39;
                    hence right_cell(F.(k+1),m,G) meets C by A237,A238,A285
,A296,A303,A366,A369,A371,A384,A386,A392,A393,GOBRD13:26;
                  end;
                  suppose that
A394:               i1 = i2 & j1 = j2+1 and
A395:               (F.(k+1))/.(len(F.k)+1) = G*(i2,j2-'1);
                    front_left_cell(F.k,(len(F.k))-'1,G) = cell(G,i2,j2
                    -'1) by A235,A282,A281,A283,A284,A285,A286,A394,GOBRD13:40;
                    hence left_cell(F.(k+1),m,G) misses C by A237,A238,A285
,A291,A303,A366,A369,A370,A384,A386,A394,A395,GOBRD13:27;
                    front_right_cell(F.k,(len(F.k))-'1,G) = cell(G,i2-'1
,j2-'1 ) by A235,A282,A281,A283,A284,A285,A286,A394,GOBRD13:41;
                    hence right_cell(F.(k+1),m,G) meets C by A237,A238,A285
,A291,A303,A366,A369,A370,A384,A386,A394,A395,GOBRD13:28;
                  end;
                end;
                hence thesis;
              end;
              suppose
A396:           front_left_cell(F.k,(len(F.k))-'1,G) meets C;
                then
A397:           ex i,j st (F.k)^<*G*(i,j)*> turns_left (len(F.k))-'1,G &
                F.(k+1) = (F.k)^<*G*(i,j)*> by A171,A235,A237,A279,A295;
                then
A398:           (F.(k+1))/.len(F.k) = G* (i2,j2) by A286,A280,FINSEQ_4:68;
A399:           (F.(k+1))/.(len(F.k)-'1) = G*(i1,j1) by A284,A301,A397,
FINSEQ_4:68;
                now
                  per cases by A281,A283,A285,A397,A399,A398;
                  suppose that
A400:               i1 = i2 & j1+1 = j2 and
A401:               (F.(k+1))/.(len(F.k)+1) = G*(i2-'1,j2);
                    j2-'1 = j1 & cell(G,i1-'1,j1) misses C by A235,A282,A281
,A283,A284,A285,A286,A368,A400,GOBRD13:21,NAT_D:34;
                    hence left_cell(F.(k+1),m,G) misses C by A237,A238,A285
,A290,A303,A366,A369,A371,A396,A398,A400,A401,GOBRD13:25;
                    front_left_cell(F.k,(len(F.k))-'1,G) = cell(G,i1-'1,
                    j2) by A235,A282,A281,A283,A284,A285,A286,A400,GOBRD13:34;
                    hence right_cell(F.(k+1),m,G) meets C by A237,A238,A285
,A290,A303,A366,A369,A371,A396,A398,A400,A401,GOBRD13:26;
                  end;
                  suppose that
A402:               i1+1 = i2 & j1 = j2 and
A403:               (F.(k+1))/.(len(F.k)+1) = G*(i2,j2+1);
                    i2-'1 = i1 & cell(G,i1,j1) misses C by A235,A282,A281,A283
,A284,A285,A286,A368,A402,GOBRD13:23,NAT_D:34;
                    hence left_cell(F.(k+1),m,G) misses C by A237,A238,A285
,A289,A303,A366,A369,A396,A398,A402,A403,GOBRD13:21;
                    front_left_cell(F.k,(len(F.k))-'1,G) = cell(G,i2,j2)
                    by A235,A282,A281,A283,A284,A285,A286,A402,GOBRD13:36;
                    hence right_cell(F.(k+1),m,G) meets C by A237,A238,A285
,A289,A303,A366,A369,A396,A398,A402,A403,GOBRD13:22;
                  end;
                  suppose that
A404:               i1 = i2+1 & j1 = j2 and
A405:               (F.(k+1))/.(len(F.k)+1) = G*(i2,j2-'1);
                    cell(G,i2,j2-'1) misses C by A235,A282,A281,A283,A284,A285
,A286,A368,A404,GOBRD13:25;
                    hence left_cell(F.(k+1),m,G) misses C by A237,A238,A285
,A288,A303,A366,A369,A370,A396,A398,A404,A405,GOBRD13:27;
                    front_left_cell(F.k,(len(F.k))-'1,G) = cell(G,i2-'1,
j2-'1) by A235,A282,A281,A283,A284,A285,A286,A404,GOBRD13:38;
                    hence right_cell(F.(k+1),m,G) meets C by A237,A238,A285
,A288,A303,A366,A369,A370,A396,A398,A404,A405,GOBRD13:28;
                  end;
                  suppose that
A406:               i1 = i2 & j1 = j2+1 and
A407:               (F.(k+1))/.(len(F.k)+1) = G*(i2+1,j2);
                    cell(G,i2,j2) misses C by A235,A282,A281,A283,A284,A285
,A286,A368,A406,GOBRD13:27;
                    hence left_cell(F.(k+1),m,G) misses C by A237,A238,A285
,A300,A303,A366,A369,A396,A398,A406,A407,GOBRD13:23;
                    front_left_cell(F.k,(len(F.k))-'1,G) = cell(G,i2,j2
                    -'1) by A235,A282,A281,A283,A284,A285,A286,A406,GOBRD13:40;
                    hence right_cell(F.(k+1),m,G) meets C by A237,A238,A285
,A300,A303,A366,A369,A396,A398,A406,A407,GOBRD13:24;
                  end;
                end;
                hence thesis;
              end;
            end;
          end;
          suppose
            m+1 <> len(F.(k+1));
            then m+1 < len(F.(k+1)) by A367,XXREAL_0:1;
            then
A408:       m+1 <= len(F.k)by A237,A238,NAT_1:13;
            then consider i1,j1,i2,j2 being Nat such that
A409:       [i1,j1] in Indices G and
A410:       (F.k)/.m = G*(i1,j1) and
A411:       [i2,j2] in Indices G and
A412:       (F.k)/.(m+1) = G*(i2,j2) and
A413:       i1 = i2 & j1+1 = j2 or i1+1 = i2 & j1 = j2 or i1 = i2+1
            & j1 = j2 or i1 = i2 & j1 = j2+1 by A235,A366,JORDAN8:3;
A414:       left_cell(F.k,m,G) misses C & right_cell(F.k,m,G) meets C by A236
,A366,A408;
A415:       now
              per cases;
              suppose
                front_left_cell(F.k,(len(F.k))-'1,G) misses C &
                front_right_cell(F.k,(len(F.k))-'1,G) misses C;
                then consider i,j such that
                (F.k)^<*G*(i,j)*> turns_right (len(F.k))-'1,G and
A416:           F.(k+1) = (F.k)^<*G*(i,j)*> by A171,A235,A237,A279,A295;
                take i,j;
                thus F.(k+1) = (F.k)^<*G*(i,j)*> by A416;
              end;
              suppose
                front_left_cell(F.k,(len(F.k))-'1,G) misses C &
                front_right_cell(F.k,(len(F.k))-'1,G) meets C;
                then consider i,j such that
                (F.k)^<*G*(i,j)*> goes_straight (len(F.k))-'1,G and
A417:           F.(k+1) = (F.k)^<*G*(i,j)*> by A171,A235,A237,A279,A295;
                take i,j;
                thus F.(k+1) = (F.k)^<*G*(i,j)*> by A417;
              end;
              suppose
                front_left_cell(F.k,(len(F.k))-'1,G) meets C;
                then consider i,j such that
                (F.k)^<*G*(i,j)*> turns_left (len(F.k))-'1,G and
A418:           F.(k+1) = (F.k)^<*G*(i,j)*> by A171,A235,A237,A279,A295;
                take i,j;
                thus F.(k+1) = (F.k)^<*G*(i,j)*> by A418;
              end;
            end;
            1 <= m+1 by NAT_1:12;
            then m+1 in dom(F.k) by A408,FINSEQ_3:25;
            then
A419:       (F.(k+1))/.(m+1) = G*(i2,j2) by A412,A415,FINSEQ_4:68;
            m <= len(F.k) by A408,NAT_1:13;
            then m in dom(F.k) by A366,FINSEQ_3:25;
            then
A420:       (F.(k+1))/.m = G*(i1,j1) by A410,A415,FINSEQ_4:68;
            now
              per cases by A413;
              suppose
A421:           i1 = i2 & j1+1 = j2;
                then left_cell(F.k,m,G) = cell(G,i1-'1,j1) & right_cell(F.k,m
,G) = cell(G,i1,j1) by A235,A366,A408,A409,A410,A411,A412,GOBRD13:21,22;
                hence thesis by A303,A366,A367,A409,A411,A414,A420,A419,A421,
GOBRD13:21,22;
              end;
              suppose
A422:           i1+1 = i2 & j1 = j2;
                then left_cell(F.k,m,G) = cell(G,i1,j1) & right_cell(F.k,m,G)
= cell(G,i1,j1-'1) by A235,A366,A408,A409,A410,A411,A412,GOBRD13:23,24;
                hence thesis by A303,A366,A367,A409,A411,A414,A420,A419,A422,
GOBRD13:23,24;
              end;
              suppose
A423:           i1 = i2+1 & j1 = j2;
                then left_cell(F.k,m,G) = cell(G,i2,j2-'1) & right_cell(F.k,m
,G) = cell(G,i2,j2) by A235,A366,A408,A409,A410,A411,A412,GOBRD13:25,26;
                hence thesis by A303,A366,A367,A409,A411,A414,A420,A419,A423,
GOBRD13:25,26;
              end;
              suppose
A424:           i1 = i2 & j1 = j2+1;
                then left_cell(F.k,m,G) = cell(G,i2,j2) & right_cell(F.k,m,G)
= cell(G,i1-'1,j2) by A235,A366,A408,A409,A410,A411,A412,GOBRD13:27,28;
                hence thesis by A303,A366,A367,A409,A411,A414,A420,A419,A424,
GOBRD13:27,28;
              end;
            end;
            hence thesis;
          end;
        end;
        hence thesis;
      end;
    end;
    defpred Q[Nat] means ex w being Nat st w = $1 & $1 >= 1 & ex m
    st m in dom(F.w) & m <> len(F.w) & (F.w)/.m = (F.w)/.len(F.w);
A425: P[0]
    proof
      ( for n st n in dom(F.0) ex i,j st [i,j] in Indices G & (F.0)/.n =
G*(i,j))& for n st n in dom(F.0) & n+1 in dom(F.0) holds for m,k,i,j st [m,k]
in Indices G & [i,j] in Indices G & (F.0)/.n = G*(m,k) & (F.0)/.(n+1) = G*(i,j)
      holds |.m-i.|+|.k-j.| = 1 by A170;
      hence F.0 is_sequence_on G by GOBOARD1:def 9;
      let m;
      assume that
      1 <= m and
A426: m+1 <= len(F.0);
      thus thesis by A170,A426,CARD_1:27;
    end;
A427: for k holds P[k] from NAT_1:sch 2(A425,A232);
A428: for k,i1,i2,j1,j2 st k > 1 & [i1,j1] in Indices G & (F.k)/.((len(F.k
)) -'1) = G*(i1,j1) & [i2,j2] in Indices G & (F.k)/.len(F.k) = G*(i2,j2) holds
(front_left_cell(F.k,(len(F.k))-'1,G) misses C & front_right_cell(F.k,(len(F.k)
)-'1,G) misses C implies F.(k+1) turns_right (len(F.k))-'1,G & (i1 = i2 & j1+1
= j2 implies [i2+1,j2] in Indices G & F.(k+1) = (F.k)^<*G*(i2+1,j2)*>) & (i1+1
= i2 & j1 = j2 implies [i2,j2-'1] in Indices G & F.(k+1) = (F.k)^<*G*(i2,j2-'1)
*>) & (i1 = i2+1 & j1 = j2 implies [i2,j2+1] in Indices G & F.(k+1) = (F.k)^<*G
*(i2,j2+1)*>)& (i1 = i2 & j1 = j2+1 implies [i2-'1,j2] in Indices G & F.(k+1) =
    (F.k)^<*G*(i2-'1,j2)*>)) & (front_left_cell(F.k,(len(F.k))-'1,G) misses C &
front_right_cell(F.k,(len(F.k))-'1,G) meets C implies F.(k+1) goes_straight (
len(F.k))-'1,G & (i1 = i2 & j1+1 = j2 implies [i2,j2+1] in Indices G & F.(k+1)
= (F.k)^<*G*(i2,j2+1)*>) & (i1+1 = i2 & j1 = j2 implies [i2+1,j2] in Indices G
& F.(k+1) = (F.k)^<*G*(i2+1,j2)*>) & (i1 = i2+1 & j1 = j2 implies [i2-'1,j2] in
Indices G & F.(k+1) = (F.k)^<*G*(i2-'1,j2)*>)& (i1 = i2 & j1 = j2+1 implies [i2
,j2-'1] in Indices G & F.(k+1) = (F.k)^<*G*(i2,j2-'1)*>)) & (front_left_cell(F.
k,(len(F.k))-'1,G) meets C implies F.(k+1) turns_left (len(F.k))-'1,G & (i1 =
i2 & j1+1 = j2 implies [i2-'1,j2] in Indices G & F.(k+1) = (F.k)^<*G*(i2-'1,j2)
*>) & (i1+1 = i2 & j1 = j2 implies [i2,j2+1] in Indices G & F.(k+1) = (F.k)^<*G
*(i2,j2+1)*>) & (i1 = i2+1 & j1 = j2 implies [i2,j2-'1] in Indices G & F.(k+1)
= (F.k)^<*G*(i2,j2-'1)*>)& (i1 = i2 & j1 = j2+1 implies [i2+1,j2] in Indices G
    & F.(k+1) = (F.k)^<*G*(i2+1,j2)*>))
    proof
      let k,i1,i2,j1,j2 such that
A429: k > 1 and
A430: [i1,j1] in Indices G and
A431: (F.k)/.((len(F.k)) -'1) = G*(i1,j1) and
A432: [i2,j2] in Indices G and
A433: (F.k)/.len(F.k) = G*(i2,j2);
A434: len(F.k) = k by A192;
      then
A435: (len(F.k)) -'1 +1 = len(F.k) by A429,XREAL_1:235;
A436: 1 <= (len(F.k))-'1 by A429,A434,NAT_D:49;
      then
A437: right_cell(F.k,(len(F.k))-'1,G) meets C by A427,A435;
      (len(F.k))-'1 <= len(F.k) by NAT_D:35;
      then
A438: (len(F.k))-'1 in dom(F.k) by A436,FINSEQ_3:25;
A439: j1+1 > j1 & j2+1 > j2 by NAT_1:13;
A440: F.k is_sequence_on G by A427;
A441: i1+1 > i1 & i2+1 > i2 by NAT_1:13;
A442: len(F.k) in dom(F.k) by A429,A434,FINSEQ_3:25;
      hereby
        assume front_left_cell(F.k,(len(F.k))-'1,G) misses C &
        front_right_cell(F.k,(len(F. k))-'1,G) misses C;
        then consider i,j such that
A443:   (F.k)^<*G*(i,j)*> turns_right (len(F.k))-'1,G and
A444:   F.(k+1) = (F.k)^<*G*(i,j)*> by A171,A429,A440,A434,A437;
        thus F.(k+1) turns_right (len(F.k))-'1,G by A443,A444;
A445:   (F.(k+1))/.(len(F.k)+1) = G*(i,j) by A444,FINSEQ_4:67;
A446:   (F.(k+1))/.(len(F.k)-'1) = G*(i1,j1) & (F.(k+1))/.len(F.k) = G*
        (i2,j2) by A431,A433,A438,A442,A444,FINSEQ_4:68;
        hence
        i1 = i2 & j1+1 = j2 implies [i2+1,j2] in Indices G & F.(k+1) = (F
.k)^<*G*(i2+1,j2)*> by A430,A432,A435,A439,A443,A444,A445;
        thus i1+1 = i2 & j1 = j2 implies [i2,j2-'1] in Indices G & F.(k+1) = (
F.k)^<*G*(i2,j2-'1)*> by A430,A432,A435,A441,A443,A444,A446,A445;
        thus i1 = i2+1 & j1 = j2 implies [i2,j2+1] in Indices G & F.(k+1) = (F
.k)^<*G*(i2,j2+1)*> by A430,A432,A435,A441,A443,A444,A446,A445;
        thus i1 = i2 & j1 = j2+1 implies [i2-'1,j2] in Indices G & F.(k+1) = (
F.k)^<*G*(i2-'1,j2)*> by A430,A432,A435,A439,A443,A444,A446,A445;
      end;
      hereby
        assume front_left_cell(F.k,(len(F.k))-'1,G) misses C &
        front_right_cell(F.k,(len(F. k))-'1,G) meets C;
        then consider i,j such that
A447:   (F.k)^<*G*(i,j)*> goes_straight (len(F.k))-'1,G and
A448:   F.(k+1) = (F.k)^<*G*(i,j)*> by A171,A429,A440,A434,A437;
        thus F.(k+1) goes_straight (len(F.k))-'1,G by A447,A448;
A449:   (F.(k+1))/.(len(F.k)+1) = G*(i,j) by A448,FINSEQ_4:67;
A450:   (F.(k+1))/.(len(F.k)-'1) = G*(i1,j1) & (F.(k+1))/.len(F.k) = G*
        (i2,j2) by A431,A433,A438,A442,A448,FINSEQ_4:68;
        hence
        i1 = i2 & j1+1 = j2 implies [i2,j2+1] in Indices G & F.(k+1) = (F
.k)^<*G*(i2,j2+1)*> by A430,A432,A435,A439,A447,A448,A449;
        thus i1+1 = i2 & j1 = j2 implies [i2+1,j2] in Indices G & F.(k+1) = (F
.k)^<*G*(i2+1,j2)*> by A430,A432,A435,A441,A447,A448,A450,A449;
        thus i1 = i2+1 & j1 = j2 implies [i2-'1,j2] in Indices G & F.(k+1) = (
F.k)^<*G*(i2-'1,j2)*> by A430,A432,A435,A441,A447,A448,A450,A449;
        thus i1 = i2 & j1 = j2+1 implies [i2,j2-'1] in Indices G & F.(k+1) = (
F.k)^<*G*(i2,j2-'1)*> by A430,A432,A435,A439,A447,A448,A450,A449;
      end;
      assume front_left_cell(F.k,(len(F.k))-'1,G) meets C;
      then consider i,j such that
A451: (F.k)^<*G*(i,j)*> turns_left (len(F.k))-'1,G and
A452: F.(k+1) = (F.k)^<*G*(i,j)*> by A171,A429,A440,A434,A437;
A453: (F.(k+1))/.len(F.k) = G* (i2,j2) by A433,A442,A452,FINSEQ_4:68;
      thus F.(k+1) turns_left (len(F.k))-'1,G by A451,A452;
A454: (F.(k+1))/.(len(F.k)+1) = G*(i,j) by A452,FINSEQ_4:67;
A455: (F.(k+1))/.(len(F.k)-'1) = G*(i1,j1) by A431,A438,A452,FINSEQ_4:68;
      hence
      i1 = i2 & j1+1 = j2 implies [i2-'1,j2] in Indices G & F.(k+1) = (F.
      k)^<*G*(i2-'1,j2)*> by A430,A432,A435,A439,A451,A452,A453,A454;
      thus i1+1 = i2 & j1 = j2 implies [i2,j2+1] in Indices G & F.(k+1) = (F.k
)^<*G*(i2,j2+1)*> by A430,A432,A435,A441,A451,A452,A455,A453,A454;
      thus i1 = i2+1 & j1 = j2 implies [i2,j2-'1] in Indices G & F.(k+1) = (F.
      k)^<*G*(i2,j2-'1)*> by A430,A432,A435,A441,A451,A452,A455,A453,A454;
      thus thesis by A430,A432,A435,A439,A451,A452,A455,A453,A454;
    end;
A456: for k st k > 1 holds (front_left_cell(F.k,k-'1,Gauge(C,n)) misses C
& front_right_cell(F.k,k-'1,Gauge(C,n)) misses C implies F.(k+1) turns_right k
    -'1,Gauge(C,n)) & (front_left_cell(F.k,k-'1,Gauge(C,n)) misses C &
front_right_cell(F.k,k-'1,Gauge(C,n)) meets C implies F.(k+1) goes_straight k-'
1,Gauge(C,n)) & (front_left_cell(F.k,k-'1,Gauge(C,n)) meets C implies F.(k+1)
    turns_left k-'1,Gauge(C,n))
    proof
      let k such that
A457: k > 1;
A458: F.k is_sequence_on G by A427;
A459: len(F.k) = k by A192;
      then 1 <= (len(F.k))-'1 & (len(F.k)) -'1 +1 = len(F.k) by A457,NAT_D:49
,XREAL_1:235;
      then ex i1,j1,i2,j2 being Nat st [i1,j1] in Indices G & (F.k
)/.((len(F.k)) -'1) = G*(i1,j1) & [i2,j2] in Indices G & (F.k)/.len(F.k) = G*(
i2,j2) & (i1 = i2 & j1+1 = j2 or i1+1 = i2 & j1 = j2 or i1 = i2+1 & j1 = j2 or
      i1 = i2 & j1 = j2+1) by A458,JORDAN8:3;
      hence thesis by A428,A457,A459;
    end;
    defpred P[Nat] means for m st m <= $1 holds (F.$1)|m = F.m;
A460: P[0]
    proof
      let m;
      assume
A461: m <= 0;
      then (F.0)|0 = (F.0)|m;
      hence thesis by A170,A461;
    end;
A462: for k holds ex i,j st [i,j] in Indices G & F.(k+1) = (F.k)^<*G*(i,j) *>
    proof
      let k;
A463: F.k is_sequence_on G by A427;
A464: len(F.k) = k by A192;
      len G >= 4 by JORDAN8:10;
      then
A465: len G = width G & 1 < len G by JORDAN8:def 1,XXREAL_0:2;
      per cases by XXREAL_0:1;
      suppose
A466:   k < 1;
        consider i such that
A467:   1 <= i and
A468:   i+1 <= len G and
        N-min C in cell(G,i,width G-'1) and
        N-min C <> G*(i,width G-'1) and
A469:   F.(0+1) = <*G*(i,width G)*> by A171;
        take i, j = width G;
        i < len G by A468,NAT_1:13;
        hence [i,j] in Indices G by A465,A467,MATRIX_0:30;
        k = 0 by A466,NAT_1:14;
        hence thesis by A170,A469,FINSEQ_1:34;
      end;
      suppose
A470:   k = 1;
        consider i such that
A471:   1 <= i and
A472:   i+1 <= len G and
A473:   N-min C in cell(G,i,width G-'1) & N-min C <> G*(i,width G-'1 ) and
A474:   F.(0+1) = <*G*(i,width G)*> by A171;
        take i+1,j = width G;
        1 <= i+1 by A471,NAT_1:13;
        hence [i+1,j] in Indices G by A465,A472,MATRIX_0:30;
        consider i9 being Nat such that
A475:   1 <= i9 & i9+1 <= len G & N-min C in cell(G,i9,width G-'1) &
        N-min C <> G*(i9,width G-'1) and
A476:   F.(1+1) = <*G*(i9,width G),G*(i9+1,width G)*> by A171;
        i = i9 by A471,A472,A473,A475,Th29;
        hence thesis by A470,A474,A476,FINSEQ_1:def 9;
      end;
      suppose
A477:   k > 1;
        then 1 <= (len(F.k))-'1 & (len(F.k)) -'1 +1 = len(F.k) by A464,NAT_D:49
,XREAL_1:235;
        then consider i1,j1,i2,j2 being Nat such that
A478:   [i1,j1] in Indices G & (F.k)/.((len(F.k)) -'1) = G*(i1,j1) &
        [i2,j2] in Indices G & (F.k)/.len(F.k) = G*(i2,j2) and
A479:   i1 = i2 & j1+1 = j2 or i1+1 = i2 & j1 = j2 or i1 = i2+1 & j1
        = j2 or i1 = i2 & j1 = j2+1 by A463,JORDAN8:3;
        now
          per cases;
          suppose
A480:       front_left_cell(F.k,(len(F.k))-'1,G) misses C &
            front_right_cell(F.k,(len(F.k))-'1,G) misses C;
            now
              per cases by A479;
              suppose
                i1 = i2 & j1+1 = j2;
                then [i2+1,j2] in Indices G & F.(k+1) = (F.k)^<*G*(i2+1,j2)*>
                by A428,A477,A478,A480;
                hence thesis;
              end;
              suppose
                i1+1 = i2 & j1 = j2;
                then [i2,j2-'1] in Indices G & F.(k+1) = (F.k)^<*G*(i2,j2-'1)
                *> by A428,A477,A478,A480;
                hence thesis;
              end;
              suppose
                i1 = i2+1 & j1 = j2;
                then [i2,j2+1] in Indices G & F.(k+1) = (F.k)^<*G*(i2,j2+1)*>
                by A428,A477,A478,A480;
                hence thesis;
              end;
              suppose
                i1 = i2 & j1 = j2+1;
                then [i2-'1,j2] in Indices G & F.(k+1) = (F.k)^<*G*(i2-'1,j2)
                *> by A428,A477,A478,A480;
                hence thesis;
              end;
            end;
            hence thesis;
          end;
          suppose
A481:       front_left_cell(F.k,(len(F.k))-'1,G) misses C &
            front_right_cell(F.k,(len(F.k))-'1,G) meets C;
            now
              per cases by A479;
              suppose
                i1 = i2 & j1+1 = j2;
                then [i2,j2+1] in Indices G & F.(k+1) = (F.k)^<*G*(i2,j2+1)*>
                by A428,A477,A478,A481;
                hence thesis;
              end;
              suppose
                i1+1 = i2 & j1 = j2;
                then [i2+1,j2] in Indices G & F.(k+1) = (F.k)^<*G*(i2+1,j2)*>
                by A428,A477,A478,A481;
                hence thesis;
              end;
              suppose
                i1 = i2+1 & j1 = j2;
                then [i2-'1,j2] in Indices G & F.(k+1) = (F.k)^<*G*(i2-'1,j2)
                *> by A428,A477,A478,A481;
                hence thesis;
              end;
              suppose
                i1 = i2 & j1 = j2+1;
                then [i2,j2-'1] in Indices G & F.(k+1) = (F.k)^<*G*(i2,j2-'1)
                *> by A428,A477,A478,A481;
                hence thesis;
              end;
            end;
            hence thesis;
          end;
          suppose
A482:       front_left_cell(F.k,(len(F.k))-'1,G) meets C;
            now
              per cases by A479;
              suppose
                i1 = i2 & j1+1 = j2;
                then [i2-'1,j2] in Indices G & F.(k+1) = (F.k)^<*G*(i2-'1,j2)
                *> by A428,A477,A478,A482;
                hence thesis;
              end;
              suppose
                i1+1 = i2 & j1 = j2;
                then [i2,j2+1] in Indices G & F.(k+1) = (F.k)^<*G*(i2,j2+1)*>
                by A428,A477,A478,A482;
                hence thesis;
              end;
              suppose
                i1 = i2+1 & j1 = j2;
                then [i2,j2-'1] in Indices G & F.(k+1) = (F.k)^<*G*(i2,j2-'1)
                *> by A428,A477,A478,A482;
                hence thesis;
              end;
              suppose
                i1 = i2 & j1 = j2+1;
                then [i2+1,j2] in Indices G & F.(k+1) = (F.k)^<*G*(i2+1,j2)*>
                by A428,A477,A478,A482;
                hence thesis;
              end;
            end;
            hence thesis;
          end;
        end;
        hence thesis;
      end;
    end;
A483: for k st P[k] holds P[k+1]
    proof
      let k such that
A484: for m st m <= k holds (F.k)|m = F.m;
      let m such that
A485: m <= k+1;
      per cases by A485,XXREAL_0:1;
      suppose
        m < k+1;
        then
A486:   m <= k by NAT_1:13;
        len(F.k) = k & ex i,j st [i,j] in Indices G & F.(k+1) = F.k^<*G*
        (i,j)*> by A192,A462;
        then (F.(k+1))|m = (F.k)|m by A486,FINSEQ_5:22;
        hence thesis by A484,A486;
      end;
      suppose
A487:   m = k+1;
        len(F.(k+1)) = k+1 by A192;
        hence thesis by A487,FINSEQ_1:58;
      end;
    end;
A488: for k holds P[k] from NAT_1:sch 2(A460,A483);
    defpred P[Nat] means F.$1 is unfolded;
A489: for k st P[k] holds P[k+1]
    proof
      let k such that
A490: F.k is unfolded;
A491: F.k is_sequence_on G by A427;
      per cases;
      suppose
        k <= 1;
        then k+1 <= 1+1 by XREAL_1:6;
        then len(F.(k+1)) <= 2 by A192;
        hence thesis by SPPOL_2:26;
      end;
      suppose
A492:   k > 1;
        set m = k-'1;
A493:   m+1 = k by A492,XREAL_1:235;
A494:   len(F.k) = k by A192;
A495:   1 <= m by A492,NAT_D:49;
        then consider i1,j1,i2,j2 being Nat such that
A496:   [i1,j1] in Indices G and
A497:   (F.k)/.m = G*(i1,j1) and
A498:   [i2,j2] in Indices G and
A499:   (F.k)/.len(F.k) = G*(i2,j2) and
A500:   i1 = i2 & j1+1 = j2 or i1+1 = i2 & j1 = j2 or i1 = i2+1 & j1
        = j2 or i1 = i2 & j1 = j2+1 by A491,A493,A494,JORDAN8:3;
A501:   LSeg(F.k,m) = LSeg(G*(i1,j1),G*(i2,j2)) by A495,A493,A494,A497,A499,
TOPREAL1:def 3;
A502:   1 <= j2 by A498,MATRIX_0:32;
        then
A503:   (j2-'1)+1 = j2 by XREAL_1:235;
A504:   1 <= j1 by A496,MATRIX_0:32;
A505:   1 <= i2 by A498,MATRIX_0:32;
        then
A506:   (i2-'1)+1 = i2 by XREAL_1:235;
A507:   i1 <= len G by A496,MATRIX_0:32;
A508:   j2 <= width G by A498,MATRIX_0:32;
A509:   1 <= i1 by A496,MATRIX_0:32;
A510:   j1 <= width G by A496,MATRIX_0:32;
A511:   i2 <= len G by A498,MATRIX_0:32;
        now
          per cases;
          suppose
A512:       front_left_cell(F.k,(len(F.k))-'1,G) misses C &
            front_right_cell(F.k,(len(F.k))-'1,G) misses C;
            now
              per cases by A500;
              suppose
A513:           i1 = i2 & j1+1 = j2;
                then [i2+1,j2] in Indices G by A428,A492,A494,A496,A497,A498
,A499,A512;
                then i2+1 <= len G by MATRIX_0:32;
                then
A514:           LSeg(F.k,m) /\ LSeg((F.k)/.len(F.k),G* (i2+1,j2)) = {(F.
                k)/.len(F.k)} by A499,A509,A504,A508,A501,A513,GOBOARD7:15;
                F.(k+1) = (F.k)^ <*G*(i2+1,j2)*> by A428,A492,A494,A496,A497
,A498,A499,A512,A513;
                hence thesis by A490,A493,A494,A514,SPPOL_2:30;
              end;
              suppose
A515:           i1+1 = i2 & j1 = j2;
                then [i2,j2-'1] in Indices G by A428,A492,A494,A496,A497,A498
,A499,A512;
                then 1 <= j2-'1 by MATRIX_0:32;
                then
A516:           LSeg(F.k,m) /\ LSeg((F.k)/.len(F.k),G*(i2,j2-'1)) = {(F.
k)/.len(F.k)} by A499,A509,A510,A511,A503,A501,A515,GOBOARD7:16;
                F.(k+1) = (F.k)^ <*G*(i2,j2-'1)*> by A428,A492,A494,A496,A497
,A498,A499,A512,A515;
                hence thesis by A490,A493,A494,A516,SPPOL_2:30;
              end;
              suppose
A517:           i1 = i2+1 & j1 = j2;
                then [i2,j2+1] in Indices G by A428,A492,A494,A496,A497,A498
,A499,A512;
                then j2+1 <= width G by MATRIX_0:32;
                then
A518:           LSeg(F.k,m) /\ LSeg((F.k)/.len(F.k),G* (i2,j2+1)) = {(F.
                k)/.len(F.k)} by A499,A507,A504,A505,A501,A517,GOBOARD7:17;
                F.(k+1) = (F.k)^ <*G*(i2,j2+1)*> by A428,A492,A494,A496,A497
,A498,A499,A512,A517;
                hence thesis by A490,A493,A494,A518,SPPOL_2:30;
              end;
              suppose
A519:           i1 = i2 & j1 = j2+1;
                then [i2-'1,j2] in Indices G by A428,A492,A494,A496,A497,A498
,A499,A512;
                then 1 <= i2-'1 by MATRIX_0:32;
                then
A520:           LSeg(F.k,m) /\ LSeg((F.k)/.len(F.k),G*(i2-'1,j2)) = {(F.
k)/.len(F.k)} by A499,A507,A510,A502,A506,A501,A519,GOBOARD7:18;
                F.(k+1) = (F.k)^ <*G*(i2-'1,j2)*> by A428,A492,A494,A496,A497
,A498,A499,A512,A519;
                hence thesis by A490,A493,A494,A520,SPPOL_2:30;
              end;
            end;
            hence thesis;
          end;
          suppose
A521:       front_left_cell(F.k,(len(F.k))-'1,G) misses C &
            front_right_cell(F.k,(len(F.k))-'1,G) meets C;
            now
              per cases by A500;
              suppose
A522:           i1 = i2 & j1+1 = j2;
                then [i2,j2+1] in Indices G by A428,A492,A494,A496,A497,A498
,A499,A521;
                then
A523:           j2+1 <= width G by MATRIX_0:32;
                j2+1 = j1+(1+1) by A522;
                then
A524:           LSeg(F.k,m) /\ LSeg((F.k)/.len(F.k),G* (i2,j2+1)) = {(F.
k)/.len(F.k)} by A499,A509,A507,A504,A501,A522,A523,GOBOARD7:13;
                F.(k+1) = (F.k)^ <*G*(i2,j2+1)*> by A428,A492,A494,A496,A497
,A498,A499,A521,A522;
                hence thesis by A490,A493,A494,A524,SPPOL_2:30;
              end;
              suppose
A525:           i1+1 = i2 & j1 = j2;
                then [i2+1,j2] in Indices G by A428,A492,A494,A496,A497,A498
,A499,A521;
                then
A526:           i2+1 <= len G by MATRIX_0:32;
                i2+1 = i1+(1+1) by A525;
                then
A527:           LSeg(F.k,m) /\ LSeg((F.k)/.len(F.k),G* (i2+1,j2)) = {(F.
k)/.len(F.k)} by A499,A509,A504,A510,A501,A525,A526,GOBOARD7:14;
                F.(k+1) = (F.k)^ <*G*(i2+1,j2)*> by A428,A492,A494,A496,A497
,A498,A499,A521,A525;
                hence thesis by A490,A493,A494,A527,SPPOL_2:30;
              end;
              suppose
A528:           i1 = i2+1 & j1 = j2;
                then [i2-'1,j2] in Indices G by A428,A492,A494,A496,A497,A498
,A499,A521;
                then
A529:           1 <= i2-'1 by MATRIX_0:32;
                i2-'1+1+1 = i2-'1+(1+1);
                then
A530:           LSeg(F.k,m) /\ LSeg((F.k)/.len(F.k),G*(i2-'1,j2)) = {(F.
k)/.len(F.k)} by A499,A507,A504,A510,A506,A501,A528,A529,GOBOARD7:14;
                F.(k+1) = (F.k)^ <*G*(i2-'1,j2)*> by A428,A492,A494,A496,A497
,A498,A499,A521,A528;
                hence thesis by A490,A493,A494,A530,SPPOL_2:30;
              end;
              suppose
A531:           i1 = i2 & j1 = j2+1;
                then [i2,j2-'1] in Indices G by A428,A492,A494,A496,A497,A498
,A499,A521;
                then
A532:           1 <= j2-'1 by MATRIX_0:32;
                j2-'1+1+1 = j2-'1+(1+1);
                then
A533:           LSeg(F.k,m) /\ LSeg((F.k)/.len(F.k),G*(i2,j2-'1)) = {(F.
k)/.len(F.k)} by A499,A509,A507,A510,A503,A501,A531,A532,GOBOARD7:13;
                F.(k+1) = (F.k)^ <*G*(i2,j2-'1)*> by A428,A492,A494,A496,A497
,A498,A499,A521,A531;
                hence thesis by A490,A493,A494,A533,SPPOL_2:30;
              end;
            end;
            hence thesis;
          end;
          suppose
A534:       front_left_cell(F.k,(len(F.k))-'1,G) meets C;
            now
              per cases by A500;
              suppose
A535:           i1 = i2 & j1+1 = j2;
                then [i2-'1,j2] in Indices G by A428,A492,A494,A496,A497,A498
,A499,A534;
                then 1 <= i2-'1 by MATRIX_0:32;
                then
A536:           LSeg(F.k,m) /\ LSeg((F.k)/.len(F.k),G*(i2-'1,j2)) = {(F.
k)/.len(F.k)} by A499,A507,A504,A508,A506,A501,A535,GOBOARD7:16;
                F.(k+1) = (F.k)^ <*G*(i2-'1,j2)*> by A428,A492,A494,A496,A497
,A498,A499,A534,A535;
                hence thesis by A490,A493,A494,A536,SPPOL_2:30;
              end;
              suppose
A537:           i1+1 = i2 & j1 = j2;
                then [i2,j2+1] in Indices G by A428,A492,A494,A496,A497,A498
,A499,A534;
                then j2+1 <= width G by MATRIX_0:32;
                then
A538:           LSeg(F.k,m) /\ LSeg((F.k)/.len(F.k),G* (i2,j2+1)) = {(F.
                k)/.len(F.k)} by A499,A509,A504,A511,A501,A537,GOBOARD7:18;
                F.(k+1) = (F.k)^ <*G*(i2,j2+1)*> by A428,A492,A494,A496,A497
,A498,A499,A534,A537;
                hence thesis by A490,A493,A494,A538,SPPOL_2:30;
              end;
              suppose
A539:           i1 = i2+1 & j1 = j2;
                then [i2,j2-'1] in Indices G by A428,A492,A494,A496,A497,A498
,A499,A534;
                then 1 <= j2-'1 by MATRIX_0:32;
                then
A540:           LSeg(F.k,m) /\ LSeg((F.k)/.len(F.k),G*(i2,j2-'1)) = {(F.
k)/.len(F.k)} by A499,A507,A510,A505,A503,A501,A539,GOBOARD7:15;
                F.(k+1) = (F.k)^ <*G*(i2,j2-'1)*> by A428,A492,A494,A496,A497
,A498,A499,A534,A539;
                hence thesis by A490,A493,A494,A540,SPPOL_2:30;
              end;
              suppose
A541:           i1 = i2 & j1 = j2+1;
                then [i2+1,j2] in Indices G by A428,A492,A494,A496,A497,A498
,A499,A534;
                then i2+1 <= len G by MATRIX_0:32;
                then
A542:           LSeg(F.k,m) /\ LSeg((F.k)/.len(F.k),G* (i2+1,j2)) = {(F.
                k)/.len(F.k)} by A499,A509,A510,A502,A501,A541,GOBOARD7:17;
                F.(k+1) = (F.k)^ <*G*(i2+1,j2)*> by A428,A492,A494,A496,A497
,A498,A499,A534,A541;
                hence thesis by A490,A493,A494,A542,SPPOL_2:30;
              end;
            end;
            hence thesis;
          end;
        end;
        hence thesis;
      end;
    end;
    now
      defpred P[Nat] means F.$1 is one-to-one;
      assume
A543: for k st k >= 1 holds for m st m in dom(F.k) & m <> len(F.k)
      holds (F.k)/.m <> (F.k)/.len(F.k);
A544: for k st P[k] holds P[k+1]
      proof
        let k;
        assume
A545:   F.k is one-to-one;
        now
          let n,m be Element of NAT such that
A546:     n in dom(F.(k+1)) and
A547:     m in dom(F.(k+1)) and
A548:     (F.(k+1))/.n = (F.(k+1))/.m;
A549:     n <= len(F.(k+1)) & m <= len(F.(k+1)) by A546,A547,FINSEQ_3:25;
A550:     1 <= m by A547,FINSEQ_3:25;
A551:     1 <= n by A546,FINSEQ_3:25;
A552:     ex i,j st [i,j] in Indices G & F.(k+1) = (F.k)^<*G*(i,j) *> by A462;
A553:     len(F.k) = k by A192;
A554:     len(F.(k+1)) = k+1 by A192;
          per cases by A549,A554,NAT_1:8;
          suppose
A555:       n <= k & m <= k;
            then
A556:       m in dom(F.k) by A550,A553,FINSEQ_3:25;
            then
A557:       (F.(k+1))/.m = (F.k)/.m by A552,FINSEQ_4:68;
A558:       n in dom(F.k) by A551,A553,A555,FINSEQ_3:25;
            then (F.(k+1))/.n = (F.k)/.n by A552,FINSEQ_4:68;
            hence n = m by A545,A548,A558,A556,A557,PARTFUN2:10;
          end;
          suppose
            n = k+1 & m <= k;
            hence n = m by A543,A547,A548,A554,NAT_1:12;
          end;
          suppose
            n <= k & m = k+1;
            hence n = m by A543,A546,A548,A554,NAT_1:12;
          end;
          suppose
            n = k+1 & m = k+1;
            hence n = m;
          end;
        end;
        hence thesis by PARTFUN2:9;
      end;
A559: P[0] by A170;
A560: for k holds P[k] from NAT_1:sch 2(A559,A544);
A561: for k holds card rng(F.k) = k
      proof
        let k;
        F.k is one-to-one by A560;
        hence card rng(F.k) = len(F.k) by FINSEQ_4:62
          .= k by A192;
      end;
      set k = (len G)*(width G)+1;
      F.k is_sequence_on G by A427;
      then card Values G <= (len G)*(width G) & card rng(F.k) <= card Values
      G by GOBRD13:8,MATRIX_0:40,NAT_1:43;
      then k > (len G)*(width G) & card rng(F.k) <= (len G)*(width G) by
NAT_1:13,XXREAL_0:2;
      hence contradiction by A561;
    end;
    then
A562: ex k be Nat st Q[k];
    consider k be Nat such that
A563: Q[k] and
A564: for l be Nat st Q[l] holds k <= l from NAT_1:sch 5(A562);
    reconsider k as Nat;
    consider m such that
A565: m in dom(F.k) and
A566: m <> len(F.k) and
A567: (F.k)/.m = (F.k)/.len(F.k) by A563;
A568: 1 <= m by A565,FINSEQ_3:25;
    reconsider f = F.k as non empty FinSequence of TOP-REAL 2 by A563;
A569: f is_sequence_on G by A427;
A570: m <= len f by A565,FINSEQ_3:25;
    then
A571: m < len f by A566,XXREAL_0:1;
    then 1 < len f by A568,XXREAL_0:2;
    then
A572: len f >= 1+1 by NAT_1:13;
A573: P[0] by A170,CARD_1:27,SPPOL_2:26;
    for k holds P[k] from NAT_1:sch 2(A573,A489);
    then reconsider
    f as non constant special unfolded non empty FinSequence of
    TOP-REAL 2 by A569,A572,JORDAN8:4,5;
A574: m+1 <= len f by A571,NAT_1:13;
    set g = f/^(m-'1);
    m-'1 <= m by NAT_D:44;
    then m-'1 < m+1 by NAT_1:13;
    then
A575: m-'1 < len f by A574,XXREAL_0:2;
    then
A576: len g = len f - (m-'1) by RFINSEQ:def 1;
    then (m-'1)-(m-'1) < len g by A575,XREAL_1:9;
    then reconsider g as non empty FinSequence of TOP-REAL 2 by CARD_1:27;
    len g in dom g by FINSEQ_5:6;
    then
A577: g/.len g = f/.(m-'1+len g) by FINSEQ_5:27
      .= f/.len f by A576;
A578: len(F.k) = k by A192;
A579: for i st 1 <= i & i < len g & 1 <= j & j < len g & g/.i = g/.j
    holds i = j
    proof
      let i such that
A580: 1 <= i and
A581: i < len g and
A582: 1 <= j and
A583: j < len g and
A584: g/.i = g/.j and
A585: i <> j;
A586: i in dom g by A580,A581,FINSEQ_3:25;
      then
A587: g/.i = f/.(m-'1+i) by FINSEQ_5:27;
A588: j in dom g by A582,A583,FINSEQ_3:25;
      then
A589: g/.j = f/.(m-'1+j) by FINSEQ_5:27;
      per cases by A585,XXREAL_0:1;
      suppose
A590:   i < j;
        set l = m-'1+j, m9= m-'1+i;
A591:   m9 < l by A590,XREAL_1:6;
A592:   len(F.l) = l by A192;
A593:   l < k by A578,A576,A583,XREAL_1:20;
        then
A594:   f|l = F.l by A488;
        0+j <= l by XREAL_1:6;
        then
A595:   1 <= l by A582,XXREAL_0:2;
        then l in dom(F.l) by A592,FINSEQ_3:25;
        then
A596:   (F.l)/.l = f/.l by A594,FINSEQ_4:70;
        0+i <= m9 by XREAL_1:6;
        then 1 <= m9 by A580,XXREAL_0:2;
        then
A597:   m9 in dom(F.l) by A591,A592,FINSEQ_3:25;
        then (F.l)/.m9 = f/.m9 by A594,FINSEQ_4:70;
        hence contradiction by A564,A584,A587,A588,A591,A593,A595,A592,A597
,A596,FINSEQ_5:27;
      end;
      suppose
A598:   j < i;
        set l = m-'1+i, m9= m-'1+j;
A599:   m9 < l by A598,XREAL_1:6;
A600:   len(F.l) = l by A192;
A601:   l < k by A578,A576,A581,XREAL_1:20;
        then
A602:   f|l = F.l by A488;
        0+i <= l by XREAL_1:6;
        then
A603:   1 <= l by A580,XXREAL_0:2;
        then l in dom(F.l) by A600,FINSEQ_3:25;
        then
A604:   (F.l)/.l = f/.l by A602,FINSEQ_4:70;
        0+j <= m9 by XREAL_1:6;
        then 1 <= m9 by A582,XXREAL_0:2;
        then
A605:   m9 in dom(F.l) by A599,A600,FINSEQ_3:25;
        then (F.l)/.m9 = f/.m9 by A602,FINSEQ_4:70;
        hence contradiction by A564,A584,A586,A589,A599,A601,A603,A600,A605
,A604,FINSEQ_5:27;
      end;
    end;
A606: now
      consider i such that
A607: 1 <= i & i+1 <= len G and
A608: N-min C in cell(G,i,width G-'1) & N-min C <> G*(i,width G-'1) and
A609: F.(1+1) = <*G*(i,width G),G*(i+1,width G)*> by A171;
      take i;
      thus 1 <= i & i+1 <= len G by A607;
A610: f|2 = F.2 by A488,A578,A572;
A611: len(f|2) = 2 by A572,FINSEQ_1:59;
      then 1 in dom(f|2) by FINSEQ_3:25;
      hence f/.1 = (f|2)/.1 by FINSEQ_4:70
        .= G*(i,width G) by A609,A610,FINSEQ_4:17;
      2 in dom(f|2) by A611,FINSEQ_3:25;
      hence f/.2 = (f|2)/.2 by FINSEQ_4:70
        .= G*(i+1,width G) by A609,A610,FINSEQ_4:17;
      thus N-min C in cell(G,i,width G-'1) & N-min C <> G* (i,width G-'1) by
A608;
    end;
    1 in dom g by FINSEQ_5:6;
    then
A612: g/.1 = f/.(m-'1+1) by FINSEQ_5:27
      .= f/.m by A568,XREAL_1:235;
A613: for i st 1 < i & i < j & j <= len g holds g/.i <> g/.j
    proof
      let i such that
A614: 1 < i and
A615: i < j and
A616: j <= len g and
A617: g/.i = g/.j;
A618: 1 < j by A614,A615,XXREAL_0:2;
A619: i < len g by A615,A616,XXREAL_0:2;
      then
A620: 1 < len g by A614,XXREAL_0:2;
      per cases;
      suppose
        j <> len g;
        then j < len g by A616,XXREAL_0:1;
        hence contradiction by A579,A614,A615,A617,A618,A619;
      end;
      suppose
        j = len g;
        hence contradiction by A567,A612,A577,A579,A614,A615,A617,A620;
      end;
    end;
    m+1-(m-'1) <= len g by A574,A576,XREAL_1:9;
    then
A621: m+1-(m-1) <= len g by A568,XREAL_1:233;
    then
A622: 1+m-m+1 <= len g;
A623: g is_sequence_on G by A427,JORDAN8:2;
    then
A624: g is standard by JORDAN8:4;
A625: g is non constant
    proof
      take 1,2;
      thus
A626: 1 in dom g by FINSEQ_5:6;
      thus
A627: 2 in dom g by A621,FINSEQ_3:25;
      then g/.1 <> g/.(1+1) by A624,FINSEQ_5:6,GOBOARD7:29;
      then g.1 <> g/.(1+1) by A626,PARTFUN1:def 6;
      hence thesis by A627,PARTFUN1:def 6;
    end;
A628: for i st 1 <= i & i < j & j < len g holds g/.i <> g/.j
    proof
      let i such that
A629: 1 <= i & i < j & j < len g and
A630: g/.i = g/.j;
      1 < j & i < len g by A629,XXREAL_0:2;
      hence contradiction by A579,A629,A630;
    end;
    g is s.c.c.
    proof
      let i,j such that
A631: i+1 < j and
A632: i > 1 & j < len g or j+1 < len g;
A633: 1 < j by A631,NAT_1:12;
A634: 1 <= i+1 by NAT_1:12;
A635: j <= j+1 by NAT_1:12;
      then
A636: i+1 < j+1 by A631,XXREAL_0:2;
      i < j by A631,NAT_1:13;
      then
A637: i < j+1 by A635,XXREAL_0:2;
      per cases by A632,NAT_1:14;
      suppose
A638:   i > 1 & j < len g;
        then
A639:   j+1 <= len g by NAT_1:13;
        then
A640:   LSeg(g,j) = LSeg(g/.j,g/.(j+1)) by A633,TOPREAL1:def 3;
        consider i19,j19,i29,j29 being Nat such that
A641:   [i19,j19] in Indices G and
A642:   g/.j = G*(i19,j19) and
A643:   [i29,j29] in Indices G and
A644:   g/.(j+1) = G*(i29,j29) and
A645:   i19 = i29 & j19+1 = j29 or i19+1 = i29 & j19 = j29 or i19 =
i29+1 & j19 = j29 or i19 = i29 & j19 = j29+1 by A623,A633,A639,JORDAN8:3;
A646:   1 <= i19 by A641,MATRIX_0:32;
A647:   j29 <= width G by A643,MATRIX_0:32;
A648:   1 <= i29 by A643,MATRIX_0:32;
A649:   i19 <= len G by A641,MATRIX_0:32;
A650:   1 <= j29 by A643,MATRIX_0:32;
A651:   j19 <= width G by A641,MATRIX_0:32;
A652:   i29 <= len G by A643,MATRIX_0:32;
A653:   1 <= j19 by A641,MATRIX_0:32;
A654:   i+1 < len g by A631,A638,XXREAL_0:2;
        then
A655:   LSeg(g,i) = LSeg(g/.i,g/.(i+1)) by A638,TOPREAL1:def 3;
A656:   i < len g by A654,NAT_1:13;
        consider i1,j1,i2,j2 such that
A657:   [i1,j1] in Indices G and
A658:   g/.i = G*(i1,j1) and
A659:   [i2,j2] in Indices G and
A660:   g/.(i+1) = G*(i2,j2) and
A661:   i1 = i2 & j1+1 = j2 or i1+1 = i2 & j1 = j2 or i1 = i2+1 &
        j1 = j2 or i1 = i2 & j1 = j2+1 by A623,A638,A654,JORDAN8:3;
A662:   1 <= i1 by A657,MATRIX_0:32;
A663:   j2 <= width G by A659,MATRIX_0:32;
A664:   j1 <= width G by A657,MATRIX_0:32;
A665:   1 <= j2 by A659,MATRIX_0:32;
A666:   1 <= j1 by A657,MATRIX_0:32;
A667:   i2 <= len G by A659,MATRIX_0:32;
A668:   i1 <= len G by A657,MATRIX_0:32;
A669:   1 < i+1 by A638,NAT_1:13;
        assume
A670:   LSeg(g,i) meets LSeg(g,j);
A671:   1 <= i2 by A659,MATRIX_0:32;
        now
          per cases by A661,A645;
          suppose
A672:       i1 = i2 & j1+1 = j2 & i19 = i29 & j19+1 = j29;
            then
A673:       j1 = j19 or j1 = j19+1 or j1+1 = j19 by A655,A658,A660,A662,A668
,A666,A663,A640,A642,A644,A646,A649,A653,A647,A670,GOBOARD7:22;
            i1 = i19 by A655,A658,A660,A662,A668,A666,A663,A640,A642,A644,A646
,A649,A653,A647,A670,A672,GOBOARD7:19;
            hence contradiction by A579,A613,A631,A635,A634,A633,A637,A638,A654
,A656,A658,A660,A639,A642,A644,A672,A673;
          end;
          suppose
A674:       i1 = i2 & j1+1 = j2 & i19+1 = i29 & j19 = j29;
            then i1 = i19 & j1 = j19 or i1 = i19 & j1+1 = j19 or i1 = i19+1
& j1 = j19 or i1 = i19+1 & j1+1 = j19 by A655,A658,A660,A662,A668,A666,A663
,A640,A642,A644,A646,A653,A651,A652,A670,GOBOARD7:21;
            hence contradiction by A579,A613,A631,A636,A633,A637,A638,A669,A656
,A658,A660,A639,A642,A644,A674;
          end;
          suppose
A675:       i1 = i2 & j1+1 = j2 & i19 = i29+1 & j19 = j29;
            then i1 = i29 & j19 = j1 or i1 = i29 & j1+1 = j19 or i1 = i29+1
& j19 = j1 or i1 = i29+1 & j1+1 = j19 by A655,A658,A660,A662,A668,A666,A663
,A640,A642,A644,A649,A653,A651,A648,A670,GOBOARD7:21;
            hence contradiction by A579,A613,A631,A636,A633,A637,A638,A669,A656
,A658,A660,A639,A642,A644,A675;
          end;
          suppose
A676:       i1 = i2 & j1+1 = j2 & i19 = i29 & j19 = j29+1;
            then
A677:       j1 = j29 or j1 = j29+1 or j1+1 = j29 by A655,A658,A660,A662,A668
,A666,A663,A640,A642,A644,A646,A649,A651,A650,A670,GOBOARD7:22;
            i1 = i19 by A655,A658,A660,A662,A668,A666,A663,A640,A642,A644,A646
,A649,A651,A650,A670,A676,GOBOARD7:19;
            hence contradiction by A579,A613,A631,A636,A633,A638,A669,A656,A658
,A660,A639,A642,A644,A676,A677;
          end;
          suppose
A678:       i1+1 = i2 & j1 = j2 & i19 = i29 & j19+1 = j29;
            then i19 = i1 & j1 = j19 or i19 = i1 & j19+1 = j1 or i19 = i1+1
& j1 = j19 or i19 = i1+1 & j19+1 = j1 by A655,A658,A660,A662,A666,A664,A667
,A640,A642,A644,A646,A649,A653,A647,A670,GOBOARD7:21;
            hence contradiction by A579,A613,A631,A636,A633,A637,A638,A669,A656
,A658,A660,A639,A642,A644,A678;
          end;
          suppose
A679:       i1+1 = i2 & j1 = j2 & i19+1 = i29 & j19 = j29;
            then
A680:       i1 = i19 or i1 = i19+1 or i1+1 = i19 by A655,A658,A660,A662,A666
,A664,A667,A640,A642,A644,A646,A653,A651,A652,A670,GOBOARD7:23;
            j1 = j19 by A655,A658,A660,A662,A666,A664,A667,A640,A642,A644,A646
,A653,A651,A652,A670,A679,GOBOARD7:20;
            hence contradiction by A579,A613,A631,A635,A634,A633,A637,A638,A654
,A656,A658,A660,A639,A642,A644,A679,A680;
          end;
          suppose
A681:       i1+1 = i2 & j1 = j2 & i19 = i29+1 & j19 = j29;
            then
A682:       i1 = i29 or i1 = i29+1 or i1+1 = i29 by A655,A658,A660,A662,A666
,A664,A667,A640,A642,A644,A649,A653,A651,A648,A670,GOBOARD7:23;
            j1 = j19 by A655,A658,A660,A662,A666,A664,A667,A640,A642,A644,A649
,A653,A651,A648,A670,A681,GOBOARD7:20;
            hence contradiction by A579,A613,A636,A633,A637,A638,A669,A656,A658
,A660,A639,A642,A644,A681,A682;
          end;
          suppose
A683:       i1+1 = i2 & j1 = j2 & i19 = i29 & j19 = j29+1;
            then i19 = i1 & j1 = j29 or i19 = i1 & j29+1 = j1 or i19 = i1+1
& j1 = j29 or i19 = i1+1 & j29+1 = j1 by A655,A658,A660,A662,A666,A664,A667
,A640,A642,A644,A646,A649,A651,A650,A670,GOBOARD7:21;
            hence contradiction by A579,A613,A631,A636,A633,A637,A638,A669,A656
,A658,A660,A639,A642,A644,A683;
          end;
          suppose
A684:       i1 = i2+1 & j1 = j2 & i19 = i29 & j19+1 = j29;
            then i19 = i2 & j19 = j1 or i19 = i2 & j19+1 = j1 or i19 = i2+1
& j19 = j1 or i19 = i2+1 & j19+1 = j1 by A655,A658,A660,A668,A666,A664,A671
,A640,A642,A644,A646,A649,A653,A647,A670,GOBOARD7:21;
            hence contradiction by A579,A613,A631,A636,A633,A637,A638,A669,A656
,A658,A660,A639,A642,A644,A684;
          end;
          suppose
A685:       i1 = i2+1 & j1 = j2 & i19+1 = i29 & j19 = j29;
            then
A686:       i2 = i19 or i2 = i19+1 or i2+1 = i19 by A655,A658,A660,A668,A666
,A664,A671,A640,A642,A644,A646,A653,A651,A652,A670,GOBOARD7:23;
            j1 = j19 by A655,A658,A660,A668,A666,A664,A671,A640,A642,A644,A646
,A653,A651,A652,A670,A685,GOBOARD7:20;
            hence contradiction by A579,A613,A631,A636,A633,A638,A669,A656,A658
,A660,A639,A642,A644,A685,A686;
          end;
          suppose
A687:       i1 = i2+1 & j1 = j2 & i19 = i29+1 & j19 = j29;
            then
A688:       i2 = i29 or i2 = i29+1 or i2+1 = i29 by A655,A658,A660,A668,A666
,A664,A671,A640,A642,A644,A649,A653,A651,A648,A670,GOBOARD7:23;
            j1 = j19 by A655,A658,A660,A668,A666,A664,A671,A640,A642,A644,A649
,A653,A651,A648,A670,A687,GOBOARD7:20;
            hence contradiction by A613,A631,A636,A637,A638,A669,A658,A660,A639
,A642,A644,A687,A688;
          end;
          suppose
A689:       i1 = i2+1 & j1 = j2 & i19 = i29 & j19 = j29+1;
            then i19 = i2 & j29 = j1 or i19 = i2 & j29+1 = j1 or i19 = i2+1
& j29 = j1 or i19 = i2+1 & j29+1 = j1 by A655,A658,A660,A668,A666,A664,A671
,A640,A642,A644,A646,A649,A651,A650,A670,GOBOARD7:21;
            hence contradiction by A579,A613,A631,A636,A633,A637,A638,A669,A656
,A658,A660,A639,A642,A644,A689;
          end;
          suppose
A690:       i1 = i2 & j1 = j2+1 & i19 = i29 & j19+1 = j29;
            then
A691:       j2 = j19 or j2 = j19+1 or j2+1 = j19 by A655,A658,A660,A662,A668
,A664,A665,A640,A642,A644,A646,A649,A653,A647,A670,GOBOARD7:22;
            i1 = i19 by A655,A658,A660,A662,A668,A664,A665,A640,A642,A644,A646
,A649,A653,A647,A670,A690,GOBOARD7:19;
            hence contradiction by A579,A613,A631,A636,A633,A638,A669,A656,A658
,A660,A639,A642,A644,A690,A691;
          end;
          suppose
A692:       i1 = i2 & j1 = j2+1 & i19+1 = i29 & j19 = j29;
            then i1 = i19 & j2 = j19 or i1 = i19 & j2+1 = j19 or i1 = i19+1
& j2 = j19 or i1 = i19+1 & j2+1 = j19 by A655,A658,A660,A662,A668,A664,A665
,A640,A642,A644,A646,A653,A651,A652,A670,GOBOARD7:21;
            hence contradiction by A579,A613,A631,A636,A633,A637,A638,A669,A656
,A658,A660,A639,A642,A644,A692;
          end;
          suppose
A693:       i1 = i2 & j1 = j2+1 & i19 = i29+1 & j19 = j29;
            then i1 = i29 & j2 = j19 or i1 = i29 & j2+1 = j19 or i1 = i29+1
& j2 = j19 or i1 = i29+1 & j2+1 = j19 by A655,A658,A660,A662,A668,A664,A665
,A640,A642,A644,A649,A653,A651,A648,A670,GOBOARD7:21;
            hence contradiction by A579,A613,A631,A636,A633,A637,A638,A669,A656
,A658,A660,A639,A642,A644,A693;
          end;
          suppose
A694:       i1 = i2 & j1 = j2+1 & i19 = i29 & j19 = j29+1;
            then
A695:       j2 = j29 or j2 = j29+1 or j2+1 = j29 by A655,A658,A660,A662,A668
,A664,A665,A640,A642,A644,A646,A649,A651,A650,A670,GOBOARD7:22;
            i1 = i19 by A655,A658,A660,A662,A668,A664,A665,A640,A642,A644,A646
,A649,A651,A650,A670,A694,GOBOARD7:19;
            hence contradiction by A613,A631,A636,A637,A638,A669,A658,A660,A639
,A642,A644,A694,A695;
          end;
        end;
        hence contradiction;
      end;
      suppose
        i = 0 & j+1 < len g;
        then LSeg(g,i) = {} by TOPREAL1:def 3;
        hence thesis by XBOOLE_1:65;
      end;
      suppose
A696:   1 <= i & j+1 < len g;
        then
A697:   i+1 < len g by A636,XXREAL_0:2;
        then
A698:   LSeg(g,i) = LSeg(g/.i,g/.(i+1)) by A696,TOPREAL1:def 3;
A699:   i < len g by A697,NAT_1:13;
        consider i1,j1,i2,j2 such that
A700:   [i1,j1] in Indices G and
A701:   g/.i = G*(i1,j1) and
A702:   [i2,j2] in Indices G and
A703:   g/.(i+1) = G*(i2,j2) and
A704:   i1 = i2 & j1+1 = j2 or i1+1 = i2 & j1 = j2 or i1 = i2+1 &
        j1 = j2 or i1 = i2 & j1 = j2+1 by A623,A696,A697,JORDAN8:3;
A705:   1 <= i1 by A700,MATRIX_0:32;
A706:   j2 <= width G by A702,MATRIX_0:32;
A707:   j1 <= width G by A700,MATRIX_0:32;
A708:   1 <= j2 by A702,MATRIX_0:32;
A709:   1 <= j1 by A700,MATRIX_0:32;
A710:   i2 <= len G by A702,MATRIX_0:32;
A711:   i1 <= len G by A700,MATRIX_0:32;
A712:   1 < i+1 by A696,NAT_1:13;
        assume
A713:   LSeg(g,i) meets LSeg(g,j);
        consider i19,j19,i29,j29 being Nat such that
A714:   [i19,j19] in Indices G and
A715:   g/.j = G*(i19,j19) and
A716:   [i29,j29] in Indices G and
A717:   g/.(j+1) = G*(i29,j29) and
A718:   i19 = i29 & j19+1 = j29 or i19+1 = i29 & j19 = j29 or i19 =
i29+1 & j19 = j29 or i19 = i29 & j19 = j29+1 by A623,A633,A696,JORDAN8:3;
A719:   1 <= i19 by A714,MATRIX_0:32;
A720:   j29 <= width G by A716,MATRIX_0:32;
A721:   1 <= i29 by A716,MATRIX_0:32;
A722:   i19 <= len G by A714,MATRIX_0:32;
A723:   1 <= j29 by A716,MATRIX_0:32;
A724:   j19 <= width G by A714,MATRIX_0:32;
A725:   i29 <= len G by A716,MATRIX_0:32;
A726:   1 <= j19 by A714,MATRIX_0:32;
A727:   j < len g by A696,NAT_1:12;
A728:   LSeg(g,j) = LSeg(g/.j,g/.(j+1)) by A633,A696,TOPREAL1:def 3;
A729:   1 <= i2 by A702,MATRIX_0:32;
        now
          per cases by A704,A718;
          suppose
A730:       i1 = i2 & j1+1 = j2 & i19 = i29 & j19+1 = j29;
            then
A731:       j1 = j19 or j1 = j19+1 or j1+1 = j19 by A698,A701,A703,A705,A711
,A709,A706,A728,A715,A717,A719,A722,A726,A720,A713,GOBOARD7:22;
            i1 = i19 by A698,A701,A703,A705,A711,A709,A706,A728,A715,A717,A719
,A722,A726,A720,A713,A730,GOBOARD7:19;
            hence contradiction by A628,A631,A636,A634,A637,A696,A727,A701,A703
,A715,A717,A730,A731;
          end;
          suppose
A732:       i1 = i2 & j1+1 = j2 & i19+1 = i29 & j19 = j29;
            then i1 = i19 & j1 = j19 or i1 = i19 & j1+1 = j19 or i1 = i19+1
& j1 = j19 or i1 = i19+1 & j1+1 = j19 by A698,A701,A703,A705,A711,A709,A706
,A728,A715,A717,A719,A726,A724,A725,A713,GOBOARD7:21;
            hence contradiction by A579,A628,A631,A636,A633,A637,A696,A712,A699
,A727,A701,A703,A715,A717,A732;
          end;
          suppose
A733:       i1 = i2 & j1+1 = j2 & i19 = i29+1 & j19 = j29;
            then i1 = i29 & j19 = j1 or i1 = i29 & j1+1 = j19 or i1 = i29+1
& j19 = j1 or i1 = i29+1 & j1+1 = j19 by A698,A701,A703,A705,A711,A709,A706
,A728,A715,A717,A722,A726,A724,A721,A713,GOBOARD7:21;
            hence contradiction by A579,A628,A631,A636,A633,A637,A696,A712,A699
,A727,A701,A703,A715,A717,A733;
          end;
          suppose
A734:       i1 = i2 & j1+1 = j2 & i19 = i29 & j19 = j29+1;
            then
A735:       j1 = j29 or j1 = j29+1 or j1+1 = j29 by A698,A701,A703,A705,A711
,A709,A706,A728,A715,A717,A719,A722,A724,A723,A713,GOBOARD7:22;
            i1 = i19 by A698,A701,A703,A705,A711,A709,A706,A728,A715,A717,A719
,A722,A724,A723,A713,A734,GOBOARD7:19;
            hence contradiction by A579,A613,A631,A636,A633,A696,A712,A699,A727
,A701,A703,A715,A717,A734,A735;
          end;
          suppose
A736:       i1+1 = i2 & j1 = j2 & i19 = i29 & j19+1 = j29;
            then i19 = i1 & j1 = j19 or i19 = i1 & j19+1 = j1 or i19 = i1+1
& j1 = j19 or i19 = i1+1 & j19+1 = j1 by A698,A701,A703,A705,A709,A707,A710
,A728,A715,A717,A719,A722,A726,A720,A713,GOBOARD7:21;
            hence contradiction by A579,A628,A631,A636,A634,A633,A637,A696,A699
,A727,A701,A703,A715,A717,A736;
          end;
          suppose
A737:       i1+1 = i2 & j1 = j2 & i19+1 = i29 & j19 = j29;
            then
A738:       i1 = i19 or i1 = i19+1 or i1+1 = i19 by A698,A701,A703,A705,A709
,A707,A710,A728,A715,A717,A719,A726,A724,A725,A713,GOBOARD7:23;
            j1 = j19 by A698,A701,A703,A705,A709,A707,A710,A728,A715,A717,A719
,A726,A724,A725,A713,A737,GOBOARD7:20;
            hence contradiction by A628,A631,A636,A634,A637,A696,A727,A701,A703
,A715,A717,A737,A738;
          end;
          suppose
A739:       i1+1 = i2 & j1 = j2 & i19 = i29+1 & j19 = j29;
            then
A740:       i1 = i29 or i1 = i29+1 or i1+1 = i29 by A698,A701,A703,A705,A709
,A707,A710,A728,A715,A717,A722,A726,A724,A721,A713,GOBOARD7:23;
            j1 = j19 by A698,A701,A703,A705,A709,A707,A710,A728,A715,A717,A722
,A726,A724,A721,A713,A739,GOBOARD7:20;
            hence contradiction by A579,A628,A636,A633,A637,A696,A712,A699,A727
,A701,A703,A715,A717,A739,A740;
          end;
          suppose
A741:       i1+1 = i2 & j1 = j2 & i19 = i29 & j19 = j29+1;
            then i19 = i1 & j1 = j29 or i19 = i1 & j29+1 = j1 or i19 = i1+1
& j1 = j29 or i19 = i1+1 & j29+1 = j1 by A698,A701,A703,A705,A709,A707,A710
,A728,A715,A717,A719,A722,A724,A723,A713,GOBOARD7:21;
            hence contradiction by A579,A628,A631,A636,A633,A637,A696,A712,A699
,A727,A701,A703,A715,A717,A741;
          end;
          suppose
A742:       i1 = i2+1 & j1 = j2 & i19 = i29 & j19+1 = j29;
            then i19 = i2 & j19 = j1 or i19 = i2 & j19+1 = j1 or i19 = i2+1
& j19 = j1 or i19 = i2+1 & j19+1 = j1 by A698,A701,A703,A711,A709,A707,A729
,A728,A715,A717,A719,A722,A726,A720,A713,GOBOARD7:21;
            hence contradiction by A579,A628,A631,A636,A633,A637,A696,A712,A699
,A727,A701,A703,A715,A717,A742;
          end;
          suppose
A743:       i1 = i2+1 & j1 = j2 & i19+1 = i29 & j19 = j29;
            then
A744:       i2 = i19 or i2 = i19+1 or i2+1 = i19 by A698,A701,A703,A711,A709
,A707,A729,A728,A715,A717,A719,A726,A724,A725,A713,GOBOARD7:23;
            j1 = j19 by A698,A701,A703,A711,A709,A707,A729,A728,A715,A717,A719
,A726,A724,A725,A713,A743,GOBOARD7:20;
            hence contradiction by A579,A613,A631,A636,A633,A696,A712,A699,A727
,A701,A703,A715,A717,A743,A744;
          end;
          suppose
A745:       i1 = i2+1 & j1 = j2 & i19 = i29+1 & j19 = j29;
            then
A746:       i2 = i29 or i2 = i29+1 or i2+1 = i29 by A698,A701,A703,A711,A709
,A707,A729,A728,A715,A717,A722,A726,A724,A721,A713,GOBOARD7:23;
            j1 = j19 by A698,A701,A703,A711,A709,A707,A729,A728,A715,A717,A722
,A726,A724,A721,A713,A745,GOBOARD7:20;
            hence contradiction by A628,A631,A636,A637,A696,A712,A727,A701,A703
,A715,A717,A745,A746;
          end;
          suppose
A747:       i1 = i2+1 & j1 = j2 & i19 = i29 & j19 = j29+1;
            then i19 = i2 & j29 = j1 or i19 = i2 & j29+1 = j1 or i19 = i2+1
& j29 = j1 or i19 = i2+1 & j29+1 = j1 by A698,A701,A703,A711,A709,A707,A729
,A728,A715,A717,A719,A722,A724,A723,A713,GOBOARD7:21;
            hence contradiction by A579,A628,A631,A636,A633,A637,A696,A712,A699
,A727,A701,A703,A715,A717,A747;
          end;
          suppose
A748:       i1 = i2 & j1 = j2+1 & i19 = i29 & j19+1 = j29;
            then
A749:       j2 = j19 or j2 = j19+1 or j2+1 = j19 by A698,A701,A703,A705,A711
,A707,A708,A728,A715,A717,A719,A722,A726,A720,A713,GOBOARD7:22;
            i1 = i19 by A698,A701,A703,A705,A711,A707,A708,A728,A715,A717,A719
,A722,A726,A720,A713,A748,GOBOARD7:19;
            hence contradiction by A579,A613,A631,A636,A633,A696,A712,A699,A727
,A701,A703,A715,A717,A748,A749;
          end;
          suppose
A750:       i1 = i2 & j1 = j2+1 & i19+1 = i29 & j19 = j29;
            then i1 = i19 & j2 = j19 or i1 = i19 & j2+1 = j19 or i1 = i19+1
& j2 = j19 or i1 = i19+1 & j2+1 = j19 by A698,A701,A703,A705,A711,A707,A708
,A728,A715,A717,A719,A726,A724,A725,A713,GOBOARD7:21;
            hence contradiction by A579,A628,A631,A636,A633,A637,A696,A712,A699
,A727,A701,A703,A715,A717,A750;
          end;
          suppose
A751:       i1 = i2 & j1 = j2+1 & i19 = i29+1 & j19 = j29;
            then i1 = i29 & j2 = j19 or i1 = i29 & j2+1 = j19 or i1 = i29+1
& j2 = j19 or i1 = i29+1 & j2+1 = j19 by A698,A701,A703,A705,A711,A707,A708
,A728,A715,A717,A722,A726,A724,A721,A713,GOBOARD7:21;
            hence contradiction by A579,A628,A631,A636,A633,A637,A696,A712,A699
,A727,A701,A703,A715,A717,A751;
          end;
          suppose
A752:       i1 = i2 & j1 = j2+1 & i19 = i29 & j19 = j29+1;
            then
A753:       j2 = j29 or j2 = j29+1 or j2+1 = j29 by A698,A701,A703,A705,A711
,A707,A708,A728,A715,A717,A719,A722,A724,A723,A713,GOBOARD7:22;
            i1 = i19 by A698,A701,A703,A705,A711,A707,A708,A728,A715,A717,A719
,A722,A724,A723,A713,A752,GOBOARD7:19;
            hence contradiction by A628,A631,A636,A637,A696,A712,A727,A701,A703
,A715,A717,A752,A753;
          end;
        end;
        hence contradiction;
      end;
    end;
    then reconsider
    g as standard non constant special_circular_sequence by A567,A612,A577,A623
,A625,FINSEQ_6:def 1,JORDAN8:4;
A754: for i st 1 <= i & i+1 <= len f holds right_cell(f,i,G) = Cl Int
    right_cell(f,i,G)
    proof
      let i such that
A755: 1 <= i & i+1 <= len f;
      consider i1,j1,i2,j2 such that
A756: [i1,j1] in Indices G and
A757: f/.i = G*(i1,j1) and
A758: [i2,j2] in Indices G and
A759: f/.(i+1) = G*(i2,j2) and
A760: i1 = i2 & j1+1 = j2 or i1+1 = i2 & j1 = j2 or i1 = i2+1 & j1
      = j2 or i1 = i2 & j1 = j2+1 by A569,A755,JORDAN8:3;
A761: i1 <= len G by A756,MATRIX_0:32;
A762: j2 <= width G by A758,MATRIX_0:32;
A763: j1 <= width G by A756,MATRIX_0:32;
A764: j1+1 > j1 & j2+1 > j2 by NAT_1:13;
A765: i2 <= len G by A758,MATRIX_0:32;
A766: i1+1 > i1 & i2+1 > i2 by NAT_1:13;
      per cases by A760;
      suppose
        i1 = i2 & j1+1 = j2;
        then right_cell(f,i,G) = cell(G,i1,j1) by A569,A755,A756,A757,A758,A759
,A764,GOBRD13:def 2;
        hence thesis by A761,A763,GOBRD11:35;
      end;
      suppose
A767:   i1+1 = i2 & j1 = j2;
A768:   j1-'1 <= width G by A763,NAT_D:44;
        right_cell(f,i,G) = cell(G,i1,j1-'1) by A569,A755,A756,A757,A758,A759
,A766,A767,GOBRD13:def 2;
        hence thesis by A761,A768,GOBRD11:35;
      end;
      suppose
        i1 = i2+1 & j1 = j2;
        then right_cell(f,i,G) = cell(G,i2,j2) by A569,A755,A756,A757,A758,A759
,A766,GOBRD13:def 2;
        hence thesis by A765,A762,GOBRD11:35;
      end;
      suppose
A769:   i1 = i2 & j1 = j2+1;
A770:   i1-'1 <= len G by A761,NAT_D:44;
        right_cell(f,i,G) = cell(G,i1-'1,j2) by A569,A755,A756,A757,A758,A759
,A764,A769,GOBRD13:def 2;
        hence thesis by A762,A770,GOBRD11:35;
      end;
    end;
    now
A771: for h being standard non constant special_circular_sequence st L~
h c= L~f for Comp being Subset of TOP-REAL 2 st Comp is_a_component_of (L~h)`
for n st 1 <= n & n+1 <= len f & f/.n in Comp & not f/.n in L~h holds C meets
      Comp
      proof
        let h be standard non constant special_circular_sequence such that
A772:   L~h c= L~f;
        let Comp be Subset of TOP-REAL 2 such that
A773:   Comp is_a_component_of (L~h)`;
        let n such that
A774:   1 <= n & n+1 <= len f and
A775:   f/.n in Comp and
A776:   not f/.n in L~h;
        reconsider rc = right_cell(f,n,G)\L~h as Subset of TOP-REAL 2;
        f/.n in right_cell(f,n,G) by A569,A774,Th8;
        then f/.n in rc by A776,XBOOLE_0:def 5;
        then
A777:   rc meets Comp by A775,XBOOLE_0:3;
A778:   rc meets C
        proof
          right_cell(f,n,G) meets C by A427,A774;
          then consider p being object such that
A779:     p in right_cell(f,n,G) and
A780:     p in C by XBOOLE_0:3;
          reconsider p as Element of TOP-REAL 2 by A779;
          now
            take a = p;
            now
              assume p in L~h;
              then consider j such that
A781:         1 <= j & j+1 <= len f and
A782:         p in LSeg(f,j) by A772,SPPOL_2:13;
              p in left_cell(f,j,G) /\ right_cell(f,j,G) by A427,A781,A782,
GOBRD13:29;
              then
A783:         p in left_cell(f,j,G) by XBOOLE_0:def 4;
              left_cell(f,j,G) misses C by A427,A781;
              hence contradiction by A780,A783,XBOOLE_0:3;
            end;
            hence a in rc by A779,XBOOLE_0:def 5;
            thus a in C by A780;
          end;
          hence thesis by XBOOLE_0:3;
        end;
        Int right_cell(f,n,G) misses L~f by A569,A774,Th15;
        then Int right_cell(f,n,G) misses L~h by A772,XBOOLE_1:63;
        then
A784:   Int right_cell(f,n,G) c= (L~h)` by SUBSET_1:23;
A785:   rc = right_cell(f,n,G) /\ (L~h)` by SUBSET_1:13;
        then
A786:   rc c= (L~h)` by XBOOLE_1:17;
        rc c= right_cell(f,n,G) by XBOOLE_1:36;
        then
A787:   Int right_cell(f,n,G) c= right_cell(f,n,G) & rc c= Cl Int
        right_cell(f,n,G) by A569,A774,Th11,TOPS_1:16;
        Int right_cell(f,n,G) is convex by A569,A774,Th10;
        then rc is connected by A785,A784,A787,CONNSP_1:18,XBOOLE_1:19;
        then rc c= Comp by A773,A777,A786,GOBOARD9:4;
        hence thesis by A778,XBOOLE_1:63;
      end;
      (L~g)` is open by TOPS_1:3;
      then
A788: (L~g)` = Int (L~g)` by TOPS_1:23;
A789: L~g c= L~f by JORDAN3:40;
A790: for j,k st 1 <= j & j <= k holds (F.k)/.j = (F.j)/.j
      proof
        let j,k;
        assume that
A791:   1 <= j and
A792:   j <= k;
        j <= len(F.k) by A192,A792;
        then len(F.k|j) = j by FINSEQ_1:59;
        then
A793:   j in dom((F.k)|j) by A791,FINSEQ_3:25;
        (F.k)|j = F.j by A488,A792;
        hence thesis by A793,FINSEQ_4:70;
      end;
      assume m <> 1;
      then
A794: 1 < m by A568,XXREAL_0:1;
A795: for n st 1 <= n & n <= m-'1 holds not f/.n in L~g
      proof
A796:   2 <= len G by A231,NAT_1:12;
        let n such that
A797:   1 <= n and
A798:   n <= m-'1;
        set p = f/.n;
A799:   n <= len f by A575,A798,XXREAL_0:2;
        then
A800:   p in Values G by A427,A797,Th6;
        assume p in L~g;
        then consider j such that
A801:   m-'1+1 <= j and
A802:   j+1 <= len f and
A803:   p in LSeg(f,j) by A575,Th7;
A804:   j < k by A578,A802,NAT_1:13;
A805:   n < m-'1+1 by A798,NAT_1:13;
        then
A806:   n < j by A801,XXREAL_0:2;
A807:   m-'1+1=m by A568,XREAL_1:235;
        then
A808:   1 < j by A794,A801,XXREAL_0:2;
        per cases by A2,A427,A802,A803,A808,A796,A800,Th23;
        suppose
A809:     p = f/.j;
A810:     n <> len(F.j) by A192,A801,A805;
          n <= len(F.j) by A192,A806;
          then
A811:     n in dom(F.j) by A797,FINSEQ_3:25;
          (F.j)/.n = (F.n)/.n by A790,A797,A806
            .= p by A578,A790,A797,A799
            .= (F.j)/.j by A790,A808,A804,A809
            .= (F.j)/.len(F.j) by A192;
          hence contradiction by A564,A808,A804,A811,A810;
        end;
        suppose
A812:     p = f/.(j+1);
          now
            per cases by A578,A802,XXREAL_0:1;
            suppose
A813:         j+1 = k;
A814:         n <> len(F.m) by A192,A805,A807;
              n <= len(F.m) by A192,A805,A807;
              then
A815:         n in dom(F.m) by A797,FINSEQ_3:25;
              (F.m)/.n = (F.n)/.n by A790,A797,A805,A807
                .= (F.k)/.k by A578,A790,A797,A799,A812,A813
                .= (F.m)/.m by A567,A578,A568,A570,A790
                .= (F.m)/.len(F.m) by A192;
              hence contradiction by A564,A578,A568,A571,A815,A814;
            end;
            suppose
A816:         j+1 < k;
              set l = j+1;
A817:         1 <= l by NAT_1:11;
A818:         n < n+1 & n+1 < l by A806,XREAL_1:6,29;
              then
A819:         n <> len(F.l) by A192;
A820:         n < l by A818,XXREAL_0:2;
              then n <= len(F.l) by A192;
              then
A821:         n in dom(F.l) by A797,FINSEQ_3:25;
              (F.l)/.n = (F.n)/.n by A790,A797,A820
                .= p by A578,A790,A797,A799
                .= (F.l)/.l by A790,A812,A816,A817
                .= (F.l)/.len(F.l) by A192;
              hence contradiction by A564,A816,A821,A819,NAT_1:11;
            end;
          end;
          hence contradiction;
        end;
      end;
      C meets RightComp Rev g
      proof
        1 <= len g by A622,XREAL_1:145;
        then
A822:   len g-'1+2 = len g+1 by Lm1;
A823:   1 - 1 < m - 1 by A794,XREAL_1:9;
A824:   m-'1+2 = m+1 by A568,Lm1;
        set l = (m-'1)+(len g-'1);
        set a = f/.(m-'1);
        set rg=Rev g;
        set p = rg/.1, q = rg/.2;
A825:   1+1 - 1 <= len g - 1 by A621,XREAL_1:9;
        1+1-'1 <= len g-'1 by A621,NAT_D:42;
        then
A826:   1 <= len g-'1 by NAT_D:34;
        then (m-'1)+1 <= l by XREAL_1:6;
        then m-'1 < l by NAT_1:13;
        then
A827:   m-'1 <> len(F.l) by A192;
A828:   1+1 <= len rg by A621,FINSEQ_5:def 3;
        then 1+1-'1 <= len rg-'1 by NAT_D:42;
        then
A829:   1 <= len rg -'1 by NAT_D:34;
        1 < len rg by A828,NAT_1:13;
        then
A830:   len rg -'1+1 = len rg by XREAL_1:235;
A831:   rg is_sequence_on G by A623,Th5;
        then consider p1,p2,q1,q2 being Nat such that
A832:   [p1,p2] in Indices G and
A833:   p = G*(p1,p2) and
A834:   [q1,q2] in Indices G and
A835:   q = G*(q1,q2) and
A836:   p1 = q1 & p2+1 = q2 or p1+1 = q1 & p2 = q2 or p1 = q1+1 &
        p2 = q2 or p1 = q1 & p2 = q2+1 by A828,JORDAN8:3;
A837:   1 <= p1 by A832,MATRIX_0:32;
A838:   p2 <= width G by A832,MATRIX_0:32;
A839:   p1 <= len G by A832,MATRIX_0:32;
A840:   1 <= p2 by A832,MATRIX_0:32;
A841:   p = f/.m by A567,A577,FINSEQ_5:65;
        len g-'1 <= len g by NAT_D:44;
        then
A842:   len g-'1 in dom g by A826,FINSEQ_3:25;
        then
A843:   q = g/.(len g-'1) by A822,FINSEQ_5:66
          .= f/.l by A842,FINSEQ_5:27;
        l = m+(len g -'1)-'1 by A568,NAT_D:38
          .= (len g -'1)+m - 1 by A826,NAT_D:37
          .= (len g - 1)+m - 1 by A825,XREAL_0:def 2
          .= ((k - (m - 1)) - 1)+m - 1 by A578,A576,A823,XREAL_0:def 2
          .= k - 1;
        then
A844:   k = l+1;
        then
A845:   l < k by XREAL_1:29;
        len g-'1 <= l by NAT_1:11;
        then
A846:   1 <= l by A826,XXREAL_0:2;
        then
A847:   right_cell(f,l,G) meets C by A427,A578,A844;
A848:   m-'1+1 = m by A568,XREAL_1:235;
        then
A849:   1 <= m-'1 by A794,NAT_1:13;
        then
A850:   right_cell(f,m-'1,G) meets C by A427,A570,A848;
        m-'1 <= l by NAT_1:11;
        then m-'1 <= len(F.l) by A192;
        then
A851:   m-'1 in dom(F.l) by A849,FINSEQ_3:25;
        not a in L~g by A795,A849;
        then
A852:   not a in L~rg by SPPOL_2:22;
        per cases by A836;
        suppose
A853:     p1 = q1 & p2+1 = q2;
          consider a1,a2,p91,p92 being Nat such that
A854:     [a1,a2] in Indices G and
A855:     a = G*(a1,a2) and
A856:     [p91,p92] in Indices G & p = G*(p91,p92) and
A857:     a1 = p91 & a2+1 = p92 or a1+1 = p91 & a2 = p92 or a1 =
p91+1 & a2 = p92 or a1 = p91 & a2 = p92+1 by A569,A570,A841,A848,A849,JORDAN8:3
;
A858:     1 <= a2 by A854,MATRIX_0:32;
          thus thesis
          proof
            per cases by A857;
            suppose
A859:         a1 = p91 & a2+1 = p92;
A860:         m-'1+1 <= len (F.m) & f/.(m-'1+1) = (F.m)/.m by A192,A578,A568
,A570,A790,A848;
A861:         F.k|(m+1)=F.(m+1) by A488,A578,A574;
A862:         a1 = p1 by A832,A833,A856,A859,GOBOARD1:5;
A863:         m-'1 <= m by A848,NAT_1:11;
A864:         f/.(m-'1) = (F.(m-'1))/.(m-'1) by A578,A575,A790,A849
                .= (F.m)/.(m-'1) by A790,A849,A863;
A865:         2 in dom g by A621,FINSEQ_3:25;
A866:         a2+1 = p2 by A832,A833,A856,A859,GOBOARD1:5;
              then
A867:         p2-'1 = a2 by NAT_D:34;
              right_cell(f,l,G) = cell(G,p1-'1,p2) by A427,A567,A578,A841,A844
,A846,A843,A832,A833,A834,A835,A853,GOBRD13:28
                .= front_left_cell(F.m,m-'1,G) by A427,A841,A848,A849,A832,A833
,A854,A855,A862,A866,A864,A860,GOBRD13:34;
              then F.(m+1) turns_left m-'1,G by A456,A794,A847;
              then
A868:         a2+1 > a2 & f turns_left m-'1,G by A849,A824,A861,GOBRD13:44
,NAT_1:13;
              len rg-'1+2 = len g +1 by A822,FINSEQ_5:def 3;
              then
A869:         rg/.(len rg-'1) = g/.2 by A865,FINSEQ_5:66
                .= f/.(m+1) by A824,A865,FINSEQ_5:27;
A870:         p = g/.1 by A567,A612,A577,FINSEQ_5:65
                .= rg/.len g by FINSEQ_5:65
                .= rg/.len rg by FINSEQ_5:def 3;
              set rc = right_cell(rg,len rg-'1,G)\L~rg;
A871:         RightComp rg is_a_component_of (L~rg)` by GOBOARD9:def 2;
A872:         p1-'1+1 = p1 by A837,XREAL_1:235;
A873:         p2+1 > a2+1 by A866,NAT_1:13;
              then
A874:         [p1-'1,p2] in Indices G by A841,A848,A832,A833,A854,A855,A868;
              then
A875:         1 <= p1-'1 by MATRIX_0:32;
              f/.(m+1) = G*(p1-'1,p2) by A841,A848,A832,A833,A854,A855
,A873,A868;
              then right_cell(rg,len rg-'1,G) = cell(G,p1-'1,a2) by A831,A829
,A830,A832,A833,A874,A867,A872,A869,A870,GOBRD13:24;
              then a in right_cell(rg,len rg-'1,G) by A839,A838,A855,A858,A862
,A866,A875,A872,Th20;
              then
A876:         a in rc by A852,XBOOLE_0:def 5;
              rc c= RightComp rg & L~rg c= L~f by A789,A831,A829,A830,Th27,
SPPOL_2:22;
              hence thesis by A570,A771,A848,A849,A852,A876,A871;
            end;
            suppose
A877:         a1+1 = p91 & a2 = p92;
              then a1+1 = p1 by A832,A833,A856,GOBOARD1:5;
              then
A878:         q1-'1 = a1 by A853,NAT_D:34;
              a2 = p2 by A832,A833,A856,A877,GOBOARD1:5;
              then right_cell(f,l,G) = cell(G,a1,a2) by A427,A567,A578,A841
,A844,A846,A843,A832,A833,A834,A835,A853,A878,GOBRD13:28
                .= left_cell(f,m-'1,G) by A427,A570,A841,A848,A849,A854,A855
,A856,A877,GOBRD13:23;
              hence thesis by A427,A570,A848,A849,A847;
            end;
            suppose
              a1 = p91+1 & a2 = p92;
              then a1 = p1+1 & a2 = p2 by A832,A833,A856,GOBOARD1:5;
              then right_cell(f,m-'1,G) = cell(G,p1,p2) by A427,A570,A841,A848
,A849,A832,A833,A854,A855,GOBRD13:26
                .= left_cell(f,l,G) by A427,A567,A578,A841,A844,A846,A843,A832
,A833,A834,A835,A853,GOBRD13:27;
              hence thesis by A427,A578,A844,A846,A850;
            end;
            suppose
              a1 = p91 & a2 = p92+1;
              then
A879:         a1 = q1 & a2 = q2 by A832,A833,A853,A856,GOBOARD1:5;
              (F.l)/.(m-'1) = (F.(m-'1))/.(m-'1) by A790,A849,NAT_1:11
                .= q by A578,A575,A790,A849,A835,A855,A879
                .= (F.l)/.l by A790,A845,A846,A843
                .= (F.l)/.len(F.l) by A192;
              hence thesis by A564,A845,A846,A851,A827;
            end;
          end;
        end;
        suppose
A880:     p1+1 = q1 & p2 = q2;
          consider a1,a2,p91,p92 being Nat such that
A881:     [a1,a2] in Indices G and
A882:     a = G*(a1,a2) and
A883:     [p91,p92] in Indices G & p = G*(p91,p92) and
A884:     a1 = p91 & a2+1 = p92 or a1+1 = p91 & a2 = p92 or a1 =
p91+1 & a2 = p92 or a1 = p91 & a2 = p92+1 by A569,A570,A841,A848,A849,JORDAN8:3
;
A885:     1 <= a1 by A881,MATRIX_0:32;
          thus thesis
          proof
            per cases by A884;
            suppose
A886:         a1 = p91 & a2+1 = p92;
              then a2+1 = p2 by A832,A833,A883,GOBOARD1:5;
              then
A887:         q2-'1 = a2 by A880,NAT_D:34;
A888:         a1 = p1 by A832,A833,A883,A886,GOBOARD1:5;
              right_cell(f,m-'1,G) = cell(G,a1,a2) by A427,A570,A841,A848,A849
,A881,A882,A883,A886,GOBRD13:22
                .= left_cell(f,l,G) by A427,A567,A578,A841,A844,A846,A843,A832
,A833,A834,A835,A880,A888,A887,GOBRD13:25;
              hence thesis by A427,A578,A844,A846,A850;
            end;
            suppose
A889:         a1+1 = p91 & a2 = p92;
A890:         m-'1 <= m by A848,NAT_1:11;
A891:         f/.(m-'1) = (F.(m-'1))/.(m-'1) by A578,A575,A790,A849
                .= (F.m)/.(m-'1) by A790,A849,A890;
A892:         2 in dom g by A621,FINSEQ_3:25;
              len rg-'1+2 = len g +1 by A822,FINSEQ_5:def 3;
              then
A893:         rg/.(len rg-'1) = g/.2 by A892,FINSEQ_5:66
                .= f/.(m+1) by A824,A892,FINSEQ_5:27;
A894:         p = g/.1 by A567,A612,A577,FINSEQ_5:65
                .= rg/.len g by FINSEQ_5:65
                .= rg/.len rg by FINSEQ_5:def 3;
A895:         a2 = p2 by A832,A833,A883,A889,GOBOARD1:5;
A896:         m-'1+1 <= len (F.m) & f/.(m-'1+1) = (F.m)/.m by A192,A578,A568
,A570,A790,A848;
A897:         F.k|(m+1)=F.(m+1) by A488,A578,A574;
              set rc = right_cell(rg,len rg-'1,G)\L~rg;
A898:         a1 < a1+1 & p1 < p1+1 by XREAL_1:29;
A899:         a1+1 = p1 by A832,A833,A883,A889,GOBOARD1:5;
              then
A900:         a1 = p1-'1 by NAT_D:34;
              right_cell(f,l,G) = cell(G,p1,p2) by A427,A567,A578,A841,A844
,A846,A843,A832,A833,A834,A835,A880,GOBRD13:26
                .= front_left_cell(F.m,m-'1,G) by A427,A841,A848,A849,A832,A833
,A881,A882,A899,A895,A891,A896,GOBRD13:36;
              then F.(m+1) turns_left m-'1,G by A456,A794,A847;
              then
A901:         f turns_left m-'1,G by A849,A824,A897,GOBRD13:44;
              then
A902:         [p1,p2+1] in Indices G by A841,A848,A832,A833,A881,A882,A899,A898
;
              then
A903:         p2+1 <= width G by MATRIX_0:32;
              f/.(m+1) = G*(p1,p2+1) by A841,A848,A832,A833,A881,A882,A899
,A898,A901;
              then right_cell(rg,len rg-'1,G) = cell(G,p1-'1,a2) by A831,A829
,A830,A832,A833,A895,A902,A893,A894,GOBRD13:28;
              then a in right_cell(rg,len rg-'1,G) by A839,A840,A882,A885,A899
,A895,A903,A900,Th20;
              then
A904:         a in rc by A852,XBOOLE_0:def 5;
A905:         RightComp rg is_a_component_of (L~rg)` by GOBOARD9:def 2;
              rc c= RightComp rg & L~rg c= L~f by A789,A831,A829,A830,Th27,
SPPOL_2:22;
              hence thesis by A570,A771,A848,A849,A852,A904,A905;
            end;
            suppose
              a1 = p91+1 & a2 = p92;
              then
A906:         a1 = q1 & a2 = q2 by A832,A833,A880,A883,GOBOARD1:5;
              (F.l)/.(m-'1) = (F.(m-'1))/.(m-'1) by A790,A849,NAT_1:11
                .= q by A578,A575,A790,A849,A835,A882,A906
                .= (F.l)/.l by A790,A845,A846,A843
                .= (F.l)/.len(F.l) by A192;
              hence thesis by A564,A845,A846,A851,A827;
            end;
            suppose
              a1 = p91 & a2 = p92+1;
              then
A907:         a1 = p1 & a2 = p2+1 by A832,A833,A883,GOBOARD1:5;
              right_cell(f,l,G) = cell(G,p1,p2) by A427,A567,A578,A841,A844
,A846,A843,A832,A833,A834,A835,A880,GOBRD13:26
                .= left_cell(f,m-'1,G) by A427,A570,A841,A848,A849,A832,A833
,A881,A882,A907,GOBRD13:27;
              hence thesis by A427,A570,A848,A849,A847;
            end;
          end;
        end;
        suppose
A908:     p1 = q1+1 & p2 = q2;
          consider a1,a2,p91,p92 being Nat such that
A909:     [a1,a2] in Indices G and
A910:     a = G*(a1,a2) and
A911:     [p91,p92] in Indices G & p = G*(p91,p92) and
A912:     a1 = p91 & a2+1 = p92 or a1+1 = p91 & a2 = p92 or a1 =
p91+1 & a2 = p92 or a1 = p91 & a2 = p92+1 by A569,A570,A841,A848,A849,JORDAN8:3
;
A913:     a1 <= len G by A909,MATRIX_0:32;
          thus thesis
          proof
            per cases by A912;
            suppose
A914:         a1 = p91 & a2+1 = p92;
              then a2+1 = p2 by A832,A833,A911,GOBOARD1:5;
              then
A915:         q2-'1 = a2 by A908,NAT_D:34;
              a1 = p1 by A832,A833,A911,A914,GOBOARD1:5;
              then
A916:         q1 = a1-'1 by A908,NAT_D:34;
              right_cell(f,l,G) = cell(G,q1,q2-'1) by A427,A567,A578,A841,A844
,A846,A843,A832,A833,A834,A835,A908,GOBRD13:24
                .= left_cell(f,m-'1,G) by A427,A570,A841,A848,A849,A909,A910
,A911,A914,A916,A915,GOBRD13:21;
              hence thesis by A427,A570,A848,A849,A847;
            end;
            suppose
              a1+1 = p91 & a2 = p92;
              then
A917:         a1+1 = p1 & a2 = p2 by A832,A833,A911,GOBOARD1:5;
              (F.l)/.(m-'1) = (F.(m-'1))/.(m-'1) by A790,A849,NAT_1:11
                .= q by A578,A575,A790,A849,A835,A908,A910,A917
                .= (F.l)/.l by A790,A845,A846,A843
                .= (F.l)/.len(F.l) by A192;
              hence thesis by A564,A845,A846,A851,A827;
            end;
            suppose
A918:         a1 = p91+1 & a2 = p92;
A919:         p = g/.1 by A567,A612,A577,FINSEQ_5:65
                .= rg/.len g by FINSEQ_5:65
                .= rg/.len rg by FINSEQ_5:def 3;
A920:         a1 = p1+1 by A832,A833,A911,A918,GOBOARD1:5;
              p1+1>p1 by XREAL_1:29;
              then
A921:         a1+1 > p1 by A920,NAT_1:13;
A922:         m-'1 <= m by A848,NAT_1:11;
A923:         f/.(m-'1) = (F.(m-'1))/.(m-'1) by A578,A575,A790,A849
                .= (F.m)/.(m-'1) by A790,A849,A922;
A924:         2 in dom g by A621,FINSEQ_3:25;
              len rg-'1+2 = len g +1 by A822,FINSEQ_5:def 3;
              then
A925:         rg/.(len rg-'1) = g/.2 by A924,FINSEQ_5:66
                .= f/.(m+1) by A824,A924,FINSEQ_5:27;
A926:         F.k|(m+1)=F.(m+1) by A488,A578,A574;
              set rc = right_cell(rg,len rg-'1,G)\L~rg;
A927:         RightComp rg is_a_component_of (L~rg)` by GOBOARD9:def 2;
A928:         p2-'1+1 = p2 by A840,XREAL_1:235;
A929:         f/.(m-'1+1) = (F.m)/.m by A578,A568,A570,A790,A848;
A930:         p1-'1 = q1 & m-'1+1 <= len (F.m) by A192,A848,A908,NAT_D:34;
A931:         a2 = p2 by A832,A833,A911,A918,GOBOARD1:5;
              right_cell(f,l,G) = cell(G,q1,q2-'1) by A427,A567,A578,A841,A844
,A846,A843,A832,A833,A834,A835,A908,GOBRD13:24
                .= front_left_cell(F.m,m-'1,G) by A427,A841,A848,A849,A832,A833
,A908,A909,A910,A920,A931,A930,A923,A929,GOBRD13:38;
              then F.(m+1) turns_left m-'1,G by A456,A794,A847;
              then
A932:         f turns_left m-'1,G by A849,A824,A926,GOBRD13:44;
A933:         a2+1 > p2 by A931,NAT_1:13;
              then
A934:         [p1,p2-'1] in Indices G by A841,A848,A832,A833,A909,A910,A931
,A921,A932;
              then
A935:         1 <= p2-'1 by MATRIX_0:32;
              f/.(m+1) = G*(p1,p2-'1) by A841,A848,A832,A833,A909,A910
,A931,A933,A921,A932;
              then right_cell(rg,len rg-'1,G) = cell(G,p1,p2-'1) by A831,A829
,A830,A832,A833,A934,A928,A925,A919,GOBRD13:22;
              then a in right_cell(rg,len rg-'1,G) by A837,A838,A910,A913,A920
,A931,A935,A928,Th20;
              then
A936:         a in rc by A852,XBOOLE_0:def 5;
              rc c= RightComp rg & L~rg c= L~f by A789,A831,A829,A830,Th27,
SPPOL_2:22;
              hence thesis by A570,A771,A848,A849,A852,A936,A927;
            end;
            suppose
A937:         a1 = p91 & a2 = p92+1;
              then a1 = p1 by A832,A833,A911,GOBOARD1:5;
              then
A938:         q1 = a1-'1 by A908,NAT_D:34;
              a2 = p2+1 by A832,A833,A911,A937,GOBOARD1:5;
              then right_cell(f,m-'1,G) = cell(G,q1,q2) by A427,A570,A841,A848
,A849,A908,A909,A910,A911,A937,A938,GOBRD13:28
                .= left_cell(f,l,G) by A427,A567,A578,A841,A844,A846,A843,A832
,A833,A834,A835,A908,GOBRD13:23;
              hence thesis by A427,A578,A844,A846,A850;
            end;
          end;
        end;
        suppose
A939:     p1 = q1 & p2 = q2+1;
          consider a1,a2,p91,p92 being Nat such that
A940:     [a1,a2] in Indices G and
A941:     a = G*(a1,a2) and
A942:     [p91,p92] in Indices G & p = G*(p91,p92) and
A943:     a1 = p91 & a2+1 = p92 or a1+1 = p91 & a2 = p92 or a1 =
p91+1 & a2 = p92 or a1 = p91 & a2 = p92+1 by A569,A570,A841,A848,A849,JORDAN8:3
;
A944:     a2 <= width G by A940,MATRIX_0:32;
          thus thesis
          proof
            per cases by A943;
            suppose
              a1 = p91 & a2+1 = p92;
              then
A945:         a1 = p1 & a2+1 = p2 by A832,A833,A942,GOBOARD1:5;
              (F.l)/.(m-'1) = (F.(m-'1))/.(m-'1) by A790,A849,NAT_1:11
                .= q by A578,A575,A790,A849,A835,A939,A941,A945
                .= (F.l)/.l by A790,A845,A846,A843
                .= (F.l)/.len(F.l) by A192;
              hence thesis by A564,A845,A846,A851,A827;
            end;
            suppose
A946:         a1+1 = p91 & a2 = p92;
              then a2 = p2 by A832,A833,A942,GOBOARD1:5;
              then
A947:         a2-'1 = q2 by A939,NAT_D:34;
              a1+1 = p1 by A832,A833,A942,A946,GOBOARD1:5;
              then
A948:         a1 = q1-'1 by A939,NAT_D:34;
              right_cell(f,m-'1,G) = cell(G,a1,a2-'1) by A427,A570,A841,A848
,A849,A940,A941,A942,A946,GOBRD13:24
                .= left_cell(f,l,G) by A427,A567,A578,A841,A844,A846,A843,A832
,A833,A834,A835,A939,A948,A947,GOBRD13:21;
              hence thesis by A427,A578,A844,A846,A850;
            end;
            suppose
A949:         a1 = p91+1 & a2 = p92;
              then a2 = p2 by A832,A833,A942,GOBOARD1:5;
              then
A950:         a2-'1 = q2 by A939,NAT_D:34;
A951:         a1 = p1+1 by A832,A833,A942,A949,GOBOARD1:5;
              right_cell(f,l,G) = cell(G,q1,q2) by A427,A567,A578,A841,A844
,A846,A843,A832,A833,A834,A835,A939,GOBRD13:22
                .= left_cell(f,m-'1,G) by A427,A570,A841,A848,A849,A939,A940
,A941,A942,A949,A951,A950,GOBRD13:25;
              hence thesis by A427,A570,A848,A849,A847;
            end;
            suppose
A952:         a1 = p91 & a2 = p92+1;
              set rc = right_cell(rg,len rg-'1,G)\L~rg;
A953:         RightComp rg is_a_component_of (L~rg)` by GOBOARD9:def 2;
A954:         2 in dom g by A621,FINSEQ_3:25;
              len rg-'1+2 = len g +1 by A822,FINSEQ_5:def 3;
              then
A955:         rg/.(len rg-'1) = g/.2 by A954,FINSEQ_5:66
                .= f/.(m+1) by A824,A954,FINSEQ_5:27;
A956:         p = g/.1 by A567,A612,A577,FINSEQ_5:65
                .= rg/.len g by FINSEQ_5:65
                .= rg/.len rg by FINSEQ_5:def 3;
A957:         a1 = p1 by A832,A833,A942,A952,GOBOARD1:5;
A958:         m-'1 <= m by A848,NAT_1:11;
A959:         f/.(m-'1) = (F.(m-'1))/.(m-'1) by A578,A575,A790,A849
                .= (F.m)/.(m-'1) by A790,A849,A958;
A960:         p2-'1 = q2 & m-'1+1 <= len (F.m) by A192,A848,A939,NAT_D:34;
A961:         f/.(m-'1+1) = (F.m)/.m by A578,A568,A570,A790,A848;
A962:         F.k|(m+1)=F.(m+1) by A488,A578,A574;
A963:         a2 = p2+1 by A832,A833,A942,A952,GOBOARD1:5;
              right_cell(f,l,G) = cell(G,q1,q2) by A427,A567,A578,A841,A844
,A846,A843,A832,A833,A834,A835,A939,GOBRD13:22
                .= front_left_cell(F.m,m-'1,G) by A427,A841,A848,A849,A832,A833
,A939,A940,A941,A957,A963,A960,A959,A961,GOBRD13:40;
              then F.(m+1) turns_left m-'1,G by A456,A794,A847;
              then
A964:         p2+1>p2 & f turns_left m-'1,G by A849,A824,A962,GOBRD13:44
,NAT_1:13;
A965:         a2+1>p2+1 by A963,NAT_1:13;
              then
A966:         [p1+1,p2] in Indices G by A841,A848,A832,A833,A940,A941,A964;
              then
A967:         p1+1 <= len G by MATRIX_0:32;
              f/.(m+1) = G*(p1+1,p2) by A841,A848,A832,A833,A940,A941,A965
,A964;
              then right_cell(rg,len rg-'1,G) = cell(G,p1,p2) by A831,A829,A830
,A832,A833,A966,A955,A956,GOBRD13:26;
              then a in right_cell(rg,len rg-'1,G) by A837,A840,A941,A944,A957
,A963,A967,Th20;
              then
A968:         a in rc by A852,XBOOLE_0:def 5;
              rc c= RightComp rg & L~rg c= L~f by A789,A831,A829,A830,Th27,
SPPOL_2:22;
              hence thesis by A570,A771,A848,A849,A852,A968,A953;
            end;
          end;
        end;
      end;
      then
A969: LeftComp g is_a_component_of (L~g)` & C meets LeftComp g by GOBOARD9:24
,def 1;
      reconsider Lg9 = (L~g)` as Subset of TOP-REAL 2;
A970: RightComp g is_a_component_of (L~g)` by GOBOARD9:def 2;
A971: C c= Lg9
      proof
        let c be object;
        assume that
A972:   c in C and
A973:   not c in Lg9;
        reconsider c as Point of TOP-REAL 2 by A972;
        consider i such that
A974:   1 <= i and
A975:   i+1 <= len g and
A976:   c in LSeg(g/.i,g/.(i+1)) by A973,SPPOL_2:14,SUBSET_1:29;
A977:   1 <= i+(m-'1) by A974,NAT_1:12;
        i+1 in dom g by A974,A975,SEQ_4:134;
        then
A978:   g/.(i+1) = f/.(i+1+(m-'1)) by FINSEQ_5:27;
        i+1+(m-'1) = i+(m-'1)+1;
        then
A979:   i+(m-'1)+1 <= (len g)+(m-'1) by A975,XREAL_1:6;
        i in dom g by A974,A975,SEQ_4:134;
        then g/.i = f/.(i+(m-'1)) by FINSEQ_5:27;
        then c in LSeg(f,i+(m-'1)) by A576,A976,A978,A977,A979,TOPREAL1:def 3;
        then c in left_cell(f,i+(m-'1),G) /\ right_cell(f,i+(m-'1),G) by A427
,A576,A977,A979,GOBRD13:29;
        then c in left_cell(f,i+(m-'1),G) by XBOOLE_0:def 4;
        then left_cell(f,i+(m-'1),G) meets C by A972,XBOOLE_0:3;
        hence contradiction by A427,A576,A977,A979;
      end;
A980: the TopStruct of TOP-REAL 2 = TopSpaceMetr (Euclid 2) by EUCLID:def 8;
      C meets RightComp g
      proof
        right_cell(f,m,G) meets C by A427,A568,A574;
        then consider p being object such that
A981:   p in right_cell(f,m,G) and
A982:   p in C by XBOOLE_0:3;
        reconsider p as Element of TOP-REAL 2 by A981;
        now
          reconsider u = p as Element of Euclid 2 by TOPREAL3:8;
          take a = p;
          thus a in C by A982;
          consider r being Real such that
A983:     r > 0 and
A984:     Ball(u,r) c= (L~g)` by A971,A788,A982,GOBOARD6:5;
          reconsider r as Real;
A985:     p in Ball(u,r) by A983,GOBOARD6:1;
          reconsider B = Ball(u,r) as non empty Subset of TOP-REAL 2 by A980
,A983,GOBOARD6:1,TOPMETR:12;
A986:     p in B by A983,GOBOARD6:1;
          right_cell(f,m,G) = Cl Int right_cell(f,m,G) & B is open by A568,A574
,A754,GOBOARD6:3;
          then
A987:     Int right_cell(f,m,G) meets B by A981,A985,TOPS_1:12;
          Int right_cell(g,1,G) c= Int right_cell(g,1) & Int right_cell
          (g,1) c= RightComp g by A623,A622,GOBOARD9:25,GOBRD13:33,TOPS_1:19;
          then Int right_cell(g,1,G) c= RightComp g;
          then Int right_cell(f,m-'1+1,G) c= RightComp g by A569,A575,A622,
GOBRD13:32;
          then B is connected & Int right_cell(f,m,G) c= RightComp g by A568,
SPRECT_3:7,XREAL_1:235;
          then B c= RightComp g by A970,A984,A987,GOBOARD9:4;
          hence a in RightComp g by A986;
        end;
        hence thesis by XBOOLE_0:3;
      end;
      hence contradiction by A1,A970,A971,A969,Th1,SPRECT_4:6;
    end;
    then g = f/^0 by XREAL_1:232
      .= f by FINSEQ_5:28;
    then reconsider f as standard non constant special_circular_sequence;
    f is clockwise_oriented
    proof
      f/.2 in LSeg(f/.1,f/.(1+1)) by RLTOPSP1:68;
      then
A988: f/.2 in L~f by A572,SPPOL_2:15;
      (NW-corner L~f)`1 = W-bound L~f by EUCLID:52;
      then
A989: (NW-corner L~f)`1 <= (f/.2)`1 by A988,PSCOMP_1:24;
      len G >= 3 by A231,NAT_1:12;
      then
A990: 1 < len G by XXREAL_0:2;
      (NE-corner L~f)`1 = E-bound L~f by EUCLID:52;
      then
A991: (f/.2)`1 <= (NE-corner L~f)`1 by A988,PSCOMP_1:24;
      for k st 1 <= k & k+1 <= len f holds left_cell(f,k,G) misses C &
      right_cell(f,k,G) meets C by A427;
      then
A992: N-min L~f = f/.1 by A569,A606,Th30;
      consider i such that
A993: 1 <= i and
A994: i+1 <= len G and
A995: f/.1 = G*(i,width G) & f/.2 = G*(i+1,width G) and
      N-min C in cell(G,i,width G-'1) and
      N-min C <> G*(i,width G-'1) by A606;
      i < len G by A994,NAT_1:13;
      then
A996: (N-min L~f)`2 = N-bound L~f & G*(i,width G)`2 = G*(1,width G)`2
      by A2,A990,A993,EUCLID:52,GOBOARD5:1;
      1 <= i+1 by NAT_1:12;
      then
A997: G*(i+1,width G)`2 = G*(1,width G)`2 by A2,A990,A994,GOBOARD5:1;
      (NW-corner L~f)`2 = (NE-corner L~f)`2 & (NE-corner L~f)`2 =
      N-bound L~f by EUCLID:52,PSCOMP_1:27;
      then f/.2 in LSeg(NW-corner L~f, NE-corner L~f) by A992,A995,A996,A997
,A989,A991,GOBOARD7:8;
      then f/.2 in LSeg(NW-corner L~f, NE-corner L~f) /\ L~f by A988,
XBOOLE_0:def 4;
      hence thesis by A992,SPRECT_2:30;
    end;
    then reconsider f as clockwise_oriented standard non constant
    special_circular_sequence;
    take f;
    thus f is_sequence_on G by A427;
    thus ex i st 1 <= i & i+1 <= len G & f/.1 = G*(i,width G) & f/.2 = G*(i+1,
    width G) & N-min C in cell(G,i,width G-'1) & N-min C <> G*(i,width G-'1)
by A606;
    let m such that
A998: 1 <= m and
A999: m+2 <= len f;
A1000: F.(m+1+1) = f|(m+1+1) by A488,A578,A999;
A1001: m+1 < m+2 by XREAL_1:6;
    then
A1002: f|(m+1) = F.(m+1) by A488,A578,A999,XXREAL_0:2;
A1003: m+1 <= len f by A999,A1001,XXREAL_0:2;
    then
A1004: front_left_cell(F.(m+1),m,G) = front_left_cell(f,m,G) by A569,A998
,A1002,GOBRD13:42;
A1005: m = m+1-'1 & m+1 > 1 by A998,NAT_1:13,NAT_D:34;
A1006: front_right_cell(F.(m+1),m,G) = front_right_cell(f,m,G) by A569,A998
,A1003,A1002,GOBRD13:42;
    hereby
      assume
      front_left_cell(f,m,G) misses C & front_right_cell(f,m,G) misses C;
      then F.(m+1+1) turns_right m,G by A456,A1005,A1004,A1006;
      hence f turns_right m,G by A998,A1000,GOBRD13:43;
    end;
    hereby
      assume front_left_cell(f,m,G) misses C & front_right_cell(f,m,G) meets C;
      then F.(m+1+1) goes_straight m,G by A456,A1005,A1004,A1006;
      hence f goes_straight m,G by A998,A1000,GOBRD13:45;
    end;
    assume front_left_cell(f,m,G) meets C;
    then F.(m+1+1) turns_left m,G by A456,A1005,A1004;
    hence thesis by A998,A1000,GOBRD13:44;
  end;
  uniqueness
  proof
    let f1,f2 be clockwise_oriented standard non constant
    special_circular_sequence such that
A1007: f1 is_sequence_on Gauge(C,n);
    defpred P[Nat] means f1|$1 = f2|$1;
    given i1 such that
A1008: 1 <= i1 & i1+1 <= len Gauge(C,n) and
A1009: f1/.1 = Gauge(C,n)*(i1,width Gauge(C,n)) and
A1010: f1/.2 = Gauge(C,n)*(i1+1,width Gauge(C,n)) and
A1011: N-min C in cell(Gauge(C,n),i1,width Gauge(C,n)-'1) & N-min C <>
    Gauge(C,n)*( i1,width Gauge(C,n)-'1);
    assume that
A1012: for k st 1 <= k & k+2 <= len f1 holds (front_left_cell(f1,k,
Gauge(C,n)) misses C & front_right_cell(f1,k,Gauge(C,n)) misses C implies f1
    turns_right k,Gauge(C,n)) & (front_left_cell(f1,k,Gauge(C,n)) misses C &
front_right_cell(f1,k,Gauge(C,n)) meets C implies f1 goes_straight k,Gauge(C,n)
) & (front_left_cell(f1,k,Gauge(C,n)) meets C implies f1 turns_left k,Gauge(C,n
    )) and
A1013: f2 is_sequence_on Gauge(C,n);
    given i2 such that
A1014: 1 <= i2 & i2+1 <= len Gauge(C,n) and
A1015: f2/.1 = Gauge(C,n)*(i2,width Gauge(C,n)) and
A1016: f2/.2 = Gauge(C,n)*(i2+1,width Gauge(C,n)) and
A1017: N-min C in cell(Gauge(C,n),i2,width Gauge(C,n)-'1) & N-min C <>
    Gauge(C,n)*( i2,width Gauge(C,n)-'1);
    assume
A1018: for k st 1 <= k & k+2 <= len f2 holds (front_left_cell(f2,k,
Gauge(C,n)) misses C & front_right_cell(f2,k,Gauge(C,n)) misses C implies f2
    turns_right k,Gauge(C,n)) & (front_left_cell(f2,k,Gauge(C,n)) misses C &
front_right_cell(f2,k,Gauge(C,n)) meets C implies f2 goes_straight k,Gauge(C,n)
) & (front_left_cell(f2,k,Gauge(C,n)) meets C implies f2 turns_left k,Gauge(C,n
    ));
A1019: for k st P[k] holds P[k+1]
    proof
A1020: len f1 > 4 by GOBOARD7:34;
A1021: f1|1 = <*f1.1*> & f2|1 = <*f2.1*> by FINSEQ_5:20;
A1022: i1 = i2 & len f2 > 4 by A1008,A1011,A1014,A1017,Th29,GOBOARD7:34;
       1 <= len f1 & 1 <= len f2 by A1020,A1022,XXREAL_0:2; then
       1 in dom f1 & 1 in dom f2 by FINSEQ_3:25; then
S:     f1.1 = f1/.1 & f2.1 = f2/.1 by PARTFUN1:def 6;
      let k such that
A1023: f1|k = f2|k;
      per cases by NAT_1:25;
      suppose
        k = 0;
        hence thesis by S,A1008,A1009,A1011,A1014,A1015,A1017,A1021,Th29;
      end;
      suppose
A1024:  k = 1;
        f1|2 = <*f1/.1,f1/.2*> by A1020,FINSEQ_5:81,XXREAL_0:2;
        hence thesis by A1009,A1010,A1015,A1016,A1022,A1024,FINSEQ_5:81
,XXREAL_0:2;
      end;
      suppose
A1025:  k > 1;
A1026:  f1/.1 = f1/.len f1 & f2/.1 = f2/.len f2 by FINSEQ_6:def 1;
        now
          per cases;
          suppose
A1027:      len f1 > k;
            set m = k-'1;
A1028:      1 <= m by A1025,NAT_D:49;
            then
A1029:      m+1 = k by NAT_D:43;
            then
A1030:      front_left_cell (f1,m,Gauge(C,n))= front_left_cell(f1|k,m,
            Gauge(C,n)) by A1007,A1027,A1028,GOBRD13:42;
A1031:      m+(1+1) = k+1 by A1029;
A1032:      k+1 <= len f1 by A1027,NAT_1:13;
A1033:      now
A1034:        1 < len f2 by GOBOARD7:34,XXREAL_0:2;
              assume
A1035:        len f2 <= k;
              then
A1036:        f2 = f2|k by FINSEQ_1:58;
              then len f2 in dom(f2|k) by FINSEQ_5:6;
              then
A1037:        (f1|k)/.len f2 = f1/.len f2 by A1023,FINSEQ_4:70;
              1 in dom(f2|k) & len f2 <= len f1 by A1023,A1036,FINSEQ_5:6,16;
              hence
              contradiction by A1023,A1026,A1027,A1035,A1036,A1037,A1034,
FINSEQ_4:70,GOBOARD7:38;
            end;
            then
A1038:      k+1 <= len f2 by NAT_1:13;
A1039:      front_right_cell(f2,m,Gauge(C,n)) = front_right_cell(f2|k,m
            ,Gauge(C,n)) by A1013,A1028,A1029,A1033,GOBRD13:42;
A1040:      front_left_cell(f2,m,Gauge(C,n)) = front_left_cell(f2|k,m,
            Gauge(C,n)) by A1013,A1028,A1029,A1033,GOBRD13:42;
A1041:      front_right_cell(f1,m,Gauge(C,n)) = front_right_cell(f1|k,m
            ,Gauge(C,n)) by A1007,A1027,A1028,A1029,GOBRD13:42;
            now
              per cases;
              suppose
                front_left_cell(f1,m,Gauge(C,n)) misses C &
                front_right_cell(f1,m,Gauge(C,n)) misses C;
                then f1 turns_right m,Gauge(C,n) & f2 turns_right m,Gauge(C,
n) by A1012,A1018,A1023,A1028,A1038,A1032,A1030,A1041,A1040,A1039,A1031;
                hence thesis by A1013,A1023,A1025,A1038,A1032,GOBRD13:46;
              end;
              suppose
                front_left_cell(f1,m,Gauge(C,n)) misses C &
                front_right_cell(f1,m,Gauge(C,n)) meets C;
                then f1 goes_straight m,Gauge(C,n) & f2 goes_straight m,
Gauge(C,n) by A1012,A1018,A1023,A1028,A1038,A1032,A1030,A1041,A1040,A1039,A1031
;
                hence thesis by A1013,A1023,A1025,A1038,A1032,GOBRD13:48;
              end;
              suppose
                front_left_cell(f1,m,Gauge(C,n)) meets C;
                then f1 turns_left m,Gauge(C,n) & f2 turns_left m,Gauge(C,n)
                by A1012,A1018,A1023,A1028,A1038,A1032,A1030,A1040,A1031;
                hence thesis by A1013,A1023,A1025,A1038,A1032,GOBRD13:47;
              end;
            end;
            hence thesis;
          end;
          suppose
A1042:      k >= len f1;
A1043:      1 < len f1 by GOBOARD7:34,XXREAL_0:2;
A1044:      f1 = f1|k by A1042,FINSEQ_1:58;
            then len f1 in dom(f1|k) by FINSEQ_5:6;
            then
A1045:      (f2|k)/.len f1 = f2/.len f1 by A1023,FINSEQ_4:70;
            1 in dom(f1|k) & len f1 <= len f2 by A1023,A1044,FINSEQ_5:6,16;
            then
A1046:      len f2 = len f1 by A1023,A1026,A1044,A1045,A1043,FINSEQ_4:70
,GOBOARD7:38;
A1047:      k+1 > len f1 by A1042,NAT_1:13;
            hence f1|(k+1) = f1 by FINSEQ_1:58
              .= f2 by A1023,A1042,A1044,A1046,FINSEQ_1:58
              .= f2|(k+1) by A1046,A1047,FINSEQ_1:58;
          end;
        end;
        hence thesis;
      end;
    end;
A1048: P[0];
    for k holds P[k] from NAT_1:sch 2(A1048,A1019);
    hence thesis by Th2;
  end;
end;

theorem Th31:
  C is connected implies
 for n,k being Nat st 1 <= k & k+1 <= len Cage(C,n)
holds left_cell
(Cage(C,n),k,Gauge(C,n)) misses C & right_cell(Cage(C,n),k,Gauge(C,n)) meets C
proof
  assume
A1: C is connected;
  let n be Nat;
  set G = Gauge(C,n), f = Cage(C,n);
  set W = W-bound C, E = E-bound C, S = S-bound C, N = N-bound C;
A2: f is_sequence_on G by A1,Def1;
  defpred P[Nat] means
   for m being Nat  st 1 <= m & m+1 <= len(f|$1) holds
  left_cell(f|$1,m,G) misses C & right_cell(f|$1,m,G) meets C;
A3: len G = width G by JORDAN8:def 1;
A4: len G = 2|^n+3 by JORDAN8:def 1;
A5: for k being Nat st P[k] holds P[k+1]
  proof
    let k be Nat such that
A6: for m being Nat st 1 <= m & m+1 <= len(f|k) holds left_cell(f|k,m,G)
    misses C & right_cell(f|k,m,G) meets C;
    per cases;
    suppose
      k >= len f;
      then f|k = f & f|(k+1) = f by FINSEQ_1:58,NAT_1:12;
      hence thesis by A6;
    end;
    suppose
A7:   k < len f;
      then
A8:   len(f|k) = k by FINSEQ_1:59;
A9:   1 <= len G by A4,NAT_1:12;
A10:  f|k is_sequence_on G by A2,GOBOARD1:22;
A11:  f|(k+1) is_sequence_on G by A2,GOBOARD1:22;
      consider i being Nat such that
A12:  1 <= i and
A13:  i+1 <= len G and
A14:  f/.1 = G*(i,width G) & f/.2 = G*(i+1,width G) and
A15:  N-min C in cell(G,i,width G-'1) and
      N-min C <> G*(i,width G-'1) by A1,Def1;
      let m be Nat such that
A16:  1 <= m and
A17:  m+1 <= len(f|(k+1));
A18:  k+1 <= len f by A7,NAT_1:13;
      then
A19:  len(f|(k+1)) = k+1 by FINSEQ_1:59;
A20:  2|^n >= n+1 by NEWTON:85;
      now
        per cases by NAT_1:25;
        suppose
A21:      k = 0;
          1 <= m+1 by NAT_1:12;
          then m+1 = 0+1 by A17,A21,XXREAL_0:1;
          hence thesis by A16;
        end;
        suppose
A22:      k = 1;
          1+1 <= m+1 by A16,XREAL_1:6;
          then
A23:      m+1 = 1+1 by A19,A17,A22,XXREAL_0:1;
          f|(k+1) = <*G*(i,width G),G*(i+1,width G)*> by A18,A14,A22,
FINSEQ_5:81;
          then
A24:      (f|(k+1))/.1 = G*(i,width G) & (f|(k+1))/.2 = G*(i+1, width G)
          by FINSEQ_4:17;
          1 <= i+1 by A12,NAT_1:13;
          then
A25:      [i+1,len G] in Indices G by A3,A13,A9,MATRIX_0:30;
A26:      i < len G by A13,NAT_1:13;
          then
A27:      [i,len G] in Indices G by A3,A12,A9,MATRIX_0:30;
A28:      i < i+1 & i+1 < (i+1)+1 by NAT_1:13;
          then
A29:      left_cell(f|(k+1),m,G) = cell(G,i,len G) by A3,A11,A17,A24,A27,A25
,A23,GOBRD13:def 3;
          now
            N > S by JORDAN8:9;
            then N-S > S-S by XREAL_1:9;
            then (N-S)/(2|^n) > 0 by A20,XREAL_1:139;
            then
A30:        N+0 < N+(N-S)/(2|^n) by XREAL_1:6;
            assume left_cell(f|(k+1),m,G) meets C;
            then consider p being object such that
A31:        p in cell(G,i,len G) and
A32:        p in C by A29,XBOOLE_0:3;
            reconsider p as Element of TOP-REAL 2 by A31;
A33:        p`2 <= N by A32,PSCOMP_1:24;
            [1,len G] in Indices G by A3,A9,MATRIX_0:30;
            then G*(1,len G) = |[W+((E-W)/(2|^n))*(1-2),S+((N-S)/(2 |^n))*((
            len G)- 2)]| by JORDAN8:def 1;
            then
A34:        G*(1,len G)`2 = S+((N-S)/(2|^n))*((len G)-2) by EUCLID:52;
            cell(G,i,len G) = { |[r,s]|: G*(i,1)`1 <= r & r <= G*(i+1,1)
            `1 & G*(1,len G)`2 <= s } by A3,A12,A26,GOBRD11:31;
            then consider r,s such that
A35:        p = |[r,s]| and
            G*(i,1)`1 <= r and
            r <= G*(i+1,1)`1 and
A36:        G*(1,len G)`2 <= s by A31;
            ((N-S)/(2|^n))*((len G)-2) = ((N-S)/(2|^n))*(2|^n)+((N-S)/(2
            |^n))*1 by A4
              .= (N-S)+(N-S)/(2|^n) by A20,XCMPLX_1:87;
            then N < s by A36,A34,A30,XXREAL_0:2;
            hence contradiction by A35,A33,EUCLID:52;
          end;
          hence left_cell(f|(k+1),m,G) misses C;
          N-min C in C & N-min C in right_cell(f|(k+1),m,G) by A3,A11,A15,A17
,A24,A27,A25,A23,A28,GOBRD13:def 2,SPRECT_1:11;
          hence right_cell(f|(k+1),m,G) meets C by XBOOLE_0:3;
        end;
        suppose
A37:      k > 1;
          then
A38:      (len(f|k)) -'1 +1 = len(f|k) by A8,XREAL_1:235;
A39:      1 <= (len(f|k))-'1 by A8,A37,NAT_D:49;
          now
            per cases;
            suppose
A40:          m+1 = len(f|(k+1));
A41:          len(f|k) <= len f by FINSEQ_5:16;
              now
                left_cell(f|k,(len(f|k))-'1,G) misses C by A6,A39,A38;
                then
A42:            left_cell(f,(len(f|k))-'1,G) misses C by A2,A8,A39,A38,A41,
GOBRD13:31;
A43:            (len(f|k))-'1+(1+1) = (len(f|k))+1 by A38;
                right_cell(f|k,(len(f|k))-'1,G) meets C by A6,A39,A38;
                then
A44:            right_cell(f,(len(f|k))-'1,G) meets C by A2,A8,A39,A38,A41,
GOBRD13:31;
                consider i1,j1,i2,j2 being Nat such that
A45:            [i1,j1] in Indices G & f/.((len(f|k)) -'1) = G*(i1,j1 ) and
A46:            [i2,j2] in Indices G and
A47:            f/.len(f|k) = G*(i2,j2) and
                i1 = i2 & j1+1 = j2 or i1+1 = i2 & j1 = j2 or i1 = i2+1 &
                j1 = j2 or i1 = i2 & j1 = j2+1 by A2,A7,A8,A39,A38,JORDAN8:3;
                1 <= i2 by A46,MATRIX_0:32;
                then
A48:            (i2-'1)+1 = i2 by XREAL_1:235;
                1 <= j2 by A46,MATRIX_0:32;
                then
A49:            (j2-'1)+1 = j2 by XREAL_1:235;
                per cases;
                suppose
A50:              front_left_cell(f,(len(f|k))-'1,G) misses C &
                  front_right_cell(f,(len(f|k))-'1,G) misses C;
                  then
A51:              f turns_right (len(f|k))-'1,G by A1,A18,A8,A39,A43,Def1;
                  now
                    per cases by A38,A45,A46,A47,A51;
                    suppose that
A52:                  i1 = i2 & j1+1 = j2 and
A53:                  [i2+1,j2] in Indices G & f/.((len(f|k))+1) = G*
                      (i2+1,j2);
                      front_right_cell(f,(len(f|k))-'1,G) = cell(G,i1,j2)
                      by A2,A39,A38,A41,A45,A46,A47,A52,GOBRD13:35;
                      then
                      left_cell(f,m,G) misses C by A2,A18,A8,A19,A16,A40,A46
,A47,A50,A52,A53,GOBRD13:23;
                      hence left_cell(f|(k+1),m,G) misses C by A2,A18,A19,A16
,A40,GOBRD13:31;
                      j2-'1 = j1 & cell(G,i1,j1) meets C by A2,A39,A38,A41,A45
,A46,A47,A44,A52,GOBRD13:22,NAT_D:34;
                      then
                      right_cell(f,m,G) meets C by A2,A18,A8,A19,A16,A40,A46
,A47,A52,A53,GOBRD13:24;
                      hence right_cell(f|(k+1),m,G) meets C by A2,A18,A19,A16
,A40,GOBRD13:31;
                    end;
                    suppose that
A54:                  i1+1 = i2 & j1 = j2 and
A55:                  [i2,j2-'1] in Indices G & f/.((len(f|k))+1) = G
                      *(i2,j2-'1);
                      front_right_cell(f,(len(f|k))-'1,G) = cell(G,i2,j2
                      -'1) by A2,A39,A38,A41,A45,A46,A47,A54,GOBRD13:37;
                      then
                      left_cell(f,m,G) misses C by A2,A18,A8,A19,A16,A40,A46
,A47,A49,A50,A55,GOBRD13:27;
                      hence left_cell(f|(k+1),m,G) misses C by A2,A18,A19,A16
,A40,GOBRD13:31;
                      i2-'1 = i1 & cell(G,i1,j1-'1) meets C by A2,A39,A38,A41
,A45,A46,A47,A44,A54,GOBRD13:24,NAT_D:34;
                      then
                      right_cell(f,m,G) meets C by A2,A18,A8,A19,A16,A40,A46
,A47,A49,A54,A55,GOBRD13:28;
                      hence right_cell(f|(k+1),m,G) meets C by A2,A18,A19,A16
,A40,GOBRD13:31;
                    end;
                    suppose that
A56:                  i1 = i2+1 & j1 = j2 and
A57:                  [i2,j2+1] in Indices G & f/.((len(f|k))+1) = G*
                      (i2,j2+1);
                      front_right_cell(f,(len(f|k))-'1,G) = cell(G,i2-'1,
                      j2) by A2,A39,A38,A41,A45,A46,A47,A56,GOBRD13:39;
                      then
                      left_cell(f,m,G) misses C by A2,A18,A8,A19,A16,A40,A46
,A47,A50,A57,GOBRD13:21;
                      hence left_cell(f|(k+1),m,G) misses C by A2,A18,A19,A16
,A40,GOBRD13:31;
                      cell(G,i2,j2) meets C by A2,A39,A38,A41,A45,A46,A47,A44
,A56,GOBRD13:26;
                      then
                      right_cell(f,m,G) meets C by A2,A18,A8,A19,A16,A40,A46
,A47,A57,GOBRD13:22;
                      hence right_cell(f|(k+1),m,G) meets C by A2,A18,A19,A16
,A40,GOBRD13:31;
                    end;
                    suppose that
A58:                  i1 = i2 & j1 = j2+1 and
A59:                  [i2-'1,j2] in Indices G & f/.((len(f|k))+1) = G
                      *(i2-'1,j2);
                      front_right_cell(f,(len(f|k))-'1,G) = cell(G,i2-'1,
                      j2-'1 ) by A2,A39,A38,A41,A45,A46,A47,A58,GOBRD13:41;
                      then left_cell(f,m,G) misses C by A2,A18,A8,A19,A16,A40
,A46,A47,A48,A50,A59,GOBRD13:25;
                      hence left_cell(f|(k+1),m,G) misses C by A2,A18,A19,A16
,A40,GOBRD13:31;
                      cell(G,i2-'1,j2) meets C by A2,A39,A38,A41,A45,A46,A47
,A44,A58,GOBRD13:28;
                      then right_cell(f,m,G) meets C by A2,A18,A8,A19,A16,A40
,A46,A47,A48,A59,GOBRD13:26;
                      hence right_cell(f|(k+1),m,G) meets C by A2,A18,A19,A16
,A40,GOBRD13:31;
                    end;
                  end;
                  hence thesis;
                end;
                suppose
A60:              front_left_cell(f,(len(f|k))-'1,G) misses C &
                  front_right_cell(f,(len(f|k))-'1,G) meets C;
                  then
A61:              f goes_straight (len(f|k))-'1,G by A1,A18,A8,A39,A43,Def1;
                  now
                    per cases by A38,A45,A46,A47,A61;
                    suppose that
A62:                  i1 = i2 & j1+1 = j2 and
A63:                  [i2,j2+1] in Indices G & f/.(len(f|k)+1) = G*( i2,j2+1);
                      front_left_cell(f,(len(f|k))-'1,G) = cell(G,i1-'1,
                      j2) by A2,A39,A38,A41,A45,A46,A47,A62,GOBRD13:34;
                      then left_cell(f,m,G) misses C by A2,A18,A8,A19,A16,A40
,A46,A47,A60,A62,A63,GOBRD13:21;
                      hence left_cell(f|(k+1),m,G) misses C by A2,A18,A19,A16
,A40,GOBRD13:31;
                      front_right_cell(f,(len(f|k))-'1,G) = cell(G,i1,j2
                      ) by A2,A39,A38,A41,A45,A46,A47,A62,GOBRD13:35;
                      then right_cell(f,m,G) meets C by A2,A18,A8,A19,A16,A40
,A46,A47,A60,A62,A63,GOBRD13:22;
                      hence right_cell(f|(k+1),m,G) meets C by A2,A18,A19,A16
,A40,GOBRD13:31;
                    end;
                    suppose that
A64:                  i1+1 = i2 & j1 = j2 and
A65:                  [i2+1,j2] in Indices G & f/.(len(f|k)+1) = G*( i2+1,j2);
                      front_left_cell(f,(len(f|k))-'1,G) = cell(G,i2,j2)
                      by A2,A39,A38,A41,A45,A46,A47,A64,GOBRD13:36;
                      then left_cell(f,m,G) misses C by A2,A18,A8,A19,A16,A40
,A46,A47,A60,A65,GOBRD13:23;
                      hence left_cell(f|(k+1),m,G) misses C by A2,A18,A19,A16
,A40,GOBRD13:31;
                      front_right_cell(f,(len(f|k))-'1,G) = cell(G,i2,j2
                      -'1) by A2,A39,A38,A41,A45,A46,A47,A64,GOBRD13:37;
                      then right_cell(f,m,G) meets C by A2,A18,A8,A19,A16,A40
,A46,A47,A60,A65,GOBRD13:24;
                      hence right_cell(f|(k+1),m,G) meets C by A2,A18,A19,A16
,A40,GOBRD13:31;
                    end;
                    suppose that
A66:                  i1 = i2+1 & j1 = j2 and
A67:                  [i2-'1,j2] in Indices G & f/.(len(f|k)+1) = G*
                      (i2-'1,j2);
                      front_left_cell(f,(len(f|k))-'1,G) = cell(G,i2-'1,
                      j2-'1) by A2,A39,A38,A41,A45,A46,A47,A66,GOBRD13:38;
                      then left_cell(f,m,G) misses C by A2,A18,A8,A19,A16,A40
,A46,A47,A48,A60,A67,GOBRD13:25;
                      hence left_cell(f|(k+1),m,G) misses C by A2,A18,A19,A16
,A40,GOBRD13:31;
                      front_right_cell(f,(len(f|k))-'1,G) = cell(G,i2-'1
                      ,j2) by A2,A39,A38,A41,A45,A46,A47,A66,GOBRD13:39;
                      then right_cell(f,m,G) meets C by A2,A18,A8,A19,A16,A40
,A46,A47,A48,A60,A67,GOBRD13:26;
                      hence right_cell(f|(k+1),m,G) meets C by A2,A18,A19,A16
,A40,GOBRD13:31;
                    end;
                    suppose that
A68:                  i1 = i2 & j1 = j2+1 and
A69:                  [i2,j2-'1] in Indices G & f/.(len(f|k)+1) = G*
                      (i2,j2-'1);
                      front_left_cell(f,(len(f|k))-'1,G) = cell(G,i2,j2
                      -'1) by A2,A39,A38,A41,A45,A46,A47,A68,GOBRD13:40;
                      then left_cell(f,m,G) misses C by A2,A18,A8,A19,A16,A40
,A46,A47,A49,A60,A69,GOBRD13:27;
                      hence left_cell(f|(k+1),m,G) misses C by A2,A18,A19,A16
,A40,GOBRD13:31;
                      front_right_cell(f,(len(f|k))-'1,G) = cell(G,i2-'1
                      ,j2-'1 ) by A2,A39,A38,A41,A45,A46,A47,A68,GOBRD13:41;
                      then right_cell(f,m,G) meets C by A2,A18,A8,A19,A16,A40
,A46,A47,A49,A60,A69,GOBRD13:28;
                      hence right_cell(f|(k+1),m,G) meets C by A2,A18,A19,A16
,A40,GOBRD13:31;
                    end;
                  end;
                  hence thesis;
                end;
                suppose
A70:              front_left_cell(f,(len(f|k))-'1,G) meets C;
                  then
A71:              f turns_left (len(f|k))-'1,G by A1,A18,A8,A39,A43,Def1;
                  now
                    per cases by A38,A45,A46,A47,A71;
                    suppose that
A72:                  i1 = i2 & j1+1 = j2 and
A73:                  [i2-'1,j2] in Indices G & f/.(len(f|k)+1) = G*
                      (i2-'1,j2);
                      j2-'1 = j1 & cell(G,i1-'1,j1) misses C by A2,A39,A38,A41
,A45,A46,A47,A42,A72,GOBRD13:21,NAT_D:34;
                      then left_cell(f,m,G) misses C by A2,A18,A8,A19,A16,A40
,A46,A47,A48,A72,A73,GOBRD13:25;
                      hence left_cell(f|(k+1),m,G) misses C by A2,A18,A19,A16
,A40,GOBRD13:31;
                      front_left_cell(f,(len(f|k))-'1,G) = cell(G,i1-'1,
                      j2) by A2,A39,A38,A41,A45,A46,A47,A72,GOBRD13:34;
                      then right_cell(f,m,G) meets C by A2,A18,A8,A19,A16,A40
,A46,A47,A48,A70,A72,A73,GOBRD13:26;
                      hence right_cell(f|(k+1),m,G) meets C by A2,A18,A19,A16
,A40,GOBRD13:31;
                    end;
                    suppose that
A74:                  i1+1 = i2 & j1 = j2 and
A75:                  [i2,j2+1] in Indices G & f/.(len(f|k)+1) = G*( i2,j2+1);
                      i2-'1 = i1 & cell(G,i1,j1) misses C by A2,A39,A38,A41,A45
,A46,A47,A42,A74,GOBRD13:23,NAT_D:34;
                      then left_cell(f,m,G) misses C by A2,A18,A8,A19,A16,A40
,A46,A47,A74,A75,GOBRD13:21;
                      hence left_cell(f|(k+1),m,G) misses C by A2,A18,A19,A16
,A40,GOBRD13:31;
                      front_left_cell(f,(len(f|k))-'1,G) = cell(G,i2,j2)
                      by A2,A39,A38,A41,A45,A46,A47,A74,GOBRD13:36;
                      then right_cell(f,m,G) meets C by A2,A18,A8,A19,A16,A40
,A46,A47,A70,A75,GOBRD13:22;
                      hence right_cell(f|(k+1),m,G) meets C by A2,A18,A19,A16
,A40,GOBRD13:31;
                    end;
                    suppose that
A76:                  i1 = i2+1 & j1 = j2 and
A77:                  [i2,j2-'1] in Indices G & f/.(len(f|k)+1) = G*
                      (i2,j2-'1);
                      cell(G,i2,j2-'1) misses C by A2,A39,A38,A41,A45,A46,A47
,A42,A76,GOBRD13:25;
                      then left_cell(f,m,G) misses C by A2,A18,A8,A19,A16,A40
,A46,A47,A49,A77,GOBRD13:27;
                      hence left_cell(f|(k+1),m,G) misses C by A2,A18,A19,A16
,A40,GOBRD13:31;
                      front_left_cell(f,(len(f|k))-'1,G) = cell(G,i2-'1,
                      j2-'1) by A2,A39,A38,A41,A45,A46,A47,A76,GOBRD13:38;
                      then right_cell(f,m,G) meets C by A2,A18,A8,A19,A16,A40
,A46,A47,A49,A70,A77,GOBRD13:28;
                      hence right_cell(f|(k+1),m,G) meets C by A2,A18,A19,A16
,A40,GOBRD13:31;
                    end;
                    suppose that
A78:                  i1 = i2 & j1 = j2+1 and
A79:                  [i2+1,j2] in Indices G & f/.(len(f|k)+1) = G*( i2+1,j2);
                      cell(G,i2,j2) misses C by A2,A39,A38,A41,A45,A46,A47,A42
,A78,GOBRD13:27;
                      then left_cell(f,m,G) misses C by A2,A18,A8,A19,A16,A40
,A46,A47,A79,GOBRD13:23;
                      hence left_cell(f|(k+1),m,G) misses C by A2,A18,A19,A16
,A40,GOBRD13:31;
                      front_left_cell(f,(len(f|k))-'1,G) = cell(G,i2,j2
                      -'1) by A2,A39,A38,A41,A45,A46,A47,A78,GOBRD13:40;
                      then right_cell(f,m,G) meets C by A2,A18,A8,A19,A16,A40
,A46,A47,A70,A79,GOBRD13:24;
                      hence right_cell(f|(k+1),m,G) meets C by A2,A18,A19,A16
,A40,GOBRD13:31;
                    end;
                  end;
                  hence thesis;
                end;
              end;
              hence thesis;
            end;
            suppose
              m+1 <> len(f|(k+1));
              then m+1 < len(f|(k+1)) by A17,XXREAL_0:1;
              then
A80:          m+1 <= len(f|k)by A8,A19,NAT_1:13;
              then consider i1,j1,i2,j2 being Nat such that
A81:          [i1,j1] in Indices G and
A82:          (f|k)/.m = G*(i1,j1) and
A83:          [i2,j2] in Indices G and
A84:          (f|k)/.(m+1) = G*(i2,j2) and
A85:          i1 = i2 & j1+1 = j2 or i1+1 = i2 & j1 = j2 or i1 = i2+
              1 & j1 = j2 or i1 = i2 & j1 = j2+1 by A10,A16,JORDAN8:3;
A86:          left_cell(f|k,m,G) misses C & right_cell(f|k,m,G) meets C
              by A6,A16,A80;
A87:          f|(k+1) = (f|k)^<*f/.(k+1)*> by A18,FINSEQ_5:82;
              1 <= m+1 by NAT_1:12;
              then m+1 in dom(f|k) by A80,FINSEQ_3:25;
              then
A88:          (f|(k+1))/.(m+1) = G*(i2,j2) by A84,A87,FINSEQ_4:68;
              m <= len(f|k) by A80,NAT_1:13;
              then m in dom(f|k) by A16,FINSEQ_3:25;
              then
A89:          (f|(k+1))/.m = G*(i1,j1) by A82,A87,FINSEQ_4:68;
              now
                per cases by A85;
                suppose
A90:              i1 = i2 & j1+1 = j2;
                  then left_cell(f|k,m,G) = cell(G,i1-'1,j1) & right_cell(f|k
,m,G) = cell(G,i1,j1) by A10,A16,A80,A81,A82,A83,A84,GOBRD13:21,22;
                  hence thesis by A11,A16,A17,A81,A83,A86,A89,A88,A90,
GOBRD13:21,22;
                end;
                suppose
A91:              i1+1 = i2 & j1 = j2;
                  then left_cell(f|k,m,G) = cell(G,i1,j1) & right_cell(f|k,m,
G) = cell(G,i1,j1-'1) by A10,A16,A80,A81,A82,A83,A84,GOBRD13:23,24;
                  hence thesis by A11,A16,A17,A81,A83,A86,A89,A88,A91,
GOBRD13:23,24;
                end;
                suppose
A92:              i1 = i2+1 & j1 = j2;
                  then left_cell(f|k,m,G) = cell(G,i2,j2-'1) & right_cell(f|k
,m,G) = cell(G,i2,j2) by A10,A16,A80,A81,A82,A83,A84,GOBRD13:25,26;
                  hence thesis by A11,A16,A17,A81,A83,A86,A89,A88,A92,
GOBRD13:25,26;
                end;
                suppose
A93:              i1 = i2 & j1 = j2+1;
                  then left_cell(f|k,m,G) = cell(G,i2,j2) & right_cell(f|k,m,
G) = cell(G,i1-'1,j2) by A10,A16,A80,A81,A82,A83,A84,GOBRD13:27,28;
                  hence thesis by A11,A16,A17,A81,A83,A86,A89,A88,A93,
GOBRD13:27,28;
                end;
              end;
              hence thesis;
            end;
          end;
          hence thesis;
        end;
      end;
      hence thesis;
    end;
  end;
A94: f|len f = f by FINSEQ_1:58;
A95: P[0] by CARD_1:27;
  for k being Nat holds P[k] from NAT_1:sch 2(A95,A5);
  hence thesis by A94;
end;

theorem
  C is connected implies
 for n being Nat holds N-min L~Cage(C,n) = (Cage(C,n))/.1
proof
  assume
A1: C is connected;
  let n be Nat;
  set f = Cage(C,n);
A2: for k being Nat st 1 <= k & k+1 <= len f
  holds left_cell(f,k,Gauge(C,n)) misses C
  & right_cell(f,k,Gauge(C,n)) meets C by A1,Th31;
  f is_sequence_on Gauge(C,n) &
  ex i being Nat st 1 <= i & i+1 <= len Gauge(C,n ) &
f/.1 = Gauge(C,n)*(i,width Gauge(C,n)) & f/.2 = Gauge(C,n)*(i+1,width Gauge(C,n
)) & N-min C in cell(Gauge( C,n),i,width Gauge(C,n)-'1) & N-min C <> Gauge(C,n)
  *(i, width Gauge(C,n)-'1) by A1,Def1;
  hence thesis by A2,Th30;
end;