[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlaplus] Function composition operator



There is no standard operator for this but as you indicate, you can easily define it yourself

Comp(f,g) == [ x \in DOMAIN g |-> f[g[x]] ]

If you feel that it is worthwhile, feel free to open a pull request for the community modules (specifically, the Functions module).

Stephan

On 5 Mar 2023, at 02:18, Aman Shaikh <amanshaikh75@xxxxxxxxx> wrote:

Hi

Does TLA+ define a function composition operator? I.e., given two functions f and g, can I declare something along those lines:

h == f \function_composition_operator g?

Thus,

h[x] = f[g[x]] for every x \in the domain of 'g'.

Naturally, the range of function 'g' has to be a subset of the domain of 'f' for this to make sense.

thx
aman

--
You received this message because you are subscribed to the Google Groups "tlaplus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+unsubscribe@xxxxxxxxxxxxxxxx.
To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/CA%2B13N%3DvhzmTHfRxJ4ncsiwqXcNcCYbaSX2fPfUEbX1%2Bt%3DsH4Ew%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "tlaplus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+unsubscribe@xxxxxxxxxxxxxxxx.
To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/6A9A13A0-6927-40E6-80D4-9C1131A29181%40gmail.com.