Dataset Viewer
Auto-converted to Parquet Duplicate
fact
stringlengths
9
19.3k
statement
stringlengths
1
7.36k
proof
stringlengths
0
19.2k
type
stringclasses
16 values
symbolic_name
stringlengths
0
131
library
stringlengths
4
62
filename
stringlengths
20
95
imports
listlengths
0
10
deps
listlengths
0
64
docstring
stringlengths
7
4.95k
line_start
int64
14
1.59k
line_end
int64
16
1.6k
has_proof
bool
2 classes
source_url
stringclasses
1 value
commit
stringclasses
1 value
infinite_of_charZero (R A : Type*) [CommRing R] [Ring A] [Algebra R A] [CharZero A] : { x : A | IsAlgebraic R x }.Infinite := by letI := MulActionWithZero.nontrivial R A exact infinite_of_injective_forall_mem Nat.cast_injective isAlgebraic_nat
infinite_of_charZero (R A : Type*) [CommRing R] [Ring A] [Algebra R A] [CharZero A] : { x : A | IsAlgebraic R x }.Infinite
by letI := MulActionWithZero.nontrivial R A exact infinite_of_injective_forall_mem Nat.cast_injective isAlgebraic_nat
theorem
Algebraic.infinite_of_charZero
Algebra
Mathlib/Algebra/AlgebraicCard.lean
[]
[ "Algebra", "CharZero", "CommRing", "Infinite", "IsAlgebraic", "MulActionWithZero.nontrivial", "Nat.cast_injective", "Ring", "isAlgebraic_nat" ]
null
32
35
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
aleph0_le_cardinalMk_of_charZero (R A : Type*) [CommRing R] [Ring A] [Algebra R A] [CharZero A] : ℵ₀ ≤ #{ x : A // IsAlgebraic R x } := infinite_iff.1 (Set.infinite_coe_iff.2 <| infinite_of_charZero R A)
aleph0_le_cardinalMk_of_charZero (R A : Type*) [CommRing R] [Ring A] [Algebra R A] [CharZero A] : ℵ₀ ≤ #{ x : A // IsAlgebraic R x }
infinite_iff.1 (Set.infinite_coe_iff.2 <| infinite_of_charZero R A)
theorem
Algebraic.aleph0_le_cardinalMk_of_charZero
Algebra
Mathlib/Algebra/AlgebraicCard.lean
[]
[ "Algebra", "CharZero", "CommRing", "IsAlgebraic", "Ring" ]
null
37
39
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
cardinalMk_lift_le_mul : Cardinal.lift.{u} #{ x : A // IsAlgebraic R x } ≤ Cardinal.lift.{v} #R[X] * ℵ₀ := by rw [← mk_uLift, ← mk_uLift] choose g hg₁ hg₂ using fun x : { x : A | IsAlgebraic R x } => x.coe_prop refine lift_mk_le_lift_mk_mul_of_lift_mk_preimage_le g fun f => ?_ rw [lift_le_aleph0, le_aleph0_...
cardinalMk_lift_le_mul : Cardinal.lift.{u} #{ x : A // IsAlgebraic R x } ≤ Cardinal.lift.{v} #R[X] * ℵ₀
by rw [← mk_uLift, ← mk_uLift] choose g hg₁ hg₂ using fun x : { x : A | IsAlgebraic R x } => x.coe_prop refine lift_mk_le_lift_mk_mul_of_lift_mk_preimage_le g fun f => ?_ rw [lift_le_aleph0, le_aleph0_iff_set_countable] suffices MapsTo (↑) (g ⁻¹' {f}) (f.rootSet A) from this.countable_of_injOn Subtype.coe...
theorem
Algebraic.cardinalMk_lift_le_mul
Algebra
Mathlib/Algebra/AlgebraicCard.lean
[]
[ "IsAlgebraic" ]
null
46
55
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
cardinalMk_lift_le_max : Cardinal.lift.{u} #{ x : A // IsAlgebraic R x } ≤ max (Cardinal.lift.{v} #R) ℵ₀ := (cardinalMk_lift_le_mul R A).trans <| by grw [lift_le.2 cardinalMk_le_max]; simp
cardinalMk_lift_le_max : Cardinal.lift.{u} #{ x : A // IsAlgebraic R x } ≤ max (Cardinal.lift.{v} #R) ℵ₀
(cardinalMk_lift_le_mul R A).trans <| by grw [lift_le.2 cardinalMk_le_max]; simp
theorem
Algebraic.cardinalMk_lift_le_max
Algebra
Mathlib/Algebra/AlgebraicCard.lean
[]
[ "IsAlgebraic", "trans" ]
null
57
59
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
cardinalMk_lift_of_infinite [Infinite R] : Cardinal.lift.{u} #{ x : A // IsAlgebraic R x } = Cardinal.lift.{v} #R := ((cardinalMk_lift_le_max R A).trans_eq (max_eq_left <| aleph0_le_mk _)).antisymm <| lift_mk_le'.2 ⟨⟨fun x => ⟨algebraMap R A x, isAlgebraic_algebraMap _⟩, fun _ _ h => FaithfulSMul.algebr...
cardinalMk_lift_of_infinite [Infinite R] : Cardinal.lift.{u} #{ x : A // IsAlgebraic R x } = Cardinal.lift.{v} #R
((cardinalMk_lift_le_max R A).trans_eq (max_eq_left <| aleph0_le_mk _)).antisymm <| lift_mk_le'.2 ⟨⟨fun x => ⟨algebraMap R A x, isAlgebraic_algebraMap _⟩, fun _ _ h => FaithfulSMul.algebraMap_injective R A (Subtype.ext_iff.1 h)⟩⟩
theorem
Algebraic.cardinalMk_lift_of_infinite
Algebra
Mathlib/Algebra/AlgebraicCard.lean
[]
[ "FaithfulSMul.algebraMap_injective", "Infinite", "IsAlgebraic", "antisymm", "isAlgebraic_algebraMap" ]
null
61
66
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
countable : Set.Countable { x : A | IsAlgebraic R x } := by rw [← le_aleph0_iff_set_countable, ← lift_le_aleph0] apply (cardinalMk_lift_le_max R A).trans simp
countable : Set.Countable { x : A | IsAlgebraic R x }
by rw [← le_aleph0_iff_set_countable, ← lift_le_aleph0] apply (cardinalMk_lift_le_max R A).trans simp
theorem
Algebraic.countable
Algebra
Mathlib/Algebra/AlgebraicCard.lean
[]
[ "IsAlgebraic", "Set.Countable", "trans" ]
null
70
74
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
cardinalMk_of_countable_of_charZero [CharZero A] : #{ x : A // IsAlgebraic R x } = ℵ₀ := (Algebraic.countable R A).le_aleph0.antisymm (aleph0_le_cardinalMk_of_charZero R A)
cardinalMk_of_countable_of_charZero [CharZero A] : #{ x : A // IsAlgebraic R x } = ℵ₀
(Algebraic.countable R A).le_aleph0.antisymm (aleph0_le_cardinalMk_of_charZero R A)
theorem
Algebraic.cardinalMk_of_countable_of_charZero
Algebra
Mathlib/Algebra/AlgebraicCard.lean
[]
[ "Algebraic.countable", "CharZero", "IsAlgebraic" ]
null
76
79
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
cardinalMk_le_mul : #{ x : A // IsAlgebraic R x } ≤ #R[X] * ℵ₀ := by rw [← lift_id #_, ← lift_id #R[X]] exact cardinalMk_lift_le_mul R A
cardinalMk_le_mul : #{ x : A // IsAlgebraic R x } ≤ #R[X] * ℵ₀
by rw [← lift_id #_, ← lift_id #R[X]] exact cardinalMk_lift_le_mul R A
theorem
Algebraic.cardinalMk_le_mul
Algebra
Mathlib/Algebra/AlgebraicCard.lean
[]
[ "IsAlgebraic" ]
null
88
90
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
cardinalMk_le_max : #{ x : A // IsAlgebraic R x } ≤ max #R ℵ₀ := by rw [← lift_id #_, ← lift_id #R] exact cardinalMk_lift_le_max R A
cardinalMk_le_max : #{ x : A // IsAlgebraic R x } ≤ max #R ℵ₀
by rw [← lift_id #_, ← lift_id #R] exact cardinalMk_lift_le_max R A
theorem
Algebraic.cardinalMk_le_max
Algebra
Mathlib/Algebra/AlgebraicCard.lean
[]
[ "IsAlgebraic" ]
null
92
95
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
cardinalMk_of_infinite [Infinite R] : #{ x : A // IsAlgebraic R x } = #R := lift_inj.1 <| cardinalMk_lift_of_infinite R A
cardinalMk_of_infinite [Infinite R] : #{ x : A // IsAlgebraic R x } = #R
lift_inj.1 <| cardinalMk_lift_of_infinite R A
theorem
Algebraic.cardinalMk_of_infinite
Algebra
Mathlib/Algebra/AlgebraicCard.lean
[]
[ "Infinite", "IsAlgebraic" ]
null
97
99
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
Cubic (R : Type*) where /-- The degree-3 coefficient -/ a : R /-- The degree-2 coefficient -/ b : R /-- The degree-1 coefficient -/ c : R /-- The degree-0 coefficient -/ d : R
Cubic (R : Type*) where /-- The degree-3 coefficient -/ a : R /-- The degree-2 coefficient -/ b : R /-- The degree-1 coefficient -/ c : R /-- The degree-0 coefficient -/ d : R
structure
Cubic
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
The structure representing a cubic polynomial.
42
51
false
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
[Inhabited R] : Inhabited (Cubic R) := ⟨⟨default, default, default, default⟩⟩
[Inhabited R] : Inhabited (Cubic R)
⟨⟨default, default, default, default⟩⟩
instance
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic" ]
null
59
60
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
[Zero R] : Zero (Cubic R) := ⟨⟨0, 0, 0, 0⟩⟩
[Zero R] : Zero (Cubic R)
⟨⟨0, 0, 0, 0⟩⟩
instance
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic" ]
null
62
63
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
toPoly (P : Cubic R) : R[X] := C P.a * X ^ 3 + C P.b * X ^ 2 + C P.c * X + C P.d
toPoly (P : Cubic R) : R[X]
C P.a * X ^ 3 + C P.b * X ^ 2 + C P.c * X + C P.d
def
Cubic.toPoly
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic" ]
Convert a cubic polynomial to a polynomial.
70
71
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
C_mul_prod_X_sub_C_eq [CommRing S] {w x y z : S} : C w * (X - C x) * (X - C y) * (X - C z) = toPoly ⟨w, w * -(x + y + z), w * (x * y + x * z + y * z), w * -(x * y * z)⟩ := by simp only [toPoly, C_neg, C_add, C_mul] ring1
C_mul_prod_X_sub_C_eq [CommRing S] {w x y z : S} : C w * (X - C x) * (X - C y) * (X - C z) = toPoly ⟨w, w * -(x + y + z), w * (x * y + x * z + y * z), w * -(x * y * z)⟩
by simp only [toPoly, C_neg, C_add, C_mul] ring1
theorem
Cubic.C_mul_prod_X_sub_C_eq
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "CommRing" ]
null
73
77
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
prod_X_sub_C_eq [CommRing S] {x y z : S} : (X - C x) * (X - C y) * (X - C z) = toPoly ⟨1, -(x + y + z), x * y + x * z + y * z, -(x * y * z)⟩ := by rw [← one_mul <| X - C x, ← C_1, C_mul_prod_X_sub_C_eq, one_mul, one_mul, one_mul]
prod_X_sub_C_eq [CommRing S] {x y z : S} : (X - C x) * (X - C y) * (X - C z) = toPoly ⟨1, -(x + y + z), x * y + x * z + y * z, -(x * y * z)⟩
by rw [← one_mul <| X - C x, ← C_1, C_mul_prod_X_sub_C_eq, one_mul, one_mul, one_mul]
theorem
Cubic.prod_X_sub_C_eq
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "CommRing", "one_mul" ]
null
79
82
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
coeffs : (∀ n > 3, P.toPoly.coeff n = 0) ∧ P.toPoly.coeff 3 = P.a ∧ P.toPoly.coeff 2 = P.b ∧ P.toPoly.coeff 1 = P.c ∧ P.toPoly.coeff 0 = P.d := by simp only [Cubic.toPoly, Polynomial.coeff_add, Polynomial.coeff_C, Polynomial.coeff_C_mul_X, Polynomial.coeff_C_mul_X_pow] grind [zero_add]
coeffs : (∀ n > 3, P.toPoly.coeff n = 0) ∧ P.toPoly.coeff 3 = P.a ∧ P.toPoly.coeff 2 = P.b ∧ P.toPoly.coeff 1 = P.c ∧ P.toPoly.coeff 0 = P.d
by simp only [Cubic.toPoly, Polynomial.coeff_add, Polynomial.coeff_C, Polynomial.coeff_C_mul_X, Polynomial.coeff_C_mul_X_pow] grind [zero_add]
theorem
Cubic.coeffs
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic.toPoly", "Polynomial.coeff_C", "Polynomial.coeff_C_mul_X", "Polynomial.coeff_C_mul_X_pow", "Polynomial.coeff_add" ]
null
89
93
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
coeff_eq_zero {n : ℕ} (hn : 3 < n) : P.toPoly.coeff n = 0 := coeffs.1 n hn
coeff_eq_zero {n : ℕ} (hn : 3 < n) : P.toPoly.coeff n = 0
coeffs.1 n hn
theorem
Cubic.coeff_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
95
97
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
coeff_eq_a : P.toPoly.coeff 3 = P.a := coeffs.2.1
coeff_eq_a : P.toPoly.coeff 3 = P.a
coeffs.2.1
theorem
Cubic.coeff_eq_a
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
99
101
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
coeff_eq_b : P.toPoly.coeff 2 = P.b := coeffs.2.2.1
coeff_eq_b : P.toPoly.coeff 2 = P.b
coeffs.2.2.1
theorem
Cubic.coeff_eq_b
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
103
105
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
coeff_eq_c : P.toPoly.coeff 1 = P.c := coeffs.2.2.2.1
coeff_eq_c : P.toPoly.coeff 1 = P.c
coeffs.2.2.2.1
theorem
Cubic.coeff_eq_c
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
107
109
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
coeff_eq_d : P.toPoly.coeff 0 = P.d := coeffs.2.2.2.2
coeff_eq_d : P.toPoly.coeff 0 = P.d
coeffs.2.2.2.2
theorem
Cubic.coeff_eq_d
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
111
113
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
a_of_eq (h : P.toPoly = Q.toPoly) : P.a = Q.a := by rw [← coeff_eq_a, h, coeff_eq_a]
a_of_eq (h : P.toPoly = Q.toPoly) : P.a = Q.a
by rw [← coeff_eq_a, h, coeff_eq_a]
theorem
Cubic.a_of_eq
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
115
115
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
b_of_eq (h : P.toPoly = Q.toPoly) : P.b = Q.b := by rw [← coeff_eq_b, h, coeff_eq_b]
b_of_eq (h : P.toPoly = Q.toPoly) : P.b = Q.b
by rw [← coeff_eq_b, h, coeff_eq_b]
theorem
Cubic.b_of_eq
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
117
117
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
c_of_eq (h : P.toPoly = Q.toPoly) : P.c = Q.c := by rw [← coeff_eq_c, h, coeff_eq_c]
c_of_eq (h : P.toPoly = Q.toPoly) : P.c = Q.c
by rw [← coeff_eq_c, h, coeff_eq_c]
theorem
Cubic.c_of_eq
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
119
119
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
d_of_eq (h : P.toPoly = Q.toPoly) : P.d = Q.d := by rw [← coeff_eq_d, h, coeff_eq_d]
d_of_eq (h : P.toPoly = Q.toPoly) : P.d = Q.d
by rw [← coeff_eq_d, h, coeff_eq_d]
theorem
Cubic.d_of_eq
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
121
121
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
toPoly_injective (P Q : Cubic R) : P.toPoly = Q.toPoly ↔ P = Q := ⟨fun h ↦ Cubic.ext (a_of_eq h) (b_of_eq h) (c_of_eq h) (d_of_eq h), congr_arg toPoly⟩
toPoly_injective (P Q : Cubic R) : P.toPoly = Q.toPoly ↔ P = Q
⟨fun h ↦ Cubic.ext (a_of_eq h) (b_of_eq h) (c_of_eq h) (d_of_eq h), congr_arg toPoly⟩
theorem
Cubic.toPoly_injective
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic" ]
null
123
124
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
of_a_eq_zero (ha : P.a = 0) : P.toPoly = C P.b * X ^ 2 + C P.c * X + C P.d := by rw [toPoly, ha, C_0, zero_mul, zero_add]
of_a_eq_zero (ha : P.a = 0) : P.toPoly = C P.b * X ^ 2 + C P.c * X + C P.d
by rw [toPoly, ha, C_0, zero_mul, zero_add]
theorem
Cubic.of_a_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
126
127
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
of_a_eq_zero' : toPoly ⟨0, b, c, d⟩ = C b * X ^ 2 + C c * X + C d := of_a_eq_zero rfl
of_a_eq_zero' : toPoly ⟨0, b, c, d⟩ = C b * X ^ 2 + C c * X + C d
of_a_eq_zero rfl
theorem
Cubic.of_a_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
129
130
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
of_b_eq_zero (ha : P.a = 0) (hb : P.b = 0) : P.toPoly = C P.c * X + C P.d := by rw [of_a_eq_zero ha, hb, C_0, zero_mul, zero_add]
of_b_eq_zero (ha : P.a = 0) (hb : P.b = 0) : P.toPoly = C P.c * X + C P.d
by rw [of_a_eq_zero ha, hb, C_0, zero_mul, zero_add]
theorem
Cubic.of_b_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
132
133
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
of_b_eq_zero' : toPoly ⟨0, 0, c, d⟩ = C c * X + C d := of_b_eq_zero rfl rfl
of_b_eq_zero' : toPoly ⟨0, 0, c, d⟩ = C c * X + C d
of_b_eq_zero rfl rfl
theorem
Cubic.of_b_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
135
136
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
of_c_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) : P.toPoly = C P.d := by rw [of_b_eq_zero ha hb, hc, C_0, zero_mul, zero_add]
of_c_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) : P.toPoly = C P.d
by rw [of_b_eq_zero ha hb, hc, C_0, zero_mul, zero_add]
theorem
Cubic.of_c_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
138
139
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
of_c_eq_zero' : toPoly ⟨0, 0, 0, d⟩ = C d := of_c_eq_zero rfl rfl rfl
of_c_eq_zero' : toPoly ⟨0, 0, 0, d⟩ = C d
of_c_eq_zero rfl rfl rfl
theorem
Cubic.of_c_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
141
142
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
of_d_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) (hd : P.d = 0) : P.toPoly = 0 := by rw [of_c_eq_zero ha hb hc, hd, C_0]
of_d_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) (hd : P.d = 0) : P.toPoly = 0
by rw [of_c_eq_zero ha hb hc, hd, C_0]
theorem
Cubic.of_d_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
144
146
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
of_d_eq_zero' : (⟨0, 0, 0, 0⟩ : Cubic R).toPoly = 0 := of_d_eq_zero rfl rfl rfl rfl
of_d_eq_zero' : (⟨0, 0, 0, 0⟩ : Cubic R).toPoly = 0
of_d_eq_zero rfl rfl rfl rfl
theorem
Cubic.of_d_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic" ]
null
148
149
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
zero : (0 : Cubic R).toPoly = 0 := of_d_eq_zero'
zero : (0 : Cubic R).toPoly = 0
of_d_eq_zero'
theorem
Cubic.zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic" ]
null
151
152
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
toPoly_eq_zero_iff (P : Cubic R) : P.toPoly = 0 ↔ P = 0 := by rw [← zero, toPoly_injective]
toPoly_eq_zero_iff (P : Cubic R) : P.toPoly = 0 ↔ P = 0
by rw [← zero, toPoly_injective]
theorem
Cubic.toPoly_eq_zero_iff
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic" ]
null
154
155
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
ne_zero (h0 : P.a ≠ 0 ∨ P.b ≠ 0 ∨ P.c ≠ 0 ∨ P.d ≠ 0) : P.toPoly ≠ 0 := by contrapose! h0 rw [(toPoly_eq_zero_iff P).mp h0] exact ⟨rfl, rfl, rfl, rfl⟩
ne_zero (h0 : P.a ≠ 0 ∨ P.b ≠ 0 ∨ P.c ≠ 0 ∨ P.d ≠ 0) : P.toPoly ≠ 0
by contrapose! h0 rw [(toPoly_eq_zero_iff P).mp h0] exact ⟨rfl, rfl, rfl, rfl⟩
theorem
Cubic.ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
157
160
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
ne_zero_of_a_ne_zero (ha : P.a ≠ 0) : P.toPoly ≠ 0 := (or_imp.mp ne_zero).1 ha
ne_zero_of_a_ne_zero (ha : P.a ≠ 0) : P.toPoly ≠ 0
(or_imp.mp ne_zero).1 ha
theorem
Cubic.ne_zero_of_a_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
162
163
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
ne_zero_of_b_ne_zero (hb : P.b ≠ 0) : P.toPoly ≠ 0 := (or_imp.mp (or_imp.mp ne_zero).2).1 hb
ne_zero_of_b_ne_zero (hb : P.b ≠ 0) : P.toPoly ≠ 0
(or_imp.mp (or_imp.mp ne_zero).2).1 hb
theorem
Cubic.ne_zero_of_b_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
165
166
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
ne_zero_of_c_ne_zero (hc : P.c ≠ 0) : P.toPoly ≠ 0 := (or_imp.mp (or_imp.mp (or_imp.mp ne_zero).2).2).1 hc
ne_zero_of_c_ne_zero (hc : P.c ≠ 0) : P.toPoly ≠ 0
(or_imp.mp (or_imp.mp (or_imp.mp ne_zero).2).2).1 hc
theorem
Cubic.ne_zero_of_c_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
168
169
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
ne_zero_of_d_ne_zero (hd : P.d ≠ 0) : P.toPoly ≠ 0 := (or_imp.mp (or_imp.mp (or_imp.mp ne_zero).2).2).2 hd
ne_zero_of_d_ne_zero (hd : P.d ≠ 0) : P.toPoly ≠ 0
(or_imp.mp (or_imp.mp (or_imp.mp ne_zero).2).2).2 hd
theorem
Cubic.ne_zero_of_d_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
171
172
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
leadingCoeff_of_a_ne_zero (ha : P.a ≠ 0) : P.toPoly.leadingCoeff = P.a := leadingCoeff_cubic ha
leadingCoeff_of_a_ne_zero (ha : P.a ≠ 0) : P.toPoly.leadingCoeff = P.a
leadingCoeff_cubic ha
theorem
Cubic.leadingCoeff_of_a_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
174
176
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
leadingCoeff_of_a_ne_zero' (ha : a ≠ 0) : (toPoly ⟨a, b, c, d⟩).leadingCoeff = a := by simp [ha]
leadingCoeff_of_a_ne_zero' (ha : a ≠ 0) : (toPoly ⟨a, b, c, d⟩).leadingCoeff = a
by simp [ha]
theorem
Cubic.leadingCoeff_of_a_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
178
179
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
leadingCoeff_of_b_ne_zero (ha : P.a = 0) (hb : P.b ≠ 0) : P.toPoly.leadingCoeff = P.b := by rw [of_a_eq_zero ha, leadingCoeff_quadratic hb]
leadingCoeff_of_b_ne_zero (ha : P.a = 0) (hb : P.b ≠ 0) : P.toPoly.leadingCoeff = P.b
by rw [of_a_eq_zero ha, leadingCoeff_quadratic hb]
theorem
Cubic.leadingCoeff_of_b_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
181
183
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
leadingCoeff_of_b_ne_zero' (hb : b ≠ 0) : (toPoly ⟨0, b, c, d⟩).leadingCoeff = b := by simp [hb]
leadingCoeff_of_b_ne_zero' (hb : b ≠ 0) : (toPoly ⟨0, b, c, d⟩).leadingCoeff = b
by simp [hb]
theorem
Cubic.leadingCoeff_of_b_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
185
186
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
leadingCoeff_of_c_ne_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c ≠ 0) : P.toPoly.leadingCoeff = P.c := by rw [of_b_eq_zero ha hb, leadingCoeff_linear hc]
leadingCoeff_of_c_ne_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c ≠ 0) : P.toPoly.leadingCoeff = P.c
by rw [of_b_eq_zero ha hb, leadingCoeff_linear hc]
theorem
Cubic.leadingCoeff_of_c_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
188
191
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
leadingCoeff_of_c_ne_zero' (hc : c ≠ 0) : (toPoly ⟨0, 0, c, d⟩).leadingCoeff = c := by simp [hc]
leadingCoeff_of_c_ne_zero' (hc : c ≠ 0) : (toPoly ⟨0, 0, c, d⟩).leadingCoeff = c
by simp [hc]
theorem
Cubic.leadingCoeff_of_c_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
193
194
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
leadingCoeff_of_c_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) : P.toPoly.leadingCoeff = P.d := by rw [of_c_eq_zero ha hb hc, leadingCoeff_C]
leadingCoeff_of_c_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) : P.toPoly.leadingCoeff = P.d
by rw [of_c_eq_zero ha hb hc, leadingCoeff_C]
theorem
Cubic.leadingCoeff_of_c_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
196
199
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
leadingCoeff_of_c_eq_zero' : (toPoly ⟨0, 0, 0, d⟩).leadingCoeff = d := leadingCoeff_of_c_eq_zero rfl rfl rfl
leadingCoeff_of_c_eq_zero' : (toPoly ⟨0, 0, 0, d⟩).leadingCoeff = d
leadingCoeff_of_c_eq_zero rfl rfl rfl
theorem
Cubic.leadingCoeff_of_c_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
201
202
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
monic_of_a_eq_one (ha : P.a = 1) : P.toPoly.Monic := by nontriviality R rw [Monic, leadingCoeff_of_a_ne_zero (ha ▸ one_ne_zero), ha]
monic_of_a_eq_one (ha : P.a = 1) : P.toPoly.Monic
by nontriviality R rw [Monic, leadingCoeff_of_a_ne_zero (ha ▸ one_ne_zero), ha]
theorem
Cubic.monic_of_a_eq_one
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "one_ne_zero" ]
null
204
206
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
monic_of_a_eq_one' : (toPoly ⟨1, b, c, d⟩).Monic := monic_of_a_eq_one rfl
monic_of_a_eq_one' : (toPoly ⟨1, b, c, d⟩).Monic
monic_of_a_eq_one rfl
theorem
Cubic.monic_of_a_eq_one'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
208
209
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
monic_of_b_eq_one (ha : P.a = 0) (hb : P.b = 1) : P.toPoly.Monic := by nontriviality R rw [Monic, leadingCoeff_of_b_ne_zero ha (hb ▸ one_ne_zero), hb]
monic_of_b_eq_one (ha : P.a = 0) (hb : P.b = 1) : P.toPoly.Monic
by nontriviality R rw [Monic, leadingCoeff_of_b_ne_zero ha (hb ▸ one_ne_zero), hb]
theorem
Cubic.monic_of_b_eq_one
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "one_ne_zero" ]
null
211
213
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
monic_of_b_eq_one' : (toPoly ⟨0, 1, c, d⟩).Monic := monic_of_b_eq_one rfl rfl
monic_of_b_eq_one' : (toPoly ⟨0, 1, c, d⟩).Monic
monic_of_b_eq_one rfl rfl
theorem
Cubic.monic_of_b_eq_one'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
215
216
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
monic_of_c_eq_one (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 1) : P.toPoly.Monic := by nontriviality R rw [Monic, leadingCoeff_of_c_ne_zero ha hb (hc ▸ one_ne_zero), hc]
monic_of_c_eq_one (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 1) : P.toPoly.Monic
by nontriviality R rw [Monic, leadingCoeff_of_c_ne_zero ha hb (hc ▸ one_ne_zero), hc]
theorem
Cubic.monic_of_c_eq_one
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "one_ne_zero" ]
null
218
220
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
monic_of_c_eq_one' : (toPoly ⟨0, 0, 1, d⟩).Monic := monic_of_c_eq_one rfl rfl rfl
monic_of_c_eq_one' : (toPoly ⟨0, 0, 1, d⟩).Monic
monic_of_c_eq_one rfl rfl rfl
theorem
Cubic.monic_of_c_eq_one'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
222
223
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
monic_of_d_eq_one (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) (hd : P.d = 1) : P.toPoly.Monic := by rw [Monic, leadingCoeff_of_c_eq_zero ha hb hc, hd]
monic_of_d_eq_one (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) (hd : P.d = 1) : P.toPoly.Monic
by rw [Monic, leadingCoeff_of_c_eq_zero ha hb hc, hd]
theorem
Cubic.monic_of_d_eq_one
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
225
227
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
monic_of_d_eq_one' : (toPoly ⟨0, 0, 0, 1⟩).Monic := monic_of_d_eq_one rfl rfl rfl rfl
monic_of_d_eq_one' : (toPoly ⟨0, 0, 0, 1⟩).Monic
monic_of_d_eq_one rfl rfl rfl rfl
theorem
Cubic.monic_of_d_eq_one'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
229
230
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
equiv : Cubic R ≃ { p : R[X] // p.degree ≤ 3 } where toFun P := ⟨P.toPoly, degree_cubic_le⟩ invFun f := ⟨coeff f 3, coeff f 2, coeff f 1, coeff f 0⟩ left_inv P := by ext <;> simp only [coeffs] right_inv f := by ext n obtain hn | hn := le_or_gt n 3 · interval_cases n <;> simp only <;> ring_nf <;> try...
equiv : Cubic R ≃ { p : R[X] // p.degree ≤ 3 } where toFun P := ⟨P.toPoly, degree_cubic_le⟩ invFun f := ⟨coeff f 3, coeff f 2, coeff f 1, coeff f 0⟩ left_inv P := by ext <;> simp only [coeffs] right_inv f := by ext n obtain hn | hn := le_or_gt n 3 · interval_cases n <;> simp only <;> ring_nf <;> try...
def
Cubic.equiv
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic", "le_or_gt" ]
The equivalence between cubic polynomials and polynomials of degree at most three.
240
250
false
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
degree_of_a_ne_zero (ha : P.a ≠ 0) : P.toPoly.degree = 3 := degree_cubic ha
degree_of_a_ne_zero (ha : P.a ≠ 0) : P.toPoly.degree = 3
degree_cubic ha
theorem
Cubic.degree_of_a_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
252
254
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
degree_of_a_ne_zero' (ha : a ≠ 0) : (toPoly ⟨a, b, c, d⟩).degree = 3 := by simp [ha]
degree_of_a_ne_zero' (ha : a ≠ 0) : (toPoly ⟨a, b, c, d⟩).degree = 3
by simp [ha]
theorem
Cubic.degree_of_a_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
256
257
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
degree_of_a_eq_zero (ha : P.a = 0) : P.toPoly.degree ≤ 2 := by simpa only [of_a_eq_zero ha] using degree_quadratic_le
degree_of_a_eq_zero (ha : P.a = 0) : P.toPoly.degree ≤ 2
by simpa only [of_a_eq_zero ha] using degree_quadratic_le
theorem
Cubic.degree_of_a_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
259
260
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
degree_of_a_eq_zero' : (toPoly ⟨0, b, c, d⟩).degree ≤ 2 := degree_of_a_eq_zero rfl
degree_of_a_eq_zero' : (toPoly ⟨0, b, c, d⟩).degree ≤ 2
degree_of_a_eq_zero rfl
theorem
Cubic.degree_of_a_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
262
263
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
degree_of_b_ne_zero (ha : P.a = 0) (hb : P.b ≠ 0) : P.toPoly.degree = 2 := by rw [of_a_eq_zero ha, degree_quadratic hb]
degree_of_b_ne_zero (ha : P.a = 0) (hb : P.b ≠ 0) : P.toPoly.degree = 2
by rw [of_a_eq_zero ha, degree_quadratic hb]
theorem
Cubic.degree_of_b_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
265
267
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
degree_of_b_ne_zero' (hb : b ≠ 0) : (toPoly ⟨0, b, c, d⟩).degree = 2 := by simp [hb]
degree_of_b_ne_zero' (hb : b ≠ 0) : (toPoly ⟨0, b, c, d⟩).degree = 2
by simp [hb]
theorem
Cubic.degree_of_b_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
269
270
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
degree_of_b_eq_zero (ha : P.a = 0) (hb : P.b = 0) : P.toPoly.degree ≤ 1 := by simpa only [of_b_eq_zero ha hb] using degree_linear_le
degree_of_b_eq_zero (ha : P.a = 0) (hb : P.b = 0) : P.toPoly.degree ≤ 1
by simpa only [of_b_eq_zero ha hb] using degree_linear_le
theorem
Cubic.degree_of_b_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
272
273
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
degree_of_b_eq_zero' : (toPoly ⟨0, 0, c, d⟩).degree ≤ 1 := degree_of_b_eq_zero rfl rfl
degree_of_b_eq_zero' : (toPoly ⟨0, 0, c, d⟩).degree ≤ 1
degree_of_b_eq_zero rfl rfl
theorem
Cubic.degree_of_b_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
275
276
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
degree_of_c_ne_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c ≠ 0) : P.toPoly.degree = 1 := by rw [of_b_eq_zero ha hb, degree_linear hc]
degree_of_c_ne_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c ≠ 0) : P.toPoly.degree = 1
by rw [of_b_eq_zero ha hb, degree_linear hc]
theorem
Cubic.degree_of_c_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
278
280
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
degree_of_c_ne_zero' (hc : c ≠ 0) : (toPoly ⟨0, 0, c, d⟩).degree = 1 := by simp [hc]
degree_of_c_ne_zero' (hc : c ≠ 0) : (toPoly ⟨0, 0, c, d⟩).degree = 1
by simp [hc]
theorem
Cubic.degree_of_c_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
282
283
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
degree_of_c_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) : P.toPoly.degree ≤ 0 := by simpa only [of_c_eq_zero ha hb hc] using degree_C_le
degree_of_c_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) : P.toPoly.degree ≤ 0
by simpa only [of_c_eq_zero ha hb hc] using degree_C_le
theorem
Cubic.degree_of_c_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
285
286
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
degree_of_c_eq_zero' : (toPoly ⟨0, 0, 0, d⟩).degree ≤ 0 := degree_of_c_eq_zero rfl rfl rfl
degree_of_c_eq_zero' : (toPoly ⟨0, 0, 0, d⟩).degree ≤ 0
degree_of_c_eq_zero rfl rfl rfl
theorem
Cubic.degree_of_c_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
288
289
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
degree_of_d_ne_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) (hd : P.d ≠ 0) : P.toPoly.degree = 0 := by rw [of_c_eq_zero ha hb hc, degree_C hd]
degree_of_d_ne_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) (hd : P.d ≠ 0) : P.toPoly.degree = 0
by rw [of_c_eq_zero ha hb hc, degree_C hd]
theorem
Cubic.degree_of_d_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
291
294
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
degree_of_d_ne_zero' (hd : d ≠ 0) : (toPoly ⟨0, 0, 0, d⟩).degree = 0 := by simp [hd]
degree_of_d_ne_zero' (hd : d ≠ 0) : (toPoly ⟨0, 0, 0, d⟩).degree = 0
by simp [hd]
theorem
Cubic.degree_of_d_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
296
297
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
degree_of_d_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) (hd : P.d = 0) : P.toPoly.degree = ⊥ := by rw [of_d_eq_zero ha hb hc hd, degree_zero]
degree_of_d_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) (hd : P.d = 0) : P.toPoly.degree = ⊥
by rw [of_d_eq_zero ha hb hc hd, degree_zero]
theorem
Cubic.degree_of_d_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
299
302
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
degree_of_d_eq_zero' : (⟨0, 0, 0, 0⟩ : Cubic R).toPoly.degree = ⊥ := degree_of_d_eq_zero rfl rfl rfl rfl
degree_of_d_eq_zero' : (⟨0, 0, 0, 0⟩ : Cubic R).toPoly.degree = ⊥
degree_of_d_eq_zero rfl rfl rfl rfl
theorem
Cubic.degree_of_d_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic" ]
null
304
305
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
degree_of_zero : (0 : Cubic R).toPoly.degree = ⊥ := degree_of_d_eq_zero'
degree_of_zero : (0 : Cubic R).toPoly.degree = ⊥
degree_of_d_eq_zero'
theorem
Cubic.degree_of_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic" ]
null
307
309
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
natDegree_of_a_ne_zero (ha : P.a ≠ 0) : P.toPoly.natDegree = 3 := natDegree_cubic ha
natDegree_of_a_ne_zero (ha : P.a ≠ 0) : P.toPoly.natDegree = 3
natDegree_cubic ha
theorem
Cubic.natDegree_of_a_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
311
313
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
natDegree_of_a_ne_zero' (ha : a ≠ 0) : (toPoly ⟨a, b, c, d⟩).natDegree = 3 := by simp [ha]
natDegree_of_a_ne_zero' (ha : a ≠ 0) : (toPoly ⟨a, b, c, d⟩).natDegree = 3
by simp [ha]
theorem
Cubic.natDegree_of_a_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
315
316
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
natDegree_of_a_eq_zero (ha : P.a = 0) : P.toPoly.natDegree ≤ 2 := by simpa only [of_a_eq_zero ha] using natDegree_quadratic_le
natDegree_of_a_eq_zero (ha : P.a = 0) : P.toPoly.natDegree ≤ 2
by simpa only [of_a_eq_zero ha] using natDegree_quadratic_le
theorem
Cubic.natDegree_of_a_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
318
319
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
natDegree_of_a_eq_zero' : (toPoly ⟨0, b, c, d⟩).natDegree ≤ 2 := natDegree_of_a_eq_zero rfl
natDegree_of_a_eq_zero' : (toPoly ⟨0, b, c, d⟩).natDegree ≤ 2
natDegree_of_a_eq_zero rfl
theorem
Cubic.natDegree_of_a_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
321
322
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
natDegree_of_b_ne_zero (ha : P.a = 0) (hb : P.b ≠ 0) : P.toPoly.natDegree = 2 := by rw [of_a_eq_zero ha, natDegree_quadratic hb]
natDegree_of_b_ne_zero (ha : P.a = 0) (hb : P.b ≠ 0) : P.toPoly.natDegree = 2
by rw [of_a_eq_zero ha, natDegree_quadratic hb]
theorem
Cubic.natDegree_of_b_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
324
326
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
natDegree_of_b_ne_zero' (hb : b ≠ 0) : (toPoly ⟨0, b, c, d⟩).natDegree = 2 := by simp [hb]
natDegree_of_b_ne_zero' (hb : b ≠ 0) : (toPoly ⟨0, b, c, d⟩).natDegree = 2
by simp [hb]
theorem
Cubic.natDegree_of_b_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
328
329
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
natDegree_of_b_eq_zero (ha : P.a = 0) (hb : P.b = 0) : P.toPoly.natDegree ≤ 1 := by simpa only [of_b_eq_zero ha hb] using natDegree_linear_le
natDegree_of_b_eq_zero (ha : P.a = 0) (hb : P.b = 0) : P.toPoly.natDegree ≤ 1
by simpa only [of_b_eq_zero ha hb] using natDegree_linear_le
theorem
Cubic.natDegree_of_b_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
331
332
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
natDegree_of_b_eq_zero' : (toPoly ⟨0, 0, c, d⟩).natDegree ≤ 1 := natDegree_of_b_eq_zero rfl rfl
natDegree_of_b_eq_zero' : (toPoly ⟨0, 0, c, d⟩).natDegree ≤ 1
natDegree_of_b_eq_zero rfl rfl
theorem
Cubic.natDegree_of_b_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
334
335
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
natDegree_of_c_ne_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c ≠ 0) : P.toPoly.natDegree = 1 := by rw [of_b_eq_zero ha hb, natDegree_linear hc]
natDegree_of_c_ne_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c ≠ 0) : P.toPoly.natDegree = 1
by rw [of_b_eq_zero ha hb, natDegree_linear hc]
theorem
Cubic.natDegree_of_c_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
337
340
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
natDegree_of_c_ne_zero' (hc : c ≠ 0) : (toPoly ⟨0, 0, c, d⟩).natDegree = 1 := by simp [hc]
natDegree_of_c_ne_zero' (hc : c ≠ 0) : (toPoly ⟨0, 0, c, d⟩).natDegree = 1
by simp [hc]
theorem
Cubic.natDegree_of_c_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
342
343
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
natDegree_of_c_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) : P.toPoly.natDegree = 0 := by rw [of_c_eq_zero ha hb hc, natDegree_C]
natDegree_of_c_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) : P.toPoly.natDegree = 0
by rw [of_c_eq_zero ha hb hc, natDegree_C]
theorem
Cubic.natDegree_of_c_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
345
348
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
natDegree_of_c_eq_zero' : (toPoly ⟨0, 0, 0, d⟩).natDegree = 0 := natDegree_of_c_eq_zero rfl rfl rfl
natDegree_of_c_eq_zero' : (toPoly ⟨0, 0, 0, d⟩).natDegree = 0
natDegree_of_c_eq_zero rfl rfl rfl
theorem
Cubic.natDegree_of_c_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
350
351
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
natDegree_of_zero : (0 : Cubic R).toPoly.natDegree = 0 := natDegree_of_c_eq_zero'
natDegree_of_zero : (0 : Cubic R).toPoly.natDegree = 0
natDegree_of_c_eq_zero'
theorem
Cubic.natDegree_of_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic" ]
null
353
355
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
map (φ : R →+* S) (P : Cubic R) : Cubic S := ⟨φ P.a, φ P.b, φ P.c, φ P.d⟩
map (φ : R →+* S) (P : Cubic R) : Cubic S
⟨φ P.a, φ P.b, φ P.c, φ P.d⟩
def
Cubic.map
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic" ]
Map a cubic polynomial across a semiring homomorphism.
367
368
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
map_toPoly : (map φ P).toPoly = Polynomial.map φ P.toPoly := by simp only [map, toPoly, map_C, map_X, Polynomial.map_add, Polynomial.map_mul, Polynomial.map_pow]
map_toPoly : (map φ P).toPoly = Polynomial.map φ P.toPoly
by simp only [map, toPoly, map_C, map_X, Polynomial.map_add, Polynomial.map_mul, Polynomial.map_pow]
theorem
Cubic.map_toPoly
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Polynomial.map", "Polynomial.map_add", "Polynomial.map_mul", "Polynomial.map_pow" ]
null
370
371
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
roots [IsDomain R] (P : Cubic R) : Multiset R := P.toPoly.roots
roots [IsDomain R] (P : Cubic R) : Multiset R
P.toPoly.roots
def
Cubic.roots
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic", "IsDomain" ]
The roots of a cubic polynomial.
389
390
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
map_roots [IsDomain S] : (map φ P).roots = (Polynomial.map φ P.toPoly).roots := by rw [roots, map_toPoly]
map_roots [IsDomain S] : (map φ P).roots = (Polynomial.map φ P.toPoly).roots
by rw [roots, map_toPoly]
theorem
Cubic.map_roots
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "IsDomain", "Polynomial.map" ]
null
392
393
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
mem_roots_iff [IsDomain R] (h0 : P.toPoly ≠ 0) (x : R) : x ∈ P.roots ↔ P.a * x ^ 3 + P.b * x ^ 2 + P.c * x + P.d = 0 := by rw [roots, mem_roots h0, IsRoot, toPoly] simp only [eval_C, eval_X, eval_add, eval_mul, eval_pow]
mem_roots_iff [IsDomain R] (h0 : P.toPoly ≠ 0) (x : R) : x ∈ P.roots ↔ P.a * x ^ 3 + P.b * x ^ 2 + P.c * x + P.d = 0
by rw [roots, mem_roots h0, IsRoot, toPoly] simp only [eval_C, eval_X, eval_add, eval_mul, eval_pow]
theorem
Cubic.mem_roots_iff
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "IsDomain" ]
null
395
398
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
card_roots_le [IsDomain R] [DecidableEq R] : P.roots.toFinset.card ≤ 3 := by apply (toFinset_card_le P.toPoly.roots).trans by_cases hP : P.toPoly = 0 · simp [hP] · exact WithBot.coe_le_coe.1 ((card_roots hP).trans degree_cubic_le)
card_roots_le [IsDomain R] [DecidableEq R] : P.roots.toFinset.card ≤ 3
by apply (toFinset_card_le P.toPoly.roots).trans by_cases hP : P.toPoly = 0 · simp [hP] · exact WithBot.coe_le_coe.1 ((card_roots hP).trans degree_cubic_le)
theorem
Cubic.card_roots_le
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "IsDomain", "by_cases", "trans" ]
null
400
404
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
splits_iff_card_roots (ha : P.a ≠ 0) : Splits (P.toPoly.map φ) ↔ (map φ P).roots.card = 3 := by replace ha : (map φ P).a ≠ 0 := (map_ne_zero φ).mpr ha rw [roots, ← map_toPoly, Polynomial.splits_iff_card_roots, ← ((degree_eq_iff_natDegree_eq <| ne_zero_of_a_ne_zero ha).1 <| degree_of_a_ne_zero ha : _ = 3)]
splits_iff_card_roots (ha : P.a ≠ 0) : Splits (P.toPoly.map φ) ↔ (map φ P).roots.card = 3
by replace ha : (map φ P).a ≠ 0 := (map_ne_zero φ).mpr ha rw [roots, ← map_toPoly, Polynomial.splits_iff_card_roots, ← ((degree_eq_iff_natDegree_eq <| ne_zero_of_a_ne_zero ha).1 <| degree_of_a_ne_zero ha : _ = 3)]
theorem
Cubic.splits_iff_card_roots
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Polynomial.splits_iff_card_roots", "map_ne_zero" ]
null
415
419
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
splits_iff_roots_eq_three (ha : P.a ≠ 0) : Splits (P.toPoly.map φ) ↔ ∃ x y z : K, (map φ P).roots = {x, y, z} := by rw [splits_iff_card_roots ha, card_eq_three]
splits_iff_roots_eq_three (ha : P.a ≠ 0) : Splits (P.toPoly.map φ) ↔ ∃ x y z : K, (map φ P).roots = {x, y, z}
by rw [splits_iff_card_roots ha, card_eq_three]
theorem
Cubic.splits_iff_roots_eq_three
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
421
423
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
eq_prod_three_roots (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) : (map φ P).toPoly = C (φ P.a) * (X - C x) * (X - C y) * (X - C z) := by rw [map_toPoly, Splits.eq_prod_roots <| (splits_iff_roots_eq_three ha).mpr <| Exists.intro x <| Exists.intro y <| Exists.intro z h3, leadingCoeff_map, leadin...
eq_prod_three_roots (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) : (map φ P).toPoly = C (φ P.a) * (X - C x) * (X - C y) * (X - C z)
by rw [map_toPoly, Splits.eq_prod_roots <| (splits_iff_roots_eq_three ha).mpr <| Exists.intro x <| Exists.intro y <| Exists.intro z h3, leadingCoeff_map, leadingCoeff_of_a_ne_zero ha, ← map_roots, h3] change C (φ P.a) * ((X - C x) ::ₘ (X - C y) ::ₘ {X - C z}).prod = _ rw [prod_cons, prod_cons, prod_...
theorem
Cubic.eq_prod_three_roots
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "mul_assoc" ]
null
425
432
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
eq_sum_three_roots (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) : map φ P = ⟨φ P.a, φ P.a * -(x + y + z), φ P.a * (x * y + x * z + y * z), φ P.a * -(x * y * z)⟩ := by apply_fun toPoly · rw [eq_prod_three_roots ha h3, C_mul_prod_X_sub_C_eq] · exact fun P Q ↦ (toPoly_injective P Q).mp
eq_sum_three_roots (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) : map φ P = ⟨φ P.a, φ P.a * -(x + y + z), φ P.a * (x * y + x * z + y * z), φ P.a * -(x * y * z)⟩
by apply_fun toPoly · rw [eq_prod_three_roots ha h3, C_mul_prod_X_sub_C_eq] · exact fun P Q ↦ (toPoly_injective P Q).mp
theorem
Cubic.eq_sum_three_roots
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
434
439
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
b_eq_three_roots (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) : φ P.b = φ P.a * -(x + y + z) := by injection eq_sum_three_roots ha h3
b_eq_three_roots (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) : φ P.b = φ P.a * -(x + y + z)
by injection eq_sum_three_roots ha h3
theorem
Cubic.b_eq_three_roots
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
null
441
443
true
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
End of preview. Expand in Data Studio

Lean4-Mathlib

Structured dataset of mathematical formalizations from the Mathlib4 library for Lean 4.

Source

Schema

Column Type Description
fact string Verbatim declaration with the leading keyword removed: signature and body/proof joined
statement string Signature with the leading keyword removed (verbatim slice)
proof string Verbatim proof/body, empty if none
type string Declaration keyword
symbolic_name string Declaration identifier
library string Sub-library
filename string Repository-relative source path
imports list[string] File-level Require/Import modules
deps list[string] Intra-corpus identifiers referenced
docstring string Preceding documentation comment, null if absent
line_start int First source line
line_end int Last source line
has_proof bool Whether a proof block was captured
source_url string Upstream repository
commit string Upstream commit extracted

Statistics

  • Entries: 249,840
  • With proof: 221,681 (88.7%)
  • With docstring: 69,520 (27.8%)
  • Libraries: 1106

By type

Type Count
theorem 126,075
lemma 56,893
def 32,070
instance 26,528
abbrev 3,395
class 1,937
structure 1,586
example 530
inductive 326
elab 170
macro 162
macro_rules 80
elab_rules 77
class inductive 6
class abbrev 3
opaque 2

Example

infinite_of_charZero (R A : Type*) [CommRing R] [Ring A] [Algebra R A]
    [CharZero A] : { x : A | IsAlgebraic R x }.Infinite := by
  letI := MulActionWithZero.nontrivial R A
  exact infinite_of_injective_forall_mem Nat.cast_injective isAlgebraic_nat
  • type: theorem | symbolic_name: Algebraic.infinite_of_charZero | Mathlib/Algebra/AlgebraicCard.lean:32

Use

Statement and proof are available both joined (fact) and split (statement, proof) for proof-term modeling, autoformalization, retrieval, and dependency analysis via deps.

Citation

@misc{lean4_mathlib_dataset,
  title  = {Lean4-Mathlib},
  author = {Norton, Charles},
  year   = {2026},
  note   = {Extracted from https://github.com/leanprover-community/mathlib4, commit b9f14353520d},
  url    = {https://huggingface.co/datasets/phanerozoic/Lean4-Mathlib}
}
Downloads last month
78

Collection including phanerozoic/Lean4-Mathlib