∀ {α : Type u_2} {𝕜 : Type u_3} {f : α → 𝕜} {S : Set α} [inst : TopologicalSpace α] [inst_1 : TopologicalSpace 𝕜]
  [T1Space 𝕜] [inst_3 : Ring 𝕜] [NoZeroDivisors 𝕜],
  IsPreconnected S → ContinuousOn f S → Set.EqOn (f ^ 2) 1 S → Set.EqOn f 1 S ∨ Set.EqOn f (-1) S