fix(library/blast/simplifier/ceqv): fix error in is_permutation

This commit is contained in:
Daniel Selsam 2016-02-04 17:20:03 -08:00 committed by Leonardo de Moura
parent ec38ee8df8
commit f06cdff2a1
2 changed files with 8 additions and 2 deletions

View file

@ -207,9 +207,9 @@ static bool is_permutation(expr const & lhs, expr const & rhs, unsigned offset,
return lhs == rhs; // locally bound variable
} else if (var_idx(lhs) - offset < p.size()) {
if (p[var_idx(lhs) - offset]) {
return *(p[var_idx(lhs) - offset]) == var_idx(rhs);
return *(p[var_idx(lhs) - offset]) == var_idx(rhs) - offset;
} else {
p[var_idx(lhs) - offset] = var_idx(rhs);
p[var_idx(lhs) - offset] = var_idx(rhs) - offset;
return true;
}
} else {

View file

@ -0,0 +1,6 @@
import data.matrix data.real data.fin
open matrix real
axiom mx_add_comm {m n} (M₁ M₂ : matrix m n) : M₁ + M₂ = M₂ + M₁
attribute mx_add_comm [simp]
example (m n : ) (M₁ M₂ : matrix m n) : M₁ + M₂ = M₂ + M₁ := by simp