File: Mathlib/Algebra/GroupWithZero/Defs.lean

full_name: MulZeroClass
code: /-- Typeclass for expressing that a type `M₀` with multiplication and a zero satisfies
`0 * a = 0` and `a * 0 = 0` for all `a : M₀`. -/
class MulZeroClass (M₀ : Type u) extends Mul M₀, Zero M₀ where
  /-- Zero is a left absorbing element for multiplication -/
  zero_mul : ∀ a : M₀, 0 * a = 0
  /-- Zero is a right absorbing element for multiplication -/
  mul_zero : ∀ a : M₀, a * 0 = 0
goal: Type u

full_name: MulZeroClass.zero_mul
code: /-- Typeclass for expressing that a type `M₀` with multiplication and a zero satisfies
`0 * a = 0` and `a * 0 = 0` for all `a : M₀`. -/
class MulZeroClass (M₀ : Type u) extends Mul M₀, Zero M₀ where
  /-- Zero is a left absorbing element for multiplication -/
  zero_mul : ∀ a : M₀, 0 * a = 0
  /-- Zero is a right absorbing element for multiplication -/
  mul_zero : ∀ a : M₀, a * 0 = 0
goal: 0 * a = 0

full_name: MulZeroClass.mul_zero
code: /-- Typeclass for expressing that a type `M₀` with multiplication and a zero satisfies
`0 * a = 0` and `a * 0 = 0` for all `a : M₀`. -/
class MulZeroClass (M₀ : Type u) extends Mul M₀, Zero M₀ where
  /-- Zero is a left absorbing element for multiplication -/
  zero_mul : ∀ a : M₀, 0 * a = 0
  /-- Zero is a right absorbing element for multiplication -/
  mul_zero : ∀ a : M₀, a * 0 = 0
goal: a * 0 = 0

full_name: IsLeftCancelMulZero.mul_left_cancel_of_ne_zero
code: /-- A mixin for left cancellative multiplication by nonzero elements. -/
class IsLeftCancelMulZero (M₀ : Type u) [Mul M₀] [Zero M₀] : Prop where
  /-- Multiplication by a nonzero element is left cancellative. -/
  protected mul_left_cancel_of_ne_zero : ∀ {a b c : M₀}, a ≠ 0 → a * b = a * c → b = c
goal: a ≠ 0 → a * b = a * c → b = c

full_name: IsLeftCancelMulZero
code: /-- A mixin for left cancellative multiplication by nonzero elements. -/
class IsLeftCancelMulZero (M₀ : Type u) [Mul M₀] [Zero M₀] : Prop where
  /-- Multiplication by a nonzero element is left cancellative. -/
  protected mul_left_cancel_of_ne_zero : ∀ {a b c : M₀}, a ≠ 0 → a * b = a * c → b = c
goal: Prop

full_name: mul_left_cancel₀
code: theorem mul_left_cancel₀ (ha : a ≠ 0) (h : a * b = a * c) : b = c 
goal: b = c

full_name: mul_right_injective₀
code: theorem mul_right_injective₀ (ha : a ≠ 0) : Function.Injective (a * ·) 
goal: Function.Injective fun x => a * x

full_name: IsRightCancelMulZero.mul_right_cancel_of_ne_zero
code: /-- A mixin for right cancellative multiplication by nonzero elements. -/
class IsRightCancelMulZero (M₀ : Type u) [Mul M₀] [Zero M₀] : Prop where
  /-- Multiplicatin by a nonzero element is right cancellative. -/
  protected mul_right_cancel_of_ne_zero : ∀ {a b c : M₀}, b ≠ 0 → a * b = c * b → a = c
goal: b ≠ 0 → a * b = c * b → a = c

full_name: IsRightCancelMulZero
code: /-- A mixin for right cancellative multiplication by nonzero elements. -/
class IsRightCancelMulZero (M₀ : Type u) [Mul M₀] [Zero M₀] : Prop where
  /-- Multiplicatin by a nonzero element is right cancellative. -/
  protected mul_right_cancel_of_ne_zero : ∀ {a b c : M₀}, b ≠ 0 → a * b = c * b → a = c
goal: Prop

full_name: mul_right_cancel₀
code: theorem mul_right_cancel₀ (hb : b ≠ 0) (h : a * b = c * b) : a = c 
goal: a = c

full_name: mul_left_injective₀
code: theorem mul_left_injective₀ (hb : b ≠ 0) : Function.Injective fun a => a * b 
goal: Function.Injective fun a => a * b

full_name: IsCancelMulZero
code: /-- A mixin for cancellative multiplication by nonzero elements. -/
class IsCancelMulZero (M₀ : Type u) [Mul M₀] [Zero M₀]
  extends IsLeftCancelMulZero M₀, IsRightCancelMulZero M₀ : Prop
goal: Prop

full_name: NoZeroDivisors
code: /-- Predicate typeclass for expressing that `a * b = 0` implies `a = 0` or `b = 0`
for all `a` and `b` of type `G₀`. -/
class NoZeroDivisors (M₀ : Type*) [Mul M₀] [Zero M₀] : Prop where
  /-- For all `a` and `b` of `G₀`, `a * b = 0` implies `a = 0` or `b = 0`. -/
  eq_zero_or_eq_zero_of_mul_eq_zero : ∀ {a b : M₀}, a * b = 0 → a = 0 ∨ b = 0
goal: Prop

full_name: NoZeroDivisors.eq_zero_or_eq_zero_of_mul_eq_zero
code: /-- Predicate typeclass for expressing that `a * b = 0` implies `a = 0` or `b = 0`
for all `a` and `b` of type `G₀`. -/
class NoZeroDivisors (M₀ : Type*) [Mul M₀] [Zero M₀] : Prop where
  /-- For all `a` and `b` of `G₀`, `a * b = 0` implies `a = 0` or `b = 0`. -/
  eq_zero_or_eq_zero_of_mul_eq_zero : ∀ {a b : M₀}, a * b = 0 → a = 0 ∨ b = 0
goal: a * b = 0 → a = 0 ∨ b = 0

full_name: SemigroupWithZero
code: /-- A type `S₀` is a "semigroup with zero” if it is a semigroup with zero element, and `0` is left
and right absorbing. -/
class SemigroupWithZero (S₀ : Type u) extends Semigroup S₀, MulZeroClass S₀
goal: Type u

full_name: MulZeroOneClass
code: /-- A typeclass for non-associative monoids with zero elements. -/
class MulZeroOneClass (M₀ : Type u) extends MulOneClass M₀, MulZeroClass M₀
goal: Type u

full_name: MonoidWithZero
code: /-- A type `M₀` is a “monoid with zero” if it is a monoid with zero element, and `0` is left
and right absorbing. -/
class MonoidWithZero (M₀ : Type u) extends Monoid M₀, MulZeroOneClass M₀, SemigroupWithZero M₀
goal: Type u

full_name: CancelMonoidWithZero
code: /-- A type `M` is a `CancelMonoidWithZero` if it is a monoid with zero element, `0` is left
and right absorbing, and left/right multiplication by a non-zero element is injective. -/
class CancelMonoidWithZero (M₀ : Type*) extends MonoidWithZero M₀, IsCancelMulZero M₀
goal: Type u_4

full_name: CommMonoidWithZero
code: /-- A type `M` is a commutative “monoid with zero” if it is a commutative monoid with zero
element, and `0` is left and right absorbing. -/
class CommMonoidWithZero (M₀ : Type*) extends CommMonoid M₀, MonoidWithZero M₀
goal: Type u_4

full_name: mul_left_inj'
code: theorem mul_left_inj' (hc : c ≠ 0) : a * c = b * c ↔ a = b 
goal: a * c = b * c ↔ a = b

full_name: mul_right_inj'
code: theorem mul_right_inj' (ha : a ≠ 0) : a * b = a * c ↔ b = c 
goal: a * b = a * c ↔ b = c

full_name: IsLeftCancelMulZero.to_isRightCancelMulZero
code: lemma IsLeftCancelMulZero.to_isRightCancelMulZero [IsLeftCancelMulZero M₀] :
    IsRightCancelMulZero M₀ 
goal: IsRightCancelMulZero M₀

full_name: IsRightCancelMulZero.to_isLeftCancelMulZero
code: lemma IsRightCancelMulZero.to_isLeftCancelMulZero [IsRightCancelMulZero M₀] :
    IsLeftCancelMulZero M₀ 
goal: IsLeftCancelMulZero M₀

full_name: IsLeftCancelMulZero.to_isCancelMulZero
code: lemma IsLeftCancelMulZero.to_isCancelMulZero [IsLeftCancelMulZero M₀] :
    IsCancelMulZero M₀ 
goal: IsCancelMulZero M₀

full_name: IsRightCancelMulZero.to_isCancelMulZero
code: lemma IsRightCancelMulZero.to_isCancelMulZero [IsRightCancelMulZero M₀] :
    IsCancelMulZero M₀ 
goal: IsCancelMulZero M₀

full_name: CancelCommMonoidWithZero
code: /-- A type `M` is a `CancelCommMonoidWithZero` if it is a commutative monoid with zero element,
 `0` is left and right absorbing,
  and left/right multiplication by a non-zero element is injective. -/
class CancelCommMonoidWithZero (M₀ : Type*) extends CommMonoidWithZero M₀, IsLeftCancelMulZero M₀
goal: Type u_4

full_name: CancelCommMonoidWithZero.toCancelMonoidWithZero
code: instance (priority := 100) CancelCommMonoidWithZero.toCancelMonoidWithZero
    [CancelCommMonoidWithZero M₀] : CancelMonoidWithZero M₀ 
goal: CancelMonoidWithZero M₀

full_name: MulDivCancelClass
code: /-- Prop-valued mixin for a monoid with zero to be equipped with a cancelling division.

The obvious use case is groups with zero, but this condition is also satisfied by `ℕ`, `ℤ` and, more
generally, any euclidean domain. -/
class MulDivCancelClass (M₀ : Type*) [MonoidWithZero M₀] [Div M₀] : Prop where
  protected mul_div_cancel (a b : M₀) : b ≠ 0 → a * b / b = a
goal: Prop

full_name: MulDivCancelClass.mul_div_cancel
code: /-- Prop-valued mixin for a monoid with zero to be equipped with a cancelling division.

The obvious use case is groups with zero, but this condition is also satisfied by `ℕ`, `ℤ` and, more
generally, any euclidean domain. -/
class MulDivCancelClass (M₀ : Type*) [MonoidWithZero M₀] [Div M₀] : Prop where
  protected mul_div_cancel (a b : M₀) : b ≠ 0 → a * b / b = a
goal: b ≠ 0 → a * b / b = a

full_name: mul_div_cancel_right₀
code: @[simp] lemma mul_div_cancel_right₀ (a : M₀) (hb : b ≠ 0) : a * b / b = a 
goal: a * b / b = a

full_name: mul_div_cancel_left₀
code: @[simp] lemma mul_div_cancel_left₀ (b : M₀) (ha : a ≠ 0) : a * b / a = b 
goal: a * b / a = b

full_name: GroupWithZero.mul_inv_cancel
code: /-- A type `G₀` is a “group with zero” if it is a monoid with zero element (distinct from `1`)
such that every nonzero element is invertible.
The type is required to come with an “inverse” function, and the inverse of `0` must be `0`.

Examples include division rings and the ordered monoids that are the
target of valuations in general valuation theory. -/
class GroupWithZero (G₀ : Type u) extends MonoidWithZero G₀, DivInvMonoid G₀, Nontrivial G₀ where
  /-- The inverse of `0` in a group with zero is `0`. -/
  inv_zero : (0 : G₀)⁻¹ = 0
  /-- Every nonzero element of a group with zero is invertible. -/
  protected mul_inv_cancel (a : G₀) : a ≠ 0 → a * a⁻¹ = 1
goal: a ≠ 0 → a * a⁻¹ = 1

full_name: GroupWithZero
code: /-- A type `G₀` is a “group with zero” if it is a monoid with zero element (distinct from `1`)
such that every nonzero element is invertible.
The type is required to come with an “inverse” function, and the inverse of `0` must be `0`.

Examples include division rings and the ordered monoids that are the
target of valuations in general valuation theory. -/
class GroupWithZero (G₀ : Type u) extends MonoidWithZero G₀, DivInvMonoid G₀, Nontrivial G₀ where
  /-- The inverse of `0` in a group with zero is `0`. -/
  inv_zero : (0 : G₀)⁻¹ = 0
  /-- Every nonzero element of a group with zero is invertible. -/
  protected mul_inv_cancel (a : G₀) : a ≠ 0 → a * a⁻¹ = 1
goal: Type u

full_name: GroupWithZero.inv_zero
code: /-- A type `G₀` is a “group with zero” if it is a monoid with zero element (distinct from `1`)
such that every nonzero element is invertible.
The type is required to come with an “inverse” function, and the inverse of `0` must be `0`.

Examples include division rings and the ordered monoids that are the
target of valuations in general valuation theory. -/
class GroupWithZero (G₀ : Type u) extends MonoidWithZero G₀, DivInvMonoid G₀, Nontrivial G₀ where
  /-- The inverse of `0` in a group with zero is `0`. -/
  inv_zero : (0 : G₀)⁻¹ = 0
  /-- Every nonzero element of a group with zero is invertible. -/
  protected mul_inv_cancel (a : G₀) : a ≠ 0 → a * a⁻¹ = 1
goal: 0⁻¹ = 0

full_name: mul_inv_cancel
code: @[simp] lemma mul_inv_cancel (h : a ≠ 0) : a * a⁻¹ = 1 
goal: a * a⁻¹ = 1

full_name: GroupWithZero.toMulDivCancelClass
code: instance (priority := 100) GroupWithZero.toMulDivCancelClass : MulDivCancelClass G₀ 
goal: MulDivCancelClass G₀

full_name: CommGroupWithZero
code: /-- A type `G₀` is a commutative “group with zero”
if it is a commutative monoid with zero element (distinct from `1`)
such that every nonzero element is invertible.
The type is required to come with an “inverse” function, and the inverse of `0` must be `0`. -/
class CommGroupWithZero (G₀ : Type*) extends CommMonoidWithZero G₀, GroupWithZero G₀
goal: Type u_4

full_name: eq_zero_or_one_of_sq_eq_self
code: lemma eq_zero_or_one_of_sq_eq_self (hx : x ^ 2 = x) : x = 0 ∨ x = 1 
goal: x = 0 ∨ x = 1

full_name: mul_inv_cancel_right₀
code: @[simp]
theorem mul_inv_cancel_right₀ (h : b ≠ 0) (a : G₀) : a * b * b⁻¹ = a 
goal: a * b * b⁻¹ = a

full_name: mul_inv_cancel_left₀
code: @[simp]
theorem mul_inv_cancel_left₀ (h : a ≠ 0) (b : G₀) : a * (a⁻¹ * b) = b 
goal: a * (a⁻¹ * b) = b

full_name: mul_eq_zero_of_left
code: theorem mul_eq_zero_of_left {a : M₀} (h : a = 0) (b : M₀) : a * b = 0 
goal: a * b = 0

full_name: mul_eq_zero_of_right
code: theorem mul_eq_zero_of_right (a : M₀) {b : M₀} (h : b = 0) : a * b = 0 
goal: a * b = 0

full_name: mul_eq_zero
code: /-- If `α` has no zero divisors, then the product of two elements equals zero iff one of them
equals zero. -/
@[simp]
theorem mul_eq_zero : a * b = 0 ↔ a = 0 ∨ b = 0 
goal: a * b = 0 ↔ a = 0 ∨ b = 0

full_name: zero_eq_mul
code: /-- If `α` has no zero divisors, then the product of two elements equals zero iff one of them
equals zero. -/
@[simp]
theorem zero_eq_mul : 0 = a * b ↔ a = 0 ∨ b = 0 
goal: 0 = a * b ↔ a = 0 ∨ b = 0

full_name: mul_ne_zero_iff
code: /-- If `α` has no zero divisors, then the product of two elements is nonzero iff both of them
are nonzero. -/
theorem mul_ne_zero_iff : a * b ≠ 0 ↔ a ≠ 0 ∧ b ≠ 0 
goal: a * b ≠ 0 ↔ a ≠ 0 ∧ b ≠ 0

full_name: mul_eq_zero_comm
code: /-- If `α` has no zero divisors, then for elements `a, b : α`, `a * b` equals zero iff so is
`b * a`. -/
theorem mul_eq_zero_comm : a * b = 0 ↔ b * a = 0 
goal: a * b = 0 ↔ b * a = 0

full_name: mul_ne_zero_comm
code: /-- If `α` has no zero divisors, then for elements `a, b : α`, `a * b` is nonzero iff so is
`b * a`. -/
theorem mul_ne_zero_comm : a * b ≠ 0 ↔ b * a ≠ 0 
goal: a * b ≠ 0 ↔ b * a ≠ 0

full_name: mul_self_eq_zero
code: theorem mul_self_eq_zero : a * a = 0 ↔ a = 0 
goal: a * a = 0 ↔ a = 0

full_name: zero_eq_mul_self
code: theorem zero_eq_mul_self : 0 = a * a ↔ a = 0 
goal: 0 = a * a ↔ a = 0

full_name: mul_self_ne_zero
code: theorem mul_self_ne_zero : a * a ≠ 0 ↔ a ≠ 0 
goal: a * a ≠ 0 ↔ a ≠ 0

full_name: zero_ne_mul_self
code: theorem zero_ne_mul_self : 0 ≠ a * a ↔ a ≠ 0 
goal: 0 ≠ a * a ↔ a ≠ 0