left in Rocq (Coq)
left on P \/ Q builds or_introl.
General shape: or_introl ?l. Picks the left disjunct.
Step by step: the proof term after each sentence
Recorded from Coq with Show Proof. after every sentence. Teal is what the sentence built; ?Goal pills are holes still to fill.
Theorem left_ex : forall P Q : Prop, P -> P \/ Q.Starts with a single hole whose type is the statement.?Goal1 open goal: ?Goal
intros P Q p.Built(fun (P Q : Prop) (p : P) => ?Goal).(fun (P Q : Prop) (p : P) => ?Goal)
1 open goal: ?Goal
left.Builtor_introl ?Goal.(fun (P Q : Prop) (p : P) => or_introl ?Goal)
1 open goal: ?Goal
exact p.Builtp.(fun (P Q : Prop) (p : P) => or_introl p)No holes left: the term is complete.
Qed.The kernel type-checks the finished term against the statement.left_ex : forall P Q : Prop, P -> P \/ Q
Print Assumptions: Closed under the global context
Other tactics
- intro / intros Introducing hypotheses
- apply H Applying a hypothesis
- exact t Giving the term directly
- reflexivity Closing an equation
- destruct x Case analysis
- destruct x Case analysis on a number
- induction x Induction on nat
- induction x Induction on a list
- split Proving a conjunction
- right Choosing the right disjunct
- assert (H : P) Proving a helper fact
- rewrite H Rewriting with an equation
- rewrite <- H Rewriting right to left
- assumption Finding the hypothesis
- discriminate Impossible equations
- revert x Putting a variable back in the goal
- exists t Providing a witness