Zulip Chat Archive

Stream: new members

Topic: change bound variable name


Horatiu Cheval (May 24 2021 at 14:41):

Can I change the name of a bound variable in a hypothesis? For example to rename the x inside of forall to y in the following

example (h :  x : , x = x) : true :=
begin
/-
h : ∀ (x : ℕ), x = x
⊢ true
-/
-- change h to
-- h : ∀ (y : ℕ), y = y
end

Kevin Buzzard (May 24 2021 at 14:46):

Did you try the change tactic?

Adam Topaz (May 24 2021 at 14:47):

You can be lazy with change too, e.g.

example (h :  x : , x = x) : true :=
begin
  change  y, _ at h,

end

Horatiu Cheval (May 24 2021 at 14:53):

Oh, right, I get it. I was confused reading in the documentations of change that it needs two definitionally equal terms while I had no term x so that I may have something defeq to it. It didn't occur to me that I could see the whole hypothesis as a term defeq to the one I wanted. Thanks!


Last updated: Dec 20 2023 at 11:08 UTC