Skip to content

chore: attribute [induction_eliminator] - #12605

Closed
astrainfinita wants to merge 22 commits into
masterfrom
FR_induction
Closed

astrainfinita wants to merge 22 commits into
masterfrom
FR_induction

Conversation

@astrainfinita

@astrainfinita astrainfinita commented May 2, 2024 •

Copy link
Copy Markdown
Collaborator

Add attribute [induction_eliminator] to
AdjoinRoot.induction_on
ENat.recTopCoe
ENNReal.recTopCoe
Finset.induction
Magma.AssocQuotient.induction_on
ManyOneDegree.ind_on
Module.Ray.ind (and add Orientation.ind for Orientation, an abbrev of it. I wish that we do not need to add it in the future.)
Multiset.induction
MvPolynomial.induction_on
OnePoint.rec
Opposite.rec'
Ordinal.limitRecOn
PartENat.casesOn
Polynomial.induction_on'
QuotientAddGroup.induction_on' (and add AddCircle.induction_on for AddCircle, an abbrev of it. I wish that we do not need to add it in the future.)
QuotientGroup.induction_on' (doesn't actually work)
Real.Angle.induction_on
SimplexCategory.rec
Trunc.induction_on


Open in Gitpod

@astrainfinita astrainfinita added the WIP Work in progress label May 2, 2024
theorem map_id : map (MulHom.id α) = MonoidHom.id (WithOne α) := by
ext x
induction x using WithOne.cases_on <;> rfl
induction x <;> rfl

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We have WithOne.recOneCoe and WithZero.recZeroCoe. Can we just remove WithOne.cases_on and WithZero.cases_on?

@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label May 3, 2024
@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label May 15, 2024
@astrainfinita astrainfinita added awaiting-review awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. and removed WIP Work in progress labels May 16, 2024
@github-actions github-actions Bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label May 16, 2024
@urkud

urkud commented May 19, 2024

Copy link
Copy Markdown
Member

Does it make induction use these theorems by default? Should Finset default to cons_induction?

@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label May 20, 2024
@eric-wieser

Copy link
Copy Markdown
Member

193 files is pretty large to review; can this be split? I've made #13096 for the really basic WithX cases.

@eric-wieser

Copy link
Copy Markdown
Member

Another good split would be all the Free constructions.

@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label May 21, 2024
mathlib-bors Bot pushed a commit that referenced this pull request May 22, 2024
This is a smaller version of #12605.

This allows `using` to be dropped from `induction`.
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label May 22, 2024
kbuzzard pushed a commit that referenced this pull request Jun 26, 2024
kbuzzard pushed a commit that referenced this pull request Jun 26, 2024
…ects (#14135)

Namely, for

* `FreeMagma` / `FreeAddMagma`
* `FreeSemigroup` / `FreeAddSemigroup`
* `FreeMonoid` / `FreeAddMonoid`
* `FreeCommRing`
* `FreeAlgebra`

Split from #12605


Co-authored-by: negiizhao <[email protected]>
kbuzzard pushed a commit that referenced this pull request Jun 26, 2024
…on`} with `induction` and `cases` (#14132)

Spit from #12605, which picked up some conflicts here.

Co-authored-by: negiizhao [[email protected]](mailto:[email protected])
@eric-wieser

Copy link
Copy Markdown
Member

QuotientGroup.induction_on' (doesn't actually work)

leanprover/lean4#4577

mathlib-bors Bot pushed a commit that referenced this pull request Jun 30, 2024
…le types (#14205)

Namely:

* `AList`
* `Cycle`
* `ConjAct`
* `Projectivization`
* `Lex`
* `NatOrdinal`
* `WithLawson`
* `WithLower`
* `WithUpper`
* `WithScott`
* `WithUpperSet`
* `WithLowerSet`
* `Speicalization` (which had an incorrectly-stated induction principle)

These are just for the cases which have docstrings of the form "Use as `induction .* using .*`".

Inspired by #12605.
mathlib-bors Bot pushed a commit that referenced this pull request Jun 30, 2024
mathlib-bors Bot pushed a commit that referenced this pull request Jun 30, 2024
Split from #12605

Also cleans up some proofs that used `revert` instead of `induction`.
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jun 30, 2024
@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jun 30, 2024
@eric-wieser

Copy link
Copy Markdown
Member

193 files is pretty large to review

Now down to 140 files!

I think the Finset ones are possibly controversial; I'd much prefer cons_induction to be the default, but I suspect that stance is also controversial.

dagurtomas pushed a commit that referenced this pull request Jul 2, 2024
dagurtomas pushed a commit that referenced this pull request Jul 2, 2024
…ects (#14135)

Namely, for

* `FreeMagma` / `FreeAddMagma`
* `FreeSemigroup` / `FreeAddSemigroup`
* `FreeMonoid` / `FreeAddMonoid`
* `FreeCommRing`
* `FreeAlgebra`

Split from #12605


Co-authored-by: negiizhao <[email protected]>
dagurtomas pushed a commit that referenced this pull request Jul 2, 2024
…on`} with `induction` and `cases` (#14132)

Spit from #12605, which picked up some conflicts here.

Co-authored-by: negiizhao [[email protected]](mailto:[email protected])
dagurtomas pushed a commit that referenced this pull request Jul 2, 2024
…le types (#14205)

Namely:

* `AList`
* `Cycle`
* `ConjAct`
* `Projectivization`
* `Lex`
* `NatOrdinal`
* `WithLawson`
* `WithLower`
* `WithUpper`
* `WithScott`
* `WithUpperSet`
* `WithLowerSet`
* `Speicalization` (which had an incorrectly-stated induction principle)

These are just for the cases which have docstrings of the form "Use as `induction .* using .*`".

Inspired by #12605.
dagurtomas pushed a commit that referenced this pull request Jul 2, 2024
dagurtomas pushed a commit that referenced this pull request Jul 2, 2024
Split from #12605

Also cleans up some proofs that used `revert` instead of `induction`.
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jul 7, 2024
@YaelDillies

Copy link
Copy Markdown
Contributor

What's the status here? I think this is a useful PR

@urkud

urkud commented Apr 19, 2025

Copy link
Copy Markdown
Member

@FR-vdash-bot What parts of this is not in master yet? Do you need help with merging master?

@joneugster

Copy link
Copy Markdown
Member

Mathlib has moved to PRs from forks. This PR is still from a branch of the main repository and will soon be closed! Please migrate the content to a fork and reopen a PR from there if you wish to do so. See Zulip topic for more instructions. Thank you for contributing to mathlib!

@joneugster joneugster added the will-close-soon Unless something changes, we will close this PR soon label Sep 19, 2026
@joneugster joneugster closed this Oct 24, 2026
@YaelDillies
YaelDillies deleted the FR_induction branch October 24, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) will-close-soon Unless something changes, we will close this PR soon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants