Skip to content

Doctests: Symbolic expression matching bug #25168

@rwst

Description

@rwst

This is from GiNaC:

sage: w0=SR.wild(0); w1=SR.wild(1); w2=SR.wild(2)
sage: (sqrt(c+x)*x).match(w0 * sqrt(w0+w1))
sage: (sqrt(c+x)*x).match(w1 * sqrt(w0+w1))
{$0: c, $1: x}
ssage: (sqrt(c*x)*x).match(w0 * sqrt(w0*w1))  # no output: fail
sage: (sqrt(c*x)*x).match(w1 * sqrt(w0*w1))
{$0: c, $1: x}

Matching practically works if wildcards are not repeated. This means it's unusable for serious work.

pynac/pynac#324

This branch adds extensive doctest cases in a file under tests/

Depends on #25447
Depends on #24838

Component: symbolics

Author: Ralf Stephan

Branch/Commit: u/rws/25168-1 @ 7f17534

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions