question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`\subseteq` instead of `\in SUBSET`

See original GitHub issue

As far as I am aware, the expressions A \in SUBSET B and A \subseteq B are equivalent. I find the second one more appealing. However, TLC does not allow the second form in action predicates. In some of my specifications I would like to write

Next ==
    data' \subseteq data

instead of the slightly-more-awkward

Next ==
    data' \in SUBSET data

It might also be reasonable to allow \subseteq in quantifiers as well, as in

\E x \subseteq {1,2,3}: x = {1}

(which is currently not allowed).

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lemmycommented, Jan 16, 2020

Related scenario:

Validating an inductive invariant candidate IInv with TLC, when the TypeOK conjunct of IInv has as s1 \subseteq s2, TypeOK has to be rewritten to s1 \in SUBSET s2.

Context: https://lamport.azurewebsites.net/tla/proving-safety.pdf (page 9ff)

0reactions
lemmycommented, Aug 18, 2020

A common idiom is to check if some set s is a k-subset for k \in 1..Cardinality(S) of some other set S (but not the empty set): s \in (SUBSET S \ {{}})

Read more comments on GitHub >

github_iconTop Results From Across the Web

subset$ vs $\subseteq$ when *not* referring to strict inclusion
I always thought that the standard was to read ⊂ as "is a strict subset of", and ⊆ could mean proper or improper...
Read more >
What is the difference between [math]\subset[/math ... - Quora
To say that a set is a subset of a set is to say that every element of is an element of ....
Read more >
Subset - Wikipedia
In mathematics, set A is a subset of a set B if all elements of A are also elements of B; B is...
Read more >
How to denote subset(⊂,⊆, and ⊈) in LaTeX? - Physicsread
Mathematically, you need to use the ⊆ symbol to represent the subset. Properties, Value. Symbol, Subset. Argument, No. Command, \subseteq. Example ...
Read more >
Dave Richeson on Twitter: "Do \subset (⊂) and \subseteq ...
Do \subset (⊂) and \subseteq (⊆) mean the same thing? (Or is ≤ : < :: ⊆ : ⊂?) ... For me, I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found