Opened 3 years ago

Last modified 16 months ago

#25447 needs_work defect

Support all GiNaC substitution flags

Reported by: rws Owned by:
Priority: major Milestone: sage-8.3
Component: symbolics Keywords:
Cc: Merged in:
Authors: Ralf Stephan Reviewers:
Report Upstream: N/A Work issues:
Branch: u/rws/support_all_ginac_substitution_flags (Commits, GitHub, GitLab) Commit: 20ea22a8bc8ad7806f779a3946dc0a53550c1d03
Dependencies: Stopgaps:

Status badges

Description (last modified by rws)

The ex.subs() command only allows flags=0, so for example patternless substitution of wildcards is not possible. Intuitively substitution should replace wildcards in the source expression but this is a separate case in GiNaC. Powers and functions are affected:

sage: w=SR.wild(1)
sage: (w^2).subs(w==x)
x
sage: polylog(w,2).subs(w==x)
x

(here the default algorithm matches w to the whole expression)

GiNaC provides for several flags that can be set with the call to subs(), but Expression.subs() only sends a zero now. In this case GiNaC::subs_options::no_pattern = 0x0001 would be needed.

Change History (4)

comment:1 Changed 3 years ago by rws

  • Branch set to u/rws/support_all_ginac_substitution_flags

comment:2 Changed 3 years ago by rws

  • Authors set to Ralf Stephan
  • Commit set to 20ea22a8bc8ad7806f779a3946dc0a53550c1d03
  • Status changed from new to needs_review

New commits:

20ea22a25447: Support all GiNaC substitution flags

comment:3 Changed 3 years ago by rws

  • Description modified (diff)

comment:4 Changed 16 months ago by vdelecroix

  • Status changed from needs_review to needs_work

does not apply

Note: See TracTickets for help on using tickets.