## 2014-08-29

### Intervals

The current interval notation has notoriety for clashing with other notations and having weird unmatched brackets (the two cases being mutually exclusive). For instance, $x\in[0,1]$ is ambiguous as to whether $x$ is a fuzzy logic value (being a member of an interval) or a strict boolean value (being a member of a list). That's quite a large ambiguity for this otherwise useful notation. Also, the unacquainted can easily confuse whether a bracket is for an open end or a closed end. I've always managed to remember, but that's no excuse to keep things as they are.

I propose a simple alternative: replace $($ with ${<}|$ and $[$ with ${\leq}|$, and reflect for the right-hand end. So, our fuzzy logic interval would be ${\leq}|0,1|{\geq}$. Intervals of integers can keep the double-dot notation, so ${\leq}|0..1|{\geq}$ represents the same thing as the list $[0,1]$. It's a list because it corresponds to a portion of $\mathbb Z$, which I consider a list (see last post for justification).

That's about it. The best way to approximate this in ASCII is by writing things like “<=|0,1|=>”. It's better to keep the ‘=’ next to the ‘|’, so that one avoids the misparse “(<=|0,1|>) =”. And a note for $\LaTeX$: put the ‘<’-like symbols in curly braces to avoid them spacing as if they were infix operators.