Opened 9 years ago

Closed 9 years ago

## #15979 closed defect (fixed)

# Toric varieties can be tricked into accepting base rings that are not fields

Reported by: | Jan Keitel | Owned by: | |
---|---|---|---|

Priority: | minor | Milestone: | sage-6.2 |

Component: | algebraic geometry | Keywords: | toric |

Cc: | Andrey Novoseltsev, Volker Braun | Merged in: | |

Authors: | Jan Keitel | Reviewers: | Volker Braun |

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

Branch: | 0ddcf4d (Commits, GitHub, GitLab) | Commit: | 0ddcf4da121461367f2e2b547243a489af79ccc7 |

Dependencies: | Stopgaps: |

### Description (last modified by )

There are a couple of odd things right now:

This does not work:

sage: R = PolynomialRing(QQ, 2, 'a') sage: P2 = toric_varieties.P2(base_ring=R) ... TypeError: need a field to construct a Fano toric variety! Got Multivariate Polynomial Ring in a0, a1 over Rational Field

However, this does:

sage: R = PolynomialRing(QQ, 2, 'a') sage: P2 = toric_varieties.P2(base_ring=QQ) sage: P2 = P2.change_ring(R) sage: P2.base_ring() Multivariate Polynomial Ring in a0, a1 over Rational Field

The same problem also occurs for ToricVariety? instead of CPRFanoToricVariety. Allowing general rings leads to some annoying behavior such as

sage: P2.base_ring() Multivariate Polynomial Ring in a0, a1 over Rational Field sage: P2.dimension() 4

Here the dimension of the spectrum of the base ring is added. Because of that, integration in toric varieties does not work (although this can be fixed, of course).

In any case, if one requires toric varieties to be defined over fields, it should at least be consistent.

Best, Jan

PS: It's also a bit annoying that ToricVariety? and CPRFanoToricVariety allow for the keyword base_field, but the catalog only allows base_ring. Should that be adjusted?

### Change History (5)

### comment:1 Changed 9 years ago by

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

### comment:2 Changed 9 years ago by

Status: | new → needs_review |
---|

### comment:3 Changed 9 years ago by

### comment:4 Changed 9 years ago by

Authors: | → Jan Keitel |
---|---|

Reviewers: | → Volker Braun |

Status: | needs_review → positive_review |

### comment:5 Changed 9 years ago by

Branch: | u/jkeitel/toric_change_ring → 0ddcf4da121461367f2e2b547243a489af79ccc7 |
---|---|

Resolution: | → fixed |

Status: | positive_review → closed |

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

Should always be

`base_ring`

for consistency. Even if we currently only support fields...