Zulip Chat Archive

Stream: mathlib4

Topic: bug in refine or apply_fun


Yury G. Kudryashov (Feb 14 2023 at 23:32):

This #mwe doesn't work:

import Mathlib.Tactic.ApplyFun

example :  m n : , m = n  (m < 2) = (n < 2) := by
  refine fun m n h => ?_
  apply_fun (· < 2) at h

Yury G. Kudryashov (Feb 14 2023 at 23:32):

This #mwe works:

import Mathlib.Tactic.ApplyFun

example :  m n : , m = n  (m < 2) = (n < 2) := by
  intro m n h
  apply_fun (· < 2) at h
  exact h

Yury G. Kudryashov (Feb 14 2023 at 23:33):

@Mario Carneiro Is this a missing withMainContext again? If yes, in which tactic?

Yury G. Kudryashov (Feb 14 2023 at 23:33):

How does refine fun m n h => ?_ differ from intro m n h?

Mario Carneiro (Feb 14 2023 at 23:34):

more like a missing instantiateMVars

Mario Carneiro (Feb 14 2023 at 23:34):

probably in apply_fun

Mario Carneiro (Feb 14 2023 at 23:34):

does it say it's not an equality?

Mario Carneiro (Feb 14 2023 at 23:38):

!4#2291

Yury G. Kudryashov (Feb 14 2023 at 23:41):

Yes. In fact, it doesn't know that h is a variable.


Last updated: Dec 20 2023 at 11:08 UTC