Skip to content

Commit

Permalink
Deal with GMP constants when elaborating polyequal
Browse files Browse the repository at this point in the history
  • Loading branch information
bpandreotti committed Jun 20, 2024
1 parent d5bc6f2 commit d04b5e6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions carcara/src/elaborator/polyeq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,13 @@ impl<'a> PolyeqElaborator<'a> {
};
self.close_subproof(args, last_step)
}
// If one of the terms is a constant, but they are still polyequal, we can't break it up
// into smaller parts, so we just use a direct refl step. This is hack to deal with the
// case where one of the terms was passed as a GMP-style constant.
_ if (a.is_const() || b.is_const()) && self.polyeq(pool, &a, &b) => {
let id = self.ids.next_id();
add_refl_step(pool, a, b, id, self.depth())
}
_ => panic!("terms not equal!"),
}
}
Expand Down

0 comments on commit d04b5e6

Please sign in to comment.