The `rename'` tactic renames one or more existing hypotheses in the local context. It is useful for improving readability, avoiding name collisions, or standardizing variable names before applying proof automation. [1](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Tactic/Rename.html), [2](https://arxiv.org/pdf/2507.14722)
The basic syntax is `rename' old_name => new_name`.
Example 1: Simple Renaming
Renaming a basic hypothesis `h` to a more descriptive name `h_pos`.
lean
```
example (h : x > 0) : x > 0 := by
rename' h => h_pos
exact h_pos
```
Example 2: Renaming Multiple Hypotheses
Renaming multiple hypotheses in a single call.
lean
```
example (a : Nat) (h1 : a > 5) (h2 : a < 10) : True := by
rename' h1 => ha_greater_than_5, h2 => ha_less_than_10
trivial
```