asc-community / asc-community/AngouriMath

Groups, fields and rings and everything!

Open
#440 0 comments 0 reactions 0 assignees View on GitHub
Not now Proposal
Dominant language
C#
Stars
831
Forks
79
Avg merge
3h 23m
Merged PRs (30d)
309

Description

So... what *if* instead of concrete values, we could have elements of groups, fields and rings? Like
```
public abstract class Group
{
public abstract ElementOfRing Add(ElementOfRing left, ElementOfRing right);
public abstract Zero();
// etc
}
```

```cs
public abstract class Ring : Group
{
public abstract ElementOfRing Multiply(ElementOfRing left, ElementOfRing right);
// etc
}
```

```cs
public abstract class Field : Ring
{
}
```

```cs
public abstract class ElementOfRing
{
// etc
}
```

And for sample, there will be

```cs
public static ElementOfRing Multiply(ElementOfGroup a, ElementOfGroup b)
=> (a, b) switch
{
(ElementOfField ea, ElementOfField eb) => field.Add(ea, eb)
_ => ...
}
```

There should be definitely more thoughts on it. We need to check how, say, SymPy does it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.