Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
G3Kappa committed May 8, 2024
1 parent 8664e49 commit 315c19a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Ergo/Lang/Ast/Unification/Substitution.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ bool Unify(ITerm x, ITerm y)
{
if (x.Equals(y))
return true;
if (x.IsGround && y.IsGround)
return false;
if (y is AbstractTerm ay && ay.Unify(x).TryGetValue(out var ayWithX))
{
foreach (var s in ayWithX)
Expand All @@ -72,6 +70,8 @@ bool Unify(ITerm x, ITerm y)
}
return true;
}
else if (x.IsGround && y.IsGround)
return false;
else if (y is Variable)
{
ApplySubstitution(new Substitution(y, x));
Expand Down

0 comments on commit 315c19a

Please sign in to comment.