Description
Deduplicate subset and return its elements absent from superset as counterexamples.
A set contains distinct values, so duplicate input items do not contribute additional members. Ordered output is a serialization convention; membership, equality, and the chosen universe determine the underlying set result.
Deduplicate subset and return its elements absent from superset as counterexamples.
When to use this tool
Use Set Inclusion Counterexample when you need a deterministic operation on explicitly supplied sets or a finite membership representation.
How to use the tool and how it works
- Enter subset, superset. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read included, counterexamples. Inspect included before interpreting the associated values.
Deduplicate subset and return its elements absent from superset as counterexamples. Included is true only when that list is empty.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| subset | Subset | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| superset | Superset | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| included | Included | Required. Boolean. |
| counterexamples | Counterexamples | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
{
"input": {
"subset": [
"a",
"b",
"b"
],
"superset": [
"a",
"c"
]
},
"output": {
"included": false,
"counterexamples": [
"b"
]
}
} Limitations and assumptions
- Exact equality and first-occurrence order are used; an empty subset is included and no ordering relation beyond membership is inferred.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Specify the universe and equality convention before combining this result with other set operations.
References
Similar or alternative tools
- Set Membership Four Way Label
Map the two Boolean membership flags to intersection, first-only, second-only, or neither.
- Set Single Element Insertion Flag
Deduplicate elements in first-occurrence order and append element only when absent.