sagemath/sage

ManifoldSubset and ChartFunction objects corresponding to a CVXPY expressions

mkoeppe opened this issue · 29 comments

CVXPY is a system for disciplined convex programming in which finite dimensional optimization problems are expressed using expression trees.

We monkey-patch caching _sage_ methods into the CVXPY classes, along the same lines as it is done for SymPy in sage.interfaces.sympy.

  • Each leaf is a scalar, vector or matrix, subject to a domain restriction such as nonneg or PSD. _sage_ methods return symbolic variables or expressions or vectors/matrices thereof. _sage_domain_ methods return the domain as a set. (For the PSD domain, see #30172.) _sage_manifold_ method returns the pullback (#31688), defining a manifold subset / submanifold etc.

  • A subclass of cvxpy.Problem would provide a method feasible_set an instance of class ConditionSet_cvxpy (see #24176) or ConvexSet_cvxpy, representing sets of points that satisfy a list of cvxpy.Constraints.

Depends on #31962
Depends on #31688
Depends on #30172
Depends on #31982

CC: @dimpase @yuan-zhou @egourgoulhon

Component: manifolds

Author: Matthias Koeppe, ...

Branch/Commit: u/mkoeppe/manifoldsubset_corresponding_to_a_cvxpy_leaf__variable_parameter_ @ 84a5868

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

Description changed:

--- 
+++ 
@@ -6,3 +6,4 @@
 
 The PSD domain can be obtained as pullback (#31688) of #30172.
 
+We may want to monkey-patch caching `_sage_` methods into the CVXPY classes, along the same lines as it is done for SymPy in `sage.interfaces.sympy`.

Changed dependencies from #31962 to #31962, #31688

Changed dependencies from #31962, #31688 to #31962, #31688, #30172

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

84cffde_cvxpy_Variable_sage_: Actually return chart functions

Author: Matthias Koeppe

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

d4e19aa_cvxpy_MulExpression_sage_: New

Changed commit from 84cffde to d4e19aa

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

3889cf5_cvxpy_AddExpression_sage_: New

Changed commit from d4e19aa to 3889cf5

Changed commit from 3889cf5 to 53c849a

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

53c849a_cvxpy_log1p_sage_: New

Changed dependencies from #31962, #31688, #30172 to #31962, #31688, #30172, #31982

Changed commit from 53c849a to 802a1ff

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

e8d3427clarify comment and doctest for multiple inheritance
b873bcbsome doc
27e3889Merge #31721
3c36bd2Eliminate use of MultiCoordFunction._functions
49f63a4Vector_symbolic_dense: Fix pickling
dcdd412src/sage/manifolds/continuous_map.py: Update doctest output
fb31802src/sage/manifolds/chart.py: Update doctest output
c06130bMerge #31982
271943d_cvxpy_log_det_sage_: New
802a1ffsrc/sage/interfaces/cvxpy.py: Update doctest output

Changed commit from 802a1ff to 6e6b8cd

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

6e6b8cd_cvxpy_Constant_sage_: New

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

760b762_cvxpy_power_sage_: New; fix up 'pos' domain

Changed commit from 6e6b8cd to 760b762

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

7323b10ConvexSet_base._test_contains: Only test extension to AA for exact base rings
e0d2eebMerge #31959
e6c3ed5RelativeInterior.__hash__: New
4c7d57fsrc/sage/geometry/relative_interior.py: Fix doctest output
9ea0ceaManifoldSubsetPullback: Do not trip over relative interiors of cones
a60e225Merge #31688

Changed commit from 760b762 to a60e225

Changed commit from a60e225 to bb624fb

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

bb624fb_cvxpy_{NegExpression,quad_over_lin,NonPos,NonNeg,Inequality}_sage_: New

Changed commit from bb624fb to 84a5868

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

2514586Merge #31644
3ca139asrc/doc/en/reference/manifolds: Add pullback
1d430eesrc/sage/manifolds/continuous_map.py, src/sage/manifolds/subsets: Use qualified class name in docstrings
1266de9src/sage/geometry/convex_set.py: Fix docstring markup
df64125ScalarField.preimage: Make pullback an alias; expand documentation
3877c5fManifoldSubsetPullback.is_closed: Remove unfinished NNC_Polyhedron example
0c549f0Chart.pullback, preimage: New
7bb720eManifoldSubsetPullback.__contains__: Handle the case of charts, which return tuples of coordinates, not vectors
60ea044ContinuousMap.preimage, ScalarField.preimage: Document that output can also be a manifold
84a5868Merge #31688

Description changed:

--- 
+++ 
@@ -1,9 +1,9 @@
-https://www.cvxpy.org/api_reference/cvxpy.expressions.html#leaf
+CVXPY is a system for disciplined convex programming in which finite dimensional optimization problems are expressed using expression trees.
 
-Each leaf is a scalar, vector or matrix, subject to a domain restriction such as `nonneg` or `PSD`.
+We monkey-patch caching `_sage_` methods into the CVXPY classes, along the same lines as it is done for SymPy in `sage.interfaces.sympy`.
 
-We model the interior of the domain as an embedded submanifold.
+- Each [leaf](https://www.cvxpy.org/api_reference/cvxpy.expressions.html#leaf) is a scalar, vector or matrix, subject to a domain restriction such as `nonneg` or `PSD`. `_sage_` methods return symbolic variables or expressions or vectors/matrices thereof. `_sage_domain_` methods return the domain as a set. (For the PSD domain, see #30172.) `_sage_manifold_` method returns the pullback (#31688), defining a manifold subset / submanifold etc.
 
-The PSD domain can be obtained as pullback (#31688) of #30172.
+- A subclass of `cvxpy.Problem` would provide a method `feasible_set` an instance of class `ConditionSet_cvxpy` (see #24176) or `ConvexSet_cvxpy`, representing sets of points that satisfy a list of `cvxpy.Constraint`s. 
 
-We may want to monkey-patch caching `_sage_` methods into the CVXPY classes, along the same lines as it is done for SymPy in `sage.interfaces.sympy`.
+

Changed author from Matthias Koeppe to Matthias Koeppe, Andrey Belgorodski

Changed author from Matthias Koeppe, Andrey Belgorodski to Matthias Koeppe, ...