lean4-htt/src/kernel
Kyle Miller d8accf47b3
chore: use terminology "non-recursive structure" instead of "struct-like" (#12749)
This PR changes "structure-like" terminology to "non-recursive
structure" across internal documentation, error messages, the
metaprogramming API, and the kernel, to clarify Lean's type theory. A
*structure* is a one-constructor inductive type with no indices — these
can be created by either the `structure` or `inductive` commands — and
are supported by the primitive `Expr.proj` projections. Only
*non-recursive* structures have an eta conversion rule. The PR
description contains the APIs that were renamed.

Addresses RFC #5891, which proposed this rename. The change is motivated
by the need to distinguish between `structure`-defined structures,
structures, and non-recursive structures. Especially since #5783, which
enabled the `structure` command to define recursive structures,
"structure-like" has been easy to misunderstand.

Changes:
- Kernel: `is_structure_like()` -> `is_non_rec_structure()`
- `Lean.isStructureLike` -> `Lean.isNonRecStructure`
- `Lean.matchConstStructLike` -> `Lean.matchConstNonRecStructure`
- `Lean.getStructureLikeCtor?` -> `Lean.getNonRecStructureCtor?`
- `Lean.getStructureLikeNumFields` -> `Lean.getNonRecStructureNumFields`
- `Lean.Expr.proj`: extended and corrected documentation (note: despite
the fact that not every projection can be written as a recursor
application, I left in this claim since it seems good to document a
more-restrictive specification, and some users have requested the kernel
be more restrictive in this way)

Closes #5891
2026-03-09 03:44:38 +00:00
..
abstract.cpp feat: generalize Expr.abstractRange 2022-03-08 18:19:17 -08:00
abstract.h
CMakeLists.txt chore: reformat all cmake files (#12218) 2026-01-28 18:23:08 +00:00
declaration.cpp fix: RecursorVal.getInduct to return name of major argument’s type (#5679) 2024-10-21 08:45:18 +00:00
declaration.h perf: mark move constructors and assignment operators as noexcept (#10784) 2025-10-22 14:21:51 +00:00
environment.cpp fix: kernel: move level parameter count and thm-is-prop checks for robustness (#12817) 2026-03-05 17:03:01 +00:00
environment.h perf: mark move constructors and assignment operators as noexcept (#10784) 2025-10-22 14:21:51 +00:00
equiv_manager.cpp chore: reduce src/include/lean 2021-09-07 08:24:54 -07:00
equiv_manager.h
expr.cpp feat: add the nondep field of Expr.letE to the C++ data model (#8751) 2025-06-14 23:10:27 +00:00
expr.h perf: mark move constructors and assignment operators as noexcept (#10784) 2025-10-22 14:21:51 +00:00
expr_cache.cpp
expr_cache.h
expr_eq_fn.cpp perf: use lean::unordered_set for expr_eq_fn (#11731) 2025-12-18 14:24:50 +00:00
expr_eq_fn.h
expr_maps.h perf: use lean::unordered_map/set everywhere (#11957) 2026-01-12 17:14:09 +00:00
expr_sets.h perf: use lean::unordered_map/set everywhere (#11957) 2026-01-12 17:14:09 +00:00
find_fn.h
for_each_fn.cpp perf: use lean::unordered_map/set everywhere (#11957) 2026-01-12 17:14:09 +00:00
for_each_fn.h perf: for_each with precise cache (#4794) 2024-07-20 00:18:55 +00:00
inductive.cpp chore: use terminology "non-recursive structure" instead of "struct-like" (#12749) 2026-03-09 03:44:38 +00:00
inductive.h chore: use terminology "non-recursive structure" instead of "struct-like" (#12749) 2026-03-09 03:44:38 +00:00
init_module.cpp fix: Windows needs more LEAN_EXPORTs 2024-08-12 14:14:42 +02:00
init_module.h fix: Windows needs more LEAN_EXPORTs 2024-08-12 14:14:42 +02:00
instantiate.cpp perf: instantiateExprMVars (#4915) 2024-08-05 17:15:22 +00:00
instantiate.h perf: instantiateExprMVars (#4915) 2024-08-05 17:15:22 +00:00
instantiate_mvars.cpp perf: use lean::unordered_map/set everywhere (#11957) 2026-01-12 17:14:09 +00:00
kernel_exception.h feat: split Lean.Kernel.Environment from Lean.Environment (#5145) 2025-01-18 18:42:57 +00:00
level.cpp fix: block potential adversarial exploit of non-aborting assert! (#8560) 2025-05-31 03:14:01 +00:00
level.h perf: mark move constructors and assignment operators as noexcept (#10784) 2025-10-22 14:21:51 +00:00
local_ctx.cpp chore: reduce src/include/lean 2021-09-07 08:24:54 -07:00
local_ctx.h perf: mark move constructors and assignment operators as noexcept (#10784) 2025-10-22 14:21:51 +00:00
quot.cpp
quot.h fix: quot reduction bug 2023-10-11 21:25:34 -07:00
replace_fn.cpp perf: use mimalloc with important C++ hash maps (#7868) 2025-04-11 16:23:33 +00:00
replace_fn.h chore: reduce src/include/lean 2021-09-07 08:24:54 -07:00
trace.cpp perf: Options.hasTrace (#12001) 2026-01-16 09:03:40 +00:00
trace.h perf: Options.hasTrace (#12001) 2026-01-16 09:03:40 +00:00
type_checker.cpp chore: use terminology "non-recursive structure" instead of "struct-like" (#12749) 2026-03-09 03:44:38 +00:00
type_checker.h perf: cache unfold_definition in the kernel (#12259) 2026-01-31 03:44:50 +00:00