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
⌀ |
|---|---|---|---|---|---|---|
smul_mk (s : S) (x y : R) :
s • (mk x y : QuadraticAlgebra R a b) = mk (s • x) (s • y) := rfl
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
smul_mk
| null |
@[simp, norm_cast]
coe_smul [Zero R] [SMulZeroClass S R] (s : S) (r : R) :
(↑(s • r) : QuadraticAlgebra R a b) = s • (r : QuadraticAlgebra R a b) :=
QuadraticAlgebra.ext rfl (smul_zero _).symm
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
coe_smul
| null |
@[simp, norm_cast]
coe_ofNat (n : ℕ) [n.AtLeastTwo] :
((ofNat(n) : R) : QuadraticAlgebra R a b) = (ofNat(n) : QuadraticAlgebra R a b) := by
ext <;> rfl
@[simp, norm_cast]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
coe_ofNat
| null |
re_natCast (n : ℕ) : (n : QuadraticAlgebra R a b).re = n := rfl
@[simp, norm_cast]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
re_natCast
| null |
im_natCast (n : ℕ) : (n : QuadraticAlgebra R a b).im = 0 := rfl
@[norm_cast]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
im_natCast
| null |
coe_natCast (n : ℕ) : ↑(↑n : R) = (↑n : QuadraticAlgebra R a b) := rfl
@[scoped simp]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
coe_natCast
| null |
re_ofNat (n : ℕ) [n.AtLeastTwo] : (ofNat(n) : QuadraticAlgebra R a b).re = ofNat(n) := rfl
@[scoped simp]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
re_ofNat
| null |
im_ofNat (n : ℕ) [n.AtLeastTwo] : (ofNat(n) : QuadraticAlgebra R a b).im = 0 := rfl
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
im_ofNat
| null |
@[simp, norm_cast]
re_intCast (n : ℤ) : (n : QuadraticAlgebra R a b).re = n := rfl
@[simp, norm_cast]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
re_intCast
| null |
im_intCast (n : ℤ) : (n : QuadraticAlgebra R a b).im = 0 := rfl
@[norm_cast]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
im_intCast
| null |
coe_intCast (n : ℤ) : ↑(n : R) = (n : QuadraticAlgebra R a b) := rfl
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
coe_intCast
| null |
instNonUnitalNonAssocSemiring : NonUnitalNonAssocSemiring (QuadraticAlgebra R a b) where
left_distrib _ _ _ := by ext <;> simpa using by simp [mul_add]; abel
right_distrib _ _ _ := by ext <;> simpa using by simp [mul_add, add_mul]; abel
zero_mul _ := by ext <;> simp
mul_zero _ := by ext <;> simp
|
instance
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
instNonUnitalNonAssocSemiring
| null |
coe_mul_eq_smul (r : R) (x : QuadraticAlgebra R a b) :
(r * x : QuadraticAlgebra R a b) = r • x := by ext <;> simp
@[simp, norm_cast]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
coe_mul_eq_smul
| null |
coe_mul (x y : R) : ↑(x * y) = (↑x * ↑y : QuadraticAlgebra R a b) := by ext <;> simp
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
coe_mul
| null |
instNonAssocSemiring : NonAssocSemiring (QuadraticAlgebra R a b) where
one_mul _ := by ext <;> simp
mul_one _ := by ext <;> simp
|
instance
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
instNonAssocSemiring
| null |
@[simps]
reₗ : QuadraticAlgebra R a b →ₗ[R] R where
toFun := re
map_add' _ _ := rfl
map_smul' _ _ := rfl
|
def
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
reₗ
|
`QuadraticAlgebra.re` as a `LinearMap`
|
@[simps]
imₗ : QuadraticAlgebra R a b →ₗ[R] R where
toFun := im
map_add' _ _ := rfl
map_smul' _ _ := rfl
|
def
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
imₗ
|
`QuadraticAlgebra.im` as a `LinearMap`
|
linearEquivTuple : QuadraticAlgebra R a b ≃ₗ[R] (Fin 2 → R) where
__ := equivProd a b |>.trans <| finTwoArrowEquiv _ |>.symm
map_add' _ _ := funext <| Fin.forall_fin_two.2 ⟨rfl, rfl⟩
map_smul' _ _ := funext <| Fin.forall_fin_two.2 ⟨rfl, rfl⟩
@[simp]
|
def
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
linearEquivTuple
|
`QuadraticAlgebra.equivTuple` as a `LinearEquiv`
|
linearEquivTuple_apply (z : QuadraticAlgebra R a b) :
(linearEquivTuple a b) z = ![z.re, z.im] := rfl
@[simp]
|
lemma
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
linearEquivTuple_apply
| null |
linearEquivTuple_symm_apply (x : Fin 2 → R) :
(linearEquivTuple a b).symm x = ⟨x 0, x 1⟩ := rfl
|
lemma
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
linearEquivTuple_symm_apply
| null |
noncomputable basis : Module.Basis (Fin 2) R (QuadraticAlgebra R a b) :=
.ofEquivFun <| linearEquivTuple a b
@[simp]
|
def
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
basis
|
`QuadraticAlgebra R a b` has a basis over `R` given by `1` and `i`
|
basis_repr_apply (x : QuadraticAlgebra R a b) :
(basis a b).repr x = ![x.re, x.im] := rfl
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
basis_repr_apply
| null |
rank_eq_two [StrongRankCondition R] : Module.rank R (QuadraticAlgebra R a b) = 2 := by
simp [rank_eq_card_basis (basis a b)]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
rank_eq_two
| null |
finrank_eq_two [StrongRankCondition R] :
Module.finrank R (QuadraticAlgebra R a b) = 2 := by
simp [Module.finrank, rank_eq_two]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
finrank_eq_two
| null |
instCommSemiring : CommSemiring (QuadraticAlgebra R a b) where
mul_assoc _ _ _ := by ext <;> simpa using by ring
mul_comm _ _ := by ext <;> simpa using by ring
|
instance
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
instCommSemiring
| null |
algebraMap_eq (r : R) : algebraMap R (QuadraticAlgebra R a b) r = ⟨r, 0⟩ := rfl
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
algebraMap_eq
| null |
algebraMap_injective : (algebraMap R (QuadraticAlgebra R a b) : _ → _).Injective :=
fun _ _ ↦ by simp [algebraMap_eq]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
algebraMap_injective
| null |
@[norm_cast, simp]
coe_pow (n : ℕ) (r : R) : ((r ^ n : R) : QuadraticAlgebra R a b) =
(r : QuadraticAlgebra R a b) ^ n :=
(algebraMap R (QuadraticAlgebra R a b)).map_pow r n
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
coe_pow
| null |
mul_coe_eq_smul (r : R) (x : QuadraticAlgebra R a b) :
(x * r : QuadraticAlgebra R a b) = r • x := by
rw [mul_comm, coe_mul_eq_smul r x]
@[norm_cast, simp]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
mul_coe_eq_smul
| null |
coe_algebraMap : ⇑(algebraMap R (QuadraticAlgebra R a b)) = coe := rfl
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
coe_algebraMap
| null |
smul_coe (r1 r2 : R) :
r1 • (r2 : QuadraticAlgebra R a b) = ↑(r1 * r2) := by rw [coe_mul, coe_mul_eq_smul]
|
theorem
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
smul_coe
| null |
instCommRing [CommRing R] : CommRing (QuadraticAlgebra R a b) where
|
instance
|
Algebra
|
[
"Mathlib.LinearAlgebra.Dimension.StrongRankCondition",
"Mathlib.LinearAlgebra.FreeModule.Finite.Basic"
] |
Mathlib/Algebra/QuadraticAlgebra.lean
|
instCommRing
| null |
discrim [Ring R] (a b c : R) : R :=
b ^ 2 - 4 * a * c
@[simp] lemma discrim_neg [Ring R] (a b c : R) : discrim (-a) (-b) (-c) = discrim a b c := by
simp [discrim]
variable [CommRing R] {a b c : R}
|
def
|
Algebra
|
[
"Mathlib.Order.Filter.AtTopBot.Field",
"Mathlib.Tactic.FieldSimp",
"Mathlib.Tactic.LinearCombination",
"Mathlib.Tactic.Linarith.Frontend"
] |
Mathlib/Algebra/QuadraticDiscriminant.lean
|
discrim
|
Discriminant of a quadratic
|
discrim_eq_sq_of_quadratic_eq_zero {x : R} (h : a * (x * x) + b * x + c = 0) :
discrim a b c = (2 * a * x + b) ^ 2 := by
rw [discrim]
linear_combination -4 * a * h
|
lemma
|
Algebra
|
[
"Mathlib.Order.Filter.AtTopBot.Field",
"Mathlib.Tactic.FieldSimp",
"Mathlib.Tactic.LinearCombination",
"Mathlib.Tactic.Linarith.Frontend"
] |
Mathlib/Algebra/QuadraticDiscriminant.lean
|
discrim_eq_sq_of_quadratic_eq_zero
| null |
quadratic_eq_zero_iff_discrim_eq_sq [NeZero (2 : R)] [NoZeroDivisors R]
(ha : a ≠ 0) (x : R) :
a * (x * x) + b * x + c = 0 ↔ discrim a b c = (2 * a * x + b) ^ 2 := by
refine ⟨discrim_eq_sq_of_quadratic_eq_zero, fun h ↦ ?_⟩
rw [discrim] at h
have ha : 2 * 2 * a ≠ 0 := mul_ne_zero (mul_ne_zero (NeZero.ne _) (NeZero.ne _)) ha
apply mul_left_cancel₀ ha
linear_combination -h
|
theorem
|
Algebra
|
[
"Mathlib.Order.Filter.AtTopBot.Field",
"Mathlib.Tactic.FieldSimp",
"Mathlib.Tactic.LinearCombination",
"Mathlib.Tactic.Linarith.Frontend"
] |
Mathlib/Algebra/QuadraticDiscriminant.lean
|
quadratic_eq_zero_iff_discrim_eq_sq
|
A quadratic has roots if and only if its discriminant equals some square.
|
quadratic_ne_zero_of_discrim_ne_sq (h : ∀ s : R, discrim a b c ≠ s^2) (x : R) :
a * (x * x) + b * x + c ≠ 0 :=
mt discrim_eq_sq_of_quadratic_eq_zero (h _)
|
theorem
|
Algebra
|
[
"Mathlib.Order.Filter.AtTopBot.Field",
"Mathlib.Tactic.FieldSimp",
"Mathlib.Tactic.LinearCombination",
"Mathlib.Tactic.Linarith.Frontend"
] |
Mathlib/Algebra/QuadraticDiscriminant.lean
|
quadratic_ne_zero_of_discrim_ne_sq
|
A quadratic has no root if its discriminant has no square root.
|
quadratic_eq_zero_iff (ha : a ≠ 0) {s : K} (h : discrim a b c = s * s) (x : K) :
a * (x * x) + b * x + c = 0 ↔ x = (-b + s) / (2 * a) ∨ x = (-b - s) / (2 * a) := by
rw [quadratic_eq_zero_iff_discrim_eq_sq ha, h, sq, mul_self_eq_mul_self_iff]
field_simp
grind
|
theorem
|
Algebra
|
[
"Mathlib.Order.Filter.AtTopBot.Field",
"Mathlib.Tactic.FieldSimp",
"Mathlib.Tactic.LinearCombination",
"Mathlib.Tactic.Linarith.Frontend"
] |
Mathlib/Algebra/QuadraticDiscriminant.lean
|
quadratic_eq_zero_iff
|
Roots of a quadratic equation.
|
exists_quadratic_eq_zero (ha : a ≠ 0) (h : ∃ s, discrim a b c = s * s) :
∃ x, a * (x * x) + b * x + c = 0 := by
rcases h with ⟨s, hs⟩
use (-b + s) / (2 * a)
rw [quadratic_eq_zero_iff ha hs]
simp
|
theorem
|
Algebra
|
[
"Mathlib.Order.Filter.AtTopBot.Field",
"Mathlib.Tactic.FieldSimp",
"Mathlib.Tactic.LinearCombination",
"Mathlib.Tactic.Linarith.Frontend"
] |
Mathlib/Algebra/QuadraticDiscriminant.lean
|
exists_quadratic_eq_zero
|
A quadratic has roots if its discriminant has square roots
|
quadratic_eq_zero_iff_of_discrim_eq_zero (ha : a ≠ 0) (h : discrim a b c = 0) (x : K) :
a * (x * x) + b * x + c = 0 ↔ x = -b / (2 * a) := by
have : discrim a b c = 0 * 0 := by rw [h, mul_zero]
rw [quadratic_eq_zero_iff ha this, add_zero, sub_zero, or_self_iff]
|
theorem
|
Algebra
|
[
"Mathlib.Order.Filter.AtTopBot.Field",
"Mathlib.Tactic.FieldSimp",
"Mathlib.Tactic.LinearCombination",
"Mathlib.Tactic.Linarith.Frontend"
] |
Mathlib/Algebra/QuadraticDiscriminant.lean
|
quadratic_eq_zero_iff_of_discrim_eq_zero
|
Root of a quadratic when its discriminant equals zero
|
discrim_eq_zero_of_existsUnique (ha : a ≠ 0) (h : ∃! x, a * (x * x) + b * x + c = 0) :
discrim a b c = 0 := by
simp_rw [quadratic_eq_zero_iff_discrim_eq_sq ha] at h
generalize discrim a b c = d at h
obtain ⟨x, rfl, hx⟩ := h
specialize hx (-(x + b / a))
grind
|
theorem
|
Algebra
|
[
"Mathlib.Order.Filter.AtTopBot.Field",
"Mathlib.Tactic.FieldSimp",
"Mathlib.Tactic.LinearCombination",
"Mathlib.Tactic.Linarith.Frontend"
] |
Mathlib/Algebra/QuadraticDiscriminant.lean
|
discrim_eq_zero_of_existsUnique
| null |
discrim_eq_zero_iff (ha : a ≠ 0) :
discrim a b c = 0 ↔ (∃! x, a * (x * x) + b * x + c = 0) := by
refine ⟨fun hd => ?_, discrim_eq_zero_of_existsUnique ha⟩
simp_rw [quadratic_eq_zero_iff_of_discrim_eq_zero ha hd, existsUnique_eq]
|
theorem
|
Algebra
|
[
"Mathlib.Order.Filter.AtTopBot.Field",
"Mathlib.Tactic.FieldSimp",
"Mathlib.Tactic.LinearCombination",
"Mathlib.Tactic.Linarith.Frontend"
] |
Mathlib/Algebra/QuadraticDiscriminant.lean
|
discrim_eq_zero_iff
| null |
discrim_le_zero (h : ∀ x : K, 0 ≤ a * (x * x) + b * x + c) : discrim a b c ≤ 0 := by
rw [discrim, sq]
obtain ha | rfl | ha : a < 0 ∨ a = 0 ∨ 0 < a := lt_trichotomy a 0
· have : Tendsto (fun x => (a * x + b) * x + c) atTop atBot :=
tendsto_atBot_add_const_right _ c <|
(tendsto_atBot_add_const_right _ b (tendsto_id.const_mul_atTop_of_neg ha)).atBot_mul_atTop₀
tendsto_id
rcases (this.eventually (eventually_lt_atBot 0)).exists with ⟨x, hx⟩
exact False.elim ((h x).not_gt <| by rwa [← mul_assoc, ← add_mul])
· rcases eq_or_ne b 0 with (rfl | hb)
· simp
· have := h ((-c - 1) / b)
rw [mul_div_cancel₀ _ hb] at this
linarith
· have ha' : 0 ≤ 4 * a := mul_nonneg zero_le_four ha.le
convert neg_nonpos.2 (mul_nonneg ha' (h (-b / (2 * a)))) using 1
field_simp
ring
|
theorem
|
Algebra
|
[
"Mathlib.Order.Filter.AtTopBot.Field",
"Mathlib.Tactic.FieldSimp",
"Mathlib.Tactic.LinearCombination",
"Mathlib.Tactic.Linarith.Frontend"
] |
Mathlib/Algebra/QuadraticDiscriminant.lean
|
discrim_le_zero
|
If a polynomial of degree 2 is always nonnegative, then its discriminant is nonpositive
|
discrim_le_zero_of_nonpos (h : ∀ x : K, a * (x * x) + b * x + c ≤ 0) : discrim a b c ≤ 0 :=
discrim_neg a b c ▸ discrim_le_zero <| by simpa only [neg_mul, ← neg_add, neg_nonneg]
|
lemma
|
Algebra
|
[
"Mathlib.Order.Filter.AtTopBot.Field",
"Mathlib.Tactic.FieldSimp",
"Mathlib.Tactic.LinearCombination",
"Mathlib.Tactic.Linarith.Frontend"
] |
Mathlib/Algebra/QuadraticDiscriminant.lean
|
discrim_le_zero_of_nonpos
| null |
discrim_lt_zero (ha : a ≠ 0) (h : ∀ x : K, 0 < a * (x * x) + b * x + c) :
discrim a b c < 0 := by
have : ∀ x : K, 0 ≤ a * (x * x) + b * x + c := fun x => le_of_lt (h x)
refine lt_of_le_of_ne (discrim_le_zero this) fun h' ↦ ?_
have := h (-b / (2 * a))
have : a * (-b / (2 * a)) * (-b / (2 * a)) + b * (-b / (2 * a)) + c = 0 := by
rw [mul_assoc, quadratic_eq_zero_iff_of_discrim_eq_zero ha h' (-b / (2 * a))]
linarith
|
theorem
|
Algebra
|
[
"Mathlib.Order.Filter.AtTopBot.Field",
"Mathlib.Tactic.FieldSimp",
"Mathlib.Tactic.LinearCombination",
"Mathlib.Tactic.Linarith.Frontend"
] |
Mathlib/Algebra/QuadraticDiscriminant.lean
|
discrim_lt_zero
|
If a polynomial of degree 2 is always positive, then its discriminant is negative,
at least when the coefficient of the quadratic term is nonzero.
|
discrim_lt_zero_of_neg (ha : a ≠ 0) (h : ∀ x : K, a * (x * x) + b * x + c < 0) :
discrim a b c < 0 :=
discrim_neg a b c ▸ discrim_lt_zero (neg_ne_zero.2 ha) <| by
simpa only [neg_mul, ← neg_add, neg_pos]
|
lemma
|
Algebra
|
[
"Mathlib.Order.Filter.AtTopBot.Field",
"Mathlib.Tactic.FieldSimp",
"Mathlib.Tactic.LinearCombination",
"Mathlib.Tactic.Linarith.Frontend"
] |
Mathlib/Algebra/QuadraticDiscriminant.lean
|
discrim_lt_zero_of_neg
| null |
Shelf (α : Type u) where
/-- The action of the `Shelf` over `α` -/
act : α → α → α
/-- A verification that `act` is self-distributive -/
self_distrib : ∀ {x y z : α}, act x (act y z) = act (act x y) (act x z)
|
class
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
Shelf
|
A *Shelf* is a structure with a self-distributive binary operation.
The binary operation is regarded as a left action of the type on itself.
|
UnitalShelf (α : Type u) extends Shelf α, One α where
one_act : ∀ a : α, act 1 a = a
act_one : ∀ a : α, act a 1 = a
|
class
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
UnitalShelf
|
A *unital shelf* is a shelf equipped with an element `1` such that, for all elements `x`,
we have both `x ◃ 1` and `1 ◃ x` equal `x`.
|
@[ext]
ShelfHom (S₁ : Type*) (S₂ : Type*) [Shelf S₁] [Shelf S₂] where
/-- The function under the Shelf Homomorphism -/
toFun : S₁ → S₂
/-- The homomorphism property of a Shelf Homomorphism -/
map_act' : ∀ {x y : S₁}, toFun (Shelf.act x y) = Shelf.act (toFun x) (toFun y)
|
structure
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
ShelfHom
|
The type of homomorphisms between shelves.
This is also the notion of rack and quandle homomorphisms.
|
Rack (α : Type u) extends Shelf α where
/-- The inverse actions of the elements -/
invAct : α → α → α
/-- Proof of left inverse -/
left_inv : ∀ x, Function.LeftInverse (invAct x) (act x)
/-- Proof of right inverse -/
right_inv : ∀ x, Function.RightInverse (invAct x) (act x)
|
class
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
Rack
|
A *rack* is an automorphic set (a set with an action on itself by
bijections) that is self-distributive. It is a shelf such that each
element's action is invertible.
The notations `x ◃ y` and `x ◃⁻¹ y` denote the action and the
inverse action, respectively, and they are right associative.
|
act_act_self_eq (x y : S) : (x ◃ y) ◃ x = x ◃ y := by
have h : (x ◃ y) ◃ x = (x ◃ y) ◃ (x ◃ 1) := by rw [act_one]
rw [h, ← Shelf.self_distrib, act_one]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
act_act_self_eq
|
Action of a Shelf -/
scoped[Quandles] infixr:65 " ◃ " => Shelf.act
/-- Inverse Action of a Rack -/
scoped[Quandles] infixr:65 " ◃⁻¹ " => Rack.invAct
/-- Shelf Homomorphism -/
scoped[Quandles] infixr:25 " →◃ " => ShelfHom
open Quandles
namespace UnitalShelf
open Shelf
variable {S : Type*} [UnitalShelf S]
/--
A monoid is *graphic* if, for all `x` and `y`, the *graphic identity*
`(x * y) * x = x * y` holds. For a unital shelf, this graphic
identity holds.
|
act_idem (x : S) : (x ◃ x) = x := by rw [← act_one x, ← Shelf.self_distrib, act_one]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
act_idem
| null |
act_self_act_eq (x y : S) : x ◃ (x ◃ y) = x ◃ y := by
have h : x ◃ (x ◃ y) = (x ◃ 1) ◃ (x ◃ y) := by rw [act_one]
rw [h, ← Shelf.self_distrib, one_act]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
act_self_act_eq
| null |
assoc (x y z : S) : (x ◃ y) ◃ z = x ◃ y ◃ z := by
rw [self_distrib, self_distrib, act_act_self_eq, act_self_act_eq]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
assoc
|
The associativity of a unital shelf comes for free.
|
act' (x : R) : R ≃ R where
toFun := Shelf.act x
invFun := invAct x
left_inv := left_inv x
right_inv := right_inv x
@[simp]
|
def
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
act'
|
A rack acts on itself by equivalences.
|
act'_apply (x y : R) : act' x y = x ◃ y :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
act'_apply
| null |
act'_symm_apply (x y : R) : (act' x).symm y = x ◃⁻¹ y :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
act'_symm_apply
| null |
invAct_apply (x y : R) : (act' x)⁻¹ y = x ◃⁻¹ y :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
invAct_apply
| null |
invAct_act_eq (x y : R) : x ◃⁻¹ x ◃ y = y :=
left_inv x y
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
invAct_act_eq
| null |
act_invAct_eq (x y : R) : x ◃ x ◃⁻¹ y = y :=
right_inv x y
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
act_invAct_eq
| null |
left_cancel (x : R) {y y' : R} : x ◃ y = x ◃ y' ↔ y = y' := by
constructor
· apply (act' x).injective
rintro rfl
rfl
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
left_cancel
| null |
left_cancel_inv (x : R) {y y' : R} : x ◃⁻¹ y = x ◃⁻¹ y' ↔ y = y' := by
constructor
· apply (act' x).symm.injective
rintro rfl
rfl
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
left_cancel_inv
| null |
self_distrib_inv {x y z : R} : x ◃⁻¹ y ◃⁻¹ z = (x ◃⁻¹ y) ◃⁻¹ x ◃⁻¹ z := by
rw [← left_cancel (x ◃⁻¹ y), right_inv, ← left_cancel x, right_inv, self_distrib]
repeat' rw [right_inv]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
self_distrib_inv
| null |
ad_conj {R : Type*} [Rack R] (x y : R) : act' (x ◃ y) = act' x * act' y * (act' x)⁻¹ := by
rw [eq_mul_inv_iff_mul_eq]; ext z
apply self_distrib.symm
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
ad_conj
|
The *adjoint action* of a rack on itself is `op'`, and the adjoint
action of `x ◃ y` is the conjugate of the action of `y` by the action
of `x`. It is another way to understand the self-distributivity axiom.
This is used in the natural rack homomorphism `toConj` from `R` to
`Conj (R ≃ R)` defined by `op'`.
|
oppositeRack : Rack Rᵐᵒᵖ where
act x y := op (invAct (unop x) (unop y))
self_distrib := by
intro x y z
induction x
induction y
induction z
simp only [op_inj, unop_op]
rw [self_distrib_inv]
invAct x y := op (Shelf.act (unop x) (unop y))
left_inv := MulOpposite.rec' fun x => MulOpposite.rec' fun y => by simp
right_inv := MulOpposite.rec' fun x => MulOpposite.rec' fun y => by simp
@[simp]
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
oppositeRack
|
The opposite rack, swapping the roles of `◃` and `◃⁻¹`.
|
op_act_op_eq {x y : R} : op x ◃ op y = op (x ◃⁻¹ y) :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
op_act_op_eq
| null |
op_invAct_op_eq {x y : R} : op x ◃⁻¹ op y = op (x ◃ y) :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
op_invAct_op_eq
| null |
self_act_act_eq {x y : R} : (x ◃ x) ◃ y = x ◃ y := by rw [← right_inv x y, ← self_distrib]
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
self_act_act_eq
| null |
self_invAct_invAct_eq {x y : R} : (x ◃⁻¹ x) ◃⁻¹ y = x ◃⁻¹ y := by
have h := @self_act_act_eq _ _ (op x) (op y)
simpa using h
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
self_invAct_invAct_eq
| null |
self_act_invAct_eq {x y : R} : (x ◃ x) ◃⁻¹ y = x ◃⁻¹ y := by
rw [← left_cancel (x ◃ x)]
rw [right_inv]
rw [self_act_act_eq]
rw [right_inv]
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
self_act_invAct_eq
| null |
self_invAct_act_eq {x y : R} : (x ◃⁻¹ x) ◃ y = x ◃ y := by
have h := @self_act_invAct_eq _ _ (op x) (op y)
simpa using h
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
self_invAct_act_eq
| null |
self_act_eq_iff_eq {x y : R} : x ◃ x = y ◃ y ↔ x = y := by
constructor; swap
· rintro rfl; rfl
intro h
trans (x ◃ x) ◃⁻¹ x ◃ x
· rw [← left_cancel (x ◃ x), right_inv, self_act_act_eq]
· rw [h, ← left_cancel (y ◃ y), right_inv, self_act_act_eq]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
self_act_eq_iff_eq
| null |
self_invAct_eq_iff_eq {x y : R} : x ◃⁻¹ x = y ◃⁻¹ y ↔ x = y := by
have h := @self_act_eq_iff_eq _ _ (op x) (op y)
simpa using h
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
self_invAct_eq_iff_eq
| null |
selfApplyEquiv (R : Type*) [Rack R] : R ≃ R where
toFun x := x ◃ x
invFun x := x ◃⁻¹ x
left_inv x := by simp
right_inv x := by simp
|
def
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
selfApplyEquiv
|
The map `x ↦ x ◃ x` is a bijection. (This has applications for the
regular isotopy version of the Reidemeister I move for knot diagrams.)
|
IsInvolutory (R : Type*) [Rack R] : Prop :=
∀ x : R, Function.Involutive (Shelf.act x)
|
def
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
IsInvolutory
|
An involutory rack is one for which `Rack.oppositeRack R x` is an involution for every x.
|
involutory_invAct_eq_act {R : Type*} [Rack R] (h : IsInvolutory R) (x y : R) :
x ◃⁻¹ y = x ◃ y := by
rw [← left_cancel x, right_inv, h x]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
involutory_invAct_eq_act
| null |
IsAbelian (R : Type*) [Rack R] : Prop :=
∀ x y z w : R, (x ◃ y) ◃ z ◃ w = (x ◃ z) ◃ y ◃ w
|
def
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
IsAbelian
|
An abelian rack is one for which the mediality axiom holds.
|
assoc_iff_id {R : Type*} [Rack R] {x y z : R} : x ◃ y ◃ z = (x ◃ y) ◃ z ↔ x ◃ z = z := by
rw [self_distrib]
rw [left_cancel]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
assoc_iff_id
|
Associative racks are uninteresting.
|
@[simp] toFun_eq_coe (f : S₁ →◃ S₂) : f.toFun = f := rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
toFun_eq_coe
| null |
map_act (f : S₁ →◃ S₂) {x y : S₁} : f (x ◃ y) = f x ◃ f y :=
map_act' f
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
map_act
| null |
id (S : Type*) [Shelf S] : S →◃ S where
toFun := fun x => x
map_act' := by simp
|
def
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
id
|
The identity homomorphism
|
inhabited (S : Type*) [Shelf S] : Inhabited (S →◃ S) :=
⟨id S⟩
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
inhabited
| null |
comp (g : S₂ →◃ S₃) (f : S₁ →◃ S₂) : S₁ →◃ S₃ where
toFun := g.toFun ∘ f.toFun
map_act' := by simp
@[simp]
|
def
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
comp
|
The composition of shelf homomorphisms
|
comp_apply (g : S₂ →◃ S₃) (f : S₁ →◃ S₂) (x : S₁) : (g.comp f) x = g (f x) :=
rfl
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
comp_apply
| null |
Quandle (α : Type*) extends Rack α where
/-- The fixing property of a Quandle -/
fix : ∀ {x : α}, act x x = x
|
class
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
Quandle
|
A quandle is a rack such that each automorphism fixes its corresponding element.
|
@[simp]
fix_inv {x : Q} : x ◃⁻¹ x = x := by
rw [← left_cancel x]
simp
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
fix_inv
| null |
oppositeQuandle : Quandle Qᵐᵒᵖ where
fix := by
intro x
induction x
simp
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
oppositeQuandle
| null |
Conj (G : Type*) := G
|
abbrev
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
Conj
|
The conjugation quandle of a group. Each element of the group acts by
the corresponding inner automorphism.
|
Conj.quandle (G : Type*) [Group G] : Quandle (Conj G) where
act x := @MulAut.conj G _ x
self_distrib := by
intro x y z
dsimp only [MulAut.conj_apply]
simp [mul_assoc]
invAct x := (@MulAut.conj G _ x).symm
left_inv x y := by
simp [mul_assoc]
right_inv x y := by
simp [mul_assoc]
fix := by simp
@[simp]
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
Conj.quandle
| null |
conj_act_eq_conj {G : Type*} [Group G] (x y : Conj G) :
x ◃ y = ((x : G) * (y : G) * (x : G)⁻¹ : G) :=
rfl
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
conj_act_eq_conj
| null |
conj_swap {G : Type*} [Group G] (x y : Conj G) : x ◃ y = y ↔ y ◃ x = x := by
dsimp [Conj] at *; constructor
repeat' intro h; conv_rhs => rw [eq_mul_inv_of_mul_eq (eq_mul_inv_of_mul_eq h)]; simp
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
conj_swap
| null |
Conj.map {G : Type*} {H : Type*} [Group G] [Group H] (f : G →* H) : Conj G →◃ Conj H where
toFun := f
map_act' := by simp
|
def
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
Conj.map
|
`Conj` is functorial
|
Dihedral (n : ℕ) :=
ZMod n
|
def
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
Dihedral
|
The dihedral quandle. This is the conjugation quandle of the dihedral group restricted to flips.
Used for Fox n-colorings of knots.
|
dihedralAct (n : ℕ) (a : ZMod n) : ZMod n → ZMod n := fun b => 2 * a - b
|
def
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
dihedralAct
|
The operation for the dihedral quandle. It does not need to be an equivalence
because it is an involution (see `dihedralAct.inv`).
|
dihedralAct.inv (n : ℕ) (a : ZMod n) : Function.Involutive (dihedralAct n a) := by
intro b
dsimp only [dihedralAct]
simp
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
dihedralAct.inv
| null |
toConj (R : Type*) [Rack R] : R →◃ Quandle.Conj (R ≃ R) where
toFun := act'
map_act' := by
intro x y
exact ad_conj x y
|
def
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
toConj
|
This is the natural rack homomorphism to the conjugation quandle of the group `R ≃ R`
that acts on the rack.
|
PreEnvelGroup (R : Type u) : Type u
| unit : PreEnvelGroup R
| incl (x : R) : PreEnvelGroup R
| mul (a b : PreEnvelGroup R) : PreEnvelGroup R
| inv (a : PreEnvelGroup R) : PreEnvelGroup R
|
inductive
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
PreEnvelGroup
|
Free generators of the enveloping group.
|
PreEnvelGroup.inhabited (R : Type u) : Inhabited (PreEnvelGroup R) :=
⟨PreEnvelGroup.unit⟩
open PreEnvelGroup
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
PreEnvelGroup.inhabited
| null |
PreEnvelGroupRel' (R : Type u) [Rack R] : PreEnvelGroup R → PreEnvelGroup R → Type u
| refl {a : PreEnvelGroup R} : PreEnvelGroupRel' R a a
| symm {a b : PreEnvelGroup R} (hab : PreEnvelGroupRel' R a b) : PreEnvelGroupRel' R b a
| trans {a b c : PreEnvelGroup R} (hab : PreEnvelGroupRel' R a b)
(hbc : PreEnvelGroupRel' R b c) : PreEnvelGroupRel' R a c
| congr_mul {a b a' b' : PreEnvelGroup R} (ha : PreEnvelGroupRel' R a a')
(hb : PreEnvelGroupRel' R b b') : PreEnvelGroupRel' R (mul a b) (mul a' b')
| congr_inv {a a' : PreEnvelGroup R} (ha : PreEnvelGroupRel' R a a') :
PreEnvelGroupRel' R (inv a) (inv a')
| assoc (a b c : PreEnvelGroup R) : PreEnvelGroupRel' R (mul (mul a b) c) (mul a (mul b c))
| one_mul (a : PreEnvelGroup R) : PreEnvelGroupRel' R (mul unit a) a
| mul_one (a : PreEnvelGroup R) : PreEnvelGroupRel' R (mul a unit) a
| inv_mul_cancel (a : PreEnvelGroup R) : PreEnvelGroupRel' R (mul (inv a) a) unit
| act_incl (x y : R) :
PreEnvelGroupRel' R (mul (mul (incl x) (incl y)) (inv (incl x))) (incl (x ◃ y))
|
inductive
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
PreEnvelGroupRel'
|
Relations for the enveloping group. This is a type-valued relation because
`toEnvelGroup.mapAux.well_def` inducts on it to show `toEnvelGroup.map`
is well-defined. The relation `PreEnvelGroupRel` is the `Prop`-valued version,
which is used to define `EnvelGroup` itself.
|
PreEnvelGroupRel'.inhabited (R : Type u) [Rack R] :
Inhabited (PreEnvelGroupRel' R unit unit) :=
⟨PreEnvelGroupRel'.refl⟩
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
PreEnvelGroupRel'.inhabited
| null |
PreEnvelGroupRel (R : Type u) [Rack R] : PreEnvelGroup R → PreEnvelGroup R → Prop
| rel {a b : PreEnvelGroup R} (r : PreEnvelGroupRel' R a b) : PreEnvelGroupRel R a b
|
inductive
|
Algebra
|
[
"Mathlib.Algebra.Group.End",
"Mathlib.Data.ZMod.Defs",
"Mathlib.Tactic.Ring"
] |
Mathlib/Algebra/Quandle.lean
|
PreEnvelGroupRel
|
The `PreEnvelGroupRel` relation as a `Prop`. Used as the relation for `PreEnvelGroup.setoid`.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.