Hi there. This is Youwen. I study abstract nonsense and hack on computers at UC Berkeley. Welcome to my corner of the World Wide Web.

Sunrise, parabellum.

Previously, I was at UC Santa Barbara. I also spent a semester in the CS department at Tsinghua University.

I help run functor.systems, a small computing community, and tinker with MIT OpenCompute.

Here is my GitHub, university transcript, CV/resume, and a picture of my cats.

In general, I prefer to use free-as-in-freedom software. I developed functorOS, an experimental NixOS-based Linux distribution—among other free software contributions.

I like hacking, and hackathons. I helped organize the 2026 SB Hacks, the headliner hackathon of UC Santa Barbara, and was briefly its Director of Development.

See about for more about myself, or now for what I’m up to right now. Or explore the other pages on this website.

Discovery is a child’s privilege. I mean the small child, the child who is not afraid to be wrong, to look silly, to not be serious, and to act differently from everyone else. He is also not afraid that the things he is interested in are in bad taste or turn out to be different from his expectations, from what they should be, or rather he is not afraid of what they actually are. He ignores the silent and flawless consensus that is part of the air we breathe—the consensus of all the people who are, or are reputed to be, reasonable.

Recently

RSS and Atom feeds.

Photos

Atom feed.

Full gallery

Notes (Recent notes)

Sep 09, 2026
Definition
A partial function from is a function for some . We write .

For we write to mean and to mean . “Converges,” “Diverges.”

Abuse of Notation
If then we write .

, .

Definition
If we say is total. Write (like usual).

If we say if

(Symbol soup for they agree on convergence, and value if converges. Funext for partials.)

Recursive partial functions

Some -ary partial functions are “clearly” effectively calculable (you could imagine a computer doing these easily).

  • Composition: if we already have two effectively calculable programs (functions), then composing them is trivial.

  • For , let be . Let be . ( for successor.)

  • For , let be the “-th projection”

  • For , , , let

    Here we say is defined by substitution from .

Let be the family of partial functions . An additional rule:

  • Recursion: let , . Define by and .

    More generally, for , , , define . For , take , and .

    Here we say that is defined by primitive recursion from and . If , then .

Example
is in .

Proof. Use primitive recursion,

⁠ 

In the proof above, explicitly speaking, we chose . The choice of is also clear. Here , so given , a suitable choice is , since .

Beyond just satisfying the symbolic constraints we attempt to give an intuitive explanation for why this is a clear choice. We should interpret the -ary function as the familiar for loop. The first parameters constitute the vector , and the argument can be seen as the loop index . We should view as some immutable auxiliary data that the loop can access throughout its iterations. Indeed, notice that is passed unchanged throughout every recursive step of , , and .

The -ary function can be interpreted as an initial value at , and the -ary function is the loop body. The argument of is some value passed down from the previous iteration of the loop. The way I think about it is that at index of the loop, which is , we can pass on some value to the next iteration . We can therefore access the value passed to us by the previous iteration , which is why .

Once we digest primitive recursion from the for loop perspective, it becomes more palatable as a “primitive” form of recursion. Essentially, instead of a recursive function (in the colloquial sense) being able to arbitrarily call itself in its body, a primitive recursive function can only obtain the value of in its body, and the base case is guaranteed to be when . In this view, and are merely auxiliary functions to make the formalism work out.

Now the choice of is clear. For , we just need a for loop to add to , times. We don’t need the initial input , and we don’t need the index . So we use to choose the prior value of the “loop,” and then we add one to it (via the successor function). The initial value of the loop is clearly itself. Now the function defined by primitive recursion can be interpreted as a for loop with an accumulator variable initialized at , at each following iteration adding to the accumulator, running for a total of times. (The first iteration where is initialized is interpreted as , so the loop adds one to a total of times, computing in the end.)

Primitive recursion for partials: for partial functions , , the function defined by primitive recursion from and is given by

Just means that when working with partials we need to take care of convergence.

  • Let , . Define by

    If , we’ll put . Notation: .

    We say that is defined from by minimization.

    In the partial case, for , define by

Definition
Call a family of partial functions recursively closed if it satisfies all the previous construction axioms.
Definition

If , we say is recursive.

Equivalently, is recursive iff it can be defined from , , , using finitely many applications of substitution, primitive recursion, and minimization.

Non-mathematical claim: recursive functions are effectively calculable. If you believe in the Church-Turing Thesis, then recursive functions are exactly the functions which can be computed by effective methods (e.g. Python-computation).

Contact

Places

B.A. Mathematics, Computer Science
University of California, Berkeley (‘28)
Visiting student, CS department
Tsinghua University (S26)
B.S. Mathematics, Computer Science
University of California, Santa Barbara (cut short)
in BerkeleyCalifornia, USA
near San FranciscoCalifornia, USA
previously in BeijingChina
previously in Santa BarbaraCalifornia, USA
previously near Salt Lake CityUtah, USA
previously in ShanghaiChina
Imagine what we can become.