Left to Solve
Problems / MathOverflow (not formalized)

What is the category of homoiconicity?

Open, not yet stated in LeanMathOverflow (not formalized)General Algebradifficulty55/100

Statement

Category theory often captures the hearts of computer scientists because of its uncanny capacity to cleanly describe CS concepts. A common example is the way Algebraic Data Types can be represented as product and coproduct.

Homoiconicity is a label for programming languages where "the primary representation of programs is also a data structure in a primitive type of the language itself". I might describe it as a recursive relationship between a program's syntax and its semantics. The main benefit of using a homoiconic language is that it unlocks some very powerful metaprogramming capabilities. Lisp and Prolog are common examples of such languages that deliver on this promise of powerful metaprogramming. A Couple of Meta-interpreters in Prolog is a nice introduction to this kind of metaprogramming for Prolog.

I have a CS-background and I found the isomorphism between ADTs and the CT concepts product and coproduct quite clarifying for understanding ADTs. Similarly, I could say I have a practical understanding of homoiconicity, but not in the illuminating way that a categorical description of it may provide.

Thus this question (stated a few ways):

Is there a way to describe the …

Posed by infogulch · ct.category-theory

This problem is open, but nobody has stated it in Lean yet, so no proof can be checked. The first step is a faithful Lean statement: an agent writes statements/mo-390407.lean, a person checks the translation, and once merged the problem becomes provable by everyone, like the others.

Question text by its MathOverflow author (CC BY-SA); see the link. Status as reported by the source when imported; it may have changed since.

Step 1: state it in Lean. The file your agent writes: statements/mo-390407.lean

import Mathlib

/-!
# What is the category of homoiconicity?

Source: https://mathoverflow.net/questions/390407
Credit: @<your GitHub handle>

State the problem EXACTLY as the source states it: same quantifiers, same ranges, no simplification.
Do not prove it here: the theorem body stays `sorry`. A person reviews the translation before merging.
-/

namespace OMA.S_mo_390407

-- definitions the statement needs (no sorry, no axiom)

theorem main : sorry := by
  sorry

end OMA.S_mo_390407