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
  k in dom G & f is_sequence_on G & f/.len f in rng Line(G,len G) & n in
  dom f & f/.n in rng Line(G,k) implies (for i st k<=i & i<=len G ex j st j in
  dom f & n<=j & f/.j in rng Line(G,i)) & for i st k<i & i<=len G ex j st j in
  dom f & n<j & f/.j in rng Line(G,i)
proof
  assume that
A1: k in dom G and
A2: f is_sequence_on G & f/.len f in rng Line(G,len G) and
A3: n in dom f and
A4: f/.n in rng Line(G,k);
  defpred P[Nat] means
k<=$1 & $1<=len G implies ex j st j in dom f
  & n<=j & f/.j in rng Line(G,$1);
A5: 1<=k by A1,FINSEQ_3:25;
A6: 1<=n & n<=len f by A3,FINSEQ_3:25;
A7: for i st P[i] holds P[i+1]
  proof
    let i such that
A8: P[i];
    assume that
A9: k<=i+1 and
A10: i+1<=len G;
      per cases by A9,XXREAL_0:1;
      suppose
A11:    k=i+1;
        take j=n;
        thus j in dom f & n<=j & f/.j in rng Line(G,i+1) by A3,A4,A11;
      end;
      suppose
A12:    k<i+1;
        then k<=i by NAT_1:13;
        then
A13:    1<=i by A5,XXREAL_0:2;
        i<=len G by A10,NAT_1:13;
        then
A14:    i in dom G by A13,FINSEQ_3:25;
        1<=i+1 by A5,A12,XXREAL_0:2;
        then
A15:    i+1 in dom G by A10,FINSEQ_3:25;
        defpred P[Nat] means $1 in dom f & n<=$1 & f/.$1 in rng Line(G,i);
A16:    for j be Nat st P[j] holds j<=len f by FINSEQ_3:25;
A17:    ex j be Nat st P[j] by A8,A10,A12,NAT_1:13;
        consider ma be Nat such that
A18:    P[ma] & for j be Nat st P[j] holds j<=ma from NAT_1:sch 6(A16
        ,A17 );
A19:    now
          let j such that
A20:      j in dom f & f/.j in rng Line(G,i);
          now
            per cases;
            suppose
              j<n;
              hence j<=ma by A18,XXREAL_0:2;
            end;
            suppose
              n<=j;
              hence j<=ma by A18,A20;
            end;
          end;
          hence j<=ma;
        end;
        take j=ma+1;
A21:    1<=len f by A6,XXREAL_0:2;
        hence j in dom f by A2,A14,A15,A18,A19,Th21;
        ma<=ma+1 by NAT_1:11;
        hence n<=j & f/.j in rng Line(G,i+1) by A2,A14,A15,A18,A21,A19,Th21,
XXREAL_0:2;
      end;
  end;
A22: P[0] by A1,FINSEQ_3:25;
  thus
A23: for i holds P[i] from NAT_1:sch 2(A22,A7);
  let i;
  assume that
A24: k<i and
A25: i<=len G;
  consider j such that
A26: j in dom f and
A27: n<=j and
A28: f/.j in rng Line(G,i) by A23,A24,A25;
  take j;
  thus j in dom f by A26;
  1<=i by A5,A24,XXREAL_0:2;
  then i in dom G by A25,FINSEQ_3:25;
  then n<>j by A1,A4,A24,A28,Th2;
  hence thesis by A27,A28,XXREAL_0:1;
end;
