# Display assumptions of a variable

If I restrict a variable x to x>0 via $Assumptions=x>0, is there a way I can get Mathematica to tell me that x>0? I would have guessed typing Attributes[x] would say something, but it gives {}. ## 1 Answer I don't yet have the reputation for commenting, but perhaps this suffices as an answer as well: why not just evaluate $Assumptions to get a list of active global assumptions about variables?

$Assumtions=x>0$Assumptions
(*x>0*)

• (+1) in case #Assumptions is a long list involving other variables, you can filter using Cases[_[___, x, ___]]@$Assumptions or Select[Not@*FreeQ[x]]@$Assumptions
– kglr
Feb 18 at 5:19