Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A class to manage embedding between non-prime fields #20284

Closed
sagetrac-dlucas mannequin opened this issue Mar 25, 2016 · 28 comments
Closed

A class to manage embedding between non-prime fields #20284

sagetrac-dlucas mannequin opened this issue Mar 25, 2016 · 28 comments

Comments

@sagetrac-dlucas
Copy link
Mannequin

sagetrac-dlucas mannequin commented Mar 25, 2016

In Sage, there is no general mechanism to manage the embedding of elements of a finite extension field in one of its subfields.

We propose here a class which takes care of that.

Considering a big, non-prime field Fqm and one of its subfields Fq, this class is able to give either a polynomial or a vectorial representation of an element of Fqm in Fq.

CC: @johanrosenkilde @jpflori @defeo

Component: finite rings

Author: David Lucas

Branch: 2492c31

Reviewer: Arpit Merchant

Issue created by migration from https://trac.sagemath.org/ticket/20284

@sagetrac-dlucas sagetrac-dlucas mannequin added this to the sage-7.2 milestone Mar 25, 2016
@sagetrac-dlucas
Copy link
Mannequin Author

sagetrac-dlucas mannequin commented Mar 25, 2016

Branch: u/dlucas/field_embedding

@sagetrac-dlucas
Copy link
Mannequin Author

sagetrac-dlucas mannequin commented Mar 25, 2016

Author: David Lucas

@sagetrac-dlucas
Copy link
Mannequin Author

sagetrac-dlucas mannequin commented Mar 25, 2016

comment:2

I pushed my code, and I open this ticket for review.


New commits:

49cebeeNew class to manage embeddings between non-prime fields

@sagetrac-dlucas
Copy link
Mannequin Author

sagetrac-dlucas mannequin commented Mar 25, 2016

Commit: 49cebee

@sagetrac-dlucas
Copy link
Mannequin Author

sagetrac-dlucas mannequin commented Mar 25, 2016

comment:3

By the way, as I'm not sure where to put my code, I left it (for now) in sage/coding...

@johanrosenkilde
Copy link
Contributor

comment:4

Just to be precise: Sage already supports embedding a small field GF(p^s) into a larger one GF(p^(sm)) (by using Fsmall.extension(m, map=True)). It also supports the inverse map (returned by the section() method on the embedding map).

The new functionality of this ticket is to support representing any GF(p^(sm)) element in a basis over GF(p^s). AFAIK, the current implementation supports this with only one particular choice of bases: if 1, beta, ..., beta^(sm-1) is the basis of GF(p^(sm)) that Sage currently uses natively, then it is always the case that 1, beta, ..., beta^(m-1) is a basis of GF(p^(sm)) over GF(p^s). This is the basis employed by the current ticket.

More precisely, it gives a function that takes an element e in GF(p^(sm)) and returns a vector (v[0],...,v[m-1]) in GF(p<sup>s)</sup>m, such that

    e = sum_{i=0}^{m-1} phi(v[i]) * beta^i

where phi is a given embedding from GF(p^s) into GF(p^(sm)).

Best,
Johan

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 31, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

7ffd2c0Update to 7.3beta2
74a8c23representation_matrix is now a private method
4f4c0a6Changed names: Fqm over Fq is now designated as a relative finite field extension
87deebaChanged return value of big_field_representation
0eb1d5aChanged naming: small field -> relative field, big field -> absolute field
38b77f9Added method to check if an element of the absolute field is in the relative field under the embedding

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 31, 2016

Changed commit from 49cebee to 38b77f9

@sagetrac-dlucas
Copy link
Mannequin Author

sagetrac-dlucas mannequin commented May 31, 2016

comment:6

Hello,

I made some changes to the class:

  • I completely changed its nomenclature, which is now based on the one defined for relative extensions.
  • I changed the behaviour of some methods.
  • I added a method to check if an element of the "big field" is in the relative field under the embedding.

This is still open for review.

Best,

David

@sagetrac-dlucas sagetrac-dlucas mannequin modified the milestones: sage-7.2, sage-7.3 May 31, 2016
@videlec
Copy link
Contributor

videlec commented May 31, 2016

comment:7

Two naive questions:

  • Why is this in sage/coding?
  • Why not extending the preceding existing embedding class?

Vincent

@johanrosenkilde
Copy link
Contributor

comment:8

Replying to @videlec:

Two naive questions:

  • Why is this in sage/coding?
  • Why not extending the preceding existing embedding class?

Because we did not know where to put it, and we didn't get input from anyone. We need the functionality for several things in sage/coding, so we just wanted to add it. And it's on the agenda for Sage Days 75 to merge it much more sensibly with the rest of Sage.

Incidentally, will you be coming for SD75?

@videlec
Copy link
Contributor

videlec commented May 31, 2016

comment:9

Replying to @johanrosenkilde:

Replying to @videlec:

Two naive questions:

  • Why is this in sage/coding?
  • Why not extending the preceding existing embedding class?

Because we did not know where to put it, and we didn't get input from anyone. We need the functionality for several things in sage/coding, so we just wanted to add it. And it's on the agenda for Sage Days 75 to merge it much more sensibly with the rest of Sage.

Would make more sense with everything about finite field, no? That is to say sage/rings/finite_rings/.

Incidentally, will you be coming for SD75?

Sadly not. I will be in Chile at that time.

@jpflori
Copy link
Contributor

jpflori commented Jun 1, 2016

comment:10

I'll be there at sd75.
And I do agree it would nice to use such functionalities in a more general setting.
We could still put it in coding first and move it later.

@sagetrac-dlucas
Copy link
Mannequin Author

sagetrac-dlucas mannequin commented Jun 1, 2016

comment:11

Hello,

And I do agree it would nice to use such functionalities in a more general setting.
We could still put it in coding first and move it later.

I would indeed prefer to put it in coding first, as it locks several very useful tickets for us (#20039, #20100, #20335) while it's not reviewed. Furthermore, we need it for our GSoC project on rank-metric codes.

I can put an experimental warning in it: this way, we will be able to move it later on without being worried by deprecation warnings.

Best,

David

@johanrosenkilde
Copy link
Contributor

comment:12

I can put an experimental warning in it: this way, we will be able to move it later on without being worried by deprecation warnings.

+1

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 1, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

311b960Added experimental warning for RelativeFiniteFieldExtension
2492c31Added relative_finite_field_extension to sage.coding's index.rst

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 1, 2016

Changed commit from 38b77f9 to 2492c31

@sagetrac-dlucas
Copy link
Mannequin Author

sagetrac-dlucas mannequin commented Jun 1, 2016

comment:14

I added this experimental warning to the class.

I also added this module in sage.coding's index.

@arpitdm
Copy link
Mannequin

arpitdm mannequin commented Jun 8, 2016

Reviewer: Arpit Merchant

@arpitdm
Copy link
Mannequin

arpitdm mannequin commented Jun 8, 2016

comment:15

I went through the reviewer's checklist and all the tests pass. The naming conventions are quite suitable and make it easier to interpret the functions. Giving it a positive review.

@vbraun
Copy link
Member

vbraun commented Jun 9, 2016

Changed branch from u/dlucas/field_embedding to 2492c31

@koffie
Copy link
Contributor

koffie commented Sep 8, 2017

comment:17

Was there ever a follow up ticket created?

@koffie
Copy link
Contributor

koffie commented Sep 8, 2017

Changed commit from 2492c31 to none

@videlec
Copy link
Contributor

videlec commented Sep 10, 2017

comment:18

Replying to @koffie:

Was there ever a follow up ticket created?

I don't think so. At least the code is still there in sage/coding/relative_finite_field_extension.py.

It is a pitty that this ticket has been merged despite my objections in [comment:7](#comment%3A7). It should have definitely be a file in `sage/rings/finite_field/` so that people actually working with finite field would have noticed. Putting a blob of general purpose functionalities in a specialized repository is not the way to proceed. People are free to do that on their home git repository but would better avoid such practice in a large public open source software.

@jpflori
Copy link
Contributor

jpflori commented Sep 11, 2017

comment:19

So let's create one: #23828.

There is also the old and somehow useless #8751.
And related works: flintlib/flint#366

@johanrosenkilde
Copy link
Contributor

comment:20

The follow-up ticket is #21413. It was created shortly after SD75 following discussion between Xavier Caruso, Luca De Feo, Nicola Thierry, Bruno Grenet and myself. The main difficulty in moving the code to /sage/rings/ is to find the proper and general interface. Xavier in particular came up with centering these kinds of embeddings around the algebra induced by the field extension L/K.

The ticket #21413 then stalled because of lack of time, I think, and because we hit a snag wrt. implicit coercion vs use of multiplication btw. elements of the L/K algebra and elements of K leading to (perhaps) unintuitive non-commutative behaviour. See the discussion on that ticket for a more precise description.

@jpflori
Copy link
Contributor

jpflori commented Sep 11, 2017

comment:21

Argh then let's already close #23828.

@videlec
Copy link
Contributor

videlec commented Nov 12, 2017

comment:22

See also #24170

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants