• No results found

Mappings compatible with equivalence relations

Equivalence relations

7.5 Mappings compatible with equivalence relations

We start with some properties of the function s that maps a non-empty set x to a repre-sentative: If R is an equivalence relation, this is a function from E/R to E; it is a section (right inverse) of the canonical projection.

Definition section_canon_proj (r:Set) :=

BL rep (quotient r) (substrate r).

Lemma section_canon_proj_axioms:forall r, is_equivalence r ->

transf_axioms rep (quotient r) (substrate r).

Lemma section_canon_proj_W: forall r x, is_equivalence r ->

inc x (quotient r) -> W x (section_canon_proj r) = (rep x).

Lemma function_section_canon_proj: forall r,

is_equivalence r -> is_function (section_canon_proj r).

Lemma right_inv_canon_proj: forall r, is_equivalence r ->

is_right_inverse (section_canon_proj r) (canon_proj r).

We say that a function f is compatible with R if the relation f (x) = y is compatible; by definition this is: if x∼ xR 0then f (x) = y implies f (x0) = y. By symmetry, these two relations are equivalent, and we can eliminate y. We first prove that our definition is the same as the original one, then show that this means that the function is constant on equivalence classes.

This means that f can be factored through the canonical projection g (see below; we show here g (x) = g (y) implies f (x) = f (y)). (see diagram (retraction/section) on page 64).

Definition compatible_with_equiv f r :=

is_function f & source f = substrate r &

forall x x’, related r x x’ -> W x f = W x’ f.

Lemma compatible_with_equiv_pr: forall f r, is_function f -> source f = substrate r ->

compatible_with_equiv f r =

(forall y, compatible_with_equiv_p (fun x => y = W x f) r).

Lemma compatible_constant_on_classes: forall f r x y, is_equivalence r ->

compatible_with_equiv f r -> inc y (class r x) -> W x f = W y f.

Lemma compatible_constant_on_classes2: forall f r x, is_equivalence r -> compatible_with_equiv f r ->

is_constant_function(restriction f (class r x)).

Lemma compatible_with_proj: forall f r x y,

is_equivalence r -> compatible_with_equiv f r ->

inc x (substrate r) -> inc y (substrate r) ->

W x (canon_proj r) = W y (canon_proj r) -> W x f = W y f.

Given two relations r and s, we say that the function f is compatible with r and s if g ◦ f is compatible with r , when g is the canonical projection of F/s. We can restate this as: x∼ yr implies f (x)∼ f (y). If h is the canonical projection of E/r , then h(x) = h(y) implies that f (x)s and f (y) have the same class modulo s.

Definition compatible_with_equivs f r r’ :=

is_function f & target f = substrate r’ &

compatible_with_equiv (compose (canon_proj r’) f) r.

Lemma compatible_with_pr:forall r r’ f x y, is_equivalence r -> is_equivalence r’ ->

compatible_with_equivs f r r’ ->

related r x y -> related r’ (W x f) (W y f).

Lemma compatible_with_pr2:forall r r’ f, is_equivalence r -> is_equivalence r’ ->

is_function f ->

target f = substrate r’-> source f = substrate r->

(forall x y, related r x y -> related r’ (W x f) (W y f)) ->

compatible_with_equivs f r r’.

Lemma compatible_with_proj3 :forall r r’ f x y, is_equivalence r -> is_equivalence r’ ->

compatible_with_equivs f r r’->

inc x (substrate r) -> inc y (substrate r) ->

W x (canon_proj r) = W y (canon_proj r) ->

class r’ (W x f) = class r’ (W y f).

Assume that f is compatible with an equivalence r on E, let g be the canonical projection onto E/r and s a section of g . If f is compatible with r , there exists a unique function h such that h ◦g = f and h = f ◦s. This mapping is said to be induced by f on passing to the quotient.

This is criterion C57 (for details, see page 216).

Definition fun_on_quotient r f :=

compose f (section_canon_proj r).

Lemma exists_fun_on_quotient: forall f r,

is_equivalence r -> is_function f -> source f = substrate r ->

compatible_with_equiv f r =

(exists h, composable h (canon_proj r) & compose h (canon_proj r) = f).

Lemma exists_unique_fun_on_quotient: forall f r h, is_equivalence r -> compatible_with_equiv f r ->

composable h (canon_proj r) -> compose h (canon_proj r) = f ->

h = fun_on_quotient r f.

Lemma compose_foq_proj :forall f r,

is_equivalence r -> compatible_with_equiv f r ->

compose (fun_on_quotient r f) (canon_proj r) = f.

E f //

Assume that f is a function from E into E0 on which we have equivalence relations r and r0. Letπ and π0 be the canonical projections onto E/r and E0/r0, s and s0 associated sections. We can consider f = f ◦s’, the mapping induced by f on passing on the quotient, or f00= π ◦ f ◦ s, the mapping induced by f on passing to the quotients with respect to r and s.

We consider two cases: f is a mapping, and f is a graph. In order to simplify the statements, we write X and X0instead of is_equivalence r or is_equivalence r’.

Definition fun_on_rep f: Set -> Set := fun x=> f(rep x).

Definition fun_on_reps r’ f := fun x=> W (f(rep x)) (canon_proj r’).

Definition function_on_quotient r f b :=

BL(fun_on_rep f)(quotient r)(b).

Definition function_on_quotients r r’ f :=

BL(fun_on_reps r’ f)(quotient r)(quotient r’).

Definition fun_on_quotients r r’ f :=

compose (compose (canon_proj r’) f) (section_canon_proj r).

Lemma foq_axioms: forall r f b, X->

transf_axioms f (substrate r) b ->

transf_axioms (fun_on_rep f) (quotient r) b.

Lemma foqs_axioms: forall r r’ f, X -> X’ ->

transf_axioms f (substrate r)(substrate r’) ->

transf_axioms (fun_on_reps r’ f) (quotient r) (quotient r’).

Lemma foqc_axioms: forall r f, X->

is_function f -> source f = substrate r ->

composable f (section_canon_proj r).

Lemma foqcs_axioms:forall r r’ f, X-> X’->

is_function f -> source f = substrate r -> target f = substrate r’ ->

composable (compose (canon_proj r’) f) (section_canon_proj r).

Lemma foq_function:forall r f b, X->

transf_axioms f (substrate r) b ->

is_function (function_on_quotient r f b).

Lemma foqs_function: forall r r’ f, X-> X’ ->

transf_axioms f (substrate r)(substrate r’) ->

is_function (function_on_quotients r r’ f).

Lemma foqc_function: forall r f, X-> X’ ->

source f = substrate r ->

is_function (fun_on_quotient r f).

Lemma foqcs_function:forall r r’ f, X-> X’ ->

is_function f -> source f = substrate r -> target f = substrate r’ ->

is_function (fun_on_quotients r r’ f).

Lemma foq_W:forall r f b x, X->

transf_axioms f (substrate r) b ->

inc x (quotient r) ->

W x (function_on_quotient r f b) = f (rep x).

Lemma foqc_W:forall r f x, X ->

is_function f ->

source f = substrate r -> inc x (quotient r) ->

W x (fun_on_quotient r f) = W (rep x) f.

Lemma foqs_W: forall r r’ f x, X -> X’ ->

transf_axioms f (substrate r)(substrate r’) -> inc x (quotient r) ->

W x (function_on_quotients r r’ f) = class r’ (f (rep x)).

Lemma foqcs_W:forall r r’ f x, X-> X’ ->

is_function f -> source f = substrate r -> target f = substrate r’ ->

inc x (quotient r) ->

W x (fun_on_quotients r r’ f) = class r’ (W (rep x) f).

More lemmas; statement fun_on_quotient_pr4 is the diagram on the right part of (fun on quotient) on page 123.

Lemma fun_on_quotient_pr: forall r f x,

W x f = fun_on_rep (fun w => W x f) (W x (canon_proj r)).

Lemma fun_on_quotient_pr2: forall r r’ f x, W (W x f) (canon_proj r’) =

fun_on_reps r’ (fun w => W x f) (W x (canon_proj r)).

Lemma composable_fun_proj: forall r f b, X->

transf_axioms f (substrate r) b ->

composable (function_on_quotient r f b) (canon_proj r).

Lemma composable_fun_projs: forall r r’ f, X -> X’ ->

transf_axioms f (substrate r) (substrate r’) ->

composable (function_on_quotients r r’ f) (canon_proj r).

Lemma composable_fun_projc: forall r f, X->

compatible_with_equiv f r ->

composable (fun_on_quotient r f) (canon_proj r).

Lemma composable_fun_projcs: forall r r’ f, X-> X’ ->

compatible_with_equivs f r r’->

composable (fun_on_quotients r r’ f) (canon_proj r).

Lemma fun_on_quotient_pr3: forall r f x, X->

inc x (substrate r) -> compatible_with_equiv f r ->

W x f = W (W x (canon_proj r)) (fun_on_quotient r f).

Lemma fun_on_quotient_pr4: forall r r’ f, X-> X’ ->

compatible_with_equivs f r r’->

compose (canon_proj r’) f = compose (fun_on_quotients r r’ f)(canon_proj r).

Lemma fun_on_quotient_pr5: forall r r’ f x, X-> X’->

compatible_with_equivs f r r’->

inc x (substrate r) ->

W (W x f) (canon_proj r’) =

W (W x (canon_proj r)) (fun_on_quotients r r’ f).

Lemma compose_fun_proj_ev: forall r f b x, X->

compatible_with_equiv (BL f (substrate r) b) r ->

inc x (substrate r) ->

transf_axioms f (substrate r) b ->

W x (compose (function_on_quotient r f b) (canon_proj r)) = f x.

Lemma compose_fun_proj_ev2: forall r r’ f x, X-> X’ ->

compatible_with_equivs (BL f (substrate r) (substrate r’)) r r’ ->

transf_axioms f (substrate r) (substrate r’) ->

inc x (substrate r) ->

inc (f x) (substrate r’) ->

W (f x) (canon_proj r’) =

W x (compose (function_on_quotients r r’ f) (canon_proj r)).

Lemma compose_fun_proj_eq: forall r f b, X->

compatible_with_equiv (BL f (substrate r) b) r ->

transf_axioms f (substrate r) b ->

compose (function_on_quotient r f b) (canon_proj r) = BL f (substrate r) b.

Lemma compose_fun_proj_eq2: forall r r’ f, X-> X’ ->

transf_axioms f (substrate r) (substrate r’) ->

compatible_with_equivs (BL f (substrate r) (substrate r’)) r r’->

compose (function_on_quotients r r’ f) (canon_proj r) = compose (canon_proj r’) (BL f (substrate r) (substrate r’)).

E f //

Assume now that f is a function from E to F, and ∼ the associated equivalence, for which x and y are equivalent if f (x) = f (y). Then f is compatible and we can define f on the quo-tient. If we denote it by ¯f , and if ¯x is the class of x then ¯f ( ¯x) = f (x). From ¯f ( ¯x) = ¯f ( ¯y) we get f (x) = f (y), so that x and y are in the same class: hence ¯f is injective. If we restrict this function to the image F0of f we get a bijection, say f0. The diagram (canonical decomposi-tion) says that if we compose the projectionπ from E to E/ ∼, the bijection f0into F0and the inclusion map from F0to F, then we get f . If f is surjective then F = F0and we can simplify a bit: only three arrows are needed. Moreover, there is no need to restrict ¯f (this is shown on the right part of the diagram).

Lemma compatible_ea: forall f,

bijective (restriction2 (fun_on_quotient (equivalence_associated f) f) (quotient (equivalence_associated f)) (range (graph f))). (* 28 *) Lemma canonical_decompositiona: forall f,

is_function f ->

let r:= equivalence_associated f in

is_function (compose (restriction2 (fun_on_quotient r f) (quotient r) (range (graph f)))

(canon_proj r)). (* 23 *)

Lemma canonical_decomposition: forall f, is_function f ->

let r:= equivalence_associated f in

f = compose (canonical_injection (range (graph f))(target f)) (compose (restriction2 (fun_on_quotient r f)

(quotient r) (range (graph f))) (canon_proj r)). (* 41 *)

Lemma surjective_pr7: forall f, surjective f ->

canonical_injection (range (graph f))(target f) = identity (target f).

Lemma canonical_decompositiona: forall f, is_function f ->

let r:= equivalence_associated f in

is_function (compose (restriction2 (fun_on_quotient r f) (quotient r) (range (graph f)))

(canon_proj r)).

Lemma canonical_decomposition_surj: forall f, surjective f ->

let r:= equivalence_associated f in

f = compose (restriction2 (fun_on_quotient r f) (quotient r) (target f)) (canon_proj r).

Lemma canonical_decompositionb: forall f, is_function f ->

let r:= equivalence_associated f in

restriction2 (fun_on_quotient r f) (quotient r) (target f) = (fun_on_quotient r f).

Lemma canonical_decomposition_surj2: forall f, surjective f ->

let r:= equivalence_associated f in

f = (compose (fun_on_quotient r f) (canon_proj r)).

7.6 Inverse image of an equivalence relation; induced equivalence