English 中文(简体)
How to proceed with this Coq Proof?
原标题:

I m having a problem with my Coq proof and was hoping for some help and guidance. I have part of my definition below:

Inductive Architecture : Set := 
| Create_Architecture (Arch_Name: string)(MyComponents: list Component)
  (MyConnections: list Connector)

with

...

with 

Connector : Set :=
| Create_Connector (Con_Name:string) (client: Component)(server:Component)

I wish to say that "A component term must be either a client or server of a connection; but not both." I have come up with the following as a representation of the above in the Coq (based on my definition above):

(forall con:Connector, forall c:Component, In con (MyConnections x) -> 
(c = (client con) / c <> (server con)) / (c <> (client con) / c = (server con)))

However, I m not sure if that is correct (is it?), as when I get to the proof, I get stuck at the point

5 subgoals
con : Connector
c : Component
H0 : Connection1 = con
______________________________________(1/5)
c = HotelRes

The type of HotelRes is indeed Component (in this case, HotelRes is the client of the connection), however, since this is not in the set of assumptions, I can t use something like the exact or auto tactics.

How could I proceed with such a proof?

问题回答

From the (part of the) definition that you have shown there is clearly nothing preventing a Component to be both a client and a server in a connector, so I don t understand how you want to prove it?

My guess is that your definition does not properly capture what you want to model, but it s impossible to say more without seeing neither (full definition nor the idea behind it).





相关问题
Prolog difference routine

I need some help with a routine that I am trying to create. I need to make a routine that will look something like this: difference([(a,b),(a,c),(b,c),(d,e)],[(a,_)],X). X = [(b,c),(d,e)]. I really ...

Python: Analyzing complex statements during execution

I am wondering if there is any way to get some meta information about the interpretation of a python statement during execution. Let s assume this is a complex statement of some single statements ...

Python nested lists and recursion problem

I m trying to process a first order logic formula represented as nested lists and strings in python so that that its in disjunctive normal form, i.e [ & , [ | , a , b ], [ | , c , d ]] ...

prolog - why this strange trace

here is the prolog code (which i sort of follow). len([],0). len([_|T],N) :- len(T,X), N is X+1. and here is the trace for it (im running linux, swi) [trace] ?- len([d,f,w,c],X). Call: (7) ...

prolog cut off in method

I have a question I would like to ask you something about a code snippet: insert_pq(State, [], [State]) :- !. insert_pq(State, [H|Tail], [State, H|Tail]) :- precedes(State, H). insert_pq(State, [...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

how to create a parser for search queries

for example i d need to create something like google search query parser to parse such expressions as: flying hiking or swiming -"**walking in boots **" **author:**hamish **author:**reid or ...

Applications of Unification?

What are the (practical) applications of Unification? Where it is actually being used in real world? I couldn t understand the whole idea of what it is really about and why it s considered as a part ...

热门标签