Documentation

LeanPool.MatchingLogic.EntryIII.Alpha

MatchingLogic.EntryIII.Alpha #

Substitution does nothing when its source name occurs neither free nor bound.

theorem MatchingLogic.Pattern.substVar_roundtrip {S : Signature} {x y : } {p : Pattern S } (hy : yp.allVars) :
substVar y x (substVar x y p) = p

Replacing x by a wholly fresh y, then y by x, is literally the original raw pattern. No quotient by alpha equivalence is used.

A name absent from all raw occurrences is capture-free as a replacement.

The reverse leg of a fresh substitution is itself capture-free.

theorem MatchingLogic.Pattern.substVar_source_not_mem_FV {S : Signature} {x y : } (p : Pattern S ) (hxy : x y) :
xFV (substVar x y p)

If source and replacement differ, no free source occurrence remains after variable-for-variable substitution.

theorem MatchingLogic.Provable.alphaEx_forward {S : Signature} {Gamma : Set (Pattern S )} {x y : } {p : Pattern S } (hy : yp.allVars) :
Provable Gamma ((Pattern.ex x p).imp (Pattern.ex y (substVar x y p)))

Derived forward alpha conversion for an existential binder.

theorem MatchingLogic.Provable.alphaEx_backward {S : Signature} {Gamma : Set (Pattern S )} {x y : } {p : Pattern S } (hy : yp.allVars) :
Provable Gamma ((Pattern.ex y (substVar x y p)).imp (Pattern.ex x p))

Derived backward alpha conversion for an existential binder.