Basics, Part 2: Expressions and canonical form

What's an expression?

A section of text in a Lurch document can be marked as an expression. Lurch pays attention to the content of expressions, trying to interpret them as meaningful mathematics (perhaps an algebraic equation, or a statement from logic or analysis, or perhaps the name of a theorem being cited, for example).

Inserting expressions

You can create expressions in your document in any of the following ways.

Canonical form

A few quick foundational definitions:

  1. An atomic expression is one with no other expressions inside it.
  2. A compound expression is one with at least one expression inside it.
  3. Content not inside an atomic expression is informally called flarf, to signify its lack of importance:
  4. The cannoical form of an expression is obtained by deleting all flarf.

Here are some examples of these definitions.

Example atomic expression: Hello. (Click to place your cursor inside it to see the bubble UI appear around it. Bubbles are shown to highlight expressions only when your cursor is inside them.)

Example compound expression: an inner expression another inner expression (Try placing your cursor at various spots within the inner and outer expressions.)

This text is flarf. So is this text, but this is not flarf.

The canonical form of the expression in the previous paragraph is therefore but this is not flarf.