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 Th49:
  for p be Prime, a, b be Element of GF(p),
  P be Element of ProjCo(GF(p))
  st p > 3 & Disc(a,b,p) <> 0.GF(p) &
  P in EC_SetProjCo(a,b,p) & P`3_3 = 0 holds
  ex Q be Element of ProjCo(GF(p))
  st Q in EC_SetProjCo(a,b,p) & Q _EQ_ P & Q`1_3 = 0 & Q`2_3= 1 & Q`3_3= 0
  proof
    let p be Prime, a, b be Element of GF(p),
    P be Element of ProjCo(GF(p));
    assume
    A1: p > 3 & Disc(a,b,p) <> 0.GF(p) &
    P in EC_SetProjCo(a,b,p) & P`3_3 = 0;
    A2: P`3_3 = 0.GF(p) by A1;
    set d=(P`2_3)";
    A3: ex X0 be Element of ProjCo(GF(p))
    st P=X0 & EC_WEqProjCo(a,b,p).X0 = 0.GF(p) by A1;
    A4: (P`3_3) |^3 = (P`3_3) |^(2+1)
    .= (P`3_3) |^2 * (P`3_3) by Th24
    .= 0.GF(p) by A2;
    A5: (P`3_3) |^2 = (P`3_3) |^(1+1)
    .= (P`3_3) |^1 * (P`3_3) by Th24
    .= 0.GF(p) by A2;
    0.GF(p) = ((P`2_3) |^2)*(P`3_3)-((P`1_3) |^3
    +a*(P`1_3)*(P`3_3) |^2+b*(P`3_3) |^3) by A3,Def8
    .= 0.GF(p)-((P`1_3) |^3
    +a*(P`1_3)*(P`3_3) |^2+b*(P`3_3) |^3) by A2
    .= 0.GF(p)-((P`1_3) |^3 +0.GF(p)+b*(P`3_3) |^3) by A5
    .= 0.GF(p)-((P`1_3) |^3 +0.GF(p)+0.GF(p)) by A4
    .= 0.GF(p)-((P`1_3) |^3 +0.GF(p)) by RLVECT_1:4
    .= 0.GF(p)-(P`1_3) |^3 by RLVECT_1:4
    .= - (P`1_3) |^3 by RLVECT_1:14; then
    A6: (P`1_3) |^3 = (P`1_3) |^3 + - (P`1_3) |^3 by RLVECT_1:4;
A7:P`1_3 = 0.GF(p)
    proof
      assume A8: P`1_3 <> 0.GF(p); then
      P`1_3 * (P`1_3) <>  0.GF(p) by VECTSP_1:12; then
      (P`1_3) |^1 * (P`1_3) <> 0.GF(p) by Lm1; then
      (P`1_3) |^(1+1) <> 0.GF(p) by Th24; then
      (P`1_3) |^2 * (P`1_3) <> 0.GF(p) by A8,VECTSP_1:12; then
      (P`1_3) |^(2+1) <>  0.GF(p) by Th24;
      hence contradiction by A6,RLVECT_1:5;
    end;
    A9: P`2_3 <> 0.GF(p)
    proof
      assume P`2_3 = 0.GF(p); then
      P`2_3 = 0 by Th11; then
      [P`1_3,P`2_3,P`3_3] = [0,0,0] by A1,A7; then
      P = [0,0,0] by AA; then
      P in {[0,0,0]} by TARSKI:def 1; then
      not P in [:the carrier of GF(p), the carrier of GF(p),
      the carrier of GF(p):] \ {[0,0,0]} by XBOOLE_0:def 5;
      then not P in ProjCo(GF(p)) by Th40;
      hence contradiction;
    end;
A10: d <> 0.GF(p)
    proof
      assume A11: d = 0.GF(p);
      A12: d*(P`2_3) = 1_GF(p) by A9,VECTSP_1:def 10
      .=1 by Th12;
      d*(P`2_3) = 0.GF(p) by A11
      .= 0 by Th11;
      hence contradiction by A12;
    end;
    reconsider Q =[d*(P`1_3),d*(P`2_3),d*(P`3_3)] as Element of
    [:the carrier of GF(p), the carrier of GF(p), the carrier of GF(p):];
    A13: Q`1_3 = d*(P`1_3) & Q`2_3 = d*(P`2_3) & Q`3_3 = d*(P`3_3);
    then
    Q in EC_SetProjCo(a,b,p) by A1,A10,Th45; then
    consider PP be Element of ProjCo(GF(p)) such that
A14: Q = PP & EC_WEqProjCo(a,b,p).PP = 0.GF(p);
    reconsider Q as Element of ProjCo(GF(p)) by A14;
    take Q;
    thus Q in EC_SetProjCo(a,b,p) by A13,A1,A10,Th45;
    thus Q _EQ_ P by A10;
    thus Q`1_3 = d*(P`1_3)
    .=0.GF(p) by A7
    .=0 by Th11;
    thus Q`2_3 = d*(P`2_3)
    .= 1_GF(p) by A9,VECTSP_1:def 10
    .= 1 by Th12;
    thus Q`3_3 = d*(P`3_3)
    .=0.GF(p) by A2
    .=0 by Th11;
  end;
