Files
lean4/tests/elab/congrReserved.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

41 lines
1.3 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.
import Lean
/--
info: Vector.extract.hcongr_5.{u_1} (α α' : Type u_1) (e_1 : α = α') (n n' : Nat) (e_2 : n = n') (xs : Vector α n)
(xs' : Vector α' n') (e_3 : xs ≍ xs') (start start' : Nat) (e_4 : start = start') (stop stop' : Nat)
(e_5 : stop = stop') : xs.extract start stop ≍ xs'.extract start' stop'
-/
#guard_msgs in
#check Vector.extract.hcongr_5
/--
info: Vector.extract.congr_simp.{u_1} {α : Type u_1} {n : Nat} (xs xs✝ : Vector α n) (e_xs : xs = xs✝) (start stop : Nat) :
xs.extract start stop = xs✝.extract start stop
-/
#guard_msgs in
#check Vector.extract.congr_simp
open Lean Meta
/--
info: @Vector.extract.congr_simp
-/
#guard_msgs in
run_meta do
let some thm1 mkCongrSimpForConst? ``Vector.extract [0] | unreachable!
IO.println ( ppExpr thm1.proof)
let some thm2 mkCongrSimp? (mkConst ``Vector.extract [0]) | unreachable!
assert! thm1.type == thm2.type
assert! thm1.argKinds == thm2.argKinds
/--
info: Vector.extract.hcongr_5
-/
#guard_msgs in
run_meta do
let some thm1 mkHCongrWithArityForConst? ``Vector.extract [0] 5 | unreachable!
IO.println ( ppExpr thm1.proof)
let thm2 mkHCongrWithArity (mkConst ``Vector.extract [0]) 5
assert! thm1.type == thm2.type
assert! thm1.argKinds == thm2.argKinds