POSNER, Circuit Judge.
Santiago Sandoval was convicted by a jury in an Illinois state court of criminal sexual assault and was sentenced to 15 years in prison, the maximum punishment. After exhausting his state remedies he sought habeas corpus in a federal district court, lost, and appeals.
The only direct evidence of Sandoval’s guilt was the testimony of his victim (whom we shall call “S_” to protect her privacy), which we summarize: She was a divorced woman of 20 when she first met him, he a 27-year-old man who had been born in Panama, was divorced, and was working as a power lineman for Commonwealth Edison at a salary of $600 a week. After living together for several months they broke up because he would become violent and hit her when she refused his demands for sexual intercourse. They reconciled to the extent of resuming dating and were having ,a fine time at a night spot on New Year’s Eve when Sandoval became jealous upon being told by the disc jockey that S_ had been seen with another man. Sandoval calmed down and S_agreed to accompany him to his apartment to discuss their relationship. He again became angry, accused her of having slept with the other man, and finally announced “that he was going to fuck [her] one last time.” She resisted, but he dragged her on her back to the bedroom and then ordered her to roll over. Realizing that he meant to force her to submit to anal intercourse, she begged him not to have intercourse with her that way because they had had anal sex twice before and it had hurt her very badly. After forcibly sodomizing her, he compelled her to perform fellatio on him.
She fled, partially clothed, pounded on the first apartment door that she came to, and told the occupant in a manner that he described as “between anxious and hysterical” that she had been raped. He let her in, and she then called the police. This part of her testimony was corroborated by the occupant, and by the police officers who responded to her call and arrested Sandoval. The police also testified that she had bruises on her face.
Sandoval testified that while they were living together he and S_had had anal intercourse frequently, that she had enjoyed it and even on occasion had initiated it. When, at the nightclub on New Year’s Eve, he accused her of having been with another man, she tearfully confessed, and at his apartment afterward had initiated anal and oral sex with him. But he could not get over her betrayal of him with the other man and eventually ordered her to leave the apartment. She got upset, announced that “I’m going to screw you,” and stormed out of the apartment.
On direct examination of S_the prosecutor had asked her whether she had ever had anal sex with anyone besides Sandoval, and she had answered “No.” She had also testified that she had not dated since the rape. On cross-examination, defense counsel, after reminding S_of her denial that she had ever had anal sex with anyone besides Sandoval, said, “Now, you know a fellow named ...” — at which point the prosecutor interrupted with an objection. Out of the hearing of the jury, the defendant’s lawyer explained that he had a witness sitting in the hallway who would impeach S_’s testimony by testifying that he had had anal sex with her, that she had enjoyed it, and that he had seen her shortly before the trial “hanging all over a gentleman friend of hers” at a bar. The judge refused to allow the witness to testify but did instruct the jury, just before the closing arguments, that it was to disregard the testimony that S_had not had anal intercourse with anyone besides Sandoval.
The evidence was excluded on the authority of Illinois’ rape shield law, on which see the useful discussion in Comment, “Toward a Consistent Recognition of the Forbidden Inference: The Illinois Rape Shield Statute,” 83 J.Crim.L. & Criminology 395 (1992). The law is understood to forbid the introduction in a rape case of evidence concerning the victim’s sexual activities with persons other than the defendant. True, this is not quite what the law says. It says that in prosecutions for rape (called “criminal sexual assault” in Illinois) and related offenses, “the prior sexual activity or the reputation of the alleged victim is inadmissible except as evidence concerning the past sexual conduct of the alleged victim with the accused.” Ill.Rev. Stat. ch. 38 ¶ 115-7(a). Evidence of sexual activity with other people besides the accused could often be described as evidence concerning — bearing on, related to — the past sexual conduct of the alleged victim with the accused. But that is not how the statute is interpreted. As explained in the decision of the Supreme Court of Illinois affirming Sandoval’s conviction, the statute limits evidence of the victim’s sexual activity to her activity with the defendant, period. People v. Sandoval, 135 Ill.2d 159, 176, 142 Ill.Dec. 135, 143, 552 N.E.2d 726, 734 (1990) (reversing the decision of the Illinois Appellate Court, which had reversed Sandoval’s conviction). The interpretation of the statute by Illinois’ highest court binds us, and establishes that the prosecutor violated state law when he asked S_about her history of anal intercourse with persons other than the defendant and that the defense lawyer violated state law when he tried to cross-examine her about it. The prosecutor is not authorized to waive the protections of the rape shield law — for they are protections as much for the rape victim as for the prosecution of rape cases — and if he does so this does not open the door to defense counsel to disregard the rape shield law in his cross-examination of the victim. Id. at 180, 142 Ill.Dec. at 140, 552 N.E.2d at 731.
But Illinois cannot, through a rape shield law or anything else, deprive a criminal defendant of his federal constitutional right to confront the witnesses against him, a right that has been held to imply the further right, though not one of unlimited extent, to cross-examine the prosecutor’s witnesses. Davis v. Alaska, 415 U.S. 308, 315-18, 94 S.Ct. 1105, 1109-11, 39 L.Ed.2d 347 (1974); Stephens v. Miller, 989 F.2d 264, 267 (7th Cir.1993). In this as in most rape cases, the key witness, and only eyewitness (apart from the alleged rapist), was the victim of the alleged rape; and the essential part of her testimony — that she was forced against her will to submit to sexual intercourse with the defendant — was not directly corroborated, although there was some corroboration, as we shall see. The principle of the rape shield law, designed as it is to exclude evidence that even if relevant has little probative value but great capacity to embarrass and distract, evidence that is considered to shift the balance of proof too far in favor of the rape defendant, has been held to be constitutional. Michigan v. Lucas, — U.S.-, 111 S.Ct. 1743, 114 L.Ed.2d 205 (1991). But the constitutionality of such a law as applied to preclude particular excidpatory evidence remains subject to examination on a case by case basis. Stephens v. Miller, supra, 989 F.2d at 267-268; Moore v. Duckworth, 687 F.2d 1063, 1065 (7th Cir.1982); United States v. Begay, 937 F.2d 515, 524 (10th Cir.1991).
Sandoval argues that once S_testified that she had never had anal intercourse with anyone besides Sandoval, and by so testifying buttressed her testimony that she had not consented to have anal intercourse with him on the night in question, defense counsel was entitled to impeach her testimony by asking her whether she had had consensual anal intercourse with X_, and if she denied that she had, to call X_to the stand and elicit testimony to the contrary from him. This line of inquiry would clearly have been precluded by the rape-shield statute, constitutionally applied, had she not testified about her history of anal intercourse. The essential insight behind the rape shield statute is that in an age of post-Victorian sexual practice, in which most unmarried young women are sexually active, the fact that a woman has voluntarily engaged in a particular sexual activity on previous occasions does not provide appreciable support for an inference that she consented to engage in this activity with the defendant on the occasion on which she claims that she was raped. And allowing defense counsel to spread the details of a woman’s sex life on the public record not only causes embarrassment to the woman but by doing so makes it less likely that victims of rape will press charges.
We must consider what difference it made that S_testified about her other sexual activities (or abstentions). If that testimony was irrelevant, the defense would not, under standard principles of evidence, have been permitted — and certainly would not have had a constitutional right — -to impeach the testimony with extrinsic evidence (that is, testimony by X_). Taylor v. National Railroad Passenger Corp., 920 F.2d 1372, 1375 (7th Cir.1990). But her testimony might have been thought relevant on the theory that it was calculated or at least likely to strengthen the prosecution’s ease by reducing the likelihood that she had consented to anal intercourse with Sandoval on the occasion in question. If so, the defense would have a stronger case for being permitted to rebut the testimony, if necessary by extrinsic evidence, lest the jury be left with a misleading impression. As we have emphasized, a rape shield statute cannot constitutionally be employed to deny the defendant an opportunity to introduce vital evidence, and impeaching evidence can be vital, J. Alexander Tan-ford & Anthony J. Bocchino, “Rape Victim Shield Laws and the Sixth Amendment,” 128 U.Pa.L.Rev. 544, 581-83 (1980), though whether or when impeachment by extrinsic evidence is constitutionally guaranteed is fortunately an issue we need not resolve. Compare Johnson v. Brewer, 521 F.2d 556, 562 (8th Cir.1975), with id. at 564 (dissenting opinion).
For if there was error of constitutional magnitude in excluding the particular evidence (which we do not decide), it was cured, or more precisely rendered harmless beyond reasonable doubt, by the judge’s instruction. Cf. Delaware v. Van Arsdall, 475 U.S. 673, 684, 106 S.Ct. 1431, 1438, 89 L.Ed.2d 674 (1986). We are well aware of the limited efficacy of most curative instructions — but not this one. When the judge instructed the jury to disregard S_’s denial of having engaged in anal intercourse with other men besides the defendant, the natural inference for the jury to draw — which is just the inference that the defendant would have wanted it to draw — was that she had had anal intercourse with other men. So the exclusion of the evidence that the defense wanted to offer did not harm the defense and therefore cannot be a ground for invalidating Sandoval’s conviction. In this respect the ease is like Moore v. Duckworth, supra. The victim of the alleged rape in that case was pregnant at the time she testified at trial. The defendant wanted to present evidence that she was pregnant by her boyfriend, not by him. The judge held that the evidence was inadmissible under the rape shield statute. We thought this an absurd interpretation of Indiana’s rape shield law, but bowed to it because it was the interpretation of the state’s highest court. But we added that “the absurdity of the Rape Shield Law cannot be overlooked if it denied [the defendant] a fair trial.” 687 F.2d at 1065. However, as the trial judge had employed strenuous and apparently successful efforts to prevent the jury from discovering that the rape victim was pregnant, we concluded that the defendant had not been unfairly harmed by the application of the rape shield law, and therefore could not obtain relief under the Constitution.
The next issue concerns the judge’s refusal to permit testimony about S_’s “hanging all over a gentleman friend.” The testimony was not excluded on the authority of the rape shield statute, presumably because it was not testimony about sexual activity — though that depends on how the term, which the Illinois rape shield law uses without defining, is interpreted. Comment, “Rape Shield Statutes: Constitutional Despite Unconstitutional Exclusions of Evidence,” 1985 Wis.L.Rev. 1219, 1227-28 and n. 35. Also, the alleged incident of S_’s “hanging all over a gentlemen friend” did not occur prior to the alleged rape, but “prior” or “past” in rape shield laws is usually interpreted as prior to trial, rather than prior to the alleged rape. See United States v. Torres, 937 F.2d 1469, 1472 (9th Cir.1991), construing the federal rape shield provision, Fed.R.Evid. 412.
The evidence was not, however, such vital impeachment that its exclusion can be said to have deprived Sandoval of his constitutional rights. For the evidence of his guilt was very powerful despite the lack of direct corroboration for S_’s central testimony. Realistically, a jury called upon to decide guilt must compare the prosecution’s version of the incident giving rise to the case with the defense version. Spitz v. Commissioner, 954 F.2d 1382, 1384-85 (7th Cir.1992). The defense version asked the jury to believe that S_, after an extensive bout of sexual intercourse initiated by her and only reluctantly consented to by the pacific defendant, flew into a rage, bruised herself, ran half-naked into the hallway, and successfully impersonated a rape victim to a neighbor and two policemen. Anything is possible, but this is distinctly unlikely and its plausibility would not have been decisively enhanced had it been established that S_had exaggerated the effect of the rape when she testified that she hadn’t dated since the rape.
The last issue concerning the rape shield law brings us back to the mysterious Mr. X_An important part of S_’s testimony, it will be recalled, was that she disliked anal intercourse, found it painful, and begged Sandoval not to force her to have intercourse that way, implying that she might have consented, however reluctantly, to vaginal intercourse. He on the other hand, as we have noted, testified that she liked anal intercourse and initiated it on this and other occasions. If it could be proved that she had had and enjoyed anal intercourse with another man, never complaining about any pain, this could be thought not merely to contradict her testimony on an arguably collateral point (having to do with her sexual relations with other men) with a view to persuading the jury to disbelieve her testimony on the vital points, but to undermine her testimony that she did not consent to have anal intercourse with Sandoval on the night of the alleged rape, because pain was one of the reasons that she had offered for why she hadn’t consented. The Supreme Court of Illinois in Sandoval’s appeal held that the admission of X_’s evidence was barred by the rape shield law, 135 Ill.2d at 183, 142 Ill.Dec. at 145-46, 552 N.E.2d at 736-37, but that law, as we have said, cannot be allowed to prevent a defendant from putting on a defense to what is after all a very serious charge. And consent is, of course, a defense to rape.
But we do not understand defense counsel to have wanted to put on his witness waiting in the hallway for the purpose of impeaching S_’s testimony that she did not consent to have anal intercourse with Sandoval. So far as appears, Sandoval’s counsel would not have procured the witness had it not been for S_’s testimony about never having had anal intercourse with anyone else. He wanted the witness solely in order to contradict a body of testimony that the judge erased by his curative instruction. But if this is wrong and Sandoval wanted the witness also or instead in order to contradict S_’s testimony about consent, still we do not think its exclusion violated Sandoval’s constitutional rights. Sexual intercourse, whether vaginal or otherwise, is not uniformly pleasurable or painful. The fact that S_had had pleasurable anal intercourse with another man on another occasion would not show that she would have enjoyed having it with Sandoval on an occasion when he was enraged with her and wanted by penetrating her anally to humiliate and, quite possibly, physically hurt her. Indeed, by that logic rape shield laws would be unconstitutional to the core because their central aim is to prevent the drawing of an inference of consent from previous consensual intercourse with other men. This case is a little more difficult because the victim’s testimony was that she had found anal intercourse unpleasant with Sandoval when they were living together. This implies that she disliked the practice, an implication in tension with her having voluntarily engaged in it with another man — though of course we often consent to do things we don’t much like or even actively dislike.
But this just brings us back to the impeachment of her testimony that she had never had anal intercourse with anyone but Sandoval. The judge told the jury to disregard that testimony. The jury was left to ponder the implication that she had had anal intercourse with someone else. The jury surely realized that it undermined her contention that she found anal intercourse painful, and that by doing so it also undermined her testimony that she had not consented. Weighing all the facts and their implications, the jury convicted Sandoval. The thumb of the rape shield law was not on the balance; in effect, the judge’s instruction took that law out of the case. We can see this by supposing that S_had never testified about anal intercourse with other men. Then even without a rape shield law it is doubtful that testimony that she had enjoyed it with another man would be admissible, for it doesn’t, or at least shouldn’t, require a rape shield law to show that consent to sex with X on one occasion is not good evidence of consent to sex with Y on another.
Finally and unrelatedly, Sandoval challenges his sentence as excessive. The challenge can get nowhere. It was not raised in the Illinois supreme court, 16 Charles Alan Wright et al., Federal Practice and Procedure § 4007 at p. 554 (1977); and in any event a 15-year sentence for rape not involving serious physical injury, while severe, can hardly be thought so savage as to violate the limits, if any, which the Constitution places on the severity of prison sentences. Harmelin v. Michigan, — U.S. -, 111 S.Ct. 2680, 115 L.Ed.2d 886 (1991). Sandoval challenges the following remarks by the sentencing judge: “I find it absolutely astounding that any human being would participate in this type of activity. Animals do not engage in this type of logic [?]. But animals react from instinct, and logically we are told that human beings are smarter than animals, because we have two matters that make us more superior. We can talk and we can reason and we are superior to animals. Sometimes I wonder.” And Sandoval points out that in another case this judge was rebuked by his judicial superiors for remarking, in sentencing a defendant for homosexual child abuse, “I cannot think of a worse crime than an aggravated sexual abuse crime. I can tolerate a murderer. I can tolerate a robber. I can tolerate a burglar. But when it comes to sex, you know, even an animal avoids fornication with an offspring from the same birth. You know, your act is very, very heinous. Your act is worse than that animal, at least the animal, by instinct, does different things, and a human being differs from an animal because we are supposed to know how to reason, how to think.” Quoted in People v. Zemke, 159 Ill.App.3d 624, 628, 111 Ill.Dec. 258, 260, 512 N.E.2d 374, 376 (1987). Although the accuracy, relevance, and tone of the judge’s remarks in sentencing Sandoval can be questioned, Sandoval points to no principle of constitutional law that would authorize a federal court to invalidate an otherwise lawful and constitutionally proper sentence because it did not appear to be the product of informed, measured consideration. It is not suggested that the judge took the defendant’s race, religion, or political opinions, or any other forbidden ground for punishment into account in determining the sentence. Cf. Zant v. Stephens, 462 U.S. 862, 885, 103 S.Ct. 2733, 2747, 77 L.Ed.2d 235 (1983); United States v. Neyens, 831 F.2d 156, 159 (7th Cir.1987).
The denial of habeas corpus is
AFFIRMED.