### coq

#### Split conjunction goal into subgoals

Consider the following toy exercise: Theorem swap_id: forall (m n : nat), m = n -> (m, n) = (n, m). Proof. intros m n H. At this point I have the following: 1 subgoal m, n : nat H : m = n ______________________________________(1/1) (m, n) = (n, m) I would like to split the goal into two subgoals, m = n and n = m. Is there a tactic which does that?

Solve using the f_equal tactic: Theorem test: forall (m n : nat), m = n -> (m, n) = (n, m). Proof. intros m n H. f_equal. With state: 2 subgoals m, n : nat H : m = n ______________________________________(1/2) m = n ______________________________________(2/2) n = m

### Related Links

How do I change a concrete variable to an existentially quantified var in a hypothesis?

How would I prove that b = c if (andb b c = orb b c) in coq?

Incorrect elimination of X in the inductive type “or”:

Define an inductive dependent-type with constraints on the type-parameter

injectivity of inl and inr in standard library

convoy pattern and match involving inequality

Conversion of nat to Q in Coq

A Coq analogue of the Burali-Forti paradox?

Coq inductive reasoning about ACSL inductive predicates?

extracting evidence of equality from match

How do I the calculate the sqrt of a natural or rational number in coq?

Why unfold does not work on lt(less-than) in Coq?

How to instantiate a variable of forall in a hypothesis in Coq?

Why does use of Coq's setoid_replace “by” clause need an extra idtac?

Inductively defined dense vector lemmas

In coq, how to do “induction n eqn: Hn” in a way that doesn't mess up the inductive hypothesis?