- There’s also the notation 0 for the empty (never, noreturn) type. In addition to matching the number of members, the notations 0 and 1 make sense also as units (neutral elements) of addition and multiplication respectively: 0 + A ≅ A + 0 ≅ A, 1 × A ≅ A × 1 ≅ A in a natural way[1]; and also 0 × A ≅ A × 0 ≅ 0.
- That a constant dependent sum is a product, and a constant dependent product is an exponential, is (undeniably confusing at first but) just[2] the naïve schoolbook definition that A × B = B added to itself A times and A^B = A multiplied by itself B times.
- That a constant dependent product is a function type is just the naïve definition that a function is a table of its values at each input (a tuple, with elements numbered by the possible inputs). A dependent function ( = dependent product), then, is the same thing but the allowable values in each cell of the table vary depending on the cell.
- That the function type is the exponential type is also part of common set-theory notation. For instance, 2^ℕ is a not-infrequent name for the set in the Cantor theorem (subsets of the naturals).
[1] As in, those are not literally the same type but are one-to-one in a single natural way. The word “natural” here has a surprisingly deep technical meaning but one that corresponds to the colloquial pretty well.
[2] “Just”, “simply”, etc. are as usual terms of art that mean that the statement feels very simple once you get it, and conversely that if it does not feel simple then you haven’t gotten it and should stop and think until it does. That thinking can take substantial time and effort.
Like - if there: product = constant dependent sum exponential = constant dependent product then what is constant dependent exponential?
> 0 × A ≅ A × 0 ≅ 0.
In practice, 0 × A ≅ A × 0 ≅ A for the temptation is too great to divide by zero and I don't know of a single programming language that doesn't succumb.
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
In case you didn't already know, Jose Valim has released Lynx: Write proofs about Erlang/Elixir programs using Lean - https://news.ycombinator.com/item?id=50620224
1) a tagged union of homogeneous tuples of every possible size, ie. (1 + X + X² + ...), or
2) the inductive form, favored in FP: either the empty list or the first element and another list, ie. 1 + X * L
and how it’s easy to show that the two definitions are equivalent:
L = 1 + X + X² + ...
// factor out X
= 1 + X (1 + X + X² + ...)
// note that the (...) is the definition of L
= 1 + X * LIn a strict language (or with a strict pair in a lazy language), you normally won’t be able to (integer) divide by zero while computing a value, then go on to ignore that, pack that erroneous value into a pair, and extract the other, valid value from it and go on with your life.
Similarly, if your program has hung while computing one half of a pair then (except in lazy languages) it will have hung while computing the pair as a whole as well.
(Haskell’s type algebra is indeed somewhat subtler.)
> In the normal extension K/Q, every normal subgroup of the regular representation acts on a normal scheme that is regular in codimension one, whose normal bundle — orthonormal to the regular surface at each regular value — carries a normal operator whose spectrum follows a normal distribution over a space that is at once regular and normal, all indexed by a regular cardinal.
That’s what they mean for example when they say that a finite-dimensional vector space is naturally isomorphic to its double dual, but while it’s also isomorphic to its ordinary dual, it’s not naturally so. Of course, in an introductory course they’ll just say the latter is dependent on an arbitrary choice of basis; but personally I find it quite beautiful that the notion “independent of arbitrary choices” is even formalizable, let alone in such generality as to span from vector spaces to programming languages.
Case in point, pick a couple linear isomorphisms φ: V → V* and ψ: W → W*, and let f: V → W be a linear map. Then f* = ψ∘f∘φ⁻¹: V* → W* is also linear and makes the isomorphisms natural via the commutivity relation ψ∘f = f*∘φ. If you pick isomorphisms for all your vector spaces of interest, you get a functor –*: Vector → Vector and the natural isomorphism Φ: Id → –*.
Notice, in particular, that every different choice of isomorphism, even for a single space, induces a different functor, though. This means that the set of functors from vector spaces to their duals is 1-to-1 with the set of natural isomorphisms.
In fact, we didn't actually use vector spaces properties in the above other than the existence of isomorphisms. We really are just showing that isomorphic objects in category theory are completely interchangeable.
Still the combinatorics side TFA talks about look beyond this quotient shadow at the actual number of inhabitants.
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.
Did you build Hold Ledger?
My own project uses lemmas at compile time to prove properties of functions with SMT in the compiler[1]
Cure's author's comments on Idris' connection to Cure - https://elixirforum.com/t/cure-a-new-language-compiled-to-be...
He says - I was simply tired to implement critical parts in Idris and then translate the code to Elixir once proved to be correct. So it seems he basically created the language by taking the type system from Idris and marrying it to BEAM semantics.
No, i have not yet built nor played with Hold Ledger.
I suggest you maybe write a paper like "The Design of the March Programming Language" so that people can grasp its overall structure and logical components. Your documentation gives the Trees but not the Forest so it is difficult to get an integrated picture without spending some time going through them all.
Good Luck!
F(0) = 1
F^2(0) = 1 + X
F^3(0) = 1 + X + X^2
So they say, but no one seems to know how to formalise that! It's repeated so often you would think such an claim could be trivially refuted, but it turns out not.
* https://mathoverflow.net/questions/345136/is-a-vector-space-...
* https://h2.jaguarpaw.co.uk/posts/vector-space-naturally-isom...
[1] https://leanprover-community.github.io/mathlib4_docs/Mathlib...
[2] https://leanprover-community.github.io/mathlib4_docs/Mathlib...
If you instead work with functionals rather than bare vector spaces, then there isn't even a functor to the duals, much less an isomorphism. This category is a richer version of Vect, since you can embed Vect into it fully faithfully via the normal double dual map, and it does a better job of capturing all the linear algebra you see with duals.
If you really believe that then you could go to the Mathoverflow question I linked, state that you agree with the claim and vote to reopen. Pretty much no one shares that point of view (not that that should imply you're wrong!).
> If you instead work with functionals rather than bare vector spaces
I don't follow. What does it mean to "work with functionals"?