Y Combinator founder Paul Graham likes to style himself a defender of Silicon Valley against those who fear progress or resent success. Lately, he's been fretting about economic inequality -- that is, about the way the vast wealth being created in the technology industry has made it a punching bag for those who would combat economic inequality. 

To blame the Silicon Valley billionaire factory for widening inequality, Graham says, is to buy into the "pie fallacy," the idea that wealth is a pie of fixed size and making one person's slice larger shrinks another's. That's true of so-called zero-sum businesses like finance, but it's not true of technology businesses, which grow the pie for everyone, he says: 

In the real world you can create wealth as well as taking it from others. A woodworker creates wealth. He makes a chair, and you willingly give him money in return for it. A high-frequency trader does not. He makes a dollar only when someone on the other end of a trade loses a dollar.

But Graham's analogy misses something important. In some circumstances, even wealth created in a non-zero-sum way has the practical effect of making the poor poorer. And it's odd Graham wouldn't recognize that, since he lives in a region that's a perfect example of those circumstances. 

Competition for resources is also something that can be zero-sum, and it often is when it comes to the most important resource of all--housing. As the saying goes, real estate is a great investment because they aren't making any more of it. That's almost as true when it comes to housing in places like San Francisco and Mountain View, where building restrictions ensure the supply of units grows far more slowly than demand. 

Housing isn't like the other things people spend money on. It consumes around a quarter of the average family's income, far more than any other category of expenditure. It's also key to economic mobility. For most people, home ownership is one of the biggest sources of wealth accumulation. An inability to find the right kind of housing, meanwhile, is costly: Recent studies have determined that a long commute is among the strongest determinants of whether someone escapes poverty. Then there's education: The better the school district, the more it costs to rent or buy there.

In cash-rich, inventory-poor places like San Francisco and Palo Alto, the deluge of tech wealth has pushed up housing prices to the point where it is literally impossible to buy a house on a middle-class income. That leaves the non-rich with a stark choice: Live in the city and forego the economic benefits of buying a home (or otherwise investing that money), or move to the outer precincts and accept reduced access to employment and/or opportunity and/or education. The higher the cost of housing, the higher the barriers to participating in the startup scene Graham idolizes. No wonder such a high proportion of startups are founded by 20-somethings without families; for those not already well off, the only way to live in San Francisco or Palo Alto is often in dorm-style group homes, an impossibility for anyone with children. 

Graham talks about economic inequality as if those concerned about it want to turn America into planet Camazotz from "A Wrinkle in Time," where every house is the exact same and the children bounce their balls in perfect unison. That's not what anyone wants, of course. The goal of policies for combating income inequality isn't to make sure wealth is distributed evenly among everyone. It is, or should be, to offset the effects of the feedback loops that ensure the rich get richer and the poor stay poor. 

Graham is right to emphasize the important of startups as an engine of economic dynamism. But economic dynamism and social mobility, which Graham also claims to care about, don't automatically go hand in hand. Figuring out how to make them will take hard work and thoughtful policy. Defensiveness and self-congratulation won't cut it.