
theorem Th1:
  for p,q being non empty increasing FinSequence of REAL st
  p.len(p) < q.1 holds p ^ q is non empty increasing FinSequence of REAL
  proof
    let p,q be non empty increasing FinSequence of REAL;
    assume
A1: p.len(p) < q.1;
    set pq = p ^ q;
    now
      let e1,e2 be ExtReal;
      assume that
A2:   e1 in dom pq and
A3:   e2 in dom pq and
A4:   e1 < e2;
      per cases by A2,A3,FINSEQ_1:25;
      suppose
A5:     e1 in dom p & e2 in dom p; then
A6:     pq.e1 = p.e1 & pq.e2 = p.e2 by FINSEQ_1:def 7;
        e1 < e2 & p is increasing by A4;
        hence pq.e1 < pq.e2 by A5,A6;
      end;
      suppose
A7:     e1 in dom p & ex n be Nat st n in dom q &
        e2 = len p + n;
        then consider n0 be Nat such that
A8:     n0 in dom q and
A9:     e2 = len p + n0;
A10:    pq.e1 = p.e1 & pq.e2 = q.n0 by A7,A9,FINSEQ_1:def 7;
        rng q <> {}; then
A11:    1 in dom q by FINSEQ_3:32;
        1 <= n0 by A8,FINSEQ_3:25;
        then 1 = n0 or 1 < n0 by XXREAL_0:1; then
A12:    q.1 <= q.n0 by A8,A11,VALUED_0:def 13;
        rng p <> {};
        then 1 in dom p by FINSEQ_3:32;
        then 1 <= len p by FINSEQ_3:25; then
A13:    len p in dom p by FINSEQ_3:25;
        e1 <= len p by A7,FINSEQ_3:25;
        then e1 < len p or e1 = len p by XXREAL_0:1;
        then p.e1 <= p.len p by A13,A7,VALUED_0:def 13;
        then p.e1 < q.1 by A1,XXREAL_0:2;
        hence pq.e1 < pq.e2 by A10,A12,XXREAL_0:2;
      end;
      suppose
A14:    (ex n be Nat st n in dom q & e1 = len p + n) & e2 in dom p;
        then consider n0 be Nat such that
        n0 in dom q and
A15:    e1 = len p + n0;
A16:    len p <= e1 by A15,NAT_1:11;
        e2 in Seg len p by A14,FINSEQ_1:def 3;
        then e2 <= len p by FINSEQ_1:1;
        hence pq.e1 < pq.e2 by A4,A16,XXREAL_0:2;
      end;
      suppose
A17:   (ex n be Nat st n in dom q & e1 = len p + n) &
       (ex n be Nat st n in dom q & e2 = len p + n);
       then consider n1 be Nat such that
A18:   n1 in dom q and
A19:   e1 = len p + n1;
       consider n2 be Nat such that
A20:   n2 in dom q and
A21:   e2 = len p + n2 by A17;
A22:   len p + n1 - len p < len p + n2 - len p by A4,A19,A21,XREAL_1:14;
       q.n1 = pq.e1 & q.n2 = pq.e2 by A18,A19,A20,A21,FINSEQ_1:def 7;
       hence pq.e1 < pq.e2 by A22,A18,A20,VALUED_0:def 13;
     end;
   end;
   then p ^ q is increasing;
   hence thesis;
 end;
