Skip to content

MatchQ[1 + 2 x, (a_. + b_. x_Symbol)] incorrectly failing  #1172

@rocky

Description

@rocky

Description

MatchQ[1 + 2 x, (a_. + b_. x_Symbol)] also returns False when it should return True.

How to Reproduce

$ mathics
In[1]:= MatchQ[1 + 2 x, (a_. + b_. x_Symbol)]
Out[1]= False (* Wrong *)

In[2]:= MatchQ[2 x, (a_. + b_. x_Symbol)]
Out[2]= True (* Correct *)

Additional context

This comes from trying to get Rubi working. The function in that, which is failing is called Default[]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions