summaryrefslogtreecommitdiff
path: root/backends/lean/Base/IList
diff options
context:
space:
mode:
authorSon HO2024-03-08 12:09:09 +0100
committerGitHub2024-03-08 12:09:09 +0100
commitb604bb9935007a1f0e9c7f556f8196f0e14c85ce (patch)
tree700439fbe96ea5980216e06b388e863ed8ac314b /backends/lean/Base/IList
parent305f916c602457b0a1fa8ce5569c6c0bf26d6f8e (diff)
parenta7452421be018e5d75065e2038f2f50042a80f3c (diff)
Merge pull request #82 from AeneasVerif/son/switch
Improve tuple projections and matches over integers in Lean
Diffstat (limited to 'backends/lean/Base/IList')
-rw-r--r--backends/lean/Base/IList/IList.lean2
1 files changed, 1 insertions, 1 deletions
diff --git a/backends/lean/Base/IList/IList.lean b/backends/lean/Base/IList/IList.lean
index 51457c20..ca5ee266 100644
--- a/backends/lean/Base/IList/IList.lean
+++ b/backends/lean/Base/IList/IList.lean
@@ -33,7 +33,7 @@ def indexOpt (ls : List α) (i : Int) : Option α :=
@[simp] theorem indexOpt_zero_cons : indexOpt ((x :: tl) : List α) 0 = some x := by simp [indexOpt]
@[simp] theorem indexOpt_nzero_cons (hne : i ≠ 0) : indexOpt ((x :: tl) : List α) i = indexOpt tl (i - 1) := by simp [*, indexOpt]
--- Remark: if i < 0, then the result is the defaul element
+-- Remark: if i < 0, then the result is the default element
def index [Inhabited α] (ls : List α) (i : Int) : α :=
match ls with
| [] => Inhabited.default