I've recently tried to fuse my background in programming with my Gemara learning, resulting in what I now call computational gemara. You can read more about the idea here. An older article I wrote with a less nice formalization methodology can be found here.

My goal is to use a theory for formalizing the flow of the Gemara's logic in set-notation and to use theory to build a software system for interacting with the logic of the Gemara in a very immersive way. I envision this software being a novel educational tool and something that would really help me and other students better understand the complex, nuanced logic of the Gemara.

To be clear, this idea is not to project Gemara onto mathematics. It is to develop a system which will lead to a novel tool for learning Gemara. That is all. I'm not trying to imply the anachronistic notion the Rabbis used mathematics to think. I'm just trying to fuse my programming with my Gemara learning to see if anything worthwhile comes out.

What I am looking for:

Do you know if using mathematics to dissect a sugya has been tried before?

Moderators pretend this doesn't exist because it's not part of the question If you would be interested in discussing this with me, please let me know in the comments. I'm only 16 and haven't embarked on a project of this magnitude and seek advice from the more experienced. This site is the best forum for making these connections.

  • 2
    A very interesting idea. +1
    – ezra
    Jan 15, 2017 at 22:56
  • 1
    while not mathematical, you may be interested in the way Rabbi Kessin reduces all of Talmud to several basic points. I think his method will help you refine your idea. He has a series of lectures on this, each one breaking down a different Order of the Mishna. Here is the link to the first Shiur: youtube.com/watch?v=Fvs8Huq5O-o
    – Menachem
    Jan 15, 2017 at 23:15
  • Are you familiar with the work of Robert Aumann and Michael Maschler? A Google search yielded this and this as well. All game theory-related, which might not be your thing.
    – Shimon bM
    Jan 16, 2017 at 1:13
  • 3
    In that case, have a look at a couple of works by the Ramchal: The Ways of Reason (Derekh Tevunot) and The Book of Logic (Sefer haHigayon). Both are available in English translation. Maybe they will help you?
    – Shimon bM
    Jan 16, 2017 at 2:54
  • 1
    @ShimonbM: R Kessin bases his method on those works of the Ramchal, as well as the introduction to one of his other works (I think it was Derech Hashem)
    – Menachem
    Jan 16, 2017 at 16:03

3 Answers 3


What you're describing is a formal notation for Aristotelian or syllogistic logic - see the beginning of Kleene's Intro to MetaMathamatics. Yes, you're right, the Gemara is always building a series of syllogisms to figure out which sets halachos belong to (or conversely which attributes define a set).

Rav Mordechai Goldstein of Diaspora Yeshiva (Har Tzion) built a teaching methodology around diagramming syllogisms as a way of understanding the structure of sugyas. His student R'Dovid Sackton translated the Feldheim versions of The Ways of Reason and The Book of Logic - which are supposed to be the origin of Rav Goldstein's method. Yeshivas Birkas HaTorah in the Old City uses the same approach.

I have not yet seen anything in writing on this. The above is based on conversations with R'Sackton and other Diaspora and Birkas HaTorah students.

  • yes Rav Goldstein teached klale gmara from RI kampenton, derech tevunot and sefer hahigayon from RMHL. Derech Tevunot is very good for the begining. To learn formal logic may help, but to learn in a good yeshiva gmara, rishonim and acharonim 100 times with writing summaries is sufficient
    – kouty
    Apr 6, 2017 at 20:26

I would say that what you've done is pretty impressive. So capturing the logic of Gemara as you have done is an interesting project. However, that being said, Gemara, and specifically learning is not just about understanding the flow and intersection of halacha in that flow, but also the reasoning behind the flow - how the Gemara reached its conclusion, why and why the hava amina was rejected. This is the work of the Rishonim. Since the Rishonim are often difficult to understand, the Achronim come in to help us better understand the Rishonim. So in that sense, you can't really reduce the Gemara to a set in which the halacha is chosen from a set of variables, because each case highlights a different point, and often has a different hava amina in which the variables operate. Often the halacha changes depending on the nature of the hava amina. Notwithstanding the differing views of the Rishonim on how to read the sugya, the flow and the hava amina.

Understanding the subtle nuanaced nature of the Gemara takes a tremendous amount of work and learning, and usually requires knowing a few masechtos in their entirety well. If I may make a salient point. If this project simply is there for your own understanding, then don't do the project, spend the time working through a sugya with the Rishonim. The goal of learning is that it becomes a part of you. Not the program. Keep learning, and your mind will certainly grow and be enhanced by the learning you do. The thought process is correct in that finding definitional patterns in the Gemara is an aid to remembering and you should keep thinking about how everything fits together. Of course writing your thoughts is a good way of storing that information and process. The more you learn and grow the better you will be able to assess and aduce the Gemara's logic.

Perhaps a project that would be beneficial is to enable a computer to generate a word list of every word in the Gemara, its root form, and prefixes/suffixes. The list should be quite small since the majority of words should simply be roots, repeated in different forms. Once generated, a process of translating the words into English should be similarly easy to do, (given Jastrow is public domain). What would be an amazing idea is to be able to generate the entire Talmud in such a way that anyone could click a word and see its correct translation.

The idea behind this is merely a time saving device for learning.


As explains the Ramchal in the end of the third chapter of Derech Tevunot, one needs to translate the Gemara language in a formal language, formal from some point of view. To make each sentence clear.

In the second chapter he explains that we need to find the concatenation between of statements. There are 7 types of statements from the dialectical point of view. To be short, affirmation, question, answer, objection, solution, proof, counter proof.

Gemara has a semi formal language, there are key words, as parich, פריך, metive, מתיבי, urminehi, ורמינהי, Tayna, תניא, matkif, מתקיף,you can learn them easily in Sefer Halichot Olam.

There are also rules of Hermeneutic, also well explained in H.O. But it's not formal as it seems.

Comparison between cases needs also a particular effort.

The Darkey Hatalmud from Rabbi Yitschak Kampenton explains that a great effort to understand the thought that underlies each opinion,objection, and the change between the thought of objections and solutions, the evolution of the opinions. He enhances the importance of thinking about why Rashi rejected a Girsa, why he doesn't explain as Tosfot. In Tosfot there are also key words.

The decision making of the Gemara is rarely based on binary formal logic. Because generally each opinion is logically coherent. Mostly, the decision is to follow the most convincing opinion or the most sustained by previous halachic authorities.

The talmudist need to know each opinion in the topic and to memorize it, e.g. Abbaye opinion despit that it's not the Halacha need to be memorized because in the next topic you need to check how Abaye is coherent with himself. If you find that he isn't, this show that something is lacking in your understanding. So, the sugia need always be learned in multiple points of view, as a local suggia and as coherent with other suggiot in the Talmud, linked to this. This fact is particularly obvious in dine Mamonot. This kind of learning is acquired by learning Tosfot, or at least Tosfot Yom Tov in Mishnayot. After you acquired a good level you can look the Rabbi Akiva Eiger, who emphasizes treatment of contradiction between suggiot.

When the Gemara is decifered, the logical structure is often very long, but not hard to grasp at all. There is no need for syllogistic knowledge.

We can note that Ramchal in Derech Tevunot and Sefer Hahigayon doesn't address seriously study of syllogisms. Gemara itself doesn't formulate syllogisms because the logic of Gemara is not enmeshed.

The work of talmudists is mainly to decifer the form and to evaluate the content. For this, formal algorithm doesn't help. To be rigorous is very important but needs no specific knowledge (indeed, learning formal logic and coding is a good training for intellectual rigor, to acquire habit to checking every reasoning. But to learn with dibbuk chaverim is perhaps better). There are books particularly good to learn as models of Talmudic study and are not hard to learn. For instance, Shaagat Arieh, Nachalat David, Shut Bet Halevi, Minchat Chinuch. To learn the contents of Talmudic thought, Ktsot Hachoshen is good, it's also relatively easy to read.

To learn seriously Gemara with Rashi and Tosfot, the Maharsha helps a lot to understand the logical nuances in Tosfot.

In summary the steps before entering the data in a program are the core of Talmudic study.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .