Hi :) I am currently doing proofs in which similar goals are generated multiple times. As a simplified example, let's say I have the following code:
context cring begin
definition inc where
"inc x โก x โ ๐ญ"
lemma inc_closed[simp]: "x โ carrier R โน inc x โ carrier R"
unfolding inc_def by simp
lemma
assumes "x โ carrier R"
shows "x โ (inc (inc x)) โ carrier R"
apply (intro m_closed)
Then, the application of intro
leaves these two subgoals:
goal (2 subgoals):
1. x โ carrier R
2. inc (inc x) โ carrier R
I could now prove the first subgoal by writing using assms apply simp
directly, but if I would start proving the second subgoal by apply (intro inc_closed)
, this would generate exactly the same as the first subgoal. So, is there a way to postpone the first subgoal, so that I can simplify the second subgoal first and then solve the remaining equal goals at once?
You can use defer
but that is not good style.
I think apply(intro m_closed; (intro inc_closed)?)
should work
Last updated: Dec 21 2024 at 16:20 UTC