Zulip Chat Archive

Stream: Is there code for X?

Topic: Composition with injective function is an injective operatio


Heather Macbeth (Aug 10 2021 at 15:13):

Is there a little collection of lemmas about injective functions somewhere? Where can this go?

lemma function.injective.comp_left {α β γ : Type*} {f₁ f₂ : α  β} {g : β  γ}
  (hg : function.injective g) (hgf : g  f₁ = g  f₂) : f₁ = f₂ :=
begin
  refine funext (λ i, hg _),
  exact congr_fun hgf i,
end

Yakov Pechersky (Aug 10 2021 at 15:15):

Maybe have congr somewhere in the name?

Anne Baanen (Aug 10 2021 at 15:15):

Isn't there already something like docs#function.injective.of_comp? Sorry, mis-parsed the statement.

Anne Baanen (Aug 10 2021 at 15:17):

But the logic.function.basic file seems appropriate

Eric Wieser (Aug 10 2021 at 15:26):

Another version of that statement would be:

lemma function.injective.comp_left {α β γ : Type*} {g : β  γ}
  (hg : function.injective g) : function.injective (() g : (α  β)  (α  γ)) :=
λ f₁ f₂ hgf, funext $ λ i, hg (congr_fun hgf i : _)

Last updated: Dec 20 2023 at 11:08 UTC