Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 27, 2025

Problem

The documentation for multiple set types contained mathematically incorrect statements about empty sets:

  1. In IsProperSupersetOf methods:

    An empty set is a proper superset of any other collection.

  2. In IsProperSubsetOf methods:

    An empty set is a proper subset of any other collection.

Both statements violate basic set theory principles.

Solution

Corrected all statements to align with mathematical set theory:

An empty set is a subset of any other collection.

Mathematical Background

In set theory:

  • An empty set (∅) contains no elements
  • A proper superset of set B is a set A that contains all elements of B and has at least one additional element
  • A proper subset of set B is a set A that contains only elements from B and has fewer elements than B
  • Since an empty set has no elements, it cannot be a proper superset or proper subset of any set
  • However, an empty set is a subset of every set, including itself (but not a proper subset of another empty set)

Change Details

Fixed incorrect statements in the following files:

  1. ImmutableSortedSet`1.xml:

    • IsProperSubsetOf remarks (line 627)
    • IsProperSupersetOf remarks (line 682)
  2. HashSet`1.xml:

    • IsProperSubsetOf remarks (line 1597)
    • IsProperSupersetOf remarks (line 1679)
  3. SortedSet`1.xml:

    • IsProperSubsetOf remarks (line 1396)
    • IsProperSupersetOf remarks (line 1465)
  4. ISet`1.xml:

    • IsProperSubsetOf remarks (line 288)
    • IsProperSupersetOf remarks (line 349)

All changes remove the word "proper" from the empty set statements to correctly reflect that an empty set is a subset (not a proper subset or proper superset) of all sets.

Impact

Corrects the mathematical explanations without affecting functionality. The method behavior remains unchanged - the documentation now accurately describes what the methods return.

Fixes #11853

Original prompt

This section details on the original issue you should resolve

<issue_title>Mathematically incorrect statement, probably a typo/copy-paste error</issue_title>
<issue_description>### Type of issue

Typo

Description

The remarks section says

An empty set is a proper superset of any other collection.

It should say

An empty set is a subset of any other collection.

Note, not a proper subset.

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.collections.immutable.immutablesortedset-1.ispropersupersetof?view=net-8.0

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Collections.Immutable/ImmutableSortedSet`1.xml

Document Version Independent Id

6db3f697-2a43-407f-bb31-9b103716008c

Platform Id

b2b81307-57ac-f3a2-40a2-2c61472b04c9

Article author

@dotnet-bot</issue_description>

Comments on the Issue (you are @copilot in this section)

@eiriktsarpalis Sounds about right.
Fixes #11853

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@Copilot Copilot AI changed the title [WIP] Mathematically incorrect statement, probably a typo/copy-paste error Fix mathematically incorrect statement about empty sets in IsProperSupersetOf documentation Sep 27, 2025
@Copilot Copilot AI requested a review from eiriktsarpalis September 27, 2025 10:44
Copilot finished work on behalf of eiriktsarpalis September 27, 2025 10:44
@dotnet-policy-service dotnet-policy-service bot added the needs-author-action An issue or pull request that requires more info or actions from the author. label Oct 2, 2025
@dotnet-policy-service dotnet-policy-service bot removed the needs-author-action An issue or pull request that requires more info or actions from the author. label Oct 2, 2025
@Copilot Copilot AI changed the title Fix mathematically incorrect statement about empty sets in IsProperSupersetOf documentation Fix mathematically incorrect statements about empty sets in set documentation Oct 2, 2025
Copilot finished work on behalf of PranavSenthilnathan October 2, 2025 20:35
@PranavSenthilnathan PranavSenthilnathan marked this pull request as ready for review October 3, 2025 22:33
@PranavSenthilnathan PranavSenthilnathan requested a review from a team as a code owner October 3, 2025 22:33
@Copilot Copilot AI review requested due to automatic review settings October 3, 2025 22:33
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR corrects mathematically incorrect statements about empty sets in the documentation for various set types' IsProperSubsetOf and IsProperSupersetOf methods. The documentation previously claimed that an empty set is a "proper subset" and "proper superset" of any other collection, which violates set theory principles.

  • Removes the word "proper" from statements about empty sets in documentation
  • Corrects statements to reflect that an empty set is simply a subset of any other collection
  • Maintains consistency across all affected set type documentation

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
xml/System.Collections.Immutable/ImmutableSortedSet`1.xml Fixed empty set statements in IsProperSubsetOf and IsProperSupersetOf documentation
xml/System.Collections.Generic/SortedSet`1.xml Fixed empty set statements in IsProperSubsetOf and IsProperSupersetOf documentation
xml/System.Collections.Generic/ISet`1.xml Fixed empty set statements in IsProperSubsetOf and IsProperSupersetOf documentation
xml/System.Collections.Generic/HashSet`1.xml Fixed empty set statements in IsProperSubsetOf and IsProperSupersetOf documentation

@gewarren gewarren merged commit 0b3ac94 into main Oct 6, 2025
8 checks passed
@gewarren gewarren deleted the copilot/fix-3e334f7d-b35e-46cb-91a1-618a510b0f04 branch October 6, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mathematically incorrect statement, probably a typo/copy-paste error
4 participants