Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Vienna Development Method
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Sets ==== The set type constructor (written <code>set of T</code> where <code>T</code> is a predefined type) constructs the type composed of all finite sets of values drawn from the type <code>T</code>. For example, the type definition <syntaxhighlight lang="rsl"> UGroup = set of UserId </syntaxhighlight> defines a type <code>UGroup</code> composed of all finite sets of <code>UserId</code> values. Various operators are defined on sets for constructing their union, intersections, determining proper and non-strict subset relationships etc. {| border="1" class="wikitable" |+ style="background:#ffdead;" |Main operators on sets (s, s1, s2 are sets) |- | <code>{a, b, c}</code> || Set enumeration: the set of elements <code>a</code>, <code>b</code> and <code>c</code> |- | <code><nowiki>{x | x:T & P(x)}</nowiki></code> || Set comprehension: the set of <code>x</code> from type <code>T</code> such that <code>P(x)</code> |- | <code>{i, ..., j}</code> || The set of integers in the range <code>i</code> to <code>j</code> |- | <code>e in set s</code> || <code>e</code> is an element of set <code>s</code> |- | <code>e not in set s</code> || <code>e</code> is not an element of set <code>s</code> |- | <code>s1 union s2</code> || Union of sets <code>s1</code> and <code>s2</code> |- | <code>s1 inter s2</code> || Intersection of sets <code>s1</code> and <code>s2</code> |- | <code>s1 \ s2</code> || Set difference of sets <code>s1</code> and <code>s2</code> |- | <code>dunion s</code> || Distributed union of set of sets <code>s</code> |- | <code>s1 psubset s2</code> || s1 is a (proper) subset of <code>s2</code> |- | <code>s1 subset s2</code> || s1 is a (weak) subset of <code>s2</code> |- | <code>card s</code> || The cardinality of set <code>s</code> |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)