#15300: Weyl and Clifford Algebras
-------------------------------------+-------------------------------------
Reporter: tscrim | Owner: tscrim
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.4
Component: algebra | Resolution:
Keywords: days54 | Merged in:
Authors: Travis Scrimshaw | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
public/algebras/weyl_clifford-15300| b47af6ae9f8dd1e6d870ec986f81fb6913d12e16
Dependencies: #16037 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by jhpalmieri):
Replying to [comment:142 tscrim]:
> Replying to [comment:141 jhpalmieri]:
> > When do I need to do `dx,dy,dz = sorted(W.differentials(), key=str)`
vs. `dx,dy,dz = W.differentials()`? There are examples of both sorts; is
the second version ever safe? I've seen in my own testing that the
`variables` method can return its elements in a random order, not
necessarily alphabetical. Will the same happen with `differentials` or
`algebra_generators`? It's nice that `W.inject_variables()` works well;
maybe that should be advertised, or at least used in some examples.
>
> The question is do we want to return a `Family` indexed by the variable
names, which makes it act like a `dict` and have some specified order of
output, or act like a list where the ordered of the output is the order of
the input.
I don't object to your design choice. My question was maybe more
practical: is it ever safe to do `dx,dy,dz=W.differentials()`, or should
they always be sorted? If it's not really safe, then there shouldn't be
examples like that in the documentation.
> I'm bias towards making the outputs being indexed since it carries more
information. However I do agree with adding examples demonstrating
`inject_variables` and other similar constructions. Your thoughts?
I think adding some examples using `inject_variables` would be useful. I
think you could add them to the class-level docstring for
`DifferentialWeylAlgebra` and/or to the `weyl_algebra` methods for
polynomial rings (pointing out that the result of `inject_variables` is
that the variables will now be in the Weyl algebra, not the polynomial
ring).
> > When does `_coerce_map_from_` return a map and not just True or False?
Please add more explanation and an example.
>
> This is the design of the function, and if it returns `True`, then
`coerce_map_from` creates a map using `_element_constructor_`. There are
times when it's easier/better-design to implement a custom morphism (like
for a module with basis using `module_morphism`).
The docstring basically says, "if A, then return either X or Y, and
otherwise return Z". A natural question is, when does it return X and when
Y? Presumably it's not a coin flip. I'd like the documentation and the
examples to explain this. Or do I never need to know this, things are just
taken care of in the background? Then the documentation should say so.
--
Ticket URL: <http://trac.sagemath.org/ticket/15300#comment:143>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.