reserve p,p1,p2,q1,q2 for Point of TOP-REAL 2,
  P1,P2 for Subset of TOP-REAL 2,
  f,f1,f2,g1,g2 for FinSequence of TOP-REAL 2,
  n,m,i,j,k for Nat,
  G,G1 for Go-board,
  x,y for set;

theorem Th4:
  for f1,f2 being FinSequence of TOP-REAL 2 st 2<=len f1 & 2<=len
  f2 & f1 is special & f2 is special & (for n st n in dom f1 & n+1 in dom f1
  holds f1/.n <> f1/.(n+1)) & (for n st n in dom f2 & n+1 in dom f2 holds f2/.n
<> f2/.(n+1)) & X_axis(f1) lies_between (X_axis(f1)).1, (X_axis(f1)).(len f1) &
  X_axis(f2) lies_between (X_axis(f1)).1, (X_axis(f1)).(len f1) & Y_axis(f1)
lies_between (Y_axis(f2)).1, (Y_axis(f2)).(len f2) & Y_axis(f2) lies_between (
  Y_axis(f2)).1, (Y_axis(f2)).(len f2) holds L~f1 meets L~f2
proof
  let f1,f2 be FinSequence of TOP-REAL 2;
  assume that
A1: 2<=len f1 and
A2: 2<=len f2 and
A3: f1 is special and
A4: f2 is special and
A5: for n st n in dom f1 & n+1 in dom f1 holds f1/.n <> f1/.(n+1) and
A6: for n st n in dom f2 & n+1 in dom f2 holds f2/.n <> f2/.(n+1) and
A7: X_axis(f1) lies_between (X_axis(f1)).1, (X_axis(f1)).(len f1) and
A8: X_axis(f2) lies_between (X_axis(f1)).1, (X_axis(f1)).(len f1) and
A9: Y_axis(f1) lies_between (Y_axis(f2)).1, (Y_axis(f2)).(len f2) and
A10: Y_axis(f2) lies_between (Y_axis(f2)).1, (Y_axis(f2)).(len f2);
  len f1 <> 0 & len f2 <> 0 by A1,A2;
  then reconsider f1, f2 as non empty FinSequence of TOP-REAL 2;
  reconsider f = f1^f2 as non empty FinSequence of TOP-REAL 2;
A11: Seg len f2=dom f2 by FINSEQ_1:def 3;
  reconsider p1=f1/.1, p2=f1/.len f1, q1=f2/.1, q2=f2/.len f2 as Point of
  TOP-REAL 2;
  set x = X_axis(f), y = Y_axis(f), x1 = X_axis(f1), y1 = Y_axis(f1), x2 =
  X_axis(f2), y2 = Y_axis(f2);
A12: Seg len f1=dom f1 by FINSEQ_1:def 3;
A13: 1<=len f1 by A1,XXREAL_0:2;
  then
A14: 1 in dom f1 by FINSEQ_3:25;
  then
A15: f/.1=f1/.1 by FINSEQ_4:68;
A16: Seg len f=dom f by FINSEQ_1:def 3;
  set G = GoB(f);
A17: dom x = Seg len x & len x = len f by FINSEQ_1:def 3,GOBOARD1:def 1;
A18: Seg len x2=dom x2 & len x2=len f2 by FINSEQ_1:def 3,GOBOARD1:def 1;
A19: len f = len f1 + len f2 by FINSEQ_1:22;
A20: Seg len x1=dom x1 & len x1=len f1 by FINSEQ_1:def 3,GOBOARD1:def 1;
  then
A21: x1.1=p1`1 by A12,A14,GOBOARD1:def 1;
A22: now
    let m;
    set s = x.m;
    assume
A23: m in dom f;
    then
A24: m<=len f by FINSEQ_3:25;
A25: 1<=m by A23,FINSEQ_3:25;
    now
      per cases;
      suppose
A26:    m<=len f1;
        reconsider u=f1/.m as Point of TOP-REAL 2;
A27:    m in dom f1 by A25,A26,FINSEQ_3:25;
        then f/.m=u by FINSEQ_4:68;
        then
A28:    x.m=u`1 by A16,A17,A23,GOBOARD1:def 1;
        x1.m=u`1 by A12,A20,A27,GOBOARD1:def 1;
        hence p1`1<=s by A7,A12,A20,A21,A27,A28;
      end;
      suppose
A29:    len f1<m;
        then reconsider w5 = m-len f1 as Element of NAT by INT_1:5;
        w5 > 0 by A29,XREAL_1:50;
        then
A30:    1<=w5 by NAT_1:14;
A31:    m = w5 + len f1;
        then reconsider m1=m-len f1 as Nat;
        reconsider u=f2/.m1 as Point of TOP-REAL 2;
A32:    w5<=len f2 by A19,A24,A31,XREAL_1:6;
        then f/.m = f2/.w5 by A31,A30,SEQ_4:136;
        then
A33:    x.m=u`1 by A16,A17,A23,GOBOARD1:def 1;
A34:    m1 in dom f2 by A30,A32,FINSEQ_3:25;
        then x2.m1=u`1 by A11,A18,GOBOARD1:def 1;
        hence p1`1<=s by A8,A11,A18,A21,A34,A33;
      end;
    end;
    hence p1`1<=s;
  end;
  len f = len f1 + len f2 by FINSEQ_1:22;
  then 2+2<=len f by A1,A2,XREAL_1:7;
  then 1<=len f by XXREAL_0:2;
  then
A35: 1 in dom f by FINSEQ_3:25;
  then x.1=p1`1 by A16,A17,A15,GOBOARD1:def 1;
  then
A36: f/.1 in rng Line(G,1) by A35,A22,GOBOARD2:15;
A37: len f1 in dom f1 by A13,FINSEQ_3:25;
  then
A38: f/.len f1=f1/.len f1 by FINSEQ_4:68;
A39: x1.(len f1) = p2`1 by A12,A20,A37,GOBOARD1:def 1;
A40: now
    let m;
    set s = x.m;
    assume
A41: m in dom f;
    then
A42: m<=len f by FINSEQ_3:25;
A43: 1<=m by A41,FINSEQ_3:25;
    now
      per cases;
      suppose
A44:    m<=len f1;
        reconsider u=f1/.m as Point of TOP-REAL 2;
A45:    m in dom f1 by A43,A44,FINSEQ_3:25;
        then f/.m=u by FINSEQ_4:68;
        then
A46:    x.m=u`1 by A16,A17,A41,GOBOARD1:def 1;
        x1.m=u`1 by A12,A20,A45,GOBOARD1:def 1;
        hence s<=p2`1 by A7,A12,A20,A39,A45,A46;
      end;
      suppose
A47:    len f1<m;
        then reconsider w5 = m-len f1 as Element of NAT by INT_1:5;
        w5 > 0 by A47,XREAL_1:50;
        then
A48:    1<=w5 by NAT_1:14;
A49:    m = w5 + len f1;
        then reconsider m1=m-len f1 as Nat;
        reconsider u=f2/.m1 as Point of TOP-REAL 2;
A50:    w5<=len f2 by A19,A42,A49,XREAL_1:6;
        then f/.m = f2/.w5 by A49,A48,SEQ_4:136;
        then
A51:    x.m=u`1 by A16,A17,A41,GOBOARD1:def 1;
A52:    m1 in dom f2 by A48,A50,FINSEQ_3:25;
        then x2.m1=u`1 by A11,A18,GOBOARD1:def 1;
        hence s<=p2`1 by A8,A11,A18,A39,A52,A51;
      end;
    end;
    hence s<=p2`1;
  end;
A53: dom f1 c= dom f by FINSEQ_1:26;
  then x.(len f1) = p2`1 by A16,A17,A37,A38,GOBOARD1:def 1;
  then
A54: f/.len f1 in rng Line(G,len G) by A53,A37,A40,GOBOARD2:16;
  now
    let n;
    assume
A55: n in dom f1;
    dom f1 c= dom f by FINSEQ_1:26;
    then consider i,j such that
A56: [i,j] in Indices G & f/.n=G*(i,j) by A55,GOBOARD2:14;
    take i,j;
    thus [i,j] in Indices G & f1/.n=G*(i,j) by A55,A56,FINSEQ_4:68;
  end;
  then consider g1 such that
A57: g1 is_sequence_on G & L~g1=L~f1 & g1/.1=f1/.1 & g1/.len g1=f1/.len f1 and
A58: len f1 <= len g1 by A3,A5,GOBOARD2:12;
  now
    let n;
    assume
A59: n in dom f2;
    then len f1+n in dom f by FINSEQ_1:28;
    then consider i,j such that
A60: [i,j] in Indices G & f/.(len f1+n)=G*(i,j) by GOBOARD2:14;
    take i,j;
    thus [i,j] in Indices G & f2/.n=G*(i,j) by A59,A60,FINSEQ_4:69;
  end;
  then consider g2 such that
A61: g2 is_sequence_on G & L~g2=L~f2 & g2/.1=f2/.1 & g2/.len g2=f2/.len f2 and
A62: len f2 <= len g2 by A4,A6,GOBOARD2:12;
A63: 2<=len g2 by A2,A62,XXREAL_0:2;
A64: 1<=len f2 by A2,XXREAL_0:2;
  then
A65: 1 in dom f2 by FINSEQ_3:25;
  then
A66: f/.(len f1+1)=f2/.1 by FINSEQ_4:69;
A67: Seg len y = dom y & len y = len f by FINSEQ_1:def 3,GOBOARD1:def 2;
A68: Seg len y1=dom y1 & len y1=len f1 by FINSEQ_1:def 3,GOBOARD1:def 2;
A69: Seg len y2=dom y2 & len y2=len f2 by FINSEQ_1:def 3,GOBOARD1:def 2;
  then
A70: y2.1=q1`2 by A11,A65,GOBOARD1:def 2;
A71: now
    let m;
    set s = y.m;
    assume
A72: m in dom f;
    then
A73: m<=len f by FINSEQ_3:25;
A74: 1<=m by A72,FINSEQ_3:25;
    now
      per cases;
      suppose
A75:    m<=len f1;
        reconsider u=f1/.m as Point of TOP-REAL 2;
A76:    m in dom f1 by A74,A75,FINSEQ_3:25;
        then f/.m=u by FINSEQ_4:68;
        then
A77:    y.m=u`2 by A16,A67,A72,GOBOARD1:def 2;
        y1.m=u`2 by A12,A68,A76,GOBOARD1:def 2;
        hence q1`2<=s by A9,A12,A68,A70,A76,A77;
      end;
      suppose
A78:    len f1<m;
        then reconsider w5 = m-len f1 as Element of NAT by INT_1:5;
        w5 > 0 by A78,XREAL_1:50;
        then
A79:    1<=w5 by NAT_1:14;
A80:    m = w5 + len f1;
        then reconsider m1=m-len f1 as Nat;
        reconsider u=f2/.m1 as Point of TOP-REAL 2;
A81:    w5<=len f2 by A19,A73,A80,XREAL_1:6;
        then f/.m = f2/.w5 by A80,A79,SEQ_4:136;
        then
A82:    y.m=u`2 by A16,A67,A72,GOBOARD1:def 2;
A83:    m1 in dom f2 by A79,A81,FINSEQ_3:25;
        then y2.m1=u`2 by A11,A69,GOBOARD1:def 2;
        hence q1`2<=s by A10,A11,A69,A70,A83,A82;
      end;
    end;
    hence q1`2<=s;
  end;
A84: len f1+1 in dom f by A65,FINSEQ_1:28;
  then y.(len f1+1)=q1`2 by A16,A67,A66,GOBOARD1:def 2;
  then
A85: f/.(len f1+1) in rng Col(G,1) by A84,A71,GOBOARD2:17;
A86: len f2 in dom f2 by A64,FINSEQ_3:25;
  then
A87: f/.(len f1+len f2)=f2/.len f2 by FINSEQ_4:69;
A88: y2.(len f2)=q2`2 by A11,A69,A86,GOBOARD1:def 2;
A89: now
    let m;
    set s = y.m;
    assume
A90: m in dom f;
    then
A91: m<=len f by FINSEQ_3:25;
A92: 1<=m by A90,FINSEQ_3:25;
    now
      per cases;
      suppose
A93:    m<=len f1;
        reconsider u=f1/.m as Point of TOP-REAL 2;
A94:    m in dom f1 by A92,A93,FINSEQ_3:25;
        then f/.m=u by FINSEQ_4:68;
        then
A95:    y.m=u`2 by A16,A67,A90,GOBOARD1:def 2;
        y1.m=u`2 by A12,A68,A94,GOBOARD1:def 2;
        hence s<=q2`2 by A9,A12,A68,A88,A94,A95;
      end;
      suppose
A96:    len f1<m;
        then reconsider w5 = m-len f1 as Element of NAT by INT_1:5;
        w5 > 0 by A96,XREAL_1:50;
        then
A97:    1<=w5 by NAT_1:14;
A98:    m = w5 + len f1;
        then reconsider m1=m-len f1 as Nat;
        reconsider u=f2/.m1 as Point of TOP-REAL 2;
A99:    w5<=len f2 by A19,A91,A98,XREAL_1:6;
        then f/.m = f2/.w5 by A98,A97,SEQ_4:136;
        then
A100:   y.m=u`2 by A16,A67,A90,GOBOARD1:def 2;
A101:   m1 in dom f2 by A97,A99,FINSEQ_3:25;
        then y2.m1=u`2 by A11,A69,GOBOARD1:def 2;
        hence s<=q2`2 by A10,A11,A69,A88,A101,A100;
      end;
    end;
    hence s<=q2`2;
  end;
A102: len f1+len f2 in dom f by A86,FINSEQ_1:28;
  then y.(len f1+len f2)=q2`2 by A16,A67,A87,GOBOARD1:def 2;
  then
A103: f/.(len f1+len f2) in rng Col(G,width G) by A102,A89,GOBOARD2:18;
  2<=len g1 by A1,A58,XXREAL_0:2;
  hence thesis by A57,A61,A15,A38,A66,A87,A36,A54,A85,A103,A63,Th2;
end;
