Dataset Viewer
Auto-converted to Parquet Duplicate
statement
stringlengths
1
2.93k
proof
stringlengths
0
19.2k
type
stringclasses
13 values
symbolic_name
stringlengths
1
131
library
stringlengths
4
62
filename
stringlengths
20
95
imports
listlengths
0
10
deps
listlengths
0
64
docstring
stringlengths
0
4.95k
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
theorem
Algebraic.infinite_of_charZero
Algebra
Mathlib/Algebra/AlgebraicCard.lean
[]
[ "Algebra", "CharZero", "CommRing", "Infinite", "IsAlgebraic", "MulActionWithZero.nontrivial", "Nat.cast_injective", "Ring", "isAlgebraic_nat" ]
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)
theorem
Algebraic.aleph0_le_cardinalMk_of_charZero
Algebra
Mathlib/Algebra/AlgebraicCard.lean
[]
[ "Algebra", "CharZero", "CommRing", "IsAlgebraic", "Ring" ]
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_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" ]
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
theorem
Algebraic.cardinalMk_lift_le_max
Algebra
Mathlib/Algebra/AlgebraicCard.lean
[]
[ "IsAlgebraic", "trans" ]
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.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" ]
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
theorem
Algebraic.countable
Algebra
Mathlib/Algebra/AlgebraicCard.lean
[]
[ "IsAlgebraic", "Set.Countable", "trans" ]
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)
theorem
Algebraic.cardinalMk_of_countable_of_charZero
Algebra
Mathlib/Algebra/AlgebraicCard.lean
[]
[ "Algebraic.countable", "CharZero", "IsAlgebraic" ]
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
theorem
Algebraic.cardinalMk_le_mul
Algebra
Mathlib/Algebra/AlgebraicCard.lean
[]
[ "IsAlgebraic" ]
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
theorem
Algebraic.cardinalMk_le_max
Algebra
Mathlib/Algebra/AlgebraicCard.lean
[]
[ "IsAlgebraic" ]
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
theorem
Algebraic.cardinalMk_of_infinite
Algebra
Mathlib/Algebra/AlgebraicCard.lean
[]
[ "Infinite", "IsAlgebraic" ]
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
structure
Cubic
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
The structure representing a cubic polynomial.
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
def
Cubic.toPoly
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic" ]
Convert a cubic polynomial to a polynomial.
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
theorem
Cubic.C_mul_prod_X_sub_C_eq
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "CommRing" ]
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]
theorem
Cubic.prod_X_sub_C_eq
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "CommRing", "one_mul" ]
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]
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" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
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
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
coeff_eq_a : P.toPoly.coeff 3 = P.a
coeffs.2.1
theorem
Cubic.coeff_eq_a
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
coeff_eq_b : P.toPoly.coeff 2 = P.b
coeffs.2.2.1
theorem
Cubic.coeff_eq_b
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
coeff_eq_c : P.toPoly.coeff 1 = P.c
coeffs.2.2.2.1
theorem
Cubic.coeff_eq_c
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
coeff_eq_d : P.toPoly.coeff 0 = P.d
coeffs.2.2.2.2
theorem
Cubic.coeff_eq_d
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.a_of_eq
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.b_of_eq
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.c_of_eq
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.d_of_eq
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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⟩
theorem
Cubic.toPoly_injective
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic" ]
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]
theorem
Cubic.of_a_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.of_a_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.of_b_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.of_b_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.of_c_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.of_c_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.of_d_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.of_d_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
zero : (0 : Cubic R).toPoly = 0
of_d_eq_zero'
theorem
Cubic.zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
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" ]
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⟩
theorem
Cubic.ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.ne_zero_of_a_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.ne_zero_of_b_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.ne_zero_of_c_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.ne_zero_of_d_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
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
[]
[]
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]
theorem
Cubic.leadingCoeff_of_a_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.leadingCoeff_of_b_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.leadingCoeff_of_b_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.leadingCoeff_of_c_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.leadingCoeff_of_c_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.leadingCoeff_of_c_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.leadingCoeff_of_c_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.monic_of_a_eq_one
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "one_ne_zero" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
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
[]
[]
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]
theorem
Cubic.monic_of_b_eq_one
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "one_ne_zero" ]
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
theorem
Cubic.monic_of_b_eq_one'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.monic_of_c_eq_one
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "one_ne_zero" ]
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
theorem
Cubic.monic_of_c_eq_one'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.monic_of_d_eq_one
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.monic_of_d_eq_one'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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 simp only [coeffs] · rw [coeff_eq_zero hn,...
def
Cubic.equiv
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic", "le_or_gt" ]
The equivalence between cubic polynomials and polynomials of degree at most three.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
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
[]
[]
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]
theorem
Cubic.degree_of_a_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.degree_of_a_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.degree_of_a_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.degree_of_b_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.degree_of_b_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.degree_of_b_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.degree_of_b_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.degree_of_c_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.degree_of_c_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.degree_of_c_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.degree_of_c_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.degree_of_d_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.degree_of_d_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.degree_of_d_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.degree_of_d_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
degree_of_zero : (0 : Cubic R).toPoly.degree = ⊥
degree_of_d_eq_zero'
theorem
Cubic.degree_of_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Cubic" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
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
[]
[]
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]
theorem
Cubic.natDegree_of_a_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.natDegree_of_a_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.natDegree_of_a_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.natDegree_of_b_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.natDegree_of_b_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.natDegree_of_b_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.natDegree_of_b_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.natDegree_of_c_ne_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.natDegree_of_c_ne_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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]
theorem
Cubic.natDegree_of_c_eq_zero
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.natDegree_of_c_eq_zero'
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
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" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
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.
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]
theorem
Cubic.map_toPoly
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Polynomial.map", "Polynomial.map_add", "Polynomial.map_mul", "Polynomial.map_pow" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
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.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
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" ]
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]
theorem
Cubic.mem_roots_iff
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "IsDomain" ]
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)
theorem
Cubic.card_roots_le
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "IsDomain", "by_cases", "trans" ]
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)]
theorem
Cubic.splits_iff_card_roots
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[ "Polynomial.splits_iff_card_roots", "map_ne_zero" ]
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]
theorem
Cubic.splits_iff_roots_eq_three
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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, 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" ]
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
theorem
Cubic.eq_sum_three_roots
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
theorem
Cubic.b_eq_three_roots
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
c_eq_three_roots (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) : φ P.c = φ P.a * (x * y + x * z + y * z)
by injection eq_sum_three_roots ha h3
theorem
Cubic.c_eq_three_roots
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
d_eq_three_roots (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) : φ P.d = φ P.a * -(x * y * z)
by injection eq_sum_three_roots ha h3
theorem
Cubic.d_eq_three_roots
Algebra
Mathlib/Algebra/CubicDiscriminant.lean
[]
[]
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
statement string Declaration signature/claim with the leading keyword removed (verbatim slice); the full declaration minus its proof
proof string Verbatim proof/body, empty if the declaration has 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, empty if absent
source_url string Upstream repository
commit string Upstream commit extracted

Statistics

  • Entries: 232,431
  • With proof: 228,810 (98.4%)
  • With docstring: 67,814 (29.2%)
  • Libraries: 1103

By type

Type Count
theorem 125,463
lemma 56,488
def 31,961
instance 10,971
abbrev 3,379
class 1,937
structure 1,580
inductive 326
elab 168
macro 147
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

Use

Each declaration is split into a statement (signature/claim) and a proof (body) that are disjoint and together form the complete declaration, for proof 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
96

Collection including phanerozoic/Lean4-Mathlib