Files
lean4/tests/elab/list_monadic_functions.lean
Garmelon 08eb78a5b2 chore: switch to new test/bench suite (#12590)
This PR sets up the new integrated test/bench suite. It then migrates
all benchmarks and some related tests to the new suite. There's also
some documentation and some linting.

For now, a lot of the old tests are left alone so this PR doesn't become
even larger than it already is. Eventually, all tests should be migrated
to the new suite though so there isn't a confusing mix of two systems.
2026-02-25 13:51:53 +00:00

112 lines
2.1 KiB
Lean4
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- This files tracks the implementation of monadic functions for lists, arrays, and vectors.
-- This is just about the definitions, not the theorems.
#check List.mapM
#check Array.mapM
#check Vector.mapM
#check List.flatMapM
#check Array.flatMapM
#check Vector.flatMapM
#check List.mapFinIdxM
#check Array.mapFinIdxM
#check Vector.mapFinIdxM
#check List.mapIdxM
#check Array.mapIdxM
#check Vector.mapIdxM
#check List.firstM
#check Array.firstM
#check Vector.firstM
#check List.forM
#check Array.forM
#check Vector.forM
#check List.filterM
#check Array.filterM
#check List.filterRevM
#check Array.filterRevM
#check List.filterMapM
#check Array.filterMapM
#check List.foldlM
#check Array.foldlM
#check Vector.foldlM
#check List.foldrM
#check Array.foldrM
#check Vector.foldrM
#check List.findM?
#check Array.findM?
#check Vector.findM?
#check List.findSomeM?
#check Array.findSomeM?
#check Vector.findSomeM?
#check List.anyM
#check Array.anyM
#check Vector.anyM
#check List.allM
#check Array.allM
#check Vector.allM
variable {m : Type v Type w} [Monad m] {α : Type} {n : Nat}
#synth ForIn' m (List α) α inferInstance
#synth ForIn' m (Array α) α inferInstance
#synth ForIn' m (Vector α n) α inferInstance
#check List.forM
#check Array.forM
#check Vector.forM
#synth ForM m (List α) α
#synth ForM m (Array α) α
#synth ForM m (Vector α n) α
#synth Functor List
#synth Functor Array
-- These operations still have discrepancies.
-- #check List.modifyM
#check Array.modifyM
-- #check Vector.modifyM
-- #check List.forRevM
#check Array.forRevM
-- #check Vector.forRevM
-- #check List.findRevM?
#check Array.findRevM?
-- #check Vector.findRevM?
-- #check List.findSomeRevM?
#check Array.findSomeRevM?
-- #check Vector.findSomeRevM?
-- #check List.findIdxM?
#check Array.findIdxM?
-- #check Vector.findIdxM?
-- The following have not been implemented for any of the containers.
-- #check List.foldlIdxM
-- #check Array.foldlIdxM
-- #check Vector.foldlIdxM
-- #check List.foldrIdxM
-- #check Array.foldrIdxM
-- #check Vector.foldrIdxM
-- #check List.ofFnM
-- #check Array.ofFnM
-- #check Vector.ofFnM