Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2edb339
chore: start work on iterators and ranges
david-christiansen Nov 25, 2025
91f02ec
Merge remote-tracking branch 'upstream/main' into iterators
david-christiansen Nov 25, 2025
c41d64a
chore: bump to latest Verso
david-christiansen Nov 25, 2025
05f2143
feat: finish ranges
david-christiansen Nov 26, 2025
23c8e89
import annotations in examples
david-christiansen Nov 26, 2025
5c880e1
Add iterator examples
david-christiansen Dec 1, 2025
e48a09e
fix structure
david-christiansen Dec 1, 2025
e537484
Example imports/namespaces
david-christiansen Dec 1, 2025
5fefb87
Ranges and slices
david-christiansen Dec 2, 2025
5b874a8
more example
david-christiansen Dec 2, 2025
7f77930
list slice ex
david-christiansen Dec 2, 2025
60447a2
Simplify example
david-christiansen Dec 2, 2025
5d2a6ae
Organization
david-christiansen Dec 2, 2025
95f3b8c
Ignore URL length in CI
david-christiansen Dec 2, 2025
eb14611
another example
david-christiansen Dec 2, 2025
9839897
imports
david-christiansen Dec 2, 2025
bc6c360
try new linkchecker warning name
david-christiansen Dec 2, 2025
ce484c9
missing iterator docs
david-christiansen Dec 2, 2025
5687dc2
missing items
david-christiansen Dec 2, 2025
c2b902e
more api
david-christiansen Dec 2, 2025
7cd549e
refinement and marble explanation
david-christiansen Dec 3, 2025
4cf483a
State types and speed
david-christiansen Dec 3, 2025
6320bf5
Clarify
david-christiansen Dec 3, 2025
1417b22
More on skip
david-christiansen Dec 3, 2025
0fbbf56
filter loop
david-christiansen Dec 3, 2025
b7ca6c2
IR note
david-christiansen Dec 3, 2025
20666c8
fix imports in example
david-christiansen Dec 3, 2025
5444a26
Update Manual/Iterators.lean
david-christiansen Dec 3, 2025
22996a5
Update Manual/Iterators.lean
david-christiansen Dec 3, 2025
b1dcc36
Improve iterators based on review comments
david-christiansen Dec 3, 2025
de54789
Productive descr
david-christiansen Dec 3, 2025
d878b40
fix: example imports
david-christiansen Dec 4, 2025
3653b2a
typo
david-christiansen Dec 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ jobs:
- name: Run LinkChecker (local links only)
if: github.event_name == 'push' || github.event_name == 'pull_request'
run: |
linkchecker './_out/html-multi/'
linkchecker --config=.linkchecker/linkcheckerrc './_out/html-multi/'

# This saved number is used by a workflow_run trigger. It
# manages labels that indicate the status of the built HTML.
Expand Down
2 changes: 2 additions & 0 deletions .linkchecker/linkcheckerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[filtering]
ignorewarnings=url-content-too-large,url-too-long
39 changes: 39 additions & 0 deletions Manual.lean
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import Manual.Simp
import Manual.Grind
import Manual.VCGen
import Manual.BasicTypes
import Manual.Iterators
import Manual.BasicProps
import Manual.NotationsMacros
import Manual.IO
Expand Down Expand Up @@ -118,6 +119,7 @@ draft := true

{docstring Dynamic.get?}

{include 0 Manual.Iterators}

# Standard Library
%%%
Expand Down Expand Up @@ -345,6 +347,32 @@ Std.ExtHashSet
Std.TreeMap
Std.DTreeMap
Std.TreeSet
Std.Iterators
Std.Iterators.Iter
Std.Iterators.Iter.Equiv
Std.Iterators.Iter.TerminationMeasures
Std.Iterators.IterM
Std.Iterators.IterM.Equiv
Std.Iterators.IterM.TerminationMeasures
Std.Iterators.Iterator
Std.Iterators.IteratorAccess
Std.Iterators.IteratorLoop
Std.Iterators.IteratorLoopPartial
Std.Iterators.Finite
Std.Iterators.Productive
Std.Iterators.PostconditionT
Std.Iterators.HetT
Std.PRange
Std.PRange.UpwardEnumerable
Std.Rco
Std.Rcc
Std.Rci
Std.Roo
Std.Roc
Std.Roi
Std.Rio
Std.Ric
Std.Rii
```

```exceptions
Expand Down Expand Up @@ -836,6 +864,17 @@ Prod.lex
Prod.Lex
```

```exceptions
Std.Iterators.Iter.instForIn'
Std.Iterators.Iter.step_filter
Std.Iterators.Iter.val_step_filter
```

```exceptions
Std.Iterators.IterM.instForIn'
Std.Iterators.IterM.toListRev.go
```

```exceptions

Lean.Elab.Tactic.elabSetOption
Expand Down
3 changes: 3 additions & 0 deletions Manual/BasicTypes.lean
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import Manual.BasicTypes.List
import Manual.BasicTypes.Maps
import Manual.BasicTypes.Subtype
import Manual.BasicTypes.Thunk
import Manual.BasicTypes.Range

open Manual.FFIDocType

Expand Down Expand Up @@ -319,6 +320,8 @@ Most comparisons on Booleans should be performed using the {inst}`DecidableEq Bo

{include 0 Manual.BasicTypes.ByteArray}

{include 0 Manual.BasicTypes.Range}

{include 0 Manual.BasicTypes.Maps}

{include 0 Manual.BasicTypes.Subtype}
Expand Down
8 changes: 8 additions & 0 deletions Manual/BasicTypes/Array.lean
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,14 @@ tag := "array-api"

## Iteration

{docstring Array.iter}

{docstring Array.iterFromIdx}

{docstring Array.iterM}

{docstring Array.iterFromIdxM}

{docstring Array.foldr}

{docstring Array.foldrM}
Expand Down
4 changes: 4 additions & 0 deletions Manual/BasicTypes/List.lean
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ tag := "list-api-reference"

## Iteration

{docstring List.iter}

{docstring List.iterM}

{docstring List.forA}

{docstring List.forM}
Expand Down
20 changes: 20 additions & 0 deletions Manual/BasicTypes/Maps.lean
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,12 @@ $_ ~m $_

## Iteration

{docstring Std.HashMap.iter}

{docstring Std.HashMap.keysIter}

{docstring Std.HashMap.valuesIter}

{docstring Std.HashMap.map}

{docstring Std.HashMap.fold}
Expand Down Expand Up @@ -571,6 +577,12 @@ $_ ~m $_

## Iteration

{docstring Std.DHashMap.iter}

{docstring Std.DHashMap.keysIter}

{docstring Std.DHashMap.valuesIter}

{docstring Std.DHashMap.map}

{docstring Std.DHashMap.fold}
Expand Down Expand Up @@ -812,6 +824,8 @@ $_ ~m $_

## Iteration

{docstring Std.HashSet.iter}

{docstring Std.HashSet.all}

{docstring Std.HashSet.any}
Expand Down Expand Up @@ -972,6 +986,12 @@ The declarations in this section should be imported using `import Std.DTreeMap`.

## Iteration

{docstring Std.DTreeMap.iter}

{docstring Std.DTreeMap.keysIter}

{docstring Std.DTreeMap.valuesIter}

{docstring Std.DTreeMap.map}

{docstring Std.DTreeMap.foldl}
Expand Down
6 changes: 6 additions & 0 deletions Manual/BasicTypes/Maps/TreeMap.lean
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,12 @@ The declarations in this section should be imported using `import Std.TreeMap`.

# Iteration

{docstring Std.TreeMap.iter}

{docstring Std.TreeMap.keysIter}

{docstring Std.TreeMap.valuesIter}

{docstring Std.TreeMap.map}

{docstring Std.TreeMap.all}
Expand Down
2 changes: 2 additions & 0 deletions Manual/BasicTypes/Maps/TreeSet.lean
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ tag := "TreeSet"

# Iteration

{docstring Std.TreeSet.iter}

{docstring Std.TreeSet.all}

{docstring Std.TreeSet.any}
Expand Down
Loading