> For the complete documentation index, see [llms.txt](https://mandober.gitbook.io/math-debrief/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mandober.gitbook.io/math-debrief/340-lambda-calculi/lambda-calculus-encodings/mogensen-scott-encoding.md).

# Mogensen-Scott encoding

<https://en.wikipedia.org/wiki/Mogensen-Scott\\_encoding>

*Scott encoding* is a way to represent recursive data types in the LC. In an encoding, the data and operators form a mathematical structure which is embedded in the LC.

Whereas *Church encoding* starts with representations of the basic data types, and builds up from it, Scott encoding starts from the simplest method to compose algebraic data types (ADT).

*Mogensen-Scott encoding* extends and slightly modifies Scott encoding by applying the encoding to meta-programming. This encoding allows the representation of LC terms, as data, to be operated on by a meta program.
