fact stringlengths 6 14.3k | statement stringlengths 1 2.88k | proof stringlengths 0 13.9k | type stringclasses 12
values | symbolic_name stringlengths 0 131 | library stringclasses 417
values | filename stringlengths 17 80 | imports listlengths 0 16 | deps listlengths 0 64 | docstring stringlengths 8 10.2k ⌀ | line_start int64 6 4.24k | line_end int64 7 4.25k | has_proof bool 2
classes | source_url stringclasses 1
value | commit stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
contravariant_swap_mul_lt_of_contravariant_mul_lt [comm_semigroup N] [has_lt N]
[contravariant_class N N (*) (<)] : contravariant_class N N (swap (*)) (<) :=
{ elim := (contravariant_flip_mul_iff N (<)).mpr contravariant_class.elim } | contravariant_swap_mul_lt_of_contravariant_mul_lt [comm_semigroup N] [has_lt N]
[contravariant_class N N (*) (<)] : contravariant_class N N (swap (*)) (<) | { elim := (contravariant_flip_mul_iff N (<)).mpr contravariant_class.elim } | instance | contravariant_swap_mul_lt_of_contravariant_mul_lt | algebra | src/algebra/covariant_and_contravariant.lean | [
"algebra.group.defs",
"order.basic",
"order.monotone.basic"
] | [
"comm_semigroup",
"contravariant_class",
"contravariant_flip_mul_iff"
] | null | 311 | 314 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
covariant_swap_mul_lt_of_covariant_mul_lt [comm_semigroup N] [has_lt N]
[covariant_class N N (*) (<)] : covariant_class N N (swap (*)) (<) :=
{ elim := (covariant_flip_mul_iff N (<)).mpr covariant_class.elim } | covariant_swap_mul_lt_of_covariant_mul_lt [comm_semigroup N] [has_lt N]
[covariant_class N N (*) (<)] : covariant_class N N (swap (*)) (<) | { elim := (covariant_flip_mul_iff N (<)).mpr covariant_class.elim } | instance | covariant_swap_mul_lt_of_covariant_mul_lt | algebra | src/algebra/covariant_and_contravariant.lean | [
"algebra.group.defs",
"order.basic",
"order.monotone.basic"
] | [
"comm_semigroup",
"covariant_class",
"covariant_flip_mul_iff"
] | null | 316 | 319 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
left_cancel_semigroup.covariant_mul_lt_of_covariant_mul_le
[left_cancel_semigroup N] [partial_order N] [covariant_class N N (*) (≤)] :
covariant_class N N (*) (<) :=
{ elim := λ a b c bc, by { cases lt_iff_le_and_ne.mp bc with bc cb,
exact lt_iff_le_and_ne.mpr ⟨covariant_class.elim a bc, (mul_ne_mul_right a).mp... | left_cancel_semigroup.covariant_mul_lt_of_covariant_mul_le
[left_cancel_semigroup N] [partial_order N] [covariant_class N N (*) (≤)] :
covariant_class N N (*) (<) | { elim := λ a b c bc, by { cases lt_iff_le_and_ne.mp bc with bc cb,
exact lt_iff_le_and_ne.mpr ⟨covariant_class.elim a bc, (mul_ne_mul_right a).mpr cb⟩ } } | instance | left_cancel_semigroup.covariant_mul_lt_of_covariant_mul_le | algebra | src/algebra/covariant_and_contravariant.lean | [
"algebra.group.defs",
"order.basic",
"order.monotone.basic"
] | [
"covariant_class",
"left_cancel_semigroup",
"mul_ne_mul_right"
] | null | 321 | 326 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
right_cancel_semigroup.covariant_swap_mul_lt_of_covariant_swap_mul_le
[right_cancel_semigroup N] [partial_order N] [covariant_class N N (swap (*)) (≤)] :
covariant_class N N (swap (*)) (<) :=
{ elim := λ a b c bc, by { cases lt_iff_le_and_ne.mp bc with bc cb,
exact lt_iff_le_and_ne.mpr ⟨covariant_class.elim a b... | right_cancel_semigroup.covariant_swap_mul_lt_of_covariant_swap_mul_le
[right_cancel_semigroup N] [partial_order N] [covariant_class N N (swap (*)) (≤)] :
covariant_class N N (swap (*)) (<) | { elim := λ a b c bc, by { cases lt_iff_le_and_ne.mp bc with bc cb,
exact lt_iff_le_and_ne.mpr ⟨covariant_class.elim a bc, (mul_ne_mul_left a).mpr cb⟩ } } | instance | right_cancel_semigroup.covariant_swap_mul_lt_of_covariant_swap_mul_le | algebra | src/algebra/covariant_and_contravariant.lean | [
"algebra.group.defs",
"order.basic",
"order.monotone.basic"
] | [
"covariant_class",
"mul_ne_mul_left",
"right_cancel_semigroup"
] | null | 328 | 333 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
left_cancel_semigroup.contravariant_mul_le_of_contravariant_mul_lt
[left_cancel_semigroup N] [partial_order N] [contravariant_class N N (*) (<)] :
contravariant_class N N (*) (≤) :=
{ elim := λ a b c bc, by { cases le_iff_eq_or_lt.mp bc with h h,
{ exact ((mul_right_inj a).mp h).le },
{ exact (contravariant... | left_cancel_semigroup.contravariant_mul_le_of_contravariant_mul_lt
[left_cancel_semigroup N] [partial_order N] [contravariant_class N N (*) (<)] :
contravariant_class N N (*) (≤) | { elim := λ a b c bc, by { cases le_iff_eq_or_lt.mp bc with h h,
{ exact ((mul_right_inj a).mp h).le },
{ exact (contravariant_class.elim _ h).le } } } | instance | left_cancel_semigroup.contravariant_mul_le_of_contravariant_mul_lt | algebra | src/algebra/covariant_and_contravariant.lean | [
"algebra.group.defs",
"order.basic",
"order.monotone.basic"
] | [
"contravariant_class",
"left_cancel_semigroup",
"mul_right_inj"
] | null | 335 | 341 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
right_cancel_semigroup.contravariant_swap_mul_le_of_contravariant_swap_mul_lt
[right_cancel_semigroup N] [partial_order N] [contravariant_class N N (swap (*)) (<)] :
contravariant_class N N (swap (*)) (≤) :=
{ elim := λ a b c bc, by { cases le_iff_eq_or_lt.mp bc with h h,
{ exact ((mul_left_inj a).mp h).le },
... | right_cancel_semigroup.contravariant_swap_mul_le_of_contravariant_swap_mul_lt
[right_cancel_semigroup N] [partial_order N] [contravariant_class N N (swap (*)) (<)] :
contravariant_class N N (swap (*)) (≤) | { elim := λ a b c bc, by { cases le_iff_eq_or_lt.mp bc with h h,
{ exact ((mul_left_inj a).mp h).le },
{ exact (contravariant_class.elim _ h).le } } } | instance | right_cancel_semigroup.contravariant_swap_mul_le_of_contravariant_swap_mul_lt | algebra | src/algebra/covariant_and_contravariant.lean | [
"algebra.group.defs",
"order.basic",
"order.monotone.basic"
] | [
"contravariant_class",
"mul_left_inj",
"right_cancel_semigroup"
] | null | 343 | 349 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
cubic (R : Type*) := (a b c d : R) | cubic (R : Type*) | (a b c d : R) | structure | cubic | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | The structure representing a cubic polynomial. | 40 | 40 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
[inhabited R] : inhabited (cubic R) := ⟨⟨default, default, default, default⟩⟩ | [inhabited R] : inhabited (cubic R) | ⟨⟨default, default, default, default⟩⟩ | instance | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"cubic"
] | null | 50 | 50 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
[has_zero R] : has_zero (cubic R) := ⟨⟨0, 0, 0, 0⟩⟩ | [has_zero R] : has_zero (cubic R) | ⟨⟨0, 0, 0, 0⟩⟩ | instance | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"cubic"
] | null | 52 | 52 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_poly (P : cubic R) : R[X] := C P.a * X ^ 3 + C P.b * X ^ 2 + C P.c * X + C P.d | to_poly (P : cubic R) : R[X] | C P.a * X ^ 3 + C P.b * X ^ 2 + C P.c * X + C P.d | def | cubic.to_poly | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"cubic"
] | Convert a cubic polynomial to a polynomial. | 59 | 59 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
C_mul_prod_X_sub_C_eq [comm_ring S] {w x y z : S} :
C w * (X - C x) * (X - C y) * (X - C z)
= to_poly ⟨w, w * -(x + y + z), w * (x * y + x * z + y * z), w * -(x * y * z)⟩ :=
by { simp only [to_poly, C_neg, C_add, C_mul], ring1 } | C_mul_prod_X_sub_C_eq [comm_ring S] {w x y z : S} :
C w * (X - C x) * (X - C y) * (X - C z)
= to_poly ⟨w, w * -(x + y + z), w * (x * y + x * z + y * z), w * -(x * y * z)⟩ | by { simp only [to_poly, C_neg, C_add, C_mul], ring1 } | theorem | cubic.C_mul_prod_X_sub_C_eq | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"comm_ring"
] | null | 61 | 64 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
prod_X_sub_C_eq [comm_ring S] {x y z : S} :
(X - C x) * (X - C y) * (X - C z)
= to_poly ⟨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 [comm_ring S] {x y z : S} :
(X - C x) * (X - C y) * (X - C z)
= to_poly ⟨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 | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"comm_ring",
"one_mul"
] | null | 66 | 69 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
coeffs :
(∀ n > 3, P.to_poly.coeff n = 0) ∧ P.to_poly.coeff 3 = P.a ∧ P.to_poly.coeff 2 = P.b
∧ P.to_poly.coeff 1 = P.c ∧ P.to_poly.coeff 0 = P.d :=
begin
simp only [to_poly, coeff_add, coeff_C, coeff_C_mul_X, coeff_C_mul_X_pow],
norm_num,
intros n hn,
repeat { rw [if_neg] },
any_goals { linarith only [... | coeffs :
(∀ n > 3, P.to_poly.coeff n = 0) ∧ P.to_poly.coeff 3 = P.a ∧ P.to_poly.coeff 2 = P.b
∧ P.to_poly.coeff 1 = P.c ∧ P.to_poly.coeff 0 = P.d | begin
simp only [to_poly, coeff_add, coeff_C, coeff_C_mul_X, coeff_C_mul_X_pow],
norm_num,
intros n hn,
repeat { rw [if_neg] },
any_goals { linarith only [hn] },
repeat { rw [zero_add] }
end | lemma | cubic.coeffs | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 75 | 85 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
coeff_eq_zero {n : ℕ} (hn : 3 < n) : P.to_poly.coeff n = 0 := coeffs.1 n hn | coeff_eq_zero {n : ℕ} (hn : 3 < n) : P.to_poly.coeff n = 0 | coeffs.1 n hn | lemma | cubic.coeff_eq_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 87 | 87 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
coeff_eq_a : P.to_poly.coeff 3 = P.a := coeffs.2.1 | coeff_eq_a : P.to_poly.coeff 3 = P.a | coeffs.2.1 | lemma | cubic.coeff_eq_a | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 89 | 89 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
coeff_eq_b : P.to_poly.coeff 2 = P.b := coeffs.2.2.1 | coeff_eq_b : P.to_poly.coeff 2 = P.b | coeffs.2.2.1 | lemma | cubic.coeff_eq_b | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 91 | 91 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
coeff_eq_c : P.to_poly.coeff 1 = P.c := coeffs.2.2.2.1 | coeff_eq_c : P.to_poly.coeff 1 = P.c | coeffs.2.2.2.1 | lemma | cubic.coeff_eq_c | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 93 | 93 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
coeff_eq_d : P.to_poly.coeff 0 = P.d := coeffs.2.2.2.2 | coeff_eq_d : P.to_poly.coeff 0 = P.d | coeffs.2.2.2.2 | lemma | cubic.coeff_eq_d | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 95 | 95 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
a_of_eq (h : P.to_poly = Q.to_poly) : P.a = Q.a := by rw [← coeff_eq_a, h, coeff_eq_a] | a_of_eq (h : P.to_poly = Q.to_poly) : P.a = Q.a | by rw [← coeff_eq_a, h, coeff_eq_a] | lemma | cubic.a_of_eq | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 97 | 97 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
b_of_eq (h : P.to_poly = Q.to_poly) : P.b = Q.b := by rw [← coeff_eq_b, h, coeff_eq_b] | b_of_eq (h : P.to_poly = Q.to_poly) : P.b = Q.b | by rw [← coeff_eq_b, h, coeff_eq_b] | lemma | cubic.b_of_eq | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 99 | 99 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
c_of_eq (h : P.to_poly = Q.to_poly) : P.c = Q.c := by rw [← coeff_eq_c, h, coeff_eq_c] | c_of_eq (h : P.to_poly = Q.to_poly) : P.c = Q.c | by rw [← coeff_eq_c, h, coeff_eq_c] | lemma | cubic.c_of_eq | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 101 | 101 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
d_of_eq (h : P.to_poly = Q.to_poly) : P.d = Q.d := by rw [← coeff_eq_d, h, coeff_eq_d] | d_of_eq (h : P.to_poly = Q.to_poly) : P.d = Q.d | by rw [← coeff_eq_d, h, coeff_eq_d] | lemma | cubic.d_of_eq | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 103 | 103 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
to_poly_injective (P Q : cubic R) : P.to_poly = Q.to_poly ↔ P = Q :=
⟨λ h, ext P Q (a_of_eq h) (b_of_eq h) (c_of_eq h) (d_of_eq h), congr_arg to_poly⟩ | to_poly_injective (P Q : cubic R) : P.to_poly = Q.to_poly ↔ P = Q | ⟨λ h, ext P Q (a_of_eq h) (b_of_eq h) (c_of_eq h) (d_of_eq h), congr_arg to_poly⟩ | lemma | cubic.to_poly_injective | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"cubic"
] | null | 105 | 106 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
of_a_eq_zero (ha : P.a = 0) : P.to_poly = C P.b * X ^ 2 + C P.c * X + C P.d :=
by rw [to_poly, ha, C_0, zero_mul, zero_add] | of_a_eq_zero (ha : P.a = 0) : P.to_poly = C P.b * X ^ 2 + C P.c * X + C P.d | by rw [to_poly, ha, C_0, zero_mul, zero_add] | lemma | cubic.of_a_eq_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"zero_mul"
] | null | 108 | 109 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
of_a_eq_zero' : to_poly ⟨0, b, c, d⟩ = C b * X ^ 2 + C c * X + C d := of_a_eq_zero rfl | of_a_eq_zero' : to_poly ⟨0, b, c, d⟩ = C b * X ^ 2 + C c * X + C d | of_a_eq_zero rfl | lemma | cubic.of_a_eq_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 111 | 111 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
of_b_eq_zero (ha : P.a = 0) (hb : P.b = 0) : P.to_poly = 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.to_poly = C P.c * X + C P.d | by rw [of_a_eq_zero ha, hb, C_0, zero_mul, zero_add] | lemma | cubic.of_b_eq_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"zero_mul"
] | null | 113 | 114 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
of_b_eq_zero' : to_poly ⟨0, 0, c, d⟩ = C c * X + C d := of_b_eq_zero rfl rfl | of_b_eq_zero' : to_poly ⟨0, 0, c, d⟩ = C c * X + C d | of_b_eq_zero rfl rfl | lemma | cubic.of_b_eq_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 116 | 116 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
of_c_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) : P.to_poly = 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.to_poly = C P.d | by rw [of_b_eq_zero ha hb, hc, C_0, zero_mul, zero_add] | lemma | cubic.of_c_eq_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"zero_mul"
] | null | 118 | 119 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
of_c_eq_zero' : to_poly ⟨0, 0, 0, d⟩ = C d := of_c_eq_zero rfl rfl rfl | of_c_eq_zero' : to_poly ⟨0, 0, 0, d⟩ = C d | of_c_eq_zero rfl rfl rfl | lemma | cubic.of_c_eq_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 121 | 121 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
of_d_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) (hd : P.d = 0) :
P.to_poly = 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.to_poly = 0 | by rw [of_c_eq_zero ha hb hc, hd, C_0] | lemma | cubic.of_d_eq_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 123 | 125 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
of_d_eq_zero' : (⟨0, 0, 0, 0⟩ : cubic R).to_poly = 0 := of_d_eq_zero rfl rfl rfl rfl | of_d_eq_zero' : (⟨0, 0, 0, 0⟩ : cubic R).to_poly = 0 | of_d_eq_zero rfl rfl rfl rfl | lemma | cubic.of_d_eq_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"cubic"
] | null | 127 | 127 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
zero : (0 : cubic R).to_poly = 0 := of_d_eq_zero' | zero : (0 : cubic R).to_poly = 0 | of_d_eq_zero' | lemma | cubic.zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"cubic"
] | null | 129 | 129 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
to_poly_eq_zero_iff (P : cubic R) : P.to_poly = 0 ↔ P = 0 :=
by rw [← zero, to_poly_injective] | to_poly_eq_zero_iff (P : cubic R) : P.to_poly = 0 ↔ P = 0 | by rw [← zero, to_poly_injective] | lemma | cubic.to_poly_eq_zero_iff | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"cubic"
] | null | 131 | 132 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
ne_zero (h0 : P.a ≠ 0 ∨ P.b ≠ 0 ∨ P.c ≠ 0 ∨ P.d ≠ 0) : P.to_poly ≠ 0 :=
by { contrapose! h0, rw [(to_poly_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.to_poly ≠ 0 | by { contrapose! h0, rw [(to_poly_eq_zero_iff P).mp h0], exact ⟨rfl, rfl, rfl, rfl⟩ } | lemma | cubic.ne_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"ne_zero"
] | null | 134 | 135 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
ne_zero_of_a_ne_zero (ha : P.a ≠ 0) : P.to_poly ≠ 0 := (or_imp_distrib.mp ne_zero).1 ha | ne_zero_of_a_ne_zero (ha : P.a ≠ 0) : P.to_poly ≠ 0 | (or_imp_distrib.mp ne_zero).1 ha | lemma | cubic.ne_zero_of_a_ne_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"ne_zero"
] | null | 137 | 137 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
ne_zero_of_b_ne_zero (hb : P.b ≠ 0) : P.to_poly ≠ 0 :=
(or_imp_distrib.mp (or_imp_distrib.mp ne_zero).2).1 hb | ne_zero_of_b_ne_zero (hb : P.b ≠ 0) : P.to_poly ≠ 0 | (or_imp_distrib.mp (or_imp_distrib.mp ne_zero).2).1 hb | lemma | cubic.ne_zero_of_b_ne_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"ne_zero"
] | null | 139 | 140 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
ne_zero_of_c_ne_zero (hc : P.c ≠ 0) : P.to_poly ≠ 0 :=
(or_imp_distrib.mp (or_imp_distrib.mp (or_imp_distrib.mp ne_zero).2).2).1 hc | ne_zero_of_c_ne_zero (hc : P.c ≠ 0) : P.to_poly ≠ 0 | (or_imp_distrib.mp (or_imp_distrib.mp (or_imp_distrib.mp ne_zero).2).2).1 hc | lemma | cubic.ne_zero_of_c_ne_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"ne_zero"
] | null | 142 | 143 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
ne_zero_of_d_ne_zero (hd : P.d ≠ 0) : P.to_poly ≠ 0 :=
(or_imp_distrib.mp (or_imp_distrib.mp (or_imp_distrib.mp ne_zero).2).2).2 hd | ne_zero_of_d_ne_zero (hd : P.d ≠ 0) : P.to_poly ≠ 0 | (or_imp_distrib.mp (or_imp_distrib.mp (or_imp_distrib.mp ne_zero).2).2).2 hd | lemma | cubic.ne_zero_of_d_ne_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"ne_zero"
] | null | 145 | 146 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
leading_coeff_of_a_ne_zero (ha : P.a ≠ 0) : P.to_poly.leading_coeff = P.a :=
leading_coeff_cubic ha | leading_coeff_of_a_ne_zero (ha : P.a ≠ 0) : P.to_poly.leading_coeff = P.a | leading_coeff_cubic ha | lemma | cubic.leading_coeff_of_a_ne_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 148 | 149 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
leading_coeff_of_a_ne_zero' (ha : a ≠ 0) : (to_poly ⟨a, b, c, d⟩).leading_coeff = a :=
leading_coeff_of_a_ne_zero ha | leading_coeff_of_a_ne_zero' (ha : a ≠ 0) : (to_poly ⟨a, b, c, d⟩).leading_coeff = a | leading_coeff_of_a_ne_zero ha | lemma | cubic.leading_coeff_of_a_ne_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 151 | 152 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
leading_coeff_of_b_ne_zero (ha : P.a = 0) (hb : P.b ≠ 0) :
P.to_poly.leading_coeff = P.b :=
by rw [of_a_eq_zero ha, leading_coeff_quadratic hb] | leading_coeff_of_b_ne_zero (ha : P.a = 0) (hb : P.b ≠ 0) :
P.to_poly.leading_coeff = P.b | by rw [of_a_eq_zero ha, leading_coeff_quadratic hb] | lemma | cubic.leading_coeff_of_b_ne_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 154 | 156 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
leading_coeff_of_b_ne_zero' (hb : b ≠ 0) : (to_poly ⟨0, b, c, d⟩).leading_coeff = b :=
leading_coeff_of_b_ne_zero rfl hb | leading_coeff_of_b_ne_zero' (hb : b ≠ 0) : (to_poly ⟨0, b, c, d⟩).leading_coeff = b | leading_coeff_of_b_ne_zero rfl hb | lemma | cubic.leading_coeff_of_b_ne_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 158 | 159 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
leading_coeff_of_c_ne_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c ≠ 0) :
P.to_poly.leading_coeff = P.c :=
by rw [of_b_eq_zero ha hb, leading_coeff_linear hc] | leading_coeff_of_c_ne_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c ≠ 0) :
P.to_poly.leading_coeff = P.c | by rw [of_b_eq_zero ha hb, leading_coeff_linear hc] | lemma | cubic.leading_coeff_of_c_ne_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 161 | 163 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
leading_coeff_of_c_ne_zero' (hc : c ≠ 0) : (to_poly ⟨0, 0, c, d⟩).leading_coeff = c :=
leading_coeff_of_c_ne_zero rfl rfl hc | leading_coeff_of_c_ne_zero' (hc : c ≠ 0) : (to_poly ⟨0, 0, c, d⟩).leading_coeff = c | leading_coeff_of_c_ne_zero rfl rfl hc | lemma | cubic.leading_coeff_of_c_ne_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 165 | 166 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
leading_coeff_of_c_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) :
P.to_poly.leading_coeff = P.d :=
by rw [of_c_eq_zero ha hb hc, leading_coeff_C] | leading_coeff_of_c_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) :
P.to_poly.leading_coeff = P.d | by rw [of_c_eq_zero ha hb hc, leading_coeff_C] | lemma | cubic.leading_coeff_of_c_eq_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 168 | 170 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
leading_coeff_of_c_eq_zero' : (to_poly ⟨0, 0, 0, d⟩).leading_coeff = d :=
leading_coeff_of_c_eq_zero rfl rfl rfl | leading_coeff_of_c_eq_zero' : (to_poly ⟨0, 0, 0, d⟩).leading_coeff = d | leading_coeff_of_c_eq_zero rfl rfl rfl | lemma | cubic.leading_coeff_of_c_eq_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 172 | 173 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
monic_of_a_eq_one (ha : P.a = 1) : P.to_poly.monic :=
begin
nontriviality,
rw [monic, leading_coeff_of_a_ne_zero $ by { rw [ha], exact one_ne_zero }, ha]
end | monic_of_a_eq_one (ha : P.a = 1) : P.to_poly.monic | begin
nontriviality,
rw [monic, leading_coeff_of_a_ne_zero $ by { rw [ha], exact one_ne_zero }, ha]
end | lemma | cubic.monic_of_a_eq_one | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"one_ne_zero"
] | null | 175 | 179 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
monic_of_a_eq_one' : (to_poly ⟨1, b, c, d⟩).monic := monic_of_a_eq_one rfl | monic_of_a_eq_one' : (to_poly ⟨1, b, c, d⟩).monic | monic_of_a_eq_one rfl | lemma | cubic.monic_of_a_eq_one' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 181 | 181 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
monic_of_b_eq_one (ha : P.a = 0) (hb : P.b = 1) : P.to_poly.monic :=
begin
nontriviality,
rw [monic, leading_coeff_of_b_ne_zero ha $ by { rw [hb], exact one_ne_zero }, hb]
end | monic_of_b_eq_one (ha : P.a = 0) (hb : P.b = 1) : P.to_poly.monic | begin
nontriviality,
rw [monic, leading_coeff_of_b_ne_zero ha $ by { rw [hb], exact one_ne_zero }, hb]
end | lemma | cubic.monic_of_b_eq_one | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"one_ne_zero"
] | null | 183 | 187 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
monic_of_b_eq_one' : (to_poly ⟨0, 1, c, d⟩).monic := monic_of_b_eq_one rfl rfl | monic_of_b_eq_one' : (to_poly ⟨0, 1, c, d⟩).monic | monic_of_b_eq_one rfl rfl | lemma | cubic.monic_of_b_eq_one' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 189 | 189 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
monic_of_c_eq_one (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 1) : P.to_poly.monic :=
begin
nontriviality,
rw [monic, leading_coeff_of_c_ne_zero ha hb $ by { rw [hc], exact one_ne_zero }, hc]
end | monic_of_c_eq_one (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 1) : P.to_poly.monic | begin
nontriviality,
rw [monic, leading_coeff_of_c_ne_zero ha hb $ by { rw [hc], exact one_ne_zero }, hc]
end | lemma | cubic.monic_of_c_eq_one | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"one_ne_zero"
] | null | 191 | 195 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
monic_of_c_eq_one' : (to_poly ⟨0, 0, 1, d⟩).monic := monic_of_c_eq_one rfl rfl rfl | monic_of_c_eq_one' : (to_poly ⟨0, 0, 1, d⟩).monic | monic_of_c_eq_one rfl rfl rfl | lemma | cubic.monic_of_c_eq_one' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 197 | 197 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
monic_of_d_eq_one (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) (hd : P.d = 1) :
P.to_poly.monic :=
by rw [monic, leading_coeff_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.to_poly.monic | by rw [monic, leading_coeff_of_c_eq_zero ha hb hc, hd] | lemma | cubic.monic_of_d_eq_one | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 199 | 201 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
monic_of_d_eq_one' : (to_poly ⟨0, 0, 0, 1⟩).monic := monic_of_d_eq_one rfl rfl rfl rfl | monic_of_d_eq_one' : (to_poly ⟨0, 0, 0, 1⟩).monic | monic_of_d_eq_one rfl rfl rfl rfl | lemma | cubic.monic_of_d_eq_one' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 203 | 203 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
equiv : cubic R ≃ {p : R[X] // p.degree ≤ 3} :=
{ to_fun := λ P, ⟨P.to_poly, degree_cubic_le⟩,
inv_fun := λ f, ⟨coeff f 3, coeff f 2, coeff f 1, coeff f 0⟩,
left_inv := λ P, by ext; simp only [subtype.coe_mk, coeffs],
right_inv := λ f,
begin
ext (_ | _ | _ | _ | n); simp only [subtype.coe_mk, coeffs],... | equiv : cubic R ≃ {p : R[X] // p.degree ≤ 3} | { to_fun := λ P, ⟨P.to_poly, degree_cubic_le⟩,
inv_fun := λ f, ⟨coeff f 3, coeff f 2, coeff f 1, coeff f 0⟩,
left_inv := λ P, by ext; simp only [subtype.coe_mk, coeffs],
right_inv := λ f,
begin
ext (_ | _ | _ | _ | n); simp only [subtype.coe_mk, coeffs],
have h3 : 3 < n + 4 := by linarith only,
... | def | cubic.equiv | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"cubic",
"equiv",
"inv_fun",
"subtype.coe_mk"
] | The equivalence between cubic polynomials and polynomials of degree at most three. | 212 | 222 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
degree_of_a_ne_zero (ha : P.a ≠ 0) : P.to_poly.degree = 3 := degree_cubic ha | degree_of_a_ne_zero (ha : P.a ≠ 0) : P.to_poly.degree = 3 | degree_cubic ha | lemma | cubic.degree_of_a_ne_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 224 | 224 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
degree_of_a_ne_zero' (ha : a ≠ 0) : (to_poly ⟨a, b, c, d⟩).degree = 3 :=
degree_of_a_ne_zero ha | degree_of_a_ne_zero' (ha : a ≠ 0) : (to_poly ⟨a, b, c, d⟩).degree = 3 | degree_of_a_ne_zero ha | lemma | cubic.degree_of_a_ne_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 226 | 227 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
degree_of_a_eq_zero (ha : P.a = 0) : P.to_poly.degree ≤ 2 :=
by simpa only [of_a_eq_zero ha] using degree_quadratic_le | degree_of_a_eq_zero (ha : P.a = 0) : P.to_poly.degree ≤ 2 | by simpa only [of_a_eq_zero ha] using degree_quadratic_le | lemma | cubic.degree_of_a_eq_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 229 | 230 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
degree_of_a_eq_zero' : (to_poly ⟨0, b, c, d⟩).degree ≤ 2 := degree_of_a_eq_zero rfl | degree_of_a_eq_zero' : (to_poly ⟨0, b, c, d⟩).degree ≤ 2 | degree_of_a_eq_zero rfl | lemma | cubic.degree_of_a_eq_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 232 | 232 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
degree_of_b_ne_zero (ha : P.a = 0) (hb : P.b ≠ 0) : P.to_poly.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.to_poly.degree = 2 | by rw [of_a_eq_zero ha, degree_quadratic hb] | lemma | cubic.degree_of_b_ne_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 234 | 235 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
degree_of_b_ne_zero' (hb : b ≠ 0) : (to_poly ⟨0, b, c, d⟩).degree = 2 :=
degree_of_b_ne_zero rfl hb | degree_of_b_ne_zero' (hb : b ≠ 0) : (to_poly ⟨0, b, c, d⟩).degree = 2 | degree_of_b_ne_zero rfl hb | lemma | cubic.degree_of_b_ne_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 237 | 238 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
degree_of_b_eq_zero (ha : P.a = 0) (hb : P.b = 0) : P.to_poly.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.to_poly.degree ≤ 1 | by simpa only [of_b_eq_zero ha hb] using degree_linear_le | lemma | cubic.degree_of_b_eq_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 240 | 241 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
degree_of_b_eq_zero' : (to_poly ⟨0, 0, c, d⟩).degree ≤ 1 := degree_of_b_eq_zero rfl rfl | degree_of_b_eq_zero' : (to_poly ⟨0, 0, c, d⟩).degree ≤ 1 | degree_of_b_eq_zero rfl rfl | lemma | cubic.degree_of_b_eq_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 243 | 243 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
degree_of_c_ne_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c ≠ 0) :
P.to_poly.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.to_poly.degree = 1 | by rw [of_b_eq_zero ha hb, degree_linear hc] | lemma | cubic.degree_of_c_ne_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 245 | 247 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
degree_of_c_ne_zero' (hc : c ≠ 0) : (to_poly ⟨0, 0, c, d⟩).degree = 1 :=
degree_of_c_ne_zero rfl rfl hc | degree_of_c_ne_zero' (hc : c ≠ 0) : (to_poly ⟨0, 0, c, d⟩).degree = 1 | degree_of_c_ne_zero rfl rfl hc | lemma | cubic.degree_of_c_ne_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 249 | 250 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
degree_of_c_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) : P.to_poly.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.to_poly.degree ≤ 0 | by simpa only [of_c_eq_zero ha hb hc] using degree_C_le | lemma | cubic.degree_of_c_eq_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 252 | 253 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
degree_of_c_eq_zero' : (to_poly ⟨0, 0, 0, d⟩).degree ≤ 0 := degree_of_c_eq_zero rfl rfl rfl | degree_of_c_eq_zero' : (to_poly ⟨0, 0, 0, d⟩).degree ≤ 0 | degree_of_c_eq_zero rfl rfl rfl | lemma | cubic.degree_of_c_eq_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 255 | 255 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
degree_of_d_ne_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) (hd : P.d ≠ 0) :
P.to_poly.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.to_poly.degree = 0 | by rw [of_c_eq_zero ha hb hc, degree_C hd] | lemma | cubic.degree_of_d_ne_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 257 | 259 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
degree_of_d_ne_zero' (hd : d ≠ 0) : (to_poly ⟨0, 0, 0, d⟩).degree = 0 :=
degree_of_d_ne_zero rfl rfl rfl hd | degree_of_d_ne_zero' (hd : d ≠ 0) : (to_poly ⟨0, 0, 0, d⟩).degree = 0 | degree_of_d_ne_zero rfl rfl rfl hd | lemma | cubic.degree_of_d_ne_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 261 | 262 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
degree_of_d_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) (hd : P.d = 0) :
P.to_poly.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.to_poly.degree = ⊥ | by rw [of_d_eq_zero ha hb hc hd, degree_zero] | lemma | cubic.degree_of_d_eq_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 264 | 266 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
degree_of_d_eq_zero' : (⟨0, 0, 0, 0⟩ : cubic R).to_poly.degree = ⊥ :=
degree_of_d_eq_zero rfl rfl rfl rfl | degree_of_d_eq_zero' : (⟨0, 0, 0, 0⟩ : cubic R).to_poly.degree = ⊥ | degree_of_d_eq_zero rfl rfl rfl rfl | lemma | cubic.degree_of_d_eq_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"cubic"
] | null | 268 | 269 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
degree_of_zero : (0 : cubic R).to_poly.degree = ⊥ := degree_of_d_eq_zero' | degree_of_zero : (0 : cubic R).to_poly.degree = ⊥ | degree_of_d_eq_zero' | lemma | cubic.degree_of_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"cubic"
] | null | 271 | 271 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nat_degree_of_a_ne_zero (ha : P.a ≠ 0) : P.to_poly.nat_degree = 3 :=
nat_degree_cubic ha | nat_degree_of_a_ne_zero (ha : P.a ≠ 0) : P.to_poly.nat_degree = 3 | nat_degree_cubic ha | lemma | cubic.nat_degree_of_a_ne_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 273 | 274 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nat_degree_of_a_ne_zero' (ha : a ≠ 0) : (to_poly ⟨a, b, c, d⟩).nat_degree = 3 :=
nat_degree_of_a_ne_zero ha | nat_degree_of_a_ne_zero' (ha : a ≠ 0) : (to_poly ⟨a, b, c, d⟩).nat_degree = 3 | nat_degree_of_a_ne_zero ha | lemma | cubic.nat_degree_of_a_ne_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 276 | 277 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nat_degree_of_a_eq_zero (ha : P.a = 0) : P.to_poly.nat_degree ≤ 2 :=
by simpa only [of_a_eq_zero ha] using nat_degree_quadratic_le | nat_degree_of_a_eq_zero (ha : P.a = 0) : P.to_poly.nat_degree ≤ 2 | by simpa only [of_a_eq_zero ha] using nat_degree_quadratic_le | lemma | cubic.nat_degree_of_a_eq_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 279 | 280 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nat_degree_of_a_eq_zero' : (to_poly ⟨0, b, c, d⟩).nat_degree ≤ 2 :=
nat_degree_of_a_eq_zero rfl | nat_degree_of_a_eq_zero' : (to_poly ⟨0, b, c, d⟩).nat_degree ≤ 2 | nat_degree_of_a_eq_zero rfl | lemma | cubic.nat_degree_of_a_eq_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 282 | 283 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nat_degree_of_b_ne_zero (ha : P.a = 0) (hb : P.b ≠ 0) : P.to_poly.nat_degree = 2 :=
by rw [of_a_eq_zero ha, nat_degree_quadratic hb] | nat_degree_of_b_ne_zero (ha : P.a = 0) (hb : P.b ≠ 0) : P.to_poly.nat_degree = 2 | by rw [of_a_eq_zero ha, nat_degree_quadratic hb] | lemma | cubic.nat_degree_of_b_ne_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 285 | 286 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nat_degree_of_b_ne_zero' (hb : b ≠ 0) : (to_poly ⟨0, b, c, d⟩).nat_degree = 2 :=
nat_degree_of_b_ne_zero rfl hb | nat_degree_of_b_ne_zero' (hb : b ≠ 0) : (to_poly ⟨0, b, c, d⟩).nat_degree = 2 | nat_degree_of_b_ne_zero rfl hb | lemma | cubic.nat_degree_of_b_ne_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 288 | 289 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nat_degree_of_b_eq_zero (ha : P.a = 0) (hb : P.b = 0) : P.to_poly.nat_degree ≤ 1 :=
by simpa only [of_b_eq_zero ha hb] using nat_degree_linear_le | nat_degree_of_b_eq_zero (ha : P.a = 0) (hb : P.b = 0) : P.to_poly.nat_degree ≤ 1 | by simpa only [of_b_eq_zero ha hb] using nat_degree_linear_le | lemma | cubic.nat_degree_of_b_eq_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 291 | 292 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nat_degree_of_b_eq_zero' : (to_poly ⟨0, 0, c, d⟩).nat_degree ≤ 1 :=
nat_degree_of_b_eq_zero rfl rfl | nat_degree_of_b_eq_zero' : (to_poly ⟨0, 0, c, d⟩).nat_degree ≤ 1 | nat_degree_of_b_eq_zero rfl rfl | lemma | cubic.nat_degree_of_b_eq_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 294 | 295 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nat_degree_of_c_ne_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c ≠ 0) :
P.to_poly.nat_degree = 1 :=
by rw [of_b_eq_zero ha hb, nat_degree_linear hc] | nat_degree_of_c_ne_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c ≠ 0) :
P.to_poly.nat_degree = 1 | by rw [of_b_eq_zero ha hb, nat_degree_linear hc] | lemma | cubic.nat_degree_of_c_ne_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 297 | 299 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nat_degree_of_c_ne_zero' (hc : c ≠ 0) : (to_poly ⟨0, 0, c, d⟩).nat_degree = 1 :=
nat_degree_of_c_ne_zero rfl rfl hc | nat_degree_of_c_ne_zero' (hc : c ≠ 0) : (to_poly ⟨0, 0, c, d⟩).nat_degree = 1 | nat_degree_of_c_ne_zero rfl rfl hc | lemma | cubic.nat_degree_of_c_ne_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 301 | 302 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nat_degree_of_c_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) :
P.to_poly.nat_degree = 0 :=
by rw [of_c_eq_zero ha hb hc, nat_degree_C] | nat_degree_of_c_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) :
P.to_poly.nat_degree = 0 | by rw [of_c_eq_zero ha hb hc, nat_degree_C] | lemma | cubic.nat_degree_of_c_eq_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 304 | 306 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nat_degree_of_c_eq_zero' : (to_poly ⟨0, 0, 0, d⟩).nat_degree = 0 :=
nat_degree_of_c_eq_zero rfl rfl rfl | nat_degree_of_c_eq_zero' : (to_poly ⟨0, 0, 0, d⟩).nat_degree = 0 | nat_degree_of_c_eq_zero rfl rfl rfl | lemma | cubic.nat_degree_of_c_eq_zero' | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 308 | 309 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nat_degree_of_zero : (0 : cubic R).to_poly.nat_degree = 0 := nat_degree_of_c_eq_zero' | nat_degree_of_zero : (0 : cubic R).to_poly.nat_degree = 0 | nat_degree_of_c_eq_zero' | lemma | cubic.nat_degree_of_zero | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"cubic"
] | null | 311 | 311 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
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 | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"cubic"
] | Map a cubic polynomial across a semiring homomorphism. | 322 | 322 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
map_to_poly : (map φ P).to_poly = polynomial.map φ P.to_poly :=
by simp only [map, to_poly, map_C, map_X, polynomial.map_add, polynomial.map_mul,
polynomial.map_pow] | map_to_poly : (map φ P).to_poly = polynomial.map φ P.to_poly | by simp only [map, to_poly, map_C, map_X, polynomial.map_add, polynomial.map_mul,
polynomial.map_pow] | lemma | cubic.map_to_poly | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"polynomial.map",
"polynomial.map_add",
"polynomial.map_mul",
"polynomial.map_pow"
] | null | 324 | 326 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
roots [is_domain R] (P : cubic R) : multiset R := P.to_poly.roots | roots [is_domain R] (P : cubic R) : multiset R | P.to_poly.roots | def | cubic.roots | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"cubic",
"is_domain",
"multiset"
] | The roots of a cubic polynomial. | 343 | 343 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
map_roots [is_domain S] : (map φ P).roots = (polynomial.map φ P.to_poly).roots :=
by rw [roots, map_to_poly] | map_roots [is_domain S] : (map φ P).roots = (polynomial.map φ P.to_poly).roots | by rw [roots, map_to_poly] | lemma | cubic.map_roots | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"is_domain",
"polynomial.map"
] | null | 345 | 346 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
mem_roots_iff [is_domain R] (h0 : P.to_poly ≠ 0) (x : R) :
x ∈ P.roots ↔ P.a * x ^ 3 + P.b * x ^ 2 + P.c * x + P.d = 0 :=
begin
rw [roots, mem_roots h0, is_root, to_poly],
simp only [eval_C, eval_X, eval_add, eval_mul, eval_pow]
end | mem_roots_iff [is_domain R] (h0 : P.to_poly ≠ 0) (x : R) :
x ∈ P.roots ↔ P.a * x ^ 3 + P.b * x ^ 2 + P.c * x + P.d = 0 | begin
rw [roots, mem_roots h0, is_root, to_poly],
simp only [eval_C, eval_X, eval_add, eval_mul, eval_pow]
end | theorem | cubic.mem_roots_iff | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"is_domain"
] | null | 348 | 353 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
card_roots_le [is_domain R] [decidable_eq R] : P.roots.to_finset.card ≤ 3 :=
begin
apply (to_finset_card_le P.to_poly.roots).trans,
by_cases hP : P.to_poly = 0,
{ exact (card_roots' P.to_poly).trans (by { rw [hP, nat_degree_zero], exact zero_le 3 }) },
{ exact with_bot.coe_le_coe.1 ((card_roots hP).trans degree... | card_roots_le [is_domain R] [decidable_eq R] : P.roots.to_finset.card ≤ 3 | begin
apply (to_finset_card_le P.to_poly.roots).trans,
by_cases hP : P.to_poly = 0,
{ exact (card_roots' P.to_poly).trans (by { rw [hP, nat_degree_zero], exact zero_le 3 }) },
{ exact with_bot.coe_le_coe.1 ((card_roots hP).trans degree_cubic_le) }
end | theorem | cubic.card_roots_le | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"is_domain"
] | null | 355 | 361 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
splits_iff_card_roots (ha : P.a ≠ 0) : splits φ P.to_poly ↔ (map φ P).roots.card = 3 :=
begin
replace ha : (map φ P).a ≠ 0 := (_root_.map_ne_zero φ).mpr ha,
nth_rewrite_lhs 0 [← ring_hom.id_comp φ],
rw [roots, ← splits_map_iff, ← map_to_poly, splits_iff_card_roots,
← ((degree_eq_iff_nat_degree_eq $ ne_zero_... | splits_iff_card_roots (ha : P.a ≠ 0) : splits φ P.to_poly ↔ (map φ P).roots.card = 3 | begin
replace ha : (map φ P).a ≠ 0 := (_root_.map_ne_zero φ).mpr ha,
nth_rewrite_lhs 0 [← ring_hom.id_comp φ],
rw [roots, ← splits_map_iff, ← map_to_poly, splits_iff_card_roots,
← ((degree_eq_iff_nat_degree_eq $ ne_zero_of_a_ne_zero ha).mp $
degree_of_a_ne_zero ha : _ = 3)]
end | theorem | cubic.splits_iff_card_roots | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"ring_hom.id_comp"
] | null | 371 | 378 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
splits_iff_roots_eq_three (ha : P.a ≠ 0) :
splits φ P.to_poly ↔ ∃ 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.to_poly ↔ ∃ 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 | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 380 | 382 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
eq_prod_three_roots (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) :
(map φ P).to_poly = C (φ P.a) * (X - C x) * (X - C y) * (X - C z) :=
begin
rw [map_to_poly, eq_prod_roots_of_splits $ (splits_iff_roots_eq_three ha).mpr $ exists.intro x $
exists.intro y $ exists.intro z h3, leading_coeff_of_a_ne_zero h... | eq_prod_three_roots (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) :
(map φ P).to_poly = C (φ P.a) * (X - C x) * (X - C y) * (X - C z) | begin
rw [map_to_poly, eq_prod_roots_of_splits $ (splits_iff_roots_eq_three ha).mpr $ exists.intro x $
exists.intro y $ exists.intro z h3, leading_coeff_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_ass... | theorem | cubic.eq_prod_three_roots | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"mul_assoc"
] | null | 384 | 391 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
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)⟩ :=
begin
apply_fun to_poly,
any_goals { exact λ P Q, (to_poly_injective P Q).mp },
rw [eq_prod_three_roots ha h3, C_mul_prod_X_sub_C_eq]
end | 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)⟩ | begin
apply_fun to_poly,
any_goals { exact λ P Q, (to_poly_injective P Q).mp },
rw [eq_prod_three_roots ha h3, C_mul_prod_X_sub_C_eq]
end | theorem | cubic.eq_sum_three_roots | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 393 | 399 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
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 | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 401 | 403 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
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 | 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 | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 405 | 407 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
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 | 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 | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [] | null | 409 | 411 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
disc {R : Type*} [ring R] (P : cubic R) : R :=
P.b ^ 2 * P.c ^ 2 - 4 * P.a * P.c ^ 3 - 4 * P.b ^ 3 * P.d - 27 * P.a ^ 2 * P.d ^ 2
+ 18 * P.a * P.b * P.c * P.d | disc {R : Type*} [ring R] (P : cubic R) : R | P.b ^ 2 * P.c ^ 2 - 4 * P.a * P.c ^ 3 - 4 * P.b ^ 3 * P.d - 27 * P.a ^ 2 * P.d ^ 2
+ 18 * P.a * P.b * P.c * P.d | def | cubic.disc | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"cubic",
"ring"
] | The discriminant of a cubic polynomial. | 420 | 422 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
disc_eq_prod_three_roots (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) :
φ P.disc = (φ P.a * φ P.a * (x - y) * (x - z) * (y - z)) ^ 2 :=
begin
simp only [disc, ring_hom.map_add, ring_hom.map_sub, ring_hom.map_mul, map_pow],
simp only [ring_hom.map_one, map_bit0, map_bit1],
rw [b_eq_three_roots ha h3, c_eq_t... | disc_eq_prod_three_roots (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) :
φ P.disc = (φ P.a * φ P.a * (x - y) * (x - z) * (y - z)) ^ 2 | begin
simp only [disc, ring_hom.map_add, ring_hom.map_sub, ring_hom.map_mul, map_pow],
simp only [ring_hom.map_one, map_bit0, map_bit1],
rw [b_eq_three_roots ha h3, c_eq_three_roots ha h3, d_eq_three_roots ha h3],
ring1
end | theorem | cubic.disc_eq_prod_three_roots | algebra | src/algebra/cubic_discriminant.lean | [
"data.polynomial.splits"
] | [
"map_bit0",
"map_bit1",
"map_pow",
"ring_hom.map_add",
"ring_hom.map_mul",
"ring_hom.map_one",
"ring_hom.map_sub"
] | null | 424 | 431 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.