Match on part of the goal
Sgoal(p | r )
with:
This command allows searching for a pattern within the goal, and is replaced by the replacement pattern given in parameter. If the pattern is found, Sgoal is replaced by the replacement pattern.
If the pattern does not match, the Sgoal command fails.
This command is mainly used to reuse a proof for multiple proof obligations.
Given the following goal:
Hypothesis
var1 = var2 Goal var1 : function[ens1]
|
The command sh(Sgoal( a : b | a)) will be replaced by sh(var1) as follows:
In the same way, the command eh(Sgoal( a : b | a)) will be replaced by eh(var1), allowing rewriting the goal as follows:
Hypothesis
var1 = var2 Goal var2 : functions[ens1]
|