[View subst]

Click on a command or tactic to see a detailed view of its use.

% Define constructors for mappings
Kind map type -> type -> type.
Type map    A -> B -> map A B.

% Substitution encoded as a relation
% such that (subst L M M') holds if and only if
% M' is the result of applying the substitution L to M.
Define subst : list (map A A) -> B -> B -> prop by
  subst nil M M;
  nabla x, subst (map x V :: ML) (R x) M :=
    subst ML (R V) M.

% Substitution is deterministic
Theorem subst_det[A,B] : forall (ML:list (map A A)) (M:B) M' M'',
  subst ML M M' -> subst ML M M'' -> M' = M''.

% Pruning vacuous occurrences of variables in the results of substitutions
Theorem subst_prune[A,B,C] : 
  forall (ML:list (map A A)) (M:B) M', nabla (x:C),
  subst ML M (M' x) -> exists M'', M' = y\M''.
% An instantiation lemma for substitution
Theorem subst_inst[A,B,C] : 
  forall (ML:list (map A A)) (M1:C) (M2:C -> B) M1' M2', nabla (x:C),
  subst ML M1 M1' -> subst ML (M2 x) (M2' x) -> 
    subst ML (M2 M1) (M2' M1').