Theorem composition_elimr

Theorem. composition_elimr
(a, c) ∈ S ∘ R → ∃y. (a, y) ∈ R
Proof
01. 1 ⊢ (a, c) ∈ S ∘ R, hypo.
02. ⊢ S ∘ R = {t | ∃x. ∃y. ∃z. t = (x, z) ∧ (x, y) ∈ R ∧ (y, z) ∈ S},
  composition_eq.
03. 1 ⊢ (a, c) ∈ {t | ∃x. ∃y. ∃z. t = (x, z) ∧ (x, y) ∈ R ∧ (y, z) ∈ S},
  eq_subst 2 1, P u ↔ (a, c) ∈ u.
04. 1 ⊢ ∃x. ∃y. ∃z. (a, c) = (x, z) ∧ (x, y) ∈ R ∧ (y, z) ∈ S,
  comp_elim 3.
05. 5 ⊢ ∃y. ∃z. (a, c) = (x, z) ∧ (x, y) ∈ R ∧ (y, z) ∈ S, hypo.
06. 6 ⊢ ∃z. (a, c) = (x, z) ∧ (x, y) ∈ R ∧ (y, z) ∈ S, hypo.
07. 7 ⊢ (a, c) = (x, z) ∧ (x, y) ∈ R ∧ (y, z) ∈ S, hypo.
08. 7 ⊢ (a, c) = (x, z), conj_elimll 7.
09. 1 ⊢ set (a, c), set_intro 1.
10. 1 ⊢ set a, setl_from_pair 9.
11. 1 ⊢ set c, setr_from_pair 9.
12. 1, 7 ⊢ a = x ∧ c = z, pair_property 10 11 8.
13. 1, 7 ⊢ a = x, conj_eliml 12.
14. 1, 7 ⊢ c = z, conj_elimr 12.
15. 7 ⊢ (x, y) ∈ R, conj_elimlr 7.
16. 1, 7 ⊢ (a, y) ∈ R, eq_subst_rev 13 15.
17. 1, 7 ⊢ ∃y. (a, y) ∈ R, ex_intro 16.
18. 1, 6 ⊢ ∃y. (a, y) ∈ R, ex_elim 6 17.
19. 1, 5 ⊢ ∃y. (a, y) ∈ R, ex_elim 5 18.
20. 1 ⊢ ∃y. (a, y) ∈ R, ex_elim 4 19.
composition_elimr. ⊢ (a, c) ∈ S ∘ R → ∃y. (a, y) ∈ R, subj_intro 20.

Dependencies
The given proof depends on nine axioms:
comp, efq, eq_refl, eq_subst, ext, lem, pairing, subset, union.