Theorem: NumberField.InfinitePlace.card_isUnramified_compl
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 / 2)
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 / 2)

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) / 2
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) / 2

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) / 2
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) / 2

tactic: simp only [mem_univ, forall_true_left, compl_filter, not_not, 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) / 2
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) / 2

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) / 2
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) / 2

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 [compl_filter, filter_congr_decidable, mem_filter, mem_univ, true_and,
  @eq_comm _ (comap w' _), Set.mem_toFinset, mem_orbit_iff, 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), InfinitePlace.card_stabilizer, if_neg,
  Nat.mul_div_cancel _ zero_lt_two, 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) / 2
state_after: case hnc
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 hnc
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