N-ary images of finsets #
This file defines finset.image₂, the binary image of finsets. This is the finset version of
set.image2. This is mostly useful to define pointwise operations.
Notes #
This file is very similar to the n-ary section of data.set.basic and to order.filter.n_ary.
Please keep them in sync.
We do not define finset.image₃ as its only purpose would be to prove properties of finset.image₂
and set.image2 already fulfills this task.
The image of a binary function f : α → β → γ as a function finset α → finset β → finset γ.
Mathematically this should be thought of as the image of the corresponding function α × β → γ.
Equations
- finset.image₂ f s t = finset.image (function.uncurry f) (s ×ˢ t)
A common special case of image₂_congr
Algebraic replacement rules #
A collection of lemmas to transfer associativity, commutativity, distributivity, ... of operations
to the associativity, commutativity, distributivity, ... of finset.image₂ of those operations.
The proof pattern is image₂_lemma operation_lemma. For example, image₂_comm mul_comm proves that
image₂ (*) f g = image₂ (*) g f in a comm_semigroup.
Symmetric of finset.image₂_image_left_comm.
Symmetric of finset.image_image₂_right_comm.
Symmetric of finset.image_image₂_distrib_left.
Symmetric of finset.image_image₂_distrib_right.
The other direction does not hold because of the s-s cross terms on the RHS.
The other direction does not hold because of the u-u cross terms on the RHS.
Symmetric of finset.image₂_image_left_anticomm.
Symmetric of finset.image_image₂_right_anticomm.
Symmetric of finset.image_image₂_antidistrib_left.
Symmetric of finset.image_image₂_antidistrib_right.