reserve k,n,n1,m,m1,m0,h,i,j for Nat,
  a,x,y,X,X1,X2,X3,X4,Y for set;
reserve L,L1,L2 for FinSequence;
reserve F,F1,G,G1,H for LTL-formula;
reserve W,W1,W2 for Subset of Subformulae H;
reserve v for LTL-formula;
reserve N,N1,N2,N10,N20,M for strict LTLnode over v;
reserve w for Element of Inf_seq(AtomicFamily);
reserve R1,R2 for Real_Sequence;

theorem Th36:
  L is_Finseq_for v & 1<= k & k<=len(L) implies len(CastNode(L.k,v
  )) <= len(CastNode(L.1,v)) -k+1
proof
  defpred P[Nat] means for L,j st len(L) <= $1 holds L is_Finseq_for v & 1<= j
  & j<=len(L) implies len(CastNode(L.j,v)) <= len(CastNode(L.1,v)) -j+1;
A1: for n st P[n] holds P[n + 1]
  proof
    let n;
    assume
A2: P[n];
A3: for L,k st len(L) = n+1 holds L is_Finseq_for v & 1<= k & k<=len(L)
    implies len(CastNode(L.k,v)) <= len(CastNode(L.1,v)) -k+1
    proof
      let L,k such that
A4:   len(L) = n+1;
      L is_Finseq_for v & 1<= k & k<=len(L) implies len(CastNode(L.k,v))
      <= len(CastNode(L.1,v)) -k+1
      proof
        set L1= L|Seg n;
        assume that
A5:     L is_Finseq_for v and
A6:     1<= k and
A7:     k<=len(L);
        reconsider L1 as FinSequence by FINSEQ_1:15;
A8:     n<len(L) by A4,NAT_1:13;
        then
A9:     len(L1) = n by FINSEQ_1:17;
A10:    dom L1 = Seg n by A8,FINSEQ_1:17;
A11:    for m st 1<= m & m<=n holds L1.m = L.m
        by A10,FINSEQ_1:1,FUNCT_1:47;
A12:    not n=0 implies 0<0+n;
        now
          per cases by A4,A7,A12,NAT_1:8,19;
          suppose
A13:        k<=n;
            then 1<=n by A6,XXREAL_0:2;
            then
A14:        L1.1=L.1 by A11;
            L1.k = L.k by A6,A11,A13;
            hence thesis by A2,A5,A6,A8,A9,A13,A14,Th26;
          end;
          suppose
A15:        k=n+1 & n>=1;
            then
            len(CastNode(L.k,v)) <= len(CastNode(L.n,v)) -1 by A5,A8,Th21,Th35;
            then
A16:        len(CastNode(L.k,v)) + 1 <= len(CastNode(L.n,v))-1 +1 by XREAL_1:6;
            L1.n = L.n & L1.1=L.1 by A11,A15;
            then
            len(CastNode(L.n,v)) <= len(CastNode(L.1,v)) -n+1 by A2,A5,A8,A9
,A15,Th26;
            then len(CastNode(L.k,v)) + 1 <= (len(CastNode(L.1,v)) -n)+1 by A16
,XXREAL_0:2;
            hence thesis by A15,XREAL_1:6;
          end;
          suppose
            k=n+1 & n=0;
            hence thesis;
          end;
        end;
        hence thesis;
      end;
      hence thesis;
    end;
    P[n+1]
    proof
      let L,j such that
A17:  len(L)<=n+1;
      L is_Finseq_for v & 1<= j & j<=len(L) implies len(CastNode(L.j,v))
      <= len(CastNode(L.1,v)) -j+1
      proof
        now
          per cases by A17,NAT_1:8;
          suppose
            len(L)<=n;
            hence thesis by A2;
          end;
          suppose
            len(L) =n+1;
            hence thesis by A3;
          end;
        end;
        hence thesis;
      end;
      hence thesis;
    end;
    hence thesis;
  end;
A18: P[0];
  for n holds P[n] from NAT_1:sch 2(A18,A1);
  hence thesis;
end;
