Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify can end up renaming external indices #161

Open
Krzmbrzl opened this issue Nov 27, 2023 · 0 comments · May be fixed by #177
Open

Simplify can end up renaming external indices #161

Krzmbrzl opened this issue Nov 27, 2023 · 0 comments · May be fixed by #177

Comments

@Krzmbrzl
Copy link
Collaborator

The following code snippet

auto input = parse_expr(L"-1 S{a_1,a_2;i_1,i_2}:N * f{i_3;i_2}:N * t{a_1,a_2;i_1,i_3}:N");
std::wcout << deparse_expr(input) << "\n";
auto output = simplify(input);

std::wcout << deparse_expr(input) << "\n" << deparse_expr(output) << "\n";

produces

-1 S{a_1,a_2;i_1,i_2}:N * f{i_3;i_2}:N * t{a_1,a_2;i_1,i_3}:N
-1 S{a_1,a_2;i_1,i_3}:N * f{i_2;i_3}:N * t{a_1,a_2;i_1,i_2}:N
-1 S{a_1,a_2;i_1,i_3}:N * f{i_2;i_3}:N * t{a_1,a_2;i_1,i_2}:N

Note that simplification has renamed the external index i_2 to i_3 and now uses i_2 as a contraction index.

Also, I am not sure if calling simplify on an expression is supposed to modify the handed-in expression in-place instead of only returning a simplified expression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant