l3lab/ntp-mathlib huggingface dataset:
/-- Define the first primitive quadratic character on `ZMod 8`, `χ₈`.
It corresponds to the extension `ℚ(√2)/ℚ`. -/
@[simps]
def χ₈ : MulChar (ZMod 8) ℤ where
  toFun := (![0, 1, 0, -1, 0, -1, 0, 1] : ZMod 8 → ℤ)
  map_one' := rfl
  map_mul' := by 

Proof state:
⊢ ∀ (x y : ZMod 8),
    OneHom.toFun
        { toFun := ![0, 1, 0, -1, 0, -1, 0, 1],
          map_one' := (_ : Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1 = Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1) }
        (x * y) =
      OneHom.toFun
          { toFun := ![0, 1, 0, -1, 0, -1, 0, 1],
            map_one' :=
              (_ : Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1 = Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1) }
          x *
        OneHom.toFun
          { toFun := ![0, 1, 0, -1, 0, -1, 0, 1],
            map_one' :=
              (_ : Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1 = Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1) }
          y

Next tactic:
decide
/-- Define the first primitive quadratic character on `ZMod 8`, `χ₈`.
It corresponds to the extension `ℚ(√2)/ℚ`. -/
@[simps]
def χ₈ : MulChar (ZMod 8) ℤ where
  toFun := (![0, 1, 0, -1, 0, -1, 0, 1] : ZMod 8 → ℤ)
  map_one' := rfl
  map_mul' := by decide
  map_nonunit' := by 

Proof state:
⊢ ∀ (a : ZMod 8),
    ¬IsUnit a →
      OneHom.toFun
          (↑{
              toOneHom :=
                { toFun := ![0, 1, 0, -1, 0, -1, 0, 1],
                  map_one' :=
                    (_ : Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1 = Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1) },
              map_mul' :=
                (_ :
                  ∀ (x y : ZMod 8),
                    OneHom.toFun
                        { toFun := ![0, 1, 0, -1, 0, -1, 0, 1],
                          map_one' :=
                            (_ :
                              Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1 =
                                Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1) }
                        (x * y) =
                      OneHom.toFun
                          { toFun := ![0, 1, 0, -1, 0, -1, 0, 1],
                            map_one' :=
                              (_ :
                                Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1 =
                                  Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1) }
                          x *
                        OneHom.toFun
                          { toFun := ![0, 1, 0, -1, 0, -1, 0, 1],
                            map_one' :=
                              (_ :
                                Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1 =
                                  Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1) }
                          y) })
          a =
        0

Next tactic:
decide
/-- `χ₈` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈ : χ₈.IsQuadratic := by
  

Proof state:
⊢ MulChar.IsQuadratic χ₈

Next tactic:
intro a
/-- `χ₈` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈ : χ₈.IsQuadratic := by
  intro a
  --porting note: was `decide!`
  

Proof state:
a : ZMod 8
⊢ χ₈ a = 0 ∨ χ₈ a = 1 ∨ χ₈ a = -1

Next tactic:
fin_cases a
/-- `χ₈` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈ : χ₈.IsQuadratic := by
  intro a
  --porting note: was `decide!`
  fin_cases a
  

Proof state:
case head
⊢ χ₈ { val := 0, isLt := (_ : 0 < 7 + 1) } = 0 ∨
    χ₈ { val := 0, isLt := (_ : 0 < 7 + 1) } = 1 ∨ χ₈ { val := 0, isLt := (_ : 0 < 7 + 1) } = -1
case tail.head
⊢ χ₈ { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = 0 ∨
    χ₈ { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = 1 ∨
      χ₈ { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = -1
case tail.tail.head
⊢ χ₈ { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = 0 ∨
    χ₈ { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = 1 ∨
      χ₈ { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = -1
case tail.tail.tail.head
⊢ χ₈ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = 0 ∨
    χ₈ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = 1 ∨
      χ₈ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = -1
case tail.tail.tail.tail.head
⊢ χ₈ { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = 0 ∨
    χ₈ { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = 1 ∨
      χ₈ { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = -1
case tail.tail.tail.tail.tail.head
⊢ χ₈ { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = 0 ∨
    χ₈ { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = 1 ∨
      χ₈ { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = -1
case tail.tail.tail.tail.tail.tail.head
⊢ χ₈
        { val := 6,
          isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =
      0 ∨
    χ₈
          { val := 6,
            isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =
        1 ∨
      χ₈
          { val := 6,
            isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =
        -1
case tail.tail.tail.tail.tail.tail.tail.head
⊢ χ₈
        { val := 7,
          isLt :=
            (_ :
              (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a) 7) } =
      0 ∨
    χ₈
          { val := 7,
            isLt :=
              (_ :
                (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a)
                  7) } =
        1 ∨
      χ₈
          { val := 7,
            isLt :=
              (_ :
                (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a)
                  7) } =
        -1

Next tactic:
all_goals decide
/-- `χ₈` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈ : χ₈.IsQuadratic := by
  intro a
  --porting note: was `decide!`
  fin_cases a
  all_goals 

Proof state:
case head
⊢ χ₈ { val := 0, isLt := (_ : 0 < 7 + 1) } = 0 ∨
    χ₈ { val := 0, isLt := (_ : 0 < 7 + 1) } = 1 ∨ χ₈ { val := 0, isLt := (_ : 0 < 7 + 1) } = -1

Next tactic:
decide
/-- `χ₈` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈ : χ₈.IsQuadratic := by
  intro a
  --porting note: was `decide!`
  fin_cases a
  all_goals 

Proof state:
case tail.head
⊢ χ₈ { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = 0 ∨
    χ₈ { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = 1 ∨
      χ₈ { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = -1

Next tactic:
decide
/-- `χ₈` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈ : χ₈.IsQuadratic := by
  intro a
  --porting note: was `decide!`
  fin_cases a
  all_goals 

Proof state:
case tail.tail.head
⊢ χ₈ { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = 0 ∨
    χ₈ { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = 1 ∨
      χ₈ { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = -1

Next tactic:
decide
/-- `χ₈` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈ : χ₈.IsQuadratic := by
  intro a
  --porting note: was `decide!`
  fin_cases a
  all_goals 

Proof state:
case tail.tail.tail.head
⊢ χ₈ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = 0 ∨
    χ₈ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = 1 ∨
      χ₈ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = -1

Next tactic:
decide
/-- `χ₈` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈ : χ₈.IsQuadratic := by
  intro a
  --porting note: was `decide!`
  fin_cases a
  all_goals 

Proof state:
case tail.tail.tail.tail.head
⊢ χ₈ { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = 0 ∨
    χ₈ { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = 1 ∨
      χ₈ { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = -1

Next tactic:
decide
/-- `χ₈` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈ : χ₈.IsQuadratic := by
  intro a
  --porting note: was `decide!`
  fin_cases a
  all_goals 

Proof state:
case tail.tail.tail.tail.tail.head
⊢ χ₈ { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = 0 ∨
    χ₈ { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = 1 ∨
      χ₈ { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = -1

Next tactic:
decide
/-- `χ₈` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈ : χ₈.IsQuadratic := by
  intro a
  --porting note: was `decide!`
  fin_cases a
  all_goals 

Proof state:
case tail.tail.tail.tail.tail.tail.head
⊢ χ₈
        { val := 6,
          isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =
      0 ∨
    χ₈
          { val := 6,
            isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =
        1 ∨
      χ₈
          { val := 6,
            isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =
        -1

Next tactic:
decide
/-- `χ₈` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈ : χ₈.IsQuadratic := by
  intro a
  --porting note: was `decide!`
  fin_cases a
  all_goals 

Proof state:
case tail.tail.tail.tail.tail.tail.tail.head
⊢ χ₈
        { val := 7,
          isLt :=
            (_ :
              (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a) 7) } =
      0 ∨
    χ₈
          { val := 7,
            isLt :=
              (_ :
                (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a)
                  7) } =
        1 ∨
      χ₈
          { val := 7,
            isLt :=
              (_ :
                (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a)
                  7) } =
        -1

Next tactic:
decide
/-- The value of `χ₈ n`, for `n : ℕ`, depends only on `n % 8`. -/
theorem χ₈_nat_mod_eight (n : ℕ) : χ₈ n = χ₈ (n % 8 : ℕ) := by 

Proof state:
n : ℕ
⊢ χ₈ ↑n = χ₈ ↑(n % 8)

Next tactic:
rw [← ZMod.nat_cast_mod n 8]
/-- The value of `χ₈ n`, for `n : ℤ`, depends only on `n % 8`. -/
theorem χ₈_int_mod_eight (n : ℤ) : χ₈ n = χ₈ (n % 8 : ℤ) := by
  

Proof state:
n : ℤ
⊢ χ₈ ↑n = χ₈ ↑(n % 8)

Next tactic:
rw [← ZMod.int_cast_mod n 8]
/-- The value of `χ₈ n`, for `n : ℤ`, depends only on `n % 8`. -/
theorem χ₈_int_mod_eight (n : ℤ) : χ₈ n = χ₈ (n % 8 : ℤ) := by
  rw [← ZMod.int_cast_mod n 8]
  

Proof state:
n : ℤ
⊢ χ₈ ↑(n % ↑8) = χ₈ ↑(n % 8)

Next tactic:
norm_cast
/-- An explicit description of `χ₈` on integers / naturals -/
theorem χ₈_int_eq_if_mod_eight (n : ℤ) :
    χ₈ n = if n % 2 = 0 then 0 else if n % 8 = 1 ∨ n % 8 = 7 then 1 else -1 := by
  

Proof state:
n : ℤ
⊢ χ₈ ↑n = if n % 2 = 0 then 0 else if n % 8 = 1 ∨ n % 8 = 7 then 1 else -1

Next tactic:
have help :
    ∀ m : ℤ, 0 ≤ m → m < 8 → χ₈ m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1 := by
    decide
/-- An explicit description of `χ₈` on integers / naturals -/
theorem χ₈_int_eq_if_mod_eight (n : ℤ) :
    χ₈ n = if n % 2 = 0 then 0 else if n % 8 = 1 ∨ n % 8 = 7 then 1 else -1 := by
  have help :
    ∀ m : ℤ, 0 ≤ m → m < 8 → χ₈ m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1 := by
    

Proof state:
n : ℤ
⊢ ∀ (m : ℤ), 0 ≤ m → m < 8 → χ₈ ↑m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1

Next tactic:
decide
/-- An explicit description of `χ₈` on integers / naturals -/
theorem χ₈_int_eq_if_mod_eight (n : ℤ) :
    χ₈ n = if n % 2 = 0 then 0 else if n % 8 = 1 ∨ n % 8 = 7 then 1 else -1 := by
  have help :
    ∀ m : ℤ, 0 ≤ m → m < 8 → χ₈ m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1 := by
    decide
  

Proof state:
n : ℤ
help : ∀ (m : ℤ), 0 ≤ m → m < 8 → χ₈ ↑m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1
⊢ χ₈ ↑n = if n % 2 = 0 then 0 else if n % 8 = 1 ∨ n % 8 = 7 then 1 else -1

Next tactic:
rw [← Int.emod_emod_of_dvd n (by decide : (2 : ℤ) ∣ 8), ← ZMod.int_cast_mod n 8]
/-- An explicit description of `χ₈` on integers / naturals -/
theorem χ₈_int_eq_if_mod_eight (n : ℤ) :
    χ₈ n = if n % 2 = 0 then 0 else if n % 8 = 1 ∨ n % 8 = 7 then 1 else -1 := by
  have help :
    ∀ m : ℤ, 0 ≤ m → m < 8 → χ₈ m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1 := by
    decide
  rw [← Int.emod_emod_of_dvd n (by 

Proof state:
n : ℤ
help : ∀ (m : ℤ), 0 ≤ m → m < 8 → χ₈ ↑m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1
⊢ 2 ∣ 8

Next tactic:
decide
/-- An explicit description of `χ₈` on integers / naturals -/
theorem χ₈_int_eq_if_mod_eight (n : ℤ) :
    χ₈ n = if n % 2 = 0 then 0 else if n % 8 = 1 ∨ n % 8 = 7 then 1 else -1 := by
  have help :
    ∀ m : ℤ, 0 ≤ m → m < 8 → χ₈ m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1 := by
    decide
  rw [← Int.emod_emod_of_dvd n (by decide : (2 : ℤ) ∣ 8), ← ZMod.int_cast_mod n 8]
  

Proof state:
n : ℤ
help : ∀ (m : ℤ), 0 ≤ m → m < 8 → χ₈ ↑m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1
⊢ χ₈ ↑(n % ↑8) = if n % 8 % 2 = 0 then 0 else if n % 8 = 1 ∨ n % 8 = 7 then 1 else -1

Next tactic:
exact help (n % 8) (Int.emod_nonneg n (by norm_num)) (Int.emod_lt n (by norm_num))
/-- An explicit description of `χ₈` on integers / naturals -/
theorem χ₈_int_eq_if_mod_eight (n : ℤ) :
    χ₈ n = if n % 2 = 0 then 0 else if n % 8 = 1 ∨ n % 8 = 7 then 1 else -1 := by
  have help :
    ∀ m : ℤ, 0 ≤ m → m < 8 → χ₈ m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1 := by
    decide
  rw [← Int.emod_emod_of_dvd n (by decide : (2 : ℤ) ∣ 8), ← ZMod.int_cast_mod n 8]
  exact help (n % 8) (Int.emod_nonneg n (by 

Proof state:
n : ℤ
help : ∀ (m : ℤ), 0 ≤ m → m < 8 → χ₈ ↑m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1
⊢ 8 ≠ 0

Next tactic:
norm_num
/-- An explicit description of `χ₈` on integers / naturals -/
theorem χ₈_int_eq_if_mod_eight (n : ℤ) :
    χ₈ n = if n % 2 = 0 then 0 else if n % 8 = 1 ∨ n % 8 = 7 then 1 else -1 := by
  have help :
    ∀ m : ℤ, 0 ≤ m → m < 8 → χ₈ m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1 := by
    decide
  rw [← Int.emod_emod_of_dvd n (by decide : (2 : ℤ) ∣ 8), ← ZMod.int_cast_mod n 8]
  exact help (n % 8) (Int.emod_nonneg n (by norm_num)) (Int.emod_lt n (by 

Proof state:
n : ℤ
help : ∀ (m : ℤ), 0 ≤ m → m < 8 → χ₈ ↑m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1
⊢ 8 ≠ 0

Next tactic:
norm_num
/-- Define the second primitive quadratic character on `ZMod 8`, `χ₈'`.
It corresponds to the extension `ℚ(√-2)/ℚ`. -/
@[simps]
def χ₈' : MulChar (ZMod 8) ℤ where
  toFun := (![0, 1, 0, 1, 0, -1, 0, -1] : ZMod 8 → ℤ)
  map_one' := rfl
  map_mul' := by 

Proof state:
⊢ ∀ (x y : ZMod 8),
    OneHom.toFun
        { toFun := ![0, 1, 0, 1, 0, -1, 0, -1],
          map_one' := (_ : Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1 = Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1) }
        (x * y) =
      OneHom.toFun
          { toFun := ![0, 1, 0, 1, 0, -1, 0, -1],
            map_one' :=
              (_ : Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1 = Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1) }
          x *
        OneHom.toFun
          { toFun := ![0, 1, 0, 1, 0, -1, 0, -1],
            map_one' :=
              (_ : Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1 = Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1) }
          y

Next tactic:
decide
/-- Define the second primitive quadratic character on `ZMod 8`, `χ₈'`.
It corresponds to the extension `ℚ(√-2)/ℚ`. -/
@[simps]
def χ₈' : MulChar (ZMod 8) ℤ where
  toFun := (![0, 1, 0, 1, 0, -1, 0, -1] : ZMod 8 → ℤ)
  map_one' := rfl
  map_mul' := by decide
  map_nonunit' := by 

Proof state:
⊢ ∀ (a : ZMod 8),
    ¬IsUnit a →
      OneHom.toFun
          (↑{
              toOneHom :=
                { toFun := ![0, 1, 0, 1, 0, -1, 0, -1],
                  map_one' :=
                    (_ : Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1 = Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1) },
              map_mul' :=
                (_ :
                  ∀ (x y : ZMod 8),
                    OneHom.toFun
                        { toFun := ![0, 1, 0, 1, 0, -1, 0, -1],
                          map_one' :=
                            (_ :
                              Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1 =
                                Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1) }
                        (x * y) =
                      OneHom.toFun
                          { toFun := ![0, 1, 0, 1, 0, -1, 0, -1],
                            map_one' :=
                              (_ :
                                Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1 =
                                  Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1) }
                          x *
                        OneHom.toFun
                          { toFun := ![0, 1, 0, 1, 0, -1, 0, -1],
                            map_one' :=
                              (_ :
                                Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1 =
                                  Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1) }
                          y) })
          a =
        0

Next tactic:
decide
/-- `χ₈'` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈' : χ₈'.IsQuadratic := by
  

Proof state:
⊢ MulChar.IsQuadratic χ₈'

Next tactic:
intro a
/-- `χ₈'` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈' : χ₈'.IsQuadratic := by
  intro a
  --porting note: was `decide!`
  

Proof state:
a : ZMod 8
⊢ χ₈' a = 0 ∨ χ₈' a = 1 ∨ χ₈' a = -1

Next tactic:
fin_cases a
/-- `χ₈'` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈' : χ₈'.IsQuadratic := by
  intro a
  --porting note: was `decide!`
  fin_cases a
  

Proof state:
case head
⊢ χ₈' { val := 0, isLt := (_ : 0 < 7 + 1) } = 0 ∨
    χ₈' { val := 0, isLt := (_ : 0 < 7 + 1) } = 1 ∨ χ₈' { val := 0, isLt := (_ : 0 < 7 + 1) } = -1
case tail.head
⊢ χ₈' { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = 0 ∨
    χ₈' { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = 1 ∨
      χ₈' { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = -1
case tail.tail.head
⊢ χ₈' { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = 0 ∨
    χ₈' { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = 1 ∨
      χ₈' { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = -1
case tail.tail.tail.head
⊢ χ₈' { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = 0 ∨
    χ₈' { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = 1 ∨
      χ₈' { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = -1
case tail.tail.tail.tail.head
⊢ χ₈' { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = 0 ∨
    χ₈' { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = 1 ∨
      χ₈' { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = -1
case tail.tail.tail.tail.tail.head
⊢ χ₈' { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = 0 ∨
    χ₈' { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = 1 ∨
      χ₈' { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = -1
case tail.tail.tail.tail.tail.tail.head
⊢ χ₈'
        { val := 6,
          isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =
      0 ∨
    χ₈'
          { val := 6,
            isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =
        1 ∨
      χ₈'
          { val := 6,
            isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =
        -1
case tail.tail.tail.tail.tail.tail.tail.head
⊢ χ₈'
        { val := 7,
          isLt :=
            (_ :
              (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a) 7) } =
      0 ∨
    χ₈'
          { val := 7,
            isLt :=
              (_ :
                (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a)
                  7) } =
        1 ∨
      χ₈'
          { val := 7,
            isLt :=
              (_ :
                (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a)
                  7) } =
        -1

Next tactic:
all_goals decide
/-- `χ₈'` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈' : χ₈'.IsQuadratic := by
  intro a
  --porting note: was `decide!`
  fin_cases a
  all_goals 

Proof state:
case head
⊢ χ₈' { val := 0, isLt := (_ : 0 < 7 + 1) } = 0 ∨
    χ₈' { val := 0, isLt := (_ : 0 < 7 + 1) } = 1 ∨ χ₈' { val := 0, isLt := (_ : 0 < 7 + 1) } = -1

Next tactic:
decide
/-- `χ₈'` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈' : χ₈'.IsQuadratic := by
  intro a
  --porting note: was `decide!`
  fin_cases a
  all_goals 

Proof state:
case tail.head
⊢ χ₈' { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = 0 ∨
    χ₈' { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = 1 ∨
      χ₈' { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = -1

Next tactic:
decide
/-- `χ₈'` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈' : χ₈'.IsQuadratic := by
  intro a
  --porting note: was `decide!`
  fin_cases a
  all_goals 

Proof state:
case tail.tail.head
⊢ χ₈' { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = 0 ∨
    χ₈' { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = 1 ∨
      χ₈' { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = -1

Next tactic:
decide
/-- `χ₈'` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈' : χ₈'.IsQuadratic := by
  intro a
  --porting note: was `decide!`
  fin_cases a
  all_goals 

Proof state:
case tail.tail.tail.head
⊢ χ₈' { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = 0 ∨
    χ₈' { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = 1 ∨
      χ₈' { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = -1

Next tactic:
decide
/-- `χ₈'` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈' : χ₈'.IsQuadratic := by
  intro a
  --porting note: was `decide!`
  fin_cases a
  all_goals 

Proof state:
case tail.tail.tail.tail.head
⊢ χ₈' { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = 0 ∨
    χ₈' { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = 1 ∨
      χ₈' { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = -1

Next tactic:
decide
/-- `χ₈'` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈' : χ₈'.IsQuadratic := by
  intro a
  --porting note: was `decide!`
  fin_cases a
  all_goals 

Proof state:
case tail.tail.tail.tail.tail.head
⊢ χ₈' { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = 0 ∨
    χ₈' { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = 1 ∨
      χ₈' { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = -1

Next tactic:
decide