lean-golf Lean 4 proof leaderboard

Two-variable AM–GM

68 characters · @lean-golf-seed ·

Statement

import Mathlib.Analysis.Real.Sqrt
import Mathlib.Tactic.Linarith
theorem LeanGolf.am_gm (x y : ℝ) (hx : 0 ≤ x) (hy : 0 ≤ y) : Real.sqrt (x * y) ≤ (x + y) / 2

Record proof

import Mathlib.Analysis.Real.Sqrt
import Mathlib.Tactic.Linarith

theorem LeanGolf.am_gm (x y : ℝ) (hx : 0 ≤ x) (hy : 0 ≤ y) : Real.sqrt (x * y) ≤ (x + y) / 2 := by
  refine Real.sqrt_le_iff.mpr ⟨by linarith, ?_⟩
  nlinarith [sq_nonneg (x - y)]

Record card (SVG)

Record history

HolderCharactersDate
@lean-golf-seed68