reserve q,th,r for Real,
  a,b,p for Real,
  w,z for Complex,
  k,l,m,n,n1,n2 for Nat,
  seq,seq1,seq2,cq1 for Complex_Sequence,
  rseq,rseq1,rseq2 for Real_Sequence,
  rr for set,
  hy1 for 0-convergent non-zero Real_Sequence;
reserve d for Real;
reserve th,th1,th2 for Real;

theorem Th64:
  exp_R is_differentiable_in p & diff(exp_R,p)=exp_R.p
proof
  deffunc U(Real) = In($1 * exp_R.p*Re((Sum($1 P_dt))),REAL);
  consider Cr being Function of REAL, REAL such that
A1: for th be Element of REAL holds Cr.th = U(th) from FUNCT_2:sch 4;
 for hy1 holds
  (hy1")(#)(Cr/*hy1) is convergent & lim ((hy1")(#)(Cr/*hy1)) = 0
  proof
    let hy1;
A2: for n holds ((hy1")(#)(Cr/*hy1)).n =exp_R.p*Re((Sum((hy1.n) P_dt)))
    proof
      let n;
A3: n in NAT by ORDINAL1:def 12;
A4:   ((hy1")(#)(Cr/*hy1)).n=(hy1".n)*((Cr/*hy1).n) by SEQ_1:8
        .=(hy1.n)"*((Cr/*hy1).n) by VALUED_1:10;
   dom Cr = REAL by FUNCT_2:def 1;
then    rng hy1 c= dom Cr;
then
A5:   ((hy1")(#)(Cr/*hy1)).n= (hy1.n)"*(Cr.(hy1.n)) by A4,FUNCT_2:108,A3
        .=(hy1.n)"*U(hy1.n) by A1
        .=(hy1.n)"*(hy1.n)* (exp_R.p*Re((Sum((hy1.n) P_dt))));
hy1.n<>0 by SEQ_1:5;
then   ((hy1")(#)(Cr/*hy1)).n
      =1*(exp_R.p*Re((Sum((hy1.n) P_dt)))) by A5,XCMPLX_0:def 7
        .=exp_R.p*Re((Sum((hy1.n) P_dt)));
      hence thesis;
    end;
    deffunc U(Real) = exp_R.p*Re((Sum((hy1.$1) P_dt)));
    consider rseq such that
A6: for n holds rseq.n= U(n) from SEQ_1:sch 1;
    deffunc U(Nat) = Sum((hy1.$1) P_dt)*exp_R.p;
    consider cq1 such that
A7: for n holds cq1.n= U(n) from COMSEQ_1:sch 1;
A8: for q be Real
  st q>0 holds ex k st for m st k<=m holds |.cq1.m-0c.|<q
    proof
      let q be Real such that
A9:  q>0;
  ex k st for m st k<=m holds |.cq1.m-0c.|<q
      proof
    exp_R.p>0 by Th53;
        then consider r such that
A10:    r>0 and
A11:    for z being Complex st |.z.|<r holds |.(Sum(z P_dt)).|<q/
        exp_R.p
        by A9,Th57;
    hy1 is convergent & lim(hy1)=0;
        then consider k such that
A12:    for m st k<=m holds |.hy1.m-0.|<r by A10,SEQ_2:def 7;
A13:    now
          let m such that
A14:      k<=m;
A15:      |.cq1.m-0c.|= |.(Sum((hy1.m) P_dt))* exp_R.p.| by A7
            .= |.(Sum((hy1.m) P_dt)).|* |.exp_R.p.|
          by COMPLEX1:65
            .= |.(Sum((hy1.m) P_dt)).|*
          sqrt((Re(exp_R.p))^2 + (Im(exp_R.p))^2);
      exp_R.p = exp_R.p+0*<i>;
          then
A16:      Re(exp_R.p)=exp_R.p & Im(exp_R.p)=0 by COMPLEX1:12;
A17:      exp_R.p>0 by Th53;
then A18:      |.cq1.m-0c.| =|.(Sum((hy1.m) P_dt)).|* ( exp_R.p)
          by A15,A16,SQUARE_1:22;
      |.hy1.m-0.|<r by A12,A14;
then       |.cq1.m-0c.|<q/exp_R.p * exp_R.p by A11,A17,A18,XREAL_1:68;
          hence |.cq1.m-0c.|<q by A17,XCMPLX_1:87;
        end;
        take k;
        thus thesis by A13;
      end;
      hence thesis;
    end;
then A19: cq1 is convergent by COMSEQ_2:def 5;
then A20: lim(cq1)=0c by A8,COMSEQ_2:def 6;
A21: for n being Element of NAT holds Re(cq1).n= rseq.n
    proof
A22:  for n holds Re(cq1).n=exp_R.p*Re((Sum((hy1.n) P_dt)))
      proof
        let n;
    Re(cq1).n=Re(cq1.n) by COMSEQ_3:def 5
          .=Re((Sum((hy1.n) P_dt))*exp_R.p) by A7
          .=exp_R.p*Re((Sum((hy1.n) P_dt))) by Lm12;
        hence thesis;
      end;
      let n;
  rseq.n=exp_R.p*Re((Sum((hy1.n) P_dt))) by A6;
      hence thesis by A22;
    end;
 for n being Element of NAT  holds rseq.n=((hy1")(#)(Cr/*hy1)).n
    proof
      let n be Element of NAT;
  rseq.n=exp_R.p*Re((Sum((hy1.n) P_dt))) by A6;
      hence thesis by A2;
    end;
then  rseq=(hy1")(#)(Cr/*hy1);
then  (hy1")(#)(Cr/*hy1)=Re(cq1) by A21;
    hence thesis by A19,A20,COMPLEX1:4,COMSEQ_3:41;
  end;
  then reconsider PR = Cr as RestFunc by FDIFF_1:def 2;
  deffunc U1(Real) = In($1* (exp_R.p),REAL);
  consider CL being Function of REAL, REAL such that
A23: for th be Element of REAL holds CL.th=U1(th) from FUNCT_2:sch 4;
A24: for d be Real holds CL.d = d * (exp_R.p)
  proof
    let d be Real;
     d in REAL by XREAL_0:def 1;
     then CL.d=U1(d) by A23;
    hence thesis;
  end;
 ex r st for q holds CL.q=r*q
  proof
    take exp_R.p;
    thus thesis by A24;
  end;
  then reconsider PL = CL as LinearFunc by FDIFF_1:def 3;
A25: ex N being Neighbourhood of p st N c= dom exp_R &
  for r st r in N holds exp_R.r - exp_R.p = PL.(r-p) + PR.(r-p)
  proof
A26: for r st r in ].p-1,p+1 .[ holds exp_R.r - exp_R.p = PL.(r-p) + PR.(r-p)
    proof
      let r;
      reconsider p as Real;
A27:    r-p in REAL by XREAL_0:def 1;
  r=p+(r-p);
then   exp_R.r - exp_R.p =(r-p)* (exp_R.p)+(r-p)*exp_R.p*
      Re((Sum((r-p) P_dt))) by Th61
        .=(r-p)* (exp_R.p)+U(r-p)
        .=(r-p)* (exp_R.p)+Cr.(r-p) by A1,A27
        .=PL.(r-p) + PR.(r-p) by A24;
      hence thesis;
    end;
    take ].p-1,p+1 .[;
    thus thesis by A26,Th46,RCOMP_1:def 6;
  end;
then A28: exp_R is_differentiable_in p by FDIFF_1:def 4;
 PL.1= 1*exp_R.p by A24;
  hence thesis by A25,A28,FDIFF_1:def 5;
end;
