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 a misformalization of putnam_2022_b1 #227

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

eric-wieser
Copy link
Contributor

This falsely stated that exp had a finite polynomial expansion.

This also cleans up the spelling of "with integer coefficients".

This falsely stated that exp had a finite polynomial expansion.

This also cleans up the spelling of "with integer coefficients".
(Pconst : P.coeff 0 = 0)
(Pdegree : P.degree = n)
(Podd : Odd (P.coeff 1))
(hB : ∀ x : ℝ, HasSum (fun i => b i * x ^ i) (Real.exp (aeval x P))) :
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think there might be a preferred spelling of this with PowerSeries or FormalMultilinearSeries, but I couldn't work it out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ocfnash, do you think HasSum or tsum is better here?

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 a mild preference for HasSum here but either is fine.

@GeorgeTsoukalas
Copy link
Collaborator

I actually caught this one yesterday! See #225. Which spelling do you think is better?

@eric-wieser
Copy link
Contributor Author

Ah, nice! I guess either spelling is probably fine, though tsum is slightly riskier in general since on non-summable series it is zero.

@GeorgeTsoukalas
Copy link
Collaborator

Good point. I can remove that commit from my PR and merge this one instead, if you'd like. I tend to prefer the changes in here (and the comment you had about 'B' -> 'b' is already applied here).

(b : ℕ → ℝ)
(npos : n ≥ 1)
(Pconst : P.coeff 0 = 0)
(Pdegree : P.degree = n)
Copy link
Contributor

@ocfnash ocfnash Oct 14, 2024

Choose a reason for hiding this comment

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

You could drop n entirely and this too:

Suggested change
(Pdegree : P.degree = n)

Even Lean agrees (warning ugly proof):

example (P : Polynomial ℤ) (h : Odd (P.coeff 1)) :
    0 < P.degree := by
  have h0 : ¬ Odd (0 : ℤ) := by simp [← Int.not_even_iff_odd, not_not]
  have hP : 0 ≤ P.degree := by
    rw [Polynomial.zero_le_degree_iff]
    rintro rfl
    rw [Polynomial.coeff_zero] at h
    contradiction
  suffices P.degree ≠ 0 from lt_of_le_of_ne hP this.symm
  rintro contra
  rw [Polynomial.eq_C_of_degree_eq_zero contra, Polynomial.coeff_C_succ] at h
  contradiction

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I guess the question is whether including n makes this a more literal translation.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it can be dropped, I would say the informal statement mostly uses it to describe the form of a polynomial which is unnecessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Collaborator

@GeorgeTsoukalas GeorgeTsoukalas left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution, Eric!

@GeorgeTsoukalas GeorgeTsoukalas merged commit 6dfeea6 into trishullab:main Oct 15, 2024
1 check 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