reserve P for Subset of TOP-REAL 2,
  f,f1,f2,g for FinSequence of TOP-REAL 2,
  p,p1,p2,q,q1,q2 for Point of TOP-REAL 2,
  r1,r2,r19,r29 for Real,
  i,j,k,n for Nat;

theorem Th36:
  f is s.n.c. & g is s.n.c. & L~f misses L~g & (for i st 1<=i & i+
  2 <= len f holds LSeg(f,i) misses LSeg(f/.len f,g/.1)) & (for i st 2<=i & i+1
  <= len g holds LSeg(g,i) misses LSeg(f/.len f,g/.1)) implies f^g is s.n.c.
proof
  assume that
A1: f is s.n.c. and
A2: g is s.n.c. and
A3: L~f /\ L~g = {} and
A4: for i st 1<=i & i+2<= len f holds LSeg(f,i) misses LSeg(f/.len f,g/. 1) and
A5: for i st 2<=i & i+1 <= len g holds LSeg(g,i) misses LSeg(f/.len f,g /.1);
  let i,j be Nat such that
A6: i+1 < j;
  per cases;
  suppose
A7: i = 0 or j+1 > len(f^g);
    now
      per cases by A7;
      case
        i = 0;
        hence LSeg(f^g,i) = {} by TOPREAL1:def 3;
      end;
      case
        j+1 > len(f^g);
        hence LSeg(f^g,j) = {} by TOPREAL1:def 3;
      end;
    end;
    then LSeg(f^g,i) /\ LSeg(f^g,j) = {};
    hence thesis;
  end;
  suppose that
A8: i <> 0 and
A9: j+1 <= len(f^g);
A10: len(f^g) = len f + len g by FINSEQ_1:22;
    i <= i+1 by NAT_1:11;
    then
A11: i < j by A6,XXREAL_0:2;
A12: 1 <= i by A8,NAT_1:14;
    now
      per cases;
      suppose
A13:    j+1 <= len f;
        j <= j+1 by NAT_1:11;
        then i < j+1 by A11,XXREAL_0:2;
        then i < len f by A13,XXREAL_0:2;
        then i+1 <= len f by NAT_1:13;
        then
A14:    LSeg(f^g,i) = LSeg(f,i) by Th6;
        LSeg(f^g,j) = LSeg(f,j) by A13,Th6;
        hence thesis by A1,A6,A14;
      end;
      suppose
        j+1 > len f;
        then
A15:    len f <= j by NAT_1:13;
        then reconsider j9 = j - len f as Element of NAT by INT_1:5;
        j+1-len f <= len g by A9,A10,XREAL_1:20;
        then
A16:    j9+1 <= len g;
A17:    len f + j9 = j;
        now
          per cases;
          suppose
A18:        i <= len f;
            then
A19:        f is non empty by A12;
            now
              per cases;
              suppose
A20:            i = len f;
                g is non empty by A16;
                then
A21:            LSeg(f^g,i) = LSeg(f/.len f,g/.1) by A19,A20,Th8;
                len f +1+1 <= j by A6,A20,NAT_1:13;
                then len f +(1+1) <= j;
                then
A22:            1+1 <= j9 by XREAL_1:19;
                then LSeg(f^g,j) = LSeg(g,j9) by A17,Th7,XXREAL_0:2;
                hence thesis by A5,A16,A22,A21;
              end;
              suppose
                i <> len f;
                then i < len f by A18,XXREAL_0:1;
                then i+1 <= len f by NAT_1:13;
                then
A23:            LSeg(f^g,i) = LSeg(f,i) by Th6;
                now
                  per cases;
                  suppose
A24:                j = len f;
                    then i+1+1 <= len f by A6,NAT_1:13;
                    then
A25:                i+(1+1) <= len f;
                    g is non empty by A9,A10,A24,XREAL_1:6;
                    then
A26:                LSeg(f^g,j) = LSeg(f/.len f,g/.1) by A19,A24,Th8;
                    thus thesis by A4,A8,A23,A25,A26,NAT_1:14;
                  end;
                  suppose
                    j <> len f;
                    then len f < j by A15,XXREAL_0:1;
                    then len f+1 <= j by NAT_1:13;
                    then 1 <= j9 by XREAL_1:19;
                    then LSeg(f^g,len f+j9) = LSeg(g,j9) by Th7;
                    then
A27:                LSeg(f^g,j) c= L~g by TOPREAL3:19;
                    LSeg(f^g,i) c= L~f by A23,TOPREAL3:19;
                    then LSeg(f^g,i) /\ LSeg(f^g,j) = {} by A3,A27,XBOOLE_1:3
,27;
                    hence thesis;
                  end;
                end;
                hence thesis;
              end;
            end;
            hence thesis;
          end;
          suppose
A28:        i > len f;
            then j <> len f by A6,NAT_1:13;
            then len f < j by A15,XXREAL_0:1;
            then len f+1 <= j by NAT_1:13;
            then 1 <= j9 by XREAL_1:19;
            then
A29:        LSeg(f^g,len f+j9) = LSeg(g,j9) by Th7;
            reconsider i9 = i - len f as Element of NAT by A28,INT_1:5;
            len f + 1 <= i by A28,NAT_1:13;
            then 1 <= i9 by XREAL_1:19;
            then
A30:        LSeg(f^g,len f+i9) = LSeg(g,i9) by Th7;
            i+1-len f < j9 by A6,XREAL_1:9;
            then i9+1 < j9;
            hence thesis by A2,A30,A29;
          end;
        end;
        hence thesis;
      end;
    end;
    hence thesis;
  end;
end;
