Def: Let w be a set of ordered pairs. The domain of w is defined by dom(w) = { x | (x,y)∈w }
Def: A tuple (or function) f is a set of ordered pairs satisfying (x,y1)∈f ∧ (x,y2)∈f ⇒ y1=y2
Def: A relation r is a set of tuples satisfying t1,t2∈ r ⇒ dom(t1)=dom(t2).
Def: Let dum=∅ and dee={∅}
Def: Let r1,r2 be relations. r1,r2 are union compatible if r1∪r2 is a relation.
Def: The union, intersection and difference of union compatible relations are exactly the corresponding set-theoretic operators on the sets of tuples.
Def: Let w be a set of ordered pairs and p be any set. The projection of w on p is defined by: 𝜋p(w) = { (x,y) | (x,y)∈w ∧ x∈p }
Def: Let r be a relation. Let p be any set. Then the projection of r on p is defined by 𝜋p(r) = { 𝜋p(t) | t∈r }
Def: Let r1,r2 be relations. The join of r1 and r2 is defined by r1⋈r2 = { t1∪t2 | t1∈r1 ∧ t2∈r2 ∧ t1∪t2 is a tuple }
Def: Let b be a boolean value. Then (b?x:y) equals x if b is true and y otherwise.
Def: The rename of attribute a1 as a2 on tuple t is defined by rename(t,a1,a2) = {((a=a1)?a2:a,v) | (a,v)∈t}
Def: The rename of attribute a1 as a2 on relation r is defined by rename(r,a1,a2) = { rename(t,a1,a2) | t∈r }
Note restriction on a relation is just restricted comprehension on the set of tuples.