Reasoning in mathematics is simple and subject to automation and discipline/system, because every concept (e.g. integer number, real number, derivative, integral, differential equation and its solution, etc.) can be expressed using some very small set of simple notions. If one considers the type theory approach to the fundamentals of mathematics, then there are only two basic types (entity and Boolean-truth) and all the other types, all the other notions and concepts are formed from those two simple types. Reasoning in mathematics is systematic because we completely know the content of the every concept. Yes, sometimes we imagine some new concepts (poetics of math) but even in such cases we manage to write down those concepts (or approximations of them) into the other concepts that can be traced to the first principles. Concepts in the mathematics are formed (or at least - can be expressed) in the bottom-up manner.
Reasoning about physics, about real world (ontology, metaphysics, nature, social world, humanities, emotions, mind, etc.) is very hard, because we can only make guesses about the eventual concepts, about the connections with other concepts and we don't know the full content of the concept, every research discover new shades of some concept, concepts are created, merged etc. And all this happens in non-rigorous manner, because we don't know the complete content of the concepts expressed in the first principles. We even don't know the first principles that can be used for the real world.
Semantics of the natural language is perfect example for efforts to discover such first principles. E.g. reading from https://edinburghuniversitypress.com/book-elements-of-formal-semantics.html one can see the table that expresses each grammatical category as the derived type that is made from just two basic types (e and t - entity and Boolean-truth):
Abstract type F-type S-type
NP→S intransitive verb ff et
NP→(NP→S) transitive verb f(f f ) e(et)
A→(NP→S) be copula f(f f ) (et)(et)
A→A adjective modifier f f (et)(et)
S→(S→S) sentence coordinator f(f f ) t(tt)
A→(A→A) adjective coordinator f(f f ) (et)((et)(et))
(NP→S)→S quantified noun phrase (f f )f (et)t
N→((NP→S)→S) determiner f((f f )f ) (et)((et)t)
(NP→S)→(N→N) relative pronoun (f f )(f f ) (et)((et)(et))
One can guess - if mathematics is the model of the real world, then we already have all the first principles, we just need more efforts to express such concepts as 'happiness according to Aristotle', 'ontology according to Hegel', 'ontology according to British encyclopedia', 'ontology according to some famous philosopher N.' (we should always take into account that well defined concepts are connected to some personality in whose inner semantic we they can be found and only from such personal concepts the conventional concepts can emerge by convention in some scientific community, legal system, etc.) using the basic notions of math.
OK, I know that my thoughts are very childish. That is why my real question is this - is there some discipline in philosophy that tries to express the content of the each concept in some basic notions, is there discipline of the philosophy that tries to uncover such basic notions and types (be they the already known mathematical notions and types or something other)? What are the names of such disciplines of philosophy? What are common terms and research themes in such disciplines? Just keywords and names? Everything other I can find further myself.
I know, that there is metaphysical ontology (as opposite to applied ontology) but I don't know the efforts to find the content of concepts and the first principles. I know that there is mereology, but it is about parts, about structures and systems, but the essence of the concept is something more that just its structural build-up. So, I am completely lost and I don't know where to search further.
p.s. Why I am asking this? Well, I have zero internal/personal drive to understand world in such basic terms. I am just trying to automate thinking/reasoning (artificial general intelligence) for applied purposes and that is why I need systematic, disciplined, extensible and automatable way of handling concepts and I am just seeking for theories that are already created for such handling of concepts. Of course, they can not give the final answers, but they can be good starting point and the system can discover further horizons itself.
I am starting to read https://www.bloomsbury.com/uk/ontology-and-metaontology-9781441191953/ final chapters can give some answers.