English
Same as above: the additive relation between filters holds for any p and q.
Русский
Как выше: аддитивность фильтров справедлива для любых p и q.
LaTeX
$$$\\mathrm{filter}_p(s) + \\mathrm{filter}_q(s) = \\mathrm{filter}_{\\lambda a. (p(a) \\lor q(a))}(s) + \\mathrm{filter}_{\\lambda a. (p(a) \\land q(a))}(s)$$$
Lean4
theorem filter_add_filter (q) [DecidablePred q] (s : Multiset α) :
filter p s + filter q s = filter (fun a => p a ∨ q a) s + filter (fun a => p a ∧ q a) s :=
Multiset.induction_on s rfl fun a s IH => by by_cases p a <;> by_cases q a <;> simp [*]