lean4-htt/tests/lean/run/1337.lean
Kyle Miller 4575799f8e
chore: library style cleanup (#9654)
This PR cleans up the style of the library in anticipation of a future
PR that requires strict indentation for tactic sequences.
2025-07-31 21:28:59 +00:00

14 lines
362 B
Text

theorem n_minus_one_le_n {n : Nat} : n > 0 → n - 1 < n := by
cases n with
| zero => simp []
| succ n =>
intros
rw [Nat.add_sub_cancel]
apply Nat.le.refl
partial def foo : Array Int → Int
| arr => Id.run do
let mut r : Int := 1
while h : arr.size > 0 do
r := r * arr[arr.size - 1]'(by apply n_minus_one_le_n h)
return r