Template:Studies of Euler diagrams/transformations/dukeli netuno/dh
Appearance
This code uses the Python library discrete helpers. from discretehelpers.sig_perm import SigPerm
from discretehelpers.boolf.examples import dukeli, netuno
dukeli_clan = dukeli.ec_clan()
assert dukeli_clan.get_block_from_label(netuno) == [(6, 14), (6, 18)]
a = SigPerm(pair=(6, 14))
b = SigPerm(pair=(6, 18))
# above
assert a.sequence_string() == '(0, 3, ~2, ~1)'
assert a.inverse.sequence_string() == '(0, ~3, ~2, 1)'
# below
assert b.sequence_string() == '(~1, ~2, 3, 0)'
assert b.inverse.sequence_string() == '(3, ~0, ~1, 2)'
assert dukeli.apply_sigperm(a) == dukeli.apply_sigperm(b) == netuno
netuno_clan = netuno.ec_clan()
assert netuno_clan.get_block_from_label(dukeli) == [(3, 9), (12, 14)] == [b.inverse.pair, a.inverse.pair]
|