A subset B is a statement, sets are equal by double containment, and powerset(A) is a set - #1432
Merged
Merged
Conversation
…powerset(A) is a set Item 4 of the reference's docket (#1409, Sullivan and Mackey §§3.3-3.5), the statements and constructions on sets. `A subset B` -- also `A ⊆ B`, and `B superset A` / `B ⊇ A` for the same node -- is Entity.Set.Subsetf, the relation between sets that `in` is between an element and a set, decided from the shapes of the two sets: member by member for a listed set, along ZZ+ ⊂ ZZ* ⊂ ZZ ⊂ QQ ⊂ RR ⊂ CC for the special sets, by the ends for two intervals, by the set algebra for symbols standing for sets (A /\ B subset A, A subset A \/ B, A \ B subset A), and through the quantifier decision -- forall x in A : x in B, with the membership spelled as the comparison it is where B is an interval, an integer set inside the one x ranges over, a listed set of numbers, or a set builder over one of those -- for a set builder; a builder whose predicate the solver settles to a list is that list. NaN with a number or a truth value on a side. Two sets are equal exactly when each is a subset of the other, and that is how = between sets is decided now: { x in ZZ : x >= 1 } = ZZ+ is True. powerset(A), Entity.Set.Powersetf, is the set of all subsets: listed for a finite A -- FiniteSet.GetPowerSet crashed on the empty set, whose one subset is itself -- and for an infinite one an object whose membership is the subset test, {1, 3, 7} in powerset(ZZ+). card counts it as 2^card(A), and counts a listed set whose members are listed sets. The reference's rows are the tests (SubsetTest): §3.4.1's six subset claims, §3.4.5's eleven statements about one set, the power sets of Ex 3.4.3-4 and Try 1-2, §3.3.3's equalities, Lemma 3.9.2's shape. #1409 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
This was referenced Sep 21, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Item 4 of the docket on #1409 (Sullivan and Mackey §§3.3–3.5), the first half: the statements and constructions on sets that the chapter's exercises are written in. Its rows are the tests.
A subset B— alsoA ⊆ B, andB superset A/B ⊇ Afor the same node — isEntity.Set.Subsetf, aStatementat the level ofin: the relation between two sets thatinis between an element and a set, and the book's first point about the two ({1, 2} subset {1, 2, 3}isTrue,{1, 2} in {1, 2, 3}isFalse). Decided inSetOperators.Subset, in order:A subset A,{} subset AA /\ B subset A,A subset A \/ B,A \ B subset A,A \/ B subset Ciff both,powerset(A) subset powerset(B)iffA subset B{ x in RR : x^2 = 5 } subset ZZ→False{sqrt(3), -pi, 8.2} subset QQ→FalseZZ+ ⊂ ZZ* ⊂ ZZ ⊂ QQ ⊂ RR ⊂ CC,BBbeside itQQ subset ZZ→False(0; 1) subset [0; 1],[0; 1] subset QQ→False,[3; 3] subset ZZsub \ superwhere the operators evaluate itforall x in A : x in B, put to the quantifier decision (#1421) with the membership spelled as the comparison it is — an interval's two bounds, a listed set's equalities, an integer set inside the onexranges over (x in ZZ+overZZisx >= 1), a set builder's declared membership and predicate{ x in ZZ : x >= 1 } subset ZZ+→True,ZZ+ subset { x in ZZ : x >= 1 }→TrueNaNwith a number or a truth value on a side.=between two sets is decided by double containment, the book's definition:{ x in ZZ : x >= 1 } = ZZ+isTrue,[0; 1] = [0; 2]isFalse. Two things this corrects on the way:{1, 2} = {1, 2, 3}was{ True, False }and{1, x} = {1, 2}was{ True, False, x = 1, x = 2 }— the comparison distributed over the members of each side — and areFalseand the statement left as written.powerset(A),Entity.Set.Powersetf: listed for a finite argument (FiniteSet.GetPowerSetcrashed on the empty set with anIndexOutOfRangeException;powerset({})is{ {} }, one member), and for an infinite one an object whose membership is the subset test:{1, 3, 7} in powerset(ZZ+)isTrue,ZZ+ in powerset(ZZ)isTrue.card(powerset(A))is2^card(A), andcardcounts a listed set whose members are listed sets (card({1, {}})is2, §3.3.7).MathS.Sets.Subset,MathS.Sets.PowerSet,Entity.SubsetOf,Entity.PowerSet;subset,superset,powersetare keywords now. Syntax.md, BREAKING-CHANGES.md (rows measured on a v2.5.0 build), PublicApi.txt regenerated, parser regenerated and post-processed.SubsetTest: §3.4.1's six claims, the chain, intervals, the algebra on symbols, §3.4.5 Try 3's eleven statements about one set (with two distinct numbers for the book'sxand♥, since a symbolxmight be4), Ex 3.4.3–4 and Try 1–2's power sets, §3.3.3's equalities. Full suite 12110 passed, 0 failed; benchmark gate PASSED (SimplifyHard 173,260,088 B, +1.0% on the recorded baseline: the set-equality decision is on the evaluation path, and two distinct sets compared by=now go through the subset decision both ways).Not in this PR, next: complement relative to a universe, indexed unions and intersections, tuples and Cartesian products (the second half of item 4), then relations (item 5).
Part of #1409.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura