Zulip Chat Archive

Stream: lean4

Topic: strange proof with ge_iff_le found by exact?


Ted Hwa (May 07 2024 at 16:27):

-- returns exact ge_iff_le
example (n k: Nat)(m: Fin n)(hk: k < n): k, hk  m  k  m := by exact?

It's strange because there are no anywhere in the statement. In fact, just using rfl works.

Kyle Miller (May 07 2024 at 17:45):

a ≥ b is an abbreviation for b ≤ a, so it's not surprising a lemma about would appear, but this does amount to an indirect way to write Iff.rfl

Kyle Miller (May 07 2024 at 17:46):

It's too bad that ge_iff_le is necessary as a lemma. The issue is that, for example, you need to do rw [ge_iff_le] first if you want to rw using a lemma that's in terms of .

Ted Hwa (May 07 2024 at 18:23):

But in the lemma statement, both sides of the iff were to begin with. There was no .

Yaël Dillies (May 07 2024 at 18:25):

Yes, but exact ge_iff_le does work as a proof, which is all exact? cares about

Kyle Miller (May 07 2024 at 18:35):

It care a bit more than that. The deal is that when it searches for proofs, it peeks through abbreviations. To exact?, a ≥ b looks exactly like b ≤ a.


Last updated: May 02 2025 at 03:31 UTC