diff --git a/RELEASES.md b/RELEASES.md index d70621fbdc8f..7360725db20b 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -21,7 +21,286 @@ Release candidate, release notes will be copied from the branch `releases/v4.15. v4.14.0 ---------- -Release candidate, release notes will be copied from the branch `releases/v4.14.0` once completed. +**Full Changelog**: https://github.com/leanprover/lean4/compare/v4.13.0...v4.14.0 + +### Language features, tactics, and metaprograms + +* `structure` and `inductive` commands + * [#5517](https://github.com/leanprover/lean4/pull/5517) improves universe level inference for the resulting type of an `inductive` or `structure.` Recall that a `Prop`-valued inductive type is a syntactic subsingleton if it has at most one constructor and all the arguments to the constructor are in `Prop`. Such types have large elimination, so they could be defined in `Type` or `Prop` without any trouble. The way inference has changed is that if a type is a syntactic subsingleton with exactly one constructor, and the constructor has at least one parameter/field, then the `inductive`/`structure` command will prefer creating a `Prop` instead of a `Type`. The upshot is that the `: Prop` in `structure S : Prop` is often no longer needed. (With @arthur-adjedj). + * [#5842](https://github.com/leanprover/lean4/pull/5842) and [#5783](https://github.com/leanprover/lean4/pull/5783) implement a feature where the `structure` command can now define recursive inductive types: + ```lean + structure Tree where + n : Nat + children : Fin n → Tree + + def Tree.size : Tree → Nat + | {n, children} => Id.run do + let mut s := 0 + for h : i in [0 : n] do + s := s + (children ⟨i, h.2⟩).size + pure s + ``` + * [#5814](https://github.com/leanprover/lean4/pull/5814) fixes a bug where Mathlib's `Type*` elaborator could lead to incorrect universe parameters with the `inductive` command. + * [#3152](https://github.com/leanprover/lean4/pull/3152) and [#5844](https://github.com/leanprover/lean4/pull/5844) fix bugs in default value processing for structure instance notation (with @arthur-adjedj). + * [#5399](https://github.com/leanprover/lean4/pull/5399) promotes instance synthesis order calculation failure from a soft error to a hard error. + * [#5542](https://github.com/leanprover/lean4/pull/5542) deprecates `:=` variants of `inductive` and `structure` (see breaking changes). + +* **Application elaboration improvements** + * [#5671](https://github.com/leanprover/lean4/pull/5671) makes `@[elab_as_elim]` require at least one discriminant, since otherwise there is no advantage to this alternative elaborator. + * [#5528](https://github.com/leanprover/lean4/pull/5528) enables field notation in explicit mode. The syntax `@x.f` elaborates as `@S.f` with `x` supplied to the appropriate parameter. + * [#5692](https://github.com/leanprover/lean4/pull/5692) modifies the dot notation resolution algorithm so that it can apply `CoeFun` instances. For example, Mathlib has `Multiset.card : Multiset α →+ Nat`, and now with `m : Multiset α`, the notation `m.card` resolves to `⇑Multiset.card m`. + * [#5658](https://github.com/leanprover/lean4/pull/5658) fixes a bug where 'don't know how to synthesize implicit argument' errors might have the incorrect local context when the eta arguments feature is activated. + * [#5933](https://github.com/leanprover/lean4/pull/5933) fixes a bug where `..` ellipses in patterns made use of optparams and autoparams. + * [#5770](https://github.com/leanprover/lean4/pull/5770) makes dot notation for structures resolve using *all* ancestors. Adds a *resolution order* for generalized field notation. This is the order of namespaces visited during resolution when trying to resolve names. The algorithm to compute a resolution order is the commonly used C3 linearization (used for example by Python), which when successful ensures that immediate parents' namespaces are considered before more distant ancestors' namespaces. By default we use a relaxed version of the algorithm that tolerates inconsistencies, but using `set_option structure.strictResolutionOrder true` makes inconsistent parent orderings into warnings. + +* **Recursion and induction principles** + * [#5619](https://github.com/leanprover/lean4/pull/5619) fixes functional induction principle generation to avoid over-eta-expanding in the preprocessing step. + * [#5766](https://github.com/leanprover/lean4/pull/5766) fixes structural nested recursion so that it is not confused when a nested type appears first. + * [#5803](https://github.com/leanprover/lean4/pull/5803) fixes a bug in functional induction principle generation when there are `let` bindings. + * [#5904](https://github.com/leanprover/lean4/pull/5904) improves functional induction principle generation to unfold aux definitions more carefully. + * [#5850](https://github.com/leanprover/lean4/pull/5850) refactors code for `Predefinition.Structural`. + +* **Error messages** + * [#5276](https://github.com/leanprover/lean4/pull/5276) fixes a bug in "type mismatch" errors that would structurally assign metavariables during the algorithm to expose differences. + * [#5919](https://github.com/leanprover/lean4/pull/5919) makes "type mismatch" errors add type ascriptions to expose differences for numeric literals. + * [#5922](https://github.com/leanprover/lean4/pull/5922) makes "type mismatch" errors expose differences in the bodies of functions and pi types. + * [#5888](https://github.com/leanprover/lean4/pull/5888) improves the error message for invalid induction alternative names in `match` expressions (@josojo). + * [#5719](https://github.com/leanprover/lean4/pull/5719) improves `calc` error messages. + +* [#5627](https://github.com/leanprover/lean4/pull/5627) and [#5663](https://github.com/leanprover/lean4/pull/5663) improve the **`#eval` command** and introduce some new features. + * Now results can be pretty printed if there is a `ToExpr` instance, which means **hoverable output**. If `ToExpr` fails, it then tries looking for a `Repr` or `ToString` instance like before. Setting `set_option eval.pp false` disables making use of `ToExpr` instances. + * There is now **auto-derivation** of `Repr` instances, enabled with the `pp.derive.repr` option (default to **true**). For example: + ```lean + inductive Baz + | a | b + + #eval Baz.a + -- Baz.a + ``` + It simply does `deriving instance Repr for Baz` when there's no way to represent `Baz`. + * The option `eval.type` controls whether or not to include the type in the output. For now the default is false. + * Now expressions such as `#eval do return 2`, where monad is unknown, work. It tries unifying the monad with `CommandElabM`, `TermElabM`, or `IO`. + * The classes `Lean.Eval` and `Lean.MetaEval` have been removed. These each used to be responsible for adapting monads and printing results. Now the `MonadEval` class is responsible for adapting monads for evaluation (it is similar to `MonadLift`, but instances are allowed to use default data when initializing state), and representing results is handled through a separate process. + * Error messages about failed instance synthesis are now more precise. Once it detects that a `MonadEval` class applies, then the error message will be specific about missing `ToExpr`/`Repr`/`ToString` instances. + * Fixes bugs where evaluating `MetaM` and `CoreM` wouldn't collect log messages. + * Fixes a bug where `let rec` could not be used in `#eval`. + +* `partial` definitions + * [#5780](https://github.com/leanprover/lean4/pull/5780) improves the error message when `partial` fails to prove a type is inhabited. Add delta deriving. + * [#5821](https://github.com/leanprover/lean4/pull/5821) gives `partial` inhabitation the ability to create local `Inhabited` instances from parameters. + +* **New tactic configuration syntax.** The configuration syntax for all core tactics has been given an upgrade. Rather than `simp (config := { contextual := true, maxSteps := 22})`, one can now write `simp +contextual (maxSteps := 22)`. Tactic authors can migrate by switching from `(config)?` to `optConfig` in tactic syntaxes and potentially deleting `mkOptionalNode` in elaborators. [#5883](https://github.com/leanprover/lean4/pull/5883), [#5898](https://github.com/leanprover/lean4/pull/5898), [#5928](https://github.com/leanprover/lean4/pull/5928), and [#5932](https://github.com/leanprover/lean4/pull/5932). (Tactic authors, see breaking changes.) + +* `simp` tactic + * [#5632](https://github.com/leanprover/lean4/pull/5632) fixes the simpproc for `Fin` literals to reduce more consistently. + * [#5648](https://github.com/leanprover/lean4/pull/5648) fixes a bug in `simpa ... using t` where metavariables in `t` were not properly accounted for, and also improves the type mismatch error. + * [#5838](https://github.com/leanprover/lean4/pull/5838) fixes the docstring of `simp!` to actually talk about `simp!`. + * [#5870](https://github.com/leanprover/lean4/pull/5870) adds support for `attribute [simp ←]` (note the reverse direction). This adds the reverse of a theorem as a global simp theorem. + +* `decide` tactic + * [#5665](https://github.com/leanprover/lean4/pull/5665) adds `decide!` tactic for using kernel reduction (warning: this is renamed to `decide +kernel` in a future release). + +* `bv_decide` tactic + * [#5714](https://github.com/leanprover/lean4/pull/5714) adds inequality regression tests (@alexkeizer). + * [#5608](https://github.com/leanprover/lean4/pull/5608) adds `bv_toNat` tag for `toNat_ofInt` (@bollu). + * [#5618](https://github.com/leanprover/lean4/pull/5618) adds support for `at` in `ac_nf` and uses it in `bv_normalize` (@tobiasgrosser). + * [#5628](https://github.com/leanprover/lean4/pull/5628) adds udiv support. + * [#5635](https://github.com/leanprover/lean4/pull/5635) adds auxiliary bitblasters for negation and subtraction. + * [#5637](https://github.com/leanprover/lean4/pull/5637) adds more `getLsbD` bitblaster theory. + * [#5652](https://github.com/leanprover/lean4/pull/5652) adds umod support. + * [#5653](https://github.com/leanprover/lean4/pull/5653) adds performance benchmark for modulo. + * [#5655](https://github.com/leanprover/lean4/pull/5655) reduces error on `bv_check` to warning. + * [#5670](https://github.com/leanprover/lean4/pull/5670) adds `~~~(-x)` support. + * [#5673](https://github.com/leanprover/lean4/pull/5673) disables `ac_nf` by default. + * [#5675](https://github.com/leanprover/lean4/pull/5675) fixes context tracking in `bv_decide` counter example. + * [#5676](https://github.com/leanprover/lean4/pull/5676) adds an error when the LRAT proof is invalid. + * [#5781](https://github.com/leanprover/lean4/pull/5781) introduces uninterpreted symbols everywhere. + * [#5823](https://github.com/leanprover/lean4/pull/5823) adds `BitVec.sdiv` support. + * [#5852](https://github.com/leanprover/lean4/pull/5852) adds `BitVec.ofBool` support. + * [#5855](https://github.com/leanprover/lean4/pull/5855) adds `if` support. + * [#5869](https://github.com/leanprover/lean4/pull/5869) adds support for all the SMTLIB BitVec divison/remainder operations. + * [#5886](https://github.com/leanprover/lean4/pull/5886) adds embedded constraint substitution. + * [#5918](https://github.com/leanprover/lean4/pull/5918) fixes loose mvars bug in `bv_normalize`. + * Documentation: + * [#5636](https://github.com/leanprover/lean4/pull/5636) adds remarks about multiplication. + +* `conv` mode + * [#5861](https://github.com/leanprover/lean4/pull/5861) improves the `congr` conv tactic to handle "over-applied" functions. + * [#5894](https://github.com/leanprover/lean4/pull/5894) improves the `arg` conv tactic so that it can access more arguments and so that it can handle "over-applied" functions (it generates a specialized congruence lemma for the specific argument in question). Makes `arg 1` and `arg 2` apply to pi types in more situations. Adds negative indexing, for example `arg -2` is equivalent to the `lhs` tactic. Makes the `enter [...]` tactic show intermediate states like `rw`. + +* **Other tactics** + * [#4846](https://github.com/leanprover/lean4/pull/4846) fixes a bug where `generalize ... at *` would apply to implementation details (@ymherklotz). + * [#5730](https://github.com/leanprover/lean4/pull/5730) upstreams the `classical` tactic combinator. + * [#5815](https://github.com/leanprover/lean4/pull/5815) improves the error message when trying to unfold a local hypothesis that is not a local definition. + * [#5862](https://github.com/leanprover/lean4/pull/5862) and [#5863](https://github.com/leanprover/lean4/pull/5863) change how `apply` and `simp` elaborate, making them not disable error recovery. This improves hovers and completions when the term has elaboration errors. + +* `deriving` clauses + * [#5899](https://github.com/leanprover/lean4/pull/5899) adds declaration ranges for delta-derived instances. + * [#5265](https://github.com/leanprover/lean4/pull/5265) removes unused syntax in `deriving` clauses for providing arguments to deriving handlers (see breaking changes). + +* [#5065](https://github.com/leanprover/lean4/pull/5065) upstreams and updates `#where`, a command that reports the current scope information. + +* **Linters** + * [#5338](https://github.com/leanprover/lean4/pull/5338) makes the unused variables linter ignore variables defined in tactics by default now, avoiding performance bottlenecks. + * [#5644](https://github.com/leanprover/lean4/pull/5644) ensures that linters in general do not run on `#guard_msgs` itself. + +* **Metaprogramming interface** + * [#5720](https://github.com/leanprover/lean4/pull/5720) adds `pushGoal`/`pushGoals` and `popGoal` for manipulating the goal state. These are an alternative to `replaceMainGoal` and `getMainGoal`, and with them you don't need to worry about making sure nothing clears assigned metavariables from the goal list between assigning the main goal and using `replaceMainGoal`. Modifies `closeMainGoalUsing`, which is like a `TacticM` version of `liftMetaTactic`. Now the callback is run in a context where the main goal is removed from the goal list, and the callback is free to modify the goal list. Furthermore, the `checkUnassigned` argument has been replaced with `checkNewUnassigned`, which checks whether the value assigned to the goal has any *new* metavariables, relative to the start of execution of the callback. Modifies `withCollectingNewGoalsFrom` to take the `parentTag` argument explicitly rather than indirectly via `getMainTag`. Modifies `elabTermWithHoles` to optionally take `parentTag?`. + * [#5563](https://github.com/leanprover/lean4/pull/5563) fixes `getFunInfo` and `inferType` to use `withAtLeastTransparency` rather than `withTransparency`. + * [#5679](https://github.com/leanprover/lean4/pull/5679) fixes `RecursorVal.getInduct` to return the name of major argument’s type. This makes "structure eta" work for nested inductives. + * [#5681](https://github.com/leanprover/lean4/pull/5681) removes unused `mkRecursorInfoForKernelRec`. + * [#5686](https://github.com/leanprover/lean4/pull/5686) makes discrimination trees index the domains of foralls, for better performance of the simplify and type class search. + * [#5760](https://github.com/leanprover/lean4/pull/5760) adds `Lean.Expr.name?` recognizer for `Name` expressions. + * [#5800](https://github.com/leanprover/lean4/pull/5800) modifies `liftCommandElabM` to preserve more state, fixing an issue where using it would drop messages. + * [#5857](https://github.com/leanprover/lean4/pull/5857) makes it possible to use dot notation in `m!` strings, for example `m!"{.ofConstName n}"`. + * [#5841](https://github.com/leanprover/lean4/pull/5841) and [#5853](https://github.com/leanprover/lean4/pull/5853) record the complete list of `structure` parents in the `StructureInfo` environment extension. + +* **Other fixes or improvements** + * [#5566](https://github.com/leanprover/lean4/pull/5566) fixes a bug introduced in [#4781](https://github.com/leanprover/lean4/pull/4781) where heartbeat exceptions were no longer being handled properly. Now such exceptions are tagged with `runtime.maxHeartbeats` (@eric-wieser). + * [#5708](https://github.com/leanprover/lean4/pull/5708) modifies the proof objects produced by the proof-by-reflection tactics `ac_nf0` and `simp_arith` so that the kernel is less prone to reducing expensive atoms. + * [#5768](https://github.com/leanprover/lean4/pull/5768) adds a `#version` command that prints Lean's version information. + * [#5822](https://github.com/leanprover/lean4/pull/5822) fixes elaborator algorithms to match kernel algorithms for primitive projections (`Expr.proj`). + * [#5811](https://github.com/leanprover/lean4/pull/5811) improves the docstring for the `rwa` tactic. + + +### Language server, widgets, and IDE extensions + +* [#5224](https://github.com/leanprover/lean4/pull/5224) fixes `WorkspaceClientCapabilities` to make `applyEdit` optional, in accordance with the LSP specification (@pzread). +* [#5340](https://github.com/leanprover/lean4/pull/5340) fixes a server deadlock when shutting down the language server and a desync between client and language server after a file worker crash. +* [#5560](https://github.com/leanprover/lean4/pull/5560) makes `initialize` and `builtin_initialize` participate in the call hierarchy and other requests. +* [#5650](https://github.com/leanprover/lean4/pull/5650) makes references in attributes participate in the call hierarchy and other requests. +* [#5666](https://github.com/leanprover/lean4/pull/5666) add auto-completion in tactic blocks without having to type the first character of the tactic, and adds tactic completion docs to tactic auto-completion items. +* [#5677](https://github.com/leanprover/lean4/pull/5677) fixes several cases where goal states were not displayed in certain text cursor positions. +* [#5707](https://github.com/leanprover/lean4/pull/5707) indicates deprecations in auto-completion items. +* [#5736](https://github.com/leanprover/lean4/pull/5736), [#5752](https://github.com/leanprover/lean4/pull/5752), [#5763](https://github.com/leanprover/lean4/pull/5763), [#5802](https://github.com/leanprover/lean4/pull/5802), and [#5805](https://github.com/leanprover/lean4/pull/5805) fix various performance issues in the language server. +* [#5801](https://github.com/leanprover/lean4/pull/5801) distinguishes theorem auto-completions from non-theorem auto-completions. + +### Pretty printing + +* [#5640](https://github.com/leanprover/lean4/pull/5640) fixes a bug where goal states in messages might print newlines as spaces. +* [#5643](https://github.com/leanprover/lean4/pull/5643) adds option `pp.mvars.delayed` (default false), which when false causes delayed assignment metavariables to pretty print with what they are assigned to. Now `fun x : Nat => ?a` pretty prints as `fun x : Nat => ?a` rather than `fun x ↦ ?m.7 x`. +* [#5711](https://github.com/leanprover/lean4/pull/5711) adds options `pp.mvars.anonymous` and `pp.mvars.levels`, which when false respectively cause expression metavariables and level metavariables to pretty print as `?_`. +* [#5710](https://github.com/leanprover/lean4/pull/5710) adjusts the `⋯` elaboration warning to mention `pp.maxSteps`. + +* [#5759](https://github.com/leanprover/lean4/pull/5759) fixes the app unexpander for `sorryAx`. +* [#5827](https://github.com/leanprover/lean4/pull/5827) improves accuracy of binder names in the signature pretty printer (like in output of `#check`). Also fixes the issue where consecutive hygienic names pretty print without a space separating them, so we now have `(x✝ y✝ : Nat)` rather than `(x✝y✝ : Nat)`. +* [#5830](https://github.com/leanprover/lean4/pull/5830) makes sure all the core delaborators respond to `pp.explicit` when appropriate. +* [#5639](https://github.com/leanprover/lean4/pull/5639) makes sure name literals use escaping when pretty printing. +* [#5854](https://github.com/leanprover/lean4/pull/5854) adds delaborators for `<|>`, `<*>`, `>>`, `<*`, and `*>`. + +### Library + +* `Array` + * [#5687](https://github.com/leanprover/lean4/pull/5687) deprecates `Array.data`. + * [#5705](https://github.com/leanprover/lean4/pull/5705) uses a better default value for `Array.swapAt!`. + * [#5748](https://github.com/leanprover/lean4/pull/5748) moves `Array.mapIdx` lemmas to a new file. + * [#5749](https://github.com/leanprover/lean4/pull/5749) simplifies signature of `Array.mapIdx`. + * [#5758](https://github.com/leanprover/lean4/pull/5758) upstreams `Array.reduceOption`. + * [#5786](https://github.com/leanprover/lean4/pull/5786) adds simp lemmas for `Array.isEqv` and `BEq`. + * [#5796](https://github.com/leanprover/lean4/pull/5796) renames `Array.shrink` to `Array.take`, and relates it to `List.take`. + * [#5798](https://github.com/leanprover/lean4/pull/5798) upstreams `List.modify`, adds lemmas, relates to `Array.modify`. + * [#5799](https://github.com/leanprover/lean4/pull/5799) relates `Array.forIn` and `List.forIn`. + * [#5833](https://github.com/leanprover/lean4/pull/5833) adds `Array.forIn'`, and relates to `List`. + * [#5848](https://github.com/leanprover/lean4/pull/5848) fixes deprecations in `Init.Data.Array.Basic` to not recommend the deprecated constant. + * [#5895](https://github.com/leanprover/lean4/pull/5895) adds `LawfulBEq (Array α) ↔ LawfulBEq α`. + * [#5896](https://github.com/leanprover/lean4/pull/5896) moves `@[simp]` from `back_eq_back?` to `back_push`. + * [#5897](https://github.com/leanprover/lean4/pull/5897) renames `Array.back` to `back!`. + +* `List` + * [#5605](https://github.com/leanprover/lean4/pull/5605) removes `List.redLength`. + * [#5696](https://github.com/leanprover/lean4/pull/5696) upstreams `List.mapIdx` and adds lemmas. + * [#5697](https://github.com/leanprover/lean4/pull/5697) upstreams `List.foldxM_map`. + * [#5701](https://github.com/leanprover/lean4/pull/5701) renames `List.join` to `List.flatten`. + * [#5703](https://github.com/leanprover/lean4/pull/5703) upstreams `List.sum`. + * [#5706](https://github.com/leanprover/lean4/pull/5706) marks `prefix_append_right_inj` as a simp lemma. + * [#5716](https://github.com/leanprover/lean4/pull/5716) fixes `List.drop_drop` addition order. + * [#5731](https://github.com/leanprover/lean4/pull/5731) renames `List.bind` and `Array.concatMap` to `flatMap`. + * [#5732](https://github.com/leanprover/lean4/pull/5732) renames `List.pure` to `List.singleton`. + * [#5742](https://github.com/leanprover/lean4/pull/5742) upstreams `ne_of_mem_of_not_mem`. + * [#5743](https://github.com/leanprover/lean4/pull/5743) upstreams `ne_of_apply_ne`. + * [#5816](https://github.com/leanprover/lean4/pull/5816) adds more `List.modify` lemmas. + * [#5879](https://github.com/leanprover/lean4/pull/5879) renames `List.groupBy` to `splitBy`. + * [#5913](https://github.com/leanprover/lean4/pull/5913) relates `for` loops over `List` with `foldlM`. + +* `Nat` + * [#5694](https://github.com/leanprover/lean4/pull/5694) removes `instBEqNat`, which is redundant with `instBEqOfDecidableEq` but not defeq. + * [#5746](https://github.com/leanprover/lean4/pull/5746) deprecates `Nat.sum`. + * [#5785](https://github.com/leanprover/lean4/pull/5785) adds `Nat.forall_lt_succ` and variants. + +* Fixed width integers + * [#5323](https://github.com/leanprover/lean4/pull/5323) redefine unsigned fixed width integers in terms of `BitVec`. + * [#5735](https://github.com/leanprover/lean4/pull/5735) adds `UIntX.[val_ofNat, toBitVec_ofNat]`. + * [#5790](https://github.com/leanprover/lean4/pull/5790) defines `Int8`. + * [#5901](https://github.com/leanprover/lean4/pull/5901) removes native code for `UInt8.modn`. + +* `BitVec` + * [#5604](https://github.com/leanprover/lean4/pull/5604) completes `BitVec.[getMsbD|getLsbD|msb]` for shifts (@luisacicolini). + * [#5609](https://github.com/leanprover/lean4/pull/5609) adds lemmas for division when denominator is zero (@bollu). + * [#5620](https://github.com/leanprover/lean4/pull/5620) documents Bitblasting (@bollu) + * [#5623](https://github.com/leanprover/lean4/pull/5623) moves `BitVec.udiv/umod/sdiv/smod` after `add/sub/mul/lt` (@tobiasgrosser). + * [#5645](https://github.com/leanprover/lean4/pull/5645) defines `udiv` normal form to be `/`, resp. `umod` and `%` (@bollu). + * [#5646](https://github.com/leanprover/lean4/pull/5646) adds lemmas about arithmetic inequalities (@bollu). + * [#5680](https://github.com/leanprover/lean4/pull/5680) expands relationship with `toFin` (@tobiasgrosser). + * [#5691](https://github.com/leanprover/lean4/pull/5691) adds `BitVec.(getMSbD, msb)_(add, sub)` and `BitVec.getLsbD_sub` (@luisacicolini). + * [#5712](https://github.com/leanprover/lean4/pull/5712) adds `BitVec.[udiv|umod]_[zero|one|self]` (@tobiasgrosser). + * [#5718](https://github.com/leanprover/lean4/pull/5718) adds `BitVec.sdiv_[zero|one|self]` (@tobiasgrosser). + * [#5721](https://github.com/leanprover/lean4/pull/5721) adds `BitVec.(msb, getMsbD, getLsbD)_(neg, abs)` (@luisacicolini). + * [#5772](https://github.com/leanprover/lean4/pull/5772) adds `BitVec.toInt_sub`, simplifies `BitVec.toInt_neg` (@tobiasgrosser). + * [#5778](https://github.com/leanprover/lean4/pull/5778) prove that `intMin` the smallest signed bitvector (@alexkeizer). + * [#5851](https://github.com/leanprover/lean4/pull/5851) adds `(msb, getMsbD)_twoPow` (@luisacicolini). + * [#5858](https://github.com/leanprover/lean4/pull/5858) adds `BitVec.[zero_ushiftRight|zero_sshiftRight|zero_mul]` and cleans up BVDecide (@tobiasgrosser). + * [#5865](https://github.com/leanprover/lean4/pull/5865) adds `BitVec.(msb, getMsbD)_concat` (@luisacicolini). + * [#5881](https://github.com/leanprover/lean4/pull/5881) adds `Hashable (BitVec n)` + +* `String`/`Char` + * [#5728](https://github.com/leanprover/lean4/pull/5728) upstreams `String.dropPrefix?`. + * [#5745](https://github.com/leanprover/lean4/pull/5745) changes `String.dropPrefix?` signature. + * [#5747](https://github.com/leanprover/lean4/pull/5747) adds `Hashable Char` instance + +* `HashMap` + * [#5880](https://github.com/leanprover/lean4/pull/5880) adds interim implementation of `HashMap.modify`/`alter` + +* **Other** + * [#5704](https://github.com/leanprover/lean4/pull/5704) removes `@[simp]` from `Option.isSome_eq_isSome`. + * [#5739](https://github.com/leanprover/lean4/pull/5739) upstreams material on `Prod`. + * [#5740](https://github.com/leanprover/lean4/pull/5740) moves `Antisymm` to `Std.Antisymm`. + * [#5741](https://github.com/leanprover/lean4/pull/5741) upstreams basic material on `Sum`. + * [#5756](https://github.com/leanprover/lean4/pull/5756) adds `Nat.log2_two_pow` (@spinylobster). + * [#5892](https://github.com/leanprover/lean4/pull/5892) removes duplicated `ForIn` instances. + * [#5900](https://github.com/leanprover/lean4/pull/5900) removes `@[simp]` from `Sum.forall` and `Sum.exists`. + * [#5812](https://github.com/leanprover/lean4/pull/5812) removes redundant `Decidable` assumptions (@FR-vdash-bot). + +### Compiler, runtime, and FFI + +* [#5685](https://github.com/leanprover/lean4/pull/5685) fixes help message flags, removes the `-f` flag and adds the `-g` flag (@James-Oswald). +* [#5930](https://github.com/leanprover/lean4/pull/5930) adds `--short-version` (`-V`) option to display short version (@juhp). +* [#5144](https://github.com/leanprover/lean4/pull/5144) switches all 64-bit platforms over to consistently using GMP for bignum arithmetic. +* [#5753](https://github.com/leanprover/lean4/pull/5753) raises the minimum supported Windows version to Windows 10 1903 (released May 2019). + +### Lake + +* [#5715](https://github.com/leanprover/lean4/pull/5715) changes `lake new math` to use `autoImplicit false` (@eric-wieser). +* [#5688](https://github.com/leanprover/lean4/pull/5688) makes `Lake` not create core aliases in the `Lake` namespace. +* [#5924](https://github.com/leanprover/lean4/pull/5924) adds a `text` option for `buildFile*` utilities. +* [#5789](https://github.com/leanprover/lean4/pull/5789) makes `lake init` not `git init` when inside git work tree (@haoxins). +* [#5684](https://github.com/leanprover/lean4/pull/5684) has Lake update a package's `lean-toolchain` file on `lake update` if it finds the package's direct dependencies use a newer compatible toolchain. To skip this step, use the `--keep-toolchain` CLI option. (See breaking changes.) +* [#6218](https://github.com/leanprover/lean4/pull/6218) makes Lake no longer automatically fetch GitHub cloud releases if the package build directory is already present (mirroring the behavior of the Reservoir cache). This prevents the cache from clobbering existing prebuilt artifacts. Users can still manually fetch the cache and clobber the build directory by running `lake build :release`. +* [#6231](https://github.com/leanprover/lean4/pull/6231) improves the errors Lake produces when it fails to fetch a dependency from Reservoir. If the package is not indexed, it will produce a suggestion about how to require it from GitHub. + +### Documentation + +* [#5617](https://github.com/leanprover/lean4/pull/5617) fixes MSYS2 build instructions. +* [#5725](https://github.com/leanprover/lean4/pull/5725) points out that `OfScientific` is called with raw literals (@eric-wieser). +* [#5794](https://github.com/leanprover/lean4/pull/5794) adds a stub for application ellipsis notation (@eric-wieser). + +### Breaking changes + +* The syntax for providing arguments to deriving handlers has been removed, which was not used by any major Lean projects in the ecosystem. As a result, the `applyDerivingHandlers` now takes one fewer argument, `registerDerivingHandlerWithArgs` is now simply `registerDerivingHandler`, `DerivingHandler` no longer includes the unused parameter, and `DerivingHandlerNoArgs` has been deprecated. To migrate code, delete the unused `none` argument and use `registerDerivingHandler` and `DerivingHandler`. ([#5265](https://github.com/leanprover/lean4/pull/5265)) +* The minimum supported Windows version has been raised to Windows 10 1903, released May 2019. ([#5753](https://github.com/leanprover/lean4/pull/5753)) +* The `--lean` CLI option for `lake` was removed. Use the `LEAN` environment variable instead. ([#5684](https://github.com/leanprover/lean4/pull/5684)) +* The `inductive ... :=`, `structure ... :=`, and `class ... :=` syntaxes have been deprecated in favor of the `... where` variants. The old syntax produces a warning, controlled by the `linter.deprecated` option. ([#5542](https://github.com/leanprover/lean4/pull/5542)) +* The generated tactic configuration elaborators now land in `TacticM` to make use of the current recovery state. Commands that wish to elaborate configurations should now use `declare_command_config_elab` instead of `declare_config_elab` to get an elaborator landing in `CommandElabM`. Syntaxes should migrate to `optConfig` instead of `(config)?`, but the elaborators are reverse compatible. ([#5883](https://github.com/leanprover/lean4/pull/5883)) + v4.13.0 ---------- diff --git a/doc/lexical_structure.md b/doc/lexical_structure.md index 93febbdb2891..a9d8b0b43990 100644 --- a/doc/lexical_structure.md +++ b/doc/lexical_structure.md @@ -128,16 +128,16 @@ Numeric literals can be specified in various bases. ``` numeral : numeral10 | numeral2 | numeral8 | numeral16 - numeral10 : [0-9]+ - numeral2 : "0" [bB] [0-1]+ - numeral8 : "0" [oO] [0-7]+ - numeral16 : "0" [xX] hex_char+ + numeral10 : [0-9]+ ("_"+ [0-9]+)* + numeral2 : "0" [bB] ("_"* [0-1]+)+ + numeral8 : "0" [oO] ("_"* [0-7]+)+ + numeral16 : "0" [xX] ("_"* hex_char+)+ ``` Floating point literals are also possible with optional exponent: ``` - float : [0-9]+ "." [0-9]+ [[eE[+-][0-9]+] + float : numeral10 "." numeral10? [eE[+-]numeral10] ``` For example: @@ -147,6 +147,7 @@ constant w : Int := 55 constant x : Nat := 26085 constant y : Nat := 0x65E5 constant z : Float := 2.548123e-05 +constant b : Bool := 0b_11_01_10_00 ``` Note: that negative numbers are created by applying the "-" negation prefix operator to the number, for example: diff --git a/doc/monads/readers.lean b/doc/monads/readers.lean index b3b4d6f923d6..eab3e67c9711 100644 --- a/doc/monads/readers.lean +++ b/doc/monads/readers.lean @@ -139,7 +139,7 @@ You might be wondering, how does the context actually move through the `ReaderM` add an input argument to a function by modifying its return type? There is a special command in Lean that will show you the reduced types: -/ -#reduce ReaderM Environment String -- Environment → String +#reduce (types := true) ReaderM Environment String -- Environment → String /-! And you can see here that this type is actually a function! It's a function that takes an `Environment` as input and returns a `String`. @@ -196,4 +196,4 @@ entirely. Now it's time to move on to [StateM Monad](states.lean.md) which is like a `ReaderM` that is also updatable. --/ \ No newline at end of file +-/ diff --git a/src/Init/Data/Array/Basic.lean b/src/Init/Data/Array/Basic.lean index 52fb7faecf06..b04bb16f4881 100644 --- a/src/Init/Data/Array/Basic.lean +++ b/src/Init/Data/Array/Basic.lean @@ -11,7 +11,7 @@ import Init.Data.UInt.BasicAux import Init.Data.Repr import Init.Data.ToString.Basic import Init.GetElem -import Init.Data.List.ToArray +import Init.Data.List.ToArrayImpl import Init.Data.Array.Set universe u v w @@ -85,6 +85,8 @@ theorem ext' {as bs : Array α} (h : as.toList = bs.toList) : as = bs := by @[simp] theorem getElem_toList {a : Array α} {i : Nat} (h : i < a.size) : a.toList[i] = a[i] := rfl +@[simp] theorem getElem?_toList {a : Array α} {i : Nat} : a.toList[i]? = a[i]? := rfl + /-- `a ∈ as` is a predicate which asserts that `a` is in the array `as`. -/ -- NB: This is defined as a structure rather than a plain def so that a lemma -- like `sizeOf_lt_of_mem` will not apply with no actual arrays around. @@ -97,6 +99,9 @@ instance : Membership α (Array α) where theorem mem_def {a : α} {as : Array α} : a ∈ as ↔ a ∈ as.toList := ⟨fun | .mk h => h, Array.Mem.mk⟩ +@[simp] theorem mem_toArray {a : α} {l : List α} : a ∈ l.toArray ↔ a ∈ l := by + simp [mem_def] + @[simp] theorem getElem_mem {l : Array α} {i : Nat} (h : i < l.size) : l[i] ∈ l := by rw [Array.mem_def, ← getElem_toList] apply List.getElem_mem @@ -242,7 +247,7 @@ def singleton (v : α) : Array α := mkArray 1 v def back! [Inhabited α] (a : Array α) : α := - a.get! (a.size - 1) + a[a.size - 1]! @[deprecated back! (since := "2024-10-31")] abbrev back := @back! diff --git a/src/Init/Data/Array/Find.lean b/src/Init/Data/Array/Find.lean index 48c02b9886db..cf522faf5355 100644 --- a/src/Init/Data/Array/Find.lean +++ b/src/Init/Data/Array/Find.lean @@ -81,7 +81,7 @@ theorem getElem_zero_flatten.proof {L : Array (Array α)} (h : 0 < L.flatten.siz (L.findSome? fun l => l[0]?).isSome := by cases L using array_array_induction simp only [List.findSome?_toArray, List.findSome?_map, Function.comp_def, List.getElem?_toArray, - List.findSome?_isSome_iff, List.isSome_getElem?] + List.findSome?_isSome_iff, isSome_getElem?] simp only [flatten_toArray_map_toArray, size_toArray, List.length_flatten, Nat.sum_pos_iff_exists_pos, List.mem_map] at h obtain ⟨_, ⟨xs, m, rfl⟩, h⟩ := h diff --git a/src/Init/Data/Array/Lemmas.lean b/src/Init/Data/Array/Lemmas.lean index 7aebc66b4b58..e63bba6b253d 100644 --- a/src/Init/Data/Array/Lemmas.lean +++ b/src/Init/Data/Array/Lemmas.lean @@ -5,406 +5,21 @@ Authors: Mario Carneiro -/ prelude import Init.Data.Nat.Lemmas -import Init.Data.List.Impl -import Init.Data.List.Monadic import Init.Data.List.Range import Init.Data.List.Nat.TakeDrop import Init.Data.List.Nat.Modify -import Init.Data.List.Nat.Erase import Init.Data.List.Monadic import Init.Data.List.OfFn import Init.Data.Array.Mem import Init.Data.Array.DecidableEq import Init.TacticsExtra +import Init.Data.List.ToArray /-! ## Theorems about `Array`. -/ -/-! ### Preliminaries about `Array` needed for `List.toArray` lemmas. - -This section contains only the bare minimum lemmas about `Array` -that we need to write lemmas about `List.toArray`. --/ -namespace Array - -theorem getElem?_eq_getElem {a : Array α} {i : Nat} (h : i < a.size) : a[i]? = some a[i] := - getElem?_pos .. - -@[simp] theorem getElem?_eq_none_iff {a : Array α} : a[i]? = none ↔ a.size ≤ i := by - by_cases h : i < a.size - · simp [getElem?_eq_getElem, h] - · rw [getElem?_neg a i h] - simp_all - -@[simp] theorem get_eq_getElem (a : Array α) (i : Nat) (h) : a.get i h = a[i] := rfl - -@[simp] theorem get!_eq_getElem! [Inhabited α] (a : Array α) (i : Nat) : a.get! i = a[i]! := by - simp [getElem!_def, get!, getD] - split <;> rename_i h - · simp [getElem?_eq_getElem h] - · simp [getElem?_eq_none_iff.2 (by simpa using h)] - -@[simp] theorem mem_toArray {a : α} {l : List α} : a ∈ l.toArray ↔ a ∈ l := by - simp [mem_def] - -end Array - -/-! ### Lemmas about `List.toArray`. - -We prefer to pull `List.toArray` outwards. --/ -namespace List - -open Array - -theorem toArray_inj {a b : List α} (h : a.toArray = b.toArray) : a = b := by - cases a with - | nil => simpa using h - | cons a as => - cases b with - | nil => simp at h - | cons b bs => simpa using h - -@[simp] theorem size_toArrayAux {a : List α} {b : Array α} : - (a.toArrayAux b).size = b.size + a.length := by - simp [size] - -@[simp] theorem push_toArray (l : List α) (a : α) : l.toArray.push a = (l ++ [a]).toArray := by - apply ext' - simp - -/-- Unapplied variant of `push_toArray`, useful for monadic reasoning. -/ -@[simp] theorem push_toArray_fun (l : List α) : l.toArray.push = fun a => (l ++ [a]).toArray := by - funext a - simp - -@[simp] theorem isEmpty_toArray (l : List α) : l.toArray.isEmpty = l.isEmpty := by - cases l <;> simp - -@[simp] theorem toArray_singleton (a : α) : (List.singleton a).toArray = singleton a := rfl - -@[simp] theorem back!_toArray [Inhabited α] (l : List α) : l.toArray.back! = l.getLast! := by - simp only [back!, size_toArray, Array.get!_eq_getElem!, getElem!_toArray, getLast!_eq_getElem!] - -@[simp] theorem back?_toArray (l : List α) : l.toArray.back? = l.getLast? := by - simp [back?, List.getLast?_eq_getElem?] - -@[simp] theorem forIn'_loop_toArray [Monad m] (l : List α) (f : (a : α) → a ∈ l.toArray → β → m (ForInStep β)) (i : Nat) - (h : i ≤ l.length) (b : β) : - Array.forIn'.loop l.toArray f i h b = - forIn' (l.drop (l.length - i)) b (fun a m b => f a (by simpa using mem_of_mem_drop m) b) := by - induction i generalizing l b with - | zero => - simp [Array.forIn'.loop] - | succ i ih => - simp only [Array.forIn'.loop, size_toArray, getElem_toArray, ih] - have t : drop (l.length - (i + 1)) l = l[l.length - i - 1] :: drop (l.length - i) l := by - simp only [Nat.sub_add_eq] - rw [List.drop_sub_one (by omega), List.getElem?_eq_getElem (by omega)] - simp only [Option.toList_some, singleton_append] - simp [t] - have t : l.length - 1 - i = l.length - i - 1 := by omega - simp only [t] - congr - -@[simp] theorem forIn'_toArray [Monad m] (l : List α) (b : β) (f : (a : α) → a ∈ l.toArray → β → m (ForInStep β)) : - forIn' l.toArray b f = forIn' l b (fun a m b => f a (mem_toArray.mpr m) b) := by - change Array.forIn' _ _ _ = List.forIn' _ _ _ - rw [Array.forIn', forIn'_loop_toArray] - simp - -@[simp] theorem forIn_toArray [Monad m] (l : List α) (b : β) (f : α → β → m (ForInStep β)) : - forIn l.toArray b f = forIn l b f := by - simpa using forIn'_toArray l b fun a m b => f a b - -theorem foldrM_toArray [Monad m] (f : α → β → m β) (init : β) (l : List α) : - l.toArray.foldrM f init = l.foldrM f init := by - rw [foldrM_eq_reverse_foldlM_toList] - simp - -theorem foldlM_toArray [Monad m] (f : β → α → m β) (init : β) (l : List α) : - l.toArray.foldlM f init = l.foldlM f init := by - rw [foldlM_toList] - -theorem foldr_toArray (f : α → β → β) (init : β) (l : List α) : - l.toArray.foldr f init = l.foldr f init := by - rw [foldr_toList] - -theorem foldl_toArray (f : β → α → β) (init : β) (l : List α) : - l.toArray.foldl f init = l.foldl f init := by - rw [foldl_toList] - -/-- Variant of `foldrM_toArray` with a side condition for the `start` argument. -/ -@[simp] theorem foldrM_toArray' [Monad m] (f : α → β → m β) (init : β) (l : List α) - (h : start = l.toArray.size) : - l.toArray.foldrM f init start 0 = l.foldrM f init := by - subst h - rw [foldrM_eq_reverse_foldlM_toList] - simp - -/-- Variant of `foldlM_toArray` with a side condition for the `stop` argument. -/ -@[simp] theorem foldlM_toArray' [Monad m] (f : β → α → m β) (init : β) (l : List α) - (h : stop = l.toArray.size) : - l.toArray.foldlM f init 0 stop = l.foldlM f init := by - subst h - rw [foldlM_toList] - -/-- Variant of `foldr_toArray` with a side condition for the `start` argument. -/ -@[simp] theorem foldr_toArray' (f : α → β → β) (init : β) (l : List α) - (h : start = l.toArray.size) : - l.toArray.foldr f init start 0 = l.foldr f init := by - subst h - rw [foldr_toList] - -/-- Variant of `foldl_toArray` with a side condition for the `stop` argument. -/ -@[simp] theorem foldl_toArray' (f : β → α → β) (init : β) (l : List α) - (h : stop = l.toArray.size) : - l.toArray.foldl f init 0 stop = l.foldl f init := by - subst h - rw [foldl_toList] - -@[simp] theorem append_toArray (l₁ l₂ : List α) : - l₁.toArray ++ l₂.toArray = (l₁ ++ l₂).toArray := by - apply ext' - simp - -@[simp] theorem push_append_toArray {as : Array α} {a : α} {bs : List α} : as.push a ++ bs.toArray = as ++ (a ::bs).toArray := by - cases as - simp - -@[simp] theorem foldl_push {l : List α} {as : Array α} : l.foldl Array.push as = as ++ l.toArray := by - induction l generalizing as <;> simp [*] - -@[simp] theorem foldr_push {l : List α} {as : Array α} : l.foldr (fun a b => push b a) as = as ++ l.reverse.toArray := by - rw [foldr_eq_foldl_reverse, foldl_push] - -@[simp] theorem findSomeM?_toArray [Monad m] [LawfulMonad m] (f : α → m (Option β)) (l : List α) : - l.toArray.findSomeM? f = l.findSomeM? f := by - rw [Array.findSomeM?] - simp only [bind_pure_comp, map_pure, forIn_toArray] - induction l with - | nil => simp - | cons a l ih => - simp only [forIn_cons, LawfulMonad.bind_assoc, findSomeM?] - congr - ext1 (_|_) <;> simp [ih] - -theorem findSomeRevM?_find_toArray [Monad m] [LawfulMonad m] (f : α → m (Option β)) (l : List α) - (i : Nat) (h) : - findSomeRevM?.find f l.toArray i h = (l.take i).reverse.findSomeM? f := by - induction i generalizing l with - | zero => simp [Array.findSomeRevM?.find.eq_def] - | succ i ih => - rw [size_toArray] at h - rw [Array.findSomeRevM?.find, take_succ, getElem?_eq_getElem (by omega)] - simp only [ih, reverse_append] - congr - ext1 (_|_) <;> simp - --- This is not marked as `@[simp]` as later we simplify all occurrences of `findSomeRevM?`. -theorem findSomeRevM?_toArray [Monad m] [LawfulMonad m] (f : α → m (Option β)) (l : List α) : - l.toArray.findSomeRevM? f = l.reverse.findSomeM? f := by - simp [Array.findSomeRevM?, findSomeRevM?_find_toArray] - --- This is not marked as `@[simp]` as later we simplify all occurrences of `findRevM?`. -theorem findRevM?_toArray [Monad m] [LawfulMonad m] (f : α → m Bool) (l : List α) : - l.toArray.findRevM? f = l.reverse.findM? f := by - rw [Array.findRevM?, findSomeRevM?_toArray, findM?_eq_findSomeM?] - -@[simp] theorem findM?_toArray [Monad m] [LawfulMonad m] (f : α → m Bool) (l : List α) : - l.toArray.findM? f = l.findM? f := by - rw [Array.findM?] - simp only [bind_pure_comp, map_pure, forIn_toArray] - induction l with - | nil => simp - | cons a l ih => - simp only [forIn_cons, LawfulMonad.bind_assoc, findM?] - congr - ext1 (_|_) <;> simp [ih] - -@[simp] theorem findSome?_toArray (f : α → Option β) (l : List α) : - l.toArray.findSome? f = l.findSome? f := by - rw [Array.findSome?, ← findSomeM?_id, findSomeM?_toArray, Id.run] - -@[simp] theorem find?_toArray (f : α → Bool) (l : List α) : - l.toArray.find? f = l.find? f := by - rw [Array.find?] - simp only [Id.run, Id, Id.pure_eq, Id.bind_eq, forIn_toArray] - induction l with - | nil => simp - | cons a l ih => - simp only [forIn_cons, Id.pure_eq, Id.bind_eq, find?] - by_cases f a <;> simp_all - -theorem isPrefixOfAux_toArray_succ [BEq α] (l₁ l₂ : List α) (hle : l₁.length ≤ l₂.length) (i : Nat) : - Array.isPrefixOfAux l₁.toArray l₂.toArray hle (i + 1) = - Array.isPrefixOfAux l₁.tail.toArray l₂.tail.toArray (by simp; omega) i := by - rw [Array.isPrefixOfAux] - conv => rhs; rw [Array.isPrefixOfAux] - simp only [size_toArray, getElem_toArray, Bool.if_false_right, length_tail, getElem_tail] - split <;> rename_i h₁ <;> split <;> rename_i h₂ - · rw [isPrefixOfAux_toArray_succ] - · omega - · omega - · rfl - -theorem isPrefixOfAux_toArray_succ' [BEq α] (l₁ l₂ : List α) (hle : l₁.length ≤ l₂.length) (i : Nat) : - Array.isPrefixOfAux l₁.toArray l₂.toArray hle (i + 1) = - Array.isPrefixOfAux (l₁.drop (i+1)).toArray (l₂.drop (i+1)).toArray (by simp; omega) 0 := by - induction i generalizing l₁ l₂ with - | zero => simp [isPrefixOfAux_toArray_succ] - | succ i ih => - rw [isPrefixOfAux_toArray_succ, ih] - simp - -theorem isPrefixOfAux_toArray_zero [BEq α] (l₁ l₂ : List α) (hle : l₁.length ≤ l₂.length) : - Array.isPrefixOfAux l₁.toArray l₂.toArray hle 0 = - l₁.isPrefixOf l₂ := by - rw [Array.isPrefixOfAux] - match l₁, l₂ with - | [], _ => rw [dif_neg] <;> simp - | _::_, [] => simp at hle - | a::l₁, b::l₂ => - simp [isPrefixOf_cons₂, isPrefixOfAux_toArray_succ', isPrefixOfAux_toArray_zero] - -@[simp] theorem isPrefixOf_toArray [BEq α] (l₁ l₂ : List α) : - l₁.toArray.isPrefixOf l₂.toArray = l₁.isPrefixOf l₂ := by - rw [Array.isPrefixOf] - split <;> rename_i h - · simp [isPrefixOfAux_toArray_zero] - · simp only [Bool.false_eq] - induction l₁ generalizing l₂ with - | nil => simp at h - | cons a l₁ ih => - cases l₂ with - | nil => simp - | cons b l₂ => - simp only [isPrefixOf_cons₂, Bool.and_eq_false_imp] - intro w - rw [ih] - simp_all - -theorem zipWithAux_toArray_succ (as : List α) (bs : List β) (f : α → β → γ) (i : Nat) (cs : Array γ) : - zipWithAux as.toArray bs.toArray f (i + 1) cs = zipWithAux as.tail.toArray bs.tail.toArray f i cs := by - rw [zipWithAux] - conv => rhs; rw [zipWithAux] - simp only [size_toArray, getElem_toArray, length_tail, getElem_tail] - split <;> rename_i h₁ - · split <;> rename_i h₂ - · rw [dif_pos (by omega), dif_pos (by omega), zipWithAux_toArray_succ] - · rw [dif_pos (by omega)] - rw [dif_neg (by omega)] - · rw [dif_neg (by omega)] - -theorem zipWithAux_toArray_succ' (as : List α) (bs : List β) (f : α → β → γ) (i : Nat) (cs : Array γ) : - zipWithAux as.toArray bs.toArray f (i + 1) cs = zipWithAux (as.drop (i+1)).toArray (bs.drop (i+1)).toArray f 0 cs := by - induction i generalizing as bs cs with - | zero => simp [zipWithAux_toArray_succ] - | succ i ih => - rw [zipWithAux_toArray_succ, ih] - simp - -theorem zipWithAux_toArray_zero (f : α → β → γ) (as : List α) (bs : List β) (cs : Array γ) : - zipWithAux as.toArray bs.toArray f 0 cs = cs ++ (List.zipWith f as bs).toArray := by - rw [Array.zipWithAux] - match as, bs with - | [], _ => simp - | _, [] => simp - | a :: as, b :: bs => - simp [zipWith_cons_cons, zipWithAux_toArray_succ', zipWithAux_toArray_zero, push_append_toArray] - -@[simp] theorem zipWith_toArray (as : List α) (bs : List β) (f : α → β → γ) : - Array.zipWith as.toArray bs.toArray f = (List.zipWith f as bs).toArray := by - rw [Array.zipWith] - simp [zipWithAux_toArray_zero] - -@[simp] theorem zip_toArray (as : List α) (bs : List β) : - Array.zip as.toArray bs.toArray = (List.zip as bs).toArray := by - simp [Array.zip, zipWith_toArray, zip] - -theorem zipWithAll_go_toArray (as : List α) (bs : List β) (f : Option α → Option β → γ) (i : Nat) (cs : Array γ) : - zipWithAll.go f as.toArray bs.toArray i cs = cs ++ (List.zipWithAll f (as.drop i) (bs.drop i)).toArray := by - unfold zipWithAll.go - split <;> rename_i h - · rw [zipWithAll_go_toArray] - simp at h - simp only [getElem?_toArray, push_append_toArray] - if ha : i < as.length then - if hb : i < bs.length then - rw [List.drop_eq_getElem_cons ha, List.drop_eq_getElem_cons hb] - simp only [ha, hb, getElem?_eq_getElem, zipWithAll_cons_cons] - else - simp only [Nat.not_lt] at hb - rw [List.drop_eq_getElem_cons ha] - rw [(drop_eq_nil_iff (l := bs)).mpr (by omega), (drop_eq_nil_iff (l := bs)).mpr (by omega)] - simp only [zipWithAll_nil, map_drop, map_cons] - rw [getElem?_eq_getElem ha] - rw [getElem?_eq_none hb] - else - if hb : i < bs.length then - simp only [Nat.not_lt] at ha - rw [List.drop_eq_getElem_cons hb] - rw [(drop_eq_nil_iff (l := as)).mpr (by omega), (drop_eq_nil_iff (l := as)).mpr (by omega)] - simp only [nil_zipWithAll, map_drop, map_cons] - rw [getElem?_eq_getElem hb] - rw [getElem?_eq_none ha] - else - omega - · simp only [size_toArray, Nat.not_lt] at h - rw [drop_eq_nil_of_le (by omega), drop_eq_nil_of_le (by omega)] - simp - termination_by max as.length bs.length - i - decreasing_by simp_wf; decreasing_trivial_pre_omega - -@[simp] theorem zipWithAll_toArray (f : Option α → Option β → γ) (as : List α) (bs : List β) : - Array.zipWithAll as.toArray bs.toArray f = (List.zipWithAll f as bs).toArray := by - simp [Array.zipWithAll, zipWithAll_go_toArray] - -@[simp] theorem toArray_appendList (l₁ l₂ : List α) : - l₁.toArray ++ l₂ = (l₁ ++ l₂).toArray := by - apply ext' - simp - -@[simp] theorem pop_toArray (l : List α) : l.toArray.pop = l.dropLast.toArray := by - apply ext' - simp - -theorem takeWhile_go_succ (p : α → Bool) (a : α) (l : List α) (i : Nat) : - takeWhile.go p (a :: l).toArray (i+1) r = takeWhile.go p l.toArray i r := by - rw [takeWhile.go, takeWhile.go] - simp only [size_toArray, length_cons, Nat.add_lt_add_iff_right, Array.get_eq_getElem, - getElem_toArray, getElem_cons_succ] - split - rw [takeWhile_go_succ] - rfl - -theorem takeWhile_go_toArray (p : α → Bool) (l : List α) (i : Nat) : - Array.takeWhile.go p l.toArray i r = r ++ (takeWhile p (l.drop i)).toArray := by - induction l generalizing i r with - | nil => simp [takeWhile.go] - | cons a l ih => - rw [takeWhile.go] - cases i with - | zero => - simp [takeWhile_go_succ, ih, takeWhile_cons] - split <;> simp - | succ i => - simp only [size_toArray, length_cons, Nat.add_lt_add_iff_right, Array.get_eq_getElem, - getElem_toArray, getElem_cons_succ, drop_succ_cons] - split <;> rename_i h₁ - · rw [takeWhile_go_succ, ih] - rw [← getElem_cons_drop_succ_eq_drop h₁, takeWhile_cons] - split <;> simp_all - · simp_all [drop_eq_nil_of_le] - -@[simp] theorem takeWhile_toArray (p : α → Bool) (l : List α) : - l.toArray.takeWhile p = (l.takeWhile p).toArray := by - simp [Array.takeWhile, takeWhile_go_toArray] - -end List - namespace Array @@ -415,6 +30,12 @@ namespace Array theorem toList_inj {a b : Array α} (h : a.toList = b.toList) : a = b := by cases a; cases b; simpa using h +@[simp] theorem toList_eq_nil_iff (l : Array α) : l.toList = [] ↔ l = #[] := by + cases l <;> simp + +@[simp] theorem mem_toList_iff (a : α) (l : Array α) : a ∈ l.toList ↔ a ∈ l := by + cases l <;> simp + /-! ### empty -/ @[simp] theorem empty_eq {xs : Array α} : #[] = xs ↔ xs = #[] := by @@ -526,38 +147,53 @@ theorem exists_push_of_size_eq_add_one {xs : Array α} (h : xs.size = n + 1) : /-! ## L[i] and L[i]? -/ -@[deprecated List.getElem_toArray (since := "2024-11-29")] -theorem getElem_mk {xs : List α} {i : Nat} (h : i < xs.length) : (Array.mk xs)[i] = xs[i] := rfl - -theorem getElem_eq_getElem_toList {a : Array α} (h : i < a.size) : a[i] = a.toList[i] := rfl +@[simp] theorem getElem?_eq_none_iff {a : Array α} : a[i]? = none ↔ a.size ≤ i := by + by_cases h : i < a.size + · simp [getElem?_pos, h] + · rw [getElem?_neg a i h] + simp_all @[simp] theorem none_eq_getElem?_iff {a : Array α} {i : Nat} : none = a[i]? ↔ a.size ≤ i := by simp [eq_comm (a := none)] -theorem getElem?_eq {a : Array α} {i : Nat} : - a[i]? = if h : i < a.size then some a[i] else none := by - split - · simp_all [getElem?_eq_getElem] - · simp_all +theorem getElem?_eq_none {a : Array α} (h : a.size ≤ i) : a[i]? = none := by + simp [getElem?_eq_none_iff, h] + +@[simp] theorem getElem?_eq_getElem {a : Array α} {i : Nat} (h : i < a.size) : a[i]? = some a[i] := + getElem?_pos .. theorem getElem?_eq_some_iff {a : Array α} : a[i]? = some b ↔ ∃ h : i < a.size, a[i] = b := by - simp [getElem?_eq] + simp [getElem?_def] theorem some_eq_getElem?_iff {a : Array α} : some b = a[i]? ↔ ∃ h : i < a.size, a[i] = b := by rw [eq_comm, getElem?_eq_some_iff] -theorem getElem?_eq_getElem?_toList (a : Array α) (i : Nat) : a[i]? = a.toList[i]? := by - rw [getElem?_eq] - split <;> simp_all +@[simp] theorem some_getElem_eq_getElem?_iff (a : Array α) (i : Nat) (h : i < a.size) : + (some a[i] = a[i]?) ↔ True := by + simp [h] + +@[simp] theorem getElem?_eq_some_getElem_iff (a : Array α) (i : Nat) (h : i < a.size) : + (a[i]? = some a[i]) ↔ True := by + simp [h] + +theorem getElem_eq_iff {a : Array α} {n : Nat} {h : n < a.size} : a[n] = x ↔ a[n]? = some x := by + simp only [getElem?_eq_some_iff] + exact ⟨fun w => ⟨h, w⟩, fun h => h.2⟩ + +theorem getElem_eq_getElem?_get (a : Array α) (i : Nat) (h : i < a.size) : + a[i] = a[i]?.get (by simp [getElem?_eq_getElem, h]) := by + simp [getElem_eq_iff] + +@[simp] theorem getElem?_empty {n : Nat} : (#[] : Array α)[n]? = none := rfl theorem getElem_push_lt (a : Array α) (x : α) (i : Nat) (h : i < a.size) : have : i < (a.push x).size := by simp [*, Nat.lt_succ_of_le, Nat.le_of_lt] (a.push x)[i] = a[i] := by - simp only [push, getElem_eq_getElem_toList, List.concat_eq_append, List.getElem_append_left, h] + simp only [push, ← getElem_toList, List.concat_eq_append, List.getElem_append_left, h] @[simp] theorem getElem_push_eq (a : Array α) (x : α) : (a.push x)[a.size] = x := by - simp only [push, getElem_eq_getElem_toList, List.concat_eq_append] - rw [List.getElem_append_right] <;> simp [getElem_eq_getElem_toList, Nat.zero_lt_one] + simp only [push, ← getElem_toList, List.concat_eq_append] + rw [List.getElem_append_right] <;> simp [← getElem_toList, Nat.zero_lt_one] theorem getElem_push (a : Array α) (x : α) (i : Nat) (h : i < (a.push x).size) : (a.push x)[i] = if h : i < a.size then a[i] else x := by @@ -566,19 +202,141 @@ theorem getElem_push (a : Array α) (x : α) (i : Nat) (h : i < (a.push x).size) · simp at h simp [getElem_push_lt, Nat.le_antisymm (Nat.le_of_lt_succ h) (Nat.ge_of_not_lt h')] -@[deprecated getElem_push (since := "2024-10-21")] abbrev get_push := @getElem_push -@[deprecated getElem_push_lt (since := "2024-10-21")] abbrev get_push_lt := @getElem_push_lt -@[deprecated getElem_push_eq (since := "2024-10-21")] abbrev get_push_eq := @getElem_push_eq +theorem getElem?_push {a : Array α} {x} : (a.push x)[i]? = if i = a.size then some x else a[i]? := by + simp [getElem?_def, getElem_push] + (repeat' split) <;> first | rfl | omega + +@[simp] theorem getElem?_push_size {a : Array α} {x} : (a.push x)[a.size]? = some x := by + simp [getElem?_push] + +@[simp] theorem getElem_singleton (a : α) (h : i < 1) : #[a][i] = a := + match i, h with + | 0, _ => rfl + +theorem getElem?_singleton (a : α) (i : Nat) : #[a][i]? = if i = 0 then some a else none := by + simp [List.getElem?_singleton] + +/-! ### mem -/ + +@[simp] theorem not_mem_empty (a : α) : ¬ a ∈ #[] := nofun @[simp] theorem mem_push {a : Array α} {x y : α} : x ∈ a.push y ↔ x ∈ a ∨ x = y := by - simp [mem_def] + simp only [mem_def] + simp theorem mem_push_self {a : Array α} {x : α} : x ∈ a.push x := mem_push.2 (Or.inr rfl) +theorem eq_push_append_of_mem {xs : Array α} {x : α} (h : x ∈ xs) : + ∃ (as bs : Array α), xs = as.push x ++ bs ∧ x ∉ as:= by + rcases xs with ⟨xs⟩ + obtain ⟨as, bs, h, w⟩ := List.eq_append_cons_of_mem (mem_def.1 h) + simp only at h + obtain rfl := h + exact ⟨as.toArray, bs.toArray, by simp, by simpa using w⟩ + theorem mem_push_of_mem {a : Array α} {x : α} (y : α) (h : x ∈ a) : x ∈ a.push y := mem_push.2 (Or.inl h) +theorem exists_mem_of_ne_empty (l : Array α) (h : l ≠ #[]) : ∃ x, x ∈ l := by + simpa using List.exists_mem_of_ne_nil l.toList (by simpa using h) + +theorem eq_empty_iff_forall_not_mem {l : Array α} : l = #[] ↔ ∀ a, a ∉ l := by + cases l + simp [List.eq_nil_iff_forall_not_mem] + +@[simp] theorem mem_dite_nil_left {x : α} [Decidable p] {l : ¬ p → Array α} : + (x ∈ if h : p then #[] else l h) ↔ ∃ h : ¬ p, x ∈ l h := by + split <;> simp_all + +@[simp] theorem mem_dite_nil_right {x : α} [Decidable p] {l : p → Array α} : + (x ∈ if h : p then l h else #[]) ↔ ∃ h : p, x ∈ l h := by + split <;> simp_all + +@[simp] theorem mem_ite_nil_left {x : α} [Decidable p] {l : Array α} : + (x ∈ if p then #[] else l) ↔ ¬ p ∧ x ∈ l := by + split <;> simp_all + +@[simp] theorem mem_ite_nil_right {x : α} [Decidable p] {l : Array α} : + (x ∈ if p then l else #[]) ↔ p ∧ x ∈ l := by + split <;> simp_all + +theorem eq_of_mem_singleton (h : a ∈ #[b]) : a = b := by + simpa using h + +@[simp] theorem mem_singleton {a b : α} : a ∈ #[b] ↔ a = b := + ⟨eq_of_mem_singleton, (by simp [·])⟩ + +theorem forall_mem_push {p : α → Prop} {xs : Array α} {a : α} : + (∀ x, x ∈ xs.push a → p x) ↔ p a ∧ ∀ x, x ∈ xs → p x := by + cases xs + simp [or_comm, forall_eq_or_imp] + +theorem forall_mem_ne {a : α} {l : Array α} : (∀ a' : α, a' ∈ l → ¬a = a') ↔ a ∉ l := + ⟨fun h m => h _ m rfl, fun h _ m e => h (e.symm ▸ m)⟩ + +theorem forall_mem_ne' {a : α} {l : Array α} : (∀ a' : α, a' ∈ l → ¬a' = a) ↔ a ∉ l := + ⟨fun h m => h _ m rfl, fun h _ m e => h (e.symm ▸ m)⟩ + +theorem exists_mem_empty (p : α → Prop) : ¬ (∃ x, ∃ _ : x ∈ #[], p x) := nofun + +theorem forall_mem_empty (p : α → Prop) : ∀ (x) (_ : x ∈ #[]), p x := nofun + +theorem exists_mem_push {p : α → Prop} {a : α} {xs : Array α} : + (∃ x, ∃ _ : x ∈ xs.push a, p x) ↔ p a ∨ ∃ x, ∃ _ : x ∈ xs, p x := by + simp + constructor + · rintro ⟨x, (h | rfl), h'⟩ + · exact .inr ⟨x, h, h'⟩ + · exact .inl h' + · rintro (h | ⟨x, h, h'⟩) + · exact ⟨a, by simp, h⟩ + · exact ⟨x, .inl h, h'⟩ + +theorem forall_mem_singleton {p : α → Prop} {a : α} : (∀ (x) (_ : x ∈ #[a]), p x) ↔ p a := by + simp only [mem_singleton, forall_eq] + +theorem mem_empty_iff (a : α) : a ∈ (#[] : Array α) ↔ False := by simp + +theorem mem_singleton_self (a : α) : a ∈ #[a] := by simp + +theorem mem_of_mem_push_of_mem {a b : α} {l : Array α} : a ∈ l.push b → b ∈ l → a ∈ l := by + cases l + simp only [List.push_toArray, mem_toArray, List.mem_append, List.mem_singleton] + rintro (h | rfl) + · intro _ + exact h + · exact id + +theorem eq_or_ne_mem_of_mem {a b : α} {l : Array α} (h' : a ∈ l.push b) : + a = b ∨ (a ≠ b ∧ a ∈ l) := by + if h : a = b then + exact .inl h + else + simp [h] at h' + exact .inr ⟨h, h'⟩ + +theorem ne_empty_of_mem {a : α} {l : Array α} (h : a ∈ l) : l ≠ #[] := by + cases l + simp [List.ne_nil_of_mem (by simpa using h)] + +theorem mem_of_ne_of_mem {a y : α} {l : Array α} (h₁ : a ≠ y) (h₂ : a ∈ l.push y) : a ∈ l := by + simpa [h₁] using h₂ + +theorem ne_of_not_mem_push {a b : α} {l : Array α} (h : a ∉ l.push b) : a ≠ b := by + simp only [mem_push, not_or] at h + exact h.2 + +theorem not_mem_of_not_mem_push {a b : α} {l : Array α} (h : a ∉ l.push b) : a ∉ l := by + simp only [mem_push, not_or] at h + exact h.1 + +theorem not_mem_push_of_ne_of_not_mem {a y : α} {l : Array α} : a ≠ y → a ∉ l → a ∉ l.push y := + mt ∘ mem_of_ne_of_mem + +theorem ne_and_not_mem_of_not_mem_push {a y : α} {l : Array α} : a ∉ l.push y → a ≠ y ∧ a ∉ l := by + simp +contextual + theorem getElem_of_mem {a} {l : Array α} (h : a ∈ l) : ∃ (n : Nat) (h : n < l.size), l[n]'h = a := by cases l simp [List.getElem_of_mem (by simpa using h)] @@ -599,6 +357,150 @@ theorem forall_getElem {l : Array α} {p : α → Prop} : (∀ (n : Nat) h, p (l[n]'h)) ↔ ∀ a, a ∈ l → p a := by cases l; simp [List.forall_getElem] +/-! ### isEmpty-/ + +@[simp] theorem isEmpty_toList {l : Array α} : l.toList.isEmpty = l.isEmpty := by + rcases l with ⟨_ | _⟩ <;> simp + +theorem isEmpty_iff {l : Array α} : l.isEmpty ↔ l = #[] := by + cases l <;> simp + +theorem isEmpty_eq_false_iff_exists_mem {xs : Array α} : + xs.isEmpty = false ↔ ∃ x, x ∈ xs := by + cases xs + simpa using List.isEmpty_eq_false_iff_exists_mem + +theorem isEmpty_iff_size_eq_zero {l : Array α} : l.isEmpty ↔ l.size = 0 := by + rw [isEmpty_iff, size_eq_zero] + +@[simp] theorem isEmpty_eq_true {l : Array α} : l.isEmpty ↔ l = #[] := by + cases l <;> simp + +@[simp] theorem isEmpty_eq_false {l : Array α} : l.isEmpty = false ↔ l ≠ #[] := by + cases l <;> simp + +/-! ### any / all -/ + +theorem anyM_eq_anyM_loop [Monad m] (p : α → m Bool) (as : Array α) (start stop) : + anyM p as start stop = anyM.loop p as (min stop as.size) (Nat.min_le_right ..) start := by + simp only [anyM, Nat.min_def]; split <;> rfl + +theorem anyM_stop_le_start [Monad m] (p : α → m Bool) (as : Array α) (start stop) + (h : min stop as.size ≤ start) : anyM p as start stop = pure false := by + rw [anyM_eq_anyM_loop, anyM.loop, dif_neg (Nat.not_lt.2 h)] + +theorem anyM_loop_cons [Monad m] (p : α → m Bool) (a : α) (as : List α) (stop start : Nat) (h : stop + 1 ≤ (a :: as).length) : + anyM.loop p ⟨a :: as⟩ (stop + 1) h (start + 1) = anyM.loop p ⟨as⟩ stop (by simpa using h) start := by + rw [anyM.loop] + conv => rhs; rw [anyM.loop] + split <;> rename_i h' + · simp only [Nat.add_lt_add_iff_right] at h' + rw [dif_pos h'] + rw [anyM_loop_cons] + simp + · rw [dif_neg] + omega + +@[simp] theorem anyM_toList [Monad m] (p : α → m Bool) (as : Array α) : + as.toList.anyM p = as.anyM p := + match as with + | ⟨[]⟩ => rfl + | ⟨a :: as⟩ => by + simp only [List.anyM, anyM, size_toArray, List.length_cons, Nat.le_refl, ↓reduceDIte] + rw [anyM.loop, dif_pos (by omega)] + congr 1 + funext b + split + · simp + · simp only [Bool.false_eq_true, ↓reduceIte] + rw [anyM_loop_cons] + simpa [anyM] using anyM_toList p ⟨as⟩ + +-- Auxiliary for `any_iff_exists`. +theorem anyM_loop_iff_exists {p : α → Bool} {as : Array α} {start stop} (h : stop ≤ as.size) : + anyM.loop (m := Id) p as stop h start = true ↔ + ∃ (i : Nat) (_ : i < as.size), start ≤ i ∧ i < stop ∧ p as[i] = true := by + unfold anyM.loop + split <;> rename_i h₁ + · dsimp + split <;> rename_i h₂ + · simp only [true_iff] + refine ⟨start, by omega, by omega, by omega, h₂⟩ + · rw [anyM_loop_iff_exists] + constructor + · rintro ⟨i, hi, ge, lt, h⟩ + have : start ≠ i := by rintro rfl; omega + exact ⟨i, by omega, by omega, lt, h⟩ + · rintro ⟨i, hi, ge, lt, h⟩ + have : start ≠ i := by rintro rfl; erw [h] at h₂; simp_all + exact ⟨i, by omega, by omega, lt, h⟩ + · simp + omega +termination_by stop - start + +-- This could also be proved from `SatisfiesM_anyM_iff_exists` in `Batteries.Data.Array.Init.Monadic` +theorem any_iff_exists {p : α → Bool} {as : Array α} {start stop} : + as.any p start stop ↔ ∃ (i : Nat) (_ : i < as.size), start ≤ i ∧ i < stop ∧ p as[i] := by + dsimp [any, anyM, Id.run] + split + · rw [anyM_loop_iff_exists] + · rw [anyM_loop_iff_exists] + constructor + · rintro ⟨i, hi, ge, _, h⟩ + exact ⟨i, by omega, by omega, by omega, h⟩ + · rintro ⟨i, hi, ge, _, h⟩ + exact ⟨i, by omega, by omega, by omega, h⟩ + +theorem any_eq_true {p : α → Bool} {as : Array α} : + as.any p ↔ ∃ (i : Nat) (_ : i < as.size), p as[i] := by + simp [any_iff_exists] + +theorem any_toList {p : α → Bool} (as : Array α) : as.toList.any p = as.any p := by + rw [Bool.eq_iff_iff, any_eq_true, List.any_eq_true] + simp only [List.mem_iff_getElem, getElem_toList] + exact ⟨fun ⟨_, ⟨i, w, rfl⟩, h⟩ => ⟨i, w, h⟩, fun ⟨i, w, h⟩ => ⟨_, ⟨i, w, rfl⟩, h⟩⟩ + +theorem allM_eq_not_anyM_not [Monad m] [LawfulMonad m] (p : α → m Bool) (as : Array α) : + allM p as = (! ·) <$> anyM ((! ·) <$> p ·) as := by + dsimp [allM, anyM] + simp + +@[simp] theorem allM_toList [Monad m] [LawfulMonad m] (p : α → m Bool) (as : Array α) : + as.toList.allM p = as.allM p := by + rw [allM_eq_not_anyM_not] + rw [← anyM_toList] + rw [List.allM_eq_not_anyM_not] + +theorem all_eq_not_any_not (p : α → Bool) (as : Array α) (start stop) : + as.all p start stop = !(as.any (!p ·) start stop) := by + dsimp [all, allM] + rfl + +theorem all_iff_forall {p : α → Bool} {as : Array α} {start stop} : + as.all p start stop ↔ ∀ (i : Nat) (_ : i < as.size), start ≤ i ∧ i < stop → p as[i] := by + rw [all_eq_not_any_not] + suffices ¬(as.any (!p ·) start stop = true) ↔ + ∀ (i : Nat) (_ : i < as.size), start ≤ i ∧ i < stop → p as[i] by + simp_all + simp only [any_iff_exists, Bool.not_eq_eq_eq_not, Bool.not_true, not_exists, not_and, + Bool.not_eq_false, and_imp] + +theorem all_eq_true {p : α → Bool} {as : Array α} : + as.all p ↔ ∀ (i : Nat) (_ : i < as.size), p as[i] := by + simp [all_iff_forall] + +theorem all_toList {p : α → Bool} (as : Array α) : as.toList.all p = as.all p := by + rw [Bool.eq_iff_iff, all_eq_true, List.all_eq_true] + simp only [List.mem_iff_getElem, getElem_toList] + constructor + · intro w i h + exact w as[i] ⟨i, h, getElem_toList h⟩ + · rintro w x ⟨i, h, rfl⟩ + exact w i h + +theorem all_eq_true_iff_forall_mem {l : Array α} : l.all p ↔ ∀ x, x ∈ l → p x := by + simp only [← all_toList, List.all_eq_true, mem_def] + theorem singleton_inj : #[a] = #[b] ↔ a = b := by simp @@ -617,8 +519,6 @@ theorem singleton_eq_toArray_singleton (a : α) : #[a] = [a].toArray := rfl @[simp] theorem size_mk (as : List α) : (Array.mk as).size = as.length := by simp [size] -@[simp] theorem isEmpty_toList {l : Array α} : l.toList.isEmpty = l.isEmpty := by - rcases l with ⟨_ | _⟩ <;> simp theorem foldrM_push [Monad m] (f : α → β → m β) (init : β) (arr : Array α) (a : α) : (arr.push a).foldrM f init = f a init >>= arr.foldrM f := by @@ -702,16 +602,6 @@ theorem foldl_toList_eq_map (l : List α) (acc : Array β) (G : α → β) : (l.foldl (fun acc a => acc.push (G a)) acc).toList = acc.toList ++ l.map G := by induction l generalizing acc <;> simp [*] -theorem anyM_eq_anyM_loop [Monad m] (p : α → m Bool) (as : Array α) (start stop) : - anyM p as start stop = anyM.loop p as (min stop as.size) (Nat.min_le_right ..) start := by - simp only [anyM, Nat.min_def]; split <;> rfl - -theorem anyM_stop_le_start [Monad m] (p : α → m Bool) (as : Array α) (start stop) - (h : min stop as.size ≤ start) : anyM p as start stop = pure false := by - rw [anyM_eq_anyM_loop, anyM.loop, dif_neg (Nat.not_lt.2 h)] - -@[simp] theorem not_mem_empty (a : α) : ¬(a ∈ #[]) := by - simp [mem_def] /-! # uset -/ @@ -755,12 +645,14 @@ theorem get!_eq_getD [Inhabited α] (a : Array α) : a.get! n = a.getD n default @[simp] theorem getElem_set_eq (a : Array α) (i : Nat) (h : i < a.size) (v : α) {j : Nat} (eq : i = j) (p : j < (a.set i v).size) : (a.set i v)[j]'p = v := by - simp [set, getElem_eq_getElem_toList, ←eq] + cases a + simp + simp [set, ← getElem_toList, ←eq] @[simp] theorem getElem_set_ne (a : Array α) (i : Nat) (h' : i < a.size) (v : α) {j : Nat} (pj : j < (a.set i v).size) (h : i ≠ j) : (a.set i v)[j]'pj = a[j]'(size_set a i v _ ▸ pj) := by - simp only [set, getElem_eq_getElem_toList, List.getElem_set_ne h] + simp only [set, ← getElem_toList, List.getElem_set_ne h] theorem getElem_set (a : Array α) (i : Nat) (h' : i < a.size) (v : α) (j : Nat) (h : j < (a.set i v).size) : @@ -785,11 +677,26 @@ theorem getElem_set (a : Array α) (i : Nat) (h' : i < a.size) (v : α) (j : Nat else simp [setIfInBounds, h] +theorem getElem_setIfInBounds (a : Array α) (i : Nat) (v : α) (j : Nat) + (hj : j < (setIfInBounds a i v).size) : + (setIfInBounds a i v)[j]'hj = if i = j then v else a[j]'(by simpa using hj) := by + simp only [setIfInBounds] + split + · simp [getElem_set] + · simp only [size_setIfInBounds] at hj + rw [if_neg] + omega + @[simp] theorem getElem_setIfInBounds_eq (a : Array α) {i : Nat} (v : α) (h : _) : (setIfInBounds a i v)[i]'h = v := by simp at h simp only [setIfInBounds, h, ↓reduceDIte, getElem_set_eq] +@[simp] theorem getElem_setIfInBounds_ne (a : Array α) {i : Nat} (v : α) {j : Nat} + (hj : j < (setIfInBounds a i v).size) (h : i ≠ j) : + (setIfInBounds a i v)[j]'hj = a[j]'(by simpa using hj) := by + simp [getElem_setIfInBounds, h] + @[simp] theorem getElem?_setIfInBounds_eq (a : Array α) {i : Nat} (p : i < a.size) (v : α) : (a.setIfInBounds i v)[i]? = some v := by @@ -867,7 +774,7 @@ theorem ofFn_succ (f : Fin (n+1) → α) : theorem mkArray_eq_toArray_replicate (n : Nat) (v : α) : mkArray n v = (List.replicate n v).toArray := rfl @[simp] theorem getElem_mkArray (n : Nat) (v : α) (h : i < (mkArray n v).size) : - (mkArray n v)[i] = v := by simp [Array.getElem_eq_getElem_toList] + (mkArray n v)[i] = v := by simp [← getElem_toList] theorem getElem?_mkArray (n : Nat) (v : α) (i : Nat) : (mkArray n v)[i]? = if i < n then some v else none := by @@ -912,19 +819,19 @@ theorem getElem?_size_le (a : Array α) (i : Nat) (h : a.size ≤ i) : a[i]? = n @[deprecated getElem?_size_le (since := "2024-10-21")] abbrev get?_len_le := @getElem?_size_le theorem getElem_mem_toList (a : Array α) (h : i < a.size) : a[i] ∈ a.toList := by - simp only [getElem_eq_getElem_toList, List.getElem_mem] + simp only [← getElem_toList, List.getElem_mem] theorem get?_eq_get?_toList (a : Array α) (i : Nat) : a.get? i = a.toList.get? i := by - simp [getElem?_eq_getElem?_toList] + simp [← getElem?_toList] theorem get!_eq_get? [Inhabited α] (a : Array α) : a.get! n = (a.get? n).getD default := by simp only [get!_eq_getElem?, get?_eq_getElem?] theorem back!_eq_back? [Inhabited α] (a : Array α) : a.back! = a.back?.getD default := by - simp only [back!, get!_eq_getElem?, get?_eq_getElem?, back?] + simp [back!, back?, getElem!_def, Option.getD]; rfl @[simp] theorem back?_push (a : Array α) : (a.push x).back? = some x := by - simp [back?, getElem?_eq_getElem?_toList] + simp [back?, ← getElem?_toList] @[simp] theorem back!_push [Inhabited α] (a : Array α) : (a.push x).back! = x := by simp [back!_eq_back?] @@ -944,21 +851,6 @@ theorem getElem?_push_eq (a : Array α) (x : α) : (a.push x)[a.size]? = some x @[deprecated getElem?_push_eq (since := "2024-10-21")] abbrev get?_push_eq := @getElem?_push_eq -theorem getElem?_push {a : Array α} : (a.push x)[i]? = if i = a.size then some x else a[i]? := by - match Nat.lt_trichotomy i a.size with - | Or.inl g => - have h1 : i < a.size + 1 := by omega - have h2 : i ≠ a.size := by omega - simp [getElem?_def, size_push, g, h1, h2, getElem_push_lt] - | Or.inr (Or.inl heq) => - simp [heq, getElem?_pos, getElem_push_eq] - | Or.inr (Or.inr g) => - simp only [getElem?_def, size_push] - have h1 : ¬ (i < a.size) := by omega - have h2 : ¬ (i < a.size + 1) := by omega - have h3 : i ≠ a.size := by omega - simp [h1, h2, h3] - @[deprecated getElem?_push (since := "2024-10-21")] abbrev get?_push := @getElem?_push @[simp] theorem getElem?_size {a : Array α} : a[a.size]? = none := by @@ -970,7 +862,7 @@ theorem getElem?_push {a : Array α} : (a.push x)[i]? = if i = a.size then some theorem get_set_eq (a : Array α) (i : Nat) (v : α) (h : i < a.size) : (a.set i v h)[i]'(by simp [h]) = v := by - simp only [set, getElem_eq_getElem_toList, List.getElem_set_self] + simp only [set, ← getElem_toList, List.getElem_set_self] theorem get?_set_eq (a : Array α) (i : Nat) (v : α) (h : i < a.size) : (a.set i v)[i]? = v := by simp [getElem?_pos, h] @@ -989,12 +881,7 @@ theorem get_set (a : Array α) (i : Nat) (hi : i < a.size) (j : Nat) (hj : j < a @[simp] theorem get_set_ne (a : Array α) (i : Nat) (hi : i < a.size) {j : Nat} (v : α) (hj : j < a.size) (h : i ≠ j) : (a.set i v)[j]'(by simp [*]) = a[j] := by - simp only [set, getElem_eq_getElem_toList, List.getElem_set_ne h] - -theorem getElem_setIfInBounds (a : Array α) (i : Nat) (v : α) (h : i < (setIfInBounds a i v).size) : - (setIfInBounds a i v)[i] = v := by - simp at h - simp only [setIfInBounds, h, ↓reduceDIte, getElem_set_eq] + simp only [set, ← getElem_toList, List.getElem_set_ne h] theorem set_set (a : Array α) (i : Nat) (h) (v v' : α) : (a.set i v h).set i v' (by simp [h]) = a.set i v' := by simp [set, List.set_set] @@ -1049,7 +936,9 @@ theorem eq_push_pop_back!_of_size_ne_zero [Inhabited α] {as : Array α} (h : as else have heq : i = as.pop.size := Nat.le_antisymm (size_pop .. ▸ Nat.le_pred_of_lt h) (Nat.le_of_not_gt hlt) - cases heq; rw [getElem_push_eq, back!, ←size_pop, get!_eq_getD, getD, dif_pos h]; rfl + cases heq + rw [getElem_push_eq, back!] + simp [← getElem!_pos] theorem eq_push_of_size_ne_zero {as : Array α} (h : as.size ≠ 0) : ∃ (bs : Array α) (c : α), as = bs.push c := @@ -1080,23 +969,23 @@ theorem size_eq_length_toList (as : Array α) : as.size = as.toList.length := rf @[simp] theorem getElem_range {n : Nat} {x : Nat} (h : x < (Array.range n).size) : (Array.range n)[x] = x := by - simp [getElem_eq_getElem_toList] + simp [← getElem_toList] @[simp] theorem toList_reverse (a : Array α) : a.reverse.toList = a.toList.reverse := by let rec go (as : Array α) (i j hj) (h : i + j + 1 = a.size) (h₂ : as.size = a.size) (H : ∀ k, as.toList[k]? = if i ≤ k ∧ k ≤ j then a.toList[k]? else a.toList.reverse[k]?) (k : Nat) : (reverse.loop as i ⟨j, hj⟩).toList[k]? = a.toList.reverse[k]? := by - rw [reverse.loop]; dsimp; split <;> rename_i h₁ + rw [reverse.loop]; dsimp only; split <;> rename_i h₁ · match j with | j+1 => ?_ simp only [Nat.add_sub_cancel] rw [(go · (i+1) j)] · rwa [Nat.add_right_comm i] · simp [size_swap, h₂] · intro k - rw [← getElem?_eq_getElem?_toList, getElem?_swap] - simp only [H, getElem_eq_getElem_toList, ← List.getElem?_eq_getElem, Nat.le_of_lt h₁, - getElem?_eq_getElem?_toList] + rw [getElem?_toList, getElem?_swap] + simp only [H, ← getElem_toList, ← List.getElem?_eq_getElem, Nat.le_of_lt h₁, + ← getElem?_toList] split <;> rename_i h₂ · simp only [← h₂, Nat.not_le.2 (Nat.lt_succ_self _), Nat.le_refl, and_false] exact (List.getElem?_reverse' (j+1) i (Eq.trans (by simp_arith) h)).symm @@ -1523,7 +1412,7 @@ theorem getElem_append {as bs : Array α} (h : i < (as ++ bs).size) : theorem getElem_append_left {as bs : Array α} {h : i < (as ++ bs).size} (hlt : i < as.size) : (as ++ bs)[i] = as[i] := by - simp only [getElem_eq_getElem_toList] + simp only [← getElem_toList] have h' : i < (as.toList ++ bs.toList).length := by rwa [← length_toList, toList_append] at h conv => rhs; rw [← List.getElem_append_left (bs := bs.toList) (h' := h')] apply List.get_of_eq; rw [toList_append] @@ -1531,7 +1420,7 @@ theorem getElem_append_left {as bs : Array α} {h : i < (as ++ bs).size} (hlt : theorem getElem_append_right {as bs : Array α} {h : i < (as ++ bs).size} (hle : as.size ≤ i) (hlt : i - as.size < bs.size := Nat.sub_lt_left_of_lt_add hle (size_append .. ▸ h)) : (as ++ bs)[i] = bs[i - as.size] := by - simp only [getElem_eq_getElem_toList] + simp only [← getElem_toList] have h' : i < (as.toList ++ bs.toList).length := by rwa [← length_toList, toList_append] at h conv => rhs; rw [← List.getElem_append_right (h₁ := hle) (h₂ := h')] apply List.get_of_eq; rw [toList_append] @@ -1738,119 +1627,6 @@ theorem extract_empty_of_size_le_start (as : Array α) {start stop : Nat} (h : a @[simp] theorem extract_empty (start stop : Nat) : (#[] : Array α).extract start stop = #[] := extract_empty_of_size_le_start _ (Nat.zero_le _) -/-! ### any -/ - -theorem anyM_loop_cons [Monad m] (p : α → m Bool) (a : α) (as : List α) (stop start : Nat) (h : stop + 1 ≤ (a :: as).length) : - anyM.loop p ⟨a :: as⟩ (stop + 1) h (start + 1) = anyM.loop p ⟨as⟩ stop (by simpa using h) start := by - rw [anyM.loop] - conv => rhs; rw [anyM.loop] - split <;> rename_i h' - · simp only [Nat.add_lt_add_iff_right] at h' - rw [dif_pos h'] - rw [anyM_loop_cons] - simp - · rw [dif_neg] - omega - -@[simp] theorem anyM_toList [Monad m] (p : α → m Bool) (as : Array α) : - as.toList.anyM p = as.anyM p := - match as with - | ⟨[]⟩ => rfl - | ⟨a :: as⟩ => by - simp only [List.anyM, anyM, size_toArray, List.length_cons, Nat.le_refl, ↓reduceDIte] - rw [anyM.loop, dif_pos (by omega)] - congr 1 - funext b - split - · simp - · simp only [Bool.false_eq_true, ↓reduceIte] - rw [anyM_loop_cons] - simpa [anyM] using anyM_toList p ⟨as⟩ - --- Auxiliary for `any_iff_exists`. -theorem anyM_loop_iff_exists {p : α → Bool} {as : Array α} {start stop} (h : stop ≤ as.size) : - anyM.loop (m := Id) p as stop h start = true ↔ - ∃ i : Fin as.size, start ≤ ↑i ∧ ↑i < stop ∧ p as[i] = true := by - unfold anyM.loop - split <;> rename_i h₁ - · dsimp - split <;> rename_i h₂ - · simp only [true_iff] - refine ⟨⟨start, by omega⟩, by dsimp; omega, by dsimp; omega, h₂⟩ - · rw [anyM_loop_iff_exists] - constructor - · rintro ⟨i, ge, lt, h⟩ - have : start ≠ i := by rintro rfl; omega - exact ⟨i, by omega, lt, h⟩ - · rintro ⟨i, ge, lt, h⟩ - have : start ≠ i := by rintro rfl; erw [h] at h₂; simp_all - exact ⟨i, by omega, lt, h⟩ - · simp - omega -termination_by stop - start - --- This could also be proved from `SatisfiesM_anyM_iff_exists` in `Batteries.Data.Array.Init.Monadic` -theorem any_iff_exists {p : α → Bool} {as : Array α} {start stop} : - as.any p start stop ↔ ∃ i : Fin as.size, start ≤ i.1 ∧ i.1 < stop ∧ p as[i] := by - dsimp [any, anyM, Id.run] - split - · rw [anyM_loop_iff_exists]; rfl - · rw [anyM_loop_iff_exists] - constructor - · rintro ⟨i, ge, _, h⟩ - exact ⟨i, by omega, by omega, h⟩ - · rintro ⟨i, ge, _, h⟩ - exact ⟨i, by omega, by omega, h⟩ - -theorem any_eq_true {p : α → Bool} {as : Array α} : - as.any p ↔ ∃ i : Fin as.size, p as[i] := by simp [any_iff_exists, Fin.isLt] - -theorem any_toList {p : α → Bool} (as : Array α) : as.toList.any p = as.any p := by - rw [Bool.eq_iff_iff, any_eq_true, List.any_eq_true]; simp only [List.mem_iff_get] - exact ⟨fun ⟨_, ⟨i, rfl⟩, h⟩ => ⟨i, h⟩, fun ⟨i, h⟩ => ⟨_, ⟨i, rfl⟩, h⟩⟩ - -/-! ### all -/ - -theorem allM_eq_not_anyM_not [Monad m] [LawfulMonad m] (p : α → m Bool) (as : Array α) : - allM p as = (! ·) <$> anyM ((! ·) <$> p ·) as := by - dsimp [allM, anyM] - simp - -@[simp] theorem allM_toList [Monad m] [LawfulMonad m] (p : α → m Bool) (as : Array α) : - as.toList.allM p = as.allM p := by - rw [allM_eq_not_anyM_not] - rw [← anyM_toList] - rw [List.allM_eq_not_anyM_not] - -theorem all_eq_not_any_not (p : α → Bool) (as : Array α) (start stop) : - as.all p start stop = !(as.any (!p ·) start stop) := by - dsimp [all, allM] - rfl - -theorem all_iff_forall {p : α → Bool} {as : Array α} {start stop} : - as.all p start stop ↔ ∀ i : Fin as.size, start ≤ i.1 ∧ i.1 < stop → p as[i] := by - rw [all_eq_not_any_not] - suffices ¬(as.any (!p ·) start stop = true) ↔ - ∀ i : Fin as.size, start ≤ i.1 ∧ i.1 < stop → p as[i] by - simp_all - rw [any_iff_exists] - simp - -theorem all_eq_true {p : α → Bool} {as : Array α} : as.all p ↔ ∀ i : Fin as.size, p as[i] := by - simp [all_iff_forall, Fin.isLt] - -theorem all_toList {p : α → Bool} (as : Array α) : as.toList.all p = as.all p := by - rw [Bool.eq_iff_iff, all_eq_true, List.all_eq_true]; simp only [List.mem_iff_getElem] - constructor - · intro w i - exact w as[i] ⟨i, i.2, (getElem_eq_getElem_toList i.2).symm⟩ - · rintro w x ⟨r, h, rfl⟩ - rw [← getElem_eq_getElem_toList] - exact w ⟨r, h⟩ - -theorem all_eq_true_iff_forall_mem {l : Array α} : l.all p ↔ ∀ x, x ∈ l → p x := by - simp only [← all_toList, List.all_eq_true, mem_def] - /-! ### contains -/ theorem contains_def [DecidableEq α] {a : α} {as : Array α} : as.contains a ↔ a ∈ as := by @@ -1861,8 +1637,6 @@ instance [DecidableEq α] (a : α) (as : Array α) : Decidable (a ∈ as) := /-! ### swap -/ -open Fin - @[simp] theorem getElem_swap_right (a : Array α) {i j : Nat} {hi hj} : (a.swap i j hi hj)[j]'(by simpa using hj) = a[i] := by simp [swap_def, getElem_set] @@ -1881,7 +1655,7 @@ theorem getElem_swap' (a : Array α) (i j : Nat) {hi hj} (k : Nat) (hk : k < a.s · simp_all only [getElem_swap_left] · split <;> simp_all -theorem getElem_swap (a : Array α) (i j : Nat) {hi hj}(k : Nat) (hk : k < (a.swap i j).size) : +theorem getElem_swap (a : Array α) (i j : Nat) {hi hj} (k : Nat) (hk : k < (a.swap i j).size) : (a.swap i j hi hj)[k] = if k = i then a[j] else if k = j then a[i] else a[k]'(by simp_all) := by apply getElem_swap' @@ -1944,6 +1718,13 @@ theorem eraseIdx_eq_eraseIdxIfInBounds {a : Array α} {i : Nat} (h : i < a.size) (as.zip bs).size = min as.size bs.size := as.size_zipWith bs Prod.mk +@[simp] theorem getElem_zipWith (as : Array α) (bs : Array β) (f : α → β → γ) (i : Nat) + (hi : i < (as.zipWith bs f).size) : + (as.zipWith bs f)[i] = f (as[i]'(by simp at hi; omega)) (bs[i]'(by simp at hi; omega)) := by + cases as + cases bs + simp + /-! ### findSomeM?, findM?, findSome?, find? -/ @[simp] theorem findSomeM?_toList [Monad m] [LawfulMonad m] (p : α → m (Option β)) (as : Array α) : @@ -2003,11 +1784,6 @@ Our goal is to have `simp` "pull `List.toArray` outwards" as much as possible. apply ext' simp -@[simp] theorem set_toArray (l : List α) (i : Fin l.toArray.size) (a : α) : - l.toArray.set i a = (l.set i a).toArray := by - apply ext' - simp - @[simp] theorem uset_toArray (l : List α) (i : USize) (a : α) (h : i.toNat < l.toArray.size) : l.toArray.uset i a h = (l.set i.toNat a).toArray := by apply ext' @@ -2244,6 +2020,11 @@ theorem foldr_map' (g : α → β) (f : α → α → α) (f' : β → β → β cases as simp +@[simp] theorem getElem_reverse (as : Array α) (i : Nat) (hi : i < as.reverse.size) : + (as.reverse)[i] = as[as.size - 1 - i]'(by simp at hi; omega) := by + cases as + simp [Array.getElem_reverse] + /-! ### findSomeRevM?, findRevM?, findSomeRev?, findRev? -/ @[simp] theorem findSomeRevM?_eq_findSomeM?_reverse @@ -2335,15 +2116,6 @@ end Array namespace List -@[deprecated toArray_toList (since := "2024-09-09")] -abbrev toArray_data := @toArray_toList - -@[deprecated "Use the reverse direction of `List.push_toArray`." (since := "2024-09-27")] -theorem toArray_concat {as : List α} {x : α} : - (as ++ [x]).toArray = as.toArray.push x := by - apply ext' - simp - @[deprecated back!_toArray (since := "2024-10-31")] abbrev back_toArray := @back!_toArray @[deprecated setIfInBounds_toArray (since := "2024-11-24")] abbrev setD_toArray := @setIfInBounds_toArray @@ -2352,141 +2124,29 @@ end List namespace Array -@[deprecated getElem_eq_getElem_toList (since := "2024-09-25")] -abbrev getElem_eq_toList_getElem := @getElem_eq_getElem_toList - -@[deprecated getElem_eq_toList_getElem (since := "2024-09-09")] -abbrev getElem_eq_data_getElem := @getElem_eq_getElem_toList - -@[deprecated getElem_eq_toList_getElem (since := "2024-06-12")] -theorem getElem_eq_toList_get (a : Array α) (h : i < a.size) : a[i] = a.toList.get ⟨i, h⟩ := by - simp - -@[deprecated toArray_toList (since := "2024-09-09")] -abbrev toArray_data := @toArray_toList - -@[deprecated length_toList (since := "2024-09-09")] -abbrev data_length := @length_toList - -@[deprecated toList_map (since := "2024-09-09")] -abbrev map_data := @toList_map - @[deprecated foldl_toList_eq_flatMap (since := "2024-10-16")] abbrev foldl_toList_eq_bind := @foldl_toList_eq_flatMap @[deprecated foldl_toList_eq_flatMap (since := "2024-10-16")] abbrev foldl_data_eq_bind := @foldl_toList_eq_flatMap -@[deprecated foldl_toList_eq_map (since := "2024-09-09")] -abbrev foldl_data_eq_map := @foldl_toList_eq_map - -@[deprecated toList_mkArray (since := "2024-09-09")] -abbrev mkArray_data := @toList_mkArray - -@[deprecated mem_toList (since := "2024-09-09")] -abbrev mem_data := @mem_toList - @[deprecated getElem_mem (since := "2024-10-17")] abbrev getElem?_mem := @getElem_mem @[deprecated getElem_fin_eq_getElem_toList (since := "2024-10-17")] abbrev getElem_fin_eq_toList_get := @getElem_fin_eq_getElem_toList -@[deprecated getElem_fin_eq_getElem_toList (since := "2024-09-09")] -abbrev getElem_fin_eq_data_get := @getElem_fin_eq_getElem_toList - -@[deprecated getElem_mem_toList (since := "2024-09-09")] -abbrev getElem_mem_data := @getElem_mem_toList - -@[deprecated getElem?_eq_getElem?_toList (since := "2024-10-17")] -abbrev getElem?_eq_toList_getElem? := @getElem?_eq_getElem?_toList - -@[deprecated getElem?_eq_toList_getElem? (since := "2024-09-30")] -theorem getElem?_eq_toList_get? (a : Array α) (i : Nat) : a[i]? = a.toList.get? i := by - by_cases i < a.size <;> simp_all [getElem?_pos, getElem?_neg, List.get?_eq_get, eq_comm] - -set_option linter.deprecated false in -@[deprecated getElem?_eq_toList_getElem? (since := "2024-09-09")] -abbrev getElem?_eq_data_get? := @getElem?_eq_toList_get? +@[deprecated "Use reverse direction of `getElem?_toList`" (since := "2024-10-17")] +abbrev getElem?_eq_toList_getElem? := @getElem?_toList @[deprecated get?_eq_get?_toList (since := "2024-10-17")] abbrev get?_eq_toList_get? := @get?_eq_get?_toList -@[deprecated get?_eq_toList_get? (since := "2024-09-09")] -abbrev get?_eq_data_get? := @get?_eq_get?_toList - -@[deprecated toList_set (since := "2024-09-09")] -abbrev data_set := @toList_set - -@[deprecated toList_swap (since := "2024-09-09")] -abbrev data_swap := @toList_swap - @[deprecated getElem?_swap (since := "2024-10-17")] abbrev get?_swap := @getElem?_swap -@[deprecated toList_pop (since := "2024-09-09")] abbrev data_pop := @toList_pop - -@[deprecated size_eq_length_toList (since := "2024-09-09")] -abbrev size_eq_length_data := @size_eq_length_toList - -@[deprecated toList_range (since := "2024-09-09")] -abbrev data_range := @toList_range - -@[deprecated toList_reverse (since := "2024-09-30")] -abbrev reverse_toList := @toList_reverse - -@[deprecated mapM_eq_mapM_toList (since := "2024-09-09")] -abbrev mapM_eq_mapM_data := @mapM_eq_mapM_toList - -@[deprecated getElem_modify (since := "2024-08-08")] -theorem get_modify {arr : Array α} {x i} (h : i < (arr.modify x f).size) : - (arr.modify x f).get i h = - if x = i then f (arr.get i (by simpa using h)) else arr.get i (by simpa using h) := by - simp [getElem_modify h] - -@[deprecated toList_filter (since := "2024-09-09")] -abbrev filter_data := @toList_filter - -@[deprecated toList_filterMap (since := "2024-09-09")] -abbrev filterMap_data := @toList_filterMap - -@[deprecated toList_empty (since := "2024-09-09")] -abbrev empty_data := @toList_empty - -@[deprecated getElem_append_left (since := "2024-09-30")] -abbrev get_append_left := @getElem_append_left - -@[deprecated getElem_append_right (since := "2024-09-30")] -abbrev get_append_right := @getElem_append_right - -@[deprecated "Use the reverse direction of `Array.any_toList`" (since := "2024-09-30")] -abbrev any_def := @any_toList - -@[deprecated "Use the reverse direction of `Array.all_toList`" (since := "2024-09-30")] -abbrev all_def := @all_toList - -@[deprecated getElem_extract_loop_lt_aux (since := "2024-09-30")] -abbrev get_extract_loop_lt_aux := @getElem_extract_loop_lt_aux -@[deprecated getElem_extract_loop_lt (since := "2024-09-30")] -abbrev get_extract_loop_lt := @getElem_extract_loop_lt -@[deprecated getElem_extract_loop_ge_aux (since := "2024-09-30")] -abbrev get_extract_loop_ge_aux := @getElem_extract_loop_ge_aux -@[deprecated getElem_extract_loop_ge (since := "2024-09-30")] -abbrev get_extract_loop_ge := @getElem_extract_loop_ge -@[deprecated getElem_extract_aux (since := "2024-09-30")] -abbrev get_extract_aux := @getElem_extract_aux -@[deprecated getElem_extract (since := "2024-09-30")] -abbrev get_extract := @getElem_extract - -@[deprecated getElem_swap_right (since := "2024-09-30")] -abbrev get_swap_right := @getElem_swap_right -@[deprecated getElem_swap_left (since := "2024-09-30")] -abbrev get_swap_left := @getElem_swap_left -@[deprecated getElem_swap_of_ne (since := "2024-09-30")] -abbrev get_swap_of_ne := @getElem_swap_of_ne -@[deprecated getElem_swap (since := "2024-09-30")] -abbrev get_swap := @getElem_swap -@[deprecated getElem_swap' (since := "2024-09-30")] -abbrev get_swap' := @getElem_swap' +@[deprecated getElem_push (since := "2024-10-21")] abbrev get_push := @getElem_push +@[deprecated getElem_push_lt (since := "2024-10-21")] abbrev get_push_lt := @getElem_push_lt +@[deprecated getElem_push_eq (since := "2024-10-21")] abbrev get_push_eq := @getElem_push_eq @[deprecated back!_eq_back? (since := "2024-10-31")] abbrev back_eq_back? := @back!_eq_back? @[deprecated back!_push (since := "2024-10-31")] abbrev back_push := @back!_push @@ -2500,4 +2160,20 @@ abbrev eq_push_pop_back_of_size_ne_zero := @eq_push_pop_back!_of_size_ne_zero @[deprecated getD_get?_setIfInBounds (since := "2024-11-24")] abbrev getD_setD := @getD_get?_setIfInBounds @[deprecated getElem_setIfInBounds (since := "2024-11-24")] abbrev getElem_setD := @getElem_setIfInBounds +@[deprecated List.getElem_toArray (since := "2024-11-29")] +theorem getElem_mk {xs : List α} {i : Nat} (h : i < xs.length) : (Array.mk xs)[i] = xs[i] := rfl + +@[deprecated Array.getElem_toList (since := "2024-12-08")] +theorem getElem_eq_getElem_toList {a : Array α} (h : i < a.size) : a[i] = a.toList[i] := rfl + +@[deprecated Array.getElem?_toList (since := "2024-12-08")] +theorem getElem?_eq_getElem?_toList (a : Array α) (i : Nat) : a[i]? = a.toList[i]? := by + rw [getElem?_def] + split <;> simp_all + +@[deprecated LawfulGetElem.getElem?_def (since := "2024-12-08")] +theorem getElem?_eq {a : Array α} {i : Nat} : + a[i]? = if h : i < a.size then some a[i] else none := by + rw [getElem?_def] + end Array diff --git a/src/Init/Data/Array/TakeDrop.lean b/src/Init/Data/Array/TakeDrop.lean index 6b160b2e0aa4..d654dd40cec2 100644 --- a/src/Init/Data/Array/TakeDrop.lean +++ b/src/Init/Data/Array/TakeDrop.lean @@ -12,7 +12,7 @@ namespace Array theorem exists_of_uset (self : Array α) (i d h) : ∃ l₁ l₂, self.toList = l₁ ++ self[i] :: l₂ ∧ List.length l₁ = i.toNat ∧ (self.uset i d h).toList = l₁ ++ d :: l₂ := by - simpa only [ugetElem_eq_getElem, getElem_eq_getElem_toList, uset, toList_set] using + simpa only [ugetElem_eq_getElem, ← getElem_toList, uset, toList_set] using List.exists_of_set _ end Array diff --git a/src/Init/Data/BitVec/Lemmas.lean b/src/Init/Data/BitVec/Lemmas.lean index 590bfcb7a7ad..9d111b7f37fc 100644 --- a/src/Init/Data/BitVec/Lemmas.lean +++ b/src/Init/Data/BitVec/Lemmas.lean @@ -1121,11 +1121,16 @@ theorem not_eq_comm {x y : BitVec w} : ~~~ x = y ↔ x = ~~~ y := by /-! ### shiftLeft -/ @[simp, bv_toNat] theorem toNat_shiftLeft {x : BitVec v} : - BitVec.toNat (x <<< n) = BitVec.toNat x <<< n % 2^v := + (x <<< n).toNat = x.toNat <<< n % 2^v := BitVec.toNat_ofNat _ _ +@[simp] theorem toInt_shiftLeft {x : BitVec w} : + (x <<< n).toInt = (x.toNat <<< n : Int).bmod (2^w) := by + rw [toInt_eq_toNat_bmod, toNat_shiftLeft, Nat.shiftLeft_eq] + simp + @[simp] theorem toFin_shiftLeft {n : Nat} (x : BitVec w) : - BitVec.toFin (x <<< n) = Fin.ofNat' (2^w) (x.toNat <<< n) := rfl + (x <<< n).toFin = Fin.ofNat' (2^w) (x.toNat <<< n) := rfl @[simp] theorem shiftLeft_zero (x : BitVec w) : x <<< 0 = x := by diff --git a/src/Init/Data/Int/DivMod.lean b/src/Init/Data/Int/DivMod.lean index 6a4b0010bd41..0f3fe6b78bae 100644 --- a/src/Init/Data/Int/DivMod.lean +++ b/src/Init/Data/Int/DivMod.lean @@ -29,6 +29,8 @@ At that time, we did not rename `div` and `mod` to `tdiv` and `tmod` (along with In September 2024, we decided to do this rename (with deprecations in place), and later we intend to rename `ediv` and `emod` to `div` and `mod`, as nearly all users will only ever need to use these functions and their associated lemmas. + +In December 2024, we removed `tdiv` and `tmod`, but have not yet renamed `ediv` and `emod`. -/ /-! ### T-rounding division -/ @@ -71,8 +73,6 @@ def tdiv : (@& Int) → (@& Int) → Int | -[m +1], ofNat n => -ofNat (succ m / n) | -[m +1], -[n +1] => ofNat (succ m / succ n) -@[deprecated tdiv (since := "2024-09-11")] abbrev div := tdiv - /-- Integer modulo. This function uses the [*"T-rounding"*][t-rounding] (**T**runcation-rounding) convention to pair with `Int.tdiv`, meaning that `tmod a b + b * (tdiv a b) = a` @@ -107,8 +107,6 @@ def tmod : (@& Int) → (@& Int) → Int | -[m +1], ofNat n => -ofNat (succ m % n) | -[m +1], -[n +1] => -ofNat (succ m % succ n) -@[deprecated tmod (since := "2024-09-11")] abbrev mod := tmod - /-! ### F-rounding division This pair satisfies `fdiv x y = floor (x / y)`. -/ @@ -251,8 +249,6 @@ instance : Mod Int where theorem ofNat_tdiv (m n : Nat) : ↑(m / n) = tdiv ↑m ↑n := rfl -@[deprecated ofNat_tdiv (since := "2024-09-11")] abbrev ofNat_div := ofNat_tdiv - theorem ofNat_fdiv : ∀ m n : Nat, ↑(m / n) = fdiv ↑m ↑n | 0, _ => by simp [fdiv] | succ _, _ => rfl diff --git a/src/Init/Data/Int/DivModLemmas.lean b/src/Init/Data/Int/DivModLemmas.lean index aa60ab0a73f3..c211ed8f84e2 100644 --- a/src/Init/Data/Int/DivModLemmas.lean +++ b/src/Init/Data/Int/DivModLemmas.lean @@ -1315,65 +1315,3 @@ theorem bmod_natAbs_plus_one (x : Int) (w : 1 < x.natAbs) : bmod x (x.natAbs + 1 all_goals decide · exact ofNat_nonneg x · exact succ_ofNat_pos (x + 1) - -/-! ### Deprecations -/ - -@[deprecated Int.zero_tdiv (since := "2024-09-11")] protected abbrev zero_div := @Int.zero_tdiv -@[deprecated Int.tdiv_zero (since := "2024-09-11")] protected abbrev div_zero := @Int.tdiv_zero -@[deprecated tdiv_eq_ediv (since := "2024-09-11")] abbrev div_eq_ediv := @tdiv_eq_ediv -@[deprecated fdiv_eq_tdiv (since := "2024-09-11")] abbrev fdiv_eq_div := @fdiv_eq_tdiv -@[deprecated zero_tmod (since := "2024-09-11")] abbrev zero_mod := @zero_tmod -@[deprecated tmod_zero (since := "2024-09-11")] abbrev mod_zero := @tmod_zero -@[deprecated tmod_add_tdiv (since := "2024-09-11")] abbrev mod_add_div := @tmod_add_tdiv -@[deprecated tdiv_add_tmod (since := "2024-09-11")] abbrev div_add_mod := @tdiv_add_tmod -@[deprecated tmod_add_tdiv' (since := "2024-09-11")] abbrev mod_add_div' := @tmod_add_tdiv' -@[deprecated tdiv_add_tmod' (since := "2024-09-11")] abbrev div_add_mod' := @tdiv_add_tmod' -@[deprecated tmod_def (since := "2024-09-11")] abbrev mod_def := @tmod_def -@[deprecated tmod_eq_emod (since := "2024-09-11")] abbrev mod_eq_emod := @tmod_eq_emod -@[deprecated fmod_eq_tmod (since := "2024-09-11")] abbrev fmod_eq_mod := @fmod_eq_tmod -@[deprecated Int.tdiv_one (since := "2024-09-11")] protected abbrev div_one := @Int.tdiv_one -@[deprecated Int.tdiv_neg (since := "2024-09-11")] protected abbrev div_neg := @Int.tdiv_neg -@[deprecated Int.neg_tdiv (since := "2024-09-11")] protected abbrev neg_div := @Int.neg_tdiv -@[deprecated Int.neg_tdiv_neg (since := "2024-09-11")] protected abbrev neg_div_neg := @Int.neg_tdiv_neg -@[deprecated Int.tdiv_nonneg (since := "2024-09-11")] protected abbrev div_nonneg := @Int.tdiv_nonneg -@[deprecated Int.tdiv_nonpos (since := "2024-09-11")] protected abbrev div_nonpos := @Int.tdiv_nonpos -@[deprecated Int.tdiv_eq_zero_of_lt (since := "2024-09-11")] abbrev div_eq_zero_of_lt := @Int.tdiv_eq_zero_of_lt -@[deprecated Int.mul_tdiv_cancel (since := "2024-09-11")] protected abbrev mul_div_cancel := @Int.mul_tdiv_cancel -@[deprecated Int.mul_tdiv_cancel_left (since := "2024-09-11")] protected abbrev mul_div_cancel_left := @Int.mul_tdiv_cancel_left -@[deprecated Int.tdiv_self (since := "2024-09-11")] protected abbrev div_self := @Int.tdiv_self -@[deprecated Int.mul_tdiv_cancel_of_tmod_eq_zero (since := "2024-09-11")] abbrev mul_div_cancel_of_mod_eq_zero := @Int.mul_tdiv_cancel_of_tmod_eq_zero -@[deprecated Int.tdiv_mul_cancel_of_tmod_eq_zero (since := "2024-09-11")] abbrev div_mul_cancel_of_mod_eq_zero := @Int.tdiv_mul_cancel_of_tmod_eq_zero -@[deprecated Int.dvd_of_tmod_eq_zero (since := "2024-09-11")] abbrev dvd_of_mod_eq_zero := @Int.dvd_of_tmod_eq_zero -@[deprecated Int.mul_tdiv_assoc (since := "2024-09-11")] protected abbrev mul_div_assoc := @Int.mul_tdiv_assoc -@[deprecated Int.mul_tdiv_assoc' (since := "2024-09-11")] protected abbrev mul_div_assoc' := @Int.mul_tdiv_assoc' -@[deprecated Int.tdiv_dvd_tdiv (since := "2024-09-11")] abbrev div_dvd_div := @Int.tdiv_dvd_tdiv -@[deprecated Int.natAbs_tdiv (since := "2024-09-11")] abbrev natAbs_div := @Int.natAbs_tdiv -@[deprecated Int.tdiv_eq_of_eq_mul_right (since := "2024-09-11")] protected abbrev div_eq_of_eq_mul_right := @Int.tdiv_eq_of_eq_mul_right -@[deprecated Int.eq_tdiv_of_mul_eq_right (since := "2024-09-11")] protected abbrev eq_div_of_mul_eq_right := @Int.eq_tdiv_of_mul_eq_right -@[deprecated Int.ofNat_tmod (since := "2024-09-11")] abbrev ofNat_mod := @Int.ofNat_tmod -@[deprecated Int.tmod_one (since := "2024-09-11")] abbrev mod_one := @Int.tmod_one -@[deprecated Int.tmod_eq_of_lt (since := "2024-09-11")] abbrev mod_eq_of_lt := @Int.tmod_eq_of_lt -@[deprecated Int.tmod_lt_of_pos (since := "2024-09-11")] abbrev mod_lt_of_pos := @Int.tmod_lt_of_pos -@[deprecated Int.tmod_nonneg (since := "2024-09-11")] abbrev mod_nonneg := @Int.tmod_nonneg -@[deprecated Int.tmod_neg (since := "2024-09-11")] abbrev mod_neg := @Int.tmod_neg -@[deprecated Int.mul_tmod_left (since := "2024-09-11")] abbrev mul_mod_left := @Int.mul_tmod_left -@[deprecated Int.mul_tmod_right (since := "2024-09-11")] abbrev mul_mod_right := @Int.mul_tmod_right -@[deprecated Int.tmod_eq_zero_of_dvd (since := "2024-09-11")] abbrev mod_eq_zero_of_dvd := @Int.tmod_eq_zero_of_dvd -@[deprecated Int.dvd_iff_tmod_eq_zero (since := "2024-09-11")] abbrev dvd_iff_mod_eq_zero := @Int.dvd_iff_tmod_eq_zero -@[deprecated Int.neg_mul_tmod_right (since := "2024-09-11")] abbrev neg_mul_mod_right := @Int.neg_mul_tmod_right -@[deprecated Int.neg_mul_tmod_left (since := "2024-09-11")] abbrev neg_mul_mod_left := @Int.neg_mul_tmod_left -@[deprecated Int.tdiv_mul_cancel (since := "2024-09-11")] protected abbrev div_mul_cancel := @Int.tdiv_mul_cancel -@[deprecated Int.mul_tdiv_cancel' (since := "2024-09-11")] protected abbrev mul_div_cancel' := @Int.mul_tdiv_cancel' -@[deprecated Int.eq_mul_of_tdiv_eq_right (since := "2024-09-11")] protected abbrev eq_mul_of_div_eq_right := @Int.eq_mul_of_tdiv_eq_right -@[deprecated Int.tmod_self (since := "2024-09-11")] abbrev mod_self := @Int.tmod_self -@[deprecated Int.neg_tmod_self (since := "2024-09-11")] abbrev neg_mod_self := @Int.neg_tmod_self -@[deprecated Int.lt_tdiv_add_one_mul_self (since := "2024-09-11")] abbrev lt_div_add_one_mul_self := @Int.lt_tdiv_add_one_mul_self -@[deprecated Int.tdiv_eq_iff_eq_mul_right (since := "2024-09-11")] protected abbrev div_eq_iff_eq_mul_right := @Int.tdiv_eq_iff_eq_mul_right -@[deprecated Int.tdiv_eq_iff_eq_mul_left (since := "2024-09-11")] protected abbrev div_eq_iff_eq_mul_left := @Int.tdiv_eq_iff_eq_mul_left -@[deprecated Int.eq_mul_of_tdiv_eq_left (since := "2024-09-11")] protected abbrev eq_mul_of_div_eq_left := @Int.eq_mul_of_tdiv_eq_left -@[deprecated Int.tdiv_eq_of_eq_mul_left (since := "2024-09-11")] protected abbrev div_eq_of_eq_mul_left := @Int.tdiv_eq_of_eq_mul_left -@[deprecated Int.eq_zero_of_tdiv_eq_zero (since := "2024-09-11")] protected abbrev eq_zero_of_div_eq_zero := @Int.eq_zero_of_tdiv_eq_zero -@[deprecated Int.tdiv_left_inj (since := "2024-09-11")] protected abbrev div_left_inj := @Int.tdiv_left_inj -@[deprecated Int.tdiv_sign (since := "2024-09-11")] abbrev div_sign := @Int.tdiv_sign -@[deprecated Int.sign_eq_tdiv_abs (since := "2024-09-11")] protected abbrev sign_eq_div_abs := @Int.sign_eq_tdiv_abs -@[deprecated Int.tdiv_eq_ediv_of_dvd (since := "2024-09-11")] abbrev div_eq_ediv_of_dvd := @Int.tdiv_eq_ediv_of_dvd diff --git a/src/Init/Data/List.lean b/src/Init/Data/List.lean index 7c321dbc3e07..2ed68e0d0297 100644 --- a/src/Init/Data/List.lean +++ b/src/Init/Data/List.lean @@ -24,6 +24,7 @@ import Init.Data.List.Zip import Init.Data.List.Perm import Init.Data.List.Sort import Init.Data.List.ToArray +import Init.Data.List.ToArrayImpl import Init.Data.List.MapIdx import Init.Data.List.OfFn import Init.Data.List.FinRange diff --git a/src/Init/Data/List/Lemmas.lean b/src/Init/Data/List/Lemmas.lean index 7789ce13fb3a..2b94abd89a45 100644 --- a/src/Init/Data/List/Lemmas.lean +++ b/src/Init/Data/List/Lemmas.lean @@ -220,15 +220,6 @@ We simplify `l[n]!` to `(l[n]?).getD default`. /-! ### getElem? and getElem -/ -@[simp] theorem getElem?_eq_getElem {l : List α} {n} (h : n < l.length) : l[n]? = some l[n] := by - simp only [getElem?_def, h, ↓reduceDIte] - -theorem getElem?_eq_some_iff {l : List α} : l[n]? = some a ↔ ∃ h : n < l.length, l[n] = a := by - simp only [← get?_eq_getElem?, get?_eq_some_iff, get_eq_getElem] - -theorem some_eq_getElem?_iff {l : List α} : some a = l[n]? ↔ ∃ h : n < l.length, l[n] = a := by - rw [eq_comm, getElem?_eq_some_iff] - @[simp] theorem getElem?_eq_none_iff : l[n]? = none ↔ length l ≤ n := by simp only [← get?_eq_getElem?, get?_eq_none_iff] @@ -237,11 +228,20 @@ theorem some_eq_getElem?_iff {l : List α} : some a = l[n]? ↔ ∃ h : n < l.le theorem getElem?_eq_none (h : length l ≤ n) : l[n]? = none := getElem?_eq_none_iff.mpr h -@[simp] theorem some_getElem_eq_getElem?_iff {α} (xs : List α) (i : Nat) (h : i < xs.length) : +@[simp] theorem getElem?_eq_getElem {l : List α} {n} (h : n < l.length) : l[n]? = some l[n] := + getElem?_pos .. + +theorem getElem?_eq_some_iff {l : List α} : l[n]? = some a ↔ ∃ h : n < l.length, l[n] = a := by + simp only [← get?_eq_getElem?, get?_eq_some_iff, get_eq_getElem] + +theorem some_eq_getElem?_iff {l : List α} : some a = l[n]? ↔ ∃ h : n < l.length, l[n] = a := by + rw [eq_comm, getElem?_eq_some_iff] + +@[simp] theorem some_getElem_eq_getElem?_iff (xs : List α) (i : Nat) (h : i < xs.length) : (some xs[i] = xs[i]?) ↔ True := by simp [h] -@[simp] theorem getElem?_eq_some_getElem_iff {α} (xs : List α) (i : Nat) (h : i < xs.length) : +@[simp] theorem getElem?_eq_some_getElem_iff (xs : List α) (i : Nat) (h : i < xs.length) : (xs[i]? = some xs[i]) ↔ True := by simp [h] @@ -255,6 +255,11 @@ theorem getElem_eq_getElem?_get (l : List α) (i : Nat) (h : i < l.length) : @[simp] theorem getElem?_nil {n : Nat} : ([] : List α)[n]? = none := rfl +theorem getElem_cons {l : List α} (w : i < (a :: l).length) : + (a :: l)[i] = + if h : i = 0 then a else l[i-1]'(match i, h with | i+1, _ => succ_lt_succ_iff.mp w) := by + cases i <;> simp + theorem getElem?_cons_zero {l : List α} : (a::l)[0]? = some a := by simp @[simp] theorem getElem?_cons_succ {l : List α} : (a::l)[n+1]? = l[n]? := by @@ -264,6 +269,13 @@ theorem getElem?_cons_zero {l : List α} : (a::l)[0]? = some a := by simp theorem getElem?_cons : (a :: l)[i]? = if i = 0 then some a else l[i-1]? := by cases i <;> simp +@[simp] theorem getElem_singleton (a : α) (h : i < 1) : [a][i] = a := + match i, h with + | 0, _ => rfl + +theorem getElem?_singleton (a : α) (i : Nat) : [a][i]? = if i = 0 then some a else none := by + simp [getElem?_cons] + /-- If one has `l[i]` in an expression and `h : l = l'`, `rw [h]` will give a "motive it not type correct" error, as it cannot rewrite the @@ -273,10 +285,6 @@ such a rewrite, with `rw [getElem_of_eq h]`. theorem getElem_of_eq {l l' : List α} (h : l = l') {i : Nat} (w : i < l.length) : l[i] = l'[i]'(h ▸ w) := by cases h; rfl -@[simp] theorem getElem_singleton (a : α) (h : i < 1) : [a][i] = a := - match i, h with - | 0, _ => rfl - theorem getElem_zero {l : List α} (h : 0 < l.length) : l[0] = l.head (length_pos.mp h) := match l, h with | _ :: _, _ => rfl @@ -300,12 +308,6 @@ theorem ext_getElem {l₁ l₂ : List α} (hl : length l₁ = length l₂) theorem getElem?_concat_length (l : List α) (a : α) : (l ++ [a])[l.length]? = some a := by simp -theorem isSome_getElem? {l : List α} {n : Nat} : l[n]?.isSome ↔ n < l.length := by - simp - -theorem isNone_getElem? {l : List α} {n : Nat} : l[n]?.isNone ↔ l.length ≤ n := by - simp - /-! ### mem -/ @[simp] theorem not_mem_nil (a : α) : ¬ a ∈ [] := nofun @@ -465,7 +467,7 @@ theorem isEmpty_iff {l : List α} : l.isEmpty ↔ l = [] := by cases l <;> simp theorem isEmpty_eq_false_iff_exists_mem {xs : List α} : - (List.isEmpty xs = false) ↔ ∃ x, x ∈ xs := by + xs.isEmpty = false ↔ ∃ x, x ∈ xs := by cases xs <;> simp theorem isEmpty_iff_length_eq_zero {l : List α} : l.isEmpty ↔ l.length = 0 := by @@ -3529,7 +3531,12 @@ theorem getElem?_eq (l : List α) (i : Nat) : getElem?_def _ _ @[deprecated getElem?_eq_none (since := "2024-11-29")] abbrev getElem?_len_le := @getElem?_eq_none +@[deprecated _root_.isSome_getElem? (since := "2024-12-09")] +theorem isSome_getElem? {l : List α} {n : Nat} : l[n]?.isSome ↔ n < l.length := by + simp - +@[deprecated _root_.isNone_getElem? (since := "2024-12-09")] +theorem isNone_getElem? {l : List α} {n : Nat} : l[n]?.isNone ↔ l.length ≤ n := by + simp end List diff --git a/src/Init/Data/List/MapIdx.lean b/src/Init/Data/List/MapIdx.lean index d2592361745e..2e07ff93e339 100644 --- a/src/Init/Data/List/MapIdx.lean +++ b/src/Init/Data/List/MapIdx.lean @@ -237,15 +237,15 @@ theorem getElem?_mapIdx_go : ∀ {l : List α} {arr : Array β} {i : Nat}, if h : i < arr.size then some arr[i] else Option.map (f i) l[i - arr.size]? | [], arr, i => by simp only [mapIdx.go, Array.toListImpl_eq, getElem?_def, Array.length_toList, - Array.getElem_eq_getElem_toList, length_nil, Nat.not_lt_zero, ↓reduceDIte, Option.map_none'] + ← Array.getElem_toList, length_nil, Nat.not_lt_zero, ↓reduceDIte, Option.map_none'] | a :: l, arr, i => by rw [mapIdx.go, getElem?_mapIdx_go] simp only [Array.size_push] split <;> split · simp only [Option.some.injEq] - rw [Array.getElem_eq_getElem_toList] + rw [← Array.getElem_toList] simp only [Array.push_toList] - rw [getElem_append_left, Array.getElem_eq_getElem_toList] + rw [getElem_append_left, ← Array.getElem_toList] · have : i = arr.size := by omega simp_all · omega diff --git a/src/Init/Data/List/ToArray.lean b/src/Init/Data/List/ToArray.lean index 214364b5bb88..ffa2869b9d9d 100644 --- a/src/Init/Data/List/ToArray.lean +++ b/src/Init/Data/List/ToArray.lean @@ -1,23 +1,366 @@ /- -Copyright (c) 2024 Lean FRO. All rights reserved. +Copyright (c) 2022 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. -Authors: Henrik Böving +Authors: Mario Carneiro -/ prelude -import Init.Data.List.Basic +import Init.Data.List.Impl +import Init.Data.List.Nat.Erase +import Init.Data.List.Monadic -/-- -Auxiliary definition for `List.toArray`. -`List.toArrayAux as r = r ++ as.toArray` +/-! ### Lemmas about `List.toArray`. + +We prefer to pull `List.toArray` outwards past `Array` operations. -/ -@[inline_if_reduce] -def List.toArrayAux : List α → Array α → Array α - | nil, r => r - | cons a as, r => toArrayAux as (r.push a) - -/-- Convert a `List α` into an `Array α`. This is O(n) in the length of the list. -/ --- This function is exported to C, where it is called by `Array.mk` --- (the constructor) to implement this functionality. -@[inline, match_pattern, pp_nodot, export lean_list_to_array] -def List.toArrayImpl (as : List α) : Array α := - as.toArrayAux (Array.mkEmpty as.length) +namespace List + +open Array + +theorem toArray_inj {a b : List α} (h : a.toArray = b.toArray) : a = b := by + cases a with + | nil => simpa using h + | cons a as => + cases b with + | nil => simp at h + | cons b bs => simpa using h + +@[simp] theorem size_toArrayAux {a : List α} {b : Array α} : + (a.toArrayAux b).size = b.size + a.length := by + simp [size] + +@[simp] theorem push_toArray (l : List α) (a : α) : l.toArray.push a = (l ++ [a]).toArray := by + apply ext' + simp + +/-- Unapplied variant of `push_toArray`, useful for monadic reasoning. -/ +@[simp] theorem push_toArray_fun (l : List α) : l.toArray.push = fun a => (l ++ [a]).toArray := by + funext a + simp + +@[simp] theorem isEmpty_toArray (l : List α) : l.toArray.isEmpty = l.isEmpty := by + cases l <;> simp + +@[simp] theorem toArray_singleton (a : α) : (List.singleton a).toArray = singleton a := rfl + +@[simp] theorem back!_toArray [Inhabited α] (l : List α) : l.toArray.back! = l.getLast! := by + simp only [back!, size_toArray, Array.get!_eq_getElem!, getElem!_toArray, getLast!_eq_getElem!] + +@[simp] theorem back?_toArray (l : List α) : l.toArray.back? = l.getLast? := by + simp [back?, List.getLast?_eq_getElem?] + +@[simp] theorem set_toArray (l : List α) (i : Nat) (a : α) (h : i < l.length) : + (l.toArray.set i a) = (l.set i a).toArray := rfl + +@[simp] theorem forIn'_loop_toArray [Monad m] (l : List α) (f : (a : α) → a ∈ l.toArray → β → m (ForInStep β)) (i : Nat) + (h : i ≤ l.length) (b : β) : + Array.forIn'.loop l.toArray f i h b = + forIn' (l.drop (l.length - i)) b (fun a m b => f a (by simpa using mem_of_mem_drop m) b) := by + induction i generalizing l b with + | zero => + simp [Array.forIn'.loop] + | succ i ih => + simp only [Array.forIn'.loop, size_toArray, getElem_toArray, ih] + have t : drop (l.length - (i + 1)) l = l[l.length - i - 1] :: drop (l.length - i) l := by + simp only [Nat.sub_add_eq] + rw [List.drop_sub_one (by omega), List.getElem?_eq_getElem (by omega)] + simp only [Option.toList_some, singleton_append] + simp [t] + have t : l.length - 1 - i = l.length - i - 1 := by omega + simp only [t] + congr + +@[simp] theorem forIn'_toArray [Monad m] (l : List α) (b : β) (f : (a : α) → a ∈ l.toArray → β → m (ForInStep β)) : + forIn' l.toArray b f = forIn' l b (fun a m b => f a (mem_toArray.mpr m) b) := by + change Array.forIn' _ _ _ = List.forIn' _ _ _ + rw [Array.forIn', forIn'_loop_toArray] + simp + +@[simp] theorem forIn_toArray [Monad m] (l : List α) (b : β) (f : α → β → m (ForInStep β)) : + forIn l.toArray b f = forIn l b f := by + simpa using forIn'_toArray l b fun a m b => f a b + +theorem foldrM_toArray [Monad m] (f : α → β → m β) (init : β) (l : List α) : + l.toArray.foldrM f init = l.foldrM f init := by + rw [foldrM_eq_reverse_foldlM_toList] + simp + +theorem foldlM_toArray [Monad m] (f : β → α → m β) (init : β) (l : List α) : + l.toArray.foldlM f init = l.foldlM f init := by + rw [foldlM_toList] + +theorem foldr_toArray (f : α → β → β) (init : β) (l : List α) : + l.toArray.foldr f init = l.foldr f init := by + rw [foldr_toList] + +theorem foldl_toArray (f : β → α → β) (init : β) (l : List α) : + l.toArray.foldl f init = l.foldl f init := by + rw [foldl_toList] + +/-- Variant of `foldrM_toArray` with a side condition for the `start` argument. -/ +@[simp] theorem foldrM_toArray' [Monad m] (f : α → β → m β) (init : β) (l : List α) + (h : start = l.toArray.size) : + l.toArray.foldrM f init start 0 = l.foldrM f init := by + subst h + rw [foldrM_eq_reverse_foldlM_toList] + simp + +/-- Variant of `foldlM_toArray` with a side condition for the `stop` argument. -/ +@[simp] theorem foldlM_toArray' [Monad m] (f : β → α → m β) (init : β) (l : List α) + (h : stop = l.toArray.size) : + l.toArray.foldlM f init 0 stop = l.foldlM f init := by + subst h + rw [foldlM_toList] + +/-- Variant of `foldr_toArray` with a side condition for the `start` argument. -/ +@[simp] theorem foldr_toArray' (f : α → β → β) (init : β) (l : List α) + (h : start = l.toArray.size) : + l.toArray.foldr f init start 0 = l.foldr f init := by + subst h + rw [foldr_toList] + +/-- Variant of `foldl_toArray` with a side condition for the `stop` argument. -/ +@[simp] theorem foldl_toArray' (f : β → α → β) (init : β) (l : List α) + (h : stop = l.toArray.size) : + l.toArray.foldl f init 0 stop = l.foldl f init := by + subst h + rw [foldl_toList] + +@[simp] theorem append_toArray (l₁ l₂ : List α) : + l₁.toArray ++ l₂.toArray = (l₁ ++ l₂).toArray := by + apply ext' + simp + +@[simp] theorem push_append_toArray {as : Array α} {a : α} {bs : List α} : as.push a ++ bs.toArray = as ++ (a ::bs).toArray := by + cases as + simp + +@[simp] theorem foldl_push {l : List α} {as : Array α} : l.foldl Array.push as = as ++ l.toArray := by + induction l generalizing as <;> simp [*] + +@[simp] theorem foldr_push {l : List α} {as : Array α} : l.foldr (fun a b => push b a) as = as ++ l.reverse.toArray := by + rw [foldr_eq_foldl_reverse, foldl_push] + +@[simp] theorem findSomeM?_toArray [Monad m] [LawfulMonad m] (f : α → m (Option β)) (l : List α) : + l.toArray.findSomeM? f = l.findSomeM? f := by + rw [Array.findSomeM?] + simp only [bind_pure_comp, map_pure, forIn_toArray] + induction l with + | nil => simp + | cons a l ih => + simp only [forIn_cons, LawfulMonad.bind_assoc, findSomeM?] + congr + ext1 (_|_) <;> simp [ih] + +theorem findSomeRevM?_find_toArray [Monad m] [LawfulMonad m] (f : α → m (Option β)) (l : List α) + (i : Nat) (h) : + findSomeRevM?.find f l.toArray i h = (l.take i).reverse.findSomeM? f := by + induction i generalizing l with + | zero => simp [Array.findSomeRevM?.find.eq_def] + | succ i ih => + rw [size_toArray] at h + rw [Array.findSomeRevM?.find, take_succ, getElem?_eq_getElem (by omega)] + simp only [ih, reverse_append] + congr + ext1 (_|_) <;> simp + +-- This is not marked as `@[simp]` as later we simplify all occurrences of `findSomeRevM?`. +theorem findSomeRevM?_toArray [Monad m] [LawfulMonad m] (f : α → m (Option β)) (l : List α) : + l.toArray.findSomeRevM? f = l.reverse.findSomeM? f := by + simp [Array.findSomeRevM?, findSomeRevM?_find_toArray] + +-- This is not marked as `@[simp]` as later we simplify all occurrences of `findRevM?`. +theorem findRevM?_toArray [Monad m] [LawfulMonad m] (f : α → m Bool) (l : List α) : + l.toArray.findRevM? f = l.reverse.findM? f := by + rw [Array.findRevM?, findSomeRevM?_toArray, findM?_eq_findSomeM?] + +@[simp] theorem findM?_toArray [Monad m] [LawfulMonad m] (f : α → m Bool) (l : List α) : + l.toArray.findM? f = l.findM? f := by + rw [Array.findM?] + simp only [bind_pure_comp, map_pure, forIn_toArray] + induction l with + | nil => simp + | cons a l ih => + simp only [forIn_cons, LawfulMonad.bind_assoc, findM?] + congr + ext1 (_|_) <;> simp [ih] + +@[simp] theorem findSome?_toArray (f : α → Option β) (l : List α) : + l.toArray.findSome? f = l.findSome? f := by + rw [Array.findSome?, ← findSomeM?_id, findSomeM?_toArray, Id.run] + +@[simp] theorem find?_toArray (f : α → Bool) (l : List α) : + l.toArray.find? f = l.find? f := by + rw [Array.find?] + simp only [Id.run, Id, Id.pure_eq, Id.bind_eq, forIn_toArray] + induction l with + | nil => simp + | cons a l ih => + simp only [forIn_cons, Id.pure_eq, Id.bind_eq, find?] + by_cases f a <;> simp_all + +theorem isPrefixOfAux_toArray_succ [BEq α] (l₁ l₂ : List α) (hle : l₁.length ≤ l₂.length) (i : Nat) : + Array.isPrefixOfAux l₁.toArray l₂.toArray hle (i + 1) = + Array.isPrefixOfAux l₁.tail.toArray l₂.tail.toArray (by simp; omega) i := by + rw [Array.isPrefixOfAux] + conv => rhs; rw [Array.isPrefixOfAux] + simp only [size_toArray, getElem_toArray, Bool.if_false_right, length_tail, getElem_tail] + split <;> rename_i h₁ <;> split <;> rename_i h₂ + · rw [isPrefixOfAux_toArray_succ] + · omega + · omega + · rfl + +theorem isPrefixOfAux_toArray_succ' [BEq α] (l₁ l₂ : List α) (hle : l₁.length ≤ l₂.length) (i : Nat) : + Array.isPrefixOfAux l₁.toArray l₂.toArray hle (i + 1) = + Array.isPrefixOfAux (l₁.drop (i+1)).toArray (l₂.drop (i+1)).toArray (by simp; omega) 0 := by + induction i generalizing l₁ l₂ with + | zero => simp [isPrefixOfAux_toArray_succ] + | succ i ih => + rw [isPrefixOfAux_toArray_succ, ih] + simp + +theorem isPrefixOfAux_toArray_zero [BEq α] (l₁ l₂ : List α) (hle : l₁.length ≤ l₂.length) : + Array.isPrefixOfAux l₁.toArray l₂.toArray hle 0 = + l₁.isPrefixOf l₂ := by + rw [Array.isPrefixOfAux] + match l₁, l₂ with + | [], _ => rw [dif_neg] <;> simp + | _::_, [] => simp at hle + | a::l₁, b::l₂ => + simp [isPrefixOf_cons₂, isPrefixOfAux_toArray_succ', isPrefixOfAux_toArray_zero] + +@[simp] theorem isPrefixOf_toArray [BEq α] (l₁ l₂ : List α) : + l₁.toArray.isPrefixOf l₂.toArray = l₁.isPrefixOf l₂ := by + rw [Array.isPrefixOf] + split <;> rename_i h + · simp [isPrefixOfAux_toArray_zero] + · simp only [Bool.false_eq] + induction l₁ generalizing l₂ with + | nil => simp at h + | cons a l₁ ih => + cases l₂ with + | nil => simp + | cons b l₂ => + simp only [isPrefixOf_cons₂, Bool.and_eq_false_imp] + intro w + rw [ih] + simp_all + +theorem zipWithAux_toArray_succ (as : List α) (bs : List β) (f : α → β → γ) (i : Nat) (cs : Array γ) : + zipWithAux as.toArray bs.toArray f (i + 1) cs = zipWithAux as.tail.toArray bs.tail.toArray f i cs := by + rw [zipWithAux] + conv => rhs; rw [zipWithAux] + simp only [size_toArray, getElem_toArray, length_tail, getElem_tail] + split <;> rename_i h₁ + · split <;> rename_i h₂ + · rw [dif_pos (by omega), dif_pos (by omega), zipWithAux_toArray_succ] + · rw [dif_pos (by omega)] + rw [dif_neg (by omega)] + · rw [dif_neg (by omega)] + +theorem zipWithAux_toArray_succ' (as : List α) (bs : List β) (f : α → β → γ) (i : Nat) (cs : Array γ) : + zipWithAux as.toArray bs.toArray f (i + 1) cs = zipWithAux (as.drop (i+1)).toArray (bs.drop (i+1)).toArray f 0 cs := by + induction i generalizing as bs cs with + | zero => simp [zipWithAux_toArray_succ] + | succ i ih => + rw [zipWithAux_toArray_succ, ih] + simp + +theorem zipWithAux_toArray_zero (f : α → β → γ) (as : List α) (bs : List β) (cs : Array γ) : + zipWithAux as.toArray bs.toArray f 0 cs = cs ++ (List.zipWith f as bs).toArray := by + rw [Array.zipWithAux] + match as, bs with + | [], _ => simp + | _, [] => simp + | a :: as, b :: bs => + simp [zipWith_cons_cons, zipWithAux_toArray_succ', zipWithAux_toArray_zero, push_append_toArray] + +@[simp] theorem zipWith_toArray (as : List α) (bs : List β) (f : α → β → γ) : + Array.zipWith as.toArray bs.toArray f = (List.zipWith f as bs).toArray := by + rw [Array.zipWith] + simp [zipWithAux_toArray_zero] + +@[simp] theorem zip_toArray (as : List α) (bs : List β) : + Array.zip as.toArray bs.toArray = (List.zip as bs).toArray := by + simp [Array.zip, zipWith_toArray, zip] + +theorem zipWithAll_go_toArray (as : List α) (bs : List β) (f : Option α → Option β → γ) (i : Nat) (cs : Array γ) : + zipWithAll.go f as.toArray bs.toArray i cs = cs ++ (List.zipWithAll f (as.drop i) (bs.drop i)).toArray := by + unfold zipWithAll.go + split <;> rename_i h + · rw [zipWithAll_go_toArray] + simp at h + simp only [getElem?_toArray, push_append_toArray] + if ha : i < as.length then + if hb : i < bs.length then + rw [List.drop_eq_getElem_cons ha, List.drop_eq_getElem_cons hb] + simp only [ha, hb, getElem?_eq_getElem, zipWithAll_cons_cons] + else + simp only [Nat.not_lt] at hb + rw [List.drop_eq_getElem_cons ha] + rw [(drop_eq_nil_iff (l := bs)).mpr (by omega), (drop_eq_nil_iff (l := bs)).mpr (by omega)] + simp only [zipWithAll_nil, map_drop, map_cons] + rw [getElem?_eq_getElem ha] + rw [getElem?_eq_none hb] + else + if hb : i < bs.length then + simp only [Nat.not_lt] at ha + rw [List.drop_eq_getElem_cons hb] + rw [(drop_eq_nil_iff (l := as)).mpr (by omega), (drop_eq_nil_iff (l := as)).mpr (by omega)] + simp only [nil_zipWithAll, map_drop, map_cons] + rw [getElem?_eq_getElem hb] + rw [getElem?_eq_none ha] + else + omega + · simp only [size_toArray, Nat.not_lt] at h + rw [drop_eq_nil_of_le (by omega), drop_eq_nil_of_le (by omega)] + simp + termination_by max as.length bs.length - i + decreasing_by simp_wf; decreasing_trivial_pre_omega + +@[simp] theorem zipWithAll_toArray (f : Option α → Option β → γ) (as : List α) (bs : List β) : + Array.zipWithAll as.toArray bs.toArray f = (List.zipWithAll f as bs).toArray := by + simp [Array.zipWithAll, zipWithAll_go_toArray] + +@[simp] theorem toArray_appendList (l₁ l₂ : List α) : + l₁.toArray ++ l₂ = (l₁ ++ l₂).toArray := by + apply ext' + simp + +@[simp] theorem pop_toArray (l : List α) : l.toArray.pop = l.dropLast.toArray := by + apply ext' + simp + +theorem takeWhile_go_succ (p : α → Bool) (a : α) (l : List α) (i : Nat) : + takeWhile.go p (a :: l).toArray (i+1) r = takeWhile.go p l.toArray i r := by + rw [takeWhile.go, takeWhile.go] + simp only [size_toArray, length_cons, Nat.add_lt_add_iff_right, Array.get_eq_getElem, + getElem_toArray, getElem_cons_succ] + split + rw [takeWhile_go_succ] + rfl + +theorem takeWhile_go_toArray (p : α → Bool) (l : List α) (i : Nat) : + Array.takeWhile.go p l.toArray i r = r ++ (takeWhile p (l.drop i)).toArray := by + induction l generalizing i r with + | nil => simp [takeWhile.go] + | cons a l ih => + rw [takeWhile.go] + cases i with + | zero => + simp [takeWhile_go_succ, ih, takeWhile_cons] + split <;> simp + | succ i => + simp only [size_toArray, length_cons, Nat.add_lt_add_iff_right, Array.get_eq_getElem, + getElem_toArray, getElem_cons_succ, drop_succ_cons] + split <;> rename_i h₁ + · rw [takeWhile_go_succ, ih] + rw [← getElem_cons_drop_succ_eq_drop h₁, takeWhile_cons] + split <;> simp_all + · simp_all [drop_eq_nil_of_le] + +@[simp] theorem takeWhile_toArray (p : α → Bool) (l : List α) : + l.toArray.takeWhile p = (l.takeWhile p).toArray := by + simp [Array.takeWhile, takeWhile_go_toArray] + +end List diff --git a/src/Init/Data/List/ToArrayImpl.lean b/src/Init/Data/List/ToArrayImpl.lean new file mode 100644 index 000000000000..214364b5bb88 --- /dev/null +++ b/src/Init/Data/List/ToArrayImpl.lean @@ -0,0 +1,23 @@ +/- +Copyright (c) 2024 Lean FRO. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Henrik Böving +-/ +prelude +import Init.Data.List.Basic + +/-- +Auxiliary definition for `List.toArray`. +`List.toArrayAux as r = r ++ as.toArray` +-/ +@[inline_if_reduce] +def List.toArrayAux : List α → Array α → Array α + | nil, r => r + | cons a as, r => toArrayAux as (r.push a) + +/-- Convert a `List α` into an `Array α`. This is O(n) in the length of the list. -/ +-- This function is exported to C, where it is called by `Array.mk` +-- (the constructor) to implement this functionality. +@[inline, match_pattern, pp_nodot, export lean_list_to_array] +def List.toArrayImpl (as : List α) : Array α := + as.toArrayAux (Array.mkEmpty as.length) diff --git a/src/Init/Data/Vector/Lemmas.lean b/src/Init/Data/Vector/Lemmas.lean index a3d71282a8f5..4f9bc37593ff 100644 --- a/src/Init/Data/Vector/Lemmas.lean +++ b/src/Init/Data/Vector/Lemmas.lean @@ -124,6 +124,9 @@ theorem toArray_mk (a : Array α) (h : a.size = n) : (Vector.mk a h).toArray = a (Vector.mk a h).eraseIdx! i = Vector.mk (a.eraseIdx i) (by simp [h, hi]) := by simp [Vector.eraseIdx!, hi] +@[simp] theorem cast_mk (a : Array α) (h : a.size = n) (h' : n = m) : + (Vector.mk a h).cast h' = Vector.mk a (by simp [h, h']) := rfl + @[simp] theorem extract_mk (a : Array α) (h : a.size = n) (start stop) : (Vector.mk a h).extract start stop = Vector.mk (a.extract start stop) (by simp [h]) := rfl @@ -194,6 +197,9 @@ theorem toArray_mk (a : Array α) (h : a.size = n) : (Vector.mk a h).toArray = a (a.eraseIdx! i).toArray = a.toArray.eraseIdx! i := by cases a; simp_all [Array.eraseIdx!] +@[simp] theorem toArray_cast (a : Vector α n) (h : n = m) : + (a.cast h).toArray = a.toArray := rfl + @[simp] theorem toArray_extract (a : Vector α n) (start stop) : (a.extract start stop).toArray = a.toArray.extract start stop := rfl @@ -253,6 +259,132 @@ theorem toList_inj {a b : Vector α n} (h : a.toList = b.toList) : a = b := by rcases b with ⟨⟨b⟩, hb⟩ simpa using h +/-! ### set -/ + +theorem getElem_set (a : Vector α n) (i : Nat) (x : α) (hi : i < n) (j : Nat) (hj : j < n) : + (a.set i x hi)[j] = if i = j then x else a[j] := by + cases a + split <;> simp_all [Array.getElem_set] + +@[simp] theorem getElem_set_eq (a : Vector α n) (i : Nat) (x : α) (hi : i < n) : + (a.set i x hi)[i] = x := by simp [getElem_set] + +@[simp] theorem getElem_set_ne (a : Vector α n) (i : Nat) (x : α) (hi : i < n) (j : Nat) + (hj : j < n) (h : i ≠ j) : (a.set i x hi)[j] = a[j] := by simp [getElem_set, h] + +/-! ### setIfInBounds -/ + +theorem getElem_setIfInBounds (a : Vector α n) (i : Nat) (x : α) (j : Nat) + (hj : j < n) : (a.setIfInBounds i x)[j] = if i = j then x else a[j] := by + cases a + split <;> simp_all [Array.getElem_setIfInBounds] + +@[simp] theorem getElem_setIfInBounds_eq (a : Vector α n) (i : Nat) (x : α) (hj : i < n) : + (a.setIfInBounds i x)[i] = x := by simp [getElem_setIfInBounds] + +@[simp] theorem getElem_setIfInBounds_ne (a : Vector α n) (i : Nat) (x : α) (j : Nat) + (hj : j < n) (h : i ≠ j) : (a.setIfInBounds i x)[j] = a[j] := by simp [getElem_setIfInBounds, h] + +/-! ### append -/ + +theorem getElem_append (a : Vector α n) (b : Vector α m) (i : Nat) (hi : i < n + m) : + (a ++ b)[i] = if h : i < n then a[i] else b[i - n] := by + rcases a with ⟨a, rfl⟩ + rcases b with ⟨b, rfl⟩ + simp [Array.getElem_append, hi] + +theorem getElem_append_left {a : Vector α n} {b : Vector α m} {i : Nat} (hi : i < n) : + (a ++ b)[i] = a[i] := by simp [getElem_append, hi] + +theorem getElem_append_right {a : Vector α n} {b : Vector α m} {i : Nat} (h : i < n + m) (hi : n ≤ i) : + (a ++ b)[i] = b[i - n] := by + rw [getElem_append, dif_neg (by omega)] + +/-! ### cast -/ + +@[simp] theorem getElem_cast (a : Vector α n) (h : n = m) (i : Nat) (hi : i < m) : + (a.cast h)[i] = a[i] := by + cases a + simp + +/-! ### extract -/ + +@[simp] theorem getElem_extract (a : Vector α n) (start stop) (i : Nat) (hi : i < min stop n - start) : + (a.extract start stop)[i] = a[start + i] := by + cases a + simp + +/-! ### map -/ + +@[simp] theorem getElem_map (f : α → β) (a : Vector α n) (i : Nat) (hi : i < n) : + (a.map f)[i] = f a[i] := by + cases a + simp + +/-! ### zipWith -/ + +@[simp] theorem getElem_zipWith (f : α → β → γ) (a : Vector α n) (b : Vector β n) (i : Nat) + (hi : i < n) : (zipWith a b f)[i] = f a[i] b[i] := by + cases a + cases b + simp + +/-! ### swap -/ + +theorem getElem_swap (a : Vector α n) (i j : Nat) {hi hj} (k : Nat) (hk : k < n) : + (a.swap i j hi hj)[k] = if k = i then a[j] else if k = j then a[i] else a[k] := by + cases a + simp_all [Array.getElem_swap] + +@[simp] theorem getElem_swap_right (a : Vector α n) {i j : Nat} {hi hj} : + (a.swap i j hi hj)[j]'(by simpa using hj) = a[i] := by + simp +contextual [getElem_swap] + +@[simp] theorem getElem_swap_left (a : Vector α n) {i j : Nat} {hi hj} : + (a.swap i j hi hj)[i]'(by simpa using hi) = a[j] := by + simp [getElem_swap] + +@[simp] theorem getElem_swap_of_ne (a : Vector α n) {i j : Nat} {hi hj} (hp : p < n) + (hi' : p ≠ i) (hj' : p ≠ j) : (a.swap i j hi hj)[p] = a[p] := by + simp_all [getElem_swap] + +@[simp] theorem swap_swap (a : Vector α n) {i j : Nat} {hi hj} : + (a.swap i j hi hj).swap i j hi hj = a := by + cases a + simp_all [Array.swap_swap] + +theorem swap_comm (a : Vector α n) {i j : Nat} {hi hj} : + a.swap i j hi hj = a.swap j i hj hi := by + cases a + simp only [swap_mk, mk.injEq] + rw [Array.swap_comm] + +/-! ### range -/ + +@[simp] theorem getElem_range (i : Nat) (hi : i < n) : (Vector.range n)[i] = i := by + simp [Vector.range] + +/-! ### take -/ + +@[simp] theorem getElem_take (a : Vector α n) (m : Nat) (hi : i < min n m) : + (a.take m)[i] = a[i] := by + cases a + simp + +/-! ### drop -/ + +@[simp] theorem getElem_drop (a : Vector α n) (m : Nat) (hi : i < n - m) : + (a.drop m)[i] = a[m + i] := by + cases a + simp + +/-! ### reverse -/ + +@[simp] theorem getElem_reverse (a : Vector α n) (i : Nat) (hi : i < n) : + (a.reverse)[i] = a[n - 1 - i] := by + rcases a with ⟨a, rfl⟩ + simp + /-! ### Decidable quantifiers. -/ theorem forall_zero_iff {P : Vector α 0 → Prop} : diff --git a/src/Init/GetElem.lean b/src/Init/GetElem.lean index 992b32990c24..03ba85787eca 100644 --- a/src/Init/GetElem.lean +++ b/src/Init/GetElem.lean @@ -118,12 +118,16 @@ instance (priority := low) [GetElem coll idx elem valid] [∀ xs i, Decidable (v GetElem? coll idx elem valid where getElem? xs i := decidableGetElem? xs i -theorem getElem_congr_coll [GetElem coll idx elem valid] {c d : coll} {i : idx} {h : valid c i} - (h' : c = d) : c[i] = d[i]'(h' ▸ h) := by - cases h'; rfl +theorem getElem_congr [GetElem coll idx elem valid] {c d : coll} (h : c = d) + {i j : idx} (h' : i = j) (w : valid c i) : c[i] = d[j]'(h' ▸ h ▸ w) := by + cases h; cases h'; rfl + +theorem getElem_congr_coll [GetElem coll idx elem valid] {c d : coll} {i : idx} {w : valid c i} + (h : c = d) : c[i] = d[i]'(h ▸ w) := by + cases h; rfl -theorem getElem_congr [GetElem coll idx elem valid] {c : coll} {i j : idx} {h : valid c i} - (h' : i = j) : c[i] = c[j]'(h' ▸ h) := by +theorem getElem_congr_idx [GetElem coll idx elem valid] {c : coll} {i j : idx} {w : valid c i} + (h' : i = j) : c[i] = c[j]'(h' ▸ w) := by cases h'; rfl class LawfulGetElem (cont : Type u) (idx : Type v) (elem : outParam (Type w)) @@ -216,13 +220,9 @@ instance : GetElem (List α) Nat α fun as i => i < as.length where @[simp] theorem getElem_cons_zero (a : α) (as : List α) (h : 0 < (a :: as).length) : getElem (a :: as) 0 h = a := by rfl -@[deprecated getElem_cons_zero (since := "2024-06-12")] abbrev cons_getElem_zero := @getElem_cons_zero - @[simp] theorem getElem_cons_succ (a : α) (as : List α) (i : Nat) (h : i + 1 < (a :: as).length) : getElem (a :: as) (i+1) h = getElem as i (Nat.lt_of_succ_lt_succ h) := by rfl -@[deprecated getElem_cons_succ (since := "2024-06-12")] abbrev cons_getElem_succ := @getElem_cons_succ - @[simp] theorem getElem_mem : ∀ {l : List α} {n} (h : n < l.length), l[n]'h ∈ l | _ :: _, 0, _ => .head .. | _ :: l, _+1, _ => .tail _ (getElem_mem (l := l) ..) @@ -243,6 +243,12 @@ namespace Array instance : GetElem (Array α) Nat α fun xs i => i < xs.size where getElem xs i h := xs.get i h +@[simp] theorem get_eq_getElem (a : Array α) (i : Nat) (h) : a.get i h = a[i] := rfl + +@[simp] theorem get!_eq_getElem! [Inhabited α] (a : Array α) (i : Nat) : a.get! i = a[i]! := by + simp only [get!, getD, get_eq_getElem, getElem!_def] + split <;> simp_all [getElem?_pos, getElem?_neg] + end Array namespace Lean.Syntax diff --git a/src/Init/Meta.lean b/src/Init/Meta.lean index 4f520ed30dae..629ba768f987 100644 --- a/src/Init/Meta.lean +++ b/src/Init/Meta.lean @@ -679,6 +679,7 @@ private partial def decodeBinLitAux (s : String) (i : String.Pos) (val : Nat) : let c := s.get i if c == '0' then decodeBinLitAux s (s.next i) (2*val) else if c == '1' then decodeBinLitAux s (s.next i) (2*val + 1) + else if c == '_' then decodeBinLitAux s (s.next i) val else none private partial def decodeOctalLitAux (s : String) (i : String.Pos) (val : Nat) : Option Nat := @@ -686,6 +687,7 @@ private partial def decodeOctalLitAux (s : String) (i : String.Pos) (val : Nat) else let c := s.get i if '0' ≤ c && c ≤ '7' then decodeOctalLitAux s (s.next i) (8*val + c.toNat - '0'.toNat) + else if c == '_' then decodeOctalLitAux s (s.next i) val else none private def decodeHexDigit (s : String) (i : String.Pos) : Option (Nat × String.Pos) := @@ -700,13 +702,16 @@ private partial def decodeHexLitAux (s : String) (i : String.Pos) (val : Nat) : if s.atEnd i then some val else match decodeHexDigit s i with | some (d, i) => decodeHexLitAux s i (16*val + d) - | none => none + | none => + if s.get i == '_' then decodeHexLitAux s (s.next i) val + else none private partial def decodeDecimalLitAux (s : String) (i : String.Pos) (val : Nat) : Option Nat := if s.atEnd i then some val else let c := s.get i if '0' ≤ c && c ≤ '9' then decodeDecimalLitAux s (s.next i) (10*val + c.toNat - '0'.toNat) + else if c == '_' then decodeDecimalLitAux s (s.next i) val else none def decodeNatLitVal? (s : String) : Option Nat := @@ -773,6 +778,8 @@ where let c := s.get i if '0' ≤ c && c ≤ '9' then decodeAfterExp (s.next i) val e sign (10*exp + c.toNat - '0'.toNat) + else if c == '_' then + decodeAfterExp (s.next i) val e sign exp else none @@ -793,6 +800,8 @@ where let c := s.get i if '0' ≤ c && c ≤ '9' then decodeAfterDot (s.next i) (10*val + c.toNat - '0'.toNat) (e+1) + else if c == '_' then + decodeAfterDot (s.next i) val e else if c == 'e' || c == 'E' then decodeExp (s.next i) val e else @@ -805,6 +814,8 @@ where let c := s.get i if '0' ≤ c && c ≤ '9' then decode (s.next i) (10*val + c.toNat - '0'.toNat) + else if c == '_' then + decode (s.next i) val else if c == '.' then decodeAfterDot (s.next i) val 0 else if c == 'e' || c == 'E' then diff --git a/src/Init/PropLemmas.lean b/src/Init/PropLemmas.lean index f1ee950b88b1..1bd4a700d650 100644 --- a/src/Init/PropLemmas.lean +++ b/src/Init/PropLemmas.lean @@ -386,6 +386,15 @@ theorem exists_comm {p : α → β → Prop} : (∃ a b, p a b) ↔ (∃ b a, p theorem forall_prop_of_false {p : Prop} {q : p → Prop} (hn : ¬p) : (∀ h' : p, q h') ↔ True := iff_true_intro fun h => hn.elim h +@[simp] theorem and_exists_self (P : Prop) (Q : P → Prop) : (P ∧ ∃ p, Q p) ↔ ∃ p, Q p := + ⟨fun ⟨_, h⟩ => h, fun ⟨p, q⟩ => ⟨p, ⟨p, q⟩⟩⟩ + +@[simp] theorem exists_and_self (P : Prop) (Q : P → Prop) : ((∃ p, Q p) ∧ P) ↔ ∃ p, Q p := + ⟨fun ⟨h, _⟩ => h, fun ⟨p, q⟩ => ⟨⟨p, q⟩, p⟩⟩ + +@[simp] theorem forall_self_imp (P : Prop) (Q : P → Prop) : (∀ p : P, P → Q p) ↔ ∀ p, Q p := + ⟨fun h p => h p p, fun h _ p => h p⟩ + end quantifiers /-! ## membership -/ diff --git a/src/Lean/Data/RArray.lean b/src/Lean/Data/RArray.lean index c58f07fe1078..54b7fd5612b2 100644 --- a/src/Lean/Data/RArray.lean +++ b/src/Lean/Data/RArray.lean @@ -35,7 +35,7 @@ theorem RArray.get_ofFn {n : Nat} (f : Fin n → α) (h : 0 < n) (i : Fin n) : go 0 n h (Nat.le_refl _) (Nat.zero_le _) i.2 where go lb ub h1 h2 (h3 : lb ≤ i.val) (h3 : i.val < ub) : (ofFn.go f lb ub h1 h2).get i = f i := by - induction lb, ub, h1, h2 using RArray.ofFn.go.induct (f := f) (n := n) + induction lb, ub, h1, h2 using RArray.ofFn.go.induct (n := n) case case1 => simp [ofFn.go, RArray.get_eq_getImpl, RArray.getImpl] congr @@ -53,7 +53,7 @@ theorem RArray.size_ofFn {n : Nat} (f : Fin n → α) (h : 0 < n) : go 0 n h (Nat.le_refl _) where go lb ub h1 h2 : (ofFn.go f lb ub h1 h2).size = ub - lb := by - induction lb, ub, h1, h2 using RArray.ofFn.go.induct (f := f) (n := n) + induction lb, ub, h1, h2 using RArray.ofFn.go.induct (n := n) case case1 => simp [ofFn.go, size]; omega case case2 ih1 ih2 hiu => rw [ofFn.go]; simp [size, *]; omega diff --git a/src/Lean/Meta/Tactic/FunInd.lean b/src/Lean/Meta/Tactic/FunInd.lean index 780d4438e755..2c7cda048d9a 100644 --- a/src/Lean/Meta/Tactic/FunInd.lean +++ b/src/Lean/Meta/Tactic/FunInd.lean @@ -719,13 +719,11 @@ def deriveUnaryInduction (name : Name) : MetaM Name := do let e' ← abstractIndependentMVars mvars (← motive.fvarId!.getDecl).index e' let e' ← mkLambdaFVars #[motive] e' - -- We could pass (usedOnly := true) below, and get nicer induction principles that - -- do not mention odd unused parameters. - -- But the downside is that automatic instantiation of the principle (e.g. in a tactic - -- that derives them from an function application in the goal) is harder, as - -- one would have to infer or keep track of which parameters to pass. - -- So for now lets just keep them around. - let e' ← mkLambdaFVars (binderInfoForMVars := .default) fixedParams e' + -- We used to pass (usedOnly := false) below in the hope that the types of the + -- induction principle match the type of the function better. + -- But this leads to avoidable parameters that make functional induction strictly less + -- useful (e.g. when the unsued parameter mentions bound variables in the users' goal) + let e' ← mkLambdaFVars (binderInfoForMVars := .default) (usedOnly := true) fixedParams e' instantiateMVars e' | _ => if funBody.isAppOf ``WellFounded.fix then @@ -1062,13 +1060,11 @@ def deriveInductionStructural (names : Array Name) (numFixed : Nat) : MetaM Unit let e' ← abstractIndependentMVars mvars (← motives.back!.fvarId!.getDecl).index e' let e' ← mkLambdaFVars motives e' - -- We could pass (usedOnly := true) below, and get nicer induction principles that - -- do not mention odd unused parameters. - -- But the downside is that automatic instantiation of the principle (e.g. in a tactic - -- that derives them from an function application in the goal) is harder, as - -- one would have to infer or keep track of which parameters to pass. - -- So for now lets just keep them around. - let e' ← mkLambdaFVars (binderInfoForMVars := .default) xs e' + -- We used to pass (usedOnly := false) below in the hope that the types of the + -- induction principle match the type of the function better. + -- But this leads to avoidable parameters that make functional induction strictly less + -- useful (e.g. when the unsued parameter mentions bound variables in the users' goal) + let e' ← mkLambdaFVars (binderInfoForMVars := .default) (usedOnly := true) xs e' let e' ← instantiateMVars e' trace[Meta.FunInd] "complete body of mutual induction principle:{indentExpr e'}" pure e' diff --git a/src/Lean/Meta/Tactic/Simp/BuiltinSimprocs/Int.lean b/src/Lean/Meta/Tactic/Simp/BuiltinSimprocs/Int.lean index 3643d63f3d49..d06e1ad32caa 100644 --- a/src/Lean/Meta/Tactic/Simp/BuiltinSimprocs/Int.lean +++ b/src/Lean/Meta/Tactic/Simp/BuiltinSimprocs/Int.lean @@ -71,8 +71,8 @@ builtin_dsimproc [simp, seval] reduceMul ((_ * _ : Int)) := reduceBin ``HMul.hMu builtin_dsimproc [simp, seval] reduceSub ((_ - _ : Int)) := reduceBin ``HSub.hSub 6 (· - ·) builtin_dsimproc [simp, seval] reduceDiv ((_ / _ : Int)) := reduceBin ``HDiv.hDiv 6 (· / ·) builtin_dsimproc [simp, seval] reduceMod ((_ % _ : Int)) := reduceBin ``HMod.hMod 6 (· % ·) -builtin_dsimproc [simp, seval] reduceTDiv (tdiv _ _) := reduceBin ``Int.div 2 Int.tdiv -builtin_dsimproc [simp, seval] reduceTMod (tmod _ _) := reduceBin ``Int.mod 2 Int.tmod +builtin_dsimproc [simp, seval] reduceTDiv (tdiv _ _) := reduceBin ``Int.tdiv 2 Int.tdiv +builtin_dsimproc [simp, seval] reduceTMod (tmod _ _) := reduceBin ``Int.tmod 2 Int.tmod builtin_dsimproc [simp, seval] reduceFDiv (fdiv _ _) := reduceBin ``Int.fdiv 2 Int.fdiv builtin_dsimproc [simp, seval] reduceFMod (fmod _ _) := reduceBin ``Int.fmod 2 Int.fmod builtin_dsimproc [simp, seval] reduceBdiv (bdiv _ _) := reduceBinIntNatOp ``bdiv bdiv diff --git a/src/Lean/Parser/Basic.lean b/src/Lean/Parser/Basic.lean index 8dd33413de3f..7649171e922b 100644 --- a/src/Lean/Parser/Basic.lean +++ b/src/Lean/Parser/Basic.lean @@ -804,18 +804,45 @@ where else normalState num c s +/-- +Parses a sequence of the form `many (many '_' >> many1 digit)`, but if `needDigit` is true the parsed result must be nonempty. + +Note: this does not report that it is expecting `_` if we reach EOI or an unexpected character. +Rationale: this error happens if there is already a `_`, and while sequences of `_` are allowed, it's a bit perverse to suggest extending the sequence. +-/ +partial def takeDigitsFn (isDigit : Char → Bool) (expecting : String) (needDigit : Bool) : ParserFn := fun c s => + let input := c.input + let i := s.pos + if h : input.atEnd i then + if needDigit then + s.mkEOIError [expecting] + else + s + else + let curr := input.get' i h + if curr == '_' then takeDigitsFn isDigit expecting true c (s.next' c.input i h) + else if isDigit curr then takeDigitsFn isDigit expecting false c (s.next' c.input i h) + else if needDigit then s.mkUnexpectedError "unexpected character" (expected := [expecting]) + else s + def decimalNumberFn (startPos : String.Pos) (c : ParserContext) : ParserState → ParserState := fun s => - let s := takeWhileFn (fun c => c.isDigit) c s + let s := takeDigitsFn (fun c => c.isDigit) "decimal number" false c s let input := c.input let i := s.pos - let curr := input.get i - if curr == '.' || curr == 'e' || curr == 'E' then + if h : input.atEnd i then + mkNodeToken numLitKind startPos c s + else + let curr := input.get' i h + if curr == '.' || curr == 'e' || curr == 'E' then + parseScientific s + else + mkNodeToken numLitKind startPos c s +where + parseScientific s := let s := parseOptDot s let s := parseOptExp s mkNodeToken scientificLitKind startPos c s - else - mkNodeToken numLitKind startPos c s -where + parseOptDot s := let input := c.input let i := s.pos @@ -824,7 +851,7 @@ where let i := input.next i let curr := input.get i if curr.isDigit then - takeWhileFn (fun c => c.isDigit) c (s.setPos i) + takeDigitsFn (fun c => c.isDigit) "decimal number" false c (s.setPos i) else s.setPos i else @@ -839,22 +866,22 @@ where let i := if input.get i == '-' || input.get i == '+' then input.next i else i let curr := input.get i if curr.isDigit then - takeWhileFn (fun c => c.isDigit) c (s.setPos i) + takeDigitsFn (fun c => c.isDigit) "decimal number" false c (s.setPos i) else s.mkUnexpectedError "missing exponent digits in scientific literal" else s def binNumberFn (startPos : String.Pos) : ParserFn := fun c s => - let s := takeWhile1Fn (fun c => c == '0' || c == '1') "binary number" c s + let s := takeDigitsFn (fun c => c == '0' || c == '1') "binary number" true c s mkNodeToken numLitKind startPos c s def octalNumberFn (startPos : String.Pos) : ParserFn := fun c s => - let s := takeWhile1Fn (fun c => '0' ≤ c && c ≤ '7') "octal number" c s + let s := takeDigitsFn (fun c => '0' ≤ c && c ≤ '7') "octal number" true c s mkNodeToken numLitKind startPos c s def hexNumberFn (startPos : String.Pos) : ParserFn := fun c s => - let s := takeWhile1Fn (fun c => ('0' ≤ c && c ≤ '9') || ('a' ≤ c && c ≤ 'f') || ('A' ≤ c && c ≤ 'F')) "hexadecimal number" c s + let s := takeDigitsFn (fun c => ('0' ≤ c && c ≤ '9') || ('a' ≤ c && c ≤ 'f') || ('A' ≤ c && c ≤ 'F')) "hexadecimal number" true c s mkNodeToken numLitKind startPos c s def numberFnAux : ParserFn := fun c s => diff --git a/src/Std/Data/DHashMap/Internal/WF.lean b/src/Std/Data/DHashMap/Internal/WF.lean index a18eb53c2cdc..d0c9b83a0550 100644 --- a/src/Std/Data/DHashMap/Internal/WF.lean +++ b/src/Std/Data/DHashMap/Internal/WF.lean @@ -216,7 +216,7 @@ theorem expand.go_eq [BEq α] [Hashable α] [PartialEquivBEq α] (source : Array refine ih.trans ?_ simp only [Array.get_eq_getElem, AssocList.foldl_eq, Array.toList_set] rw [List.drop_eq_getElem_cons hi, List.flatMap_cons, List.foldl_append, - List.drop_set_of_lt _ _ (by omega), Array.getElem_eq_getElem_toList] + List.drop_set_of_lt _ _ (by omega), Array.getElem_toList] · next i source target hi => rw [expand.go_neg hi, List.drop_eq_nil_of_le, flatMap_nil, foldl_nil] rwa [Array.size_eq_length_toList, Nat.not_lt] at hi diff --git a/src/Std/Tactic/BVDecide/LRAT/Internal/Clause.lean b/src/Std/Tactic/BVDecide/LRAT/Internal/Clause.lean index a5e9f2c98f32..a4052c900dec 100644 --- a/src/Std/Tactic/BVDecide/LRAT/Internal/Clause.lean +++ b/src/Std/Tactic/BVDecide/LRAT/Internal/Clause.lean @@ -297,7 +297,7 @@ theorem ofArray_eq (arr : Array (Literal (PosFin n))) dsimp; omega rw [List.getElem?_eq_getElem i_in_bounds, List.getElem?_eq_getElem i_in_bounds'] simp only [List.get_eq_getElem, Nat.zero_add] at h - rw [← Array.getElem_eq_getElem_toList] + rw [Array.getElem_toList] simp [h] · have arr_data_length_le_i : arr.toList.length ≤ i := by dsimp; omega diff --git a/src/Std/Tactic/BVDecide/LRAT/Internal/Formula/Lemmas.lean b/src/Std/Tactic/BVDecide/LRAT/Internal/Formula/Lemmas.lean index 02edc9f085f2..410e68e7b36a 100644 --- a/src/Std/Tactic/BVDecide/LRAT/Internal/Formula/Lemmas.lean +++ b/src/Std/Tactic/BVDecide/LRAT/Internal/Formula/Lemmas.lean @@ -497,7 +497,7 @@ theorem deleteOne_preserves_strongAssignmentsInvariant {n : Nat} (f : DefaultFor conv => rhs; rw [Array.size_mk] exact hbound simp only [getElem!, id_eq_idx, Array.length_toList, idx_in_bounds2, ↓reduceDIte, - Fin.eta, Array.get_eq_getElem, Array.getElem_eq_getElem_toList, decidableGetElem?] at heq + Fin.eta, Array.get_eq_getElem, ← Array.getElem_toList, decidableGetElem?] at heq rw [hidx, hl] at heq simp only [unit, Option.some.injEq, DefaultClause.mk.injEq, List.cons.injEq, and_true] at heq simp only [← heq] at l_ne_b @@ -530,7 +530,7 @@ theorem deleteOne_preserves_strongAssignmentsInvariant {n : Nat} (f : DefaultFor conv => rhs; rw [Array.size_mk] exact hbound simp only [getElem!, id_eq_idx, Array.length_toList, idx_in_bounds2, ↓reduceDIte, - Fin.eta, Array.get_eq_getElem, Array.getElem_eq_getElem_toList, decidableGetElem?] at heq + Fin.eta, Array.get_eq_getElem, ← Array.getElem_toList, decidableGetElem?] at heq rw [hidx, hl] at heq simp only [unit, Option.some.injEq, DefaultClause.mk.injEq, List.cons.injEq, and_true] at heq have i_eq_l : i = l.1 := by rw [← heq] @@ -590,7 +590,7 @@ theorem deleteOne_preserves_strongAssignmentsInvariant {n : Nat} (f : DefaultFor conv => rhs; rw [Array.size_mk] exact hbound simp only [getElem!, id_eq_idx, Array.length_toList, idx_in_bounds2, ↓reduceDIte, - Fin.eta, Array.get_eq_getElem, Array.getElem_eq_getElem_toList, decidableGetElem?] at heq + Fin.eta, Array.get_eq_getElem, ← Array.getElem_toList, decidableGetElem?] at heq rw [hidx] at heq simp only [Option.some.injEq] at heq rw [← heq] at hl diff --git a/src/Std/Tactic/BVDecide/LRAT/Internal/Formula/RatAddSound.lean b/src/Std/Tactic/BVDecide/LRAT/Internal/Formula/RatAddSound.lean index 1e5dca56a1f8..5143b8163073 100644 --- a/src/Std/Tactic/BVDecide/LRAT/Internal/Formula/RatAddSound.lean +++ b/src/Std/Tactic/BVDecide/LRAT/Internal/Formula/RatAddSound.lean @@ -461,7 +461,7 @@ theorem existsRatHint_of_ratHintsExhaustive {n : Nat} (f : DefaultFormula n) constructor · rw [← Array.mem_toList] apply Array.getElem_mem_toList - · rw [← Array.getElem_eq_getElem_toList] at c'_in_f + · rw [Array.getElem_toList] at c'_in_f simp only [getElem!, Array.getElem_range, i_lt_f_clauses_size, dite_true, c'_in_f, DefaultClause.contains_iff, Array.get_eq_getElem, decidableGetElem?] simpa [Clause.toList] using negPivot_in_c' @@ -472,8 +472,8 @@ theorem existsRatHint_of_ratHintsExhaustive {n : Nat} (f : DefaultFormula n) dsimp at * omega simp only [List.get_eq_getElem, Array.toList_map, Array.length_toList, List.getElem_map] at h' - rw [← Array.getElem_eq_getElem_toList] at h' - rw [← Array.getElem_eq_getElem_toList] at c'_in_f + rw [Array.getElem_toList] at h' + rw [Array.getElem_toList] at c'_in_f exists ⟨j.1, j_in_bounds⟩ simp [getElem!, h', i_lt_f_clauses_size, dite_true, c'_in_f, decidableGetElem?] diff --git a/src/Std/Tactic/BVDecide/LRAT/Internal/Formula/RupAddResult.lean b/src/Std/Tactic/BVDecide/LRAT/Internal/Formula/RupAddResult.lean index 2407b761393e..4ba79bcc390f 100644 --- a/src/Std/Tactic/BVDecide/LRAT/Internal/Formula/RupAddResult.lean +++ b/src/Std/Tactic/BVDecide/LRAT/Internal/Formula/RupAddResult.lean @@ -1133,25 +1133,24 @@ theorem nodup_derivedLits {n : Nat} (f : DefaultFormula n) specialize h3 ⟨j.1, j_in_bounds⟩ j_ne_k simp only [derivedLits_arr_def, Fin.getElem_fin] at li_eq_lj simp only [Fin.getElem_fin, derivedLits_arr_def, ne_eq, li, li_eq_lj] at h3 - simp only [List.get_eq_getElem, Array.getElem_eq_getElem_toList, not_true_eq_false] at h3 + simp only [List.get_eq_getElem, ← Array.getElem_toList, not_true_eq_false] at h3 · next k_ne_i => have i_ne_k : ⟨i.1, i_in_bounds⟩ ≠ k := by intro i_eq_k; simp only [← i_eq_k, not_true] at k_ne_i specialize h3 ⟨i.1, i_in_bounds⟩ i_ne_k - simp +decide [Fin.getElem_fin, derivedLits_arr_def, ne_eq, - Array.getElem_eq_getElem_toList, li] at h3 + simp +decide [Fin.getElem_fin, derivedLits_arr_def, ne_eq, li] at h3 · by_cases li.2 = true · next li_eq_true => have i_ne_k2 : ⟨i.1, i_in_bounds⟩ ≠ k2 := by intro i_eq_k2 rw [← i_eq_k2] at k2_eq_false simp only [List.get_eq_getElem] at k2_eq_false - simp [derivedLits_arr_def, Array.getElem_eq_getElem_toList, k2_eq_false, li] at li_eq_true + simp [derivedLits_arr_def, k2_eq_false, li] at li_eq_true have j_ne_k2 : ⟨j.1, j_in_bounds⟩ ≠ k2 := by intro j_eq_k2 rw [← j_eq_k2] at k2_eq_false simp only [List.get_eq_getElem] at k2_eq_false - simp only [derivedLits_arr_def, Fin.getElem_fin, Array.getElem_eq_getElem_toList] at li_eq_lj - simp [derivedLits_arr_def, Array.getElem_eq_getElem_toList, k2_eq_false, li_eq_lj, li] at li_eq_true + simp only [derivedLits_arr_def, Fin.getElem_fin] at li_eq_lj + simp [derivedLits_arr_def, k2_eq_false, li_eq_lj, li] at li_eq_true by_cases ⟨i.1, i_in_bounds⟩ = k1 · next i_eq_k1 => have j_ne_k1 : ⟨j.1, j_in_bounds⟩ ≠ k1 := by @@ -1160,12 +1159,11 @@ theorem nodup_derivedLits {n : Nat} (f : DefaultFormula n) simp only [Fin.mk.injEq] at i_eq_k1 exact i_ne_j (Fin.eq_of_val_eq i_eq_k1) specialize h3 ⟨j.1, j_in_bounds⟩ j_ne_k1 j_ne_k2 - simp [li, li_eq_lj, derivedLits_arr_def, Array.getElem_eq_getElem_toList] at h3 + simp [li, li_eq_lj, derivedLits_arr_def] at h3 · next i_ne_k1 => specialize h3 ⟨i.1, i_in_bounds⟩ i_ne_k1 i_ne_k2 apply h3 - simp +decide only [Fin.getElem_fin, Array.getElem_eq_getElem_toList, - ne_eq, derivedLits_arr_def, li] + simp +decide only [Fin.getElem_fin, ne_eq, derivedLits_arr_def, li] rfl · next li_eq_false => simp only [Bool.not_eq_true] at li_eq_false @@ -1173,13 +1171,13 @@ theorem nodup_derivedLits {n : Nat} (f : DefaultFormula n) intro i_eq_k1 rw [← i_eq_k1] at k1_eq_true simp only [List.get_eq_getElem] at k1_eq_true - simp [derivedLits_arr_def, Array.getElem_eq_getElem_toList, k1_eq_true, li] at li_eq_false + simp [derivedLits_arr_def, k1_eq_true, li] at li_eq_false have j_ne_k1 : ⟨j.1, j_in_bounds⟩ ≠ k1 := by intro j_eq_k1 rw [← j_eq_k1] at k1_eq_true simp only [List.get_eq_getElem] at k1_eq_true - simp only [derivedLits_arr_def, Fin.getElem_fin, Array.getElem_eq_getElem_toList] at li_eq_lj - simp [derivedLits_arr_def, Array.getElem_eq_getElem_toList, k1_eq_true, li_eq_lj, li] at li_eq_false + simp only [derivedLits_arr_def, Fin.getElem_fin] at li_eq_lj + simp [derivedLits_arr_def, k1_eq_true, li_eq_lj, li] at li_eq_false by_cases ⟨i.1, i_in_bounds⟩ = k2 · next i_eq_k2 => have j_ne_k2 : ⟨j.1, j_in_bounds⟩ ≠ k2 := by @@ -1188,10 +1186,10 @@ theorem nodup_derivedLits {n : Nat} (f : DefaultFormula n) simp only [Fin.mk.injEq] at i_eq_k2 exact i_ne_j (Fin.eq_of_val_eq i_eq_k2) specialize h3 ⟨j.1, j_in_bounds⟩ j_ne_k1 j_ne_k2 - simp [li, li_eq_lj, derivedLits_arr_def, Array.getElem_eq_getElem_toList] at h3 + simp [li, li_eq_lj, derivedLits_arr_def] at h3 · next i_ne_k2 => specialize h3 ⟨i.1, i_in_bounds⟩ i_ne_k1 i_ne_k2 - simp +decide [Array.getElem_eq_getElem_toList, derivedLits_arr_def, li] at h3 + simp +decide [derivedLits_arr_def, li] at h3 theorem restoreAssignments_performRupCheck_base_case {n : Nat} (f : DefaultFormula n) (f_assignments_size : f.assignments.size = n) @@ -1225,7 +1223,7 @@ theorem restoreAssignments_performRupCheck_base_case {n : Nat} (f : DefaultFormu constructor · apply Nat.zero_le · constructor - · simp only [derivedLits_arr_def, Fin.getElem_fin, Array.getElem_eq_getElem_toList, ← j_eq_i] + · simp only [derivedLits_arr_def, Fin.getElem_fin, ← j_eq_i] rfl · apply And.intro h1 ∘ And.intro h2 intro k _ k_ne_j @@ -1237,7 +1235,7 @@ theorem restoreAssignments_performRupCheck_base_case {n : Nat} (f : DefaultFormu apply Fin.ne_of_val_ne simp only exact Fin.val_ne_of_ne k_ne_j - simp only [Fin.getElem_fin, Array.getElem_eq_getElem_toList, ne_eq, derivedLits_arr_def] + simp only [Fin.getElem_fin, ne_eq, derivedLits_arr_def] exact h3 ⟨k.1, k_in_bounds⟩ k_ne_j · apply Or.inr ∘ Or.inr have j1_lt_derivedLits_arr_size : j1.1 < derivedLits_arr.size := by @@ -1251,11 +1249,11 @@ theorem restoreAssignments_performRupCheck_base_case {n : Nat} (f : DefaultFormu ⟨j2.1, j2_lt_derivedLits_arr_size⟩, i_gt_zero, Nat.zero_le j1.1, Nat.zero_le j2.1, ?_⟩ constructor - · simp only [derivedLits_arr_def, Fin.getElem_fin, Array.getElem_eq_getElem_toList, ← j1_eq_i] + · simp only [derivedLits_arr_def, Fin.getElem_fin, ← j1_eq_i] rw [← j1_eq_true] rfl · constructor - · simp only [derivedLits_arr_def, Fin.getElem_fin, Array.getElem_eq_getElem_toList, ← j2_eq_i] + · simp only [derivedLits_arr_def, Fin.getElem_fin, ← j2_eq_i] rw [← j2_eq_false] rfl · apply And.intro h1 ∘ And.intro h2 @@ -1272,7 +1270,7 @@ theorem restoreAssignments_performRupCheck_base_case {n : Nat} (f : DefaultFormu apply Fin.ne_of_val_ne simp only exact Fin.val_ne_of_ne k_ne_j2 - simp only [Fin.getElem_fin, Array.getElem_eq_getElem_toList, ne_eq, derivedLits_arr_def] + simp only [Fin.getElem_fin, ne_eq, derivedLits_arr_def] exact h3 ⟨k.1, k_in_bounds⟩ k_ne_j1 k_ne_j2 theorem restoreAssignments_performRupCheck {n : Nat} (f : DefaultFormula n) (f_assignments_size : f.assignments.size = n) diff --git a/stage0/stdlib/Init/Data/Array.c b/stage0/stdlib/Init/Data/Array.c index 8ff601e1d92f..508fbb748cc3 100644 --- a/stage0/stdlib/Init/Data/Array.c +++ b/stage0/stdlib/Init/Data/Array.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Init.Data.Array -// Imports: Init.Data.Array.Basic Init.Data.Array.QSort Init.Data.Array.BinSearch Init.Data.Array.InsertionSort Init.Data.Array.DecidableEq Init.Data.Array.Mem Init.Data.Array.Attach Init.Data.Array.BasicAux Init.Data.Array.Lemmas Init.Data.Array.TakeDrop Init.Data.Array.Bootstrap Init.Data.Array.GetLit Init.Data.Array.MapIdx Init.Data.Array.Set Init.Data.Array.Monadic Init.Data.Array.FinRange Init.Data.Array.Perm +// Imports: Init.Data.Array.Basic Init.Data.Array.QSort Init.Data.Array.BinSearch Init.Data.Array.InsertionSort Init.Data.Array.DecidableEq Init.Data.Array.Mem Init.Data.Array.Attach Init.Data.Array.BasicAux Init.Data.Array.Lemmas Init.Data.Array.TakeDrop Init.Data.Array.Bootstrap Init.Data.Array.GetLit Init.Data.Array.MapIdx Init.Data.Array.Set Init.Data.Array.Monadic Init.Data.Array.FinRange Init.Data.Array.Perm Init.Data.Array.Find #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -30,6 +30,7 @@ lean_object* initialize_Init_Data_Array_Set(uint8_t builtin, lean_object*); lean_object* initialize_Init_Data_Array_Monadic(uint8_t builtin, lean_object*); lean_object* initialize_Init_Data_Array_FinRange(uint8_t builtin, lean_object*); lean_object* initialize_Init_Data_Array_Perm(uint8_t builtin, lean_object*); +lean_object* initialize_Init_Data_Array_Find(uint8_t builtin, lean_object*); static bool _G_initialized = false; LEAN_EXPORT lean_object* initialize_Init_Data_Array(uint8_t builtin, lean_object* w) { lean_object * res; @@ -86,6 +87,9 @@ lean_dec_ref(res); res = initialize_Init_Data_Array_Perm(builtin, lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Init_Data_Array_Find(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Init/Data/Array/Basic.c b/stage0/stdlib/Init/Data/Array/Basic.c index 86b9b4b05dd4..ca6b224a948b 100644 --- a/stage0/stdlib/Init/Data/Array/Basic.c +++ b/stage0/stdlib/Init/Data/Array/Basic.c @@ -126,7 +126,6 @@ LEAN_EXPORT lean_object* l_Array_instGetElemUSizeLtNatToNatSize(lean_object*); lean_object* lean_array_swap(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_zipWithAll_go(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_panic___at_Array_swapAt_x21___spec__1___rarg(lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l___auto____x40_Init_Data_Array_Basic___hyg_10897_; lean_object* lean_array_fget(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Array_reduceOption___spec__2___rarg(lean_object*, size_t, size_t, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Array_forM___spec__1___rarg(lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*); @@ -339,6 +338,7 @@ lean_object* l_Lean_Syntax_node3(lean_object*, lean_object*, lean_object*, lean_ static lean_object* l_Array_insertIdx_x21___rarg___closed__2; static lean_object* l_term_x23_x5b___x2c_x5d___closed__12; static lean_object* l_Array_instRepr___rarg___closed__9; +LEAN_EXPORT lean_object* l___auto____x40_Init_Data_Array_Basic___hyg_10704_; LEAN_EXPORT lean_object* l_Array_foldl(lean_object*, lean_object*); static lean_object* l___auto____x40_Init_Data_Array_Basic___hyg_1547____closed__9; LEAN_EXPORT lean_object* l_Array_concatMap(lean_object*, lean_object*); @@ -653,7 +653,7 @@ static lean_object* l_Array_instToString___rarg___closed__1; uint8_t lean_usize_dec_lt(size_t, size_t); static lean_object* l___auto____x40_Init_Data_Array_Basic___hyg_1547____closed__6; LEAN_EXPORT lean_object* l_Array_eraseIdx_x21___rarg(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l___auto____x40_Init_Data_Array_Basic___hyg_10528_; +LEAN_EXPORT lean_object* l___auto____x40_Init_Data_Array_Basic___hyg_11073_; LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Array_any___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_eraseReps(lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Array_unzip___spec__1___rarg(lean_object*, size_t, size_t, lean_object*); @@ -6684,7 +6684,7 @@ static lean_object* _init_l_Array_findSome_x21___rarg___closed__3() { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Array_swapAt_x21___rarg___closed__3; x_2 = l_Array_findSome_x21___rarg___closed__1; -x_3 = lean_unsigned_to_nat(599u); +x_3 = lean_unsigned_to_nat(607u); x_4 = lean_unsigned_to_nat(14u); x_5 = l_Array_findSome_x21___rarg___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -9930,7 +9930,7 @@ lean_dec(x_2); return x_3; } } -static lean_object* _init_l___auto____x40_Init_Data_Array_Basic___hyg_10528_() { +static lean_object* _init_l___auto____x40_Init_Data_Array_Basic___hyg_10704_() { _start: { lean_object* x_1; @@ -10042,7 +10042,7 @@ static lean_object* _init_l_Array_eraseIdx_x21___rarg___closed__3() { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Array_swapAt_x21___rarg___closed__3; x_2 = l_Array_eraseIdx_x21___rarg___closed__1; -x_3 = lean_unsigned_to_nat(821u); +x_3 = lean_unsigned_to_nat(829u); x_4 = lean_unsigned_to_nat(45u); x_5 = l_Array_eraseIdx_x21___rarg___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -10139,7 +10139,7 @@ x_2 = lean_alloc_closure((void*)(l_Array_eraseP___rarg), 2, 0); return x_2; } } -static lean_object* _init_l___auto____x40_Init_Data_Array_Basic___hyg_10897_() { +static lean_object* _init_l___auto____x40_Init_Data_Array_Basic___hyg_11073_() { _start: { lean_object* x_1; @@ -10272,7 +10272,7 @@ static lean_object* _init_l_Array_insertIdx_x21___rarg___closed__2() { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Array_swapAt_x21___rarg___closed__3; x_2 = l_Array_insertIdx_x21___rarg___closed__1; -x_3 = lean_unsigned_to_nat(855u); +x_3 = lean_unsigned_to_nat(863u); x_4 = lean_unsigned_to_nat(7u); x_5 = l_Array_eraseIdx_x21___rarg___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -12251,16 +12251,16 @@ l_Array_filter___rarg___closed__1 = _init_l_Array_filter___rarg___closed__1(); lean_mark_persistent(l_Array_filter___rarg___closed__1); l_Array_partition___rarg___closed__1 = _init_l_Array_partition___rarg___closed__1(); lean_mark_persistent(l_Array_partition___rarg___closed__1); -l___auto____x40_Init_Data_Array_Basic___hyg_10528_ = _init_l___auto____x40_Init_Data_Array_Basic___hyg_10528_(); -lean_mark_persistent(l___auto____x40_Init_Data_Array_Basic___hyg_10528_); +l___auto____x40_Init_Data_Array_Basic___hyg_10704_ = _init_l___auto____x40_Init_Data_Array_Basic___hyg_10704_(); +lean_mark_persistent(l___auto____x40_Init_Data_Array_Basic___hyg_10704_); l_Array_eraseIdx_x21___rarg___closed__1 = _init_l_Array_eraseIdx_x21___rarg___closed__1(); lean_mark_persistent(l_Array_eraseIdx_x21___rarg___closed__1); l_Array_eraseIdx_x21___rarg___closed__2 = _init_l_Array_eraseIdx_x21___rarg___closed__2(); lean_mark_persistent(l_Array_eraseIdx_x21___rarg___closed__2); l_Array_eraseIdx_x21___rarg___closed__3 = _init_l_Array_eraseIdx_x21___rarg___closed__3(); lean_mark_persistent(l_Array_eraseIdx_x21___rarg___closed__3); -l___auto____x40_Init_Data_Array_Basic___hyg_10897_ = _init_l___auto____x40_Init_Data_Array_Basic___hyg_10897_(); -lean_mark_persistent(l___auto____x40_Init_Data_Array_Basic___hyg_10897_); +l___auto____x40_Init_Data_Array_Basic___hyg_11073_ = _init_l___auto____x40_Init_Data_Array_Basic___hyg_11073_(); +lean_mark_persistent(l___auto____x40_Init_Data_Array_Basic___hyg_11073_); l_Array_insertIdx_x21___rarg___closed__1 = _init_l_Array_insertIdx_x21___rarg___closed__1(); lean_mark_persistent(l_Array_insertIdx_x21___rarg___closed__1); l_Array_insertIdx_x21___rarg___closed__2 = _init_l_Array_insertIdx_x21___rarg___closed__2(); diff --git a/stage0/stdlib/Init/Data/Array/Lemmas.c b/stage0/stdlib/Init/Data/Array/Lemmas.c index 5bc9d3489fd9..0f9709bd58d6 100644 --- a/stage0/stdlib/Init/Data/Array/Lemmas.c +++ b/stage0/stdlib/Init/Data/Array/Lemmas.c @@ -17,6 +17,7 @@ LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__Array_take_loop_m LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__Array_findSomeRevM_x3f_find_match__1_splitter___rarg(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__Array_findSomeRevM_x3f_find_match__1_splitter___rarg___boxed(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__Array_findM_x3f_match__1_splitter___rarg___boxed(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__List_filter_match__1_splitter(lean_object*); LEAN_EXPORT lean_object* l_Array_toListRev___rarg___boxed(lean_object*); LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__Array_foldlM_loop_match__1_splitter___rarg(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Array_toListRev___spec__1___rarg(lean_object*, size_t, size_t, lean_object*); @@ -50,6 +51,7 @@ LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__Array_findSomeM_x LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__List_filterMap_match__1_splitter(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Array_toListRev___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__Array_findM_x3f_match__1_splitter(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__List_filter_match__1_splitter___rarg(uint8_t, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__Array_isEqvAux_match__1_splitter___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__List_forIn_x27__cons_match__1_splitter___rarg(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__List_findSomeM_x3f_match__1_splitter___rarg(lean_object*, lean_object*, lean_object*); @@ -58,6 +60,7 @@ LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__Array_findSomeM_x LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__Array_take_loop_match__1_splitter(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__Array_findSomeRevM_x3f_find_match__1_splitter(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Array_toListRev___spec__1(lean_object*); +LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__List_filter_match__1_splitter___rarg___boxed(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__Array_foldl__filterMap_match__1_splitter___rarg(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__List_anyM_match__1_splitter___rarg___boxed(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__Array_foldlM_loop_match__1_splitter___rarg___boxed(lean_object*, lean_object*, lean_object*); @@ -449,6 +452,41 @@ lean_dec(x_2); return x_5; } } +LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__List_filter_match__1_splitter___rarg(uint8_t x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (x_1 == 0) +{ +lean_inc(x_3); +return x_3; +} +else +{ +lean_inc(x_2); +return x_2; +} +} +} +LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__List_filter_match__1_splitter(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l___private_Init_Data_Array_Lemmas_0__List_filter_match__1_splitter___rarg___boxed), 3, 0); +return x_2; +} +} +LEAN_EXPORT lean_object* l___private_Init_Data_Array_Lemmas_0__List_filter_match__1_splitter___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; lean_object* x_5; +x_4 = lean_unbox(x_1); +lean_dec(x_1); +x_5 = l___private_Init_Data_Array_Lemmas_0__List_filter_match__1_splitter___rarg(x_4, x_2, x_3); +lean_dec(x_3); +lean_dec(x_2); +return x_5; +} +} LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Array_toListRev___spec__1___rarg(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { _start: { diff --git a/stage0/stdlib/Init/Data/Bool.c b/stage0/stdlib/Init/Data/Bool.c index 4440fff1a581..984067bb7718 100644 --- a/stage0/stdlib/Init/Data/Bool.c +++ b/stage0/stdlib/Init/Data/Bool.c @@ -14,6 +14,7 @@ extern "C" { #endif LEAN_EXPORT lean_object* l_Bool_instDecidableForallOfDecidablePred(lean_object*); +LEAN_EXPORT lean_object* l_Bool_toInt___boxed(lean_object*); static lean_object* l_Bool___aux__Init__Data__Bool______macroRules__Bool__term___x5e_x5e____1___closed__4; static lean_object* l_Bool_term___x5e_x5e_____closed__10; LEAN_EXPORT uint8_t l_Bool_instMin(uint8_t, uint8_t); @@ -32,9 +33,11 @@ static lean_object* l_Bool___aux__Init__Data__Bool______macroRules__Bool__term__ static lean_object* l_Bool_term___x5e_x5e_____closed__5; static lean_object* l_Bool___aux__Init__Data__Bool______macroRules__Bool__term___x5e_x5e____1___closed__1; lean_object* l_Lean_SourceInfo_fromRef(lean_object*, uint8_t); +lean_object* lean_nat_to_int(lean_object*); LEAN_EXPORT lean_object* l_boolRelToRel(lean_object*); static lean_object* l_Bool___aux__Init__Data__Bool______macroRules__Bool__term___x5e_x5e____1___closed__5; static lean_object* l_Bool_term___x5e_x5e_____closed__9; +static lean_object* l_Bool_toInt___closed__2; LEAN_EXPORT lean_object* l_Bool_toNat___boxed(lean_object*); lean_object* l_Lean_Syntax_node3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Bool_instLT; @@ -62,6 +65,7 @@ static lean_object* l_Bool_term___x5e_x5e_____closed__2; lean_object* l_Lean_Name_mkStr2(lean_object*, lean_object*); static lean_object* l_Bool___aux__Init__Data__Bool______macroRules__Bool__term___x5e_x5e____1___closed__8; LEAN_EXPORT lean_object* l_Bool___aux__Init__Data__Bool______macroRules__Bool__term___x5e_x5e____1(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Bool_toInt(uint8_t); static lean_object* l_Bool___aux__Init__Data__Bool______macroRules__Bool__term___x5e_x5e____1___closed__6; static lean_object* l_Bool___aux__Init__Data__Bool______macroRules__Bool__term___x5e_x5e____1___closed__11; LEAN_EXPORT uint8_t l_Bool_instDecidableLe(uint8_t, uint8_t); @@ -70,6 +74,7 @@ static lean_object* l_Bool___aux__Init__Data__Bool______macroRules__Bool__term__ static lean_object* l_Bool___aux__Init__Data__Bool______unexpand__Bool__xor__1___closed__2; LEAN_EXPORT lean_object* l_Bool_instDecidableExistsOfDecidablePred___rarg(lean_object*); static lean_object* l_Bool___aux__Init__Data__Bool______unexpand__Bool__xor__1___closed__1; +static lean_object* l_Bool_toInt___closed__1; static lean_object* l_Bool_term___x5e_x5e_____closed__11; lean_object* l_Lean_Name_mkStr4(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Bool_instMax___boxed(lean_object*, lean_object*); @@ -760,6 +765,51 @@ x_3 = l_Bool_toNat(x_2); return x_3; } } +static lean_object* _init_l_Bool_toInt___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(0u); +x_2 = lean_nat_to_int(x_1); +return x_2; +} +} +static lean_object* _init_l_Bool_toInt___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(1u); +x_2 = lean_nat_to_int(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Bool_toInt(uint8_t x_1) { +_start: +{ +if (x_1 == 0) +{ +lean_object* x_2; +x_2 = l_Bool_toInt___closed__1; +return x_2; +} +else +{ +lean_object* x_3; +x_3 = l_Bool_toInt___closed__2; +return x_3; +} +} +} +LEAN_EXPORT lean_object* l_Bool_toInt___boxed(lean_object* x_1) { +_start: +{ +uint8_t x_2; lean_object* x_3; +x_2 = lean_unbox(x_1); +lean_dec(x_1); +x_3 = l_Bool_toInt(x_2); +return x_3; +} +} LEAN_EXPORT lean_object* l_boolPredToPred(lean_object* x_1) { _start: { @@ -841,6 +891,10 @@ l_Bool_instLE = _init_l_Bool_instLE(); lean_mark_persistent(l_Bool_instLE); l_Bool_instLT = _init_l_Bool_instLT(); lean_mark_persistent(l_Bool_instLT); +l_Bool_toInt___closed__1 = _init_l_Bool_toInt___closed__1(); +lean_mark_persistent(l_Bool_toInt___closed__1); +l_Bool_toInt___closed__2 = _init_l_Bool_toInt___closed__2(); +lean_mark_persistent(l_Bool_toInt___closed__2); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Init/Data/Option.c b/stage0/stdlib/Init/Data/Option.c index dcb9f197b08e..4e7f94aef366 100644 --- a/stage0/stdlib/Init/Data/Option.c +++ b/stage0/stdlib/Init/Data/Option.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Init.Data.Option -// Imports: Init.Data.Option.Basic Init.Data.Option.BasicAux Init.Data.Option.Instances Init.Data.Option.Lemmas Init.Data.Option.Attach Init.Data.Option.List +// Imports: Init.Data.Option.Basic Init.Data.Option.BasicAux Init.Data.Option.Instances Init.Data.Option.Lemmas Init.Data.Option.Attach Init.Data.Option.List Init.Data.Option.Monadic #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -19,6 +19,7 @@ lean_object* initialize_Init_Data_Option_Instances(uint8_t builtin, lean_object* lean_object* initialize_Init_Data_Option_Lemmas(uint8_t builtin, lean_object*); lean_object* initialize_Init_Data_Option_Attach(uint8_t builtin, lean_object*); lean_object* initialize_Init_Data_Option_List(uint8_t builtin, lean_object*); +lean_object* initialize_Init_Data_Option_Monadic(uint8_t builtin, lean_object*); static bool _G_initialized = false; LEAN_EXPORT lean_object* initialize_Init_Data_Option(uint8_t builtin, lean_object* w) { lean_object * res; @@ -42,6 +43,9 @@ lean_dec_ref(res); res = initialize_Init_Data_Option_List(builtin, lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Init_Data_Option_Monadic(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Init/Data/Option/Instances.c b/stage0/stdlib/Init/Data/Option/Instances.c index 807be1362b0d..c6aa12bfabc3 100644 --- a/stage0/stdlib/Init/Data/Option/Instances.c +++ b/stage0/stdlib/Init/Data/Option/Instances.c @@ -14,8 +14,11 @@ extern "C" { #endif LEAN_EXPORT lean_object* l_Option_forM(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Option_pelim___rarg(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Option_instMembership(lean_object*); +LEAN_EXPORT lean_object* l_Option_pelim___rarg___boxed(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Option_instDecidableExistsAndMemOfDecidablePred___rarg(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Option_pelim(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Option_instDecidableForallForallMemOfDecidablePred___rarg(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Option_instDecidableMemOfDecidableEq___rarg(lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Option_decidable__eq__none___rarg(lean_object*); @@ -229,6 +232,43 @@ x_4 = lean_alloc_closure((void*)(l_Option_pmap___rarg), 3, 0); return x_4; } } +LEAN_EXPORT lean_object* l_Option_pelim___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_dec(x_3); +lean_inc(x_2); +return x_2; +} +else +{ +lean_object* x_4; lean_object* x_5; +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_apply_2(x_3, x_4, lean_box(0)); +return x_5; +} +} +} +LEAN_EXPORT lean_object* l_Option_pelim(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Option_pelim___rarg___boxed), 3, 0); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Option_pelim___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Option_pelim___rarg(x_1, x_2, x_3); +lean_dec(x_2); +return x_4; +} +} LEAN_EXPORT lean_object* l_Option_forM___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { diff --git a/stage0/stdlib/Init/Data/Option/List.c b/stage0/stdlib/Init/Data/Option/List.c index 2c66140461bb..284cf5a10b18 100644 --- a/stage0/stdlib/Init/Data/Option/List.c +++ b/stage0/stdlib/Init/Data/Option/List.c @@ -13,6 +13,41 @@ #ifdef __cplusplus extern "C" { #endif +LEAN_EXPORT lean_object* l___private_Init_Data_Option_List_0__Option_instForIn_x27InferInstanceMembership_match__1_splitter(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Init_Data_Option_List_0__Option_instForIn_x27InferInstanceMembership_match__1_splitter___rarg(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Init_Data_Option_List_0__Option_instForIn_x27InferInstanceMembership_match__1_splitter___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_4; lean_object* x_5; +lean_dec(x_3); +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_apply_1(x_2, x_4); +return x_5; +} +else +{ +lean_object* x_6; lean_object* x_7; +lean_dec(x_2); +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +lean_dec(x_1); +x_7 = lean_apply_1(x_3, x_6); +return x_7; +} +} +} +LEAN_EXPORT lean_object* l___private_Init_Data_Option_List_0__Option_instForIn_x27InferInstanceMembership_match__1_splitter(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l___private_Init_Data_Option_List_0__Option_instForIn_x27InferInstanceMembership_match__1_splitter___rarg), 3, 0); +return x_3; +} +} lean_object* initialize_Init_Data_List_Lemmas(uint8_t builtin, lean_object*); static bool _G_initialized = false; LEAN_EXPORT lean_object* initialize_Init_Data_Option_List(uint8_t builtin, lean_object* w) { diff --git a/stage0/stdlib/Init/Data/Option/Monadic.c b/stage0/stdlib/Init/Data/Option/Monadic.c new file mode 100644 index 000000000000..1cb652dad67f --- /dev/null +++ b/stage0/stdlib/Init/Data/Option/Monadic.c @@ -0,0 +1,33 @@ +// Lean compiler output +// Module: Init.Data.Option.Monadic +// Imports: Init.Data.Option.Attach Init.Control.Lawful.Basic +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init_Data_Option_Attach(uint8_t builtin, lean_object*); +lean_object* initialize_Init_Control_Lawful_Basic(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_Init_Data_Option_Monadic(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init_Data_Option_Attach(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Init_Control_Lawful_Basic(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/stage0/stdlib/Lean/Compiler/LCNF/ToLCNF.c b/stage0/stdlib/Lean/Compiler/LCNF/ToLCNF.c index f0cecc55ef48..541e6165c8dc 100644 --- a/stage0/stdlib/Lean/Compiler/LCNF/ToLCNF.c +++ b/stage0/stdlib/Lean/Compiler/LCNF/ToLCNF.c @@ -77,6 +77,7 @@ LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAux___at_Lean_Compiler_LCN LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCtor(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitNoConfusion(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isAppOfArity(lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__25; static lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitLambda___closed__1; static lean_object* l_panic___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___spec__5___closed__1; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_bindCases_visitAlts___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -260,8 +261,10 @@ static lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__1; LEAN_EXPORT lean_object* l_Std_DHashMap_Internal_Raw_u2080_expand_go___at___private_Lean_Compiler_LCNF_ToLCNF_0__Lean_Compiler_LCNF_ToLCNF_isTypeFormerType___spec__3(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_etaExpandN___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitNoConfusion___closed__3; +static lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__23; extern lean_object* l_Lean_instInhabitedExpr; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visit(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitHEqRec___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_mkAuxLetDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCases___lambda__1___closed__6; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_bindCases_go___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -336,6 +339,7 @@ LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux_traverse___at_Lean_C LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_ToLCNF_bindCases_go___spec__5(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_ToLCNF_bindCases_go___closed__9; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_bindCases_findFun_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitHEqRec___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__16; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitEqRec___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Compiler_LCNF_getCasesInfo_x3f(lean_object*, lean_object*, lean_object*, lean_object*); @@ -363,6 +367,7 @@ uint8_t lean_nat_dec_lt(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visit___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitFalseRec___closed__1; LEAN_EXPORT lean_object* l_Std_Range_forIn_x27_loop___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCases___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__26; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNFType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_mkStr2(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCtor___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -393,6 +398,7 @@ LEAN_EXPORT lean_object* l_Std_DHashMap_Internal_Raw_u2080_expand___at___private LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProj(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNFType___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PersistentHashMap_mkCollisionNode___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__24; lean_object* l_Lean_PersistentHashMap_mkEmptyEntriesArray(lean_object*, lean_object*); lean_object* l_Array_ofSubarray___rarg(lean_object*); lean_object* l_Lean_RBNode_insert___at_Lean_FVarIdSet_insert___spec__1(lean_object*, lean_object*, lean_object*); @@ -474,6 +480,7 @@ lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_PersistentHashMap_getCollisionNodeSize___rarg(lean_object*); static lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__8; lean_object* l_Lean_Compiler_LCNF_mkAuxFunDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitHEqRec(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_lam___override(lean_object*, lean_object*, lean_object*, uint8_t); lean_object* l_Lean_Expr_beta(lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__2; @@ -15674,7 +15681,7 @@ static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__ _start: { lean_object* x_1; -x_1 = lean_mk_string_unchecked("And", 3, 3); +x_1 = lean_mk_string_unchecked("HEq", 3, 3); return x_1; } } @@ -15683,7 +15690,7 @@ static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__ { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__11; -x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__9; +x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__7; x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; } @@ -15691,42 +15698,80 @@ return x_3; static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__13() { _start: { +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__11; +x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__9; +x_3 = l_Lean_Name_mkStr2(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__14() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__11; +x_2 = l_Lean_Compiler_LCNF_ToLCNF_mustEtaExpand___closed__4; +x_3 = l_Lean_Name_mkStr2(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__15() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_unchecked("And", 3, 3); +return x_1; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__16() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__15; +x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__9; +x_3 = l_Lean_Name_mkStr2(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__17() { +_start: +{ lean_object* x_1; x_1 = lean_mk_string_unchecked("Iff", 3, 3); return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__14() { +static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__18() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__13; +x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__17; x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__9; x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__15() { +static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__19() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__11; +x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__15; x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__7; x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__16() { +static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__20() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__13; +x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__17; x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__7; x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__17() { +static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__21() { _start: { lean_object* x_1; @@ -15734,17 +15779,17 @@ x_1 = lean_mk_string_unchecked("False", 5, 5); return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__18() { +static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__22() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__17; +x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__21; x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__9; x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__19() { +static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__23() { _start: { lean_object* x_1; @@ -15752,31 +15797,31 @@ x_1 = lean_mk_string_unchecked("Empty", 5, 5); return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__20() { +static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__24() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__19; +x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__23; x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__9; x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__21() { +static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__25() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__17; +x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__21; x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__7; x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__22() { +static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__26() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__19; +x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__23; x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__7; x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; @@ -15828,12 +15873,12 @@ x_22 = lean_name_eq(x_10, x_21); if (x_22 == 0) { lean_object* x_23; uint8_t x_24; -x_23 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__14; +x_23 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__13; x_24 = lean_name_eq(x_10, x_23); if (x_24 == 0) { lean_object* x_25; uint8_t x_26; -x_25 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__15; +x_25 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__14; x_26 = lean_name_eq(x_10, x_25); if (x_26 == 0) { @@ -15848,12 +15893,12 @@ x_30 = lean_name_eq(x_10, x_29); if (x_30 == 0) { lean_object* x_31; uint8_t x_32; -x_31 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__20; +x_31 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__19; x_32 = lean_name_eq(x_10, x_31); if (x_32 == 0) { lean_object* x_33; uint8_t x_34; -x_33 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__21; +x_33 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__20; x_34 = lean_name_eq(x_10, x_33); if (x_34 == 0) { @@ -15862,110 +15907,125 @@ x_35 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__22; x_36 = lean_name_eq(x_10, x_35); if (x_36 == 0) { -lean_object* x_37; -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_10); -x_37 = l_Lean_Compiler_LCNF_getCasesInfo_x3f(x_10, x_5, x_6, x_7); -if (lean_obj_tag(x_37) == 0) +lean_object* x_37; uint8_t x_38; +x_37 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__24; +x_38 = lean_name_eq(x_10, x_37); +if (x_38 == 0) { -lean_object* x_38; -x_38 = lean_ctor_get(x_37, 0); -lean_inc(x_38); -if (lean_obj_tag(x_38) == 0) +lean_object* x_39; uint8_t x_40; +x_39 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__25; +x_40 = lean_name_eq(x_10, x_39); +if (x_40 == 0) { -lean_object* x_39; lean_object* x_40; -x_39 = lean_ctor_get(x_37, 1); -lean_inc(x_39); -lean_dec(x_37); -lean_inc(x_10); -x_40 = l_Lean_Compiler_LCNF_getCtorArity_x3f(x_10, x_5, x_6, x_39); -if (lean_obj_tag(x_40) == 0) +lean_object* x_41; uint8_t x_42; +x_41 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__26; +x_42 = lean_name_eq(x_10, x_41); +if (x_42 == 0) { -lean_object* x_41; -x_41 = lean_ctor_get(x_40, 0); -lean_inc(x_41); -if (lean_obj_tag(x_41) == 0) +lean_object* x_43; +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_10); +x_43 = l_Lean_Compiler_LCNF_getCasesInfo_x3f(x_10, x_5, x_6, x_7); +if (lean_obj_tag(x_43) == 0) { -lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; uint8_t x_48; -x_42 = lean_ctor_get(x_40, 1); -lean_inc(x_42); -lean_dec(x_40); -x_43 = lean_st_ref_get(x_6, x_42); +lean_object* x_44; x_44 = lean_ctor_get(x_43, 0); lean_inc(x_44); +if (lean_obj_tag(x_44) == 0) +{ +lean_object* x_45; lean_object* x_46; x_45 = lean_ctor_get(x_43, 1); lean_inc(x_45); lean_dec(x_43); -x_46 = lean_ctor_get(x_44, 0); -lean_inc(x_46); -lean_dec(x_44); -x_47 = l_Lean_Compiler_LCNF_ToLCNF_mustEtaExpand___closed__1; -x_48 = l_Lean_TagDeclarationExtension_isTagged(x_47, x_46, x_10); -lean_dec(x_46); -if (x_48 == 0) +lean_inc(x_10); +x_46 = l_Lean_Compiler_LCNF_getCtorArity_x3f(x_10, x_5, x_6, x_45); +if (lean_obj_tag(x_46) == 0) +{ +lean_object* x_47; +x_47 = lean_ctor_get(x_46, 0); +lean_inc(x_47); +if (lean_obj_tag(x_47) == 0) { -lean_object* x_49; lean_object* x_50; -x_49 = l_Lean_getProjectionFnInfo_x3f___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___spec__3(x_10, x_2, x_3, x_4, x_5, x_6, x_45); +lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; uint8_t x_54; +x_48 = lean_ctor_get(x_46, 1); +lean_inc(x_48); +lean_dec(x_46); +x_49 = lean_st_ref_get(x_6, x_48); x_50 = lean_ctor_get(x_49, 0); lean_inc(x_50); -if (lean_obj_tag(x_50) == 0) -{ -lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; x_51 = lean_ctor_get(x_49, 1); lean_inc(x_51); lean_dec(x_49); -x_52 = lean_unsigned_to_nat(0u); -x_53 = l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(x_1, x_52); -x_54 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__1; -lean_inc(x_53); -x_55 = lean_mk_array(x_53, x_54); -x_56 = lean_unsigned_to_nat(1u); -x_57 = lean_nat_sub(x_53, x_56); -lean_dec(x_53); -x_58 = l_Lean_Expr_withAppAux___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___spec__4(x_1, x_55, x_57, x_2, x_3, x_4, x_5, x_6, x_51); -return x_58; +x_52 = lean_ctor_get(x_50, 0); +lean_inc(x_52); +lean_dec(x_50); +x_53 = l_Lean_Compiler_LCNF_ToLCNF_mustEtaExpand___closed__1; +x_54 = l_Lean_TagDeclarationExtension_isTagged(x_53, x_52, x_10); +lean_dec(x_52); +if (x_54 == 0) +{ +lean_object* x_55; lean_object* x_56; +x_55 = l_Lean_getProjectionFnInfo_x3f___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___spec__3(x_10, x_2, x_3, x_4, x_5, x_6, x_51); +x_56 = lean_ctor_get(x_55, 0); +lean_inc(x_56); +if (lean_obj_tag(x_56) == 0) +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_57 = lean_ctor_get(x_55, 1); +lean_inc(x_57); +lean_dec(x_55); +x_58 = lean_unsigned_to_nat(0u); +x_59 = l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(x_1, x_58); +x_60 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__1; +lean_inc(x_59); +x_61 = lean_mk_array(x_59, x_60); +x_62 = lean_unsigned_to_nat(1u); +x_63 = lean_nat_sub(x_59, x_62); +lean_dec(x_59); +x_64 = l_Lean_Expr_withAppAux___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___spec__4(x_1, x_61, x_63, x_2, x_3, x_4, x_5, x_6, x_57); +return x_64; } else { -lean_object* x_59; lean_object* x_60; lean_object* x_61; -x_59 = lean_ctor_get(x_49, 1); -lean_inc(x_59); -lean_dec(x_49); -x_60 = lean_ctor_get(x_50, 0); -lean_inc(x_60); -lean_dec(x_50); -x_61 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn(x_60, x_1, x_2, x_3, x_4, x_5, x_6, x_59); -lean_dec(x_60); -return x_61; +lean_object* x_65; lean_object* x_66; lean_object* x_67; +x_65 = lean_ctor_get(x_55, 1); +lean_inc(x_65); +lean_dec(x_55); +x_66 = lean_ctor_get(x_56, 0); +lean_inc(x_66); +lean_dec(x_56); +x_67 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn(x_66, x_1, x_2, x_3, x_4, x_5, x_6, x_65); +lean_dec(x_66); +return x_67; } } else { -lean_object* x_62; +lean_object* x_68; lean_dec(x_10); -x_62 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitNoConfusion(x_1, x_2, x_3, x_4, x_5, x_6, x_45); -return x_62; +x_68 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitNoConfusion(x_1, x_2, x_3, x_4, x_5, x_6, x_51); +return x_68; } } else { -lean_object* x_63; lean_object* x_64; lean_object* x_65; +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_dec(x_10); -x_63 = lean_ctor_get(x_40, 1); -lean_inc(x_63); -lean_dec(x_40); -x_64 = lean_ctor_get(x_41, 0); -lean_inc(x_64); -lean_dec(x_41); -x_65 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCtor(x_64, x_1, x_2, x_3, x_4, x_5, x_6, x_63); -lean_dec(x_64); -return x_65; +x_69 = lean_ctor_get(x_46, 1); +lean_inc(x_69); +lean_dec(x_46); +x_70 = lean_ctor_get(x_47, 0); +lean_inc(x_70); +lean_dec(x_47); +x_71 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCtor(x_70, x_1, x_2, x_3, x_4, x_5, x_6, x_69); +lean_dec(x_70); +return x_71; } } else { -uint8_t x_66; +uint8_t x_72; lean_dec(x_10); lean_dec(x_6); lean_dec(x_5); @@ -15973,43 +16033,43 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_66 = !lean_is_exclusive(x_40); -if (x_66 == 0) +x_72 = !lean_is_exclusive(x_46); +if (x_72 == 0) { -return x_40; +return x_46; } else { -lean_object* x_67; lean_object* x_68; lean_object* x_69; -x_67 = lean_ctor_get(x_40, 0); -x_68 = lean_ctor_get(x_40, 1); -lean_inc(x_68); -lean_inc(x_67); -lean_dec(x_40); -x_69 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_69, 0, x_67); -lean_ctor_set(x_69, 1, x_68); -return x_69; +lean_object* x_73; lean_object* x_74; lean_object* x_75; +x_73 = lean_ctor_get(x_46, 0); +x_74 = lean_ctor_get(x_46, 1); +lean_inc(x_74); +lean_inc(x_73); +lean_dec(x_46); +x_75 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_75, 0, x_73); +lean_ctor_set(x_75, 1, x_74); +return x_75; } } } else { -lean_object* x_70; lean_object* x_71; lean_object* x_72; +lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_dec(x_10); -x_70 = lean_ctor_get(x_37, 1); -lean_inc(x_70); -lean_dec(x_37); -x_71 = lean_ctor_get(x_38, 0); -lean_inc(x_71); -lean_dec(x_38); -x_72 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCases(x_71, x_1, x_2, x_3, x_4, x_5, x_6, x_70); -return x_72; +x_76 = lean_ctor_get(x_43, 1); +lean_inc(x_76); +lean_dec(x_43); +x_77 = lean_ctor_get(x_44, 0); +lean_inc(x_77); +lean_dec(x_44); +x_78 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCases(x_77, x_1, x_2, x_3, x_4, x_5, x_6, x_76); +return x_78; } } else { -uint8_t x_73; +uint8_t x_79; lean_dec(x_10); lean_dec(x_6); lean_dec(x_5); @@ -16017,184 +16077,208 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_73 = !lean_is_exclusive(x_37); -if (x_73 == 0) +x_79 = !lean_is_exclusive(x_43); +if (x_79 == 0) { -return x_37; +return x_43; } else { -lean_object* x_74; lean_object* x_75; lean_object* x_76; -x_74 = lean_ctor_get(x_37, 0); -x_75 = lean_ctor_get(x_37, 1); -lean_inc(x_75); -lean_inc(x_74); -lean_dec(x_37); -x_76 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_76, 0, x_74); -lean_ctor_set(x_76, 1, x_75); -return x_76; +lean_object* x_80; lean_object* x_81; lean_object* x_82; +x_80 = lean_ctor_get(x_43, 0); +x_81 = lean_ctor_get(x_43, 1); +lean_inc(x_81); +lean_inc(x_80); +lean_dec(x_43); +x_82 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_82, 0, x_80); +lean_ctor_set(x_82, 1, x_81); +return x_82; } } } else { -lean_object* x_77; +lean_object* x_83; lean_dec(x_10); -x_77 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitFalseRec(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -return x_77; +x_83 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitFalseRec(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +return x_83; } } else { -lean_object* x_78; +lean_object* x_84; lean_dec(x_10); -x_78 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitFalseRec(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -return x_78; +x_84 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitFalseRec(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +return x_84; } } else { -lean_object* x_79; +lean_object* x_85; lean_dec(x_10); -x_79 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitFalseRec(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -return x_79; +x_85 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitFalseRec(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +return x_85; } } else { -lean_object* x_80; +lean_object* x_86; lean_dec(x_10); -x_80 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitFalseRec(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -return x_80; +x_86 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitFalseRec(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +return x_86; } } else { -lean_object* x_81; lean_object* x_82; +lean_object* x_87; lean_object* x_88; lean_dec(x_10); -x_81 = lean_unsigned_to_nat(4u); -x_82 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitAndIffRecCore(x_1, x_81, x_2, x_3, x_4, x_5, x_6, x_7); -return x_82; +x_87 = lean_unsigned_to_nat(4u); +x_88 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitAndIffRecCore(x_1, x_87, x_2, x_3, x_4, x_5, x_6, x_7); +return x_88; } } else { -lean_object* x_83; lean_object* x_84; +lean_object* x_89; lean_object* x_90; lean_dec(x_10); -x_83 = lean_unsigned_to_nat(4u); -x_84 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitAndIffRecCore(x_1, x_83, x_2, x_3, x_4, x_5, x_6, x_7); -return x_84; +x_89 = lean_unsigned_to_nat(4u); +x_90 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitAndIffRecCore(x_1, x_89, x_2, x_3, x_4, x_5, x_6, x_7); +return x_90; } } else { -lean_object* x_85; lean_object* x_86; +lean_object* x_91; lean_object* x_92; lean_dec(x_10); -x_85 = lean_unsigned_to_nat(3u); -x_86 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitAndIffRecCore(x_1, x_85, x_2, x_3, x_4, x_5, x_6, x_7); -return x_86; +x_91 = lean_unsigned_to_nat(3u); +x_92 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitAndIffRecCore(x_1, x_91, x_2, x_3, x_4, x_5, x_6, x_7); +return x_92; } } else { -lean_object* x_87; lean_object* x_88; +lean_object* x_93; lean_object* x_94; lean_dec(x_10); -x_87 = lean_unsigned_to_nat(3u); -x_88 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitAndIffRecCore(x_1, x_87, x_2, x_3, x_4, x_5, x_6, x_7); -return x_88; +x_93 = lean_unsigned_to_nat(3u); +x_94 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitAndIffRecCore(x_1, x_93, x_2, x_3, x_4, x_5, x_6, x_7); +return x_94; } } else { -lean_object* x_89; +lean_object* x_95; lean_dec(x_10); -x_89 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitEqRec(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -return x_89; +x_95 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitHEqRec(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +return x_95; } } else { -lean_object* x_90; +lean_object* x_96; lean_dec(x_10); -x_90 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitEqRec(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -return x_90; +x_96 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitHEqRec(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +return x_96; } } else { -lean_object* x_91; +lean_object* x_97; lean_dec(x_10); -x_91 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitEqRec(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -return x_91; +x_97 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitHEqRec(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +return x_97; } } else { -lean_object* x_92; lean_object* x_93; +lean_object* x_98; lean_dec(x_10); -x_92 = lean_unsigned_to_nat(3u); -x_93 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCtor(x_92, x_1, x_2, x_3, x_4, x_5, x_6, x_7); -return x_93; +x_98 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitEqRec(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +return x_98; } } else { -lean_object* x_94; +lean_object* x_99; lean_dec(x_10); -x_94 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitQuotLift(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -return x_94; +x_99 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitEqRec(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +return x_99; +} +} +else +{ +lean_object* x_100; +lean_dec(x_10); +x_100 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitEqRec(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +return x_100; +} +} +else +{ +lean_object* x_101; lean_object* x_102; +lean_dec(x_10); +x_101 = lean_unsigned_to_nat(3u); +x_102 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCtor(x_101, x_1, x_2, x_3, x_4, x_5, x_6, x_7); +return x_102; +} +} +else +{ +lean_object* x_103; +lean_dec(x_10); +x_103 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitQuotLift(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +return x_103; } } else { -lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; +lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_dec(x_9); -x_95 = lean_unsigned_to_nat(0u); -x_96 = l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(x_1, x_95); -x_97 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__1; -lean_inc(x_96); -x_98 = lean_mk_array(x_96, x_97); -x_99 = lean_unsigned_to_nat(1u); -x_100 = lean_nat_sub(x_96, x_99); -lean_dec(x_96); -x_101 = l_Lean_Expr_withAppAux___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___spec__2(x_1, x_98, x_100, x_2, x_3, x_4, x_5, x_6, x_7); -return x_101; +x_104 = lean_unsigned_to_nat(0u); +x_105 = l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(x_1, x_104); +x_106 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__1; +lean_inc(x_105); +x_107 = lean_mk_array(x_105, x_106); +x_108 = lean_unsigned_to_nat(1u); +x_109 = lean_nat_sub(x_105, x_108); +lean_dec(x_105); +x_110 = l_Lean_Expr_withAppAux___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___spec__2(x_1, x_107, x_109, x_2, x_3, x_4, x_5, x_6, x_7); +return x_110; } } else { -lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; uint8_t x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; +lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; uint8_t x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_dec(x_1); -x_102 = lean_ctor_get(x_8, 0); -lean_inc(x_102); +x_111 = lean_ctor_get(x_8, 0); +lean_inc(x_111); lean_dec(x_8); -x_103 = lean_ctor_get(x_102, 1); -lean_inc(x_103); -x_104 = lean_ctor_get(x_103, 1); -lean_inc(x_104); -x_105 = lean_ctor_get(x_104, 1); -lean_inc(x_105); -x_106 = lean_ctor_get(x_102, 0); -lean_inc(x_106); -lean_dec(x_102); -x_107 = lean_ctor_get(x_103, 0); -lean_inc(x_107); -lean_dec(x_103); -x_108 = lean_ctor_get(x_104, 0); -lean_inc(x_108); -lean_dec(x_104); -x_109 = lean_ctor_get(x_105, 0); -lean_inc(x_109); -x_110 = lean_ctor_get(x_105, 1); -lean_inc(x_110); -lean_dec(x_105); -x_111 = 1; -x_112 = l_Lean_Expr_letE___override(x_107, x_108, x_109, x_110, x_111); -x_113 = l_Lean_mkAppN(x_112, x_106); -lean_dec(x_106); -x_114 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore(x_113, x_2, x_3, x_4, x_5, x_6, x_7); -return x_114; +x_112 = lean_ctor_get(x_111, 1); +lean_inc(x_112); +x_113 = lean_ctor_get(x_112, 1); +lean_inc(x_113); +x_114 = lean_ctor_get(x_113, 1); +lean_inc(x_114); +x_115 = lean_ctor_get(x_111, 0); +lean_inc(x_115); +lean_dec(x_111); +x_116 = lean_ctor_get(x_112, 0); +lean_inc(x_116); +lean_dec(x_112); +x_117 = lean_ctor_get(x_113, 0); +lean_inc(x_117); +lean_dec(x_113); +x_118 = lean_ctor_get(x_114, 0); +lean_inc(x_118); +x_119 = lean_ctor_get(x_114, 1); +lean_inc(x_119); +lean_dec(x_114); +x_120 = 1; +x_121 = l_Lean_Expr_letE___override(x_116, x_117, x_118, x_119, x_120); +x_122 = l_Lean_mkAppN(x_121, x_115); +lean_dec(x_115); +x_123 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore(x_122, x_2, x_3, x_4, x_5, x_6, x_7); +return x_123; } } } @@ -17057,7 +17141,7 @@ static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___close lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__1; x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___closed__1; -x_3 = lean_unsigned_to_nat(657u); +x_3 = lean_unsigned_to_nat(665u); x_4 = lean_unsigned_to_nat(45u); x_5 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -18378,7 +18462,7 @@ static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitNoConfusion___ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__1; x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitNoConfusion___closed__1; -x_3 = lean_unsigned_to_nat(613u); +x_3 = lean_unsigned_to_nat(621u); x_4 = lean_unsigned_to_nat(42u); x_5 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -18391,7 +18475,7 @@ static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitNoConfusion___ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__1; x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitNoConfusion___closed__1; -x_3 = lean_unsigned_to_nat(615u); +x_3 = lean_unsigned_to_nat(623u); x_4 = lean_unsigned_to_nat(56u); x_5 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -23874,6 +23958,153 @@ return x_58; } } } +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitHEqRec___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; lean_object* x_10; +x_9 = lean_unsigned_to_nat(7u); +x_10 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_mkOverApplication(x_2, x_1, x_9, x_3, x_4, x_5, x_6, x_7, x_8); +return x_10; +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitHEqRec(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; lean_object* x_17; +x_8 = lean_unsigned_to_nat(0u); +x_9 = l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(x_1, x_8); +x_10 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__1; +lean_inc(x_9); +x_11 = lean_mk_array(x_9, x_10); +x_12 = lean_unsigned_to_nat(1u); +x_13 = lean_nat_sub(x_9, x_12); +lean_dec(x_9); +lean_inc(x_1); +x_14 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_1, x_11, x_13); +x_15 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__13; +x_16 = l_Lean_Expr_isAppOf(x_1, x_15); +lean_inc(x_14); +x_17 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitHEqRec___lambda__1___boxed), 8, 1); +lean_closure_set(x_17, 0, x_14); +if (x_16 == 0) +{ +lean_object* x_18; uint8_t x_19; +x_18 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__14; +x_19 = l_Lean_Expr_isAppOf(x_1, x_18); +if (x_19 == 0) +{ +lean_object* x_20; lean_object* x_21; uint8_t x_22; +x_20 = lean_array_get_size(x_14); +x_21 = lean_unsigned_to_nat(6u); +x_22 = lean_nat_dec_lt(x_21, x_20); +lean_dec(x_20); +if (x_22 == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +lean_dec(x_14); +x_23 = l_Lean_instInhabitedExpr; +x_24 = l_outOfBounds___rarg(x_23); +x_25 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visit), 7, 1); +lean_closure_set(x_25, 0, x_24); +x_26 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitLambda___spec__1___rarg), 8, 2); +lean_closure_set(x_26, 0, x_25); +lean_closure_set(x_26, 1, x_17); +x_27 = lean_unsigned_to_nat(7u); +x_28 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_etaIfUnderApplied(x_1, x_27, x_26, x_2, x_3, x_4, x_5, x_6, x_7); +return x_28; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_29 = lean_array_fget(x_14, x_21); +lean_dec(x_14); +x_30 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visit), 7, 1); +lean_closure_set(x_30, 0, x_29); +x_31 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitLambda___spec__1___rarg), 8, 2); +lean_closure_set(x_31, 0, x_30); +lean_closure_set(x_31, 1, x_17); +x_32 = lean_unsigned_to_nat(7u); +x_33 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_etaIfUnderApplied(x_1, x_32, x_31, x_2, x_3, x_4, x_5, x_6, x_7); +return x_33; +} +} +else +{ +lean_object* x_34; lean_object* x_35; uint8_t x_36; +x_34 = lean_array_get_size(x_14); +x_35 = lean_unsigned_to_nat(3u); +x_36 = lean_nat_dec_lt(x_35, x_34); +lean_dec(x_34); +if (x_36 == 0) +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; +lean_dec(x_14); +x_37 = l_Lean_instInhabitedExpr; +x_38 = l_outOfBounds___rarg(x_37); +x_39 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visit), 7, 1); +lean_closure_set(x_39, 0, x_38); +x_40 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitLambda___spec__1___rarg), 8, 2); +lean_closure_set(x_40, 0, x_39); +lean_closure_set(x_40, 1, x_17); +x_41 = lean_unsigned_to_nat(7u); +x_42 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_etaIfUnderApplied(x_1, x_41, x_40, x_2, x_3, x_4, x_5, x_6, x_7); +return x_42; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_43 = lean_array_fget(x_14, x_35); +lean_dec(x_14); +x_44 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visit), 7, 1); +lean_closure_set(x_44, 0, x_43); +x_45 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitLambda___spec__1___rarg), 8, 2); +lean_closure_set(x_45, 0, x_44); +lean_closure_set(x_45, 1, x_17); +x_46 = lean_unsigned_to_nat(7u); +x_47 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_etaIfUnderApplied(x_1, x_46, x_45, x_2, x_3, x_4, x_5, x_6, x_7); +return x_47; +} +} +} +else +{ +lean_object* x_48; lean_object* x_49; uint8_t x_50; +x_48 = lean_array_get_size(x_14); +x_49 = lean_unsigned_to_nat(3u); +x_50 = lean_nat_dec_lt(x_49, x_48); +lean_dec(x_48); +if (x_50 == 0) +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; +lean_dec(x_14); +x_51 = l_Lean_instInhabitedExpr; +x_52 = l_outOfBounds___rarg(x_51); +x_53 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visit), 7, 1); +lean_closure_set(x_53, 0, x_52); +x_54 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitLambda___spec__1___rarg), 8, 2); +lean_closure_set(x_54, 0, x_53); +lean_closure_set(x_54, 1, x_17); +x_55 = lean_unsigned_to_nat(7u); +x_56 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_etaIfUnderApplied(x_1, x_55, x_54, x_2, x_3, x_4, x_5, x_6, x_7); +return x_56; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; +x_57 = lean_array_fget(x_14, x_49); +lean_dec(x_14); +x_58 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visit), 7, 1); +lean_closure_set(x_58, 0, x_57); +x_59 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitLambda___spec__1___rarg), 8, 2); +lean_closure_set(x_59, 0, x_58); +lean_closure_set(x_59, 1, x_17); +x_60 = lean_unsigned_to_nat(7u); +x_61 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_etaIfUnderApplied(x_1, x_60, x_59, x_2, x_3, x_4, x_5, x_6, x_7); +return x_61; +} +} +} +} LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitEqRec___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { @@ -25355,6 +25586,15 @@ lean_dec(x_2); return x_9; } } +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitHEqRec___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitHEqRec___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_1); +return x_9; +} +} LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitEqRec___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { @@ -25600,6 +25840,14 @@ l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__21 = _init_l_Lean_Compiler lean_mark_persistent(l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__21); l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__22 = _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__22(); lean_mark_persistent(l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__22); +l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__23 = _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__23(); +lean_mark_persistent(l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__23); +l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__24 = _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__24(); +lean_mark_persistent(l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__24); +l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__25 = _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__25(); +lean_mark_persistent(l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__25); +l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__26 = _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__26(); +lean_mark_persistent(l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__26); l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitAppDefaultConst___closed__1 = _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitAppDefaultConst___closed__1(); lean_mark_persistent(l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitAppDefaultConst___closed__1); l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitAppDefaultConst___closed__2 = _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitAppDefaultConst___closed__2(); diff --git a/stage0/stdlib/Lean/Elab/Binders.c b/stage0/stdlib/Lean/Elab/Binders.c index bf946e3dbb66..c70d7a2bb147 100644 --- a/stage0/stdlib/Lean/Elab/Binders.c +++ b/stage0/stdlib/Lean/Elab/Binders.c @@ -401,7 +401,6 @@ LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_Term_expandFunBin static lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderModifier___closed__12; static lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderModifier___closed__10; LEAN_EXPORT lean_object* l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Term_quoteAutoTactic___spec__6(lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_levelZero; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_expandForall___spec__1(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); static lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Elab_Term_quoteAutoTactic___spec__4___closed__6; LEAN_EXPORT lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_elabBinderViews_loop___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -412,7 +411,6 @@ LEAN_EXPORT lean_object* l_Lean_Elab_Term_expandMatchAltsIntoMatchTactic___boxed static lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandOptIdent___closed__3; LEAN_EXPORT lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Binders___hyg_1914_(lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabLetDelayedDecl_declRange__1___closed__1; -static lean_object* l_Lean_Elab_Term_quoteAutoTactic___closed__30; static lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Binders___hyg_1914____closed__6; LEAN_EXPORT lean_object* l_Lean_Elab_Term_mkLetIdDeclView(lean_object*); LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at_Lean_Elab_Term_quoteAutoTactic___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -1903,7 +1901,7 @@ static lean_object* _init_l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Le { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_levelZero; +x_2 = lean_box(0); x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); @@ -2086,35 +2084,23 @@ static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__7() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = lean_box(0); -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_2); -lean_ctor_set(x_3, 1, x_1); -return x_3; -} -} -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__8() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Elab_Term_quoteAutoTactic___closed__6; -x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__7; +x_2 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Term_quoteAutoTactic___spec__6___closed__15; x_3 = l_Lean_Expr_const___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__9() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__8() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Elab_Term_quoteAutoTactic___closed__8; +x_1 = l_Lean_Elab_Term_quoteAutoTactic___closed__7; x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__4; x_3 = l_Lean_Expr_app___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__10() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__9() { _start: { lean_object* x_1; @@ -2122,28 +2108,28 @@ x_1 = lean_mk_string_unchecked("node", 4, 4); return x_1; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__11() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__10() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderIdent___closed__1; x_2 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Term_quoteAutoTactic___spec__6___closed__1; -x_3 = l_Lean_Elab_Term_quoteAutoTactic___closed__10; +x_3 = l_Lean_Elab_Term_quoteAutoTactic___closed__9; x_4 = l_Lean_Name_mkStr3(x_1, x_2, x_3); return x_4; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__12() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__11() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__11; +x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__10; x_3 = l_Lean_Expr_const___override(x_2, x_1); return x_3; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__13() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__12() { _start: { lean_object* x_1; @@ -2151,7 +2137,7 @@ x_1 = lean_mk_string_unchecked("SourceInfo", 10, 10); return x_1; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__14() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__13() { _start: { lean_object* x_1; @@ -2159,28 +2145,28 @@ x_1 = lean_mk_string_unchecked("none", 4, 4); return x_1; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__15() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__14() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderIdent___closed__1; -x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__13; -x_3 = l_Lean_Elab_Term_quoteAutoTactic___closed__14; +x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__12; +x_3 = l_Lean_Elab_Term_quoteAutoTactic___closed__13; x_4 = l_Lean_Name_mkStr3(x_1, x_2, x_3); return x_4; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__16() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__15() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__15; +x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__14; x_3 = l_Lean_Expr_const___override(x_2, x_1); return x_3; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__17() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__16() { _start: { lean_object* x_1; @@ -2188,27 +2174,27 @@ x_1 = lean_mk_string_unchecked("mkAtom", 6, 6); return x_1; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__18() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__17() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderIdent___closed__1; -x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__17; +x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__16; x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__19() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__18() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__18; +x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__17; x_3 = l_Lean_Expr_const___override(x_2, x_1); return x_3; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__20() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__19() { _start: { lean_object* x_1; @@ -2216,28 +2202,28 @@ x_1 = lean_mk_string_unchecked("ident", 5, 5); return x_1; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__21() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__20() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderIdent___closed__1; x_2 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Term_quoteAutoTactic___spec__6___closed__1; -x_3 = l_Lean_Elab_Term_quoteAutoTactic___closed__20; +x_3 = l_Lean_Elab_Term_quoteAutoTactic___closed__19; x_4 = l_Lean_Name_mkStr3(x_1, x_2, x_3); return x_4; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__22() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__21() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__21; +x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__20; x_3 = l_Lean_Expr_const___override(x_2, x_1); return x_3; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__23() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__22() { _start: { lean_object* x_1; @@ -2245,27 +2231,27 @@ x_1 = lean_mk_string_unchecked("toSubstring", 11, 11); return x_1; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__24() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__23() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Term_quoteAutoTactic___spec__6___closed__9; -x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__23; +x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__22; x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__25() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__24() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__24; +x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__23; x_3 = l_Lean_Expr_const___override(x_2, x_1); return x_3; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__26() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__25() { _start: { lean_object* x_1; @@ -2273,7 +2259,7 @@ x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_quoteAutoTactic___lambda__1___ return x_1; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__27() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__26() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; @@ -2284,32 +2270,32 @@ x_4 = l_Lean_Name_mkStr3(x_1, x_2, x_3); return x_4; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__28() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__27() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__27; +x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__26; x_3 = l_Lean_Expr_const___override(x_2, x_1); return x_3; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__29() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__28() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Term_quoteAutoTactic___spec__6___closed__16; -x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__28; +x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__27; x_3 = l_Lean_Expr_app___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__30() { +static lean_object* _init_l_Lean_Elab_Term_quoteAutoTactic___closed__29() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Term_quoteAutoTactic___spec__6___closed__20; -x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__28; +x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__27; x_3 = l_Lean_Expr_app___override(x_1, x_2); return x_3; } @@ -2342,8 +2328,8 @@ x_10 = lean_box(0); x_11 = lean_array_size(x_8); x_12 = 0; x_13 = l_Lean_Elab_Term_quoteAutoTactic___closed__4; -x_14 = l_Lean_Elab_Term_quoteAutoTactic___closed__7; -x_15 = l_Lean_Elab_Term_quoteAutoTactic___closed__9; +x_14 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Term_quoteAutoTactic___spec__6___closed__15; +x_15 = l_Lean_Elab_Term_quoteAutoTactic___closed__8; x_16 = l_Array_forIn_x27Unsafe_loop___at_Lean_Elab_Term_quoteAutoTactic___spec__4(x_7, x_8, x_13, x_14, x_10, x_8, x_11, x_12, x_15, x_2, x_3, x_4); lean_dec(x_8); if (lean_obj_tag(x_16) == 0) @@ -2355,8 +2341,8 @@ if (x_17 == 0) lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; x_18 = lean_ctor_get(x_16, 0); x_19 = l___private_Lean_ToExpr_0__Lean_Name_toExprAux(x_7); -x_20 = l_Lean_Elab_Term_quoteAutoTactic___closed__12; -x_21 = l_Lean_Elab_Term_quoteAutoTactic___closed__16; +x_20 = l_Lean_Elab_Term_quoteAutoTactic___closed__11; +x_21 = l_Lean_Elab_Term_quoteAutoTactic___closed__15; x_22 = l_Lean_mkApp3(x_20, x_21, x_19, x_18); lean_ctor_set(x_16, 0, x_22); return x_16; @@ -2370,8 +2356,8 @@ lean_inc(x_24); lean_inc(x_23); lean_dec(x_16); x_25 = l___private_Lean_ToExpr_0__Lean_Name_toExprAux(x_7); -x_26 = l_Lean_Elab_Term_quoteAutoTactic___closed__12; -x_27 = l_Lean_Elab_Term_quoteAutoTactic___closed__16; +x_26 = l_Lean_Elab_Term_quoteAutoTactic___closed__11; +x_27 = l_Lean_Elab_Term_quoteAutoTactic___closed__15; x_28 = l_Lean_mkApp3(x_26, x_27, x_25, x_23); x_29 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_29, 0, x_28); @@ -2426,7 +2412,7 @@ x_37 = lean_ctor_get(x_1, 1); x_38 = lean_ctor_get(x_1, 0); lean_dec(x_38); x_39 = l_Lean_mkStrLit(x_37); -x_40 = l_Lean_Elab_Term_quoteAutoTactic___closed__19; +x_40 = l_Lean_Elab_Term_quoteAutoTactic___closed__18; x_41 = l_Lean_Expr_app___override(x_40, x_39); lean_ctor_set_tag(x_1, 0); lean_ctor_set(x_1, 1, x_4); @@ -2440,7 +2426,7 @@ x_42 = lean_ctor_get(x_1, 1); lean_inc(x_42); lean_dec(x_1); x_43 = l_Lean_mkStrLit(x_42); -x_44 = l_Lean_Elab_Term_quoteAutoTactic___closed__19; +x_44 = l_Lean_Elab_Term_quoteAutoTactic___closed__18; x_45 = l_Lean_Expr_app___override(x_44, x_43); x_46 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_46, 0, x_45); @@ -2458,18 +2444,18 @@ x_48 = lean_ctor_get(x_1, 3); lean_inc(x_48); lean_dec(x_1); x_49 = 1; -x_50 = l_Lean_Elab_Term_quoteAutoTactic___closed__26; +x_50 = l_Lean_Elab_Term_quoteAutoTactic___closed__25; lean_inc(x_47); x_51 = l_Lean_Name_toString(x_47, x_49, x_50); x_52 = l_Lean_mkStrLit(x_51); -x_53 = l_Lean_Elab_Term_quoteAutoTactic___closed__25; +x_53 = l_Lean_Elab_Term_quoteAutoTactic___closed__24; x_54 = l_Lean_Expr_app___override(x_53, x_52); x_55 = l___private_Lean_ToExpr_0__Lean_Name_toExprAux(x_47); -x_56 = l_Lean_Elab_Term_quoteAutoTactic___closed__29; -x_57 = l_Lean_Elab_Term_quoteAutoTactic___closed__30; +x_56 = l_Lean_Elab_Term_quoteAutoTactic___closed__28; +x_57 = l_Lean_Elab_Term_quoteAutoTactic___closed__29; x_58 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Term_quoteAutoTactic___spec__6(x_56, x_57, x_48); -x_59 = l_Lean_Elab_Term_quoteAutoTactic___closed__22; -x_60 = l_Lean_Elab_Term_quoteAutoTactic___closed__16; +x_59 = l_Lean_Elab_Term_quoteAutoTactic___closed__21; +x_60 = l_Lean_Elab_Term_quoteAutoTactic___closed__15; x_61 = l_Lean_mkApp4(x_59, x_60, x_54, x_55, x_58); x_62 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_62, 0, x_61); @@ -3272,7 +3258,7 @@ static lean_object* _init_l_Array_mapMUnsafe_map___at___private_Lean_Elab_Binder { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__20; +x_2 = l_Lean_Elab_Term_quoteAutoTactic___closed__19; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } @@ -8455,7 +8441,7 @@ lean_object* x_17; lean_object* x_18; uint8_t x_19; x_17 = lean_ctor_get(x_15, 1); lean_inc(x_17); lean_dec(x_15); -x_18 = l_Lean_Elab_Term_quoteAutoTactic___closed__20; +x_18 = l_Lean_Elab_Term_quoteAutoTactic___closed__19; x_19 = lean_string_dec_eq(x_17, x_18); lean_dec(x_17); if (x_19 == 0) @@ -28563,8 +28549,6 @@ l_Lean_Elab_Term_quoteAutoTactic___closed__28 = _init_l_Lean_Elab_Term_quoteAuto lean_mark_persistent(l_Lean_Elab_Term_quoteAutoTactic___closed__28); l_Lean_Elab_Term_quoteAutoTactic___closed__29 = _init_l_Lean_Elab_Term_quoteAutoTactic___closed__29(); lean_mark_persistent(l_Lean_Elab_Term_quoteAutoTactic___closed__29); -l_Lean_Elab_Term_quoteAutoTactic___closed__30 = _init_l_Lean_Elab_Term_quoteAutoTactic___closed__30(); -lean_mark_persistent(l_Lean_Elab_Term_quoteAutoTactic___closed__30); l_Lean_Elab_Term_declareTacticSyntax___lambda__2___closed__1 = _init_l_Lean_Elab_Term_declareTacticSyntax___lambda__2___closed__1(); lean_mark_persistent(l_Lean_Elab_Term_declareTacticSyntax___lambda__2___closed__1); l_Lean_Elab_Term_declareTacticSyntax___lambda__2___closed__2 = _init_l_Lean_Elab_Term_declareTacticSyntax___lambda__2___closed__2(); diff --git a/stage0/stdlib/Lean/Elab/Tactic/BVDecide/Frontend/LRAT.c b/stage0/stdlib/Lean/Elab/Tactic/BVDecide/Frontend/LRAT.c index 73cee6d384be..74a5cdf945c7 100644 --- a/stage0/stdlib/Lean/Elab/Tactic/BVDecide/Frontend/LRAT.c +++ b/stage0/stdlib/Lean/Elab/Tactic/BVDecide/Frontend/LRAT.c @@ -66,7 +66,6 @@ static lean_object* l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Ela lean_object* lean_io_prim_handle_flush(lean_object*, lean_object*); static lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__7; LEAN_EXPORT lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_LratCert_ofFile___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__41; LEAN_EXPORT lean_object* l_Lean_withTraceNode___at_Lean_Elab_Tactic_BVDecide_Frontend_LratCert_ofFile___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_runExternal___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_LratCert_toReflectionProof___rarg___lambda__1___closed__2; @@ -96,7 +95,6 @@ static lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_LratCert_toReflectionPr LEAN_EXPORT lean_object* l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___boxed(lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__2___closed__3; static lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_LratCert_ofFile___closed__1; -static lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__40; LEAN_EXPORT lean_object* l_Lean_withTraceNode___at_Lean_Elab_Tactic_BVDecide_Frontend_runExternal___spec__1___lambda__4(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_LratCert_ofFile___lambda__8(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_LratCert_toReflectionProof___rarg___lambda__1___closed__3; @@ -196,7 +194,6 @@ lean_object* lean_array_to_list(lean_object*); lean_object* l_Lean_Meta_mkEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__1(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_LratCert_ofFile___closed__2; -static lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__39; lean_object* l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_withTraceNode___at_Lean_Elab_Tactic_BVDecide_Frontend_LratCert_ofFile___spec__2___lambda__3(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, uint8_t, double, double, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_runExternal___lambda__7___closed__1; @@ -205,7 +202,6 @@ static lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___l lean_object* l___private_Lean_Util_Trace_0__Lean_addTraceNode___at_Lean_Core_wrapAsyncAsSnapshot___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_LratCert_toReflectionProof___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_System_FilePath_parent(lean_object*); -extern lean_object* l_Lean_levelZero; static lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__32; lean_object* lean_io_mono_nanos_now(lean_object*); LEAN_EXPORT lean_object* l_MonadExcept_ofExcept___at_Lean_Elab_Tactic_BVDecide_Frontend_LratCert_toReflectionProof___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -306,7 +302,6 @@ LEAN_EXPORT lean_object* l_Lean_withTraceNode___at_Lean_Elab_Tactic_BVDecide_Fro lean_object* lean_io_app_path(lean_object*); static lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_LratCert_toReflectionProof___rarg___lambda__3___closed__2; static lean_object* l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__2___closed__4; -static lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__42; LEAN_EXPORT lean_object* l_Lean_withTraceNode___at_Lean_Elab_Tactic_BVDecide_Frontend_LratCert_ofFile___spec__2___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_LratCert_toReflectionProof___rarg___closed__8; static lean_object* l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__15; @@ -1477,7 +1472,7 @@ static lean_object* _init_l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Le { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_levelZero; +x_2 = lean_box(0); x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); @@ -1534,7 +1529,7 @@ static lean_object* _init_l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Le _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_levelZero; +x_1 = lean_box(0); x_2 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___closed__6; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_1); @@ -1708,35 +1703,13 @@ static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntActi _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = lean_box(0); -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_2); -lean_ctor_set(x_3, 1, x_1); -return x_3; -} -} -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___closed__5; -x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__1; -x_3 = l_Lean_Expr_const___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__2; +x_1 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___closed__7; x_2 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__2___closed__10; x_3 = l_Lean_Expr_app___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__4() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -1746,7 +1719,7 @@ x_3 = l_Lean_Expr_const___override(x_2, x_1); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__5() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__3() { _start: { lean_object* x_1; @@ -1754,7 +1727,7 @@ x_1 = lean_mk_string_unchecked("Std", 3, 3); return x_1; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__6() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__4() { _start: { lean_object* x_1; @@ -1762,7 +1735,7 @@ x_1 = lean_mk_string_unchecked("BVDecide", 8, 8); return x_1; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__7() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__5() { _start: { lean_object* x_1; @@ -1770,7 +1743,7 @@ x_1 = lean_mk_string_unchecked("LRAT", 4, 4); return x_1; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__8() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__6() { _start: { lean_object* x_1; @@ -1778,7 +1751,7 @@ x_1 = lean_mk_string_unchecked("Action", 6, 6); return x_1; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__9() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__7() { _start: { lean_object* x_1; @@ -1786,73 +1759,51 @@ x_1 = lean_mk_string_unchecked("addEmpty", 8, 8); return x_1; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__10() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__8() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; -x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__5; +x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__3; x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_TacticContext_new___closed__6; -x_3 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__6; -x_4 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__7; -x_5 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__8; -x_6 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__9; +x_3 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__4; +x_4 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__5; +x_5 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__6; +x_6 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__7; x_7 = l_Lean_Name_mkStr6(x_1, x_2, x_3, x_4, x_5, x_6); return x_7; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__11() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__1; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__12() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__10; -x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__11; -x_3 = l_Lean_Expr_const___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__13() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__9() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___closed__16; -x_2 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___closed__6; +x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__8; +x_2 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___closed__12; x_3 = l_Lean_Expr_const___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__14() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__10() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___closed__20; -x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__4; +x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__2; x_3 = l_Lean_Expr_app___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__15() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__11() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___closed__24; -x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__4; +x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__2; x_3 = l_Lean_Expr_app___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__16() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__12() { _start: { lean_object* x_1; @@ -1860,31 +1811,31 @@ x_1 = lean_mk_string_unchecked("addRup", 6, 6); return x_1; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__17() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__13() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; -x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__5; +x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__3; x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_TacticContext_new___closed__6; -x_3 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__6; -x_4 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__7; -x_5 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__8; -x_6 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__16; +x_3 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__4; +x_4 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__5; +x_5 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__6; +x_6 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__12; x_7 = l_Lean_Name_mkStr6(x_1, x_2, x_3, x_4, x_5, x_6); return x_7; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__18() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__14() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__17; -x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__11; +x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__13; +x_2 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___closed__12; x_3 = l_Lean_Expr_const___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__19() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__15() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -1894,7 +1845,7 @@ x_3 = l_Lean_Expr_app___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__20() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__16() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -1904,7 +1855,7 @@ x_3 = l_Lean_Expr_app___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__21() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__17() { _start: { lean_object* x_1; @@ -1912,31 +1863,31 @@ x_1 = lean_mk_string_unchecked("addRat", 6, 6); return x_1; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__22() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__18() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; -x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__5; +x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__3; x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_TacticContext_new___closed__6; -x_3 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__6; -x_4 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__7; -x_5 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__8; -x_6 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__21; +x_3 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__4; +x_4 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__5; +x_5 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__6; +x_6 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__17; x_7 = l_Lean_Name_mkStr6(x_1, x_2, x_3, x_4, x_5, x_6); return x_7; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__23() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__19() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__22; -x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__11; +x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__18; +x_2 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___closed__12; x_3 = l_Lean_Expr_const___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__24() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__20() { _start: { lean_object* x_1; @@ -1944,37 +1895,37 @@ x_1 = lean_mk_string_unchecked("Bool", 4, 4); return x_1; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__25() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__21() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__24; +x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__20; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__26() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__22() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__25; +x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__21; x_3 = l_Lean_Expr_const___override(x_2, x_1); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__27() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__23() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___closed__7; -x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__4; +x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__2; x_3 = l_Lean_Expr_app___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__28() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__24() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -1984,48 +1935,48 @@ x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__29() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__25() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__28; +x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__24; x_2 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___closed__12; x_3 = l_Lean_Expr_const___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__30() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__26() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__29; -x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__4; -x_3 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__27; +x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__25; +x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__2; +x_3 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__23; x_4 = l_Lean_mkAppB(x_1, x_2, x_3); return x_4; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__31() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__27() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___closed__20; -x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__30; +x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__26; x_3 = l_Lean_Expr_app___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__32() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__28() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___closed__24; -x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__30; +x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__26; x_3 = l_Lean_Expr_app___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__33() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__29() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -2035,7 +1986,7 @@ x_3 = l_Lean_Expr_const___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__34() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__30() { _start: { lean_object* x_1; @@ -2043,27 +1994,27 @@ x_1 = lean_mk_string_unchecked("false", 5, 5); return x_1; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__35() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__31() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__24; -x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__34; +x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__20; +x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__30; x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__36() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__32() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__35; +x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__31; x_3 = l_Lean_Expr_const___override(x_2, x_1); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__37() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__33() { _start: { lean_object* x_1; @@ -2071,27 +2022,27 @@ x_1 = lean_mk_string_unchecked("true", 4, 4); return x_1; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__38() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__34() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__24; -x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__37; +x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__20; +x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__33; x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__39() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__35() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__38; +x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__34; x_3 = l_Lean_Expr_const___override(x_2, x_1); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__40() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__36() { _start: { lean_object* x_1; @@ -2099,26 +2050,26 @@ x_1 = lean_mk_string_unchecked("del", 3, 3); return x_1; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__41() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__37() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; -x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__5; +x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__3; x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_TacticContext_new___closed__6; -x_3 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__6; -x_4 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__7; -x_5 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__8; -x_6 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__40; +x_3 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__4; +x_4 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__5; +x_5 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__6; +x_6 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__36; x_7 = l_Lean_Name_mkStr6(x_1, x_2, x_3, x_4, x_5, x_6); return x_7; } } -static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__42() { +static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__38() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__41; -x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__11; +x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__37; +x_2 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___closed__12; x_3 = l_Lean_Expr_const___override(x_1, x_2); return x_3; } @@ -2137,14 +2088,14 @@ lean_inc(x_3); lean_dec(x_1); x_4 = l_Lean_mkNatLit(x_2); x_5 = lean_array_to_list(x_3); -x_6 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__14; -x_7 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__15; +x_6 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__10; +x_7 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__11; x_8 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__1(x_6, x_7, x_5); -x_9 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__13; -x_10 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__4; +x_9 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___closed__17; +x_10 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__2; x_11 = l_Lean_mkAppB(x_9, x_10, x_8); -x_12 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__12; -x_13 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__3; +x_12 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__9; +x_13 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__1; x_14 = l_Lean_mkApp4(x_12, x_13, x_10, x_4, x_11); return x_14; } @@ -2160,21 +2111,21 @@ lean_inc(x_17); lean_dec(x_1); x_18 = l_Lean_mkNatLit(x_15); x_19 = lean_array_to_list(x_16); -x_20 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__19; -x_21 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__20; +x_20 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__15; +x_21 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__16; x_22 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__2(x_20, x_21, x_19); lean_dec(x_19); -x_23 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__13; +x_23 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___closed__17; x_24 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__2___closed__10; x_25 = l_Lean_mkAppB(x_23, x_24, x_22); x_26 = lean_array_to_list(x_17); -x_27 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__14; -x_28 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__15; +x_27 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__10; +x_28 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__11; x_29 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__1(x_27, x_28, x_26); -x_30 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__4; +x_30 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__2; x_31 = l_Lean_mkAppB(x_23, x_30, x_29); -x_32 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__18; -x_33 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__3; +x_32 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__14; +x_33 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__1; x_34 = l_Lean_mkApp5(x_32, x_33, x_30, x_18, x_25, x_31); return x_34; } @@ -2194,24 +2145,24 @@ lean_inc(x_39); lean_dec(x_1); x_40 = l_Lean_mkNatLit(x_35); x_41 = lean_array_to_list(x_36); -x_42 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__19; -x_43 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__20; +x_42 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__15; +x_43 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__16; x_44 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__2(x_42, x_43, x_41); lean_dec(x_41); -x_45 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__13; +x_45 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___closed__17; x_46 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__2___closed__10; x_47 = l_Lean_mkAppB(x_45, x_46, x_44); x_48 = lean_array_to_list(x_38); -x_49 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__14; -x_50 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__15; +x_49 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__10; +x_50 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__11; x_51 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__1(x_49, x_50, x_48); -x_52 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__4; +x_52 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__2; x_53 = l_Lean_mkAppB(x_45, x_52, x_51); x_54 = lean_array_to_list(x_39); -x_55 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__31; -x_56 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__32; +x_55 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__27; +x_56 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__28; x_57 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3(x_55, x_56, x_54); -x_58 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__30; +x_58 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__26; x_59 = l_Lean_mkAppB(x_45, x_58, x_57); x_60 = lean_ctor_get(x_37, 0); lean_inc(x_60); @@ -2224,24 +2175,24 @@ lean_dec(x_61); if (x_63 == 0) { lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; -x_64 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__33; -x_65 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__26; -x_66 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__36; +x_64 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__29; +x_65 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__22; +x_66 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__32; x_67 = l_Lean_mkApp4(x_64, x_52, x_65, x_62, x_66); -x_68 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__23; -x_69 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__3; +x_68 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__19; +x_69 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__1; x_70 = l_Lean_mkApp7(x_68, x_69, x_52, x_40, x_47, x_67, x_53, x_59); return x_70; } else { lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; -x_71 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__33; -x_72 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__26; -x_73 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__39; +x_71 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__29; +x_72 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__22; +x_73 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__35; x_74 = l_Lean_mkApp4(x_71, x_52, x_72, x_62, x_73); -x_75 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__23; -x_76 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__3; +x_75 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__19; +x_76 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__1; x_77 = l_Lean_mkApp7(x_75, x_76, x_52, x_40, x_47, x_74, x_53, x_59); return x_77; } @@ -2253,14 +2204,14 @@ x_78 = lean_ctor_get(x_1, 0); lean_inc(x_78); lean_dec(x_1); x_79 = lean_array_to_list(x_78); -x_80 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__14; -x_81 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__15; +x_80 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__10; +x_81 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__11; x_82 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__1(x_80, x_81, x_79); -x_83 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__13; -x_84 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__4; +x_83 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___spec__3___closed__17; +x_84 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__2; x_85 = l_Lean_mkAppB(x_83, x_84, x_82); -x_86 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__42; -x_87 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__3; +x_86 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__38; +x_87 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__1; x_88 = l_Lean_mkApp3(x_86, x_87, x_84, x_85); return x_88; } @@ -2279,10 +2230,10 @@ static lean_object* _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntActi _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__5; +x_1 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__3; x_2 = l_Lean_Elab_Tactic_BVDecide_Frontend_TacticContext_new___closed__6; -x_3 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__6; -x_4 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__7; +x_3 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__4; +x_4 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__5; x_5 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___closed__1; x_6 = l_Lean_Name_mkStr5(x_1, x_2, x_3, x_4, x_5); return x_6; @@ -11872,7 +11823,7 @@ x_34 = l_Lean_mkAppB(x_33, x_31, x_32); x_35 = lean_ctor_get(x_3, 2); lean_inc(x_35); lean_dec(x_3); -x_36 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__26; +x_36 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__22; lean_inc(x_35); x_37 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_BVDecide_Frontend_LratCert_toReflectionProof___rarg___lambda__2___boxed), 8, 3); lean_closure_set(x_37, 0, x_35); @@ -11891,7 +11842,7 @@ x_40 = lean_ctor_get(x_39, 1); lean_inc(x_40); lean_dec(x_39); x_41 = l_Lean_Expr_const___override(x_35, x_23); -x_42 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__39; +x_42 = l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__35; lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); @@ -12739,14 +12690,6 @@ l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__3 lean_mark_persistent(l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__37); l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__38 = _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__38(); lean_mark_persistent(l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__38); -l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__39 = _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__39(); -lean_mark_persistent(l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__39); -l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__40 = _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__40(); -lean_mark_persistent(l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__40); -l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__41 = _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__41(); -lean_mark_persistent(l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__41); -l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__42 = _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__42(); -lean_mark_persistent(l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___lambda__1___closed__42); l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___closed__1 = _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___closed__1(); lean_mark_persistent(l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___closed__1); l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___closed__2 = _init_l_Lean_Elab_Tactic_BVDecide_Frontend_instToExprIntAction___closed__2(); diff --git a/stage0/stdlib/Lean/Elab/Tactic/Omega/Core.c b/stage0/stdlib/Lean/Elab/Tactic/Omega/Core.c index a7a018d2222c..08751c8248e9 100644 --- a/stage0/stdlib/Lean/Elab/Tactic/Omega/Core.c +++ b/stage0/stdlib/Lean/Elab/Tactic/Omega/Core.c @@ -265,7 +265,6 @@ LEAN_EXPORT lean_object* l_Std_Range_forIn_x27_loop___at_Lean_Elab_Tactic_Omega_ LEAN_EXPORT lean_object* l_Lean_Elab_Tactic_Omega_Justification_combineProof(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___auto____x40_Lean_Elab_Tactic_Omega_Core___hyg_1682____closed__13; LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at_Lean_Elab_Tactic_Omega_Problem_fourierMotzkin___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_levelZero; static lean_object* l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__22; LEAN_EXPORT lean_object* l_Lean_Elab_Tactic_Omega_Fact_combo(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Tactic_Omega_Problem_replayEliminations(lean_object*, lean_object*); @@ -514,7 +513,6 @@ static lean_object* l_Lean_Elab_Tactic_Omega_Justification_tidyProof___closed__3 LEAN_EXPORT lean_object* l_Std_DHashMap_Internal_AssocList_foldlM___at_Lean_Elab_Tactic_Omega_Problem_solveEasyEquality___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_Tactic_Omega_instToExprLinearCombo___lambda__1___closed__16; static lean_object* l___auto____x40_Lean_Elab_Tactic_Omega_Core___hyg_1682____closed__18; -static lean_object* l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__27; static lean_object* l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__26; static lean_object* l_Lean_Elab_Tactic_Omega_Justification_toString___closed__12; static lean_object* l_Array_foldrMUnsafe_fold___at_Lean_Elab_Tactic_Omega_Problem_replayEliminations___spec__2___closed__2; @@ -989,7 +987,7 @@ static lean_object* _init_l_Lean_Elab_Tactic_Omega_instToExprLinearCombo___lambd { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_levelZero; +x_2 = lean_box(0); x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); @@ -4606,25 +4604,13 @@ static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___clo _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = lean_box(0); -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_2); -lean_ctor_set(x_3, 1, x_1); -return x_3; -} -} -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__8() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__6; -x_2 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__7; +x_2 = l_Lean_Elab_Tactic_Omega_instToExprLinearCombo___lambda__1___closed__8; x_3 = l_Lean_Expr_const___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__9() { +static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__8() { _start: { lean_object* x_1; @@ -4632,27 +4618,27 @@ x_1 = lean_mk_string_unchecked("Nat", 3, 3); return x_1; } } -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__10() { +static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__9() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__9; +x_2 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__8; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__11() { +static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__10() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__10; +x_2 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__9; x_3 = l_Lean_Expr_const___override(x_2, x_1); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__12() { +static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__11() { _start: { lean_object* x_1; @@ -4660,27 +4646,27 @@ x_1 = lean_mk_string_unchecked("instLENat", 9, 9); return x_1; } } -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__13() { +static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__12() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__12; +x_2 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__11; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__14() { +static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__13() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__13; +x_2 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__12; x_3 = l_Lean_Expr_const___override(x_2, x_1); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__15() { +static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__14() { _start: { lean_object* x_1; @@ -4688,7 +4674,7 @@ x_1 = lean_mk_string_unchecked("Coeffs", 6, 6); return x_1; } } -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__16() { +static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__15() { _start: { lean_object* x_1; @@ -4696,29 +4682,29 @@ x_1 = lean_mk_string_unchecked("length", 6, 6); return x_1; } } -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__17() { +static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__16() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l_Lean_Elab_Tactic_Omega_initFn____x40_Lean_Elab_Tactic_Omega_Core___hyg_3____closed__3; x_2 = l_Lean_Elab_Tactic_Omega_initFn____x40_Lean_Elab_Tactic_Omega_Core___hyg_3____closed__9; -x_3 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__15; -x_4 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__16; +x_3 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__14; +x_4 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__15; x_5 = l_Lean_Name_mkStr4(x_1, x_2, x_3, x_4); return x_5; } } -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__18() { +static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__17() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__17; +x_2 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__16; x_3 = l_Lean_Expr_const___override(x_2, x_1); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__19() { +static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__18() { _start: { lean_object* x_1; @@ -4726,29 +4712,29 @@ x_1 = lean_mk_string_unchecked("get", 3, 3); return x_1; } } -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__20() { +static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__19() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l_Lean_Elab_Tactic_Omega_initFn____x40_Lean_Elab_Tactic_Omega_Core___hyg_3____closed__3; x_2 = l_Lean_Elab_Tactic_Omega_initFn____x40_Lean_Elab_Tactic_Omega_Core___hyg_3____closed__9; -x_3 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__15; -x_4 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__19; +x_3 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__14; +x_4 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__18; x_5 = l_Lean_Name_mkStr4(x_1, x_2, x_3, x_4); return x_5; } } -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__21() { +static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__20() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__20; +x_2 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__19; x_3 = l_Lean_Expr_const___override(x_2, x_1); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__22() { +static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__21() { _start: { lean_object* x_1; @@ -4756,28 +4742,28 @@ x_1 = lean_mk_string_unchecked("bmod_div_term", 13, 13); return x_1; } } -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__23() { +static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__22() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l_Lean_Elab_Tactic_Omega_initFn____x40_Lean_Elab_Tactic_Omega_Core___hyg_3____closed__3; x_2 = l_Lean_Elab_Tactic_Omega_initFn____x40_Lean_Elab_Tactic_Omega_Core___hyg_3____closed__9; -x_3 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__22; +x_3 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__21; x_4 = l_Lean_Name_mkStr3(x_1, x_2, x_3); return x_4; } } -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__24() { +static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__23() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__23; +x_2 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__22; x_3 = l_Lean_Expr_const___override(x_2, x_1); return x_3; } } -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__25() { +static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__24() { _start: { lean_object* x_1; @@ -4785,23 +4771,23 @@ x_1 = lean_mk_string_unchecked("bmod_sat", 8, 8); return x_1; } } -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__26() { +static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__25() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l_Lean_Elab_Tactic_Omega_initFn____x40_Lean_Elab_Tactic_Omega_Core___hyg_3____closed__3; x_2 = l_Lean_Elab_Tactic_Omega_initFn____x40_Lean_Elab_Tactic_Omega_Core___hyg_3____closed__9; -x_3 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__25; +x_3 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__24; x_4 = l_Lean_Name_mkStr3(x_1, x_2, x_3); return x_4; } } -static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__27() { +static lean_object* _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__26() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__26; +x_2 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__25; x_3 = l_Lean_Expr_const___override(x_2, x_1); return x_3; } @@ -4817,12 +4803,12 @@ x_15 = l_Lean_mkNatLit(x_3); x_16 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__2; x_17 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__3; x_18 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_Omega_instToExprLinearCombo___spec__1(x_16, x_17, x_4); -x_19 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__18; +x_19 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__17; lean_inc(x_18); x_20 = l_Lean_Expr_app___override(x_19, x_18); -x_21 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__8; -x_22 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__11; -x_23 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__14; +x_21 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__7; +x_22 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__10; +x_23 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__13; lean_inc(x_15); x_24 = l_Lean_mkApp4(x_21, x_22, x_23, x_20, x_15); lean_inc(x_10); @@ -4848,11 +4834,11 @@ x_31 = l_Lean_Elab_Tactic_Omega_instToExprLinearCombo___lambda__1___closed__16; x_32 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__1; x_33 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Tactic_Omega_instToExprLinearCombo___spec__1___closed__13; x_34 = l_Lean_mkApp3(x_31, x_32, x_33, x_30); -x_35 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__21; +x_35 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__20; lean_inc(x_15); lean_inc(x_5); x_36 = l_Lean_mkAppB(x_35, x_5, x_15); -x_37 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__24; +x_37 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__23; lean_inc(x_5); lean_inc(x_18); lean_inc(x_12); @@ -4866,7 +4852,7 @@ if (x_40 == 0) { lean_object* x_41; lean_object* x_42; lean_object* x_43; x_41 = lean_ctor_get(x_39, 0); -x_42 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__27; +x_42 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__26; x_43 = l_Lean_mkApp8(x_42, x_12, x_34, x_15, x_18, x_5, x_26, x_41, x_6); lean_ctor_set(x_39, 0, x_43); return x_39; @@ -4879,7 +4865,7 @@ x_45 = lean_ctor_get(x_39, 1); lean_inc(x_45); lean_inc(x_44); lean_dec(x_39); -x_46 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__27; +x_46 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__26; x_47 = l_Lean_mkApp8(x_46, x_12, x_34, x_15, x_18, x_5, x_26, x_44, x_6); x_48 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_48, 0, x_47); @@ -4961,11 +4947,11 @@ lean_inc(x_58); lean_dec(x_25); x_59 = l_Int_toNat(x_2); x_60 = l_Lean_instToExprInt_mkNat(x_59); -x_61 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__21; +x_61 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__20; lean_inc(x_15); lean_inc(x_5); x_62 = l_Lean_mkAppB(x_61, x_5, x_15); -x_63 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__24; +x_63 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__23; lean_inc(x_5); lean_inc(x_18); lean_inc(x_12); @@ -4979,7 +4965,7 @@ if (x_66 == 0) { lean_object* x_67; lean_object* x_68; lean_object* x_69; x_67 = lean_ctor_get(x_65, 0); -x_68 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__27; +x_68 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__26; x_69 = l_Lean_mkApp8(x_68, x_12, x_60, x_15, x_18, x_5, x_57, x_67, x_6); lean_ctor_set(x_65, 0, x_69); return x_65; @@ -4992,7 +4978,7 @@ x_71 = lean_ctor_get(x_65, 1); lean_inc(x_71); lean_inc(x_70); lean_dec(x_65); -x_72 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__27; +x_72 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__26; x_73 = l_Lean_mkApp8(x_72, x_12, x_60, x_15, x_18, x_5, x_57, x_70, x_6); x_74 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_74, 0, x_73); @@ -10125,7 +10111,7 @@ static lean_object* _init_l_Lean_Elab_Tactic_Omega_Problem_dealWithHardEquality_ { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__23; +x_2 = l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__22; x_3 = l_Lean_Expr_const___override(x_2, x_1); return x_3; } @@ -17622,8 +17608,6 @@ l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__25 = _init_l_Lean_Ela lean_mark_persistent(l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__25); l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__26 = _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__26(); lean_mark_persistent(l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__26); -l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__27 = _init_l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__27(); -lean_mark_persistent(l_Lean_Elab_Tactic_Omega_Justification_bmodProof___closed__27); l_Lean_Elab_Tactic_Omega_Justification_proof___rarg___closed__1 = _init_l_Lean_Elab_Tactic_Omega_Justification_proof___rarg___closed__1(); lean_mark_persistent(l_Lean_Elab_Tactic_Omega_Justification_proof___rarg___closed__1); l_Lean_Elab_Tactic_Omega_Justification_proof___rarg___closed__2 = _init_l_Lean_Elab_Tactic_Omega_Justification_proof___rarg___closed__2(); diff --git a/stage0/stdlib/Lean/Elab/Tactic/Omega/Frontend.c b/stage0/stdlib/Lean/Elab/Tactic/Omega/Frontend.c index 4bb19031dd43..dd16c0054ff6 100644 --- a/stage0/stdlib/Lean/Elab/Tactic/Omega/Frontend.c +++ b/stage0/stdlib/Lean/Elab/Tactic/Omega/Frontend.c @@ -542,7 +542,6 @@ static lean_object* l_Lean_Elab_Tactic_Omega_MetaProblem_addFact___lambda__2___c LEAN_EXPORT lean_object* l_Lean_Elab_Tactic_Omega_formatErrorMessage___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_Tactic_Omega_MetaProblem_pushNot___lambda__19___closed__1; LEAN_EXPORT lean_object* l_Lean_Elab_Tactic_Omega_MetaProblem_pushNot___lambda__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_levelZero; static lean_object* l_Lean_Elab_Tactic_Omega_asLinearComboImpl_rewrite___lambda__2___closed__3; static lean_object* l_Lean_Elab_Tactic_Omega_MetaProblem_addFact___lambda__35___closed__13; lean_object* lean_io_mono_nanos_now(lean_object*); @@ -2324,7 +2323,7 @@ static lean_object* _init_l_Lean_Elab_Tactic_Omega_mkEvalRflProof___closed__15() { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_levelZero; +x_2 = lean_box(0); x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); diff --git a/stage0/stdlib/Lean/Elab/Tactic/Simproc.c b/stage0/stdlib/Lean/Elab/Tactic/Simproc.c index 1553d8d8e7fe..ce59b7dcec34 100644 --- a/stage0/stdlib/Lean/Elab/Tactic/Simproc.c +++ b/stage0/stdlib/Lean/Elab/Tactic/Simproc.c @@ -97,7 +97,6 @@ static lean_object* l___regBuiltin_Lean_Elab_Command_elabSimprocPatternBuiltin_d lean_object* l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_append(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Command_elabSimprocPatternBuiltin___spec__1(lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_levelZero; static lean_object* l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Elab_Command_elabSimprocPatternBuiltin___spec__1___closed__30; LEAN_EXPORT lean_object* l_Lean_Elab_Command_elabSimprocPattern(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Command_elabSimprocPatternBuiltin_declRange__1___closed__1; @@ -2308,7 +2307,7 @@ static lean_object* _init_l_Lean_Elab_Command_elabSimprocPatternBuiltin___lambda { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_levelZero; +x_2 = lean_box(0); x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); diff --git a/stage0/stdlib/Lean/Meta/Tactic/FunInd.c b/stage0/stdlib/Lean/Meta/Tactic/FunInd.c index 9bb778de659f..cb0966966222 100644 --- a/stage0/stdlib/Lean/Meta/Tactic/FunInd.c +++ b/stage0/stdlib/Lean/Meta/Tactic/FunInd.c @@ -39,6 +39,7 @@ LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__17___ LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveUnaryInduction___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__16___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_buildInductionBody___spec__26(lean_object*); +static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__6; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_cleanPackedArgs___lambda__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_cleanupAfter_allHeqToEq___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static double l_Lean_withTraceNode___at_Lean_Tactic_FunInd_foldAndCollect___spec__30___lambda__4___closed__5; @@ -60,16 +61,18 @@ lean_object* l_Lean_Meta_withLetDecl___at___private_Lean_Meta_Tactic_Simp_SimpTh lean_object* lean_mk_empty_array_with_capacity(lean_object*); lean_object* l_Lean_mkAppN(lean_object*, lean_object*); static lean_object* l_Lean_Tactic_FunInd_deriveInductionStructural___lambda__4___closed__4; +static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__1; static lean_object* l_panic___at_Lean_Tactic_FunInd_foldAndCollect___spec__10___closed__1; static lean_object* l_Lean_getConstInfo___at_Lean_Tactic_FunInd_foldAndCollect___spec__3___closed__3; static lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_buildInductionBody___spec__44___lambda__2___closed__1; static lean_object* l_Lean_Tactic_FunInd_deriveUnaryInduction___lambda__13___closed__4; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__29(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__6; extern lean_object* l_Lean_Elab_WF_instInhabitedEqnInfo; LEAN_EXPORT lean_object* l_Lean_withTraceNode___at_Lean_Tactic_FunInd_buildInductionCase___spec__7___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkPProdFst(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveUnaryInduction(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__11; +static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__5; LEAN_EXPORT lean_object* l_Lean_withTraceNode___at_Lean_Tactic_FunInd_foldAndCollect___spec__30(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_buildInductionBody___spec__17(lean_object*); @@ -81,6 +84,7 @@ LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_cleanupAfter_go___boxed(lean_objec LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveInductionStructural___lambda__17___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_matchMatcherApp_x3f___at_Lean_Tactic_FunInd_buildInductionBody___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveUnaryInduction___lambda__14(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_buildInductionBody___spec__18___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_matchMatcherApp_x3f___at_Lean_Tactic_FunInd_foldAndCollect___spec__1___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at_Lean_Tactic_FunInd_unpackMutualInduction___spec__1___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -115,11 +119,11 @@ LEAN_EXPORT lean_object* l_Lean_Meta_matchMatcherApp_x3f___at_Lean_Tactic_FunInd uint8_t l_Lean_Exception_isInterrupt(lean_object*); static lean_object* l_Lean_Tactic_FunInd_foldAndCollect___lambda__1___closed__2; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_M_tell(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__7; lean_object* l_Lean_mkAppB(lean_object*, lean_object*, lean_object*); lean_object* l_panic___at_Lean_Meta_congrArg_x3f___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_cleanupAfter_allHeqToEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_Structural_Positions_groupAndSort___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__3___closed__5; -static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__6; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_foldAndCollect___lambda__20(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveInductionStructural___lambda__13___boxed(lean_object**); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_buildInductionBody___spec__27(lean_object*); @@ -129,6 +133,7 @@ LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_foldAndCollec LEAN_EXPORT uint8_t l_Array_isEqvAux___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint64_t lean_uint64_lor(uint64_t, uint64_t); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__7; lean_object* l_Lean_Elab_Structural_RecArgInfo_pickIndicesMajor(lean_object*, lean_object*); static lean_object* l_Lean_Tactic_FunInd_foldAndCollect___lambda__10___closed__3; uint8_t l_Lean_Expr_isAppOfArity(lean_object*, lean_object*, lean_object*); @@ -170,7 +175,6 @@ LEAN_EXPORT lean_object* l_Lean_addTrace___at_Lean_Tactic_FunInd_buildInductionC LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__15___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_foldAndCollect___lambda__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_cleanupAfter_cleanupAfter_x3f___spec__4___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__1; lean_object* lean_mk_array(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveInductionStructural___lambda__17(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Tactic_FunInd_cleanPackedArgs___lambda__3___closed__2; @@ -193,6 +197,7 @@ lean_object* l_Lean_Expr_mdata___override(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_buildInductionBody___spec__19___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_mkFreshId___at_Lean_Tactic_FunInd_buildInductionBody___spec__24___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Structural_getRecArgInfo(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__10; LEAN_EXPORT lean_object* l_StateT_lift___at_Lean_Tactic_FunInd_buildInductionCase___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_MatcherApp_transform___at_Lean_Tactic_FunInd_buildInductionBody___spec__30___lambda__4___boxed(lean_object**); static lean_object* l_Lean_Tactic_FunInd_M_run___rarg___closed__1; @@ -200,9 +205,7 @@ lean_object* l_Lean_replaceRef(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__2___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_MatcherApp_transform___at_Lean_Tactic_FunInd_buildInductionBody___spec__30___lambda__2___closed__1; static lean_object* l_Lean_Tactic_FunInd_foldAndCollect___lambda__23___closed__4; -static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__6; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_foldAndCollect___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____closed__1; LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_cleanupAfter_allHeqToEq___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkExpectedTypeHint(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -229,7 +232,7 @@ LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_isFunInductName___boxed(lean_objec LEAN_EXPORT lean_object* l_Lean_Meta_MatcherApp_transform___at_Lean_Tactic_FunInd_buildInductionBody___spec__30___lambda__6___boxed(lean_object**); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveInductionStructural___lambda__8___boxed(lean_object**); LEAN_EXPORT lean_object* l_Lean_Elab_Structural_Positions_mapMwith___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__12___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__4; LEAN_EXPORT lean_object* l_panic___at_Lean_Tactic_FunInd_buildInductionBody___spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__28(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveUnpackedInduction(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -265,7 +268,6 @@ static lean_object* l_Lean_Expr_withAppAux___at_Lean_Tactic_FunInd_unpackMutualI static lean_object* l_Lean_Meta_MatcherApp_transform___at_Lean_Tactic_FunInd_buildInductionBody___spec__30___closed__4; static lean_object* l_Lean_Tactic_FunInd_deriveInductionStructural___closed__1; LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_cleanupAfter_cleanupAfter_x3f___spec__5(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__12; LEAN_EXPORT lean_object* l_Lean_Loop_forIn_loop___at_Lean_Tactic_FunInd_mkLambdaFVarsMasked___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveInductionStructural___lambda__4___boxed(lean_object**); static lean_object* l_Lean_Tactic_FunInd_deriveInduction___closed__1; @@ -275,7 +277,6 @@ uint8_t l_Lean_Expr_isAppOf(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_cleanupAfter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveUnaryInduction___lambda__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Tactic_FunInd_foldAndCollect___lambda__10___closed__7; -LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769_(lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_buildInductionBody___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__4___closed__1; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_unpackMutualInduction___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -307,7 +308,6 @@ LEAN_EXPORT lean_object* l_Lean_getConstInfo___at_Lean_Tactic_FunInd_foldAndColl LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_cleanPackedArgs(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkApp4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_MatcherApp_inferMatchType___spec__9(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__2; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__28___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedLevel; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_foldAndCollect___lambda__12___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -342,6 +342,7 @@ static lean_object* l_Lean_Tactic_FunInd_foldAndCollect___lambda__9___closed__8; static lean_object* l_panic___at_Lean_Tactic_FunInd_withLetDecls___spec__1___rarg___closed__1; static lean_object* l_Lean_Tactic_FunInd_deriveUnaryInduction___lambda__13___closed__6; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__9; LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_buildInductionBody___spec__20___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_withTraceNode___at_Lean_Tactic_FunInd_buildInductionCase___spec__7___lambda__3(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, uint8_t, double, double, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_CollectLevelParams_main(lean_object*, lean_object*); @@ -351,6 +352,7 @@ lean_object* l_Lean_Level_ofNat(lean_object*); lean_object* l_Lean_Expr_appArg_x21(lean_object*); static lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__16___lambda__4___closed__4; LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_buildInductionBody___spec__39___lambda__1(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__8; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_M2_run(lean_object*); static lean_object* l_Lean_Meta_matchMatcherApp_x3f___at_Lean_Tactic_FunInd_foldAndCollect___spec__1___closed__1; static lean_object* l_Lean_Tactic_FunInd_deriveInductionStructural___lambda__7___closed__1; @@ -361,8 +363,8 @@ LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_de extern lean_object* l_Lean_Elab_WF_eqnInfoExt; LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Tactic_FunInd_buildInductionBody___spec__2(lean_object*); LEAN_EXPORT lean_object* l_Lean_logAt___at_Lean_Tactic_FunInd_buildInductionBody___spec__42___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__4; lean_object* l_List_mapTR_loop___at_Lean_mkConstWithLevelParams___spec__1(lean_object*, lean_object*); -static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__7; LEAN_EXPORT lean_object* l_Array_mapFinIdxM_map___at_Lean_Tactic_FunInd_abstractIndependentMVars___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalDecl_index(lean_object*); LEAN_EXPORT lean_object* l_List_filterTR_loop___at_Lean_Tactic_FunInd_deriveUnaryInduction___spec__4___boxed(lean_object*, lean_object*, lean_object*); @@ -388,7 +390,6 @@ static lean_object* l_Lean_Tactic_FunInd_cleanPackedArgs___lambda__5___closed__3 LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_addTrace___at_Lean_Tactic_FunInd_buildInductionCase___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_buildInductionBody___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__3; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveInductionStructural___lambda__16___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_Elab_Structural_getRecArgInfo___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_ptr_addr(lean_object*); @@ -397,9 +398,9 @@ LEAN_EXPORT lean_object* l_Lean_logAt___at_Lean_Tactic_FunInd_buildInductionBody LEAN_EXPORT lean_object* l_StateT_bind___at_Lean_Tactic_FunInd_foldAndCollect___spec__11___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_panic___at_Lean_Elab_Structural_Positions_groupAndSort___spec__3(lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveInductionStructural___lambda__12(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__7; LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_addTraceNode___at_Lean_Tactic_FunInd_buildInductionCase___spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Structural_eqnInfoExt; +static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__2; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__21___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_range___lambda__1___boxed(lean_object*); size_t lean_usize_of_nat(lean_object*); @@ -413,7 +414,6 @@ static lean_object* l_Lean_Tactic_FunInd_deriveInductionStructural___lambda__13_ static lean_object* l_Lean_Meta_MatcherApp_transform___at_Lean_Tactic_FunInd_buildInductionBody___spec__30___lambda__2___closed__2; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Tactic_FunInd_buildInductionBody___spec__40___boxed(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_MatcherApp_transform___at_Lean_Tactic_FunInd_buildInductionBody___spec__30___lambda__6___closed__1; -static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__5; LEAN_EXPORT lean_object* l_Lean_PersistentArray_forIn___at_Lean_Tactic_FunInd_cleanupAfter_allHeqToEq___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_lambdaTelescopeImp___rarg(lean_object*, uint8_t, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Meta_Match_MatcherApp_Transform_0__Lean_Meta_MatcherApp_forallAltTelescope_x27___at_Lean_Tactic_FunInd_buildInductionBody___spec__43___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -463,6 +463,7 @@ LEAN_EXPORT lean_object* l_Lean_log___at_Lean_Tactic_FunInd_buildInductionBody__ lean_object* l_Array_zip___rarg(lean_object*, lean_object*); lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Meta_arrowDomainsN___spec__6___rarg(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_MatcherApp_transform___at_Lean_Tactic_FunInd_buildInductionBody___spec__30___lambda__2___closed__3; +static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__1; lean_object* l_ReaderT_instMonadFunctor(lean_object*, lean_object*, lean_object*); uint64_t lean_uint64_shift_right(uint64_t, uint64_t); LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at_Lean_Tactic_FunInd_buildInductionBody___spec__10(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -506,11 +507,10 @@ static lean_object* l_Lean_Tactic_FunInd_cleanPackedArgs___lambda__3___closed__1 LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_foldAndCollect___spec__26(lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_M_branch___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__27(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__11; +static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__2; lean_object* l_List_mapTR_loop___at_Lean_MessageData_instCoeListExpr___spec__1(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_M_tell___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_buildInductionBody___spec__28(lean_object*); -static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__2; LEAN_EXPORT lean_object* l_Lean_MVarId_assign___at_Lean_Tactic_FunInd_abstractIndependentMVars___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_PersistentArray_forInAux___at_Lean_Tactic_FunInd_cleanupAfter_cleanupAfter_x3f___spec__2(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MessageData_ofFormat(lean_object*); @@ -551,13 +551,14 @@ LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_de LEAN_EXPORT lean_object* l_Lean_PersistentArray_forIn___at_Lean_Tactic_FunInd_cleanupAfter_cleanupAfter_x3f___spec__1(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Lean_logAt___at_Lean_Tactic_FunInd_buildInductionBody___spec__42___lambda__2(lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveUnaryInduction___lambda__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__8; LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_buildInductionBody___spec__22___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__4; LEAN_EXPORT lean_object* l___private_Lean_Meta_Match_MatcherApp_Transform_0__Lean_Meta_MatcherApp_forallAltTelescope_x27___at_Lean_Tactic_FunInd_buildInductionBody___spec__43___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__8___closed__2; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_foldAndCollect___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__21___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Expr_withAppAux___at_Lean_Tactic_FunInd_unpackMutualInduction___spec__1___lambda__3___closed__1; +static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__10; static lean_object* l_Lean_Tactic_FunInd_deriveInduction___lambda__1___closed__1; static lean_object* l_Array_mapMUnsafe_map___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__5___closed__1; static lean_object* l_Lean_Tactic_FunInd_deduplicateIHs___closed__1; @@ -585,6 +586,7 @@ LEAN_EXPORT lean_object* l_Lean_Meta_MatcherApp_transform___at_Lean_Tactic_FunIn LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_buildInductionBody___spec__25___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_logAt___at_Lean_Tactic_FunInd_buildInductionBody___spec__42___lambda__2___closed__2; lean_object* lean_st_mk_ref(lean_object*, lean_object*); +static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__12; static lean_object* l_Lean_Tactic_FunInd_withLetDecls___rarg___closed__2; LEAN_EXPORT lean_object* l_Lean_getConstInfoDefn___at_Lean_Tactic_FunInd_deriveUnaryInduction___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at_Lean_Tactic_FunInd_foldAndCollect___spec__32___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -602,7 +604,6 @@ uint8_t l_Lean_Expr_hasLooseBVars(lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_unpackMutualInduction___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_num___override(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__8___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__10; LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at_Lean_Tactic_FunInd_foldAndCollect___spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Tactic_FunInd_removeLamda___rarg___lambda__2___closed__4; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_foldAndCollect___lambda__17(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -699,7 +700,6 @@ LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveInductionStructural___lambda static lean_object* l_Lean_Tactic_FunInd_deriveUnaryInduction___lambda__4___closed__1; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_M_branch___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_StateT_lift___at_Lean_Tactic_FunInd_buildInductionBody___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__8; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Option_get___at___private_Lean_Util_Profile_0__Lean_get__profiler___spec__1(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_unpackMutualInduction___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -802,7 +802,6 @@ LEAN_EXPORT lean_object* l_Lean_mkFreshFVarId___at_Lean_Tactic_FunInd_buildInduc LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveUnaryInduction___lambda__13(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_forallTelescopeReducingAuxAux___rarg(uint8_t, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__12___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915_(lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Util_Trace_0__Lean_addTraceNode___spec__1(size_t, size_t, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__15___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Core_instMonadQuotationCoreM; @@ -837,6 +836,7 @@ LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__8___b LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_buildInductionBody___spec__39___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_buildInductionCase___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_mkFreshFVarId___at_Lean_Tactic_FunInd_buildInductionBody___spec__23___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771_(lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionCase___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_foldAndCollect___spec__20___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isFVarOf(lean_object*, lean_object*); @@ -891,16 +891,17 @@ LEAN_EXPORT lean_object* l_Lean_isTracingEnabledFor___at_Lean_Tactic_FunInd_fold LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_cleanPackedArgs___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Tactic_FunInd_deriveInductionStructural___lambda__15___closed__1; lean_object* l_Lean_throwError___rarg(lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__10; LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__16___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_StateT_bind___at_Lean_Tactic_FunInd_buildInductionCase___spec__6___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Tactic_FunInd_buildInductionBody___spec__15___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_withTraceNode___at_Lean_Tactic_FunInd_buildInductionCase___spec__7___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__29___closed__1; LEAN_EXPORT lean_object* l_Lean_logAt___at_Lean_Tactic_FunInd_buildInductionBody___spec__42___lambda__2___boxed(lean_object*); +static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____closed__2; LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_foldAndCollect___spec__23(lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_M2_branch(lean_object*); static lean_object* l_Lean_Tactic_FunInd_foldAndCollect___lambda__10___closed__6; +LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_app___override(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_foldAndCollect___spec__24___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -924,6 +925,7 @@ LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Tactic_FunInd_buildInd LEAN_EXPORT lean_object* l___private_Lean_Meta_Match_MatcherApp_Transform_0__Lean_Meta_MatcherApp_forallAltTelescope_x27___at_Lean_Tactic_FunInd_buildInductionBody___spec__43(lean_object*); static lean_object* l_Lean_Tactic_FunInd_deriveInductionStructural___lambda__11___closed__2; extern lean_object* l_Lean_brecOnSuffix; +LEAN_EXPORT lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917_(lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_MatcherApp_transform___at_Lean_Tactic_FunInd_buildInductionBody___spec__30___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_buildInductionBody___spec__44___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at_Lean_Tactic_FunInd_foldAndCollect___spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -957,7 +959,6 @@ LEAN_EXPORT lean_object* l_Lean_MVarId_assign___at_Lean_Tactic_FunInd_abstractIn lean_object* l_Lean_Meta_mkEqRefl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_unpackMutualInduction___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at_Lean_Tactic_FunInd_buildInductionCase___spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__9; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_indentExpr(lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -1025,7 +1026,6 @@ lean_object* lean_get_match_equations_for(lean_object*, lean_object*, lean_objec lean_object* lean_nat_sub(lean_object*, lean_object*); static lean_object* l_Lean_Elab_Structural_Positions_groupAndSort___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__3___closed__2; LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_deduplicateIHs___spec__1(lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppFn(lean_object*); lean_object* l_Lean_Meta_withLCtx___at___private_Lean_Meta_Basic_0__Lean_Meta_mkLevelErrorMessageCore___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveInductionStructural___lambda__15(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -1055,6 +1055,7 @@ LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__15(le LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__11___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_withLetDecl___at_Lean_Tactic_FunInd_foldAndCollect___spec__13(lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_buildInductionBody___spec__18___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__11; lean_object* l_Lean_mkArrow(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__19___lambda__3___closed__3; static lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__1___closed__5; @@ -1083,10 +1084,10 @@ lean_object* l_List_reverse___rarg(lean_object*); static lean_object* l_Lean_Tactic_FunInd_withLetDecls___rarg___closed__3; LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_foldAndCollect___spec__18(lean_object*); static lean_object* l_Lean_Tactic_FunInd_foldAndCollect___lambda__23___closed__3; +static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__5; static lean_object* l_Lean_Tactic_FunInd_deriveInductionStructural___lambda__15___closed__2; LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_projectMutualInduct___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_foldAndCollect___spec__28___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__4; static lean_object* l_Lean_Tactic_FunInd_deriveInductionStructural___lambda__10___closed__2; LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at_Lean_Tactic_FunInd_buildInductionBody___spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_mk(lean_object*); @@ -1105,11 +1106,11 @@ static lean_object* l_Lean_Tactic_FunInd_cleanPackedArgs___lambda__5___closed__2 LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveUnaryInduction___lambda__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_cleanupAfter_allHeqToEq___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__10___closed__1; +static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__11; static lean_object* l_Lean_Expr_withAppAux___at_Lean_Tactic_FunInd_unpackMutualInduction___spec__1___closed__4; lean_object* l_Lean_isTracingEnabledForCore(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_elimOptParam___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__16___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__9; size_t lean_usize_add(size_t, size_t); LEAN_EXPORT lean_object* l_Lean_Meta_matchMatcherApp_x3f___at_Lean_Tactic_FunInd_foldAndCollect___spec__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Tactic_FunInd_deriveInductionStructural___lambda__5___closed__1; @@ -1117,7 +1118,6 @@ LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_bu LEAN_EXPORT lean_object* l_Lean_withTraceNode___at_Lean_Tactic_FunInd_foldAndCollect___spec__30___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Tactic_FunInd_foldAndCollect___lambda__13___closed__1; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Tactic_FunInd_buildInductionBody___spec__31___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__5; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveUnaryInduction___lambda__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__9___boxed(lean_object**); LEAN_EXPORT lean_object* l_MonadExcept_ofExcept___at_Lean_Tactic_FunInd_foldAndCollect___spec__34___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -1125,7 +1125,6 @@ LEAN_EXPORT lean_object* l_Lean_PersistentArray_forInAux___at_Lean_Tactic_FunInd LEAN_EXPORT lean_object* l_Array_mapFinIdxM_map___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_maskArray___rarg___boxed(lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedName; -static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__1; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_unpackMutualInduction___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_uget(lean_object*, size_t); LEAN_EXPORT lean_object* l_Array_mapFinIdxM_map___at_Lean_Tactic_FunInd_abstractIndependentMVars___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -1188,7 +1187,7 @@ LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_cleanPackedArgs___lambda__2___boxe LEAN_EXPORT lean_object* l_Lean_Meta_matchMatcherApp_x3f___at_Lean_Tactic_FunInd_foldAndCollect___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_contains___at_Lean_Meta_addImplicitTargets_collect___spec__1(lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Structural_Positions_groupAndSort___spec__6(lean_object*, size_t, size_t, lean_object*); -static uint64_t l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__3; +static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____closed__1; static lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_assertIHs___spec__1___closed__1; static lean_object* l_Lean_Tactic_FunInd_foldAndCollect___lambda__9___closed__6; LEAN_EXPORT lean_object* l_Lean_Meta_MatcherApp_transform___at_Lean_Tactic_FunInd_buildInductionBody___spec__30___lambda__7(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -1228,6 +1227,7 @@ static lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__8___closed LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_foldAndCollect___lambda__13(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_usize_dec_lt(size_t, size_t); LEAN_EXPORT lean_object* l_Lean_instantiateMVars___at_Lean_Tactic_FunInd_buildInductionCase___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__3; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__14(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_getMatcherInfo_x3f___at_Lean_Tactic_FunInd_buildInductionBody___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__16(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -1265,7 +1265,6 @@ static lean_object* l_Lean_Tactic_FunInd_foldAndCollect___lambda__10___closed__5 static lean_object* l_Lean_Elab_Structural_Positions_mapMwith___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__12___closed__2; lean_object* l_ReaderT_instMonadExceptOf___rarg(lean_object*); LEAN_EXPORT lean_object* l_panic___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__13(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__8; uint8_t l_Lean_Expr_isFVar(lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_M_ask(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -1280,6 +1279,7 @@ LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Tactic_FunInd_deriveIn static lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__21___closed__2; static lean_object* l_Lean_Meta_MatcherApp_transform___at_Lean_Tactic_FunInd_buildInductionBody___spec__30___lambda__6___closed__3; lean_object* l_Lean_InductiveVal_numCtors(lean_object*); +static uint64_t l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__3; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_removeLamda___at_Lean_Tactic_FunInd_foldAndCollect___spec__17___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint64_t l___private_Lean_Meta_Basic_0__Lean_Meta_Config_toKey(lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_foldAndCollect___spec__23___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -1306,17 +1306,18 @@ LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_foldAndCollect___lambda__13___boxe lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_instantiateForallAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__18___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveUnaryInduction___lambda__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__9; static lean_object* l_Lean_Meta_MatcherApp_transform___at_Lean_Tactic_FunInd_buildInductionBody___spec__30___lambda__5___closed__2; LEAN_EXPORT lean_object* l_Lean_Meta_MatcherApp_transform___at_Lean_Tactic_FunInd_buildInductionBody___spec__30___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__1___closed__1; static lean_object* l_Lean_Elab_Structural_Positions_groupAndSort___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__3___closed__6; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_isFunInductName___lambda__2___boxed(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_MatcherApp_transform___at_Lean_Tactic_FunInd_buildInductionBody___spec__30___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____closed__2; lean_object* l_Lean_Meta_isProof(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionBody___lambda__4___boxed(lean_object**); static lean_object* l_Lean_Tactic_FunInd_unpackMutualInduction___lambda__6___closed__9; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_buildInductionCase___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__16___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__17___boxed(lean_object**); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Tactic_FunInd_buildInductionBody___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addDecl(lean_object*, lean_object*, lean_object*, lean_object*); @@ -1325,7 +1326,6 @@ static lean_object* l_Lean_Tactic_FunInd_withLetDecls___rarg___closed__1; LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_deriveUnaryInduction___lambda__5___boxed(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Tactic_FunInd_buildInductionCase___lambda__3___closed__4; static lean_object* l_Lean_Tactic_FunInd_deriveUnaryInduction___lambda__12___closed__2; -LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkFreshFVarId___rarg(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at_Lean_Tactic_FunInd_foldAndCollect___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_foldAndCollect___lambda__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -58053,7 +58053,7 @@ x_64 = lean_ctor_get(x_62, 1); lean_inc(x_64); lean_dec(x_62); x_65 = 0; -x_66 = l_Lean_Meta_mkLambdaFVars(x_2, x_63, x_47, x_48, x_47, x_65, x_12, x_13, x_14, x_15, x_64); +x_66 = l_Lean_Meta_mkLambdaFVars(x_2, x_63, x_48, x_48, x_47, x_65, x_12, x_13, x_14, x_15, x_64); if (lean_obj_tag(x_66) == 0) { lean_object* x_67; lean_object* x_68; lean_object* x_69; @@ -58278,7 +58278,7 @@ x_111 = lean_ctor_get(x_109, 1); lean_inc(x_111); lean_dec(x_109); x_112 = 0; -x_113 = l_Lean_Meta_mkLambdaFVars(x_2, x_110, x_93, x_94, x_93, x_112, x_12, x_13, x_14, x_15, x_111); +x_113 = l_Lean_Meta_mkLambdaFVars(x_2, x_110, x_94, x_94, x_93, x_112, x_12, x_13, x_14, x_15, x_111); if (lean_obj_tag(x_113) == 0) { lean_object* x_114; lean_object* x_115; lean_object* x_116; @@ -61307,7 +61307,7 @@ static lean_object* _init_l_Lean_Tactic_FunInd_cleanPackedArgs___lambda__5___clo lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Tactic_FunInd_foldAndCollect___lambda__9___closed__1; x_2 = l_Lean_Tactic_FunInd_cleanPackedArgs___lambda__5___closed__4; -x_3 = lean_unsigned_to_nat(793u); +x_3 = lean_unsigned_to_nat(791u); x_4 = lean_unsigned_to_nat(50u); x_5 = l_List_forIn_x27_loop___at_Lean_Tactic_FunInd_foldAndCollect___spec__6___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -64626,7 +64626,7 @@ static lean_object* _init_l_Lean_Tactic_FunInd_withLetDecls___rarg___closed__4() lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Tactic_FunInd_foldAndCollect___lambda__9___closed__1; x_2 = l_Lean_Tactic_FunInd_withLetDecls___rarg___closed__3; -x_3 = lean_unsigned_to_nat(887u); +x_3 = lean_unsigned_to_nat(885u); x_4 = lean_unsigned_to_nat(2u); x_5 = l_Lean_Tactic_FunInd_withLetDecls___rarg___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -70165,7 +70165,7 @@ static lean_object* _init_l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_d lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Tactic_FunInd_foldAndCollect___lambda__9___closed__1; x_2 = l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__19___lambda__3___closed__1; -x_3 = lean_unsigned_to_nat(1048u); +x_3 = lean_unsigned_to_nat(1046u); x_4 = lean_unsigned_to_nat(73u); x_5 = l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__19___lambda__3___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -70178,7 +70178,7 @@ static lean_object* _init_l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_d lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Tactic_FunInd_foldAndCollect___lambda__9___closed__1; x_2 = l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__19___lambda__3___closed__1; -x_3 = lean_unsigned_to_nat(1050u); +x_3 = lean_unsigned_to_nat(1048u); x_4 = lean_unsigned_to_nat(62u); x_5 = l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__19___lambda__3___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -70208,7 +70208,7 @@ static lean_object* _init_l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_d lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Tactic_FunInd_foldAndCollect___lambda__9___closed__1; x_2 = l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__19___lambda__3___closed__1; -x_3 = lean_unsigned_to_nat(1049u); +x_3 = lean_unsigned_to_nat(1047u); x_4 = lean_unsigned_to_nat(67u); x_5 = l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__19___lambda__3___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -73029,7 +73029,7 @@ x_45 = lean_ctor_get(x_43, 1); lean_inc(x_45); lean_dec(x_43); x_46 = 0; -x_47 = l_Lean_Meta_mkLambdaFVars(x_5, x_44, x_40, x_41, x_40, x_46, x_18, x_19, x_20, x_21, x_45); +x_47 = l_Lean_Meta_mkLambdaFVars(x_5, x_44, x_41, x_41, x_40, x_46, x_18, x_19, x_20, x_21, x_45); lean_dec(x_5); if (lean_obj_tag(x_47) == 0) { @@ -74198,7 +74198,7 @@ static lean_object* _init_l_Lean_Tactic_FunInd_deriveInductionStructural___lambd lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Tactic_FunInd_foldAndCollect___lambda__9___closed__1; x_2 = l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__19___lambda__3___closed__1; -x_3 = lean_unsigned_to_nat(971u); +x_3 = lean_unsigned_to_nat(969u); x_4 = lean_unsigned_to_nat(6u); x_5 = l_Lean_Tactic_FunInd_deriveInductionStructural___lambda__9___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -75062,7 +75062,7 @@ static lean_object* _init_l_Lean_Tactic_FunInd_deriveInductionStructural___lambd lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Tactic_FunInd_foldAndCollect___lambda__9___closed__1; x_2 = l_Array_forIn_x27Unsafe_loop___at_Lean_Tactic_FunInd_deriveInductionStructural___spec__19___lambda__3___closed__1; -x_3 = lean_unsigned_to_nat(924u); +x_3 = lean_unsigned_to_nat(922u); x_4 = lean_unsigned_to_nat(41u); x_5 = l_List_forIn_x27_loop___at_Lean_Tactic_FunInd_foldAndCollect___spec__6___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -78218,7 +78218,7 @@ lean_dec(x_1); return x_3; } } -LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { uint8_t x_5; lean_object* x_6; lean_object* x_7; @@ -78230,15 +78230,15 @@ lean_ctor_set(x_7, 1, x_4); return x_7; } } -static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__1() { +static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__1() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__1___boxed), 4, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__1___boxed), 4, 0); return x_1; } } -static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__2() { +static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__2() { _start: { uint8_t x_1; uint8_t x_2; uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; @@ -78269,16 +78269,16 @@ lean_ctor_set_uint8(x_6, 17, x_2); return x_6; } } -static uint64_t _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__3() { +static uint64_t _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__3() { _start: { lean_object* x_1; uint64_t x_2; -x_1 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__2; +x_1 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__2; x_2 = l___private_Lean_Meta_Basic_0__Lean_Meta_Config_toKey(x_1); return x_2; } } -static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__4() { +static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__4() { _start: { lean_object* x_1; @@ -78286,21 +78286,21 @@ x_1 = l_Lean_PersistentHashMap_mkEmptyEntriesArray(lean_box(0), lean_box(0)); return x_1; } } -static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__5() { +static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__5() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__4; +x_1 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__4; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__6() { +static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__6() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__5; +x_1 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__5; x_2 = l___private_Lean_Util_Trace_0__Lean_getResetTraces___at_Lean_Tactic_FunInd_foldAndCollect___spec__32___closed__3; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); @@ -78308,14 +78308,14 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__7() { +static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__7() { _start: { lean_object* x_1; lean_object* x_2; uint64_t x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; lean_object* x_8; x_1 = lean_box(0); -x_2 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__2; -x_3 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__3; -x_4 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__6; +x_2 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__2; +x_3 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__3; +x_4 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__6; x_5 = l_Lean_Tactic_FunInd_M_run___rarg___closed__1; x_6 = lean_unsigned_to_nat(0u); x_7 = 0; @@ -78332,12 +78332,12 @@ lean_ctor_set_uint8(x_8, sizeof(void*)*6 + 9, x_7); return x_8; } } -static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__8() { +static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__8() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_unsigned_to_nat(0u); -x_2 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__5; +x_2 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__5; x_3 = lean_alloc_ctor(0, 9, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_1); @@ -78351,11 +78351,11 @@ lean_ctor_set(x_3, 8, x_2); return x_3; } } -static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__9() { +static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__9() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__5; +x_1 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__5; x_2 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_2, 0, x_1); lean_ctor_set(x_2, 1, x_1); @@ -78366,11 +78366,11 @@ lean_ctor_set(x_2, 5, x_1); return x_2; } } -static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__10() { +static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__10() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__5; +x_1 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__5; x_2 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_2, 0, x_1); lean_ctor_set(x_2, 1, x_1); @@ -78379,15 +78379,15 @@ lean_ctor_set(x_2, 3, x_1); return x_2; } } -static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__11() { +static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__11() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = lean_box(0); -x_2 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__8; -x_3 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__9; +x_2 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__8; +x_3 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__9; x_4 = l___private_Lean_Util_Trace_0__Lean_getResetTraces___at_Lean_Tactic_FunInd_foldAndCollect___spec__32___closed__3; -x_5 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__10; +x_5 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__10; x_6 = lean_alloc_ctor(0, 5, 0); lean_ctor_set(x_6, 0, x_2); lean_ctor_set(x_6, 1, x_3); @@ -78397,7 +78397,7 @@ lean_ctor_set(x_6, 4, x_5); return x_6; } } -LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; uint8_t x_6; @@ -78411,7 +78411,7 @@ x_8 = lean_ctor_get(x_5, 1); x_9 = lean_ctor_get(x_7, 0); lean_inc(x_9); lean_dec(x_7); -x_10 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__1; +x_10 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__1; lean_inc(x_1); x_11 = l_Lean_Tactic_FunInd_isFunInductName(x_9, x_1); lean_dec(x_9); @@ -78435,14 +78435,14 @@ lean_free_object(x_5); x_15 = lean_ctor_get(x_1, 0); lean_inc(x_15); lean_dec(x_1); -x_16 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__11; +x_16 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__11; x_17 = lean_st_mk_ref(x_16, x_8); x_18 = lean_ctor_get(x_17, 0); lean_inc(x_18); x_19 = lean_ctor_get(x_17, 1); lean_inc(x_19); lean_dec(x_17); -x_20 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__7; +x_20 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__7; lean_inc(x_18); x_21 = l_Lean_Tactic_FunInd_deriveInduction(x_15, x_20, x_18, x_2, x_3, x_19); if (lean_obj_tag(x_21) == 0) @@ -78526,7 +78526,7 @@ lean_dec(x_5); x_40 = lean_ctor_get(x_38, 0); lean_inc(x_40); lean_dec(x_38); -x_41 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__1; +x_41 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__1; lean_inc(x_1); x_42 = l_Lean_Tactic_FunInd_isFunInductName(x_40, x_1); lean_dec(x_40); @@ -78548,14 +78548,14 @@ lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean x_46 = lean_ctor_get(x_1, 0); lean_inc(x_46); lean_dec(x_1); -x_47 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__11; +x_47 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__11; x_48 = lean_st_mk_ref(x_47, x_39); x_49 = lean_ctor_get(x_48, 0); lean_inc(x_49); x_50 = lean_ctor_get(x_48, 1); lean_inc(x_50); lean_dec(x_48); -x_51 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__7; +x_51 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__7; lean_inc(x_49); x_52 = l_Lean_Tactic_FunInd_deriveInduction(x_46, x_51, x_49, x_2, x_3, x_50); if (lean_obj_tag(x_52) == 0) @@ -78630,7 +78630,7 @@ return x_66; } } } -static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____closed__1() { +static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____closed__1() { _start: { lean_object* x_1; @@ -78638,19 +78638,19 @@ x_1 = lean_alloc_closure((void*)(l_Lean_Tactic_FunInd_isFunInductName___boxed), return x_1; } } -static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____closed__2() { +static lean_object* _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____closed__2() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2), 4, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2), 4, 0); return x_1; } } -LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769_(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; -x_2 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____closed__1; +x_2 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____closed__1; x_3 = l_Lean_registerReservedNamePredicate(x_2, x_1); if (lean_obj_tag(x_3) == 0) { @@ -78658,7 +78658,7 @@ lean_object* x_4; lean_object* x_5; lean_object* x_6; x_4 = lean_ctor_get(x_3, 1); lean_inc(x_4); lean_dec(x_3); -x_5 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____closed__2; +x_5 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____closed__2; x_6 = l_Lean_registerReservedNameAction(x_5, x_4); return x_6; } @@ -78686,18 +78686,18 @@ return x_10; } } } -LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +LEAN_EXPORT lean_object* l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; -x_5 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__1(x_1, x_2, x_3, x_4); +x_5 = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__1(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_5; } } -static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__1() { +static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__1() { _start: { lean_object* x_1; @@ -78705,17 +78705,17 @@ x_1 = lean_mk_string_unchecked("initFn", 6, 6); return x_1; } } -static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__2() { +static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__1; +x_2 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__1; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__3() { +static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__3() { _start: { lean_object* x_1; @@ -78723,17 +78723,17 @@ x_1 = lean_mk_string_unchecked("_@", 2, 2); return x_1; } } -static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__4() { +static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__2; -x_2 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__3; +x_1 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__2; +x_2 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__3; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__5() { +static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__5() { _start: { lean_object* x_1; @@ -78741,47 +78741,47 @@ x_1 = lean_mk_string_unchecked("Lean", 4, 4); return x_1; } } -static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__6() { +static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__6() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__4; -x_2 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__5; +x_1 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__4; +x_2 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__5; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__7() { +static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__7() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__6; +x_1 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__6; x_2 = l_Lean_Tactic_FunInd_foldAndCollect___lambda__27___closed__1; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__8() { +static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__8() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__7; +x_1 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__7; x_2 = l_Lean_logAt___at_Lean_Tactic_FunInd_buildInductionBody___spec__42___lambda__2___closed__3; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__9() { +static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__9() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__8; +x_1 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__8; x_2 = l_Lean_Tactic_FunInd_foldAndCollect___lambda__27___closed__2; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__10() { +static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__10() { _start: { lean_object* x_1; @@ -78789,33 +78789,33 @@ x_1 = lean_mk_string_unchecked("_hyg", 4, 4); return x_1; } } -static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__11() { +static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__11() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__9; -x_2 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__10; +x_1 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__9; +x_2 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__10; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__12() { +static lean_object* _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__12() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__11; -x_2 = lean_unsigned_to_nat(16915u); +x_1 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__11; +x_2 = lean_unsigned_to_nat(16917u); x_3 = l_Lean_Name_num___override(x_1, x_2); return x_3; } } -LEAN_EXPORT lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915_(lean_object* x_1) { +LEAN_EXPORT lean_object* l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917_(lean_object* x_1) { _start: { lean_object* x_2; uint8_t x_3; lean_object* x_4; lean_object* x_5; x_2 = l_Lean_Tactic_FunInd_foldAndCollect___lambda__27___closed__3; x_3 = 0; -x_4 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__12; +x_4 = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__12; x_5 = l_Lean_registerTraceClass(x_2, x_3, x_4, x_1); return x_5; } @@ -79465,59 +79465,59 @@ l_Lean_Tactic_FunInd_isFunInductName___lambda__2___closed__1 = _init_l_Lean_Tact lean_mark_persistent(l_Lean_Tactic_FunInd_isFunInductName___lambda__2___closed__1); l_Lean_Tactic_FunInd_isFunInductName___lambda__2___closed__2 = _init_l_Lean_Tactic_FunInd_isFunInductName___lambda__2___closed__2(); lean_mark_persistent(l_Lean_Tactic_FunInd_isFunInductName___lambda__2___closed__2); -l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__1 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__1(); -lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__1); -l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__2 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__2(); -lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__2); -l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__3 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__3(); -l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__4 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__4(); -lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__4); -l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__5 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__5(); -lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__5); -l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__6 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__6(); -lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__6); -l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__7 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__7(); -lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__7); -l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__8 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__8(); -lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__8); -l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__9 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__9(); -lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__9); -l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__10 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__10(); -lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__10); -l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__11 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__11(); -lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____lambda__2___closed__11); -l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____closed__1 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____closed__1(); -lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____closed__1); -l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____closed__2 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____closed__2(); -lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769____closed__2); -if (builtin) {res = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16769_(lean_io_mk_world()); +l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__1 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__1(); +lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__1); +l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__2 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__2(); +lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__2); +l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__3 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__3(); +l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__4 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__4(); +lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__4); +l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__5 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__5(); +lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__5); +l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__6 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__6(); +lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__6); +l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__7 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__7(); +lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__7); +l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__8 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__8(); +lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__8); +l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__9 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__9(); +lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__9); +l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__10 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__10(); +lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__10); +l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__11 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__11(); +lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____lambda__2___closed__11); +l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____closed__1 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____closed__1(); +lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____closed__1); +l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____closed__2 = _init_l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____closed__2(); +lean_mark_persistent(l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771____closed__2); +if (builtin) {res = l_Lean_Tactic_FunInd_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16771_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -}l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__1 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__1(); -lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__1); -l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__2 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__2(); -lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__2); -l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__3 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__3(); -lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__3); -l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__4 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__4(); -lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__4); -l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__5 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__5(); -lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__5); -l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__6 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__6(); -lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__6); -l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__7 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__7(); -lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__7); -l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__8 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__8(); -lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__8); -l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__9 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__9(); -lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__9); -l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__10 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__10(); -lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__10); -l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__11 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__11(); -lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__11); -l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__12 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__12(); -lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915____closed__12); -if (builtin) {res = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16915_(lean_io_mk_world()); +}l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__1 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__1(); +lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__1); +l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__2 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__2(); +lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__2); +l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__3 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__3(); +lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__3); +l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__4 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__4(); +lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__4); +l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__5 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__5(); +lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__5); +l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__6 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__6(); +lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__6); +l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__7 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__7(); +lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__7); +l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__8 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__8(); +lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__8); +l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__9 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__9(); +lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__9); +l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__10 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__10(); +lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__10); +l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__11 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__11(); +lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__11); +l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__12 = _init_l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__12(); +lean_mark_persistent(l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917____closed__12); +if (builtin) {res = l_initFn____x40_Lean_Meta_Tactic_FunInd___hyg_16917_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); }return lean_io_result_mk_ok(lean_box(0)); diff --git a/stage0/stdlib/Lean/Meta/Tactic/Simp/BuiltinSimprocs/BitVec.c b/stage0/stdlib/Lean/Meta/Tactic/Simp/BuiltinSimprocs/BitVec.c index 3deb97ea6135..c0bd6906f308 100644 --- a/stage0/stdlib/Lean/Meta/Tactic/Simp/BuiltinSimprocs/BitVec.c +++ b/stage0/stdlib/Lean/Meta/Tactic/Simp/BuiltinSimprocs/BitVec.c @@ -16355,9 +16355,9 @@ static lean_object* _init_l_BitVec_reduceCast___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_BitVec_reduceUnary___lambda__1___closed__2; +x_1 = lean_box(0); x_2 = l_BitVec_reduceCast___closed__2; -x_3 = l_Lean_Name_mkStr2(x_1, x_2); +x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } diff --git a/stage0/stdlib/Lean/Server/CodeActions/Attr.c b/stage0/stdlib/Lean/Server/CodeActions/Attr.c index 37547d9552a1..2b407fdc244d 100644 --- a/stage0/stdlib/Lean/Server/CodeActions/Attr.c +++ b/stage0/stdlib/Lean/Server/CodeActions/Attr.c @@ -121,7 +121,6 @@ LEAN_EXPORT lean_object* l_Lean_RBNode_find___at_Lean_CodeAction_CommandCodeActi static lean_object* l___private_Lean_Server_CodeActions_Attr_0__Lean_CodeAction_addBuiltin___closed__3; lean_object* l_EStateM_pure___rarg(lean_object*, lean_object*); static lean_object* l___private_Lean_Server_CodeActions_Attr_0__Lean_CodeAction_addBuiltin___closed__21; -extern lean_object* l_Lean_levelZero; LEAN_EXPORT lean_object* l_Lean_RBNode_find___at_Lean_CodeAction_CommandCodeActions_insert___spec__1___boxed(lean_object*, lean_object*); static lean_object* l_Lean_CodeAction_initFn____x40_Lean_Server_CodeActions_Attr___hyg_83____closed__3; lean_object* l_Lean_Elab_realizeGlobalConstNoOverloadWithInfo(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -3710,7 +3709,7 @@ static lean_object* _init_l___private_Lean_Server_CodeActions_Attr_0__Lean_CodeA { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_levelZero; +x_2 = lean_box(0); x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); diff --git a/stage0/stdlib/Lean/ToExpr.c b/stage0/stdlib/Lean/ToExpr.c index 4e0e44380792..d11f41c1a7d0 100644 --- a/stage0/stdlib/Lean/ToExpr.c +++ b/stage0/stdlib/Lean/ToExpr.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Lean.ToExpr -// Imports: Lean.Expr Init.Data.BitVec.Basic +// Imports: Lean.Expr Lean.ToLevel Init.Data.BitVec.Basic #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -16,42 +16,37 @@ extern "C" { static lean_object* l_Lean_instToExprInt_mkNat___closed__9; static lean_object* l_Lean_instToExprUInt16___lambda__1___closed__5; lean_object* l_Lean_Expr_const___override(lean_object*, lean_object*); -static lean_object* l_Lean_instToExprProd___rarg___closed__1; static lean_object* l_Lean_instToExprChar___closed__2; static lean_object* l_Lean_instToExprBool___closed__4; -static lean_object* l_Lean_instToExprOption___rarg___lambda__1___closed__7; -static lean_object* l_Lean_instToExprList___rarg___closed__3; static lean_object* l_Lean_instToExprUInt64___closed__2; static lean_object* l_Lean_instToExprChar___lambda__1___closed__1; static lean_object* l_Lean_instToExprUnit___lambda__1___closed__2; +static lean_object* l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__2; static lean_object* l_Lean_Expr_toCtorIfLit___closed__11; lean_object* l_Lean_mkNatLit(lean_object*); LEAN_EXPORT lean_object* l_Lean_instToExprBool; static lean_object* l_Lean_Expr_toCtorIfLit___closed__8; LEAN_EXPORT lean_object* l_Lean_instToExprBool___lambda__1(uint8_t); LEAN_EXPORT lean_object* l_Lean_instToExprUInt8; -static lean_object* l_Lean_instToExprList___rarg___closed__6; lean_object* l_Lean_mkAppN(lean_object*, lean_object*); static lean_object* l_Lean_instToExprUSize___lambda__1___closed__5; -LEAN_EXPORT lean_object* l_Lean_instToExprArray___rarg(lean_object*); -LEAN_EXPORT lean_object* l_Lean_instToExprArray(lean_object*); static lean_object* l_Lean_instToExprString___closed__2; +LEAN_EXPORT lean_object* l_Lean_instToExprArrayOfToLevel(lean_object*); static lean_object* l_Lean_Expr_toCtorIfLit___closed__9; static lean_object* l_Lean_instToExprLiteral___lambda__1___closed__7; static lean_object* l_Lean_Expr_toCtorIfLit___closed__7; -static lean_object* l_Lean_instToExprOption___rarg___lambda__1___closed__1; lean_object* lean_uint32_to_nat(uint32_t); static lean_object* l_Lean_instToExprUnit___lambda__1___closed__3; static lean_object* l_Lean_instToExprPreresolved___lambda__1___closed__3; -static lean_object* l_Lean_instToExprList___rarg___closed__4; static lean_object* l_Lean_instToExprString___closed__4; -static lean_object* l_Lean_instToExprProd___rarg___lambda__1___closed__1; +static lean_object* l_Lean_instToExprListOfToLevel___rarg___closed__2; static lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_mkStr___closed__1; static lean_object* l_Lean_instToExprUInt16___lambda__1___closed__3; static lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux___closed__1; LEAN_EXPORT lean_object* l_Lean_instToExprUInt16___lambda__1(uint16_t); lean_object* l_Lean_mkAppB(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_instToExprUInt16___closed__2; +static lean_object* l_Lean_instToExprListOfToLevel___rarg___closed__4; static lean_object* l_Lean_instToExprInt___lambda__1___closed__7; static lean_object* l_Lean_instToExprLiteral___lambda__1___closed__4; static lean_object* l_Lean_instToExprInt_mkNat___closed__12; @@ -61,29 +56,25 @@ static lean_object* l_Lean_instToExprLiteral___lambda__1___closed__1; static lean_object* l_Lean_instToExprBool___lambda__1___closed__4; LEAN_EXPORT lean_object* l_Lean_instToExprString; static lean_object* l_Lean_instToExprUInt8___closed__2; -static lean_object* l_Lean_instToExprProd___rarg___lambda__1___closed__3; -static lean_object* l_Lean_instToExprList___rarg___closed__7; +static lean_object* l_Lean_instToExprProdOfToLevel___rarg___closed__1; static lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_go___closed__7; static lean_object* l_Lean_instToExprFin___lambda__1___closed__6; lean_object* l_Lean_Expr_lit___override(lean_object*); static lean_object* l_Lean_instToExprUInt16___closed__3; -static lean_object* l_Lean_instToExprOption___rarg___lambda__1___closed__2; -static lean_object* l_Lean_instToExprProd___rarg___closed__2; static lean_object* l_Lean_instToExprNat___closed__3; -static lean_object* l_Lean_instToExprList___rarg___closed__2; lean_object* lean_array_push(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_instToExprUInt64___lambda__1___boxed(lean_object*); static lean_object* l_Lean_instToExprInt_mkNat___closed__11; static lean_object* l_Lean_instToExprInt___closed__1; static lean_object* l_Lean_instToExprFilePath___closed__2; static lean_object* l_Lean_instToExprInt_mkNat___closed__6; +static lean_object* l_Lean_instToExprListOfToLevel___rarg___closed__6; static lean_object* l_Lean_instToExprBool___lambda__1___closed__7; static lean_object* l_Lean_instToExprPreresolved___closed__1; LEAN_EXPORT lean_object* l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Expr_toCtorIfLit___spec__1(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_instToExprUInt64___lambda__1___closed__4; static lean_object* l_Lean_instToExprUInt32___lambda__1___closed__3; -static lean_object* l_Lean_instToExprOption___rarg___closed__1; -LEAN_EXPORT lean_object* l_Lean_instToExprOption___rarg___lambda__1(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_instToExprProdOfToLevel___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_instToExprBool___closed__3; static lean_object* l_Lean_instToExprFin___lambda__1___closed__5; static lean_object* l_Lean_instToExprUInt32___closed__2; @@ -96,14 +87,16 @@ static lean_object* l_Lean_Expr_toCtorIfLit___closed__2; static lean_object* l_Lean_instToExprNat___closed__1; static lean_object* l_Lean_instToExprChar___closed__4; static lean_object* l_Lean_instToExprInt___lambda__1___closed__4; +static lean_object* l_Lean_instToExprProdOfToLevel___rarg___lambda__1___closed__1; +static lean_object* l_Lean_instToExprListOfToLevel___rarg___closed__5; static lean_object* l_Lean_instToExprFVarId___closed__3; static lean_object* l_Lean_instToExprFVarId___closed__2; lean_object* l_Lean_mkApp4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_instToExprBool___lambda__1___closed__5; +LEAN_EXPORT lean_object* l_Lean_instToExprOptionOfToLevel___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_int_dec_le(lean_object*, lean_object*); static lean_object* l_Lean_instToExprFVarId___closed__4; static lean_object* l_Lean_instToExprPreresolved___lambda__1___closed__11; -static lean_object* l_Lean_instToExprProd___rarg___lambda__1___closed__2; lean_object* l_Lean_Level_ofNat(lean_object*); LEAN_EXPORT lean_object* l_Lean_instToExprBool___lambda__1___boxed(lean_object*); static lean_object* l_Lean_instToExprPreresolved___lambda__1___closed__6; @@ -114,6 +107,7 @@ LEAN_EXPORT uint8_t l___private_Lean_ToExpr_0__Lean_Name_toExprAux_isSimple(lean static lean_object* l_Lean_instToExprInt___lambda__1___closed__3; lean_object* l_Lean_Name_mkStr3(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_instToExprUInt8___lambda__1___closed__4; +LEAN_EXPORT lean_object* l_Lean_instToExprOptionOfToLevel(lean_object*); static lean_object* l_Lean_instToExprUSize___closed__2; static lean_object* l_Lean_instToExprUnit___closed__2; static lean_object* l_Lean_instToExprUInt16___lambda__1___closed__4; @@ -125,7 +119,6 @@ LEAN_EXPORT lean_object* l_Lean_instToExprUInt64; static lean_object* l_Lean_instToExprFilePath___closed__3; static lean_object* l_Lean_instToExprUInt8___closed__3; static lean_object* l_Lean_instToExprUnit___closed__4; -static lean_object* l_Lean_instToExprArray___rarg___lambda__1___closed__2; static lean_object* l_Lean_instToExprName___closed__3; static lean_object* l_Lean_instToExprPreresolved___lambda__1___closed__7; LEAN_EXPORT lean_object* l_Lean_instToExprChar; @@ -135,42 +128,41 @@ static lean_object* l_Lean_instToExprInt_mkNat___closed__3; LEAN_EXPORT lean_object* l_Lean_instToExprUInt16___lambda__1___boxed(lean_object*); lean_object* lean_nat_to_int(lean_object*); LEAN_EXPORT lean_object* l_Lean_instToExprFilePath___lambda__1(lean_object*); -static lean_object* l_Lean_instToExprArray___rarg___closed__1; LEAN_EXPORT lean_object* l_Lean_instToExprPreresolved; static lean_object* l_Lean_instToExprChar___lambda__1___closed__3; +LEAN_EXPORT lean_object* l_Lean_instToExprArrayOfToLevel___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_mkStr___closed__7; LEAN_EXPORT lean_object* l___private_Lean_ToExpr_0__Lean_List_toExprAux___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_instToExprBitVec___lambda__1___closed__1; static lean_object* l_Lean_Expr_toCtorIfLit___closed__6; static lean_object* l_Lean_instToExprUInt8___lambda__1___closed__2; -static lean_object* l_Lean_instToExprList___rarg___closed__8; static lean_object* l_Lean_instToExprInt_mkNat___closed__10; static lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_mkStr___closed__8; static lean_object* l_Lean_instToExprUInt32___closed__3; +static lean_object* l_Lean_instToExprListOfToLevel___rarg___closed__3; static lean_object* l_Lean_instToExprUInt64___closed__1; static lean_object* l_Lean_instToExprUInt64___lambda__1___closed__5; lean_object* lean_uint64_to_nat(uint64_t); -LEAN_EXPORT lean_object* l_Lean_instToExprList___rarg(lean_object*); static lean_object* l_Lean_instToExprName___closed__1; LEAN_EXPORT lean_object* l_Lean_instToExprInt___lambda__1(lean_object*); +static lean_object* l_Lean_instToExprArrayOfToLevel___rarg___lambda__1___closed__2; static lean_object* l_Lean_instToExprFilePath___closed__4; +static lean_object* l_Lean_instToExprPreresolved___lambda__1___closed__12; static lean_object* l_Lean_instToExprChar___closed__1; -static lean_object* l_Lean_instToExprProd___rarg___lambda__1___closed__4; +static lean_object* l_Lean_instToExprListOfToLevel___rarg___closed__1; lean_object* lean_array_to_list(lean_object*); static lean_object* l_Lean_instToExprFin___closed__1; -LEAN_EXPORT lean_object* l_Lean_instToExprProd(lean_object*, lean_object*); static lean_object* l_Lean_instToExprUInt32___lambda__1___closed__5; +LEAN_EXPORT lean_object* l_Lean_instToExprProdOfToLevel___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_instToExprArrayOfToLevel___rarg___lambda__1___closed__1; +static lean_object* l_Lean_instToExprProdOfToLevel___rarg___lambda__1___closed__2; LEAN_EXPORT lean_object* l_Lean_instToExprNat; static lean_object* l_Lean_instToExprUInt64___closed__3; -extern lean_object* l_Lean_levelZero; -static lean_object* l_Lean_instToExprArray___rarg___lambda__1___closed__4; static lean_object* l_Lean_instToExprUInt32___lambda__1___closed__1; static lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_mkStr___closed__3; static lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_go___closed__4; lean_object* l_panic___at_Lean_Expr_appFn_x21___spec__1(lean_object*); static lean_object* l_Lean_instToExprUnit___lambda__1___closed__4; -static lean_object* l_Lean_instToExprArray___rarg___closed__2; -LEAN_EXPORT lean_object* l_Lean_instToExprArray___rarg___lambda__1(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_instToExprBitVec___closed__2; LEAN_EXPORT lean_object* l_Lean_instToExprFin___lambda__1(lean_object*, lean_object*); static lean_object* l_Lean_instToExprPreresolved___closed__3; @@ -180,12 +172,13 @@ static lean_object* l_Lean_instToExprUInt16___closed__1; lean_object* l_Lean_Name_str___override(lean_object*, lean_object*); static lean_object* l_Lean_instToExprLiteral___lambda__1___closed__5; static lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_go___closed__9; +static lean_object* l_Lean_instToExprPreresolved___lambda__1___closed__14; static lean_object* l_Lean_instToExprFin___lambda__1___closed__2; static lean_object* l_Lean_instToExprLiteral___lambda__1___closed__2; +static lean_object* l_Lean_instToExprArrayOfToLevel___rarg___closed__2; lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_mkStr___closed__4; static lean_object* l_Lean_instToExprFVarId___lambda__1___closed__1; -static lean_object* l_Lean_instToExprOption___rarg___lambda__1___closed__3; static lean_object* l_Lean_instToExprPreresolved___closed__2; static lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_go___closed__8; static lean_object* l_Lean_instToExprFilePath___closed__1; @@ -200,18 +193,16 @@ static lean_object* l_Lean_instToExprPreresolved___lambda__1___closed__1; LEAN_EXPORT lean_object* l_Lean_instToExprUInt64___lambda__1(uint64_t); static lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_go___closed__1; static lean_object* l_Lean_instToExprPreresolved___closed__4; -static lean_object* l_Lean_instToExprList___rarg___closed__5; +LEAN_EXPORT lean_object* l_Lean_instToExprProdOfToLevel(lean_object*, lean_object*); static lean_object* l_Lean_instToExprInt_mkNat___closed__4; LEAN_EXPORT lean_object* l_Lean_instToExprPreresolved___lambda__1(lean_object*); lean_object* lean_usize_to_nat(size_t); static lean_object* l_Lean_instToExprBool___lambda__1___closed__6; -LEAN_EXPORT lean_object* l_Lean_instToExprProd___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_ToExpr_0__Lean_List_toExprAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_instToExprBitVec___lambda__1___closed__3; static lean_object* l_Lean_instToExprBool___lambda__1___closed__3; LEAN_EXPORT lean_object* l_Lean_Expr_toCtorIfLit(lean_object*); LEAN_EXPORT lean_object* l_Lean_instToExprUInt16; -static lean_object* l_Lean_instToExprArray___rarg___lambda__1___closed__1; LEAN_EXPORT lean_object* l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_instToExprPreresolved___spec__1___boxed(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_instToExprInt___lambda__1___closed__8; LEAN_EXPORT lean_object* l_Lean_instToExprLiteral___lambda__1(lean_object*); @@ -221,13 +212,12 @@ static lean_object* l_Lean_instToExprFin___lambda__1___closed__7; LEAN_EXPORT lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_mkStr(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Expr_toCtorIfLit___closed__1; static lean_object* l_Lean_instToExprUInt32___closed__1; -LEAN_EXPORT lean_object* l_Lean_instToExprList(lean_object*); LEAN_EXPORT lean_object* l_Lean_instToExprUSize___lambda__1(size_t); static lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_go___closed__5; static lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_go___closed__2; LEAN_EXPORT lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_isSimple___boxed(lean_object*, lean_object*); -static lean_object* l_Lean_instToExprList___rarg___closed__9; static lean_object* l_Lean_instToExprLiteral___lambda__1___closed__6; +static lean_object* l_Lean_instToExprArrayOfToLevel___rarg___closed__1; static lean_object* l_Lean_instToExprLiteral___closed__1; static lean_object* l_Lean_instToExprUnit___closed__3; static lean_object* l_Lean_instToExprUSize___closed__3; @@ -235,7 +225,6 @@ lean_object* l_Lean_Expr_app___override(lean_object*, lean_object*); static lean_object* l_Lean_instToExprUInt32___lambda__1___closed__2; uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_mkApp3(lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_instToExprArray___rarg___closed__3; uint8_t lean_nat_dec_lt(lean_object*, lean_object*); static lean_object* l_Lean_instToExprInt___lambda__1___closed__5; lean_object* l_Lean_mkRawNatLit(lean_object*); @@ -254,6 +243,7 @@ static lean_object* l_Lean_instToExprUInt8___lambda__1___closed__3; static lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_go___closed__6; static lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_go___closed__3; static lean_object* l_Lean_instToExprPreresolved___lambda__1___closed__5; +static lean_object* l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__1; LEAN_EXPORT lean_object* l_Lean_instToExprChar___lambda__1(uint32_t); lean_object* l_Int_toNat(lean_object*); lean_object* lean_uint16_to_nat(uint16_t); @@ -262,19 +252,18 @@ static lean_object* l_Lean_instToExprFVarId___lambda__1___closed__2; LEAN_EXPORT lean_object* l_Lean_instToExprUInt8___lambda__1___boxed(lean_object*); LEAN_EXPORT lean_object* l_Lean_instToExprUInt32; static lean_object* l_Lean_instToExprInt___lambda__1___closed__6; +static lean_object* l_Lean_instToExprOptionOfToLevel___rarg___closed__1; lean_object* lean_nat_sub(lean_object*, lean_object*); -static lean_object* l_Lean_instToExprOption___rarg___lambda__1___closed__4; LEAN_EXPORT lean_object* l_Lean_instToExprUnit___lambda__1(lean_object*); static lean_object* l_Lean_instToExprInt___lambda__1___closed__2; -LEAN_EXPORT lean_object* l_Lean_instToExprProd___rarg(lean_object*, lean_object*); -static lean_object* l_Lean_instToExprOption___rarg___lambda__1___closed__6; static lean_object* l_Lean_instToExprLiteral___closed__4; static lean_object* l_Lean_instToExprInt___closed__3; -static lean_object* l_Lean_instToExprOption___rarg___closed__2; +static lean_object* l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__3; static lean_object* l_Lean_instToExprFin___lambda__1___closed__3; static lean_object* l_Lean_instToExprFin___lambda__1___closed__8; static lean_object* l_Lean_instToExprFilePath___lambda__1___closed__3; LEAN_EXPORT lean_object* l_Lean_instToExprUnit___lambda__1___boxed(lean_object*); +LEAN_EXPORT lean_object* l_Lean_instToExprOptionOfToLevel___rarg(lean_object*, lean_object*); static lean_object* l_Lean_instToExprNat___closed__5; LEAN_EXPORT lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_go(lean_object*); static lean_object* l_Lean_Expr_toCtorIfLit___closed__10; @@ -282,16 +271,14 @@ static lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_mkStr___close LEAN_EXPORT lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux(lean_object*); lean_object* lean_array_mk(lean_object*); static lean_object* l_Lean_instToExprFilePath___lambda__1___closed__1; -LEAN_EXPORT lean_object* l_Lean_instToExprOption(lean_object*); +static lean_object* l_Lean_instToExprPreresolved___lambda__1___closed__13; lean_object* lean_uint8_to_nat(uint8_t); static lean_object* l_Lean_instToExprFilePath___lambda__1___closed__4; static lean_object* l_Lean_instToExprUInt64___lambda__1___closed__3; static lean_object* l_Lean_instToExprPreresolved___lambda__1___closed__9; static lean_object* l_Lean_instToExprChar___closed__3; static lean_object* l_Lean_instToExprUSize___lambda__1___closed__2; -LEAN_EXPORT lean_object* l_Lean_instToExprOption___rarg(lean_object*); LEAN_EXPORT lean_object* l_Lean_instToExprInt_mkNat(lean_object*); -static lean_object* l_Lean_instToExprOption___rarg___lambda__1___closed__5; static lean_object* l_Lean_Expr_toCtorIfLit___closed__5; static lean_object* l_Lean_instToExprBitVec___lambda__1___closed__2; static lean_object* l_Lean_instToExprUSize___lambda__1___closed__3; @@ -302,6 +289,7 @@ static lean_object* l_Lean_instToExprUInt8___lambda__1___closed__5; LEAN_EXPORT lean_object* l_Lean_instToExprFVarId; lean_object* lean_string_append(lean_object*, lean_object*); static lean_object* l_Lean_instToExprFin___lambda__1___closed__1; +LEAN_EXPORT lean_object* l_Lean_instToExprListOfToLevel(lean_object*); static lean_object* l_Lean_instToExprUnit___closed__1; static lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_mkStr___closed__2; static lean_object* l_Lean_instToExprPreresolved___lambda__1___closed__2; @@ -313,17 +301,16 @@ LEAN_EXPORT lean_object* l_Lean_instToExprBitVec(lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); static lean_object* l_Lean_instToExprLiteral___closed__2; static lean_object* l_Lean_instToExprInt_mkNat___closed__7; -static lean_object* l_Lean_instToExprList___rarg___closed__1; static lean_object* l_Lean_instToExprString___closed__3; lean_object* lean_nat_add(lean_object*, lean_object*); static lean_object* l_Lean_instToExprUInt16___lambda__1___closed__1; +static lean_object* l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__4; static lean_object* l_Lean_instToExprBitVec___closed__1; static lean_object* l_Lean_instToExprUInt16___lambda__1___closed__2; LEAN_EXPORT lean_object* l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_Expr_toCtorIfLit___spec__1___boxed(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_instToExprUInt64___lambda__1___closed__1; -static lean_object* l_Lean_instToExprOption___rarg___lambda__1___closed__8; static lean_object* l_Lean_instToExprUInt8___closed__1; -static lean_object* l_Lean_instToExprArray___rarg___lambda__1___closed__3; +static lean_object* l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__5; lean_object* l___private_Init_Data_Repr_0__Nat_reprFast(lean_object*); static lean_object* l_Lean_instToExprString___closed__1; static lean_object* l_Lean_instToExprBool___lambda__1___closed__2; @@ -331,10 +318,12 @@ static lean_object* l_Lean_instToExprUInt32___lambda__1___closed__4; static lean_object* l_Lean_instToExprString___closed__5; static lean_object* l_Lean_instToExprInt_mkNat___closed__8; static lean_object* l_Lean_instToExprFilePath___lambda__1___closed__2; +LEAN_EXPORT lean_object* l_Lean_instToExprListOfToLevel___rarg(lean_object*, lean_object*); static lean_object* l___private_Lean_ToExpr_0__Lean_Name_toExprAux_mkStr___closed__5; LEAN_EXPORT lean_object* l_Lean_instToExprFin(lean_object*); static lean_object* l_Lean_instToExprUSize___closed__1; static lean_object* l_Lean_instToExprBool___lambda__1___closed__1; +LEAN_EXPORT lean_object* l_Lean_instToExprArrayOfToLevel___rarg(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_instToExprFilePath; LEAN_EXPORT lean_object* l_Lean_instToExprUSize___lambda__1___boxed(lean_object*); LEAN_EXPORT lean_object* l_Lean_instToExprUSize; @@ -2041,7 +2030,7 @@ static lean_object* _init_l___private_Lean_ToExpr_0__Lean_Name_toExprAux_mkStr__ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l___private_Lean_ToExpr_0__Lean_Name_toExprAux_mkStr___closed__5; x_2 = l___private_Lean_ToExpr_0__Lean_Name_toExprAux_mkStr___closed__6; -x_3 = lean_unsigned_to_nat(130u); +x_3 = lean_unsigned_to_nat(131u); x_4 = lean_unsigned_to_nat(11u); x_5 = l___private_Lean_ToExpr_0__Lean_Name_toExprAux_mkStr___closed__7; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -2295,7 +2284,7 @@ x_1 = l_Lean_instToExprName___closed__3; return x_1; } } -static lean_object* _init_l_Lean_instToExprOption___rarg___lambda__1___closed__1() { +static lean_object* _init_l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__1() { _start: { lean_object* x_1; @@ -2303,7 +2292,7 @@ x_1 = lean_mk_string_unchecked("Option", 6, 6); return x_1; } } -static lean_object* _init_l_Lean_instToExprOption___rarg___lambda__1___closed__2() { +static lean_object* _init_l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__2() { _start: { lean_object* x_1; @@ -2311,39 +2300,17 @@ x_1 = lean_mk_string_unchecked("none", 4, 4); return x_1; } } -static lean_object* _init_l_Lean_instToExprOption___rarg___lambda__1___closed__3() { +static lean_object* _init_l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprOption___rarg___lambda__1___closed__1; -x_2 = l_Lean_instToExprOption___rarg___lambda__1___closed__2; +x_1 = l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__1; +x_2 = l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__2; x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_instToExprOption___rarg___lambda__1___closed__4() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_levelZero; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_2); -lean_ctor_set(x_3, 1, x_1); -return x_3; -} -} -static lean_object* _init_l_Lean_instToExprOption___rarg___lambda__1___closed__5() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprOption___rarg___lambda__1___closed__3; -x_2 = l_Lean_instToExprOption___rarg___lambda__1___closed__4; -x_3 = l_Lean_Expr_const___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_instToExprOption___rarg___lambda__1___closed__6() { +static lean_object* _init_l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__4() { _start: { lean_object* x_1; @@ -2351,96 +2318,93 @@ x_1 = lean_mk_string_unchecked("some", 4, 4); return x_1; } } -static lean_object* _init_l_Lean_instToExprOption___rarg___lambda__1___closed__7() { +static lean_object* _init_l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__5() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprOption___rarg___lambda__1___closed__1; -x_2 = l_Lean_instToExprOption___rarg___lambda__1___closed__6; +x_1 = l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__1; +x_2 = l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__4; x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_instToExprOption___rarg___lambda__1___closed__8() { +LEAN_EXPORT lean_object* l_Lean_instToExprOptionOfToLevel___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprOption___rarg___lambda__1___closed__7; -x_2 = l_Lean_instToExprOption___rarg___lambda__1___closed__4; -x_3 = l_Lean_Expr_const___override(x_1, x_2); -return x_3; -} -} -LEAN_EXPORT lean_object* l_Lean_instToExprOption___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -if (lean_obj_tag(x_3) == 0) +if (lean_obj_tag(x_4) == 0) { -lean_object* x_4; lean_object* x_5; -lean_dec(x_2); -x_4 = l_Lean_instToExprOption___rarg___lambda__1___closed__5; -x_5 = l_Lean_Expr_app___override(x_4, x_1); -return x_5; +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +lean_dec(x_3); +x_5 = lean_box(0); +x_6 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_6, 0, x_1); +lean_ctor_set(x_6, 1, x_5); +x_7 = l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__3; +x_8 = l_Lean_Expr_const___override(x_7, x_6); +x_9 = l_Lean_Expr_app___override(x_8, x_2); +return x_9; } else { -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_6 = lean_ctor_get(x_3, 0); -lean_inc(x_6); +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_10 = lean_ctor_get(x_4, 0); +lean_inc(x_10); +lean_dec(x_4); +x_11 = lean_box(0); +x_12 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_12, 0, x_1); +lean_ctor_set(x_12, 1, x_11); +x_13 = l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__5; +x_14 = l_Lean_Expr_const___override(x_13, x_12); +x_15 = lean_ctor_get(x_3, 0); +lean_inc(x_15); lean_dec(x_3); -x_7 = lean_ctor_get(x_2, 0); -lean_inc(x_7); -lean_dec(x_2); -x_8 = lean_apply_1(x_7, x_6); -x_9 = l_Lean_instToExprOption___rarg___lambda__1___closed__8; -x_10 = l_Lean_mkAppB(x_9, x_1, x_8); -return x_10; +x_16 = lean_apply_1(x_15, x_10); +x_17 = l_Lean_mkAppB(x_14, x_2, x_16); +return x_17; } } } -static lean_object* _init_l_Lean_instToExprOption___rarg___closed__1() { +static lean_object* _init_l_Lean_instToExprOptionOfToLevel___rarg___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_instToExprOption___rarg___lambda__1___closed__1; +x_2 = l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__1; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_instToExprOption___rarg___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprOption___rarg___closed__1; -x_2 = l_Lean_instToExprOption___rarg___lambda__1___closed__4; -x_3 = l_Lean_Expr_const___override(x_1, x_2); -return x_3; -} -} -LEAN_EXPORT lean_object* l_Lean_instToExprOption___rarg(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_instToExprOptionOfToLevel___rarg(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_2 = lean_ctor_get(x_1, 1); -lean_inc(x_2); -lean_inc(x_2); -x_3 = lean_alloc_closure((void*)(l_Lean_instToExprOption___rarg___lambda__1), 3, 2); -lean_closure_set(x_3, 0, x_2); -lean_closure_set(x_3, 1, x_1); -x_4 = l_Lean_instToExprOption___rarg___closed__2; -x_5 = l_Lean_Expr_app___override(x_4, x_2); -x_6 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_6, 0, x_3); +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_3 = lean_ctor_get(x_2, 1); +lean_inc(x_3); +lean_inc(x_3); +lean_inc(x_1); +x_4 = lean_alloc_closure((void*)(l_Lean_instToExprOptionOfToLevel___rarg___lambda__1), 4, 3); +lean_closure_set(x_4, 0, x_1); +lean_closure_set(x_4, 1, x_3); +lean_closure_set(x_4, 2, x_2); +x_5 = lean_box(0); +x_6 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_6, 0, x_1); lean_ctor_set(x_6, 1, x_5); -return x_6; +x_7 = l_Lean_instToExprOptionOfToLevel___rarg___closed__1; +x_8 = l_Lean_Expr_const___override(x_7, x_6); +x_9 = l_Lean_Expr_app___override(x_8, x_3); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_4); +lean_ctor_set(x_10, 1, x_9); +return x_10; } } -LEAN_EXPORT lean_object* l_Lean_instToExprOption(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_instToExprOptionOfToLevel(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_instToExprOption___rarg), 1, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_instToExprOptionOfToLevel___rarg), 2, 0); return x_2; } } @@ -2489,7 +2453,7 @@ lean_dec(x_2); return x_5; } } -static lean_object* _init_l_Lean_instToExprList___rarg___closed__1() { +static lean_object* _init_l_Lean_instToExprListOfToLevel___rarg___closed__1() { _start: { lean_object* x_1; @@ -2497,7 +2461,7 @@ x_1 = lean_mk_string_unchecked("List", 4, 4); return x_1; } } -static lean_object* _init_l_Lean_instToExprList___rarg___closed__2() { +static lean_object* _init_l_Lean_instToExprListOfToLevel___rarg___closed__2() { _start: { lean_object* x_1; @@ -2505,27 +2469,17 @@ x_1 = lean_mk_string_unchecked("nil", 3, 3); return x_1; } } -static lean_object* _init_l_Lean_instToExprList___rarg___closed__3() { +static lean_object* _init_l_Lean_instToExprListOfToLevel___rarg___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprList___rarg___closed__1; -x_2 = l_Lean_instToExprList___rarg___closed__2; +x_1 = l_Lean_instToExprListOfToLevel___rarg___closed__1; +x_2 = l_Lean_instToExprListOfToLevel___rarg___closed__2; x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_instToExprList___rarg___closed__4() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprList___rarg___closed__3; -x_2 = l_Lean_instToExprOption___rarg___lambda__1___closed__4; -x_3 = l_Lean_Expr_const___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_instToExprList___rarg___closed__5() { +static lean_object* _init_l_Lean_instToExprListOfToLevel___rarg___closed__4() { _start: { lean_object* x_1; @@ -2533,79 +2487,68 @@ x_1 = lean_mk_string_unchecked("cons", 4, 4); return x_1; } } -static lean_object* _init_l_Lean_instToExprList___rarg___closed__6() { +static lean_object* _init_l_Lean_instToExprListOfToLevel___rarg___closed__5() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprList___rarg___closed__1; -x_2 = l_Lean_instToExprList___rarg___closed__5; +x_1 = l_Lean_instToExprListOfToLevel___rarg___closed__1; +x_2 = l_Lean_instToExprListOfToLevel___rarg___closed__4; x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_instToExprList___rarg___closed__7() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprList___rarg___closed__6; -x_2 = l_Lean_instToExprOption___rarg___lambda__1___closed__4; -x_3 = l_Lean_Expr_const___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_instToExprList___rarg___closed__8() { +static lean_object* _init_l_Lean_instToExprListOfToLevel___rarg___closed__6() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_instToExprList___rarg___closed__1; +x_2 = l_Lean_instToExprListOfToLevel___rarg___closed__1; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_instToExprList___rarg___closed__9() { +LEAN_EXPORT lean_object* l_Lean_instToExprListOfToLevel___rarg(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprList___rarg___closed__8; -x_2 = l_Lean_instToExprOption___rarg___lambda__1___closed__4; -x_3 = l_Lean_Expr_const___override(x_1, x_2); -return x_3; -} -} -LEAN_EXPORT lean_object* l_Lean_instToExprList___rarg(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_2 = lean_ctor_get(x_1, 1); -lean_inc(x_2); -x_3 = l_Lean_instToExprList___rarg___closed__4; -lean_inc(x_2); -x_4 = l_Lean_Expr_app___override(x_3, x_2); -x_5 = l_Lean_instToExprList___rarg___closed__7; -lean_inc(x_2); -x_6 = l_Lean_Expr_app___override(x_5, x_2); -x_7 = lean_alloc_closure((void*)(l___private_Lean_ToExpr_0__Lean_List_toExprAux___rarg___boxed), 4, 3); -lean_closure_set(x_7, 0, x_1); -lean_closure_set(x_7, 1, x_4); -lean_closure_set(x_7, 2, x_6); -x_8 = l_Lean_instToExprList___rarg___closed__9; -x_9 = l_Lean_Expr_app___override(x_8, x_2); -x_10 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_10, 0, x_7); -lean_ctor_set(x_10, 1, x_9); -return x_10; +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_3 = lean_ctor_get(x_2, 1); +lean_inc(x_3); +x_4 = lean_box(0); +x_5 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_5, 0, x_1); +lean_ctor_set(x_5, 1, x_4); +x_6 = l_Lean_instToExprListOfToLevel___rarg___closed__3; +lean_inc(x_5); +x_7 = l_Lean_Expr_const___override(x_6, x_5); +lean_inc(x_3); +x_8 = l_Lean_Expr_app___override(x_7, x_3); +x_9 = l_Lean_instToExprListOfToLevel___rarg___closed__5; +lean_inc(x_5); +x_10 = l_Lean_Expr_const___override(x_9, x_5); +lean_inc(x_3); +x_11 = l_Lean_Expr_app___override(x_10, x_3); +x_12 = lean_alloc_closure((void*)(l___private_Lean_ToExpr_0__Lean_List_toExprAux___rarg___boxed), 4, 3); +lean_closure_set(x_12, 0, x_2); +lean_closure_set(x_12, 1, x_8); +lean_closure_set(x_12, 2, x_11); +x_13 = l_Lean_instToExprListOfToLevel___rarg___closed__6; +x_14 = l_Lean_Expr_const___override(x_13, x_5); +x_15 = l_Lean_Expr_app___override(x_14, x_3); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_12); +lean_ctor_set(x_16, 1, x_15); +return x_16; } } -LEAN_EXPORT lean_object* l_Lean_instToExprList(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_instToExprListOfToLevel(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_instToExprList___rarg), 1, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_instToExprListOfToLevel___rarg), 2, 0); return x_2; } } -static lean_object* _init_l_Lean_instToExprArray___rarg___lambda__1___closed__1() { +static lean_object* _init_l_Lean_instToExprArrayOfToLevel___rarg___lambda__1___closed__1() { _start: { lean_object* x_1; @@ -2613,55 +2556,44 @@ x_1 = lean_mk_string_unchecked("toArray", 7, 7); return x_1; } } -static lean_object* _init_l_Lean_instToExprArray___rarg___lambda__1___closed__2() { +static lean_object* _init_l_Lean_instToExprArrayOfToLevel___rarg___lambda__1___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprList___rarg___closed__1; -x_2 = l_Lean_instToExprArray___rarg___lambda__1___closed__1; +x_1 = l_Lean_instToExprListOfToLevel___rarg___closed__1; +x_2 = l_Lean_instToExprArrayOfToLevel___rarg___lambda__1___closed__1; x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_instToExprArray___rarg___lambda__1___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprArray___rarg___lambda__1___closed__2; -x_2 = l_Lean_instToExprOption___rarg___lambda__1___closed__4; -x_3 = l_Lean_Expr_const___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_instToExprArray___rarg___lambda__1___closed__4() { +LEAN_EXPORT lean_object* l_Lean_instToExprArrayOfToLevel___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprList___rarg___closed__3; -x_2 = l_Lean_instToExprOption___rarg___lambda__1___closed__4; -x_3 = l_Lean_Expr_const___override(x_1, x_2); -return x_3; -} -} -LEAN_EXPORT lean_object* l_Lean_instToExprArray___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_4 = l_Lean_instToExprArray___rarg___lambda__1___closed__4; -lean_inc(x_1); -x_5 = l_Lean_Expr_app___override(x_4, x_1); -x_6 = l_Lean_instToExprList___rarg___closed__7; -lean_inc(x_1); -x_7 = l_Lean_Expr_app___override(x_6, x_1); -x_8 = lean_array_to_list(x_3); -x_9 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___rarg(x_2, x_5, x_7, x_8); -lean_dec(x_5); -x_10 = l_Lean_instToExprArray___rarg___lambda__1___closed__3; -x_11 = l_Lean_mkAppB(x_10, x_1, x_9); -return x_11; +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_5 = lean_box(0); +x_6 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_6, 0, x_1); +lean_ctor_set(x_6, 1, x_5); +x_7 = l_Lean_instToExprArrayOfToLevel___rarg___lambda__1___closed__2; +lean_inc(x_6); +x_8 = l_Lean_Expr_const___override(x_7, x_6); +x_9 = l_Lean_instToExprListOfToLevel___rarg___closed__3; +lean_inc(x_6); +x_10 = l_Lean_Expr_const___override(x_9, x_6); +lean_inc(x_2); +x_11 = l_Lean_Expr_app___override(x_10, x_2); +x_12 = l_Lean_instToExprListOfToLevel___rarg___closed__5; +x_13 = l_Lean_Expr_const___override(x_12, x_6); +lean_inc(x_2); +x_14 = l_Lean_Expr_app___override(x_13, x_2); +x_15 = lean_array_to_list(x_4); +x_16 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___rarg(x_3, x_11, x_14, x_15); +lean_dec(x_11); +x_17 = l_Lean_mkAppB(x_8, x_2, x_16); +return x_17; } } -static lean_object* _init_l_Lean_instToExprArray___rarg___closed__1() { +static lean_object* _init_l_Lean_instToExprArrayOfToLevel___rarg___closed__1() { _start: { lean_object* x_1; @@ -2669,53 +2601,50 @@ x_1 = lean_mk_string_unchecked("Array", 5, 5); return x_1; } } -static lean_object* _init_l_Lean_instToExprArray___rarg___closed__2() { +static lean_object* _init_l_Lean_instToExprArrayOfToLevel___rarg___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_instToExprArray___rarg___closed__1; +x_2 = l_Lean_instToExprArrayOfToLevel___rarg___closed__1; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_instToExprArray___rarg___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprArray___rarg___closed__2; -x_2 = l_Lean_instToExprOption___rarg___lambda__1___closed__4; -x_3 = l_Lean_Expr_const___override(x_1, x_2); -return x_3; -} -} -LEAN_EXPORT lean_object* l_Lean_instToExprArray___rarg(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_instToExprArrayOfToLevel___rarg(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_2 = lean_ctor_get(x_1, 1); -lean_inc(x_2); -lean_inc(x_2); -x_3 = lean_alloc_closure((void*)(l_Lean_instToExprArray___rarg___lambda__1), 3, 2); -lean_closure_set(x_3, 0, x_2); -lean_closure_set(x_3, 1, x_1); -x_4 = l_Lean_instToExprArray___rarg___closed__3; -x_5 = l_Lean_Expr_app___override(x_4, x_2); -x_6 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_6, 0, x_3); +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_3 = lean_ctor_get(x_2, 1); +lean_inc(x_3); +lean_inc(x_3); +lean_inc(x_1); +x_4 = lean_alloc_closure((void*)(l_Lean_instToExprArrayOfToLevel___rarg___lambda__1), 4, 3); +lean_closure_set(x_4, 0, x_1); +lean_closure_set(x_4, 1, x_3); +lean_closure_set(x_4, 2, x_2); +x_5 = lean_box(0); +x_6 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_6, 0, x_1); lean_ctor_set(x_6, 1, x_5); -return x_6; +x_7 = l_Lean_instToExprArrayOfToLevel___rarg___closed__2; +x_8 = l_Lean_Expr_const___override(x_7, x_6); +x_9 = l_Lean_Expr_app___override(x_8, x_3); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_4); +lean_ctor_set(x_10, 1, x_9); +return x_10; } } -LEAN_EXPORT lean_object* l_Lean_instToExprArray(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_instToExprArrayOfToLevel(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_instToExprArray___rarg), 1, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_instToExprArrayOfToLevel___rarg), 2, 0); return x_2; } } -static lean_object* _init_l_Lean_instToExprProd___rarg___lambda__1___closed__1() { +static lean_object* _init_l_Lean_instToExprProdOfToLevel___rarg___lambda__1___closed__1() { _start: { lean_object* x_1; @@ -2723,108 +2652,126 @@ x_1 = lean_mk_string_unchecked("Prod", 4, 4); return x_1; } } -static lean_object* _init_l_Lean_instToExprProd___rarg___lambda__1___closed__2() { +static lean_object* _init_l_Lean_instToExprProdOfToLevel___rarg___lambda__1___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprProd___rarg___lambda__1___closed__1; +x_1 = l_Lean_instToExprProdOfToLevel___rarg___lambda__1___closed__1; x_2 = l_Lean_instToExprFilePath___lambda__1___closed__3; x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_instToExprProd___rarg___lambda__1___closed__3() { +LEAN_EXPORT lean_object* l_Lean_instToExprProdOfToLevel___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_levelZero; -x_2 = l_Lean_instToExprOption___rarg___lambda__1___closed__4; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_instToExprProd___rarg___lambda__1___closed__4() { -_start: +uint8_t x_8; +x_8 = !lean_is_exclusive(x_7); +if (x_8 == 0) { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprProd___rarg___lambda__1___closed__2; -x_2 = l_Lean_instToExprProd___rarg___lambda__1___closed__3; -x_3 = l_Lean_Expr_const___override(x_1, x_2); -return x_3; -} +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_9 = lean_ctor_get(x_7, 0); +x_10 = lean_ctor_get(x_7, 1); +x_11 = lean_box(0); +lean_ctor_set_tag(x_7, 1); +lean_ctor_set(x_7, 1, x_11); +lean_ctor_set(x_7, 0, x_1); +x_12 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_12, 0, x_2); +lean_ctor_set(x_12, 1, x_7); +x_13 = l_Lean_instToExprProdOfToLevel___rarg___lambda__1___closed__2; +x_14 = l_Lean_Expr_const___override(x_13, x_12); +x_15 = lean_ctor_get(x_3, 0); +lean_inc(x_15); +lean_dec(x_3); +x_16 = lean_apply_1(x_15, x_9); +x_17 = lean_ctor_get(x_4, 0); +lean_inc(x_17); +lean_dec(x_4); +x_18 = lean_apply_1(x_17, x_10); +x_19 = l_Lean_mkApp4(x_14, x_5, x_6, x_16, x_18); +return x_19; } -LEAN_EXPORT lean_object* l_Lean_instToExprProd___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: +else { -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_6 = lean_ctor_get(x_5, 0); -lean_inc(x_6); -x_7 = lean_ctor_get(x_5, 1); -lean_inc(x_7); -lean_dec(x_5); -x_8 = lean_ctor_get(x_1, 0); -lean_inc(x_8); -lean_dec(x_1); -x_9 = lean_apply_1(x_8, x_6); -x_10 = lean_ctor_get(x_2, 0); -lean_inc(x_10); -lean_dec(x_2); -x_11 = lean_apply_1(x_10, x_7); -x_12 = l_Lean_instToExprProd___rarg___lambda__1___closed__4; -x_13 = l_Lean_mkApp4(x_12, x_3, x_4, x_9, x_11); -return x_13; +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_20 = lean_ctor_get(x_7, 0); +x_21 = lean_ctor_get(x_7, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_7); +x_22 = lean_box(0); +x_23 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_23, 0, x_1); +lean_ctor_set(x_23, 1, x_22); +x_24 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_24, 0, x_2); +lean_ctor_set(x_24, 1, x_23); +x_25 = l_Lean_instToExprProdOfToLevel___rarg___lambda__1___closed__2; +x_26 = l_Lean_Expr_const___override(x_25, x_24); +x_27 = lean_ctor_get(x_3, 0); +lean_inc(x_27); +lean_dec(x_3); +x_28 = lean_apply_1(x_27, x_20); +x_29 = lean_ctor_get(x_4, 0); +lean_inc(x_29); +lean_dec(x_4); +x_30 = lean_apply_1(x_29, x_21); +x_31 = l_Lean_mkApp4(x_26, x_5, x_6, x_28, x_30); +return x_31; } } -static lean_object* _init_l_Lean_instToExprProd___rarg___closed__1() { +} +static lean_object* _init_l_Lean_instToExprProdOfToLevel___rarg___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_instToExprProd___rarg___lambda__1___closed__1; +x_2 = l_Lean_instToExprProdOfToLevel___rarg___lambda__1___closed__1; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_instToExprProd___rarg___closed__2() { +LEAN_EXPORT lean_object* l_Lean_instToExprProdOfToLevel___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprProd___rarg___closed__1; -x_2 = l_Lean_instToExprProd___rarg___lambda__1___closed__3; -x_3 = l_Lean_Expr_const___override(x_1, x_2); -return x_3; -} -} -LEAN_EXPORT lean_object* l_Lean_instToExprProd___rarg(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; -x_3 = lean_ctor_get(x_1, 1); -lean_inc(x_3); -x_4 = lean_ctor_get(x_2, 1); -lean_inc(x_4); -lean_inc(x_4); -lean_inc(x_3); -x_5 = lean_alloc_closure((void*)(l_Lean_instToExprProd___rarg___lambda__1), 5, 4); -lean_closure_set(x_5, 0, x_1); -lean_closure_set(x_5, 1, x_2); -lean_closure_set(x_5, 2, x_3); -lean_closure_set(x_5, 3, x_4); -x_6 = l_Lean_instToExprProd___rarg___closed__2; -x_7 = l_Lean_mkAppB(x_6, x_3, x_4); -x_8 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_8, 0, x_5); -lean_ctor_set(x_8, 1, x_7); -return x_8; +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_5 = lean_ctor_get(x_3, 1); +lean_inc(x_5); +x_6 = lean_ctor_get(x_4, 1); +lean_inc(x_6); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_1); +lean_inc(x_2); +x_7 = lean_alloc_closure((void*)(l_Lean_instToExprProdOfToLevel___rarg___lambda__1), 7, 6); +lean_closure_set(x_7, 0, x_2); +lean_closure_set(x_7, 1, x_1); +lean_closure_set(x_7, 2, x_3); +lean_closure_set(x_7, 3, x_4); +lean_closure_set(x_7, 4, x_5); +lean_closure_set(x_7, 5, x_6); +x_8 = lean_box(0); +x_9 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_9, 0, x_2); +lean_ctor_set(x_9, 1, x_8); +x_10 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_10, 0, x_1); +lean_ctor_set(x_10, 1, x_9); +x_11 = l_Lean_instToExprProdOfToLevel___rarg___closed__1; +x_12 = l_Lean_Expr_const___override(x_11, x_10); +x_13 = l_Lean_mkAppB(x_12, x_5, x_6); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_7); +lean_ctor_set(x_14, 1, x_13); +return x_14; } } -LEAN_EXPORT lean_object* l_Lean_instToExprProd(lean_object* x_1, lean_object* x_2) { +LEAN_EXPORT lean_object* l_Lean_instToExprProdOfToLevel(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_Lean_instToExprProd___rarg), 2, 0); +x_3 = lean_alloc_closure((void*)(l_Lean_instToExprProdOfToLevel___rarg), 4, 0); return x_3; } } @@ -3165,17 +3112,49 @@ static lean_object* _init_l_Lean_instToExprPreresolved___lambda__1___closed__10( _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprList___rarg___closed__4; +x_1 = lean_box(0); +x_2 = lean_box(0); +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +static lean_object* _init_l_Lean_instToExprPreresolved___lambda__1___closed__11() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_instToExprListOfToLevel___rarg___closed__3; +x_2 = l_Lean_instToExprPreresolved___lambda__1___closed__10; +x_3 = l_Lean_Expr_const___override(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_instToExprPreresolved___lambda__1___closed__12() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_instToExprPreresolved___lambda__1___closed__11; x_2 = l_Lean_instToExprPreresolved___lambda__1___closed__9; x_3 = l_Lean_Expr_app___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_instToExprPreresolved___lambda__1___closed__11() { +static lean_object* _init_l_Lean_instToExprPreresolved___lambda__1___closed__13() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprList___rarg___closed__7; +x_1 = l_Lean_instToExprListOfToLevel___rarg___closed__5; +x_2 = l_Lean_instToExprPreresolved___lambda__1___closed__10; +x_3 = l_Lean_Expr_const___override(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_instToExprPreresolved___lambda__1___closed__14() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_instToExprPreresolved___lambda__1___closed__13; x_2 = l_Lean_instToExprPreresolved___lambda__1___closed__9; x_3 = l_Lean_Expr_app___override(x_1, x_2); return x_3; @@ -3204,8 +3183,8 @@ x_7 = lean_ctor_get(x_1, 1); lean_inc(x_7); lean_dec(x_1); x_8 = l___private_Lean_ToExpr_0__Lean_Name_toExprAux(x_6); -x_9 = l_Lean_instToExprPreresolved___lambda__1___closed__10; -x_10 = l_Lean_instToExprPreresolved___lambda__1___closed__11; +x_9 = l_Lean_instToExprPreresolved___lambda__1___closed__12; +x_10 = l_Lean_instToExprPreresolved___lambda__1___closed__14; x_11 = l___private_Lean_ToExpr_0__Lean_List_toExprAux___at_Lean_instToExprPreresolved___spec__1(x_9, x_10, x_7); x_12 = l_Lean_instToExprPreresolved___lambda__1___closed__8; x_13 = l_Lean_mkAppB(x_12, x_8, x_11); @@ -3391,7 +3370,7 @@ static lean_object* _init_l_Lean_Expr_toCtorIfLit___closed__10() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprList___rarg___closed__4; +x_1 = l_Lean_instToExprPreresolved___lambda__1___closed__11; x_2 = l_Lean_Expr_toCtorIfLit___closed__9; x_3 = l_Lean_Expr_app___override(x_1, x_2); return x_3; @@ -3401,7 +3380,7 @@ static lean_object* _init_l_Lean_Expr_toCtorIfLit___closed__11() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_instToExprList___rarg___closed__7; +x_1 = l_Lean_instToExprPreresolved___lambda__1___closed__13; x_2 = l_Lean_Expr_toCtorIfLit___closed__9; x_3 = l_Lean_Expr_app___override(x_1, x_2); return x_3; @@ -3474,6 +3453,7 @@ return x_4; } } lean_object* initialize_Lean_Expr(uint8_t builtin, lean_object*); +lean_object* initialize_Lean_ToLevel(uint8_t builtin, lean_object*); lean_object* initialize_Init_Data_BitVec_Basic(uint8_t builtin, lean_object*); static bool _G_initialized = false; LEAN_EXPORT lean_object* initialize_Lean_ToExpr(uint8_t builtin, lean_object* w) { @@ -3483,6 +3463,9 @@ _G_initialized = true; res = initialize_Lean_Expr(builtin, lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Lean_ToLevel(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); res = initialize_Init_Data_BitVec_Basic(builtin, lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); @@ -3798,70 +3781,44 @@ l_Lean_instToExprName___closed__3 = _init_l_Lean_instToExprName___closed__3(); lean_mark_persistent(l_Lean_instToExprName___closed__3); l_Lean_instToExprName = _init_l_Lean_instToExprName(); lean_mark_persistent(l_Lean_instToExprName); -l_Lean_instToExprOption___rarg___lambda__1___closed__1 = _init_l_Lean_instToExprOption___rarg___lambda__1___closed__1(); -lean_mark_persistent(l_Lean_instToExprOption___rarg___lambda__1___closed__1); -l_Lean_instToExprOption___rarg___lambda__1___closed__2 = _init_l_Lean_instToExprOption___rarg___lambda__1___closed__2(); -lean_mark_persistent(l_Lean_instToExprOption___rarg___lambda__1___closed__2); -l_Lean_instToExprOption___rarg___lambda__1___closed__3 = _init_l_Lean_instToExprOption___rarg___lambda__1___closed__3(); -lean_mark_persistent(l_Lean_instToExprOption___rarg___lambda__1___closed__3); -l_Lean_instToExprOption___rarg___lambda__1___closed__4 = _init_l_Lean_instToExprOption___rarg___lambda__1___closed__4(); -lean_mark_persistent(l_Lean_instToExprOption___rarg___lambda__1___closed__4); -l_Lean_instToExprOption___rarg___lambda__1___closed__5 = _init_l_Lean_instToExprOption___rarg___lambda__1___closed__5(); -lean_mark_persistent(l_Lean_instToExprOption___rarg___lambda__1___closed__5); -l_Lean_instToExprOption___rarg___lambda__1___closed__6 = _init_l_Lean_instToExprOption___rarg___lambda__1___closed__6(); -lean_mark_persistent(l_Lean_instToExprOption___rarg___lambda__1___closed__6); -l_Lean_instToExprOption___rarg___lambda__1___closed__7 = _init_l_Lean_instToExprOption___rarg___lambda__1___closed__7(); -lean_mark_persistent(l_Lean_instToExprOption___rarg___lambda__1___closed__7); -l_Lean_instToExprOption___rarg___lambda__1___closed__8 = _init_l_Lean_instToExprOption___rarg___lambda__1___closed__8(); -lean_mark_persistent(l_Lean_instToExprOption___rarg___lambda__1___closed__8); -l_Lean_instToExprOption___rarg___closed__1 = _init_l_Lean_instToExprOption___rarg___closed__1(); -lean_mark_persistent(l_Lean_instToExprOption___rarg___closed__1); -l_Lean_instToExprOption___rarg___closed__2 = _init_l_Lean_instToExprOption___rarg___closed__2(); -lean_mark_persistent(l_Lean_instToExprOption___rarg___closed__2); -l_Lean_instToExprList___rarg___closed__1 = _init_l_Lean_instToExprList___rarg___closed__1(); -lean_mark_persistent(l_Lean_instToExprList___rarg___closed__1); -l_Lean_instToExprList___rarg___closed__2 = _init_l_Lean_instToExprList___rarg___closed__2(); -lean_mark_persistent(l_Lean_instToExprList___rarg___closed__2); -l_Lean_instToExprList___rarg___closed__3 = _init_l_Lean_instToExprList___rarg___closed__3(); -lean_mark_persistent(l_Lean_instToExprList___rarg___closed__3); -l_Lean_instToExprList___rarg___closed__4 = _init_l_Lean_instToExprList___rarg___closed__4(); -lean_mark_persistent(l_Lean_instToExprList___rarg___closed__4); -l_Lean_instToExprList___rarg___closed__5 = _init_l_Lean_instToExprList___rarg___closed__5(); -lean_mark_persistent(l_Lean_instToExprList___rarg___closed__5); -l_Lean_instToExprList___rarg___closed__6 = _init_l_Lean_instToExprList___rarg___closed__6(); -lean_mark_persistent(l_Lean_instToExprList___rarg___closed__6); -l_Lean_instToExprList___rarg___closed__7 = _init_l_Lean_instToExprList___rarg___closed__7(); -lean_mark_persistent(l_Lean_instToExprList___rarg___closed__7); -l_Lean_instToExprList___rarg___closed__8 = _init_l_Lean_instToExprList___rarg___closed__8(); -lean_mark_persistent(l_Lean_instToExprList___rarg___closed__8); -l_Lean_instToExprList___rarg___closed__9 = _init_l_Lean_instToExprList___rarg___closed__9(); -lean_mark_persistent(l_Lean_instToExprList___rarg___closed__9); -l_Lean_instToExprArray___rarg___lambda__1___closed__1 = _init_l_Lean_instToExprArray___rarg___lambda__1___closed__1(); -lean_mark_persistent(l_Lean_instToExprArray___rarg___lambda__1___closed__1); -l_Lean_instToExprArray___rarg___lambda__1___closed__2 = _init_l_Lean_instToExprArray___rarg___lambda__1___closed__2(); -lean_mark_persistent(l_Lean_instToExprArray___rarg___lambda__1___closed__2); -l_Lean_instToExprArray___rarg___lambda__1___closed__3 = _init_l_Lean_instToExprArray___rarg___lambda__1___closed__3(); -lean_mark_persistent(l_Lean_instToExprArray___rarg___lambda__1___closed__3); -l_Lean_instToExprArray___rarg___lambda__1___closed__4 = _init_l_Lean_instToExprArray___rarg___lambda__1___closed__4(); -lean_mark_persistent(l_Lean_instToExprArray___rarg___lambda__1___closed__4); -l_Lean_instToExprArray___rarg___closed__1 = _init_l_Lean_instToExprArray___rarg___closed__1(); -lean_mark_persistent(l_Lean_instToExprArray___rarg___closed__1); -l_Lean_instToExprArray___rarg___closed__2 = _init_l_Lean_instToExprArray___rarg___closed__2(); -lean_mark_persistent(l_Lean_instToExprArray___rarg___closed__2); -l_Lean_instToExprArray___rarg___closed__3 = _init_l_Lean_instToExprArray___rarg___closed__3(); -lean_mark_persistent(l_Lean_instToExprArray___rarg___closed__3); -l_Lean_instToExprProd___rarg___lambda__1___closed__1 = _init_l_Lean_instToExprProd___rarg___lambda__1___closed__1(); -lean_mark_persistent(l_Lean_instToExprProd___rarg___lambda__1___closed__1); -l_Lean_instToExprProd___rarg___lambda__1___closed__2 = _init_l_Lean_instToExprProd___rarg___lambda__1___closed__2(); -lean_mark_persistent(l_Lean_instToExprProd___rarg___lambda__1___closed__2); -l_Lean_instToExprProd___rarg___lambda__1___closed__3 = _init_l_Lean_instToExprProd___rarg___lambda__1___closed__3(); -lean_mark_persistent(l_Lean_instToExprProd___rarg___lambda__1___closed__3); -l_Lean_instToExprProd___rarg___lambda__1___closed__4 = _init_l_Lean_instToExprProd___rarg___lambda__1___closed__4(); -lean_mark_persistent(l_Lean_instToExprProd___rarg___lambda__1___closed__4); -l_Lean_instToExprProd___rarg___closed__1 = _init_l_Lean_instToExprProd___rarg___closed__1(); -lean_mark_persistent(l_Lean_instToExprProd___rarg___closed__1); -l_Lean_instToExprProd___rarg___closed__2 = _init_l_Lean_instToExprProd___rarg___closed__2(); -lean_mark_persistent(l_Lean_instToExprProd___rarg___closed__2); +l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__1 = _init_l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__1(); +lean_mark_persistent(l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__1); +l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__2 = _init_l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__2(); +lean_mark_persistent(l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__2); +l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__3 = _init_l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__3(); +lean_mark_persistent(l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__3); +l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__4 = _init_l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__4(); +lean_mark_persistent(l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__4); +l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__5 = _init_l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__5(); +lean_mark_persistent(l_Lean_instToExprOptionOfToLevel___rarg___lambda__1___closed__5); +l_Lean_instToExprOptionOfToLevel___rarg___closed__1 = _init_l_Lean_instToExprOptionOfToLevel___rarg___closed__1(); +lean_mark_persistent(l_Lean_instToExprOptionOfToLevel___rarg___closed__1); +l_Lean_instToExprListOfToLevel___rarg___closed__1 = _init_l_Lean_instToExprListOfToLevel___rarg___closed__1(); +lean_mark_persistent(l_Lean_instToExprListOfToLevel___rarg___closed__1); +l_Lean_instToExprListOfToLevel___rarg___closed__2 = _init_l_Lean_instToExprListOfToLevel___rarg___closed__2(); +lean_mark_persistent(l_Lean_instToExprListOfToLevel___rarg___closed__2); +l_Lean_instToExprListOfToLevel___rarg___closed__3 = _init_l_Lean_instToExprListOfToLevel___rarg___closed__3(); +lean_mark_persistent(l_Lean_instToExprListOfToLevel___rarg___closed__3); +l_Lean_instToExprListOfToLevel___rarg___closed__4 = _init_l_Lean_instToExprListOfToLevel___rarg___closed__4(); +lean_mark_persistent(l_Lean_instToExprListOfToLevel___rarg___closed__4); +l_Lean_instToExprListOfToLevel___rarg___closed__5 = _init_l_Lean_instToExprListOfToLevel___rarg___closed__5(); +lean_mark_persistent(l_Lean_instToExprListOfToLevel___rarg___closed__5); +l_Lean_instToExprListOfToLevel___rarg___closed__6 = _init_l_Lean_instToExprListOfToLevel___rarg___closed__6(); +lean_mark_persistent(l_Lean_instToExprListOfToLevel___rarg___closed__6); +l_Lean_instToExprArrayOfToLevel___rarg___lambda__1___closed__1 = _init_l_Lean_instToExprArrayOfToLevel___rarg___lambda__1___closed__1(); +lean_mark_persistent(l_Lean_instToExprArrayOfToLevel___rarg___lambda__1___closed__1); +l_Lean_instToExprArrayOfToLevel___rarg___lambda__1___closed__2 = _init_l_Lean_instToExprArrayOfToLevel___rarg___lambda__1___closed__2(); +lean_mark_persistent(l_Lean_instToExprArrayOfToLevel___rarg___lambda__1___closed__2); +l_Lean_instToExprArrayOfToLevel___rarg___closed__1 = _init_l_Lean_instToExprArrayOfToLevel___rarg___closed__1(); +lean_mark_persistent(l_Lean_instToExprArrayOfToLevel___rarg___closed__1); +l_Lean_instToExprArrayOfToLevel___rarg___closed__2 = _init_l_Lean_instToExprArrayOfToLevel___rarg___closed__2(); +lean_mark_persistent(l_Lean_instToExprArrayOfToLevel___rarg___closed__2); +l_Lean_instToExprProdOfToLevel___rarg___lambda__1___closed__1 = _init_l_Lean_instToExprProdOfToLevel___rarg___lambda__1___closed__1(); +lean_mark_persistent(l_Lean_instToExprProdOfToLevel___rarg___lambda__1___closed__1); +l_Lean_instToExprProdOfToLevel___rarg___lambda__1___closed__2 = _init_l_Lean_instToExprProdOfToLevel___rarg___lambda__1___closed__2(); +lean_mark_persistent(l_Lean_instToExprProdOfToLevel___rarg___lambda__1___closed__2); +l_Lean_instToExprProdOfToLevel___rarg___closed__1 = _init_l_Lean_instToExprProdOfToLevel___rarg___closed__1(); +lean_mark_persistent(l_Lean_instToExprProdOfToLevel___rarg___closed__1); l_Lean_instToExprLiteral___lambda__1___closed__1 = _init_l_Lean_instToExprLiteral___lambda__1___closed__1(); lean_mark_persistent(l_Lean_instToExprLiteral___lambda__1___closed__1); l_Lean_instToExprLiteral___lambda__1___closed__2 = _init_l_Lean_instToExprLiteral___lambda__1___closed__2(); @@ -3924,6 +3881,12 @@ l_Lean_instToExprPreresolved___lambda__1___closed__10 = _init_l_Lean_instToExprP lean_mark_persistent(l_Lean_instToExprPreresolved___lambda__1___closed__10); l_Lean_instToExprPreresolved___lambda__1___closed__11 = _init_l_Lean_instToExprPreresolved___lambda__1___closed__11(); lean_mark_persistent(l_Lean_instToExprPreresolved___lambda__1___closed__11); +l_Lean_instToExprPreresolved___lambda__1___closed__12 = _init_l_Lean_instToExprPreresolved___lambda__1___closed__12(); +lean_mark_persistent(l_Lean_instToExprPreresolved___lambda__1___closed__12); +l_Lean_instToExprPreresolved___lambda__1___closed__13 = _init_l_Lean_instToExprPreresolved___lambda__1___closed__13(); +lean_mark_persistent(l_Lean_instToExprPreresolved___lambda__1___closed__13); +l_Lean_instToExprPreresolved___lambda__1___closed__14 = _init_l_Lean_instToExprPreresolved___lambda__1___closed__14(); +lean_mark_persistent(l_Lean_instToExprPreresolved___lambda__1___closed__14); l_Lean_instToExprPreresolved___closed__1 = _init_l_Lean_instToExprPreresolved___closed__1(); lean_mark_persistent(l_Lean_instToExprPreresolved___closed__1); l_Lean_instToExprPreresolved___closed__2 = _init_l_Lean_instToExprPreresolved___closed__2(); diff --git a/stage0/stdlib/Lean/ToLevel.c b/stage0/stdlib/Lean/ToLevel.c new file mode 100644 index 000000000000..37448a177789 --- /dev/null +++ b/stage0/stdlib/Lean/ToLevel.c @@ -0,0 +1,70 @@ +// Lean compiler output +// Module: Lean.ToLevel +// Imports: Lean.Expr +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +LEAN_EXPORT lean_object* l_Lean_instToLevel; +lean_object* l_Lean_Level_succ___override(lean_object*); +lean_object* l_Lean_Level_max___override(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_instToLevel__1(lean_object*); +LEAN_EXPORT lean_object* l_Lean_ToLevel_max(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_ToLevel_imax(lean_object*, lean_object*); +lean_object* l_Lean_Level_imax___override(lean_object*, lean_object*); +static lean_object* _init_l_Lean_instToLevel() { +_start: +{ +lean_object* x_1; +x_1 = lean_box(0); +return x_1; +} +} +LEAN_EXPORT lean_object* l_Lean_instToLevel__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Level_succ___override(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Lean_ToLevel_max(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_Level_max___override(x_1, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_ToLevel_imax(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_Level_imax___override(x_1, x_2); +return x_3; +} +} +lean_object* initialize_Lean_Expr(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_Lean_ToLevel(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Lean_Expr(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_Lean_instToLevel = _init_l_Lean_instToLevel(); +lean_mark_persistent(l_Lean_instToLevel); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/stage0/stdlib/Lean/Util/SearchPath.c b/stage0/stdlib/Lean/Util/SearchPath.c index 0538c8f42388..ee922f446560 100644 --- a/stage0/stdlib/Lean/Util/SearchPath.c +++ b/stage0/stdlib/Lean/Util/SearchPath.c @@ -34,7 +34,6 @@ static lean_object* l___aux__Lean__Util__SearchPath______elabRules__termCompile_ LEAN_EXPORT lean_object* l___aux__Lean__Util__SearchPath______elabRules__termCompile__time__search__path_x25__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); static lean_object* l___aux__Lean__Util__SearchPath______elabRules__termCompile__time__search__path_x25__1___closed__2; -extern lean_object* l_Lean_levelZero; static lean_object* l___private_Lean_ToExpr_0__Lean_List_toExprAux___at___aux__Lean__Util__SearchPath______elabRules__termCompile__time__search__path_x25__1___spec__2___closed__3; lean_object* l_Lean_Name_str___override(lean_object*, lean_object*); static lean_object* l___private_Lean_ToExpr_0__Lean_List_toExprAux___at___aux__Lean__Util__SearchPath______elabRules__termCompile__time__search__path_x25__1___spec__2___closed__1; @@ -286,7 +285,7 @@ static lean_object* _init_l___aux__Lean__Util__SearchPath______elabRules__termCo { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_levelZero; +x_2 = lean_box(0); x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); diff --git a/stage0/stdlib/Std/Time/Zoned/DateTime.c b/stage0/stdlib/Std/Time/Zoned/DateTime.c index 576795946634..ec181064ae6a 100644 --- a/stage0/stdlib/Std/Time/Zoned/DateTime.c +++ b/stage0/stdlib/Std/Time/Zoned/DateTime.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Std.Time.Zoned.DateTime -// Imports: Std.Time.DateTime Std.Time.Zoned.TimeZone Std.Internal +// Imports: Std.Time.DateTime Std.Time.Zoned.TimeZone #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -7768,7 +7768,6 @@ return x_4; } lean_object* initialize_Std_Time_DateTime(uint8_t builtin, lean_object*); lean_object* initialize_Std_Time_Zoned_TimeZone(uint8_t builtin, lean_object*); -lean_object* initialize_Std_Internal(uint8_t builtin, lean_object*); static bool _G_initialized = false; LEAN_EXPORT lean_object* initialize_Std_Time_Zoned_DateTime(uint8_t builtin, lean_object* w) { lean_object * res; @@ -7780,9 +7779,6 @@ lean_dec_ref(res); res = initialize_Std_Time_Zoned_TimeZone(builtin, lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -res = initialize_Std_Internal(builtin, lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); l_Std_Time_instInhabitedDateTime___lambda__1___closed__1 = _init_l_Std_Time_instInhabitedDateTime___lambda__1___closed__1(); lean_mark_persistent(l_Std_Time_instInhabitedDateTime___lambda__1___closed__1); l_Std_Time_instInhabitedDateTime___lambda__1___closed__2 = _init_l_Std_Time_instInhabitedDateTime___lambda__1___closed__2(); diff --git a/tests/bench/liasolver.lean b/tests/bench/liasolver.lean index adcfab670f5e..00edf8ee8eb8 100644 --- a/tests/bench/liasolver.lean +++ b/tests/bench/liasolver.lean @@ -170,7 +170,7 @@ namespace Equation let (i, c) := e.coeffs.getAny?.get! return { e with coeffs := e.coeffs.insert i 1 - const := Int.div e.const c } + const := Int.ediv e.const c } def invert (e : Equation) : Equation := { e with diff --git a/tests/lean/307.lean b/tests/lean/307.lean index 397162530c0a..40433a393207 100644 --- a/tests/lean/307.lean +++ b/tests/lean/307.lean @@ -7,46 +7,37 @@ def INT32_MIN : Int := -0x80000000 #reduce INT32_MIN % -1 #eval INT32_MIN % -1 -#reduce (Int.mod (-2 : Int) 0) -#eval (Int.mod (-2 : Int) 0) +#reduce (Int.emod (-2 : Int) 0) +#eval (Int.emod (-2 : Int) 0) -#reduce -(Int.mod (-2 : Int) 0) -#eval -(Int.mod (-2 : Int) 0) +#reduce -(Int.emod (-2 : Int) 0) +#eval -(Int.emod (-2 : Int) 0) @[noinline] def oneU8 : UInt8 := 1 #reduce (UInt8.mod oneU8 0).val.val #eval (UInt8.mod oneU8 0) -#reduce (UInt8.modn oneU8 0).val.val -#eval (UInt8.modn oneU8 0) +#reduce (UInt8.mod oneU8 0).val.val +#eval (UInt8.mod oneU8 0) -@[noinline] def int_div x y := Int.div x y -@[noinline] def int_mod x y := Int.mod x y +@[noinline] def int_div x y := Int.ediv x y +@[noinline] def int_mod x y := Int.emod x y @[noinline] def uint8_mod x y := UInt8.mod x y -@[noinline] def uint8_modn x y := UInt8.modn x y @[noinline] def oneU16 : UInt16 := 1 #reduce (UInt16.mod oneU16 0).val.val #eval (UInt16.mod oneU16 0) -#reduce (UInt16.modn oneU16 0).val.val -#eval (UInt16.modn oneU16 0) - @[noinline] def uint16_mod x y := UInt16.mod x y -@[noinline] def uint16_modn x y := UInt16.modn x y @[noinline] def oneU32 : UInt32 := 1 #reduce (UInt32.mod oneU32 0).val.val #eval (UInt32.mod oneU32 0) -#reduce (UInt32.modn oneU32 0).val.val -#eval (UInt32.modn oneU32 0) - @[noinline] def uint32_mod x y := UInt32.mod x y -@[noinline] def uint32_modn x y := UInt32.modn x y @[noinline] def oneU64 : UInt64 := 1 @@ -54,19 +45,13 @@ def INT32_MIN : Int := -0x80000000 #reduce (UInt64.mod oneU64 0).val.val #eval (UInt64.mod oneU64 0) -#reduce (UInt64.modn oneU64 0).val.val -#eval (UInt64.modn oneU64 0) - @[noinline] def uint64_mod x y := UInt64.mod x y -@[noinline] def uint64_modn x y := UInt64.modn x y @[noinline] def oneUSize : USize := 1 #eval (USize.mod oneUSize 0) -#eval (USize.modn oneUSize 0) @[noinline] def usize_mod x y := USize.mod x y -@[noinline] def usize_modn x y := USize.modn x y def main : IO Unit := do IO.println <| int_div INT32_MIN (-1) @@ -74,14 +59,9 @@ def main : IO Unit := do IO.println <| int_mod INT32_MIN (-1) IO.println <| int_mod (-2) 0 IO.println <| uint8_mod 1 0 - IO.println <| uint8_modn 1 0 IO.println <| uint16_mod 1 0 - IO.println <| uint16_modn 1 0 IO.println <| uint32_mod 1 0 - IO.println <| uint32_modn 1 0 IO.println <| uint64_mod 1 0 - IO.println <| uint64_modn 1 0 IO.println <| usize_mod 1 0 - IO.println <| usize_modn 1 0 #eval main diff --git a/tests/lean/307.lean.expected.out b/tests/lean/307.lean.expected.out index bc1579e14a8d..3dbad7342d45 100644 --- a/tests/lean/307.lean.expected.out +++ b/tests/lean/307.lean.expected.out @@ -19,13 +19,6 @@ Int.ofNat 2 1 1 1 -1 -1 -1 -1 -1 -1 -1 2147483648 0 0 @@ -35,8 +28,3 @@ Int.ofNat 2 1 1 1 -1 -1 -1 -1 -1 diff --git a/tests/lean/matchOfNatIssue.lean b/tests/lean/matchOfNatIssue.lean index 7619026464ec..3f17f64a88b3 100644 --- a/tests/lean/matchOfNatIssue.lean +++ b/tests/lean/matchOfNatIssue.lean @@ -1,13 +1,13 @@ -example (x : Int) (h : x = 2) : Int.div 2 1 = x := by - simp [Int.div] +example (x : Int) (h : x = 2) : Int.ediv 2 1 = x := by + simp [Int.ediv] trace_state simp (config := { decide := true }) [h] -example (n : Nat) : Int.div (Int.ofNat n) (Int.ofNat 0) = Int.ofNat (n / 0) := by - simp [Int.div] +example (n : Nat) : Int.ediv (Int.ofNat n) (Int.ofNat 0) = Int.ofNat (n / 0) := by + simp [Int.ediv] -example (n : Nat) : Int.div (Int.ofNat n) 0 = Int.ofNat (n / 0) := by - simp [Int.div] +example (n : Nat) : Int.ediv (Int.ofNat n) 0 = Int.ofNat (n / 0) := by + simp [Int.ediv] example (n : Nat) : Int.mul (Int.ofNat n) (Int.ofNat 0) = Int.ofNat (n * 0) := by simp [Int.mul] diff --git a/tests/lean/run/4320.lean b/tests/lean/run/4320.lean index adcdfd4a3d03..5c8cadaedd25 100644 --- a/tests/lean/run/4320.lean +++ b/tests/lean/run/4320.lean @@ -7,7 +7,7 @@ def many_map {α β : Type} (f : α → β) : Many α → Many β | .more x xs => Many.more (f x) (fun () => many_map f <| xs ()) /-- -info: many_map.induct {α β : Type} (f : α → β) (motive : Many α → Prop) (case1 : motive Many.none) +info: many_map.induct {α : Type} (motive : Many α → Prop) (case1 : motive Many.none) (case2 : ∀ (x : α) (xs : Unit → Many α), motive (xs ()) → motive (Many.more x xs)) (a✝ : Many α) : motive a✝ -/ #guard_msgs in diff --git a/tests/lean/run/6199.lean b/tests/lean/run/6199.lean new file mode 100644 index 000000000000..c0702cc11857 --- /dev/null +++ b/tests/lean/run/6199.lean @@ -0,0 +1,107 @@ +import Lean +/-! +# `_` separators for numeric literals +RFC: https://github.com/leanprover/lean4/issues/6199 +-/ +set_option pp.mvars false + +open Lean Elab + +elab "#term " s:str : command => Command.liftTermElabM <| withRef s do + let t ← Lean.ofExcept <| Parser.runParserCategory (← getEnv) `term s.getString + let e ← Term.elabTermAndSynthesize t none + logInfo m!"{e} : {← Meta.inferType e}" + +/-! +Decimal tests +-/ +/-- info: 0 : Nat -/ +#guard_msgs in #term "0" +/-- info: 1 : Nat -/ +#guard_msgs in #term "1" +/-- info: 1000000 : Nat -/ +#guard_msgs in #term "1000000" +/-- info: 1000000 : Nat -/ +#guard_msgs in #term "1_000_000" +/-- info: 1000000 : Nat -/ +#guard_msgs in #term "1__000___000" +/-- error: :1:5: unexpected end of input; expected decimal number -/ +#guard_msgs in #term "1_00_" +/-- error: :1:6: unexpected character; expected decimal number -/ +#guard_msgs in #term "(1_00_)" +-- Starting with `_` is an identifier: +/-- +error: unknown identifier '_10' +--- +info: sorry : ?_ +-/ +#guard_msgs in #term "_10" + +/-! +Scientific tests +-/ +/-- info: 100000. : Float -/ +#guard_msgs in #term "100_000." +/-- info: 100000.0 : Float -/ +#guard_msgs in #term "100_000.0" +/-- info: 0. : Float -/ +#guard_msgs in #term "0." +-- The decimal parser requires a digit at the start, so the `_` is left over: +/-- error: :1:4: expected end of input -/ +#guard_msgs in #term "100._" +/-- info: 100.111111 : Float -/ +#guard_msgs in #term "100.111_111" +/-- error: :1:8: unexpected end of input; expected decimal number -/ +#guard_msgs in #term "100.111_" +/-- error: :1:9: unexpected character; expected decimal number -/ +#guard_msgs in #term "(100.111_)" +/-- info: 100111111e1094 : Float -/ +#guard_msgs in #term "100.111_111e1_100" +/-- error: :1:5: unexpected end of input; expected decimal number -/ +#guard_msgs in #term "1e10_" +/-- error: :1:6: unexpected character; expected decimal number -/ +#guard_msgs in #term "(1e10_)" +/-- error: :1:1: missing exponent digits in scientific literal -/ +#guard_msgs in #term "1e_10" + +/-! +Base-2 tests +-/ +/-- info: 15 : Nat -/ +#guard_msgs in #term "0b1111" +/-- info: 15 : Nat -/ +#guard_msgs in #term "0b11_11" +/-- info: 15 : Nat -/ +#guard_msgs in #term "0b__11__11" +/-- error: :1:7: unexpected end of input; expected binary number -/ +#guard_msgs in #term "0b1111_" +/-- error: :1:8: unexpected character; expected binary number -/ +#guard_msgs in #term "(0b1111_)" + +/-! +Base-8 tests +-/ +/-- info: 512 : Nat -/ +#guard_msgs in #term "0o1000" +/-- info: 512 : Nat -/ +#guard_msgs in #term "0o1_000" +/-- info: 512 : Nat -/ +#guard_msgs in #term "0o_1_000" +/-- error: :1:7: unexpected end of input; expected octal number -/ +#guard_msgs in #term "0o1000_" +/-- error: :1:8: unexpected character; expected octal number -/ +#guard_msgs in #term "(0o1000_)" + +/-! +Base-16 tests +-/ +/-- info: 4096 : Nat -/ +#guard_msgs in #term "0x1000" +/-- info: 4096 : Nat -/ +#guard_msgs in #term "0x1_000" +/-- info: 4096 : Nat -/ +#guard_msgs in #term "0x_1_000" +/-- error: :1:7: unexpected end of input; expected hexadecimal number -/ +#guard_msgs in #term "0x1000_" +/-- error: :1:8: unexpected character; expected hexadecimal number -/ +#guard_msgs in #term "(0x1000_)" diff --git a/tests/lean/run/funind_proof.lean b/tests/lean/run/funind_proof.lean index f6b24b0c0258..09495272495f 100644 --- a/tests/lean/run/funind_proof.lean +++ b/tests/lean/run/funind_proof.lean @@ -31,7 +31,7 @@ end /-- -info: Term.replaceConst.induct (a b : String) (motive1 : Term → Prop) (motive2 : List Term → Prop) +info: Term.replaceConst.induct (a : String) (motive1 : Term → Prop) (motive2 : List Term → Prop) (case1 : ∀ (a_1 : String), (a == a_1) = true → motive1 (const a_1)) (case2 : ∀ (a_1 : String), ¬(a == a_1) = true → motive1 (const a_1)) (case3 : ∀ (a : String) (cs : List Term), motive2 cs → motive1 (app a cs)) (case4 : motive2 []) @@ -64,7 +64,7 @@ theorem numConsts_replaceConst' (a b : String) (e : Term) : numConsts (replaceCo <;> intros <;> simp [replaceConst, numConsts, replaceConstLst, numConstsLst, *] theorem numConsts_replaceConst'' (a b : String) (e : Term) : numConsts (replaceConst a b e) = numConsts e := by - induction e using replaceConst.induct (a := a) (b := b) + induction e using replaceConst.induct (a := a) (motive2 := fun es => numConstsLst (replaceConstLst a b es) = numConstsLst es) <;> simp [replaceConst, numConsts, replaceConstLst, numConstsLst, *] diff --git a/tests/lean/run/funind_tests.lean b/tests/lean/run/funind_tests.lean index dfd695869666..c1e2035dfc9e 100644 --- a/tests/lean/run/funind_tests.lean +++ b/tests/lean/run/funind_tests.lean @@ -367,8 +367,8 @@ def unary (base : Nat) : Nat → Nat termination_by n => n /-- -info: UnusedExtraParams.unary.induct (base : Nat) (motive : Nat → Prop) (case1 : motive 0) - (case2 : ∀ (n : Nat), motive n → motive n.succ) (a✝ : Nat) : motive a✝ +info: UnusedExtraParams.unary.induct (motive : Nat → Prop) (case1 : motive 0) (case2 : ∀ (n : Nat), motive n → motive n.succ) + (a✝ : Nat) : motive a✝ -/ #guard_msgs in #check unary.induct @@ -379,7 +379,7 @@ def binary (base : Nat) : Nat → Nat → Nat termination_by n => n /-- -info: UnusedExtraParams.binary.induct (base : Nat) (motive : Nat → Nat → Prop) (case1 : ∀ (m : Nat), motive 0 m) +info: UnusedExtraParams.binary.induct (motive : Nat → Nat → Prop) (case1 : ∀ (m : Nat), motive 0 m) (case2 : ∀ (n m : Nat), motive n m → motive n.succ m) (a✝ a✝¹ : Nat) : motive a✝ a✝¹ -/ #guard_msgs in @@ -621,7 +621,7 @@ def Tree.map_forest (f : Tree → Tree) (ts : List Tree) : List Tree := end /-- -info: Tree.Tree.map.induct (f : Tree → Tree) (motive1 : Tree → Prop) (motive2 : List Tree → Prop) +info: Tree.Tree.map.induct (motive1 : Tree → Prop) (motive2 : List Tree → Prop) (case1 : ∀ (ts : List Tree), motive2 ts → motive1 (Tree.node ts)) (case2 : ∀ (ts : List Tree), (∀ (t : Tree), t ∈ ts → motive1 t) → motive2 ts) (a✝ : Tree) : motive1 a✝ -/ @@ -629,7 +629,7 @@ info: Tree.Tree.map.induct (f : Tree → Tree) (motive1 : Tree → Prop) (motive #check Tree.map.induct /-- -info: Tree.Tree.map_forest.induct (f : Tree → Tree) (motive1 : Tree → Prop) (motive2 : List Tree → Prop) +info: Tree.Tree.map_forest.induct (motive1 : Tree → Prop) (motive2 : List Tree → Prop) (case1 : ∀ (ts : List Tree), motive2 ts → motive1 (Tree.node ts)) (case2 : ∀ (ts : List Tree), (∀ (t : Tree), t ∈ ts → motive1 t) → motive2 ts) (ts : List Tree) : motive2 ts -/ @@ -637,7 +637,7 @@ info: Tree.Tree.map_forest.induct (f : Tree → Tree) (motive1 : Tree → Prop) #check Tree.map_forest.induct /-- -info: Tree.Tree.map.mutual_induct (f : Tree → Tree) (motive1 : Tree → Prop) (motive2 : List Tree → Prop) +info: Tree.Tree.map.mutual_induct (motive1 : Tree → Prop) (motive2 : List Tree → Prop) (case1 : ∀ (ts : List Tree), motive2 ts → motive1 (Tree.node ts)) (case2 : ∀ (ts : List Tree), (∀ (t : Tree), t ∈ ts → motive1 t) → motive2 ts) : (∀ (a : Tree), motive1 a) ∧ ∀ (ts : List Tree), motive2 ts @@ -658,8 +658,8 @@ def unary (fixed : Bool := false) (n : Nat := 0) : Nat := termination_by n /-- -info: DefaultArgument.unary.induct (fixed : Bool) (motive : Nat → Prop) (case1 : motive 0) - (case2 : ∀ (n : Nat), motive n → motive n.succ) (n : Nat) : motive n +info: DefaultArgument.unary.induct (motive : Nat → Prop) (case1 : motive 0) (case2 : ∀ (n : Nat), motive n → motive n.succ) + (n : Nat) : motive n -/ #guard_msgs in #check unary.induct @@ -671,7 +671,7 @@ def foo (fixed : Bool := false) (n : Nat) (m : Nat := 0) : Nat := termination_by n /-- -info: DefaultArgument.foo.induct (fixed : Bool) (motive : Nat → Nat → Prop) (case1 : ∀ (m : Nat), motive 0 m) +info: DefaultArgument.foo.induct (motive : Nat → Nat → Prop) (case1 : ∀ (m : Nat), motive 0 m) (case2 : ∀ (m n : Nat), motive n m → motive n.succ m) (n m : Nat) : motive n m -/ #guard_msgs in diff --git a/tests/lean/run/issue5767.lean b/tests/lean/run/issue5767.lean index 48f6754ed35a..c7ced93d71f5 100644 --- a/tests/lean/run/issue5767.lean +++ b/tests/lean/run/issue5767.lean @@ -53,12 +53,11 @@ def go2 (ss : Int) (st0 : St) : Bool := decreasing_by sorry /-- -info: go2.induct : Int → - ∀ (motive : St → Prop), - (∀ (x : St), - let st1 := { m := x.m, map := x.map.insert }; - motive st1 → motive x) → - ∀ (st0 : St), motive st0 +info: go2.induct : ∀ (motive : St → Prop), + (∀ (x : St), + let st1 := { m := x.m, map := x.map.insert }; + motive st1 → motive x) → + ∀ (st0 : St), motive st0 -/ #guard_msgs in #check @go2.induct diff --git a/tests/lean/run/structuralMutual.lean b/tests/lean/run/structuralMutual.lean index b8ad61f2509d..24eba94e9de2 100644 --- a/tests/lean/run/structuralMutual.lean +++ b/tests/lean/run/structuralMutual.lean @@ -682,7 +682,7 @@ info: EvenOdd.isEven.induct (motive_1 motive_2 : Nat → Prop) (case1 : motive_1 #check EvenOdd.isEven.induct /-- -info: WithTuple.Tree.map.induct {α β : Type} (f : α → β) (motive_1 : WithTuple.Tree α → Prop) +info: WithTuple.Tree.map.induct {α : Type} (motive_1 : WithTuple.Tree α → Prop) (motive_2 : WithTuple.Tree α × WithTuple.Tree α → Prop) (case1 : ∀ (x : α) (arrs : WithTuple.Tree α × WithTuple.Tree α), motive_2 arrs → motive_1 (WithTuple.Tree.node x arrs)) @@ -693,8 +693,8 @@ info: WithTuple.Tree.map.induct {α β : Type} (f : α → β) (motive_1 : WithT #check WithTuple.Tree.map.induct /-- -info: WithArray.Tree.map.induct {α β : Type} (f : α → β) (motive_1 : WithArray.Tree α → Prop) - (motive_2 : Array (WithArray.Tree α) → Prop) (motive_3 : List (WithArray.Tree α) → Prop) +info: WithArray.Tree.map.induct {α : Type} (motive_1 : WithArray.Tree α → Prop) (motive_2 : Array (WithArray.Tree α) → Prop) + (motive_3 : List (WithArray.Tree α) → Prop) (case1 : ∀ (x : α) (arr₁ : Array (WithArray.Tree α)), motive_2 arr₁ → motive_1 (WithArray.Tree.node x arr₁)) (case2 : ∀ (arr₁ : List (WithArray.Tree α)), motive_3 arr₁ → motive_2 { toList := arr₁ }) (case3 : motive_3 []) (case4 : ∀ (h₁ : WithArray.Tree α) (t₁ : List (WithArray.Tree α)), motive_1 h₁ → motive_3 t₁ → motive_3 (h₁ :: t₁))