N-ary maps of filter #
This file defines the binary and ternary maps of filters. This is mostly useful to define pointwise operations on filters.
Main declarations #
Filter.map₂: Binary map of filters.
Notes #
This file is very similar to Data.Set.NAry, Data.Finset.NAry and Data.Option.NAry. Please
keep them in sync.
The image of a binary function m : α → β → γ as a function Filter α → Filter β → Filter γ.
Mathematically this should be thought of as the image of the corresponding function α × β → γ.
Equations
- Filter.map₂ m f g = (Filter.map (Function.uncurry m) (f ×ˢ g)).copy {s : Set γ | ∃ u ∈ f, ∃ v ∈ g, Set.image2 m u v ⊆ s} ⋯
Instances For
Equations
- ⋯ = ⋯
Algebraic replacement rules #
A collection of lemmas to transfer associativity, commutativity, distributivity, ... of operations
to the associativity, commutativity, distributivity, ... of Filter.map₂ of those operations.
The proof pattern is map₂_lemma operation_lemma. For example, map₂_comm mul_comm proves that
map₂ (*) f g = map₂ (*) g f in a CommSemigroup.
Symmetric statement to Filter.map₂_map_left_comm.
Symmetric statement to Filter.map_map₂_right_comm.
Symmetric statement to Filter.map_map₂_distrib_left.
Symmetric statement to Filter.map_map₂_distrib_right.
The other direction does not hold because of the f-f cross terms on the RHS.
The other direction does not hold because of the h-h cross terms on the RHS.
Symmetric statement to Filter.map₂_map_left_anticomm.
Symmetric statement to Filter.map_map₂_right_anticomm.
Symmetric statement to Filter.map_map₂_antidistrib_left.
Symmetric statement to Filter.map_map₂_antidistrib_right.
If a is a left identity for f : α → β → β, then pure a is a left identity for
Filter.map₂ f.
If b is a right identity for f : α → β → α, then pure b is a right identity for
Filter.map₂ f.