fact
stringlengths 6
3.84k
| type
stringclasses 11
values | library
stringclasses 32
values | imports
listlengths 1
14
| filename
stringlengths 20
95
| symbolic_name
stringlengths 1
90
| docstring
stringlengths 7
20k
⌀ |
|---|---|---|---|---|---|---|
sub_modEq_zero : a - b ≡ 0 [PMOD p] ↔ a ≡ b [PMOD p] := by simp [sub_modEq_iff_modEq_add]
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Field.Basic",
"Mathlib.Algebra.NoZeroSMulDivisors.Basic",
"Mathlib.Data.Int.ModEq",
"Mathlib.GroupTheory.QuotientGroup.Defs",
"Mathlib.Algebra.Group.Subgroup.ZPowers.Basic"
] |
Mathlib/Algebra/ModEq.lean
|
sub_modEq_zero
| null |
add_modEq_left : a + b ≡ a [PMOD p] ↔ b ≡ 0 [PMOD p] := by simp [← modEq_sub_iff_add_modEq']
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Field.Basic",
"Mathlib.Algebra.NoZeroSMulDivisors.Basic",
"Mathlib.Data.Int.ModEq",
"Mathlib.GroupTheory.QuotientGroup.Defs",
"Mathlib.Algebra.Group.Subgroup.ZPowers.Basic"
] |
Mathlib/Algebra/ModEq.lean
|
add_modEq_left
| null |
add_modEq_right : a + b ≡ b [PMOD p] ↔ a ≡ 0 [PMOD p] := by simp [← modEq_sub_iff_add_modEq]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Field.Basic",
"Mathlib.Algebra.NoZeroSMulDivisors.Basic",
"Mathlib.Data.Int.ModEq",
"Mathlib.GroupTheory.QuotientGroup.Defs",
"Mathlib.Algebra.Group.Subgroup.ZPowers.Basic"
] |
Mathlib/Algebra/ModEq.lean
|
add_modEq_right
| null |
modEq_iff_eq_add_zsmul : a ≡ b [PMOD p] ↔ ∃ z : ℤ, b = a + z • p := by
simp_rw [ModEq, sub_eq_iff_eq_add']
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Field.Basic",
"Mathlib.Algebra.NoZeroSMulDivisors.Basic",
"Mathlib.Data.Int.ModEq",
"Mathlib.GroupTheory.QuotientGroup.Defs",
"Mathlib.Algebra.Group.Subgroup.ZPowers.Basic"
] |
Mathlib/Algebra/ModEq.lean
|
modEq_iff_eq_add_zsmul
| null |
modEq_zero_iff_eq_zsmul : a ≡ 0 [PMOD p] ↔ ∃ z : ℤ, a = z • p := by
rw [modEq_comm, modEq_iff_eq_add_zsmul]
simp_rw [zero_add]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Field.Basic",
"Mathlib.Algebra.NoZeroSMulDivisors.Basic",
"Mathlib.Data.Int.ModEq",
"Mathlib.GroupTheory.QuotientGroup.Defs",
"Mathlib.Algebra.Group.Subgroup.ZPowers.Basic"
] |
Mathlib/Algebra/ModEq.lean
|
modEq_zero_iff_eq_zsmul
| null |
not_modEq_iff_ne_add_zsmul : ¬a ≡ b [PMOD p] ↔ ∀ z : ℤ, b ≠ a + z • p := by
rw [modEq_iff_eq_add_zsmul, not_exists]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Field.Basic",
"Mathlib.Algebra.NoZeroSMulDivisors.Basic",
"Mathlib.Data.Int.ModEq",
"Mathlib.GroupTheory.QuotientGroup.Defs",
"Mathlib.Algebra.Group.Subgroup.ZPowers.Basic"
] |
Mathlib/Algebra/ModEq.lean
|
not_modEq_iff_ne_add_zsmul
| null |
modEq_iff_eq_mod_zmultiples : a ≡ b [PMOD p] ↔ (a : α ⧸ AddSubgroup.zmultiples p) = b := by
rw [modEq_comm]
simp_rw [modEq_iff_eq_add_zsmul, QuotientAddGroup.eq_iff_sub_mem, AddSubgroup.mem_zmultiples_iff,
eq_sub_iff_add_eq', eq_comm]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Field.Basic",
"Mathlib.Algebra.NoZeroSMulDivisors.Basic",
"Mathlib.Data.Int.ModEq",
"Mathlib.GroupTheory.QuotientGroup.Defs",
"Mathlib.Algebra.Group.Subgroup.ZPowers.Basic"
] |
Mathlib/Algebra/ModEq.lean
|
modEq_iff_eq_mod_zmultiples
| null |
not_modEq_iff_ne_mod_zmultiples :
¬a ≡ b [PMOD p] ↔ (a : α ⧸ AddSubgroup.zmultiples p) ≠ b :=
modEq_iff_eq_mod_zmultiples.not
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Field.Basic",
"Mathlib.Algebra.NoZeroSMulDivisors.Basic",
"Mathlib.Data.Int.ModEq",
"Mathlib.GroupTheory.QuotientGroup.Defs",
"Mathlib.Algebra.Group.Subgroup.ZPowers.Basic"
] |
Mathlib/Algebra/ModEq.lean
|
not_modEq_iff_ne_mod_zmultiples
| null |
modEq_nsmul_cases (n : ℕ) (hn : n ≠ 0) :
a ≡ b [PMOD p] ↔ ∃ i < n, a ≡ b + i • p [PMOD (n • p)] := by
simp_rw [← sub_modEq_iff_modEq_add, modEq_comm (b := b)]
simp_rw [AddCommGroup.ModEq, sub_right_comm, sub_eq_iff_eq_add (b := _ • _), ← natCast_zsmul,
smul_smul, ← add_smul]
constructor
· rintro ⟨k, hk⟩
refine ⟨(k % n).toNat, ?_⟩
rw [← Int.ofNat_lt, Int.toNat_of_nonneg (Int.emod_nonneg _ (mod_cast hn))]
refine ⟨?_, k / n, ?_⟩
· refine Int.emod_lt_of_pos _ ?_
cutsat
· rw [hk, Int.ediv_mul_add_emod]
· rintro ⟨k, _, j, hj⟩
rw [hj]
exact ⟨_, rfl⟩
alias ⟨ModEq.nsmul_cases, _⟩ := AddCommGroup.modEq_nsmul_cases
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Field.Basic",
"Mathlib.Algebra.NoZeroSMulDivisors.Basic",
"Mathlib.Data.Int.ModEq",
"Mathlib.GroupTheory.QuotientGroup.Defs",
"Mathlib.Algebra.Group.Subgroup.ZPowers.Basic"
] |
Mathlib/Algebra/ModEq.lean
|
modEq_nsmul_cases
|
If `a ≡ b [PMOD p]`, then mod `n • p` there are `n` cases.
|
@[simp]
modEq_iff_int_modEq {a b z : ℤ} : a ≡ b [PMOD z] ↔ a ≡ b [ZMOD z] := by
simp [ModEq, dvd_iff_exists_eq_mul_left, Int.modEq_iff_dvd]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Field.Basic",
"Mathlib.Algebra.NoZeroSMulDivisors.Basic",
"Mathlib.Data.Int.ModEq",
"Mathlib.GroupTheory.QuotientGroup.Defs",
"Mathlib.Algebra.Group.Subgroup.ZPowers.Basic"
] |
Mathlib/Algebra/ModEq.lean
|
modEq_iff_int_modEq
| null |
@[simp, norm_cast]
intCast_modEq_intCast {a b z : ℤ} : a ≡ b [PMOD (z : α)] ↔ a ≡ b [PMOD z] := by
simp_rw [ModEq, ← Int.cast_mul_eq_zsmul_cast]
norm_cast
@[simp, norm_cast]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Field.Basic",
"Mathlib.Algebra.NoZeroSMulDivisors.Basic",
"Mathlib.Data.Int.ModEq",
"Mathlib.GroupTheory.QuotientGroup.Defs",
"Mathlib.Algebra.Group.Subgroup.ZPowers.Basic"
] |
Mathlib/Algebra/ModEq.lean
|
intCast_modEq_intCast
| null |
intCast_modEq_intCast' {a b : ℤ} {n : ℕ} : a ≡ b [PMOD (n : α)] ↔ a ≡ b [PMOD (n : ℤ)] := by
simpa using intCast_modEq_intCast (α := α) (z := n)
@[simp, norm_cast]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Field.Basic",
"Mathlib.Algebra.NoZeroSMulDivisors.Basic",
"Mathlib.Data.Int.ModEq",
"Mathlib.GroupTheory.QuotientGroup.Defs",
"Mathlib.Algebra.Group.Subgroup.ZPowers.Basic"
] |
Mathlib/Algebra/ModEq.lean
|
intCast_modEq_intCast'
| null |
natCast_modEq_natCast {a b n : ℕ} : a ≡ b [PMOD (n : α)] ↔ a ≡ b [MOD n] := by
simp_rw [← Int.natCast_modEq_iff, ← modEq_iff_int_modEq, ← @intCast_modEq_intCast α,
Int.cast_natCast]
alias ⟨ModEq.of_intCast, ModEq.intCast⟩ := intCast_modEq_intCast
alias ⟨_root_.Nat.ModEq.of_natCast, ModEq.natCast⟩ := natCast_modEq_natCast
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Field.Basic",
"Mathlib.Algebra.NoZeroSMulDivisors.Basic",
"Mathlib.Data.Int.ModEq",
"Mathlib.GroupTheory.QuotientGroup.Defs",
"Mathlib.Algebra.Group.Subgroup.ZPowers.Basic"
] |
Mathlib/Algebra/ModEq.lean
|
natCast_modEq_natCast
| null |
@[simp] div_modEq_div (hc : c ≠ 0) : a / c ≡ b / c [PMOD p] ↔ a ≡ b [PMOD (p * c)] := by
simp [ModEq, ← sub_div, div_eq_iff hc, mul_assoc]
@[simp] lemma mul_modEq_mul_right (hc : c ≠ 0) : a * c ≡ b * c [PMOD p] ↔ a ≡ b [PMOD (p / c)] := by
rw [div_eq_mul_inv, ← div_modEq_div (inv_ne_zero hc), div_inv_eq_mul, div_inv_eq_mul]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Field.Basic",
"Mathlib.Algebra.NoZeroSMulDivisors.Basic",
"Mathlib.Data.Int.ModEq",
"Mathlib.GroupTheory.QuotientGroup.Defs",
"Mathlib.Algebra.Group.Subgroup.ZPowers.Basic"
] |
Mathlib/Algebra/ModEq.lean
|
div_modEq_div
| null |
@[simp] mul_modEq_mul_left (hc : c ≠ 0) : c * a ≡ c * b [PMOD p] ↔ a ≡ b [PMOD (p / c)] := by
simp [mul_comm c, hc]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Field.Basic",
"Mathlib.Algebra.NoZeroSMulDivisors.Basic",
"Mathlib.Data.Int.ModEq",
"Mathlib.GroupTheory.QuotientGroup.Defs",
"Mathlib.Algebra.Group.Subgroup.ZPowers.Basic"
] |
Mathlib/Algebra/ModEq.lean
|
mul_modEq_mul_left
| null |
not_neZero {n : R} : ¬NeZero n ↔ n = 0 := by simp [neZero_iff]
|
theorem
|
Algebra
|
[
"Mathlib.Logic.Basic",
"Mathlib.Order.Defs.PartialOrder"
] |
Mathlib/Algebra/NeZero.lean
|
not_neZero
| null |
eq_zero_or_neZero (a : R) : a = 0 ∨ NeZero a :=
(eq_or_ne a 0).imp_right NeZero.mk
|
theorem
|
Algebra
|
[
"Mathlib.Logic.Basic",
"Mathlib.Order.Defs.PartialOrder"
] |
Mathlib/Algebra/NeZero.lean
|
eq_zero_or_neZero
| null |
@[simp] zero_ne_one [One α] [NeZero (1 : α)] : (0 : α) ≠ 1 := NeZero.ne' (1 : α)
@[simp] lemma one_ne_zero [One α] [NeZero (1 : α)] : (1 : α) ≠ 0 := NeZero.ne (1 : α)
|
lemma
|
Algebra
|
[
"Mathlib.Logic.Basic",
"Mathlib.Order.Defs.PartialOrder"
] |
Mathlib/Algebra/NeZero.lean
|
zero_ne_one
| null |
ne_zero_of_eq_one [One α] [NeZero (1 : α)] {a : α} (h : a = 1) : a ≠ 0 := h ▸ one_ne_zero
|
lemma
|
Algebra
|
[
"Mathlib.Logic.Basic",
"Mathlib.Order.Defs.PartialOrder"
] |
Mathlib/Algebra/NeZero.lean
|
ne_zero_of_eq_one
| null |
two_ne_zero [OfNat α 2] [NeZero (2 : α)] : (2 : α) ≠ 0 := NeZero.ne (2 : α)
|
lemma
|
Algebra
|
[
"Mathlib.Logic.Basic",
"Mathlib.Order.Defs.PartialOrder"
] |
Mathlib/Algebra/NeZero.lean
|
two_ne_zero
| null |
three_ne_zero [OfNat α 3] [NeZero (3 : α)] : (3 : α) ≠ 0 := NeZero.ne (3 : α)
|
lemma
|
Algebra
|
[
"Mathlib.Logic.Basic",
"Mathlib.Order.Defs.PartialOrder"
] |
Mathlib/Algebra/NeZero.lean
|
three_ne_zero
| null |
four_ne_zero [OfNat α 4] [NeZero (4 : α)] : (4 : α) ≠ 0 := NeZero.ne (4 : α)
variable (α)
|
lemma
|
Algebra
|
[
"Mathlib.Logic.Basic",
"Mathlib.Order.Defs.PartialOrder"
] |
Mathlib/Algebra/NeZero.lean
|
four_ne_zero
| null |
zero_ne_one' [One α] [NeZero (1 : α)] : (0 : α) ≠ 1 := zero_ne_one
|
lemma
|
Algebra
|
[
"Mathlib.Logic.Basic",
"Mathlib.Order.Defs.PartialOrder"
] |
Mathlib/Algebra/NeZero.lean
|
zero_ne_one'
| null |
one_ne_zero' [One α] [NeZero (1 : α)] : (1 : α) ≠ 0 := one_ne_zero
|
lemma
|
Algebra
|
[
"Mathlib.Logic.Basic",
"Mathlib.Order.Defs.PartialOrder"
] |
Mathlib/Algebra/NeZero.lean
|
one_ne_zero'
| null |
two_ne_zero' [OfNat α 2] [NeZero (2 : α)] : (2 : α) ≠ 0 := two_ne_zero
|
lemma
|
Algebra
|
[
"Mathlib.Logic.Basic",
"Mathlib.Order.Defs.PartialOrder"
] |
Mathlib/Algebra/NeZero.lean
|
two_ne_zero'
| null |
three_ne_zero' [OfNat α 3] [NeZero (3 : α)] : (3 : α) ≠ 0 := three_ne_zero
|
lemma
|
Algebra
|
[
"Mathlib.Logic.Basic",
"Mathlib.Order.Defs.PartialOrder"
] |
Mathlib/Algebra/NeZero.lean
|
three_ne_zero'
| null |
four_ne_zero' [OfNat α 4] [NeZero (4 : α)] : (4 : α) ≠ 0 := four_ne_zero
|
lemma
|
Algebra
|
[
"Mathlib.Logic.Basic",
"Mathlib.Order.Defs.PartialOrder"
] |
Mathlib/Algebra/NeZero.lean
|
four_ne_zero'
| null |
of_pos [Preorder M] [Zero M] (h : 0 < x) : NeZero x := ⟨ne_of_gt h⟩
|
theorem
|
Algebra
|
[
"Mathlib.Logic.Basic",
"Mathlib.Order.Defs.PartialOrder"
] |
Mathlib/Algebra/NeZero.lean
|
of_pos
| null |
PosPart (α : Type*) where
/-- The *positive part* of an element `a`. -/
posPart : α → α
|
class
|
Algebra
|
[
"Mathlib.Tactic.TypeStar",
"Mathlib.Tactic.ToAdditive"
] |
Mathlib/Algebra/Notation.lean
|
PosPart
|
A notation class for the *positive part* function: `a⁺`.
|
@[to_additive]
OneLePart (α : Type*) where
/-- The *positive part* of an element `a`. -/
oneLePart : α → α
|
class
|
Algebra
|
[
"Mathlib.Tactic.TypeStar",
"Mathlib.Tactic.ToAdditive"
] |
Mathlib/Algebra/Notation.lean
|
OneLePart
|
A notation class for the *positive part* function (multiplicative version): `a⁺ᵐ`.
|
NegPart (α : Type*) where
/-- The *negative part* of an element `a`. -/
negPart : α → α
|
class
|
Algebra
|
[
"Mathlib.Tactic.TypeStar",
"Mathlib.Tactic.ToAdditive"
] |
Mathlib/Algebra/Notation.lean
|
NegPart
|
A notation class for the *negative part* function: `a⁻`.
|
@[to_additive]
LeOnePart (α : Type*) where
/-- The *negative part* of an element `a`. -/
leOnePart : α → α
export OneLePart (oneLePart)
export LeOnePart (leOnePart)
export PosPart (posPart)
export NegPart (negPart)
@[inherit_doc] postfix:max "⁺ᵐ" => OneLePart.oneLePart
@[inherit_doc] postfix:max "⁻ᵐ" => LeOnePart.leOnePart
@[inherit_doc] postfix:max "⁺" => PosPart.posPart
@[inherit_doc] postfix:max "⁻" => NegPart.negPart
|
class
|
Algebra
|
[
"Mathlib.Tactic.TypeStar",
"Mathlib.Tactic.ToAdditive"
] |
Mathlib/Algebra/Notation.lean
|
LeOnePart
|
A notation class for the *negative part* function (multiplicative version): `a⁻ᵐ`.
|
PreOpposite (α : Type*) : Type _ where
/-- The element of `PreOpposite α` that represents `x : α`. -/ op' ::
/-- The element of `α` represented by `x : PreOpposite α`. -/ unop' : α
|
structure
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
PreOpposite
|
Auxiliary type to implement `MulOpposite` and `AddOpposite`.
It turns out to be convenient to have `MulOpposite α = AddOpposite α` true by definition, in the
same way that it is convenient to have `Additive α = α`; this means that we also get the defeq
`AddOpposite (Additive α) = MulOpposite α`, which is convenient when working with quotients.
This is a compromise between making `MulOpposite α = AddOpposite α = α` (what we had in Lean 3) and
having no defeqs within those three types (which we had as of https://github.com/leanprover-community/mathlib4/pull/1036).
|
@[to_additive
/-- Additive opposite of a type. This type inherits all multiplicative structures on `α` and
reverses left and right in addition. -/]
MulOpposite (α : Type*) : Type _ := PreOpposite α
|
def
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
MulOpposite
|
Multiplicative opposite of a type. This type inherits all additive structures on `α` and
reverses left and right in multiplication.
|
@[to_additive /-- The element of `αᵃᵒᵖ` that represents `x : α`. -/]
op : α → αᵐᵒᵖ :=
PreOpposite.op'
|
def
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
op
|
Multiplicative opposite of a type. -/
postfix:max "ᵐᵒᵖ" => MulOpposite
/-- Additive opposite of a type. -/
postfix:max "ᵃᵒᵖ" => AddOpposite
namespace MulOpposite
/-- The element of `MulOpposite α` that represents `x : α`.
|
@[to_additive (attr := pp_nodot) /-- The element of `α` represented by `x : αᵃᵒᵖ`. -/]
unop : αᵐᵒᵖ → α :=
PreOpposite.unop'
@[to_additive (attr := simp)]
|
def
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
unop
|
The element of `α` represented by `x : αᵐᵒᵖ`.
|
unop_op (x : α) : unop (op x) = x := rfl
@[to_additive (attr := simp)]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
unop_op
| null |
op_unop (x : αᵐᵒᵖ) : op (unop x) = x :=
rfl
@[to_additive (attr := simp)]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
op_unop
| null |
op_comp_unop : (op : α → αᵐᵒᵖ) ∘ unop = id :=
rfl
@[to_additive (attr := simp)]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
op_comp_unop
| null |
unop_comp_op : (unop : αᵐᵒᵖ → α) ∘ op = id :=
rfl
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
unop_comp_op
| null |
@[to_additive (attr := simp, elab_as_elim, induction_eliminator, cases_eliminator)
/-- A recursor for `AddOpposite`. Use as `induction x`. -/]
protected rec' {F : αᵐᵒᵖ → Sort*} (h : ∀ X, F (op X)) : ∀ X, F X := fun X ↦ h (unop X)
|
def
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
rec'
|
A recursor for `MulOpposite`. Use as `induction x`.
|
@[to_additive (attr := simps -fullyApplied apply symm_apply)
/-- The canonical bijection between `α` and `αᵃᵒᵖ`. -/]
opEquiv : α ≃ αᵐᵒᵖ :=
⟨op, unop, unop_op, op_unop⟩
@[to_additive]
|
def
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
opEquiv
|
The canonical bijection between `α` and `αᵐᵒᵖ`.
|
op_bijective : Bijective (op : α → αᵐᵒᵖ) :=
opEquiv.bijective
@[to_additive]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
op_bijective
| null |
unop_bijective : Bijective (unop : αᵐᵒᵖ → α) :=
opEquiv.symm.bijective
@[to_additive]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
unop_bijective
| null |
op_injective : Injective (op : α → αᵐᵒᵖ) :=
op_bijective.injective
@[to_additive]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
op_injective
| null |
op_surjective : Surjective (op : α → αᵐᵒᵖ) :=
op_bijective.surjective
@[to_additive]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
op_surjective
| null |
unop_injective : Injective (unop : αᵐᵒᵖ → α) :=
unop_bijective.injective
@[to_additive]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
unop_injective
| null |
unop_surjective : Surjective (unop : αᵐᵒᵖ → α) :=
unop_bijective.surjective
@[to_additive (attr := simp)]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
unop_surjective
| null |
op_inj {x y : α} : op x = op y ↔ x = y := iff_of_eq <| PreOpposite.op'.injEq _ _
@[to_additive (attr := simp, nolint simpComm)]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
op_inj
| null |
unop_inj {x y : αᵐᵒᵖ} : unop x = unop y ↔ x = y :=
unop_injective.eq_iff
attribute [nolint simpComm] AddOpposite.unop_inj
@[to_additive (attr := simp)] lemma «forall» {p : αᵐᵒᵖ → Prop} : (∀ a, p a) ↔ ∀ a, p (op a) :=
op_surjective.forall
@[to_additive (attr := simp)] lemma «exists» {p : αᵐᵒᵖ → Prop} : (∃ a, p a) ↔ ∃ a, p (op a) :=
op_surjective.exists
@[to_additive] instance instNontrivial [Nontrivial α] : Nontrivial αᵐᵒᵖ := op_injective.nontrivial
@[to_additive] instance instInhabited [Inhabited α] : Inhabited αᵐᵒᵖ := ⟨op default⟩
@[to_additive]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
unop_inj
| null |
instSubsingleton [Subsingleton α] : Subsingleton αᵐᵒᵖ := unop_injective.subsingleton
@[to_additive] instance instUnique [Unique α] : Unique αᵐᵒᵖ := Unique.mk' _
@[to_additive] instance instIsEmpty [IsEmpty α] : IsEmpty αᵐᵒᵖ := Function.isEmpty unop
@[to_additive]
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
instSubsingleton
| null |
instDecidableEq [DecidableEq α] : DecidableEq αᵐᵒᵖ := unop_injective.decidableEq
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
instDecidableEq
| null |
instZero [Zero α] : Zero αᵐᵒᵖ where zero := op 0
@[to_additive] instance instOne [One α] : One αᵐᵒᵖ where one := op 1
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
instZero
| null |
instAdd [Add α] : Add αᵐᵒᵖ where add x y := op (unop x + unop y)
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
instAdd
| null |
instSub [Sub α] : Sub αᵐᵒᵖ where sub x y := op (unop x - unop y)
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
instSub
| null |
instNeg [Neg α] : Neg αᵐᵒᵖ where neg x := op <| -unop x
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
instNeg
| null |
instInvolutiveNeg [InvolutiveNeg α] : InvolutiveNeg αᵐᵒᵖ where
neg_neg _ := unop_injective <| neg_neg _
@[to_additive] instance instMul [Mul α] : Mul αᵐᵒᵖ where mul x y := op (unop y * unop x)
@[to_additive] instance instInv [Inv α] : Inv αᵐᵒᵖ where inv x := op <| (unop x)⁻¹
@[to_additive]
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
instInvolutiveNeg
| null |
instInvolutiveInv [InvolutiveInv α] : InvolutiveInv αᵐᵒᵖ where
inv_inv _ := unop_injective <| inv_inv _
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
instInvolutiveInv
| null |
isLeftCancelAdd_iff [Add α] : IsLeftCancelAdd αᵐᵒᵖ ↔ IsLeftCancelAdd α where
mp _ := ⟨fun _ _ _ eq ↦ op_injective <| add_left_cancel (congr_arg op eq)⟩
mpr _ := inferInstance
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
isLeftCancelAdd_iff
| null |
isRightCancelAdd_iff [Add α] : IsRightCancelAdd αᵐᵒᵖ ↔ IsRightCancelAdd α where
mp _ := ⟨fun _ _ _ eq ↦ op_injective <| add_right_cancel (congr_arg op eq)⟩
mpr _ := inferInstance
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
isRightCancelAdd_iff
| null |
protected isCancelAdd_iff [Add α] : IsCancelAdd αᵐᵒᵖ ↔ IsCancelAdd α := by
simp_rw [isCancelAdd_iff, isLeftCancelAdd_iff, isRightCancelAdd_iff]
@[to_additive] instance instSMul [SMul α β] : SMul α βᵐᵒᵖ where smul c x := op (c • unop x)
@[simp] lemma op_zero [Zero α] : op (0 : α) = 0 := rfl
@[simp] lemma unop_zero [Zero α] : unop (0 : αᵐᵒᵖ) = 0 := rfl
@[to_additive (attr := simp)] lemma op_one [One α] : op (1 : α) = 1 := rfl
@[to_additive (attr := simp)] lemma unop_one [One α] : unop (1 : αᵐᵒᵖ) = 1 := rfl
@[simp] lemma op_add [Add α] (x y : α) : op (x + y) = op x + op y := rfl
@[simp] lemma unop_add [Add α] (x y : αᵐᵒᵖ) : unop (x + y) = unop x + unop y := rfl
@[simp] lemma op_neg [Neg α] (x : α) : op (-x) = -op x := rfl
@[simp] lemma unop_neg [Neg α] (x : αᵐᵒᵖ) : unop (-x) = -unop x := rfl
@[to_additive (attr := simp)] lemma op_mul [Mul α] (x y : α) : op (x * y) = op y * op x := rfl
@[to_additive (attr := simp)]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
isCancelAdd_iff
| null |
unop_mul [Mul α] (x y : αᵐᵒᵖ) : unop (x * y) = unop y * unop x := rfl
@[to_additive (attr := simp)] lemma op_inv [Inv α] (x : α) : op x⁻¹ = (op x)⁻¹ := rfl
@[to_additive (attr := simp)] lemma unop_inv [Inv α] (x : αᵐᵒᵖ) : unop x⁻¹ = (unop x)⁻¹ := rfl
@[simp] lemma op_sub [Sub α] (x y : α) : op (x - y) = op x - op y := rfl
@[simp] lemma unop_sub [Sub α] (x y : αᵐᵒᵖ) : unop (x - y) = unop x - unop y := rfl
@[to_additive (attr := simp)]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
unop_mul
| null |
op_smul [SMul α β] (a : α) (b : β) : op (a • b) = a • op b := rfl
@[to_additive (attr := simp)]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
op_smul
| null |
unop_smul [SMul α β] (a : α) (b : βᵐᵒᵖ) : unop (a • b) = a • unop b := rfl
@[simp, nolint simpComm]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
unop_smul
| null |
unop_eq_zero_iff [Zero α] (a : αᵐᵒᵖ) : a.unop = (0 : α) ↔ a = (0 : αᵐᵒᵖ) :=
unop_injective.eq_iff' rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
unop_eq_zero_iff
| null |
op_eq_zero_iff [Zero α] (a : α) : op a = (0 : αᵐᵒᵖ) ↔ a = (0 : α) :=
op_injective.eq_iff' rfl
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
op_eq_zero_iff
| null |
unop_ne_zero_iff [Zero α] (a : αᵐᵒᵖ) : a.unop ≠ (0 : α) ↔ a ≠ (0 : αᵐᵒᵖ) :=
not_congr <| unop_eq_zero_iff a
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
unop_ne_zero_iff
| null |
op_ne_zero_iff [Zero α] (a : α) : op a ≠ (0 : αᵐᵒᵖ) ↔ a ≠ (0 : α) :=
not_congr <| op_eq_zero_iff a
@[to_additive (attr := simp, nolint simpComm)]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
op_ne_zero_iff
| null |
unop_eq_one_iff [One α] (a : αᵐᵒᵖ) : a.unop = 1 ↔ a = 1 :=
unop_injective.eq_iff' rfl
attribute [nolint simpComm] AddOpposite.unop_eq_zero_iff
@[to_additive (attr := simp)]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
unop_eq_one_iff
| null |
op_eq_one_iff [One α] (a : α) : op a = 1 ↔ a = 1 := op_injective.eq_iff
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
op_eq_one_iff
| null |
instOne [One α] : One αᵃᵒᵖ where one := op 1
@[simp] lemma op_one [One α] : op (1 : α) = 1 := rfl
@[simp] lemma unop_one [One α] : unop 1 = (1 : α) := rfl
@[simp] lemma op_eq_one_iff [One α] {a : α} : op a = 1 ↔ a = 1 := op_injective.eq_iff
@[simp] lemma unop_eq_one_iff [One α] {a : αᵃᵒᵖ} : unop a = 1 ↔ a = 1 := unop_injective.eq_iff
attribute [nolint simpComm] unop_eq_one_iff
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
instOne
| null |
instMul [Mul α] : Mul αᵃᵒᵖ where mul a b := op (unop a * unop b)
@[simp] lemma op_mul [Mul α] (a b : α) : op (a * b) = op a * op b := rfl
@[simp] lemma unop_mul [Mul α] (a b : αᵃᵒᵖ) : unop (a * b) = unop a * unop b := rfl
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
instMul
| null |
instInv [Inv α] : Inv αᵃᵒᵖ where inv a := op (unop a)⁻¹
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
instInv
| null |
instInvolutiveInv [InvolutiveInv α] : InvolutiveInv αᵃᵒᵖ where
inv_inv _ := unop_injective <| inv_inv _
@[simp] lemma op_inv [Inv α] (a : α) : op a⁻¹ = (op a)⁻¹ := rfl
@[simp] lemma unop_inv [Inv α] (a : αᵃᵒᵖ) : unop a⁻¹ = (unop a)⁻¹ := rfl
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
instInvolutiveInv
| null |
instDiv [Div α] : Div αᵃᵒᵖ where div a b := op (unop a / unop b)
@[simp] lemma op_div [Div α] (a b : α) : op (a / b) = op a / op b := rfl
@[simp] lemma unop_div [Div α] (a b : αᵃᵒᵖ) : unop (a / b) = unop a / unop b := rfl
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Logic.Nontrivial.Basic",
"Mathlib.Logic.IsEmpty"
] |
Mathlib/Algebra/Opposites.lean
|
instDiv
| null |
@[to_additive]
SemigroupPEmpty : Semigroup PEmpty.{u + 1} where
mul x _ := by cases x
mul_assoc x y z := by cases x
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.Defs",
"Mathlib.Tactic.ToAdditive"
] |
Mathlib/Algebra/PEmptyInstances.lean
|
SemigroupPEmpty
| null |
@[ext]
QuadraticAlgebra (R : Type u) (a b : R) : Type u where
/-- Real part of an element in quadratic algebra -/
re : R
/-- Imaginary part of an element in quadratic algebra -/
im : R
deriving DecidableEq
initialize_simps_projections QuadraticAlgebra (as_prefix re, as_prefix im)
variable {R : Type*}
|
structure
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
QuadraticAlgebra
|
Quadratic algebra over a type with fixed coefficient where $i^2 = a + bi$, implemented as
a structure with two fields, `re` and `im`. When `R` is a commutative ring, this is isomorphic to
`R[X]/(X^2-b*X-a)`.
|
@[simps symm_apply]
equivProd (a b : R) : QuadraticAlgebra R a b ≃ R × R where
toFun z := (z.re, z.im)
invFun p := ⟨p.1, p.2⟩
@[simp]
|
def
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
equivProd
|
The equivalence between quadratic algebra over `R` and `R × R`.
|
mk_eta {a b} (z : QuadraticAlgebra R a b) :
mk z.re z.im = z := rfl
variable {S T : Type*} {a b} (r : R) (x y : QuadraticAlgebra R a b)
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
mk_eta
| null |
@[coe] coe (x : R) : QuadraticAlgebra R a b := ⟨x, 0⟩
|
def
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
coe
|
Coercion `R → QuadraticAlgebra R a b`.
|
@[simp, norm_cast]
re_coe : (r : QuadraticAlgebra R a b).re = r := rfl
@[simp, norm_cast]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
re_coe
| null |
im_coe : (r : QuadraticAlgebra R a b).im = 0 := rfl
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
im_coe
| null |
coe_injective : Function.Injective (coe : R → QuadraticAlgebra R a b) :=
fun _ _ h => congr_arg re h
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
coe_injective
| null |
coe_inj {x y : R} : (x : QuadraticAlgebra R a b) = y ↔ x = y :=
coe_injective.eq_iff
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
coe_inj
| null |
@[simp] re_zero : (0 : QuadraticAlgebra R a b).re = 0 := rfl
@[simp] theorem im_zero : (0 : QuadraticAlgebra R a b).im = 0 := rfl
@[simp, norm_cast]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
re_zero
| null |
coe_zero : ((0 : R) : QuadraticAlgebra R a b) = 0 := rfl
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
coe_zero
| null |
@[scoped simp] re_one : (1 : QuadraticAlgebra R a b).re = 1 := rfl
@[scoped simp] theorem im_one : (1 : QuadraticAlgebra R a b).im = 0 := rfl
@[simp, norm_cast]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
re_one
| null |
coe_one : ((1 : R) : QuadraticAlgebra R a b) = 1 := rfl
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
coe_one
| null |
@[simp] re_add (z w : QuadraticAlgebra R a b) :
(z + w).re = z.re + w.re := rfl
@[simp] theorem im_add (z w : QuadraticAlgebra R a b) :
(z + w).im = z.im + w.im := rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
re_add
| null |
mk_add_mk (z w : QuadraticAlgebra R a b) :
mk z.re z.im + mk w.re w.im = (mk (z.re + w.re) (z.im + w.im) : QuadraticAlgebra R a b) := rfl
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
mk_add_mk
| null |
@[simp]
coe_add (x y : R) : ((x + y : R) : QuadraticAlgebra R a b) = x + y := by ext <;> simp
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
coe_add
| null |
@[simp] re_neg (z : QuadraticAlgebra R a b) : (-z).re = -z.re := rfl
@[simp] theorem im_neg (z : QuadraticAlgebra R a b) : (-z).im = -z.im := rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
re_neg
| null |
neg_mk (x y : R) :
- (mk x y : QuadraticAlgebra R a b) = ⟨-x, -y⟩ := rfl
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
neg_mk
| null |
@[simp]
coe_neg [NegZeroClass R] (x : R) :
((-x : R) : QuadraticAlgebra R a b) = -x := by ext <;> simp
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
coe_neg
| null |
@[simp] re_sub [Sub R] (z w : QuadraticAlgebra R a b) :
(z - w).re = z.re - w.re := rfl
@[simp] theorem im_sub [Sub R] (z w : QuadraticAlgebra R a b) :
(z - w).im = z.im - w.im := rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
re_sub
| null |
mk_sub_mk [Sub R] (x1 y1 x2 y2 : R) :
(mk x1 y1 : QuadraticAlgebra R a b) - mk x2 y2 = mk (x1 - x2) (y1 - y2) := rfl
@[norm_cast, simp]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
mk_sub_mk
| null |
coe_sub (r1 r2 : R) [SubNegZeroMonoid R] :
((r1 - r2 : R) : QuadraticAlgebra R a b) = r1 - r2 :=
QuadraticAlgebra.ext rfl zero_sub_zero.symm
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
coe_sub
| null |
@[simp] re_mul (z w : QuadraticAlgebra R a b) :
(z * w).re = z.re * w.re + a * z.im * w.im := rfl
@[simp] theorem im_mul (z w : QuadraticAlgebra R a b) :
(z * w).im = z.re * w.im + z.im * w.re + b * z.im * w.im := rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
re_mul
| null |
mk_mul_mk (x1 y1 x2 y2 : R) :
(mk x1 y1 : QuadraticAlgebra R a b) * mk x2 y2 =
mk (x1 * x2 + a * y1 * y2) (x1 * y2 + y1 * x2 + b * y1 * y2) := rfl
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
mk_mul_mk
| null |
@[simp] re_smul (s : S) (z : QuadraticAlgebra R a b) : (s • z).re = s • z.re := rfl
@[simp] theorem im_smul (s : S) (z : QuadraticAlgebra R a b) : (s • z).im = s • z.im := rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
re_smul
| null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.