Budget books can have something of an Alice-in-Wonderland aura about them: Fall into the budget well and some figures grow wildly while others shrink, and the explanations of what is really happening to programs rings of the Mad Hatter's tea party.

One might wonder, for example, how Mayor Marion Barry last week managed to announce such a no-pain budget for the coming fiscal year, with increases in popular programs, after the heads-in-their-hands posture that city officials have been taking about upcoming sharp federal cutbacks.

Barry started by conveniently forgetting about those cuts and did not deal at all with reducing the accumulated general fund deficit, which is never a crowd pleaser.

With that edge, Barry sprinkled his election-year spending plan with numerous additions for selected constituencies: two new senior centers and five new nutrition sites, a huge jump in city programs for Hispanics, shared housing for AIDS victims, longer library hours and more sidewalk repairs.

But there are other numbers buried in the three large budget volumes put out by the city that counter the joyous news.

Even before all of the federal cuts are known, the budget bodes ill for a number of the District's large institutions that serve many of the most vulnerable but nearly invisible in our society: the poor, sick elderly at D.C. Village; incarcerated juvenile delinquents at Cedar Knoll, and the mentally retarded at Forest Haven.

At D.C. Village, the city's nursing home for the indigent elderly that sits at the far tip of Anacostia near the pungent Blue Plains sewage treatment plant, the city's funding is to rise by $36,000, a mere blip in terms of the $24.5 million total budget there.

Two disabled elderly people died at D.C. Village early last year in bizarre freezing and scalding accidents, raising questions about staffing levels at the nursing home, and city officials have been saying that they are beefing up resources at the home.

The budget assumed a drop of $1.6 million in federal funding at the facility, to a level of $10.6 million. The budget book said that federal funds are used for all programs and services at D.C. Village, but nowhere does it say how those services will be provided without the funds, particularly since it anticipates an increase in the average number of patients there.

About 137 patients from St. Elizabeths are to be moved there as part of the city's deinstitutionalization effort, according to the budget, which notes that some St. Elizabeths staff members are expected to go to work at D.C. Village as a result, but does not say who will pay for them.

Sue Brown, D.C. Village's acting administrator, said the reduction resulted from an unexpected decrease in reimbursements for Medicaid that will occur in this fiscal year, but is reflected in the fiscal 1987 budget.

She could not say what impact the reduced Medicaid funding will have on programs and services at D.C. Village.

Cedar Knoll, the city's minimum security institution in Laurel, Md., for delinquent juveniles, does not even get official recognition in the budget, because the city has been saying for years that it is closing the facility and placing the juveniles there in supervised community homes or in Oak Hill, the maximum security facility for youths.

But while the budget shuts its eyes to Cedar Knoll's existence, the institution is still there -- and the population of youths sent there by the courts jumped dramatically last fall, to the surprise and consternation of city officials.

The number of juveniles at Cedar Knoll had dropped to 30 last October but has risen quickly, and this week reached 119, mainly because more youths are being charged and held for selling drugs or stealing cars.

The budget shows Oak Hill getting one more staff member and another $717,000, chiefly to improve its educational system so the District will be in compliance with federal laws.

The budget is silent on what is supposed to happen at Cedar Knoll and what funds will be devoted to dealing with the remaining juveniles there.

"We have many more kids than the budget will support," said social services budget officer Stacie Balderston. "Everyone is saying we'll figure it out later, we'll reprogram later."

At Forest Haven, the city's institution in Laurel for mentally retarded persons who cannot live with their families, the District has been under court order since 1978 to get residents back into the community -- at a rate of at least 100 a year -- and close the facility.

The budget, in essence, acknowledges that its assumption that the rate of 100 a year may not be realistic because of neighborhood opposition to group homes for the mentally retarded. There are 300 residents still at Forest Haven.

The budget also calls for moving 63 staff members out of Forest Haven, which would save money, but Balderston said that this may not happen, either.

"Forest Haven still has more population than the budget assumes," Balderston said. "We may have a problem in 1987 in Forest Haven, if all of their experiences follow this pattern of the population not reaching 250 and the staff not leaving."

There are places to shave costs at Forest Haven, however, she added, and this is not as severe a potential problem as Cedar Knoll.

But for the time being, like Alice in her second adventure, the District Building is doing it with mirrors.