exact t in Rocq (Coq)
exact t fills the hole with t itself.
General shape: t. The hole is filled with the term you give.
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 exact_ex : forall P : Prop, P -> P.Starts with a single hole whose type is the statement.?Goal1 open goal: ?Goal
intros P p.Built(fun (P : Prop) (p : P) => ?Goal).(fun (P : Prop) (p : P) => ?Goal)
1 open goal: ?Goal
exact p.Builtp.(fun (P : Prop) (p : P) => p)No holes left: the term is complete.
Qed.The kernel type-checks the finished term against the statement.exact_ex : forall P : Prop, P -> P
Print Assumptions: Closed under the global context
Other tactics
- intro / intros Introducing hypotheses
- apply H Applying a hypothesis
- 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
- left Choosing the left disjunct
- 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