Generating Bijections between HOAS and the Natural Numbers
John Tang Boyland

TL;DR
This paper presents a method for automatically generating provably correct bijections between higher-order abstract syntax and natural numbers, facilitating encoding and manipulation of terms, sets, and maps in formal systems.
Contribution
It introduces a bijection generator with proofs of correctness for encoding HOAS in natural numbers, integrated into Twelf, simplifying the creation of reliable encodings.
Findings
Provides a library for sets and maps based on HOAS to natural numbers bijections
Automates the creation of bijections with correctness proofs
Enables encoding of
Abstract
A provably correct bijection between higher-order abstract syntax (HOAS) and the natural numbers enables one to define a "not equals" relationship between terms and also to have an adequate encoding of sets of terms, and maps from one term family to another. Sets and maps are useful in many situations and are preferably provided in a library of some sort. I have released a map and set library for use with Twelf which can be used with any type for which a bijection to the natural numbers exists. Since creating such bijections is tedious and error-prone, I have created a "bijection generator" that generates such bijections automatically together with proofs of correctness, all in the context of Twelf.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Logic, programming, and type systems · Semantic Web and Ontologies
