reserve p for Point of TOP-REAL 2,
  f,f1,f2,g for FinSequence of TOP-REAL 2,
  v, v1,v2 for FinSequence of REAL,
  r,s for Real,
  n,m,i,j,k for Nat,
  x for set;
reserve G for Go-board;
reserve D for set,
  f for FinSequence of D,
  M for Matrix of D;
reserve f for FinSequence of TOP-REAL 2;

theorem Th26:
  1<=len f & f/.1 in rng Col(G,1) & f/.len f in rng Col(G,width G)
& f is_sequence_on G implies (for i st 1<=i & i<=width G holds ex k st k in dom
  f & f/.k in rng Col(G,i)) & (for i st 1<=i & i<=width G & 2<=len f holds L~f
meets rng Col(G,i)) & for i,j,k,m st 1<=i & i<=width G & 1<=j & j<=width G & k
  in dom f & m in dom f & f/.k in rng Col(G,i) & (for n st n in dom f & f/.n in
  rng Col(G,i) holds n<=k) & k<m & f/.m in rng Col(G,j) holds i<j
proof
  assume that
A1: 1<=len f and
A2: f/.1 in rng Col(G,1) and
A3: f/.len f in rng Col(G,width G) and
A4: f is_sequence_on G;
A5: len f in dom f by A1,FINSEQ_3:25;
  defpred P[Nat] means
1<=$1 & $1<=width G implies ex k st k in dom
  f & f/.k in rng Col(G,$1);
A6: for k st P[k] holds P[k+1]
  proof
    let k;
    assume
A7: 1<=k & k<=width G implies ex i st i in dom f & f/.i in rng Col(G,k );
    assume that
A8: 1<=k+1 and
A9: k+1<=width G;
A10: k+1 in Seg width G by A8,A9,FINSEQ_1:1;
    per cases;
    suppose
A11:  k=0;
      take 1;
      thus thesis by A1,A2,A11,FINSEQ_3:25;
    end;
    suppose
A12:  k<>0;
      defpred R[Nat] means $1 in dom f & f/.$1 in rng Col(G,k);
A13:  for i be Nat holds R[i] implies i<=len f by FINSEQ_3:25;
A14:  0+1<=k by A12,NAT_1:13;
      then
A15:  ex i be Nat st R[i] by A7,A9,NAT_1:13;
      consider m be Nat such that
A16:  R[m] & for i be Nat st R[i] holds i<=m from NAT_1:sch 6(A13,A15
      );
      take m+1;
      k<=width G by A9,NAT_1:13;
      then
A17:  k in Seg width G by A14,FINSEQ_1:1;
      thus thesis by A1,A3,A4,A10,A17,A16,Th25;
    end;
  end;
A18: P[0];
  thus
A19: for i holds P[i] from NAT_1:sch 2(A18,A6);
  thus for i st 1<=i & i<=width G & 2<=len f holds L~f meets rng Col(G,i)
  proof
    let i;
    assume that
A20: 1<=i & i<=width G and
A21: 2<=len f;
    consider k such that
A22: k in dom f and
A23: f/.k in rng Col(G,i) by A19,A20;
    f/.k in L~f by A21,A22,Th1;
    then L~f /\ rng Col(G,i) <> {} by A23,XBOOLE_0:def 4;
    hence thesis;
  end;
  let m,k,i,j;
  assume that
A24: 1<=m and
A25: m<=width G and
A26: 1<=k & k<=width G and
A27: i in dom f and
A28: j in dom f and
A29: f/.i in rng Col(G,m) and
A30: for n st n in dom f & f/.n in rng Col(G,m) holds n<=i and
A31: i<j and
A32: f/.j in rng Col(G,k);
A33: i<=len f & j<=len f by A27,A28,FINSEQ_3:25;
  now
    per cases;
    case
      m = width G;
      then len f<=i by A3,A5,A30;
      hence contradiction by A31,A33,XXREAL_0:1;
    end;
    case
      m <> width G;
      then m<width G by A25,XXREAL_0:1;
      then 1<=m+1 & m+1<=width G by NAT_1:11,13;
      then
A34:  m+1 in Seg width G by FINSEQ_1:1;
      reconsider l = j - i as Element of NAT by A31,INT_1:5;
      defpred P[set] means for n,l be Nat st n=$1 & n>0 & i+n in
      dom f & f/.(i+n) in rng Col(G,l) & l in Seg width G holds m<l;
A35:  k in Seg width G by A26,FINSEQ_1:1;
      m in Seg width G by A24,A25,FINSEQ_1:1;
      then
A36:  f/.(i+1) in rng Col(G,m+1) by A1,A3,A4,A27,A29,A30,A34,Th25;
A37:  for o be Nat st P[o] holds P[o+1]
      proof
        let o be Nat such that
A38:    P[o];
        let n,l be Nat such that
A39:    n=o+1 and
A40:    n>0 and
A41:    i+n in dom f and
A42:    f/.(i+n) in rng Col(G,l) and
A43:    l in Seg width G;
        now
          per cases;
          suppose
            o=0;
            then l=m+1 by A34,A36,A39,A42,A43,Th3;
            hence thesis by NAT_1:13;
          end;
          suppose
A44:        o<>0;
            1<=i by A27,FINSEQ_3:25;
            then
A45:        1<=i+o by NAT_1:12;
            i+n<=len f & i+o<=i+o+1 by A41,FINSEQ_3:25,NAT_1:12;
            then i+o<=len f by A39,XXREAL_0:2;
            then
A46:        i+o in dom f by A45,FINSEQ_3:25;
            then consider l1 be Nat such that
A47:        l1 in Seg width G and
A48:        f/.(i+o) in rng Col(G,l1) by A4,Th23;
A49:        m<l1 by A38,A44,A46,A47,A48;
A50:        i+n = i+o+1 by A39;
            now
              per cases by A4,A41,A50,A46,A47,A48,Th24;
              suppose
                f/.(i+n) in rng Col(G,l1);
                hence thesis by A42,A43,A47,A49,Th3;
              end;
              suppose
                for k st f/.(i+n) in rng Col(G,k) & k in Seg width G
                holds |.l1-k.| = 1;
                then
A51:            |.l1-l.| = 1 by A42,A43;
                now
                  per cases by A51,SEQM_3:41;
                  suppose
                    l1>l & l1=l+1;
                    then
A52:                m<=l by A49,NAT_1:13;
                    now
                      per cases by A52,XXREAL_0:1;
                      case
                        m=l;
                        then i+n<=i by A30,A41,A42;
                        then n<=i-i by XREAL_1:19;
                        hence contradiction by A40;
                      end;
                      case
                        m<l;
                        hence thesis;
                      end;
                    end;
                    hence thesis;
                  end;
                  suppose
                    l1<l & l=l1+1;
                    hence thesis by A49,XXREAL_0:2;
                  end;
                end;
                hence thesis;
              end;
            end;
            hence thesis;
          end;
        end;
        hence thesis;
      end;
A53:  P[0];
A54:  for o be Nat holds P[o] from NAT_1:sch 2(A53,A37);
      0< j - i & i+l = j by A31,XREAL_1:50;
      hence thesis by A28,A32,A54,A35;
    end;
  end;
  hence thesis;
end;
