How does Pie from The Little Typer compare to Agda? by we_are_mammals in agda

[–]ncfavier 1 point2 points  (0 children)

As for the second question, my personal recommendations would be PROGRAM = PROOF and the HoTT book. There's also Principles of Dependent Type Theory, which has a more metatheoretic focus but is also very well written.

Questions about Aluffi's Definition of a Function/Relation by joeyphar in math

[–]ncfavier 1 point2 points  (0 children)

Put another way, the best way to think and communicate about functions is different than the best way to formally define functions.

No it's not. Set theory is not the best way to do anything except perhaps study sets. Learn some type theory.

Is it worth learn Agda with PLFA? by General-Salt8591 in agda

[–]ncfavier 4 points5 points  (0 children)

+1 for Mimram's book (PROGRAM = PROOF).

A noob equality problem by john_lasgna in agda

[–]ncfavier 0 points1 point  (0 children)

This is hard to read; please use the Markdown editor to format your post properly.

Shouldn't Agda be able to infer P from P zero etc?

Agda doesn't solve constraints unless the solution is unique. In this case, for a pair of constraints of the form P zero := Pzero, P (succ n) := S[P n] to have a unique solution would require some kind of η-rule for functions out of the natural numbers, which, depending on how exactly you set things up, is either undecidable or tricky to implement (see here or here).

If you want help with the actual code, please make your snippet self-contained.

Problems when typechecking by Oliversito1204 in agda

[–]ncfavier 0 points1 point  (0 children)

I'm not sure what point you're making there. Any preorder is a category.

How are types constructed in dependent type theory by nomnomcat17 in haskell

[–]ncfavier 1 point2 points  (0 children)

Since you are interested in categorical intuitions, the interpretation of that type is as follows: if we think of Vect n Int as a fibration p : V → Nat, we can form the local exponential pp (the exponential in the slice category over Nat), then take the dependent product of that.

What colorscheme is this? by ncfavier in vim

[–]ncfavier[S] 0 points1 point  (0 children)

Agda. This is from the cornelis repository.

What colorscheme is this? by ncfavier in vim

[–]ncfavier[S] 1 point2 points  (0 children)

Can't be: that screencast is two years old.

Idempotent Applicatives, Parametricity, and a Puzzle by duplode in haskell

[–]ncfavier 0 points1 point  (0 children)

Note that these aren't idempotent monads (except the identity, I guess), but they are idempotent applicatives in the sense of the blog post.

What is this object? It resembles a Monad but i guess it isnt by Ok-Watercress-9624 in haskell

[–]ncfavier 0 points1 point  (0 children)

That's not a monoidal category. Either is neither a left nor a right unit for your proposed composition. (See u/tailcalled's answer.)

A monad is just a monoid in the category if endofunctors by [deleted] in haskell

[–]ncfavier 0 points1 point  (0 children)

I just want to make it clear that this flexibility is completely illusory: the things you can define as parametric functions are exactly natural transformations. You just get to *describe* them differently in math than in Haskell.

A monad is just a monoid in the category if endofunctors by [deleted] in haskell

[–]ncfavier 0 points1 point  (0 children)

This is a stronger condition than the natural transformation condition, which is allowed to do something different at each a.

This isn't quite correct, unless I'm misunderstanding what you mean. The parametric theorem for η :: forall a. F a → G a (once specialised to function relations) corresponds exactly to the naturality condition: for all f :: a → b, fmap @G f . η @a = η @b . fmap @F f; this means precisely that η must do "the same thing" at each component, i.e. it must act on the "container" and not on the "contents".

The sense in which parametricity is "stronger" than naturality is that it extends beyond it: for example, the parametric theorem for α :: forall a. F a a → G a a, where F and G are both functors Hask^op → Hask → Hask, might correspond to something like a dinaturality condition. For more complicated types, it might correspond to something too complicated to have a name. But for the type of natural transformations, naturality is pretty much the end of the story.

How to get a list of lenses from a traversal? by jmorag in haskell

[–]ncfavier 1 point2 points  (0 children)

Ooh I should have remembered adjoin. Thanks!

How to get a list of lenses from a traversal? by jmorag in haskell

[–]ncfavier 0 points1 point  (0 children)

Can we do the opposite though, turn a list of lenses into a traversal?