def test_symplectic_hecke_insertion(): w = (4, 2, 6, 1, 7, 5, 3, 4, 2, 1, 3, 2) i = (1, 2, 2, 3, 3, 4, 5, 5, 6, 8, 8, 9) insertion, recording = InsertionAlgorithm.symplectic_hecke(w) p = Tableau({ (1, 1): 2, (1, 2): 3, (1, 3): 4, (1, 4): 5, (1, 5): 6, (1, 6): 7, (2, 2): 4, (2, 3): 5, (2, 4): 6, (2, 5): 7, (3, 3): 6, (3, 4): 7, }) q = Tableau({ (1, 1): 1, (1, 2): -2, (1, 3): 3, (1, 4): -4, (1, 5): 5, (1, 6): -10, (2, 2): 6, (2, 3): -7, (2, 4): -9, (2, 5): -12, (3, 3): 8, (3, 4): -11, }) assert insertion == p assert recording == q assert InsertionAlgorithm.inverse_symplectic_hecke( p, q) == (w, tuple(range(1, 13))) insertion, recording = InsertionAlgorithm.symplectic_hecke(w, i) q = Tableau({ (1, 1): 1, (1, 2): -2, (1, 3): 2, (1, 4): -3, (1, 5): 3, (1, 6): -8, (2, 2): 4, (2, 3): -5, (2, 4): -6, (2, 5): -9, (3, 3): 5, (3, 4): -8, }) assert insertion == p assert recording == q assert InsertionAlgorithm.inverse_symplectic_hecke(p, q) == (w, i)
def forward(self): if not self.is_symplectic: return lambda x, y: InsertionAlgorithm.orthogonal_hecke( x, y, self.multisetvalued) else: return lambda x, y: InsertionAlgorithm.symplectic_hecke( x, y, self.multisetvalued)
def test_symplectic_hecke_insertion_setvalued(): w = (2, 2, 4, 3) i = (1, 1, 1, 4) insertion, recording = InsertionAlgorithm.symplectic_hecke(w) p = Tableau({(1, 1): 2, (1, 2): 3, (2, 2): 4}) q = Tableau({(1, 1): (1, 2), (1, 2): 3, (2, 2): 4}) assert insertion == p assert recording == q assert InsertionAlgorithm.inverse_symplectic_hecke(p, q) == (w, (1, 2, 3, 4)) insertion, recording = InsertionAlgorithm.symplectic_hecke(w, i) q = Tableau({(1, 1): (1, 1), (1, 2): 1, (2, 2): 4}) assert insertion == p assert recording == q assert InsertionAlgorithm.inverse_symplectic_hecke(p, q) == (w, i) i = (1, 2, 3, 3) insertion, recording = InsertionAlgorithm.symplectic_hecke(w, i, False) q = Tableau({(1, 1): (1, 2), (1, 2): -3, (2, 2): 3}) assert insertion == p assert recording == q assert InsertionAlgorithm.inverse_symplectic_hecke(p, q, False) == (w, i) w = (4, 2, 2, 3) i = (2, 4, 4, 4) insertion, recording = InsertionAlgorithm.symplectic_hecke(w) p = Tableau({(1, 1): 2, (1, 2): 3, (2, 2): 4}) q = Tableau({(1, 1): 1, (1, 2): (-3, -2), (2, 2): 4}) assert insertion == p assert recording == q assert InsertionAlgorithm.inverse_symplectic_hecke(p, q) == (w, (1, 2, 3, 4)) insertion, recording = InsertionAlgorithm.symplectic_hecke(w, i) q = Tableau({(1, 1): 2, (1, 2): (-4, -4), (2, 2): 4}) assert insertion == p assert recording == q assert InsertionAlgorithm.inverse_symplectic_hecke(p, q) == (w, i) i = (1, 1, 2, 3) insertion, recording = InsertionAlgorithm.symplectic_hecke(w, i, False) q = Tableau({(1, 1): 1, (1, 2): (1, 2), (2, 2): 3}) assert insertion == p assert recording == q assert InsertionAlgorithm.inverse_symplectic_hecke(p, q, False) == (w, i)