reserve k,n,m for Nat,
  a,x,X,Y for set,
  D,D1,D2,S for non empty set,
  p,q for FinSequence of NAT;
reserve F,F1,G,G1,H,H1,H2 for LTL-formula;
reserve sq,sq9 for FinSequence;
reserve L,L9 for FinSequence;
reserve j for Nat;
reserve j1 for Element of NAT;

theorem Th38:
  (G is conjunctive or G is disjunctive or G is Until or G is
  Release ) & F is_proper_subformula_of G implies F is_subformula_of (
  the_left_argument_of G) or F is_subformula_of (the_right_argument_of G)
proof
  assume that
A1: G is conjunctive or G is disjunctive or G is Until or G is Release and
A2: F is_subformula_of G and
A3: F <> G;
  consider n,L such that
A4: 1 <= n and
A5: len L = n and
A6: L.1 = F and
A7: L.n = G and
A8: for k st 1 <= k & k < n ex H1,F1 st L.k = H1 & L.(k + 1) = F1 & H1
  is_immediate_constituent_of F1 by A2;
  1 < n by A3,A4,A6,A7,XXREAL_0:1;
  then 1 + 1 <= n by NAT_1:13;
  then consider k be Nat such that
A9: n = 2 + k by NAT_1:10;
  reconsider L1 = L|(Seg(1 + k)) as FinSequence by FINSEQ_1:15;
  1 + 1 + k = 1 + k + 1;
  then 1 + k < n by A9,NAT_1:13;
  then consider H1,G1 such that
A10: L.(1 + k) = H1 and
A11: L.(1 + k + 1) = G1 & H1 is_immediate_constituent_of G1 by A8,NAT_1:11;
  F is_subformula_of H1
  proof
    take m = 1 + k, L1;
    thus
A12: 1 <= m by NAT_1:11;
    1 + k <= 1 + k + 1 by NAT_1:11;
    hence len L1 = m by A5,A9,FINSEQ_1:17;
A13: now
      let j;
      assume 1 <= j & j <= m;
      then j in { j1 where j1 is Nat : 1 <= j1 & j1 <= 1 + k };
      then j in Seg(1 + k) by FINSEQ_1:def 1;
      hence L1.j = L.j by FUNCT_1:49;
    end;
    hence L1.1 = F by A6,A12;
    thus L1.m = H1 by A10,A12,A13;
    let j;
    assume that
A14: 1 <= j and
A15: j < m;
    m <= m + 1 by NAT_1:11;
    then j < n by A9,A15,XXREAL_0:2;
    then consider F1,G1 such that
A16: L.j = F1 & L.(j + 1) = G1 & F1 is_immediate_constituent_of G1 by A8,A14;
    take F1,G1;
    1 <= 1 + j & j + 1 <= m by A14,A15,NAT_1:13;
    hence thesis by A13,A14,A15,A16;
  end;
  hence thesis by A1,A7,A9,A11,Th22,Th23,Th24,Th25;
end;
