Zulip Chat Archive

Stream: Is there code for X?

Topic: Prod embedding from function


Aaron Liu (May 02 2025 at 21:08):

Do we have any of these?

import Mathlib.Logic.Embedding.Basic

example {α β : Type*} (f : α  β) : α  α × β where
  toFun a := a, f a
  inj' _ _ := congrArg Prod.fst

example {α β : Type*} (f : β  α) : β  α × β where
  toFun b := f b, b
  inj' _ _ := congrArg Prod.snd

example {α : Type*} {β : α  Type*} (f : (a : α)  β a) : α  (a : α) × β a where
  toFun a := a, f a
  inj' _ _ := congrArg Sigma.fst

Bhavik Mehta (May 02 2025 at 21:33):

Not as far as I know, there's docs#Function.Embedding.sectL and docs#Function.Embedding.prodMap but neither of these are quite what you're looking for (I note your first is a generalisation of sectL though)


Last updated: Dec 20 2025 at 21:32 UTC