The important part is at the end of the article: "For those interested in building a stronger foundation in logic, the Open Logic Project provides excellent free educational resources on propositional and predicate logic, formal proof systems, and other topics such as modal logic and set theory - all targetted towards a non-mathematical audience."
I don't get it. Isn't this what compilers are for? So I don't have to rewrite my code in an equivalent but stupider way just to get a marginal performance gain.
I think what you're missing is that the premise of a hardware bug is just a frame story for a lesson in manipulating logical statements, which is the main point.
You might as well replace "hardware bug" with "a wizard put a curse on the OR operator" or "the president put a tariff on OR imports", and it would be more believable.
You are touching on an inherent truth in TFL, which is that there are nearly infinite equivalent statements for any logical sentence.
The idea for the article was to make a real example of logical equivalence, as books on the subject stay pretty abstract. - like others have mentioned, in the real world there are smarter choices to be made.
The code blocks’ font size varies line by line on mobile. Hint: set it to be smaller than the body text size because monospace fonts tend to be a bit larger than proportional ones.
https://openlogicproject.org/