Set Implicit Arguments.
Definition funcomp {X Y Z} (g : Y -> Z) (f : X -> Y)  :=
fun x => g (f x).
Notation "f >> g" := (funcomp g f) (at level 50).
Fixpoint it (n: nat) {X: Type} (f: X -> X) (s: X) :=
match n with
| 0 => s
| S n => f (it n f s)
end.

Lemma it_commute n X f (s: X):
f (it n f s) = it n f (f s).