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;

theorem Th3:
  ex f st f is-Evaluation-for Kai
proof
  set M = EvalFamily(V,Kai);
  set v0 = the Element of the carrier of V;
  for X being set st X in M holds X <> {}
  proof
    let X being set;
    assume X in M;
    then ex n being Element of NAT st X = EvalSet(V,Kai,n) by Def33;
    hence thesis;
  end;
  then consider Choice being Function such that
  dom Choice = M and
A1: for X being set st X in M holds Choice.X in X by FUNCT_1:111;
  deffunc F(object) = Choice.EvalSet(V,Kai,k_nat($1));
A2: for n being set st n in NAT holds F(n) is Function of CTL_WFF,the
  carrier of V
  proof
    let n be set such that
A3: n in NAT;
A4: k_nat(n) = n by A3,Def2;
    set Y = F(n);
    reconsider n as Element of NAT by A3;
    Y in EvalSet(V,Kai,n) by A1,A4,Lm29;
    then ex h being Function of CTL_WFF,the carrier of V st Y =h & h
    is-PreEvaluation-for n,Kai;
    hence thesis;
  end;
A5: for n being object st n in NAT
    holds F(n) in Funcs(CTL_WFF,the carrier of V)
  proof
    let n be object;
    assume n in NAT;
    then F(n) is Function of CTL_WFF,the carrier of V by A2;
    hence thesis by FUNCT_2:8;
  end;
  consider f1 being sequence of Funcs(CTL_WFF,the carrier of V) such
  that
A6: for n being object st n in NAT holds f1.n = F(n) from FUNCT_2:sch 2(
  A5);
  deffunc G(object) = CastEval(V,f1.len(CastCTLformula($1)),v0).$1;
A7: for H being object st H in CTL_WFF
    holds G(H) in the carrier of V by FUNCT_2:5;
  consider f being Function of CTL_WFF,the carrier of V such that
A8: for H being object st H in CTL_WFF holds f.H = G(H) from FUNCT_2:sch 2
  (A7 );
  take f;
  for n being Element of NAT holds f is-PreEvaluation-for n,Kai
  proof
    defpred P[Nat] means f is-PreEvaluation-for $1,Kai;
A9: for k being Nat st P[k] holds P[k + 1]
    proof
      let k be Nat such that
A10:  P[k];
      for H being CTL-formula st len(H) <= k+1 holds (H is atomic implies
f.H = Kai.H) &
 (H is negative implies f.H = (the Compl of V).(f.(the_argument_of
H))) &
 (H is conjunctive implies f.H = (the L_meet of V).(f.(the_left_argument_of
H), f.(the_right_argument_of H))) & (H is ExistNext implies f.H = (the EneXt of
V).(f.(the_argument_of H))) & (H is ExistGlobal implies f.H = (the EGlobal of V
).(f.(the_argument_of H))) & (H is ExistUntill implies f.H = (the EUntill of V)
      .(f.(the_left_argument_of H), f.(the_right_argument_of H)))
      proof
        let H be CTL-formula such that
A11:    len(H) <= k+1;
        now
          per cases by A11,NAT_1:8;
          case
            len(H) <= k;
            hence thesis by A10,Def27;
          end;
          case
A12:        len(H) = k+1;
            set f2 = F(len H);
A13:        H in CTL_WFF by Th1;
            then f1.len(CastCTLformula(H)) = f1.len(H) by Def24
              .= F(len(H)) by A6;
            then
A14:        CastEval(V,f1.len(CastCTLformula(H)),v0) = F(len H ) by Def32;
            then reconsider f2 as Function of CTL_WFF,the carrier of V;
A15:        f2 = Choice.EvalSet(V,Kai,len(H)) by Def2;
            Choice.EvalSet(V,Kai,len(H)) in EvalSet(V,Kai,len(H)) by A1,Lm29;
            then
A16:        ex h being Function of CTL_WFF,the carrier of V st f2=h
            & h is-PreEvaluation-for len(H),Kai by A15;
            then
A17:        f2 is-PreEvaluation-for k,Kai by A12,Lm25;
A18:        f.H = f2.H by A8,A13,A14;
A19:        H is ExistNext implies f.H = (the EneXt of V).(f.(
            the_argument_of H))
            proof
              assume
A20:          H is ExistNext;
              then len(the_argument_of H) < len(H) by Lm22;
              then
A21:          len(the_argument_of H) <= k by A12,NAT_1:13;
              f.H = (the EneXt of V).(f2.(the_argument_of H)) by A18,A16,A20

                .= (the EneXt of V).(f.(the_argument_of H)) by A10,A17,A21,Lm26
;
              hence thesis;
            end;
A22:        H is ExistUntill implies f.H = (the EUntill of V).(f.(
            the_left_argument_of H), f.(the_right_argument_of H))
            proof
              assume
A23:          H is ExistUntill;
              then len(the_right_argument_of H) < len(H) by Lm23;
              then
A24:          len(the_right_argument_of H) <= k by A12,NAT_1:13;
              len(the_left_argument_of H) < len(H) by A23,Lm23;
              then len(the_left_argument_of H) <= k by A12,NAT_1:13;
              then
A25:          f.(the_left_argument_of H) = f2.( the_left_argument_of H)
              by A10,A17,Lm26;
              f.H = (the EUntill of V).(f2.(the_left_argument_of H), f2.(
              the_right_argument_of H)) by A18,A16,A23
                .= (the EUntill of V).(f.(the_left_argument_of H), f.(
              the_right_argument_of H)) by A10,A17,A25,A24,Lm26;
              hence thesis;
            end;
A26:        H is conjunctive implies f.H = (the L_meet of V).(f.(
            the_left_argument_of H), f.(the_right_argument_of H))
            proof
              assume
A27:          H is conjunctive;
              then len(the_right_argument_of H) < len(H) by Lm23;
              then
A28:          len(the_right_argument_of H) <= k by A12,NAT_1:13;
              len(the_left_argument_of H) < len(H) by A27,Lm23;
              then len(the_left_argument_of H) <= k by A12,NAT_1:13;
              then
A29:          f.(the_left_argument_of H) = f2.( the_left_argument_of H)
              by A10,A17,Lm26;
              f.H = (the L_meet of V).(f2.(the_left_argument_of H), f2.(
              the_right_argument_of H)) by A18,A16,A27
                .= (the L_meet of V).(f.(the_left_argument_of H), f.(
              the_right_argument_of H)) by A10,A17,A29,A28,Lm26;
              hence thesis;
            end;
A30:        H is ExistGlobal implies f.H = (the EGlobal of V).(f.(
            the_argument_of H))
            proof
              assume
A31:          H is ExistGlobal;
              then len(the_argument_of H) < len(H) by Lm22;
              then
A32:          len(the_argument_of H) <= k by A12,NAT_1:13;
              f.H = (the EGlobal of V).(f2.(the_argument_of H)) by A18,A16,A31

                .= (the EGlobal of V).(f.(the_argument_of H)) by A10,A17,A32
,Lm26;
              hence thesis;
            end;
            H is negative implies f.H = (the Compl of V).(f.(
            the_argument_of H))
            proof
              assume
A33:          H is negative;
              then len(the_argument_of H) < len(H) by Lm22;
              then
A34:          len(the_argument_of H) <= k by A12,NAT_1:13;
              f.H = (the Compl of V).(f2.(the_argument_of H)) by A18,A16,A33

                .= (the Compl of V).(f.(the_argument_of H)) by A10,A17,A34,Lm26
;
              hence thesis;
            end;
            hence thesis by A18,A16,A19,A30,A26,A22;
          end;
        end;
        hence thesis;
      end;
      hence thesis by Def27;
    end;
    for H being CTL-formula st len(H) <= 0 holds (H is atomic implies f.H
= Kai.H) &
 (H is negative implies f.H = (the Compl of V).(f.(the_argument_of H)))
& (H is conjunctive
 implies f.H = (the L_meet of V).(f.(the_left_argument_of H), f
.(the_right_argument_of H))) & (H is ExistNext implies f.H = (the EneXt of V).(
f.(the_argument_of H))) & (H is ExistGlobal implies f.H = (the EGlobal of V).(f
.(the_argument_of H))) & (H is ExistUntill implies f.H = (the EUntill of V).(f.
    (the_left_argument_of H), f.(the_right_argument_of H))) by Lm10;
    then
A35: P[0] by Def27;
    for n being Nat holds P[n] from NAT_1:sch 2(A35,A9);
    hence thesis;
  end;
  hence thesis by Lm28;
end;
