Skip to content

Instantly share code, notes, and snippets.

@sqbi-q
Created June 20, 2023 20:48
Show Gist options
  • Save sqbi-q/64bfca89357164e93917ee3a9a61082a to your computer and use it in GitHub Desktop.
Save sqbi-q/64bfca89357164e93917ee3a9a61082a to your computer and use it in GitHub Desktop.
Maxima CAS injective (one-to-one) test of given function
injective(f) := block([x:x, y:y, q:q],
q: f(x) = f(y),
is(equal(solve(q, x), [x=y]))
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment