Coeffs
as a wrapper for IntList
#
Currently omega
uses a dense representation for coefficients.
However, we can swap this out for a sparse representation.
This file sets up Coeffs
as a type synonym for IntList
,
and abbreviations for the functions in the IntList
namespace which we need to use in the
omega
algorithm.
There is an equivalent file setting up Coeffs
as a type synonym for AssocList Nat Int
,
currently in a private branch.
Not all the theorems about the algebraic operations on that representation have been proved yet.
When they are ready, we can replace the implementation in omega
simply by importing
Std.Tactic.Omega.Coeffs.IntDict
instead of Std.Tactic.Omega.Coeffs.IntList
.
For small problems, the sparse representation is actually slightly slower, so it is not urgent to make this replacement.
Are the coefficients all zero?
Equations
- Std.Tactic.Omega.Coeffs.isZero xs = ∀ (x : Int), x ∈ xs → x = 0
Instances For
Shim for IntList.set
.
Equations
- Std.Tactic.Omega.Coeffs.set xs i y = IntList.set xs i y
Instances For
Shim for IntList.get
.
Equations
- Std.Tactic.Omega.Coeffs.get xs i = IntList.get xs i
Instances For
Shim for IntList.smul
.
Equations
- Std.Tactic.Omega.Coeffs.smul xs g = IntList.smul xs g
Instances For
Shim for IntList.sdiv
.
Equations
- Std.Tactic.Omega.Coeffs.sdiv xs g = IntList.sdiv xs g
Instances For
Shim for IntList.dot
.
Equations
- Std.Tactic.Omega.Coeffs.dot xs ys = IntList.dot xs ys
Instances For
Shim for IntList.add
.
Equations
- Std.Tactic.Omega.Coeffs.add xs ys = IntList.add xs ys
Instances For
Shim for IntList.sub
.
Equations
- Std.Tactic.Omega.Coeffs.sub xs ys = IntList.sub xs ys
Instances For
Shim for IntList.combo
.
Equations
- Std.Tactic.Omega.Coeffs.combo a xs b ys = IntList.combo a xs b ys
Instances For
Shim for List.map
.
Equations
- Std.Tactic.Omega.Coeffs.map f xs = List.map f xs
Instances For
Shim for .enum.find?
.
Equations
- Std.Tactic.Omega.Coeffs.findIdx? f xs = List.findIdx? f xs
Instances For
Shim for IntList.bmod
.
Equations
Instances For
Shim for IntList.bmod_dot_sub_dot_bmod
.