Enough LaTeX for basic logic typesetting

I’m currently taking a (meta)logic class. There are assigned problem sets. A lot of people either don’t know how to type logical symbols or else cannot be bothered to fight with Word. I’m a fan of LaTeX. I like it for several reasons, one of them being easy use of logical symbols.

There are a lot of guides to using LaTeX. To my knowledge, none start from nothing and end with just what’s needed for a logic class. So here I fill in that void. My goal is to be comprehensive enough to cover what’s needed to type up assignments for a logic class while not including anything else so someone can be up and running with just this guide in a few minutes.

Setting Up

First, you need something to edit your text and something to compile it to a PDF or whatever other format you like. I personally use Overleaf. It’s a free, online application that lets you type in one column with live updates to what it looks like on the page in the other column. It also has templates, allows collaboration, and has some other nice features that are not important to our purposes here. (Full disclosure: The link is a referral link. If you refer people, you get extra storage space and pro features for free. The default free features and space are fine, though.)

There are other popular options. If you need to compile offline, I suggest TeXmaker. If you go this route, you need to download MiKTeX. If you want to write something very long, you may want to type into a text editor and then copy and paste into Overleaf or TeXmaker. (By “long” I mean over fifty pages, give or take based on things like included pictures.)

Onto the actual typing process. If you’re using Overleaf, go to the “My Projects” page and then create a new project. Choose “blank paper”. Then you’ll have this code:

\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
(Type your content here.)
\end{document}

If you’re not using Overleaf, go ahead and put that code into your document.

There is a bit of tweaking to the basic template to make this better. Before the \begin{document} line, add a line containing just \usepackage{amsmath}. Then add lines with add \title{TITLE} and \author{NAME}. Then after the \begin{document} line, add a line saying \maketitle. If you want it to not be huge, type \small\maketitle\normalsize. (The \small makes it small. The \normalsize makes the stuff after it normal size.) At this point my document looks like this.

\documentclass{article}
\usepackage[utf8]{inputenc}
\title{Phil 125 Homework Set 2}
\author{Nichole Smith}
\begin{document}
\small\maketitle\normalsize
(Type your content here.)
\end{document}

Typing the Document

Everything after this replaces “(Type your content here.)”.

  • Typing letters and numbers works as you would expect. Certain symbols are used by the code so typing them is not straightforward. (The & and squiggle brackets are the most notable here.)
  • Single line breaks are ignored. So if you type some stuff, hit return/enter, and then type some more, it will show up as one paragraph. (This can be useful. I like to type every step of a proof in a new line. Then it compiles into a paragraph.)
  • Double line breaks give you a new paragraph.
  • If you want extra space, use \vspace{1cm} as its own paragraph. You can choose lengths other than 1cm if you want.

Onto the logic specific stuff. Of critical importance is math mode. Whenever you surround text with dollar signs ($) LaTeX treats it as mathematical symbols. So, if you type $x$ it will be italicized like a variable should be. Math mode does not have spaces. So $two words$ will not have a space between them. (If you need a space while in math mode for some reason, “\ ” gives you a space. That is a backslash with a space after it.)

Note all logical symbols have to be typed in math mode. The logical symbols:

  • \land gives you the and symbol
  • \lor gives you the or symbol
  • \lnot gives you the not symbol
  • \rightarrow gives you the material conditional arrow
  • \Rightarrow gives you the logical implication arrow
  • \leftrightarrow gives you the biconditional arrow
  • \Leftrightarrow gives you the logical equivalence arrow (So, capitalizing the arrow tags makes them the bigger arrows)
  • = is the equal sign
  • Parentheses are parentheses
  • \subset gives you the strict subset symbol
  • \subseteq gives you the subset symbol
  • In general, typing \not immediately before another symbol puts a slash through it. E.g. \not\subseteq gives you the not a subset symbol
  • \in gives you the element symbol
  • \times gives you the times sign
  • \neq gives you the not equal sign
  • > and < can be typed directly. To get the or equal to versions, type \geq or \leq
  • \emptyset gives you the empty set symbol
  • \{ and \} give you squiggle brackets
  • \& gives you the & symbol
  • \top and \bot give you the tautology and contradiction symbols.
  • \Alpha and \alpha give you upper and lower case alpha. The other Greek letters are similar.
  • | gives you the Sheffer stroke and \downarrow gives you the Peirce dagger.
  • An underscore gives you subscript. A caret gives you superscript. E.g. p sub 1 is typed $p_1$.
  • \hdots gives you a nice ellipsis. Use \cdots if you want them elevated to the middle of the line.
  • Anything on a line after % will not be compiled. So if you want to make a note to self, you can.

I think this covers it. Most of them are pretty straightforward. If you do need more, this webpage has a nifty list. Or, detexify lets you just draw what you want, and it gives you the code. At this point you’re ready to type stuff.

I will provide an example now. Say problem 2 asks you to symbolize “neither both p and q, nor q only if p” with the and, material conditional, and nor operators. Then you type:

2. The sentence “neither both $p$ and $q$, nor $q$ only if $p$” symbolized with the and, material conditional, and nor operators is $(p\land q)\downarrow(q\rightarrow p)$.

Truth Tables

LaTeX can also handle tables very nicely. If you’re lazy, there are online tools to make tables. They have quite a few options. You’re probably fine using that.

I prefer more control for my truth tables. Again, you’re fine without. But in case anyone is interested, I’ll explain. Maybe you’ll want to be able to edit the code the generator spits out. (I often use a generator to start and then tweak as needed.) First, here’s the code for the truth table for p_1 or not p_1:

\begin{tabular}{c|cccc}
$p_1$ & $p_1$ & $\lor$ & $\lnot$ & $p_1$ \\
\hline
T & & \textcolor{red}{T} & F & \\
F & & \textcolor{red}{T} & T & \\
\end{tabular}

How do you construct this thing? First set up the tabular environment:

\begin{tabular}{}
\end{tabular}

The second set of squiggle brackets after \begin let you set up the columns. Each c gives a center aligned column. If you want left or right aligned columned, use l or r instead of c. Yes, you can mix the three. The | gives a vertical line going down the entire table. Note for truth tables you want a column for every single symbol. That way nothing is under the variables and you can have a straight line of Ts and Fs under the connectives. So, for p_1 or not p_1 we want a column for p_1, a bar, then columns for each of p_1, or, not, and p_1. That’s four more. So, we have:

\begin{tabular}{c|cccc}
\end{tabular}

We have the table set up. Now to fill it in. The first line of the table has the atomic sentences on the left and then the sentence in question on the right. Type the content of each column, separated by &. Then end the line with \\. So, to have the first line of the truth table:

\begin{tabular}{c|cccc}
$p_1$ & $p_1$ & $\lor$ & $\lnot$ & $p_1$ \\
\end{tabular}

To have the horizontal line, type \hline on its own line. Then more on to the next row, doing the same thing you did for the first row. Note that if you want nothing in a certain spot, just leave the space between the two &s empty. So, for the second row, you want a T under the first p_1 (The one on the left side of the table), then nothing under the first one on the right, then a T under the and sign, an F under the not sign, and then nothing under the last p_1. The third line is similar.  Now we have:

\begin{tabular}{c|cccc}
$p_1$ & $p_1$ & $\lor$ & $\lnot$ & $p_1$ \\
\hline
T & & T & F & \\
F & & T & T & \\
\end{tabular}

This is a fine truth table. But, maybe you want to bold the truth values for the main connective. To make T bold, type \textbf{T}. You can replace “T” with other text, of course. If you’re using Overleaf, highlighting the text and pressing Ctrl+B will put the tag in automatically.

This brings us to the complete table as quoted in the beginning of this section.

The comment section is open. Questions and suggestions are welcome.

(Edit notes: As Soren pointed out, I originally put the wrong symbol for commenting. I also realized the amsmath package is not needed, so I removed that. Since these are usually printed in black and white anyway, I got rid of color in favor of boldface type. This has the added benefit of avoiding the need for packages entirely. In the third edit I added the \leq and \geq tags as well as \hdots because I realized they’re needed for indexing variables. \hdots requires the amsmath package, so I added that line back in. Using bold instead of color still seems to be better.)

Advertisements

More reason to decimate nonprivate evaluation

Olúfẹ́mi Táíwò wrote a great piece on how he’s a teacher, not a job trainer. I commonly complain about liberal arts institutions being co-opted as job training centers. Táíwò’s article takes the individual perspective, and gets a better personal angle on why this is bad. My usual argument is primarily that life has a lot of awesome stuff to it, and making money really isn’t that much of it. That “When will I use this?” is a common question asked about ethics classes shows how deep the problem is. We have more resources than ever being poured into higher education, but we’re getting rid of most of higher education.

Conveniently, Ben Orlin wrote about math’s role as a gatekeeper around the same time. Mathematics, an allegedly more practical field of study than any humanity, is abused as a gatekeeper. Mathematicians see beauty in math. I know many who would love to instill some enjoyment for mathematics into their students. Instead they have to teach requirements to a room full of people looking to take the test. Mathematicians by and large don’t seem fond of their role as gatekeepers. I’m not sure who does. At best playing gatekeeper is a means to dragging students into classes so administrators will agree to let the department have money.

One step out of the muck would be increased, mandatory privacy on grades, and perhaps courses taken. The gatekeeper function is much harder to fill when there’s no record to look at. Employers can’t bog down the education process with their exploitation of it as a filtering mechanism. (If they have too many applications to look at applicants as individuals, perhaps they’ll see some incentive to fix the broken job market.)

I’m not denying the importance of evaluation. Feedback is a critical part of the learning process. You have to know where you’re going wrong to fix it. Sometimes you need pointing in the right direction to improve. But these can be had without letting anyone outside the educational process aware of the feedback.

Unfortunately this idea falls among those that would require universal adoption all at once. If any small group of institutions did this at once, they would likely just be shunned. If they won’t play into the wishes of HR departments, then HR departments will shun their graduates. Then they’ll struggle to find any students. But, I retain three thoughts: One, there may still be something of use in this partial idea. Two, if UBI gets rolling, universities can exist without depending on high enrollment. Three, grade inflation is leading us down this road anyway. If everyone gets an A, nobody gets an A. If anyone can get a degree, the degree doesn’t signify much. At that point, all the degree says is one came up with tuition money one way or another. At that point, one should hope at least students get an education out of the deal.

The poetry aisle at Wal-Mart is awful

I read this article to make sure I wasn’t missing something. But, no, it’s indeed the case that finding anyone who seriously cares about poetry or creative writing generally has anything good to say about Kaur’s work. It’s pretty transparently vapid.

What’s left me at a loss is why I actively dislike it. Sure, it’s a bunch of platitudes published by a major publisher and getting a lot of attention. But most popular films are the same. Most popular music is, too. Which is fine. I’ll gladly say I enjoy stupid stuff sometimes. Not everything needs to be Infinite Jest or Three Dialogues Between Hylas and Philonous. I liked the new Spiderman movie.

My best guess is that it’s actively interfering with the activities of people who might read or write better, worthwhile things. Someone picking up poetry or postmodern poetry picks this up and thinks it’s the deep stuff. Nobody watches Transformers and thinks it’s thoughtful cinema. It’s one-liners and explosions. Milk and Honey is one-liners (with a bunch of pointless line breaks) mixed in with stories with hard-hitting subject matters.

I’m not just assuming this is what happens, either. Look at people defending it and you’ll quickly find people saying things similar to “Look, if you don’t like the style [of having no regard for form or the use of language] then you just don’t like [post-]modern poetry.” Because they think that’s the extent of it. And then the door is open to anyone to criticize the good stuff on the basis of the bad stuff.

It hardly is limited to poetry, but this particular work got put it in my mind. You definitely see it elsewhere. “It’s just my style” is not an excuse for terrible artwork, either. Style is not a replacement for skill. Hitting random notes on a guitar or piano doesn’t constitute avant-garde; it constitutes being too lazy or disinterested in the actual skill or art to bother learning. Saying bogus unsupported nonsense with some idiosyncratic word usage doesn’t constitute philosophy. There’s a reason people who innovate in the newer, less (apparently) structured styles of anything first go through the process of how to do things the old way.

My hands are hardly clean, either. I’ve written tons of awful stuff that had no chance of ever being worthwhile. I thought “Oh, if I write free verse, I can disregard rhythm, rhyme, and word choice! Great!” (Yes, back to poetry.) Which was stupid. I still can’t write free verse (that isn’t complete trash). The rest of my work isn’t great by any means (at least I don’t think so), but maybe some of it has hope. And if I get the hang of playing in traditional forms to get them to do what I want, and then breaking the rules in small ways to get them to do neat things, then I’d love to move on to breaking all of the rules purposefully. But I’m not about to skip the parts where I bother learning the craft.

Now, one might make the case that, sure, people browse the poetry (or fiction, or philosophy, or religion, or art, or whatever) section, find this sort of thing, and then move on to better things. But, I turn to Harold Bloom:

“What’s happening is part of a phenomenon I wrote about a couple of years ago when I was asked to comment on Rowling. I went to the Yale University bookstore and bought and read a copy of “Harry Potter and the Sorcerer’s Stone.” I suffered a great deal in the process. The writing was dreadful; the book was terrible. As I read, I noticed that every time a character went for a walk, the author wrote instead that the character “stretched his legs.” I began marking on the back of an envelope every time that phrase was repeated. I stopped only after I had marked the envelope several dozen times. I was incredulous. Rowling’s mind is so governed by cliches and dead metaphors that she has no other style of writing.
But when I wrote that in a newspaper, I was denounced. I was told that children would now read only J.K. Rowling, and I was asked whether that wasn’t, after all, better than reading nothing at all? If Rowling was what it took to make them pick up a book, wasn’t that a good thing?
It is not. “Harry Potter” will not lead our children on to Kipling’s “Just So Stories” or his “Jungle Book.” It will not lead them to Thurber’s “Thirteen Clocks” or Kenneth Grahame’s “Wind in the Willows” or Lewis Carroll’s “Alice.”
Later I read a lavish, loving review of Harry Potter by the same Stephen King. He wrote something to the effect of, “If these kids are reading Harry Potter at 11 or 12, then when they get older they will go on to read Stephen King.” And he was quite right. He was not being ironic. When you read “Harry Potter” you are, in fact, trained to read Stephen King.
Our society and our literature and our culture are being dumbed down, and the causes are very complex. I’m 73 years old. In a lifetime of teaching English, I’ve seen the study of literature debased. There’s very little authentic study of the humanities remaining. My research assistant came to me two years ago saying she’d been in a seminar in which the teacher spent two hours saying that Walt Whitman was a racist. This isn’t even good nonsense. It’s insufferable.”

Should you start somewhere? Sure. Maybe don’t open with really complex stuff. Starting with Kant’s Critique of Pure Reason is probably silly. There’s easier or simpler, but still good works. But also, starting with Dawkins’s The God Delusion is probably even worse. It doesn’t tend to lead anywhere worthwhile, but it makes you think you ended up somewhere worthwhile. (Of course, reading something and acknowledging it’s silly fun when it’s silly fun is harmless, but that’s rarely the case in these examples. I’ve noticed a few movies and TV shows get a bit of a sub-audience who thinks there’s something deeply intellectual about them when, in fact, and most people recognize the fact, it’s almost entirely silly fun.)

Fuck credit scores

The Equifax leak (which still happened and is still a problem for, well, an absurd amount of people, though it’s fallen off the news radar) should really have us question why this sort of thing is allowed to even be.

If credit scores/reports were just for credit cards, I could see a case for their existence, maybe. But that’s not what they’re just for. Rather, they’re used for credit cards, loans, bank accounts, renting, and hiring. Basically, your options are just be incredibly wealthy or have three private companies with almost zero oversight have an absurd amount of power in your life. Given the former isn’t an option for almost anyone, three companies are essentially acting as a pseudo-government. Except instead of at having to pretend to care about people, they can be as misanthropic as they want.

There’s already plenty of used reason to break them up. Monopolies, especially unregulated private monopolies, cause problems. That’s why there’s laws in place to break them up. Sometimes those laws are even enforced. There’s also laws about price fixing that are occasionally enforced. Now, whether those by the letter include non-monetary prices is not something I know, but if they don’t, there’s no good reason not to expand them to do so. Because selling your personal information to these companies is absolutely a price. It’s just also a price charged by nearly every bank, landlord, etc.

(Now, whether these reports could even function if people had options that enabled them to avoid them entirely is another question. Seeing them fail entirely seems quite alright.)

Going perhaps a bit further, though, why do a few numbers enable someone to create so many problems for someone else? Like, I understand which existing mechanisms are the source of the problem. Why not fix them? As the video below points out, the problem is you cannot change your SSN or date of birth. I really can’t see any reason why not to take the obvious solution: Allow people to change their SSN and date of birth.

(SSNs also were not originally intended for identification. Really the idea of any sort of permanent identification rubs me the wrong way. Especially the kind anyone can look up. (Or demand your consent to look up. I could see perhaps having a permanent medical record. I can’t justify, say, potential employers having any sort of (de facto) right to access your history.)

 

Even if we hold that we will have some ID, SSN is a terrible authentication method. Given how many forms and databases they’re in, in an unencrypted format at that, they are incredibly insecure. If we are going to have fixed identifiers, SSN seems like a good enough ID inasmuch as it’s non-ambiguous. Indeed, terrible for authentication for the reasons you listed. If someone really wanted to create havoc (and possibly make out with a ton of money in the end) they could rob a bank of all of the papers with people’s SSNs, DOBs, names, etc. and abuse those. (Or go to a rental leasing office. Or, hell, put up a Craigslist ad for a job that doesn’t really exist and have that information on the bogus application. Sure, phishing scams are bound to happen with any system (Well, TFA could be tricky to phish.) but also given people fall for them so frequently, a system wherein people’s most sensitive data can be easily and permanently stolen is ridiculous.

According to the video (I haven’t dug deeper) you can freeze your credit and then unfreeze it with a PIN you set. Of course, that also costs a bit every time because of course it does.

My favorite form (or factor) of authentication is still social, though how to make it work online or in very highly populated areas can be tricky. It’s nearly impossible to fake, though, and is more directly what we’re really doing when we identify people. We (people) are generally pretty good at identifying others. If I see someone I know I don’t need to see an ID card to figure out who they are. If someone else tries to claim to be someone I know, I can tell they’re lying regardless of any ID cards. Identifying people as themselves seems thus ideal. (The two biggest problems I’d foresee in expanding it to the current age and urban areas are the obvious just not knowing millions of people to just get a credit card or buy something online or whatever, and also presumably it’d worsen economic stratification as knowing the right people could become even more important if not handled with proper care.))

The entire problem of credit scores seems to be relatively simple: having an informational advantage over someone gives you an advantage. Of course anyone doing business with you would prefer to know everything about you. And of course you’re better off if you can keep your hand hidden. The people on the employer/loaner/insurer/banker side of the table will collude if they’re allowed. Anything done from the other side presumably has to be done via the legal system since those are very hard things to avoid.

(I suppose filling the information with noise would also do the trick. Either by plenty of omissions via options to do things while avoiding the credit reporting agencies or else by somehow filling the databases with garbage information. Similar things to the former have happened. Some people tried to do something similar to the latter with web ads (via a program to hide all ads from view while also spamming them with bogus clicks) but clearly it didn’t go so far.

Saving the discussion for another day is just a dishonest way of supporting the status quo

Pretty much anyone who’s paid attention to a few meetings has enough information to notice the status quo is generally easy to hold, and the easiest move to hold it is to delay change.

Fighting change is risky. To fight change to have to open the floor to discussion. If a case is presented, it gets at least thought about. If I talk about how awesome guns are, you’re going to judge whether I’m right or not. Which means you might judge not. Which means the case for guns being not awesome can get its foot in the door.

If I want to keep the gun situation the way it is, I shut down the discussion. I say now is not the time to talk about it. Then neither side gets to say anything, so the status quo holds. If some people want to make me do some work by, say, having the organization put on an event, and I want to just collect my paycheck without doing anything of value, I keep saying “we’ll talk about it next time” until I’ve run out the clock and there is no next time to talk about it. Because doing nothing at all is what happens when you delay the dialogue forever.

It is, almost always, a cop-out move. It’s lazy. It’s worthless in terms of doing anything of worth. If one is fully neutral with regard to future action, then one may as well okay a tentative plan. Gun ban in six months unless revised. Rave in eight weeks unless revised.

And if someone isn’t willing to do that, they’re not neutral; they’re dishonest.

Bring on disambiguated terminology (CSSism vs Communism)

I say with some regularity a lot of words need to be abandoned because they’re always contorted and the discussion goes off the rails pursuing the One True Definition of a word. But perhaps more imagination needs to be developed before the lexical space can be sorted out.

Take “communism” and “leftism” for example. The former many people associate with the stuff Stalin did rather than, say, classless-stateless-society-ism. And then just focus all arguments on Stalinism without any regard for what the CSSist is actually advocating. And the latter people will say “But in *America* “left” means Clintonian center-rightism.” And then refuse to pay any attention to what the leftist is advocating.

But in discussions on either, a large part of the problem seems to just be CSSism/leftism being beyond the scope of imagination. Immediately when the abolition of private property is endorsed, the assumption is the endorser is in favor of the state owning everything. The only conceivable alternative to private entities owning things is the state owning things. Getting rid of the abstract notion of ownership altogether just doesn’t even register as an option. So of course “Communism” isn’t taken to mean what pretty much every Communist endorses because that isn’t even imagined as an option in the first place.

(My initial attempt at a solution is making the terms even clunkier but imagination-provoking. “Classless-stateless-nobody-owns-anything-besides-in-the-sense-of-use-society-ism” barely fits in a tweet. (But then I suppose compressing everything into meaningless soundbites is part of the problem in the first place. So bring on the excruciatingly long names that are thoroughly disambiguated!))