Thread-able expression

From AEGWiki
Revision as of 07:09, 24 January 2022 by Mingli (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A thread-able expression is an arithmetic expression which can be evaluated in order as a thread or a list. It can be defined recursively and demonstrated very intuitively by a visual representation.

Visual representation

For example, below expression can be visualised as a binary tree

[math]\displaystyle{ (1 \times 2 \times 2 - 1) \times (2 + 1) - 6 }[/math]

Non-thread-able expression.png

It has a left branch which depth is greater than 1, so its shape dose not like a thread, and it is not a thread-able expression. While all the left branch of the other example is equals to 1, and the shape is just like a thread, we call it a thread-able expression.

[math]\displaystyle{ (1 \times 2 \times 2 - 1) \times 2 - 3 }[/math]

A thread-able expression.png

Formal definition

Relation with arithmetic expression space

Relation with analysis