Upgraded AngouriMath to v2.8.0 (#1235)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-25 18:45:24 +01:00
1 parent fae3ceb840
commit 506c06fbfc
24 files changed
+974 -105

No files matched your search

@@ -0,0 +1,18 @@
using AngouriMath;
namespace AIStudio.Tools.Mathematics;
/// <summary>
/// The index of a family of solutions, such as n in union({ pi / 6 + 2 * pi * n }, n in ZZ), with the set it ranges over.
/// </summary>
/// <param name="Variable">The index, which the family binds.</param>
/// <param name="Over">The set the index ranges over, e.g., the integers.</param>
public sealed record SolutionIndex(Entity.Variable Variable, Entity.Set Over)
{
/// <summary>
/// Whether the index may take an integer, as far as AngouriMath can decide it.
/// </summary>
/// <param name="value">The integer.</param>
/// <returns>True when the set of the index surely contains the integer.</returns>
public bool Takes(int value) => this.Over.TryContains(Entity.Number.Integer.Create(value), out var contains) && contains;
}