coq tactic - Coq contradiction in hypotheses -


in coq have 2 hypotheses h , h0, contradict each other. problem is, contradict each other specializations , @ moment of proof context not specialized.

at moment proof context looks this:

color : vertex -> bool  v : v_set  : a_set  x0, x1 : vertex  h : v x0 -> v x1 -> (a_ends x0 x1) \/ (a_ends x1 x0) -> color x0 <> color x1  h0 : v x0 -> v x1 -> (a_ends x0 x1) \/ (a_ends x1 x0) -> color x0 = color x1 ______________________________________  false 

as proof graphs (v = set of vertices, a = set of arcs, color = color of vertex), show contradiction in natural language: suppose graph contains vertices x0 , x1 (and neighbouring), x0 , x1 cannot have same , different color @ same time. therefore h , h0 cannot both true , therefore goal implied current context.

how should go in coq, without generating v x0, v x1 , a (a_ends x0 x1) \/ (a_ends x1 x0) new subgoals time? tricky part the: "suppose graph exists v , a of such , such forms".

so far tried auto, eauto, trivial, intuition, apply h in h0, contradiction h, omega.

in general, need make sure context matches informal reasoning. say:

suppose graph contains vertices x0 , x1 (and neighbouring), x0 , x1 cannot have same , different color @ same time.

however, not context says. context says "suppose have graph , 2 vertices x0 , x1 (which may or may not in vertex set of graph). if happens x0 , x1 in particular in vertex set of graph, , neighboring, must have different colors (this h0). however, have in case, x0 , x1 have same color (this h1)." obvious conclusion draw not absurdity, these x0 , x1 not on graph, or not neighboring. concreteness, graph might empty, or have 1 vertex , no edges.

i suggest stepping through proof tactic tactic, translating each context , goal natural language, , looking point @ go true theorem false one.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -