Having spoken contemptuously about “New York values,” Texas Sen. Ted Cruz had a catastrophic election night in New York. So it’s fitting that just one day after the primary, Treasury Secretary Jack Lew announced that Alexander Hamilton — the founder of New York values — will remain on the $10 bill. It also is fitting that in the same week “Hamilton,” the musical, a joyful celebration of New York values, won the Pulitzer Prize for drama.

Most politicians who run for national office develop a deep affection for the nation’s diverse states, with all their unique quirks and histories. It’s much worse than bad politics for a candidate to complain about “Vermont values,” “Nebraska values,” “Georgia values,” “Ohio values” or the values of any of the states. In light of the nation’s hard-won unity, it’s a betrayal of the great motto of the United States, which also can be found on our currency: E pluribus unum (from many, one).

Which brings us to that guy on the $10 bill. An illegitimate child, Hamilton was born in the British West Indies, abandoned by his father and orphaned as a teenager. When he was about 17, he made his way to New York.

It’s there that he attended college (King’s, which became Columbia University), began his career, joined the Revolutionary Army, founded the Bank of New York and wrote many of The Federalist Papers (addressed, by the way, “To the People of the State of New York”). It’s in New York that he died and is buried. It’s easy to visit the many places where he lived and worked.

Among the founders, Hamilton was probably the most passionate advocate of national unity. He wanted people to think of themselves as Americans, not as citizens of separate states.

In the Federalist Papers, he spoke of the union as a great barrier to the potentially destructive spirit of factions and hostility among the states: “Let the thirteen States, bound together in a strict and indissoluble Union, concur in erecting one great American system.” He was alarmed by the dangers “from dissensions between the States themselves, and from domestic factions and convulsions.”

During the Constitution’s framing, a little-known revision of the preamble clarifies Hamilton’s ultimate triumph. An early draft began this way: “We the People of the States of New Hampshire, Rhode-Island and Providence Plantations, Connecticut, New-York” and so forth “do ordain, declare and establish the following constitution for the government of ourselves and our posterity.”

The start of the final preamble is in a far more Hamiltonian spirit, and it’s much better: “We the People of the United States, in order to form a more perfect Union.”

Which brings us to “Hamilton,” the musical showing in New York. Beloved by Dick Cheney and Barack Obama, it’s the 21st century’s great national unifier. It’s about the founding period, but the music is hip-hop, and most of the actors are African-American and Hispanic. It also produces a miracle: Across time, geography and skin color, it connects “We the People.”

Above all, it asks a terrific question.

“How does a bastard, orphan, son of a whore and a

“Scotsman, dropped in the middle of a

“Forgotten spot in the Caribbean by providence

“Impoverished, in squalor

“Grow up to be a hero and a scholar?”

The answer is all-American:

“The 10-dollar founding father without a father

“Got a lot farther by working a lot harder

“By being a lot smarter

“By being a self-starter.”

Hamilton also knew something important about his adopted country:

“Plannin’ for the future see

“Him now as he stands on

“The bow of a ship headed for a new land

“In New York you can be a new man.”

That’s a New York value, and if we’re looking for our nation’s defining idea, it’s right there. For more than 200 years, we the people of the United States have been trying to perfect it.

Cass R. Sunstein, the former administrator of the White House Office of Information and Regulatory Affairs, is the Robert Walmsley university professor at Harvard Law School and a Bloomberg View columnist.