Opened 9 years ago

Closed 9 years ago

#11335 closed enhancement (fixed)

Allow symbolic vectors to be simplified elementwise

Reported by: jvkersch Owned by: burcin
Priority: major Milestone: sage-4.7.1
Component: symbolics Keywords: vector, symbolic, simplify
Cc: jason, rbeezer, vdelecroix Merged in: sage-4.7.1.alpha3
Authors: Joris Vankerschaver Reviewers: Robert Bradshaw
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

This patch adds a class Vector_symbolic_dense to sage.modules, whose functionality at this stage consists solely of providing a simplify_full method. The need for such functionality came up in the review of #10132 (metric surfaces in 3D), where symbolic vectors with complicated entries show up, and explicitly calling simplify_full all the time would be cumbersome (see also #10552).

The modifications implemented by this patch are the following:

  • Adds the class Vector_symbolic_dense;
  • Adds functionality to the element_class function in sage.modules.free_module to use this class;
  • Changes some doctests in free_module_element.py (because vector([1, 2, pi]) is now a symbolic vector rather than an element of a generic free module).

Eventually, this class could be expanded along the lines of sage.matrix.matrix_symbolic_dense.

Attachments (1)

sage-symb-vectors.patch (5.7 KB) - added by jvkersch 9 years ago.
symbolic vector class

Download all attachments as: .zip

Change History (9)

comment:1 Changed 9 years ago by jvkersch

  • Status changed from new to needs_review

comment:2 Changed 9 years ago by robertwb

  • Status changed from needs_review to positive_review

Short and sweet. Looks good to me. More methods added at #11381.

comment:3 Changed 9 years ago by jvkersch

  • Reviewers set to Robert Bradshaw

Hi Robert, thanks for the quick review!

comment:4 Changed 9 years ago by jdemeyer

  • Status changed from positive_review to needs_work

The commit message of the patch should not be one very long line. Please wrap it into multiple lines but try to make sure that the first line makes sense by itself (this is what hg log shows).

Changed 9 years ago by jvkersch

symbolic vector class

comment:5 Changed 9 years ago by jvkersch

  • Status changed from needs_work to needs_review

Hi Jeroen, thanks for the notification. I've updated the patch accordingly.

comment:6 Changed 9 years ago by robertwb

  • Status changed from needs_review to positive_review

comment:7 Changed 9 years ago by jdemeyer

Joris, in the future it would be better to have the ticket number in the filename, for two reasons:

  1. it improves greppability.
  2. it ensures that no two patches from different tickets have the same filename.

comment:8 Changed 9 years ago by jdemeyer

  • Merged in set to sage-4.7.1.alpha3
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.