Zulip Chat Archive

Stream: new members

Topic: various forms of surjectivity


Daan van Gent (Oct 21 2022 at 14:24):

I am looking for the 'canonical proof' of the following lemma

lemma eq_of_range_eq_top {A B : submodule R M} (hAB : A  B) : A = B  linear_map.range (of_le hAB) = 

This should best be proven from a lemma like

lemma eq_of_im_inc_eq_top {α : Type*} {a b: set α} (hab : a  b) : a = b  image ( inclusion hab )  = 

where we might use

lemma range_eq_top_iff_surj {α β : Type*} (f: α  β) : f ''  =   function.surjective f
  • First of all I have trouble finding any of these lemmas in mathlib, but I would not be surprised if the latter two exist.
  • Secondly, I have a proof for all three lemmas which to me seem longer than they should be. Maybe you have some suggestions if the lemma does not exist in mathlib already. For example
  • Lastly, I wonder if there is an easy way to prove the first lemma from the second. It feels like this should be trivial, but I keep having to reduce to sets and coercion.

Junyan Xu (Oct 21 2022 at 15:09):

For the last one there is docs#set.image_univ and function.surjective.range_eq. Maybe you didn't find them because you were looking for ⊤ instead of the usual spelling ("simp normal form") set.univ.

Junyan Xu (Oct 21 2022 at 15:23):

For the second one, here is a pure rewrite proof:

import data.set.basic
open set
lemma eq_of_im_inc_eq_top {α : Type*} {a b: set α} (hab : a  b) :
  a = b  image (inclusion hab)  =  :=
begin
  rw le_iff_subset at hab,
  simp_rw [top_eq_univ, image_univ, range_inclusion, eq_univ_iff_forall, set_coe.forall,
    mem_set_of, subtype.coe_mk,  subset_def, subset.antisymm_iff, and_iff_right hab],
end

The canonical spelling of le (≤) for sets is subset (⊆); you probably had trouble finding relevant lemmas because you didn't use the preferred spelling.

Daan van Gent (Oct 21 2022 at 15:39):

wow thanks! that proof is pretty neat. Using your suggestions of usual spelling, I found

theorem range_iff_surjective {α β : Type*} (f: α  β) : range f = univ  function.surjective f

I did not expect this would make such a difference for library_search and suggest.

Alex J. Best (Oct 21 2022 at 15:40):

You can try library_search! which should use a weaker version of equality when searching for matches, this may see through these differences, but it is slower because of this.


Last updated: Dec 20 2023 at 11:08 UTC