refactor: Cleanup the congruence tactics #81
|
@ -204,15 +204,16 @@ def goalMotivatedApply (state: GoalState) (goalId: Nat) (recursor: String): Core
|
||||||
def goalNoConfuse (state: GoalState) (goalId: Nat) (eq: String): CoreM TacticResult :=
|
def goalNoConfuse (state: GoalState) (goalId: Nat) (eq: String): CoreM TacticResult :=
|
||||||
runTermElabM <| state.tryNoConfuse goalId eq
|
runTermElabM <| state.tryNoConfuse goalId eq
|
||||||
|
|
||||||
inductive TacticExecute where
|
inductive SyntheticTactic where
|
||||||
| congruenceArg
|
| congruenceArg
|
||||||
| congruenceFun
|
| congruenceFun
|
||||||
| congruence
|
| congruence
|
||||||
@[export pantograph_goal_tactic_execute_m]
|
/-- Executes a synthetic tactic which has no arguments -/
|
||||||
def goalTacticExecute (state: GoalState) (goalId: Nat) (tacticExecute: TacticExecute): CoreM TacticResult :=
|
@[export pantograph_goal_synthetic_tactic_m]
|
||||||
|
def goalSyntheticTactic (state: GoalState) (goalId: Nat) (case: SyntheticTactic): CoreM TacticResult :=
|
||||||
runTermElabM do
|
runTermElabM do
|
||||||
state.restoreElabM
|
state.restoreElabM
|
||||||
state.execute goalId $ match tacticExecute with
|
state.execute goalId $ match case with
|
||||||
| .congruenceArg => Tactic.congruenceArg
|
| .congruenceArg => Tactic.congruenceArg
|
||||||
| .congruenceFun => Tactic.congruenceFun
|
| .congruenceFun => Tactic.congruenceFun
|
||||||
| .congruence => Tactic.congruence
|
| .congruence => Tactic.congruence
|
||||||
|
|
Loading…
Reference in New Issue