• degen@midwest.social
    link
    fedilink
    English
    arrow-up
    48
    ·
    1 day ago

    It’s kinda like set or category theory. The kind of math that hardly resembles anything at all yet somehow applies everywhere, to infinity and beyond

    • YTG123@sopuli.xyz
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      5 hours ago

      Indeed. [And caveat this whole comment with “as far as I understand” because this is maths and you can’t be too careful…] The difference being that set theory is way more fundamental and abstract than most mathematicians ever need, so on the one hand it can be completely stated with only 8 or 9 axioms (and a system of first-order logic) but on the other hand it can take some ingenuity to encode a mathematical object as a set in a way that makes it easy to do stuff correctly and hard to mess up.

      Most type theories take a more intuitive approach, so they do resemble something, namely, functional programming. Just a very rigorous approach to it. If you manage to construct a term of the correct type, you can be sure that it’s what you think it is, whereas with set theory you have to constantly check yourself (if you require the rigor). The trade-off being that type theory requires you to work with complete rigor and reasoning at a low level can be more difficult than set-theoretic reasoning at a low level.

      The TL;DR is that in type theory your constructions often look like what you actually want to do (and as a consequence you sometimes have to work directly with the underlying system, like a programming language), but in set theory there’s a disconnect between the conceptual level and the underlying nitty-gritty logic.