Zulip Chat Archive

Stream: general

Topic: regression of `exact?`


Asei Inoue (Dec 16 2025 at 13:05):

in v4.26.0 this code suggest exact h1

example (P : Prop) (h1 : P) (h2 : P) : P := by
  exact? using h1

but in v4.27.0-rc1 it suggests exact ((fun a => h1) ∘ fun a => P) P

Asei Inoue (Dec 16 2025 at 13:05):

this suggestion is too much complicated...

Ruben Van de Velde (Dec 16 2025 at 13:08):

Probably this is due to the "significant changes to the behaviour of exact? and apply?" that Kim Morrison mentioned. Do you want to file an issue?

Damiano Testa (Dec 16 2025 at 13:09):

With exact? +all using h1 you do get more options.

Asei Inoue (Dec 16 2025 at 13:09):

I want to file an issue

Damiano Testa (Dec 16 2025 at 13:09):

Although the closest you get is id h1.

Damiano Testa (Dec 16 2025 at 13:10):

((fun a => h1) ∘ fun a => P) P -- the terms that look reasonable to computers...

Ruben Van de Velde (Dec 16 2025 at 13:12):

AI will save us

Asei Inoue (Dec 16 2025 at 13:14):

another example:

example (P Q : Prop) (h : P  Q) (hP : P) : Q := by
  exact? -- suggest `exact (h ∘ fun a => hP) P` instead of `exact h hP`

Kim Morrison (Dec 20 2025 at 00:32):

@Asei Inoue, this is not what exact? is for. If you want solutions like those use try? or show_term solve_by_elim.

Nick_adfor (Dec 20 2025 at 02:59):

Asei Inoue said:

this suggestion is too much complicated...

Different versions recommend different fixes without clarifying why a particular one is the default. When you update, the old default might break, forcing you to find a new fix through a new "exact?". It's mostly based on experience—I don't have a specific example, as it's just something that happens occasionally.


Last updated: Dec 20 2025 at 21:32 UTC