# Expression with Boole

Let us have an expression for example, this:

2 (-1 + p) (3 - 4 p + 2 p^2) Boole[\[FormalX] == 1] - 9 (1 - 2 p + p^2) Boole[\[FormalX] == 2] ...


For the whole context, it is a product of function dist = StationaryDistribution[DiscreteMarkovProcess[1, P]] // First

Now I would like to manipulate with the expression when X == 1, X == 2, etc.

Maybe it is not Mathematica idiomatical way. The result I would like to achieve in my case is a standard stationary matrix for the Markov process, so something like this.

{{dist_when_X==1, dist_when_X==2, ...}}


The solution with Simplify[dist, x==1] does not work (but not sure if it should work anyway).

• this?P = DiscreteMarkovProcess[{1, 0, 0}, {{0, 1/2, 1/2}, {1/2, 0, 1/2}, {1/2, 1/2, 0}}]; PDF[P[t], x] // First Oct 17, 2019 at 7:04

{{PDF[ DiscreteMarkovProcess[1, P][Infinity], 1],PDF[ DiscreteMarkovProcess[1,P][Infinity], 2], ...}} // MatrixForm

where P is Markov transition matrix and the second PDF argument is the value of Boole.