Zulip Chat Archive

Stream: mathlib4

Topic: Data.List.BigOperators.Basic mathlib4#1380


Johan Commelin (Jan 06 2023 at 12:05):

I pushed a first pass on fixing some capitalization. But I need to do something else for a bit.

Johan Commelin (Jan 06 2023 at 13:24):

to_additive in

@[to_additive]
theorem prod_is_unit :  {L : List M} (u :  m  L, IsUnit m), IsUnit L.prod
  | [], _ => by simp
  | h :: t, u => by
    simp only [List.prod_cons]
    exact IsUnit.mul (u h (mem_cons_self h t)) (prod_is_unit fun m mt => u m (mem_cons_of_mem h mt))
#align list.prod_is_unit List.prod_is_unit

errors with

application type mismatch
  Mathlib.Algebra.Group.Units._auxLemma.22
argument has type
  AddMonoid M
but function has type
   [inst : Monoid M], IsUnit 1 = True

Johan Commelin (Jan 06 2023 at 13:24):

Is to_additive forgetting to translate some stuff?

Floris van Doorn (Jan 06 2023 at 14:02):

This is mathlib4#1149, fixed by mathlib4#1314

Johan Commelin (Jan 06 2023 at 14:03):

Ok, good!

Johan Commelin (Jan 06 2023 at 14:03):

So we just need some people to review some meta PRs

Scott Morrison (Jan 07 2023 at 07:01):

I dealt with a few comments on mathlib4#1314.

Johan Commelin (Jan 07 2023 at 15:52):

5 out of 6 errors in this file have to do with to_additive.

Johan Commelin (Jan 07 2023 at 16:00):

So if we can get mathlib4#1314 in, that would be great.

Johan Commelin (Jan 07 2023 at 16:00):

My feeling is that it would also solve the final error.

Johan Commelin (Jan 09 2023 at 19:07):

This one seems back on track!

Johan Commelin (Jan 09 2023 at 19:19):

And CI is happy


Last updated: Dec 20 2023 at 11:08 UTC