Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt to coq/coq#18833 (indrec doesn't use sort family) #17

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/lean.ml
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,14 @@ let lean_scheme env ~dep mind u s =

let body =
let sigma = Evd.from_env env in
let sigma, s' = Evd.fresh_sort_in_family ~rigid:UnivRigid sigma
(if s = LSProp then InSProp else InType)
in
let sigma, body =
Indrec.build_induction_scheme env sigma
((mind, 0), u)
dep
(if s = LSProp then InSProp else InType)
s'
in
let uctx = Evd.universe_context_set sigma in
match s with
Expand Down Expand Up @@ -1149,7 +1152,7 @@ let squashify n { params; ty; ctors; univs } =
Environ.set_rel_context_val envT
(Environ.set_universes uconvT.graph (Global.env ()))
in
let args, out = Reduction.hnf_decompose_prod envT ctorT in
let args, out = Reduction.whd_decompose_prod envT ctorT in
let forced =
(* NB dest_prod returns [out] in whnf *)
let _, outargs = Constr.decompose_app out in
Expand Down
Loading