Skip to content

Commit abb2282

Browse files
committed
feat(RingTheory/Localization/Integer): cardinality of finsetIntegerMultiple (leanprover-community#41688)
This PR proves injectivity of `integerMultiple` and computes the cardinality of `card_finsetIntegerMultiple`. Co-authored-by: tb65536 <thomas.l.browning@gmail.com>
1 parent ba2ac75 commit abb2282

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

Mathlib/RingTheory/Localization/Integer.lean

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ theorem map_integerMultiple {ι : Type*} (s : Finset ι) (f : ι → S) (i : s)
124124
algebraMap R S (integerMultiple M s f i) = commonDenom M s f • f i :=
125125
((exist_integer_multiples M s f).choose_spec _ i.prop).choose_spec
126126

127+
theorem integerMultipleMultiple_injective {ι : Type*} (s : Finset ι) (f : ι → S)
128+
(hf : Function.Injective f) : Function.Injective (integerMultiple M s f) := by
129+
intro i j h
130+
rw [← SetLike.coe_eq_coe, ← hf.eq_iff,
131+
← (IsLocalization.smul_bijective S (commonDenom M s f)).injective.eq_iff,
132+
← map_integerMultiple M s f i, ← map_integerMultiple M s f j, h]
133+
127134
/-- A choice of a common multiple of the denominators of a finite set of fractions. -/
128135
noncomputable def commonDenomOfFinset (s : Finset S) : M :=
129136
commonDenom M s id
@@ -146,4 +153,10 @@ theorem finsetIntegerMultiple_image [DecidableEq R] (s : Finset S) :
146153
· rintro ⟨x, hx, rfl⟩
147154
exact ⟨_, ⟨⟨x, hx⟩, s.mem_attach _, rfl⟩, map_integerMultiple M s id _⟩
148155

156+
@[simp]
157+
theorem card_finsetIntegerMultiple [DecidableEq R] (s : Finset S) :
158+
(finsetIntegerMultiple M s).card = s.card :=
159+
(Finset.card_image_of_injective _ (integerMultipleMultiple_injective M s id injective_id)).trans
160+
Finset.card_attach
161+
149162
end IsLocalization

0 commit comments

Comments
 (0)