Skip to content

Commit

Permalink
feat: add Equiv.prodSubtypeFstEquivSubtypeProd (#12802)
Browse files Browse the repository at this point in the history
  • Loading branch information
2 people authored and apnelson1 committed May 12, 2024
1 parent eaecfce commit 4e68c73
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Mathlib/Logic/Equiv/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1380,6 +1380,14 @@ def subtypeProdEquivProd {p : α → Prop} {q : β → Prop} :
right_inv := fun ⟨⟨_, _⟩, ⟨_, _⟩⟩ => rfl
#align equiv.subtype_prod_equiv_prod Equiv.subtypeProdEquivProd

/-- A subtype of a `Prod` that depends only on the first component is equivalent to the
corresponding subtype of the first type times the second type. -/
def prodSubtypeFstEquivSubtypeProd {p : α → Prop} : {s : α × β // p s.1} ≃ {a // p a} × β where
toFun x := ⟨⟨x.1.1, x.2⟩, x.1.2
invFun x := ⟨⟨x.1.1, x.2⟩, x.1.2
left_inv _ := rfl
right_inv _ := rfl

/-- A subtype of a `Prod` is equivalent to a sigma type whose fibers are subtypes. -/
def subtypeProdEquivSigmaSubtype (p : α → β → Prop) :
{ x : α × β // p x.1 x.2 } ≃ Σa, { b : β // p a b } where
Expand Down

0 comments on commit 4e68c73

Please sign in to comment.