Skip to content

Create an assuming() context manager #24119

@EmmanuelCharpentier

Description

@EmmanuelCharpentier

Inspiration : Ralf Stephan in #22322. Thanks to him for nudging me in the right direction.

Goal : create a tool allowing to create reusable, stackable, assumption elements, thus allowing to get the functionality of Mathematica's Assuming[...,???]

What I mean :

sage: solve(x^2==4, x)
[x == -2, x == 2]
sage: with assuming(x>0): solve(x^2==4, x)
[x == 2]
sage: assumptions()
[]

CC: @rwst

Component: symbolics

Author: Emmanuel Charpentier

Branch/Commit: 017f67c

Reviewer: Ralf Stephan

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions