Theorem: NumberField.InfinitePlace.card_filter_mk_eq
File: Mathlib/NumberTheory/NumberField/Embeddings.lean

tactic: conv_lhs =>
  congr; congr; ext
  rw [← mk_embedding w, mk_eq_iff, ComplexEmbedding.conjugate, star_involutive.eq_iff]
state_before: k : Type u_1
inst✝³ : Field k
K : Type u_2
inst✝² : Field K
F : Type u_3
inst✝¹ : Field F
inst✝ : NumberField K
w : InfinitePlace K
⊢ (Finset.filter (fun φ => mk φ = w) Finset.univ).card = w.mult
state_after: k : Type u_1
inst✝³ : Field k
K : Type u_2
inst✝² : Field K
F : Type u_3
inst✝¹ : Field F
inst✝ : NumberField K
w : InfinitePlace K
⊢ (Finset.filter (fun x => x = w.embedding ∨ x = star w.embedding) Finset.univ).card = w.mult

tactic: simp_rw [Finset.filter_or, Finset.filter_eq' _ (embedding w),
  Finset.filter_eq' _ (ComplexEmbedding.conjugate (embedding w)),
  Finset.mem_univ, ite_true, mult]
state_before: k : Type u_1
inst✝³ : Field k
K : Type u_2
inst✝² : Field K
F : Type u_3
inst✝¹ : Field F
inst✝ : NumberField K
w : InfinitePlace K
⊢ (Finset.filter (fun x => x = w.embedding ∨ x = star w.embedding) Finset.univ).card = w.mult
state_after: k : Type u_1
inst✝³ : Field k
K : Type u_2
inst✝² : Field K
F : Type u_3
inst✝¹ : Field F
inst✝ : NumberField K
w : InfinitePlace K
⊢ ({w.embedding} ∪ {ComplexEmbedding.conjugate w.embedding}).card = if w.IsReal then 1 else 2

tactic: split_ifs with hw
state_before: k : Type u_1
inst✝³ : Field k
K : Type u_2
inst✝² : Field K
F : Type u_3
inst✝¹ : Field F
inst✝ : NumberField K
w : InfinitePlace K
⊢ ({w.embedding} ∪ {ComplexEmbedding.conjugate w.embedding}).card = if w.IsReal then 1 else 2
state_after: case pos
k : Type u_1
inst✝³ : Field k
K : Type u_2
inst✝² : Field K
F : Type u_3
inst✝¹ : Field F
inst✝ : NumberField K
w : InfinitePlace K
hw : w.IsReal
⊢ ({w.embedding} ∪ {ComplexEmbedding.conjugate w.embedding}).card = 1

case neg
k : Type u_1
inst✝³ : Field k
K : Type u_2
inst✝² : Field K
F : Type u_3
inst✝¹ : Field F
inst✝ : NumberField K
w : InfinitePlace K
hw : ¬w.IsReal
⊢ ({w.embedding} ∪ {ComplexEmbedding.conjugate w.embedding}).card = 2

tactic: rw [ComplexEmbedding.isReal_iff.mp (isReal_iff.mp hw), Finset.union_idempotent,
  Finset.card_singleton]
state_before: case pos
k : Type u_1
inst✝³ : Field k
K : Type u_2
inst✝² : Field K
F : Type u_3
inst✝¹ : Field F
inst✝ : NumberField K
w : InfinitePlace K
hw : w.IsReal
⊢ ({w.embedding} ∪ {ComplexEmbedding.conjugate w.embedding}).card = 1
state_after: no goals

tactic: refine Finset.card_pair ?_
state_before: case neg
k : Type u_1
inst✝³ : Field k
K : Type u_2
inst✝² : Field K
F : Type u_3
inst✝¹ : Field F
inst✝ : NumberField K
w : InfinitePlace K
hw : ¬w.IsReal
⊢ ({w.embedding} ∪ {ComplexEmbedding.conjugate w.embedding}).card = 2
state_after: case neg
k : Type u_1
inst✝³ : Field k
K : Type u_2
inst✝² : Field K
F : Type u_3
inst✝¹ : Field F
inst✝ : NumberField K
w : InfinitePlace K
hw : ¬w.IsReal
⊢ w.embedding ≠ ComplexEmbedding.conjugate w.embedding

tactic: rwa [Ne, eq_comm, ← ComplexEmbedding.isReal_iff, ← isReal_iff]
state_before: case neg
k : Type u_1
inst✝³ : Field k
K : Type u_2
inst✝² : Field K
F : Type u_3
inst✝¹ : Field F
inst✝ : NumberField K
w : InfinitePlace K
hw : ¬w.IsReal
⊢ w.embedding ≠ ComplexEmbedding.conjugate w.embedding
state_after: no goals