Skip to content
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

Fix some formalizations, provide few Lean rewrites. #245

Merged
merged 5 commits into from
Jan 12, 2025
Merged

Conversation

GeorgeTsoukalas
Copy link
Collaborator

No description provided.

@GeorgeTsoukalas GeorgeTsoukalas force-pushed the george branch 2 times, most recently from 44c11f3 to d2b9722 Compare November 9, 2024 22:46
lean4/src/putnam_1989_b6.lean Outdated Show resolved Hide resolved
lean4/src/putnam_1989_b6.lean Outdated Show resolved Hide resolved
(∀ t ∈ Icc 0 1, P.eval t ∈ Icc 0 1) ∧
(∀ f : ℝ → ℝ,
f 1 = 0 ∧ ContinuousOn f (Icc 0 1) →
𝔼[(↑) ∘ (S f)] = ∫ t in (0)..1, (f t) * (P.eval t)) :=
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separately, I worry that this expected value is incorrect, as it is not conditioning on the fact that x lies within the appropriate region

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that you're right. x does not lie in the appropriate region, and although the S f should be 0 in the extra space, it should still affect the expectation. What's a good workaround? I could write out an integral for the expectation explicitly over the right region.

Copy link
Contributor

@ocfnash ocfnash Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is an n + 2-dimensional integral instead of an n-dimensional one. Indeed, the infoview confirms that the measure used for this expectation is (volume : Measure <| Fin (n + 2) → Icc (0 : ℝ) 1). Since S f is zero almost everywhere in this region (where we fail to have x 0 = 0 ∧ x (-1) = 1) I believe this expectation is zero.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some time this morning so I'll see if I can write a formalisation which avoids the issues identified.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the following is correct:

theorem putnam_1989_b6
    (n : ℕ) [NeZero n]
    (I : (Fin n → ℝ) → Fin (n + 2) → ℝ)
    (I_def : ∀ x i, I x i = if i = 0 then 0 else if i = - 1 then 1 else x (i : ℕ).pred)
    (X : Set (Fin n → ℝ))
    (X_def : ∀ x, x ∈ X ↔ 0 < x 0 ∧ x (-1) < 1 ∧ ∀ i, i + 1 < n → x i < x (i + 1))
    (S : (ℝ → ℝ) → (Fin (n + 2) → ℝ) → ℝ)
    (S_def : ∀ f x, S f x = ∑ i in Finset.Iic n, (x (i + 1) - x i) * f (i + 1)) :
    ∃ P : Polynomial ℝ,
      P.degree = n ∧
      (∀ t ∈ Icc 0 1, P.eval t ∈ Icc 0 1) ∧
      (∀ f : ℝ → ℝ, f 1 = 0 → ContinuousOn f (Icc 0 1) →
        ∫ x, S f (I x) ∂ℙ[|X] = ∫ t in (0)..1, f t * P.eval t) :=
  sorry

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks right to me as well - I will update the PR. Thank you for providing a fix!

@GeorgeTsoukalas GeorgeTsoukalas merged commit 5a81e8a into main Jan 12, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants