# shift picewise functions

Suppose I define a piecewise function f for example:

```
f = Piecewise([[(-infinity,1),1],[(1,+infinity),x]])
```

How to define the shifted function g with g(x) = f(x-2) for all x?

Or more generally: If h is another function. How to define $g = f\circ h$ in sage?