Opened 6 years ago

Closed 5 years ago

## #22071 closed defect (wontfix)

# Expression._latex_() triggers “dangerous” comparisons

Reported by: | Marc Mezzarobba | Owned by: | |
---|---|---|---|

Priority: | minor | Milestone: | sage-duplicate/invalid/wontfix |

Component: | symbolics | Keywords: | |

Cc: | Ralf Stephan | Merged in: | |

Authors: | Reviewers: | ||

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

Branch: | Commit: | ||

Dependencies: | Stopgaps: |

### Description

With commit `a5a1e2b76332d136936c7cbe94cf42f93ec6203d`

from ticket #22029:

sage: Mod(2,7)/x 2/x sage: latex(Mod(2,7)/x) ... TypeError: unsupported operand parent(s) for 'lt': 'Ring of integers modulo 7' and 'Number Field in I with defining polynomial x^2 + 1'

It looks like Pynac is comparing the numerator with `I`

under the hood. Even if the branch in question isn't merged, this is likely to cause problems sooner or later.

### Change History (4)

### comment:1 Changed 6 years ago by

### comment:2 Changed 5 years ago by

Milestone: | sage-7.5 → sage-duplicate/invalid/wontfix |
---|---|

Status: | new → needs_review |

Seems to be no longer an issue.

### comment:3 Changed 5 years ago by

Status: | needs_review → positive_review |
---|

### comment:4 Changed 5 years ago by

Resolution: | → wontfix |
---|---|

Status: | positive_review → closed |

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

Note there is a consensus that operations with positive characteristic ring elements and symbolic variables should be discouraged (leading to #21391). Consequently the latexing will fail as well as soon as that is implemented, and you would need something like #10035 to make it work. That doesn't fix this specific odd error but it lowers the urgency level I'm personally having with it.