File: .lake/packages/Qq/Qq/AssertInstancesCommute.lean

full_name: Qq.termAssumeInstancesCommute'_
code: scoped syntax "assumeInstancesCommute'" term : term
goal: Lean.ParserDescr

full_name: Qq.Impl.isRedundantLocalInst?
code: def isRedundantLocalInst? (inst : FVarId) : MetaM (Option Expr) 
goal: Lean.MetaM (Option Lean.Expr)

full_name: Qq.Impl.findRedundantLocalInst?
code: def findRedundantLocalInst? : QuoteM (Option (FVarId × Expr)) 
goal: Qq.Impl.QuoteM (Option (Lean.FVarId × Lean.Expr))

full_name: Qq.Impl.findRedundantLocalInstQuoted?
code: def findRedundantLocalInstQuoted? :
    TermElabM (Option (FVarId × (u : Q(Level)) × (ty : Q(Quoted (.sort $u))) × Q(Quoted $ty) × Q(Quoted $ty))) 
goal: Lean.Elab.TermElabM (Option (Lean.FVarId × (u : Q(Lean.Level)) × (ty : Q(Q(Sort «$u»))) × Q(Q(«$$ty»)) × Q(Q(«$$ty»))))

full_name: Qq.Impl.termAssertInstancesCommuteImpl_
code: scoped syntax "assertInstancesCommuteImpl" term : term
goal: Lean.ParserDescr

full_name: Qq.Impl.«_aux_.lake_packages_Qq_Qq_AssertInstancesCommute___elabRules_Qq_Impl_termAssertInstancesCommuteImpl__1»
code: elab_rules : term <= expectedType | `(assertInstancesCommuteImpl $cont) => do
  match ← findRedundantLocalInstQuoted? with
  | some ⟨fvar, _, _, lhs, rhs⟩ =>
    let n ← mkFreshUserName ((← fvar.getUserName).eraseMacroScopes.appendAfter "_eq")
    let cmd := q(withNewMCtxDepth do withDefault do assertDefEqQ $lhs $rhs)
    elabTerm (← `($(← exprToSyntax cmd) >>=
        fun __defeqres =>
          have $(mkIdent n) := __defeqres.1
          assertInstancesCommuteImpl $cont))
      expectedType
  | none => elabTerm cont expectedType
goal: Lean.Elab.Term.TermElab

full_name: Qq.Impl.«_aux_.lake_packages_Qq_Qq_AssertInstancesCommute___elabRules_Qq_termAssumeInstancesCommute'__1»
code: elab_rules : term <= expectedType | `(assumeInstancesCommute' $cont) => do
  match ← findRedundantLocalInstQuoted? with
  | some ⟨fvar, _, _, lhs, rhs⟩ =>
    let n ← mkFreshUserName ((← fvar.getUserName).eraseMacroScopes.appendAfter "_eq")
    let ty := q(QuotedDefEq $lhs $rhs)
    elabTerm (← `(
        have $(mkIdent n) : $(← exprToSyntax ty) := ⟨⟩
        assumeInstancesCommute' $cont))
      expectedType
  | none => elabTerm cont expectedType
goal: Lean.Elab.Term.TermElab

full_name: Qq.Impl.termAssertInstancesCommuteDummy
code: scoped syntax "assertInstancesCommuteDummy" : term
goal: Lean.ParserDescr

full_name: Qq.Impl.«_aux_.lake_packages_Qq_Qq_AssertInstancesCommute___macroRules_Lean_Parser_Term_assert_1»
code: macro_rules
  | `(assert! assertInstancesCommuteDummy; $cont) =>
    `(assertInstancesCommuteImpl $cont)
goal: Lean.Macro

full_name: Qq.Impl.termAssumeInstancesCommuteDummy
code: syntax "assumeInstancesCommuteDummy" : term
goal: Lean.ParserDescr

full_name: Qq.Impl.«_aux_.lake_packages_Qq_Qq_AssertInstancesCommute___macroRules_Lean_Parser_Term_assert_2»
code: macro_rules
  | `(assert! assumeInstancesCommuteDummy; $cont) =>
    `(assumeInstancesCommute' $cont)
goal: Lean.Macro

full_name: Qq.doElemAssertInstancesCommute
code: macro "assertInstancesCommute" : doElem =>
  `(doElem| assert! assertInstancesCommuteDummy)
goal: Lean.ParserDescr

full_name: Qq.«_aux_.lake_packages_Qq_Qq_AssertInstancesCommute___macroRules_Qq_doElemAssertInstancesCommute_1»
code: macro "assertInstancesCommute" : doElem =>
  `(doElem| assert! assertInstancesCommuteDummy)
goal: Lean.Macro

full_name: Qq.doElemAssumeInstancesCommute
code: macro "assumeInstancesCommute" : doElem =>
  `(doElem| assert! assumeInstancesCommuteDummy)
goal: Lean.ParserDescr

full_name: Qq.«_aux_.lake_packages_Qq_Qq_AssertInstancesCommute___macroRules_Qq_doElemAssumeInstancesCommute_1»
code: macro "assumeInstancesCommute" : doElem =>
  `(doElem| assert! assumeInstancesCommuteDummy)
goal: Lean.Macro