lean4-htt/tests/elab_fail/autoBoundImplicits2.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

54 lines
1.1 KiB
Text
Raw 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.

def f [Add α] (a : α) : α :=
a + a
set_option relaxedAutoImplicit false
def BV (n : Nat) := { a : Array Bool // a.size = n }
def allZero (bv : BV n) : Prop :=
∀ i, i < n → bv.val[i]! = false
def foo (b : BV n) (h : allZero b) : BV n :=
b
def optbind (x : Option α) (f : α → Option β) : Option β :=
match x with
| none => none
| some a => f a
instance : Monad Option where
bind := optbind
pure := some
inductive Mem : α → List α → Prop
| head (a : α) (as : List α) : Mem a (a::as)
def g1 {α : Type u} (a : α) : α :=
a
#check g1
set_option autoImplicit false in
def g2 {α : Type u /- Error -/} (a : α) : α :=
a
def g3 {α : Type β /- Error greek letters are not valid auto names for universe -/} (a : α) : α :=
a
def g4 {α : Type v} (a : α) : α :=
a
def g5 {α : Type (v+1)} (a : α) : α :=
a
def g6 {α : Type u} (a : α) :=
let β : Type u := α
let x : β := a
x
inductive M (m : Type v → Type w) where
| f (β : Type v) : M m
variable {m : Type u → Type u}
def h1 (a : m α) := a
#print h1