Skip to content

In structured proof, how to focus on a specific goal in interaction mode #144

Answered by darabos
subfish-zhou asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry, I don't mean to be dismissive of your questions. I've been looking at the same questions. I'll just share the ideas we had, in case you find them useful.

What if I want to prove the second goal first?

It's simplest to just solve them in order. You have to solve them all anyway. But you can skip a goal by running · sorry, or reorder goals with pick_goal. For example:

example (p q : Prop) : p ∨ q → q ∨ p := by
  intro h
  cases h
  pick_goal 2
  apply Or.inl
  assumption
  apply Or.inr
  assumption

(swap is a shorthand for pick_goal 2.)

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@subfish-zhou
Comment options

@darabos
Comment options

@subfish-zhou
Comment options

@darabos
Comment options

Answer selected by subfish-zhou
@subfish-zhou
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants