Unification for first order terms.
| Function or value | Description | ||||
| 
                
               | 
 
 Example
 Evaluates to[("x", ``0``); ("y", ``0``)].Example
 ThrowsSystem.Exception: cyclic.Example
 ThrowsSystem.Exception: cyclic. | ||||
| 
                
              
                  Full Usage: 
                   istriv env x tParameters: 
 func<string, term>- 
                      The environment of mappings (represented as a finite partial function) from variables to terms in which to check the new assignment.x : string- 
                      The variable to be assigned.t : term- 
                      The term assigned to the variable.Returns: booltrue, if the assignment is trivial (t=x); otherwise, if 
 there are no cycle, false. | 
 
 
 ExampleTrivial assignment Evaluates totrue.ExampleAcyclic nontrivial assignment Evaluates tofalse.ExampleCyclic nontrivial assignment ThrowsSystem.Exception: cyclic. | ||||
| 
                
 Removes useless mappings from the input variable-term 
 mappings  Note
                
 The function never fails. However, it would cause a StackOverflow 
 crash if called on a cyclic  ExampleThe following reduces \(x \mapsto y, x \mapsto 0\) to \(x \mapsto 0\). Evaluates to[("x", ``0``)].ExampleThe following returns the input unchanged \(x \mapsto 1, y \mapsto 0\) since the input is already an MGU. Evaluates to[("x", ``1``); ("y", ``0``)].ExampleThe following would cause a StackOverflow crash.  | |||||
| 
                
              
                  Full Usage: 
                   unify env eqsParameters: 
 func<string, term>- 
                      An environment of mappings (represented as a finite partial function) from variables to terms, used as an accumulator for the final result of the unification procedure.eqs : (term * term) list- 
                      The list of term-term pairs to be unified.Returns: func<string, term>A variable-term mappings that unifyeqs, if the unification is 
 possible and there are no cycles. | 
                
 It applies some transformations to  
 
 
 ExampleNo previous assignments Evaluates to[("x", ``0``)].ExampleAugmented assignment Evaluates to[("x", ``y``); ("y", ``0``)].ExampleDirect cycle (\(y \mapsto f(y)\)) ThrowsSystem.Exception: cyclic.ExampleDerived cycle (\(x \mapsto y, y \mapsto f(x)\)) ThrowsSystem.Exception: cyclic.ExampleImpossible unification ThrowsSystem.Exception: impossible unification. | ||||
| 
                
               | 
                
 Finds an MGU for a list of term-term pairs  
 Example
 Evaluates to[(``f(f(z),g(y))``, ``f(f(z),g(y))``)].Example
 ThrowsSystem.Exception: cyclic.Example
 ThrowsSystem.Exception: impossible unification. |