| |||||||||
In philosophy, identity is the quality of being "the same as". It is of particular interest to logicians and metaphysicians.
In logic, the identity relation is normally, (by definition), the transitive, symmetric, and reflexive relation that holds only between a thing and itself. That is, identity is the two-place predicate, _=_, such that for all x, y, "x=y" is true iff x is y.
More usefully, it can be expressed formally in second-order logic or in set theory: For all objects x, y, if for all properties F, Fx iff Fy, then x=y
It is an axiom of most normal modal logics that for all x, if x=x then necessarily x=x.
(These definitions are of course inapplicable in some area of quantified logic, such as fuzzy logic and fuzzy set theory, and with respect to Ship of Theseus example, in what way is it the same? A traditional view is that of Gottfried Leibniz, who held that x is the same as y if and only if every predicate true of x is true of y as well.
Leibniz's ideas have taken root in the philosophy of mathematics, where they have influenced the development of the predicate calculus as Leibniz's law. Mathematicians sometimes distinguish identity from equality. More mundanely, an identity in mathematics may be an equation that holds true for all values of a variable.
More recent metaphysicians have discussed trans-world identity -- the notion that there can be the same object in different possible worlds.
In object-oriented programming, object identity is a mechanism for distinguishing different objects from each other. This is based on the philosophical concept of identity, but applied to data structures.
In programs, one frequently may have several variables (or pointers) which refer to the same underlying data structure. An identity predicate allows one to ask whether two variables refer to the same thing. In many languages, identity can be determined more efficiently than equality since the former involves simply a pointer comparison while the latter must traverse data structures.
Cultural identity is the (feeling of) identity of a group or culture, or of an individual as far as she/he is influenced by her/his belonging to a group or culture. Common habits, characteristics, ideas may be clear markers of a shared cultural identity, but essentially it is determined by difference: we feel we belong to a group, and a group defines itself as a group, by noticing and highlighting differences with other groups and cultures.