Zulip Chat Archive

Stream: lean4

Topic: Unfold where


Marcus Rossel (Nov 20 2021 at 14:46):

I can't figure out how to unfold the definition of a function defined in a where clause in a proof:

example (n : Nat) : True := by
  have : double n = 2 * n := by
    simp [double]
  sorry
where
  double (x : Nat) : Nat := 2 * x

On simp [double] I get the error:

invalid 'simp', proposition expected
    

How can I unfold double?

Henrik Böving (Nov 20 2021 at 14:51):

For a double that is defined outside of a where clause this proof works out by rfl but not for the one inside the where clause so I'm guessing that this use case isn't something that is supported at the moment?


Last updated: Dec 20 2023 at 11:08 UTC