Module docstring
{"# (Left) Ore sets
This defines left Ore sets on arbitrary monoids.
References
- https://ncatlab.org/nlab/show/Ore+set
"}
{"# (Left) Ore sets
This defines left Ore sets on arbitrary monoids.
"}
AddOreLocalization.AddOreSet
structure
{R : Type*} [AddMonoid R] (S : AddSubmonoid R)
/-- A submonoid `S` of an additive monoid `R` is (left) Ore if common summands on the right can be
turned into common summands on the left, and if each pair of `r : R` and `s : S` admits an Ore
minuend `v : R` and an Ore subtrahend `u : S` such that `u + r = v + s`. -/
class AddOreSet {R : Type*} [AddMonoid R] (S : AddSubmonoid R) where
/-- Common summands on the right can be turned into common summands on the left, a weak form of
cancellability. -/
ore_right_cancel : ∀ (r₁ r₂ : R) (s : S), r₁ + s = r₂ + s → ∃ s' : S, s' + r₁ = s' + r₂
/-- The Ore minuend of a difference. -/
oreMin : R → S → R
/-- The Ore subtrahend of a difference. -/
oreSubtra : R → S → S
/-- The Ore condition of a difference, expressed in terms of `oreMin` and `oreSubtra`. -/
ore_eq : ∀ (r : R) (s : S), oreSubtra r s + r = oreMin r s + s
OreLocalization.OreSet
structure
{R : Type*} [Monoid R] (S : Submonoid R)
/-- A submonoid `S` of a monoid `R` is (left) Ore if common factors on the right can be turned
into common factors on the left, and if each pair of `r : R` and `s : S` admits an Ore numerator
`v : R` and an Ore denominator `u : S` such that `u * r = v * s`. -/
@[to_additive AddOreLocalization.AddOreSet]
class OreSet {R : Type*} [Monoid R] (S : Submonoid R) where
/-- Common factors on the right can be turned into common factors on the left, a weak form of
cancellability. -/
ore_right_cancel : ∀ (r₁ r₂ : R) (s : S), r₁ * s = r₂ * s → ∃ s' : S, s' * r₁ = s' * r₂
/-- The Ore numerator of a fraction. -/
oreNum : R → S → R
/-- The Ore denominator of a fraction. -/
oreDenom : R → S → S
/-- The Ore condition of a fraction, expressed in terms of `oreNum` and `oreDenom`. -/
ore_eq : ∀ (r : R) (s : S), oreDenom r s * r = oreNum r s * s
OreLocalization.ore_right_cancel
theorem
(r₁ r₂ : R) (s : S) (h : r₁ * s = r₂ * s) : ∃ s' : S, s' * r₁ = s' * r₂
/-- Common factors on the right can be turned into common factors on the left, a weak form of
cancellability. -/
@[to_additive AddOreLocalization.ore_right_cancel]
theorem ore_right_cancel (r₁ r₂ : R) (s : S) (h : r₁ * s = r₂ * s) : ∃ s' : S, s' * r₁ = s' * r₂ :=
OreSet.ore_right_cancel r₁ r₂ s h
OreLocalization.oreNum
definition
(r : R) (s : S) : R
/-- The Ore numerator of a fraction. -/
@[to_additive AddOreLocalization.oreMin "The Ore minuend of a difference."]
def oreNum (r : R) (s : S) : R :=
OreSet.oreNum r s
OreLocalization.oreDenom
definition
(r : R) (s : S) : S
/-- The Ore denominator of a fraction. -/
@[to_additive AddOreLocalization.oreSubtra "The Ore subtrahend of a difference."]
def oreDenom (r : R) (s : S) : S :=
OreSet.oreDenom r s
OreLocalization.ore_eq
theorem
(r : R) (s : S) : oreDenom r s * r = oreNum r s * s
/-- The Ore condition of a fraction, expressed in terms of `oreNum` and `oreDenom`. -/
@[to_additive AddOreLocalization.add_ore_eq
"The Ore condition of a difference, expressed in terms of `oreMin` and `oreSubtra`."]
theorem ore_eq (r : R) (s : S) : oreDenom r s * r = oreNum r s * s :=
OreSet.ore_eq r s
OreLocalization.oreCondition
definition
(r : R) (s : S) : Σ' r' : R, Σ' s' : S, s' * r = r' * s
/-- The Ore condition bundled in a sigma type. This is useful in situations where we want to obtain
both witnesses and the condition for a given fraction. -/
@[to_additive AddOreLocalization.addOreCondition
"The Ore condition bundled in a sigma type. This is useful in situations where we want to obtain
both witnesses and the condition for a given difference."]
def oreCondition (r : R) (s : S) : Σ'r' : R, Σ's' : S, s' * r = r' * s :=
⟨oreNum r s, oreDenom r s, ore_eq r s⟩
OreLocalization.oreSetBot
instance
: OreSet (⊥ : Submonoid R)
/-- The trivial submonoid is an Ore set. -/
@[to_additive AddOreLocalization.addOreSetBot]
instance oreSetBot : OreSet (⊥ : Submonoid R) where
ore_right_cancel _ _ s h :=
⟨s, by
rcases s with ⟨s, hs⟩
rw [Submonoid.mem_bot] at hs
subst hs
rw [mul_one, mul_one] at h
subst h
rfl⟩
oreNum r _ := r
oreDenom _ s := s
ore_eq _ s := by
rcases s with ⟨s, hs⟩
rw [Submonoid.mem_bot] at hs
simp [hs]
OreLocalization.oreSetComm
instance
{R} [CommMonoid R] (S : Submonoid R) : OreSet S
/-- Every submonoid of a commutative monoid is an Ore set. -/
@[to_additive AddOreLocalization.addOreSetComm]
instance (priority := 100) oreSetComm {R} [CommMonoid R] (S : Submonoid R) : OreSet S where
ore_right_cancel m n s h := ⟨s, by rw [mul_comm (s : R) n, mul_comm (s : R) m, h]⟩
oreNum r _ := r
oreDenom _ s := s
ore_eq r s := by rw [mul_comm]