 reserve Omega for non empty set;
 reserve F for SigmaField of Omega;
 reserve phi for Real_Sequence;
 reserve jpi for pricefunction;

theorem
  for Prob being Probability of Special_SigmaField1 holds
  for G being sequence of
    set_of_random_variables_on(Special_SigmaField1,Borel_Sets) st
  (G.0={1,2,3,4}-->1 & G.1={1,2,3,4}-->5 & for k being Nat st k>1
   holds G.k={1,2,3,4}-->0) holds
   ex jpi being pricefunction st
     Arbitrage_Opportunity_exists_wrt Prob,G,jpi,1
proof
let Prob be Probability of Special_SigmaField1;
set Omega={1,2,3,4};
set F=Special_SigmaField1;
let G be sequence of
 set_of_random_variables_on(Special_SigmaField1,Borel_Sets);
assume A3: G.0=Omega-->1 & G.1=Omega-->5 & for k being Nat st k>1
    holds G.k=Omega-->0;
ZW: Prob.Omega = 1 & Prob.{}=0
proof
 Prob.Omega=Prob.([#]F);
 then B2: Prob.Omega=1 by PROB_1:30;
 reconsider A = {} as Event of F by PROB_1:4;
 Prob.(([#]F) \ A) = Prob.([#]F);
 then Prob.([#]F) + Prob.A = 1 by PROB_1:31;
hence thesis by B2;
end;
deffunc U(Element of NAT) = In(IFEQ($1,0,1,IFEQ($1,1,1,0)),REAL);
consider f being Function of NAT,REAL such that
C1: for d being Element of NAT holds f.d=U(d) from FUNCT_2:sch 4;
f is pricefunction
proof
d0: f.0=U(0) by C1;
  for n being Element of NAT holds f.n >= 0
  proof
   let n be Element of NAT;
   f.n=U(n) by C1;
   hence thesis;
  end;
 hence thesis by d0,FINANCE1:def 2,FUNCOP_1:def 8;
end;
 then reconsider jpi = f as pricefunction;
deffunc U(Element of NAT)=In(IFEQ($1,0,-1,IFEQ($1,1,1,0)),REAL);
a0: U(0) = In(-1,REAL) by FUNCOP_1:def 8
    .= -1;
a1: U(1) = In(IFEQ(1,1,1,0),REAL) by FUNCOP_1:def 8
    .= 1 by FUNCOP_1:def 8;
consider phi being Real_Sequence such that
 A4: for k being Element of NAT holds phi.k=U(k) from FUNCT_2:sch 4;
FinJ: (Prob.ArbitrageElSigma1(phi,Omega,F,G,1)=1 &
 Prob.ArbitrageElSigma2(phi,Omega,F,G,1)>0) &
 BuyPortfolioExt(phi,jpi,1)<=0
proof
 G1: BuyPortfolioExt(phi,jpi,1)<=0
 proof
  Partial_Sums(phi(#)jpi).1 = Partial_Sums(phi(#)jpi).0 + (phi(#)jpi).(0+1)
   by SERIES_1:def 1;
  then H1: Partial_Sums(phi(#)jpi).1 = (phi(#)jpi).0 + (phi(#)jpi).1
   by SERIES_1:def 1;
  H2: (phi(#)jpi).0 =-1
  proof
aa: IFEQ(0,0,-1,IFEQ(0,1,1,0)) = -1 by FUNCOP_1:def 8;
   (phi(#)jpi).0 = phi.0*jpi.0 by VALUED_1:5;
   then (phi(#)jpi).0 = U(0)*f.0 by A4;
   then (phi(#)jpi).0 = (-1)*In(IFEQ(0,0,1,IFEQ(0,1,1,0)),REAL) by C1,aa;
   then (phi(#)jpi).0 = (-1)*1 by FUNCOP_1:def 8;
  hence thesis;
  end;
  (phi(#)jpi).1 = 1
  proof
aa: IFEQ(1,0,-1,IFEQ(1,1,1,0)) = IFEQ(1,1,1,0) by FUNCOP_1:def 8;
   (phi(#)jpi).1 = phi.1*jpi.1 by VALUED_1:5;
   then (phi(#)jpi).1 = U(1)*f.1 by A4
   .= 1*f.1 by aa,FUNCOP_1:def 8
   .= 1*In(IFEQ(1,0,1,IFEQ(1,1,1,0)),REAL) by C1
   .= 1*IFEQ(1,1,1,0) by FUNCOP_1:def 8;
  hence thesis by FUNCOP_1:def 8;
  end;
 hence thesis by H2,H1;
 end;
  set RV=RVPortfolioValueFutExt(phi,F,G,1);
   Prob.ArbitrageElSigma1(phi,Omega,F,G,1)=1 &
    Prob.ArbitrageElSigma2(phi,Omega,F,G,1)>0
 proof
fin1: Omega=RV"[.0,+infty.[
     proof
      for x being object holds x in Omega iff x in RV"[.0,+infty.[
      proof
       let x be object;
       x in Omega implies x in RV"[.0,+infty.[
       proof
        assume x in Omega;
        then reconsider x as Element of Omega;
q1:     dom RV=Omega by FUNCT_2:def 1;
        x in dom RV & RV.x in [.0,+infty.[
        proof
          set RVh1=RVElementsOfPortfolioValue_fut(phi,F,G,0);
          RV.x = RVPortfolioValueFutExt(phi,F,G,0+1).x;
          then RV.x = (RVPortfolioValueFut(phi,F,G,0) +
           RVElementsOfPortfolioValue_fut(phi,F,G,0)).x by FINANCE3:9;
          then S0: RV.x = RVPortfolioValueFut(phi,F,G,0).x + RVh1.x
           by VALUED_1:1;
         0<=RV.x & RV.x<+infty
         proof
          S1: RVh1.x=-1
          proof
           RVh1.x=ElementsOfPortfolioValueProb_fut(F,G.0).x * phi.0
            by FINANCE2:def 5; then
           K1: RVh1.x=Change_Element_to_Func(F,Borel_Sets,G.0).x * phi.0
            by FINANCE1:def 8;
           set G0=G.0;
           K2: G0=Change_Element_to_Func(F,Borel_Sets,G.0) by FINANCE1:def 7;
           reconsider G0 as Function of Omega,REAL by K1,FINANCE1:def 7;
           RVh1.x=1*phi.0 by A3,K1,K2;
           then RVh1.x=1*U(0) by A4
           .= In(-1,REAL) by FUNCOP_1:def 8;
          hence thesis;
          end;
          set RV0=RVPortfolioValueFut(phi,F,G,0);
          RV0.x=5
          proof
           RV0.x=PortfolioValueFut(0+1,phi,F,G,x) by FINANCE3:def 3;
           then RV0.x=(ElementsOfPortfolioValue_fut(phi,F,x,G)^\1).0
            by SERIES_1:def 1;
           then RV0.x=ElementsOfPortfolioValue_fut(phi,F,x,G).(0+1)
            by NAT_1:def 3;
           then RV0.x=ElementsOfPortfolioValueProb_fut(F,G.1).x * phi.1
            by FINANCE1:def 10;
           then RV0.x=ElementsOfPortfolioValueProb_fut(F,G.1).x * U(1) by A4;
           then R1: RV0.x=Change_Element_to_Func(F,Borel_Sets,G.1).x * 1
            by a1,FINANCE1:def 8;
           G.1=Change_Element_to_Func(F,Borel_Sets,G.1) by FINANCE1:def 7;
           then reconsider G1 = G.1 as Function of Omega,REAL;
           RV0.x=G1.x * 1 by R1,FINANCE1:def 7;
          hence thesis by A3;
          end;
         hence thesis by XXREAL_0:9,S0,S1;
         end;
        hence thesis by q1,XXREAL_1:3;
        end;
       hence thesis by FUNCT_1:def 7;
       end;
      hence thesis;
      end;
     hence thesis by TARSKI:2;
     end;
     Omega=RV"].0,+infty.[
     proof
      for x being object holds x in Omega iff x in RV"].0,+infty.[
      proof
       let x be object;
       thus x in Omega implies x in RV"].0,+infty.[
       proof
        assume x in Omega;
        then reconsider x as Element of Omega;
q1:     dom RV=Omega by FUNCT_2:def 1;
        x in dom RV & RV.x in ].0,+infty.[
        proof
          set RVh1=RVElementsOfPortfolioValue_fut(phi,F,G,0);
          RV.x = RVPortfolioValueFutExt(phi,F,G,0+1).x;
          then RV.x = (RVPortfolioValueFut(phi,F,G,0) +
           RVElementsOfPortfolioValue_fut(phi,F,G,0)).x by FINANCE3:9;
          then S0: RV.x = RVPortfolioValueFut(phi,F,G,0).x + RVh1.x
           by VALUED_1:1;
         0<RV.x & RV.x<+infty
         proof
           RVh1.x=ElementsOfPortfolioValueProb_fut(F,G.0).x * phi.0
            by FINANCE2:def 5; then
           K1: RVh1.x=Change_Element_to_Func(F,Borel_Sets,G.0).x * phi.0
            by FINANCE1:def 8;
           set G0=G.0;
           K2: G0=Change_Element_to_Func(F,Borel_Sets,G.0) by FINANCE1:def 7;
           reconsider G0 as Function of Omega,REAL by K1,FINANCE1:def 7;
           RVh1.x=1*phi.0 by A3,K1,K2;
           then
          S1: RVh1.x=-1 by a0,A4;
          set RV0=RVPortfolioValueFut(phi,F,G,0);
           RV0.x=PortfolioValueFut(0+1,phi,F,G,x) by FINANCE3:def 3;
           then RV0.x=(ElementsOfPortfolioValue_fut(phi,F,x,G)^\1).0
            by SERIES_1:def 1;
           then RV0.x=ElementsOfPortfolioValue_fut(phi,F,x,G).(0+1)
            by NAT_1:def 3;
           then RV0.x=ElementsOfPortfolioValueProb_fut(F,G.1).x * phi.1
            by FINANCE1:def 10;
           then RV0.x=ElementsOfPortfolioValueProb_fut(F,G.1).x * U(1) by A4;
           then R1: RV0.x=Change_Element_to_Func(F,Borel_Sets,G.1).x * 1
            by a1,FINANCE1:def 8;
           G.1=Change_Element_to_Func(F,Borel_Sets,G.1) by FINANCE1:def 7;
           then reconsider G1 = G.1 as Function of Omega,REAL;
           RV0.x=G1.x * 1 by R1,FINANCE1:def 7; then
          RV0.x=5 by A3;
         hence thesis by XXREAL_0:9,S0,S1;
         end;
         hence thesis by q1,XXREAL_1:4;
        end;
       hence thesis by FUNCT_1:def 7;
       end;
      thus thesis;
      end;
     hence thesis by TARSKI:2;
     end;
 hence thesis by fin1,ZW;
 end;
hence thesis by G1;
end;
take jpi;
thus thesis by FinJ;
end;
