Zulip Chat Archive

Stream: mathlib4

Topic: zify broken?


Scott Morrison (Dec 01 2022 at 02:39):

@Moritz Doll, it seems we're missing some of the zify_simps lemmas. The example from the zify doc-string isn't working:

example (a b c x y z : ) (h : ¬ x*y*z < 0) : c < a + 3*b := by
  zify
  zify at h

Scott Morrison (Dec 01 2022 at 02:39):

The state should be

  h : ¬↑x * y * z < 0
   c < a + 3 * b

Scott Morrison (Dec 01 2022 at 02:39):

but it is

h: ¬↑(x * y * z) < 0
 c < a + (3 * b)

Scott Morrison (Dec 01 2022 at 02:40):

I guess this is push_cast lemmas missing, not zify_simps.

Moritz Doll (Dec 01 2022 at 02:40):

I would suspect that this is a push_cast problem, not specific to zify

Scott Morrison (Dec 01 2022 at 02:52):

Indeed, found missing @[norm_cast] attributes in an ad-hoc ported file.

Scott Morrison (Nov 06 2023 at 08:25):

Interesting, this is broken again/still:

import Mathlib.Tactic.Zify
import Mathlib.Data.Int.Basic
import Std.Tactic.GuardExpr

example (a b : ) : a < 2 * b := by
  zify
  -- goal is: `↑a < ↑(2 * b)`
  push_cast
  -- goal is: `↑a < ↑(2 * b)`
  guard_target = (a : Int) < 2 * (b : Int)
  -- fails with: `target of main goal is ↑a < ↑(2 * b), not ↑a < 2 * ↑b`

Does anyone know what's going on here?

Scott Morrison (Nov 06 2023 at 08:26):

Has it been broken all the time since I noticed this last December?

Scott Morrison (Nov 06 2023 at 08:31):

Oh, I'm an idiot. Apparently I fixed this problem last night when upstreaming norm_cast to Std.

Scott Morrison (Nov 06 2023 at 08:31):

Who knows if Mathlib is compatible with the version I upstreamed, however. I guess I better check that.

Scott Morrison (Nov 06 2023 at 08:32):

std#351

Scott Morrison (Nov 06 2023 at 09:06):

Seems fine: #8222


Last updated: Dec 20 2023 at 11:08 UTC