Skip to content

to_additive feature requests / issues #1074

Open

Description

@fpvandoorn

This is a single issue for issues or feature requests for to_additive, that I'll try to keep up-to-date. Feel free to comment with other suggestions

Activity

  1. added a commit that references this issue on May 18, 2023
  2. changed the title [-]`to_additive` feature requests[/-] [+]`to_additive` feature requests / issues[/+] on Nov 30, 2023
  3. YaelDillies commented on Dec 9, 2023

    @YaelDillies
    Contributor

    to_additive does not seem to support the auxiliary lemmas generated by norm_cast: See #8916

  4. fpvandoorn commented on Dec 11, 2023

    @fpvandoorn
    MemberAuthor

    Can you please minimize the example?

  5. YaelDillies commented on Dec 11, 2023

    @YaelDillies
    Contributor

    Is this minimal enough?

    import Mathlib.Data.Finset.Pointwise
    
    open scoped Pointwise
    
    @[to_additive]
    lemma mul_foo {α : Type*} [DecidableEq α] [Mul α] (s t : Finset α) :
        (↑(s * t) : Set α) = ↑s * ↑t := by norm_cast
    /-
    application type mismatch
      Mathlib.Data.Finset.Pointwise._auxLemma.9
    argument has type
      Add α
    but function has type
      ∀ [inst : Mul α] (s t : Finset α), ↑s * ↑t = ↑(s * t)
    -/
    
  6. fpvandoorn commented on Dec 11, 2023

    @fpvandoorn
    MemberAuthor

    Yes, thanks!
    This was actually already a todo in the code. I will see if I can find a more systematic way to additivize new declarations generated attributes.

  7. fpvandoorn commented on Jul 10, 2024

    @fpvandoorn
    MemberAuthor

    norm_cast handling is fixed in #14628

  8. YaelDillies commented on Jul 11, 2025

    @YaelDillies
    Contributor

    This makes to_additive incompatible with noncomputable section. This has come up in #26774.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions