Application Center - Maplesoft

App Preview:

QUADRATICINT - A MAPLE PACKAGE FOR WORKING WITH ELEMENTS OF Z[sqrt(d)]

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application




QUADRATICINT - A MAPLE PACKAGE FOR WORKING WITH
ELEMENTS OF Z[sqrt(d)]O. O. Trebenko, N. M. Tsybulska

(National Pedagogical Dragomanov University, Kyiv, Ukraine)

 

March 18, 2016

Abstract

This paper presents the description of the package for working with elements of  Z[sqrt(d)]  where d <> 1  is a squarefree integer. Given in the paper are the program codes of package commands and examples. Developed software will be useful for specialists in the field of abstract algebra and applications.

Key words: Computer algebra, symbolic computation, algebraic number theory, ring theory, rings of integers of algebraic number fields, rings  Z[sqrt(d)].

Mathematics Subject Classification (2010): 11R04, 11R11, 11Y40, 11Y70

 

1. INTRODUCTION

Recently, attention to research of the rings Z[sqrt(d)] rapidly increases. Primarily, this is due to the search for the solution of many unresolved problems raised within the algebraic theory, which today is extremely important to modern mathematics. In addition, there is an applied interest for algebraic numbers have a broad application, especially in cryptography (code Hill) and topology.

In applications of algebraic numbers (especially in cryptography) it is more often needed to decompose numbers into the prime factors not in rings  O[Q[sqrt(d)]], but in  Z[sqrt(d)]. Note that by  Z[sqrt(d)] we mean the minimal ring containing Z and the element  sqrt(d), namely the ring " Z[sqrt(d)]={a+bsqrt(d)|a,b in Z}". The ring  Z[sqrt(d)]  coincides with the ring O[Q[sqrt(d)]]  when "d&equiv;2,3(mod 4)"  and is its proper subring when  "d&equiv;1(mod 4)".

Due to the above, modern theoretical research in algebraic number theory and applications need a special package/module for working with elements of  Z[sqrt(d)] . But, unfortunately, existing SCM don’t contain such package.  

As a result of investigations of quadratic number rings properties [1]-[4] authors have developed some procedures that could be useful for the following investigation and for applications.  

The authors created such a package for SCM Maple. This paper presents the characterization of the package, gives the program codes and examples.

 

2. THE STRUCTURE OF THE PACKAGE QUADRATICINT

 

Calling Sequence

QuadraticInt[command](arguments)

command(arguments)

Description

•           The QuadraticInt package is a collection of commands for working with elements of the principal ideal ring  Z[sqrt(d)], where d <> 1 is a squarefree integer.

•           Note that by Z[sqrt(d)]  we mean the minimal ring containing Z and the element  sqrt(d), namely the ring  "Z[sqrt(d)]={a+bsqrt(d)|a,b in Z}". The ring Z[sqrt(d)]  coincides with the ring  O[Q[sqrt(d)]] when  "d&equiv;2,3(mod 4)" and is its proper subring when "d&equiv;1(mod 4)" .

List of QuadraticInt Package Commands

Let d <> 1  and let  Z[sqrt(d)] be a ring of principal ideals. The following is a list of available commands:

1. SGIiselementof(a,d): determines whether the element belongs to some ring Z[sqrt(d)]  and returns  d.

2. SGInorm(a,d): returns the norm of the element  a  in  Z[sqrt(d)].

3. SGInormal(x,d): returns the element  x  if -(1/2)*Pi <= Argx and Argx <= (1/2)*Pi and returns the element  -x  if (1/2)*Pi < Argx and Argx < 3*Pi*(1/2) (is used to provide the uniqueness of the result in the following procedures).

4. SGIquo(y1,y2,d,’r’): returns the quotient of  y[1] divided by y[2] in  Z[sqrt(d)]. The third argument is optional. If it is included in the calling sequence for SGIquo, it will be assigned the remainder  r.

5. SGIrem(a,b,d,’q’): returns remainder of  y[1] divided by y[2] in  Z[sqrt(d)]. If a third argument is included in the calling sequence for SGIrem, it will be assigned the quotient q.

6. SGIgcd(a,d): computes the greatest common divisor of an arbitrary number of elements in  Z[sqrt(d)].

7. SGIlcm(a,d): computes the least common multiply of an arbitrary number of elements.

8. SGIlrgcd(a1,b1,d): returns  q= SGIgcd({a1,b1}, d), and optionally [s, t] such that  q = s*a[1]+t*b[1].

9. SGIisprime(n,d): is a primality testing routine. It returns true if  n  is prime in  Z[sqrt(d)]. It returns false otherwise.

10. SGIfactor(n,d): factorization of  n  in  Z[sqrt(d)].

11. SGIfacset(n,d): computes the set of prime factors of the element  `in`(n, Z[sqrt(d)]).

12. SGIfactors(n,d): factorization is returned in the form  [epsilon, [[p[1], k[1]], () .. (), [p[m], k[m]]]]  where  "n=epsilon*p[1]^(k[1])*...*p[m]^(k[m])",  p[i] – prime elements,  k[i] – their multiplicities,   epsilon – some unit.

13. SGIdivisor(a,d): computes the set of all divisors of  a (up to associates).

14. SGIphi(u,d): calculates Euler function for  `in`(u, `minus`(Z[sqrt(d)], {0})).

15. SGIorder(n,m,d): order of  `in`(n, `minus`(Z[sqrt(d)], {0}))  modulo  `in`(m, `minus`(Z[sqrt(d)], {0})).

16. SGIbasis(x,y,d): determines whether the elements  x,  y  form a basis of vector space  Z[sqrt(d)].

17. SGIissqr(n,d): test if  n  in  Z[sqrt(d)]  is a perfect square.

18. SGIareassociated(a,b,d): test if  a  and  b  are associates in  Z[sqrt(d)].

 

with(QuadraticInt)

[SGIareassociated, SGIbasis, SGIdivisor, SGIfacset, SGIfactor, SGIfactors, SGIgcd, SGIiselementof, SGIisprime, SGIissqr, SGIlcm, SGIlrgcd, SGImod, SGInorm, SGInormal, SGIorder, SGIphi, SGIquo, SGIrem]

(1)

 

3. DESCRIPTION OF QUADRATINT PACKAGE PROCEDURES

``

QuadraticInt[SGIiselementof] - determines whether the element belongs to some ring  Z[sqrt(d)] and returns d  `` 

Calling Sequence

SGIiselementof(a, d)

Parameters

a

-

element of the principal ideal ring `or`(Z[sqrt(d)], set*of) elements of  the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

d

-

squarefree integer ("d<>1)"

``

Description

• 

The SGIiselementof function determines whether the element belongs to some principal ideal ring  Z[sqrt(d)] where d <> 1 is a squarefree integer and returns d.

Examples

SGIiselementof({6, 1+4*sqrt(3), 2+3*sqrt(3)}, 3)

true

(1.4.1)

SGIiselementof({-7, 1+4*I, 2+3*I}, -1)

true

(1.4.2)

SGIiselementof({5, 2-3*sqrt(2)*I}, -2)

true

(1.4.3)

SGIiselementof({2-3*sqrt(5)*I}, -5)

true

(1.4.4)

SGIiselementof({6, 7, 1+4*sqrt(3), 2+3*sqrt(3)}, 3)

true

(1.4.5)

SGIiselementof({5, 6}, 3)

true

(1.4.6)

SGIiselementof({1+4*sqrt(2)*I, 2+3*sqrt(2)*I}, -2)

true

(1.4.7)

SGIiselementof(2, 2)

true

(1.4.8)

SGIiselementof(3*sqrt(3)*I, -3)

true

(1.4.9)

SGIiselementof({9, 1+3*I}, -1)

true

(1.4.10)

SGIiselementof({2+3*sqrt(2)*I, 3*sqrt(2)*I}, -2)

true

(1.4.11)

SGIiselementof({2, 3*sqrt(2)*I}, -2)

true

(1.4.12)

SGIiselementof({2, 1+4*sqrt(2)*I, 3*sqrt(2)*I}, -2)

true

(1.4.13)

SGIiselementof(sqrt(-2), -2)

true

(1.4.14)

SGIiselementof(-4/3+(5/3*I)*sqrt(2), -2)

false

(1.4.15)

SGIiselementof(3*sqrt(2), 2)

true

(1.4.16)

SGIiselementof(sqrt(2), 2)

true

(1.4.17)

SGIiselementof(4, 2)

true``

(1.4.18)

````

``

QuadraticInt[SGInorm] - norm of the element in Z[sqrt(d)] 

Calling Sequence

SGInorm(a,d)``

Parameters

a

-

element of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

d

-

squarefree integer ("d<>1)"

``

Description

• 

The SGInorm function computes the norm of the element a in the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer.

• 

The element a is a number of the form a = a[1]+a[2]*sqrt(d) where a[1] and  a[2] are integers, d <> 1 is a squarefree integer.

• 

The norm of the element a = a[1]+a[2]*sqrt(d) is defined as "||a||=(a[1]+a[2]*sqrt(d)) (a[1]-a[2]*sqrt(d))=|a[1]^(2)-d(*a[2])^(2)|".

Examples

SGInorm(2-3*sqrt(2), 2)

14

(2.4.1)

SGInorm(7*sqrt(3), 3)

147

(2.4.2)

SGInorm(9, 6)

81

(2.4.3)

SGInorm(1-5*sqrt(-3), -3)

76``

(2.4.4)

````

``

QuadraticInt[SGInormal] - Normalize the element in Z[sqrt(d)] 

Calling Sequence

SGInormal(x,d)

Parameters

x

-

element of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

d

-

squarefree integer ("d<>1)"

``

Description

• 

The SGInormal function returns the element "{[[x,-Pi/2<=Argx<=Pi/2,],[-x,Pi/2<Argx<(3 Pi)/2;]]" (the function is auxiliary for the following procedures) where x is an element of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer.  

Examples

SGInormal(2-3*sqrt(2)*I, -2)

2-(3*I)*2^(1/2)

(3.4.1)

SGInormal(-2-3*sqrt(2)*I, -2)

2+(3*I)*2^(1/2)

(3.4.2)

SGInormal(-I*sqrt(2), -2)

I*2^(1/2)

(3.4.3)

SGInormal(-sqrt(2), 2)

2^(1/2)

(3.4.4)

SGInormal(-2+3*sqrt(2), 2)

2-3*2^(1/2)

(3.4.5)

SGInormal(-2-3*sqrt(2), 2)

2+3*2^(1/2)

(3.4.6)

SGInormal(sqrt(2), 2)

2^(1/2)``

(3.4.7)

``````

``

QuadraticInt[SGIquo] - quotient  in  NULLZ[sqrt(d)] 

Calling Sequence

SGIquo(y1, y2, d), SGIquo(y1, y2, d, 'r')  

Parameters

y1

-

element of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

y2

-

element of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

d

-

squarefree integer ("d<>1)"

r

-

(optional) name

``

Description

• 

The SGIquo function returns the quotient of  y1 divided by y2 in the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer.

• 

The third argument is optional. If it is included in the calling sequence for SGIquo, it will be assigned the remainder r.

• 

The element y1 = a+b*sqrt(d) is divisible by the element y2 = c+f*sqrt(d) with the remainder in the ring Z[sqrt(d)] if abs(alpha^2-`d&beta;`^2) < 1 where alpha  and β are the fractional parts of (ac-bfd)/abs(-d*f^2+c^2) and  (bc-af)/abs(-d*f^2+c^2)"   respectively."

Examples

SGIquo(2+3*sqrt(2)*I, 1+4*sqrt(2)*I, -2, 'r'); r

1-I*2^(1/2)

(4.4.1)

SGIquo(1+8*sqrt(3)*I, 1+7*sqrt(3)*I, -3, 'r'); r

I*3^(1/2)

(4.4.2)

SGIquo(2+3*sqrt(2), 9+3*sqrt(2), 2, 'r'); r

2+3*2^(1/2)

(4.4.3)

SGIquo(3, 4, 2, 'r'); r

3

(4.4.4)

SGIquo(3, 2*sqrt(3)*I, -3, 'r'); r

3+(2*I)*3^(1/2)

(4.4.5)

SGIquo(3+3*I, 4, -1, 'r'); r

-1+3*I

(4.4.6)

SGIquo(2+3*sqrt(2)*I, 1+4*sqrt(2)*I, -2, 'r'); r

1-I*2^(1/2)

(4.4.7)

SGIquo(3*sqrt(2)*I, 4*sqrt(2)*I, -2, 'r'); r

-I*2^(1/2)

(4.4.8)

SGIquo(3, 4, 3, 'r'); r

3

(4.4.9)

SGIquo(4+3*sqrt(2), 1+2*sqrt(2), 2, 'r'); r

-1

(4.4.10)

SGIquo(3*I, 4+I, -1, 'r'); r

3*I``

(4.4.11)

````

``

QuadraticInt[SGIrem] - remainder in Z[sqrt(d)]  

Calling Sequence

SGIrem(a, b, d), SGIrem(a, b, d, 'q')  

Parameters

a, b

-

elements of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

d

-

squarefree integer ("d<>1)"

q

-

(optional) name

``

Description

• 

The SGIrem function returns the remainder of  a divided by b in the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer.

• 

If a third argument is included in the calling sequence for SGIrem, it will be assigned the quotient q.

Examples

SGIrem(2+3*sqrt(2)*I, 1+4*sqrt(2)*I, -2, 'q'); q

1

(5.4.1)

SGIrem(3*sqrt(2)*I, 4*sqrt(2)*I, -2, 'q'); q

1

(5.4.2)

SGIrem(3, 4, 3, 'q'); q

0

(5.4.3)

SGIrem(2+3*sqrt(2), 1+4*sqrt(2), 2, 'q'); q

1

(5.4.4)

SGIrem(3*sqrt(2), 7*sqrt(2), 2, 'q'); q

0

(5.4.5)

SGIrem(3, 2*sqrt(3)*I, -3)

3+(2*I)*3^(1/2)``

(5.4.6)

``````

``

QuadraticInt[SGIareassociated] – tests if a and b are associates in Z[sqrt(d)]

Calling Sequence

SGIareassociated(a, b, d)

Parameters

a, b

-

elements of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

d

-

squarefree integer ("d<>1)"

``

Description

• 

The SGIareassociated function tests if a and b are associated in the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer.

• 

The SGIareassociated function returns true if a and b are associated in the "Z[sqrt(d)],"false otherwise.

Examples

SGIareassociated(7+4*sqrt(2)*I, 1-I*sqrt(2), -2)

false``

(6.4.1)

SGIareassociated(2+3*sqrt(2), -2-3*sqrt(2), 2)

true

(6.4.2)

SGIareassociated(8+5*sqrt(3), 5-2*sqrt(3), 3)

false``

(6.4.3)

``````

``

QuadraticInt[SGIgcd] - gcd in Z[sqrt(d)] 

Calling Sequence

SGIgcd(a, d)

Parameters

a

-

set*of elements of  the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

d

-

squarefree integer ("d<>1)"

``

Description

• 

The SGIgcd function computes the greatest common divisor of an arbitrary number of elements in the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer.

• 

The SGIgcd function works correctly for all rings Z[sqrt(d)] which are principal ideal rings.

Examples

SGIgcd({3+5*sqrt(6), 7+4*sqrt(6)}, 6)

1

(7.4.1)

SGIgcd({1+4*sqrt(2)*I, 2+3*sqrt(2)*I}, -2)

1

(7.4.2)

SGIgcd({3*sqrt(2)*I, 4*sqrt(2)*I}, -2)

I*2^(1/2)

(7.4.3)

SGIgcd({3, 4}, 3)

1

(7.4.4)

SGIgcd({1+2*sqrt(2), 4+3*sqrt(2)}, 2)

1

(7.4.5)

SGIgcd({4+I, 3*I}, -1)

1``

(7.4.6)

``````

``

QuadraticInt[SGIlcm] - lcm in Z[sqrt(d)] 

Calling Sequence

SGIlcm(a, d)

Parameters

a

-

element of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

d

-

squarefree integer ("d<>1)"

``

Description

• 

The SGIlcm function computes the least common multiply of an arbitrary number of elements  in the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer.

• 

The SGIlcm function works correctly for all rings Z[sqrt(d)] which are principal ideal rings.

Examples

SGIlcm(2+3*sqrt(2)*I, -2)

6

(8.4.1)

SGIlcm({1+4*sqrt(2)*I, 1+5*sqrt(2)*I, 2+3*sqrt(2)*I}, -2)

132+(99*I)*2^(1/2)

(8.4.2)

SGIlcm({4+I, 4+3*I}, -1)

16``

(8.4.3)

``

QuadraticInt[SGIlrgcd] - returns g = SGIgcd(a1, b1, d) and optionally a couple [s,t] such that g=a1s+b1t in Z[sqrt(d)] 

Calling Sequence

SGIlrgcd(a1, b1, d)

Parameters

a1

-

element of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

b1

-

element of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

d

-

squarefree integer ("d<>1)"

``

Description

• 

The SGIlrgcd function returns g = SGIgcd(a1, b1, d), and optionally [s,t] such that g = a1*s+b1*t in the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer.

Examples

restart

with(QuadraticInt):

SGIlrgcd(-2+8*sqrt(2)*I, 2+3*sqrt(2)*I, -2);

[0, 1]

(9.4.1)

SGIlrgcd(9+3*sqrt(3), 2+7*sqrt(3), 3);

[1-3^(1/2), 1]

(9.4.2)

SGIlrgcd(11+sqrt(5), 1+2*sqrt(5), 5);

[1, -5^(1/2)]

(9.4.3)

SGIlrgcd(-31+5*sqrt(2)*I, 2+7*sqrt(2)*I, -2);

[-1+(2*I)*2^(1/2), 9+(2*I)*2^(1/2)]

(9.4.4)

SGIlrgcd(2+3*sqrt(2), 1+4*sqrt(2), 2);

[1, -1]

(9.4.5)

``````

``

QuadraticInt[SGIbasis] - basis test in Z[sqrt(d)] 

Calling Sequence

SGIbasis(x, y, d)

Parameters

x, y

-

elements of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

d

-

squarefree integer ("d<>1)"

``

Description

• 

The SGIbasis function determines whether the elements x, y form a basis of the vector space Z[sqrt(d)] being a principal ideal ring where d <> 1 is a squarefree integer.

• 

The SGIbasis function returns true if x and y form a basis of the principal ideal ring Z[sqrt(d)], false otherwise.

Examples

SGIbasis(2+3*sqrt(2)*I, 1+4*sqrt(2)*I, -2)

true

(10.4.1)

SGIbasis(2+sqrt(2), 6+3*sqrt(2), 2)

false``

(10.4.2)

````````

``

QuadraticInt[SGI`mod`] - the value modulo in Z[sqrt(d)] 

Calling Sequence

SGImod(a, m, d)

Parameters

a, m

-

elements of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

d

-

squarefree integer ("d<>1)"

``

Description

• 

The SGImod function for a given element a computes the element a modulo m in the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer.

• 

The value of the element a modulo m in the Z[sqrt(d)] coincides with the value of the function "SGIrem(a,m,d)."

Examples

SGImod(23+9*sqrt(2), 2, 2)

-1-2^(1/2)

(11.4.1)

SGImod(1+5*sqrt(-2), 45, -2)

1+(5*I)*2^(1/2)

(11.4.2)

SGImod(2+3*sqrt(2)*I, 1+4*sqrt(2)*I, -2)

1-I*2^(1/2)

(11.4.3)

SGImod(1+8*sqrt(3)*I, 1+7*sqrt(3)*I, -3)

I*3^(1/2)

(11.4.4)

SGImod(2+3*sqrt(2), 9+3*sqrt(2), 2)

2+3*2^(1/2)

(11.4.5)

SGImod(3, 2*sqrt(3)*I, -3)

3+(2*I)*3^(1/2)

(11.4.6)

SGImod(3+3*I, 4, -1)

-1+3*I``

(11.4.7)

````````

``

QuadraticInt[SGIisprime] - primality test in Z[sqrt(d)] 

Calling Sequence

SGIisprime(n, d)

Parameters

n

-

element of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

d

-

squarefree integer ("d<>1)"

``

Description

• 

The SGIisprime function is a primality testing routine. It returns true if n is prime in the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer. It returns false otherwise.  

• 

The SGIisprime function works correctly for all rings Z[sqrt(d)] which are principal ideal rings.

• 

The element n is prime in Z[sqrt(d)] iff it is not a unit or a zero, and is divisible only by associates and units.

• 

The element n is prime in Z[sqrt(d)] iff the element n belongs to one of three types:

1. 

n = 2*epsilon if  "d&equiv;1(mod 4)".

2. 

n = epsilon*p, where p is an odd prime, `&nmid;`(p, d)  and d/p = -1. ``

3. 

n = a+b*sqrt(d) and `in`(a+b*sqrt(d), Z[sqrt(d)]), where (a, b) = 1 and abs(-b^2*d+a^2) is prime.

Examples

SGIisprime(581+209*sqrt(2), 2)

true

(12.4.1)

SGIisprime(7, 2)

false

(12.4.2)

SGIisprime(2+3*sqrt(2), 2)

false

(12.4.3)

SGIisprime(1+2*sqrt(2), 2)

true``

(12.4.4)

````````

``

QuadraticInt[SGIfactor] - factorization in Z[sqrt(d)] 

Calling Sequence

SGIfactor(n, d)

Parameters

n

-

element of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

d

-

squarefree integer ("d<>1)"

``

Description

• 

The SGIfactor function returns the factorization of n in the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer.

• 

The answer is in the form: "u ``((f1))^(e1) ... ``((fn))^(en)" such that c = u*f1^e1 .. fn^en where u is a unit in Z[sqrt(d)];  f1, () .. (), fn are the distinct primary prime factors of c, and e1, () .. (), en are their multiplicities.

• 

The SGIfactor function works correctly for all rings Z[sqrt(d)] which are principal ideal rings.

Examples

SGIfactor(2+3*sqrt(2), 2)

``(-1+2^(1/2))*``(2^(1/2))*``(5+4*2^(1/2))

(13.4.1)

SGIfactor(2+3*I, -1)

``(-I)*``(-3+2*I)

(13.4.2)

SGIfactor(15, 3)

``(5)*``(3^(1/2))^2

(13.4.3)

SGIfactor(221, 217)

``(162+11*217^(1/2))*``(162-11*217^(1/2))*``(740980+50301*217^(1/2))*``(740980-50301*217^(1/2))``

(13.4.4)

````NULL

``

QuadraticInt[SGIfacset] - primary prime factors of the element in Z[sqrt(d)] 

Calling Sequence

SGIfacset(n, d)

Parameters

n

-

element of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

d

-

squarefree integer ("d<>1)"

``

Description

• 

The SGIfacset function computes the set of prime factors up to associates of the element n in the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer.

• 

The SGIfacset function works correctly for all rings Z[sqrt(d)] which are principal ideal rings.

Examples

SGIfacset(2+3*sqrt(2), 2)

{2^(1/2), -1+2^(1/2), 5+4*2^(1/2)}

(14.4.1)

SGIfacset(-1+sqrt(-2), -2)

{I*2^(1/2)-1}``

(14.4.2)

````

``

QuadraticInt[SGIfactors] - factorization of the element in Z[sqrt(d)]

Calling Sequence

SGIfactors(n, d)

Parameters

n

-

element of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

d

-

squarefree integer ("d<>1)"

``

Description

• 

The SGIfactors function returns the factorization in the form "[u,[[(p)[1],(e)[1]],`...`,[(p)[m],(e)[m]]]" where n = u*p[1]^(exp(1))[1] .. p[m]^(exp(1))[m], p[i] – prime elements,  e[i] – their multiplicities,  u – some unit in the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer.

• 

The SGIfactors function works correctly for all rings Z[sqrt(d)] which are principal ideal rings.

Examples

SGIfactors(2+3*sqrt(2), 2)

[1, [[-1+2^(1/2), 1], [2^(1/2), 1], [5+4*2^(1/2), 1]]]

(15.4.1)

SGIfactors(-1+sqrt(-2), -2)

[1, [[I*2^(1/2)-1, 1]]]``

(15.4.2)

````````

``

QuadraticInt[SGIissqr] - test if the element in Z[sqrt(d)] is a perfect square  

Calling Sequence

SGIissqr(n, d)

Parameters

n

-

element of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

d

-

squarefree integer ("d<>1)"

``

Description

• 

The SGIissqr function returns true if n is a square of some element in the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer, false otherwise. 

• 

The SGIissqr function works correctly for all rings Z[sqrt(d)] which are principal ideal rings.

Examples

SGIissqr(4, 2)

true

(16.4.1)

SGIissqr(-14+(12*I)*sqrt(2), -2)

true

(16.4.2)

SGIissqr(1+2*sqrt(2), 2)

false``

(16.4.3)

````````

``

QuadraticInt[SGIdivisor] - the set of divisors of the element in Z[sqrt(d)] 

Calling Sequence

SGIdivisor(a, d)

Parameters

a

-

element of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

d

-

squarefree integer ("d<>1)"

``

Description

• 

The SGIdivisor function computes the set of all divisors (up to associates) of a in the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer.  

• 

The SGIdivisor function works correctly for all rings Z[sqrt(d)] which are principal ideal rings.

Examples

SGIdivisor(2+3*sqrt(2), 2)

{1, 2^(1/2), -1+2^(1/2), 2-2^(1/2), 2+3*2^(1/2), 3+2^(1/2), 5+4*2^(1/2), 5*2^(1/2)+8}

(17.4.1)

SGIdivisor(-1+sqrt(-2), -2)

{1, I*2^(1/2)-1}``

(17.4.2)

``````

``

QuadraticInt[SGIphi] - number of elements in Z[sqrt(d)] in a reduced system modulo u 

Calling Sequence

SGIphi(u, d)

Parameters

u

-

element of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer

d

-

squarefree integer ("d<>1)"

``

Description

• 

The SGIphi function returns the number of elements in the reduced system modulo  u in the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer.

• 

The SGIphi function returns a value, that is equal to the order of the multiplicative group "<Z[sqrt(d)]/<u>;*>".  

• 

The SGIphi function calculates Euler function for "n in Z[sqrt(d)]\{0}."

• 

The SGIphi function works correctly for all rings Z[sqrt(d)] which are principal ideal rings.

Examples

SGIphi(23+9*sqrt(2), 2)

366

(18.4.1)

SGIphi(9*sqrt(2), 2)

72

(18.4.2)

SGIphi(sqrt(2), 2)

1

(18.4.3)

SGIphi(5, 3)

24``

(18.4.4)

````````

``

QuadraticInt[SGIorder] - order of the element in Z[sqrt(d)] 

Calling Sequence

SGIorder(n, m, d)

Parameters

n, m

-

elements of the principal ideal ring Z[sqrt(d)] where d <> 1 is a squarefree integer, n, m <> 0.

d

-

squarefree integer ("d<>1)"

``

Description

• 

The SGIorder function returns the smallest positive integer i such that "(n)^(i)=1 (mod m)."

• 

If n and m are not coprime, FAIL is returned.  

• 

The SGIorder function works correctly for all rings Z[sqrt(d)] which are principal ideal rings.

Examples

SGIorder(2+3*sqrt(2), 1+2*sqrt(2), 2)

3

(19.4.1)

SGIorder(7+2*I, 9, -1)

8``

(19.4.2)

 

4. Conclusions

Proposed in the paper is a package for working with elements of Z[sqrt(d)] in SCM Maple. It will be useful both for further investigations and for practical applications.

5. References

[1] Тrebenko О.O, Tsybulska N.M. Prime elements of rings  Z[sqrt(d)] // Nauckovyi chasopys Natsionalnogo Pedagogichnogo Universitetu imeni M.P. Dragomanova (Scientific journal of the National Pedagogical Dragomanov University). Series 1. Physical and Mathematical Sciences: Collection of Scientific Papers. – Kyiv: Dragomanov NPU, 2014. – №16 (1). – P. 219-227.

[2] Tsybulska N.M. Rings  Z[sqrt(d)] : properties and practical applications: student research work. – Kyiv: 2016. – 53 p. – Bibliogr.: p. 29-30. (In Ukrainian)

  [3] Tsybulska N.M. Rings  Z[sqrt(d)] : properties and practical applications // Education and science – 2016. Collection of scientific papers. – Kyiv: Dragomanov NPU, 2016. – P. 243-244. (In Ukrainian)  

  [4] Tsybulska N.M. The Euler  `&varphi;`(n) function on the set  Z[sqrt(d)] // Proceeding of the Fifth scientific conference of young scientists on mathematics and physics «Actual problems of modern mathematics and physics and methods of their learning» (April 25-26, 2016, Kyiv, Ukraine). – Kyiv: Dragomanov NPU, 2016. – P.59. (In Ukrainian)

NULL