Skip to content

Commit

Permalink
chore: three more Fintype -> Finite replacements (#15283)
Browse files Browse the repository at this point in the history
Found by the linter in #10235.
  • Loading branch information
grunweg authored and bjoernkjoshanssen committed Sep 11, 2024
1 parent 539f732 commit da377f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Mathlib/Data/Finset/Density.lean
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,10 @@ lemma dens_sdiff_add_dens_inter (s t : Finset α) : dens (s \ t) + dens (s ∩ t
lemma dens_inter_add_dens_sdiff (s t : Finset α) : dens (s ∩ t) + dens (s \ t) = dens s := by
rw [add_comm, dens_sdiff_add_dens_inter]

lemma dens_filter_add_dens_filter_not_eq_dens
lemma dens_filter_add_dens_filter_not_eq_dens {α : Type*} [Fintype α] {s : Finset α}
(p : α → Prop) [DecidablePred p] [∀ x, Decidable (¬p x)] :
dens (s.filter p) + dens (s.filter fun a ↦ ¬ p a) = dens s := by
classical
rw [← dens_union_of_disjoint (disjoint_filter_filter_neg ..), filter_union_filter_neg_eq]

lemma dens_union_le (s t : Finset α) : dens (s ∪ t) ≤ dens s + dens t :=
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/Fintype/CardEmbedding.lean
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ theorem card_embedding_eq {α β : Type*} [Fintype α] [Fintype β] [emb : Finty

/-- The cardinality of embeddings from an infinite type to a finite type is zero.
This is a re-statement of the pigeonhole principle. -/
theorem card_embedding_eq_of_infinite {α β : Type*} [Infinite α] [Fintype β] [Fintype (α ↪ β)] :
theorem card_embedding_eq_of_infinite {α β : Type*} [Infinite α] [Finite β] [Fintype (α ↪ β)] :
‖α ↪ β‖ = 0 :=
card_eq_zero

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/LinearAlgebra/Matrix/GeneralLinearGroup/Card.lean
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ open LinearMap
section LinearIndependent

variable {K V : Type*} [DivisionRing K] [AddCommGroup V] [Module K V]
variable [Fintype K] [Fintype V]
variable [Fintype K] [Finite V]

local notation "q" => Fintype.card K
local notation "n" => FiniteDimensional.finrank K V
Expand Down

0 comments on commit da377f4

Please sign in to comment.