Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
feat(ring_theory/ideal/basic): add ideal.span_pair lemmas (#18036)
Browse files Browse the repository at this point in the history
  • Loading branch information
Multramate committed Jan 2, 2023
1 parent 1e05171 commit 5456d48
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/ring_theory/ideal/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,26 @@ begin
exact hmax M (lt_of_lt_of_le hPJ hM2) hM1,
end

lemma span_pair_comm {x y : α} : (span {x, y} : ideal α) = span {y, x} :=
by simp only [span_insert, sup_comm]

theorem mem_span_pair {x y z : α} :
z ∈ span ({x, y} : set α) ↔ ∃ a b, a * x + b * y = z :=
by simp [mem_span_insert, mem_span_singleton', @eq_comm _ _ z]

@[simp] lemma span_pair_add_mul_left {R : Type u} [comm_ring R] {x y : R} (z : R) :
(span {x + y * z, y} : ideal R) = span {x, y} :=
begin
ext,
rw [mem_span_pair, mem_span_pair],
exact ⟨λ ⟨a, b, h⟩, ⟨a, b + a * z, by { rw [← h], ring1 }⟩,
λ ⟨a, b, h⟩, ⟨a, b - a * z, by { rw [← h], ring1 }⟩⟩
end

@[simp] lemma span_pair_add_mul_right {R : Type u} [comm_ring R] {x y : R} (z : R) :
(span {x, y + x * z} : ideal R) = span {x, y} :=
by rw [span_pair_comm, span_pair_add_mul_left, span_pair_comm]

theorem is_maximal.exists_inv {I : ideal α}
(hI : I.is_maximal) {x} (hx : x ∉ I) : ∃ y, ∃ i ∈ I, y * x + i = 1 :=
begin
Expand Down

0 comments on commit 5456d48

Please sign in to comment.