Zulip Chat Archive

Stream: mathlib4

Topic: congr attribute


Kevin Buzzard (Nov 18 2022 at 20:07):

In Lean 3, prod_congr {α₁ β₁ α₂ β₂ : Type*} (e₁ : α₁ ≃ α₂) (e₂ : β₁ ≃ β₂) : α₁ × β₁ ≃ α₂ × β₂ had the @[congr] attribute. In Lean 4 if I try this I get

invalid 'congr' theorem, equality expected
  ?α₁ × ?β₁  ?α₂ × ?β₂

What do I do? I'm afraid I don't know what the @[congr] tag even does.

Mario Carneiro (Nov 18 2022 at 20:08):

just remove the tag

Mario Carneiro (Nov 18 2022 at 20:08):

add a port note

Kevin Buzzard (Nov 18 2022 at 20:08):

is that -- port note or -- porting note or something more formal?

Mario Carneiro (Nov 18 2022 at 20:09):

hm, what does grep say

Mario Carneiro (Nov 18 2022 at 20:09):

I think porting note is more common

Mario Carneiro (Nov 18 2022 at 20:10):

(often, the reason this kind of thing happens because no one actually knows what it does, we are all just cargo culting the tags, and the developers also forgot and didn't bother to reimplement it)


Last updated: Dec 20 2023 at 11:08 UTC