HomeHome Metamath Proof Explorer < Previous   Next >
Related theorems
Unicode version

Definition df-sb 853
Description: Define proper substitution. Remark 9.1 in [Megill] p. 447 (p. 15 of the preprint). For our notation, we use [y / x]ph to mean "the wff that results when y is properly substituted for x in the wff ph." This notation was introduced in Haskell B. Curry's Foundations of Mathematical Logic (1977), p. 316 and is frequently used in textbooks of lambda calculus and combinatory logic. This notation improves the common but ambiguous notation, "ph(y) is the wff that results when y is properly substituted for x in ph(x)". For example, if the original ph(x) is x = y, then ph(y) is y = y, from which we obtain that ph(x) is x = x. So what exactly does ph(x) mean? Curry's notation solves this problem.

In most books, proper substitution has a somewhat complicated recursive definition with multiple cases based on the occurrences of free and bound variables in the wff. Instead we use a remarkable little formula that is exactly equivalent and gives us a single direct definition. We later prove that our definition has the properties we expect of proper substitution (see theorems sbequ 877, sbcom2 992 and sbid2v 993).

Note that our definition is valid even when x and y are replaced with the same variable, as sbid 868 shows. We achieve this by having x free in the first conjunct and bound in the second. We can also achieve this by using a dummy variable, as the alternate definition sb7 991 shows (which some logicians may prefer because it doesn't mix free and bound variables). When x and y are distinct, we can express proper substitution with the simpler expressions of sb5 988 and sb6 989.

There are no restrictions on what variables may occur in ph.

Assertion
Ref Expression
df-sb |- ([y / x]ph <-> ((x = y -> ph) /\ E.x(x = y /\ ph)))

Detailed syntax breakdown of Definition df-sb
StepHypRef Expression
1 wph . . 3 wff ph
2 vx . . 3 set x
3 vy . . 3 set y
41, 2, 3wsb 852 . 2 wff [y / x]ph
52, 3weq 797 . . . 4 wff x = y
65, 1wi 2 . . 3 wff (x = y -> ph)
75, 1wa 196 . . . 4 wff (x = y /\ ph)
87, 2wex 678 . . 3 wff E.x(x = y /\ ph)
96, 8wa 196 . 2 wff ((x = y -> ph) /\ E.x(x = y /\ ph))
104, 9wb 127 1 wff ([y / x]ph <-> ((x = y -> ph) /\ E.x(x = y /\ ph)))
Colors of variables: wff set class
This definition is referenced by:  sbimi 854  del43 856  sb1 858  sb2 859  sbequ1 863  sbequ2 864  sbn2 881
metamath.org