The way I would do it is indeed with notations.

```
Record myRec : Type := myRecBuild {
myNat : nat ;
myProof : myNat > 0
}.
Notation "⟪ x ⟫" := (myRecBuild x _).
```

Now if you have a value of `myRec`

it will only print the relevant part.

```
Lemma foo :
forall (x y : myRec),
x.(myNat) = y.(myNat) ->
x = x.
Proof.
intros [x hx] [y hy] e.
simpl in e. (* replaces myNat ⟪ x ⟫ with x *)
(* Goal is now ⟪ x ⟫ = ⟪ x ⟫, hiding hx and hy *)
Abort.
```

I would argue that you don't need the `only printing`

option. In fact, this can be handy if you want to easily provide the relevant part and leave the rest to automation / tactics.

```
Lemma bar :
exists (x : myRec), x.(myNat) = 1.
Proof.
unshelve eexists ⟪ 1 ⟫.
- auto.
- reflexivity.
Qed.
```

This can become particularly handy when using `Program`

or `Equations`

.