Zulip Chat Archive
Stream: new members
Topic: how to alias something?
ShatteredLead (Oct 16 2024 at 11:21):
How can I set a auxiliary variable, to give a whole part names, in order to simplify the proof? Thanks!
example (x: Nat) : x + 1 = x + 1 := by
-- just example to show motivation:
-- let x' := x + 1
-- rw [← x'] -- it surely won't work
-- exact (rfl x')
Riccardo Brasca (Oct 16 2024 at 11:36):
you can use set x := 1 with hx
Zhuanhao Z Wu (Oct 16 2024 at 19:14):
An alternative:
example (x: Nat) : x + 1 = x + 1 := by
generalize h: x + 1 = x'
rfl
Last updated: May 02 2025 at 03:31 UTC