proposition: Lemma segment_can_le_continuous a b f g : a <= b -> {within `[a, b], continuous f} -> {in `[a, b], cancel f g} -> {within `[(f a), (f b)], continuous g}.
proof: Proof. move=> aLb ctf; rewrite continuous_subspace_in => fK x /set_mem /= xab. have faLfb : f a <= f b by rewrite (itvP xab). apply: segment_inc_surj_continuous; first exact: segment_can_le. rewrite !fK ?bound_itvE//=; apply: (@can_surj _ _ f); first by rewrite mem_setE. exact/image_subP/mem_inc_segment/segment_continuous_inj_le/(can_in_inj fK). Qed.
imports: mathcomp(all_ssreflect ssralg ssrint ssrnum finmap) mathcomp(matrix interval zmodp vector fieldext falgebra) mathcomp(mathcomp_extra boolp classical_sets functions) mathcomp(cardinality) ereal reals signed topology prodnormedzmodule normedtype derive sequences real_interval HB(structures)