Theorem: GaloisField.finrank
File: Mathlib/FieldTheory/Finite/GaloisField.lean

Proof steps:
state_before: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n
state_after: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n
tactic: set g_poly := (X ^ p ^ n - X : (ZMod p)[X])
state_before: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n
state_after: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n
tactic: have hp : 1 < p := h_prime.out.one_lt
state_before: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n
state_after: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n
tactic: have aux : g_poly ≠ 0 := FiniteField.X_pow_card_pow_sub_X_ne_zero _ h hp
state_before: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n
state_after: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField p n)) = g_poly.natDegree
⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n
tactic: have key : Fintype.card (g_poly.rootSet (GaloisField p n)) = g_poly.natDegree :=
    card_rootSet_eq_natDegree (galois_poly_separable p _ (dvd_pow (dvd_refl p) h))
      (SplittingField.splits (X ^ p ^ n - X : (ZMod p)[X]))
state_before: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField p n)) = g_poly.natDegree
⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n
state_after: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField p n)) = g_poly.natDegree
nat_degree_eq : g_poly.natDegree = p ^ n
⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n
tactic: have nat_degree_eq : g_poly.natDegree = p ^ n :=
    FiniteField.X_pow_card_pow_sub_X_natDegree_eq _ h hp
state_before: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField p n)) = g_poly.natDegree
nat_degree_eq : g_poly.natDegree = p ^ n
⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n
state_after: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField p n)) = p ^ n
nat_degree_eq : g_poly.natDegree = p ^ n
⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n
tactic: rw [nat_degree_eq] at key
state_before: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField p n)) = p ^ n
nat_degree_eq : g_poly.natDegree = p ^ n
⊢ FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n
state_after: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField p n)) = p ^ n
nat_degree_eq : g_poly.natDegree = p ^ n
⊢ g_poly.rootSet (GaloisField p n) = Set.univ
tactic: suffices g_poly.rootSet (GaloisField p n) = Set.univ by
    simp_rw [this, ← Fintype.ofEquiv_card (Equiv.Set.univ _)] at key
    -- Porting note: prevents `card_eq_pow_finrank` from using a wrong instance for `Fintype`
    rw [@card_eq_pow_finrank (ZMod p) _ _ _ _ _ (_), ZMod.card] at key
    exact Nat.pow_right_injective (Nat.Prime.one_lt' p).out key
state_before: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField p n)) = p ^ n
nat_degree_eq : g_poly.natDegree = p ^ n
⊢ g_poly.rootSet (GaloisField p n) = Set.univ
state_after: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField p n)) = p ^ n
nat_degree_eq : g_poly.natDegree = p ^ n
⊢ ∀ (x : GaloisField p n), x ∈ g_poly.rootSet (GaloisField p n)
tactic: rw [Set.eq_univ_iff_forall]
state_before: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField p n)) = p ^ n
nat_degree_eq : g_poly.natDegree = p ^ n
⊢ ∀ (x : GaloisField p n), x ∈ g_poly.rootSet (GaloisField p n)
state_after: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField p n)) = p ^ n
nat_degree_eq : g_poly.natDegree = p ^ n
⊢ ∀ x ∈ ⊤, x ∈ (X ^ p ^ n - X).rootSet (GaloisField p n)
tactic: suffices ∀ (x) (hx : x ∈ (⊤ : Subalgebra (ZMod p) (GaloisField p n))),
      x ∈ (X ^ p ^ n - X : (ZMod p)[X]).rootSet (GaloisField p n)
    by simpa
state_before: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField p n)) = p ^ n
nat_degree_eq : g_poly.natDegree = p ^ n
⊢ ∀ x ∈ ⊤, x ∈ (X ^ p ^ n - X).rootSet (GaloisField p n)
state_after: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField p n)) = p ^ n
nat_degree_eq : g_poly.natDegree = p ^ n
⊢ ∀ x ∈ Algebra.adjoin (ZMod p) ((X ^ p ^ n - X).rootSet (X ^ p ^ n - X).SplittingField),
    x ∈ (X ^ p ^ n - X).rootSet (GaloisField p n)
tactic: rw [← SplittingField.adjoin_rootSet]
state_before: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField p n)) = p ^ n
nat_degree_eq : g_poly.natDegree = p ^ n
⊢ ∀ x ∈ Algebra.adjoin (ZMod p) ((X ^ p ^ n - X).rootSet (X ^ p ^ n - X).SplittingField),
    x ∈ (X ^ p ^ n - X).rootSet (GaloisField p n)
state_after: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField p n)) = p ^ n
nat_degree_eq : g_poly.natDegree = p ^ n
⊢ ∀
    x ∈
      Subring.closure
        (Set.range ⇑(algebraMap (ZMod p) (GaloisField p n)) ∪ (X ^ p ^ n - X).rootSet (X ^ p ^ n - X).SplittingField),
    x ∈ (X ^ p ^ n - X).rootSet (GaloisField p n)
tactic: simp_rw [Algebra.mem_adjoin_iff]
state_before: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField p n)) = p ^ n
nat_degree_eq : g_poly.natDegree = p ^ n
⊢ ∀
    x ∈
      Subring.closure
        (Set.range ⇑(algebraMap (ZMod p) (GaloisField p n)) ∪ (X ^ p ^ n - X).rootSet (X ^ p ^ n - X).SplittingField),
    x ∈ (X ^ p ^ n - X).rootSet (GaloisField p n)
state_after: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField p n)) = p ^ n
nat_degree_eq : g_poly.natDegree = p ^ n
x : GaloisField p n
hx :
  x ∈
    Subring.closure
      (Set.range ⇑(algebraMap (ZMod p) (GaloisField p n)) ∪ (X ^ p ^ n - X).rootSet (X ^ p ^ n - X).SplittingField)
⊢ x ∈ (X ^ p ^ n - X).rootSet (GaloisField p n)
tactic: intro x hx
state_before: p✝ : ℕ
inst✝ : Fact (Nat.Prime p✝)
n✝¹ p : ℕ
h_prime : Fact (Nat.Prime p)
n✝ n : ℕ
h : n ≠ 0
g_poly : (ZMod p)[X] := X ^ p ^ n - X
hp : 1 < p
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField p n)) = p ^ n
nat_degree_eq : g_poly.natDegree = p ^ n
x : GaloisField p n
hx :
  x ∈
    Subring.closure
      (Set.range ⇑(algebraMap (ZMod p) (GaloisField p n)) ∪ (X ^ p ^ n - X).rootSet (X ^ p ^ n - X).SplittingField)
⊢ x ∈ (X ^ p ^ n - X).rootSet (GaloisField p n)
state_after: case zero
p : ℕ
inst✝ : Fact (Nat.Prime p)
n✝¹ n✝ n : ℕ
h : n ≠ 0
h_prime : Fact (Nat.Prime 0)
g_poly : (ZMod 0)[X] := X ^ 0 ^ n - X
hp : 1 < 0
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField 0 n)) = 0 ^ n
nat_degree_eq : g_poly.natDegree = 0 ^ n
x : GaloisField 0 n
hx :
  x ∈
    Subring.closure
      (Set.range ⇑(algebraMap (ZMod 0) (GaloisField 0 n)) ∪ (X ^ 0 ^ n - X).rootSet (X ^ 0 ^ n - X).SplittingField)
⊢ x ∈ (X ^ 0 ^ n - X).rootSet (GaloisField 0 n)

case succ
p : ℕ
inst✝ : Fact (Nat.Prime p)
n✝² n✝¹ n : ℕ
h : n ≠ 0
n✝ : ℕ
h_prime : Fact (Nat.Prime (n✝ + 1))
g_poly : (ZMod (n✝ + 1))[X] := X ^ (n✝ + 1) ^ n - X
hp : 1 < n✝ + 1
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField (n✝ + 1) n)) = (n✝ + 1) ^ n
nat_degree_eq : g_poly.natDegree = (n✝ + 1) ^ n
x : GaloisField (n✝ + 1) n
hx :
  x ∈
    Subring.closure
      (Set.range ⇑(algebraMap (ZMod (n✝ + 1)) (GaloisField (n✝ + 1) n)) ∪
        (X ^ (n✝ + 1) ^ n - X).rootSet (X ^ (n✝ + 1) ^ n - X).SplittingField)
⊢ x ∈ (X ^ (n✝ + 1) ^ n - X).rootSet (GaloisField (n✝ + 1) n)
tactic: cases p
state_before: case zero
p : ℕ
inst✝ : Fact (Nat.Prime p)
n✝¹ n✝ n : ℕ
h : n ≠ 0
h_prime : Fact (Nat.Prime 0)
g_poly : (ZMod 0)[X] := X ^ 0 ^ n - X
hp : 1 < 0
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField 0 n)) = 0 ^ n
nat_degree_eq : g_poly.natDegree = 0 ^ n
x : GaloisField 0 n
hx :
  x ∈
    Subring.closure
      (Set.range ⇑(algebraMap (ZMod 0) (GaloisField 0 n)) ∪ (X ^ 0 ^ n - X).rootSet (X ^ 0 ^ n - X).SplittingField)
⊢ x ∈ (X ^ 0 ^ n - X).rootSet (GaloisField 0 n)

case succ
p : ℕ
inst✝ : Fact (Nat.Prime p)
n✝² n✝¹ n : ℕ
h : n ≠ 0
n✝ : ℕ
h_prime : Fact (Nat.Prime (n✝ + 1))
g_poly : (ZMod (n✝ + 1))[X] := X ^ (n✝ + 1) ^ n - X
hp : 1 < n✝ + 1
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField (n✝ + 1) n)) = (n✝ + 1) ^ n
nat_degree_eq : g_poly.natDegree = (n✝ + 1) ^ n
x : GaloisField (n✝ + 1) n
hx :
  x ∈
    Subring.closure
      (Set.range ⇑(algebraMap (ZMod (n✝ + 1)) (GaloisField (n✝ + 1) n)) ∪
        (X ^ (n✝ + 1) ^ n - X).rootSet (X ^ (n✝ + 1) ^ n - X).SplittingField)
⊢ x ∈ (X ^ (n✝ + 1) ^ n - X).rootSet (GaloisField (n✝ + 1) n)
state_after: case succ
p : ℕ
inst✝ : Fact (Nat.Prime p)
n✝² n✝¹ n : ℕ
h : n ≠ 0
n✝ : ℕ
h_prime : Fact (Nat.Prime (n✝ + 1))
g_poly : (ZMod (n✝ + 1))[X] := X ^ (n✝ + 1) ^ n - X
hp : 1 < n✝ + 1
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField (n✝ + 1) n)) = (n✝ + 1) ^ n
nat_degree_eq : g_poly.natDegree = (n✝ + 1) ^ n
x : GaloisField (n✝ + 1) n
hx :
  x ∈
    Subring.closure
      (Set.range ⇑(algebraMap (ZMod (n✝ + 1)) (GaloisField (n✝ + 1) n)) ∪
        (X ^ (n✝ + 1) ^ n - X).rootSet (X ^ (n✝ + 1) ^ n - X).SplittingField)
⊢ x ∈ (X ^ (n✝ + 1) ^ n - X).rootSet (GaloisField (n✝ + 1) n)
tactic: cases hp
state_before: case succ
p : ℕ
inst✝ : Fact (Nat.Prime p)
n✝² n✝¹ n : ℕ
h : n ≠ 0
n✝ : ℕ
h_prime : Fact (Nat.Prime (n✝ + 1))
g_poly : (ZMod (n✝ + 1))[X] := X ^ (n✝ + 1) ^ n - X
hp : 1 < n✝ + 1
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField (n✝ + 1) n)) = (n✝ + 1) ^ n
nat_degree_eq : g_poly.natDegree = (n✝ + 1) ^ n
x : GaloisField (n✝ + 1) n
hx :
  x ∈
    Subring.closure
      (Set.range ⇑(algebraMap (ZMod (n✝ + 1)) (GaloisField (n✝ + 1) n)) ∪
        (X ^ (n✝ + 1) ^ n - X).rootSet (X ^ (n✝ + 1) ^ n - X).SplittingField)
⊢ x ∈ (X ^ (n✝ + 1) ^ n - X).rootSet (GaloisField (n✝ + 1) n)
state_after: case succ.refine_1
p : ℕ
inst✝ : Fact (Nat.Prime p)
n✝² n✝¹ n : ℕ
h : n ≠ 0
n✝ : ℕ
h_prime : Fact (Nat.Prime (n✝ + 1))
g_poly : (ZMod (n✝ + 1))[X] := X ^ (n✝ + 1) ^ n - X
hp : 1 < n✝ + 1
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField (n✝ + 1) n)) = (n✝ + 1) ^ n
nat_degree_eq : g_poly.natDegree = (n✝ + 1) ^ n
x : GaloisField (n✝ + 1) n
hx :
  x ∈
    Subring.closure
      (Set.range ⇑(algebraMap (ZMod (n✝ + 1)) (GaloisField (n✝ + 1) n)) ∪
        (X ^ (n✝ + 1) ^ n - X).rootSet (X ^ (n✝ + 1) ^ n - X).SplittingField)
⊢ ∀
    x ∈
      Set.range ⇑(algebraMap (ZMod (n✝ + 1)) (GaloisField (n✝ + 1) n)) ∪
        (X ^ (n✝ + 1) ^ n - X).rootSet (X ^ (n✝ + 1) ^ n - X).SplittingField,
    (aeval x) g_poly = 0

case succ.refine_2
p : ℕ
inst✝ : Fact (Nat.Prime p)
n✝² n✝¹ n : ℕ
h : n ≠ 0
n✝ : ℕ
h_prime : Fact (Nat.Prime (n✝ + 1))
g_poly : (ZMod (n✝ + 1))[X] := X ^ (n✝ + 1) ^ n - X
hp : 1 < n✝ + 1
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField (n✝ + 1) n)) = (n✝ + 1) ^ n
nat_degree_eq : g_poly.natDegree = (n✝ + 1) ^ n
x : GaloisField (n✝ + 1) n
hx :
  x ∈
    Subring.closure
      (Set.range ⇑(algebraMap (ZMod (n✝ + 1)) (GaloisField (n✝ + 1) n)) ∪
        (X ^ (n✝ + 1) ^ n - X).rootSet (X ^ (n✝ + 1) ^ n - X).SplittingField)
⊢ (aeval 0) g_poly = 0

case succ.refine_3
p : ℕ
inst✝ : Fact (Nat.Prime p)
n✝² n✝¹ n : ℕ
h : n ≠ 0
n✝ : ℕ
h_prime : Fact (Nat.Prime (n✝ + 1))
g_poly : (ZMod (n✝ + 1))[X] := X ^ (n✝ + 1) ^ n - X
hp : 1 < n✝ + 1
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField (n✝ + 1) n)) = (n✝ + 1) ^ n
nat_degree_eq : g_poly.natDegree = (n✝ + 1) ^ n
x : GaloisField (n✝ + 1) n
hx :
  x ∈
    Subring.closure
      (Set.range ⇑(algebraMap (ZMod (n✝ + 1)) (GaloisField (n✝ + 1) n)) ∪
        (X ^ (n✝ + 1) ^ n - X).rootSet (X ^ (n✝ + 1) ^ n - X).SplittingField)
⊢ (aeval 1) g_poly = 0

case succ.refine_4
p : ℕ
inst✝ : Fact (Nat.Prime p)
n✝² n✝¹ n : ℕ
h : n ≠ 0
n✝ : ℕ
h_prime : Fact (Nat.Prime (n✝ + 1))
g_poly : (ZMod (n✝ + 1))[X] := X ^ (n✝ + 1) ^ n - X
hp : 1 < n✝ + 1
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField (n✝ + 1) n)) = (n✝ + 1) ^ n
nat_degree_eq : g_poly.natDegree = (n✝ + 1) ^ n
x : GaloisField (n✝ + 1) n
hx :
  x ∈
    Subring.closure
      (Set.range ⇑(algebraMap (ZMod (n✝ + 1)) (GaloisField (n✝ + 1) n)) ∪
        (X ^ (n✝ + 1) ^ n - X).rootSet (X ^ (n✝ + 1) ^ n - X).SplittingField)
⊢ ∀ (x y : GaloisField (n✝ + 1) n), (aeval x) g_poly = 0 → (aeval y) g_poly = 0 → (aeval (x + y)) g_poly = 0

case succ.refine_5
p : ℕ
inst✝ : Fact (Nat.Prime p)
n✝² n✝¹ n : ℕ
h : n ≠ 0
n✝ : ℕ
h_prime : Fact (Nat.Prime (n✝ + 1))
g_poly : (ZMod (n✝ + 1))[X] := X ^ (n✝ + 1) ^ n - X
hp : 1 < n✝ + 1
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField (n✝ + 1) n)) = (n✝ + 1) ^ n
nat_degree_eq : g_poly.natDegree = (n✝ + 1) ^ n
x : GaloisField (n✝ + 1) n
hx :
  x ∈
    Subring.closure
      (Set.range ⇑(algebraMap (ZMod (n✝ + 1)) (GaloisField (n✝ + 1) n)) ∪
        (X ^ (n✝ + 1) ^ n - X).rootSet (X ^ (n✝ + 1) ^ n - X).SplittingField)
⊢ ∀ (x : GaloisField (n✝ + 1) n), (aeval x) g_poly = 0 → (aeval (-x)) g_poly = 0

case succ.refine_6
p : ℕ
inst✝ : Fact (Nat.Prime p)
n✝² n✝¹ n : ℕ
h : n ≠ 0
n✝ : ℕ
h_prime : Fact (Nat.Prime (n✝ + 1))
g_poly : (ZMod (n✝ + 1))[X] := X ^ (n✝ + 1) ^ n - X
hp : 1 < n✝ + 1
aux : g_poly ≠ 0
key : Fintype.card ↑(g_poly.rootSet (GaloisField (n✝ + 1) n)) = (n✝ + 1) ^ n
nat_degree_eq : g_poly.natDegree = (n✝ + 1) ^ n
x : GaloisField (n✝ + 1) n
hx :
  x ∈
    Subring.closure
      (Set.range ⇑(algebraMap (ZMod (n✝ + 1)) (GaloisField (n✝ + 1) n)) ∪
        (X ^ (n✝ + 1) ^ n - X).rootSet (X ^ (n✝ + 1) ^ n - X).SplittingField)
⊢ ∀ (x y : GaloisField (n✝ + 1) n), (aeval x) g_poly = 0 → (aeval y) g_poly = 0 → (aeval (x * y)) g_poly = 0
tactic: refine Subring.closure_induction hx ?_ ?_ ?_ ?_ ?_ ?_ <;> simp_rw [mem_rootSet_of_ne aux]