Skip to content

[Merged by Bors] - feat(ModelTheory): iExsUnique#20175

Closed
ChrisHughes24 wants to merge 21 commits intomasterfrom
iExsUnique
Closed

[Merged by Bors] - feat(ModelTheory): iExsUnique#20175
ChrisHughes24 wants to merge 21 commits intomasterfrom
iExsUnique

Conversation

@ChrisHughes24
Copy link
Copy Markdown
Member

@ChrisHughes24 ChrisHughes24 commented Dec 22, 2024

@ChrisHughes24 ChrisHughes24 added the t-logic Logic (model theory, etc) label Dec 22, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 22, 2024

please_merge_master.md

@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Dec 22, 2024
@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Dec 23, 2024
@leanprover-community-bot-assistant leanprover-community-bot-assistant removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Dec 23, 2024
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Jan 2, 2025
@mathlib4-dependent-issues-bot
Copy link
Copy Markdown
Collaborator

@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jan 2, 2025
@leanprover-community-bot-assistant leanprover-community-bot-assistant removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jan 2, 2025
Comment on lines +775 to +781
/-- take the disjunction of finitely many formulas -/
noncomputable def iSup [Finite α] (f : α → L.Formula β) : L.Formula β :=
BoundedFormula.iSup f

/-- take the conjunction of finitely many formulas -/
noncomputable def iInf [Finite α] (f : α → L.Formula β) : L.Formula β :=
BoundedFormula.iInf f
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need this? Formula is an abbrev for BoundedFormula, so BoundedFormula.iSup/BoundedFormula.iInf does everything you new definitions already do (and your new definitions aren't abbrevs)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't know. Personally I think that the current BoundedFormula and Formula duplication is quite annoying but so far we do seem to have been duplicating a lot of things (but the library is not completely consistent). BoundedFormula can be a bit anooying to use when reasoning about semantics because for a BoundedFormula L α 0 you have this term Fin 0 -> M at the end when you use BoundedFormula.realize which are always equal obviously, but not necessarily definitionally equal.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The best long term solution in my view is probably to claim that BoundedFormula is just an implementation detail and we should basically always be using Formula and we just have to introduce a single variable all and ex on formulas and the exact type of these definitions I'm not sure of. I don't have a strong opinion on any temporary fix before that.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I agree that there's some major cleanup that needs to happen in the long term - I wish I had a concrete suggestion for how it should go.

In the meantime, do you have a use case for iSup or iInf for Formulas as opposed to BoundedFormulas? Is it possible that we could even remove the BoundedFormula version and just work with Formulas now?

I'm personally fine having both if there's actual code that works better that way while awaiting a good general solution to duplication.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I almost never used BoundedFormula, I think mainly because I was very rarely quantifying over a single variable, it was always over an arbitrary finite number of variables.

A use case for iInf is the statement of Ax Grothendieck. It's about injectivity and surjectivity of maps K^n -> K^n and I needed iInf to state equality of elements of K^n

@YaelDillies YaelDillies added the awaiting-author A reviewer has asked the author a question or requested changes. label Feb 10, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 12, 2025

PR summary 6efb7e98c4

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ _root_.FirstOrder.Language.Formula.realize_iExsUnique
+ iExsUnique
+ realize_iExsUnique

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@awainverse
Copy link
Copy Markdown
Contributor

It looks to me that the iAlls and iExs work is all totally reasonable - I've left a note about the iSup and iInf.

@YaelDillies
Copy link
Copy Markdown
Contributor

YaelDillies commented Feb 15, 2025

It looks to me that the iAlls and iExs work is all totally reasonable - I've left a note about the iSup and iInf.

@ChrisHughes24 do you maybe want to split iSup/iInf to their own PR?

@ChrisHughes24 ChrisHughes24 removed the awaiting-author A reviewer has asked the author a question or requested changes. label Feb 16, 2025
Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

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

Thanks!

maintainer delegate

@github-actions
Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by YaelDillies.

@github-actions github-actions bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Feb 16, 2025
Copy link
Copy Markdown
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks 🎉

bors merge

@ghost ghost added ready-to-merge This PR has been sent to bors. and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Feb 17, 2025
mathlib-bors bot pushed a commit that referenced this pull request Feb 17, 2025
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Feb 17, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(ModelTheory): iExsUnique [Merged by Bors] - feat(ModelTheory): iExsUnique Feb 17, 2025
@mathlib-bors mathlib-bors bot closed this Feb 17, 2025
@mathlib-bors mathlib-bors bot deleted the iExsUnique branch February 17, 2025 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-logic Logic (model theory, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants