diff options
author | Stephane Glondu <steph@glondu.net> | 2012-01-07 17:59:15 +0100 |
---|---|---|
committer | Stephane Glondu <steph@glondu.net> | 2012-01-07 18:20:56 +0100 |
commit | 2ee61d5995ef572f0124691f10630305a59b4f73 (patch) | |
tree | eaeffb7be70ce770a822108f8a527312f67fd8b2 /tactics/equality.ml | |
parent | ba021624830c7ad5df0688d144e4305551ae1a5f (diff) | |
parent | de109d8c0c68f569b907e6e24271f259ba28888e (diff) |
Prepare upload to squeeze-backportsdebian/8.3.pl3+dfsg-1_bpo60+1
Diffstat (limited to 'tactics/equality.ml')
-rw-r--r-- | tactics/equality.ml | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tactics/equality.ml b/tactics/equality.ml index 411ccc0e..a25f88e3 100644 --- a/tactics/equality.ml +++ b/tactics/equality.ml @@ -1,12 +1,12 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010 *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2011 *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: equality.ml 13874 2011-03-05 16:41:53Z herbelin $ *) +(* $Id: equality.ml 14641 2011-11-06 11:59:10Z herbelin $ *) open Pp open Util @@ -681,10 +681,21 @@ let gen_absurdity id gl = absurd_term=False *) +let ind_scheme_of_eq lbeq = + let ind = destInd lbeq.eq in + let (mib,mip) = Global.lookup_inductive ind in + let kind = inductive_sort_family mip in + (* use ind rather than case by compatibility *) + let kind = + if kind = InProp then Elimschemes.ind_scheme_kind_from_prop + else Elimschemes.ind_scheme_kind_from_type in + mkConst (find_scheme kind ind) + + let discrimination_pf e (t,t1,t2) discriminator lbeq = let i = build_coq_I () in let absurd_term = build_coq_False () in - let eq_elim = lbeq.ind in + let eq_elim = ind_scheme_of_eq lbeq in (applist (eq_elim, [t;t1;mkNamedLambda e t discriminator;i;t2]), absurd_term) exception NotDiscriminable |