File: .lake/packages/lean4/src/lean/Init/Notation.lean

full_name: Lean.Parser.Category
code: /--
Auxiliary type used to represent syntax categories. We mainly use auxiliary
definitions with this type to attach doc strings to syntax categories.
-/
structure Parser.Category
goal: Type

full_name: Lean.Parser.Category.command
code: /-- `command` is the syntax category for things that appear at the top level
of a lean file. For example, `def foo := 1` is a `command`, as is
`namespace Foo` and `end Foo`. Commands generally have an effect on the state of
adding something to the environment (like a new definition), as well as
commands like `variable` which modify future commands within a scope. -/
def command : Category 
goal: Lean.Parser.Category

full_name: Lean.Parser.Category.term
code: /-- `term` is the builtin syntax category for terms. A term denotes an expression
in lean's type theory, for example `2 + 2` is a term. The difference between
`Term` and `Expr` is that the former is a kind of syntax, while the latter is
the result of elaboration. For example `by simp` is also a `Term`, but it elaborates
to different `Expr`s depending on the context. -/
def term : Category 
goal: Lean.Parser.Category

full_name: Lean.Parser.Category.tactic
code: /-- `tactic` is the builtin syntax category for tactics. These appear after
`by` in proofs, and they are programs that take in the proof context
(the hypotheses in scope plus the type of the term to synthesize) and construct
a term of the expected type. For example, `simp` is a tactic, used in:
```
example : 2 + 2 = 4 := by simp
```
-/
def tactic : Category 
goal: Lean.Parser.Category

full_name: Lean.Parser.Category.doElem
code: /-- `doElem` is a builtin syntax category for elements that can appear in the `do` notation.
For example, `let x ← e` is a `doElem`, and a `do` block consists of a list of `doElem`s. -/
def doElem : Category 
goal: Lean.Parser.Category

full_name: Lean.Parser.Category.level
code: /-- `level` is a builtin syntax category for universe levels.
This is the `u` in `Sort u`: it can contain `max` and `imax`, addition with
constants, and variables. -/
def level : Category 
goal: Lean.Parser.Category

full_name: Lean.Parser.Category.attr
code: /-- `attr` is a builtin syntax category for attributes.
Declarations can be annotated with attributes using the `@[...]` notation. -/
def attr : Category 
goal: Lean.Parser.Category

full_name: Lean.Parser.Category.stx
code: /-- `stx` is a builtin syntax category for syntax. This is the abbreviated
parser notation used inside `syntax` and `macro` declarations. -/
def stx : Category 
goal: Lean.Parser.Category

full_name: Lean.Parser.Category.prio
code: /-- `prio` is a builtin syntax category for priorities.
Priorities are used in many different attributes.
Higher numbers denote higher priority, and for example typeclass search will
try high priority instances before low priority.
In addition to literals like `37`, you can also use `low`, `mid`, `high`, as well as
add and subtract priorities. -/
def prio : Category 
goal: Lean.Parser.Category

full_name: Lean.Parser.Category.prec
code: /-- `prec` is a builtin syntax category for precedences. A precedence is a value
that expresses how tightly a piece of syntax binds: for example `1 + 2 * 3` is
parsed as `1 + (2 * 3)` because `*` has a higher pr0ecedence than `+`.
Higher numbers denote higher precedence.
In addition to literals like `37`, there are some special named priorities:
* `arg` for the precedence of function arguments
* `max` for the highest precedence used in term parsers (not actually the maximum possible value)
* `lead` for the precedence of terms not supposed to be used as arguments
and you can also add and subtract precedences. -/
def prec : Category 
goal: Lean.Parser.Category

full_name: Lean.Parser.Syntax.addPrec
code: /-- Addition of precedences. This is normally used only for offsetting, e.g. `max + 1`. -/
syntax:65 (name := addPrec) prec " + " prec:66 : prec
goal: Lean.TrailingParserDescr

full_name: Lean.Parser.Syntax.subPrec
code: /-- Subtraction of precedences. This is normally used only for offsetting, e.g. `max - 1`. -/
syntax:65 (name := subPrec) prec " - " prec:66 : prec
goal: Lean.TrailingParserDescr

full_name: Lean.Parser.Syntax.addPrio
code: /-- Addition of priorities. This is normally used only for offsetting, e.g. `default + 1`. -/
syntax:65 (name := addPrio) prio " + " prio:66 : prio
goal: Lean.TrailingParserDescr

full_name: Lean.Parser.Syntax.subPrio
code: /-- Subtraction of priorities. This is normally used only for offsetting, e.g. `default - 1`. -/
syntax:65 (name := subPrio) prio " - " prio:66 : prio
goal: Lean.TrailingParserDescr

full_name: Lean.«instCoeOutTSyntaxSyntax_.lake»
code: instance : CoeOut (TSyntax ks) Syntax 
goal: CoeOut (Lean.TSyntax ks) Lean.Syntax

full_name: Lean.«instCoeSyntaxNodeKindSyntaxNodeKinds_.lake»
code: instance : Coe SyntaxNodeKind SyntaxNodeKinds 
goal: Coe Lean.SyntaxNodeKind Lean.SyntaxNodeKinds

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_precMax_1»
code: macro "max"  : prec => `(prec| 1024)
goal: Lean.Macro

full_name: precMax
code: macro "max"  : prec => `(prec| 1024)
goal: Lean.ParserDescr

full_name: precArg
code: macro "arg"  : prec => `(prec| 1023)
goal: Lean.ParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_precArg_1»
code: macro "arg"  : prec => `(prec| 1023)
goal: Lean.Macro

full_name: precLead
code: macro "lead" : prec => `(prec| 1022)
goal: Lean.ParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_precLead_1»
code: macro "lead" : prec => `(prec| 1022)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_prec(_)_1»
code: macro "(" p:prec ")" : prec => return p
goal: Lean.Macro

full_name: «prec(_)»
code: macro "(" p:prec ")" : prec => return p
goal: Lean.ParserDescr

full_name: precMin
code: macro "min"  : prec => `(prec| 10)
goal: Lean.ParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_precMin_1»
code: macro "min"  : prec => `(prec| 10)
goal: Lean.Macro

full_name: precMin1
code: macro "min1" : prec => `(prec| 11)
goal: Lean.ParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_precMin1_1»
code: macro "min1" : prec => `(prec| 11)
goal: Lean.Macro

full_name: termMax_prec
code: macro "max_prec" : term => `(1024)
goal: Lean.ParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_termMax_prec_1»
code: macro "max_prec" : term => `(1024)
goal: Lean.Macro

full_name: prioDefault
code: macro "default" : prio => `(prio| 1000)
goal: Lean.ParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_prioDefault_1»
code: macro "default" : prio => `(prio| 1000)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_prioLow_1»
code: macro "low"     : prio => `(prio| 100)
goal: Lean.Macro

full_name: prioLow
code: macro "low"     : prio => `(prio| 100)
goal: Lean.ParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_prioMid_1»
code: macro "mid"     : prio => `(prio| 500)
goal: Lean.Macro

full_name: prioMid
code: macro "mid"     : prio => `(prio| 500)
goal: Lean.ParserDescr

full_name: prioHigh
code: macro "high"    : prio => `(prio| 10000)
goal: Lean.ParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_prioHigh_1»
code: macro "high"    : prio => `(prio| 10000)
goal: Lean.Macro

full_name: «prio(_)»
code: macro "(" p:prio ")" : prio => return p
goal: Lean.ParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_prio(_)_1»
code: macro "(" p:prio ")" : prio => return p
goal: Lean.Macro

full_name: «stx_+»
code: /--
`p+` is shorthand for `many1(p)`. It uses parser `p` 1 or more times, and produces a
`nullNode` containing the array of parsed results. This parser has arity 1.

If `p` has arity more than 1, it is auto-grouped in the items generated by the parser.
-/
syntax:arg stx:max "+" : stx
goal: Lean.TrailingParserDescr

full_name: «stx_*»
code: /--
`p*` is shorthand for `many(p)`. It uses parser `p` 0 or more times, and produces a
`nullNode` containing the array of parsed results. This parser has arity 1.

If `p` has arity more than 1, it is auto-grouped in the items generated by the parser.
-/
syntax:arg stx:max "*" : stx
goal: Lean.TrailingParserDescr

full_name: stx_?
code: /--
`(p)?` is shorthand for `optional(p)`. It uses parser `p` 0 or 1 times, and produces a
`nullNode` containing the array of parsed results. This parser has arity 1.

`p` is allowed to have arity n > 1 (in which case the node will have either 0 or n children),
but if it has arity 0 then the result will be ambiguous.

Because `?` is an identifier character, `ident?` will not work as intended.
You have to write either `ident ?` or `(ident)?` for it to parse as the `?` combinator
applied to the `ident` parser.
-/
syntax:arg stx:max "?" : stx
goal: Lean.TrailingParserDescr

full_name: «stx_<|>_»
code: /--
`p1 <|> p2` is shorthand for `orelse(p1, p2)`, and parses either `p1` or `p2`.
It does not backtrack, meaning that if `p1` consumes at least one token then
`p2` will not be tried. Therefore, the parsers should all differ in their first
token. The `atomic(p)` parser combinator can be used to locally backtrack a parser.
(For full backtracking, consider using extensible syntax classes instead.)

On success, if the inner parser does not generate exactly one node, it will be
automatically wrapped in a `group` node, so the result will always be arity 1.

The `<|>` combinator does not generate a node of its own, and in particular
does not tag the inner parsers to distinguish them, which can present a problem
when reconstructing the parse. A well formed `<|>` parser should use disjoint
node kinds for `p1` and `p2`.
-/
syntax:2 stx:2 " <|> " stx:1 : stx
goal: Lean.TrailingParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_stx_*_1»
code: macro_rules
  | `(stx| $p +) => `(stx| many1($p))
  | `(stx| $p *) => `(stx| many($p))
  | `(stx| $p ?) => `(stx| optional($p))
  | `(stx| $p₁ <|> $p₂) => `(stx| orelse($p₁, $p₂))
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_stx_?_1»
code: macro_rules
  | `(stx| $p +) => `(stx| many1($p))
  | `(stx| $p *) => `(stx| many($p))
  | `(stx| $p ?) => `(stx| optional($p))
  | `(stx| $p₁ <|> $p₂) => `(stx| orelse($p₁, $p₂))
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_stx_<|>__1»
code: macro_rules
  | `(stx| $p +) => `(stx| many1($p))
  | `(stx| $p *) => `(stx| many($p))
  | `(stx| $p ?) => `(stx| optional($p))
  | `(stx| $p₁ <|> $p₂) => `(stx| orelse($p₁, $p₂))
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_stx_+_1»
code: macro_rules
  | `(stx| $p +) => `(stx| many1($p))
  | `(stx| $p *) => `(stx| many($p))
  | `(stx| $p ?) => `(stx| optional($p))
  | `(stx| $p₁ <|> $p₂) => `(stx| orelse($p₁, $p₂))
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_stx_,*_1»
code: macro:arg x:stx:max ",*"   : stx => `(stx| sepBy($x, ",", ", "))
goal: Lean.Macro

full_name: «stx_,*»
code: macro:arg x:stx:max ",*"   : stx => `(stx| sepBy($x, ",", ", "))
goal: Lean.TrailingParserDescr

full_name: «stx_,+»
code: macro:arg x:stx:max ",+"   : stx => `(stx| sepBy1($x, ",", ", "))
goal: Lean.TrailingParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_stx_,+_1»
code: macro:arg x:stx:max ",+"   : stx => `(stx| sepBy1($x, ",", ", "))
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_stx_,*,?_1»
code: macro:arg x:stx:max ",*,?" : stx => `(stx| sepBy($x, ",", ", ", allowTrailingSep))
goal: Lean.Macro

full_name: «stx_,*,?»
code: macro:arg x:stx:max ",*,?" : stx => `(stx| sepBy($x, ",", ", ", allowTrailingSep))
goal: Lean.TrailingParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_stx_,+,?_1»
code: macro:arg x:stx:max ",+,?" : stx => `(stx| sepBy1($x, ",", ", ", allowTrailingSep))
goal: Lean.Macro

full_name: «stx_,+,?»
code: macro:arg x:stx:max ",+,?" : stx => `(stx| sepBy1($x, ",", ", ", allowTrailingSep))
goal: Lean.TrailingParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_stx!__1»
code: macro:arg "!" x:stx:max : stx => `(stx| notFollowedBy($x))
goal: Lean.Macro

full_name: stx!_
code: macro:arg "!" x:stx:max : stx => `(stx| notFollowedBy($x))
goal: Lean.ParserDescr

full_name: rawNatLit
code: /--
The `nat_lit n` macro constructs "raw numeric literals". This corresponds to the
`Expr.lit (.natVal n)` constructor in the `Expr` data type.

Normally, when you write a numeral like `#check 37`, the parser turns this into
an application of `OfNat.ofNat` to the raw literal `37` to cast it into the
target type, even if this type is `Nat` (so the cast is the identity function).
But sometimes it is necessary to talk about the raw numeral directly,
especially when proving properties about the `ofNat` function itself.
-/
syntax (name := rawNatLit) "nat_lit " num : term
goal: Lean.ParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_∘__1»
code: @[inherit_doc] infixr:90 " ∘ "  => Function.comp
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_Function_comp_1»
code: @[inherit_doc] infixr:90 " ∘ "  => Function.comp
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_Prod_1»
code: @[inherit_doc] infixr:35 " × "  => Prod
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_×__1»
code: @[inherit_doc] infixr:35 " × "  => Prod
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_Dvd_dvd_1»
code: @[inherit_doc] infix:50  " ∣ " => Dvd.dvd
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_∣__1»
code: @[inherit_doc] infix:50  " ∣ " => Dvd.dvd
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_HOr_hOr_1»
code: @[inherit_doc] infixl:55 " ||| " => HOr.hOr
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_|||__1»
code: @[inherit_doc] infixl:55 " ||| " => HOr.hOr
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_^^^__1»
code: @[inherit_doc] infixl:58 " ^^^ " => HXor.hXor
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_HXor_hXor_1»
code: @[inherit_doc] infixl:58 " ^^^ " => HXor.hXor
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_HAnd_hAnd_1»
code: @[inherit_doc] infixl:60 " &&& " => HAnd.hAnd
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_&&&__1»
code: @[inherit_doc] infixl:60 " &&& " => HAnd.hAnd
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_+__1»
code: @[inherit_doc] infixl:65 " + "   => HAdd.hAdd
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_HAdd_hAdd_1»
code: @[inherit_doc] infixl:65 " + "   => HAdd.hAdd
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_-__1»
code: @[inherit_doc] infixl:65 " - "   => HSub.hSub
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_HSub_hSub_1»
code: @[inherit_doc] infixl:65 " - "   => HSub.hSub
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_HMul_hMul_1»
code: @[inherit_doc] infixl:70 " * "   => HMul.hMul
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_*__1»
code: @[inherit_doc] infixl:70 " * "   => HMul.hMul
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_/__1»
code: @[inherit_doc] infixl:70 " / "   => HDiv.hDiv
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_HDiv_hDiv_1»
code: @[inherit_doc] infixl:70 " / "   => HDiv.hDiv
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_%__1»
code: @[inherit_doc] infixl:70 " % "   => HMod.hMod
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_HMod_hMod_1»
code: @[inherit_doc] infixl:70 " % "   => HMod.hMod
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_HShiftLeft_hShiftLeft_1»
code: @[inherit_doc] infixl:75 " <<< " => HShiftLeft.hShiftLeft
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_<<<__1»
code: @[inherit_doc] infixl:75 " <<< " => HShiftLeft.hShiftLeft
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_>>>__1»
code: @[inherit_doc] infixl:75 " >>> " => HShiftRight.hShiftRight
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_HShiftRight_hShiftRight_1»
code: @[inherit_doc] infixl:75 " >>> " => HShiftRight.hShiftRight
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_HPow_hPow_1»
code: @[inherit_doc] infixr:80 " ^ "   => HPow.hPow
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_^__1»
code: @[inherit_doc] infixr:80 " ^ "   => HPow.hPow
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_++__1»
code: @[inherit_doc] infixl:65 " ++ "  => HAppend.hAppend
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_HAppend_hAppend_1»
code: @[inherit_doc] infixl:65 " ++ "  => HAppend.hAppend
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_Neg_neg_1»
code: @[inherit_doc] prefix:75 "-"    => Neg.neg
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term-__1»
code: @[inherit_doc] prefix:75 "-"    => Neg.neg
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term~~~__1»
code: @[inherit_doc] prefix:100 "~~~"  => Complement.complement
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_Complement_complement_1»
code: @[inherit_doc] prefix:100 "~~~"  => Complement.complement
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_|||__2»
code: macro_rules | `($x ||| $y) => `(binop% HOr.hOr $x $y)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_^^^__2»
code: macro_rules | `($x ^^^ $y) => `(binop% HXor.hXor $x $y)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_&&&__2»
code: macro_rules | `($x &&& $y) => `(binop% HAnd.hAnd $x $y)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_+__2»
code: macro_rules | `($x + $y)   => `(binop% HAdd.hAdd $x $y)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_-__2»
code: macro_rules | `($x - $y)   => `(binop% HSub.hSub $x $y)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_*__2»
code: macro_rules | `($x * $y)   => `(binop% HMul.hMul $x $y)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_/__2»
code: macro_rules | `($x / $y)   => `(binop% HDiv.hDiv $x $y)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_%__2»
code: macro_rules | `($x % $y)   => `(binop% HMod.hMod $x $y)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_^__2»
code: macro_rules | `($x ^ $y)   => `(rightact% HPow.hPow $x $y)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_++__2»
code: macro_rules | `($x ++ $y)  => `(binop% HAppend.hAppend $x $y)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term-__2»
code: macro_rules | `(- $x)      => `(unop% Neg.neg $x)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_LE_le_1»
code: @[inherit_doc] infix:50 " <= " => LE.le
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_<=__1»
code: @[inherit_doc] infix:50 " <= " => LE.le
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_LE_le_2»
code: @[inherit_doc] infix:50 " ≤ "  => LE.le
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_≤__1»
code: @[inherit_doc] infix:50 " ≤ "  => LE.le
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_<__1»
code: @[inherit_doc] infix:50 " < "  => LT.lt
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_LT_lt_1»
code: @[inherit_doc] infix:50 " < "  => LT.lt
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_GE_ge_1»
code: @[inherit_doc] infix:50 " >= " => GE.ge
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_>=__1»
code: @[inherit_doc] infix:50 " >= " => GE.ge
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_GE_ge_2»
code: @[inherit_doc] infix:50 " ≥ "  => GE.ge
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_≥__1»
code: @[inherit_doc] infix:50 " ≥ "  => GE.ge
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_>__1»
code: @[inherit_doc] infix:50 " > "  => GT.gt
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_GT_gt_1»
code: @[inherit_doc] infix:50 " > "  => GT.gt
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_Eq_1»
code: @[inherit_doc] infix:50 " = "  => Eq
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_=__1»
code: @[inherit_doc] infix:50 " = "  => Eq
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_BEq_beq_1»
code: @[inherit_doc] infix:50 " == " => BEq.beq
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_==__1»
code: @[inherit_doc] infix:50 " == " => BEq.beq
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_<=__2»
code: macro_rules | `($x <= $y) => `(binrel% LE.le $x $y)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_≤__2»
code: macro_rules | `($x ≤ $y)  => `(binrel% LE.le $x $y)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_<__2»
code: macro_rules | `($x < $y)  => `(binrel% LT.lt $x $y)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_>__2»
code: macro_rules | `($x > $y)  => `(binrel% GT.gt $x $y)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_>=__2»
code: macro_rules | `($x >= $y) => `(binrel% GE.ge $x $y)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_≥__2»
code: macro_rules | `($x ≥ $y)  => `(binrel% GE.ge $x $y)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_=__2»
code: macro_rules | `($x = $y)  => `(binrel% Eq $x $y)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_==__2»
code: macro_rules | `($x == $y) => `(binrel_no_prop% BEq.beq $x $y)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_/\__1»
code: @[inherit_doc] infixr:35 " /\\ " => And
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_And_1»
code: @[inherit_doc] infixr:35 " /\\ " => And
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_And_2»
code: @[inherit_doc] infixr:35 " ∧ "   => And
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_∧__1»
code: @[inherit_doc] infixr:35 " ∧ "   => And
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_Or_1»
code: @[inherit_doc] infixr:30 " \\/ " => Or
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_\/__1»
code: @[inherit_doc] infixr:30 " \\/ " => Or
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_Or_2»
code: @[inherit_doc] infixr:30 " ∨  "  => Or
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_∨__1»
code: @[inherit_doc] infixr:30 " ∨  "  => Or
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term¬__1»
code: @[inherit_doc] notation:max "¬" p:40 => Not p
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_Not_1»
code: @[inherit_doc] notation:max "¬" p:40 => Not p
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_&&__1»
code: @[inherit_doc] infixl:35 " && " => and
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_and_1»
code: @[inherit_doc] infixl:35 " && " => and
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_||__1»
code: @[inherit_doc] infixl:30 " || " => or
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_or_1»
code: @[inherit_doc] infixl:30 " || " => or
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term!__1»
code: @[inherit_doc] notation:max "!" b:40 => not b
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_not_1»
code: @[inherit_doc] notation:max "!" b:40 => not b
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_Membership_mem_1»
code: @[inherit_doc] infix:50 " ∈ " => Membership.mem
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_∈__1»
code: @[inherit_doc] infix:50 " ∈ " => Membership.mem
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_∉__1»
code: /-- `a ∉ b` is negated elementhood. It is notation for `¬ (a ∈ b)`. -/
notation:50 a:50 " ∉ " b:50 => ¬ (a ∈ b)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_::__1»
code: @[inherit_doc] infixr:67 " :: " => List.cons
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_List_cons_1»
code: @[inherit_doc] infixr:67 " :: " => List.cons
goal: Lean.PrettyPrinter.Unexpander

full_name: «term_<|>_»
code: @[inherit_doc HOrElse.hOrElse] syntax:20 term:21 " <|> " term:20 : term
goal: Lean.TrailingParserDescr

full_name: «term_>>_»
code: @[inherit_doc HAndThen.hAndThen] syntax:60 term:61 " >> " term:60 : term
goal: Lean.TrailingParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_>>=__1»
code: @[inherit_doc] infixl:55  " >>= " => Bind.bind
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_Bind_bind_1»
code: @[inherit_doc] infixl:55  " >>= " => Bind.bind
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_<*>__1»
code: @[inherit_doc] notation:60 a:60 " <*> " b:61 => Seq.seq a fun _ : Unit => b
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_Seq_seq_1»
code: @[inherit_doc] notation:60 a:60 " <*> " b:61 => Seq.seq a fun _ : Unit => b
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_<*__1»
code: @[inherit_doc] notation:60 a:60 " <* " b:61 => SeqLeft.seqLeft a fun _ : Unit => b
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_SeqLeft_seqLeft_1»
code: @[inherit_doc] notation:60 a:60 " <* " b:61 => SeqLeft.seqLeft a fun _ : Unit => b
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_*>__1»
code: @[inherit_doc] notation:60 a:60 " *> " b:61 => SeqRight.seqRight a fun _ : Unit => b
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_SeqRight_seqRight_1»
code: @[inherit_doc] notation:60 a:60 " *> " b:61 => SeqRight.seqRight a fun _ : Unit => b
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___unexpand_Functor_map_1»
code: @[inherit_doc] infixr:100 " <$> " => Functor.map
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_<$>__1»
code: @[inherit_doc] infixr:100 " <$> " => Functor.map
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_<|>__1»
code: macro_rules | `($x <|> $y) => `(binop_lazy% HOrElse.hOrElse $x $y)
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_>>__1»
code: macro_rules | `($x >> $y)  => `(binop_lazy% HAndThen.hAndThen $x $y)
goal: Lean.Macro

full_name: Lean.binderIdent
code: /--
`binderIdent` matches an `ident` or a `_`. It is used for identifiers in binding
position, where `_` means that the value should be left unnamed and inaccessible.
-/
syntax binderIdent := ident <|> hole
goal: Lean.ParserDescr

full_name: Lean.Parser.Tactic.caseArg
code: /--
A case tag argument has the form `tag x₁ ... xₙ`; it refers to tag `tag` and renames
the last `n` hypotheses to `x₁ ... xₙ`.
-/
syntax caseArg := binderIdent (ppSpace binderIdent)*
goal: Lean.ParserDescr

full_name: termDepIfThenElse
code: @[inherit_doc dite] syntax (name := termDepIfThenElse)
  ppRealGroup(ppRealFill(ppIndent("if " Lean.binderIdent " : " term " then") ppSpace term)
    ppDedent(ppSpace) ppRealFill("else " term)) : term
goal: Lean.ParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_termDepIfThenElse_1»
code: macro_rules
  | `(if $h:ident : $c then $t else $e) => do
    let mvar ← Lean.withRef c `(?m)
    `(let_mvar% ?m := $c; wait_if_type_mvar% ?m; dite $mvar (fun $h:ident => $t) (fun $h:ident => $e))
  | `(if _%$h : $c then $t else $e) => do
    let mvar ← Lean.withRef c `(?m)
    `(let_mvar% ?m := $c; wait_if_type_mvar% ?m; dite $mvar (fun _%$h => $t) (fun _%$h => $e))
goal: Lean.Macro

full_name: termIfThenElse
code: @[inherit_doc ite] syntax (name := termIfThenElse)
  ppRealGroup(ppRealFill(ppIndent("if " term " then") ppSpace term)
    ppDedent(ppSpace) ppRealFill("else " term)) : term
goal: Lean.ParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_termIfThenElse_1»
code: macro_rules
  | `(if $c then $t else $e) => do
    let mvar ← Lean.withRef c `(?m)
    `(let_mvar% ?m := $c; wait_if_type_mvar% ?m; ite $mvar $t $e)
goal: Lean.Macro

full_name: termIfLet
code: /--
`if let pat := d then t else e` is a shorthand syntax for:
```
match d with
| pat => t
| _ => e
```
It matches `d` against the pattern `pat` and the bindings are available in `t`.
If the pattern does not match, it returns `e` instead.
-/
syntax (name := termIfLet)
  ppRealGroup(ppRealFill(ppIndent("if " "let " term " := " term " then") ppSpace term)
    ppDedent(ppSpace) ppRealFill("else " term)) : term
goal: Lean.ParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_termIfLet_1»
code: macro_rules
  | `(if let $pat := $d then $t else $e) =>
    `(match $d:term with | $pat => $t | _ => $e)
goal: Lean.Macro

full_name: boolIfThenElse
code: @[inherit_doc cond] syntax (name := boolIfThenElse)
  ppRealGroup(ppRealFill(ppIndent("bif " term " then") ppSpace term)
    ppDedent(ppSpace) ppRealFill("else " term)) : term
goal: Lean.ParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_boolIfThenElse_1»
code: macro_rules
  | `(bif $c then $t else $e) => `(cond $c $t $e)
goal: Lean.Macro

full_name: «term_<|_»
code: /--
Haskell-like pipe operator `<|`. `f <| x` means the same as the same as `f x`,
except that it parses `x` with lower precedence, which means that `f <| g <| x`
is interpreted as `f (g x)` rather than `(f g) x`.
-/
syntax:min term " <| " term:min : term
goal: Lean.TrailingParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_<|__1»
code: macro_rules
  | `($f $args* <| $a) => `($f $args* $a)
  | `($f <| $a) => `($f $a)
goal: Lean.Macro

full_name: «term_|>_»
code: /--
Haskell-like pipe operator `|>`. `x |> f` means the same as the same as `f x`,
and it chains such that `x |> f |> g` is interpreted as `g (f x)`.
-/
syntax:min term " |> " term:min1 : term
goal: Lean.TrailingParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_|>__1»
code: macro_rules
  | `($a |> $f $args*) => `($f $args* $a)
  | `($a |> $f)        => `($f $a)
goal: Lean.Macro

full_name: «term_$__»
code: /--
Alternative syntax for `<|`. `f $ x` means the same as the same as `f x`,
except that it parses `x` with lower precedence, which means that `f $ g $ x`
is interpreted as `f (g x)` rather than `(f g) x`.
-/
-- Note that we have a whitespace after `$` to avoid an ambiguity with antiquotations.
syntax:min term atomic(" $" ws) term:min : term
goal: Lean.TrailingParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term_$___1»
code: macro_rules
  | `($f $args* $ $a) => `($f $args* $a)
  | `($f $ $a) => `($f $a)
goal: Lean.Macro

full_name: «term{_:_//_}»
code: @[inherit_doc Subtype] syntax "{ " withoutPosition(ident (" : " term)? " // " term) " }" : term
goal: Lean.ParserDescr

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_term{_:_//_}_1»
code: macro_rules
  | `({ $x : $type // $p }) => ``(Subtype (fun ($x:ident : $type) => $p))
  | `({ $x // $p })         => ``(Subtype (fun ($x:ident : _) => $p))
goal: Lean.Macro

full_name: «_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_termWithout_expected_type__1»
code: macro "without_expected_type " x:term : term => `(let aux := $x; aux)
goal: Lean.Macro

full_name: termWithout_expected_type_
code: macro "without_expected_type " x:term : term => `(let aux := $x; aux)
goal: Lean.ParserDescr

full_name: Lean.byElab
code: /--
* The `by_elab doSeq` expression runs the `doSeq` as a `TermElabM Expr` to
  synthesize the expression.
* `by_elab fun expectedType? => do doSeq` receives the expected type (an `Option Expr`)
  as well.
-/
syntax (name := byElab) "by_elab " doSeq : term
goal: Lean.ParserDescr

full_name: Lean.Parser.Category.rawStx
code: /--
Category for carrying raw syntax trees between macros; any content is printed as is by the pretty printer.
The only accepted parser for this category is an antiquotation.
-/
declare_syntax_cat rawStx
goal: Lean.Parser.Category

full_name: Lean.«instCoeSyntaxTSyntaxConsSyntaxNodeKindMkStr1Nil_.lake»
code: instance : Coe Syntax (TSyntax `rawStx) 
goal: Coe Lean.Syntax (Lean.TSyntax (Lean.Name.mkStr1 "rawStx" :: List.nil))

full_name: Lean.withAnnotateTerm
code: /-- `with_annotate_term stx e` annotates the lexical range of `stx : Syntax` with term info for `e`. -/
scoped syntax (name := withAnnotateTerm) "with_annotate_term " rawStx ppSpace term : term
goal: Lean.ParserDescr

full_name: Lean.modCast
code: /-- Normalize casts in an expression using the same method as the `norm_cast` tactic. -/
syntax (name := modCast) "mod_cast " term : term
goal: Lean.ParserDescr

full_name: Lean.deprecated
code: /--
The attribute `@[deprecated]` on a declaration indicates that the declaration
is discouraged for use in new code, and/or should be migrated away from in
existing code. It may be removed in a future version of the library.

* `@[deprecated myBetterDef]` means that `myBetterDef` is the suggested replacement.
* `@[deprecated myBetterDef "use myBetterDef instead"]` allows customizing the deprecation message.
* `@[deprecated (since := "2024-04-21")]` records when the deprecation was first applied.
-/
syntax (name := deprecated) "deprecated" (ppSpace ident)? (ppSpace str)?
    (" (" &"since" " := " str ")")? : attr
goal: Lean.ParserDescr

full_name: Lean.Attr.coe
code: /--
The `@[coe]` attribute on a function (which should also appear in a
`instance : Coe A B := ⟨myFn⟩` declaration) allows the delaborator to show
applications of this function as `↑` when printing expressions.
-/
syntax (name := Attr.coe) "coe" : attr
goal: Lean.ParserDescr

full_name: Lean.command_code_action
code: /--
This attribute marks a code action, which is used to suggest new tactics or replace existing ones.

* `@[command_code_action kind]`: This is a code action which applies to applications of the command
  `kind` (a command syntax kind), which can replace the command or insert things before or after it.

* `@[command_code_action kind₁ kind₂]`: shorthand for
  `@[command_code_action kind₁, command_code_action kind₂]`.

* `@[command_code_action]`: This is a command code action that applies to all commands.
  Use sparingly.
-/
syntax (name := command_code_action) "command_code_action" (ppSpace ident)* : attr
goal: Lean.ParserDescr

full_name: Lean.builtin_command_code_action
code: /--
Builtin command code action. See `command_code_action`.
-/
syntax (name := builtin_command_code_action) "builtin_command_code_action" (ppSpace ident)* : attr
goal: Lean.ParserDescr

full_name: Lean.includeStr
code: /--
When `parent_dir` contains the current Lean file, `include_str "path" / "to" / "file"` becomes
a string literal with the contents of the file at `"parent_dir" / "path" / "to" / "file"`. If this
file cannot be read, elaboration fails.
-/
syntax (name := includeStr) "include_str " term : term
goal: Lean.ParserDescr

full_name: Lean.runCmd
code: /--
The `run_cmd doSeq` command executes code in `CommandElabM Unit`.
This is almost the same as `#eval show CommandElabM Unit from do doSeq`,
except that it doesn't print an empty diagnostic.
-/
syntax (name := runCmd) "run_cmd " doSeq : command
goal: Lean.ParserDescr

full_name: Lean.runElab
code: /--
The `run_elab doSeq` command executes code in `TermElabM Unit`.
This is almost the same as `#eval show TermElabM Unit from do doSeq`,
except that it doesn't print an empty diagnostic.
-/
syntax (name := runElab) "run_elab " doSeq : command
goal: Lean.ParserDescr

full_name: Lean.runMeta
code: /--
The `run_meta doSeq` command executes code in `MetaM Unit`.
This is almost the same as `#eval show MetaM Unit from do doSeq`,
except that it doesn't print an empty diagnostic.

(This is effectively a synonym for `run_elab`.)
-/
syntax (name := runMeta) "run_meta " doSeq : command
goal: Lean.ParserDescr

full_name: Lean.guardMsgsFilterSeverity
code: syntax guardMsgsFilterSeverity := &"info" <|> &"warning" <|> &"error" <|> &"all"
goal: Lean.ParserDescr

full_name: Lean.reduceCmd
code: /--
`#reduce <expression>` reduces the expression `<expression>` to its normal form. This
involves applying reduction rules until no further reduction is possible.

By default, proofs and types within the expression are not reduced. Use modifiers
`(proofs := true)`  and `(types := true)` to reduce them.
Recall that propositions are types in Lean.

**Warning:** This can be a computationally expensive operation,
especially for complex expressions.

Consider using `#eval <expression>` for simple evaluation/execution
of expressions.
-/
syntax (name := reduceCmd) "#reduce " (atomic("(" &"proofs" " := " &"true" ")"))? (atomic("(" &"types" " := " &"true" ")"))? term : command
goal: Lean.ParserDescr

full_name: Lean.guardMsgsFilter
code: /--
A message filter specification for `#guard_msgs`.
- `info`, `warning`, `error`: capture messages with the given severity level.
- `all`: capture all messages (the default).
- `drop info`, `drop warning`, `drop error`: drop messages with the given severity level.
- `drop all`: drop every message.
These filters are processed in left-to-right order.
-/
syntax guardMsgsFilter := &"drop"? guardMsgsFilterSeverity
goal: Lean.ParserDescr

full_name: Lean.guardMsgsWhitespaceArg
code: syntax guardMsgsWhitespaceArg := &"exact" <|> &"normalized" <|> &"lax"
goal: Lean.ParserDescr

full_name: Lean.guardMsgsWhitespace
code: /--
Whitespace handling for `#guard_msgs`:
- `whitespace := exact` requires an exact whitespace match.
- `whitespace := normalized` converts all newline characters to a space before matching
  (the default). This allows breaking long lines.
- `whitespace := lax` collapses whitespace to a single space before matching.
In all cases, leading and trailing whitespace is trimmed before matching.
-/
syntax guardMsgsWhitespace := &"whitespace" " := " guardMsgsWhitespaceArg
goal: Lean.ParserDescr

full_name: Lean.guardMsgsOrderingArg
code: syntax guardMsgsOrderingArg := &"exact" <|> &"sorted"
goal: Lean.ParserDescr

full_name: Lean.guardMsgsOrdering
code: /--
Message ordering for `#guard_msgs`:
- `ordering := exact` uses the exact ordering of the messages (the default).
- `ordering := sorted` sorts the messages in lexicographic order.
  This helps with testing commands that are non-deterministic in their ordering.
-/
syntax guardMsgsOrdering := &"ordering" " := " guardMsgsOrderingArg
goal: Lean.ParserDescr

full_name: Lean.guardMsgsSpecElt
code: syntax guardMsgsSpecElt := guardMsgsFilter <|> guardMsgsWhitespace <|> guardMsgsOrdering
goal: Lean.ParserDescr

full_name: Lean.guardMsgsSpec
code: syntax guardMsgsSpec := "(" guardMsgsSpecElt,* ")"
goal: Lean.ParserDescr

full_name: Lean.guardMsgsCmd
code: /--
`/-- ... -/ #guard_msgs in cmd` captures the messages generated by the command `cmd`
and checks that they match the contents of the docstring.

Basic example:
```lean
/--
error: unknown identifier 'x'
-/
#guard_msgs in
example : α := x
```
This checks that there is such an error and then consumes the message.

By default, the command captures all messages, but the filter condition can be adjusted.
For example, we can select only warnings:
```lean
/--
warning: declaration uses 'sorry'
-/
#guard_msgs(warning) in
example : α := sorry
```
or only errors
```lean
#guard_msgs(error) in
example : α := sorry
```
In the previous example, since warnings are not captured there is a warning on `sorry`.
We can drop the warning completely with
```lean
#guard_msgs(error, drop warning) in
example : α := sorry
```

In general, `#guard_msgs` accepts a comma-separated list of configuration clauses in parentheses:
```
#guard_msgs (configElt,*) in cmd
```
By default, the configuration list is `(all, whitespace := normalized, ordering := exact)`.

Message filters (processed in left-to-right order):
- `info`, `warning`, `error`: capture messages with the given severity level.
- `all`: capture all messages (the default).
- `drop info`, `drop warning`, `drop error`: drop messages with the given severity level.
- `drop all`: drop every message.

Whitespace handling (after trimming leading and trailing whitespace):
- `whitespace := exact` requires an exact whitespace match.
- `whitespace := normalized` converts all newline characters to a space before matching
  (the default). This allows breaking long lines.
- `whitespace := lax` collapses whitespace to a single space before matching.

Message ordering:
- `ordering := exact` uses the exact ordering of the messages (the default).
- `ordering := sorted` sorts the messages in lexicographic order.
  This helps with testing commands that are non-deterministic in their ordering.

For example, `#guard_msgs (error, drop all) in cmd` means to check warnings and drop
everything else.
-/
syntax (name := guardMsgsCmd)
  (docComment)? "#guard_msgs" (ppSpace guardMsgsSpec)? " in" ppLine command : command
goal: Lean.ParserDescr

full_name: Lean.Parser.checkTactic
code: /--
`#check_tactic t ~> r by commands` runs the tactic sequence `commands`
on a goal with `t` and sees if the resulting expression has reduced it
to `r`.
-/
syntax (name := checkTactic) "#check_tactic " term "~>" term "by" tactic : command
goal: Lean.ParserDescr

full_name: Lean.Parser.checkTacticFailure
code: /--
`#check_tactic_failure t by tac` runs the tactic `tac`
on a goal with `t` and verifies it fails.
-/
syntax  (name := checkTacticFailure) "#check_tactic_failure " term "by" tactic : command
goal: Lean.ParserDescr

full_name: Lean.Parser.checkSimp
code: /--
`#check_simp t ~> r` checks `simp` reduces `t` to `r`.
-/
syntax (name := checkSimp) "#check_simp " term "~>" term : command
goal: Lean.ParserDescr

full_name: Lean.Parser.checkSimpFailure
code: /--
`#check_simp t !~>` checks `simp` fails on reducing `t`.
-/
syntax (name := checkSimpFailure) "#check_simp " term "!~>" : command
goal: Lean.ParserDescr

full_name: Lean.Parser.commandSeal__
code: /--
The `seal foo` command ensures that the definition of `foo` is sealed, meaning it is marked as `[irreducible]`.
This command is particularly useful in contexts where you want to prevent the reduction of `foo` in proofs.

In terms of functionality, `seal foo` is equivalent to `attribute [local irreducible] foo`.
This attribute specifies that `foo` should be treated as irreducible only within the local scope,
which helps in maintaining the desired abstraction level without affecting global settings.
-/
syntax "seal " (ppSpace ident)+ : command
goal: Lean.ParserDescr

full_name: Lean.Parser.commandUnseal__
code: /--
The `unseal foo` command ensures that the definition of `foo` is unsealed, meaning it is marked as `[semireducible]`, the
default reducibility setting. This command is useful when you need to allow some level of reduction of `foo` in proofs.

Functionally, `unseal foo` is equivalent to `attribute [local semireducible] foo`.
Applying this attribute makes `foo` semireducible only within the local scope.
-/
syntax "unseal " (ppSpace ident)+ : command
goal: Lean.ParserDescr

full_name: Lean.Parser.«_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_Lean_Parser_commandSeal___1»
code: macro_rules
  | `(seal $fs:ident*) => `(attribute [local irreducible] $fs:ident*)
  | `(unseal $fs:ident*) => `(attribute [local semireducible] $fs:ident*)
goal: Lean.Macro

full_name: Lean.Parser.«_aux_.lake_packages_lean4_src_lean_Init_Notation___macroRules_Lean_Parser_commandUnseal___1»
code: macro_rules
  | `(seal $fs:ident*) => `(attribute [local irreducible] $fs:ident*)
  | `(unseal $fs:ident*) => `(attribute [local semireducible] $fs:ident*)
goal: Lean.Macro