# Hide the value of a hypothesis introduced by pose, show only its type

In proof mode, if I know an expression e of type T, I can write pose foo : T := e to add foo := e : T as a hypothesis. Often, I don't care about that foo is the same as e, I only care that foo has type T, so in the hypotheses list I would like to see foo : T instead of foo := e : T to reduce mental clutter. How can I do that?

• I get syntax error at : if I use pose foo : T := t1. But pose (foo := t1) works here. Feb 19 at 21:06
• @JoachimBreitner I get no syntax error on the following example: Lemma foo S T (f : S -> T) (s : S) : T. Proof. pose foo : T := f s. Feb 19 at 21:08
• @CrabMan Which Coq version do you use? I get a syntax error on your example on all Coq versions I can test from 8.6 to 8.15. Feb 21 at 13:08
• @Zimmi48 Coq 8.13 and I don't know which version of mathcomp. Do From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq. and then it'll work. Feb 21 at 14:58
• OK, then this explains why (that's the SSReflect pose tactic)! Feb 22 at 22:31

It seems that

assert (foo := t1).


(docs here) does what you want?

assert was already mentioned in another answer. An alternative (if you like the word pose) is pose proof. Several syntax variants are supported, including the one with :=. In practice, the two will produce exactly the same proof, so this is a purely stylistic choice.

The question text did not make that clear, but it turns out (from the comments) that what you are using is actually the pose tactic from SSReflect (documentation here) and not the standard Coq pose tactic (documentation here). If you want to keep using SSReflect tactics, then the recommended answer to your question is to replace pose with have (documentation here) when you do not need the body. E.g.:

Require Import ssreflect.

Lemma foo S T (f : S -> T) (s : S) : T.
Proof.
have foo : T := f s.