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

*From*: Hillel Wayne <hwayne@xxxxxxxxx>*Date*: Fri, 16 Apr 2021 14:10:54 -0500*Ironport-hdrordr*: A9a23:hDIS7Kyhqf5uvbqUlV0UKrPx2egkLtp033Aq2lEZdDV8Sebdv9yynfgdyB//gCsQXnZlotybJKycWxrnme8P3aA4Bp3neAX9omOnIMVZ7YXkyyD9ACGWzIMtrZtIW5NVTOf9BV0St6yKmTWQOdAm3dWB7eSMjeDR039iQWhRGupdxi1+DRuWFVAzeRleCfMCZdKhz+dkhx7lQ3QYacynGmIINtKtyeHjuZr6bXc9dmoawSaUizfA0s+JLzG52VMkXypL0fMe9wH+4kXEz4Ciqez+4gTX1m/N4/1t6Z/c4/5CHtHJq8QRM1zX+0OVTaFgQaDHnB1dmpDv1H8OkMPQ5y4nJdkb0QKSQkiRoQHxnzXmyiok8XX4yVSV6EGT5vDRYBIfJ45/iZlCch3fgnBQyu1U9KpK2mKfud5TDQnc9R6NqeTgcx1xjEK7rT4DvIco/glieLIEZLVcoIAZ9k89KuZOIAvA5IoqEPZjAajnjZ48ADTqFQGkzxdS6eehVHgyARuKBnI6laWuokVrtUt0wEcCyMsUkm1ozuNPd7B+6/3AIuBUkth1P4MrRJhwA+oMWqKMalDlew7GM26ZPD3cZdA6Ek/KwqSHkIkd2PunY9ghwpc0hf36ISRlnF93UE7jDvCO0IZGmyq9JFmVbHDCzoV764JisrPxAID3OTCOIWpe8PeIkrEwBMvUXvr2FbB3J7vYLWXoEZtUxAGWYfhvAEhbfssStNM2H3yUpN7Tbq3m39arM8r7Ff7CFzArX2+6OH8fRXzIItla5EzDYA6bvDHhH1X3ekL++pp0VIDH4ukez5UMPIVQsg4TzW+0/N2PNCcqiN16QGJOZJX9kq26omGyuVzF6GhkIXNmfwxoyYSlaH9BqQ8UP06cS8dnyrPvBlx67T+8Pxd6C+nWHARcq1ky2aXyAYeX2TlKMaPmDl6n*References*: <22f7c06f-1774-4baf-98d6-32bdc244e0c7n@googlegroups.com>*User-agent*: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1

Hi Steve,

`\A` is "for all", so it will choose a value from S that
is ≥ all values. If you use `\E` instead, then it will
pick a value that is ≥ at least one value. Note that this includes
the value itself, so `\E y \in S: y <= x` is trivially
true for all values in the set.

H

On 4/16/2021 1:59 PM, Steve Ravet wrote:

I'm going through the examples at learntla.com and one asks to write an operator that finds the maximum value in a set. I did it using the SetReduce operator from somewhere else in the tutorial, but the given answer is simpler:--

Max(S) == CHOOSE x \in S : \A y \in S : y <= x

I can't quite "read" this. Since CHOOSE picks any value from the set where the condition is true, it seems like this would return a value from S that is larger than at least one other value, not larger than all other values. What makes it keep going to find the largest value?--

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/22f7c06f-1774-4baf-98d6-32bdc244e0c7n%40googlegroups.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/56840f7c-90b1-8005-f703-98f7b9911418%40gmail.com.

**References**:**[tlaplus] How does this simple Max(set) implementation work?***From:*Steve Ravet

- Prev by Date:
**[tlaplus] How does this simple Max(set) implementation work?** - Next by Date:
**[tlaplus] TLA project** - Previous by thread:
**[tlaplus] How does this simple Max(set) implementation work?** - Next by thread:
**[tlaplus] TLA project** - Index(es):