In his State of the Union address last week, President Reagan mentioned almost casually that, "for the first time in 14 years, the federal government spent less in real terms last year than the year before." It was a startling admission because so rarely made, one of the few times that the president has set aside his familiar theme of overgrown government long enough to acknowledge the largely unremarked success he has had in controlling and restructuring domestic spending.

The record in this regard has been obscured by the rhetoric -- and not just the president's. Wall Street and other fiscal critics claim Reagan and Congress haven't laid a glove on the entitlements that are the great building blocks of the budget and the main engines of domestic spending, while the Democrats would have you believe he has done almost all his foraging among the minority of programs that benefit the poor. In fact:

The largest domestic spending program and great elephant among the entitlements is Social Security: $207 billion last fiscal year, helping to support a seventh of the population. In 1983 this complex system was reinforced so that, in theory at least, the trust funds would be able to support the baby boomers when they retire in the next century. Fundamental changes were made; among other things, it was agreed that the retirement age (at which full benefits are paid) would be gradually increased to 67, and benefits above a certain income level would for the first time be taxed.

The second-largest entitlement and domestic spending program is Medicare ($72 billion last year). In 1983 the traditional and mostly accommodative method by which Medicare had reimbursed hospitals was scrapped in favor of a not-so-distant relative of price controls. To cut costs the government took away from the medical profession an important part of the price-setting function in this sector of health care, and by implication and example altered the entire system of financing health care nationally.

In the 99th Congress the civil service and military retirement systems ($43 billion in fiscal 1987) were also overhauled and -- though the results will be slow in coming -- considerably tightened.

The subsidized housing construction program for the poor has been frozen. The program was so costly -- spending had quadrupled in seven years -- that even the Carter administration had begun to back off.

The Veterans Administration, a kind of government unto itself, is for the first time having to means-test admission to its hospitals. The test is weaker than the principle, which could in time remove what is a double standard for health care in this country.

The system of financing water projects has been changed so that local beneficiaries must bear part of the cost. The rules now in place were also a goal of the Carter administration, on environmental as well as fiscal and fairness grounds. The theory was that the old system did too much damage to the environment for private benefit at public cost, and that cost-sharing would reduce all three disadvantages.

Responsibility for building sewage treatment plants will gradually revert to local and state governments; the federal program will be phased out. A number of other former federal standbys, including general revenue sharing and CETA, a never clearly thought-through program under which the Labor Department paid state and local governments to create public-sector jobs, have been dropped entirely.

Think back to what the government looked like in November 1980, to what were regarded then as the limits of political possibility, and you have a sense of how the landscape has changed. But the president can't afford to say so. If he does, he loses his script; it costs him his villain. The theory seven years ago -- and in some quarters, still -- was that the president's tax cuts and defense buildup could be financed by the growth the tax cuts would induce and the billowing fat to be trimmed from the domestic side of the budget. Now the growth hasn't panned out as expected. If it turns out the president also exaggerated the fat -- and he did -- then a terrible miscalculation has been made. An entire philosophy is at issue, a set of myths about the the nature of the government and its relationship to the economy.

The president has always made a kind of cartoon of the federal government. The comforting and amusing notion was that you could cut forever and never touch a bone. Now it turns out not to be so. In the legislative appendix to the State of the Union address, Reagan reverted to the familiar theme, lamenting that domestic spending continued out of control. He said, correctly, that domestic spending had risen $140 billion from 1981 to 1987, even more than spending for defense. What he didn't say was that $100 billion of that was for Social Security (which after 1983 he refused to touch) and Medicare, together more than half the domestic budget. All other domestic spending, about $275 billion in 1981, rose only $40 billion in the seven years, or about 15 percent in a period of 25 percent inflation. In real terms this residual total -- what might be called the budget of the Federal Triangle -- has been cut by about a tenth. Even that understates what was done, because some expenditures in this remainder -- farm subsidies are the leading example -- greatly increased. The rest had to be cut all the more to compensate -- and the deficit is still $160 billion.

The Democrats are right that some of the cutting Reagan did was regressive -- and would have been more so had Congress not intervened. It's also true that a lot of the cutting has been constructive -- more so than, for opposite reasons, either the president or his critics can afford to acknowledge. As with the tax code, also reformed, Reagan's successor will have a leaner and in many respects more rational base on which to build. The only problem is, he won't have any money.

The writer is a member of the editorial page staff.