Abstract
(aux kanren micro) is a small, fast miniKanren whose terms are first-order Scheme data and whose goals are first-order Horn clauses. λProlog, the language of Miller and Nadathur’s Programming with Higher-Order Logic, runs a much larger logic: goals may say “for every new name ” and “assuming ”, terms may contain λ-binders, and unification works modulo α, β and η, so that programs over syntax with binders need no code for renaming, fresh names or capture-avoiding substitution. This document asks what it would take to give (aux kanren micro) the same power. Part I summarizes the book chapter by chapter, with its core examples; Part II surveys the miniKanren literature on these features, centered on Ma and Friedman’s higher-order unification algorithm for λKanren; Part III describes the engine and proposes a concrete answer: a generic extension protocol for the engine and a client module, (aux kanren lambda), providing λ-terms, the goals and , and higher-order pattern unification with universe levels and delayed non-patterns, prototyped, tested, benchmarked, and merged into aux in five commits.