Zulip Chat Archive

Stream: general

Topic: silly goal


Reid Barton (Aug 06 2020 at 23:46):

surely there should be a one-word tactic for this?
example {n : ℕ} (m : ℕ) : m.succ + n = 1 + (m + n) := sorry

Reid Barton (Aug 06 2020 at 23:48):

actually, no: what I really want is an induction principle for nat that uses m+1 rather than m.succ

Kenny Lau (Aug 06 2020 at 23:51):

PR?

Kenny Lau (Aug 06 2020 at 23:51):

I also find m+1 more useful at times

Kenny Lau (Aug 06 2020 at 23:51):

Reid Barton said:

surely there should be a one-word tactic for this?
example {n : ℕ} (m : ℕ) : m.succ + n = 1 + (m + n) := sorry

does omega work?

Jalex Stark (Aug 06 2020 at 23:53):

we should have that induction principle, and we should also make a tag for the induction tactic that lets you specify a default induction principle for each type

Reid Barton (Aug 07 2020 at 00:07):

omega did work, thanks

Kenny Lau (Aug 07 2020 at 00:22):

induction using?

Jalex Stark (Aug 07 2020 at 00:29):

right. I essentially always want induction n using nat.induction_on', where induction_on' is the version with +1 instead of .succ. The idea I'm proposing is an attribute @[induction] with priority k, so that induction n actually means induction n using h where h is the lemma with the highest priority induction attribute.

Jalex Stark (Aug 07 2020 at 00:31):

(maybe this "induction with the right default induction principle" is instead a new tactic induction' or by_induction)

Simon Hudon (Aug 07 2020 at 02:50):

@Jalex Stark I think that's a good idea. That would be pretty useful for my datatype project.


Last updated: Dec 20 2023 at 11:08 UTC