Zulip Chat Archive

Stream: mathlib4

Topic: Ambiguous ⋂₀ notation (ZFC) and binrel elaborators


Eric Wieser (Nov 21 2024 at 13:30):

In the following example, ⋂₀ seems to sometimes get confused about whether it's the docs#Set.sInter or docs#Class.sInter operator.

What's particularly weird is that this seems to only be a problem when inside =; it elaborates just fine with Eq or directly:

-- imported to create ambiguity; all the examples below want the `Set` version
import Mathlib.SetTheory.ZFC.Basic

-- works as a top-level term
def foo : (Set   Prop)  Set  :=
  fun P => ⋂₀ setOf P

-- does not work in a equality
def IsFoo (foo : (Set   Prop)  Set ) : Prop :=
  foo = fun P => ⋂₀ setOf P

-- unless we avoid using notation!
def IsFoo2 (foo : (Set   Prop)  Set ) : Prop :=
  Eq foo (fun P => ⋂₀ setOf P)

Eric Wieser (Nov 21 2024 at 13:34):

Should Class.sInter be scoped to avoid this issue for users of import Mathlib who don't care about ZFC?

Eric Wieser (Nov 21 2024 at 13:35):

Or is there some way to fix this so that the ambiguity never arises?

Violeta Hernández (Nov 22 2024 at 01:38):

Eric Wieser said:

Should Class.sInter be scoped to avoid this issue for users of import Mathlib who don't care about ZFC?

This is a problem even for users who care about ZFC, since it also clashes with docs#ZFSet.sInter


Last updated: May 02 2025 at 03:31 UTC