Zulip Chat Archive

Stream: new members

Topic: function with finite norm


Nicholas Wilson (Nov 01 2023 at 23:32):

how do I formulate the hypothesis that a function f has finite norm?
I have tried ( hi : ∫ x , f x > 0 ∧ ∫ x , f x < ∞) which results in expected token and Real.infinity which results in unknown constant

Eric Wieser (Nov 01 2023 at 23:38):

The ∞ symbol requires open scoped ENNReal, but without an #mwe it's hard to tell whether that will help you

Nicholas Wilson (Nov 01 2023 at 23:44):

pardon my ignorance, what is #mwe what does it do?

Nicholas Wilson (Nov 01 2023 at 23:46):

open ENNReal seems to have worked.

Eric Wieser (Nov 01 2023 at 23:48):

Nicholas Wilson said:

pardon my ignorance, what is #mwe what does it do?

It is a link that you can click

Eric Wieser (Nov 01 2023 at 23:49):

Nicholas Wilson said:

open ENNReal seems to have worked.

It's very likely you have written a vacuous assumption like "the following is finite: the norm, if the norm is finite, else 0 if it is not"

Nicholas Wilson (Nov 01 2023 at 23:55):

It would appear so, it renders ins the info view as hi: ∫ (x : ℝ), f x > 0 ∧ sorryAx Prop true

Eric Wieser (Nov 02 2023 at 00:02):

If sorryAx appears that usual means you have ignored a previous error message

Nicholas Wilson (Nov 02 2023 at 00:06):

Ah, that was a trailing error for unterminated := by I now get

type mismatch
  
has type
  0 : Type
but is expected to have type
   : Type

for the expression (∫ x , f x ) < ∞ )
The example usage

theorem anti_symmetry { f :     } { x y  :  }
    ( hpos : (f x)  0 ) --positive
    ( hi : (  x , (f x) > 0)  ( x , f x ) <  ) --finite integral
    ( hy : y  0)   ( hzge : (f y)  = 0) -- zero on the positive real line
:
     x, ((f x) - f (-x )) = 0 -- total integral is zero
:= by sorry

Nicholas Wilson (Nov 02 2023 at 00:07):

with open ENNReal

Patrick Massot (Nov 02 2023 at 00:15):

You really need to read #mwe and follow instructions there.

Nicholas Wilson (Nov 02 2023 at 01:25):

I don't have a working example because I get an error and there is not much left to remove from that.

Things I have tried that don't work:
changed the Type of f to { f : ℝ → NNReal } doesn't work because failed to synthesize instance NormedAddCommGroup NNReal and can't do integrals on them. Same for ENNReal, EReal.
Trying to coerce the type of ∫ x, f x to ENNReal with ↑(∫ x, f x ) (not sure if I did that correctly though).
Interestingly opening EReal while having ENNReal be not opened gives invalid token error for .

Patrick Massot (Nov 02 2023 at 01:41):

I'm afraid that reading the title of that #mwe webpage is not enough, you also need to read at least the first sentence.

Patrick Massot (Nov 02 2023 at 01:44):

I case you already posted a code snippet such as the one you posted here you can check whether you followed instruction by simply clicking the "View in Lean 4 playground" link that appear in the upper-right corner of the code block. In your case this bring you there where you will see that your snippet isn't a #mwe since it doesn't reproduce the problem you are facing on your computer.


Last updated: Dec 20 2023 at 11:08 UTC