Zulip Chat Archive
Stream: general
Topic: simp unfolding `has_mem` for filters
Yury G. Kudryashov (Oct 27 2020 at 20:26):
simp only
with no lemmas unfolds s ∈ f
to s in f.sets
. How can I prevent this?
Mario Carneiro (Oct 27 2020 at 20:29):
what does simplify.rewrite
say?
Yury G. Kudryashov (Oct 27 2020 at 20:42):
#mwe:
import order.filter.basic
open filter
set_option trace.simplify.rewrite true
example (f₁ f₂ : filter ℕ) (s : set ℕ) : s ∈ f₁ ⊔ f₂ := by { simp only [mem_sup_sets], }
Output:
6:62: 0. [simplify.rewrite] [filter.mem_sup_sets]: s ∈ (f₁ ⊔ f₂).sets ==> s ∈ f₁ ∧ s ∈ f₂
Yury G. Kudryashov (Oct 27 2020 at 20:43):
Tactic state after simp
shows .sets
Mario Carneiro (Oct 27 2020 at 20:47):
By process of elimination, setting {proj := ff}
turns off the behavior
Mario Carneiro (Oct 27 2020 at 20:51):
The problem is that filter.has_mem
is marked @[reducible]
Yury G. Kudryashov (Oct 27 2020 at 20:53):
I'll try to remove this.
Last updated: Dec 20 2023 at 11:08 UTC