Zulip Chat Archive

Stream: Is there code for X?

Topic: iterates of function with finite domain


Siddharth Bhat (Oct 09 2024 at 22:36):

Let f:AAf : A \to A be a function with A=n|A| = n. I want to show that if fN(x0)=yf^N(x_0) = y for N>AN > |A|, then there must be a k<Nk < N such that fk(x)=yf^k(x) = y. Does this exist in mathlib?

The proof that I would perform on paper is to build a graph with AA as the vertex set, and (a,a)E(a, a') \in E iff f(a)=af(a') = a.
Then what we have is a path p[x0,f(x0),f2(x0),,fN(x0)=y]p \equiv [x_0, f(x_0), f^2(x_0), \dots, f^N(x_0) = y]. We can thus find a simple path pp' of length k<Nk < N from the starting vertex x0x_0 to yy by deleting cycles. But this requires a passage through graphs that I am hoping to avoid.

Ruben Van de Velde (Oct 09 2024 at 22:40):

It seems plausible, stated with docs#Nat.iterate

Siddharth Bhat (Oct 09 2024 at 22:41):

Right, I found Nat.iterate, but it's super unclear to me how to actually prove it without building the graph and talking about paths and simple paths :sweat_smile: I feel like there is a simple pigenhole like proof I am missing.

Ruben Van de Velde (Oct 09 2024 at 22:44):

Oh, unless docs#Function.IsPeriodicPt is what you're looking for

Siddharth Bhat (Oct 09 2024 at 22:45):

Sadly not, that requires me to recur to the starting point xx

Siddharth Bhat (Oct 09 2024 at 22:45):

I want to reach an arbitrary point yy

Damiano Testa (Oct 09 2024 at 22:45):

Those would be called "pre-periodic" points in maths.

Siddharth Bhat (Oct 09 2024 at 22:46):

Aha, I may have more luck if I look for generic facts about endomorphisms.

Siddharth Bhat (Oct 09 2024 at 23:00):

Hm, no such luck.

Dan Velleman (Oct 09 2024 at 23:16):

Siddharth Bhat said:

I feel like there is a simple pigenhole like proof I am missing.

Can't you use pigeonhole to argue that x0,f(x0),f2(x0),,fN(x0)x_0, f(x_0), f^2(x_0), \ldots, f^N(x_0) cannot all be distinct? So there are ii and jj with i<jNi < j \le N such that fi(x0)=fj(x0)f^i(x_0) = f^j(x_0). Then prove by induction that for all NjN \ge j, there is some k<jk < j such that fN(x0)=fk(x0)f^N(x_0) = f^k(x_0).

Siddharth Bhat (Oct 09 2024 at 23:18):

Yes, I believe this will work :) I guess I now need to find pigeonhole in mathlib?

Timo Carlin-Burns (Oct 10 2024 at 01:06):

docs#Fintype.exists_ne_map_eq_of_card_lt is one version of pigeonhole


Last updated: May 02 2025 at 03:31 UTC