Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/Certificate/Certificate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,15 @@ function maxdegree_gram_basis(
)
sub = MB.SubBasis{B}(monos)
new_sub, new_full = SA.promote_bases(sub, full)
@assert new_full === full
if new_full !== full
error(
"the Gram basis spans variables `$(MP.variables(new_sub))` that are not " *
"all in the target basis `$(MP.variables(full))`. This typically means a " *
"generator (e.g. `1 - x_i^2`) was expressed over fewer variables than the " *
"certified polynomial; express generators over all variables of the " *
"problem (e.g. by promoting them with `StarAlgebras.promote_bases`).",
)
end
return new_sub
end

Expand Down
Loading