reserve x for set;
reserve i,j for Integer;
reserve n,n1,n2,n3 for Nat;
reserve K,K1,K2,K3 for Field;
reserve SK1,SK2 for Subfield of K;
reserve ek,ek1,ek2 for Element of K;
reserve p for Prime;
reserve a,b,c for Element of GF(p);
reserve F for FinSequence of GF(p);
reserve Px,Py,Pz for Element of GF(p);

theorem Th43:
  for p be Prime, a, b, X, Y be Element of GF(p) holds
  Y|^2 = X|^3 + a*X + b iff [X,Y,1] is Element of EC_SetProjCo(a,b,p)
  proof
    let p be Prime, a, b, X, Y be Element of GF(p);
A1: 1 = 1.(GF p) by Th12;
    reconsider Q=[X,Y,1] as Element of ProjCo(GF(p)) by Lm6;
A2: Y|^2 = Y|^2 * 1.(GF(p));
A3: a*X = a*X*(1.(GF(p)))
    .= a*X*((1.(GF(p)))*(1.(GF(p))))
    .= a*X*((1.(GF(p))) |^2) by Lm2;
A4: b = b*(1.(GF(p)))
    .= b*((1.(GF(p)))*(1.(GF(p))))
    .= b*((1.(GF(p))) |^2) by Lm2
    .= b*(((1.(GF(p))) |^2) *(1.(GF(p))))
    .= b*((1.(GF(p))) |^(2+1)) by Th24
    .= b*((1.(GF(p))) |^3);
    hereby
      assume A5: Y|^2 = X|^3 + a*X + b;
      Y|^2 - (X|^3 + a*X + b) = 0.(GF(p)) by A5,VECTSP_1:19;
      then EC_WEqProjCo(a,b,p).Q = 0.(GF(p)) by A1,A2,A3,A4,Th41;
      then Q in {P where P is Element of ProjCo(GF(p)) :
      EC_WEqProjCo(a,b,p).P = 0.GF(p)};
      hence [X,Y,1] is Element of EC_SetProjCo(a,b,p);
    end;
    assume [X,Y,1] is Element of EC_SetProjCo(a,b,p);
    then Q in {P where P is Element of ProjCo(GF(p)) :
    EC_WEqProjCo(a,b,p).P = 0.GF(p)};
    then ex P be Element of ProjCo(GF(p)) st P=Q &
    EC_WEqProjCo(a,b,p).P = 0.GF(p);
    then Y|^2 - (X|^3 + a*X + b) = 0.(GF(p)) by A1,A2,A3,A4,Th41;
    hence Y|^2 = X|^3 + a*X + b by VECTSP_1:19;
  end;
