fix(library/blast/simplifier/ceqv): fix error in is_permutation
This commit is contained in:
parent
ec38ee8df8
commit
f06cdff2a1
2 changed files with 8 additions and 2 deletions
|
@ -207,9 +207,9 @@ static bool is_permutation(expr const & lhs, expr const & rhs, unsigned offset,
|
||||||
return lhs == rhs; // locally bound variable
|
return lhs == rhs; // locally bound variable
|
||||||
} else if (var_idx(lhs) - offset < p.size()) {
|
} else if (var_idx(lhs) - offset < p.size()) {
|
||||||
if (p[var_idx(lhs) - offset]) {
|
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 {
|
} else {
|
||||||
p[var_idx(lhs) - offset] = var_idx(rhs);
|
p[var_idx(lhs) - offset] = var_idx(rhs) - offset;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
6
tests/lean/run/perm_with_pi_args.lean
Normal file
6
tests/lean/run/perm_with_pi_args.lean
Normal 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
|
Loading…
Reference in a new issue