Suppose $ L $ be an extension over $ \mathbb{Q} $ of degree $ n $ . Let $\{e_{1},e_{2},\cdots,e_{n}\} $ . Now I know the product $ e_{i}^{2} $ and $ e_{i}e_{j} $ . So we can determine the product $ a *b $ where $ a,b \in L $ . But the calcuation will so much laborious , Is there any any computational tool in sage math/ programing / Mathlab or something else to calculate this product ? You can fixed $ n $ like $ 6 $ or $8 $ .