When a dummy takes on the IRS, you can guess the outcome. The dummy takes it on the chin. But in the case of Brendan O'Smarty and his alter ego, Officer Bob Geary of the San Francisco police, they're not taking defeat in tax court lying down. "We're disappointed, but we're going to file an appeal," said Geary, a veteran officer who walks a North Beach beat with his 10-pound wooden sidekick, a querulous ventriloquist's dummy wearing police blues and a shiny badge numbered "1/2." "Brendan is very upset. In fact, I'm afraid when we appear in appeals court I might have to tape his mouth. I don't want to go to jail." At issue in the veteran officer's petition before the U.S. tax court was a deduction Geary took on his 1993 tax return for the dummy. He'd put O'Smarty on San Francisco's ballot when the police brass balked at allowing him to carry O'Smarty on patrol. Geary formed the Committee to Save Puppet Officer Brendan O'Smarty, and amused voters gave the dummy a narrow victory. Then Geary, who has been honored four times for valor, claimed an advertising expense deduction of $11,465 on his return. Can't do that, countered the Internal Revenue Service, saying Geary's expenses were for lobbying and political expenditures. Geary decided to fight. On April 2, more than a year after the trial, Special Trial Judge Stanley Goldberg sided with the IRS, saying the expenses were not deductible. "Expenses incurred to influence the public with respect to legislative matters, decisions or referendums are nondeductible," Goldberg said. Geary owes the federal and state governments about $8,500, including penalties and interest. Geary's tax lawyers said they thought the judge made "an overly broad reading of the law." They said they would appeal the decision. A police officer for 29 years, Geary, 59, came up with the idea for his pint-size pal after police administrators encouraged officers to use creative ways of communicating with the public. He paid $2,000 for Brendan, outfitting the grinning dummy in a miniature uniform replete with water pistol and business card printed "Courageous pathfinders to justice."