is an operator form that yields x===y when applied to an expression x.


  • SameAs[y][x] yields True if the expression x is identical to y, and yields False otherwise.
  • SameAs[y][x1,x2,] is equivalent to SameQ[x1,x2,,y].
  • SameAs requires exact correspondence between expressions, except that it still considers Real numbers equal if they differ in their last binary digit.
  • SameAs[y][] is equivalent to SameQ[y].


open allclose all

Basic Examples  (3)

Test whether two expressions are identically the same:

Separate a specific element from a list:

Test equivalence of strings:

Scope  (2)

Numbers in different representations are not the same:

Equal nevertheless treats them as equal:

Approximate numbers that differ in their last bit are still considered identical:

Applications  (1)

Create FalseQ, a variant of TrueQ that returns True when an expression is a:


Properties & Relations  (2)

SameQ cannot have an operator form, since a single element is the same as itself:

SameAs can be used as an operator form for SameQ:

SameAs applied to null arguments will always be true:

This is equivalent to SameQ for one argument:

Wolfram Research (2022), SameAs, Wolfram Language function,


Wolfram Research (2022), SameAs, Wolfram Language function,


Wolfram Language. 2022. "SameAs." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2022). SameAs. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2022_sameas, author="Wolfram Research", title="{SameAs}", year="2022", howpublished="\url{}", note=[Accessed: 12-August-2022 ]}


@online{reference.wolfram_2022_sameas, organization={Wolfram Research}, title={SameAs}, year={2022}, url={}, note=[Accessed: 12-August-2022 ]}