As other proof assistants, the apply tactic will not create subgoals for dependent arguments.
See issue at: https://groups.google.com/forum/#!topic/lean-user/bhStu87PjiI
This decision minimizes the number of goals, but it may produce counter intuitive behavior where we finish a proof but still have unsolved metavariables.
I think we can avoid this issue by adding the subgoals for dependent arguments after the ones for non dependent arguments. That is, given the list of goals G_1, ..., G_n, by using apply, we would get N_1, ..., N_k, D_1, ..., D_m, G_2, ..., G_n, where Ns are subgoals for nondependent arguments and Ds are subgoals for dependent ones. In the current implementation, we get N_1, ..., N_k, G_2, ..., G_n.
The idea is: if solving the subgoals Ns we also solve the Ds (as expected when using apply), then we are fine, and Ds would be automatically removed. If they are not, then we would be forced to solve the Ds.
The tactic fapply would continue to work as it does now. The main difference between fapply and apply is that fapply does not move subgoals for dependent arguments are not moved after the ones for dependent ones.
As other proof assistants, the
applytactic will not create subgoals for dependent arguments.See issue at: https://groups.google.com/forum/#!topic/lean-user/bhStu87PjiI
This decision minimizes the number of goals, but it may produce counter intuitive behavior where we finish a proof but still have unsolved metavariables.
I think we can avoid this issue by adding the subgoals for dependent arguments after the ones for non dependent arguments. That is, given the list of goals
G_1, ..., G_n, by usingapply, we would getN_1, ..., N_k, D_1, ..., D_m, G_2, ..., G_n, whereNs are subgoals for nondependent arguments andDs are subgoals for dependent ones. In the current implementation, we getN_1, ..., N_k, G_2, ..., G_n.The idea is: if solving the subgoals
Ns we also solve theDs (as expected when usingapply), then we are fine, andDs would be automatically removed. If they are not, then we would be forced to solve theDs.The tactic
fapplywould continue to work as it does now. The main difference betweenfapplyandapplyis thatfapplydoes not move subgoals for dependent arguments are not moved after the ones for dependent ones.