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

Re: [tlaplus] CHOOSEing a function with a unique range for each element of the domain.

That worked...thanks!
On Monday, February 21, 2022 at 11:22:07 PM UTC-5 Markus Alexander Kuppe wrote:


> On Feb 21, 2022, at 7:35 PM, thomas...@xxxxxxxxx <thomas...@xxxxxxxxx> wrote:
> Hi All,
> I would like to have a function that has a unique range for each element in the domain (e.g. like an ideal hash function).
> I was trying to CHOOSE my way into a function:
> BitString == [1..4 -> {0,1}]
> hash == CHOOSE i \in [0..3 -> BitString] : \A x, y \in 0..3: x /=y /\ i[x] /= i[y]
> But when I try running hash[2] in the evaluator, I get this error:
> Attempted to compute the value of an _expression_ of form
> CHOOSE x \in S: P, but no element of S satisfied P.
> Anyone have an idea of how I can get my desired effect?

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/546c80e8-8f1c-4e42-9019-85d7131f2bffn%40googlegroups.com.