Skip to content

Commit c49b5e1

Browse files
committed
feat: add Equiv.prodSubtypeFstEquivSubtypeProd (#12802)
See [Zulip](https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/A.20basic.20equivalence/near/437968727) Co-authored-by: Xavier Roblot <46200072+xroblot@users.noreply.github.com>
1 parent 6edd89b commit c49b5e1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Mathlib/Logic/Equiv/Basic.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,6 +1380,14 @@ def subtypeProdEquivProd {p : α → Prop} {q : β → Prop} :
13801380
right_inv := fun ⟨⟨_, _⟩, ⟨_, _⟩⟩ => rfl
13811381
#align equiv.subtype_prod_equiv_prod Equiv.subtypeProdEquivProd
13821382

1383+
/-- A subtype of a `Prod` that depends only on the first component is equivalent to the
1384+
corresponding subtype of the first type times the second type. -/
1385+
def prodSubtypeFstEquivSubtypeProd {p : α → Prop} : {s : α × β // p s.1} ≃ {a // p a} × β where
1386+
toFun x := ⟨⟨x.1.1, x.2⟩, x.1.2
1387+
invFun x := ⟨⟨x.1.1, x.2⟩, x.1.2
1388+
left_inv _ := rfl
1389+
right_inv _ := rfl
1390+
13831391
/-- A subtype of a `Prod` is equivalent to a sigma type whose fibers are subtypes. -/
13841392
def subtypeProdEquivSigmaSubtype (p : α → β → Prop) :
13851393
{ x : α × β // p x.1 x.2 } ≃ Σa, { b : β // p a b } where

0 commit comments

Comments
 (0)