[sage-devel] Jupyter header cells ?

2017-12-26 Thread Emmanuel Charpentier
This question 

 on 
ask.sagemath.org made me search Google about something called "Header 
cells". I found such a thing 

 
in the Jupyter documentation 

 
at Bryn Mawr College.

It seems to me that this is a site-specific extension, not something 
standard, but I do not know how to find something authoritative about what 
is "standard" in Jupyter...

It also seems to give some interesting possibilities : cross-referencing, 
automatic numbering, auto-table of contents.

Do you think that this (or something like this) could be useful in our 
Jupyter notebook ?

--
Emmanuel Charpentier

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] a functor need and name

2017-12-26 Thread Vincent Delecroix

Dear all,

While working on Puiseux series [1] I wanted to introduce a construction 
functor for them. When the base ring is algebraically closed then it is 
an algebraic closure functor (from power series). But when it is not, it 
is an infinite algebraic extension (ie adding all x^(1/n)). I think that 
it would make sense for such a functor since the same construction is in 
action from QQ to the universal cyclotomic field.


Any suggestion on what should be done here?

Best
Vincent

 [1] https://trac.sagemath.org/ticket/4618

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: a functor need and name

2017-12-26 Thread Simon King
Hi Vincent,

On 2017-12-26, Vincent Delecroix <20100.delecr...@gmail.com> wrote:
> While working on Puiseux series [1] I wanted to introduce a construction 
> functor for them. When the base ring is algebraically closed then it is 
> an algebraic closure functor (from power series). But when it is not, it 
> is an infinite algebraic extension (ie adding all x^(1/n)). I think that 
> it would make sense for such a functor since the same construction is in 
> action from QQ to the universal cyclotomic field.
>
> Any suggestion on what should be done here?

I am not sure if I understand what you're asking. Let's try:

Is the construction a functor? If yes: What categories are domain and
range of the functor? It is of course possible that domain/range depend
on parameters. The construction() method of an appropriate parent P then
needs to return an instance F of that construction functor, plus a parent
Q such that P is F(Q).

To implement a construction functor:
- Perhaps __init__, unless you can simply provide domain and codomain
  upon creation of F, without any further parameters.
- _apply_functor_to_morphism: How does F map a morphism?
- _apply_functor: How does F map a parent (such as Q)? This can of
  course invoke a method of Q that returns whatever the result should
  be.
- merge and pushout are probably needed, and a rank needs to be
  assigned.
- If your functor relies on parameters (such as variable names, in the
  case of a MultiPolynomialFunctor), you may also need to implement
  __eq__ etc (by the way: Why isn't it implemented by _richcmp_?)
- If something special is supposed to happen when composing your functor
  with other particular functors (which for example I used in
  InfinitePolynomialFunctor), you may implement __mul__.

A canonical name of Construction X would be "ConstructionXFunctor". So,
I guess PuiseuxSeriesFunctor seems fine. If you are unhappe with how the
functor is printed, you can of course override _repr_.

Best regards,
Simon

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: a functor need and name

2017-12-26 Thread Vincent Delecroix

Hi Simon,

On 26/12/2017 17:45, Simon King wrote:

Hi Vincent,

On 2017-12-26, Vincent Delecroix <20100.delecr...@gmail.com> wrote:

While working on Puiseux series [1] I wanted to introduce a
construction functor for them. When the base ring is algebraically
closed then it is an algebraic closure functor (from power series).
But when it is not, it is an infinite algebraic extension (ie
adding all x^(1/n)). I think that it would make sense for such a
functor since the same construction is in action from QQ to the
universal cyclotomic field.

Any suggestion on what should be done here?


I am not sure if I understand what you're asking. Let's try:

Is the construction a functor? If yes: What categories are domain
and range of the functor?

> It is of course possible that domain/range depend on parameters.

In my situation, the (mathematical) specifications are

INPUT: a field K and an element x of K
OUTPUT: K[x^(1/2), x^(1/3), x^(1/4), ...]

> SNIP (explanation on implementation)

thanks!


A canonical name of Construction X would be "ConstructionXFunctor".
So, I guess PuiseuxSeriesFunctor seems fine. If you are unhappy with
how the functor is printed, you can of course override _repr_.


I came up with the above specifications because I thought about two 
different cases at hand


- if input is S = QQ and x = -1 then output shoud be UCF (universal 
cyclotomic field)


- if input is S = "Laurent polynomials in t over QQ" and x = t then 
output should be "Puiseux series in t"


As a consequence of having different sources I had no idea about a name!

Best
Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: a functor need and name

2017-12-26 Thread Simon King
Dear Vincent,

On 2017-12-26, Vincent Delecroix <20100.delecr...@gmail.com> wrote:
> In my situation, the (mathematical) specifications are
>
> INPUT: a field K and an element x of K
> OUTPUT: K[x^(1/2), x^(1/3), x^(1/4), ...]
>
> I came up with the above specifications because I thought about two 
> different cases at hand
>
> - if input is S = QQ and x = -1 then output shoud be UCF (universal 
> cyclotomic field)
>
> - if input is S = "Laurent polynomials in t over QQ" and x = t then 
> output should be "Puiseux series in t"
>
> As a consequence of having different sources I had no idea about a name!

I have no idea if that construction has a common name. But if people
asked me, I'd call it "(full) radical extension at x".

Note that making it dependent on x means that your functor can only be
applied to parents which x coerces into --- do such parents actually
form a category??

On the other hand, it can perhaps not be avoided. See QuotientFunctor
(in sage.categories.pushout), which also depends on data that are not
available in all possible rings (namely: an ideal).

Hence, I would create
class RadicalExtensionFunctor(ConstructionFunctor):
def __init__(self, x):
...
And since the parameter x is likely to be included in the string
representation, I'd override ._repr_().

What happens if you do the construction first with x (in K) and then
repeat with y (in K[x^(1/2),x^(1/3),...])? Can the result be described
by a single step? If this is the case, it might be a good idea to
implement .__mul__() and .merge() (it could be that you need both).

Since the second "radical extension" may be at an element y of K[...] that
is not an element of K, you can probably *not* say that the two
extensions commute. Thus, perhaps one shouldn't implement .commutes().

What happens if you combine your construction with other algebraic
extensions? Would you prefer to describe it as "Radical extension at x of
an algebraic extension field" or as "Algebraic extension of a radical
extension field"? Similar questions should be asked for other construction
functors. The answers will tell you how to chose the rank of the new
functor, and also how to implement .merge()/.pushout().

Best regards,
Simon

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.