File: Mathlib/Order/Filter/NAry.lean

full_name: Filter.map₂
code: /-- 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 `α × β → γ`. -/
def map₂ (m : α → β → γ) (f : Filter α) (g : Filter β) : Filter γ 
goal: Filter γ

full_name: Filter.mem_map₂_iff
code: @[simp 900]
theorem mem_map₂_iff : u ∈ map₂ m f g ↔ ∃ s ∈ f, ∃ t ∈ g, image2 m s t ⊆ u 
goal: u ∈ Filter.map₂ m f g ↔ ∃ s ∈ f, ∃ t ∈ g, Set.image2 m s t ⊆ u

full_name: Filter.image2_mem_map₂
code: theorem image2_mem_map₂ (hs : s ∈ f) (ht : t ∈ g) : image2 m s t ∈ map₂ m f g 
goal: Set.image2 m s t ∈ Filter.map₂ m f g

full_name: Filter.map_prod_eq_map₂
code: theorem map_prod_eq_map₂ (m : α → β → γ) (f : Filter α) (g : Filter β) :
    Filter.map (fun p : α × β => m p.1 p.2) (f ×ˢ g) = map₂ m f g 
goal: Filter.map (fun p => m p.1 p.2) (f ×ˢ g) = Filter.map₂ m f g

full_name: Filter.map_prod_eq_map₂'
code: theorem map_prod_eq_map₂' (m : α × β → γ) (f : Filter α) (g : Filter β) :
    Filter.map m (f ×ˢ g) = map₂ (fun a b => m (a, b)) f g 
goal: Filter.map m (f ×ˢ g) = Filter.map₂ (fun a b => m (a, b)) f g

full_name: Filter.map₂_mk_eq_prod
code: @[simp]
theorem map₂_mk_eq_prod (f : Filter α) (g : Filter β) : map₂ Prod.mk f g = f ×ˢ g 
goal: Filter.map₂ Prod.mk f g = f ×ˢ g

full_name: Filter.map₂_mono
code: theorem map₂_mono (hf : f₁ ≤ f₂) (hg : g₁ ≤ g₂) : map₂ m f₁ g₁ ≤ map₂ m f₂ g₂ 
goal: Filter.map₂ m f₁ g₁ ≤ Filter.map₂ m f₂ g₂

full_name: Filter.map₂_mono_left
code: theorem map₂_mono_left (h : g₁ ≤ g₂) : map₂ m f g₁ ≤ map₂ m f g₂ 
goal: Filter.map₂ m f g₁ ≤ Filter.map₂ m f g₂

full_name: Filter.map₂_mono_right
code: theorem map₂_mono_right (h : f₁ ≤ f₂) : map₂ m f₁ g ≤ map₂ m f₂ g 
goal: Filter.map₂ m f₁ g ≤ Filter.map₂ m f₂ g

full_name: Filter.le_map₂_iff
code: @[simp]
theorem le_map₂_iff {h : Filter γ} :
    h ≤ map₂ m f g ↔ ∀ ⦃s⦄, s ∈ f → ∀ ⦃t⦄, t ∈ g → image2 m s t ∈ h 
goal: h ≤ Filter.map₂ m f g ↔ ∀ ⦃s : Set α⦄, s ∈ f → ∀ ⦃t : Set β⦄, t ∈ g → Set.image2 m s t ∈ h

full_name: Filter.map₂_eq_bot_iff
code: @[simp]
theorem map₂_eq_bot_iff : map₂ m f g = ⊥ ↔ f = ⊥ ∨ g = ⊥ 
goal: Filter.map₂ m f g = ⊥ ↔ f = ⊥ ∨ g = ⊥

full_name: Filter.map₂_bot_left
code: @[simp]
theorem map₂_bot_left : map₂ m ⊥ g = ⊥ 
goal: Filter.map₂ m ⊥ g = ⊥

full_name: Filter.map₂_bot_right
code: @[simp]
theorem map₂_bot_right : map₂ m f ⊥ = ⊥ 
goal: Filter.map₂ m f ⊥ = ⊥

full_name: Filter.map₂_neBot_iff
code: @[simp]
theorem map₂_neBot_iff : (map₂ m f g).NeBot ↔ f.NeBot ∧ g.NeBot 
goal: (Filter.map₂ m f g).NeBot ↔ f.NeBot ∧ g.NeBot

full_name: Filter.NeBot.map₂
code: protected theorem NeBot.map₂ (hf : f.NeBot) (hg : g.NeBot) : (map₂ m f g).NeBot 
goal: (Filter.map₂ m f g).NeBot

full_name: Filter.map₂.neBot
code: instance map₂.neBot [NeBot f] [NeBot g] : NeBot (map₂ m f g) 
goal: (Filter.map₂ m f g).NeBot

full_name: Filter.NeBot.of_map₂_left
code: theorem NeBot.of_map₂_left (h : (map₂ m f g).NeBot) : f.NeBot 
goal: f.NeBot

full_name: Filter.NeBot.of_map₂_right
code: theorem NeBot.of_map₂_right (h : (map₂ m f g).NeBot) : g.NeBot 
goal: g.NeBot

full_name: Filter.map₂_sup_left
code: theorem map₂_sup_left : map₂ m (f₁ ⊔ f₂) g = map₂ m f₁ g ⊔ map₂ m f₂ g 
goal: Filter.map₂ m (f₁ ⊔ f₂) g = Filter.map₂ m f₁ g ⊔ Filter.map₂ m f₂ g

full_name: Filter.map₂_sup_right
code: theorem map₂_sup_right : map₂ m f (g₁ ⊔ g₂) = map₂ m f g₁ ⊔ map₂ m f g₂ 
goal: Filter.map₂ m f (g₁ ⊔ g₂) = Filter.map₂ m f g₁ ⊔ Filter.map₂ m f g₂

full_name: Filter.map₂_inf_subset_left
code: theorem map₂_inf_subset_left : map₂ m (f₁ ⊓ f₂) g ≤ map₂ m f₁ g ⊓ map₂ m f₂ g 
goal: Filter.map₂ m (f₁ ⊓ f₂) g ≤ Filter.map₂ m f₁ g ⊓ Filter.map₂ m f₂ g

full_name: Filter.map₂_inf_subset_right
code: theorem map₂_inf_subset_right : map₂ m f (g₁ ⊓ g₂) ≤ map₂ m f g₁ ⊓ map₂ m f g₂ 
goal: Filter.map₂ m f (g₁ ⊓ g₂) ≤ Filter.map₂ m f g₁ ⊓ Filter.map₂ m f g₂

full_name: Filter.map₂_pure_left
code: @[simp]
theorem map₂_pure_left : map₂ m (pure a) g = g.map (m a) 
goal: Filter.map₂ m (pure a) g = Filter.map (m a) g

full_name: Filter.map₂_pure_right
code: @[simp]
theorem map₂_pure_right : map₂ m f (pure b) = f.map (m · b) 
goal: Filter.map₂ m f (pure b) = Filter.map (fun x => m x b) f

full_name: Filter.map₂_pure
code: theorem map₂_pure : map₂ m (pure a) (pure b) = pure (m a b) 
goal: Filter.map₂ m (pure a) (pure b) = pure (m a b)

full_name: Filter.map₂_swap
code: theorem map₂_swap (m : α → β → γ) (f : Filter α) (g : Filter β) :
    map₂ m f g = map₂ (fun a b => m b a) g f 
goal: Filter.map₂ m f g = Filter.map₂ (fun a b => m b a) g f

full_name: Filter.map₂_left
code: @[simp]
theorem map₂_left [NeBot g] : map₂ (fun x _ => x) f g = f 
goal: Filter.map₂ (fun x x_1 => x) f g = f

full_name: Filter.map₂_right
code: @[simp]
theorem map₂_right [NeBot f] : map₂ (fun _ y => y) f g = g 
goal: Filter.map₂ (fun x y => y) f g = g

full_name: Filter.map_map₂
code: theorem map_map₂ (m : α → β → γ) (n : γ → δ) :
    (map₂ m f g).map n = map₂ (fun a b => n (m a b)) f g 
goal: Filter.map n (Filter.map₂ m f g) = Filter.map₂ (fun a b => n (m a b)) f g

full_name: Filter.map₂_map_left
code: theorem map₂_map_left (m : γ → β → δ) (n : α → γ) :
    map₂ m (f.map n) g = map₂ (fun a b => m (n a) b) f g 
goal: Filter.map₂ m (Filter.map n f) g = Filter.map₂ (fun a b => m (n a) b) f g

full_name: Filter.map₂_map_right
code: theorem map₂_map_right (m : α → γ → δ) (n : β → γ) :
    map₂ m f (g.map n) = map₂ (fun a b => m a (n b)) f g 
goal: Filter.map₂ m f (Filter.map n g) = Filter.map₂ (fun a b => m a (n b)) f g

full_name: Filter.map₂_curry
code: @[simp]
theorem map₂_curry (m : α × β → γ) (f : Filter α) (g : Filter β) :
    map₂ (curry m) f g = (f ×ˢ g).map m 
goal: Filter.map₂ (Function.curry m) f g = Filter.map m (f ×ˢ g)

full_name: Filter.map_uncurry_prod
code: @[simp]
theorem map_uncurry_prod (m : α → β → γ) (f : Filter α) (g : Filter β) :
    (f ×ˢ g).map (uncurry m) = map₂ m f g 
goal: Filter.map (Function.uncurry m) (f ×ˢ g) = Filter.map₂ m f g

full_name: Filter.map₂_assoc
code: theorem map₂_assoc {m : δ → γ → ε} {n : α → β → δ} {m' : α → ε' → ε} {n' : β → γ → ε'}
    {h : Filter γ} (h_assoc : ∀ a b c, m (n a b) c = m' a (n' b c)) :
    map₂ m (map₂ n f g) h = map₂ m' f (map₂ n' g h) 
goal: Filter.map₂ m (Filter.map₂ n f g) h = Filter.map₂ m' f (Filter.map₂ n' g h)

full_name: Filter.map₂_comm
code: theorem map₂_comm {n : β → α → γ} (h_comm : ∀ a b, m a b = n b a) : map₂ m f g = map₂ n g f 
goal: Filter.map₂ m f g = Filter.map₂ n g f

full_name: Filter.map₂_left_comm
code: theorem map₂_left_comm {m : α → δ → ε} {n : β → γ → δ} {m' : α → γ → δ'} {n' : β → δ' → ε}
    (h_left_comm : ∀ a b c, m a (n b c) = n' b (m' a c)) :
    map₂ m f (map₂ n g h) = map₂ n' g (map₂ m' f h) 
goal: Filter.map₂ m f (Filter.map₂ n g h) = Filter.map₂ n' g (Filter.map₂ m' f h)

full_name: Filter.map₂_right_comm
code: theorem map₂_right_comm {m : δ → γ → ε} {n : α → β → δ} {m' : α → γ → δ'} {n' : δ' → β → ε}
    (h_right_comm : ∀ a b c, m (n a b) c = n' (m' a c) b) :
    map₂ m (map₂ n f g) h = map₂ n' (map₂ m' f h) g 
goal: Filter.map₂ m (Filter.map₂ n f g) h = Filter.map₂ n' (Filter.map₂ m' f h) g

full_name: Filter.map_map₂_distrib
code: theorem map_map₂_distrib {n : γ → δ} {m' : α' → β' → δ} {n₁ : α → α'} {n₂ : β → β'}
    (h_distrib : ∀ a b, n (m a b) = m' (n₁ a) (n₂ b)) :
    (map₂ m f g).map n = map₂ m' (f.map n₁) (g.map n₂) 
goal: Filter.map n (Filter.map₂ m f g) = Filter.map₂ m' (Filter.map n₁ f) (Filter.map n₂ g)

full_name: Filter.map_map₂_distrib_left
code: /-- Symmetric statement to `Filter.map₂_map_left_comm`. -/
theorem map_map₂_distrib_left {n : γ → δ} {m' : α' → β → δ} {n' : α → α'}
    (h_distrib : ∀ a b, n (m a b) = m' (n' a) b) : (map₂ m f g).map n = map₂ m' (f.map n') g 
goal: Filter.map n (Filter.map₂ m f g) = Filter.map₂ m' (Filter.map n' f) g

full_name: Filter.map_map₂_distrib_right
code: /-- Symmetric statement to `Filter.map_map₂_right_comm`. -/
theorem map_map₂_distrib_right {n : γ → δ} {m' : α → β' → δ} {n' : β → β'}
    (h_distrib : ∀ a b, n (m a b) = m' a (n' b)) : (map₂ m f g).map n = map₂ m' f (g.map n') 
goal: Filter.map n (Filter.map₂ m f g) = Filter.map₂ m' f (Filter.map n' g)

full_name: Filter.map₂_map_left_comm
code: /-- Symmetric statement to `Filter.map_map₂_distrib_left`. -/
theorem map₂_map_left_comm {m : α' → β → γ} {n : α → α'} {m' : α → β → δ} {n' : δ → γ}
    (h_left_comm : ∀ a b, m (n a) b = n' (m' a b)) : map₂ m (f.map n) g = (map₂ m' f g).map n' 
goal: Filter.map₂ m (Filter.map n f) g = Filter.map n' (Filter.map₂ m' f g)

full_name: Filter.map_map₂_right_comm
code: /-- Symmetric statement to `Filter.map_map₂_distrib_right`. -/
theorem map_map₂_right_comm {m : α → β' → γ} {n : β → β'} {m' : α → β → δ} {n' : δ → γ}
    (h_right_comm : ∀ a b, m a (n b) = n' (m' a b)) : map₂ m f (g.map n) = (map₂ m' f g).map n' 
goal: Filter.map₂ m f (Filter.map n g) = Filter.map n' (Filter.map₂ m' f g)

full_name: Filter.map₂_distrib_le_left
code: /-- The other direction does not hold because of the `f-f` cross terms on the RHS. -/
theorem map₂_distrib_le_left {m : α → δ → ε} {n : β → γ → δ} {m₁ : α → β → β'} {m₂ : α → γ → γ'}
    {n' : β' → γ' → ε} (h_distrib : ∀ a b c, m a (n b c) = n' (m₁ a b) (m₂ a c)) :
    map₂ m f (map₂ n g h) ≤ map₂ n' (map₂ m₁ f g) (map₂ m₂ f h) 
goal: Filter.map₂ m f (Filter.map₂ n g h) ≤ Filter.map₂ n' (Filter.map₂ m₁ f g) (Filter.map₂ m₂ f h)

full_name: Filter.map₂_distrib_le_right
code: /-- The other direction does not hold because of the `h`-`h` cross terms on the RHS. -/
theorem map₂_distrib_le_right {m : δ → γ → ε} {n : α → β → δ} {m₁ : α → γ → α'} {m₂ : β → γ → β'}
    {n' : α' → β' → ε} (h_distrib : ∀ a b c, m (n a b) c = n' (m₁ a c) (m₂ b c)) :
    map₂ m (map₂ n f g) h ≤ map₂ n' (map₂ m₁ f h) (map₂ m₂ g h) 
goal: Filter.map₂ m (Filter.map₂ n f g) h ≤ Filter.map₂ n' (Filter.map₂ m₁ f h) (Filter.map₂ m₂ g h)

full_name: Filter.map_map₂_antidistrib
code: theorem map_map₂_antidistrib {n : γ → δ} {m' : β' → α' → δ} {n₁ : β → β'} {n₂ : α → α'}
    (h_antidistrib : ∀ a b, n (m a b) = m' (n₁ b) (n₂ a)) :
    (map₂ m f g).map n = map₂ m' (g.map n₁) (f.map n₂) 
goal: Filter.map n (Filter.map₂ m f g) = Filter.map₂ m' (Filter.map n₁ g) (Filter.map n₂ f)

full_name: Filter.map_map₂_antidistrib_left
code: /-- Symmetric statement to `Filter.map₂_map_left_anticomm`. -/
theorem map_map₂_antidistrib_left {n : γ → δ} {m' : β' → α → δ} {n' : β → β'}
    (h_antidistrib : ∀ a b, n (m a b) = m' (n' b) a) : (map₂ m f g).map n = map₂ m' (g.map n') f 
goal: Filter.map n (Filter.map₂ m f g) = Filter.map₂ m' (Filter.map n' g) f

full_name: Filter.map_map₂_antidistrib_right
code: /-- Symmetric statement to `Filter.map_map₂_right_anticomm`. -/
theorem map_map₂_antidistrib_right {n : γ → δ} {m' : β → α' → δ} {n' : α → α'}
    (h_antidistrib : ∀ a b, n (m a b) = m' b (n' a)) : (map₂ m f g).map n = map₂ m' g (f.map n') 
goal: Filter.map n (Filter.map₂ m f g) = Filter.map₂ m' g (Filter.map n' f)

full_name: Filter.map₂_map_left_anticomm
code: /-- Symmetric statement to `Filter.map_map₂_antidistrib_left`. -/
theorem map₂_map_left_anticomm {m : α' → β → γ} {n : α → α'} {m' : β → α → δ} {n' : δ → γ}
    (h_left_anticomm : ∀ a b, m (n a) b = n' (m' b a)) :
    map₂ m (f.map n) g = (map₂ m' g f).map n' 
goal: Filter.map₂ m (Filter.map n f) g = Filter.map n' (Filter.map₂ m' g f)

full_name: Filter.map_map₂_right_anticomm
code: /-- Symmetric statement to `Filter.map_map₂_antidistrib_right`. -/
theorem map_map₂_right_anticomm {m : α → β' → γ} {n : β → β'} {m' : β → α → δ} {n' : δ → γ}
    (h_right_anticomm : ∀ a b, m a (n b) = n' (m' b a)) :
    map₂ m f (g.map n) = (map₂ m' g f).map n' 
goal: Filter.map₂ m f (Filter.map n g) = Filter.map n' (Filter.map₂ m' g f)

full_name: Filter.map₂_left_identity
code: /-- If `a` is a left identity for `f : α → β → β`, then `pure a` is a left identity for
`Filter.map₂ f`. -/
theorem map₂_left_identity {f : α → β → β} {a : α} (h : ∀ b, f a b = b) (l : Filter β) :
    map₂ f (pure a) l = l 
goal: Filter.map₂ f (pure a) l = l

full_name: Filter.map₂_right_identity
code: /-- If `b` is a right identity for `f : α → β → α`, then `pure b` is a right identity for
`Filter.map₂ f`. -/
theorem map₂_right_identity {f : α → β → α} {b : β} (h : ∀ a, f a b = a) (l : Filter α) :
    map₂ f l (pure b) = l 
goal: Filter.map₂ f l (pure b) = l