Материал How humanity learned to reason: from Aristotle to programs and categories
0%

How humanity learned to reason: from Aristotle to programs and categories

How Humanity Learned to Reason: From Aristotle to Programs and Categories

A syllogism is a reasoning in which from accepted premises necessarily follows something different from them.

Aristotle, “First Analytics”, in a modern retelling

Imagine that a simple rule appears in the organization:

An employee can open a report if permitted.

On the first day everyone nods. On the second day questions begin. Who is considered an employee? Is the permission issued for one report or for all? What to do with temporary access? Can a manager grant access to themselves? What will happen if a person is fired, but the permission remains?

The history of logic begins precisely in such places. People formulate a clear rule, encounter an edge case, and are forced to name words, grounds, and the transition to a conclusion more precisely. Each subsequent theory in this chapter emerges not for complexity’s sake, but because the previous tool is no longer sufficient.

We will keep coming back to one question: what had to be made explicit in order for the solution to stop depending on a guess?

History of Logic: from conversation and inference form to computation and composition

1. First, people learned not to prove but to persuade

At the meeting, the leader suggests: “Let’s give all managers access. They are responsible for the results and should see the reports.” The phrase sounds reasonable. It has a motive, a confident voice, and clear benefit. But responsibility for the results does not imply access to all data.

Between the cause and the solution are hidden assumptions: every manager needs the same information; reports do not contain excess; the risk of leakage is lower than the benefit; the word “manager” unambiguously defines a group of people. Until the assumptions are named, audience consent is easy to take for proof.

The ancient Greek tradition gradually divided three tasks. Rhetoric studies how speech persuades. Dialectic checks a position with questions and objections. Logic asks whether the conclusion is supported by the premises.

The first practical logic skill is very simple: stop between “I want to agree” and “this really follows”. Hearing “this option is bought more often, so it is better”, separate the product’s popularity from its suitability for you. The first may be true, but the second requires a new basis.

People have learned to distinguish persuasiveness and compliance. The next task is harder: how to see the same pattern in stories with different heroes?

2. Aristotle separates form from content

Let’s take the reasoning:

Все владельцы отчёта имеют право его открыть.
Мира — владелец отчёта.
Следовательно, Мира имеет право открыть отчёт.

Replace the content with letters:

Все M являются P.
S является M.
Следовательно, S является P.

Mira and the report are gone, but the framework remains. Aristotle made this framework the subject of study. Validity relates to form: with true premises, a correct inference cannot yield a false conclusion. It does not guarantee that the premises themselves are true.

In everyday speech, part of the reasoning is often omitted: “Mira has a service card, so the report can be opened.” We add the rule “the card owner has access” ourself. Such a shortened reasoning is called a enthymeme. Without enthymemes, conversation would be unbearably detailed, but it is precisely in the omitted premise that disagreement is usually hidden.

Therefore, during a dispute, it is useful not to repeat the conclusion louder, but to ask: “What general rule connects this fact with the decision?”

Syllogism works well with classes and properties. But access rules also consist of “if”, “and”, “or”, and “not”. A different perspective is needed for them.

3. Stoics move from things to conditions

Let us consider the derivation:

Если учётная запись заблокирована, отчёт открыть нельзя.
Учётная запись Миры заблокирована.
Следовательно, Мира не может открыть отчёт.

What matters here is not the class to which Mira belongs, but the connection between whole statements: “if P, then Q; P; therefore, Q”. Stoic logicians studied such forms long before computers.

This language immediately detects a common fallacy. If a lock implies a ban, then the ban itself does not imply the lock. Access could be denied due to an expired permission or an inappropriate report. We often confuse a sufficient cause with the only possible one.

In everyday life, it looks like this: “if it is raining, the road is wet.” Seeing a wet road, one cannot confidently conclude that it rained: a watering truck might have passed. The logical form helps avoid inventing a cause based on a single effect.

Conditions were still recorded in words. The next step is to make them a computational object.

4. Leibniz Dreams of Computation, Boole Builds Algebra

Leibniz dreamed of a language in which disputes could be resolved by checking symbols: “Let us calculate.” He did not fully construct such a language, but the idea turned out to be fruitful. In the 19th century, George Boole described logical relations as algebra.

Our rule becomes an expression:

доступ = (владелец ИЛИ аудитор)
         И повторная_проверка
         И НЕ заблокирован

The formula does not decide whether the rule is fair. It forces equal treatment of equal cases. Just write down four or five lines of the table, and the questions hidden in the word “usually” become visible.

This can be used to verify a discount, insurance, or the right to return a product. Formalization is useful not because it replaces a person, but because it prevents conditions from being changed unnoticed during reasoning.

Boolean formulas can connect ready-made statements. But how to express relations between specific people, reports, and organizations?

5. Frege adds variables, relations and quantifiers

The phrase “User can open a report” refers to two objects and the relation between them. A simple “true or false” is not enough: there must be room for a specific user and a specific report.

Such predicates as может_открыть(человек, отчёт) and quantifiers appear: “for each report”, “there exists an employee”. A quantifier helps to notice a dangerous scale substitution. From the fact that each employee reads some report, it does not follow that there exists one report that everyone reads.

This distinction occurs constantly in the research. “For each participant a useful practice was found” and “one practice turned out to be useful for all” — are different statements. Swapping two words changes the meaning of the result.

Check the generalization with three questions: what objects are being discussed, what is the relationship between them, and is the conclusion stated for all cases.

The more precise the language became, the more noticeable its own boundaries were.

6. Paradoxes and formal systems draw boundaries

The naive idea of a set sounds harmless: one can gather together all objects with the desired property. Russell asked what would happen to the set of all sets that do not contain themselves. If it contains itself, it should not; if it does not, it should.

The paradox showed: one cannot transform any description into an object without limitations. Rules for forming admissible sets are needed. Later, Hilbert’s program attempted to build a reliable foundation for mathematics, while Gödel’s results showed that a sufficiently expressive consistent formal system cannot prove within itself all true statements of its language.

Practical conclusions are humbler than loud slogans: any method works within its premises. A table won’t prove we’ve chosen fair criteria. Checking a questionnaire doesn’t guarantee truthful answers. Rigor starts with an honest description of the boundary.

The formula describes a relation. The computer needs a procedure that will receive data and perform steps.

7. Turing turns a rule into a procedure, Shannon — into a scheme

In the 20th century, logic encountered the question: what does it mean at all to “be computable”? Turing’s model described a simple machine performing precise steps on symbols. Shannon showed that Boolean relations can be implemented with electrical relays. Reasoning became not only a record, but also a process.

However, the rule and the procedure are not the same. “Return possible within 14 days” — is a rule. Who checks the date, what happens without a receipt, how a dispute is recorded and when the money is returned — this is the procedure. A good rule can lead to a bad outcome if the procedure is incomplete.

Execution adds time and failure. Data may change between the check and the action, an employee may make a mistake, and the required system may not respond. Therefore after the question “is the rule correct?” a second one is always needed: “what will happen in the real process?”

Now we have objects, conditions, types, and a procedure. We need to figure out how to organize the code without turning the logic into one giant method.

8. OOP and FP give different forms of one policy

One rule can be explained in two ways. The first gathers around the entity its state and permissible actions: “the report itself knows who the owner is.” The second considers the data separately and applies transformations to them: “obtain the facts and compute the solution.”

This is not a debate about the only correct style. Sometimes an object with a stable history and change rules is more important. Sometimes it’s a transparent chain of computations that can be easily checked separately. Complex systems often use both approaches at different boundaries.

A useful question is not “what is better overall?”, but “where should the rule reside, what data does it need, and how will we ensure that it hasn’t changed accidentally?”

Set theory, group theory, and category theory help look at the model from different perspectives. They do not form a ladder from simple to “the smartest”.

9. Sets, Invariants, and Composition — Three Engineering Lenses

Sets ask who belongs to the considered group. For access this are employees, owners, auditors, and blocked accounts. A fallacy occurs when a conclusion about one group is silently transferred to another.

Transformations and invariants ask what can be changed without breaking an important property. One can rename roles or reorder process steps, but should access rights remain the same?

Composition looks at the connection of steps. Each stage individually may be reasonable, but the entire chain — erroneous. The questionnaire is assembled correctly, data calculated accurately, the graph built honestly, yet the conclusion still does not relate to the original question.

Choose the lens by the problem. They argue about who was counted — start with sets. They compare two processes — name the preserved property. The error arises at the junction — investigate the composition.

Now let’s gather ideas not into a learning example, but into several real architectures.

10. How policy lives in different architectures

In a small organization, a rule may live in the instructions of one department. As growth occurs, multiple systems, branches, temporary staff, and audits appear. What was previously resolved by a familiar person turns into a separate process.

Centralization makes rules more uniform, but creates dependency: if the common center is unavailable, work stops. Local copies are faster, but can become outdated. There is no solution without a price — there is a compromise choice and an honest description of consequences.

Logic helps not to choose architecture automatically, but to retain the meaning of the rule during growth. Who makes the decision? On what data? How long are they considered fresh? Where is the exception recorded? Who will be able to explain the refusal in a month?

Historical track is complete. It remains to turn it into a working protocol.

11. From requirement to production: practical track

When you encounter a rule, derivation or recommendation, go through seven stages:

  1. Name the solution: what exactly is proposed to do?
  2. Clarify the words: which concepts might participants understand differently?
  3. List the premises: what is known, and what is only assumed?
  4. Restore the hidden bridge between premises and conclusion.
  5. Check edge cases and possible alternative causes.
  6. Choose the minimal formalization: a table, a diagram, or a list of conditions.
  7. Return to reality: who will implement the solution and what will indicate an error?

Logic does not turn life into formulas. It makes transitions visible: from a word to a foundation, from a foundation to a conclusion, from a conclusion to a rule and from a rule to consequences.

Self-check

Try to explain without a hint:

  • why persuasiveness and correctness of inference are different qualities;
  • where an enthymeme hides in a common phrase;
  • why from a consequence one cannot automatically restore the cause;
  • what formalization makes visible but does not solve for us;
  • what distinguishes a rule from a procedure;
  • why sets, transformations, and composition answer different questions.

If the answers form a single story, the chapter has fulfilled its task.

Sources and continuation

Concepts, Definitions and Classifications

Нашли неточность? Выделите фрагмент текста — рядом появится жучок.

Нужен разбор именно вашей ситуации?

Статья описывает общий случай. Если у вас частный — можно разобрать его отдельно, платно. А если не хватает целого материала, предложите тему: её оплачивают вскладчину, и она выходит открытой для всех.

Доска запросов