fn is_injective(subst: Subst) -> IsInjectiveResult {
    use IsInjectiveResult::*;
    for (var, pattern) in subst {
        if matches!(pattern, IdealPattern::Constructor { .. }) {
            return NotInjective(var);
        }
    }
    Injective
}
// A substitution is injective (i.e. one-to-one) if it contains _only_ pattern variables.
A substitution is injective  if it contains _only_ pattern variables.
A substitution is injective if it contains _only_ pattern variables .
fn is_injective(subst: Subst) -> IsInjectiveResult {
    use IsInjectiveResult::*;
    for (var, pattern) in subst {
        if matches!(pattern, IdealPattern::Constructor { .. }) {
            return NotInjective(var);
        }
    }
    Injective
}
fn is_injective ( subst : Subst ) -> IsInjectiveResult { use IsInjectiveResult :: * ; for ( var , pattern ) in subst { if matches ! ( pattern IdealPattern Constructor { } ) { return NotInjective ( var ) ; } } Injective }
A substitution is injective (i.e.
A substitution is injective ( i . e .
subst
Subst
subst
Subst