Expression (nonfiction): Difference between revisions
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 15: | Line 15: | ||
In [[Algebra (nonfiction)|algebra]], an expression may be used to designate a value, which might depend on values assigned to variables occurring in the expression. The determination of this value depends on the semantics attached to the symbols of the expression. The choice of semantics depends on the context of the expression. The same syntactic expression 1 + 2 × 3 can have different values (mathematically 7, but also 9), depending on the order of operations implied by the context (See Order of operations:Calculators). | In [[Algebra (nonfiction)|algebra]], an expression may be used to designate a value, which might depend on values assigned to variables occurring in the expression. The determination of this value depends on the semantics attached to the symbols of the expression. The choice of semantics depends on the context of the expression. The same syntactic expression 1 + 2 × 3 can have different values (mathematically 7, but also 9), depending on the order of operations implied by the context (See Order of operations:Calculators). | ||
The semantic rules may declare that certain expressions do not designate any value (for instance when they involve division by 0); such expressions are said to have an undefined value, but they are well-formed expressions nonetheless. In general the meaning of expressions is not limited to designating values; for instance, an expression might designate a condition, or an equation that is to be solved, or it can be viewed as an object in its own right that can be manipulated according to certain rules. Certain expressions that designate a value simultaneously express a condition that is assumed to hold, for instance those involving the operator [MATH NEEDED] to designate an internal direct sum. | The semantic rules may declare that certain expressions do not designate any value (for instance when they involve division by 0); such expressions are said to have an undefined value, but they are well-formed expressions nonetheless. In general the meaning of expressions is not limited to designating values; for instance, an expression might designate a condition, or an [[Equation (nonfiction)|equation]] that is to be solved, or it can be viewed as an object in its own right that can be manipulated according to certain rules. Certain expressions that designate a value simultaneously express a condition that is assumed to hold, for instance those involving the operator [MATH NEEDED] to designate an internal direct sum. | ||
=== Formal languages and lambda calculus === | |||
Formal languages allow formalizing the concept of well-formed expressions. | |||
In the 1930s, a new type of expressions, called [[Lambda calculus (nonfiction)|lambda expressions]], were introduced by [[Alonzo Church (nonfiction)|Alonzo Church]] and [[Stephen Cole Kleene (nonfiction)|Stephen Kleene]] for formalizing functions and their evaluation. They form the basis for [[Lambda calculus (nonfiction)|lambda calculus]], a [[Formal system (nonfiction)|formal system]] used in [[Mathematical logic (nonfiction)|mathematical logic]] and the [[Programming language theory (nonfiction)|theory of programming languages]]. | |||
The equivalence of two lambda expressions is [[Decision problem (nonfiction)|undecidable]]. This is also the case for the expressions representing [[Real number (nonfiction)|real numbers]], which are built from the [[Integer (nonfiction)|integers]] by using the arithmetical operations, the [[Logarithm (nonfiction)|logarithm]], and the [[Exponential (nonfiction)|exponential]] ([[Richardson's theorem (nonfiction)|Richardson's theorem]]). | |||
== Variables == | |||
Many mathematical expressions include [[Variable (nonfiction)|variables]]. Any variable can be classified as being either a [[Free variables and bound variables (nonfiction)|free variable or a bound variable]]. | |||
For a given combination of values for the free variables, an expression may be evaluated, although for some combinations of values of the free variables, the value of the expression may be undefined (for example, [[Division by zero (nonfiction)}Division by zero]]. Thus an expression represents a function whose inputs are the values assigned to the free variables and whose output is the resulting value of the expression. | |||
For example, the expression | |||
x/y | |||
evaluated for x = 10, y = 5, will give 2; but it is undefined for y = 0. | |||
The evaluation of an expression is dependent on the definition of the mathematical operators and on the system of values that is its context. | |||
Two expressions are said to be equivalent if, for each combination of values for the free variables, they have the same output, i.e., they represent the same function. | |||
== In the News == | == In the News == | ||
Line 32: | Line 55: | ||
== Nonfiction cross-reference == | == Nonfiction cross-reference == | ||
* [[Alonzo Church (nonfiction)]] | |||
* [[Closed-form expression (nonfiction)]] - a closed-form expression is a mathematical expression that can be evaluated in a finite number of operations. It may contain constants, variables, certain "well-known" operations (e.g., + − × ÷), and functions (e.g., nth root, exponent, logarithm, trigonometric functions, and inverse hyperbolic functions), but usually no limit. The set of operations and functions admitted in a closed-form expression may vary with author and context. | |||
* [[Mathematical notation (nonfiction)]] | * [[Mathematical notation (nonfiction)]] | ||
* [[Mathematics (nonfiction)]] | * [[Mathematics (nonfiction)]] | ||
* [[Syntax (nonfiction)]] | * [[Syntax (nonfiction)]] | ||
* [[Syntax (programming languages) (syntax)]] | * [[Syntax (programming languages) (syntax)]] | ||
* [[Well-formed formula (nonfiction)]] | |||
* [[Well-posed problem (nonfiction)]] | |||
External links: | External links: |
Latest revision as of 13:17, 25 January 2019
In mathematics, an expression or mathematical expression is a finite combination of symbols that is well-formed according to rules that depend on the context.
Mathematical symbols can designate numbers (constants), variables, operations, functions, brackets, punctuation, and grouping to help determine order of operations, and other aspects of logical syntax.
Syntax versus semantics
Syntax
An expression is a syntactic construct, it must be well-formed: the allowed operators must have the correct number of inputs in the correct places, the characters that make up these inputs must be valid, have a clear order of operations, etc. Strings of symbols that violate the rules of syntax are not well-formed and are not valid mathematical expressions.
Semantics
Semantics is the study of meaning. Formal semantics is about attaching meaning to expressions.
In algebra, an expression may be used to designate a value, which might depend on values assigned to variables occurring in the expression. The determination of this value depends on the semantics attached to the symbols of the expression. The choice of semantics depends on the context of the expression. The same syntactic expression 1 + 2 × 3 can have different values (mathematically 7, but also 9), depending on the order of operations implied by the context (See Order of operations:Calculators).
The semantic rules may declare that certain expressions do not designate any value (for instance when they involve division by 0); such expressions are said to have an undefined value, but they are well-formed expressions nonetheless. In general the meaning of expressions is not limited to designating values; for instance, an expression might designate a condition, or an equation that is to be solved, or it can be viewed as an object in its own right that can be manipulated according to certain rules. Certain expressions that designate a value simultaneously express a condition that is assumed to hold, for instance those involving the operator [MATH NEEDED] to designate an internal direct sum.
Formal languages and lambda calculus
Formal languages allow formalizing the concept of well-formed expressions.
In the 1930s, a new type of expressions, called lambda expressions, were introduced by Alonzo Church and Stephen Kleene for formalizing functions and their evaluation. They form the basis for lambda calculus, a formal system used in mathematical logic and the theory of programming languages.
The equivalence of two lambda expressions is undecidable. This is also the case for the expressions representing real numbers, which are built from the integers by using the arithmetical operations, the logarithm, and the exponential (Richardson's theorem).
Variables
Many mathematical expressions include variables. Any variable can be classified as being either a free variable or a bound variable.
For a given combination of values for the free variables, an expression may be evaluated, although for some combinations of values of the free variables, the value of the expression may be undefined (for example, [[Division by zero (nonfiction)}Division by zero]]. Thus an expression represents a function whose inputs are the values assigned to the free variables and whose output is the resulting value of the expression.
For example, the expression
x/y
evaluated for x = 10, y = 5, will give 2; but it is undefined for y = 0.
The evaluation of an expression is dependent on the definition of the mathematical operators and on the system of values that is its context.
Two expressions are said to be equivalent if, for each combination of values for the free variables, they have the same output, i.e., they represent the same function.
In the News
Fiction cross-reference
Nonfiction cross-reference
- Alonzo Church (nonfiction)
- Closed-form expression (nonfiction) - a closed-form expression is a mathematical expression that can be evaluated in a finite number of operations. It may contain constants, variables, certain "well-known" operations (e.g., + − × ÷), and functions (e.g., nth root, exponent, logarithm, trigonometric functions, and inverse hyperbolic functions), but usually no limit. The set of operations and functions admitted in a closed-form expression may vary with author and context.
- Mathematical notation (nonfiction)
- Mathematics (nonfiction)
- Syntax (nonfiction)
- Syntax (programming languages) (syntax)
- Well-formed formula (nonfiction)
- Well-posed problem (nonfiction)
External links:
- Expression (mathematics) @ Wikipedia