Skip to content

Groups, fields and rings and everything! #440

Description

@WhiteBlackGoose

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
}
public abstract class Ring : Group
{    
    public abstract ElementOfRing Multiply(ElementOfRing left, ElementOfRing right);
    // etc
}
public abstract class Field : Ring
{
}
public abstract class ElementOfRing
{
    // etc
}

And for sample, there will be

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.

Activity

  1. added this to the Future milestone on May 31, 2021
  2. Happypig375 commented on Sep 18, 2026

    @Happypig375
    Member

    Part of v3 redesign

  3. modified the milestones: Future, 3.0 on Sep 18, 2026
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

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions