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

Commit 9d3c709

Browse files
committed
chore(algebra/module): Reuse proofs from subgroup (#3631)
Confusingly these have opposite names - someone can always fix the names later though.
1 parent 2918b00 commit 9d3c709

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/algebra/module/basic.lean

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -548,15 +548,13 @@ def to_add_subgroup : add_subgroup M :=
548548

549549
@[simp] lemma coe_to_add_subgroup : (p.to_add_subgroup : set M) = p := rfl
550550

551-
lemma sub_mem (hx : x ∈ p) (hy : y ∈ p) : x - y ∈ p := p.add_mem hx (p.neg_mem hy)
551+
lemma sub_mem : x ∈ py ∈ p x - y ∈ p := p.to_add_subgroup.sub_mem
552552

553553
@[simp] lemma neg_mem_iff : -x ∈ p ↔ x ∈ p := p.to_add_subgroup.neg_mem_iff
554554

555-
lemma add_mem_iff_left (h₁ : y ∈ p) : x + y ∈ p ↔ x ∈ p :=
556-
⟨λ h₂, by simpa using sub_mem _ h₂ h₁, λ h₂, add_mem _ h₂ h₁⟩
555+
lemma add_mem_iff_left : y ∈ p → (x + y ∈ p ↔ x ∈ p) := p.to_add_subgroup.add_mem_cancel_right
557556

558-
lemma add_mem_iff_right (h₁ : x ∈ p) : x + y ∈ p ↔ y ∈ p :=
559-
⟨λ h₂, by simpa using sub_mem _ h₂ h₁, add_mem _ h₁⟩
557+
lemma add_mem_iff_right : x ∈ p → (x + y ∈ p ↔ y ∈ p) := p.to_add_subgroup.add_mem_cancel_left
560558

561559
instance : has_neg p := ⟨λx, ⟨-x.1, neg_mem _ x.2⟩⟩
562560

0 commit comments

Comments
 (0)