Switch Statement

044: Catala: Because Legalese Wasn't Already Pedantic Enough

September 29, 2023 Matthew Keller
Switch Statement
044: Catala: Because Legalese Wasn't Already Pedantic Enough
Transcript
Matt:

Hello everyone And welcome to the switch statement podcast It's a podcast for investigations into miscellaneous tech topics

Today is show and tell, and we're talking about Katala. Will it revolutionize our legal system?

Matt-1:

Hey, John. How are you doing?

jon:

Hey, Matt, I'm doing pretty well. How are you doing?

Matt-1:

I am doing okay. I, uh, I'm at the, at the tail end of my latest incarnation of COVID. So hopefully I don't sound too terrible,

jon:

You sound great. I

Matt-1:

will just have to. You have to put up with it.

jon:

think your voice has an added complexity and gravelliness because of the COVID.

Matt-1:

All right. I'll see if I can get infected every, every episode with

jon:

Yeah, just right before, just spend the week in misery so that our podcast is good.

Matt-1:

I mean, I do feel like you need to be miserable to appreciate the good things in life.

jon:

Agree. yeah, We all need like a dopamine detox or whatever that's called because everyone just lives. Yeah, totally. Totally.

Matt-1:

um, well, that does not really relate at all to what I am bringing to this show and tell. so, have you ever broken a law?

jon:

Oh, all the time. All the time. I hate laws. I'm a spirit of the law person. I talk to my wife about this all the time.

Matt-1:

heard you say that before, but I feel like you've always, that's when you've described it in more detail, you're actually adhering to a, A greater, like a more pure, representation of the law that would even be, the law would permit you a certain class of action,

jon:

Yeah.

Matt-1:

the greater context of the law.

jon:

is the absurd claim I make in any case.

Matt-1:

Maybe with this programming language, everyone can understand the laws more precisely.

jon:

I'm gonna love this topic.

Matt-1:

So this is something, and we didn't talk about this on the podcast, but this is something that we talked about on, like just in the abstract in the past, but there's this programming language called Katala. I'm not sure if I'm pronouncing that correctly, it basically attempts to, it attempts to allow you to. Annotate legal text, so you, so like the, the idea is you would take the text of a law, a statute,

jon:

Mm hmm.

Matt-1:

you would paste it into your editor, and then you could go in and you can kind of like break out these content, these like concepts and attempt to define them precisely. In cases where there was a mathematical definition, you could say, oh, this value is defined as being equal to this other value divided by this other value times this other value. And so you can get this very precise, formal, logical rigorous definition for all of these, um, you know, all of these laws. So that's kind of the, that's the point. Um, this. I think... I believe that this will eventually, maybe not Catala itself, but some form of this will eventually become our legal system. Because to me, it just makes zero sense that we put so much in the hands of fallible humans to like calculate sentencing and to... Uh, you know, do even legal arguments feels like something that could be done with like a logical process.

jon:

Um, and obviously you'd want some human involvement. Like that's by design that, that humans are making judgment calls here and there. But there's so much of our legal system. That's just is this situation similar to this other situation? And therefore the punishment should be the exact same thing. And computers are just better at that type of thing.

Matt-1:

it's interesting because I need to spend more time understanding exactly how, like what the point of this is, because what they're very clearly not trying to do is being like, okay, we're going to try to replace this law with, um, This code, but what it seems like they are, they are trying to do is say, here's like a pseudocode representation of what this law actually says, and then a lawyer can, can read that pseudocode and, determine if it's, if it aligns with the text of the law. So this is one thing. This is if there's one criticism I have with, The initial documentation of the project, it's that they don't make it really clear how do they see this as being used in, in the real world?

jon:

Yeah, maybe I misunderstood because I would go full bore, replace our, I mean, this is obviously crazy, but like I would replace our legal system with computer programs, ASAP. But this sounds like a more incremental approach, which is probably smart.

Matt-1:

Well, so, so like, if I feel, allow me to read a snippet of their, you know, their read me. So they describe A domain specific language for deriving faithful by construction algorithms from legislative texts. And if you're not sure what faithful by construction means... I don't know what that means either.

jon:

yeah, it's, I'm trying to interpret what, what that would mean. It almost sounds like. It sounds like as long as your base principles are set up correctly, like as you're writing new code, it will, you know, sort of be adherent to those principles I feel like this is so important in the legal system where every new case aligns with all these old precedents. So it almost sounds like something like that, where you establish. These rules, and you can sort of build on top of them and create a system that's consistent.

Matt-1:

yeah, I think that's, I think that's essentially what they're, what they're getting at that, like, this is a logical chain of reasoning that is itself like faithful,

jon:

one of the things I love the most about this concept, like having laws represented as algorithms is you can change them, but still verify that like old cases would produce the same result. It's almost like unit tests. Where you can sort of, you know, because these days when the Supreme Court is arguing some big thing, one of their primary concerns is, are we going to introduce some new rule that actually has some horrible side effect that we're not realizing?

Matt-1:

hmm.

jon:

And I, I, think with a system where laws are represented as algorithms. You can verify that you're not going to do that by literally running every case that's ever happened in the history of the United States or whatever country you're dealing with and just proving that they all have the same outcome.

Matt-1:

I think that this is why this is hard because judges are basically tasked with the problem of taking this enormous space of possible, you know, it's like, oh, like, how does the fact that This woman is a single mother with three children, you know, like, how does that affect what the fair sentence should be, you know, and we basically need these people to be able to handle any possible new, like novel situation and like come out with a reasonable, outcome. And so, I think that's what would be hard about doing something with a computer. And I guess maybe that's something you would always need a human for, is like, the novel aspect of this.

jon:

Yeah. Yeah. And I, yeah, I don't want to underplay the importance of the legal profession, you know, understanding the history, understanding the context of the individuals involved. Because that would still retain its importance. What I think the programming slash, you know, programming language side of things would help with is those parts of the law that are purely algorithmic. You know, it's purely like, does it match this precedent, you know, that happened 80 years ago that normally some paralegal would have to dig up? Like, those sorts of problems that today take a lot of time and resources would just not,

Matt-1:

If I'm getting back to my original point, it sounds like this is actually the opposite of what we were. talking about. I think that the goal of this is you have a law, and you want to turn it into software. And like, can, in a line by line way, interweave the implementation of an algorithm with the text of the law in a way that a lawyer could say, This code. Correctly corresponds with the text of this law. it's the opposite thing of what we said. We said we wanted to write the law as code.

jon:

yeah,

Matt-1:

And this is like, oh, this is just making sure that the code is doing what the law said. Um,

jon:

right, right, which I had just gotten excited because this is a concept that I've thought about many, many times, but yeah, it does sound like this is for a different purpose.

Matt-1:

I was right there with you though, because It would be very cool to have a language that had these core constructs that allowed you to do terms, definitions and things like that. And then it could kind of allow you to run these simulations. but I was incorrect, I don't think I had anything, uh, anything else. I'm probably not going to spend more time looking into, uh, CataLaw because this seems more useful for someone who is building a system, uh, like a legal system that needs to, or, or a system that needs to correspond directly with a, with a law.

jon:

yeah, it's a, it's a super interesting concept because to me, having probably a naive understanding of the legal profession. People in the legal profession are basically programmers. Like, they're basically logisticians. Um, and I guess we've discussed this on the podcast before, where you're looking, you're reading, like, legal texts and stuff. And I think your background in software will help you a great deal. Because a lot of times, like, that's kind of, you're just doing a logical chain of reasoning. Um, so I, I do think it's kind of interesting for a person in the legal profession to think of laws in terms of like coding.

Matt-1:

Yeah, At its core. It is all about logic. It is all like you're doing these logical tests. Like they use the term test. and it is funny because I feel like there's so little overlap between like legal and programming. Like, this is one of the, this is why I got so

jon:

Yeah.

Matt-1:

one of the very few cases where it feels like there is some overlap. So that's why I was hoping like, Oh, we could express the laws in terms of code.

jon:

Yes. Yeah. Yeah. And I love that you mentioned that there's historically been no overlap because that's another thing that I've always thought is wrong. You know, it's like there's so many professions and this is totally a biased point of view because I'm a software engineer. But I feel like there's so many professions that could profit so much with more algorithmic thinking, more technology, more software engineering, like the medical profession, legal profession, all sorts of other ones. And so, yeah, I just like that the world seems to be awakening more and more to that idea as, you know, technology progresses.

Matt-1:

law seems like one that has been very slow to, cause I can feel like we hear about, you know, medical scanning and getting ML, like, worked in there and law still feels like it's very stuck in this, like, you know, wig wearing 1800s, like they're doing it the same way

jon:

Yeah.

Matt-1:

were

jon:

seriously. Yeah. GPT 7 is going to have like 50 million times the intelligence of a human and the legal system will still be like struggling to find legal precedence.

Matt-1:

Yeah, exactly. As we were talking, there was this interesting idea that I had. So it's like, or, or just a conception of being a lawyer where. If you're writing a law, you, kind of wanted to draw this dividing line between people who are following the rules and people who are breaking the rules. And it's like, okay, this is where it's okay. And this is where it's not. But now if you are, defending someone in a lawsuit. There's kind of this flexibility with any words that it's like, oh, okay, well, if you interpret the words in this way, then. And actually what my client did was completely reasonable, you know, so, so it's kind of like this reverse because, because the, the first problem that I described, you wanted to draw this line, like very precisely, but then the second problem is you, want a desired outcome, so you kind of need in a biased way to argue that like, oh, well, You know, there's a couple of different ways to interpret these words and, this is the right way. And you need to put the most convincing argument about like why this one particular interpretation is the right one. To make that concrete, the most recent example I was thinking about, and I'm not like, the point of this is not to get into politics, but. I was recently Listening to a podcast about whether or not, uh, you know, former president Trump should be able to run again based on the 14th amendment and the, the issue at hand was, it says that if you were an officer of the government, and you executed an insurrection against the government, you shouldn't be able to hold office anymore. Right? seems

jon:

solid rule.

Matt-1:

And then all the question at hand is, is the president an officer of the government? And so now, like, You have to, it sounds absurd on his face, but it just illustrates that. Cause the law itself doesn't define what an officer is. And so then now the problem becomes, and this is when you allow all this bias to leak in is like, well, when there is this ambiguity, depending on what your preconceived ideas about what should happen. The president will obviously be an officer or not be an officer. Like, in my case, like, it seems pretty obvious that the president would be an officer of the government.

jon:

This is something I've always found so interesting about our legal system is we like to think of it as these sort of sacrosanct modules that are impossible to violate. But in actuality, the way the, our legal system is carried out in practice, it's just people arguing and whoever builds a more convincing case that 12 other people agree with wins. And it's been demonstrated so many times that it's manipulatable.

Matt-1:

Yeah, yeah, yeah.

jon:

I don't know, I, I have a, I definitely have a naive view on this sort of stuff, but there's just been so many situations that seem really clear to me that wind up, Evidently not being clear to the legal system.

Matt-1:

right, right. Or, or like, Just taking up a preposterous amount of the legal system's time and like worry

jon:

Exactly.

Matt-1:

all right. Well, I think, I think we can leave it there. So Kata Law, if you're writing any legal legally correlated code, check it out.

jon:

Yeah, use COTS law. I like this topic. This was fun.

Matt-1:

All right. Well, I will see you next time, John.

jon:

See you next time.