Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Not enough information to resolve this refine goal

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Not enough information to resolve this refine goal


Chronological Thread 
  • From: Agnishom Chattopadhyay <agnishom AT cmi.ac.in>
  • To: coq-club AT inria.fr
  • Subject: [Coq-Club] Not enough information to resolve this refine goal
  • Date: Wed, 30 Sep 2020 13:21:49 -0500
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=agnishom AT cmi.ac.in; spf=Pass smtp.mailfrom=agnishom AT cmi.ac.in; spf=None smtp.helo=postmaster AT mail.cmi.ac.in
  • Ironport-phdr: 9a23:AbU/8xKUCiynIRBwZNmcpTZWNBhigK39O0sv0rFitYgeKPnxwZ3uMQTl6Ol3ixeRBMOHsq0C0LCd6vmwEUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCe/bL9oIhi6swrdutQLjYZhN6081gbHrnxUdupM2GhmP0iTnxHy5sex+J5s7SFdsO8/+sBDTKv3Yb02QaRXAzo6PW814tbrtQTYQguU+nQcSGQWnQFWDAXD8Rr3Q43+sir+tup6xSmaIcj7Rq06VDi+86tmTgLjhSEaPDA77W7XkNR9g61brhyvpBJx3pDab52OOfVkYq/QZ8kXSXZdUstTUSFKH4Oyb5EID+oEJetVs4b9p10PrRulBQmsA+bvwSJWi3/2x6I6z/ghEQbe3AM6At0OsHTVo8/1NawPVu261qbIzTPCb/NN2Tf9743Ifws9rvGJXLJ8a9DexlU1GwPEiFWdsIroNC6a2eoRqWaU9fZgVf6xhG49rQF8ujahytkxhoTGmo8Z1l/K+DtkzIg6KtC0VEp2bN6kHZdOqiyWKZd6T98mTm9muis3xKELtJ24cSQXyZkqxRDSZviBfoOV4RzjTP6cLSpliH9lYr6zmRm//Eu6xuHiS8W4yktGoylZntXUqHwByxje5tKER/Z95EutxDeC2gHJ5u1ZIk04iKzWIIM7zLEqjJocq0HDEzf2mEroiK+WcV0p+u2y5OTmZrXqvIOTN4p1ig3kKKshhtazAeU+MgQWXmib//qz1KH78EHkXblHjuc6nrfWvZ3ZP8gXuLO1DxVI3osg9xqzFzKm384ZnXkDIlJFYhWHj43xNl7UL/D4C/a/g0+skDdswvDLJaHuApDMLnTZirjuYaxx609ayAYr19BQ+4pUCq0dIPL0QkL+qNvYDgYgPwOox+bnFc5y25gFWWOPB6+ZKLndvUWJ5uIpOemMZZUatCzzK/g/tLbSiioynkZYdq2017MWbmq5F7JoORa3e33p1/4OF2YRvg07BMfqgUGeViZaa3ajVrN0sjg0DoO9DYDGbouogfqI12G6GMsFNSh9FlmQHCKwJM2/UPAWZXfKe5Mzonk/TbGkDrQZ+1S2rgajkuhsK+uS8yZetJSxjIEktd2Wrgk78HlPN+rY1miMS29umWZRHm092aE5qEc7y1HRiPEl0cwdLsRa4rZyail/NZPYyLUkWdX7WwaHddKIDl+tBNSgU2k8

I am trying to write a function whose argument type is a sigma type. Here are some details.

Inductive nonEmpty (A : Type) : Type :=
| singleton : A -> nonEmpty A
| consNE : A -> nonEmpty A -> nonEmpty A.

Arguments singleton {A}.
Arguments consNE {A}.

Section NonEmpty.

  Variable A : Type.

  Fixpoint toList (l : nonEmpty A) :=
    match l with
    | singleton x => (cons x nil)
    | consNE x xs => (cons x (toList xs))
    end.

  Fixpoint fromList (l : {l : list A | length l > 0}) : nonEmpty A.
    refine (match (proj1_sig l) with
            | nil => _
            | (cons x nil) => singleton x
            | (cons x xs) => consNE x (fromList (exist (fun xs => length xs > 0) xs _))
            end).

Now, how do I solve these goals? For the first one, I want to show a contradiction, saying that (proj1_sig l) couldn't have been nil, given that we know that length ((proj1_sig l)) > 0. However, the equation (proj1_sig l) = nil is not present in the context. It is very similar in the case of the other hole as well.

--Agnishom



Archive powered by MHonArc 2.6.19+.

Top of Page