lean4-htt/src/library
Mario Carneiro 3491c56c49
fix: segfault in old compiler due to noConfusion assumptions (#2903)
This fixes #2901, a bug in the old compiler which causes a segfault. The
issue is that when visiting `noConfusion` applications, it assumes that
each constructor case has `nfields` arguments, e.g. `head1 = head2 ->
tail1 = tail2 -> P` has two arguments because `List.cons` has 2 fields,
but in fact propositional fields are skipped by the noConfusion type
generator, so for example `Subtype.noConfusionType` is:
```lean
@[reducible] protected def Subtype.noConfusionType.{u_1, u} : {α : Sort u} →
  {p : α → Prop} → Sort u_1 → Subtype p → Subtype p → Sort u_1 :=
fun {α} {p} P v1 v2 ↦
  Subtype.casesOn v1 fun val property ↦ Subtype.casesOn v2 fun val_1 property ↦ 
    (val = val_1 → P) → P
```
where `val = val_1 → P` only has the one argument even though
`Subtype.mk` has two fields, presumably because it is useless to have an
equality of propositions. Unfortunately there isn't any easy cache or
getter to use here to get the number of non-propositional fields, so we
just calculate it on the spot.
2024-05-10 01:38:38 +00:00
..
compiler fix: segfault in old compiler due to noConfusion assumptions (#2903) 2024-05-10 01:38:38 +00:00
constructions chore: restore #4006 (#4038) 2024-04-30 23:06:50 +00:00
annotation.cpp chore: reduce src/include/lean 2021-09-07 08:24:54 -07:00
annotation.h chore: fix more typos in comments 2023-10-08 14:37:34 -07:00
aux_recursors.cpp
aux_recursors.h
bin_app.cpp
bin_app.h
class.cpp chore: remove dead code at Class.lean used by old frontend 2020-11-20 16:51:44 -08:00
class.h chore: remove dead code at Class.lean used by old frontend 2020-11-20 16:51:44 -08:00
CMakeLists.txt chore: move trace.cpp to kernel (#4014) 2024-04-28 17:24:48 +00:00
constants.cpp fix: elim_scalar_array_cases 2022-07-24 14:46:46 -07:00
constants.h fix: elim_scalar_array_cases 2022-07-24 14:46:46 -07:00
constants.txt fix: elim_scalar_array_cases 2022-07-24 14:46:46 -07:00
expr_lt.cpp fix: dllexport functions not already annotated in header 2021-09-20 18:41:46 +02:00
expr_lt.h chore: remove dead code 2020-10-27 19:23:14 -07:00
expr_pair.h chore: reduce src/include/lean 2021-09-07 08:24:54 -07:00
expr_pair_maps.h
expr_unsigned_map.h
formatter.cpp chore: remove io_state & abstract_type_context 2021-01-12 09:51:14 -08:00
formatter.h chore: remove io_state & abstract_type_context 2021-01-12 09:51:14 -08:00
init_module.cpp chore: move trace.cpp to kernel (#4014) 2024-04-28 17:24:48 +00:00
init_module.h
max_sharing.cpp chore: reduce src/include/lean 2021-09-07 08:24:54 -07:00
max_sharing.h
module.cpp feat: embed and check githash in .olean (#2766) 2023-11-27 10:24:43 +00:00
module.h chore: reduce src/include/lean 2021-09-07 08:24:54 -07:00
num.cpp
num.h chore: reduce src/include/lean 2021-09-07 08:24:54 -07:00
print.cpp fix: pp projection indices starting at 1 2023-10-15 14:25:00 -07:00
print.h chore: fix more typos in comments 2023-10-08 14:37:34 -07:00
profiling.cpp fix: profiler threshold in C++ 2023-04-10 16:57:54 +02:00
profiling.h
projection.cpp refactor: move is_structure_like to inductive.cpp 2021-11-25 11:31:00 -08:00
projection.h refactor: move is_structure_like to inductive.cpp 2021-11-25 11:31:00 -08:00
protected.cpp chore: remove legacy support for modification objects 2020-10-26 08:10:51 -07:00
protected.h
reducible.cpp
reducible.h
replace_visitor.cpp chore: reduce src/include/lean 2021-09-07 08:24:54 -07:00
replace_visitor.h chore: remove Expr.localE constructor 2020-11-01 09:37:48 -08:00
suffixes.h
time_task.cpp chore: move trace.cpp to kernel (#4014) 2024-04-28 17:24:48 +00:00
time_task.h refactor: pos at time_task::time_task was a dead field 2021-01-30 11:10:18 -08:00
util.cpp feat: System.Platform.target (#3207) 2024-01-24 12:11:00 +00:00
util.h refactor: move is_constructor_app to inductive.cpp 2021-11-25 11:31:00 -08:00