1. viktor_patrinov says:

What does it mean that a particular discipline is based on something? For example, if you take physics, then in general you can talk about different bases. After all, the content of existing physical theories is based on various laws, postulates, and principles. But you can ask the question: “What are they based on?” these laws, postulates, and principles of physics?”, which are also part of the content of physics. When we ask the second question, we begin to talk about the meta-foundations of this discipline, which are already problems of metatheory, in the context of physics — “metaphysics”.
Mathematical logic (ML), whatever its category, is concerned with the study of already existing deductive systems (logical systems) and their formalizations, typical examples: propositional logic (also known as propositional logic) (its formalizations are called propositional calculi), first-order predicate logic (its formalizations are called predicate calculi), etc.; formal languages (this area of ML interests intersects with the area of linguistics interests) from the point of view of mathematical methods and approaches. But it also studies the approaches and methods of mathematics themselves. ML is a metatheory of mathematics-metamathematics.
Historically, the ideas of logic complemented mathematics, and the ideas of mathematics complemented logic. The ideas of formalism came from mathematics, and the ideas of proof, consequences, … – from logic. Their crossing-over gave rise to what we now understand, in modern times, as formal logic. Although there are opinions that, in general, the entire content of formal logic is the object of study and development of mathematical logic, since all the ideas of logic were “absorbed” by mathematics and only a few directly by logic. For example, [1] begins an article on mathematical logic in the English-language Wikipedia:

Mathematical logic, also called formal logic

But, in general, the question is still open.

Mathematical logic was born, as already noted, as a result of understanding the ideas of logic by the ideas of mathematics. Although both the first and the second merged over the course of many centuries, it is still customary to attribute the origin of mathematical logic to the second half of the 19th and early 20th centuries [1], which began with the works of Boole, de Morgan, and others. The motivation was such that there was a desire to reduce all logic and logical reasoning to automated, mechanistic work with sets of signs according to certain rules.

2. nikita_kotov says:

Being a branch of formal logic, it is based on it.

Formal logic itself is more difficult. I haven't heard that the question of the nature of logic has been resolved at the moment, but I have some suggestions on this point.

Evolutionary epistemology considers our ability to reach correct conclusions to be the result of evolution – those who were wrong were less likely to leave offspring.

Our cognitive apparatus has adapted to the world around us, sharpening our thinking on the ability to draw conclusions that lead to results, correct predictions of reality. Logic is an attempt to formalize our intuitions accumulated over millions of years. Drag the reasoning from the unconscious area to the conscious one, replace “seems” with “sure”. As a result of formalization, rules for inference of statements are obtained, which transmit apparent plausibility from the premise to the consequence, and improbability – from the consequence to the premise.

But since our intuition is the result of adapting to certain scales, nothing guarantees that it will work on others – for quantum mechanics, a different logic is used, corresponding to the intuitions accumulated when working with the quantum world.

In addition, the formalization is only a model, and you can't be sure that it exactly matches what is being modeled.

Under suspicion is the law of the excluded third, there are logics that cancel it in various ways and are not contradictory or counterintuitive, so it may not follow from our intuition.

The question of innate intuition remains open – there is evidence that some ideas about the world may be innate, but on the other hand, it is shown that primitive tribes are not able to intuitively understand syllogisms, their way of reasoning does not apply to them.

3. ivan_shishlyannikov says:

Logic is the science of correct forms of thinking, but it does not look at the content of statements, since this is what the theory of argumentation deals with. Mathematical logic brings the ideas of Aristotle to perfection and allows you to build logical constructions according to formal rules. Modern logic will explore the question much more deeply, which will allow you to hone your skills in constructing logical constructions.