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

[Merged by Bors] - feat(algebra/direct_sum/decomposition): add an induction principle for direct_sum.decomposition class #15654

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/algebra/direct_sum/decomposition.lean
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,22 @@ def decompose : M ≃ ⨁ i, ℳ i :=
left_inv := decomposition.left_inv,
right_inv := decomposition.right_inv }

protected lemma decomposition.induction_on {p : M → Prop}
(h_zero : p 0) (h_homogeneous : ∀ {i} (m : ℳ i), p (m : M))
(h_add : ∀ (m m' : M), p m → p m' → p (m + m')) : ∀ m, p m :=
begin
let ℳ' : ι → add_submonoid M :=
λ i, (⟨ℳ i, λ _ _, add_mem_class.add_mem, zero_mem_class.zero_mem _⟩ : add_submonoid M),
Comment on lines +79 to +80
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another argument for addressing #15053 sooner rather than later; but no reason to cancel merging this PR.

haveI t : direct_sum.decomposition ℳ' :=
{ decompose' := direct_sum.decompose ℳ,
left_inv := λ _, (decompose ℳ).left_inv _,
right_inv := λ _, (decompose ℳ).right_inv _, },
have mem : ∀ m, m ∈ supr ℳ' :=
λ m, (direct_sum.is_internal.add_submonoid_supr_eq_top ℳ'
(decomposition.is_internal ℳ')).symm ▸ trivial,
exact λ m, add_submonoid.supr_induction ℳ' (mem m) (λ i m h, h_homogeneous ⟨m, h⟩) h_zero h_add,
end

@[simp] lemma decomposition.decompose'_eq : decomposition.decompose' = decompose ℳ := rfl

@[simp] lemma decompose_symm_of {i : ι} (x : ℳ i) :
Expand Down