Zulip Chat Archive

Stream: new members

Topic: Having trouble proving something elementary in ENNReal


Alex Zani (Apr 16 2025 at 01:40):

I'm trying to prove this elementary thing in ENNReal and I can't figure out how.

def p : 0 := 0.5
theorem h : p  1 := by
  unfold p
  have hp : p   := by unfold p; exact Ne.symm (ne_of_beq_false rfl)
  lift p to  using hp

I tried lifting p to the reals, but that doesn't work. (I assume because p is bound)
I was able to figure things out if I defined p this way:

def p : 0 := ENNReal.ofReal 0.5

but that feels like it shouldn't be necessary.

Aaron Liu (Apr 16 2025 at 01:44):

does norm_num work?

Alex Zani (Apr 16 2025 at 01:48):

Aaron Liu said:

does norm_num work?

Nope. It does nothing.

Aaron Liu (Apr 16 2025 at 01:54):

Someone should write a norm_num extension for ENNReal

Eric Wieser (Apr 16 2025 at 02:09):

Not possible, norm_num only supports division in division rings not division semirings

Eric Wieser (Apr 16 2025 at 02:10):

Unless you revive #9915

Aaron Liu (Apr 16 2025 at 02:17):

Should I revive #9915?

Aaron Liu (Apr 16 2025 at 02:18):

It seems to be over a year old

Kevin Buzzard (Apr 16 2025 at 05:49):

(deleted)

Notification Bot (Apr 16 2025 at 09:43):

This topic was moved here from #lean4 > Having trouble proving something elementary in ENNReal by Kevin Buzzard.

Kevin Buzzard (Apr 16 2025 at 09:44):

@Alex Zani the #lean4 channel is for questions about core Lean itself, not questions which involve mathlib. Your question would be easier to answer if you wrote it as a #mwe .

Eric Wieser (Apr 16 2025 at 09:49):

Aaron Liu said:

Should I revive #9915?

It needs reviving, but I think Mario and I had some private conversation about it that I probably should find and share first, to save you making the same mistakes


Last updated: May 02 2025 at 03:31 UTC