{ "foldl_add_reverse": "```lean\ntheorem foldl_add_reverse (l : List Score) (init : Score) :\n l.reverse.foldl Score.add init = l.foldl Score.add init := by\n induction' l with x xs ih generalizing init\n \u00b7 rfl\n \u00b7 simp [List.reverse_cons, List.foldl_append, List.foldl_cons, List.foldl_nil]\n have h : \u2200 (xs : List Score) (s : Score), (xs.reverse.foldl Score.add s) = (xs.foldl Score.add s) := by\n intro xs s\n exact ih s\n rw [h]\n simp\n have helper : \u2200 (xs : List Score) (s t : Score), (xs.foldl Score.add (s.add t)) = (xs.foldl Score.add s).add t := by\n intro xs\n induction' xs with y ys ih' generalizing s t\n \u00b7 simp\n \u00b7 simp [ih' (s.add t) y, Score.add_assoc]\n rw [helper xs init x]\n simp [Score.add_comm, Score.add_assoc]", "pathCost_reverse": "```lean\ntheorem pathCost_reverse (p : Path) : pathCost (p.reversePath) = pathCost p := by\n unfold pathCost reversePath\n simp\n induction p generalizing ?_ with\n | nil => rfl\n | cons e es ih =>\n simp [pathCost, List.foldl, List.reverseAux, List.map, AdmissibilityEdge.reverse]\n rw [ih]\n simp [pathCost, List.foldl]\n rfl\n```", "shellMass_max_at_midpoint": "```lean\ntheorem shellMass_max_at_midpoint (k : Nat) :\n let n := k * k + k\n shellMass n = k * (k + 1) := by\n intro n\n unfold shellMass\n have h_sqrt : Nat.sqrt n = k := by\n apply Nat.sqrt_eq_iff_mul_self_eq\n \u00b7 have : k * k \u2264 n := by\n nlinarith\n exact this\n \u00b7 have : n < (k + 1) * (k + 1) := by\n nlinarith\n exact this\n rw [h_sqrt]\n have h_a : n - k * k = k := by\n unfold n\n nlinarith\n have h_b : (k + 1) * (k + 1) - n = k + 1 := by\n unfold n\n nlinarith\n rw [h_a, h_b]\n ring\n```" }