Skip to content

Commit 57f72ee

Browse files
feat: add card_eq_NrRealPlaces_add_NrComplexPlaces (#11745)
We add `card_eq_NrRealPlaces_add_NrComplexPlaces: Fintype.card (InfinitePlace K).card = NrRealPlaces K + NrComplexPlaces K` for a number field `K`.
1 parent 3959ff3 commit 57f72ee

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Mathlib/NumberTheory/NumberField/Embeddings.lean

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,11 @@ theorem isReal_or_isComplex (w : InfinitePlace K) : IsReal w ∨ IsComplex w :=
415415
theorem ne_of_isReal_isComplex {w w' : InfinitePlace K} (h : IsReal w) (h' : IsComplex w') :
416416
w ≠ w' := fun h_eq ↦ not_isReal_iff_isComplex.mpr h' (h_eq ▸ h)
417417

418+
variable (K) in
419+
theorem disjoint_isReal_isComplex :
420+
Disjoint {(w : InfinitePlace K) | IsReal w} {(w : InfinitePlace K) | IsComplex w} :=
421+
Set.disjoint_iff.2 <| fun _ hw ↦ not_isReal_iff_isComplex.2 hw.2 hw.1
422+
418423
/-- The real embedding associated to a real infinite place. -/
419424
noncomputable def embedding_of_isReal {w : InfinitePlace K} (hw : IsReal w) : K →+* ℝ :=
420425
ComplexEmbedding.IsReal.embedding (isReal_iff.mp hw)
@@ -581,6 +586,12 @@ theorem card_real_embeddings :
581586
card { φ : K →+* ℂ // ComplexEmbedding.IsReal φ } = NrRealPlaces K := Fintype.card_congr mkReal
582587
#align number_field.infinite_place.card_real_embeddings NumberField.InfinitePlace.card_real_embeddings
583588

589+
theorem card_eq_nrRealPlaces_add_nrComplexPlaces :
590+
Fintype.card (InfinitePlace K) = NrRealPlaces K + NrComplexPlaces K := by
591+
convert Fintype.card_subtype_or_disjoint (IsReal (K := K)) (IsComplex (K := K))
592+
(disjoint_isReal_isComplex K) using 1
593+
exact (Fintype.card_of_subtype _ (fun w ↦ ⟨fun _ ↦ isReal_or_isComplex w, fun _ ↦ by simp⟩)).symm
594+
584595
theorem card_complex_embeddings :
585596
card { φ : K →+* ℂ // ¬ComplexEmbedding.IsReal φ } = 2 * NrComplexPlaces K := by
586597
suffices ∀ w : { w : InfinitePlace K // IsComplex w }, (Finset.univ.filter

0 commit comments

Comments
 (0)