Skip to content

chore: attribute [induction_eliminator]#12605

Open
astrainfinita wants to merge 22 commits intomasterfrom
FR_induction
Open

chore: attribute [induction_eliminator]#12605
astrainfinita wants to merge 22 commits intomasterfrom
FR_induction

Conversation

@astrainfinita
Copy link
Copy Markdown
Collaborator

@astrainfinita astrainfinita commented May 2, 2024

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
Copy link
Copy Markdown
Member

urkud commented May 19, 2024

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
@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 26, 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 26, 2024
mathlib-bors bot 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 [zhao.yu-yang@foxmail.com](mailto:zhao.yu-yang@foxmail.com)
kbuzzard pushed a commit that referenced this pull request Jun 26, 2024
Split from #12605.

Co-authored-by: negiizhao zhao.yu-yang@foxmail.com
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 <zhao.yu-yang@foxmail.com>
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 [zhao.yu-yang@foxmail.com](mailto:zhao.yu-yang@foxmail.com)
@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
Split from #12605.

Co-authored-by: negiizhao zhao.yu-yang@foxmail.com
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 <zhao.yu-yang@foxmail.com>
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 [zhao.yu-yang@foxmail.com](mailto:zhao.yu-yang@foxmail.com)
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
Copy link
Copy Markdown
Member

urkud commented Apr 19, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-author A reviewer has asked the author a question or requested changes. merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants