## Terms

Terms occur on the object level; specifically as components of declarations, most notably as types and definitions of constants. They represent syntax trees with binding, e.g. first-order terms and formulas, types, lambda expressions etc.

Terms are defined recursively:

• Symbol references are terms (OMID)
• Variable references are terms (OMV)
• Applications of a term to a list of arguments (terms) are terms (OMA)
• Binding applications of a term - binding (optionally typed) variables - to a list of arguments are terms (OMBIND)
• Literals are atomic terms (OMLIT) that embed arbitrary external values (e.g., the set of integers)

The precise abstract syntax is explained in more detail here.

In the MMT language, terms are given by using symbol/variable names and the notations of the symbols in the current context (previous declarations in the containing module). Binders extend the current context for their arguments by the variables they bind.

#### Examples

• The expression `a + (b ⋅ c)` would be an application (OMA) of a symbol `+` (OMS) to a symbol `a` (OMS) and (an application (OMA) of a symbol `⋅` (OMS) to a symbol `b` (OMS) and a symbol `c` (OMS)). We can write this as:

`OMA(OMS(+),OMS(a),OMA(⋅,OMS(b),OMA(c)))`

The symbols `+,⋅,a,b,c` have to be in context, of course.

• The expression `λx:t. x+a` would be a binding application (OMBIND) binding a variable `x` of type `t` to (an application of …). We can write this as:

`OMBIND({x:t},OMA(+,OMV(x),OMS(a)))`

The binder `λ` extends the inner context of the argument by the variable `x`, guaranteeing that `x+a` is a well-formed term.
{"ft_lang_label":"__label__en","ft_lang_prob":0.83220416,"math_prob":0.93744814,"size":1191,"snap":"2021-21-2021-25","text_gpt3_token_len":322,"char_repetition_ratio":0.12384162,"word_repetition_ratio":0.020942409,"special_character_ratio":0.24433249,"punctuation_ratio":0.14457831,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9867717,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-06-12T18:19:25Z\",\"WARC-Record-ID\":\"<urn:uuid:ea1ba358-e3f5-43ad-a3f3-226397a309d6>\",\"Content-Length\":\"11150\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:30ebc51f-3394-4b8d-953a-e565fc204e2c>\",\"WARC-Concurrent-To\":\"<urn:uuid:7dc25c8e-f4bb-4b50-ad7e-8e6280388d11>\",\"WARC-IP-Address\":\"185.199.108.153\",\"WARC-Target-URI\":\"https://uniformal.github.io/doc/language/objects.html\",\"WARC-Payload-Digest\":\"sha1:GBVNAXUFJVMM6PKMTKIHDTTKG7PIE4RN\",\"WARC-Block-Digest\":\"sha1:BMEZCUIRDTRZ7Y4OJAPLELRIJJEFT5V3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-25/CC-MAIN-2021-25_segments_1623487586239.2_warc_CC-MAIN-20210612162957-20210612192957-00040.warc.gz\"}"}