Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Substitution (logic)

From Wikipedia, the free encyclopedia
Concept in logic

Asubstitution is asyntactic transformation onformal expressions.Toapply a substitution to anexpression means to consistently replace its variable, or placeholder, symbols with other expressions.[citation needed]

The resulting expression is called asubstitution instance, orinstance for short, of the original expression.

Propositional logic

[edit]

Definition

[edit]

Whereψ andφ representformulas ofpropositional logic,ψ is asubstitution instance ofφif and only ifψ may be obtained fromφ by substituting formulas forpropositional variables inφ, replacing each occurrence of the same variable by an occurrence of the same formula. For example:

ψ: (R → S) & (T → S)

is a substitution instance of

φ: P & Q

That is,ψ can be obtained by replacing P and Q inφ with (R → S) and (T → S) respectively. Similarly:

ψ: (A ↔ A) ↔ (A ↔ A)

is a substitution instance of:

φ: (A ↔ A)

sinceψ can be obtained by replacing each A inφ with (A ↔ A).

In somededuction systems for propositional logic, a new expression (aproposition) may be entered on a line of a derivation if it is a substitution instance of a previous line of the derivation.[1][failed verification] This is how new lines are introduced in someaxiomatic systems. In systems that userules of transformation, a rule may include the use of asubstitution instance for the purpose of introducing certain variables into a derivation.

Tautologies

[edit]

A propositional formula is atautology if it is true under everyvaluation (orinterpretation) of its predicate symbols. If Φ is a tautology, and Θ is a substitution instance of Φ, then Θ is again a tautology. This fact implies the soundness of the deduction rule described in the previous section.

First-order logic

[edit]

Infirst-order logic, asubstitution is a total mappingσ:VT fromvariables toterms; many,[2]: 73 [3]: 445  but not all[4]: 250  authors additionally requireσ(x) =x for all but finitely many variablesx. The notation {x1 ↦ t1, …,xk ↦ tk }[note 1]refers to a substitution mapping each variablexi to the corresponding termti, fori=1,…,k, and every other variable to itself; thexi must be pairwise distinct. Most authors additionally require each termti to be syntactically different fromxi, to avoid infinitely many distinct notations for the same substitution.Applying that substitution to a termt is written inpostfix notation ast {x1 ↦ t1, ...,xk ↦ tk }; it means to (simultaneously) replace every occurrence of eachxi int byti.[note 2] The result of applying a substitutionσ to a termt is called aninstance of that termt.For example, applying the substitution {x ↦ z,z ↦ h(a,y) } to the term

f(z,a,g(x),y)  yields
f(h(a,y),a,g(z),y).

Thedomaindom(σ) of a substitutionσ is commonly defined as the set of variables actually replaced, i.e.dom(σ) = {xV |x }.A substitution is called aground substitution if it maps all variables of its domain toground, i.e. variable-free, terms.The substitution instance of a ground substitution is a ground term if all oft's variables are inσ's domain, i.e. ifvars(t) ⊆dom(σ).A substitutionσ is called alinear substitution if is alinear term for some (and hence every) linear termt containing precisely the variables ofσ's domain, i.e. withvars(t) =dom(σ).A substitutionσ is called aflat substitution if is a variable for every variablex.A substitutionσ is called arenaming substitution if it is apermutation on the set of all variables. Like every permutation, a renaming substitution σ always has aninverse substitutionσ−1, such thattσσ−1 =t =−1σ for every termt. However, it is not possible to define an inverse for an arbitrary substitution.

For example, {x ↦ 2,y ↦ 3+4 } is a ground substitution, {x ↦ x1,y ↦ y2+4 } is non-ground and non-flat, but linear,{x ↦ y2,y ↦ y2+4 } is non-linear and non-flat, {x ↦ y2,y ↦ y2 } is flat, but non-linear, {x ↦ x1,y ↦ y2 } is both linear and flat, but not a renaming, since it maps bothy andy2 toy2; each of these substitutions has the set {x,y} as its domain. An example for a renaming substitution is {x ↦ x1,x1 ↦ y,y ↦ y2,y2 ↦ x }, it has the inverse {x ↦ y2,y2 ↦ y,y ↦ x1,x1 ↦ x }. The flat substitution {x ↦ z,y ↦ z } cannot have an inverse, since e.g. (x+y) {x ↦ z,y ↦ z } =z+z, and the latter term cannot be transformed back tox+y, as the information about the origin az stems from is lost. The ground substitution {x ↦ 2 } cannot have an inverse due to a similar loss of origin information e.g. in (x+2) {x ↦ 2 } = 2+2, even if replacing constants by variables was allowed by some fictitious kind of "generalized substitutions".

Two substitutions are consideredequal if they map each variable tosyntactically equal result terms, formally:σ =τ if = for each variablexV.Thecomposition of two substitutionsσ = {x1 ↦ t1, …,xk ↦ tk } andτ = {y1 ↦ u1, …,yl ↦ ul } is obtained by removing from the substitution {x1 ↦ t1τ, …,xk ↦ tkτ,y1 ↦ u1, …,yl ↦ ul } those pairsyi ↦ ui for whichyi ∈ {x1, …,xk }.The composition ofσ andτ is denoted byστ. Composition is anassociative operation, and is compatible with substitution application, i.e. (ρσ)τ =ρ(στ), and ()τ =t(στ), respectively, for every substitutionsρ,σ,τ, and every termt.Theidentity substitution, which maps every variable to itself, is theneutral element of substitution composition. A substitutionσ is calledidempotent ifσσ =σ, and hencetσσ = for every termt. Whenxiti for alli, the substitution {x1 ↦ t1, …,xk ↦ tk } is idempotent if and only if none of the variablesxi occurs in anytj. Substitution composition is not commutative, that is,στ may be different fromτσ, even ifσ andτ are idempotent.[2]: 73–74 [3]: 445–446 

For example, {x ↦ 2,y ↦ 3+4 } is equal to {y ↦ 3+4,x ↦ 2 }, but different from {x ↦ 2,y ↦ 7 }. The substitution {x ↦ y+y } is idempotent, e.g. ((x+y) {xy+y}) {xy+y} = ((y+y)+y) {xy+y} = (y+y)+y, while the substitution {x ↦ x+y } is non-idempotent, e.g. ((x+y) {xx+y}) {xx+y} = ((x+y)+y) {xx+y} = ((x+y)+y)+y. An example for non-commuting substitutions is {x ↦ y } {y ↦ z } = {x ↦ z,y ↦ z }, but {y ↦ z} {x ↦ y} = {x ↦ y,y ↦ z }.

Mathematics

[edit]

Inmathematics, there are two common uses of substitution:substitution ofvariables forconstants (also calledassignment for that variable), and thesubstitution property ofequality,[5] also calledLeibniz's Law.[6]

Considering mathematics as aformal language, a variable is asymbol from analphabet, usually a letter likex,y, andz, which denotes a range of possiblevalues.[7] If a variable isfree in a givenexpression orformula, then it can be replaced with any of the values in its range.[8] Certain kinds of bound variables can be substituted too. For instance,parameters of an expression (like thecoefficients of apolynomial), or theargument of afunction. Moreover, variables beinguniversally quantified can be replaced with any of the values in its range, and the result will a truestatement. (This is calledUniversal instantiation)

For a non-formalized language, that is, in most mathematical texts outside ofmathematical logic, for an individual expression it is not always possible to identify which variables are free and bound. For example, ini<kaik{\textstyle \sum _{i<k}a_{ik}}, depending on the context, the variablei{\textstyle i} can be free andk{\textstyle k} bound, or vice-versa, but they cannot both be free. Determining which value is assumed to be free depends on context andsemantics.

Thesubstitution property of equality, orLeibniz's Law (though the latter term is usually reserved forphilosophical contexts), generally states that, if two things are equal, then any property of one, must be a property of the other. It can be formally stated inlogical notation as:(a=b)[ϕ(a)ϕ(b)]{\displaystyle (a=b)\implies {\bigl [}\phi (a)\Rightarrow \phi (b){\bigr ]}}For everya{\textstyle a} andb{\textstyle b}, and anywell-formed formulaϕ(x){\textstyle \phi (x)} (with a free variable x). For example: For allreal numbersa andb, ifa =b, thena ≥ 0 impliesb ≥ 0 (here,ϕ(x){\displaystyle \phi (x)} isx ≥ 0). This is a property which is most often used inalgebra, especially in solvingsystems of equations, but is applied in nearly every area of math that uses equality. This, taken together with thereflexive property of equality, forms theaxioms of equality in first-order logic.[9]

Substitution is related to, but not identical to,function composition; it is closely related toβ-reduction inlambda calculus. In contrast to these notions, however, the accent in algebra is on the preservation of algebraic structure by the substitution operation, the fact that substitution gives ahomomorphism for the structure at hand (in the case of polynomials, thering structure).[citation needed]

Algebra

[edit]

Substitution is a basic operation inalgebra, in particular incomputer algebra.[10][11]

A common case of substitution involvespolynomials, where substitution of a numerical value (or another expression) for the indeterminate of a univariate polynomial amounts to evaluating the polynomial at that value. Indeed, this operation occurs so frequently that the notation for polynomials is often adapted to it; instead of designating a polynomial by a name likeP, as one would do for other mathematical objects, one could define

P(X)=X53X2+5X17{\displaystyle P(X)=X^{5}-3X^{2}+5X-17}

so that substitution forX can be designated by replacement inside "P(X)", say

P(2)=13{\displaystyle P(2)=13}

or

P(X+1)=X5+5X4+10X3+7X2+4X14.{\displaystyle P(X+1)=X^{5}+5X^{4}+10X^{3}+7X^{2}+4X-14.}

Substitution can also be applied to other kinds of formal objects built from symbols, for instance elements offree groups. In order for substitution to be defined, one needs an algebraic structure with an appropriateuniversal property, that asserts the existence of unique homomorphisms that send indeterminates to specific values; the substitution then amounts to finding the image of an element under such a homomorphism.

Proof of substitution in ZFC

[edit]

The following is a proof of the substitution property of equality in ZFC (as defined in first-order logic without equality), which is adapted fromIntroduction to Axiomatic Set Theory (1982) by Gaisi Takeuti and Wilson M. Zaring.[12]

Theoremifa=b{\displaystyle a=b}, then, for any well-formed formulaϕ{\displaystyle \phi },ϕ(a)ϕ(b){\displaystyle \phi (a)\Rightarrow \phi (b)}.

SeeZermelo–Fraenkel set theory § Formal language for the definition of formulas in ZFC. Thedefinition is recursive, so a proof byinduction is used. In ZFC in first-order logic without equality, "set equality" is defined to mean that two sets have the same elements, written symbolically as "for all z, z is in x if and only if z is in y". Then, the Axiom of Extensionality asserts that if two sets have the same elements, then they belong to the same sets:

Definition(x=y):=z[zxzy]{\displaystyle (x=y):=\forall z[z\in x\Leftrightarrow z\in y]}

Axiom(x=y)z(xzyz){\displaystyle (x=y)\Rightarrow \forall z(x\in z\Leftrightarrow y\in z)}

Base formulas

LetX,Y,Z{\displaystyle X,Y,Z}, be metavariables for any variables or sets, such thatX=Y{\displaystyle X=Y}

Case 1:ϕ(X):(ZX){\displaystyle \phi (X):(Z\in X)}

AssumeZX{\displaystyle Z\in X}, then, by the definition of equality,ZY{\displaystyle Z\in Y}, thus(X=Y)[ZXZY]{\displaystyle (X=Y)\implies {\bigl [}Z\in X\Rightarrow Z\in Y{\bigr ]}}

Case 2:ϕ(X):(XZ){\displaystyle \phi (X):(X\in Z)}

AssumeXZ{\displaystyle X\in Z}, then by the axiom of extensionality,YZ{\displaystyle Y\in Z}, thus(X=Y)[XZYZ]{\displaystyle (X=Y)\implies {\bigl [}X\in Z\Rightarrow Y\in Z{\bigr ]}}

Recursive formulas

Letψ,φ{\displaystyle \psi ,\varphi } be meta variables for any formulas with the property that(a=b)[ϕ(a)ϕ(b)]{\displaystyle (a=b)\implies {\bigl [}\phi (a)\Rightarrow \phi (b){\bigr ]}}. LetX,Y{\displaystyle X,Y}, be metavariables for any variables or sets, such thatX=Y{\displaystyle X=Y}, and letz{\displaystyle z} be a metavariable for any variable.

Case 1:¬(ψ){\displaystyle \neg (\psi )}

SinceX=Y{\displaystyle X=Y}, thenY=X{\displaystyle Y=X} by symmetry of equality, therefore[ψ(Y)ψ(X)]{\displaystyle {\bigl [}\psi (Y)\Rightarrow \psi (X){\bigr ]}}, by the induction hypothesis, therefore[¬ψ(X)¬ψ(Y)]{\displaystyle {\bigl [}\neg \psi (X)\Rightarrow \neg \psi (Y){\bigr ]}} bycontraposition, thus(X=Y)[¬ψ(X)¬ψ(Y)]{\displaystyle (X=Y)\implies {\bigl [}\neg \psi (X)\Rightarrow \neg \psi (Y){\bigr ]}}

Case 2:ψφ{\displaystyle \psi \land \varphi }

SinceX=Y{\displaystyle X=Y}, then[ψ(X)ψ(Y)]{\displaystyle {\bigl [}\psi (X)\Rightarrow \psi (Y){\bigr ]}} and[φ(X)φ(Y)]{\displaystyle {\bigl [}\varphi (X)\Rightarrow \varphi (Y){\bigr ]}}, which implies[(ψ(X)φ(X))ψ(Y)φ(Y))]{\displaystyle {\bigl [}{\bigl (}\psi (X)\land \varphi (X){\bigr )}\Rightarrow \psi (Y)\land \varphi (Y){\bigr )}{\bigr ]}}, thus(X=Y)[(ψ(X)φ(X))ψ(Y)φ(Y))]{\displaystyle (X=Y)\implies {\bigl [}{\bigl (}\psi (X)\land \varphi (X){\bigr )}\Rightarrow \psi (Y)\land \varphi (Y){\bigr )}{\bigr ]}}

Case 3:z(ψ){\displaystyle \exists z(\psi )}

SinceX=Y{\displaystyle X=Y},ψ(X,z)ψ(Y,z){\displaystyle \psi (X,z)\Rightarrow \psi (Y,z)} assume byway of contradiction that the result is false, that isz(ψ(X,z)){\displaystyle \exists z(\psi (X,z))} is true butz(ψ(Y,z)){\displaystyle \exists z(\psi (Y,z))} is false. Byexistential instantiation, letz0{\displaystyle z_{0}} denote the value such thatψ(X,z0){\displaystyle \psi (X,z_{0})} is true. Thenψ(Y,z0){\displaystyle \psi (Y,z_{0})} is false by asumption, and thereforeψ(X,z0)ψ(Y,z0){\displaystyle \psi (X,z_{0})\Rightarrow \psi (Y,z_{0})} is false, which contradicts our induction hypothesis, and the result follows.

See also

[edit]

Notes

[edit]
  1. ^Some authors use [t1/x1, …,tk/xk ] to denote that substitution, e.g.M. Wirsing (1990). Jan van Leeuwen (ed.).Algebraic Specification. Handbook of Theoretical Computer Science. Vol. B. Elsevier. pp. 675–788., here: p. 682.
  2. ^From aterm algebra point of view, the setT of terms is thefree term algebra over the setV of variables, hence for each substitution mapping σ:VT there is a uniquehomomorphismσ:TT that agrees with σ onVT; the above-defined application ofσ to a termt is then viewed as applying the functionσ to the argumentt.

Citations

[edit]
  1. ^Hunter, Geoffrey (1996) [1971].Metalogic: An Introduction to the Metatheory of Standard First-Order Logic. University of California Press (published 1973). p. 118.ISBN 9780520023567.OCLC 36312727. (accessible to patrons with print disabilities)
  2. ^abDavid A. Duffy (1991).Principles of Automated Theorem Proving. Wiley.
  3. ^abFranz Baader,Wayne Snyder (2001).Alan Robinson andAndrei Voronkov (ed.).Unification Theory(PDF). Elsevier. pp. 439–526. Archived fromthe original(PDF) on 2015-06-08. Retrieved2014-09-24.
  4. ^N. Dershowitz; J.-P. Jouannaud (1990). "Rewrite Systems". InJan van Leeuwen (ed.).Formal Models and Semantics. Handbook of Theoretical Computer Science. Vol. B. Elsevier. pp. 243–320.
  5. ^Sobolev, S. K. (2001) [1994],"Equality axioms",Encyclopedia of Mathematics,EMS Press
  6. ^Deutsch, Harry and Pawel Garbacz, "Relative Identity", The Stanford Encyclopedia of Philosophy (Fall 2024 Edition), Edward N. Zalta & Uri Nodelman (eds.), forthcoming URL:https://plato.stanford.edu/entries/identity-relative/#StanAccoIden
  7. ^Sobolev, S. K. (2001) [1994],"Individual variable",Encyclopedia of Mathematics,EMS Press
  8. ^Sobolev, S. K. (2001) [1994],"Free variable",Encyclopedia of Mathematics,EMS Press
  9. ^Fitting, M.,First-Order Logic and Automated Theorem Proving (Berlin/Heidelberg: Springer, 1990),pp. 198–200.
  10. ^Margret H. Hoft; Hartmut F.W. Hoft (6 November 2002).Computing with Mathematica. Elsevier.ISBN 978-0-08-048855-4.
  11. ^Andre Heck (6 December 2012).Introduction to Maple. Springer Science & Business Media.ISBN 978-1-4684-0484-5.substitution.
  12. ^Takeuti, Gaisi; Zaring, Wilson M. (1982)."Introduction to Axiomatic Set Theory".Graduate Texts in Mathematics:6–9.doi:10.1007/978-1-4613-8168-6.ISSN 0072-5285. Archived fromthe original on 2014-08-06.

References

[edit]

External links

[edit]
Major fields
Logics
Theories
Foundations
Lists
Topics
Other
General
Theorems (list)
 and paradoxes
Logics
Traditional
Propositional
Predicate
Set theory
Types ofsets
Maps and cardinality
Set theories
Formal systems (list),
language and syntax
Example axiomatic
systems
 (list)
Proof theory
Model theory
Computability theory
Related
Retrieved from "https://en.wikipedia.org/w/index.php?title=Substitution_(logic)&oldid=1316601340"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp