The next thing is to flatten subselects. By getting rid of subselects, a couple more options to optimize the query will appear.
Here is what the query will look like after flattening the subselects:
SELECT * FROM a, b, c WHERE a.aid = c.cid AND aid = bid AND cid = 4;
It is now a normal join. Note we would have done that on our own but the planner will take care of those transformations for us anyway. The door is open for a key optimization.