TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Learning about mathematical logic, I have to write formal deductions*.

How can I write them using TeX?

Any feedback is welcome.

(*)Roughly they are numbered lists over two columns, the first one gives a formula and the second one gives its justification (if it is an axiom, a hypothesis or if it is inferred by previous entries), both can go over many rows.
Anyway here is an example (from: Mendelson, Intro. to Math. Logic.)

enter image description here

share|improve this question
Perhaps a tabular environment using a a p{} column type, and a custom counter for the first column? – Peter Grill Jul 27 '12 at 7:33
the notation you're using is very like that used in the article "ProofCheck: Writing and checking complete proofs in LaTeX" by Bob Neveln and Bob Alps. this was presented at tug 2009, and a video is available. you might get some ideas from this. the authors presented an update at tug 2012, but unfortunately, this year's meeting wasn't recorded; the tugboat article will be published in the proceedings issue (but hasn't yet been received). – barbara beeton Jul 27 '12 at 12:21
Have a look at http://www.logicmatters.net/latex-for-logicians/nd . There is a list of solutions for writing logical proofs in LaTeX – Guido Jul 30 '12 at 18:35
As @Guido's link seems broken (missing column?), I repost it here logicmatters.net/latex-for-logicians – Niriel Apr 6 '15 at 14:13
up vote 9 down vote accepted

Here is one way to do it using a custom counter for the first column, and the p{} column types for the other two columns:

enter image description here




\begin{tabular}{l p{0.25\linewidth} p{0.25\linewidth}}
    \NewRow & $x^2 + y^2 \ge 0\ \forall x, y \in \mathbb{R}$ & Hyp\\
    \NewRow & $more\ math$                                   & 10,11 conjunction introduction\\
share|improve this answer
Thank you, Peter Grill. – Giuseppe Jul 27 '12 at 8:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.