# 23 - tion of equivalence between Haskell functions: •...

This preview shows page 1. Sign up to view the full content.

name . . . Brown, B Smith, J . . . We have introduced three database operations—join, projection, selection— and have seen how each operation has a counterpart in our formalism. More details about relational databases will be given in the database course in the second term. Relations will also be used in the second half of the Declarative Programming Course: Logic Programming. 3.5 Properties of Relations From section 1, recall our de±nition of two Haskell functions being equiva- lent: Two Haskell functions f : A B and g : A B are equivalent, written f = g , if and only if, for all terms a in type A , then if f a terminates then g a terminates and f a = g a , and if f a does not terminate then g a does not terminate. It is simple to show that the following properties are satis±ed for this de±ni-
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: tion of equivalence between Haskell functions: • (re²exivity) ∀ f . f = f ; • (symmetry) ∀ f 1 , f 2 . f 1 = f 2 ⇒ f 2 = f 1 ; • (transitivity) ∀ f 1 , f 2 , f 3 . f 1 = f 2 ∧ f 2 = f 3 ⇒ f 1 = f 3 . We give universal de±nitions for the properties just described. A relation may or may not satisfy such properties. D EFINITION 3.11 Let R be a binary relation on A . Then 1. R is refexive if and only if ∀ x ∈ A. x R x ; 2. R is symmetric if and only if ∀ x, y ∈ A. x R y ⇔ y R x ; 3. R is transitive if and only if ∀ x, y, z ∈ A. x R y ∧ y R z ⇒ x R z . 24...
View Full Document

## This note was uploaded on 01/02/2010 for the course MATH Math2009 taught by Professor Koskesh during the Spring '09 term at SUNY Empire State.

Ask a homework question - tutors are online