feat: multiplicative automatic continuity on ℝ#40973
Conversation
Welcome new contributor!Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests. We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR. Thank you again for joining our community. |
PR summary 361bcd9ea7Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
|
LLM-generated |
|
Does it work if you combine In any case, I suspect the current code needs massive cleanup before reviewers are interested in it |
I think it doesn't work, I tried: import Mathlib.MeasureTheory.Measure.Haar.NormedSpace
open MeasureTheory
-- (A) Required codomain instances, general 𝕜:
example {𝕜 : Type*} [RCLike 𝕜] : SeminormedAddCommGroup (Additive 𝕜ˣ) := inferInstance
example {𝕜 : Type*} [RCLike 𝕜] : NormedSpace ℝ (Additive 𝕜ˣ) := inferInstance
-- (B) Concretely at 𝕜 = ℂ and 𝕜 = ℝ:
example : SeminormedAddCommGroup (Additive ℂˣ) := inferInstance
example : NormedSpace ℝ (Additive ℂˣ) := inferInstance
example : NormedSpace ℝ (Additive ℝˣ) := inferInstance
-- (C) The full reduction: bundle a measurable multiplicative `f : ℝ → 𝕜ˣ` as
-- `ℝ →+ Additive 𝕜ˣ` and feed it to the additive theorem. (Side proof
-- obligations are `sorry`; we only care whether the theorem can apply.)
example {𝕜 : Type*} [RCLike 𝕜] [MeasurableSpace 𝕜] [BorelSpace 𝕜]
{f : ℝ → 𝕜ˣ} (hmeas : Measurable f)
(hmul : ∀ x y, f (x + y) = f x * f y) : Continuous f := by
let F : ℝ →+ Additive 𝕜ˣ :=
{ toFun := fun x => Additive.ofMul (f x)
map_zero' := by sorry
map_add' := by sorry }
have hcont : Continuous F :=
MeasureTheory.Measure.AddMonoidHom.continuous_of_measurable F (by sorry)
sorryand get: $ lake env lean combine_experiment.lean
combine_experiment.lean:6:73: error(lean.synthInstanceFailed): failed to synthesize instance of type class
SeminormedAddCommGroup (Additive 𝕜ˣ)
Hint: Type class instance resolution failures can be inspected with the `set_option trace.Meta.synthInstance true` command.
combine_experiment.lean:7:33: error(lean.synthInstanceFailed): failed to synthesize instance of type class
SeminormedAddCommGroup (Additive 𝕜ˣ)
Hint: Type class instance resolution failures can be inspected with the `set_option trace.Meta.synthInstance true` command.
combine_experiment.lean:10:50: error(lean.synthInstanceFailed): failed to synthesize instance of type class
SeminormedAddCommGroup (Additive ℂˣ)
Hint: Type class instance resolution failures can be inspected with the `set_option trace.Meta.synthInstance true` command.
combine_experiment.lean:11:10: error(lean.synthInstanceFailed): failed to synthesize instance of type class
SeminormedAddCommGroup (Additive ℂˣ)
Hint: Type class instance resolution failures can be inspected with the `set_option trace.Meta.synthInstance true` command.
combine_experiment.lean:12:10: error(lean.synthInstanceFailed): failed to synthesize instance of type class
SeminormedAddCommGroup (Additive ℝˣ)
Hint: Type class instance resolution failures can be inspected with the `set_option trace.Meta.synthInstance true` command.
combine_experiment.lean:25:4: error: Type mismatch
Measure.AddMonoidHom.continuous_of_measurable ?m.53 sorry
has type
Continuous ⇑?m.53
but is expected to have type
Continuous ⇑FThe reason is that |
|
I recommend splitting the change in Mathlib/MeasureTheory/Integral/IntervalIntegral/LebesgueDifferentiationThm.lean to a new PR as it is possibly less controversial and can probably go through faster review |
Good idea, I posted it here: #40976 I also based on your previous comment I cleaned up this PR a little bit in b33bec6, I didn't need the If you point me roughly what kind of areas to focus on to clean it up --- the theorems themselves, or their proofs, or the theorem assumptions, etc., I'll do it. |
wwylele
left a comment
There was a problem hiding this comment.
Here is an example how to make the proof more natural and less like AI-generated. I personally call them have-folding and have-inverting. The goal is to have as little indentation as possible, by inlining haves, or rearange proof order so that the big chunk of have proof becomes the main proof body. Here, I noticed that we are converting the goal to Continuous fun s ↦ (F (s + a) - F s) / F a , which itself has a very short proof (I also shortened it to fun_prop), so that comes first. I then use convert to say "it now suffices to show f and Continuous fun s ↦ (F (s + a) - F s) / F a are equal, so what was previously in a large have block is now the only main goal
Generalize both interval-version Lebesgue differentiation theorems `LocallyIntegrable.ae_hasDerivAt_integral` and `IntervalIntegrable.ae_hasDerivAt_integral` from real-valued functions `f : ℝ → ℝ` to functions `f : ℝ → E` valued in a Banach space `E`. The existing proof already goes through the vector-valued averaging theorem `VitaliFamily.ae_tendsto_average`, so the only change is replacing scalar multiplication `*` by `•` in the slope computation. This is a prerequisite for #40973. AI usage disclosure: I used Claude Opus 4.8 to implement this and manually tested it with the other PR and my other separate project.
|
This pull request has conflicts, please merge |
b33bec6 to
e14415f
Compare
…ative maps on ℝ Prove that a Borel-measurable solution of the multiplicative Cauchy functional equation on `ℝ` is continuous: a measurable `f : ℝ → 𝕜` (`RCLike 𝕜`) with `f (x + y) = f x * f y` is automatically continuous. This is the multiplicative companion of the additive automatic-continuity theorem `MeasureTheory.Measure.AddMonoidHom.continuous_of_measurable`. The main results are `continuous_of_measurable_of_mul` (for `f : ℝ → 𝕜`), `continuous_of_measurable_of_mul_units` (for `f : ℝ → 𝕜ˣ`), and `AddChar.continuous_of_measurable` (for a character `ψ : AddChar ℝ 𝕜`). The modulus `t ↦ ‖f t‖` is multiplicative, so `t ↦ Real.log ‖f t‖` is additive and continuous by the additive theorem; the phase is then recovered from the continuous primitive of `f` via the Lebesgue differentiation theorem and a sliding-window identity.
e14415f to
e90b593
Compare
…uity proof Prove `Continuous fun s ↦ (F (s + a) - F s) / F a` directly with `fun_prop`, then `convert` to it so the sliding-window identity becomes the main goal rather than a nested `∀ s` `have`. This drops the explicit `Continuous.comp` / `Continuous.div_const` term and a level of indentation. Co-authored-by: wwylele <4592895+wwylele@users.noreply.github.com>
This PR adds the multiplicative companion of the existing additive automatic-continuity theorem
AddMonoidHom.continuous_of_measurable. See the git commit descriptions for all the details.Depends on #40976.
AI usage disclosure: I used Claude Opus 4.8 to create the theorems and proofs in my own Lean project, then extracted them into this PR since I think they are general purpose and would be useful for other people. I iterated on the proofs until they are as simple as I could get them. I am new to Lean, so if something should be reworked, please let me know. Lean is amazing, I was able to use it to prove various theorems and check my derivations. This is my little contribution back to the project.