Zulip Chat Archive

Stream: Is there code for X?

Topic: Product of Euclidean spaces


Michael Rothgang (Feb 17 2025 at 09:16):

The following should be some fact about pi types (i.e., I would prove this first at that level, and then for PiLp): does mathlib really not have this yet?

def EuclideanSpace.prod (α β : Type*) :
    (EuclideanSpace  α) × (EuclideanSpace  β)  EuclideanSpace  (α  β) := sorry

(I'm interested in the corollary with α = Fin n and β = Fin m.)

Floris van Doorn (Feb 17 2025 at 09:20):

Isn't this docs#Equiv.sumArrowEquivProdArrow up to defeq? The Pi-version is docs#Equiv.sumPiEquivProdPi or docs#Equiv.prodPiEquivSumPi

Floris van Doorn (Feb 17 2025 at 09:20):

Found with

Floris van Doorn (Feb 17 2025 at 09:20):

@loogle Prod, Equiv, Sum

loogle (Feb 17 2025 at 09:20):

:search: Equiv.boolProdEquivSum, Equiv.sumArrowEquivProdArrow, and 61 more

Floris van Doorn (Feb 17 2025 at 09:21):

(it's not easy to search for Pi-types in Loogle, I think)

Floris van Doorn (Feb 17 2025 at 09:22):

docs#ContinuousLinearEquiv.sumPiEquivProdPi might also be relevant.

Michael Rothgang (Feb 17 2025 at 09:28):

Thanks, the first one did the trick!

Eric Wieser (Feb 17 2025 at 10:47):

I would guess you want WithLp on the LHS?

Michael Rothgang (Feb 17 2025 at 12:35):

I do in fact want a homeomorphism between these spaces, so I guess WithLp does help.

Eric Wieser (Feb 17 2025 at 12:40):

docs#LinearIsometryEquiv.piLpCurry may also be of interest

Michael Rothgang (Feb 17 2025 at 12:41):

I was just looking for that: this looks helpful, thanks!

Eric Wieser (Feb 17 2025 at 12:41):

Probably we should have LinearIsometryEquiv.sumPiLpEquivProdPiLp for the version you asked for

Michael Rothgang (Feb 17 2025 at 12:43):

That sounds exactly like what I need, indeed!

Michael Rothgang (Mar 16 2025 at 18:10):

Linking #22973 for posterity

Eric Wieser (Mar 16 2025 at 21:59):

Whoops, I'd forgotten that this is the second time this has been asked for

Eric Wieser (Mar 16 2025 at 22:01):

I've marked it "please adopt", since in the other thread about it I delegated filling the final two sorrys

Jihoon Hyun (Mar 17 2025 at 02:18):

The full proof has now been committed to #22973 !

Eric Wieser (Mar 23 2025 at 01:11):

The dependencies of that PR are now all resolved. Thanks for filling in the gaps, @Jihoon Hyun!

Ben Eltschig (May 04 2025 at 01:36):

I just came across this thread because I needed the exact thing Michael asked about - a continuous linear equivalence between EuclideanSpace 𝕜 (Fin (n + m)) and EuclideanSpace 𝕜 (Fin n) × EuclideanSpace 𝕜 (Fin m). Using the equivalence from #22973, this is what I ended up with:

def EuclideanSpace.sumEquivProd (𝕜 : Type*) [RCLike 𝕜] (ι κ : Type*) [Fintype ι] [Fintype κ] :
    EuclideanSpace 𝕜 (ι  κ) L[𝕜] EuclideanSpace 𝕜 ι × EuclideanSpace 𝕜 κ :=
  (PiLp.sumPiLpEquivProdLpPiLp 2 _).toContinuousLinearEquiv.trans <|
    WithLp.prodContinuousLinearEquiv _ _ _ _

def EuclideanSpace.finAddEquivProd {𝕜 : Type*} [RCLike 𝕜] {n m : } :
    EuclideanSpace 𝕜 (Fin (n + m)) L[𝕜] EuclideanSpace 𝕜 (Fin n) × EuclideanSpace 𝕜 (Fin m) :=
  (LinearIsometryEquiv.piLpCongrLeft 2 𝕜 𝕜 finSumFinEquiv.symm).toContinuousLinearEquiv.trans <|
    sumEquivProd 𝕜 _ _

Would it be a good idea to PR these two as well? They're not too hard to obtain from what's already there, but since this seems to be a relatively common scenario, maybe it's good to have them nonetheless

Eric Wieser (May 04 2025 at 02:12):

I think I'd claim these are more useful in the isometry forms we already somewhat have

Eric Wieser (May 04 2025 at 02:18):

Do we have the pieces to get the second one as an isometry?

Ben Eltschig (May 04 2025 at 02:20):

The second one isn't an isometry because binary products carry the supremum norm, just like arbitrary products do

Ben Eltschig (May 04 2025 at 02:20):

neither is the first

Ben Eltschig (May 04 2025 at 02:24):

For what I'm doing continuity suffices because all continuous linear maps between normed spaces are smooth - I assume that's the reason Michael needed continuity as well

Jihoon Hyun (May 04 2025 at 02:36):

They are also measurable equivalent, so I was planning to add that version of #22973 in the near future.

Eric Wieser (May 04 2025 at 03:05):

I'm aware that they're only isometries with an extra WithLp

Ben Eltschig (May 04 2025 at 03:31):

Right, sorry. I misinterpreted your question there

Ben Eltschig (May 04 2025 at 03:33):

It should be easy to get that second lemma as an isometry with an extra WithLp on the rhs - though the other form is more useful to me

Michael Rothgang (Jun 03 2025 at 15:41):

Cross-linking some discussion here


Last updated: Dec 20 2025 at 21:32 UTC