The notion of President Carter's political resurrection, which has taken root in Washington in the past month, encounters credibility problems 136 miles away in Philadelphia, where a four-hour visit by Sen. Edward Kennedy pointed up the awesome task faced in renominating the president.

Kennedy showed himself as a powerful, tough unpolished, platform, speaker. While consciously escalating his attacks on Carter's leadership, Kennedy dodged Carter's effort to identify him with the Democratic Party's left wing. What's more, bitterly antagonistic factions of Philadelphia Democrats are all moving to Kennedy with scarcely anybody of prominence loyal to the president.

Philadelphia is, therefore, a political wasteland for Carter. Victory in the Pennsylvania primary clinched the 1976 nomination for him, and his strategists had looked to the 1980 primary next April as the potentially decisive Kennedy-Carter test. But no Carter base in Philadelphia, thanks to three years of inflation, makes for bleak statewide prospects when combined with Kennedy's appeal.

Kennedy's performance here, in three pep talks and one full-scale speech, belied the widening theory that Teddy as candidate will be less popular than Teddy has been as non-candidate. Although his voting record is to the left of even Sen. George McGovern, Kennedy made clear he is no self-destructing doctrinaire through the non-ideological content of his speech and his ability to attract disparate elements of the party.

His speech as a fund-raiser for ex-congressman William Green's campaign for mayor denounced "leadership that has failed to do the job," and contained no ideological overtones than John Kennedy's exhortations to greatness in 1960. Save for an attack on oil decontrol, it could easily have been delivered by John B. Connally.

Like JFK's campaign oratory, Ted Kennedy's comes over stronger on the stump than it reads in cold print. One Democratic insider who was shown an advance copy of the speech here was disappointed by "ho-hum rhetoric." He was shocked that when delivered in Kennedy's high-pitched, sing-song style, the prosaic language became a searing indictment of the Carter presidency.

The $100-a-plate diners, including top corporate officials, applauded frequently but with restraint. A more spirited reaction came later at a South Philadelphia rally, where some 4,000 people cheered. Speaking without notes, in tones of a carnival barker, Kennedy shouted that in years past "we didn't throw up our hands in despair. We didn't talk about a malaise of the American spirit. We rolled up our sleeves."

Old friend Bill Green was with Kennedy at every stop. But also at Kennedy's side during the South Philly rally were allies of outgoing rightwing Democratic Mayor Frank Rizzo, long an enemy of Green. Kennedy also telephoned to pay his respects to another Rizzo stalwart: city Democratic Chairman Marty Weinberg, absent from the evening's Green-for-mayor events.

Once Kennedy actually announces for president, Weinberg is likely to support him. So is ward leader Pete Camiel, who feuded with Rizzo as city Democratic chairman. They will surely be joined by Ed Toohey, head of Philadelphia's AFL-CIO, and most of the city's other labor leaders. Philadelphia liberals long ago backed Kennedy.

Against this ecumenical array, who is for Jimmy Carter? Nobody but some black leaders (believed unable to swing black voters from Kennedy) and 78-year-old ex-senator Joseph S. Clark. As for Green, he has endorsed Carter as part of a deal with black leaders, but nobody expects it to stick.

The president is reaping the bitter harvest of three years of neglecting the city whose 258,000 plurality overcame Gerald Ford's 127,000 edge elsewhere in the state. The fact that Carter has not set foot in Philadelphia as president may be justified by a desire to avoid Rizzo. But that does not explain ignoring other party leaders.

Carter operatives talked privately of Pittsburgh-for-Carter counteracting Philadelphia-for-Kennedy with the issue settled in the smaller counties. But there is no sign Kennedy is significantly less popular in Pittsburgh than in Philadelphia. Furthermore, Carter cannot count on Peter Flaherty, who as mayor of Pittsburgh spearheaded Carter's 1976 Pennsylvania campaign. Back home after a short tour as Carter's deputy attorney general, Flaherty calls himself "totally undecided" and, in fact, traveled to Philadelphia for Kennedy's appearance.

Above all, Carter is fighting a legend: the little dance orchestra wailing out "Camelot" at the dinner, accents reminiscent of the two earlier Kennedys, the staccato call to greatness. Since Kennedy will not match his rhetoric to his Senate voting record, Carter irresistible course in this and other important states may be personal attack. His Philadelphia wasteland would then turn into a bloody battleground.