Opened 4 years ago

Closed 3 years ago

## #27081 closed enhancement (fixed)

# Section for composite maps

Reported by: | Sebastian Oehms | Owned by: | |
---|---|---|---|

Priority: | major | Milestone: | sage-8.9 |

Component: | categories | Keywords: | section map |

Cc: | Merged in: | ||

Authors: | Sebastian Oehms | Reviewers: | Travis Scrimshaw |

Report Upstream: | N/A | Work issues: | |

Branch: | bb25f16 (Commits, GitHub, GitLab) | Commit: | bb25f1664654e85e4eddee8e356dfd8d876b916d |

Dependencies: | Stopgaps: |

### Description

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

### Change History (9)

### comment:1 Changed 4 years ago by

Branch: | → u/soehms/section_of_composite_map_27081 |
---|

### comment:2 Changed 4 years ago by

Commit: | → 3fd303ece2b1cefc9bcec69e67de88391d7d8038 |
---|---|

Status: | new → needs_review |

### comment:3 Changed 4 years ago by

Milestone: | sage-8.7 → sage-8.8 |
---|

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

### comment:4 Changed 3 years ago by

Milestone: | sage-8.8 → sage-8.9 |
---|

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).

### comment:5 Changed 3 years ago by

Reviewers: | → Travis Scrimshaw |
---|

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`

.

### comment:6 Changed 3 years ago by

Commit: | 3fd303ece2b1cefc9bcec69e67de88391d7d8038 → bb25f1664654e85e4eddee8e356dfd8d876b916d |
---|

### comment:9 Changed 3 years ago by

Branch: | u/soehms/section_of_composite_map_27081 → bb25f1664654e85e4eddee8e356dfd8d876b916d |
---|---|

Resolution: | → fixed |

Status: | positive_review → closed |

**Note:**See TracTickets for help on using tickets.

New commits:

`27081: initial version`