Opened 3 years ago

Closed 3 years ago

## #29225 closed defect (fixed)

# Cartesian product of modules has no base ring

Reported by: | Peter Bruin | Owned by: | |
---|---|---|---|

Priority: | minor | Milestone: | sage-9.1 |

Component: | commutative algebra | Keywords: | module, base ring |

Cc: | Merged in: | ||

Authors: | Peter Bruin | Reviewers: | Travis Scrimshaw |

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

Branch: | b766a52 (Commits, GitHub, GitLab) | Commit: | b766a52018a6a2e08df396ec0b4555f7ff9e2dda |

Dependencies: | Stopgaps: |

### Description

In SageMath 9.1.beta4:

sage: M = cartesian_product((ZZ^2, ZZ^3)); M The Cartesian product of (Ambient free module of rank 2 over the principal ideal domain Integer Ring, Ambient free module of rank 3 over the principal ideal domain Integer Ring) sage: M.category() Category of Cartesian products of modules with basis over (euclidean domains and infinite enumerated sets and metric spaces) sage: M.base_ring() # should be Integer Ring

### Change History (5)

### comment:1 Changed 3 years ago by

Branch: | → u/pbruin/29225-cartesian_product_base_ring |
---|---|

Commit: | → b766a52018a6a2e08df396ec0b4555f7ff9e2dda |

Status: | new → needs_review |

### comment:2 follow-up: 3 Changed 3 years ago by

### comment:3 Changed 3 years ago by

Replying to tscrim:

Should we test for

`is R`

or`== R`

, as I think we could have equal-but-not-identical rings in Sage:

It is possible to implement classes for rings that have this behaviour, although I could not find them in the Sage library. I think it is safer not to choose one of these equal-but-not-identical rings as the base ring of the product. Working with modules over equal-but-not-identical rings sounds like something that will hardly ever occur in practice, and that will be unnecessarily slow and sensitive to bugs because of coercion between the different copies. In short, I propose sticking with `is`

.

### comment:4 Changed 3 years ago by

Reviewers: | → Travis Scrimshaw |
---|---|

Status: | needs_review → positive_review |

Sounds like we are in agreement. Thank you.

### comment:5 Changed 3 years ago by

Branch: | u/pbruin/29225-cartesian_product_base_ring → b766a52018a6a2e08df396ec0b4555f7ff9e2dda |
---|---|

Resolution: | → fixed |

Status: | positive_review → closed |

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

Should we test for

`is R`

or`== R`

, as I think we could have equal-but-not-identical rings in Sage:Now I know this is not a demonstration, but it would be quite reasonable for this to someday return

`True`

. I probably am on the side of actually`is`

because the`==`

could have base rings that are subtly different, but I wanted to get your thoughts.