Pointwise operations of finsets #
This file defines pointwise algebraic operations on finsets.
Main declarations #
For finsets s and t:
0(finset.has_zero): The singleton{0}.1(finset.has_one): The singleton{1}.-s(finset.has_neg): Negation, finset of all-xwherex ∈ s.s⁻¹(finset.has_inv): Inversion, finset of allx⁻¹wherex ∈ s.s + t(finset.has_add): Addition, finset of allx + ywherex ∈ sandy ∈ t.s * t(finset.has_mul): Multiplication, finset of allx * ywherex ∈ sandy ∈ t.s - t(finset.has_sub): Subtraction, finset of allx - ywherex ∈ sandy ∈ t.s / t(finset.has_div): Division, finset of allx / ywherex ∈ sandy ∈ t.s +ᵥ t(finset.has_vadd): Scalar addition, finset of allx +ᵥ ywherex ∈ sandy ∈ t.s • t(finset.has_scalar): Scalar multiplication, finset of allx • ywherex ∈ sandy ∈ t.s -ᵥ t(finset.has_vsub): Scalar subtraction, finset of allx -ᵥ ywherex ∈ sandy ∈ t.a • s(finset.has_scalar_finset): Scaling, finset of alla • xwherex ∈ s.a +ᵥ s(finset.has_vadd_finset): Translation, finset of alla +ᵥ xwherex ∈ s.
For α a semigroup/monoid, finset α is a semigroup/monoid.
As an unfortunate side effect, this means that n • s, where n : ℕ, is ambiguous between
pointwise scaling and repeated pointwise addition; the former has (2 : ℕ) • {1, 2} = {2, 4}, while
the latter has (2 : ℕ) • {1, 2} = {2, 3, 4}.
Implementation notes #
We put all instances in the locale pointwise, so that these instances are not available by
default. Note that we do not mark them as reducible (as argued by note [reducible non-instances])
since we expect the locale to be open whenever the instances are actually used (and making the
instances reducible changes the behavior of simp.
Tags #
finset multiplication, finset addition, pointwise addition, pointwise multiplication, pointwise subtraction
0/1 as sets #
The finset (1 : finset α) is defined as {1} in locale pointwise.
Equations
- finset.has_one = {one := {1}}
The finset (0 : finset α) is defined as {0} in locale pointwise.
Equations
- finset.has_zero = {zero := {0}}
Finset negation/inversion #
The pointwise inverse of a finset s: s⁻¹ = {x⁻¹ | x ∈ s}.
Equations
The pointwise negation of a finset s: -s = {-x | x ∈ s}.
Equations
Alias of inv_nonempty_iff.
Alias of inv_nonempty_iff.
Finset addition/multiplication #
The pointwise sum of two finsets s and t: s + t = {x + y | x ∈ s, y ∈ t}.
The pointwise product of two finsets s and t: s * t = {x * y | x ∈ s, y ∈ t}.
If a finset u is contained in the product of two sets s * t, we can find two finsets s',
t' such that s' ⊆ s, t' ⊆ t and u ⊆ s' * t'.
If a finset u is contained in the sum of two sets s + t, we can find two finsets
s', t' such that s' ⊆ s, t' ⊆ t and u ⊆ s' + t'.
Finset subtraction/division #
The pointwise sum of two finsets s and t: s - t = {x - y | x ∈ s, y ∈ t}.
The pointwise product of two finsets s and t: s / t = {x / y | x ∈ s, y ∈ t}.
If a finset u is contained in the sum of two sets s - t, we can find two finsets
s', t' such that s' ⊆ s, t' ⊆ t and u ⊆ s' - t'.
If a finset u is contained in the product of two sets s / t, we can find two finsets s',
t' such that s' ⊆ s, t' ⊆ t and u ⊆ s' / t'.
Instances #
Repeated pointwise addition (not the same as pointwise repeated addition!) of a finset.
Equations
Repeated pointwise multiplication (not the same as pointwise repeated multiplication!) of a
finset.
Repeated pointwise addition/subtraction (not the same as pointwise repeated
addition/subtraction!) of a finset.
Equations
Repeated pointwise multiplication/division (not the same as pointwise repeated
multiplication/division!) of a finset.
finset α is an add_zero_class under pointwise operations if α is.
Equations
- finset.add_zero_class = function.injective.add_zero_class coe finset.coe_injective finset.add_zero_class._proof_1 finset.add_zero_class._proof_2
finset α is a mul_one_class under pointwise operations if α is.
Equations
- finset.mul_one_class = function.injective.mul_one_class coe finset.coe_injective finset.mul_one_class._proof_1 finset.mul_one_class._proof_2
finset α is a semigroup under pointwise operations if α is.
Equations
- finset.semigroup = function.injective.semigroup coe finset.coe_injective finset.semigroup._proof_1
finset α is an add_semigroup under pointwise operations if α is.
Equations
- finset.add_semigroup = function.injective.add_semigroup coe finset.coe_injective finset.add_semigroup._proof_1
finset α is an add_comm_semigroup under pointwise operations if α is.
Equations
- finset.add_comm_semigroup = function.injective.add_comm_semigroup coe finset.coe_injective finset.add_comm_semigroup._proof_1
finset α is a comm_semigroup under pointwise operations if α is.
Equations
- finset.comm_semigroup = function.injective.comm_semigroup coe finset.coe_injective finset.comm_semigroup._proof_1
finset α is a monoid under pointwise operations if α is.
Equations
- finset.monoid = function.injective.monoid coe finset.coe_injective finset.monoid._proof_1 finset.monoid._proof_2 finset.monoid._proof_3
finset α is an add_monoid under pointwise operations if α is.
Equations
- finset.add_monoid = function.injective.add_monoid coe finset.coe_injective finset.add_monoid._proof_1 finset.add_monoid._proof_2 finset.add_monoid._proof_3
finset α is a comm_monoid under pointwise operations if α is.
Equations
- finset.comm_monoid = function.injective.comm_monoid coe finset.coe_injective finset.comm_monoid._proof_1 finset.comm_monoid._proof_2 finset.comm_monoid._proof_3
finset α is an add_comm_monoid under pointwise operations if α is.
Equations
- finset.add_comm_monoid = function.injective.add_comm_monoid coe finset.coe_injective finset.add_comm_monoid._proof_1 finset.add_comm_monoid._proof_2 finset.add_comm_monoid._proof_3
finset α is an sub_neg_add_monoid under pointwise operations if α is.
Equations
- finset.sub_neg_add_monoid = function.injective.sub_neg_monoid coe finset.coe_injective finset.sub_neg_add_monoid._proof_1 finset.sub_neg_add_monoid._proof_2 finset.sub_neg_add_monoid._proof_3 finset.sub_neg_add_monoid._proof_4 finset.sub_neg_add_monoid._proof_5 finset.sub_neg_add_monoid._proof_6
finset α is a div_inv_monoid under pointwise operations if α is.
Equations
- finset.div_inv_monoid = function.injective.div_inv_monoid coe finset.coe_injective finset.div_inv_monoid._proof_1 finset.div_inv_monoid._proof_2 finset.div_inv_monoid._proof_3 finset.div_inv_monoid._proof_4 finset.div_inv_monoid._proof_5 finset.div_inv_monoid._proof_6
finset α is a div_inv_monoid under pointwise operations if α is.
Equations
- finset.div_inv_monoid' = function.injective.div_inv_monoid coe finset.coe_injective finset.div_inv_monoid'._proof_1 finset.div_inv_monoid'._proof_2 finset.div_inv_monoid'._proof_3 finset.div_inv_monoid'._proof_4 finset.div_inv_monoid'._proof_5 finset.div_inv_monoid'._proof_6
Finset addition/multiplication #
The pointwise product of two finsets s and t: s • t = {x • y | x ∈ s, y ∈ t}.
The pointwise sum of two finsets s and
t: s +ᵥ t = {x +ᵥ y | x ∈ s, y ∈ t}.
If a finset u is contained in the scalar sum of two sets s +ᵥ t, we can find two
finsets s', t' such that s' ⊆ s, t' ⊆ t and u ⊆ s' +ᵥ t'.
If a finset u is contained in the scalar product of two sets s • t, we can find two finsets
s', t' such that s' ⊆ s, t' ⊆ t and u ⊆ s' • t'.
Finset addition/multiplication #
The pointwise product of two finsets s and t: s -ᵥ t = {x -ᵥ y | x ∈ s, y ∈ t}.
If a finset u is contained in the pointwise subtraction of two sets s -ᵥ t, we can find two
finsets s', t' such that s' ⊆ s, t' ⊆ t and u ⊆ s' -ᵥ t'.
Translation/scaling of finsets #
The translation of a finset s by a vector a:
a +ᵥ s = {a +ᵥ x | x ∈ s}.
Equations
- finset.has_vadd_finset = {vadd := λ (a : α), finset.image (has_vadd.vadd a)}
The scaling of a finset s by a scalar a: a • s = {a • x | x ∈ s}.
Equations
- finset.has_scalar_finset = {smul := λ (a : α), finset.image (has_scalar.smul a)}