+*)
+
+(* the same as ⋄ for a basic pair *)
+definition image: ∀U,V:REL. (U ⇒_\r1 V) × Ω^U ⇒_1 Ω^V.
+ intros; constructor 1;
+ [ apply (λr:U ⇒_\r1 V.λS: Ω \sup U. {y | ∃x:U. x ♮r y ∧ x ∈ S });
+ intros; simplify; split; intro; cases e1; exists [1,3: apply w]
+ [ apply (. (#‡e^-1)‡#); assumption
+ | apply (. (#‡e)‡#); assumption]
+ | intros; split; simplify; intros; cases e2; exists [1,3: apply w]
+ [ apply (. #‡(#‡e1^-1)); cases x; split; try assumption;
+ apply (if ?? (e ??)); assumption
+ | apply (. #‡(#‡e1)); cases x; split; try assumption;
+ apply (if ?? (e ^ -1 ??)); assumption]]
+qed.
+
+(* the same as □ for a basic pair *)
+definition minus_star_image: ∀U,V:REL. (U ⇒_\r1 V) × Ω^U ⇒_1 Ω^V.
+ intros; constructor 1;
+ [ apply (λr:U ⇒_\r1 V.λS: Ω \sup U. {y | ∀x:U. x ♮r y → x ∈ S});
+ intros; simplify; split; intros; apply f;
+ [ apply (. #‡e); assumption
+ | apply (. #‡e ^ -1); assumption]
+ | intros; split; simplify; intros; [ apply (. #‡e1^ -1); | apply (. #‡e1 )]
+ apply f; [ apply (if ?? (e ^ -1 ??)); | apply (if ?? (e ??)) ] assumption]
+qed.
+
+(* the same as Rest for a basic pair *)
+definition star_image: ∀U,V:REL. (U ⇒_\r1 V) × Ω^V ⇒_1 Ω^U.
+ intros; constructor 1;
+ [ apply (λr:U ⇒_\r1 V.λS: Ω \sup V. {x | ∀y:V. x ♮r y → y ∈ S});
+ intros; simplify; split; intros; apply f;
+ [ apply (. e ‡#); assumption
+ | apply (. e^ -1‡#); assumption]
+ | intros; split; simplify; intros; [ apply (. #‡e1 ^ -1); | apply (. #‡e1)]
+ apply f; [ apply (if ?? (e ^ -1 ??)); | apply (if ?? (e ??)) ] assumption]
+qed.
+
+(* the same as Ext for a basic pair *)
+definition minus_image: ∀U,V:REL. (U ⇒_\r1 V) × Ω^V ⇒_1 Ω^U.
+ intros; constructor 1;
+ [ apply (λr:U ⇒_\r1 V.λS: Ω \sup V. {x | (*∃x:U. x ♮r y ∧ x ∈ S*)
+ exT ? (λy:V.x ♮r y ∧ y ∈ S) });
+ intros; simplify; split; intro; cases e1; exists [1,3: apply w]
+ [ apply (. (e ^ -1‡#)‡#); assumption
+ | apply (. (e‡#)‡#); assumption]
+ | intros; split; simplify; intros; cases e2; exists [1,3: apply w]
+ [ apply (. #‡(#‡e1 ^ -1)); cases x; split; try assumption;
+ apply (if ?? (e ??)); assumption
+ | apply (. #‡(#‡e1)); cases x; split; try assumption;
+ apply (if ?? (e ^ -1 ??)); assumption]]
+qed.
+
+(* minus_image is the same as ext *)
+
+theorem image_id: ∀o,U. image o o (id1 REL o) U = U.
+ intros; unfold image; simplify; split; simplify; intros;
+ [ change with (a ∈ U);
+ cases e; cases x; change in f with (eq1 ? w a); apply (. f^-1‡#); assumption
+ | change in f with (a ∈ U);
+ exists; [apply a] split; [ change with (a = a); apply refl1 | assumption]]
+qed.
+
+theorem minus_star_image_id: ∀o,U. minus_star_image o o (id1 REL o) U = U.
+ intros; unfold minus_star_image; simplify; split; simplify; intros;
+ [ change with (a ∈ U); apply f; change with (a=a); apply refl1
+ | change in f1 with (eq1 ? x a); apply (. f1‡#); apply f]
+qed.
+
+alias symbol "compose" (instance 2) = "category1 composition".
+theorem image_comp: ∀A,B,C,r,s,X. image A C (r ∘ s) X = image B C r (image A B s X).
+ intros; unfold image; simplify; split; simplify; intros; cases e; clear e; cases x;
+ clear x; [ cases f; clear f; | cases f1; clear f1 ]
+ exists; try assumption; cases x; clear x; split; try assumption;
+ exists; try assumption; split; assumption.
+qed.