Documentation

Mathlib.Algebra.Group.Even

Squares and even elements #

This file defines square and even elements in a monoid.

Main declarations #

TODO #

See also #

Mathlib.Algebra.Ring.Parity for the definition of odd elements.

def IsSquare {α : Type u_2} [Mul α] (a : α) :

An element a of a type α with multiplication satisfies IsSquare a if a = r * r, for some r : α.

Equations
Instances For
    def Even {α : Type u_2} [Add α] (a : α) :

    An element a of a type α with addition satisfies Even a if a = r + r, for some r : α.

    Equations
    Instances For
      @[simp]
      theorem isSquare_mul_self {α : Type u_2} [Mul α] (m : α) :
      IsSquare (m * m)
      @[simp]
      theorem even_add_self {α : Type u_2} [Add α] (m : α) :
      Even (m + m)
      theorem isSquare_op_iff {α : Type u_2} [Mul α] {a : α} :
      theorem even_op_iff {α : Type u_2} [Add α] {a : α} :
      theorem even_unop_iff {α : Type u_2} [Add α] {a : αᵃᵒᵖ} :
      @[simp]
      theorem even_ofMul_iff {α : Type u_2} [Mul α] {a : α} :
      Even (Additive.ofMul a) IsSquare a
      @[simp]
      theorem isSquare_toMul_iff {α : Type u_2} [Mul α] {a : Additive α} :
      IsSquare (Additive.toMul a) Even a
      instance Additive.instDecidablePredEven {α : Type u_2} [Mul α] [DecidablePred IsSquare] :
      Equations
      @[simp]
      theorem isSquare_ofAdd_iff {α : Type u_2} [Add α] {a : α} :
      IsSquare (Multiplicative.ofAdd a) Even a
      @[simp]
      theorem even_toAdd_iff {α : Type u_2} [Add α] {a : Multiplicative α} :
      Even (Multiplicative.toAdd a) IsSquare a
      Equations
      @[simp]
      theorem isSquare_one {α : Type u_2} [MulOneClass α] :
      @[simp]
      theorem even_zero {α : Type u_2} [AddZeroClass α] :
      theorem IsSquare.map {F : Type u_1} {α : Type u_2} {β : Type u_3} [MulOneClass α] [MulOneClass β] [FunLike F α β] [MonoidHomClass F α β] {m : α} (f : F) :
      IsSquare mIsSquare (f m)
      theorem Even.map {F : Type u_1} {α : Type u_2} {β : Type u_3} [AddZeroClass α] [AddZeroClass β] [FunLike F α β] [AddMonoidHomClass F α β] {m : α} (f : F) :
      Even mEven (f m)
      theorem isSquare_iff_exists_sq {α : Type u_2} [Monoid α] (m : α) :
      IsSquare m ∃ (c : α), m = c ^ 2
      theorem even_iff_exists_two_nsmul {α : Type u_2} [AddMonoid α] (m : α) :
      Even m ∃ (c : α), m = 2 c
      theorem IsSquare.exists_sq {α : Type u_2} [Monoid α] (m : α) :
      IsSquare m∃ (c : α), m = c ^ 2

      Alias of the forward direction of isSquare_iff_exists_sq.

      theorem isSquare_of_exists_sq {α : Type u_2} [Monoid α] (m : α) :
      (∃ (c : α), m = c ^ 2)IsSquare m

      Alias of the reverse direction of isSquare_iff_exists_sq.

      theorem Even.exists_two_nsmul {α : Type u_2} [AddMonoid α] (m : α) :
      Even m∃ (c : α), m = 2 c

      Alias of the forwards direction of even_iff_exists_two_nsmul.

      theorem IsSquare.pow {α : Type u_2} [Monoid α] {a : α} (n : ) :
      IsSquare aIsSquare (a ^ n)
      theorem Even.nsmul {α : Type u_2} [AddMonoid α] {a : α} (n : ) :
      Even aEven (n a)
      theorem Even.isSquare_pow {α : Type u_2} [Monoid α] {n : } :
      Even n∀ (a : α), IsSquare (a ^ n)
      theorem Even.nsmul' {α : Type u_2} [AddMonoid α] {n : } :
      Even n∀ (a : α), Even (n a)
      theorem IsSquare_sq {α : Type u_2} [Monoid α] (a : α) :
      IsSquare (a ^ 2)
      theorem even_two_nsmul {α : Type u_2} [AddMonoid α] (a : α) :
      Even (2 a)
      theorem IsSquare.mul {α : Type u_2} [CommSemigroup α] {a b : α} :
      IsSquare aIsSquare bIsSquare (a * b)
      theorem Even.add {α : Type u_2} [AddCommSemigroup α] {a b : α} :
      Even aEven bEven (a + b)
      @[simp]
      theorem isSquare_inv {α : Type u_2} [DivisionMonoid α] {a : α} :
      @[simp]
      theorem even_neg {α : Type u_2} [SubtractionMonoid α] {a : α} :
      Even (-a) Even a
      theorem IsSquare.inv {α : Type u_2} [DivisionMonoid α] {a : α} :

      Alias of the reverse direction of isSquare_inv.

      theorem Even.neg {α : Type u_2} [SubtractionMonoid α] {a : α} :
      Even aEven (-a)
      theorem IsSquare.zpow {α : Type u_2} [DivisionMonoid α] {a : α} (n : ) :
      IsSquare aIsSquare (a ^ n)
      theorem Even.zsmul {α : Type u_2} [SubtractionMonoid α] {a : α} (n : ) :
      Even aEven (n a)
      theorem IsSquare.div {α : Type u_2} [DivisionCommMonoid α] {a b : α} (ha : IsSquare a) (hb : IsSquare b) :
      IsSquare (a / b)
      theorem Even.sub {α : Type u_2} [SubtractionCommMonoid α] {a b : α} (ha : Even a) (hb : Even b) :
      Even (a - b)
      @[simp]
      theorem Even.isSquare_zpow {α : Type u_2} [Group α] {n : } :
      Even n∀ (a : α), IsSquare (a ^ n)
      @[simp]
      theorem Even.zsmul' {α : Type u_2} [AddGroup α] {n : } :
      Even n∀ (a : α), Even (n a)