MatchingLogic.EntryIII.FreshWitnessElim #
Exact composition when the result name is fresh for the current body.
The z = y case is an inert self-substitution; otherwise support tracking
shows that the second capture-avoidance pass is a raw substitution.
One fresh witness may be eliminated inside an MCS while retaining the strong raw freshness fact needed by subsequent substitutions.
The body obtained by successively eliminating an ordered list of names.
Equations
- MatchingLogic.Pattern.substList (y :: ys) (z :: zs) x✝ = MatchingLogic.Pattern.substList ys zs (MatchingLogic.substVar y z x✝)
- MatchingLogic.Pattern.substList x✝² x✝¹ x✝ = x✝
Instances For
The stronger freshness record carried through a nested witness elimination. Each returned name is fresh for the exact remaining body.
Equations
- MatchingLogic.Pattern.FreshExListTrace [] [] x✝ = True
- MatchingLogic.Pattern.FreshExListTrace (y :: ys) (z :: zs) x✝ = (z ∉ (MatchingLogic.Pattern.exList ys x✝).allVars ∧ MatchingLogic.Pattern.FreshExListTrace ys zs (MatchingLogic.substVar y z x✝))
- MatchingLogic.Pattern.FreshExListTrace x✝² x✝¹ x✝ = False
Instances For
Recursively eliminate an exList in a fresh-witness MCS. The result is
an actual raw substitution trace, not an appeal to alpha quotienting.
Apply Lemma 80 and eliminate its nested existential witnesses using the
fresh strengthened interface. FreshExListTrace records exactly the
all-variable freshness available at every recursive step, so consumers do not
need to guess a raw-syntax normalization convention.