Short answer to the first question: Yes.
Short to the second question: IDK.
Let's assume the reader understands the tech note Evaluation of Expressions. If so, one understands that the evaluation of an expression is done by applying a replacement rule, pattern :>
value. After replacement, value is evaluated in the same way. What SetDelayed[
pattern,
value]
does is create a replacement rule, called a down-value, in which the expression value is stored in its literal (or unevaluated or uncompiled) form. For the simple example below note that 2^3
is stored as 2^3
, not as 8
.
func[x_] := 2^3; (* same as SetDelayed[func[x_], 2^3] *)
DownValues[func]
(* {HoldPattern[func[x_]] :> 2^3} *)
The full definition of func
consists of several lists of replacement rules. For this simple example, most of the lists are empty, and there is only one down-value. One can look up the other kinds of values in the documentation.
Language`ExtendedFullDefinition[func]
(*
Language`DefinitionList[HoldForm[func] -> {
OwnValues -> {},
SubValues -> {},
UpValues -> {},
DownValues -> {HoldPattern[func[x_]] :> 2^3},
NValues -> {},
FormatValues -> {},
DefaultValues -> {},
Messages -> {},
Attributes -> {}}]
*)