Utilities
Definition set_from_op {C : Type} (op : C→C→C) (A : C → Prop) (B : C→Prop) : C→Prop :=
fun c ⇒ ∃ a b, A a ∧ B b ∧ c = op a b.
fun c ⇒ ∃ a b, A a ∧ B b ∧ c = op a b.
The image of a function can be generically defined as follow.
Definition image {X Y : Type} (f : X → Y) (C : X → Prop) : Y → Prop :=
fun y ⇒ ∃ x : X, C x ∧ y = f x.
fun y ⇒ ∃ x : X, C x ∧ y = f x.
Iterates of a function.