Dataset Viewer
Auto-converted to Parquet Duplicate
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
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
Algebra
[ "Mathlib.Algebra.Polynomial.Cardinal", "Mathlib.RingTheory.Algebraic.Basic" ]
Mathlib/Algebra/AlgebraicCard.lean
infinite_of_charZero
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Cardinal", "Mathlib.RingTheory.Algebraic.Basic" ]
Mathlib/Algebra/AlgebraicCard.lean
aleph0_le_cardinalMk_of_charZero
null
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_injective.injOn (f.rootSet_finite A).countable rintro x (rfl : g x = f) exact mem_rootSet.2 ⟨hg₁ x, hg₂ x⟩
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Cardinal", "Mathlib.RingTheory.Algebraic.Basic" ]
Mathlib/Algebra/AlgebraicCard.lean
cardinalMk_lift_le_mul
null
cardinalMk_lift_le_max : Cardinal.lift.{u} #{ x : A // IsAlgebraic R x } ≤ max (Cardinal.lift.{v} #R) ℵ₀ := (cardinalMk_lift_le_mul R A).trans <| (mul_le_mul_right' (lift_le.2 cardinalMk_le_max) _).trans <| by simp @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Cardinal", "Mathlib.RingTheory.Algebraic.Basic" ]
Mathlib/Algebra/AlgebraicCard.lean
cardinalMk_lift_le_max
null
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)⟩⟩ variable [Countable R] @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Cardinal", "Mathlib.RingTheory.Algebraic.Basic" ]
Mathlib/Algebra/AlgebraicCard.lean
cardinalMk_lift_of_infinite
null
protected 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 @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Cardinal", "Mathlib.RingTheory.Algebraic.Basic" ]
Mathlib/Algebra/AlgebraicCard.lean
countable
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Cardinal", "Mathlib.RingTheory.Algebraic.Basic" ]
Mathlib/Algebra/AlgebraicCard.lean
cardinalMk_of_countable_of_charZero
null
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 @[stacks 09GK]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Cardinal", "Mathlib.RingTheory.Algebraic.Basic" ]
Mathlib/Algebra/AlgebraicCard.lean
cardinalMk_le_mul
null
cardinalMk_le_max : #{ x : A // IsAlgebraic R x } ≤ max #R ℵ₀ := by rw [← lift_id #_, ← lift_id #R] exact cardinalMk_lift_le_max R A @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Cardinal", "Mathlib.RingTheory.Algebraic.Basic" ]
Mathlib/Algebra/AlgebraicCard.lean
cardinalMk_le_max
null
cardinalMk_of_infinite [Infinite R] : #{ x : A // IsAlgebraic R x } = #R := lift_inj.1 <| cardinalMk_lift_of_infinite R A
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Cardinal", "Mathlib.RingTheory.Algebraic.Basic" ]
Mathlib/Algebra/AlgebraicCard.lean
cardinalMk_of_infinite
null
@[ext] 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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
Cubic
The structure representing a cubic polynomial.
toPoly (P : Cubic R) : R[X] := C P.a * X ^ 3 + C P.b * X ^ 2 + C P.c * X + C P.d
def
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
toPoly
Convert a cubic polynomial to a polynomial.
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
C_mul_prod_X_sub_C_eq
null
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] /-! ### Coefficients -/
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
prod_X_sub_C_eq
null
private 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 [toPoly, coeff_add, coeff_C, coeff_C_mul_X, coeff_C_mul_X_pow] norm_num intro n hn repeat' rw [if_neg] any_goals cutsat repeat' rw [zero_add] @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
coeffs
null
coeff_eq_zero {n : ℕ} (hn : 3 < n) : P.toPoly.coeff n = 0 := coeffs.1 n hn @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
coeff_eq_zero
null
coeff_eq_a : P.toPoly.coeff 3 = P.a := coeffs.2.1 @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
coeff_eq_a
null
coeff_eq_b : P.toPoly.coeff 2 = P.b := coeffs.2.2.1 @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
coeff_eq_b
null
coeff_eq_c : P.toPoly.coeff 1 = P.c := coeffs.2.2.2.1 @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
coeff_eq_c
null
coeff_eq_d : P.toPoly.coeff 0 = P.d := coeffs.2.2.2.2
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
coeff_eq_d
null
a_of_eq (h : P.toPoly = Q.toPoly) : P.a = Q.a := by rw [← coeff_eq_a, h, coeff_eq_a]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
a_of_eq
null
b_of_eq (h : P.toPoly = Q.toPoly) : P.b = Q.b := by rw [← coeff_eq_b, h, coeff_eq_b]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
b_of_eq
null
c_of_eq (h : P.toPoly = Q.toPoly) : P.c = Q.c := by rw [← coeff_eq_c, h, coeff_eq_c]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
c_of_eq
null
d_of_eq (h : P.toPoly = Q.toPoly) : P.d = Q.d := by rw [← coeff_eq_d, h, coeff_eq_d]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
d_of_eq
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
toPoly_injective
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
of_a_eq_zero
null
of_a_eq_zero' : toPoly ⟨0, b, c, d⟩ = C b * X ^ 2 + C c * X + C d := of_a_eq_zero rfl
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
of_a_eq_zero'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
of_b_eq_zero
null
of_b_eq_zero' : toPoly ⟨0, 0, c, d⟩ = C c * X + C d := of_b_eq_zero rfl rfl
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
of_b_eq_zero'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
of_c_eq_zero
null
of_c_eq_zero' : toPoly ⟨0, 0, 0, d⟩ = C d := of_c_eq_zero rfl rfl rfl
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
of_c_eq_zero'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
of_d_eq_zero
null
of_d_eq_zero' : (⟨0, 0, 0, 0⟩ : Cubic R).toPoly = 0 := of_d_eq_zero rfl rfl rfl rfl
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
of_d_eq_zero'
null
zero : (0 : Cubic R).toPoly = 0 := of_d_eq_zero'
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
zero
null
toPoly_eq_zero_iff (P : Cubic R) : P.toPoly = 0 ↔ P = 0 := by rw [← zero, toPoly_injective]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
toPoly_eq_zero_iff
null
private 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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
ne_zero
null
ne_zero_of_a_ne_zero (ha : P.a ≠ 0) : P.toPoly ≠ 0 := (or_imp.mp ne_zero).1 ha
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
ne_zero_of_a_ne_zero
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
ne_zero_of_b_ne_zero
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
ne_zero_of_c_ne_zero
null
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 @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
ne_zero_of_d_ne_zero
null
leadingCoeff_of_a_ne_zero (ha : P.a ≠ 0) : P.toPoly.leadingCoeff = P.a := leadingCoeff_cubic ha
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
leadingCoeff_of_a_ne_zero
null
leadingCoeff_of_a_ne_zero' (ha : a ≠ 0) : (toPoly ⟨a, b, c, d⟩).leadingCoeff = a := by simp [ha] @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
leadingCoeff_of_a_ne_zero'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
leadingCoeff_of_b_ne_zero
null
leadingCoeff_of_b_ne_zero' (hb : b ≠ 0) : (toPoly ⟨0, b, c, d⟩).leadingCoeff = b := by simp [hb] @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
leadingCoeff_of_b_ne_zero'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
leadingCoeff_of_c_ne_zero
null
leadingCoeff_of_c_ne_zero' (hc : c ≠ 0) : (toPoly ⟨0, 0, c, d⟩).leadingCoeff = c := by simp [hc] @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
leadingCoeff_of_c_ne_zero'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
leadingCoeff_of_c_eq_zero
null
leadingCoeff_of_c_eq_zero' : (toPoly ⟨0, 0, 0, d⟩).leadingCoeff = d := leadingCoeff_of_c_eq_zero rfl rfl rfl
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
leadingCoeff_of_c_eq_zero'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
monic_of_a_eq_one
null
monic_of_a_eq_one' : (toPoly ⟨1, b, c, d⟩).Monic := monic_of_a_eq_one rfl
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
monic_of_a_eq_one'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
monic_of_b_eq_one
null
monic_of_b_eq_one' : (toPoly ⟨0, 1, c, d⟩).Monic := monic_of_b_eq_one rfl rfl
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
monic_of_b_eq_one'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
monic_of_c_eq_one
null
monic_of_c_eq_one' : (toPoly ⟨0, 0, 1, d⟩).Monic := monic_of_c_eq_one rfl rfl rfl
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
monic_of_c_eq_one'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
monic_of_d_eq_one
null
monic_of_d_eq_one' : (toPoly ⟨0, 0, 0, 1⟩).Monic := monic_of_d_eq_one rfl rfl rfl rfl
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
monic_of_d_eq_one'
null
@[simps] 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, (degree_le_iff_coeff_zero (f : R[X]) 3).mp f.2] simpa using hn @[simp]
def
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
equiv
The equivalence between cubic polynomials and polynomials of degree at most three.
degree_of_a_ne_zero (ha : P.a ≠ 0) : P.toPoly.degree = 3 := degree_cubic ha
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
degree_of_a_ne_zero
null
degree_of_a_ne_zero' (ha : a ≠ 0) : (toPoly ⟨a, b, c, d⟩).degree = 3 := by simp [ha]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
degree_of_a_ne_zero'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
degree_of_a_eq_zero
null
degree_of_a_eq_zero' : (toPoly ⟨0, b, c, d⟩).degree ≤ 2 := degree_of_a_eq_zero rfl @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
degree_of_a_eq_zero'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
degree_of_b_ne_zero
null
degree_of_b_ne_zero' (hb : b ≠ 0) : (toPoly ⟨0, b, c, d⟩).degree = 2 := by simp [hb]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
degree_of_b_ne_zero'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
degree_of_b_eq_zero
null
degree_of_b_eq_zero' : (toPoly ⟨0, 0, c, d⟩).degree ≤ 1 := degree_of_b_eq_zero rfl rfl @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
degree_of_b_eq_zero'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
degree_of_c_ne_zero
null
degree_of_c_ne_zero' (hc : c ≠ 0) : (toPoly ⟨0, 0, c, d⟩).degree = 1 := by simp [hc]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
degree_of_c_ne_zero'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
degree_of_c_eq_zero
null
degree_of_c_eq_zero' : (toPoly ⟨0, 0, 0, d⟩).degree ≤ 0 := degree_of_c_eq_zero rfl rfl rfl @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
degree_of_c_eq_zero'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
degree_of_d_ne_zero
null
degree_of_d_ne_zero' (hd : d ≠ 0) : (toPoly ⟨0, 0, 0, d⟩).degree = 0 := by simp [hd] @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
degree_of_d_ne_zero'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
degree_of_d_eq_zero
null
degree_of_d_eq_zero' : (⟨0, 0, 0, 0⟩ : Cubic R).toPoly.degree = ⊥ := degree_of_d_eq_zero rfl rfl rfl rfl @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
degree_of_d_eq_zero'
null
degree_of_zero : (0 : Cubic R).toPoly.degree = ⊥ := degree_of_d_eq_zero' @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
degree_of_zero
null
natDegree_of_a_ne_zero (ha : P.a ≠ 0) : P.toPoly.natDegree = 3 := natDegree_cubic ha
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
natDegree_of_a_ne_zero
null
natDegree_of_a_ne_zero' (ha : a ≠ 0) : (toPoly ⟨a, b, c, d⟩).natDegree = 3 := by simp [ha]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
natDegree_of_a_ne_zero'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
natDegree_of_a_eq_zero
null
natDegree_of_a_eq_zero' : (toPoly ⟨0, b, c, d⟩).natDegree ≤ 2 := natDegree_of_a_eq_zero rfl @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
natDegree_of_a_eq_zero'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
natDegree_of_b_ne_zero
null
natDegree_of_b_ne_zero' (hb : b ≠ 0) : (toPoly ⟨0, b, c, d⟩).natDegree = 2 := by simp [hb]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
natDegree_of_b_ne_zero'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
natDegree_of_b_eq_zero
null
natDegree_of_b_eq_zero' : (toPoly ⟨0, 0, c, d⟩).natDegree ≤ 1 := natDegree_of_b_eq_zero rfl rfl @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
natDegree_of_b_eq_zero'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
natDegree_of_c_ne_zero
null
natDegree_of_c_ne_zero' (hc : c ≠ 0) : (toPoly ⟨0, 0, c, d⟩).natDegree = 1 := by simp [hc] @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
natDegree_of_c_ne_zero'
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
natDegree_of_c_eq_zero
null
natDegree_of_c_eq_zero' : (toPoly ⟨0, 0, 0, d⟩).natDegree = 0 := natDegree_of_c_eq_zero rfl rfl rfl @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
natDegree_of_c_eq_zero'
null
natDegree_of_zero : (0 : Cubic R).toPoly.natDegree = 0 := natDegree_of_c_eq_zero'
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
natDegree_of_zero
null
map (φ : R →+* S) (P : Cubic R) : Cubic S := ⟨φ P.a, φ P.b, φ P.c, φ P.d⟩
def
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
map
Map a cubic polynomial across a semiring homomorphism.
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
map_toPoly
null
roots [IsDomain R] (P : Cubic R) : Multiset R := P.toPoly.roots
def
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
roots
The roots of a cubic polynomial.
map_roots [IsDomain S] : (map φ P).roots = (Polynomial.map φ P.toPoly).roots := by rw [roots, map_toPoly]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
map_roots
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
mem_roots_iff
null
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 · exact (card_roots' P.toPoly).trans (by rw [hP, natDegree_zero]; exact zero_le 3) · exact WithBot.coe_le_coe.1 ((card_roots hP).trans degree_cubic_le)
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
card_roots_le
null
splits_iff_card_roots (ha : P.a ≠ 0) : Splits φ P.toPoly ↔ Multiset.card (map φ P).roots = 3 := by replace ha : (map φ P).a ≠ 0 := (_root_.map_ne_zero φ).mpr ha nth_rw 1 [← RingHom.id_comp φ] rw [roots, ← splits_map_iff, ← 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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
splits_iff_card_roots
null
splits_iff_roots_eq_three (ha : P.a ≠ 0) : Splits φ P.toPoly ↔ ∃ x y z : K, (map φ P).roots = {x, y, z} := by rw [splits_iff_card_roots ha, card_eq_three]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
splits_iff_roots_eq_three
null
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, eq_prod_roots_of_splits <| (splits_iff_roots_eq_three ha).mpr <| Exists.intro x <| Exists.intro y <| Exists.intro z h3, 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_singleton, mul_assoc, mul_assoc]
theorem
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
eq_prod_three_roots
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
eq_sum_three_roots
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
b_eq_three_roots
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
c_eq_three_roots
null
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
Algebra
[ "Mathlib.Algebra.Polynomial.Splits", "Mathlib.Tactic.IntervalCases" ]
Mathlib/Algebra/CubicDiscriminant.lean
d_eq_three_roots
null
End of preview. Expand in Data Studio

Mathlib4

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

Schema

Column Type Description
fact string Full declaration body
type string theorem, lemma, def, class, structure, instance, inductive, abbrev, axiom
library string Top-level Mathlib module (Algebra, Analysis, Topology, etc.)
imports list Import statements from source file
filename string Source file path within Mathlib
symbolic_name string Declaration identifier
docstring string Documentation comment (30% coverage)

Statistics

By Type

Type Count Percentage
theorem 111,804 57%
lemma 36,970 19%
def 27,965 14%
instance 10,322 5%
abbrev 2,570 1%
class 1,710 1%
structure 1,387 1%
inductive 310 <1%

By Library (Top 10)

Library Count
Algebra 30,936
Analysis 20,343
Data 20,327
CategoryTheory 18,553
Topology 16,800
Order 13,686
RingTheory 12,566
LinearAlgebra 9,279
MeasureTheory 8,927
Combinatorics 4,949

Docstring Coverage

Type With Docstring
def 98%
class 98%
structure 93%
theorem 15%
lemma 14%

Use Cases

  • Retrieval / RAG for Lean 4 theorem proving
  • Mathematical content search and exploration
  • Training embeddings for formal mathematics
  • Documentation generation
  • Semantic search over mathematical definitions

Example Entry

Citation

If you use this dataset, please cite Mathlib:

Downloads last month
11

Collection including phanerozoic/Lean4-Mathlib