1
votes

I'm trying to prove something using Isar; so far, I've gotten to a goal that looks like this:

(∀P Q. P ≠ Q ⟶ (∃!l. plmeets P l ∧ plmeets Q l)) ∧
(∀P l. ¬ plmeets P l ⟶ (∃!m. affine_plane_data.parallel plmeets l m ∧ plmeets P m)) ∧
(∃P Q. P ≠ Q ∧ (∃R. P ≠ R ∧ Q ≠ R ∧ ¬ affine_plane_data.collinear plmeets P Q R)) 

(here plmeets is a function I've defined, where plmeets P l is shorthand for "the point P lies on the line l" in an affine plane, but I don't think that's important to my question.)

This goal is a conjunction of three things. I've actually already proved lemmas that seem to me to be very close to each of these things. For instance, I have

lemma four_points_a1: "P ≠ Q ⟹ ∃! l . plmeets P l ∧ plmeets Q l"

which produces the output

theorem four_points_a1: ?P ≠ ?Q ⟹ ∃!l. plmeets ?P l ∧ plmeets ?Q l

which you can see is almost exactly the first of the three conjoined items. (I admit that my other lemmas aren't quite so exactly matched to the other two items, but I'll work on that).

I'd like to say "because of lemma four_points_a1, all we have left to prove is item2 ∧ item3" and I'm pretty sure there's a way to do this. But looking at the "Programming and Proving" book doesn't suggest anything to me. In Isabelle, rather than Isar, I suppose I'd apply conjI twice to split the one goal into three, and then resolve the first goal.

But I cannot see how to do this in Isar.

1
" I suppose I'd apply conjI twice to split the one goal into three, and then resolve the first goal." It is possible to do this within an Isar proof. However, it may be best to use the proof method intro instead of multiple applications of rule conjI, i.e. you can use apply(intro conjI) to split the goal into 3 subgoals. Then you can use subgoal to provide a proof for each subgoal individually. However, unless you provide your entire application, it will be difficult to say whether or not there exist better methods.user9716869
Thanks. This appears to be the thing I needed to get me past this particular roadblock. I've posted it as a community-wiki answer so that I can "accept" it in a few days, leaving fewer unanswered questions lying around. (If you'd rather write it as an answer, I'll accept that one instead).John

1 Answers

1
votes

According to @xanonec:

I suppose I'd apply conjI twice to split the one goal into three, and then resolve the first goal.

It is possible to do this within an Isar proof. However, it may be best to use the proof method intro instead of multiple applications of rule conjI, i.e. you can use apply(intro conjI) to split the goal into 3 subgoals. Then you can use subgoal to provide a proof for each subgoal individually. However, unless you provide your entire application, it will be difficult to say whether or not there exist better methods.


According to @John: The syntax for this process that actually worked was this:

  proposition four_points_sufficient: "affine_plane plmeets"
    unfolding affine_plane_def
    apply (intro conjI)
    subgoal using four_points_a1 by blast

It's not clear to me how "It is possible to do this [i.e., apply conjI twice] within an Isar proof," but perhaps I don't now need to know.