# Why is my variable Lambda defined but not the others?

I would like to understand why in the following code, my variable Λ is recognized by the system but not n.

In fact for me Λ shouldn't be recognized as it is defined in a function.

• What does Context["n"] return? – Carl Woll Jun 6 '17 at 16:01
• Or, what does Block[{$ContextPath = {"System"},$Context = "System"}, RawBoxes@ToBoxes@DownValues[qDef]] return? – Carl Woll Jun 6 '17 at 16:20
• Works as expected on my Mac with v11.1.1 Try starting with a fresh kernel. – Bob Hanlon Jun 6 '17 at 17:01
• maybe the first two lines not shown are something like localn ; $ContextPath = Prepend[$ContextPath, "local"] . – george2079 Jun 6 '17 at 18:09
• Posting actual code is better than posting a picture of code. – Daniel Lichtblau Jun 6 '17 at 22:44

• I would like to understand why in the following code, my variable "Lambda" is recognized by the system but not "n".

Not quite correct, you just showed n isn't in Global context. When could it happen? That is, when could n not be in Global and still be displayed as n?

Whenever n is on $ContextPath or $Context. Those values affect typesetting, see:

FullForm with context for each symbol?

and check:

PacletManagerfoo;    (*PacletManaget is loaded on startup so it is on $ContextPath*) foo = 1; Context @ foo  "PacletManager"  You need to read: How symbol lookup actually works • in fact for me Lambda shouldn't be recognized as it is defined in a function. It is not defined, it is mentioned, symbols are created just by parsing input. Quite often common names like n, x, i, k, foo, bar will exists in $ContextPath` but that won't prevent them from being scoped in different functions as it is a task for scoping constructs, your function takes care of that.

tutorial / VariablesInPureFunctionsAndRules

What are the use cases for different scoping constructs?