The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V03. Sets, finite structures and big operators

Mathlib.Data.Set.Semiring

73 declarations and 21 deprecated aliases. Mathlib docs · Source

theorem SetSemiring.ofSet.injEq E0 #

∀ {α : Type u_4} (toSet toSet_1 : Set α), ({ toSet := toSet } = { toSet := toSet_1 }) = (toSet = toSet_1)

theorem SetSemiring.ofSet.inj E1 #

∀ {α : Type u_4} {toSet toSet_1 : Set α}, { toSet := toSet } = { toSet := toSet_1 } → toSet = toSet_1

def SetSemiring.ctorIdx E1 #

{α : Type u_4} → SetSemiring α → ℕ

def instInhabitedSetSemiring.default E1 #

{α : Type u_4} → SetSemiring α

structure SetSemiring E1 #

Type u_4 → Type u_4

SetSemiring α is a one-field structure around Set α with a semiring structure given by ∪ as addition and pointwise multiplication * as multiplication.

theorem SetSemiring.ext E1 #

∀ {α : Type u_4} {x y : SetSemiring α}, x.toSet = y.toSet → x = y

theorem SetSemiring.ext_iff E0 #

∀ {α : Type u_4} {x y : SetSemiring α}, x = y ↔ x.toSet = y.toSet

ctor SetSemiring.ofSet E0 #

{α : Type u_4} → Set α → SetSemiring α

Convert a Set α to a SetSemiring α.

abbrev SetSemiring.toSet E1 #

{α : Type u_4} → SetSemiring α → Set α

The underlying set

instance instInhabitedSetSemiring E0 #

{a : Type u_4} → Inhabited (SetSemiring a)

def SetSemiring.toSetEquiv E1 #

{α : Type u_1} → SetSemiring α ≃ Set α

The natural equivalence between SetSemiring α and Set α.

theorem SetSemiring.toSetEquiv_apply E0 #

∀ {α : Type u_1} (self : SetSemiring α), SetSemiring.toSetEquiv self = self.toSet

theorem SetSemiring.toSetEquiv_symm_apply_toSet E0 #

∀ {α : Type u_1} (toSet : Set α), (SetSemiring.toSetEquiv.symm toSet).toSet = toSet

instance SetSemiring.instCompleteAtomicBooleanAlgebra E0 #

{α : Type u_1} → CompleteAtomicBooleanAlgebra (SetSemiring α)

theorem SetSemiring.toSet_ofSet E0 #

∀ {α : Type u_1} (s : Set α), { toSet := s }.toSet = s

theorem SetSemiring.ofSet_toSet E0 #

∀ {α : Type u_1} (s : SetSemiring α), { toSet := s.toSet } = s

theorem SetSemiring.ofSet_le_ofSet E0 #

∀ {α : Type u_1} {s t : Set α}, { toSet := s } ≤ { toSet := t } ↔ s ⊆ t

theorem SetSemiring.ofSet_lt_ofSet E0 #

∀ {α : Type u_1} {s t : Set α}, { toSet := s } < { toSet := t } ↔ s ⊂ t

theorem SetSemiring.toSet_subset_toSet E0 #

∀ {α : Type u_1} {s t : SetSemiring α}, s.toSet ⊆ t.toSet ↔ s ≤ t

theorem SetSemiring.toSet_ssubset_toSet E0 #

∀ {α : Type u_1} {s t : SetSemiring α}, s.toSet ⊂ t.toSet ↔ s < t

instance SetSemiring.instMembership E0 #

{α : Type u_1} → Membership α (SetSemiring α)

instance SetSemiring.instSingleton E0 #

{α : Type u_1} → Singleton α (SetSemiring α)

instance SetSemiring.instInsert E0 #

{α : Type u_1} → Insert α (SetSemiring α)

theorem SetSemiring.mem_toSet E0 #

∀ {α : Type u_1} {s : SetSemiring α} {a : α}, a ∈ s.toSet ↔ a ∈ s

theorem SetSemiring.mem_ofSet E0 #

∀ {α : Type u_1} {s : Set α} {a : α}, a ∈ { toSet := s } ↔ a ∈ s

theorem SetSemiring.mem_singleton_iff E0 #

∀ {α : Type u_1} {a b : α}, a ∈ {b} ↔ a = b

theorem SetSemiring.toSet_singleton E0 #

∀ {α : Type u_1} {a : α}, {a}.toSet = {a}

theorem SetSemiring.ofSet_singleton E0 #

∀ {α : Type u_1} {a : α}, { toSet := {a} } = {a}

theorem SetSemiring.toSet_insert E0 #

∀ {α : Type u_1} {s : SetSemiring α} {a : α}, (insert a s).toSet = insert a s.toSet

theorem SetSemiring.ofSet_insert E0 #

∀ {α : Type u_1} {s : Set α} {a : α}, { toSet := insert a s } = insert a { toSet := s }

instance SetSemiring.instZero E0 #

{α : Type u_1} → Zero (SetSemiring α)

instance SetSemiring.instAdd E0 #

{α : Type u_1} → Add (SetSemiring α)

theorem SetSemiring.zero_def E0 #

∀ {α : Type u_1}, 0 = { toSet := ∅ }

theorem SetSemiring.toSet_zero E0 #

∀ {α : Type u_1}, SetSemiring.toSet 0 = ∅

theorem SetSemiring.ofSet_empty E0 #

∀ {α : Type u_1}, { toSet := ∅ } = 0

theorem SetSemiring.add_def E0 #

∀ {α : Type u_1} (s t : SetSemiring α), s + t = { toSet := s.toSet ∪ t.toSet }

theorem SetSemiring.toSet_add E0 #

∀ {α : Type u_1} (s t : SetSemiring α), (s + t).toSet = s.toSet ∪ t.toSet

theorem SetSemiring.ofSet_union E0 #

∀ {α : Type u_1} (s t : Set α), { toSet := s ∪ t } = { toSet := s } + { toSet := t }

instance SetSemiring.instAddCommMonoid E0 #

{α : Type u_1} → AddCommMonoid (SetSemiring α)

instance SetSemiring.instAddLeftMono E0 #

∀ {α : Type u_1}, AddLeftMono (SetSemiring α)

instance SetSemiring.instCanonicallyOrderedAdd E0 #

∀ {α : Type u_1}, CanonicallyOrderedAdd (SetSemiring α)

instance SetSemiring.instOne E0 #

{α : Type u_1} → [One α] → One (SetSemiring α)

theorem SetSemiring.one_def E0 #

∀ {α : Type u_1} [inst : One α], 1 = { toSet := 1 }

theorem SetSemiring.toSet_one E0 #

∀ {α : Type u_1} [inst : One α], SetSemiring.toSet 1 = 1

theorem SetSemiring.ofSet_one E0 #

∀ {α : Type u_1} [inst : One α], { toSet := 1 } = 1

instance SetSemiring.instMul E0 #

{α : Type u_1} → [Mul α] → Mul (SetSemiring α)

theorem SetSemiring.mul_def E0 #

∀ {α : Type u_1} [inst : Mul α] (s t : SetSemiring α), s * t = { toSet := s.toSet * t.toSet }

theorem SetSemiring.toSet_mul E0 #

∀ {α : Type u_1} [inst : Mul α] (s t : SetSemiring α), (s * t).toSet = s.toSet * t.toSet

theorem SetSemiring.ofSet_mul E0 #

∀ {α : Type u_1} [inst : Mul α] (s t : Set α), { toSet := s * t } = { toSet := s } * { toSet := t }

instance SetSemiring.instNoZeroDivisors E0 #

∀ {α : Type u_1} [inst : Mul α], NoZeroDivisors (SetSemiring α)

instance SetSemiring.instMulLeftMono E0 #

∀ {α : Type u_1} [inst : Mul α], MulLeftMono (SetSemiring α)

instance SetSemiring.instMulRightMono E0 #

∀ {α : Type u_1} [inst : Mul α], MulRightMono (SetSemiring α)

instance SetSemiring.instPowNat E0 #

{α : Type u_1} → [Mul α] → [One α] → Pow (SetSemiring α) ℕ

theorem SetSemiring.pow_def E0 #

∀ {α : Type u_1} [inst : Mul α] [inst_1 : One α] (s : SetSemiring α) (n : ℕ), s ^ n = { toSet := s.toSet ^ n }

theorem SetSemiring.toSet_pow E0 #

∀ {α : Type u_1} [inst : Mul α] [inst_1 : One α] (s : SetSemiring α) (n : ℕ), (s ^ n).toSet = s.toSet ^ n

theorem SetSemiring.ofSet_pow E0 #

∀ {α : Type u_1} [inst : Mul α] [inst_1 : One α] (s : Set α) (n : ℕ), { toSet := s ^ n } = { toSet := s } ^ n

instance SetSemiring.instMulOneClass E0 #

{α : Type u_1} → [MulOneClass α] → MulOneClass (SetSemiring α)

instance SetSemiring.instSemigroup E0 #

{α : Type u_1} → [Semigroup α] → Semigroup (SetSemiring α)

instance SetSemiring.instCommSemigroup E0 #

{α : Type u_1} → [CommSemigroup α] → CommSemigroup (SetSemiring α)

instance SetSemiring.instMonoid E0 #

{α : Type u_1} → [Monoid α] → Monoid (SetSemiring α)

instance SetSemiring.instCommMonoid E0 #

{α : Type u_1} → [CommMonoid α] → CommMonoid (SetSemiring α)

instance SetSemiring.instNonUnitalNonAssocSemiringOfMul E0 #

{α : Type u_1} → [Mul α] → NonUnitalNonAssocSemiring (SetSemiring α)

instance SetSemiring.instNonAssocSemiringOfMulOneClass E0 #

{α : Type u_1} → [MulOneClass α] → NonAssocSemiring (SetSemiring α)

instance SetSemiring.instNonUnitalSemiringOfSemigroup E0 #

{α : Type u_1} → [Semigroup α] → NonUnitalSemiring (SetSemiring α)

instance SetSemiring.instNonUnitalCommSemiringOfCommSemigroup E0 #

{α : Type u_1} → [CommSemigroup α] → NonUnitalCommSemiring (SetSemiring α)

instance SetSemiring.instIdemSemiringOfMonoid E0 #

{α : Type u_1} → [Monoid α] → IdemSemiring (SetSemiring α)

instance SetSemiring.instIdemCommSemiringOfCommMonoid E0 #

{α : Type u_1} → [CommMonoid α] → IdemCommSemiring (SetSemiring α)

instance SetSemiring.instIsOrderedRing E0 #

∀ {α : Type u_1} [inst : CommMonoid α], IsOrderedRing (SetSemiring α)

def SetSemiring.singletonMonoidHom E1 #

{α : Type u_1} → [inst : Monoid α] → α →* SetSemiring α

If α is a monoid, the map that sends a : α to {a} is a monoid homomorphism.

def SetSemiring.imageHom E1 #

{α : Type u_1} →
  {β : Type u_2} → [inst : MulOneClass α] → [inst_1 : MulOneClass β] → (α →* β) → SetSemiring α →+* SetSemiring β

The image of a set under a multiplicative homomorphism is a ring homomorphism with respect to the pointwise operations on sets.

theorem SetSemiring.imageHom_apply E0 #

∀ {α : Type u_1} {β : Type u_2} [inst : MulOneClass α] [inst_1 : MulOneClass β] (f : α →* β) (s : SetSemiring α),
  (SetSemiring.imageHom f) s = { toSet := ⇑f '' s.toSet }

theorem SetSemiring.imageHom_id E0 #

∀ {α : Type u_1} [inst : MulOneClass α], SetSemiring.imageHom (MonoidHom.id α) = RingHom.id (SetSemiring α)

theorem SetSemiring.imageHom_comp E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} [inst : MulOneClass α] [inst_1 : MulOneClass β] [inst_2 : MulOneClass γ]
  (f : α →* β) (g : β →* γ), SetSemiring.imageHom (g.comp f) = (SetSemiring.imageHom g).comp (SetSemiring.imageHom f)

Deprecated aliases

NameNew nameSince
Set.upSetSemiring.ofSet2026-10-13
Set.up_emptySetSemiring.ofSet_empty2026-10-13
Set.up_imageSetSemiring.imageHom_apply2026-10-13
Set.up_mulSetSemiring.ofSet_mul2026-10-13
Set.up_oneSetSemiring.ofSet_one2026-10-13
Set.up_unionSetSemiring.ofSet_union2026-10-13
SetSemiring.downSetSemiring.toSet2026-10-13
SetSemiring.down_addSetSemiring.toSet_add2026-10-13
SetSemiring.down_imageHomSetSemiring.imageHom_apply2026-10-13
SetSemiring.down_mulSetSemiring.toSet_mul2026-10-13
SetSemiring.down_oneSetSemiring.toSet_one2026-10-13
SetSemiring.down_ssubset_downSetSemiring.toSet_ssubset_toSet2026-10-13
SetSemiring.down_subset_downSetSemiring.toSet_subset_toSet2026-10-13
SetSemiring.down_upSetSemiring.toSet_ofSet2026-10-13
SetSemiring.down_zeroSetSemiring.toSet_zero2026-10-13
SetSemiring.imageHom_defSetSemiring.imageHom_apply2026-10-13
SetSemiring.symm_ofSetSetSemiring.toSet_ofSet2026-11-09
SetSemiring.symm_toSetSetSemiring.ofSet_toSet2026-11-09
SetSemiring.up_downSetSemiring.ofSet_toSet2026-10-13
SetSemiring.up_le_upSetSemiring.ofSet_le_ofSet2026-10-13
SetSemiring.up_lt_upSetSemiring.ofSet_lt_ofSet2026-10-13