Zulip Chat Archive

Stream: lean4

Topic: How to reverse congr


Locria Cyber (Aug 12 2022 at 13:22):

theorem Nat.succ_symm : (Nat.succ x = Nat.succ y) -> x = y :=  by sorry

Locria Cyber (Aug 12 2022 at 13:23):

How do prove this

David Renshaw (Aug 12 2022 at 13:29):

theorem Nat.succ_symm : (Nat.succ x = Nat.succ y) -> x = y := succ.inj

Marcus Rossel (Aug 12 2022 at 13:31):

Just for context, since constructors of inductive types are injective there also exists an injection tactic which turns any hypothesis of the form MyType.cons a b ... = MyType.cons a' b' ... into a = a', b = b', ...

Yakov Pechersky (Aug 12 2022 at 14:20):

"reverse congr" is only possible if the function is injective. in this case, it is because it is an inductive constructor


Last updated: Dec 20 2023 at 11:08 UTC