Zulip Chat Archive

Stream: mathlib4

Topic: orderDual defeq abuse


Kim Morrison (Mar 20 2025 at 00:25):

We still have quite a number of places in Mathlib where we are abusing the defeq of OrderDual.

One that I ran into today was docs#Dense.borel_eq_generateFrom_Ioc_mem_aux. Would anyone be interested in taking a look?

Kim Morrison (Mar 20 2025 at 00:26):

The first convert can be improved to

  convert hd.orderDual.borel_eq_generateFrom_Ico_mem_aux (by simpa using hbot)
    fun x y hlt he => hIoo (ofDual y) (ofDual x) hlt _ using 2

but this is still not right.

One can put seal OrderDual in above the declaration to ensure that defeq abuse is avoided! :-)


Last updated: May 02 2025 at 03:31 UTC