@@ -4,35 +4,19 @@ using Test
4
4
using LinearAlgebra
5
5
6
6
# TODO move to MP
7
- @testset " Noncommutative quadratic" begin
8
- @ncpolyvar x[1 : 2 ]
9
- Q = Hermitian ([1 2 + 3im ; 2 - 3im 4 ])
10
- p = 1 x[1 ]^ 2 + (2 + 3im ) * x[1 ] * x[2 ] + (2 - 3im ) * x[2 ] * x[1 ] + 4 x[2 ]^ 2
11
- @test polynomial (Q, x) == p
12
- @test polynomial (Q, monovec (x)) == p
13
- end
14
-
15
- @testset " Issue #71" begin
16
- @ncpolyvar x y
17
- @test x^ 0 * y == y * x^ 0
7
+ @testset " Issue #70" begin
8
+ @ncpolyvar y0 y1 x0 x1
9
+ p = x1 * x0 * x1
10
+ @test subs (p, x0 => y0, x1 => y1) == y1 * y0 * y1
11
+ @test subs (p, x0 => 1 ) == x1^ 2
12
+ @test p (x0 => y0, x1 => y1) == y1 * y0 * y1
18
13
end
19
14
20
15
include (" mono.jl" )
21
16
include (" poly.jl" )
22
17
include (" comp.jl" )
23
18
include (" mutable_arithmetics.jl" )
24
19
25
- # TODO move to MultivariatePolynomials.jl
26
- @testset " Subs with no variables" begin
27
- @polyvar x
28
- t = convert (termtype (x, Int), 3 )
29
- @test t == @inferred subs (t, x => x + 1 )
30
- @test t == @inferred subs (t, x => x + 1.0 )
31
- @test t == @inferred subs (t, x => 1 x)
32
- @test t == @inferred subs (t, x => 1.0 x)
33
- @test t == @inferred subs (t, x => 1.0 )
34
- end
35
-
36
20
module newmodule
37
21
using Test
38
22
import DynamicPolynomials
0 commit comments