Zulip Chat Archive

Stream: lean4

Topic: Beta reduction in proofs


Siddhartha Gadgil (Jun 04 2021 at 13:06):

I am new to lean which is probably why I am struggling with the following problem. I have a definition and I want to prove something that is a direct consequence of beta-reduction after substituting the definition. But the elaborator fails. Can someone help me with what I should be trying (some tactic?)

def restrict{α : Type}(n : Nat) : (Fin (Nat.succ n)  α)  Fin n   α :=
  fun fn =>
    fun arg =>
      fn (plusOne n arg)

def lem1{α : Type}(zeroVal : α)(j: Fin 7)(g: (Fin (8))  α)
        : (restrict 7 g j) = g (plusOne 7 j) :=
        _

The response I get is

don't know how to synthesize placeholder
context:
α : Type
zeroVal : α
j : Fin 7
g : Fin 8  α
 restrict 7 g j = g (plusOne 7 j)

Thanks.

David Renshaw (Jun 04 2021 at 13:07):

Does rfl work?

Siddhartha Gadgil (Jun 04 2021 at 13:08):

Thanks a lot. Yes it worked here. Will try where I really wanted it.

Siddhartha Gadgil (Jun 04 2021 at 13:11):

Worked where I needed it too. Need some more but I have to work on that. Thanks again.


Last updated: Dec 20 2023 at 11:08 UTC