diff --git a/src/Interfaces/AbstractPolytope.jl b/src/Interfaces/AbstractPolytope.jl index 2e9a9f78e5..e9967fcae3 100644 --- a/src/Interfaces/AbstractPolytope.jl +++ b/src/Interfaces/AbstractPolytope.jl @@ -119,7 +119,14 @@ constraint of `P`. """ function isuniversal(P::AbstractPolytope{N}, witness::Bool=false )::Union{Bool, Tuple{Bool, Vector{N}}} where {N<:Real} - return witness ? isuniversal(constraints_list(P)[1], true) : false + if witness + constraints = constraints_list(P) + @assert !isempty(constraints) "polytopes without constraints are not " * + "allowed" + return isuniversal(constraints[1], true) + else + return false + end end # given a polytope P, apply the linear map P to each vertex of P