The current function signature for infer() is:
pub fn infer<Unbound: Ord + Clone, Bound: Ord + Clone>(
premises: &[[Bound; 4]],
rules: &[Rule<Unbound, Bound>],
) -> Vec<[Bound; 4]>;
I can imagine an alternate version being useful:
pub fn infer2<Unbound: Ord + Clone, Bound: Ord + Clone>(
premises: &[[Bound; 4]],
rules: &[Rule<Unbound, Bound>],
) -> Vec<RuleApplication<Bound>>;
validate(rules, infer2(premises, rules)).unwrap() == infer(premises, rules)