Referential transparency: Difference between revisions

Content deleted Content added
Line 40:
A ''position'' is defined by a sequence of natural numbers. The empty sequence is denoted by ε and the sequence constructor by ‘.’.
 
''Example.'' — Position 2.1 in the expression {{math|(+ (*&lowast; ''e''<sub>1</sub> ''e''<sub>1</sub>) (*&lowast; ''e''<sub>2</sub> ''e''<sub>2</sub>))}} is the place occupied by the first occurrence of {{math|{{var|e}}<sub>2</sub>}}.
 
Expression {{mvar|e}} ''with'' expression {{mvar|e′}} ''inserted at'' position {{mvar|p}} is denoted by {{math|''e''[''e′''/''p'']}} and defined by
Line 46:
: {{math|''e''[''e′''/''i''.''p''] ≡ <Ω ''e''<sub>1</sub> … ''e''<sub>''i''</sub>[''e′''/''p''] … ''e''<sub>''n''</sub>>}} if {{math|''e'' ≡ <Ω ''e''<sub>1</sub> … ''e''<sub>''i''</sub> … ''e''<sub>''n''</sub>>}} else undefined, for all operators {{math|Ω}} and expressions {{math|{{var|e}}<sub>1</sub>, …, {{var|e}}<sub>{{var|n}}</sub>}}.
 
''Example.'' — If {{math|''e'' ≡ (+ (*&lowast; ''e''<sub>1</sub> ''e''<sub>1</sub>) (*&lowast; ''e''<sub>2</sub> ''e''<sub>2</sub>))}} then {{math|''e''[''e''<sub>3</sub>/2.1] ≡ (+ (*&lowast; ''e''<sub>1</sub> ''e''<sub>1</sub>) (*&lowast; ''e''<sub>3</sub> ''e''<sub>2</sub>))}}.
 
Position {{mvar|p}} is ''purely referential'' in expression {{mvar|e}} is defined by