Skip to content
LeanLearn

Proof Lab

Problem, mathematics, Lean editor, live goals, proof tree and hints side by side. Goal states and the final verdict come from the real Lean 4 kernel.

A · Problem

Mapping x ↦ 2x over a list doubles its sum.

list-recursion

B · Mathematics

sum(map (x↦2x) xs)=2⋅sum(xs)\mathrm{sum}(\mathrm{map}\,(x \mapsto 2x)\,xs) = 2\cdot\mathrm{sum}(xs)

Lean statement checked by the verifier:

∀ xs : List Nat, sumList (myMap (fun x => 2 * x) xs) = 2 * sumList xs

E · Proof tree

Place the cursor inside a tactic proof to see its goal.

C · Lean editor · D · Goals · F · Feedback

Goals (line 1)

Place the cursor inside a tactic proof to see its goal.

Lean messages

No messages. Lean accepted everything.