Zulip Chat Archive

Stream: new members

Topic: Extracting the value from a definition


Harun Khan (Apr 04 2024 at 17:39):

In the context of a proof, what's another way of doing this:

have p, hp⟩:  (p : Prop), p = True := sorry

I want to basically define p and extract hp : p = True.
I could instead do let p := True but then how would I get hp?

Yaël Dillies (Apr 04 2024 at 17:48):

set p := True with hp

Harun Khan (Apr 04 2024 at 17:50):

Is there a non-Mathlib way of doing it?

Yaël Dillies (Apr 04 2024 at 17:50):

let p := True
have hp : p = True := rfl

Harun Khan (Apr 04 2024 at 17:51):

I see. Yeah that's what I expected. Thanks.


Last updated: May 02 2025 at 03:31 UTC