Google and Uber are set to duke it out in court, and the fight is far from simple. The good news is, though, that as art imitates life which then often imitates art, HBO's Silicon Valley can help you understand this quarrel.

On Thursday, Alphabet (Google's parent company) announced that it's taking Uber to court over self-driving car technology that it claims a former employee stole to start another company, which Uber then bought because of the technology that person allegedly stole.

Cases like this are confusing from the get-go, but all the moving parts make this one particularly hard to follow. Silicon Valley isn't a perfect apples-to-apples comparison, but the major issues at hand are similar enough to provide some idea of what's actually going on here. At stake is technology that is key to self-driving cars, which Google, Uber and many other companies are betting on.

Just remember that, in the end, this all comes down to money.

The setup

In this case, Google is Hooli, which is basically how the show portrays Hooli anyways.

Inside of Google, there is Waymo, its self-driving car operation. Inside Hooli, there is nucleus, its attempt at developing advanced compression software.

At Waymo, there was an engineer named Anthony Levandowski, who helped develop important technology for Waymo. He was kind of a big deal there.

Levandowski then left to start Otto, a company that specialized in autonomous trucks. Uber acquired Otto for a price tag reported to be around $680 million. Google claims in the lawsuit that Uber bought Otto "after only six months of official existence."

In Silicon Valley, this situation roughly equates to the show's main character: Richard Hendricks. Refresher/spoiler: Hendricks leaves Hooli after having developed a compression algorithm that could change the game for the internet.

Hendricks then starts Pied Piper, which doesn't exactly have Otto-level success just yet, but is good enough to end up on the wrong end of a Hooli lawsuit.

How're we doing, Big Head?

The lawsuit

Yes, it's not a perfect comparison, but what Pied Piper goes through with Hooli is similar to what's going on between Google and Uber.

The basic accusation is the same — that technology was taken by a person who then started a new company

In Silicon Valley, Hooli accuses Hendricks of taking the algorithm that he had developed while working at Hooli to start Pied Piper. Because he sometimes used Hooli resources (he used his work laptop to test one tiny portion of his algorithm), he nearly loses the lawsuit. (He ends up winning on a technicality concerning his employment contract.)

That's essentially the same thing Google is saying Levandowski did, but on a much, much bigger scale, in starting Otto. In particular, Google is saying that Levandowski took Google resources, including more than 14,000 files, some of which contained "highly confidential" information.

There are differences, for sure. In Silicon Valley, Hendricks is the sole, brilliant mind behind the algorithm that much of the show's run has centered on — forcing Hooli to try to develop the same technology on its own. In the real world, Levandowski was just one of a team of engineers working on Waymo.

Check out the arbitration scene below. If the lawsuit goes to court, there's a good chance Levandowski will be forced to answer questions in the same way.

Back to reality

As much fun as it is to find GIFs and clips of Silicon Valley all day, there is also a recent real-life case that mirrors Google vs. Uber.

In February, a jury ordered Facebook to pay $500 million in a case that included accusations that the founders of Oculus Rift stole trade secrets. Facebook and Oculus ended up avoiding the worst of the allegations, which sounds a lot like what Google is saying Levandowski did.

In the Oculus case, a company called Zenimax claimed that former employees of Id Software had taken code from Id that would later be used in the development of the software portion of the Oculus Rift virtual reality system. Zenmiax acquired Id Software, leading the company to pursue charges against Oculus and its owner, Facebook.

There are key differences, but the takeaway is the same. Patents and trade secrets are closely guarded in the tech world. And with companies constantly buying other companies — in many cases for that particular technology — these kinds of cases are actually relatively common, which is probably why Silicon Valley chose to tackle the subject.

Such is the competition to make the world a better place.