theorem Th10:
for
K being
comRing for
a1,
a2,
a3,
a4 being
Element of
K holds
(
((a1 * a2) * a3) * a4 = ((a4 * a2) * a3) * a1 &
((a1 * a2) * a3) * a4 = ((a1 * a4) * a3) * a2 )
theorem Th11:
for
K being
Ring for
a1,
a2,
a3,
a4,
a5 being
Element of
K holds
(
((a1 * a2) * a3) * a4 = a1 * ((a2 * a3) * a4) &
(((a1 * a2) * a3) * a4) * a5 = a1 * (((a2 * a3) * a4) * a5) )
theorem Th12:
for
K being
Ring for
a1,
a2,
a3,
a4,
a5,
a6 being
Element of
K holds
(
((((a1 * a2) * a3) * a4) * a5) * a6 = a1 * ((((a2 * a3) * a4) * a5) * a6) &
((((a1 * a2) * a3) * a4) * a5) * a6 = ((a1 * ((a2 * a3) * a4)) * a5) * a6 )
theorem Th14:
for
K being
Ring for
a1,
a2,
a3,
a4 being
Element of
K holds
(
a1 * ((a2 + a3) + a4) = ((a1 * a2) + (a1 * a3)) + (a1 * a4) &
a1 * ((a2 + a3) - a4) = ((a1 * a2) + (a1 * a3)) - (a1 * a4) &
a1 * ((a2 - a3) + a4) = ((a1 * a2) - (a1 * a3)) + (a1 * a4) &
a1 * ((a2 - a3) - a4) = ((a1 * a2) - (a1 * a3)) - (a1 * a4) &
a1 * (((- a2) + a3) + a4) = ((- (a1 * a2)) + (a1 * a3)) + (a1 * a4) &
a1 * (((- a2) + a3) - a4) = ((- (a1 * a2)) + (a1 * a3)) - (a1 * a4) &
a1 * (((- a2) - a3) + a4) = ((- (a1 * a2)) - (a1 * a3)) + (a1 * a4) &
a1 * (((- a2) - a3) - a4) = ((- (a1 * a2)) - (a1 * a3)) - (a1 * a4) )
definition
let p be
Prime;
let a,
b be
Element of
(GF p);
let P be
Element of
EC_SetProjCo (
a,
b,
p);
existence
ex b1 being Element of (GF p) st
for px, py, pz being object st P = [px,py,pz] holds
b1 = px
uniqueness
for b1, b2 being Element of (GF p) st ( for px, py, pz being object st P = [px,py,pz] holds
b1 = px ) & ( for px, py, pz being object st P = [px,py,pz] holds
b2 = px ) holds
b1 = b2
existence
ex b1 being Element of (GF p) st
for px, py, pz being object st P = [px,py,pz] holds
b1 = py
uniqueness
for b1, b2 being Element of (GF p) st ( for px, py, pz being object st P = [px,py,pz] holds
b1 = py ) & ( for px, py, pz being object st P = [px,py,pz] holds
b2 = py ) holds
b1 = b2
existence
ex b1 being Element of (GF p) st
for px, py, pz being object st P = [px,py,pz] holds
b1 = pz
uniqueness
for b1, b2 being Element of (GF p) st ( for px, py, pz being object st P = [px,py,pz] holds
b1 = pz ) & ( for px, py, pz being object st P = [px,py,pz] holds
b2 = pz ) holds
b1 = b2
end;
AA:
for X1, X2, X3 being non empty set
for x being Element of [:X1,X2,X3:] holds x = [(x `1_3),(x `2_3),(x `3_3)]
;
theorem
for
p being
Prime for
a,
b,
Px,
Py,
Pz being
Element of
(GF p) for
P being
Element of
EC_SetProjCo (
a,
b,
p) st
P = [Px,Py,Pz] holds
(
P `1_3 = Px &
P `2_3 = Py &
P `3_3 = Pz )
by Def3, Def4, Def5;
Lm1:
for p being 5 _or_greater Prime
for z being Element of EC_WParam p
for P being Element of EC_SetProjCo ((z `1),(z `2),p) holds [(P `1_3),(- (P `2_3)),(P `3_3)] is Element of EC_SetProjCo ((z `1),(z `2),p)
definition
let p be 5
_or_greater Prime;
let z be
Element of
EC_WParam p;
func compell_ProjCo (
z,
p)
-> Function of
(EC_SetProjCo ((z `1),(z `2),p)),
(EC_SetProjCo ((z `1),(z `2),p)) means :
Def8:
for
P being
Element of
EC_SetProjCo (
(z `1),
(z `2),
p) holds
it . P = [(P `1_3),(- (P `2_3)),(P `3_3)];
existence
ex b1 being Function of (EC_SetProjCo ((z `1),(z `2),p)),(EC_SetProjCo ((z `1),(z `2),p)) st
for P being Element of EC_SetProjCo ((z `1),(z `2),p) holds b1 . P = [(P `1_3),(- (P `2_3)),(P `3_3)]
uniqueness
for b1, b2 being Function of (EC_SetProjCo ((z `1),(z `2),p)),(EC_SetProjCo ((z `1),(z `2),p)) st ( for P being Element of EC_SetProjCo ((z `1),(z `2),p) holds b1 . P = [(P `1_3),(- (P `2_3)),(P `3_3)] ) & ( for P being Element of EC_SetProjCo ((z `1),(z `2),p) holds b2 . P = [(P `1_3),(- (P `2_3)),(P `3_3)] ) holds
b1 = b2
end;
::
deftheorem Def8 defines
compell_ProjCo EC_PF_2:def 8 :
for p being 5 _or_greater Prime
for z being Element of EC_WParam p
for b3 being Function of (EC_SetProjCo ((z `1),(z `2),p)),(EC_SetProjCo ((z `1),(z `2),p)) holds
( b3 = compell_ProjCo (z,p) iff for P being Element of EC_SetProjCo ((z `1),(z `2),p) holds b3 . P = [(P `1_3),(- (P `2_3)),(P `3_3)] );
definition
let p be 5
_or_greater Prime;
let z be
Element of
EC_WParam p;
let F be
Function of
(EC_SetProjCo ((z `1),(z `2),p)),
(EC_SetProjCo ((z `1),(z `2),p));
let P be
Element of
EC_SetProjCo (
(z `1),
(z `2),
p);
.redefine func F . P -> Element of
EC_SetProjCo (
(z `1),
(z `2),
p);
correctness
coherence
F . P is Element of EC_SetProjCo ((z `1),(z `2),p);
end;
theorem Th54:
for
p being 5
_or_greater Prime for
z being
Element of
EC_WParam p for
g2,
gf1,
gf2,
gf3 being
Element of
(GF p) for
P,
Q being
Element of
EC_SetProjCo (
(z `1),
(z `2),
p)
for
R being
Element of
[: the carrier of (GF p), the carrier of (GF p), the carrier of (GF p):] st
g2 = 2
mod p &
gf1 = ((Q `2_3) * (P `3_3)) - ((P `2_3) * (Q `3_3)) &
gf2 = ((Q `1_3) * (P `3_3)) - ((P `1_3) * (Q `3_3)) &
gf3 = ((((gf1 |^ 2) * (P `3_3)) * (Q `3_3)) - (gf2 |^ 3)) - (((g2 * (gf2 |^ 2)) * (P `1_3)) * (Q `3_3)) &
R = [(gf2 * gf3),((gf1 * ((((gf2 |^ 2) * (P `1_3)) * (Q `3_3)) - gf3)) - (((gf2 |^ 3) * (P `2_3)) * (Q `3_3))),(((gf2 |^ 3) * (P `3_3)) * (Q `3_3))] holds
(gf2 * (P `3_3)) * (R `2_3) = - ((gf1 * (((R `1_3) * (P `3_3)) - ((P `1_3) * (R `3_3)))) + ((gf2 * (P `2_3)) * (R `3_3)))
theorem Th55:
for
p being 5
_or_greater Prime for
z being
Element of
EC_WParam p for
g2,
gf1,
gf2,
gf3 being
Element of
(GF p) for
P,
Q being
Element of
EC_SetProjCo (
(z `1),
(z `2),
p)
for
R being
Element of
[: the carrier of (GF p), the carrier of (GF p), the carrier of (GF p):] st
g2 = 2
mod p &
gf1 = ((Q `2_3) * (P `3_3)) - ((P `2_3) * (Q `3_3)) &
gf2 = ((Q `1_3) * (P `3_3)) - ((P `1_3) * (Q `3_3)) &
gf3 = ((((gf1 |^ 2) * (P `3_3)) * (Q `3_3)) - (gf2 |^ 3)) - (((g2 * (gf2 |^ 2)) * (P `1_3)) * (Q `3_3)) &
R = [(gf2 * gf3),((gf1 * ((((gf2 |^ 2) * (P `1_3)) * (Q `3_3)) - gf3)) - (((gf2 |^ 3) * (P `2_3)) * (Q `3_3))),(((gf2 |^ 3) * (P `3_3)) * (Q `3_3))] holds
(- ((gf2 |^ 2) * (((((P `3_3) * (Q `3_3)) * (R `1_3)) + (((P `3_3) * (Q `1_3)) * (R `3_3))) + (((P `1_3) * (Q `3_3)) * (R `3_3))))) + ((((P `3_3) * (Q `3_3)) * (R `3_3)) * (gf1 |^ 2)) = 0. (GF p)
theorem Th56:
for
p being 5
_or_greater Prime for
z being
Element of
EC_WParam p for
g2,
gf1,
gf2,
gf3 being
Element of
(GF p) for
P,
Q being
Element of
EC_SetProjCo (
(z `1),
(z `2),
p)
for
R being
Element of
[: the carrier of (GF p), the carrier of (GF p), the carrier of (GF p):] st
g2 = 2
mod p &
gf1 = ((Q `2_3) * (P `3_3)) - ((P `2_3) * (Q `3_3)) &
gf2 = ((Q `1_3) * (P `3_3)) - ((P `1_3) * (Q `3_3)) &
gf3 = ((((gf1 |^ 2) * (P `3_3)) * (Q `3_3)) - (gf2 |^ 3)) - (((g2 * (gf2 |^ 2)) * (P `1_3)) * (Q `3_3)) &
R = [(gf2 * gf3),((gf1 * ((((gf2 |^ 2) * (P `1_3)) * (Q `3_3)) - gf3)) - (((gf2 |^ 3) * (P `2_3)) * (Q `3_3))),(((gf2 |^ 3) * (P `3_3)) * (Q `3_3))] holds
((((z `2) * (gf2 |^ 2)) * ((P `3_3) |^ 2)) * (Q `3_3)) * (R `3_3) = (- (((((gf2 |^ 2) * (P `3_3)) * (P `1_3)) * (Q `1_3)) * (R `1_3))) + (((((gf2 * (P `2_3)) - (gf1 * (P `1_3))) |^ 2) * (Q `3_3)) * (R `3_3))
theorem Th57:
for
p being 5
_or_greater Prime for
z being
Element of
EC_WParam p for
g2,
gf1,
gf2,
gf3 being
Element of
(GF p) for
P,
Q being
Element of
EC_SetProjCo (
(z `1),
(z `2),
p)
for
R being
Element of
[: the carrier of (GF p), the carrier of (GF p), the carrier of (GF p):] st
g2 = 2
mod p &
gf1 = ((Q `2_3) * (P `3_3)) - ((P `2_3) * (Q `3_3)) &
gf2 = ((Q `1_3) * (P `3_3)) - ((P `1_3) * (Q `3_3)) &
gf3 = ((((gf1 |^ 2) * (P `3_3)) * (Q `3_3)) - (gf2 |^ 3)) - (((g2 * (gf2 |^ 2)) * (P `1_3)) * (Q `3_3)) &
R = [(gf2 * gf3),((gf1 * ((((gf2 |^ 2) * (P `1_3)) * (Q `3_3)) - gf3)) - (((gf2 |^ 3) * (P `2_3)) * (Q `3_3))),(((gf2 |^ 3) * (P `3_3)) * (Q `3_3))] holds
((((z `1) * (gf2 |^ 2)) * (P `3_3)) * (Q `3_3)) * (R `3_3) = ((gf2 |^ 2) * (((((P `1_3) * (Q `1_3)) * (R `3_3)) + (((P `3_3) * (Q `1_3)) * (R `1_3))) + (((P `1_3) * (Q `3_3)) * (R `1_3)))) + ((((g2 * gf1) * (Q `3_3)) * (R `3_3)) * ((gf2 * (P `2_3)) - (gf1 * (P `1_3))))
theorem Th58:
for
p being 5
_or_greater Prime for
z being
Element of
EC_WParam p for
g2,
gf1,
gf2,
gf3 being
Element of
(GF p) for
P,
Q being
Element of
EC_SetProjCo (
(z `1),
(z `2),
p)
for
R being
Element of
[: the carrier of (GF p), the carrier of (GF p), the carrier of (GF p):] st
g2 = 2
mod p &
gf1 = ((Q `2_3) * (P `3_3)) - ((P `2_3) * (Q `3_3)) &
gf2 = ((Q `1_3) * (P `3_3)) - ((P `1_3) * (Q `3_3)) &
gf3 = ((((gf1 |^ 2) * (P `3_3)) * (Q `3_3)) - (gf2 |^ 3)) - (((g2 * (gf2 |^ 2)) * (P `1_3)) * (Q `3_3)) &
R = [(gf2 * gf3),((gf1 * ((((gf2 |^ 2) * (P `1_3)) * (Q `3_3)) - gf3)) - (((gf2 |^ 3) * (P `2_3)) * (Q `3_3))),(((gf2 |^ 3) * (P `3_3)) * (Q `3_3))] holds
(((gf2 |^ 2) * ((P `3_3) |^ 2)) * (Q `3_3)) * ((((R `2_3) |^ 2) * (R `3_3)) - ((((R `1_3) |^ 3) + (((z `1) * (R `1_3)) * ((R `3_3) |^ 2))) + ((z `2) * ((R `3_3) |^ 3)))) = 0. (GF p)
theorem Th59:
for
p being 5
_or_greater Prime for
z being
Element of
EC_WParam p for
g2,
g3,
g4,
g8,
gf1,
gf2,
gf3,
gf4 being
Element of
(GF p) for
P being
Element of
EC_SetProjCo (
(z `1),
(z `2),
p)
for
R being
Element of
[: the carrier of (GF p), the carrier of (GF p), the carrier of (GF p):] st
g2 = 2
mod p &
g3 = 3
mod p &
g4 = 4
mod p &
g8 = 8
mod p &
gf1 = ((z `1) * ((P `3_3) |^ 2)) + (g3 * ((P `1_3) |^ 2)) &
gf2 = (P `2_3) * (P `3_3) &
gf3 = ((P `1_3) * (P `2_3)) * gf2 &
gf4 = (gf1 |^ 2) - (g8 * gf3) &
R = [((g2 * gf4) * gf2),((gf1 * ((g4 * gf3) - gf4)) - ((g8 * ((P `2_3) |^ 2)) * (gf2 |^ 2))),(g8 * (gf2 |^ 3))] holds
((g2 * gf2) * (P `3_3)) * (R `2_3) = - ((gf1 * (((P `3_3) * (R `1_3)) - ((P `1_3) * (R `3_3)))) + (((g2 * gf2) * (P `2_3)) * (R `3_3)))
theorem Th60:
for
p being 5
_or_greater Prime for
z being
Element of
EC_WParam p for
g2,
g3,
g4,
g8,
gf1,
gf2,
gf3,
gf4 being
Element of
(GF p) for
P being
Element of
EC_SetProjCo (
(z `1),
(z `2),
p)
for
R being
Element of
[: the carrier of (GF p), the carrier of (GF p), the carrier of (GF p):] st
g2 = 2
mod p &
g3 = 3
mod p &
g4 = 4
mod p &
g8 = 8
mod p &
gf1 = ((z `1) * ((P `3_3) |^ 2)) + (g3 * ((P `1_3) |^ 2)) &
gf2 = (P `2_3) * (P `3_3) &
gf3 = ((P `1_3) * (P `2_3)) * gf2 &
gf4 = (gf1 |^ 2) - (g8 * gf3) &
R = [((g2 * gf4) * gf2),((gf1 * ((g4 * gf3) - gf4)) - ((g8 * ((P `2_3) |^ 2)) * (gf2 |^ 2))),(g8 * (gf2 |^ 3))] holds
((g4 * (gf2 |^ 2)) * (P `3_3)) * (R `1_3) = (R `3_3) * (((gf1 |^ 2) * (P `3_3)) - ((g8 * (gf2 |^ 2)) * (P `1_3)))
theorem Th61:
for
p being 5
_or_greater Prime for
z being
Element of
EC_WParam p for
g2,
g3,
g4,
g8,
gf1,
gf2,
gf3,
gf4 being
Element of
(GF p) for
P being
Element of
EC_SetProjCo (
(z `1),
(z `2),
p)
for
R being
Element of
[: the carrier of (GF p), the carrier of (GF p), the carrier of (GF p):] st
g2 = 2
mod p &
g3 = 3
mod p &
g4 = 4
mod p &
g8 = 8
mod p &
gf1 = ((z `1) * ((P `3_3) |^ 2)) + (g3 * ((P `1_3) |^ 2)) &
gf2 = (P `2_3) * (P `3_3) &
gf3 = ((P `1_3) * (P `2_3)) * gf2 &
gf4 = (gf1 |^ 2) - (g8 * gf3) &
R = [((g2 * gf4) * gf2),((gf1 * ((g4 * gf3) - gf4)) - ((g8 * ((P `2_3) |^ 2)) * (gf2 |^ 2))),(g8 * (gf2 |^ 3))] holds
((g4 * (gf2 |^ 2)) * ((P `3_3) |^ 2)) * ((z `2) * (R `3_3)) = ((R `3_3) * ((((g2 * gf2) * (P `2_3)) - (gf1 * (P `1_3))) |^ 2)) - (((g4 * (gf2 |^ 2)) * ((P `1_3) |^ 2)) * (R `1_3))
theorem Th62:
for
p being 5
_or_greater Prime for
z being
Element of
EC_WParam p for
g2,
g3,
g4,
g8,
gf1,
gf2,
gf3,
gf4 being
Element of
(GF p) for
P being
Element of
EC_SetProjCo (
(z `1),
(z `2),
p)
for
R being
Element of
[: the carrier of (GF p), the carrier of (GF p), the carrier of (GF p):] st
g2 = 2
mod p &
g3 = 3
mod p &
g4 = 4
mod p &
g8 = 8
mod p &
gf1 = ((z `1) * ((P `3_3) |^ 2)) + (g3 * ((P `1_3) |^ 2)) &
gf2 = (P `2_3) * (P `3_3) &
gf3 = ((P `1_3) * (P `2_3)) * gf2 &
gf4 = (gf1 |^ 2) - (g8 * gf3) &
R = [((g2 * gf4) * gf2),((gf1 * ((g4 * gf3) - gf4)) - ((g8 * ((P `2_3) |^ 2)) * (gf2 |^ 2))),(g8 * (gf2 |^ 3))] holds
((g2 * (gf2 |^ 2)) * ((P `3_3) |^ 2)) * ((z `1) * (R `3_3)) = (((gf1 * (P `3_3)) * (R `3_3)) * (((g2 * gf2) * (P `2_3)) - (gf1 * (P `1_3)))) + ((gf2 |^ 2) * ((((g4 * (P `1_3)) * (P `3_3)) * (R `1_3)) + ((g2 * ((P `1_3) |^ 2)) * (R `3_3))))
theorem Th63:
for
p being 5
_or_greater Prime for
z being
Element of
EC_WParam p for
g2,
g3,
g4,
g8,
gf1,
gf2,
gf3,
gf4 being
Element of
(GF p) for
P being
Element of
EC_SetProjCo (
(z `1),
(z `2),
p)
for
R being
Element of
[: the carrier of (GF p), the carrier of (GF p), the carrier of (GF p):] st
g2 = 2
mod p &
g3 = 3
mod p &
g4 = 4
mod p &
g8 = 8
mod p &
gf1 = ((z `1) * ((P `3_3) |^ 2)) + (g3 * ((P `1_3) |^ 2)) &
gf2 = (P `2_3) * (P `3_3) &
gf3 = ((P `1_3) * (P `2_3)) * gf2 &
gf4 = (gf1 |^ 2) - (g8 * gf3) &
R = [((g2 * gf4) * gf2),((gf1 * ((g4 * gf3) - gf4)) - ((g8 * ((P `2_3) |^ 2)) * (gf2 |^ 2))),(g8 * (gf2 |^ 3))] holds
((g4 * (gf2 |^ 2)) * ((P `3_3) |^ 2)) * ((((R `2_3) |^ 2) * (R `3_3)) - ((((R `1_3) |^ 3) + (((z `1) * (R `1_3)) * ((R `3_3) |^ 2))) + ((z `2) * ((R `3_3) |^ 3)))) = 0. (GF p)
definition
let p be 5
_or_greater Prime;
let z be
Element of
EC_WParam p;
func addell_ProjCo (
z,
p)
-> Function of
[:(EC_SetProjCo ((z `1),(z `2),p)),(EC_SetProjCo ((z `1),(z `2),p)):],
(EC_SetProjCo ((z `1),(z `2),p)) means
for
P,
Q,
O being
Element of
EC_SetProjCo (
(z `1),
(z `2),
p) st
O = [0,1,0] holds
( (
P _EQ_ O implies
it . (
P,
Q)
= Q ) & (
Q _EQ_ O & not
P _EQ_ O implies
it . (
P,
Q)
= P ) & ( not
P _EQ_ O & not
Q _EQ_ O & not
P _EQ_ Q implies for
g2,
gf1,
gf2,
gf3 being
Element of
(GF p) st
g2 = 2
mod p &
gf1 = ((Q `2_3) * (P `3_3)) - ((P `2_3) * (Q `3_3)) &
gf2 = ((Q `1_3) * (P `3_3)) - ((P `1_3) * (Q `3_3)) &
gf3 = ((((gf1 |^ 2) * (P `3_3)) * (Q `3_3)) - (gf2 |^ 3)) - (((g2 * (gf2 |^ 2)) * (P `1_3)) * (Q `3_3)) holds
it . (
P,
Q)
= [(gf2 * gf3),((gf1 * ((((gf2 |^ 2) * (P `1_3)) * (Q `3_3)) - gf3)) - (((gf2 |^ 3) * (P `2_3)) * (Q `3_3))),(((gf2 |^ 3) * (P `3_3)) * (Q `3_3))] ) & ( not
P _EQ_ O & not
Q _EQ_ O &
P _EQ_ Q implies for
g2,
g3,
g4,
g8,
gf1,
gf2,
gf3,
gf4 being
Element of
(GF p) st
g2 = 2
mod p &
g3 = 3
mod p &
g4 = 4
mod p &
g8 = 8
mod p &
gf1 = ((z `1) * ((P `3_3) |^ 2)) + (g3 * ((P `1_3) |^ 2)) &
gf2 = (P `2_3) * (P `3_3) &
gf3 = ((P `1_3) * (P `2_3)) * gf2 &
gf4 = (gf1 |^ 2) - (g8 * gf3) holds
it . (
P,
Q)
= [((g2 * gf4) * gf2),((gf1 * ((g4 * gf3) - gf4)) - ((g8 * ((P `2_3) |^ 2)) * (gf2 |^ 2))),(g8 * (gf2 |^ 3))] ) );
existence
ex b1 being Function of [:(EC_SetProjCo ((z `1),(z `2),p)),(EC_SetProjCo ((z `1),(z `2),p)):],(EC_SetProjCo ((z `1),(z `2),p)) st
for P, Q, O being Element of EC_SetProjCo ((z `1),(z `2),p) st O = [0,1,0] holds
( ( P _EQ_ O implies b1 . (P,Q) = Q ) & ( Q _EQ_ O & not P _EQ_ O implies b1 . (P,Q) = P ) & ( not P _EQ_ O & not Q _EQ_ O & not P _EQ_ Q implies for g2, gf1, gf2, gf3 being Element of (GF p) st g2 = 2 mod p & gf1 = ((Q `2_3) * (P `3_3)) - ((P `2_3) * (Q `3_3)) & gf2 = ((Q `1_3) * (P `3_3)) - ((P `1_3) * (Q `3_3)) & gf3 = ((((gf1 |^ 2) * (P `3_3)) * (Q `3_3)) - (gf2 |^ 3)) - (((g2 * (gf2 |^ 2)) * (P `1_3)) * (Q `3_3)) holds
b1 . (P,Q) = [(gf2 * gf3),((gf1 * ((((gf2 |^ 2) * (P `1_3)) * (Q `3_3)) - gf3)) - (((gf2 |^ 3) * (P `2_3)) * (Q `3_3))),(((gf2 |^ 3) * (P `3_3)) * (Q `3_3))] ) & ( not P _EQ_ O & not Q _EQ_ O & P _EQ_ Q implies for g2, g3, g4, g8, gf1, gf2, gf3, gf4 being Element of (GF p) st g2 = 2 mod p & g3 = 3 mod p & g4 = 4 mod p & g8 = 8 mod p & gf1 = ((z `1) * ((P `3_3) |^ 2)) + (g3 * ((P `1_3) |^ 2)) & gf2 = (P `2_3) * (P `3_3) & gf3 = ((P `1_3) * (P `2_3)) * gf2 & gf4 = (gf1 |^ 2) - (g8 * gf3) holds
b1 . (P,Q) = [((g2 * gf4) * gf2),((gf1 * ((g4 * gf3) - gf4)) - ((g8 * ((P `2_3) |^ 2)) * (gf2 |^ 2))),(g8 * (gf2 |^ 3))] ) )
uniqueness
for b1, b2 being Function of [:(EC_SetProjCo ((z `1),(z `2),p)),(EC_SetProjCo ((z `1),(z `2),p)):],(EC_SetProjCo ((z `1),(z `2),p)) st ( for P, Q, O being Element of EC_SetProjCo ((z `1),(z `2),p) st O = [0,1,0] holds
( ( P _EQ_ O implies b1 . (P,Q) = Q ) & ( Q _EQ_ O & not P _EQ_ O implies b1 . (P,Q) = P ) & ( not P _EQ_ O & not Q _EQ_ O & not P _EQ_ Q implies for g2, gf1, gf2, gf3 being Element of (GF p) st g2 = 2 mod p & gf1 = ((Q `2_3) * (P `3_3)) - ((P `2_3) * (Q `3_3)) & gf2 = ((Q `1_3) * (P `3_3)) - ((P `1_3) * (Q `3_3)) & gf3 = ((((gf1 |^ 2) * (P `3_3)) * (Q `3_3)) - (gf2 |^ 3)) - (((g2 * (gf2 |^ 2)) * (P `1_3)) * (Q `3_3)) holds
b1 . (P,Q) = [(gf2 * gf3),((gf1 * ((((gf2 |^ 2) * (P `1_3)) * (Q `3_3)) - gf3)) - (((gf2 |^ 3) * (P `2_3)) * (Q `3_3))),(((gf2 |^ 3) * (P `3_3)) * (Q `3_3))] ) & ( not P _EQ_ O & not Q _EQ_ O & P _EQ_ Q implies for g2, g3, g4, g8, gf1, gf2, gf3, gf4 being Element of (GF p) st g2 = 2 mod p & g3 = 3 mod p & g4 = 4 mod p & g8 = 8 mod p & gf1 = ((z `1) * ((P `3_3) |^ 2)) + (g3 * ((P `1_3) |^ 2)) & gf2 = (P `2_3) * (P `3_3) & gf3 = ((P `1_3) * (P `2_3)) * gf2 & gf4 = (gf1 |^ 2) - (g8 * gf3) holds
b1 . (P,Q) = [((g2 * gf4) * gf2),((gf1 * ((g4 * gf3) - gf4)) - ((g8 * ((P `2_3) |^ 2)) * (gf2 |^ 2))),(g8 * (gf2 |^ 3))] ) ) ) & ( for P, Q, O being Element of EC_SetProjCo ((z `1),(z `2),p) st O = [0,1,0] holds
( ( P _EQ_ O implies b2 . (P,Q) = Q ) & ( Q _EQ_ O & not P _EQ_ O implies b2 . (P,Q) = P ) & ( not P _EQ_ O & not Q _EQ_ O & not P _EQ_ Q implies for g2, gf1, gf2, gf3 being Element of (GF p) st g2 = 2 mod p & gf1 = ((Q `2_3) * (P `3_3)) - ((P `2_3) * (Q `3_3)) & gf2 = ((Q `1_3) * (P `3_3)) - ((P `1_3) * (Q `3_3)) & gf3 = ((((gf1 |^ 2) * (P `3_3)) * (Q `3_3)) - (gf2 |^ 3)) - (((g2 * (gf2 |^ 2)) * (P `1_3)) * (Q `3_3)) holds
b2 . (P,Q) = [(gf2 * gf3),((gf1 * ((((gf2 |^ 2) * (P `1_3)) * (Q `3_3)) - gf3)) - (((gf2 |^ 3) * (P `2_3)) * (Q `3_3))),(((gf2 |^ 3) * (P `3_3)) * (Q `3_3))] ) & ( not P _EQ_ O & not Q _EQ_ O & P _EQ_ Q implies for g2, g3, g4, g8, gf1, gf2, gf3, gf4 being Element of (GF p) st g2 = 2 mod p & g3 = 3 mod p & g4 = 4 mod p & g8 = 8 mod p & gf1 = ((z `1) * ((P `3_3) |^ 2)) + (g3 * ((P `1_3) |^ 2)) & gf2 = (P `2_3) * (P `3_3) & gf3 = ((P `1_3) * (P `2_3)) * gf2 & gf4 = (gf1 |^ 2) - (g8 * gf3) holds
b2 . (P,Q) = [((g2 * gf4) * gf2),((gf1 * ((g4 * gf3) - gf4)) - ((g8 * ((P `2_3) |^ 2)) * (gf2 |^ 2))),(g8 * (gf2 |^ 3))] ) ) ) holds
b1 = b2
end;
::
deftheorem defines
addell_ProjCo EC_PF_2:def 9 :
for p being 5 _or_greater Prime
for z being Element of EC_WParam p
for b3 being Function of [:(EC_SetProjCo ((z `1),(z `2),p)),(EC_SetProjCo ((z `1),(z `2),p)):],(EC_SetProjCo ((z `1),(z `2),p)) holds
( b3 = addell_ProjCo (z,p) iff for P, Q, O being Element of EC_SetProjCo ((z `1),(z `2),p) st O = [0,1,0] holds
( ( P _EQ_ O implies b3 . (P,Q) = Q ) & ( Q _EQ_ O & not P _EQ_ O implies b3 . (P,Q) = P ) & ( not P _EQ_ O & not Q _EQ_ O & not P _EQ_ Q implies for g2, gf1, gf2, gf3 being Element of (GF p) st g2 = 2 mod p & gf1 = ((Q `2_3) * (P `3_3)) - ((P `2_3) * (Q `3_3)) & gf2 = ((Q `1_3) * (P `3_3)) - ((P `1_3) * (Q `3_3)) & gf3 = ((((gf1 |^ 2) * (P `3_3)) * (Q `3_3)) - (gf2 |^ 3)) - (((g2 * (gf2 |^ 2)) * (P `1_3)) * (Q `3_3)) holds
b3 . (P,Q) = [(gf2 * gf3),((gf1 * ((((gf2 |^ 2) * (P `1_3)) * (Q `3_3)) - gf3)) - (((gf2 |^ 3) * (P `2_3)) * (Q `3_3))),(((gf2 |^ 3) * (P `3_3)) * (Q `3_3))] ) & ( not P _EQ_ O & not Q _EQ_ O & P _EQ_ Q implies for g2, g3, g4, g8, gf1, gf2, gf3, gf4 being Element of (GF p) st g2 = 2 mod p & g3 = 3 mod p & g4 = 4 mod p & g8 = 8 mod p & gf1 = ((z `1) * ((P `3_3) |^ 2)) + (g3 * ((P `1_3) |^ 2)) & gf2 = (P `2_3) * (P `3_3) & gf3 = ((P `1_3) * (P `2_3)) * gf2 & gf4 = (gf1 |^ 2) - (g8 * gf3) holds
b3 . (P,Q) = [((g2 * gf4) * gf2),((gf1 * ((g4 * gf3) - gf4)) - ((g8 * ((P `2_3) |^ 2)) * (gf2 |^ 2))),(g8 * (gf2 |^ 3))] ) ) );
definition
let p be 5
_or_greater Prime;
let z be
Element of
EC_WParam p;
let F be
Function of
[:(EC_SetProjCo ((z `1),(z `2),p)),(EC_SetProjCo ((z `1),(z `2),p)):],
(EC_SetProjCo ((z `1),(z `2),p));
let Q,
R be
Element of
EC_SetProjCo (
(z `1),
(z `2),
p);
.redefine func F . (
Q,
R)
-> Element of
EC_SetProjCo (
(z `1),
(z `2),
p);
correctness
coherence
F . (Q,R) is Element of EC_SetProjCo ((z `1),(z `2),p);
end;