Cells.alloc
defimported Lean
Allocate n cells: peak and delta both rise by n.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in set_option linter.unusedSimpArgs false in def Cells.alloc (n : ℕ) : Cells
- Defined in
- EconCSLib, `Cells.alloc`
- Lean proof
- By xbei (from the file's git history), from github.com/gametheoryinlean/EconCSLib at
1a88f809b538(Copyright (c) 2026 EconCSLib contributors. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.30.0.Cells.alloc← Cells.alloc (EconCSLib/Foundation/CostM/Cells.lean:122): verbatim
- Verified
- 08 Oct 2026
- Axioms
- none listed
- Built on 4
- CellsTropical-style cost record: peak occupancy and net delta.
- Cells.instAddMonoidCells.instAddMonoid
- Cells.instZeroCells.instZero
- Cells.instAddCells.instAdd
- Used by 2
- Cells.peak_allocCells.peak_alloc
- Cells.delta_allocCells.delta_alloc
Lean source view module on GitHub
set_option autoImplicit true in set_option relaxedAutoImplicit true in set_option linter.unusedSimpArgs false in /-- Allocate `n` cells: peak and delta both rise by `n`. -/ def Cells.alloc (n : ℕ) : Cells where peak := n delta := n zero_le_peak := Int.natCast_nonneg _ delta_le_peak := le_refl _