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 Th25:
  p in LSeg(f,n) implies L~f = L~Ins(f,n,p)
proof
  set f1 = f|n, g1 = f1^<*p*>, f2 = f/^n;
A1: g1/.len g1 = g1/.(len f1 + 1) by FINSEQ_2:16
    .= p by FINSEQ_4:67;
  assume
A2: p in LSeg(f,n);
  then
A3: n+1 <= len f by TOPREAL1:def 3;
  then
A4: 1 <= len f - n by XREAL_1:19;
A5: n <= n+1 by NAT_1:11;
  then
A6: len f1 = n by A3,FINSEQ_1:59,XXREAL_0:2;
  then
A7: f1 is non empty by A2,TOPREAL1:def 3;
A8: 1 <= n by A2,TOPREAL1:def 3;
  then
A9: n in dom f1 by A6,FINSEQ_3:25;
  n <= len f by A3,A5,XXREAL_0:2;
  then 1 <= len f2 by A4,RFINSEQ:def 1;
  then
A10: 1 in dom f2 by FINSEQ_3:25;
A11: LSeg(f,n) = LSeg(f/.n,f/.(n+1)) by A8,A3,TOPREAL1:def 3
    .= LSeg(f1/.len f1,f/.(n+1)) by A6,A9,FINSEQ_4:70
    .= LSeg(f1/.len f1,f2/.1) by A10,FINSEQ_5:27;
  thus L~Ins(f,n,p) = L~(g1^f2) by FINSEQ_5:def 4
    .= L~g1 \/ LSeg(g1/.len g1,f2/.1) \/ L~f2 by A10,Th23,RELAT_1:38
    .= L~f1 \/ LSeg(f1/.len f1,p) \/ LSeg(g1/.len g1,f2/.1) \/ L~f2 by A9,Th19,
RELAT_1:38
    .= L~f1 \/ (LSeg(f1/.len f1,p) \/ LSeg(g1/.len g1,f2/.1)) \/ L~f2 by
XBOOLE_1:4
    .= L~f1 \/ LSeg(f1/.len f1,f2/.1) \/ L~f2 by A2,A1,A11,TOPREAL1:5
    .= L~(f1^f2) by A7,A10,Th23,RELAT_1:38
    .= L~f by RFINSEQ:8;
end;
