Skip to content

Improve Refine using SymPy old assumptions #1948

Description

@rocky

Description

The current impelmentation of Refine uses SymPy's new assumptions which is backed by a boolean expression solver.

Two examples withich fail:

Refine[Cos[x + k Pi], Element[k, Integers]]
Refine[Ceiling[x], 2 < x <= 3]

How to Reproduce and Output Given

In[1]:= Refine[Cos[x + k Pi], Element[k, Integers]]
Out[1]= Cos[x + k Pi] (* Should be (-1)^k Cos[x] *)
In[2]:= Refine[Ceiling[x], 2 < x <= 3]
Out[4]= Ceiling[x] (* Should be 3 *)

Additional context

See sympy/sympy#30324 and sympy/sympy#30419

Activity

  1. changed the title [-]Improve Refine using SymPy old assumptions[/-] [+]Improve `Refine` using SymPy old assumptions[/+] on Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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