%% This document created by Scientific Word (R) Version 2.5
%% Starting shell: article


\documentclass[12pt,fleqn]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\usepackage{sw20lart}

%TCIDATA{TCIstyle=article/art4.lat,lart,article}

%TCIDATA{Created=Sun Feb 07 13:01:38 1999}
%TCIDATA{LastRevised=Wed Feb 02 11:56:11 2000}

%\input{tcilatex}
\begin{document}

\author{Emanuela Ughi}
\title{Searching algebraic conditions using MAGMA}
\date{}
\newtheorem{deff}{Definition}[section]

\maketitle

\begin{abstract}
An algebraic condition about points which are covered by a secant of certain
arcs is obtained using MAGMA
\end{abstract}

\section{Notations}

Throughout this paper, $p$ is an odd prime, $p\equiv 3(4)$, so that -1 is a
non square in $GF(q)$; $q=p^{2}$, so that $GF(q)=GF(p)(i)$ , where $i^{2}=-1$%
; the generic element of $GF(q)$ will be written as $a+ib$, where $a,b\in
GF(p)$.

We will perform our construction in $AG(2,q)$, and we will consider also $%
AG(2,q)$ as a subset of $PG(2,q)$ in the usual manner.

Now, let $Q$ be a fixed point of $AG(2,q)$, $Q=(x_{1}+ix_{2},y_{1}+iy_{2}).$

We will suppose that $Q\notin $ axes $X=0,Y=0$, so that $(x_{1},x_{2})\neq
\left( 0,0\right) $ and $(y_{1},y_{2})\neq \left( 0,0\right) .$

\begin{deff}
\[
K(Q)=\left\{ \left( \rho \left( x_{1}+ix_{2}\right) ,\frac{1}{\rho }\left(
y_{1}+iy_{2}\right) \right) |\rho \in GF(p)^{{}}\right\} 
\]
\end{deff}

\begin{deff}
\[
K^{\prime }(Q)=K(Q)\cup X_{\infty }\cup Y_{\infty }
\]
\end{deff}

\section{The problem}

Given points 
\[
Q=\left( x_{1}+ix_{2},y_{1}+iy_{2}\right) 
\]
\smallskip 
\[
P=\left( x+iy,z+it\right) 
\]
let us suppose that $P$ is such that 
\[
zy_{2}-ty_{1}\neq 0\rm{ and }xx_{2}-yx_{1}\neq 0 
\]
(This hypothesis corresponds to the fact that $P$ does not belong to any one
of horizontal or vertical lines touching $K(Q)$ ). 
\[
\]
When $P$ is covered by a secant of $K(Q)$ ? 
\[
\]
Here I used the program logq1.doc (appended) to prove that

\[
P\rm{ is covered by a secant of }K(Q)\rm{ }\Leftrightarrow \rm{ }delta%
\rm{ is a square in }GF(p) 
\]
where

$delta$ :=(x\symbol{94}2*z\symbol{94}2*x1\symbol{94}2*y2\symbol{94}2 - 2*x%
\symbol{94}2*z\symbol{94}2*x1*y1*x2*y2 + x\symbol{94}2*z\symbol{94}2*y1%
\symbol{94}2*x2\symbol{94}2 -

2*x\symbol{94}2*z*t*x1\symbol{94}2*y1*y2 + 2*x\symbol{94}2*z*t*x1*y1\symbol{%
94}2*x2 - 2*x\symbol{94}2*z*t*x1*x2*y2\symbol{94}2 +

2*x\symbol{94}2*z*t*y1*x2\symbol{94}2*y2 + x\symbol{94}2*t\symbol{94}2*x1%
\symbol{94}2*y1\symbol{94}2 + 2*x\symbol{94}2*t\symbol{94}2*x1*y1*x2*y2 +

x\symbol{94}2*t\symbol{94}2*x2\symbol{94}2*y2\symbol{94}2 + 2*x*y*z\symbol{94%
}2*x1\symbol{94}2*y1*y2 - 2*x*y*z\symbol{94}2*x1*y1\symbol{94}2*x2 +

2*x*y*z\symbol{94}2*x1*x2*y2\symbol{94}2 - 2*x*y*z\symbol{94}2*y1*x2\symbol{%
94}2*y2 - 2*x*y*z*t*x1\symbol{94}2*y1\symbol{94}2 +

2*x*y*z*t*x1\symbol{94}2*y2\symbol{94}2 - 8*x*y*z*t*x1*y1*x2*y2 +
2*x*y*z*t*y1\symbol{94}2*x2\symbol{94}2 -

2*x*y*z*t*x2\symbol{94}2*y2\symbol{94}2 - 2*x*y*t\symbol{94}2*x1\symbol{94}%
2*y1*y2 + 2*x*y*t\symbol{94}2*x1*y1\symbol{94}2*x2 -

2*x*y*t\symbol{94}2*x1*x2*y2\symbol{94}2 + 2*x*y*t\symbol{94}2*y1*x2\symbol{%
94}2*y2 + 4*x*z*x1\symbol{94}2*y1\symbol{94}2*x2*y2 +

4*x*z*x1\symbol{94}2*x2*y2\symbol{94}3 + 4*x*z*y1\symbol{94}2*x2\symbol{94}%
3*y2 + 4*x*z*x2\symbol{94}3*y2\symbol{94}3 -

4*x*t*x1\symbol{94}2*y1\symbol{94}3*x2 - 4*x*t*x1\symbol{94}2*y1*x2*y2%
\symbol{94}2 - 4*x*t*y1\symbol{94}3*x2\symbol{94}3 -

4*x*t*y1*x2\symbol{94}3*y2\symbol{94}2 + y\symbol{94}2*z\symbol{94}2*x1%
\symbol{94}2*y1\symbol{94}2 + 2*y\symbol{94}2*z\symbol{94}2*x1*y1*x2*y2 +

y\symbol{94}2*z\symbol{94}2*x2\symbol{94}2*y2\symbol{94}2 + 2*y\symbol{94}%
2*z*t*x1\symbol{94}2*y1*y2 - 2*y\symbol{94}2*z*t*x1*y1\symbol{94}2*x2 +

2*y\symbol{94}2*z*t*x1*x2*y2\symbol{94}2 - 2*y\symbol{94}2*z*t*y1*x2\symbol{%
94}2*y2 + y\symbol{94}2*t\symbol{94}2*x1\symbol{94}2*y2\symbol{94}2 -

2*y\symbol{94}2*t\symbol{94}2*x1*y1*x2*y2 + y\symbol{94}2*t\symbol{94}2*y1%
\symbol{94}2*x2\symbol{94}2 - 4*y*z*x1\symbol{94}3*y1\symbol{94}2*y2 -

4*y*z*x1\symbol{94}3*y2\symbol{94}3 - 4*y*z*x1*y1\symbol{94}2*x2\symbol{94}%
2*y2 - 4*y*z*x1*x2\symbol{94}2*y2\symbol{94}3 +

4*y*t*x1\symbol{94}3*y1\symbol{94}3 + 4*y*t*x1\symbol{94}3*y1*y2\symbol{94}2
+ 4*y*t*x1*y1\symbol{94}3*x2\symbol{94}2 +

4*y*t*x1*y1*x2\symbol{94}2*y2\symbol{94}2)

Moreover,

\[
delta\rm{ = 0 }\Leftrightarrow \rm{ }P\rm{ belongs to a tangent to }C%
\rm{ in a point of }K(Q) 
\]
The idea is that 2 distinct points of $K(Q)$ covering by their secant $P$
correspond to 2 distinct solutions (in $b$) (in $GF(p)$) of the equation 
\[
rr=Resultant(ff,ee,a)=0 
\]
so that

rr = x*z*b*x1*y2 - x*z*b*y1*x2 - x*t*b*x1*y1 - x*t*b*x2*y2 + x*y1\symbol{94}%
2*x2 + x*x2*y2\symbol{94}2 +

y*z*b*x1*y1 + y*z*b*x2*y2 + y*t*b*x1*y2 - y*t*b*y1*x2 - y*x1*y1\symbol{94}2 -

y*x1*y2\symbol{94}2 - z*b\symbol{94}2*x1\symbol{94}2*y2 - z*b\symbol{94}2*x2%
\symbol{94}2*y2 + t*b\symbol{94}2*x1\symbol{94}2*y1 + t*b\symbol{94}2*y1*x2%
\symbol{94}2 
\[
\]

and that 2 distinct such solutions exist $\Leftrightarrow $

$\Leftrightarrow $ discriminant of $rr=0$ respect to $b=delta$ = square in $%
GF(p)$

The idea works when

1) $qw1=Coefficient(ff,a,1)$ and $qw2=Coefficient(ee,a,1)$ are not both 0

2) $rr$ has actually degree 2.

In this case indeed the condition '$rr=0$' is equivalent to the condition :

\[
\rm{ the sistem }\left\{ 
\begin{array}{l}
ee=0 \\ 
ff=0
\end{array}
\right. \rm{ \qquad has some solutions in }GF(p)\times GF(p) 
\]
We must remark that the equation $rr=0$ can not have the solution 0, because

\[
Factorization(Evaluate(rr,b,0))=(y_{1}^{2}+y_{_{2}}^{2})(xx_{2}-yx_{1}) 
\]
which is $\neq 0$ in our hypothesis, because ($y_{1}^{2}+y_{2}^{2})\neq 0$
because -1 is a non square in $GF(p)$. Moreover, the secant we are looking
for does exist if and and only if $rr=0$ has 2 distinct solutions. 
\[
\]

Proof of 1) 
\[
Factorization(Resultant(qw1,qw2,b))=(x_{1}^{2}+x_{2}^{2})*(zy_{2}-ty_{1}) 
\]
which is $\neq 0$ in our hypothesis, because ($x_{1}^{2}+x_{2}^{2})\neq 0$
because -1 is a non square in $GF(p)$.

Here again we must control that the process works, that is to say that $%
(er1,er2)\neq \left( 0,0\right) $, where 
\[
er1=Coefficient(qw1,b,1)\rm{ and }er2=Coefficient(qw2,b,1). 
\]
Let us suppose by absurd that they are both 0.Then 
\[
\left\{ 
\begin{array}{l}
er1\rm{=}-zx_{1}+tx_{2}=0 \\ 
er2\rm{=}-zx_{2}-tx_{1}=0
\end{array}
\right. \rm{ } 
\]
but $(z,t)\neq (0,0)$, so by Cramer's rule ($x_{1}^{2}+x_{2}^{2})=0$ , which
is absurd. 
\[
\]

Proof of 2) 
\[
Factorization(h)=Factorization(Coefficient(rr,b,2))=(x_{1}^{2}+x_{2}^{2})*(zy_{2}-ty_{1})\neq 0 
\]
Let us recall our hypothesis on $P$: $P$ does not belong to horizontal or
vertical lines touching $K(Q)$.

Let $\Pi $ be the Baer subplane of $PG(2,q)$ containing $K^{\prime }(Q)$. $%
\Pi $ contains also all horizontal and vertical lines above.

Our point $P\notin \Pi $. So there is one and just one line r through $P$
which intersects $\Pi $ in a line $r^{\prime }=(r\cap \Pi )$ of $\Pi .$

Moreover, $r$ is not horizontal nor vertical, so that the equation $rr=0$
has 2 solutions $b_{1},b_{2}$ in $GF(p)$ or in a quadratic extension.Observe
that $K^{\prime }(Q)=C_{Q}\cap \Pi $ , then 
\[
delta\rm{ is a square in }GF(p)\rm{ }\Leftrightarrow b_{1},b_{2}\rm{
belong to }GF(p)\rm{ }\Leftrightarrow r^{\prime }\rm{ is secant }%
K^{\prime }(Q) 
\]
\[
delta\rm{ is a non-square in }GF(p)\rm{ }\Leftrightarrow b_{1},b_{2}%
\rm{ belong to }GF(q)\setminus GF(p\rm{) }\Leftrightarrow \rm{ }%
r^{\prime }\rm{ is external to }K^{\prime }(Q) 
\]
Then, 
\[
delta\rm{ = 0}\Leftrightarrow r^{\prime }\rm{ is tangent to }K(Q)\rm{ }%
\Leftrightarrow \rm{ }r\rm{ is tangent to }C\rm{ in a point of }K(Q) 
\]
\[
\]

\section{Logq1.doc}

B<x,y,z,t,a,b,x1,y1,x2,y2,i>
:=PolynomialRing(Integers(),11);

/*Put Q:=(x1+ix2,y1+iy2);when P(x+iy,z+it) is covered by secants of K(Q)?

We must look for 2 points Pa=(a(x1+ix2,(1/a)*(y1+iy2)),

and Pb=(b(x1+ix2,(1/b)*(y1+iy2)), such that P, Pa, Pb are on a line;

we are looking for 2 distinct solutions, with a, b different from 0*/

aa:=x+i*y-(a*x1+i*a*x2);

bb:=b*(a*(z+i*t)-(y1+i*y2));

cc:=x+i*y-(b*x1+i*b*x2);

dd:=a*(b*(z+i*t)-(y1+i*y2));

w:=aa*dd-bb*cc;

c1:=Coefficient(w,i,0);

c2:= Coefficient(w,i,1);

c3:= Coefficient(w,i,2); //OK because Degree(w,i)=2;

ww:=c1-c3+i*c2; //ww=0 gives the condition ''The points are on a line'';

print ww;

print '''';

print c1-c3; //real part of w;

print ''''; //imaginary part of w;

print c2;

print'''';

ff:=(c1-c3) div (a-b);

ee:=c2 div (a-b);

/*ff:=-x*y1 + y*y2 - z*a*b*x1 + t*a*b*x2 + a*x1*y1 - a*x2*y2 + b*x1*y1 -
b*x2*y2;

ee:=-x*y2 - y*y1 - z*a*b*x2 - t*a*b*x1 + a*x1*y2 + a*y1*x2 + b*x1*y2 +
b*y1*x2;*/

rr:= Resultant(ff,ee,a);

/*/ polynomial of degree 2 in b; are there 2 distinct solutions in b?;*/

print rr;

h:=Coefficient(rr,b,2);

k:=Coefficient(rr,b,1);

j:=Coefficient(rr,b,0);

delta:=k*k-4*h*j;

print '''';

print delta;

print '''';

qw1:=Coefficient(ff,a,1);

qw2:=Coefficient(ee,a,1);

er1:=Coefficient(qw1,b,1);

er2:=Coefficient(qw2,b,1);

\end{document}
