Snoc trees : growing trees from the leaves

Ghani, Neil and Nordvall Forsberg, Fredrik and Fish, Samuel (2026) Snoc trees : growing trees from the leaves. In: 9th International Conference on Applied Category Theory, 2026-07-06 - 2026-07-10, Tallinn.

[thumbnail of Ghani-etal-EPTCS-2026-Snoc-trees-growing-trees-from-the-leaves]
Preview
Text. Filename: Ghani-etal-EPTCS-2026-Snoc-trees-growing-trees-from-the-leaves.pdf
Accepted Author Manuscript
License: Creative Commons Attribution 4.0 logo

Download (298kB)| Preview

Abstract

We introduce snoc-trees which generalise snoc-lists, i.e., backwards lists where new elements are added at the back rather than at the front of the list. We uncover the categorical and computational structure of snoc-trees using both functorial and container-theoretic approaches, and show the power of their associated fold operator. We relate snoc-trees to the usual trees arising from initial algebra semantics, and demonstrate the use of snoc-trees via an example arising from a type theoretic variant of compositional sampling from a probability distribution.

ORCID iDs

Ghani, Neil, Nordvall Forsberg, Fredrik ORCID logoORCID: https://orcid.org/0000-0001-6157-9288 and Fish, Samuel;