Skip to content

Commit

Permalink
chore(Equiv/Fintype): Fintype -> Finite (#10723)
Browse files Browse the repository at this point in the history
  • Loading branch information
urkud committed Feb 20, 2024
1 parent 2d37a85 commit 9b3394a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Mathlib/Logic/Equiv/Fintype.lean
Expand Up @@ -27,6 +27,7 @@ sides of the equivalence are `Fintype`s.
computational performance, since it operates by exhaustive search over the input `Fintype`s.
-/

section Fintype

variable {α β : Type*} [Fintype α] [DecidableEq β] (e : Equiv.Perm α) (f : α ↪ β)

Expand Down Expand Up @@ -92,15 +93,19 @@ theorem Equiv.Perm.viaFintypeEmbedding_sign [DecidableEq α] [Fintype β] :
simp [Equiv.Perm.viaFintypeEmbedding]
#align equiv.perm.via_fintype_embedding_sign Equiv.Perm.viaFintypeEmbedding_sign

end Fintype

namespace Equiv

/-- If `e` is an equivalence between two subtypes of a fintype `α`, `e.toCompl`
variable {α β : Type*} [Finite α]

/-- If `e` is an equivalence between two subtypes of a finite type `α`, `e.toCompl`
is an equivalence between the complement of those subtypes.
See also `Equiv.compl`, for a computable version when a term of type
`{e' : α ≃ α // ∀ x : {x // p x}, e' x = e x}` is known. -/
noncomputable def toCompl {α : Type*} [Finite α] {p q : α → Prop}
(e : { x // p x } ≃ { x // q x }) : { x // ¬p x } ≃ { x // ¬q x } := by
noncomputable def toCompl {p q : α → Prop} (e : { x // p x } ≃ { x // q x }) :
{ x // ¬p x } ≃ { x // ¬q x } := by
apply Classical.choice
cases nonempty_fintype α
classical
Expand Down

0 comments on commit 9b3394a

Please sign in to comment.