reserve k,n for Element of NAT,
  a,Y for set,
  D,D1,D2 for non empty set,
  p,q for FinSequence of NAT;
reserve F,F1,G,G1,H,H1,H2 for CTL-formula;
reserve sq,sq9 for FinSequence;
reserve V for CTLModel;
reserve Kai for Function of atomic_WFF,the BasicAssign of V;
reserve f,f1,f2 for Function of CTL_WFF,the carrier of V;
reserve S for non empty set;
reserve R for total Relation of S,S;
reserve s,s0,s1 for Element of S;
reserve BASSIGN for non empty Subset of ModelSP(S);
reserve kai for Function of atomic_WFF,the BasicAssign of BASSModel(R,BASSIGN);

theorem Th38:
  for pai1,pai2 being inf_path of R, k being Element of NAT holds
  pai1.k = pai2.0 implies PathConc(pai1,pai2,k) is inf_path of R
proof
  let pai1,pai2 be inf_path of R;
  let k be Element of NAT;
  set pai = PathConc(pai1,pai2,k);
  assume
A1: pai1.k = pai2.0;
  for n being Nat holds [pai.n,pai.(n+1)] in R
  proof
    let n be Nat;
    set n1=n+1;
    per cases by XXREAL_0:1;
    suppose
A2:   n1 < k;
      then
A3:   n < k by NAT_1:13;
A4:   pai.n = PathChange(pai1,pai2,k,n) by Def69
        .= pai1.n by A3,Def68;
      pai.n1 = PathChange(pai1,pai2,k,n1) by Def69
        .=pai1.n1 by A2,Def68;
      hence thesis by A4,Def39;
    end;
    suppose
A5:   n1 = k;
      then
A6:   n < k by NAT_1:13;
A7:   pai.n = PathChange(pai1,pai2,k,n) by Def69
        .= pai1.n by A6,Def68;
      pai.n1 = PathChange(pai1,pai2,k,n1) by Def69
        .= pai2.(n1-k) by A5,Def68
        .= pai1.n1 by A1,A5;
      hence thesis by A7,Def39;
    end;
    suppose
A8:   k < n1;
      then
A9:   k <= n by NAT_1:13;
      then reconsider m = n - k as Element of NAT by NAT_1:21;
A10:  pai.n1 = PathChange(pai1,pai2,k,n1) by Def69
        .= pai2.(n1-k) by A8,Def68
        .= pai2.(m+1);
      pai.n = PathChange(pai1,pai2,k,n) by Def69
        .= pai2.m by A9,Def68;
      hence thesis by A10,Def39;
    end;
  end;
  hence thesis by Def39;
end;
