The trek goes on

Josh Ko’s blog
0020 · 

A bit of fun with identifying states on the Bloch sphere in ZX-calculus, which involves a bit of fun with trigonometry.

0019 · 

We perform a (not so successful) experiment that proves a simple graph-theoretic property (an induced sub-graph of a directed acyclic graph is also acyclic) in relational calculus.

0018 · 

A (simple) construction that realises the principle of deferred measurement is described (and proved correct) in ZX-calculus.

0017 · 

Naturality enters the picture as we prove that the two formulations of optimising definitions in terms of universality and isomorphism are equivalent.

0016 · 

An important special case of adjunctions is Galois connections, which can be very helpful for reasoning about order-theoretic optimising definitions.

0015 · 

The universal property of (categorical) products can be reformulated as a useful family of isomorphisms.

0014 · 

Quantum theory starts with a few postulates about the states of quantum systems and how they evolve, and there are two formulations, one in terms of unit vectors and the other in terms of density operators. This post shows that the unit vector formulation gives rise to a very simple transition system, which we can then transform and optimise to get a transition system corresponding to the density operator formulation.

0013 · 

We experiment with formulating the paradoxical arguments for the undecidability of the halting problem and, more generally, Rice’s theorem in a modally typed setting using (a variation of) Kavvos’s intensional recursion, whose type corresponds to the Gödel–Löb axiom.

0012 · 

With path calculations similar to those in 0011, we can prove a couple more important theorems in HoTT: Hedberg’s theorem and the incompatibility between univalence and the unconstrained law of excluded middle.

0011 · 

From one lemma, this post proves in Homotopy Type Theory that (i) equality types on a contractible type are also contractible, and that (ii) the definitions of sets and mere propositions match the general definitions of 0-types and (−1)-types.

0010 · 

At FLOLAC ’20 I will present Conor McBride’s showcase example in his original ornament paper, where the evaluation of additive expressions (which he calls ‘Hutton’s razor’) is compiled to instructions for a stack machine, and the preservation of semantics is proved purely by datatype indexing.

0009 · 

As a short intern project, we’re formalising a semantics-preserving translation from finitely typed circuits to boolean ones, so that properties proved for the compiled boolean circuits by SAT solving can be transferred back to the typed circuits.

0008 · 

One nice thing that happened over the past few months was getting all the facilities I want in my office, of which this post is a quick tour. Quite a few pictures are included.

0007 · 

A while ago I wrote 0004 about eliminating quantifier alternation, which took a fair amount of logic formula manipulation. Not long after that, my colleague Yun-Sheng Chang came up with a reformulation that makes the solution much more streamlined; this post contains my presentation of the reformulation, along with a higher-level recap of what I did in 0004.

0006 · 

程式語言學對符號有近乎偏執的愛好與要求:我們以符號為工具精準簡練地表達程式與相關概念,用符號做厲害的事(證明程式性質),設計易用的符號,並且特別喜歡有多重內涵 — 特別是具有數學和邏輯學意義 — 的符號。本文為科普向。

0005 · 

This post is an incomplete digest of Andrej Bauer’s note What is algebraic about algebraic effects and handlers?. My goal is to arrive at a reasonable definition of handlers. (Spoiler: I don’t manage to achieve that goal, although we will see Bauer’s definition.)

0004 · 

I found that the type theory people and the verification people think about the same logical formulas in different or even opposite ways, which is quite interesting. This post contains a summary of an abstracted (and in fact distorted) version of the problem we discussed, and records some of the different ways of thinking of the two camps.

0003 · 

The key is to use the contrapositive universal property of the floor function.

0002 · 

Recently I reread Nils Anders Danielsson’s POPL 2008 paper Lightweight Semiformal Time Complexity Analysis for Purely Functional Data Structures, whose technique (implemented in Agda) has been adopted by a few groups of people…

0001 · 

If we regard the big-O notation as denoting classes/sets of functions, which I call ‘order classes’, we can start talking about their structures, and one such structure is the semiring of order classes. …

0000 · 

I am informally notified today that my application for the position of assistant research fellow at the Institute of Information Science, Academia Sinica (the national academy of Taiwan) has been approved, and I can expect to start at the beginning of the next year. With the start of the new job, it looks like a good opportunity to pick up the habit of blogging again. …