Lean checks evidence for a precise statement. In this exercise the variables and both equality assumptions are fixed. Read the colon before the conclusion as the boundary between the assumptions and what must be proved. The starter uses sorry to mark an unfinished proof. A file containing sorry may be accepted with a warning in some environments, but that is not a completed exercise. The experimental browser checker can show actual compiler diagnostics, but independent exercise verification is not connected and no exercise completion is awarded.
Your task
Replace sorry while preserving the theorem name, variables, assumptions and conclusion. Use both equalities to obtain a = c.
theorem equality_rewrite (a b c : Nat) (hab : a = b) (hbc : b = c) : a = c := by
sorry
Show hints
- First replace a by b in the target.
- Try rw [hab]; the remaining target should be b = c. This is a predicted goal, not live output.
- Reference idea: rw [hab] followed by exact hbc.
When you get stuck
Read the expected type, compare it with your term, and change one line. The experimental browser checker provides actual diagnostics. Goal information is available at the checked cursor when the runtime supports it; it is a source snapshot, not a live language server. Independent exercise verification is not available.
Use the error repair guide