diff options
author | Maxime Dénès <mail@maximedenes.fr> | 2016-03-04 18:17:56 +0100 |
---|---|---|
committer | Maxime Dénès <mail@maximedenes.fr> | 2016-03-04 18:17:56 +0100 |
commit | 120053a50f87bd53398eedc887fa5e979f56f112 (patch) | |
tree | 06f3bd294439a2cd62512b41a599f2c7b277cba6 /kernel | |
parent | b98e4857a13a4014c65882af5321ebdb09f41890 (diff) |
This fix is probably not enough to justify that there are no problems with
primitive projections and prop. ext. or univalence, but at least it prevents
known proofs of false (see discussion on #4588).
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/inductive.ml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/inductive.ml b/kernel/inductive.ml index 80dc69042..fbe0920bc 100644 --- a/kernel/inductive.ml +++ b/kernel/inductive.ml @@ -814,7 +814,15 @@ let rec subterm_specif renv stack t = | Proj (p, c) -> let subt = subterm_specif renv stack c in (match subt with - | Subterm (s, wf) -> Subterm (Strict, wf) + | Subterm (s, wf) -> + (* We take the subterm specs of the constructor of the record *) + let wf_args = (dest_subterms wf).(0) in + (* We extract the tree of the projected argument *) + let kn = Projection.constant p in + let cb = lookup_constant kn renv.env in + let pb = Option.get cb.const_proj in + let n = pb.proj_arg in + Subterm (Strict, List.nth wf_args n) | Dead_code -> Dead_code | Not_subterm -> Not_subterm) |