reserve p,p1,p2,p3,p11,p22,q,q1,q2 for Point of TOP-REAL 2,
  f,h for FinSequence of TOP-REAL 2,
  r,r1,r2,s,s1,s2 for Real,
  u,u1,u2,u5 for Point of Euclid 2,
  n,m,i,j,k for Nat,
  N for Nat,
  x,y,z for set;
reserve lambda for Real;

theorem
  p`1 <> q`1 & p`2 <> q`2 & f = <* p,|[p`1,q`2]|,q *> implies f/.1 = p &
  f/.len f = q & f is being_S-Seq
proof
  set p1 = |[p`1,q`2]|;
  assume that
A1: p`1 <> q`1 and
A2: p`2 <> q`2 and
A3: f = <* p,p1,q *>;
A4: len f = 1 + 2 by A3,FINSEQ_1:45;
  hence f/.1 = p & f/.len f = q by A3,FINSEQ_4:18;
  p<>p1 & q<>p1 by A1,A2;
  hence f is one-to-one & len f>=2 by A1,A3,A4,FINSEQ_3:95;
A5: f/.2 = p1 by A3,FINSEQ_4:18;
A6: f/.3 = q by A3,FINSEQ_4:18;
A7: f/.1 = p by A3,FINSEQ_4:18;
  thus f is unfolded
  proof
    let i be Nat;
    assume that
A8: 1 <= i and
A9: i + 2 <= len f;
    i <= 1 by A4,A9,XREAL_1:6;
    then
A10: i = 1 by A8,XXREAL_0:1;
    hence LSeg(f,i) /\ LSeg(f,i+1) = LSeg(p,p1) /\ LSeg(f,2) by A4,A7,A5,
TOPREAL1:def 3
      .= LSeg(p,p1) /\ LSeg(p1,q) by A4,A5,A6,TOPREAL1:def 3
      .= {f/.(i+1)} by A5,A10,Th29;
  end;
  thus f is s.n.c.
  proof
    let i,j be Nat such that
A11: i+1 < j;
    now
      per cases;
      suppose
        i=0;
        then LSeg(f,i)={} by TOPREAL1:def 3;
        then LSeg(f,i) /\ LSeg(f,j) = {};
        hence thesis;
      end;
      suppose
        i<>0;
        then LSeg(f,j)={} by A3,A11,Th15;
        then LSeg(f,i) /\ LSeg(f,j) = {};
        hence thesis;
      end;
    end;
    hence thesis;
  end;
  let i be Nat such that
A12: 1 <= i and
A13: i + 1 <= len f;
 i <= 2 by A4,A13,XREAL_1:6;
  then i = 0 or ... or i = 2;
  then per cases by A12;
  suppose i=1;
    hence thesis by A7,A5;
  end;
  suppose i=2;
    hence thesis by A5,A6;
  end;
end;
