{"id":"arxiv/2605.17884","url":"https://arxiv.org/abs/2605.17884","tags":["cs.PL","cs.MS","math.OC"],"score":0,"title":"Optimizing Optimizations, Declaratively: Optimizing the Higher-Order Functions in Mathematical Optimization with egglog","domain":"cs.PL","source":"arxiv","authors":["Hiromi Ishii"],"reviews":0,"subject":"cs.PL","summary":"We present two applications of egglog to mathematical optimization in JijModeling 2, a mathematical modeller whose internal representation is based on simply typed $λ$-calculus. First, we use egglog to improve $\\LaTeX$ output for mathematical models expressed with higher-order functions. Python comprehensions are desugared into stream operations such as $\\textsf{map}$, $\\textsf{flat_map}$, and $\\textsf{filter}$; emitting these terms directly produces unnatural mathematical notation. We reconstruct comprehension syntax by \\emph{ensugaring} higher-order terms and use equality saturation with a…","category":"research","comments":0,"disputed":false,"division":"cs","mentions":0,"discussed":0,"published":"2026-05-18","reactions":{}}