Zulip Chat Archive

Stream: Is there code for X?

Topic: Bijections and Inverses


Mark Gerads (Feb 11 2022 at 21:39):

I would like code for this lemma and decided to check if someone already did something similar (and probably more general)

/-- order of inverse does not matter when canceling to the identity function -/
lemma inv_order_not_matter
      (perm :   ) (perm_inv :   ) (h_inv :  (k : ), (perm (perm_inv k) = k))
      :  (k : ), (perm_inv (perm k) = k) :=

Yury G. Kudryashov (Feb 11 2022 at 21:41):

This lemma is wrong. Take docs#nat.pred and docs#nat.succ

Yaël Dillies (Feb 11 2022 at 21:42):

You need perm_inv to be injective.

Mark Gerads (Feb 11 2022 at 21:43):

Okay, so what is the proper way to declare a bijection on \N and the inverse function?

Yury G. Kudryashov (Feb 11 2022 at 21:43):

Have a look at docs#equiv

Yury G. Kudryashov (Feb 11 2022 at 21:44):

@Yaël Dillies you mean surjective

Yaël Dillies (Feb 11 2022 at 21:45):

perm surjective

Mark Gerads (Feb 11 2022 at 21:46):

The reason I want a bijection on \N is so I can attempt to show that every reordering of a Cauchy sequence is another Cauchy sequence with the same limit.

Yaël Dillies (Feb 11 2022 at 21:46):

No but perm being injective is definitely enough.

Yaël Dillies (Feb 11 2022 at 21:47):

Argh, confused

Yury G. Kudryashov (Feb 11 2022 at 21:56):

You should prove that for a permutation of natural numbers, map f at_top = at_top.

Yury G. Kudryashov (Feb 11 2022 at 21:58):

This follows from the fact that any injective map tends to infinity

Yury G. Kudryashov (Feb 11 2022 at 22:05):

And I would prove that for docs#filter.cofinite and any pair of types

Mark Gerads (Feb 11 2022 at 22:25):

Is this properly stated?

/-- rearranging a Cauchy sequence results in a sequence that is also Cauchy with the same limit -/
lemma rearranging_cauchy_also_cauchy
      (perm :   ) (perm_inv :   )
      (h_inv_0 :  (k : ), (perm (perm_inv k) = k))
      (h_inv_1 :  (k : ), (perm_inv (perm k) = k))
      (cs :   ) (h_cs_cauchy : is_cau_seq abs cs)
      : is_cau_seq abs (λ (k:), cs (perm k)) :=

I actually wanted cs to be a complex-valued Cauchy sequence, but I don't know how to do that with mathlib.

Eric Wieser (Feb 11 2022 at 22:30):

Why not use perm ℕ (docs#equiv.perm)?

Mark Gerads (Feb 11 2022 at 22:31):

Because I am a newb who did not know.

Eric Wieser (Feb 11 2022 at 22:32):

Note that's juts another spelling for the equiv that Yury mentioned above

Mark Gerads (Feb 11 2022 at 22:41):

I just figured out Complex-valued Cauchy sequences.

/-- rearranging a Cauchy sequence results in a sequence that is also Cauchy with the same limit -/
lemma rearranging_cauchy_also_cauchy
      (perm :   ) (perm_inv :   )
      (h_inv_0 :  (k : ), (perm (perm_inv k) = k))
      (h_inv_1 :  (k : ), (perm_inv (perm k) = k))
      (cs :   ) (h_cs_cauchy : is_cau_seq complex.abs cs)
      : is_cau_seq complex.abs (λ (k:), cs (perm k)) :=

Mark Gerads (Feb 11 2022 at 22:42):

And have yet to figure out how to use equiv.perm.

Mark Gerads (Feb 11 2022 at 22:45):

Is this correct?

/-- rearranging a Cauchy sequence results in a sequence that is also Cauchy with the same limit -/
lemma rearranging_cauchy_also_cauchy
      (perm : equiv.perm )
      (cs :   ) (h_cs_cauchy : is_cau_seq complex.abs cs)
      : is_cau_seq complex.abs (λ (k:), cs (perm k)) :=

Mark Gerads (Feb 11 2022 at 22:46):

That looks like it might be wrong or right.

Heather Macbeth (Feb 11 2022 at 22:50):

is_cau_seq is an "implementation detail", you should use docs#cauchy_seq which has more lemmas.

Yury G. Kudryashov (Feb 11 2022 at 23:37):

Here is the statement:

lemma cauchy_seq.comp_injective {α : Type*} [uniform_space α] {u :   α} (hu : cauchy_seq u)
  {f :   } (hf : function.injective f) : cauchy_seq (u  f)

Yury G. Kudryashov (Feb 11 2022 at 23:38):

And the proof is

Mark Gerads (Feb 12 2022 at 00:09):

This is not in mathlib yet then? @Yury G. Kudryashov Would you be willing to submit your proof to mathlib? I am unable to make a better proof for the statement cauchy_seq.comp_injective.

Yury G. Kudryashov (Feb 12 2022 at 00:27):

#11986

Mark Gerads (Feb 12 2022 at 00:32):

It might be good to include proof that the limit is unchanged by the permutation. I have a 'proof' in this PDF https://drive.google.com/file/d/1o0FP9prFpbGa6b7zvcOJeb37NldaNg-x/view?usp=sharing , but do not know if LEAN will accept it.

Mark Gerads (Feb 12 2022 at 00:44):

I'm looking at cau_seq.lim right now, trying to figure out how to state that the limits of the 2 Cauchy Sequences are equal.


Last updated: Dec 20 2023 at 11:08 UTC