# HG changeset patch # User krauss # Date 1176460247 -7200 # Node ID 2d1179ad431c60a49f059faacd84ea1767d7474f # Parent f792579b6e59ae6a1d35295921670999622fc343 more robust proof diff -r f792579b6e59 -r 2d1179ad431c src/HOL/Library/Graphs.thy --- a/src/HOL/Library/Graphs.thy Fri Apr 13 10:02:30 2007 +0200 +++ b/src/HOL/Library/Graphs.thy Fri Apr 13 12:30:47 2007 +0200 @@ -82,6 +82,7 @@ Inf_graph_def: "Inf == \Gs. Graph (\(dest_graph ` Gs))" proof fix x y z :: "('a,'b) graph" + fix A :: "('a, 'b) graph set" show "(x < y) = (x \ y \ x \ y)" unfolding graph_leq_def graph_less_def @@ -89,29 +90,37 @@ show "x \ x" unfolding graph_leq_def .. - show "\x \ y; y \ x\ \ x = y" unfolding graph_leq_def - by (cases x, cases y) simp + { assume "x \ y" "y \ z" + with order_trans show "x \ z" + unfolding graph_leq_def . } + + { assume "x \ y" "y \ x" thus "x = y" + unfolding graph_leq_def + by (cases x, cases y) simp } show "inf x y \ x" "inf x y \ y" - "\x \ y; x \ z\ \ x \ inf y z" - unfolding inf_graph_def graph_leq_def by auto + unfolding inf_graph_def graph_leq_def + by auto + + { assume "x \ y" "x \ z" thus "x \ inf y z" + unfolding inf_graph_def graph_leq_def + by auto } show "x \ sup x y" "y \ sup x y" - "\y \ x; z \ x\ \ sup y z \ x" unfolding sup_graph_def graph_leq_def graph_plus_def by auto + + { assume "y \ x" "z \ x" thus "sup y z \ x" + unfolding sup_graph_def graph_leq_def graph_plus_def by auto } show "sup x (inf y z) = inf (sup x y) (sup x z)" unfolding inf_graph_def sup_graph_def graph_leq_def graph_plus_def by auto - fix A :: "('a, 'b) graph set" - show "x \ A \ Inf A \ x" - and "(\x. x \ A \ z \ x) \ z \ Inf A" - unfolding Inf_graph_def graph_leq_def by auto + { assume "x \ A" thus "Inf A \ x" + unfolding Inf_graph_def graph_leq_def by auto } - from order_trans - show "\x \ y; y \ z\ \ x \ z" - unfolding graph_leq_def . -qed auto + { assume "\x. x \ A \ z \ x" thus "z \ Inf A" + unfolding Inf_graph_def graph_leq_def by auto } +qed lemma in_grplus: "has_edge (G + H) p b q = (has_edge G p b q \ has_edge H p b q)"