Left lifting property and pushout

Let's say we are working in category $$\mathcal{C}$$, and that the three morphisms $$f: X \rightarrow X'$$, $$g: Y \rightarrow Y'$$ and $$h: Z \rightarrow Z'$$ have the left lifting property with respect to a class of morphisms $$S$$.

Can we say that that the map $$g \sqcup_{f} h : Y \sqcup_{X} Z \rightarrow Y' \sqcup_{X'} Z'$$

has also the left lifting lifting property with respect to $$S$$?

Given a lifting problem for the map $$g \sqcup_{f} h$$ I can get lifting problems for the maps $$f,g$$ and $$h$$ but I cant "patch" them to get a map from the pushout solving my initial lifting problem...

• You should be more specific concerning the class $S$. – Jochen Wengenroth Nov 6 '18 at 13:04
• Do you mean left lifting property throughout the text, as in the title? (Not right lifting property.) – Reid Barton Nov 6 '18 at 15:12
• I indeed meant left lifting property. It is corrected in the original post. – Oscar P. Nov 6 '18 at 20:33
• The answer below already explains that this doesn't hold. However, there is an easy sufficient condition. If in addition to $f$, $g$ and $h$ having the LLP with respect to $S$, we assume that the induced morphism $Y \sqcup_X X' \to Y'$ has the LLP with respect to $S$, then the answer is positive. – Karol Szumiło Nov 7 '18 at 8:20
• @Karol Szumilo : I think you mean $Y' \sqcup_{Y} X \rightarrow X'$ ? Indeed, this is a nice condition ! Do you know if it might be necessary to have this (or the symmetrical condition) ? – J. Darné Nov 7 '18 at 12:15

The following example should convince you that you cannot have the lifting property you want in all generality. It would be interesting to know exactly when you can get it (which is obviously the case when the lifting wrt $$g$$ is unique), but I do not have an answer to that.
If your category is the category of groups, and $$S$$ is the class of surjections, take $$X=Y=Z=Z'=1$$, $$X'= Y' = \mathbb Z$$, with $$X' \rightarrow Y'$$ being multiplication by $$2$$, all the other maps being $$1$$ (as they should be). Then $$1 \rightarrow \mathbb Z$$ has the LLP wrt S, and so does $$1 \rightarrow 1$$. But the map you are insterested in is $$1 \rightarrow \mathbb Z/2$$, which does not have the LLP wrt $$S$$: a 2-torsion element does not always lift to a 2-torsion element through a surjection - take $$(\mathbb Z \rightarrow \mathbb Z/2) \in S$$, for instance.
For the record : The original question was asked the other way around, with RLP instead of LLP (which would still make sense for some $$S$$ and some pushouts). I leave my previous answer there for the record, as a funny example:
If your category is the category dual to groups, and $$S$$ is the class of group surjections, then $$1 \rightarrow \mathbb Z$$ has the RLP wrt S (in $$\mathcal {Grp}^{op}$$, that is the LLP in $$\mathcal {Grp}$$), and so does $$1 \rightarrow 1$$. But $$1 \rightarrow \mathbb Z \times \mathbb Z$$ clearly does not (commuting elements do not always lift). And this is a pullback in $$\mathcal {Grp}$$, thus a pushout in $$\mathcal {Grp}^{op}$$.