Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

N.B. I have bitten the bullet, and I am going through Leonid Shifrin's "Mathematica Programming: An Advanced Introduction." (Which needs no introduction in this forum)

One question I have: could one establish that a symbol has a built-in rules, based on DownValues or related functions?

For example:

Sin[x_Integer] := Sin[N[x]]

(* 0.841471 *)
(* HoldPattern[Sin[x_Integer]] :> Sin[N[x]] *)

Hey, where are the built-in rules for Sin?

share|improve this question
Built-in rules for system functions may indeed have DownValues, SubValues etc, but they are not seen and not accessible from the top level. You may indirectly interact with them (and possibly change their behavior) using Block, and you can also see them in action sometimes when tracing evaluation with TraceInternal -> True, but this seems to be as much as one can say about them from the top-level. Some functions also do have some number of top-level rules - those usually have the ReadProtected attribute set. You can see those rules if you remove the attribute. – Leonid Shifrin Jul 7 '13 at 16:42
@Leonid So the fact that no DownValues (or other definitions) are visible does not necessarily mean that the function is not fully implemented in Mathematica then? I was never sure about this point. (Not that it makes much practical difference for me.) – Szabolcs Jul 8 '13 at 8:16
@Szabolcs I believe this is true. In general, built-in functions may have both lower-level (inaccessible) and top-level definitions. – Leonid Shifrin Jul 8 '13 at 13:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.