File: Mathlib/Algebra/Polynomial/Mirror.lean

full_name: Polynomial.mirror
code: /-- mirror of a polynomial: reverses the coefficients while preserving `Polynomial.natDegree` -/
noncomputable def mirror 
goal: Polynomial R

full_name: Polynomial.mirror_zero
code: @[simp]
theorem mirror_zero : (0 : R[X]).mirror = 0 
goal: Polynomial.mirror 0 = 0

full_name: Polynomial.mirror_monomial
code: theorem mirror_monomial (n : ℕ) (a : R) : (monomial n a).mirror = monomial n a 
goal: ((Polynomial.monomial n) a).mirror = (Polynomial.monomial n) a

full_name: Polynomial.mirror_C
code: theorem mirror_C (a : R) : (C a).mirror = C a 
goal: (Polynomial.C a).mirror = Polynomial.C a

full_name: Polynomial.mirror_X
code: theorem mirror_X : X.mirror = (X : R[X]) 
goal: Polynomial.X.mirror = Polynomial.X

full_name: Polynomial.mirror_natDegree
code: theorem mirror_natDegree : p.mirror.natDegree = p.natDegree 
goal: p.mirror.natDegree = p.natDegree

full_name: Polynomial.mirror_natTrailingDegree
code: theorem mirror_natTrailingDegree : p.mirror.natTrailingDegree = p.natTrailingDegree 
goal: p.mirror.natTrailingDegree = p.natTrailingDegree

full_name: Polynomial.coeff_mirror
code: theorem coeff_mirror (n : ℕ) :
    p.mirror.coeff n = p.coeff (revAt (p.natDegree + p.natTrailingDegree) n) 
goal: p.mirror.coeff n = p.coeff ((Polynomial.revAt (p.natDegree + p.natTrailingDegree)) n)

full_name: Polynomial.mirror_eval_one
code: theorem mirror_eval_one : p.mirror.eval 1 = p.eval 1 
goal: Polynomial.eval 1 p.mirror = Polynomial.eval 1 p

full_name: Polynomial.mirror_mirror
code: theorem mirror_mirror : p.mirror.mirror = p 
goal: p.mirror.mirror = p

full_name: Polynomial.mirror_involutive
code: theorem mirror_involutive : Function.Involutive (mirror : R[X] → R[X]) 
goal: Function.Involutive Polynomial.mirror

full_name: Polynomial.mirror_eq_iff
code: theorem mirror_eq_iff : p.mirror = q ↔ p = q.mirror 
goal: p.mirror = q ↔ p = q.mirror

full_name: Polynomial.mirror_inj
code: @[simp]
theorem mirror_inj : p.mirror = q.mirror ↔ p = q 
goal: p.mirror = q.mirror ↔ p = q

full_name: Polynomial.mirror_eq_zero
code: @[simp]
theorem mirror_eq_zero : p.mirror = 0 ↔ p = 0 
goal: p.mirror = 0 ↔ p = 0

full_name: Polynomial.mirror_trailingCoeff
code: @[simp]
theorem mirror_trailingCoeff : p.mirror.trailingCoeff = p.leadingCoeff 
goal: p.mirror.trailingCoeff = p.leadingCoeff

full_name: Polynomial.mirror_leadingCoeff
code: @[simp]
theorem mirror_leadingCoeff : p.mirror.leadingCoeff = p.trailingCoeff 
goal: p.mirror.leadingCoeff = p.trailingCoeff

full_name: Polynomial.coeff_mul_mirror
code: theorem coeff_mul_mirror :
    (p * p.mirror).coeff (p.natDegree + p.natTrailingDegree) = p.sum fun n => (· ^ 2) 
goal: (p * p.mirror).coeff (p.natDegree + p.natTrailingDegree) = p.sum fun n x => x ^ 2

full_name: Polynomial.natDegree_mul_mirror
code: theorem natDegree_mul_mirror : (p * p.mirror).natDegree = 2 * p.natDegree 
goal: (p * p.mirror).natDegree = 2 * p.natDegree

full_name: Polynomial.natTrailingDegree_mul_mirror
code: theorem natTrailingDegree_mul_mirror :
    (p * p.mirror).natTrailingDegree = 2 * p.natTrailingDegree 
goal: (p * p.mirror).natTrailingDegree = 2 * p.natTrailingDegree

full_name: Polynomial.mirror_neg
code: theorem mirror_neg : (-p).mirror = -p.mirror 
goal: (-p).mirror = -p.mirror

full_name: Polynomial.mirror_mul_of_domain
code: theorem mirror_mul_of_domain : (p * q).mirror = p.mirror * q.mirror 
goal: (p * q).mirror = p.mirror * q.mirror

full_name: Polynomial.mirror_smul
code: theorem mirror_smul (a : R) : (a • p).mirror = a • p.mirror 
goal: (a • p).mirror = a • p.mirror

full_name: Polynomial.irreducible_of_mirror
code: theorem irreducible_of_mirror (h1 : ¬IsUnit f)
    (h2 : ∀ k, f * f.mirror = k * k.mirror → k = f ∨ k = -f ∨ k = f.mirror ∨ k = -f.mirror)
    (h3 : IsRelPrime f f.mirror) : Irreducible f 
goal: Irreducible f