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 few minor Lean misformalisations #210

Merged
merged 8 commits into from
Sep 9, 2024

Conversation

ocfnash
Copy link
Contributor

@ocfnash ocfnash commented Sep 4, 2024

No description provided.

This was disprovable because the key predicate did not quantify over all
groups (and the goal was false even for the trivial group).
The original form was disprovable because of quantifier confusion (e.g.,
taking `x` and `y` to be non-zero and constant gave a contradiction).
This was disprovable because the argument `ha : SDiff (Finset a)`
allowed the user to fill in any function for the set difference
function. So for example by providing a dummy set difference function
that just always returned the empty set, the goal was false.

Presumably this error arose because the original formaliser found that
they could not use the existing set difference function out of the box.
The right fix is either to put `open Classical` before the proof or to
add the typeclass argument `[DecidableEq a]`.

In the end I have provided rewrite since the original formalisation is
a bit more complicated than it needs to be.
This was disprovable because it did not restrict `x` and `y` to the
positive quadrant. The informal statement is quite sloppy in this same
sense (presumably because non-integral powers of negative reals are
not defined).

I have also proposed changing the implementation of "tangent to the
curve" since a priori a line could intersect a degree `m` curve in up
to `m` points so the naive set-counting definition is arguably too
strong.
This was disprovable because the hypothesis `apos : a > 0` means that
`0 ≤ a n` for all `n` and there exists some `n` such that `0 < a n`.
(So the sequence: 1, 0, 0, 0, 0, ... was admissible and provided a
counter example to the statement.)
This was previously "fixed" in c75c0b0
but unfortunately an error remained.
This was disprovable because of a minor Mathlib footgun: namely the
limsup of a real-valued function which is not bounded above is zero.
This was disprovable because the zero function was excluded from the
solution set. The fix is to replace `a > 0` with `a ≥ 0` in the
solution. Other changes are just style.

There is incidentally a sharper version of this question which requires
establishing which solutions correspond to functions with finite /
infinite domain. However this is not actually asked.
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.

All proposed modifications look good to me. Beyond corrections to misformalizations, the new modifications are also easy on the eyes. Thanks for the contribution!

@GeorgeTsoukalas GeorgeTsoukalas merged commit fd87a6d into trishullab:main Sep 9, 2024
1 check passed
@ocfnash ocfnash deleted the fixes_20240904 branch September 10, 2024 09:25
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.

2 participants