The far right and the far left — the MAGA brigades and the uber-woke progressives — violently disagree about most things. But they share a common passion for rewriting U.S. history to fit their ideological preferences.

Shortly before President Donald Trump left office, his now-disbanded 1776 Commission unveiled a tendentious report that denounced “political agendas in the classroom” while promoting — you guessed it — its own political agenda for the classroom.

The commission began by trying to absolve the United States of its original sin of slavery. It falsely claimed that George Washington “by the end of his life . . . freed all the enslaved people in his family estate” (only one enslaved person was freed immediately after Washington’s death) and that “the movement to abolish slavery … first began in the United States” (Britain and other European countries banned slaverydecades before we did, and they did it without a war). The report then astonishingly attacked the constitutional amendments abolishing slavery and granting equal protection under the law by claiming that “the damage done by the denial of core American principles and by the attempted substitution of a theory of group rights in their place proved widespread and long-lasting.” The commission made no attempt to grapple with the mistreatment of Native Americans; the “Trail of Tears” went unmentioned.

The commission was much more exercised about the Progressives — the early 20th-century reformers such as President Theodore Roosevelt who sought to curb political corruption, child labor, pollution, corporate monopolies, tainted food and medicine and other social ills. In the commission’s perverse telling, the Progressives “rejected the self-evident truth of the Declaration” and paved the way for Italian fascism: “Like the Progressives, [Benito] Mussolini sought to centralize power under the management of so-called experts.” This is part of the Trumpist propaganda against the (nonexistent) deep state: The commission blamed the Progressives for creating a “shadow government” that “today operates largely without checks and balances.”

The 1776 Commission concluded with a disingenuous blast against affirmative action. “The civil rights movement was almost immediately turned to programs that ran counter to the lofty ideals of the founders,” it argued. “Among the distortions was the abandonment of nondiscrimination and equal opportunity in favor of ‘group rights’ not unlike those advanced by [John] Calhoun.” It is obscene to equate civil rights advocates with a proslavery ideologue like Calhoun. And it is simply wrong to depict affirmative action as a betrayal of the civil rights movement: The Rev. Martin Luther King Jr. favored“preferential” programs for “the Negro” to redress historic wrongs.

James Grossman, executive director of the American Historical Association, was on target in describing the 1776 Commission report as a “hack job,” “not a work of history.” “It’s a work of contentious politics designed to stoke culture wars,” he told The Post. But the same criticism applies to the San Francisco Board of Education’s recent decision to change the names of 44 schools that offend its delicate progressive sensibilities.

The names removed include George Washington and Abraham Lincoln, our two greatest presidents; Scottish novelist (and onetime San Francisco resident) Robert Louis Stevenson; “Star-Spangled Banner” lyricist Francis Scott Key; conservationist John Muir; and even Sen. Dianne Feinstein (D-Calif.), a former mayor of San Francisco. The school board even voted to rename a school called El Dorado after the mythical city of gold sought by Spanish explorers (“This is a colonizer myth”).

The school board relied on a spreadsheet, apparently compiled by someone who spent 10 minutes on the Internet, to list the offenses against contemporary mores that justified the renamings. The result is many howlers. Paul Revere was erased for commanding the “disastrous Penobscot Expedition of 1779,” which the spreadsheet asserts “was directly connected to the colonization of the Penobscot.” This was actually an expedition to reclaim Maine from the British, not to colonize the Penobscot people, who sided with the patriots.

The spreadsheet originally called out the 19th-century abolitionist poet and diplomat James Russell Lowell on the grounds that “he did not want Black people to vote.” When this was pointed out as false, the spreadsheet was adjusted to read: “He advocated suffrage for blacks, yet he noted that their ability to vote could be troublesome.” The “facts” change, but the verdict remains the same: Off with his name!

I’m all for getting rid of monuments to Confederate leaders — they fought to destroy the Union and to preserve slavery — but this is ridiculous. There is no recognition by the school board that historical figures are complicated, seldom all good or all bad, and that they should be judged by the standards of their day, not ours. “If you can only name schools after people who were perfect, you will have a lot of unnamed schools,” notes Eric Foner, the great historian of the Reconstruction era.

It is no surprise that the 1776 Commission did not include a single expert on U.S. history and that the San Francisco school board also refused to consult historians. “What would be the point?” askedJeremiah Jeffries, the chairman of the renaming committee. The point would be to understand history, rather than to distort it. But that is the last thing either the far left or the far right wants.