File: .lake/packages/batteries/Batteries/WF.lean

full_name: Acc.wfRel
code: instance wfRel {r : α → α → Prop} : WellFoundedRelation { val // Acc r val } 
goal: WellFoundedRelation { val // Acc r val }

full_name: _private.«.lake».packages.batteries.Batteries.WF.0.Acc.recC
code: /-- A computable version of `Acc.rec`. Workaround until Lean has native support for this. -/
@[specialize, elab_as_elim] private def recC {motive : (a : α) → Acc r a → Sort v}
    (intro : (x : α) → (h : ∀ (y : α), r y x → Acc r y) →
     ((y : α) → (hr : r y x) → motive y (h y hr)) → motive x (intro x h))
    {a : α} (t : Acc r a) : motive a t 
goal: motive a t

full_name: _private.«.lake».packages.batteries.Batteries.WF.0.Acc.recC_intro
code: private theorem recC_intro {motive : (a : α) → Acc r a → Sort v}
    (intro : (x : α) → (h : ∀ (y : α), r y x → Acc r y) →
     ((y : α) → (hr : r y x) → motive y (h y hr)) → motive x (intro x h))
    {a : α} (h : ∀ (y : α), r y a → Acc r y) :
    recC intro (Acc.intro _ h) = intro a h (fun y hr => recC intro (h y hr)) 
goal: Acc.recC intro ⋯ = intro a h fun y hr => Acc.recC intro ⋯

full_name: _private.«.lake».packages.batteries.Batteries.WF.0.Acc.rec_eq_recC
code: @[csimp] private theorem rec_eq_recC : @Acc.rec = @Acc.recC 
goal: @Acc.rec = @Acc.recC

full_name: _private.«.lake».packages.batteries.Batteries.WF.0.Acc.ndrecC
code: /-- A computable version of `Acc.ndrec`. Workaround until Lean has native support for this. -/
@[inline] private abbrev ndrecC {C : α → Sort v}
    (m : (x : α) → ((y : α) → r y x → Acc r y) → ((y : α) → (a : r y x) → C y) → C x)
    {a : α} (n : Acc r a) : C a 
goal: C a

full_name: _private.«.lake».packages.batteries.Batteries.WF.0.Acc.ndrec_eq_ndrecC
code: @[csimp] private theorem ndrec_eq_ndrecC : @Acc.ndrec = @Acc.ndrecC 
goal: @Acc.ndrec = @Acc.ndrecC

full_name: _private.«.lake».packages.batteries.Batteries.WF.0.Acc.ndrecOnC
code: /-- A computable version of `Acc.ndrecOn`. Workaround until Lean has native support for this. -/
@[inline] private abbrev ndrecOnC {C : α → Sort v} {a : α} (n : Acc r a)
    (m : (x : α) → ((y : α) → r y x → Acc r y) → ((y : α) → r y x → C y) → C x) : C a 
goal: C a

full_name: _private.«.lake».packages.batteries.Batteries.WF.0.Acc.ndrecOn_eq_ndrecOnC
code: @[csimp] private theorem ndrecOn_eq_ndrecOnC : @Acc.ndrecOn = @Acc.ndrecOnC 
goal: @Acc.ndrecOn = @Acc.ndrecOnC

full_name: WellFounded.wrap
code: /-- Attaches to `x` the proof that `x` is accessible in the given well-founded relation.
This can be used in recursive function definitions to explicitly use a different relation
than the one inferred by default:

```
def otherWF : WellFounded Nat := …
def foo (n : Nat) := …
termination_by otherWF.wrap n
```
-/
def wrap {α : Sort u} {r : α → α → Prop} (h : WellFounded r) (x : α) : {x : α // Acc r x} 
goal: { x // Acc r x }

full_name: _private.«.lake».packages.batteries.Batteries.WF.0.WellFounded.fixFC
code: /-- A computable version of `WellFounded.fixF`.
Workaround until Lean has native support for this. -/
@[inline] private def fixFC {α : Sort u} {r : α → α → Prop}
    {C : α → Sort v} (F : ∀ x, (∀ y, r y x → C y) → C x) (x : α) (a : Acc r x) : C x 
goal: C x

full_name: _private.«.lake».packages.batteries.Batteries.WF.0.WellFounded.fixF_eq_fixFC
code: @[csimp] private theorem fixF_eq_fixFC : @fixF = @fixFC 
goal: @WellFounded.fixF = @WellFounded.fixFC

full_name: _private.«.lake».packages.batteries.Batteries.WF.0.WellFounded.fixC
code: /-- A computable version of `fix`. Workaround until Lean has native support for this. -/
@[specialize] private def fixC {α : Sort u} {C : α → Sort v} {r : α → α → Prop}
    (hwf : WellFounded r) (F : ∀ x, (∀ y, r y x → C y) → C x) (x : α) : C x 
goal: C x

full_name: _private.«.lake».packages.batteries.Batteries.WF.0.WellFounded.fix_eq_fixC
code: @[csimp] private theorem fix_eq_fixC : @fix = @fixC 
goal: @WellFounded.fix = @WellFounded.fixC