Opened 5 years ago

Closed 5 years ago

## #23620 closed defect (fixed)

# gcd has wrong parent

Reported by: | Julian Rüth | Owned by: | |
---|---|---|---|

Priority: | major | Milestone: | sage-8.1 |

Component: | padics | Keywords: | gcd |

Cc: | Merged in: | ||

Authors: | Julian Rüth | Reviewers: | David Roe |

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

Branch: | ada3927 (Commits, GitHub, GitLab) | Commit: | ada3927e391c2f2945cc0a6269ac859ab85735ea |

Dependencies: | Stopgaps: |

### Description (last modified by )

Currently, the parent of a gcd might be wrong when the gcd of polynomials is just the gcd of its contents:

sage: R.<x> = ZpFM(2)[] sage: f = 2*x + 2 sage: g = 4*x + 2 sage: f.gcd(g).parent() is R False # parent is ZpFM(2)

### Change History (4)

### comment:1 Changed 5 years ago by

Description: | modified (diff) |
---|---|

Status: | new → needs_review |

### comment:2 Changed 5 years ago by

Branch: | → u/saraedum/gcd_has_wrong_parent |
---|

### comment:3 Changed 5 years ago by

Commit: | → ada3927e391c2f2945cc0a6269ac859ab85735ea |
---|---|

Reviewers: | → David Roe |

Status: | needs_review → positive_review |

### comment:4 Changed 5 years ago by

Branch: | u/saraedum/gcd_has_wrong_parent → ada3927e391c2f2945cc0a6269ac859ab85735ea |
---|---|

Resolution: | → fixed |

Status: | positive_review → closed |

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

Looks good.

New commits:

`gcd(f,g) has the same parent as f and g`