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

*From*: Hillel Wayne <hwayne@xxxxxxxxx>*Date*: Fri, 26 Apr 2024 11:19:28 -0500*References*: <07aaecb6-6368-4ffb-b7ca-5579d656a625n@googlegroups.com> <882fb42f-40d7-4ad4-980e-a23a55261fddn@googlegroups.com> <28c9fe31-7a26-428f-af36-4d30c2a618aen@googlegroups.com> <F38F1FE8-B042-445F-875E-99033895FDF2@lemmster.de> <f2c82e65-92e1-4c06-b61a-dfd78d19a017n@googlegroups.com> <716A2450-2F69-4E48-98ED-699794A62A69@gmail.com> <B9A5CC33-3D90-4BDD-9D26-7A489F3AFD88@gmail.com> <a6bc077f-a4d6-40f5-8a58-ca11b669f351n@googlegroups.com> <643a2fac-55a1-4f01-b200-61e9bfff5849n@googlegroups.com> <a98df958-c39e-4597-bcab-f08e8b5040e9n@googlegroups.com> <CAOC8YXY6-tQsRZQ+nTjwf9hhTZkqVzsgC+Pvu7E_6iwdfBit5w@mail.gmail.com>*User-agent*: Mozilla Thunderbird

You *can* define `S^#`, though!

`S^# == Cardinality(S)`

H

On 4/26/2024 9:35 AM, Felipe Oliveira
Carvalho wrote:

--That's not currently possible because the TLA+ doesn't support user-defined syntax constructs this advanced. -- Felipe On Fri, Apr 26, 2024 at 8:54 AM marta zhango <martazhango@xxxxxxxxx> wrote:How can I declare or define a symbol to mean Cardinality such as |S| Something like this maybe, to say that |S| means or in equivalent to Cardinality(S) |S| == Cardinality (S) Does one also use the keyword LET or something else ? On Friday, April 26, 2024 at 11:17:46 PM UTC+12 Lee wrote:Hi Marta, If you want to know more about Cardinality please see this page by Hillel Wayne (https://learntla.com/core/operators.html?highlight=cardinality) . Since you said you're new, I can also recommend reading his entire tutorial page and blog posts in addition to his book (https://www.amazon.se/-/en/Hillel-Wayne/dp/1484238281). Other resources when you're done working these are: - Specifying Systems by Leslie Lamport (which is only TLA+) - http://lamport.azurewebsites.net/tla/learning.html - great way to get into how to think about this Regards Lee On Friday, April 26, 2024 at 10:11:55 AM UTC+2 marta zhango wrote:That is what I needed to see as I am new to all this, with no idea where to start. On Friday, April 26, 2024 at 4:39:07 PM UTC+12 Stephan Merz wrote:P.S.: Proofs of these theorems checked by TLAPS are given in https://github.com/tlaplus/tlapm/blob/main/library/FiniteSetTheorems_proofs.tla. On 26 Apr 2024, at 06:37, Stephan Merz <Stepha...@xxxxxxxxx> wrote: As Markus pointed out, cardinality of finite sets is defined in a standard module of TLA+. A collection of lemmas about finite sets and cardinality, useful for actually reasoning about these notions, is available at https://github.com/tlaplus/tlapm/blob/main/library/FiniteSetTheorems.tla (included in the distribution of TLAPS). Stephan On 26 Apr 2024, at 02:22, marta zhango <marta...@xxxxxxxxx> wrote: Is the line IN CS[S] part of the definition of cardinality ? On Friday, April 26, 2024 at 11:55:57 AM UTC+12 Markus Kuppe wrote:https://github.com/tlaplus/tlaplus/blob/03c7bf4f35ccf1217ac2c53e5bf60d1220c8b0d8/tlatools/org.lamport.tlatools/src/tla2sany/StandardModules/FiniteSets.tla#L21-L27On Apr 25, 2024, at 4:53 PM, marta zhango <marta...@xxxxxxxxx> wrote: Have thought something like this too Cardinality(set) == (+ e \in DOMAIN set: IF set[e] THEN 1 ELSE 0) On Friday, April 26, 2024 at 9:17:00 AM UTC+12 marta zhango wrote: Like this for instance ? Cardinality (S) = |S| == Count ( e \in S ) On Friday, April 26, 2024 at 8:36:13 AM UTC+12 marta zhango wrote: How can I define the cardinality of a set as the number of elements in a set S using the notation |S| using TLA.-- 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+u...@xxxxxxxxxxxxxxxx. To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/f2c82e65-92e1-4c06-b61a-dfd78d19a017n%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/a98df958-c39e-4597-bcab-f08e8b5040e9n%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/b21bc099-691e-4c97-92da-f3c6d8f0fd7d%40gmail.com.

**Follow-Ups**:**Re: [tlaplus] Defining Cardinality with TLA***From:*marta zhango

**References**:**[tlaplus] Defining Cardinality with TLA***From:*marta zhango

**[tlaplus] Re: Defining Cardinality with TLA***From:*marta zhango

**[tlaplus] Re: Defining Cardinality with TLA***From:*marta zhango

**Re: [tlaplus] Defining Cardinality with TLA***From:*Markus Kuppe

**Re: [tlaplus] Defining Cardinality with TLA***From:*marta zhango

**Re: [tlaplus] Defining Cardinality with TLA***From:*Stephan Merz

**Re: [tlaplus] Defining Cardinality with TLA***From:*Stephan Merz

**Re: [tlaplus] Defining Cardinality with TLA***From:*marta zhango

**Re: [tlaplus] Defining Cardinality with TLA***From:*Lee

**Re: [tlaplus] Defining Cardinality with TLA***From:*marta zhango

**Re: [tlaplus] Defining Cardinality with TLA***From:*Felipe Oliveira Carvalho

- Prev by Date:
**Re: [tlaplus] Defining Cardinality with TLA** - Next by Date:
**Re: [tlaplus] Developing a TLA+ Model for the KafkaRoller in the Strimzi Project** - Previous by thread:
**Re: [tlaplus] Defining Cardinality with TLA** - Next by thread:
**Re: [tlaplus] Defining Cardinality with TLA** - Index(es):