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

tactic: letI := Module.Finite.of_restrictScalars_finite ℚ k K
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
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
⊢ (filter (IsUnramified k) univ).card = (filter (IsUnramifiedIn K) univ).card * finrank k K
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
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
⊢ (filter (IsUnramified k) univ).card = (filter (IsUnramifiedIn K) univ).card * finrank k K

tactic: refine sum_congr rfl (fun w 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
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
⊢ ∑ a ∈ filter (IsUnramifiedIn K) univ,
      (filter (fun x => x.comap (algebraMap k K) = a) (filter (IsUnramified k) univ)).card =
    ∑ _x ∈ filter (IsUnramifiedIn K) univ, Fintype.card (K ≃ₐ[k] K)
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
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace k
hw : w ∈ filter (IsUnramifiedIn K) univ
⊢ (filter (fun x => x.comap (algebraMap k K) = w) (filter (IsUnramified k) univ)).card = Fintype.card (K ≃ₐ[k] K)

tactic: obtain ⟨w, rfl⟩ := comap_surjective (K := K) w
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
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace k
hw : w ∈ filter (IsUnramifiedIn K) univ
⊢ (filter (fun x => x.comap (algebraMap k K) = w) (filter (IsUnramified k) univ)).card = Fintype.card (K ≃ₐ[k] K)
state_after: case intro
k : Type u_1
inst✝⁹ : Field k
K : Type u_2
inst✝⁸ : Field K
F : Type u_3
inst✝⁷ : Field F
inst✝⁶ : NumberField K
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace K
hw : (fun x => x.comap (algebraMap k K)) w ∈ filter (IsUnramifiedIn K) univ
⊢ (filter (fun x => x.comap (algebraMap k K) = (fun x => x.comap (algebraMap k K)) w)
        (filter (IsUnramified k) univ)).card =
    Fintype.card (K ≃ₐ[k] K)

tactic: simp only [mem_univ, forall_true_left, mem_filter, true_and] at hw
state_before: case intro
k : Type u_1
inst✝⁹ : Field k
K : Type u_2
inst✝⁸ : Field K
F : Type u_3
inst✝⁷ : Field F
inst✝⁶ : NumberField K
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace K
hw : (fun x => x.comap (algebraMap k K)) w ∈ filter (IsUnramifiedIn K) univ
⊢ (filter (fun x => x.comap (algebraMap k K) = (fun x => x.comap (algebraMap k K)) w)
        (filter (IsUnramified k) univ)).card =
    Fintype.card (K ≃ₐ[k] K)
state_after: case intro
k : Type u_1
inst✝⁹ : Field k
K : Type u_2
inst✝⁸ : Field K
F : Type u_3
inst✝⁷ : Field F
inst✝⁶ : NumberField K
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace K
hw : IsUnramifiedIn K (w.comap (algebraMap k K))
⊢ (filter (fun x => x.comap (algebraMap k K) = (fun x => x.comap (algebraMap k K)) w)
        (filter (IsUnramified k) univ)).card =
    Fintype.card (K ≃ₐ[k] K)

tactic: trans Finset.card (MulAction.orbit (K ≃ₐ[k] K) w).toFinset
state_before: case intro
k : Type u_1
inst✝⁹ : Field k
K : Type u_2
inst✝⁸ : Field K
F : Type u_3
inst✝⁷ : Field F
inst✝⁶ : NumberField K
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace K
hw : IsUnramifiedIn K (w.comap (algebraMap k K))
⊢ (filter (fun x => x.comap (algebraMap k K) = (fun x => x.comap (algebraMap k K)) w)
        (filter (IsUnramified k) univ)).card =
    Fintype.card (K ≃ₐ[k] K)
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
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace K
hw : IsUnramifiedIn K (w.comap (algebraMap k K))
⊢ (filter (fun x => x.comap (algebraMap k K) = (fun x => x.comap (algebraMap k K)) w)
        (filter (IsUnramified k) univ)).card =
    (MulAction.orbit (K ≃ₐ[k] K) w).toFinset.card

k : Type u_1
inst✝⁹ : Field k
K : Type u_2
inst✝⁸ : Field K
F : Type u_3
inst✝⁷ : Field F
inst✝⁶ : NumberField K
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace K
hw : IsUnramifiedIn K (w.comap (algebraMap k K))
⊢ (MulAction.orbit (K ≃ₐ[k] K) w).toFinset.card = Fintype.card (K ≃ₐ[k] K)

tactic: congr
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
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace K
hw : IsUnramifiedIn K (w.comap (algebraMap k K))
⊢ (filter (fun x => x.comap (algebraMap k K) = (fun x => x.comap (algebraMap k K)) w)
        (filter (IsUnramified k) univ)).card =
    (MulAction.orbit (K ≃ₐ[k] K) w).toFinset.card
state_after: case e_s
k : Type u_1
inst✝⁹ : Field k
K : Type u_2
inst✝⁸ : Field K
F : Type u_3
inst✝⁷ : Field F
inst✝⁶ : NumberField K
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace K
hw : IsUnramifiedIn K (w.comap (algebraMap k K))
⊢ filter (fun x => x.comap (algebraMap k K) = (fun x => x.comap (algebraMap k K)) w) (filter (IsUnramified k) univ) =
    (MulAction.orbit (K ≃ₐ[k] K) w).toFinset

tactic: ext w'
state_before: case e_s
k : Type u_1
inst✝⁹ : Field k
K : Type u_2
inst✝⁸ : Field K
F : Type u_3
inst✝⁷ : Field F
inst✝⁶ : NumberField K
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace K
hw : IsUnramifiedIn K (w.comap (algebraMap k K))
⊢ filter (fun x => x.comap (algebraMap k K) = (fun x => x.comap (algebraMap k K)) w) (filter (IsUnramified k) univ) =
    (MulAction.orbit (K ≃ₐ[k] K) w).toFinset
state_after: case e_s.a
k : Type u_1
inst✝⁹ : Field k
K : Type u_2
inst✝⁸ : Field K
F : Type u_3
inst✝⁷ : Field F
inst✝⁶ : NumberField K
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace K
hw : IsUnramifiedIn K (w.comap (algebraMap k K))
w' : InfinitePlace K
⊢ w' ∈
      filter (fun x => x.comap (algebraMap k K) = (fun x => x.comap (algebraMap k K)) w)
        (filter (IsUnramified k) univ) ↔
    w' ∈ (MulAction.orbit (K ≃ₐ[k] K) w).toFinset

tactic: simp only [mem_univ, forall_true_left, filter_congr_decidable, mem_filter, true_and,
  Set.mem_toFinset, mem_orbit_iff, @eq_comm _ (comap w' _), and_iff_right_iff_imp]
state_before: case e_s.a
k : Type u_1
inst✝⁹ : Field k
K : Type u_2
inst✝⁸ : Field K
F : Type u_3
inst✝⁷ : Field F
inst✝⁶ : NumberField K
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace K
hw : IsUnramifiedIn K (w.comap (algebraMap k K))
w' : InfinitePlace K
⊢ w' ∈
      filter (fun x => x.comap (algebraMap k K) = (fun x => x.comap (algebraMap k K)) w)
        (filter (IsUnramified k) univ) ↔
    w' ∈ (MulAction.orbit (K ≃ₐ[k] K) w).toFinset
state_after: case e_s.a
k : Type u_1
inst✝⁹ : Field k
K : Type u_2
inst✝⁸ : Field K
F : Type u_3
inst✝⁷ : Field F
inst✝⁶ : NumberField K
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace K
hw : IsUnramifiedIn K (w.comap (algebraMap k K))
w' : InfinitePlace K
⊢ w.comap (algebraMap k K) = w'.comap (algebraMap k K) → IsUnramified k w'

tactic: intro e
state_before: case e_s.a
k : Type u_1
inst✝⁹ : Field k
K : Type u_2
inst✝⁸ : Field K
F : Type u_3
inst✝⁷ : Field F
inst✝⁶ : NumberField K
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace K
hw : IsUnramifiedIn K (w.comap (algebraMap k K))
w' : InfinitePlace K
⊢ w.comap (algebraMap k K) = w'.comap (algebraMap k K) → IsUnramified k w'
state_after: case e_s.a
k : Type u_1
inst✝⁹ : Field k
K : Type u_2
inst✝⁸ : Field K
F : Type u_3
inst✝⁷ : Field F
inst✝⁶ : NumberField K
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace K
hw : IsUnramifiedIn K (w.comap (algebraMap k K))
w' : InfinitePlace K
e : w.comap (algebraMap k K) = w'.comap (algebraMap k K)
⊢ IsUnramified k w'

tactic: rwa [← isUnramifiedIn_comap, ← e]
state_before: case e_s.a
k : Type u_1
inst✝⁹ : Field k
K : Type u_2
inst✝⁸ : Field K
F : Type u_3
inst✝⁷ : Field F
inst✝⁶ : NumberField K
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace K
hw : IsUnramifiedIn K (w.comap (algebraMap k K))
w' : InfinitePlace K
e : w.comap (algebraMap k K) = w'.comap (algebraMap k K)
⊢ IsUnramified k w'
state_after: no goals

tactic: rw [← MulAction.card_orbit_mul_card_stabilizer_eq_card_group _ w,
  ← Nat.card_eq_fintype_card (α := Stab w), card_stabilizer, if_pos,
  mul_one, Set.toFinset_card]
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
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace K
hw : IsUnramifiedIn K (w.comap (algebraMap k K))
⊢ (MulAction.orbit (K ≃ₐ[k] K) w).toFinset.card = Fintype.card (K ≃ₐ[k] K)
state_after: case hc
k : Type u_1
inst✝⁹ : Field k
K : Type u_2
inst✝⁸ : Field K
F : Type u_3
inst✝⁷ : Field F
inst✝⁶ : NumberField K
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace K
hw : IsUnramifiedIn K (w.comap (algebraMap k K))
⊢ IsUnramified k w

tactic: rwa [← isUnramifiedIn_comap]
state_before: case hc
k : Type u_1
inst✝⁹ : Field k
K : Type u_2
inst✝⁸ : Field K
F : Type u_3
inst✝⁷ : Field F
inst✝⁶ : NumberField K
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w✝ : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
w : InfinitePlace K
hw : IsUnramifiedIn K (w.comap (algebraMap k K))
⊢ IsUnramified k w
state_after: no goals

tactic: simp [isUnramifiedIn_comap]
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
inst✝⁵ : Algebra k K
inst✝⁴ : Algebra k F
inst✝³ : Algebra K F
inst✝² : IsScalarTower k K F
σ : K ≃ₐ[k] K
w : InfinitePlace K
inst✝¹ : NumberField k
inst✝ : IsGalois k K
this : Module.Finite k K := Module.Finite.of_restrictScalars_finite ℚ k K
⊢ ∀ x ∈ filter (IsUnramified k) univ, x.comap (algebraMap k K) ∈ filter (IsUnramifiedIn K) univ
state_after: no goals