Not all complementary decompositions of a module over a semiring make up a direct sum #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This shows that while ℤ≤0
and ℤ≥0
are complementary ℕ
-submodules of ℤ
, which in turn
implies as a collection they are complete_lattice.independent
and that they span all of ℤ
, they
do not form a decomposition into a direct sum.
This file demonstrates why direct_sum.is_internal_submodule_of_independent_of_supr_eq_top
must
take ring R
and not semiring R
.
Submodules of positive and negative integers, keyed by sign.
Equations
- counterexample.with_sign i = ⇑add_submonoid.to_nat_submodule (show add_submonoid ℤ, from {carrier := {z : ℤ | 0 ≤ i • z}, add_mem' := _, zero_mem' := _})
The two submodules are complements.
theorem
counterexample.with_sign.not_injective
:
¬function.injective ⇑(direct_sum.to_module ℕ ℤˣ ℤ (λ (i : ℤˣ), (counterexample.with_sign i).subtype))
But there is no embedding into ℤ
from the direct sum.
And so they do not represent an internal direct sum.