On Friday, March 4, 2016 at 12:09:18 AM UTC+5:30, Kshitij Saraogi wrote: > > This post is with regards to the *Set Infrastructure* part of the project > idea. > > After reading a few resources and the ``sets`` module, I would like to > know about a few of these points: > > - Handling multidimensional sets > The Ideas Page states that we need to implement few functions to handle > multidimensional set objects. > We have a ProductSet class which represents Cartesian Product of Sets. > Shouldn't a n-ary ProductSet object represent a n-dimensional set > object ? > If not, I would like to know more about this topic. > > Yes, that can work as well. See the implementation of ComplexRegion for Two-Dimensional representation of the argand plane.
> > - > > While reading Harsh's GSoC Application Proposal, I came across a few > points that I think need to be addressed. > > - Sets need to get more powerful to deal with countable infinite sets. > I think this needs to be implemented as it enhances over power to deal > with > ImageSet objects. I will read the relevant resources and try to implement > them. Harsh's PR #2904 might come in handy as well. > - Better imageset evaluator I would like to know what exactly is the > inspiration behind this ? > > See this: https://github.com/sympy/sympy/pull/10713#issuecomment-191472434 The following could be much simplified with a better Imageset evaluator. In [11]: solveset(sin(3*x), x) Out[11]: ⎧ 2⋅π ⎫ ⎧ 2⋅π {2⋅n⋅π | n ∊ ℤ} ∪ {2⋅n⋅π + π | n ∊ ℤ} ∪ ⎨2⋅n⋅π - ─── | n ∊ ℤ⎬ ∪ ⎨2⋅n⋅π + ─── | ⎩ 3 ⎭ ⎩ 3 ⎫ ⎧ π ⎫ ⎧ π ⎫ n ∊ ℤ⎬ ∪ ⎨2⋅n⋅π - ─ | n ∊ ℤ⎬ ∪ ⎨2⋅n⋅π + ─ | n ∊ ℤ⎬ ⎭ ⎩ 3 ⎭ ⎩ 3 ⎭ > - > > More general set to native type converters, they include Bool to Set > and Set to Bool conversion for multidimensional sets and bools. > > I read that we already have Boolean to Set converters in SymPy but I > am not able to find them. > > as_relational and as_set functions are implemented. In [18]: bool = Interval(3, 5).as_relational(x) In [19]: bool Out[19]: 3 ≤ x ∧ x ≤ 5 In [20]: bool.as_set() Out[20]: [3, 5] > > - > > Do we still have them in our codebase or has it been removed ? > Moreover, I would like to know a good usecase for this. > > Feel free to add the points I might have overlooked here. > > ------------------- > Kshitij Saraogi > Amit Kumar -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/95f15f8d-c885-43e0-a969-f2bcc2af96fc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
