Skip to content

Commit

Permalink
feat(data/polynomial/ring_division,ring_theory/algebraic): Basic cons…
Browse files Browse the repository at this point in the history
…equences of `x ∈ p.root_set` (#15745)

This PR adds two basic consequences of `x ∈ p.root_set`: `p ≠ 0` and `is_algebraic x`.



Co-authored-by: tb65536 <tb65536@users.noreply.github.com>
  • Loading branch information
tb65536 and tb65536 committed Aug 10, 2022
1 parent 7c205ff commit 0fb4144
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/data/polynomial/ring_division.lean
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,12 @@ end
@[simp] lemma mem_roots (hp : p ≠ 0) : a ∈ p.roots ↔ is_root p a :=
by rw [← count_pos, count_roots p, root_multiplicity_pos hp]

lemma ne_zero_of_mem_roots (h : a ∈ p.roots) : p ≠ 0 :=
λ hp, by rwa [hp, roots_zero] at h

lemma is_root_of_mem_roots (h : a ∈ p.roots) : is_root p a :=
(mem_roots $ ne_zero_of_mem_roots h).mp h

theorem card_le_degree_of_subset_roots {p : R[X]} {Z : finset R} (h : Z.val ⊆ p.roots) :
Z.card ≤ p.nat_degree :=
(multiset.card_le_of_le (finset.val_le_iff_val_subset.2 h)).trans (polynomial.card_roots' p)
Expand Down Expand Up @@ -678,6 +684,14 @@ begin
exact hp (map_injective _ (no_zero_smul_divisors.algebra_map_injective T S) h)
end

lemma ne_zero_of_mem_root_set {p : T[X]} [comm_ring S] [is_domain S] [algebra T S] {a : S}
(h : a ∈ p.root_set S) : p ≠ 0 :=
λ hf, by rwa [hf, root_set_zero] at h

lemma aeval_eq_zero_of_mem_root_set {p : T[X]} [comm_ring S] [is_domain S] [algebra T S]
[no_zero_smul_divisors T S] {a : S} (hx : a ∈ p.root_set S) : aeval a p = 0 :=
(mem_root_set_iff (ne_zero_of_mem_root_set hx) a).mp hx

end roots

theorem is_unit_iff {f : R[X]} : is_unit f ↔ ∃ r : R, is_unit r ∧ C r = f :=
Expand Down
4 changes: 4 additions & 0 deletions src/ring_theory/algebraic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ lemma is_algebraic_rat (R : Type u) {A : Type v} [division_ring A] [field R] [ch
[algebra R A] (n : ℚ) : is_algebraic R (n : A) :=
by { rw ←map_rat_cast (algebra_map R A), exact is_algebraic_algebra_map n }

lemma is_algebraic_of_mem_root_set {R : Type u} {A : Type v} [field R] [field A] [algebra R A]
{p : R[X]} {x : A} (hx : x ∈ p.root_set A) : is_algebraic R x :=
⟨p, ne_zero_of_mem_root_set hx, aeval_eq_zero_of_mem_root_set hx⟩

open is_scalar_tower

lemma is_algebraic_algebra_map_of_is_algebraic {a : S} :
Expand Down

0 comments on commit 0fb4144

Please sign in to comment.