Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How is `||c||a|b|` ambiguous, given the knowledge that taking the absolute value is an idempotent function? I get you could read it as `abs(abs(c)).a.abs(b)`, but no one would. To me, it’s unambiguously `abs(abs(c).abs(a).b)`. AFAIK, this also applies to other uses of these symbols and, e.g., norm. (In fact, norm’ing twice doesn’t even make sense because the types clash, to use the programming term.) Also, IIRC, in LaTeX the size of the | symbols can be balanced and autoscaled with \left and \right, like parentheses.


It is ambiguous because, as you point out, it can be read either as `abs(abs(c)).a.abs(b)` or `abs(abs(c).abs(a).b)`.

A mathematician can of course think about it and know what is meant. But there are many alternate notations that could be used, where such ambiguities don't even occur (e.g., balanced parens).

Autoscaling does seem like a nice solution in this case, which preserves the traditional notation while resolving the ambiguity...


It is ambiguous because, as you point out, it can be read either as `abs(abs(c)).a.abs(b)` or `abs(abs(c).abs(a).b)`

Except in this case the ambiguity comes from typography rather than notation. ‖c‖a|b| for example is exactly the same statement with different typography and is a lot less ambiguous. The problem here isn't math notation, but trying to apply that notation using only pure ASCII.


I'm on your side, but single | usually doesn't mean norm, rather absolute value, so it would be fine to do it twice. Though as you said it's contrived.


My point is that abs∘abs=abs and mathematicians will simplify when they can. Double-| is norm and you definitely cannot do that twice, because:

    ‖.‖ : V → ℝ
...where V is a vector space. I guess technically the reals fulfil the definition of a vector space, but I'd imagine that would grate against most people!

I suppose one could read ||c||a|b| as norm(c).a.abs(b), but usually the sets involved and typesetting would distinguish this. (i.e., It's only ambiguous in ASCII!)


I know what you meant and I agree, i just read you as (alao) saying that he single lines could be norm. There are situations where you wouldn’t simplify, like if this expression was the result of some function applications and then in the next step you simplify it.

R can definitely be seen as a vector space, just like R^3 for example, but then you wouldn’t also have absolute valley.

It wouldn’t be ambiguous in ASCII either because c would be defined earlier, you’d know what it is.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: