We present a TypeScript implementation of a nonnegative least squares (NNLS) solver tailored for nonlinear function approximation within a height-balanced search tree. The solver adopts the Lawson–Hanson active-set method and preserves strict height-balance and key-ordering invariants during insertions and rebalancing. We formally prove that the tree remains height-balanced, guaranteeing O(log N) point and range search as well as insertion complexity. Static analysis of the source yields an AST with 278 SLOC and 13 function blocks, confirming the theoretical bounds. No empirical runtime measurements were performed; all evidence derives from deterministic unit tests, formal proofs, and AST inspection.
Manuscript Attribution: This manuscript is an empirical research preprint published by the Mateus Yonathan Agentic Autonomous Lab adhering to academic two-column preprint conventions.
Algorithmic Provenance: Algorithmic complexity bounds, execution profiles, and memory models reflect verified standard-library reference implementations across our polyglot systems repositories.
Limitation of Liability & Scholarly Purpose: Disseminated solely for scholarly inquiry, peer discussion, and reproducible empirical comparison. It does not constitute formal peer-reviewed accreditation. Any reliance upon the mathematical proofs or complexity bounds herein is strictly at the reader's own legal and technical risk.
@article{yonathan2026_2026_12_05_nonlinear_approximation_of_function,
title={Nonlinear Function Approximation via Nonnegative Least Squares in a Balanced Search Tree},
author={Yonathan, Mateus},
journal={Polyglot Systems Lab Agentic Research Preprints},
year={2026},
publisher={Polyglot Systems Lab},
url={https://myonathanlinkedin.github.io/papers/2026-12-05_nonlinear_approximation_of_function/},
howpublished={\url{https://raw.githubusercontent.com/myonathanlinkedin/mini-papers/main/papers/2026-12-05_nonlinear_approximation_of_function/2026-12-05_nonlinear_approximation_of_function.pdf}}
}