Skip to content

Commit 46243d1

Browse files
committed
Test new conjecture about Exc and Inv
1 parent 9ea5a28 commit 46243d1

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

tests/probes/relations.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2025 Morwenn
2+
* Copyright (c) 2016-2026 Morwenn
33
* SPDX-License-Identifier: MIT
44
*/
55
#include <cmath>
@@ -191,8 +191,13 @@ TEST_CASE( "relations between measures of disorder", "[probe]" )
191191
return amp(sequence) <= 2 * runs(sequence);
192192
});
193193

194-
// Conjecture
194+
// Conjectures
195195
rc::prop("Mono(X) ≤ Amp(X)", [](const std::vector<int>& sequence) {
196196
return mono(sequence) <= amp(sequence);
197197
});
198+
199+
rc::prop("Inv(X) % 2 = Exc(X) % 2", []() {
200+
auto sequence = *rc::gen::unique<std::vector<int>>(rc::gen::arbitrary<int>());
201+
return inv(sequence) % 2 == exc(sequence) % 2;
202+
});
198203
}

0 commit comments

Comments
 (0)