ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
File: Mathlib/Tactic/Linter/MinImports.lean

full_name: Mathlib.Linter.minImportsRef
code: /-- `minImportsRef` keeps track of cumulative imports across multiple commands. -/
initialize minImportsRef : IO.Ref NameSet ← IO.mkRef {}
goal: IO.Ref Lean.NameSet

full_name: Mathlib.Linter.initFn._@.Mathlib.Tactic.Linter.MinImports._hyg.7
code: /-- `minImportsRef` keeps track of cumulative imports across multiple commands. -/
initialize minImportsRef : IO.Ref NameSet ← IO.mkRef {}
goal: IO (IO.Ref Lean.NameSet)

full_name: Mathlib.Linter.«_aux_Mathlib_Tactic_Linter_MinImports___elabRules_Mathlib_Linter_command#reset_min_imports_1»
code: /-- `#reset_min_imports` sets to empty the current list of cumulative imports. -/
elab "#reset_min_imports" : command => minImportsRef.set {}
goal: Lean.Elab.Command.CommandElab

full_name: Mathlib.Linter.«command#reset_min_imports»
code: /-- `#reset_min_imports` sets to empty the current list of cumulative imports. -/
elab "#reset_min_imports" : command => minImportsRef.set {}
goal: Lean.ParserDescr

full_name: Mathlib.Linter.initFn._@.Mathlib.Tactic.Linter.MinImports._hyg.119
code: /--
The `minImports` linter incrementally computes the minimal imports needed for each file to build.
Whenever it detects that a new command requires an increase in the (transitive) imports that it
computed so far, it emits a warning mentioning the bigger minimal imports.

Unlike the related `#min_imports` command, the linter takes into account notation and tactic
information.
It also works incrementally, providing information that it better suited, for instance, to split
files.
 -/
register_option linter.minImports : Bool := {
  defValue := false
  descr := "enable the minImports linter"
}
goal: IO (Lean.Option Bool)

full_name: Mathlib.Linter.linter.minImports
code: /--
The `minImports` linter incrementally computes the minimal imports needed for each file to build.
Whenever it detects that a new command requires an increase in the (transitive) imports that it
computed so far, it emits a warning mentioning the bigger minimal imports.

Unlike the related `#min_imports` command, the linter takes into account notation and tactic
information.
It also works incrementally, providing information that it better suited, for instance, to split
files.
 -/
register_option linter.minImports : Bool := {
  defValue := false
  descr := "enable the minImports linter"
}
goal: Lean.Option Bool

full_name: Mathlib.Linter.MinImports.getLinterHash
code: /-- Gets the value of the `linter.minImports` option. -/
def getLinterHash (o : Options) : Bool 
goal: Bool

full_name: Mathlib.Linter.MinImports.minImportsLinter
code: @[inherit_doc Mathlib.Linter.linter.minImports]
def minImportsLinter : Linter 
goal: Lean.Linter

full_name: Mathlib.Linter.MinImports.initFn._@.Mathlib.Tactic.Linter.MinImports._hyg.1058
code: initialize addLinter minImportsLinter
goal: IO Unit
File: Mathlib/Tactic/Linter/HashCommandLinter.lean

full_name: Mathlib.Linter.initFn._@.Mathlib.Tactic.Linter.HashCommandLinter._hyg.7
code: /--
The linter emits a warning on any command beginning with `#` that itself emits no message.
For example, `#guard true` and `#check_tactic True ~> True by skip` trigger a message.
There is a list of silent `#`-command that are allowed.
-/
register_option linter.hashCommand : Bool := {
  defValue := true
  descr := "enable the `#`-command linter"
}
goal: IO (Lean.Option Bool)

full_name: Mathlib.Linter.linter.hashCommand
code: /--
The linter emits a warning on any command beginning with `#` that itself emits no message.
For example, `#guard true` and `#check_tactic True ~> True by skip` trigger a message.
There is a list of silent `#`-command that are allowed.
-/
register_option linter.hashCommand : Bool := {
  defValue := true
  descr := "enable the `#`-command linter"
}
goal: Lean.Option Bool

full_name: Mathlib.Linter.HashCommandLinter.getLinterHash
code: /-- Gets the value of the `linter.hashCommand` option. -/
def getLinterHash (o : Options) : Bool 
goal: Bool

full_name: _private.Mathlib.Tactic.Linter.HashCommandLinter.0.Mathlib.Linter.HashCommandLinter.withSetOptionIn'
code: /-- Exactly like `withSetOptionIn`, but recursively discards nested uses of `in`.
Intended to be used in the `hashCommand` linter, where we want to enter `set_option` `in` commands.
-/
private partial def withSetOptionIn' (cmd : CommandElab) : CommandElab 
goal: Lean.Elab.Command.CommandElab

full_name: _private.Mathlib.Tactic.Linter.HashCommandLinter.0.Mathlib.Linter.HashCommandLinter.allowed_commands
code: /-- `allowed_commands` is the `HashSet` of `#`-commands that are allowed in 'Mathlib'. -/
private abbrev allowed_commands : HashSet String 
goal: Lean.HashSet String

full_name: Mathlib.Linter.HashCommandLinter.hashCommandLinter
code: /-- Checks that no command beginning with `#` is present in 'Mathlib',
except for the ones in `allowed_commands`.

If `warningAsError` is `true`, then the linter logs an info (rather than a warning).
This means that CI will eventually fail on `#`-commands, but does not stop it from continuing.

However, in order to avoid local clutter, when `warningAsError` is `false`, the linter
logs a warning only for the `#`-commands that do not already emit a message. -/
def hashCommandLinter : Linter 
goal: Lean.Linter

full_name: Mathlib.Linter.HashCommandLinter.initFn._@.Mathlib.Tactic.Linter.HashCommandLinter._hyg.626
code: initialize addLinter hashCommandLinter
goal: IO Unit
File: Mathlib/Tactic/Linter/GlobalAttributeIn.lean

full_name: Mathlib.Linter.linter.globalAttributeIn
code: /-- Lint on any occurrence of `attribute [...] name in` which is not `local` or `scoped`:
these are a footgun, as the attribute is applied *globally* (despite the `in`). -/
register_option linter.globalAttributeIn : Bool := {
  defValue := true
  descr := "enable the globalAttributeIn linter"
}
goal: Lean.Option Bool

full_name: Mathlib.Linter.initFn._@.Mathlib.Tactic.Linter.GlobalAttributeIn._hyg.8
code: /-- Lint on any occurrence of `attribute [...] name in` which is not `local` or `scoped`:
these are a footgun, as the attribute is applied *globally* (despite the `in`). -/
register_option linter.globalAttributeIn : Bool := {
  defValue := true
  descr := "enable the globalAttributeIn linter"
}
goal: IO (Lean.Option Bool)

full_name: Mathlib.Linter.globalAttributeInLinter.getLinterGlobalAttributeIn
code: /-- Gets the value of the `linter.globalAttributeIn` option. -/
def getLinterGlobalAttributeIn (o : Options) : Bool 
goal: Bool

full_name: Mathlib.Linter.globalAttributeInLinter.getGlobalAttributesIn?
code: /--
`getGlobalAttributesIn? cmd` assumes that `cmd` represents a `attribute [...] id in ...` command.
If this is the case, then it returns `(id, #[non-local nor scoped attributes])`.
Otherwise, it returns `default`.
-/
def getGlobalAttributesIn? : Syntax → Option (Ident × Array (TSyntax `attr))
  
goal: Lean.Syntax → Option (Lean.Ident × Array (Lean.TSyntax `attr))

full_name: Mathlib.Linter.globalAttributeInLinter.globalAttributeIn
code: /-- The `globalAttributeInLinter` linter flags any global attributes generated by an
`attribute [...] in` declaration. (This includes the `instance`, `simp` and `ext` attributes.)

Despite the `in`, these define *global* instances, which can be rather misleading.
Instead, remove the `in` or mark them with `local`.
-/
def globalAttributeIn : Linter 
goal: Lean.Linter

full_name: Mathlib.Linter.globalAttributeInLinter.initFn._@.Mathlib.Tactic.Linter.GlobalAttributeIn._hyg.939
code: initialize addLinter globalAttributeIn
goal: IO Unit
File: Mathlib/Tactic/Linter/RefineLinter.lean

full_name: Mathlib.Linter.refine.initFn._@.Mathlib.Tactic.Linter.RefineLinter._hyg.8
code: /-- The refine linter emits a warning on usages of `refine'`. -/
register_option linter.refine : Bool := {
  defValue := true
  descr := "enable the refine linter"
}
goal: IO (Lean.Option Bool)

full_name: Mathlib.Linter.refine.linter.refine
code: /-- The refine linter emits a warning on usages of `refine'`. -/
register_option linter.refine : Bool := {
  defValue := true
  descr := "enable the refine linter"
}
goal: Lean.Option Bool

full_name: Mathlib.Linter.refine.getRefine'
code: /-- `getRefine' t` returns all usages of the `refine'` tactic in the input syntax `t`. -/
partial
def getRefine' : Syntax → Array Syntax
  
goal: Lean.Syntax → Array Lean.Syntax

full_name: Mathlib.Linter.refine.getLinterHash
code: /-- The "refine" linter flags usages of the `refine'` tactic.

The tactics `refine` and `refine'` are similar, but they handle meta-variables slightly differently.
This means that they are not completely interchangeable, nor can one completely replace the other.
However, `refine` is more readable and (heuristically) tends to be more efficient on average.
-/
def getLinterHash (o : Options) : Bool 
goal: Bool

full_name: Mathlib.Linter.refine.refineLinter
code: @[inherit_doc getLinterHash]
def refineLinter : Linter 
goal: Lean.Linter

full_name: Mathlib.Linter.refine.initFn._@.Mathlib.Tactic.Linter.RefineLinter._hyg.356
code: initialize addLinter refineLinter
goal: IO Unit
File: Mathlib/Tactic/CongrM.lean

full_name: Mathlib.Tactic.initFn._@.Mathlib.Tactic.CongrM._hyg.6
code: initialize registerTraceClass `Tactic.congrm
goal: IO Unit

full_name: Mathlib.Tactic.congrM
code: /--
`congrm e` is a tactic for proving goals of the form `lhs = rhs`, `lhs ↔ rhs`, `HEq lhs rhs`,
or `R lhs rhs` when `R` is a reflexive relation.
The expression `e` is a pattern containing placeholders `?_`,
and this pattern is matched against `lhs` and `rhs` simultaneously.
These placeholders generate new goals that state that corresponding subexpressions
in `lhs` and `rhs` are equal.
If the placeholders have names, such as `?m`, then the new goals are given tags with those names.

Examples:
```lean
example {a b c d : ℕ} :
    Nat.pred a.succ * (d + (c + a.pred)) = Nat.pred b.succ * (b + (c + d.pred)) := by
  congrm Nat.pred (Nat.succ ?h1) * (?h2 + ?h3)
  /-  Goals left:
  case h1 ⊢ a = b
  case h2 ⊢ d = b
  case h3 ⊢ c + a.pred = c + d.pred
  -/
  sorry
  sorry
  sorry

example {a b : ℕ} (h : a = b) : (fun y : ℕ => ∀ z, a + a = z) = (fun x => ∀ z, b + a = z) := by
  congrm fun x => ∀ w, ?_ + a = w
  -- ⊢ a = b
  exact h
```

The `congrm` command is a convenient frontend to `congr(...)` congruence quotations.
If the goal is an equality, `congrm e` is equivalent to `refine congr(e')` where `e'` is
built from `e` by replacing each placeholder `?m` by `$(?m)`.
The pattern `e` is allowed to contain `$(...)` expressions to immediately substitute
equality proofs into the congruence, just like for congruence quotations.
-/
syntax (name := congrM) "congrm " term : tactic
goal: Lean.ParserDescr

full_name: Mathlib.Tactic._aux_Mathlib_Tactic_CongrM___elabRules_Mathlib_Tactic_congrM_1
code: elab_rules : tactic
  | `(tactic| congrm $expr:term) => do
    -- Wrap all synthetic holes `?m` as `c(?m)` to form `congr(...)` pattern
    let pattern ← expr.raw.replaceM fun stx =>
      if stx.isOfKind ``Parser.Term.syntheticHole then
        pure <| stx.mkAntiquotNode `term
      else if stx.isAntiquots then
        -- Don't look into `$(..)` expressions
        pure stx
      else
        pure none
    trace[Tactic.congrm] "pattern: {pattern}"
    -- Chain together transformations as needed to convert the goal to an Eq if possible.
    liftMetaTactic fun g => do
      return [← (← g.iffOfEq).liftReflToEq]
    -- Apply `congr(...)`
    withMainContext do
      let gStx ← Term.exprToSyntax (← getMainTarget)
      -- Gives the expected type to `refine` as a workaround for its elaboration order.
      evalTactic <| ← `(tactic| refine (congr($(⟨pattern⟩)) : $gStx))
goal: Lean.Elab.Tactic.Tactic
File: Mathlib/Tactic/ScopedNS.lean

full_name: Mathlib.Tactic.scopedNS
code: /--
`scoped[NS]` is similar to the `scoped` modifier on attributes and notations,
but it scopes the syntax in the specified namespace instead of the current namespace.
```
scoped[Matrix] infixl:72 " ⬝ᵥ " => Matrix.dotProduct
-- declares `*` as a notation for vector dot productss
-- which is only accessible if you `open Matrix` or `open scoped Matrix`.

namespace Nat

scoped[Nat.Count] attribute [instance] CountSet.fintype
-- make the definition Nat.CountSet.fintype an instance,
-- but only if `Nat.Count` is open
```
-/
syntax (name := scopedNS) (docComment)? (Parser.Term.attributes)?
  "scoped" "[" ident "] " command : command
goal: Lean.ParserDescr

full_name: Mathlib.Tactic._aux_Mathlib_Tactic_ScopedNS___macroRules_Mathlib_Tactic_scopedNS_1
code: macro_rules
  | `($[$doc]? $(attr)? scoped[$ns] notation $(prec)? $(n)? $(prio)? $sym* => $t) =>
    `(with_weak_namespace $(mkIdentFrom ns <| rootNamespace ++ ns.getId)
      $[$doc]? $(attr)? scoped notation $(prec)? $(n)? $(prio)? $sym* => $t)
  | `($[$doc]? $(attr)? scoped[$ns] $mk:prefix $prec $(n)? $(prio)? $sym => $t) =>
    `(with_weak_namespace $(mkIdentFrom ns <| rootNamespace ++ ns.getId)
      $[$doc]? $(attr)? scoped $mk:prefix $prec $(n)? $(prio)? $sym => $t)
  | `($[$doc]? $(attr)? scoped[$ns] $mk:infix $prec $(n)? $(prio)? $sym => $t) =>
    `(with_weak_namespace $(mkIdentFrom ns <| rootNamespace ++ ns.getId)
      $[$doc]? $(attr)? scoped $mk:infix $prec $(n)? $(prio)? $sym => $t)
  | `($[$doc]? $(attr)? scoped[$ns] $mk:infixl $prec $(n)? $(prio)? $sym => $t) =>
    `(with_weak_namespace $(mkIdentFrom ns <| rootNamespace ++ ns.getId)
      $[$doc]? $(attr)? scoped $mk:infixl $prec $(n)? $(prio)? $sym => $t)
  | `($[$doc]? $(attr)? scoped[$ns] $mk:infixr $prec $(n)? $(prio)? $sym => $t) =>
    `(with_weak_namespace $(mkIdentFrom ns <| rootNamespace ++ ns.getId)
      $[$doc]? $(attr)? scoped $mk:infixr $prec $(n)? $(prio)? $sym => $t)
  | `($[$doc]? $(attr)? scoped[$ns] $mk:postfix $prec $(n)? $(prio)? $sym => $t) =>
    `(with_weak_namespace $(mkIdentFrom ns <| rootNamespace ++ ns.getId)
      $[$doc]? $(attr)? scoped $mk:postfix $prec $(n)? $(prio)? $sym => $t)
  | `(scoped[$ns] attribute [$[$attr:attr],*] $ids*) =>
    `(with_weak_namespace $(mkIdentFrom ns <| rootNamespace ++ ns.getId)
      attribute [$[scoped $attr:attr],*] $ids*)
goal: Lean.Macro
File: Mathlib/Tactic/InferParam.lean

full_name: Mathlib.Tactic.inferOptParam
code: /-- Close a goal of the form `optParam α a` or `autoParam α stx` by using `a`. -/
elab (name := inferOptParam) "infer_param" : tactic => do
  let tgt ← getMainTarget
  if let some val := tgt.getOptParamDefault? then
    liftMetaTactic fun goal => do goal.assign val; pure []
  else if let some (.const tacticDecl ..) := tgt.getAutoParamTactic? then
    match evalSyntaxConstant (← getEnv) (← getOptions) tacticDecl with
    | .error err => throwError err
    | Except.ok tacticSyntax =>
      liftMetaTactic1 fun goal => do
        goal.replaceTargetDefEq (← goal.getType).consumeTypeAnnotations
      evalTactic tacticSyntax
  else throwError
    "`infer_param` only solves goals of the form `optParam _ _` or `autoParam _ _`, not {tgt}"
goal: Lean.ParserDescr

full_name: Mathlib.Tactic._aux_Mathlib_Tactic_InferParam___elabRules_Mathlib_Tactic_inferOptParam_1
code: /-- Close a goal of the form `optParam α a` or `autoParam α stx` by using `a`. -/
elab (name := inferOptParam) "infer_param" : tactic => do
  let tgt ← getMainTarget
  if let some val := tgt.getOptParamDefault? then
    liftMetaTactic fun goal => do goal.assign val; pure []
  else if let some (.const tacticDecl ..) := tgt.getAutoParamTactic? then
    match evalSyntaxConstant (← getEnv) (← getOptions) tacticDecl with
    | .error err => throwError err
    | Except.ok tacticSyntax =>
      liftMetaTactic1 fun goal => do
        goal.replaceTargetDefEq (← goal.getType).consumeTypeAnnotations
      evalTactic tacticSyntax
  else throwError
    "`infer_param` only solves goals of the form `optParam _ _` or `autoParam _ _`, not {tgt}"
goal: Lean.Elab.Tactic.Tactic
File: Mathlib/Tactic/NormNum/Eq.lean

full_name: Mathlib.Meta.NormNum.isNat_eq_false
code: theorem isNat_eq_false [AddMonoidWithOne α] [CharZero α] : {a b : α} → {a' b' : ℕ} →
    IsNat a a' → IsNat b b' → Nat.beq a' b' = false → ¬a = b
  
goal: Mathlib.Meta.NormNum.IsNat a a' → Mathlib.Meta.NormNum.IsNat b b' → a'.beq b' = false → ¬a = b

full_name: Mathlib.Meta.NormNum.isInt_eq_false
code: theorem isInt_eq_false [Ring α] [CharZero α] : {a b : α} → {a' b' : ℤ} →
    IsInt a a' → IsInt b b' → decide (a' = b') = false → ¬a = b
  
goal: Mathlib.Meta.NormNum.IsInt a a' → Mathlib.Meta.NormNum.IsInt b b' → decide (a' = b') = false → ¬a = b

full_name: Mathlib.Meta.NormNum.Rat.invOf_denom_swap
code: theorem Rat.invOf_denom_swap [Ring α] (n₁ n₂ : ℤ) (a₁ a₂ : α)
    [Invertible a₁] [Invertible a₂] : n₁ * ⅟a₁ = n₂ * ⅟a₂ ↔ n₁ * a₂ = n₂ * a₁ 
goal: ↑n₁ * ⅟a₁ = ↑n₂ * ⅟a₂ ↔ ↑n₁ * a₂ = ↑n₂ * a₁

full_name: Mathlib.Meta.NormNum.isRat_eq_false
code: theorem isRat_eq_false [Ring α] [CharZero α] : {a b : α} → {na nb : ℤ} → {da db : ℕ} →
    IsRat a na da → IsRat b nb db →
    decide (Int.mul na (.ofNat db) = Int.mul nb (.ofNat da)) = false → ¬a = b
  
goal: Mathlib.Meta.NormNum.IsRat a na da →
  Mathlib.Meta.NormNum.IsRat b nb db → decide (na.mul (Int.ofNat db) = nb.mul (Int.ofNat da)) = false → ¬a = b

full_name: Mathlib.Meta.NormNum.evalEq.ratArm
code: /-- The `norm_num` extension which identifies expressions of the form `a = b`,
such that `norm_num` successfully recognises both `a` and `b`. -/
@[norm_num _ = _] def evalEq : NormNumExt 
goal: Lean.MetaM (Mathlib.Meta.NormNum.Result e)

full_name: Mathlib.Meta.NormNum.evalEq
code: /-- The `norm_num` extension which identifies expressions of the form `a = b`,
such that `norm_num` successfully recognises both `a` and `b`. -/
@[norm_num _ = _] def evalEq : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt

full_name: Mathlib.Meta.NormNum.evalEq.intArm
code: /-- The `norm_num` extension which identifies expressions of the form `a = b`,
such that `norm_num` successfully recognises both `a` and `b`. -/
@[norm_num _ = _] def evalEq : NormNumExt 
goal: Lean.MetaM (Mathlib.Meta.NormNum.Result e)
File: Mathlib/Tactic/NormNum/NatSqrt.lean

full_name: Tactic.NormNum.nat_sqrt_helper
code: lemma nat_sqrt_helper {x y r : ℕ} (hr : y * y + r = x) (hle : Nat.ble r (2 * y)) :
    Nat.sqrt x = y 
goal: x.sqrt = y

full_name: Tactic.NormNum.isNat_sqrt
code: theorem isNat_sqrt : {x nx z : ℕ} → IsNat x nx → Nat.sqrt nx = z → IsNat (Nat.sqrt x) z
  
goal: Mathlib.Meta.NormNum.IsNat x nx → nx.sqrt = z → Mathlib.Meta.NormNum.IsNat x.sqrt z

full_name: Tactic.NormNum.proveNatSqrt
code: /-- Given the natural number literal `ex`, returns its square root as a natural number literal
and an equality proof. Panics if `ex` isn't a natural number literal. -/
def proveNatSqrt (ex : Q(ℕ)) : (ey : Q(ℕ)) × Q(Nat.sqrt $ex = $ey) 
goal: (ey : Q(ℕ)) × Q(«$ex».sqrt = «$ey»)

full_name: Tactic.NormNum.evalNatSqrt
code: /-- Evaluates the `Nat.sqrt` function. -/
@[norm_num Nat.sqrt _]
def evalNatSqrt : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt
File: Mathlib/Tactic/NormNum/IsCoprime.lean

full_name: Tactic.NormNum.int_not_isCoprime_helper
code: theorem int_not_isCoprime_helper (x y : ℤ) (d : ℕ) (hd : Int.gcd x y = d)
    (h : Nat.beq d 1 = false) : ¬ IsCoprime x y 
goal: ¬IsCoprime x y

full_name: Tactic.NormNum.isInt_isCoprime
code: theorem isInt_isCoprime : {x y nx ny : ℤ} →
    IsInt x nx → IsInt y ny → IsCoprime nx ny → IsCoprime x y
  
goal: Mathlib.Meta.NormNum.IsInt x nx → Mathlib.Meta.NormNum.IsInt y ny → IsCoprime nx ny → IsCoprime x y

full_name: Tactic.NormNum.isInt_not_isCoprime
code: theorem isInt_not_isCoprime : {x y nx ny : ℤ} →
    IsInt x nx → IsInt y ny → ¬ IsCoprime nx ny → ¬ IsCoprime x y
  
goal: Mathlib.Meta.NormNum.IsInt x nx → Mathlib.Meta.NormNum.IsInt y ny → ¬IsCoprime nx ny → ¬IsCoprime x y

full_name: Tactic.NormNum.proveIntIsCoprime
code: /-- Evaluates `IsCoprime` for the given integer number literals.
Panics if `ex` or `ey` aren't integer number literals. -/
def proveIntIsCoprime (ex ey : Q(ℤ)) : Q(IsCoprime $ex $ey) ⊕ Q(¬ IsCoprime $ex $ey) 
goal: Q(IsCoprime «$ex» «$ey») ⊕ Q(¬IsCoprime «$ex» «$ey»)

full_name: Tactic.NormNum.evalIntIsCoprime
code: /-- Evaluates the `IsCoprime` predicate over `ℤ`. -/
@[norm_num IsCoprime (_ : ℤ) (_ : ℤ)]
def evalIntIsCoprime : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt
File: Mathlib/Tactic/NormNum/NatFib.lean

full_name: Mathlib.Meta.NormNum.IsFibAux
code: /-- Auxiliary definition for `proveFib` extension. -/
def IsFibAux (n a b : ℕ) 
goal: Prop

full_name: Mathlib.Meta.NormNum.isFibAux_zero
code: theorem isFibAux_zero : IsFibAux 0 0 1 
goal: Mathlib.Meta.NormNum.IsFibAux 0 0 1

full_name: Mathlib.Meta.NormNum.isFibAux_one
code: theorem isFibAux_one : IsFibAux 1 1 1 
goal: Mathlib.Meta.NormNum.IsFibAux 1 1 1

full_name: Mathlib.Meta.NormNum.isFibAux_two_mul
code: theorem isFibAux_two_mul {n a b n' a' b' : ℕ} (H : IsFibAux n a b)
    (hn : 2 * n = n') (h1 : a * (2 * b - a) = a') (h2 : a * a + b * b = b') :
    IsFibAux n' a' b' 
goal: Mathlib.Meta.NormNum.IsFibAux n' a' b'

full_name: Mathlib.Meta.NormNum.isFibAux_two_mul_add_one
code: theorem isFibAux_two_mul_add_one {n a b n' a' b' : ℕ} (H : IsFibAux n a b)
    (hn : 2 * n + 1 = n') (h1 : a * a + b * b = a') (h2 : b * (2 * a + b) = b') :
    IsFibAux n' a' b' 
goal: Mathlib.Meta.NormNum.IsFibAux n' a' b'

full_name: Mathlib.Meta.NormNum.proveNatFibAux
code: partial def proveNatFibAux (en' : Q(ℕ)) : (ea' eb' : Q(ℕ)) × Q(IsFibAux $en' $ea' $eb') 
goal: (ea' : Q(ℕ)) × (eb' : Q(ℕ)) × Q(Mathlib.Meta.NormNum.IsFibAux «$en'» «$ea'» «$eb'»)

full_name: Mathlib.Meta.NormNum.isFibAux_two_mul_done
code: theorem isFibAux_two_mul_done {n a b n' a' : ℕ} (H : IsFibAux n a b)
    (hn : 2 * n = n') (h : a * (2 * b - a) = a') : fib n' = a' 
goal: Nat.fib n' = a'

full_name: Mathlib.Meta.NormNum.isFibAux_two_mul_add_one_done
code: theorem isFibAux_two_mul_add_one_done {n a b n' a' : ℕ} (H : IsFibAux n a b)
    (hn : 2 * n + 1 = n') (h : a * a + b * b = a') : fib n' = a' 
goal: Nat.fib n' = a'

full_name: Mathlib.Meta.NormNum.proveNatFib
code: /-- Given the natural number literal `ex`, returns `Nat.fib ex` as a natural number literal
and an equality proof. Panics if `ex` isn't a natural number literal. -/
def proveNatFib (en' : Q(ℕ)) : (em : Q(ℕ)) × Q(Nat.fib $en' = $em) 
goal: (em : Q(ℕ)) × Q(Nat.fib «$en'» = «$em»)

full_name: Mathlib.Meta.NormNum.isNat_fib
code: theorem isNat_fib : {x nx z : ℕ} → IsNat x nx → Nat.fib nx = z → IsNat (Nat.fib x) z
  
goal: Mathlib.Meta.NormNum.IsNat x nx → Nat.fib nx = z → Mathlib.Meta.NormNum.IsNat (Nat.fib x) z

full_name: Mathlib.Meta.NormNum.evalNatFib
code: /-- Evaluates the `Nat.fib` function. -/
@[norm_num Nat.fib _]
def evalNatFib : NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt
File: Mathlib/Tactic/NormNum/OfScientific.lean

full_name: Mathlib.Meta.NormNum.isRat_ofScientific_of_true
code: theorem isRat_ofScientific_of_true [DivisionRing α] :
    {m e : ℕ} → {n : ℤ} → {d : ℕ} →
    IsRat (mkRat m (10 ^ e) : α) n d → IsRat (OfScientific.ofScientific m true e : α) n d
  
goal: Mathlib.Meta.NormNum.IsRat (↑(mkRat (↑m) (10 ^ e))) n d →
  Mathlib.Meta.NormNum.IsRat (OfScientific.ofScientific m true e) n d

full_name: Mathlib.Meta.NormNum.isNat_ofScientific_of_false
code: theorem isNat_ofScientific_of_false [DivisionRing α] : {m e nm ne n : ℕ} →
    IsNat m nm → IsNat e ne → n = Nat.mul nm ((10 : ℕ) ^ ne) →
    IsNat (OfScientific.ofScientific m false e : α) n
  
goal: Mathlib.Meta.NormNum.IsNat m nm →
  Mathlib.Meta.NormNum.IsNat e ne →
    n = nm.mul (10 ^ ne) → Mathlib.Meta.NormNum.IsNat (OfScientific.ofScientific m false e) n

full_name: Mathlib.Meta.NormNum.evalOfScientific
code: /-- The `norm_num` extension which identifies expressions in scientific notation, normalizing them
to rat casts if the scientific notation is inherited from the one for rationals. -/
@[norm_num OfScientific.ofScientific _ _ _] def evalOfScientific :
    NormNumExt 
goal: Mathlib.Meta.NormNum.NormNumExt