Skip to content

Commit 00efa9f

Browse files
committed
feat(Filter/Prod): add comap_prodMap_prod (#16564)
1 parent 720235a commit 00efa9f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Mathlib/Order/Filter/Prod.lean

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ protected def prod (f : Filter α) (g : Filter β) : Filter (α × β) :=
5454
instance instSProd : SProd (Filter α) (Filter β) (Filter (α × β)) where
5555
sprod := Filter.prod
5656

57+
theorem prod_eq_inf (f : Filter α) (g : Filter β) : f ×ˢ g = f.comap Prod.fst ⊓ g.comap Prod.snd :=
58+
rfl
59+
5760
theorem prod_mem_prod (hs : s ∈ f) (ht : t ∈ g) : s ×ˢ t ∈ f ×ˢ g :=
5861
inter_mem_inf (preimage_mem_comap hs) (preimage_mem_comap ht)
5962

@@ -99,6 +102,10 @@ theorem comap_prod (f : α → β × γ) (b : Filter β) (c : Filter γ) :
99102
comap f (b ×ˢ c) = comap (Prod.fst ∘ f) b ⊓ comap (Prod.snd ∘ f) c := by
100103
erw [comap_inf, Filter.comap_comap, Filter.comap_comap]
101104

105+
theorem comap_prodMap_prod (f : α → β) (g : γ → δ) (lb : Filter β) (ld : Filter δ) :
106+
comap (Prod.map f g) (lb ×ˢ ld) = comap f lb ×ˢ comap g ld := by
107+
simp [prod_eq_inf, comap_comap, Function.comp_def]
108+
102109
theorem prod_top : f ×ˢ (⊤ : Filter β) = f.comap Prod.fst := by
103110
dsimp only [SProd.sprod]
104111
rw [Filter.prod, comap_top, inf_top_eq]

0 commit comments

Comments
 (0)