reserve i,j,k,n,m for Nat;
reserve p,q for Point of TOP-REAL 2;
reserve G for Go-board;
reserve C for Subset of TOP-REAL 2;

theorem
  1 <= i & i < j implies for f being FinSequence of TOP-REAL 2 st j <=
  len f holds L~mid(f,i,j) = LSeg(f,i) \/ L~mid(f,i+1,j)
proof
  assume that
A1: 1 <= i and
A2: i < j;
  let f be FinSequence of TOP-REAL 2 such that
A3: j <= len f;
  set A = { LSeg(f,k): i <= k & k < j}, B = { LSeg(f,k): i+1 <= k & k < j};
A4: A = B \/ {LSeg(f,i)}
  proof
    thus A c= B \/ {LSeg(f,i)}
    proof
      let e be object;
      assume e in A;
      then consider k such that
A5:   e = LSeg(f,k) and
A6:   i <= k and
A7:   k < j;
      i = k or i < k by A6,XXREAL_0:1;
      then i = k or i+1 <= k by NAT_1:13;
      then e in B or e in {LSeg(f,i)} by A5,A7,TARSKI:def 1;
      hence thesis by XBOOLE_0:def 3;
    end;
    let e be object;
    assume
A8: e in B \/ {LSeg(f,i)};
    per cases by A8,XBOOLE_0:def 3;
    suppose
      e in B;
      then consider k such that
A9:   e = LSeg(f,k) and
A10:  i+1 <= k and
A11:  k < j;
      i < k by A10,NAT_1:13;
      hence thesis by A9,A11;
    end;
    suppose
      e in {LSeg(f,i)};
      then e = LSeg(f,i) by TARSKI:def 1;
      hence thesis by A2;
    end;
  end;
A12: 1 <= i+1 by NAT_1:11;
A13: i+1 <= j by A2,NAT_1:13;
  thus L~mid(f,i,j) = union A by A1,A2,A3,SPRECT_2:14
    .= union B \/ union{LSeg(f,i)} by A4,ZFMISC_1:78
    .= union B \/ LSeg(f,i) by ZFMISC_1:25
    .= LSeg(f,i) \/ L~mid(f,i+1,j) by A3,A12,A13,SPRECT_2:14;
end;
