In the following, are (b) and (d) okay?
a. Cats are as good as, if not better than, other pets.
b. Cats are, if not better than, as good as other pets.
c. Cats are as good as other pets, if not better.
d. Cats are, if not better, as good as other pets.
Hi, Ray and Gustavo—While I like your reasoning, Gustavo, sentences (b) and (d) do not sit well with me. In order of naturalness, from most natural to least natural, I would order the sentences (a), (c), (b), (d).
It could be that (d) is not ungrammatical, but I do not view it as a different way of arranging (c). In (c), the "than"-phrase may be considered to be elided: "Cats are as good as other pets, if not better [than other pets]."
In (d), when "better" is reached, in reading or hearing, there is nothing in relation to which it stands, yet one knows it must stand in relation to something. As a native speaker, I need "than" to herald in that element.
Syntactically, it seems to me that (d) wants to involve Right Node Raising, and needs the "than" in order properly to involve it. In (c), however, Right Node Raising is not needed. "Better" comes at the end, and there is ellipsis.