Skip to content

Element ​

Generated from the engine's own definition: compute-engine's symbol, which we neither extend nor document by hand.

Test whether a value is an element of a collection. Optional third argument is a boolean expression (condition) for filtered iteration in Sum/Product. Element supports two modes of operation: 1. Set membership: Element(3, [List, 1, 2, 3]) checks if 3 is in the list 2. Type-style membership: Element(x, integer) checks if x has type integer Type-style membership works with: - Mathematical sets: Integers, RealNumbers, ComplexNumbers, etc. - Type names: integer, rational, real, number, positive_integer, etc. - Invalid type names remain unevaluated (e.g., Element(2, "Booleans"))

✓ checked against that system · ! checked, with disagreements (hover a chip)FungrimElementWolfram LanguageElement!
Element(any, any, boolean?) -> booleanTest whether a value is an element of a collection. Optional third argument is a boolean expression (condition) for filtered iteration in Sum/Product. Element supports two modes of operation: 1. Set membership: Element(3, [List, 1, 2, 3]) checks if 3 is in the list 2. Type-style membership: Element(x, integer) checks if x has type integer Type-style membership works with: - Mathematical sets: Integers, RealNumbers, ComplexNumbers, etc. - Type names: integer, rational, real, number, positive_integer, etc. - Invalid type names remain unevaluated (e.g., Element(2, "Booleans"))
Typed signatures
TypePackageApplies
(any, any, boolean?) -> booleancombinatoricsreplaces number-theoryalways
(any, any, boolean?) -> booleancompute-enginealways
(any, any, boolean?) -> booleanfrontendreplaces combinatoricsalways
(any, any, boolean?) -> booleanhypercomplexreplaces structuresalways
(any, any, boolean?) -> booleannumber-theoryreplaces numeralsalways
(any, any, boolean?) -> booleannumeralsreplaces residuesalways
(any, any, boolean?) -> booleanresiduesreplaces hypercomplexalways
(any, any, boolean?) -> booleanstructuresreplaces compute-enginealways

Domain: Compute engine

Examples

Basic #
live ↗
In3∈Z3∈ℤOutTrue\mathrm{True}
live ↗
In12∈Z\frac{1}{2}∈ℤOutFalse\mathrm{False}
live ↗
Inπ∈Rπ∈ℝOutTrue\mathrm{True}
Scope #
live ↗
InRefine(sin⁡(πx),x∈Z)\mathrm{Refine}(\sin(πx), x∈ℤ)Out00
live ↗
InRefine((x+y−2)2,[x,y]∈Disk())\mathrm{Refine}(\sqrt{(x+y-2)^2}, \bigl\lbrack x, y\bigr\rbrack∈\mathrm{Disk}())Out∣x+y−2∣\vert x+y-2\vert
live ↗
InRefine(xy+ln⁡(x+y)∈R,x>0∧y>0)\mathrm{Refine}(x^{y}+\ln(x+y)∈ℝ, x\gt0∧y\gt0)OutTrue\mathrm{True}
live ↗
InRefine([x,y]∈Rectangle([−1,−1],[1,1]),x2+y2≤1)\mathrm{Refine}(\bigl\lbrack x, y\bigr\rbrack∈\mathrm{Rectangle}(\bigl\lbrack-1, -1\bigr\rbrack, \bigl\lbrack1, 1\bigr\rbrack), x^2+y^2≤1)Out[x,y]∈Rectangle([−1,−1],[1,1])\bigl\lbrack x, y\bigr\rbrack∈\mathrm{Rectangle}(\bigl\lbrack-1, -1\bigr\rbrack, \bigl\lbrack1, 1\bigr\rbrack)
About
Examples7
Checked againstWolfram Language 6 agree1 differ
CrosswalkFungrimWolfram LanguageSageMath

Implementation

mappedwolframpackages/oracle/src/mappings.ts

Only a real match for a Wolfram domain symbol as the second operand (Element[7, Primes], kernel-verified True); against a literal list or one of our own collections (a diagram algebra's basis, PolygonalNumbers(k), …) real Element stays unevaluated instead of erroring, so the scan will record those as disagreements rather than a wrong-but-silent answer.

mappedsagepackages/oracle/src/mappings.ts