This PR ports Batteries.WF to Init.WFC for executable well-founded fixpoints. It introduces `csimp` theorems to replace the recursors and non-executable definitions with executable definitions. This ocassionally comes up on Zulip as it prevents admiting definitions generated from well-founded induction. (e.g., [#lean4 > Computable WellFounded.fix](https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/Computable.20WellFounded.2Efix/with/529347861) and [#mathlib4 > Why Nat.find is computable, when Wellfounded.fix isn't?](https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/Why.20Nat.2Efind.20is.20computable.2C.20when.20Wellfounded.2Efix.20isn't.3F/with/545143617)). This was motivated by running into poor elaboration performance with recursive definitions involving complex inductive types generated by a custom elaborator. It would be helpful to explore bypassing the elaborator and generating elaborated terms directly, but this requires an executable fixpoint (such as `WellFounded.fixC` introduced in batteries).
49 lines
1.3 KiB
Text
49 lines
1.3 KiB
Text
/-
|
|
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
Authors: Leonardo de Moura
|
|
-/
|
|
module
|
|
|
|
prelude
|
|
public import Init.Prelude
|
|
public import Init.Notation
|
|
public import Init.Tactics
|
|
public import Init.TacticsExtra
|
|
public import Init.ByCases
|
|
public import Init.RCases
|
|
public import Init.Core
|
|
public import Init.Control
|
|
public import Init.WF
|
|
public import Init.WFComputable
|
|
public import Init.WFTactics
|
|
public import Init.Data
|
|
public import Init.System
|
|
public import Init.Util
|
|
public import Init.Dynamic
|
|
public import Init.ShareCommon
|
|
public import Init.MetaTypes
|
|
public import Init.Meta
|
|
public import Init.NotationExtra
|
|
public import Init.SimpLemmas
|
|
public import Init.PropLemmas
|
|
public import Init.Hints
|
|
public import Init.Conv
|
|
public import Init.Guard
|
|
public import Init.Simproc
|
|
public import Init.SizeOfLemmas
|
|
public import Init.BinderPredicates
|
|
public import Init.Ext
|
|
public import Init.Omega
|
|
public import Init.MacroTrace
|
|
public import Init.Grind
|
|
public import Init.GrindInstances
|
|
public import Init.While
|
|
public import Init.Syntax
|
|
public import Init.Internal
|
|
public import Init.Try
|
|
public meta import Init.Try -- make sure `Try.Config` can be evaluated anywhere
|
|
public import Init.BinderNameHint
|
|
public import Init.Task
|
|
public import Init.MethodSpecsSimp
|
|
public import Init.LawfulBEqTactics
|