I'm probably being very naive about this, but here it goes: Has anyone considere...

@joomy@functional.cafe

I'm probably being very naive about this, but here it goes: Has anyone considered a translation (or rather, extraction) of Calculus of Constructions into polymorphic blame calculus? the idea is that inductive type indices would disappear. types that are still in nonnormal form would turn into ★ with explicit casts in an out of ★.

then, hopefully, we could prove that blame does not arise in the extracted version of a well-typed CoC program.

(my intention here is to use this for extraction from Rocq to C++. I want to use std::any as ★, std::any_cast as the cast, std::bad_any_cast exception as the blame term)