Zulip Chat Archive

Stream: lean4

Topic: simp_all behavior


Xavier Généreux (Nov 17 2025 at 18:35):

Hi everyone,

I use simp_all a lot, usually via aesop. Today, I encountered the following behavior which I am having a hard time understanding.

See here.

Could someone help me understand what is happening here?
Thanks!

Riccardo Brasca (Nov 17 2025 at 19:13):

simp_all only [P] tranforms h into True → True, that is sospicius...

Riccardo Brasca (Nov 17 2025 at 19:14):

There must a stupid thing that confuses us (us = humans)

Riccardo Brasca (Nov 17 2025 at 19:18):

Maybe what it does is that it realizes p 0 is true, so also P 1, and now it has lost the implication

Jakub Nowak (Nov 17 2025 at 19:22):

example (h : p 0  P 1) (h0 : P 0) : p 4 := by
  have h1 : P 1 := by sorry
  simp_all only [P]

Like this it also removes h1 : P 1.

Riccardo Brasca (Nov 17 2025 at 19:23):

It looks like a bug

Jakub Nowak (Nov 17 2025 at 19:25):

I looks like simp_all used used h and h0 to realize p 1 is True. The bug is in the fact, that it completely got rid of p 1 assumption.

Xavier Généreux (Nov 17 2025 at 20:09):

Yes I don't understand why P 1 gets transformed into True.

Riccardo Brasca (Nov 17 2025 at 20:10):

Well, this happens often with simp calls. I guess it also transforms x = x into True, or something similar.

Jakub Nowak (Nov 17 2025 at 20:36):

But p 1 is not universally true like x = x. That's not the same. Here h h0 is a proof of p 1. The bug is that simp_all simplified h to True using h h0, without adding h h0 to the context.

Aaron Liu (Nov 17 2025 at 20:43):

It used the assumption to simplify itself

Riccardo Brasca (Nov 17 2025 at 21:10):

Yes, I totally agree it's a bug

Kim Morrison (Nov 19 2025 at 07:18):

Could you please write this up as an issue?

Xavier Généreux (Nov 20 2025 at 16:20):

See 11291


Last updated: Dec 20 2025 at 21:32 UTC