Tag Archives: Agda

No Inverses for Injective but Non-Surjective Functions?

“I cannot prove that if a function is injective, it has an inverse,” Hideki Hashimoto posed this question to me. Is it possible at all?

Posted in Research Blog | Also tagged , | 12 Comments

Proof Irrelevance, Extensional Equality, and the Excluded Middle

I was puzzled by the fact stated in a number of places that axiom of choice, proof irrelevance, and extensional equality together entail the law of excluded middle.

Posted in Research Blog | Also tagged | 7 Comments

Algebra of programming in Agda: dependent types for relational program derivation

S-C. Mu, H-S. Ko, and P. Jansson. Algebra of programming in Agda: dependent types for relational program derivation. In Journal of Functional Programming, Vol. 19(5), pp. 545-579. Sep. 2009. [PDF]

Posted in Journal | Also tagged , , | Leave a comment

“General Recursion using Coinductive Monad” Got Right

Anton Setzer argued in his letter to the Agda mailing list that we should go back to a category theoretical view of codata, and Dan Doel soon successfully experimented the ideas.

Posted in Research Blog | Also tagged , | Leave a comment

General Recursion using Coindutive Monad

It would be nice to if we could write the program and prove its termination separately. Adam Megacz published an interesting paper: A Coinductive Monad for Prop-Bounded Recursion. As a practice, I tried to port his code to Agda.

Posted in Research Blog | Also tagged , | Leave a comment

Typed λ Calculus Interpreter in Agda

In a recent meeting I talked to my assistants about using dependent type to guarantee that, in an evaluator for λ calculus using de Bruin indices, that variable look-up always succeeds.

Posted in Research Blog | Also tagged , | Leave a comment

Algebra of programming using dependent types

S-C. Mu, H-S. Ko, and P. Jansson. Algebra of programming using dependent types. In Mathematics of Program Construction 2008, LNCS 5133, pp 268-283. July 2008.

Superseded by the extended version for Journal of Functional Programming.

[PDF]

Posted in Conference | Also tagged , | Leave a comment

Well-Foundedness and Reductivity

It seems that reductivity of Doornbos and Backhouse is in fact accessibility, which is often taken by type theorists to be an alternative definition of well-foundedness.

Posted in Research Blog | Also tagged , , | Leave a comment

Well-Founded Recursion and Accessibility

Given a relation < that has been shown to be well-founded, we know that a recursively defined function is terminating if its arguments becomes “smaller” with respect to < at each recursive call. We can encode such well-founded recursion in Agda’s style of structural recusion.

Posted in Research Blog | Also tagged , | 2 Comments

Terminating Unfolds (2)

After seeing our code, Nils Anders Danielsson suggested two improvements. Firstly, to wrap the bound in the seed. Secondly, to define unfoldT↓ using well-founded recursion.

Posted in Research Blog | Also tagged , | Leave a comment