title: How to use a naming context to find de Bruijn indices of free variables?
body: <p>In "Types and Programming Languages", section 6.1.2 they talk about a <em>naming context</em> used to number free variables in lambda expressions.  Using the example scheme they've provided, both <code>λx.xb</code> and <code>λx.xx</code> will have their de Bruijn representation as <code>λ.00</code> when they're clearly different terms.  How does this work?</p>