Term.Subsumption

tamarin-prover-term-1.2.2: Term manipulation library for the tamarin prover.

Copyright | (c) 2010-2012 Benedikt Schmidt
License | GPL v3 (see LICENSE)
Maintainer | Benedikt Schmidt <beschmi@gmail.com>
Safe Haskell | None
Language | Haskell98

Term.Subsumption

Contents

- Canonical representations for substitutions
- for testing only

Description

Subsumption of terms and substitutions.

Synopsis

- compareTermSubs :: LNTerm -> LNTerm -> WithMaude (Maybe Ordering)
- eqTermSubs :: LNTerm -> LNTerm -> WithMaude Bool
- factorSubstVia :: [LVar] -> LNSubst -> LNSubst -> WithMaude [LNSubst]
- canonizeSubst :: LNSubstVFresh -> LNSubstVFresh
- varOccurences :: HasFrees a => a -> [(LVar, Set Occurence)]

# Documentation

compareTermSubs :: LNTerm -> LNTerm -> WithMaude (Maybe Ordering) #

Compare terms `t1` and `t2` with respect to the subsumption order modulo AC.

eqTermSubs :: LNTerm -> LNTerm -> WithMaude Bool #

Returns True if `s1` and `s2` are equal with respect to the subsumption order modulo AC.

factorSubstVia :: [LVar] -> LNSubst -> LNSubst -> WithMaude [LNSubst] #

`factorSubstOn s1 s2 vs` factors the free substitution `s1` through free substitution `s2` on `vs`, i.e., find a complete set of free substitutions s such that for all vars `x `elem` vs`: > applyVTerm s1 x =AC= applyVTerm s (applyVTerm s2 x).

# Canonical representations for substitutions

canonizeSubst :: LNSubstVFresh -> LNSubstVFresh #

Returns a substitution that is equivalent modulo renaming to the given substitution.

# for testing only

varOccurences :: HasFrees a => a -> [(LVar, Set Occurence)] #

Returns the variables occuring in `t` together with the contexts they appear in. Note that certain contexts (and variables only occuring in such contexts) are ignored by this function. The function is used to "guess" renamings of variables, i.e., if t is a renaming of s, then variables that occur in equal contexts in t and s are probably renamings of each other.