#NEWLINE# def test_dmp_diff( ) : #NEWLINE# #INDENT# assert ( dmp_diff ( [ ] , 1 , 0 , ZZ ) == [ ] ) #NEWLINE# assert ( dmp_diff ( [ [ ] ] , 1 , 1 , ZZ ) == [ [ ] ] ) #NEWLINE# assert ( dmp_diff ( [ [ [ ] ] ] , 1 , 2 , ZZ ) == [ [ [ ] ] ] ) #NEWLINE# assert ( dmp_diff ( [ [ [ 1 ] , [ 2 ] ] ] , 1 , 2 , ZZ ) == [ [ [ ] ] ] ) #NEWLINE# assert ( dmp_diff ( [ [ [ 1 ] ] , [ [ ] ] ] , 1 , 2 , ZZ ) == [ [ [ 1 ] ] ] ) #NEWLINE# assert ( dmp_diff ( [ [ [ 3 ] ] , [ [ 1 ] ] , [ [ ] ] ] , 1 , 2 , ZZ ) == [ [ [ 6 ] ] , [ [ 1 ] ] ] ) #NEWLINE# assert ( dmp_diff ( [ 1 , ( - 1 ) , 0 , 0 , 2 ] , 1 , 0 , ZZ ) == dup_diff ( [ 1 , ( - 1 ) , 0 , 0 , 2 ] , 1 , ZZ ) ) #NEWLINE# assert ( dmp_diff ( f_6 , 0 , 3 , ZZ ) == f_6 ) #NEWLINE# assert ( dmp_diff ( f_6 , 1 , 3 , ZZ ) == dmp_diff ( f_6 , 1 , 3 , ZZ ) ) #NEWLINE# assert ( dmp_diff ( f_6 , 2 , 3 , ZZ ) == dmp_diff ( dmp_diff ( f_6 , 1 , 3 , ZZ ) , 1 , 3 , ZZ ) ) #NEWLINE# assert ( dmp_diff ( f_6 , 3 , 3 , ZZ ) == dmp_diff ( dmp_diff ( dmp_diff ( f_6 , 1 , 3 , ZZ ) , 1 , 3 , ZZ ) , 1 , 3 , ZZ ) ) #NEWLINE# K = FF ( 23 ) #NEWLINE# F_6 = dmp_normal ( f_6 , 3 , K ) #NEWLINE# assert ( dmp_diff ( F_6 , 0 , 3 , K ) == F_6 ) #NEWLINE# assert ( dmp_diff ( F_6 , 1 , 3 , K ) == dmp_diff ( F_6 , 1 , 3 , K ) ) #NEWLINE# assert ( dmp_diff ( F_6 , 2 , 3 , K ) == dmp_diff ( dmp_diff ( F_6 , 1 , 3 , K ) , 1 , 3 , K ) ) #NEWLINE# assert ( dmp_diff ( F_6 , 3 , 3 , K ) == dmp_diff ( dmp_diff ( dmp_diff ( F_6 , 1 , 3 , K ) , 1 , 3 , K ) , 1 , 3 , K ) )