mirror of
https://github.com/leanprover/lean4.git
synced 2026-03-17 18:34:06 +00:00
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.
54 lines
909 B
Lean4
54 lines
909 B
Lean4
import Lean
|
|
/-!
|
|
# Escaping names that are tokens when pretty printing
|
|
-/
|
|
|
|
|
|
/-!
|
|
Variable that's a token.
|
|
-/
|
|
section
|
|
variable («forall» : Nat)
|
|
|
|
/-- info: «forall» + 1 : Nat -/
|
|
#guard_msgs in #check «forall» + 1
|
|
end
|
|
|
|
|
|
/-!
|
|
Constant that's a token
|
|
-/
|
|
def «forall» := 1
|
|
|
|
/-- info: «forall» + 1 : Nat -/
|
|
#guard_msgs in #check «forall» + 1
|
|
|
|
|
|
/-!
|
|
Don't escape name components that are tokens if the prefix is not a token.
|
|
-/
|
|
def Exists.forall := 1
|
|
|
|
/-- info: Exists.forall : Nat -/
|
|
#guard_msgs in #check Exists.forall
|
|
|
|
|
|
/-!
|
|
Overly cautious for tokens that are prefixes.
|
|
-/
|
|
def forall.congr := 1
|
|
|
|
/-- info: «forall».congr : Nat -/
|
|
#guard_msgs in #check forall.congr
|
|
|
|
|
|
/-!
|
|
Escape the last name component to avoid a token.
|
|
-/
|
|
notation "Exists.forall" => true
|
|
|
|
/-- info: Exists.«forall» : Nat -/
|
|
#guard_msgs in #check «Exists».forall
|
|
/-- info: Exists.forall : Bool -/
|
|
#guard_msgs in #check Exists.forall
|