no goals
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
⊢ card α ≡ card ↑(fixedPoints G α) [MOD p]
classical
  calc
    card α = card (Σy : Quotient (orbitRel G α), { x // Quotient.mk'' x = y }) :=
      card_congr (Equiv.sigmaFiberEquiv (@Quotient.mk'' _ (orbitRel G α))).symm
    _ = ∑ a : Quotient (orbitRel G α), card { x // Quotient.mk'' x = a } := (card_sigma _)
    _ ≡ ∑ _a : fixedPoints G α, 1 [MOD p] := ?_
    _ = _ := by simp; rfl
  rw [← ZMod.eq_iff_modEq_nat p, Nat.cast_sum, Nat.cast_sum]
  have key :
    ∀ x,
      card { y // (Quotient.mk'' y : Quotient (orbitRel G α)) = Quotient.mk'' x } =
        card (orbit G x) :=
    fun x => by simp only [Quotient.eq'']; congr
  refine'
    Eq.symm
      (Finset.sum_bij_ne_zero (fun a _ _ => Quotient.mk'' a.1) (fun _ _ _ => Finset.mem_univ _)
        (fun a₁ a₂ _ _ _ _ h =>
          Subtype.eq ((mem_fixedPoints' α).mp a₂.2 a₁.1 (Quotient.exact' h)))
        (fun b => Quotient.inductionOn' b fun b _ hb => _) fun a ha _ => by
        rw [key, mem_fixedPoints_iff_card_orbit_eq_one.mp a.2])
  obtain ⟨k, hk⟩ := hG.card_orbit b
  have : k = 0 :=
    le_zero_iff.1
      (Nat.le_of_lt_succ
        (lt_of_not_ge
          (mt (pow_dvd_pow p)
            (by
              rwa [pow_one, ← hk, ← Nat.modEq_zero_iff_dvd, ← ZMod.eq_iff_modEq_nat, ← key,
                Nat.cast_zero]))))
  exact
    ⟨⟨b, mem_fixedPoints_iff_card_orbit_eq_one.2 <| by rw [hk, this, pow_zero]⟩,
      Finset.mem_univ _, ne_of_eq_of_ne Nat.cast_one one_ne_zero, rfl⟩
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
⊢ ∑ a : Quotient (orbitRel G α), card { x // Quotient.mk'' x = a } ≡ ∑ _a : ↑(fixedPoints G α), 1 [MOD p]
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
⊢ card α ≡ card ↑(fixedPoints G α) [MOD p]
calc
  card α = card (Σy : Quotient (orbitRel G α), { x // Quotient.mk'' x = y }) :=
    card_congr (Equiv.sigmaFiberEquiv (@Quotient.mk'' _ (orbitRel G α))).symm
  _ = ∑ a : Quotient (orbitRel G α), card { x // Quotient.mk'' x = a } := (card_sigma _)
  _ ≡ ∑ _a : fixedPoints G α, 1 [MOD p] := ?_
  _ = _ := by simp; rfl
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
⊢ ∑ x : Quotient (orbitRel G α), ↑(card { x_1 // Quotient.mk'' x_1 = x }) = ∑ x : ↑(fixedPoints G α), ↑1
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
⊢ ∑ a : Quotient (orbitRel G α), card { x // Quotient.mk'' x = a } ≡ ∑ _a : ↑(fixedPoints G α), 1 [MOD p]
rw [← ZMod.eq_iff_modEq_nat p, Nat.cast_sum, Nat.cast_sum]
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
key : ∀ (x : α), card { y // Quotient.mk'' y = Quotient.mk'' x } = card ↑(orbit G x)
⊢ ∑ x : Quotient (orbitRel G α), ↑(card { x_1 // Quotient.mk'' x_1 = x }) = ∑ x : ↑(fixedPoints G α), ↑1
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
⊢ ∑ x : Quotient (orbitRel G α), ↑(card { x_1 // Quotient.mk'' x_1 = x }) = ∑ x : ↑(fixedPoints G α), ↑1
have key :
  ∀ x,
    card { y // (Quotient.mk'' y : Quotient (orbitRel G α)) = Quotient.mk'' x } =
      card (orbit G x) :=
  fun x => by simp only [Quotient.eq'']; congr
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
key : ∀ (x : α), card { y // Quotient.mk'' y = Quotient.mk'' x } = card ↑(orbit G x)
b✝ : Quotient (orbitRel G α)
b : α
x✝ : Quotient.mk'' b ∈ Finset.univ
hb : ↑(card { x // Quotient.mk'' x = Quotient.mk'' b }) ≠ 0
⊢ ∃ a h₁ h₂, Quotient.mk'' b = (fun a x x => Quotient.mk'' ↑a) a h₁ h₂
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
key : ∀ (x : α), card { y // Quotient.mk'' y = Quotient.mk'' x } = card ↑(orbit G x)
⊢ ∑ x : Quotient (orbitRel G α), ↑(card { x_1 // Quotient.mk'' x_1 = x }) = ∑ x : ↑(fixedPoints G α), ↑1
refine'
  Eq.symm
    (Finset.sum_bij_ne_zero (fun a _ _ => Quotient.mk'' a.1) (fun _ _ _ => Finset.mem_univ _)
      (fun a₁ a₂ _ _ _ _ h =>
        Subtype.eq ((mem_fixedPoints' α).mp a₂.2 a₁.1 (Quotient.exact' h)))
      (fun b => Quotient.inductionOn' b fun b _ hb => _) fun a ha _ => by
      rw [key, mem_fixedPoints_iff_card_orbit_eq_one.mp a.2])
case intro
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
key : ∀ (x : α), card { y // Quotient.mk'' y = Quotient.mk'' x } = card ↑(orbit G x)
b✝ : Quotient (orbitRel G α)
b : α
x✝ : Quotient.mk'' b ∈ Finset.univ
hb : ↑(card { x // Quotient.mk'' x = Quotient.mk'' b }) ≠ 0
k : ℕ
hk : card ↑(orbit G b) = p ^ k
⊢ ∃ a h₁ h₂, Quotient.mk'' b = (fun a x x => Quotient.mk'' ↑a) a h₁ h₂
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
key : ∀ (x : α), card { y // Quotient.mk'' y = Quotient.mk'' x } = card ↑(orbit G x)
b✝ : Quotient (orbitRel G α)
b : α
x✝ : Quotient.mk'' b ∈ Finset.univ
hb : ↑(card { x // Quotient.mk'' x = Quotient.mk'' b }) ≠ 0
⊢ ∃ a h₁ h₂, Quotient.mk'' b = (fun a x x => Quotient.mk'' ↑a) a h₁ h₂
obtain ⟨k, hk⟩ := hG.card_orbit b
case intro
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
key : ∀ (x : α), card { y // Quotient.mk'' y = Quotient.mk'' x } = card ↑(orbit G x)
b✝ : Quotient (orbitRel G α)
b : α
x✝ : Quotient.mk'' b ∈ Finset.univ
hb : ↑(card { x // Quotient.mk'' x = Quotient.mk'' b }) ≠ 0
k : ℕ
hk : card ↑(orbit G b) = p ^ k
this : k = 0
⊢ ∃ a h₁ h₂, Quotient.mk'' b = (fun a x x => Quotient.mk'' ↑a) a h₁ h₂
case intro
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
key : ∀ (x : α), card { y // Quotient.mk'' y = Quotient.mk'' x } = card ↑(orbit G x)
b✝ : Quotient (orbitRel G α)
b : α
x✝ : Quotient.mk'' b ∈ Finset.univ
hb : ↑(card { x // Quotient.mk'' x = Quotient.mk'' b }) ≠ 0
k : ℕ
hk : card ↑(orbit G b) = p ^ k
⊢ ∃ a h₁ h₂, Quotient.mk'' b = (fun a x x => Quotient.mk'' ↑a) a h₁ h₂
have : k = 0 :=
  le_zero_iff.1
    (Nat.le_of_lt_succ
      (lt_of_not_ge
        (mt (pow_dvd_pow p)
          (by
            rwa [pow_one, ← hk, ← Nat.modEq_zero_iff_dvd, ← ZMod.eq_iff_modEq_nat, ← key,
              Nat.cast_zero]))))
no goals
case intro
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
key : ∀ (x : α), card { y // Quotient.mk'' y = Quotient.mk'' x } = card ↑(orbit G x)
b✝ : Quotient (orbitRel G α)
b : α
x✝ : Quotient.mk'' b ∈ Finset.univ
hb : ↑(card { x // Quotient.mk'' x = Quotient.mk'' b }) ≠ 0
k : ℕ
hk : card ↑(orbit G b) = p ^ k
this : k = 0
⊢ ∃ a h₁ h₂, Quotient.mk'' b = (fun a x x => Quotient.mk'' ↑a) a h₁ h₂
exact
  ⟨⟨b, mem_fixedPoints_iff_card_orbit_eq_one.2 <| by rw [hk, this, pow_zero]⟩,
    Finset.mem_univ _, ne_of_eq_of_ne Nat.cast_one one_ne_zero, rfl⟩
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
⊢ Finset.card Finset.univ = card ↑(fixedPoints G α)
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
⊢ ∑ _a : ↑(fixedPoints G α), 1 = card ↑(fixedPoints G α)
simp
no goals
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
⊢ Finset.card Finset.univ = card ↑(fixedPoints G α)
rfl
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
x : α
⊢ card { y // Setoid.r y x } = card ↑(orbit G x)
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
x : α
⊢ card { y // Quotient.mk'' y = Quotient.mk'' x } = card ↑(orbit G x)
simp only [Quotient.eq'']
no goals
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
x : α
⊢ card { y // Setoid.r y x } = card ↑(orbit G x)
congr
no goals
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
key : ∀ (x : α), card { y // Quotient.mk'' y = Quotient.mk'' x } = card ↑(orbit G x)
a : ↑(fixedPoints G α)
ha : a ∈ Finset.univ
x✝ : ↑1 ≠ 0
⊢ ↑1 = ↑(card { x // Quotient.mk'' x = (fun a x x => Quotient.mk'' ↑a) a ha x✝ })
rw [key, mem_fixedPoints_iff_card_orbit_eq_one.mp a.2]
no goals
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
key : ∀ (x : α), card { y // Quotient.mk'' y = Quotient.mk'' x } = card ↑(orbit G x)
b✝ : Quotient (orbitRel G α)
b : α
x✝ : Quotient.mk'' b ∈ Finset.univ
hb : ↑(card { x // Quotient.mk'' x = Quotient.mk'' b }) ≠ 0
k : ℕ
hk : card ↑(orbit G b) = p ^ k
⊢ ¬p ^ Nat.succ 0 ∣ p ^ k
rwa [pow_one, ← hk, ← Nat.modEq_zero_iff_dvd, ← ZMod.eq_iff_modEq_nat, ← key,
  Nat.cast_zero]
no goals
p : ℕ
G : Type u_2
inst✝³ : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_1
inst✝² : MulAction G α
inst✝¹ : Fintype α
inst✝ : Fintype ↑(fixedPoints G α)
key : ∀ (x : α), card { y // Quotient.mk'' y = Quotient.mk'' x } = card ↑(orbit G x)
b✝ : Quotient (orbitRel G α)
b : α
x✝ : Quotient.mk'' b ∈ Finset.univ
hb : ↑(card { x // Quotient.mk'' x = Quotient.mk'' b }) ≠ 0
k : ℕ
hk : card ↑(orbit G b) = p ^ k
this : k = 0
⊢ card ↑(orbit G b) = 1
rw [hk, this, pow_zero]