Lexofiction

Works of fiction that take as their premise an imaginary law. I.e., Asimov´s stories about the three laws of robotics.

Basically, fantasy books for lawyers.

Could this even be called a genre? Which major works would be in it if it where?

How exactly are you defining a law for this exercise? Because ‘The three laws of robotics’ are not the sort of laws that lawyers usually deal with - in fact, they did come up in a court case in a few of those stories, but always in the context of facts about the case, not of laws that it was up to the court to enforce.

They’re more ‘rigid engineering principles’ than anything else. (And ones that I suspect would be impossible to enforce perfectly without much better AI than US robotics seems to be capable of creating in any other respects for half of the stories, but that’s another discussion.)

Hmm, good point. Well, let´s stay with actual laws then. The ones a court (or the equivalent) would deal with.

The closest one that comes to mind is the short story Harrison Bergeron.

Ah, that´s a good one. Harrisson Bergeron is kind of a science fiction story, except there´s no actual science involved. Unless you consider fitting people with really thick glasses to make them see worse “science”. A schoolbook example of lexofiction.

Marvel has had a lot of lexofictional storylines, typically involving various laws against mutants.

In King David’s Spaceship the driving force behind the plot was the attempt by a world to build a spacecraft in order to legally qualify for a higher classification in the interstellar empire that was moving in on them.

Legal matters including the “talk and build a fire” law (if a species talks and build fires, it automatically qualifies as sapient and has rights) were important plot points in Little Fuzzy; the climax was a trial.

Ah! Good ones. Yes, there are a lot of SF stories where humanity has to pass some sort of galactic “you have to be this tall to ride” limit to count as civilized, huh?

Also, in the original Star Trek, the Prime Directive was sort of a big deal, and was the reason for a lot of the drama. Although the show wasn´t really about the PD as such, of course.