breandan
06/23/2020, 9:31 AMFun<X>: Field<X>
where X
is a member of some algebra over the reals equipped with the usual operators (when you apply an operator, it is evaluated and you get X
back). Another way is (2) to treat the function as a member of a field whose elements are themselves functions, e.g. Fun<X>: Field<Fun<X>>
, and instead of returning X
, applying an operator instead returns Fun<X>
which can be later evaluated by calling invoke(...)
, returning X
(so X
and Fun<X>
are both fields).
It turns out the second representation comes from finite field theory, which has important implications for expression parsing and language design. It would be useful to understand this connection more deeply.altavir
06/23/2020, 11:59 AMadv-exp
branch of kmath: https://github.com/mipt-npm/kmath/tree/adv-expr/kmath-ast