Section InducedFunction2arg.
(* well-defined function A x B -> C induces a function (A/R) x (B/S) -> C *)
Variable A B C:Type.
Variable R:relation A.
Variable S:relation B.
Variable f:A->B->C.
Hypothesis equivR:equivalence R.
Hypothesis equivS:equivalence S.
Hypothesis well_defined_2arg: forall (a1 a2:A) (b1 b2:B),
R a1 a2 -> S b1 b2 -> f a1 b1 = f a2 b2.
Definition induced1 (a:A) : quotient S -> C :=
induced_function (f a) equivS (slices_well_defined a).
Definition eq_fn (f g:quotient S->C) :=
forall b:quotient S, f b = g b.
Definition induced2 :=
induced_function2 induced1 equivR eq_fn_equiv well_defined_induced1.
Definition eval (b:quotient S) (f:quotient S->C): C := f b.

Lemma well_defined_eval: forall (b:quotient S) (f g:quotient S->C),
eq_fn f g -> eval b f = eval b g.