With his sexually explicit, four-hour magnum opus “Nymphomaniac,” world cinema’s enfant terrible Lars von Trier re-emerges as its dirty-old-man terrible, delivering a dense, career-encompassing work designed to shock, provoke and ultimately enlighten a public he considers altogether too prudish. Racy subject aside, the film provides a good-humored yet serious-minded look at sexual self-liberation, thick with references to art, music, religion and literature, even as it pushes the envelope with footage of acts previously relegated to the sphere of pornography. Even so, in this cut of “Nymphomaniac,” the only arousal von Trier intends is of the intellectual variety, making this philosophically rigorous picture — which opens abroad on Dec. 25 and domestically in two parts, on March 21 and April 18 — a better fit for cinephiles than for the raincoat crowd.

As an onscreen disclaimer makes clear from the outset, “This film is an abridged and censored version” of von Trier’s bigger, longer and uncut edit, which is said to run five-and-a-half hours. According to a note from producer Louise Vesth included in the press notes, “Technically the changes in the abridged version consist of an editing out of the most explicit closeups of genitals,” though such footage cannot possibly account for 90 minutes of footage (can it?), especially considering that the American version serves up a montage of roughly two dozen flaccid penises, presumably an inventory of its protagonist’s conquests. For most, four hours will be plenty, and the film doesn’t feel compromised in any way. (Different territories will reportedly see different cuts, according to local decency standards.)

After a hypnotic opening sequence — a back-alley symphony of sorts, featuring the drum of rain on tin roofs — an older gentleman named Seligman (Stellan Skarsgard) finds Joe (Charlotte Gainsbourg) bloody and abused on the cold, wet pavement. He invites her back to his sparsely furnished flat for tea and conversation, eager to hear this alluring stranger’s confession. “It will be long and moral, I’m afraid,” Joe warns, and commences to retell her entire sexual history, beginning with the line, “I discovered my cunt at age 2.” That line, sure to spark nervous laughs, sets the tone for a character who cannot abide euphemisms. It is always her “cunt” in question, never something more delicate, and in no time, she’s riding the train in search of partners.

Sex is a game to the teenage Joe (played by Stacy Martin), who forms a club “committed to combat the love-obsessed society.” Seligman listens intently to the story of her deflowering — an unromantic formality at the hands of a lad named Jerome (Shia LaBeouf, who appears naked and erect) — and subsequent blooming as a sexual being. Joe’s tale divides into eight stylistically distinct chapters, which alternate between frosty color and stark black-and-white, with Martin playing the character for the duration of the first volume. Though Martin could conceivably be mistaken for a young Jane Birkin, she’s a bit of a stretch as an early version of Gainsbourg, showing few of the tomboyish qualities of the star’s teenage years, to the extent that one wonders why von Trier didn’t ask Gainsbourg to play the character at all ages.

A model not shy about nudity, Martin doesn’t seem at all awkward, but rather embodies — to riff upon the language of “Lolita’s” lusty Humbert Humbert — a young “nymph.” For Seligman, that word evokes connotations of fly fishing, and von Trier indulges the suggestion by inserting stock footage of the sport. Seligman has a peculiar effect on the shape of “Nymphomaniac,” which has an unfortunate habit of resetting to the framing conversation any time things start to get “good” onscreen — not racy, necessarily, but just as Joe’s story draws auds in, Seligman reliably interrupts with some sort of comment about what it all means.

In that respect, the film appears to be interpreting itself, as Seligman points out cultural references (imposing everything from Christian symbolism to Fibonacci numbers) and offers unsolicited feedback along the way. And yet, there’s nothing to indicate that his reading of the material is correct (at one point, Joe quips, “I think this was one of your weakest digressions,” and begs to continue), rendering him somewhat like another Nabokov character: Charles Kinbote, the second-rate academic who smugly imposes his lesser-minded theories upon a superior poet’s work in “Pale Fire.”

In time, we learn that Seligman is a virgin, a revelation that not only explains his inability to relate to many of Joe’s escapades — which shift from the workplace to her apartment to the hospital where her father (Christian Slater) lies delirious and dying — but also may be von Trier’s way of critiquing critical interpretation altogether. Consider this: Seligman serves as a stand-in for the film critic, a dilettante who free-associates as he listens, drawing educated but somewhat naive conclusions about someone else’s deeply personal life experience. But unlike most critics, Seligman casts no judgment. And yet, by elbowing in whenever Joe’s stories approach relatability, he forces a buffer between the film and its audience, reminding us of the film’s dialectical structure instead of inviting personal responses.

At the end of “Vol. 1,” having tested the boundaries with countless partners and faced the consequences of her actions — depicted in an unexpectedly amusing confrontation between Joe and one of her lover’s wives (a ferocious Uma Thurman), who insists on showing her children “the whoring bed” — Joe loses sensation where it counts. Regaining her capacity for orgasm will become the focus of the film’s second half, which opens with Joe pregnant via Jerome (still LaBeouf, digitally fused with a body double to appear quite the stud in the sack) and veers into far darker territory.

Those familiar with von Trier’s work will pick up on connections between his earlier films and “Nymphomaniac,” as when Jerome’s offers to let Joe pursue her lost orgasm with other lovers — a point of overlap with Skarsgard’s unorthodox sexual arrangement in “Breaking the Waves.” In the nearly two decades since von Trier unveiled the Dogma 95 manifesto, his work has become increasingly provocative, from integrating real sex in “The Idiots” to figuratively shaking his fist at God with “Antichrist.”

If “Nymphomaniac” feels somewhat tame by comparison, that is surely a reflection of the compromised edit, considering the controversial elements Joe experiments with in the second half: sadomasochism, pedophilia, homosexuality and, most outrageously, a mixed-race three-way. (Any who doubt whether von Trier wants audiences to laugh at the absurdity of it all need only consider the sight of Joe, looking bewildered in a cheap hotel, framed by two visibly excited black suitors. And yet, the director still intends to scandalize, serving up such images as labia that “open” to reveal an eye and a metal rod inserted into a woman’s genitals.

Still, if von Trier means to challenge the depiction of sex onscreen, the truth of the matter is that people can find far more explicit imagery with a simple Google search. And when it comes to the potency of ideas, his script doesn’t uncover anything that wasn’t previously addressed by Anais Nin, Henry Miller or the Marquis de Sade. In fact, given the film’s overall tendency to describe rather than depict specific memories — the exception being the “Silent Duck” chapter, in which Jamie Bell disciplines and degrades Joe on camera — “Nymphomaniac” might actually have been more effective as a novel.

But von Trier doesn’t entirely trust the power of his words either, punctuating Joe’s narration with cheeky diagrams and generic stock footage, often to humorous effect. One can hear von Trier’s politics woven into dialogue spoken by each of the characters, as when Skarsgard declares the concepts of both sex and religion interesting, “but you won’t find me on my knees with regards to either.” Later, Joe cuts to the essence of things, rejecting a sex addiction counseling session by announcing, “I love my cunt and my filthy dirty lust.”

The film aims to overcome millennia of shame and judgment toward sexual behavior, though von Trier is hardly the first crusader on this front, and such landmark art films as “Belle de Jour” and “Romance” delve far deeper into the impulses behind aberrant sex. By contrast, “Nymphomaniac” feels curiously devoid of psychological interpretation, rejecting Seligman’s pet theories on that front, while also using the dialogue between these characters to preempt charges of misogyny. Though the film ends with a chapter titled “The Gun” (as phallic a symbol as they come), neither Freud nor Jung factors into von Trier’s design — a relief for any anticipating an incestuous turn from Joe’s father figure.

It’s one thing to declare sex a fact of life and insist that audiences confront their unease at seeing it depicted (or, equally constructive, their intense excitation at its mere mention), but quite another to fashion a fictional woman’s life around nothing but sex. As courageously depicted by Gainsbourg, Joe is ultimately a tragic character. In the film’s best-written scene, she outs a pedophile in deep denial of his own impulses, inadvertently revealing the irony (and promised moral crux) of her situation: Despite all the physical contact she achieves with strangers, Joe suffers from profound loneliness. Her story is a bid for a different sort of connection, over which the ever-cynical von Trier maintains the last laugh, sure to ring louder when the uncut version is unveiled next year.