Skip to content

Reduce about product fucntion #218

@kmyk

Description

@kmyk

Description / 説明

Rewrite rules to convert sum / modsum to closed formulae are already implemented.
For example, an expr sum(sorted(map(lambda x: x + 1, xs))) of Python becomes sum(xs) + len(xs).
Implementation:

https://github.com/kmyk/Jikka/blob/52299f06f7f8d96643198b2cff95fd873da9b371/src/Jikka/Core/Convert/CloseSum.hs#L42-L68

Rewrite rules for product / modproduct are not fully implemented. We want to complete them.
In concrete, please do followings:

  • Rewrite existing rules which are written in a old format (hand-written pattern matches), using a new format (quasi-quotes, like [r| "sum/range" forall n. sum (range n) = n * (n - 1) /! 2 |])
  • Add lacking rewrite rules

Current implementation:

https://github.com/kmyk/Jikka/blob/52299f06f7f8d96643198b2cff95fd873da9b371/src/Jikka/Core/Convert/CloseSum.hs#L70-L86

Motivation / 動機

because not implemented yet

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions