An unofficial, read-only Hacker News reader.

The algebra of dependent types (2025) (opens external site)

115 points by todsacerdoti 4 days ago | dotat.at | 26 comments on HN

View full thread · View on Hacker News

Comment thread (3)

  1. I think Dependent Types are easier to understand following Curry-Howard Correspondence (https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspon...) where the mapping to Logic is clearly spelled out.

    1) Propositional Logic = Simple Types

    2) Predicate Logic = Dependent Types (https://en.wikipedia.org/wiki/Dependent_type) where;

    2.1) Existential Quantification = Σ-types (aka Dependent Sum/Pair) - https://en.wikipedia.org/wiki/Dependent_type#%CE%A3_type

    2.2) Universal Quantification = Π-types (aka Dependent Product/Function) - https://en.wikipedia.org/wiki/Dependent_type#%CE%A0_type

    Note that in order to understand the above you need to grasp "Type of Types" i.e. Sorts.

    The whole Typed Lambda Calculus to Calculus of Constructions (based on dependent types) is very nicely and succinctly explained by Helmut Brandl in his 100-page booklet Typed Lambda Calculus / Calculus of Constructions - https://hbr.github.io/Lambda-Calculus/index.html

    Replies (1)
    1. Sure, from this pov logic is just dependently typed lambda calculus where the types are quotiented by `True` (i.e. all inhabitants, if any, are equal; aka propositional irrelevance). Also see Corollary 4.7.3. in Awodey and Bauer's book on Categorical Logic [1].

      Still the combinatorics side TFA talks about look beyond this quotient shadow at the actual number of inhabitants.

      [1] https://awodey.github.io/catlog/notes/catlogdraft.pdf

      Replies (1)
      1. I meant to go from simpler to more complex logics. Categorical logic is too general and best looked at later.

        Propositional Logic -> Predicate Logic (FOL) -> Higher Order Logic. This involves truth tables, models and semantic argument deductive systems (i.e. proofs) which are applicable everywhere.

        Then move onto (or parallely) computation specific, Intuitionistic Constructive Logic -> Lambda Calculus -> Lambda Cube. This gives you the whole gamut of Type Theories.

        Finally, the Curry-Howard Correspondence ties both the above together.