∴LeanProofs
Learn Lean 4

Your first proof

Read the assumptions and replace one missing proof step.

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
Exercise not verified. The target is a teaching task; changing it cannot earn a pass. A trusted fixed-challenge verifier is required before passes can be issued.
Show hints
  1. First replace a by b in the target.
  2. Try rw [hab]; the remaining target should be b = c. This is a predicted goal, not live output.
  3. Reference idea: rw [hab] followed by exact hbc.

The repository’s six reference answers have a separate native type-and-axiom audit. This does not check or certify your edited answer. Read the reference audit (JSON)

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