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
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
class.h
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
expr_lt.h
expr_pair.h
expr_pair_maps.h
expr_unsigned_map.h
formatter.cpp
formatter.h
init_module.cpp chore: move trace.cpp to kernel (#4014) 2024-04-28 17:24:48 +00:00
init_module.h
max_sharing.cpp
max_sharing.h
module.cpp feat: embed and check githash in .olean (#2766) 2023-11-27 10:24:43 +00:00
module.h
num.cpp
num.h
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
projection.h
protected.cpp
protected.h
reducible.cpp
reducible.h
replace_visitor.cpp
replace_visitor.h
suffixes.h
time_task.cpp chore: move trace.cpp to kernel (#4014) 2024-04-28 17:24:48 +00:00
time_task.h
util.cpp feat: System.Platform.target (#3207) 2024-01-24 12:11:00 +00:00
util.h