Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mutable polyhedron (ppl) saves incorrect Vrepresentation #33666

Closed
kliem opened this issue Apr 10, 2022 · 12 comments
Closed

Mutable polyhedron (ppl) saves incorrect Vrepresentation #33666

kliem opened this issue Apr 10, 2022 · 12 comments

Comments

@kliem
Copy link
Contributor

kliem commented Apr 10, 2022

sage: P = polytopes.cube()
sage: Q = 1/2*P
sage: parent = P.parent()
sage: R = parent._element_constructor_(Q, mutable=True)
sage: R
/home/jonathan/Applications/sage/local/lib/python3.8/site-packages/sage/repl/rich_output/display_manager.py:608: RichReprWarning: Exception in _rich_repr_ while displaying object: no conversion of this rational to integer
  warnings.warn(
The empty polyhedron in ZZ^3
sage: R.Hrepresentation()
(An inequality (0, 0, -2) x + 1 >= 0,
 An inequality (0, -2, 0) x + 1 >= 0,
 An inequality (-2, 0, 0) x + 1 >= 0,
 An inequality (2, 0, 0) x + 1 >= 0,
 An inequality (0, 0, 2) x + 1 >= 0,
 An inequality (0, 2, 0) x + 1 >= 0)
sage: R.Vrepresentation()
[]

While obtaining the Vrepresentation from the backend, a TypeError is not handled properly. We end up with a broken object, which isn't communicated well to the user.

CC: @mkoeppe

Component: geometry

Author: Jonathan Kliem

Branch/Commit: ed109ae

Reviewer: Matthias Koeppe

Issue created by migration from https://trac.sagemath.org/ticket/33666

@kliem kliem added this to the sage-9.6 milestone Apr 10, 2022
@kliem kliem changed the title Mutable polyhedron saves incorrect Vrepresentation Mutable polyhedron (ppl) saves incorrect Vrepresentation Apr 10, 2022
@kliem
Copy link
Contributor Author

kliem commented Apr 10, 2022

Branch: public/33666

@kliem
Copy link
Contributor Author

kliem commented Apr 10, 2022

New commits:

1b18639clear cache after catching type error when obtaining Vrepresentation

@kliem
Copy link
Contributor Author

kliem commented Apr 10, 2022

Commit: 1b18639

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Member

mkoeppe commented Apr 10, 2022

comment:5

Patchbot says

sage -t --long --random-seed=33333237385512314714344203620105943909 src/sage/geometry/polyhedron/constructor.py
**********************************************************************
File "src/sage/geometry/polyhedron/constructor.py", line 522, in sage.geometry.polyhedron.constructor.?
Failed example:
    Q = Polyhedron(vertices=[(1, 2, 3), (1, 3, 2), (2, 1, 3),
                             (2, 3, 1), (3, 1, 2), (3, 2, 1)],
                   rays=[[1, 1, 1]], lines=[[1, 2, 3]], backend='ppl',
                   base_ring=ZZ)

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 11, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

ebe930akeep old type error at initialization

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 11, 2022

Changed commit from 1b18639 to ebe930a

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 11, 2022

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

f635ad1clear cache after catching type error when obtaining Vrepresentation
ed109aekeep old type error at initialization

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 11, 2022

Changed commit from ebe930a to ed109ae

@mkoeppe
Copy link
Member

mkoeppe commented Apr 11, 2022

Reviewer: Matthias Koeppe

@kliem
Copy link
Contributor Author

kliem commented Apr 11, 2022

comment:10

Thank you.

@vbraun
Copy link
Member

vbraun commented Apr 21, 2022

Changed branch from public/33666 to ed109ae

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants