Zulip Chat Archive

Stream: maths

Topic: Proof of Cantor Injective?


Joseph O (May 01 2022 at 15:11):

Here is a proof of Cantor's theorem for surjective functions. Is there a similar document for the proof that for a set A, and a function f which takes in a subset of A and returns an element of A, f cant be injective?

Riccardo Brasca (May 01 2022 at 15:21):

I would do something like the following. Let f ⁣:P(A)Af \colon \mathcal{P}(A) \to A be injective. Let B={XA such that f(X)∉X}B = \{X \subseteq A \text{ such that } f(X) \not \in X\} and consider B={f(Y) for YB}P(A)B' = \{ f(Y) \text { for } Y \in B \} \in \mathcal{P}(A). Now finish by considering the two cases bBb \in B' or not.

Joseph O (May 01 2022 at 15:23):

is B a set of subsets?

Riccardo Brasca (May 01 2022 at 15:24):

Yes, I don't see any ambiguity in the notation. BB is the set whose elements are subsets XAX \subseteq A such that f(X)∉Xf(X) \not \in X.

Joseph O (May 01 2022 at 15:29):

set B := {x : set α | x  α  f x  x},

Seems like a is supposed to be of type set a

Riccardo Brasca (May 01 2022 at 15:35):

You're again writing Lean code before having understood the math.

BTW since you have already proved that there are no surjective function in the other directions, you can prove, in general, that there a surjective f ⁣:XYf \colon X \to Y iff there is an injective $$$g \colon Y \to X$.

Joseph O (May 01 2022 at 15:42):

Riccardo Brasca said:

You're again writing Lean code before having understood the math.

BTW since you have already proved that there are no surjective function in the other directions, you can prove, in general, that there a surjective f ⁣:XYf \colon X \to Y iff there is an injective $$$g \colon Y \to X$.

Instead of proving cantor_injective?

Joseph O (May 01 2022 at 15:47):

Btw, if x is of type set α, is it necessary to say x ⊆ α

Joseph O (May 01 2022 at 15:49):

Like in the lean code

Eric Wieser (May 01 2022 at 15:53):

Note that this was already discussed in new members, so anyone replying here with lean code should probably read that first

Eric Wieser (May 01 2022 at 15:54):

Joseph O said:

Btw, if x is of type set α, is it necessary to say x ⊆ α

x ⊆ α is a type error. It is necessary to not say type errors.

Joseph O (May 01 2022 at 16:03):

Riccardo Brasca said:

I would do something like the following. Let f ⁣:P(A)Af \colon \mathcal{P}(A) \to A be injective. Let B={XA such that f(X)∉X}B = \{X \subseteq A \text{ such that } f(X) \not \in X\} and consider B={f(Y) for YB}P(A)B' = \{ f(Y) \text { for } Y \in B \} \in \mathcal{P}(A). Now finish by considering the two cases bBb \in B' or not.

Im a bit confused on how to show that B' is in P(A)\mathcal{P}(A) in lean

Joseph O (May 01 2022 at 16:06):

My current translation of B' is

set B' := {y : α |  x : set α, x  B},

Eric Wieser (May 01 2022 at 16:08):

That's in 𝒫 A by definition

Eric Wieser (May 01 2022 at 16:08):

The goal view says B : set α, right?

Joseph O (May 01 2022 at 16:08):

yes

Eric Wieser (May 01 2022 at 16:09):

In type theory P(A)\mathcal{P}(A) is often written set A

Joseph O (May 01 2022 at 16:10):

Yes I am aware of that, but doing set B' := {y : α | ∃ x : set α, x ∈ B} ∈ set α, doesn't give anything fruitful

Joseph O (May 01 2022 at 16:14):

Its failing to synthesize has_mem (set α) Type

Joseph O (May 01 2022 at 16:23):

Idea why?

Joseph O (May 01 2022 at 16:25):

Here is my proof so far:

theorem cantor_injective {α : Type} (f : set α  α) :
  ¬function.injective f :=
begin
  set B := {x : set α | f x  x},
  set B' := {y : α |  x : set α, f x = y  x  B},
  by_contradiction,
  have :  (b : α), b  B',
  { sorry, },
  { sorry, }
end

Jireh Loreaux (May 01 2022 at 16:25):

Drop the ∈ set α. Then it should work and in the infoview you should see B' : set α.

Jireh Loreaux (May 01 2022 at 16:27):

Can you fill those sorrys with a mathematical proof (not a Lean proof)?

Joseph O (May 01 2022 at 16:48):

My take on the first sorry is that b ∈ B' has the type α ∈ set α and that should be true?
Not sure how to put this into lean code

Kyle Miller (May 01 2022 at 16:55):

Here's an unobfuscated version of docs#function.cantor_injective

theorem cantor_injective {α : Type} (f : set α  α) :
  ¬function.injective f :=
begin
  intro i,
  let g : α  set α := λ a, { b |  (s : set α), a = f s  b  s },
  apply function.cantor_surjective g,
  have : function.right_inverse f g,
  { intro s,
    ext a,
    split,
    { intro h,
      apply h,
      refl, },
    { intros h' s' e,
      specialize i e,
      cases i,
      exact h' } },
  exact function.right_inverse.surjective this,
end

Last updated: Dec 20 2023 at 11:08 UTC