agda / cubical

An experimental library for Cubical Agda
https://agda.github.io/cubical/Cubical.README.html
Other
454 stars 139 forks source link

Naive injectivity implies isEmbedding even if only B is a set #874

Closed MatthiasHu closed 2 years ago

MatthiasHu commented 2 years ago

This PR removes an unnecessary assumption from injEmbedding in Cubical.Functions.Embedding. The naive definition of injectivity, ∀{w x} → f w ≡ f x → w ≡ x, is already sufficient for f to be an embedding if B is a set, we don't need that A is a set.

I also deleted retractableIntoSet→isEmbedding, because it shows the same thing under the stronger assumption that f has a retract.

MatthiasHu commented 2 years ago

Wait a second, every function that admits a retract is an embedding, right? So retractableIntoSet→isEmbedding had an unnecessary isSet assumption too...

MatthiasHu commented 2 years ago

No, I was wrong: for example, Unit -> S^1 admits a retract but is not an embedding.