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

Section for composite maps #27081

Closed
soehms opened this issue Jan 19, 2019 · 12 comments
Closed

Section for composite maps #27081

soehms opened this issue Jan 19, 2019 · 12 comments

Comments

@soehms
Copy link
Member

soehms commented Jan 19, 2019

Currently, a section method for the class FormalCompositeMap is not implemented.
This ticket supplies a section in cases, where all factors of the composite map have section
implemented.

Examples which will be improved are:

sage: P.<x> = QQ[]
sage: P.coerce_map_from(ZZ).section() is None
True
sage: k = GF(47)
sage: R.<x> = PolynomialRing(k)
sage: R.coerce_map_from(ZZ).section() is None
True

Component: categories

Keywords: section map

Author: Sebastian Oehms

Branch/Commit: bb25f16

Reviewer: Travis Scrimshaw

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

@soehms soehms added this to the sage-8.7 milestone Jan 19, 2019
@soehms
Copy link
Member Author

soehms commented Jan 19, 2019

@soehms
Copy link
Member Author

soehms commented Jan 19, 2019

Commit: 3fd303e

@soehms
Copy link
Member Author

soehms commented Jan 19, 2019

New commits:

3fd303e27081: initial version

@embray
Copy link
Contributor

embray commented Mar 25, 2019

comment:3

Ticket retargeted after milestone closed (if you don't believe this ticket is appropriate for the Sage 8.8 release please retarget manually)

@embray embray modified the milestones: sage-8.7, sage-8.8 Mar 25, 2019
@embray
Copy link
Contributor

embray commented Jul 3, 2019

comment:4

Moving tickets from the Sage 8.8 milestone that have been actively worked on in the last six months to the next release milestone (optimistically).

@embray embray modified the milestones: sage-8.8, sage-8.9 Jul 3, 2019
@tscrim
Copy link
Collaborator

tscrim commented Aug 9, 2019

comment:5

Sorry for letting my review of this take so long. Once these changes are done, then it is a positive review:

-        Compute a section map from sections of the factors of self if they have been implemented
+        Compute a section map from sections of the factors of
+        ``self`` if they have been implemented.

I would write this with short-circuiting and the reversal already built-in:

        sections = []
        for m in reversed(self):
            try:
                sec = m.section()
            except TypeError:
                return None
            if sec is None:
                return None
            sections.append(m)

        from sage.categories.homset import Hom
        from sage.categories.sets_with_partial_maps import SetsWithPartialMaps
        H = Hom(self.codomain(), self.domain(), category=SetsWithPartialMaps())
        return FormalCompositeMap(H, sections)

Capitalize the beginning of the .. NOTE:: in polynomial_element.pyx.

@tscrim
Copy link
Collaborator

tscrim commented Aug 9, 2019

Reviewer: Travis Scrimshaw

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 11, 2019

Changed commit from 3fd303e to bb25f16

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 11, 2019

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

c049ce9Merge branch 'u/soehms/section_of_composite_map_27081' of git://trac.sagemath.org/sage into section_of_composite_map_27081
bb25f1627081: corrections according to review

@soehms
Copy link
Member Author

soehms commented Aug 11, 2019

comment:7

thanks, Travis! I'll be waiting for the patchbot!

@tscrim
Copy link
Collaborator

tscrim commented Aug 11, 2019

comment:8

Thank you.

@vbraun
Copy link
Member

vbraun commented Aug 12, 2019

Changed branch from u/soehms/section_of_composite_map_27081 to bb25f16

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

4 participants