New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fubini's Theorem and its variants in some models of extreals #845
Conversation
My uninformed opinion is that, given option 5's validity, option 3 is the nicest: who wouldn't want I don't understand your third point. I'm not sure that anyone claims you can just pick anything you want in situations like this and have it be harmless. Instead, we can pick certain values with care, and thereby avoid some annoying side conditions, making things “handy”. I'd say your work here is strong support for this! |
But do feel free to write to the HOL, Isabelle and/or Lean mailing lists and invite other opinions... |
Some extra work (irrelevant to Fubini's theorem) in this PR include the following theorem in
Other changes are just moving of definitions to their more appropriated places, e.g. |
In fact, in all models we can formally prove
The actual problem of Model 3 (Mizar) (and also Model 4) is that, associativity doesn't hold. For example, consider
|
Clearly "uninformed" was right! Anyway, given the above as motivation, I think it would be quite reasonable to follow the herd and revert to the old model. |
Model 1 and 2 are equivalently "good" () but I still think there's no reason to assign But, reverting to the old model is very easy: we can just revert the definitions of |
I don't insist at all. It “would be reasonable” to do it; and indeed, the validity of the theorems is demonstration of that. As the author of the theorems, I'm happy to let you make the final call. |
Well... thanks. I hope to keep the current extreal arithmetic definitions, although this means many proofs become more difficult than those in other theorem provers. And think the good side: our proofs can be easily ported to Mizar or Isabelle, where extra assumptions on extreal arithmetics were used. As for the additional antecedents in the present version of Fubini's theorem, I found that it doesn't cause any problem in my own application in probability theory, where the extra requirements are indeed satisfied. There are two possible but divergent future developments:
|
A small correction about Lean. Lean's
|
The arithmetic of infinity is tricky and also paradoxical in nature. I'm not sure what was the thought when Mhamdi was defining the extreal_add_def. I remembered once having a similar discussion to define extread_add as a total function and assign PosInf + NegInf to some meaningful value so to make proofs easier or unload some extra assumptions. It's actually a famous Ross-Littlewood Paradox, which states that subtracting infinitely many times from infinity returns different results depending upon how you subtract it. See some interesting pointers to that and attached file: http://www.suitcaseofdreams.net/Wizard_Mermaid.htm https://en.wikipedia.org/wiki/Ross%E2%80%93Littlewood_paradox |
Hi Michael, please hold this PR, I think I've got a new idea to prove the original Fubini's theorem without extra antecedents. |
Hmmm ... I was thinking that, if the value of However, the problem is that I don't have just Thus I hope the present PR can be merged if there's no problem except for the math statements of Fubini's theorem. As I mentioned already, the extra antecedents do not block my future plan (Law of Large Numbers for I.I.D. r.v.'s). |
But I do like his new definition because it really makes senses. Without having those "forbidden" arithmetics unspecified, the proof engineers have to "be careful" but now (with the present definitions) the proof cannot complete - this is inline with the whole idea of formal verification. |
Of course, I'm happy to take any updates to this if you end up deciding that there is a better way of getting the "right" statement of Fubini's theorem. |
Thanks for merging the PR. Yesterday I got a chance to ask some questions on the Slack of CICM 2020, to Mario Carneiro, current Lean mathlib and (former) Metamath proof engineer. It turns out that Metamath and Mizar both choose Thus there's actually no "herd", only Isabelle and HOL4 (old) choose P. S. I got some new hints from Manuel Eberl of Isabelle as you may have also seen. The difficulty is that, some connections between --Chun [1] http://us.metamath.org/mpeuni/pnfaddmnf.html |
Updates: today I finally finished the following two improved version of
In comparison with the existing corresponding theorems, now there's no restrictions on unspecified arithmetics between I'll submit a new PR once the existing PR #850 get merged (the proof of the above two new theorems depends on the new definition of Regards, Chun Tian |
Hi,
of all the PRs I submitted to HOL so far, this is the most special one (see below for the detailed story).
This PR continues the previous PR #822 and provide a formalization of Fubini's theorem [1, p.143] (or [2, p.126]) for product measure in Lebesgue integrals (as
martingaleTheory.FUBINI
). The original theorem statement (in HOL's notation) is the following:Informally, let
(X,A,u)
and(Y,B,v)
be σ-finite measure spaces, and letf :(Χ,Υ) -> extreal
be (A B)-measurable. If at least one of the three integrals is finite, then all three integrals are finite,f
is L1(u v)-integrable, andx |-> f(x,y)
is L1(u)-integrable forv-a.e. y IN Y
y |-> f(x,y)
is L1(v)-integrable foru-a.e. x IN X
y |-> ∫ (X,A,u) (λx. f (x,y))
is L1(v)-integrable.x |-> ∫ (Y,B,v) (λy. f (x,y))
is L1(u)-integrable.∫ ((X,A,u) × (Y,B,v)) f = ∫ (Y,B,v) (λy. ∫ (X,A,u) (λx. f (x,y))) = ∫ (X,A,u) (λx. ∫ (Y,B,v) (λy. f (x,y)))
Fubini's theorem is supposed to be an easy corollary of Tonelli's theorem, formalized in #822. However, after over a month's efforts, I found that this proof seems impossible, unless I added the following extra antecedents into the theorem:
The reason for the need of the above extra antecedents is that, in the following two lemmas of
borelTheory
andlebesgueTheory
, HOL's current version needs extra antecedents to preventPosInf - PosInf
orPosInf + NegInf
:Then I recall in the old days (
<= K13
), whenPosInf + NegInf = PosInf - PosInf = PosInf
were allowed, the above two lemmas didn't have the extra antecedents, namely:(∀x. x ∈ space a ⇒ f x ≠ −∞ ∧ g x ≠ +∞ ∨ f x ≠ +∞ ∧ g x ≠ −∞)
or(∀x. x ∈ m_space m ⇒ f1 x ≠ +∞ ∨ f2 x ≠ +∞)
. So I tried the following experiments in a separated theory file (examples/probability/fubiniScript.sml
):First of all, since the value of
PosInf + NegInf = PosInf - PosInf = NegInf - NegInf
is unspecified in current HOL'sextrealTheory
, thus assuming any (unique) value shouldn't cause any inconsistency in HOL, and for each value we assumed, we may call it a (non-standard) model of extended reals. The following five models were initially defined:Model 1 corresponds to HOL version
<= K13
, Isabelle, and Lean. Model 2 is the dual version of Model 1 where I letPosInf + NegInf = NegInf
. Model 3 is the one adopted in Mizar's MML (xxreal3.mm
) wherePosInf + NegInf = 0
. Model 4 is a parametrized generalization of Model 3 such thatPosInf + NegInf = Normal r
for any real value r. Finally, Model 5 is a combined version of all previous models such thatPosInf + NegInf
etc. is assigned to any extreal value including PosInf and NegInf.What I have proven is the following: under whatever parameter in Model 5, the original Fubini's theorem holds without any extra antecedents: (the main difficulty is to prove
IN_MEASURABLE_BOREL_SUB
andintegral_add_lemma
under Model 1~4)My conclusion is the following:
It's possible that Fubini's theorem in the pure mathematical sense is wrong, i.e. without some extra antecedents the forbidden extreal arithmetics like
PosInf - PosInf
is inevitable. But I'm not 100% sure for this, until I got confirmed by my probability professor.Fubini's theorem is already formalized in Mizar (see
mesfun13
). And it's possible to formalize Fubini's theorem in its original statements In Isabelle/HOL and Lean. But I'd say all these work will be based on special models of extreal arithmetics wherePosInf + NegInf
, etc. has a determined value.The well-accepted opinions that
PosInf + NegInf = PosInf
andx / 0 = 0
are "harmless" (and especially handy) in formal mathematics, needs to be reconsidered.Regards,
Chun Tian
[1] Schilling, R.L.: Measures, Integrals and Martingales (2nd Edition). Cambridge University Press (2017).
[2] Schilling, R.L.: Measures, Integrals and Martingales. Cambridge University Press (2005).