Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Referential transparency
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Referential transparency === 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|(+ (∗ ''e''<sub>1</sub> ''e''<sub>1</sub>) (∗ ''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 : {{math|''e''[''e′''/ε] ≡ ''e′''}} : {{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'' ≡ (+ (∗ ''e''<sub>1</sub> ''e''<sub>1</sub>) (∗ ''e''<sub>2</sub> ''e''<sub>2</sub>))}} then {{math|''e''[''e''<sub>3</sub>/2.1] ≡ (+ (∗ ''e''<sub>1</sub> ''e''<sub>1</sub>) (∗ ''e''<sub>3</sub> ''e''<sub>2</sub>))}}. Position {{mvar|p}} is ''purely referential'' in expression {{mvar|e}} is defined by : {{math|1=''e''<sub>1</sub> = ''e''<sub>2</sub>}} implies {{math|1=''e''[''e''<sub>1</sub>/''p''] = ''e''[''e''<sub>2</sub>/''p'']}}, for all expressions {{math|{{var|e}}<sub>1</sub>, {{var|e}}<sub>2</sub>}}. In other words, a position is purely referential in an expression if and only if it is subject to the substitutivity of equals. {{mvar|ε}} is purely referential in all expressions. Operator {{math|Ω}} is ''referentially transparent'' in place {{mvar|i}} is defined by : {{mvar|p}} is purely referential in {{mvar|e<sub>''i''</sub>}} implies {{math|''i''.''p''}} is purely referential in {{math|''e'' ≡ <Ω ''e''<sub>1</sub> … ''e''<sub>''i''</sub> … ''e''<sub>''n''</sub>>}}, for all positions {{mvar|p}} and expressions {{math|{{var|e}}<sub>1</sub>, …, {{var|e}}<sub>{{var|n}}</sub>}}. Otherwise {{math|Ω}} is ''referentially opaque'' in place {{mvar|i}}. An operator is ''referentially transparent'' is defined by it is referentially transparent in all places. Otherwise it is ''referentially opaque''. A formal language is ''referentially transparent'' is defined by all its operators are referentially transparent. Otherwise it is ''referentially opaque''. ''Example.'' — The ‘_ lives in _’ operator is referentially transparent: : ''She lives in London.'' Indeed, the second position is purely referential in the assertion because substituting ''The capital of the United Kingdom'' for ''London'' does not change the value of the assertion. The first position is also purely referential for the same substitutivity reason. ''Example.'' — The ‘_ contains _’ and quote operators are referentially opaque: : ''‘London’ contains six letters.'' Indeed, the first position is not purely referential in the statement because substituting ''The capital of the United Kingdom'' for ''London'' changes the value of the statement and the quotation. So in the first position, the ‘_ contains _’ and quote operators destroy the relation between an expression and the value that it denotes. ''Example.'' — The ‘_ refers to _’ operator is referentially transparent, despite the referential opacity of the quote operator: : ''‘London’ refers to the largest city of the United Kingdom.'' Indeed, the first position is purely referential in the statement, though it is not in the quotation, because substituting ''The capital of the United Kingdom'' for ''London'' does not change the value of the statement. So in the first position, the ‘_ refers to _’ operator restores the relation between an expression and the value that it denotes. The second position is also purely referential for the same substitutivity reason.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)