[STATEMENT]
theorem union_sets_by_rank:
  "VARS p r s rank
  [ union_sets_precondition p x y \<and> rank_property p rank \<and> p0 = p ]
  r := find_set p x;
  p := path_compression p x r;
  s := find_set p y;
  p := path_compression p y s;
  IF r \<noteq> s THEN
    IF rank[[r]] \<le> S'\<^sup>+ * (rank[[s]]) THEN
      p[r] := s
    ELSE
      p[s] := r;
      IF rank[[r]] = rank[[s]] THEN
        rank[r] := S'\<^sup>T * (rank[[r]])
      FI
    FI
  FI
  [ union_sets_postcondition p x y p0 \<and> rank_property p rank ]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [union_sets_precondition p x y \<and> rank_property p rank \<and> p0 = p]
r := find_set p x; p := path_compression p x r; s := find_set p y; p := path_compression p y s; IF r \<noteq> s THEN IF rank[[r]] \<le> S'\<^sup>+ * (rank[[s]]) THEN p := (p[r\<longmapsto>s])  ELSE p := (p[s\<longmapsto>r]); IF rank[[r]] = rank[[s]] THEN rank := (rank[r\<longmapsto>S'[[rank[[r]]]]]) FI FI FI
[union_sets_postcondition p x y p0 \<and> rank_property p rank]
[PROOF STEP]
proof vcg_tc_simp
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
fix rank
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
let ?r = "find_set p0 x"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
let ?p1 = "path_compression p0 x ?r"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
let ?s = "find_set ?p1 y"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
let ?p2 = "path_compression ?p1 y ?s"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
let ?p5 = "path_compression ?p1 y ?r"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
let ?rr = "rank[[?r]]"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
let ?rs = "rank[[?s]]"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
let ?rank = "rank[?r\<longmapsto>S'\<^sup>T * ?rs]"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
let ?p3 = "?p2[?r\<longmapsto>?s]"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
let ?p4 = "?p2[?s\<longmapsto>?r]"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
assume 1: "union_sets_precondition p0 x y \<and> rank_property p0 rank"
[PROOF STATE]
proof (state)
this:
union_sets_precondition p0 x y \<and> rank_property p0 rank

goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
hence 2: "path_compression_postcondition ?p1 x ?r p0"
[PROOF STATE]
proof (prove)
using this:
union_sets_precondition p0 x y \<and> rank_property p0 rank

goal (1 subgoal):
 1. path_compression_postcondition (path_compression p0 x (find_set p0 x)) x (find_set p0 x) p0
[PROOF STEP]
using find_set_function find_set_postcondition_def find_set_precondition_def path_compression_function path_compression_precondition_def union_sets_precondition_def
[PROOF STATE]
proof (prove)
using this:
union_sets_precondition p0 x y \<and> rank_property p0 rank
\<lbrakk>find_set_precondition ?p ?x; ?y = find_set ?p ?x\<rbrakk> \<Longrightarrow> find_set_postcondition ?p ?x ?y
find_set_postcondition ?p ?x ?y \<equiv> point ?y \<and> ?y = root ?p ?x
find_set_precondition ?p ?x \<equiv> ((coreflexive (?p[[?p]]) \<and> times_top_class.total ?p) \<and> pd_kleene_allegory_class.acyclic (?p - (1::'a))) \<and> point ?x
\<lbrakk>path_compression_precondition ?p ?x ?y; ?p' = path_compression ?p ?x ?y\<rbrakk> \<Longrightarrow> path_compression_postcondition ?p' ?x ?y ?p
path_compression_precondition ?p ?x ?y \<equiv> ((coreflexive (?p[[?p]]) \<and> times_top_class.total ?p) \<and> pd_kleene_allegory_class.acyclic (?p - (1::'a))) \<and> point ?x \<and> point ?y \<and> ?y = root ?p ?x
union_sets_precondition ?p ?x ?y \<equiv> ((coreflexive (?p[[?p]]) \<and> times_top_class.total ?p) \<and> pd_kleene_allegory_class.acyclic (?p - (1::'a))) \<and> point ?x \<and> point ?y

goal (1 subgoal):
 1. path_compression_postcondition (path_compression p0 x (find_set p0 x)) x (find_set p0 x) p0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
path_compression_postcondition (path_compression p0 x (find_set p0 x)) x (find_set p0 x) p0

goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
hence 3: "path_compression_postcondition ?p2 y ?s ?p1"
[PROOF STATE]
proof (prove)
using this:
path_compression_postcondition (path_compression p0 x (find_set p0 x)) x (find_set p0 x) p0

goal (1 subgoal):
 1. path_compression_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y (find_set (path_compression p0 x (find_set p0 x)) y) (path_compression p0 x (find_set p0 x))
[PROOF STEP]
using 1 find_set_function find_set_postcondition_def find_set_precondition_def path_compression_function path_compression_precondition_def union_sets_precondition_def path_compression_postcondition_def
[PROOF STATE]
proof (prove)
using this:
path_compression_postcondition (path_compression p0 x (find_set p0 x)) x (find_set p0 x) p0
union_sets_precondition p0 x y \<and> rank_property p0 rank
\<lbrakk>find_set_precondition ?p ?x; ?y = find_set ?p ?x\<rbrakk> \<Longrightarrow> find_set_postcondition ?p ?x ?y
find_set_postcondition ?p ?x ?y \<equiv> point ?y \<and> ?y = root ?p ?x
find_set_precondition ?p ?x \<equiv> ((coreflexive (?p[[?p]]) \<and> times_top_class.total ?p) \<and> pd_kleene_allegory_class.acyclic (?p - (1::'a))) \<and> point ?x
\<lbrakk>path_compression_precondition ?p ?x ?y; ?p' = path_compression ?p ?x ?y\<rbrakk> \<Longrightarrow> path_compression_postcondition ?p' ?x ?y ?p
path_compression_precondition ?p ?x ?y \<equiv> ((coreflexive (?p[[?p]]) \<and> times_top_class.total ?p) \<and> pd_kleene_allegory_class.acyclic (?p - (1::'a))) \<and> point ?x \<and> point ?y \<and> ?y = root ?p ?x
union_sets_precondition ?p ?x ?y \<equiv> ((coreflexive (?p[[?p]]) \<and> times_top_class.total ?p) \<and> pd_kleene_allegory_class.acyclic (?p - (1::'a))) \<and> point ?x \<and> point ?y
path_compression_postcondition ?p ?x ?y ?p0.0 \<equiv> path_compression_precondition ?p ?x ?y \<and> ?p \<sqinter> (1::'a) = ?p0.0 \<sqinter> (1::'a) \<and> fc ?p = fc ?p0.0 \<and> ?p0.0[?p0.0\<^sup>T\<^sup>\<star> * ?x\<longmapsto>?y] = ?p

goal (1 subgoal):
 1. path_compression_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y (find_set (path_compression p0 x (find_set p0 x)) y) (path_compression p0 x (find_set p0 x))
[PROOF STEP]
by meson
[PROOF STATE]
proof (state)
this:
path_compression_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y (find_set (path_compression p0 x (find_set p0 x)) y) (path_compression p0 x (find_set p0 x))

goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
have "rank_property ?p1 rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank_property (path_compression p0 x (find_set p0 x)) rank
[PROOF STEP]
using 1 2 path_compression_preserves_rank_property union_sets_precondition_def
[PROOF STATE]
proof (prove)
using this:
union_sets_precondition p0 x y \<and> rank_property p0 rank
path_compression_postcondition (path_compression p0 x (find_set p0 x)) x (find_set p0 x) p0
\<lbrakk>path_compression_postcondition ?p ?x ?y ?p0.0; (coreflexive (?p0.0[[?p0.0]]) \<and> times_top_class.total ?p0.0) \<and> pd_kleene_allegory_class.acyclic (?p0.0 - (1::'a)); rank_property ?p0.0 ?rank\<rbrakk> \<Longrightarrow> rank_property ?p ?rank
union_sets_precondition ?p ?x ?y \<equiv> ((coreflexive (?p[[?p]]) \<and> times_top_class.total ?p) \<and> pd_kleene_allegory_class.acyclic (?p - (1::'a))) \<and> point ?x \<and> point ?y

goal (1 subgoal):
 1. rank_property (path_compression p0 x (find_set p0 x)) rank
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
rank_property (path_compression p0 x (find_set p0 x)) rank

goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
hence 4: "rank_property ?p2 rank"
[PROOF STATE]
proof (prove)
using this:
rank_property (path_compression p0 x (find_set p0 x)) rank

goal (1 subgoal):
 1. rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank
[PROOF STEP]
using 1 2 3
[PROOF STATE]
proof (prove)
using this:
rank_property (path_compression p0 x (find_set p0 x)) rank
union_sets_precondition p0 x y \<and> rank_property p0 rank
path_compression_postcondition (path_compression p0 x (find_set p0 x)) x (find_set p0 x) p0
path_compression_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y (find_set (path_compression p0 x (find_set p0 x)) y) (path_compression p0 x (find_set p0 x))

goal (1 subgoal):
 1. rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank
[PROOF STEP]
by (meson path_compression_preserves_rank_property path_compression_postcondition_def path_compression_precondition_def)
[PROOF STATE]
proof (state)
this:
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank

goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
have 5: "point ?r" "point ?s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. point (find_set p0 x) &&& point (find_set (path_compression p0 x (find_set p0 x)) y)
[PROOF STEP]
using 2 3 path_compression_postcondition_def path_compression_precondition_def
[PROOF STATE]
proof (prove)
using this:
path_compression_postcondition (path_compression p0 x (find_set p0 x)) x (find_set p0 x) p0
path_compression_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y (find_set (path_compression p0 x (find_set p0 x)) y) (path_compression p0 x (find_set p0 x))
path_compression_postcondition ?p ?x ?y ?p0.0 \<equiv> path_compression_precondition ?p ?x ?y \<and> ?p \<sqinter> (1::'a) = ?p0.0 \<sqinter> (1::'a) \<and> fc ?p = fc ?p0.0 \<and> ?p0.0[?p0.0\<^sup>T\<^sup>\<star> * ?x\<longmapsto>?y] = ?p
path_compression_precondition ?p ?x ?y \<equiv> ((coreflexive (?p[[?p]]) \<and> times_top_class.total ?p) \<and> pd_kleene_allegory_class.acyclic (?p - (1::'a))) \<and> point ?x \<and> point ?y \<and> ?y = root ?p ?x

goal (1 subgoal):
 1. point (find_set p0 x) &&& point (find_set (path_compression p0 x (find_set p0 x)) y)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
hence 6: "point ?rr" "point ?rs"
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. point (rank[[find_set p0 x]]) &&& point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])
[PROOF STEP]
using 1 comp_associative read_injective read_surjective rank_property_def
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
union_sets_precondition p0 x y \<and> rank_property p0 rank
?x * ?y * ?z = ?x * (?y * ?z)
\<lbrakk>injective ?y; coreflexive (?x[[?x]])\<rbrakk> \<Longrightarrow> injective (?x[[?y]])
\<lbrakk>surjective ?y; times_top_class.total ?x\<rbrakk> \<Longrightarrow> surjective (?x[[?y]])
rank_property ?p ?rank \<equiv> (coreflexive (?rank[[?rank]]) \<and> times_top_class.total ?rank) \<and> (?p - (1::'a)) * ?rank \<le> ?rank * S'\<^sup>+ \<and> card_less_eq (roots ?p) (- (S'\<^sup>+ * ?rank\<^sup>T * top))

goal (1 subgoal):
 1. point (rank[[find_set p0 x]]) &&& point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])

goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
have "top \<le> S'\<^sup>\<star> \<squnion> S'\<^sup>+\<^sup>T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. top \<le> S'\<^sup>\<star> \<squnion> S'\<^sup>+\<^sup>T
[PROOF STEP]
by (metis S'_star_connex conv_dist_comp conv_star_commute eq_refl star.circ_reflexive star_left_unfold_equal star_simulation_right_equal sup.orderE sup_monoid.add_assoc)
[PROOF STATE]
proof (state)
this:
top \<le> S'\<^sup>\<star> \<squnion> S'\<^sup>+\<^sup>T

goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
hence 7: "-S'\<^sup>+\<^sup>T \<le> S'\<^sup>\<star>"
[PROOF STATE]
proof (prove)
using this:
top \<le> S'\<^sup>\<star> \<squnion> S'\<^sup>+\<^sup>T

goal (1 subgoal):
 1. - S'\<^sup>+\<^sup>T \<le> S'\<^sup>\<star>
[PROOF STEP]
by (metis comp_inf.case_split_left comp_inf.star.circ_plus_one comp_inf.star.circ_sup_2 half_shunting)
[PROOF STATE]
proof (state)
this:
- S'\<^sup>+\<^sup>T \<le> S'\<^sup>\<star>

goal (1 subgoal):
 1. \<And>rank. union_sets_precondition p0 x y \<and> rank_property p0 rank \<Longrightarrow> (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
show "(?r \<noteq> ?s \<longrightarrow> (?rr \<le> S'\<^sup>+ * ?rs \<longrightarrow> union_sets_postcondition ?p3 x y p0 \<and> rank_property ?p3 rank) \<and>
                      (\<not> ?rr \<le> S'\<^sup>+ * ?rs \<longrightarrow> ((?rr = ?rs \<longrightarrow> union_sets_postcondition ?p4 x y p0 \<and> rank_property ?p4 ?rank) \<and>
                                              (?rr \<noteq> ?rs \<longrightarrow> union_sets_postcondition ?p4 x y p0 \<and> rank_property ?p4 rank)))) \<and>
        (?r = ?s \<longrightarrow> union_sets_postcondition ?p5 x y p0 \<and> rank_property ?p5 rank)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))
 2. find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank
[PROOF STEP]
show "?r \<noteq> ?s \<longrightarrow> (?rr \<le> S'\<^sup>+ * ?rs \<longrightarrow> union_sets_postcondition ?p3 x y p0 \<and> rank_property ?p3 rank) \<and>
                      (\<not> ?rr \<le> S'\<^sup>+ * ?rs \<longrightarrow> ((?rr = ?rs \<longrightarrow> union_sets_postcondition ?p4 x y p0 \<and> rank_property ?p4 ?rank) \<and>
                                              (?rr \<noteq> ?rs \<longrightarrow> union_sets_postcondition ?p4 x y p0 \<and> rank_property ?p4 rank)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<Longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))
[PROOF STEP]
assume 8: "?r \<noteq> ?s"
[PROOF STATE]
proof (state)
this:
find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<Longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))
[PROOF STEP]
show "(?rr \<le> S'\<^sup>+ * ?rs \<longrightarrow> union_sets_postcondition ?p3 x y p0 \<and> rank_property ?p3 rank) \<and>
            (\<not> ?rr \<le> S'\<^sup>+ * ?rs \<longrightarrow> ((?rr = ?rs \<longrightarrow> union_sets_postcondition ?p4 x y p0 \<and> rank_property ?p4 ?rank) \<and>
                                    (?rr \<noteq> ?rs \<longrightarrow> union_sets_postcondition ?p4 x y p0 \<and> rank_property ?p4 rank)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank
 2. \<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank)
[PROOF STEP]
show "?rr \<le> S'\<^sup>+ * ?rs \<longrightarrow> union_sets_postcondition ?p3 x y p0 \<and> rank_property ?p3 rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<Longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank
[PROOF STEP]
assume 9: "?rr \<le> S'\<^sup>+ * ?rs"
[PROOF STATE]
proof (state)
this:
rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])

goal (1 subgoal):
 1. rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<Longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank
[PROOF STEP]
show "union_sets_postcondition ?p3 x y p0 \<and> rank_property ?p3 rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0
 2. rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank
[PROOF STEP]
show "union_sets_postcondition ?p3 x y p0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0
[PROOF STEP]
using 1 2 3
[PROOF STATE]
proof (prove)
using this:
union_sets_precondition p0 x y \<and> rank_property p0 rank
path_compression_postcondition (path_compression p0 x (find_set p0 x)) x (find_set p0 x) p0
path_compression_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y (find_set (path_compression p0 x (find_set p0 x)) y) (path_compression p0 x (find_set p0 x))

goal (1 subgoal):
 1. union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0
[PROOF STEP]
by (simp add: union_sets_1)
[PROOF STATE]
proof (state)
this:
union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0

goal (1 subgoal):
 1. rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank
[PROOF STEP]
show "rank_property ?p3 rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank
[PROOF STEP]
proof (unfold rank_property_def, intro conjI)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. coreflexive (rank[[rank]])
 2. times_top_class.total rank
 3. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
 4. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y])) (- (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
show "univalent rank" "total rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coreflexive (rank[[rank]]) &&& times_top_class.total rank
[PROOF STEP]
using 1 rank_property_def
[PROOF STATE]
proof (prove)
using this:
union_sets_precondition p0 x y \<and> rank_property p0 rank
rank_property ?p ?rank \<equiv> (coreflexive (?rank[[?rank]]) \<and> times_top_class.total ?rank) \<and> (?p - (1::'a)) * ?rank \<le> ?rank * S'\<^sup>+ \<and> card_less_eq (roots ?p) (- (S'\<^sup>+ * ?rank\<^sup>T * top))

goal (1 subgoal):
 1. coreflexive (rank[[rank]]) &&& times_top_class.total rank
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
coreflexive (rank[[rank]])
times_top_class.total rank

goal (2 subgoals):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
 2. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y])) (- (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
have "?s \<le> -?r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y \<le> - find_set p0 x
[PROOF STEP]
using 5 8
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y \<le> - find_set p0 x
[PROOF STEP]
by (meson order.antisym bijective_regular point_in_vector_or_complement point_in_vector_or_complement_2)
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y \<le> - find_set p0 x

goal (2 subgoals):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
 2. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y])) (- (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
hence "?r \<sqinter> ?s\<^sup>T \<sqinter> 1 = bot"
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y \<le> - find_set p0 x

goal (1 subgoal):
 1. find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T \<sqinter> (1::'a) = bot
[PROOF STEP]
by (metis (full_types) bot_least inf.left_commute inf.sup_monoid.add_commute one_inf_conv pseudo_complement)
[PROOF STATE]
proof (state)
this:
find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T \<sqinter> (1::'a) = bot

goal (2 subgoals):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
 2. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y])) (- (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
hence "?p3 \<sqinter> 1 \<le> ?p2"
[PROOF STATE]
proof (prove)
using this:
find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T \<sqinter> (1::'a) = bot

goal (1 subgoal):
 1. (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) \<sqinter> (1::'a) \<le> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)
[PROOF STEP]
by (smt half_shunting inf.cobounded2 pseudo_complement regular_one_closed semiring.add_mono sup_commute)
[PROOF STATE]
proof (state)
this:
(path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) \<sqinter> (1::'a) \<le> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)

goal (2 subgoals):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
 2. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y])) (- (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
hence "roots ?p3 \<le> roots ?p2"
[PROOF STATE]
proof (prove)
using this:
(path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) \<sqinter> (1::'a) \<le> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))
[PROOF STEP]
by (simp add: mult_left_isotone)
[PROOF STATE]
proof (state)
this:
roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))

goal (2 subgoals):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
 2. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y])) (- (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
thus "card_less_eq (roots ?p3) (-(S'\<^sup>+ * rank\<^sup>T * top))"
[PROOF STATE]
proof (prove)
using this:
roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))

goal (1 subgoal):
 1. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y])) (- (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
using 4
[PROOF STATE]
proof (prove)
using this:
roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank

goal (1 subgoal):
 1. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y])) (- (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
by (meson rank_property_def card_less_eq_def order_trans)
[PROOF STATE]
proof (state)
this:
card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y])) (- (S'\<^sup>+ * rank\<^sup>T * top))

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
have "(?p3 - 1) * rank = (?r \<sqinter> ?s\<^sup>T \<sqinter> -1) * rank \<squnion> (-?r \<sqinter> ?p2 \<sqinter> -1) * rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank = (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> (- find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank
[PROOF STEP]
using comp_inf.semiring.distrib_right mult_right_dist_sup
[PROOF STATE]
proof (prove)
using this:
(?a \<squnion> ?b) \<sqinter> ?c = ?a \<sqinter> ?c \<squnion> ?b \<sqinter> ?c
(?x \<squnion> ?y) * ?z = ?x * ?z \<squnion> ?y * ?z

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank = (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> (- find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank = (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> (- find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank = (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> (- find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... \<le> (?r \<sqinter> ?s\<^sup>T \<sqinter> -1) * rank \<squnion> (?p2 - 1) * rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> (- find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank
[PROOF STEP]
using comp_inf.mult_semi_associative mult_left_isotone sup_right_isotone
[PROOF STATE]
proof (prove)
using this:
?x \<sqinter> ?y \<sqinter> ?z \<le> ?x \<sqinter> (?y \<sqinter> ?z)
?x \<le> ?y \<Longrightarrow> ?x * ?z \<le> ?y * ?z
?x \<le> ?y \<Longrightarrow> ?z \<squnion> ?x \<le> ?z \<squnion> ?y

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> (- find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> (- find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> (- find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... \<le> (?r \<sqinter> ?s\<^sup>T \<sqinter> -1) * rank \<squnion> rank * S'\<^sup>+"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> rank * S'\<^sup>+
[PROOF STEP]
using 4 sup_right_isotone rank_property_def
[PROOF STATE]
proof (prove)
using this:
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank
?x \<le> ?y \<Longrightarrow> ?z \<squnion> ?x \<le> ?z \<squnion> ?y
rank_property ?p ?rank \<equiv> (coreflexive (?rank[[?rank]]) \<and> times_top_class.total ?rank) \<and> (?p - (1::'a)) * ?rank \<le> ?rank * S'\<^sup>+ \<and> card_less_eq (roots ?p) (- (S'\<^sup>+ * ?rank\<^sup>T * top))

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> rank * S'\<^sup>+
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> rank * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> rank * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... \<le> (?r \<sqinter> ?s\<^sup>T) * rank \<squnion> rank * S'\<^sup>+"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> rank * S'\<^sup>+ \<le> (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T) * rank \<squnion> rank * S'\<^sup>+
[PROOF STEP]
using inf_le1 mult_left_isotone sup_left_isotone
[PROOF STATE]
proof (prove)
using this:
?x \<sqinter> ?y \<le> ?x
?x \<le> ?y \<Longrightarrow> ?x * ?z \<le> ?y * ?z
?x \<le> ?y \<Longrightarrow> ?x \<squnion> ?z \<le> ?y \<squnion> ?z

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> rank * S'\<^sup>+ \<le> (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T) * rank \<squnion> rank * S'\<^sup>+
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> rank * S'\<^sup>+ \<le> (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T) * rank \<squnion> rank * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T - (1::'a)) * rank \<squnion> rank * S'\<^sup>+ \<le> (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T) * rank \<squnion> rank * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... = ?r * ?s\<^sup>T * rank \<squnion> rank * S'\<^sup>+"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T) * rank \<squnion> rank * S'\<^sup>+ = find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank \<squnion> rank * S'\<^sup>+
[PROOF STEP]
using 5
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T) * rank \<squnion> rank * S'\<^sup>+ = find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank \<squnion> rank * S'\<^sup>+
[PROOF STEP]
by (simp add: vector_covector)
[PROOF STATE]
proof (state)
this:
(find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T) * rank \<squnion> rank * S'\<^sup>+ = find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank \<squnion> rank * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T) * rank \<squnion> rank * S'\<^sup>+ = find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank \<squnion> rank * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... = rank * S'\<^sup>+"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+
[PROOF STEP]
have "rank\<^sup>T * ?r \<le> S'\<^sup>+ * rank\<^sup>T * ?s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank[[find_set p0 x]] \<le> S'\<^sup>+ * rank\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
using 9 comp_associative
[PROOF STATE]
proof (prove)
using this:
rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])
?x * ?y * ?z = ?x * (?y * ?z)

goal (1 subgoal):
 1. rank[[find_set p0 x]] \<le> S'\<^sup>+ * rank\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rank[[find_set p0 x]] \<le> S'\<^sup>+ * rank\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+
[PROOF STEP]
hence "?r \<le> rank * S'\<^sup>+ * rank\<^sup>T * ?s"
[PROOF STATE]
proof (prove)
using this:
rank[[find_set p0 x]] \<le> S'\<^sup>+ * rank\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. find_set p0 x \<le> rank * S'\<^sup>+ * rank\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
using 4 shunt_mapping comp_associative rank_property_def
[PROOF STATE]
proof (prove)
using this:
rank[[find_set p0 x]] \<le> S'\<^sup>+ * rank\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank
coreflexive (?z[[?z]]) \<and> times_top_class.total ?z \<Longrightarrow> (?x \<le> ?z * ?y) = (?z[[?x]] \<le> ?y)
?x * ?y * ?z = ?x * (?y * ?z)
rank_property ?p ?rank \<equiv> (coreflexive (?rank[[?rank]]) \<and> times_top_class.total ?rank) \<and> (?p - (1::'a)) * ?rank \<le> ?rank * S'\<^sup>+ \<and> card_less_eq (roots ?p) (- (S'\<^sup>+ * ?rank\<^sup>T * top))

goal (1 subgoal):
 1. find_set p0 x \<le> rank * S'\<^sup>+ * rank\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
find_set p0 x \<le> rank * S'\<^sup>+ * rank\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+
[PROOF STEP]
hence "?r * ?s\<^sup>T \<le> rank * S'\<^sup>+ * rank\<^sup>T"
[PROOF STATE]
proof (prove)
using this:
find_set p0 x \<le> rank * S'\<^sup>+ * rank\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T \<le> rank * S'\<^sup>+ * rank\<^sup>T
[PROOF STEP]
using 5 shunt_bijective
[PROOF STATE]
proof (prove)
using this:
find_set p0 x \<le> rank * S'\<^sup>+ * rank\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
bijective ?z \<Longrightarrow> (?x \<le> ?y * ?z) = (?x * ?z\<^sup>T \<le> ?y)

goal (1 subgoal):
 1. find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T \<le> rank * S'\<^sup>+ * rank\<^sup>T
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T \<le> rank * S'\<^sup>+ * rank\<^sup>T

goal (1 subgoal):
 1. find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+
[PROOF STEP]
hence "?r * ?s\<^sup>T * rank \<le> rank * S'\<^sup>+"
[PROOF STATE]
proof (prove)
using this:
find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T \<le> rank * S'\<^sup>+ * rank\<^sup>T

goal (1 subgoal):
 1. find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
using 4 shunt_bijective rank_property_def mapping_conv_bijective
[PROOF STATE]
proof (prove)
using this:
find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T \<le> rank * S'\<^sup>+ * rank\<^sup>T
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank
bijective ?z \<Longrightarrow> (?x \<le> ?y * ?z) = (?x * ?z\<^sup>T \<le> ?y)
rank_property ?p ?rank \<equiv> (coreflexive (?rank[[?rank]]) \<and> times_top_class.total ?rank) \<and> (?p - (1::'a)) * ?rank \<le> ?rank * S'\<^sup>+ \<and> card_less_eq (roots ?p) (- (S'\<^sup>+ * ?rank\<^sup>T * top))
(coreflexive (?x[[?x]]) \<and> times_top_class.total ?x) = (coreflexive (?x[[?x\<^sup>T\<^sup>T]]) \<and> surjective (?x\<^sup>T))

goal (1 subgoal):
 1. find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank \<le> rank * S'\<^sup>+

goal (1 subgoal):
 1. find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank \<le> rank * S'\<^sup>+

goal (1 subgoal):
 1. find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+
[PROOF STEP]
using sup_absorb2
[PROOF STATE]
proof (prove)
using this:
find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank \<le> rank * S'\<^sup>+
?x \<le> ?y \<Longrightarrow> ?x \<squnion> ?y = ?y

goal (1 subgoal):
 1. find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
find_set p0 x * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
show "(?p3 - 1) * rank \<le> rank * S'\<^sup>+"
[PROOF STATE]
proof (prove)
using this:
((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) - (1::'a)) * rank \<le> rank * S'\<^sup>+

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank

goal (1 subgoal):
 1. \<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank)
[PROOF STEP]
show "\<not> ?rr \<le> S'\<^sup>+ * ?rs \<longrightarrow> ((?rr = ?rs \<longrightarrow> union_sets_postcondition ?p4 x y p0 \<and> rank_property ?p4 ?rank) \<and>
                                     (?rr \<noteq> ?rs \<longrightarrow> union_sets_postcondition ?p4 x y p0 \<and> rank_property ?p4 rank))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<Longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank)
[PROOF STEP]
assume "\<not> ?rr \<le> S'\<^sup>+ * ?rs"
[PROOF STATE]
proof (state)
this:
\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])

goal (1 subgoal):
 1. \<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<Longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank)
[PROOF STEP]
hence "?rr \<le> -(S'\<^sup>+ * ?rs)"
[PROOF STATE]
proof (prove)
using this:
\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])

goal (1 subgoal):
 1. rank[[find_set p0 x]] \<le> - (S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]))
[PROOF STEP]
using 6
[PROOF STATE]
proof (prove)
using this:
\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])

goal (1 subgoal):
 1. rank[[find_set p0 x]] \<le> - (S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]))
[PROOF STEP]
by (meson point_in_vector_or_complement S'_regular bijective_regular regular_closed_star regular_mult_closed vector_mult_closed)
[PROOF STATE]
proof (state)
this:
rank[[find_set p0 x]] \<le> - (S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]))

goal (1 subgoal):
 1. \<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<Longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rank[[find_set p0 x]] \<le> - (S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]))

goal (1 subgoal):
 1. \<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<Longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank)
[PROOF STEP]
have "... = -S'\<^sup>+ * ?rs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])) = - S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])
[PROOF STEP]
using 6 comp_bijective_complement
[PROOF STATE]
proof (prove)
using this:
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])
bijective ?y \<Longrightarrow> - ?x * ?y = - (?x * ?y)

goal (1 subgoal):
 1. - (S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])) = - S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
- (S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])) = - S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])

goal (1 subgoal):
 1. \<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<Longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
rank[[find_set p0 x]] \<le> - S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])
[PROOF STEP]
have "?rs \<le> -S'\<^sup>+\<^sup>T * ?rr"
[PROOF STATE]
proof (prove)
using this:
rank[[find_set p0 x]] \<le> - S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])

goal (1 subgoal):
 1. rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> - S'\<^sup>+\<^sup>T * (rank[[find_set p0 x]])
[PROOF STEP]
using 6
[PROOF STATE]
proof (prove)
using this:
rank[[find_set p0 x]] \<le> - S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])

goal (1 subgoal):
 1. rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> - S'\<^sup>+\<^sup>T * (rank[[find_set p0 x]])
[PROOF STEP]
by (metis bijective_reverse conv_complement)
[PROOF STATE]
proof (state)
this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> - S'\<^sup>+\<^sup>T * (rank[[find_set p0 x]])

goal (1 subgoal):
 1. \<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<Longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> - S'\<^sup>+\<^sup>T * (rank[[find_set p0 x]])

goal (1 subgoal):
 1. \<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<Longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank)
[PROOF STEP]
have "... \<le> S'\<^sup>\<star> * ?rr"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - S'\<^sup>+\<^sup>T * (rank[[find_set p0 x]]) \<le> S'\<^sup>\<star> * (rank[[find_set p0 x]])
[PROOF STEP]
using 7
[PROOF STATE]
proof (prove)
using this:
- S'\<^sup>+\<^sup>T \<le> S'\<^sup>\<star>

goal (1 subgoal):
 1. - S'\<^sup>+\<^sup>T * (rank[[find_set p0 x]]) \<le> S'\<^sup>\<star> * (rank[[find_set p0 x]])
[PROOF STEP]
by (simp add: mult_left_isotone)
[PROOF STATE]
proof (state)
this:
- S'\<^sup>+\<^sup>T * (rank[[find_set p0 x]]) \<le> S'\<^sup>\<star> * (rank[[find_set p0 x]])

goal (1 subgoal):
 1. \<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<Longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- S'\<^sup>+\<^sup>T * (rank[[find_set p0 x]]) \<le> S'\<^sup>\<star> * (rank[[find_set p0 x]])

goal (1 subgoal):
 1. \<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<Longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank)
[PROOF STEP]
have "... = S'\<^sup>+ * ?rr \<squnion> ?rr"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S'\<^sup>\<star> * (rank[[find_set p0 x]]) = S'\<^sup>+ * (rank[[find_set p0 x]]) \<squnion> (rank[[find_set p0 x]])
[PROOF STEP]
using star.circ_loop_fixpoint mult_assoc
[PROOF STATE]
proof (prove)
using this:
?y * (?y\<^sup>\<star> * ?z) \<squnion> ?z = ?y\<^sup>\<star> * ?z
?a * ?b * ?c = ?a * (?b * ?c)

goal (1 subgoal):
 1. S'\<^sup>\<star> * (rank[[find_set p0 x]]) = S'\<^sup>+ * (rank[[find_set p0 x]]) \<squnion> (rank[[find_set p0 x]])
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
S'\<^sup>\<star> * (rank[[find_set p0 x]]) = S'\<^sup>+ * (rank[[find_set p0 x]]) \<squnion> (rank[[find_set p0 x]])

goal (1 subgoal):
 1. \<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<Longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> S'\<^sup>+ * (rank[[find_set p0 x]]) \<squnion> (rank[[find_set p0 x]])
[PROOF STEP]
have 10: "?rs - ?rr \<le> S'\<^sup>+ * ?rr"
[PROOF STATE]
proof (prove)
using this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> S'\<^sup>+ * (rank[[find_set p0 x]]) \<squnion> (rank[[find_set p0 x]])

goal (1 subgoal):
 1. rank[[find_set (path_compression p0 x (find_set p0 x)) y]] - (rank[[find_set p0 x]]) \<le> S'\<^sup>+ * (rank[[find_set p0 x]])
[PROOF STEP]
using half_shunting
[PROOF STATE]
proof (prove)
using this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> S'\<^sup>+ * (rank[[find_set p0 x]]) \<squnion> (rank[[find_set p0 x]])
?x \<le> ?y \<squnion> ?z \<Longrightarrow> ?x - ?z \<le> ?y

goal (1 subgoal):
 1. rank[[find_set (path_compression p0 x (find_set p0 x)) y]] - (rank[[find_set p0 x]]) \<le> S'\<^sup>+ * (rank[[find_set p0 x]])
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] - (rank[[find_set p0 x]]) \<le> S'\<^sup>+ * (rank[[find_set p0 x]])

goal (1 subgoal):
 1. \<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<Longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank)
[PROOF STEP]
show "((?rr = ?rs \<longrightarrow> union_sets_postcondition ?p4 x y p0 \<and> rank_property ?p4 ?rank) \<and>
                 (?rr \<noteq> ?rs \<longrightarrow> union_sets_postcondition ?p4 x y p0 \<and> rank_property ?p4 rank))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank
[PROOF STEP]
show "?rr = ?rs \<longrightarrow> union_sets_postcondition ?p4 x y p0 \<and> rank_property ?p4 ?rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<Longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
assume 11: "?rr = ?rs"
[PROOF STATE]
proof (state)
this:
rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]]

goal (1 subgoal):
 1. rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<Longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
show "union_sets_postcondition ?p4 x y p0 \<and> rank_property ?p4 ?rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0
 2. rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
show "union_sets_postcondition ?p4 x y p0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0
[PROOF STEP]
using 1 2 3
[PROOF STATE]
proof (prove)
using this:
union_sets_precondition p0 x y \<and> rank_property p0 rank
path_compression_postcondition (path_compression p0 x (find_set p0 x)) x (find_set p0 x) p0
path_compression_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y (find_set (path_compression p0 x (find_set p0 x)) y) (path_compression p0 x (find_set p0 x))

goal (1 subgoal):
 1. union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0
[PROOF STEP]
by (simp add: union_sets_1_swap)
[PROOF STATE]
proof (state)
this:
union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0

goal (1 subgoal):
 1. rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
show "rank_property ?p4 ?rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
proof (unfold rank_property_def, intro conjI)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. coreflexive ((rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])[[(rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])]])
 2. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 3. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 4. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
show "univalent ?rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coreflexive ((rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])[[(rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])]])
[PROOF STEP]
using 4 5 6
[PROOF STATE]
proof (prove)
using this:
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])

goal (1 subgoal):
 1. coreflexive ((rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])[[(rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])]])
[PROOF STEP]
by (meson S'_univalent read_injective update_univalent rank_property_def)
[PROOF STATE]
proof (state)
this:
coreflexive ((rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])[[(rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])]])

goal (3 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 3. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
have "card_less_eq (roots ?p2) (-(S'\<^sup>+ * rank\<^sup>T * top))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) (- (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
using 4 rank_property_def
[PROOF STATE]
proof (prove)
using this:
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank
rank_property ?p ?rank \<equiv> (coreflexive (?rank[[?rank]]) \<and> times_top_class.total ?rank) \<and> (?p - (1::'a)) * ?rank \<le> ?rank * S'\<^sup>+ \<and> card_less_eq (roots ?p) (- (S'\<^sup>+ * ?rank\<^sup>T * top))

goal (1 subgoal):
 1. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) (- (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) (- (S'\<^sup>+ * rank\<^sup>T * top))

goal (3 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 3. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) (- (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
obtain i where 12: "injective i \<and> univalent i \<and> regular i \<and> roots ?p2 \<le> i * -(S'\<^sup>+ * rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
using this:
card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) (- (S'\<^sup>+ * rank\<^sup>T * top))

goal (1 subgoal):
 1. (\<And>i. injective i \<and> coreflexive (i[[i]]) \<and> regular i \<and> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using card_less_eq_def
[PROOF STATE]
proof (prove)
using this:
card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) (- (S'\<^sup>+ * rank\<^sup>T * top))
card_less_eq ?v ?w \<equiv> \<exists>i. injective i \<and> coreflexive (i[[i]]) \<and> regular i \<and> ?v \<le> i * ?w

goal (1 subgoal):
 1. (\<And>i. injective i \<and> coreflexive (i[[i]]) \<and> regular i \<and> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
injective i \<and> coreflexive (i[[i]]) \<and> regular i \<and> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (3 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 3. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
let ?i = "(i[?s\<longmapsto>i[[i * ?rr]]])[i * ?rr\<longmapsto>i[[?s]]]"
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 3. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
have 13: "?i = (i * ?rr \<sqinter> ?s\<^sup>T * i) \<squnion> (-(i * ?rr) \<sqinter> ?s \<sqinter> ?rr\<^sup>T * i\<^sup>T * i) \<squnion> (-(i * ?rr) \<sqinter> -?s \<sqinter> i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]] = i * (rank[[find_set p0 x]]) \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) \<squnion> - (i * (rank[[find_set p0 x]])) \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> ((rank[[find_set p0 x]])[[i\<^sup>T]]) * i \<squnion> (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> i
[PROOF STEP]
by (smt (z3) conv_dist_comp conv_involutive inf.sup_monoid.add_assoc inf_sup_distrib1 sup_assoc)
[PROOF STATE]
proof (state)
this:
(i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]] = i * (rank[[find_set p0 x]]) \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) \<squnion> - (i * (rank[[find_set p0 x]])) \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> ((rank[[find_set p0 x]])[[i\<^sup>T]]) * i \<squnion> (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> i

goal (3 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 3. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
have 14: "injective ?i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. injective ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]])
[PROOF STEP]
apply (rule update_injective_swap)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. injective i
 2. point (find_set (path_compression p0 x (find_set p0 x)) y)
 3. injective (i * (rank[[find_set p0 x]]))
 4. vector (i * (rank[[find_set p0 x]]))
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. injective i
[PROOF STEP]
using 12
[PROOF STATE]
proof (prove)
using this:
injective i \<and> coreflexive (i[[i]]) \<and> regular i \<and> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (1 subgoal):
 1. injective i
[PROOF STEP]
by simp
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. point (find_set (path_compression p0 x (find_set p0 x)) y)
 2. injective (i * (rank[[find_set p0 x]]))
 3. vector (i * (rank[[find_set p0 x]]))
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. point (find_set (path_compression p0 x (find_set p0 x)) y)
[PROOF STEP]
using 5
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. point (find_set (path_compression p0 x (find_set p0 x)) y)
[PROOF STEP]
by simp
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. injective (i * (rank[[find_set p0 x]]))
 2. vector (i * (rank[[find_set p0 x]]))
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. injective (i * (rank[[find_set p0 x]]))
[PROOF STEP]
using 6 12 injective_mult_closed
[PROOF STATE]
proof (prove)
using this:
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])
injective i \<and> coreflexive (i[[i]]) \<and> regular i \<and> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)
\<lbrakk>injective ?x; injective ?y\<rbrakk> \<Longrightarrow> injective (?x * ?y)

goal (1 subgoal):
 1. injective (i * (rank[[find_set p0 x]]))
[PROOF STEP]
by simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vector (i * (rank[[find_set p0 x]]))
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vector (i * (rank[[find_set p0 x]]))
[PROOF STEP]
using 5 comp_associative
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
?x * ?y * ?z = ?x * (?y * ?z)

goal (1 subgoal):
 1. vector (i * (rank[[find_set p0 x]]))
[PROOF STEP]
by simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
injective ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]])

goal (3 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 3. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
have 15: "univalent ?i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coreflexive (((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]])[[((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]])]])
[PROOF STEP]
apply (rule update_univalent_swap)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. coreflexive (i[[i]])
 2. injective (find_set (path_compression p0 x (find_set p0 x)) y)
 3. vector (find_set (path_compression p0 x (find_set p0 x)) y)
 4. injective (i * (rank[[find_set p0 x]]))
 5. vector (i * (rank[[find_set p0 x]]))
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coreflexive (i[[i]])
[PROOF STEP]
using 12
[PROOF STATE]
proof (prove)
using this:
injective i \<and> coreflexive (i[[i]]) \<and> regular i \<and> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (1 subgoal):
 1. coreflexive (i[[i]])
[PROOF STEP]
by simp
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. injective (find_set (path_compression p0 x (find_set p0 x)) y)
 2. vector (find_set (path_compression p0 x (find_set p0 x)) y)
 3. injective (i * (rank[[find_set p0 x]]))
 4. vector (i * (rank[[find_set p0 x]]))
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. injective (find_set (path_compression p0 x (find_set p0 x)) y)
[PROOF STEP]
using 5
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. injective (find_set (path_compression p0 x (find_set p0 x)) y)
[PROOF STEP]
by simp
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. vector (find_set (path_compression p0 x (find_set p0 x)) y)
 2. injective (i * (rank[[find_set p0 x]]))
 3. vector (i * (rank[[find_set p0 x]]))
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vector (find_set (path_compression p0 x (find_set p0 x)) y)
[PROOF STEP]
using 5
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. vector (find_set (path_compression p0 x (find_set p0 x)) y)
[PROOF STEP]
by simp
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. injective (i * (rank[[find_set p0 x]]))
 2. vector (i * (rank[[find_set p0 x]]))
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. injective (i * (rank[[find_set p0 x]]))
[PROOF STEP]
using 6 12 injective_mult_closed
[PROOF STATE]
proof (prove)
using this:
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])
injective i \<and> coreflexive (i[[i]]) \<and> regular i \<and> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)
\<lbrakk>injective ?x; injective ?y\<rbrakk> \<Longrightarrow> injective (?x * ?y)

goal (1 subgoal):
 1. injective (i * (rank[[find_set p0 x]]))
[PROOF STEP]
by simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vector (i * (rank[[find_set p0 x]]))
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vector (i * (rank[[find_set p0 x]]))
[PROOF STEP]
using 5 comp_associative
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
?x * ?y * ?z = ?x * (?y * ?z)

goal (1 subgoal):
 1. vector (i * (rank[[find_set p0 x]]))
[PROOF STEP]
by simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
coreflexive (((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]])[[((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]])]])

goal (3 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 3. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
have 16: "regular ?i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. regular ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]])
[PROOF STEP]
using 5 6 12
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])
injective i \<and> coreflexive (i[[i]]) \<and> regular i \<and> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (1 subgoal):
 1. regular ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]])
[PROOF STEP]
by (smt (z3) bijective_regular p_dist_inf p_dist_sup pp_dist_comp regular_closed_inf regular_conv_closed)
[PROOF STATE]
proof (state)
this:
regular ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]])

goal (3 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 3. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
have 17: "regular (i * ?rr)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. regular (i * (rank[[find_set p0 x]]))
[PROOF STEP]
using 6 12 bijective_regular regular_mult_closed
[PROOF STATE]
proof (prove)
using this:
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])
injective i \<and> coreflexive (i[[i]]) \<and> regular i \<and> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)
bijective ?x \<Longrightarrow> regular ?x
\<lbrakk>regular ?x; regular ?y\<rbrakk> \<Longrightarrow> regular (?x * ?y)

goal (1 subgoal):
 1. regular (i * (rank[[find_set p0 x]]))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
regular (i * (rank[[find_set p0 x]]))

goal (3 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 3. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
have 18: "find_set_precondition ?p1 y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set_precondition (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
using 2 3 find_set_precondition_def path_compression_postcondition_def path_compression_precondition_def
[PROOF STATE]
proof (prove)
using this:
path_compression_postcondition (path_compression p0 x (find_set p0 x)) x (find_set p0 x) p0
path_compression_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y (find_set (path_compression p0 x (find_set p0 x)) y) (path_compression p0 x (find_set p0 x))
find_set_precondition ?p ?x \<equiv> ((coreflexive (?p[[?p]]) \<and> times_top_class.total ?p) \<and> pd_kleene_allegory_class.acyclic (?p - (1::'a))) \<and> point ?x
path_compression_postcondition ?p ?x ?y ?p0.0 \<equiv> path_compression_precondition ?p ?x ?y \<and> ?p \<sqinter> (1::'a) = ?p0.0 \<sqinter> (1::'a) \<and> fc ?p = fc ?p0.0 \<and> ?p0.0[?p0.0\<^sup>T\<^sup>\<star> * ?x\<longmapsto>?y] = ?p
path_compression_precondition ?p ?x ?y \<equiv> ((coreflexive (?p[[?p]]) \<and> times_top_class.total ?p) \<and> pd_kleene_allegory_class.acyclic (?p - (1::'a))) \<and> point ?x \<and> point ?y \<and> ?y = root ?p ?x

goal (1 subgoal):
 1. find_set_precondition (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
find_set_precondition (path_compression p0 x (find_set p0 x)) y

goal (3 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 3. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
hence "?s = root ?p1 y"
[PROOF STATE]
proof (prove)
using this:
find_set_precondition (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y = root (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
by (meson find_set_function find_set_postcondition_def)
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y = root (path_compression p0 x (find_set p0 x)) y

goal (3 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 3. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y = root (path_compression p0 x (find_set p0 x)) y

goal (3 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 3. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
have "... = root ?p2 y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. root (path_compression p0 x (find_set p0 x)) y = root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y
[PROOF STEP]
using 3 18
[PROOF STATE]
proof (prove)
using this:
path_compression_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y (find_set (path_compression p0 x (find_set p0 x)) y) (path_compression p0 x (find_set p0 x))
find_set_precondition (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. root (path_compression p0 x (find_set p0 x)) y = root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y
[PROOF STEP]
by (smt (z3) find_set_precondition_def path_compression_postcondition_def path_compression_precondition_def same_root)
[PROOF STATE]
proof (state)
this:
root (path_compression p0 x (find_set p0 x)) y = root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y

goal (3 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 3. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
root (path_compression p0 x (find_set p0 x)) y = root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y

goal (3 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 3. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
have "... \<le> roots ?p2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))

goal (3 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 3. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))

goal (3 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 3. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
have "... \<le> i * -(S'\<^sup>+ * rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
using 12
[PROOF STATE]
proof (prove)
using this:
injective i \<and> coreflexive (i[[i]]) \<and> regular i \<and> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (3 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 3. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
find_set (path_compression p0 x (find_set p0 x)) y \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
have 19: "?s \<le> i * -(S'\<^sup>+ * rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (3 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 3. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
have "roots ?p4 \<le> ?i * -(S'\<^sup>+ * ?rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "?r \<le> -?s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set p0 x \<le> - find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
using 5 8
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. find_set p0 x \<le> - find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
by (meson order.antisym bijective_regular point_in_vector_or_complement point_in_vector_or_complement_2)
[PROOF STATE]
proof (state)
this:
find_set p0 x \<le> - find_set (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
hence "?s \<sqinter> ?r\<^sup>T \<sqinter> 1 = bot"
[PROOF STATE]
proof (prove)
using this:
find_set p0 x \<le> - find_set (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T \<sqinter> (1::'a) = bot
[PROOF STEP]
by (metis (full_types) bot_least inf.left_commute inf.sup_monoid.add_commute one_inf_conv pseudo_complement)
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T \<sqinter> (1::'a) = bot

goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
hence "?p4 \<sqinter> 1 \<le> -?s \<sqinter> ?p2"
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T \<sqinter> (1::'a) = bot

goal (1 subgoal):
 1. (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<sqinter> (1::'a) \<le> - find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)
[PROOF STEP]
by (smt (z3) bot_least comp_inf.semiring.distrib_left inf.cobounded2 inf.sup_monoid.add_commute le_supI)
[PROOF STATE]
proof (state)
this:
(path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<sqinter> (1::'a) \<le> - find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
hence "roots ?p4 \<le> roots (-?s \<sqinter> ?p2)"
[PROOF STATE]
proof (prove)
using this:
(path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<sqinter> (1::'a) \<le> - find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> roots (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))
[PROOF STEP]
by (simp add: mult_left_isotone)
[PROOF STATE]
proof (state)
this:
roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> roots (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))

goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> roots (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))

goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = -?s \<sqinter> roots ?p2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. roots (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) = - find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))
[PROOF STEP]
using 5 inf_assoc vector_complement_closed vector_inf_comp
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
?x \<sqinter> ?y \<sqinter> ?z = ?x \<sqinter> (?y \<sqinter> ?z)
vector ?x \<Longrightarrow> vector (- ?x)
vector ?x \<Longrightarrow> (?x \<sqinter> ?y) * ?z = ?x \<sqinter> ?y * ?z

goal (1 subgoal):
 1. roots (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) = - find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
roots (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) = - find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))

goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
roots (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) = - find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))

goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = (i * ?rr \<sqinter> -?s \<sqinter> roots ?p2) \<squnion> (-(i * ?rr) \<sqinter> -?s \<sqinter> roots ?p2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) = (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<squnion> (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))
[PROOF STEP]
using 17
[PROOF STATE]
proof (prove)
using this:
regular (i * (rank[[find_set p0 x]]))

goal (1 subgoal):
 1. - find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) = (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<squnion> (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))
[PROOF STEP]
by (smt (z3) comp_inf.star_plus inf_sup_distrib2 inf_top.right_neutral regular_complement_top)
[PROOF STATE]
proof (state)
this:
- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) = (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<squnion> (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))

goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) = (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<squnion> (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))

goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> ?i * (-(S'\<^sup>+ * ?rank\<^sup>T * top))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<squnion> (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
proof (rule sup_least)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "?rank\<^sup>T * top = (?r \<sqinter> (S'\<^sup>T * ?rs)\<^sup>T)\<^sup>T * top \<squnion> (-?r \<sqinter> rank)\<^sup>T * top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])[[top]] = (find_set p0 x \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])\<^sup>T)[[top]] \<squnion> ((- find_set p0 x \<sqinter> rank)[[top]])
[PROOF STEP]
using conv_dist_sup mult_right_dist_sup
[PROOF STATE]
proof (prove)
using this:
(?x \<squnion> ?y)\<^sup>T = ?x\<^sup>T \<squnion> ?y\<^sup>T
(?x \<squnion> ?y) * ?z = ?x * ?z \<squnion> ?y * ?z

goal (1 subgoal):
 1. (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])[[top]] = (find_set p0 x \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])\<^sup>T)[[top]] \<squnion> ((- find_set p0 x \<sqinter> rank)[[top]])
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])[[top]] = (find_set p0 x \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])\<^sup>T)[[top]] \<squnion> ((- find_set p0 x \<sqinter> rank)[[top]])

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])[[top]] = (find_set p0 x \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])\<^sup>T)[[top]] \<squnion> ((- find_set p0 x \<sqinter> rank)[[top]])

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = (?r\<^sup>T \<sqinter> S'\<^sup>T * ?rs) * top \<squnion> (-?r\<^sup>T \<sqinter> rank\<^sup>T) * top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set p0 x \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])\<^sup>T)[[top]] \<squnion> ((- find_set p0 x \<sqinter> rank)[[top]]) = (find_set p0 x\<^sup>T \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])) * top \<squnion> (- find_set p0 x\<^sup>T \<sqinter> rank\<^sup>T) * top
[PROOF STEP]
using conv_complement conv_dist_inf conv_involutive
[PROOF STATE]
proof (prove)
using this:
(- ?x)\<^sup>T = - ?x\<^sup>T
(?x \<sqinter> ?y)\<^sup>T = ?x\<^sup>T \<sqinter> ?y\<^sup>T
?x\<^sup>T\<^sup>T = ?x

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])\<^sup>T)[[top]] \<squnion> ((- find_set p0 x \<sqinter> rank)[[top]]) = (find_set p0 x\<^sup>T \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])) * top \<squnion> (- find_set p0 x\<^sup>T \<sqinter> rank\<^sup>T) * top
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(find_set p0 x \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])\<^sup>T)[[top]] \<squnion> ((- find_set p0 x \<sqinter> rank)[[top]]) = (find_set p0 x\<^sup>T \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])) * top \<squnion> (- find_set p0 x\<^sup>T \<sqinter> rank\<^sup>T) * top

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(find_set p0 x \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])\<^sup>T)[[top]] \<squnion> ((- find_set p0 x \<sqinter> rank)[[top]]) = (find_set p0 x\<^sup>T \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])) * top \<squnion> (- find_set p0 x\<^sup>T \<sqinter> rank\<^sup>T) * top

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = S'\<^sup>T * ?rs * (?r \<sqinter> top) \<squnion> (-?r\<^sup>T \<sqinter> rank\<^sup>T) * top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set p0 x\<^sup>T \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])) * top \<squnion> (- find_set p0 x\<^sup>T \<sqinter> rank\<^sup>T) * top = (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * (find_set p0 x \<sqinter> top) \<squnion> (- find_set p0 x\<^sup>T \<sqinter> rank\<^sup>T) * top
[PROOF STEP]
using 5
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. (find_set p0 x\<^sup>T \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])) * top \<squnion> (- find_set p0 x\<^sup>T \<sqinter> rank\<^sup>T) * top = (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * (find_set p0 x \<sqinter> top) \<squnion> (- find_set p0 x\<^sup>T \<sqinter> rank\<^sup>T) * top
[PROOF STEP]
by (smt (z3) covector_inf_comp_3 inf_commute)
[PROOF STATE]
proof (state)
this:
(find_set p0 x\<^sup>T \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])) * top \<squnion> (- find_set p0 x\<^sup>T \<sqinter> rank\<^sup>T) * top = (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * (find_set p0 x \<sqinter> top) \<squnion> (- find_set p0 x\<^sup>T \<sqinter> rank\<^sup>T) * top

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(find_set p0 x\<^sup>T \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])) * top \<squnion> (- find_set p0 x\<^sup>T \<sqinter> rank\<^sup>T) * top = (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * (find_set p0 x \<sqinter> top) \<squnion> (- find_set p0 x\<^sup>T \<sqinter> rank\<^sup>T) * top

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = S'\<^sup>T * ?rs * (?r \<sqinter> top) \<squnion> rank\<^sup>T * (-?r \<sqinter> top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * (find_set p0 x \<sqinter> top) \<squnion> (- find_set p0 x\<^sup>T \<sqinter> rank\<^sup>T) * top = (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * (find_set p0 x \<sqinter> top) \<squnion> (rank[[- find_set p0 x \<sqinter> top]])
[PROOF STEP]
using 5
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * (find_set p0 x \<sqinter> top) \<squnion> (- find_set p0 x\<^sup>T \<sqinter> rank\<^sup>T) * top = (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * (find_set p0 x \<sqinter> top) \<squnion> (rank[[- find_set p0 x \<sqinter> top]])
[PROOF STEP]
by (smt (z3) conv_complement vector_complement_closed covector_inf_comp_3 inf_commute)
[PROOF STATE]
proof (state)
this:
(S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * (find_set p0 x \<sqinter> top) \<squnion> (- find_set p0 x\<^sup>T \<sqinter> rank\<^sup>T) * top = (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * (find_set p0 x \<sqinter> top) \<squnion> (rank[[- find_set p0 x \<sqinter> top]])

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * (find_set p0 x \<sqinter> top) \<squnion> (- find_set p0 x\<^sup>T \<sqinter> rank\<^sup>T) * top = (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * (find_set p0 x \<sqinter> top) \<squnion> (rank[[- find_set p0 x \<sqinter> top]])

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = S'\<^sup>T * ?rs * ?r \<squnion> rank\<^sup>T * -?r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * (find_set p0 x \<sqinter> top) \<squnion> (rank[[- find_set p0 x \<sqinter> top]]) = (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * find_set p0 x \<squnion> (rank[[- find_set p0 x]])
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * (find_set p0 x \<sqinter> top) \<squnion> (rank[[- find_set p0 x \<sqinter> top]]) = (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * find_set p0 x \<squnion> (rank[[- find_set p0 x]])

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * (find_set p0 x \<sqinter> top) \<squnion> (rank[[- find_set p0 x \<sqinter> top]]) = (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * find_set p0 x \<squnion> (rank[[- find_set p0 x]])

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> S'\<^sup>T * ?rs * ?r \<squnion> rank\<^sup>T * top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * find_set p0 x \<squnion> (rank[[- find_set p0 x]]) \<le> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * find_set p0 x \<squnion> (rank[[top]])
[PROOF STEP]
using mult_right_isotone sup_right_isotone
[PROOF STATE]
proof (prove)
using this:
?x \<le> ?y \<Longrightarrow> ?z * ?x \<le> ?z * ?y
?x \<le> ?y \<Longrightarrow> ?z \<squnion> ?x \<le> ?z \<squnion> ?y

goal (1 subgoal):
 1. (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * find_set p0 x \<squnion> (rank[[- find_set p0 x]]) \<le> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * find_set p0 x \<squnion> (rank[[top]])
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
(S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * find_set p0 x \<squnion> (rank[[- find_set p0 x]]) \<le> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * find_set p0 x \<squnion> (rank[[top]])

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * find_set p0 x \<squnion> (rank[[- find_set p0 x]]) \<le> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * find_set p0 x \<squnion> (rank[[top]])

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> S'\<^sup>T * ?rs \<squnion> rank\<^sup>T * top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * find_set p0 x \<squnion> (rank[[top]]) \<le> S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]] \<squnion> (rank[[top]])
[PROOF STEP]
using 5 6
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])

goal (1 subgoal):
 1. (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * find_set p0 x \<squnion> (rank[[top]]) \<le> S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]] \<squnion> (rank[[top]])
[PROOF STEP]
by (metis inf.eq_refl mult_assoc)
[PROOF STATE]
proof (state)
this:
(S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]) * find_set p0 x \<squnion> (rank[[top]]) \<le> S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]] \<squnion> (rank[[top]])

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])[[top]] \<le> S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]] \<squnion> (rank[[top]])
[PROOF STEP]
have "S'\<^sup>+ * ?rank\<^sup>T * top \<le> S'\<^sup>+ * S'\<^sup>T * ?rs \<squnion> S'\<^sup>+ * rank\<^sup>T * top"
[PROOF STATE]
proof (prove)
using this:
(rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])[[top]] \<le> S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]] \<squnion> (rank[[top]])

goal (1 subgoal):
 1. S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top \<le> S'\<^sup>+ * S'\<^sup>T * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top
[PROOF STEP]
by (smt comp_associative mult_left_dist_sup mult_right_isotone)
[PROOF STATE]
proof (state)
this:
S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top \<le> S'\<^sup>+ * S'\<^sup>T * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top \<le> S'\<^sup>+ * S'\<^sup>T * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = S'\<^sup>\<star> * (S' * S'\<^sup>T) * ?rs \<squnion> S'\<^sup>+ * rank\<^sup>T * top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S'\<^sup>+ * S'\<^sup>T * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top = S'\<^sup>\<star> * (S' * S'\<^sup>T) * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top
[PROOF STEP]
by (smt star_plus mult_assoc)
[PROOF STATE]
proof (state)
this:
S'\<^sup>+ * S'\<^sup>T * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top = S'\<^sup>\<star> * (S' * S'\<^sup>T) * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
S'\<^sup>+ * S'\<^sup>T * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top = S'\<^sup>\<star> * (S' * S'\<^sup>T) * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> S'\<^sup>\<star> * ?rs \<squnion> S'\<^sup>+ * rank\<^sup>T * top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S'\<^sup>\<star> * (S' * S'\<^sup>T) * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top \<le> S'\<^sup>\<star> * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top
[PROOF STEP]
by (metis S'_injective comp_right_one mult_left_isotone mult_right_isotone sup_left_isotone)
[PROOF STATE]
proof (state)
this:
S'\<^sup>\<star> * (S' * S'\<^sup>T) * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top \<le> S'\<^sup>\<star> * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
S'\<^sup>\<star> * (S' * S'\<^sup>T) * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top \<le> S'\<^sup>\<star> * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = ?rs \<squnion> S'\<^sup>+ * ?rs \<squnion> S'\<^sup>+ * rank\<^sup>T * top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S'\<^sup>\<star> * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top
[PROOF STEP]
using comp_associative star.circ_loop_fixpoint sup_commute
[PROOF STATE]
proof (prove)
using this:
?x * ?y * ?z = ?x * (?y * ?z)
?y * (?y\<^sup>\<star> * ?z) \<squnion> ?z = ?y\<^sup>\<star> * ?z
?x \<squnion> ?y = ?y \<squnion> ?x

goal (1 subgoal):
 1. S'\<^sup>\<star> * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
S'\<^sup>\<star> * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
S'\<^sup>\<star> * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = ?rs \<squnion> S'\<^sup>+ * rank\<^sup>T * top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top
[PROOF STEP]
by (smt (verit, del_insts) comp_associative mult_left_dist_sup sup.orderE sup_assoc sup_commute top.extremum)
[PROOF STATE]
proof (state)
this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<squnion> S'\<^sup>+ * rank\<^sup>T * top = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top \<le> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top
[PROOF STEP]
have 20: "S'\<^sup>+ * ?rank\<^sup>T * top \<le> ?rs \<squnion> S'\<^sup>+ * rank\<^sup>T * top"
[PROOF STATE]
proof (prove)
using this:
S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top \<le> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top

goal (1 subgoal):
 1. S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top \<le> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top \<le> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "?s * ?s\<^sup>T = (?s \<sqinter> i * -(S'\<^sup>+ * rank\<^sup>T * top)) * ?s\<^sup>T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T
[PROOF STEP]
using 19 inf.orderE
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)
\<lbrakk>?a \<le> ?b; ?a = ?a \<sqinter> ?b \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = (?s \<sqinter> i * -(S'\<^sup>+ * rank\<^sup>T * top)) * top \<sqinter> ?s\<^sup>T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) * top \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T
[PROOF STEP]
using 5
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) * top \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T
[PROOF STEP]
by (smt (z3) covector_comp_inf vector_conv_covector vector_covector vector_top_closed)
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) * top \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) * top \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = ?s \<sqinter> i * -(S'\<^sup>+ * rank\<^sup>T * top) * top \<sqinter> ?s\<^sup>T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) * top \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T = find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) * top \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T
[PROOF STEP]
using 5 vector_inf_comp
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
vector ?x \<Longrightarrow> (?x \<sqinter> ?y) * ?z = ?x \<sqinter> ?y * ?z

goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) * top \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T = find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) * top \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) * top \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T = find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) * top \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) * top \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T = find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) * top \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> 1 \<sqinter> i * -(S'\<^sup>+ * rank\<^sup>T * top) * top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) * top \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T \<le> (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) * top
[PROOF STEP]
using 5
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) * top \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T \<le> (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) * top
[PROOF STEP]
by (smt (verit, ccfv_SIG) inf.cobounded1 inf.cobounded2 inf_greatest order_trans vector_covector)
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) * top \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T \<le> (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) * top

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) * top \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T \<le> (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) * top

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = 1 \<sqinter> i * -(S'\<^sup>+ * rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) * top = (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
using comp_associative vector_complement_closed vector_top_closed
[PROOF STATE]
proof (prove)
using this:
?x * ?y * ?z = ?x * (?y * ?z)
vector ?x \<Longrightarrow> vector (- ?x)
surjective top

goal (1 subgoal):
 1. (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) * top = (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) * top = (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) * top = (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> 1 \<sqinter> i * -(S'\<^sup>+ * rank\<^sup>T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T)
[PROOF STEP]
by (meson comp_inf.mult_right_isotone mult_right_isotone p_antitone top_right_mult_increasing)
[PROOF STATE]
proof (state)
this:
(1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> 1 \<sqinter> i * S'\<^sup>\<star>\<^sup>T * rank\<^sup>T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T) \<le> (1::'a) \<sqinter> i * S'\<^sup>\<star>\<^sup>T * rank\<^sup>T
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T) \<le> (1::'a) \<sqinter> i * S'\<^sup>\<star>\<^sup>T * rank\<^sup>T
[PROOF STEP]
have "S'\<^sup>\<star>\<^sup>T * rank\<^sup>T \<squnion> S'\<^sup>+ * rank\<^sup>T = (S'\<^sup>T\<^sup>\<star> \<squnion> S'\<^sup>+) * rank\<^sup>T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S'\<^sup>\<star>[[rank\<^sup>T]] \<squnion> S'\<^sup>+ * rank\<^sup>T = (S'\<^sup>T\<^sup>\<star> \<squnion> S'\<^sup>+) * rank\<^sup>T
[PROOF STEP]
by (simp add: conv_star_commute mult_right_dist_sup)
[PROOF STATE]
proof (state)
this:
S'\<^sup>\<star>[[rank\<^sup>T]] \<squnion> S'\<^sup>+ * rank\<^sup>T = (S'\<^sup>T\<^sup>\<star> \<squnion> S'\<^sup>+) * rank\<^sup>T

goal (1 subgoal):
 1. (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T) \<le> (1::'a) \<sqinter> i * S'\<^sup>\<star>\<^sup>T * rank\<^sup>T
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
S'\<^sup>\<star>[[rank\<^sup>T]] \<squnion> S'\<^sup>+ * rank\<^sup>T = (S'\<^sup>T\<^sup>\<star> \<squnion> S'\<^sup>+) * rank\<^sup>T

goal (1 subgoal):
 1. (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T) \<le> (1::'a) \<sqinter> i * S'\<^sup>\<star>\<^sup>T * rank\<^sup>T
[PROOF STEP]
have "... = (S'\<^sup>T\<^sup>\<star> \<squnion> S'\<^sup>\<star>) * rank\<^sup>T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (S'\<^sup>T\<^sup>\<star> \<squnion> S'\<^sup>+) * rank\<^sup>T = (S'\<^sup>T\<^sup>\<star> \<squnion> S'\<^sup>\<star>) * rank\<^sup>T
[PROOF STEP]
by (smt (z3) comp_associative semiring.distrib_right star.circ_loop_fixpoint sup.left_commute sup_commute sup_idem)
[PROOF STATE]
proof (state)
this:
(S'\<^sup>T\<^sup>\<star> \<squnion> S'\<^sup>+) * rank\<^sup>T = (S'\<^sup>T\<^sup>\<star> \<squnion> S'\<^sup>\<star>) * rank\<^sup>T

goal (1 subgoal):
 1. (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T) \<le> (1::'a) \<sqinter> i * S'\<^sup>\<star>\<^sup>T * rank\<^sup>T
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(S'\<^sup>T\<^sup>\<star> \<squnion> S'\<^sup>+) * rank\<^sup>T = (S'\<^sup>T\<^sup>\<star> \<squnion> S'\<^sup>\<star>) * rank\<^sup>T

goal (1 subgoal):
 1. (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T) \<le> (1::'a) \<sqinter> i * S'\<^sup>\<star>\<^sup>T * rank\<^sup>T
[PROOF STEP]
have "... = top * rank\<^sup>T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (S'\<^sup>T\<^sup>\<star> \<squnion> S'\<^sup>\<star>) * rank\<^sup>T = top * rank\<^sup>T
[PROOF STEP]
by (simp add: S'_star_connex sup_commute)
[PROOF STATE]
proof (state)
this:
(S'\<^sup>T\<^sup>\<star> \<squnion> S'\<^sup>\<star>) * rank\<^sup>T = top * rank\<^sup>T

goal (1 subgoal):
 1. (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T) \<le> (1::'a) \<sqinter> i * S'\<^sup>\<star>\<^sup>T * rank\<^sup>T
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(S'\<^sup>T\<^sup>\<star> \<squnion> S'\<^sup>\<star>) * rank\<^sup>T = top * rank\<^sup>T

goal (1 subgoal):
 1. (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T) \<le> (1::'a) \<sqinter> i * S'\<^sup>\<star>\<^sup>T * rank\<^sup>T
[PROOF STEP]
have "... = top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. surjective (rank\<^sup>T)
[PROOF STEP]
using 4 rank_property_def total_conv_surjective
[PROOF STATE]
proof (prove)
using this:
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank
rank_property ?p ?rank \<equiv> (coreflexive (?rank[[?rank]]) \<and> times_top_class.total ?rank) \<and> (?p - (1::'a)) * ?rank \<le> ?rank * S'\<^sup>+ \<and> card_less_eq (roots ?p) (- (S'\<^sup>+ * ?rank\<^sup>T * top))
times_top_class.total ?x = surjective (?x\<^sup>T)

goal (1 subgoal):
 1. surjective (rank\<^sup>T)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
surjective (rank\<^sup>T)

goal (1 subgoal):
 1. (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T) \<le> (1::'a) \<sqinter> i * S'\<^sup>\<star>\<^sup>T * rank\<^sup>T
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
S'\<^sup>\<star>[[rank\<^sup>T]] \<squnion> S'\<^sup>+ * rank\<^sup>T = top
[PROOF STEP]
have "-(S'\<^sup>+ * rank\<^sup>T) \<le> S'\<^sup>\<star>\<^sup>T * rank\<^sup>T"
[PROOF STATE]
proof (prove)
using this:
S'\<^sup>\<star>[[rank\<^sup>T]] \<squnion> S'\<^sup>+ * rank\<^sup>T = top

goal (1 subgoal):
 1. - (S'\<^sup>+ * rank\<^sup>T) \<le> S'\<^sup>\<star>[[rank\<^sup>T]]
[PROOF STEP]
by (metis half_shunting inf.idem top_greatest)
[PROOF STATE]
proof (state)
this:
- (S'\<^sup>+ * rank\<^sup>T) \<le> S'\<^sup>\<star>[[rank\<^sup>T]]

goal (1 subgoal):
 1. (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T) \<le> (1::'a) \<sqinter> i * S'\<^sup>\<star>\<^sup>T * rank\<^sup>T
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
- (S'\<^sup>+ * rank\<^sup>T) \<le> S'\<^sup>\<star>[[rank\<^sup>T]]

goal (1 subgoal):
 1. (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T) \<le> (1::'a) \<sqinter> i * S'\<^sup>\<star>\<^sup>T * rank\<^sup>T
[PROOF STEP]
using comp_associative inf.sup_right_isotone mult_right_isotone
[PROOF STATE]
proof (prove)
using this:
- (S'\<^sup>+ * rank\<^sup>T) \<le> S'\<^sup>\<star>[[rank\<^sup>T]]
?x * ?y * ?z = ?x * (?y * ?z)
?y \<le> ?x \<Longrightarrow> ?z \<sqinter> ?y \<le> ?z \<sqinter> ?x
?x \<le> ?y \<Longrightarrow> ?z * ?x \<le> ?z * ?y

goal (1 subgoal):
 1. (1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T) \<le> (1::'a) \<sqinter> i * S'\<^sup>\<star>\<^sup>T * rank\<^sup>T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T) \<le> (1::'a) \<sqinter> i * S'\<^sup>\<star>\<^sup>T * rank\<^sup>T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T) \<le> (1::'a) \<sqinter> i * S'\<^sup>\<star>\<^sup>T * rank\<^sup>T

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(1::'a) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T) \<le> (1::'a) \<sqinter> i * S'\<^sup>\<star>\<^sup>T * rank\<^sup>T

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = 1 \<sqinter> rank * S'\<^sup>\<star> * i\<^sup>T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) \<sqinter> i * S'\<^sup>\<star>\<^sup>T * rank\<^sup>T = (1::'a) \<sqinter> rank * S'\<^sup>\<star> * i\<^sup>T
[PROOF STEP]
by (metis comp_associative conv_dist_comp conv_involutive one_inf_conv)
[PROOF STATE]
proof (state)
this:
(1::'a) \<sqinter> i * S'\<^sup>\<star>\<^sup>T * rank\<^sup>T = (1::'a) \<sqinter> rank * S'\<^sup>\<star> * i\<^sup>T

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(1::'a) \<sqinter> i * S'\<^sup>\<star>\<^sup>T * rank\<^sup>T = (1::'a) \<sqinter> rank * S'\<^sup>\<star> * i\<^sup>T

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> rank * S'\<^sup>\<star> * i\<^sup>T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) \<sqinter> rank * S'\<^sup>\<star> * i\<^sup>T \<le> rank * S'\<^sup>\<star> * i\<^sup>T
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(1::'a) \<sqinter> rank * S'\<^sup>\<star> * i\<^sup>T \<le> rank * S'\<^sup>\<star> * i\<^sup>T

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
find_set (path_compression p0 x (find_set p0 x)) y * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T \<le> rank * S'\<^sup>\<star> * i\<^sup>T
[PROOF STEP]
have "?s \<le> rank * S'\<^sup>\<star> * i\<^sup>T * ?s"
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T \<le> rank * S'\<^sup>\<star> * i\<^sup>T

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y \<le> rank * S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
using 5 shunt_bijective
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T \<le> rank * S'\<^sup>\<star> * i\<^sup>T
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
bijective ?z \<Longrightarrow> (?x \<le> ?y * ?z) = (?x * ?z\<^sup>T \<le> ?y)

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y \<le> rank * S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y \<le> rank * S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
hence "?rs \<le> S'\<^sup>\<star> * i\<^sup>T * ?s"
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y \<le> rank * S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
using 4 shunt_mapping comp_associative rank_property_def
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y \<le> rank * S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank
coreflexive (?z[[?z]]) \<and> times_top_class.total ?z \<Longrightarrow> (?x \<le> ?z * ?y) = (?z[[?x]] \<le> ?y)
?x * ?y * ?z = ?x * (?y * ?z)
rank_property ?p ?rank \<equiv> (coreflexive (?rank[[?rank]]) \<and> times_top_class.total ?rank) \<and> (?p - (1::'a)) * ?rank \<le> ?rank * S'\<^sup>+ \<and> card_less_eq (roots ?p) (- (S'\<^sup>+ * ?rank\<^sup>T * top))

goal (1 subgoal):
 1. rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
hence "?s * (i * ?rr \<sqinter> -?s \<sqinter> roots ?p2) \<le> ?s * (i * S'\<^sup>\<star> * i\<^sup>T * ?s \<sqinter> -?s \<sqinter> roots ?p2)"
[PROOF STATE]
proof (prove)
using this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * ((i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)))
[PROOF STEP]
using 11 comp_associative comp_inf.mult_left_isotone comp_isotone inf.eq_refl
[PROOF STATE]
proof (prove)
using this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]]
?x * ?y * ?z = ?x * (?y * ?z)
?x \<le> ?y \<Longrightarrow> ?x \<sqinter> ?z \<le> ?y \<sqinter> ?z
\<lbrakk>?x \<le> ?y; ?w \<le> ?z\<rbrakk> \<Longrightarrow> ?x * ?w \<le> ?y * ?z
?x = ?y \<Longrightarrow> ?y \<le> ?x

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * ((i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * ((i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)))

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * ((i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)))

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = ?s * ((i * S'\<^sup>+ * i\<^sup>T * ?s \<squnion> i * i\<^sup>T * ?s) \<sqinter> -?s \<sqinter> roots ?p2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) = find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> i * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)))
[PROOF STEP]
by (metis comp_associative mult_left_dist_sup star.circ_loop_fixpoint)
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) = find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> i * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)))

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) = find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> i * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)))

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> ?s * ((i * S'\<^sup>+ * i\<^sup>T * ?s \<squnion> 1 * ?s) \<sqinter> -?s \<sqinter> roots ?p2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> i * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (1::'a) * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)))
[PROOF STEP]
using 12
[PROOF STATE]
proof (prove)
using this:
injective i \<and> coreflexive (i[[i]]) \<and> regular i \<and> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> i * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (1::'a) * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)))
[PROOF STEP]
by (metis mult_left_isotone sup_right_isotone comp_inf.mult_left_isotone mult_right_isotone)
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> i * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (1::'a) * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)))

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> i * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (1::'a) * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)))

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = ?s * (i * S'\<^sup>+ * i\<^sup>T * ?s \<sqinter> -?s \<sqinter> roots ?p2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (1::'a) * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) = find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)))
[PROOF STEP]
using comp_inf.comp_right_dist_sup
[PROOF STATE]
proof (prove)
using this:
(?x \<squnion> ?y) \<sqinter> ?z = ?x \<sqinter> ?z \<squnion> ?y \<sqinter> ?z

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (1::'a) * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) = find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (1::'a) * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) = find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)))

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (1::'a) * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) = find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)))

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> ?s * (i * S'\<^sup>+ * i\<^sup>T * ?s \<sqinter> roots ?p2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)))
[PROOF STEP]
using comp_inf.mult_left_isotone inf.cobounded1 mult_right_isotone
[PROOF STATE]
proof (prove)
using this:
?x \<le> ?y \<Longrightarrow> ?x \<sqinter> ?z \<le> ?y \<sqinter> ?z
?a \<sqinter> ?b \<le> ?a
?x \<le> ?y \<Longrightarrow> ?z * ?x \<le> ?z * ?y

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)))

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * ((i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)))

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> ?s * (i * S'\<^sup>+ * i\<^sup>T * ?s \<sqinter> i * -(S'\<^sup>+ * rank\<^sup>T * top))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
using 12 comp_inf.mult_right_isotone mult_right_isotone
[PROOF STATE]
proof (prove)
using this:
injective i \<and> coreflexive (i[[i]]) \<and> regular i \<and> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)
?x \<le> ?y \<Longrightarrow> ?z \<sqinter> ?x \<le> ?z \<sqinter> ?y
?x \<le> ?y \<Longrightarrow> ?z * ?x \<le> ?z * ?y

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top))

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top))

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = ?s * (i * S'\<^sup>+ * i\<^sup>T * ?s \<sqinter> i) * -(S'\<^sup>+ * rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) = find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i) * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
using 5
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) = find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i) * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
by (simp add: comp_associative vector_inf_comp)
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) = find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i) * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)) = find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i) * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = (?s \<sqinter> (i * S'\<^sup>+ * i\<^sup>T * ?s)\<^sup>T) * i * -(S'\<^sup>+ * rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i) * - (S'\<^sup>+ * rank\<^sup>T * top) = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y)\<^sup>T) * i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
using 5 covector_inf_comp_3 mult_assoc
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
vector ?x \<Longrightarrow> (?y \<sqinter> ?x\<^sup>T) * ?z = ?y * (?x \<sqinter> ?z)
?a * ?b * ?c = ?a * (?b * ?c)

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i) * - (S'\<^sup>+ * rank\<^sup>T * top) = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y)\<^sup>T) * i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i) * - (S'\<^sup>+ * rank\<^sup>T * top) = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y)\<^sup>T) * i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> i) * - (S'\<^sup>+ * rank\<^sup>T * top) = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y)\<^sup>T) * i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = (?s \<sqinter> ?s\<^sup>T * i * S'\<^sup>+\<^sup>T * i\<^sup>T) * i * -(S'\<^sup>+ * rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y)\<^sup>T) * i * - (S'\<^sup>+ * rank\<^sup>T * top) = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) * S'\<^sup>+\<^sup>T * i\<^sup>T) * i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
using conv_dist_comp conv_involutive mult_assoc
[PROOF STATE]
proof (prove)
using this:
(?x * ?y)\<^sup>T = ?y[[?x\<^sup>T]]
?x\<^sup>T\<^sup>T = ?x
?a * ?b * ?c = ?a * (?b * ?c)

goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y)\<^sup>T) * i * - (S'\<^sup>+ * rank\<^sup>T * top) = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) * S'\<^sup>+\<^sup>T * i\<^sup>T) * i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y)\<^sup>T) * i * - (S'\<^sup>+ * rank\<^sup>T * top) = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) * S'\<^sup>+\<^sup>T * i\<^sup>T) * i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (i * S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y)\<^sup>T) * i * - (S'\<^sup>+ * rank\<^sup>T * top) = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) * S'\<^sup>+\<^sup>T * i\<^sup>T) * i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = (?s \<sqinter> ?s\<^sup>T) * i * S'\<^sup>+\<^sup>T * i\<^sup>T * i * -(S'\<^sup>+ * rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) * S'\<^sup>+\<^sup>T * i\<^sup>T) * i * - (S'\<^sup>+ * rank\<^sup>T * top) = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T) * i * S'\<^sup>+\<^sup>T * i\<^sup>T * i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
using 5 vector_inf_comp
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
vector ?x \<Longrightarrow> (?x \<sqinter> ?y) * ?z = ?x \<sqinter> ?y * ?z

goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) * S'\<^sup>+\<^sup>T * i\<^sup>T) * i * - (S'\<^sup>+ * rank\<^sup>T * top) = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T) * i * S'\<^sup>+\<^sup>T * i\<^sup>T * i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) * S'\<^sup>+\<^sup>T * i\<^sup>T) * i * - (S'\<^sup>+ * rank\<^sup>T * top) = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T) * i * S'\<^sup>+\<^sup>T * i\<^sup>T * i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) * S'\<^sup>+\<^sup>T * i\<^sup>T) * i * - (S'\<^sup>+ * rank\<^sup>T * top) = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T) * i * S'\<^sup>+\<^sup>T * i\<^sup>T * i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> i * S'\<^sup>+\<^sup>T * i\<^sup>T * i * -(S'\<^sup>+ * rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T) * i * S'\<^sup>+\<^sup>T * i\<^sup>T * i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * S'\<^sup>+\<^sup>T * i\<^sup>T * i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
using 5
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T) * i * S'\<^sup>+\<^sup>T * i\<^sup>T * i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * S'\<^sup>+\<^sup>T * i\<^sup>T * i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
by (metis point_antisymmetric mult_left_isotone mult_left_one)
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T) * i * S'\<^sup>+\<^sup>T * i\<^sup>T * i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * S'\<^sup>+\<^sup>T * i\<^sup>T * i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T) * i * S'\<^sup>+\<^sup>T * i\<^sup>T * i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * S'\<^sup>+\<^sup>T * i\<^sup>T * i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> i * S'\<^sup>+\<^sup>T * -(S'\<^sup>+ * rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i * S'\<^sup>+\<^sup>T * i\<^sup>T * i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * S'\<^sup>+\<^sup>T * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
using 12
[PROOF STATE]
proof (prove)
using this:
injective i \<and> coreflexive (i[[i]]) \<and> regular i \<and> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (1 subgoal):
 1. i * S'\<^sup>+\<^sup>T * i\<^sup>T * i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * S'\<^sup>+\<^sup>T * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
by (smt mult_left_isotone mult_right_isotone mult_assoc comp_right_one)
[PROOF STATE]
proof (state)
this:
i * S'\<^sup>+\<^sup>T * i\<^sup>T * i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * S'\<^sup>+\<^sup>T * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
i * S'\<^sup>+\<^sup>T * i\<^sup>T * i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * S'\<^sup>+\<^sup>T * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> i * -(S'\<^sup>\<star> * rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i * S'\<^sup>+\<^sup>T * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (S'\<^sup>\<star> * rank\<^sup>T * top)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. i * S'\<^sup>+\<^sup>T * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (S'\<^sup>\<star> * rank\<^sup>T * top)
[PROOF STEP]
have "S'\<^sup>+ * S'\<^sup>\<star> * rank\<^sup>T * top \<le> S'\<^sup>+ * rank\<^sup>T * top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S'\<^sup>+ * S'\<^sup>\<star> * rank\<^sup>T * top \<le> S'\<^sup>+ * rank\<^sup>T * top
[PROOF STEP]
by (simp add: comp_associative star.circ_transitive_equal)
[PROOF STATE]
proof (state)
this:
S'\<^sup>+ * S'\<^sup>\<star> * rank\<^sup>T * top \<le> S'\<^sup>+ * rank\<^sup>T * top

goal (1 subgoal):
 1. i * S'\<^sup>+\<^sup>T * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (S'\<^sup>\<star> * rank\<^sup>T * top)
[PROOF STEP]
hence "S'\<^sup>+\<^sup>T * -(S'\<^sup>+ * rank\<^sup>T * top) \<le> -(S'\<^sup>\<star> * rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
using this:
S'\<^sup>+ * S'\<^sup>\<star> * rank\<^sup>T * top \<le> S'\<^sup>+ * rank\<^sup>T * top

goal (1 subgoal):
 1. S'\<^sup>+[[- (S'\<^sup>+ * rank\<^sup>T * top)]] \<le> - (S'\<^sup>\<star> * rank\<^sup>T * top)
[PROOF STEP]
by (smt (verit, ccfv_SIG) comp_associative conv_complement_sub_leq mult_right_isotone order.trans p_antitone)
[PROOF STATE]
proof (state)
this:
S'\<^sup>+[[- (S'\<^sup>+ * rank\<^sup>T * top)]] \<le> - (S'\<^sup>\<star> * rank\<^sup>T * top)

goal (1 subgoal):
 1. i * S'\<^sup>+\<^sup>T * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (S'\<^sup>\<star> * rank\<^sup>T * top)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
S'\<^sup>+[[- (S'\<^sup>+ * rank\<^sup>T * top)]] \<le> - (S'\<^sup>\<star> * rank\<^sup>T * top)

goal (1 subgoal):
 1. i * S'\<^sup>+\<^sup>T * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (S'\<^sup>\<star> * rank\<^sup>T * top)
[PROOF STEP]
by (simp add: comp_associative mult_right_isotone)
[PROOF STATE]
proof (state)
this:
i * S'\<^sup>+\<^sup>T * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (S'\<^sup>\<star> * rank\<^sup>T * top)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
i * S'\<^sup>+\<^sup>T * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (S'\<^sup>\<star> * rank\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
i * S'\<^sup>+\<^sup>T * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (S'\<^sup>\<star> * rank\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> i * -(S'\<^sup>+ * ?rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i * - (S'\<^sup>\<star> * rank\<^sup>T * top) \<le> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. i * - (S'\<^sup>\<star> * rank\<^sup>T * top) \<le> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "S'\<^sup>+ * ?rank\<^sup>T * top \<le> ?rs \<squnion> S'\<^sup>+ * rank\<^sup>T * top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top \<le> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top
[PROOF STEP]
using 20
[PROOF STATE]
proof (prove)
using this:
S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top \<le> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top

goal (1 subgoal):
 1. S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top \<le> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top \<le> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top

goal (1 subgoal):
 1. i * - (S'\<^sup>\<star> * rank\<^sup>T * top) \<le> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top \<le> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top

goal (1 subgoal):
 1. i * - (S'\<^sup>\<star> * rank\<^sup>T * top) \<le> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> rank\<^sup>T * top \<squnion> S'\<^sup>+ * rank\<^sup>T * top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top \<le> rank[[top]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top
[PROOF STEP]
using mult_right_isotone sup_left_isotone top.extremum
[PROOF STATE]
proof (prove)
using this:
?x \<le> ?y \<Longrightarrow> ?z * ?x \<le> ?z * ?y
?x \<le> ?y \<Longrightarrow> ?x \<squnion> ?z \<le> ?y \<squnion> ?z
?a \<le> top

goal (1 subgoal):
 1. rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top \<le> rank[[top]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top \<le> rank[[top]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top

goal (1 subgoal):
 1. i * - (S'\<^sup>\<star> * rank\<^sup>T * top) \<le> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top \<le> rank[[top]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top

goal (1 subgoal):
 1. i * - (S'\<^sup>\<star> * rank\<^sup>T * top) \<le> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = S'\<^sup>\<star> * rank\<^sup>T * top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank[[top]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top = S'\<^sup>\<star> * rank\<^sup>T * top
[PROOF STEP]
using comp_associative star.circ_loop_fixpoint sup_commute
[PROOF STATE]
proof (prove)
using this:
?x * ?y * ?z = ?x * (?y * ?z)
?y * (?y\<^sup>\<star> * ?z) \<squnion> ?z = ?y\<^sup>\<star> * ?z
?x \<squnion> ?y = ?y \<squnion> ?x

goal (1 subgoal):
 1. rank[[top]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top = S'\<^sup>\<star> * rank\<^sup>T * top
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rank[[top]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top = S'\<^sup>\<star> * rank\<^sup>T * top

goal (1 subgoal):
 1. i * - (S'\<^sup>\<star> * rank\<^sup>T * top) \<le> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top \<le> S'\<^sup>\<star> * rank\<^sup>T * top
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top \<le> S'\<^sup>\<star> * rank\<^sup>T * top

goal (1 subgoal):
 1. i * - (S'\<^sup>\<star> * rank\<^sup>T * top) \<le> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
using mult_right_isotone p_antitone
[PROOF STATE]
proof (prove)
using this:
S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top \<le> S'\<^sup>\<star> * rank\<^sup>T * top
?x \<le> ?y \<Longrightarrow> ?z * ?x \<le> ?z * ?y
?x \<le> ?y \<Longrightarrow> - ?y \<le> - ?x

goal (1 subgoal):
 1. i * - (S'\<^sup>\<star> * rank\<^sup>T * top) \<le> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
i * - (S'\<^sup>\<star> * rank\<^sup>T * top) \<le> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
i * - (S'\<^sup>\<star> * rank\<^sup>T * top) \<le> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
find_set (path_compression p0 x (find_set p0 x)) y * ((i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "?s * (i * ?rr \<sqinter> -?s \<sqinter> roots ?p2) \<le> i * -(S'\<^sup>+ * ?rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y * ((i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * ((i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * ((i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
hence "i * ?rr \<sqinter> -?s \<sqinter> roots ?p2 \<le> ?s\<^sup>T * i * -(S'\<^sup>+ * ?rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y * ((i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (1 subgoal):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
using 5 shunt_mapping bijective_conv_mapping mult_assoc
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y * ((i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))) \<le> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
coreflexive (?z[[?z]]) \<and> times_top_class.total ?z \<Longrightarrow> (?x \<le> ?z * ?y) = (?z[[?x]] \<le> ?y)
bijective ?x = (coreflexive (?x\<^sup>T[[?x\<^sup>T]]) \<and> ?x[[top]] = top)
?a * ?b * ?c = ?a * (?b * ?c)

goal (1 subgoal):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
hence "i * ?rr \<sqinter> -?s \<sqinter> roots ?p2 \<le> i * ?rr \<sqinter> ?s\<^sup>T * i * -(S'\<^sup>+ * ?rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
using this:
(i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (1 subgoal):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * (rank[[find_set p0 x]]) \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
by (simp add: inf.sup_monoid.add_assoc)
[PROOF STATE]
proof (state)
this:
(i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * (rank[[find_set p0 x]]) \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * (rank[[find_set p0 x]]) \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... = (i * ?rr \<sqinter> ?s\<^sup>T * i) * -(S'\<^sup>+ * ?rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i * (rank[[find_set p0 x]]) \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top) = (i * (rank[[find_set p0 x]]) \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]])) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
using 6 vector_inf_comp vector_mult_closed
[PROOF STATE]
proof (prove)
using this:
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])
vector ?x \<Longrightarrow> (?x \<sqinter> ?y) * ?z = ?x \<sqinter> ?y * ?z
vector ?y \<Longrightarrow> vector (?x * ?y)

goal (1 subgoal):
 1. i * (rank[[find_set p0 x]]) \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top) = (i * (rank[[find_set p0 x]]) \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]])) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
i * (rank[[find_set p0 x]]) \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top) = (i * (rank[[find_set p0 x]]) \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]])) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
i * (rank[[find_set p0 x]]) \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top) = (i * (rank[[find_set p0 x]]) \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]])) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> ?i * -(S'\<^sup>+ * ?rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (i * (rank[[find_set p0 x]]) \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]])) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
using 13 comp_left_increasing_sup sup_assoc
[PROOF STATE]
proof (prove)
using this:
(i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]] = i * (rank[[find_set p0 x]]) \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) \<squnion> - (i * (rank[[find_set p0 x]])) \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> ((rank[[find_set p0 x]])[[i\<^sup>T]]) * i \<squnion> (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> i
?x * ?y \<le> (?x \<squnion> ?z) * ?y
?x \<squnion> ?y \<squnion> ?z = ?x \<squnion> (?y \<squnion> ?z)

goal (1 subgoal):
 1. (i * (rank[[find_set p0 x]]) \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]])) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(i * (rank[[find_set p0 x]]) \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]])) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (2 subgoals):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
 2. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
show "i * ?rr \<sqinter> -?s \<sqinter> roots ?p2 \<le> ?i * -(S'\<^sup>+ * ?rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
using this:
(i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (1 subgoal):
 1. (i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (1 subgoal):
 1. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "-(i * ?rr) \<sqinter> roots ?p2 \<le> -(i * ?rr) \<sqinter> i * -(S'\<^sup>+ * rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (i * (rank[[find_set p0 x]])) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
using 12 inf.sup_right_isotone
[PROOF STATE]
proof (prove)
using this:
injective i \<and> coreflexive (i[[i]]) \<and> regular i \<and> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)
?y \<le> ?x \<Longrightarrow> ?z \<sqinter> ?y \<le> ?z \<sqinter> ?x

goal (1 subgoal):
 1. - (i * (rank[[find_set p0 x]])) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
- (i * (rank[[find_set p0 x]])) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (1 subgoal):
 1. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- (i * (rank[[find_set p0 x]])) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (1 subgoal):
 1. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> -(i * ?rr) \<sqinter> i * -(?rs \<squnion> S'\<^sup>+ * rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
have 21: "regular (?rs \<squnion> S'\<^sup>+ * rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. regular (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
using 4 6 rank_property_def mapping_regular S'_regular pp_dist_star regular_conv_closed regular_mult_closed bijective_regular regular_closed_sup
[PROOF STATE]
proof (prove)
using this:
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])
rank_property ?p ?rank \<equiv> (coreflexive (?rank[[?rank]]) \<and> times_top_class.total ?rank) \<and> (?p - (1::'a)) * ?rank \<le> ?rank * S'\<^sup>+ \<and> card_less_eq (roots ?p) (- (S'\<^sup>+ * ?rank\<^sup>T * top))
coreflexive (?x[[?x]]) \<and> times_top_class.total ?x \<Longrightarrow> regular ?x
regular S'
- - ?x\<^sup>\<star> = components ?x
regular ?x \<Longrightarrow> regular (?x\<^sup>T)
\<lbrakk>regular ?x; regular ?y\<rbrakk> \<Longrightarrow> regular (?x * ?y)
bijective ?x \<Longrightarrow> regular ?x
\<lbrakk>regular ?x; regular ?y\<rbrakk> \<Longrightarrow> regular (?x \<squnion> ?y)

goal (1 subgoal):
 1. regular (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
regular (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)

goal (1 subgoal):
 1. - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
have "?rs \<squnion> S'\<^sup>+ * rank\<^sup>T * top \<le> S'\<^sup>+ * rank\<^sup>T * top \<squnion> ?rr"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top \<le> S'\<^sup>+ * rank\<^sup>T * top \<squnion> (rank[[find_set p0 x]])
[PROOF STEP]
using 11
[PROOF STATE]
proof (prove)
using this:
rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]]

goal (1 subgoal):
 1. rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top \<le> S'\<^sup>+ * rank\<^sup>T * top \<squnion> (rank[[find_set p0 x]])
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top \<le> S'\<^sup>+ * rank\<^sup>T * top \<squnion> (rank[[find_set p0 x]])

goal (1 subgoal):
 1. - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
hence "(?rs \<squnion> S'\<^sup>+ * rank\<^sup>T * top) - S'\<^sup>+ * rank\<^sup>T * top \<le> ?rr"
[PROOF STATE]
proof (prove)
using this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top \<le> S'\<^sup>+ * rank\<^sup>T * top \<squnion> (rank[[find_set p0 x]])

goal (1 subgoal):
 1. rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top - S'\<^sup>+ * rank\<^sup>T * top \<le> rank[[find_set p0 x]]
[PROOF STEP]
using half_shunting sup_commute
[PROOF STATE]
proof (prove)
using this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top \<le> S'\<^sup>+ * rank\<^sup>T * top \<squnion> (rank[[find_set p0 x]])
?x \<le> ?y \<squnion> ?z \<Longrightarrow> ?x - ?z \<le> ?y
?x \<squnion> ?y = ?y \<squnion> ?x

goal (1 subgoal):
 1. rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top - S'\<^sup>+ * rank\<^sup>T * top \<le> rank[[find_set p0 x]]
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top - S'\<^sup>+ * rank\<^sup>T * top \<le> rank[[find_set p0 x]]

goal (1 subgoal):
 1. - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
hence "-(S'\<^sup>+ * rank\<^sup>T * top) \<le> -(?rs \<squnion> S'\<^sup>+ * rank\<^sup>T * top) \<squnion> ?rr"
[PROOF STATE]
proof (prove)
using this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top - S'\<^sup>+ * rank\<^sup>T * top \<le> rank[[find_set p0 x]]

goal (1 subgoal):
 1. - (S'\<^sup>+ * rank\<^sup>T * top) \<le> - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top) \<squnion> (rank[[find_set p0 x]])
[PROOF STEP]
using 21
[PROOF STATE]
proof (prove)
using this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top - S'\<^sup>+ * rank\<^sup>T * top \<le> rank[[find_set p0 x]]
regular (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)

goal (1 subgoal):
 1. - (S'\<^sup>+ * rank\<^sup>T * top) \<le> - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top) \<squnion> (rank[[find_set p0 x]])
[PROOF STEP]
by (metis inf.sup_monoid.add_commute shunting_var_p sup_commute)
[PROOF STATE]
proof (state)
this:
- (S'\<^sup>+ * rank\<^sup>T * top) \<le> - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top) \<squnion> (rank[[find_set p0 x]])

goal (1 subgoal):
 1. - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
hence "i * -(S'\<^sup>+ * rank\<^sup>T * top) \<le> i * -(?rs \<squnion> S'\<^sup>+ * rank\<^sup>T * top) \<squnion> i * ?rr"
[PROOF STATE]
proof (prove)
using this:
- (S'\<^sup>+ * rank\<^sup>T * top) \<le> - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top) \<squnion> (rank[[find_set p0 x]])

goal (1 subgoal):
 1. i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top) \<squnion> i * (rank[[find_set p0 x]])
[PROOF STEP]
by (metis mult_left_dist_sup mult_right_isotone)
[PROOF STATE]
proof (state)
this:
i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top) \<squnion> i * (rank[[find_set p0 x]])

goal (1 subgoal):
 1. - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
hence "-(i * ?rr) \<sqinter> i * -(S'\<^sup>+ * rank\<^sup>T * top) \<le> i * -(?rs \<squnion> S'\<^sup>+ * rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
using this:
i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top) \<squnion> i * (rank[[find_set p0 x]])

goal (1 subgoal):
 1. - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
using half_shunting inf.sup_monoid.add_commute
[PROOF STATE]
proof (prove)
using this:
i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top) \<squnion> i * (rank[[find_set p0 x]])
?x \<le> ?y \<squnion> ?z \<Longrightarrow> ?x - ?z \<le> ?y
?a \<sqinter> ?b = ?b \<sqinter> ?a

goal (1 subgoal):
 1. - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
- (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)

goal (1 subgoal):
 1. - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
- (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)

goal (1 subgoal):
 1. - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
using inf.le_sup_iff
[PROOF STATE]
proof (prove)
using this:
- (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)
(?z \<le> ?x \<sqinter> ?y) = (?z \<le> ?x \<and> ?z \<le> ?y)

goal (1 subgoal):
 1. - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
- (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
- (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)

goal (1 subgoal):
 1. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top)

goal (1 subgoal):
 1. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> -(i * ?rr) \<sqinter> i * -(S'\<^sup>+ * ?rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
using 20
[PROOF STATE]
proof (prove)
using this:
S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top \<le> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top

goal (1 subgoal):
 1. - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
by (meson comp_inf.mult_right_isotone mult_right_isotone p_antitone)
[PROOF STATE]
proof (state)
this:
- (i * (rank[[find_set p0 x]])) \<sqinter> i * - (rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<squnion> S'\<^sup>+ * rank\<^sup>T * top) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (1 subgoal):
 1. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
- (i * (rank[[find_set p0 x]])) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "-(i * ?rr) \<sqinter> -?s \<sqinter> roots ?p2 \<le> -(i * ?rr) \<sqinter> -?s \<sqinter> i * -(S'\<^sup>+ * ?rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
using this:
- (i * (rank[[find_set p0 x]])) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> - (i * (rank[[find_set p0 x]])) \<sqinter> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (1 subgoal):
 1. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
by (smt (z3) inf.boundedI inf.cobounded1 inf.coboundedI2 inf.sup_monoid.add_assoc inf.sup_monoid.add_commute)
[PROOF STATE]
proof (state)
this:
(- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (1 subgoal):
 1. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (1 subgoal):
 1. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
have "... \<le> ?i * (-(S'\<^sup>+ * ?rank\<^sup>T * top))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
using 5 6 13
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])
(i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]] = i * (rank[[find_set p0 x]]) \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[i]]) \<squnion> - (i * (rank[[find_set p0 x]])) \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> ((rank[[find_set p0 x]])[[i\<^sup>T]]) * i \<squnion> (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> i

goal (1 subgoal):
 1. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
by (smt (z3) sup_commute vector_complement_closed vector_inf_comp vector_mult_closed comp_left_increasing_sup)
[PROOF STATE]
proof (state)
this:
(- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> i * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (1 subgoal):
 1. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
show "-(i * ?rr) \<sqinter> -?s \<sqinter> roots ?p2 \<le> ?i * -(S'\<^sup>+ * ?rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
using this:
(- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (1 subgoal):
 1. (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(i * (rank[[find_set p0 x]]) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<squnion> (- (i * (rank[[find_set p0 x]])) - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (3 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
 3. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
thus "card_less_eq (roots ?p4) (-(S'\<^sup>+ * ?rank\<^sup>T * top))"
[PROOF STATE]
proof (prove)
using this:
roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)

goal (1 subgoal):
 1. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
using 14 15 16 card_less_eq_def
[PROOF STATE]
proof (prove)
using this:
roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]]) * - (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top)
injective ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]])
coreflexive (((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]])[[((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]])]])
regular ((i[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>i[[i * (rank[[find_set p0 x]])]]])[i * (rank[[find_set p0 x]])\<longmapsto>i[[find_set (path_compression p0 x (find_set p0 x)) y]]])
card_less_eq ?v ?w \<equiv> \<exists>i. injective i \<and> coreflexive (i[[i]]) \<and> regular i \<and> ?v \<le> i * ?w

goal (1 subgoal):
 1. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])\<^sup>T * top))

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "?s \<le> i * -(S'\<^sup>+ * rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
using 19
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... \<le> i * -(S'\<^sup>+ * ?rr)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (S'\<^sup>+ * (rank[[find_set p0 x]]))
[PROOF STEP]
using mult_right_isotone p_antitone top.extremum mult_assoc
[PROOF STATE]
proof (prove)
using this:
?x \<le> ?y \<Longrightarrow> ?z * ?x \<le> ?z * ?y
?x \<le> ?y \<Longrightarrow> - ?y \<le> - ?x
?a \<le> top
?a * ?b * ?c = ?a * (?b * ?c)

goal (1 subgoal):
 1. i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (S'\<^sup>+ * (rank[[find_set p0 x]]))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (S'\<^sup>+ * (rank[[find_set p0 x]]))

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (S'\<^sup>+ * (rank[[find_set p0 x]]))

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... = i * -S'\<^sup>+ * ?rr"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i * - (S'\<^sup>+ * (rank[[find_set p0 x]])) = i * - S'\<^sup>+ * (rank[[find_set p0 x]])
[PROOF STEP]
using 6 comp_bijective_complement mult_assoc
[PROOF STATE]
proof (prove)
using this:
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])
bijective ?y \<Longrightarrow> - ?x * ?y = - (?x * ?y)
?a * ?b * ?c = ?a * (?b * ?c)

goal (1 subgoal):
 1. i * - (S'\<^sup>+ * (rank[[find_set p0 x]])) = i * - S'\<^sup>+ * (rank[[find_set p0 x]])
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
i * - (S'\<^sup>+ * (rank[[find_set p0 x]])) = i * - S'\<^sup>+ * (rank[[find_set p0 x]])

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
find_set (path_compression p0 x (find_set p0 x)) y \<le> i * - S'\<^sup>+ * (rank[[find_set p0 x]])
[PROOF STEP]
have "?rr \<le> -S'\<^sup>T\<^sup>+ * i\<^sup>T * ?s"
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y \<le> i * - S'\<^sup>+ * (rank[[find_set p0 x]])

goal (1 subgoal):
 1. rank[[find_set p0 x]] \<le> - (S'[[S'\<^sup>T\<^sup>\<star>]]) * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
using 5 6
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y \<le> i * - S'\<^sup>+ * (rank[[find_set p0 x]])
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])

goal (1 subgoal):
 1. rank[[find_set p0 x]] \<le> - (S'[[S'\<^sup>T\<^sup>\<star>]]) * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
by (metis conv_complement conv_dist_comp conv_plus_commute bijective_reverse)
[PROOF STATE]
proof (state)
this:
rank[[find_set p0 x]] \<le> - (S'[[S'\<^sup>T\<^sup>\<star>]]) * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rank[[find_set p0 x]] \<le> - (S'[[S'\<^sup>T\<^sup>\<star>]]) * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... \<le> S'\<^sup>\<star> * i\<^sup>T * ?s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (S'[[S'\<^sup>T\<^sup>\<star>]]) * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<le> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
using 7 conv_plus_commute mult_left_isotone
[PROOF STATE]
proof (prove)
using this:
- S'\<^sup>+\<^sup>T \<le> S'\<^sup>\<star>
?x\<^sup>+\<^sup>T = ?x[[?x\<^sup>T\<^sup>\<star>]]
?x \<le> ?y \<Longrightarrow> ?x * ?z \<le> ?y * ?z

goal (1 subgoal):
 1. - (S'[[S'\<^sup>T\<^sup>\<star>]]) * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<le> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
- (S'[[S'\<^sup>T\<^sup>\<star>]]) * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<le> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
rank[[find_set p0 x]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
have 22: "?rr \<le> S'\<^sup>\<star> * i\<^sup>T * ?s"
[PROOF STATE]
proof (prove)
using this:
rank[[find_set p0 x]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. rank[[find_set p0 x]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
rank[[find_set p0 x]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "?r = root ?p1 x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set p0 x = root (path_compression p0 x (find_set p0 x)) x
[PROOF STEP]
using 2 path_compression_postcondition_def path_compression_precondition_def
[PROOF STATE]
proof (prove)
using this:
path_compression_postcondition (path_compression p0 x (find_set p0 x)) x (find_set p0 x) p0
path_compression_postcondition ?p ?x ?y ?p0.0 \<equiv> path_compression_precondition ?p ?x ?y \<and> ?p \<sqinter> (1::'a) = ?p0.0 \<sqinter> (1::'a) \<and> fc ?p = fc ?p0.0 \<and> ?p0.0[?p0.0\<^sup>T\<^sup>\<star> * ?x\<longmapsto>?y] = ?p
path_compression_precondition ?p ?x ?y \<equiv> ((coreflexive (?p[[?p]]) \<and> times_top_class.total ?p) \<and> pd_kleene_allegory_class.acyclic (?p - (1::'a))) \<and> point ?x \<and> point ?y \<and> ?y = root ?p ?x

goal (1 subgoal):
 1. find_set p0 x = root (path_compression p0 x (find_set p0 x)) x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
find_set p0 x = root (path_compression p0 x (find_set p0 x)) x

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set p0 x = root (path_compression p0 x (find_set p0 x)) x

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... = root ?p2 x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. root (path_compression p0 x (find_set p0 x)) x = root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) x
[PROOF STEP]
using 3 18
[PROOF STATE]
proof (prove)
using this:
path_compression_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y (find_set (path_compression p0 x (find_set p0 x)) y) (path_compression p0 x (find_set p0 x))
find_set_precondition (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. root (path_compression p0 x (find_set p0 x)) x = root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) x
[PROOF STEP]
by (smt (z3) find_set_precondition_def path_compression_postcondition_def path_compression_precondition_def same_root)
[PROOF STATE]
proof (state)
this:
root (path_compression p0 x (find_set p0 x)) x = root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) x

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
root (path_compression p0 x (find_set p0 x)) x = root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) x

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... \<le> roots ?p2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) x \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) x \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) x \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... \<le> i * -(S'\<^sup>+ * rank\<^sup>T * top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
using 12
[PROOF STATE]
proof (prove)
using this:
injective i \<and> coreflexive (i[[i]]) \<and> regular i \<and> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... \<le> i * -(S'\<^sup>+ * ?rr)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (S'\<^sup>+ * (rank[[find_set p0 x]]))
[PROOF STEP]
using mult_right_isotone p_antitone top.extremum mult_assoc
[PROOF STATE]
proof (prove)
using this:
?x \<le> ?y \<Longrightarrow> ?z * ?x \<le> ?z * ?y
?x \<le> ?y \<Longrightarrow> - ?y \<le> - ?x
?a \<le> top
?a * ?b * ?c = ?a * (?b * ?c)

goal (1 subgoal):
 1. i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (S'\<^sup>+ * (rank[[find_set p0 x]]))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (S'\<^sup>+ * (rank[[find_set p0 x]]))

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
i * - (S'\<^sup>+ * rank\<^sup>T * top) \<le> i * - (S'\<^sup>+ * (rank[[find_set p0 x]]))

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... = i * -S'\<^sup>+ * ?rr"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i * - (S'\<^sup>+ * (rank[[find_set p0 x]])) = i * - S'\<^sup>+ * (rank[[find_set p0 x]])
[PROOF STEP]
using 6 comp_bijective_complement mult_assoc
[PROOF STATE]
proof (prove)
using this:
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])
bijective ?y \<Longrightarrow> - ?x * ?y = - (?x * ?y)
?a * ?b * ?c = ?a * (?b * ?c)

goal (1 subgoal):
 1. i * - (S'\<^sup>+ * (rank[[find_set p0 x]])) = i * - S'\<^sup>+ * (rank[[find_set p0 x]])
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
i * - (S'\<^sup>+ * (rank[[find_set p0 x]])) = i * - S'\<^sup>+ * (rank[[find_set p0 x]])

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
find_set p0 x \<le> i * - S'\<^sup>+ * (rank[[find_set p0 x]])
[PROOF STEP]
have "?rr \<le> -S'\<^sup>T\<^sup>+ * i\<^sup>T * ?r"
[PROOF STATE]
proof (prove)
using this:
find_set p0 x \<le> i * - S'\<^sup>+ * (rank[[find_set p0 x]])

goal (1 subgoal):
 1. rank[[find_set p0 x]] \<le> - (S'[[S'\<^sup>T\<^sup>\<star>]]) * i\<^sup>T * find_set p0 x
[PROOF STEP]
using 5 6
[PROOF STATE]
proof (prove)
using this:
find_set p0 x \<le> i * - S'\<^sup>+ * (rank[[find_set p0 x]])
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])

goal (1 subgoal):
 1. rank[[find_set p0 x]] \<le> - (S'[[S'\<^sup>T\<^sup>\<star>]]) * i\<^sup>T * find_set p0 x
[PROOF STEP]
by (metis conv_complement conv_dist_comp conv_plus_commute bijective_reverse)
[PROOF STATE]
proof (state)
this:
rank[[find_set p0 x]] \<le> - (S'[[S'\<^sup>T\<^sup>\<star>]]) * i\<^sup>T * find_set p0 x

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rank[[find_set p0 x]] \<le> - (S'[[S'\<^sup>T\<^sup>\<star>]]) * i\<^sup>T * find_set p0 x

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... \<le> S'\<^sup>\<star> * i\<^sup>T * ?r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (S'[[S'\<^sup>T\<^sup>\<star>]]) * i\<^sup>T * find_set p0 x \<le> S'\<^sup>\<star> * i\<^sup>T * find_set p0 x
[PROOF STEP]
using 7 conv_plus_commute mult_left_isotone
[PROOF STATE]
proof (prove)
using this:
- S'\<^sup>+\<^sup>T \<le> S'\<^sup>\<star>
?x\<^sup>+\<^sup>T = ?x[[?x\<^sup>T\<^sup>\<star>]]
?x \<le> ?y \<Longrightarrow> ?x * ?z \<le> ?y * ?z

goal (1 subgoal):
 1. - (S'[[S'\<^sup>T\<^sup>\<star>]]) * i\<^sup>T * find_set p0 x \<le> S'\<^sup>\<star> * i\<^sup>T * find_set p0 x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
- (S'[[S'\<^sup>T\<^sup>\<star>]]) * i\<^sup>T * find_set p0 x \<le> S'\<^sup>\<star> * i\<^sup>T * find_set p0 x

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
rank[[find_set p0 x]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set p0 x
[PROOF STEP]
have "?rr \<le> S'\<^sup>\<star> * i\<^sup>T * ?r"
[PROOF STATE]
proof (prove)
using this:
rank[[find_set p0 x]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set p0 x

goal (1 subgoal):
 1. rank[[find_set p0 x]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set p0 x
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
rank[[find_set p0 x]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set p0 x

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
hence "?rr \<le> S'\<^sup>\<star> * i\<^sup>T * ?r \<sqinter> S'\<^sup>\<star> * i\<^sup>T * ?s"
[PROOF STATE]
proof (prove)
using this:
rank[[find_set p0 x]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set p0 x

goal (1 subgoal):
 1. rank[[find_set p0 x]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set p0 x \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
using 22 inf.boundedI
[PROOF STATE]
proof (prove)
using this:
rank[[find_set p0 x]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set p0 x
rank[[find_set p0 x]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
\<lbrakk>?a \<le> ?b; ?a \<le> ?c\<rbrakk> \<Longrightarrow> ?a \<le> ?b \<sqinter> ?c

goal (1 subgoal):
 1. rank[[find_set p0 x]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set p0 x \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
rank[[find_set p0 x]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set p0 x \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rank[[find_set p0 x]] \<le> S'\<^sup>\<star> * i\<^sup>T * find_set p0 x \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... = (S'\<^sup>+ * i\<^sup>T * ?r \<squnion> i\<^sup>T * ?r) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * ?s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S'\<^sup>\<star> * i\<^sup>T * find_set p0 x \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y = (S'\<^sup>+ * i\<^sup>T * find_set p0 x \<squnion> (i[[find_set p0 x]])) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
by (simp add: star.circ_loop_fixpoint mult_assoc)
[PROOF STATE]
proof (state)
this:
S'\<^sup>\<star> * i\<^sup>T * find_set p0 x \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y = (S'\<^sup>+ * i\<^sup>T * find_set p0 x \<squnion> (i[[find_set p0 x]])) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
S'\<^sup>\<star> * i\<^sup>T * find_set p0 x \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y = (S'\<^sup>+ * i\<^sup>T * find_set p0 x \<squnion> (i[[find_set p0 x]])) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... \<le> S'\<^sup>+ * i\<^sup>T * ?r \<squnion> (i\<^sup>T * ?r \<sqinter> S'\<^sup>\<star> * i\<^sup>T * ?s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (S'\<^sup>+ * i\<^sup>T * find_set p0 x \<squnion> (i[[find_set p0 x]])) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<le> S'\<^sup>+ * i\<^sup>T * find_set p0 x \<squnion> (i[[find_set p0 x]]) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
by (metis comp_inf.mult_right_dist_sup eq_refl inf.cobounded1 semiring.add_mono)
[PROOF STATE]
proof (state)
this:
(S'\<^sup>+ * i\<^sup>T * find_set p0 x \<squnion> (i[[find_set p0 x]])) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<le> S'\<^sup>+ * i\<^sup>T * find_set p0 x \<squnion> (i[[find_set p0 x]]) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(S'\<^sup>+ * i\<^sup>T * find_set p0 x \<squnion> (i[[find_set p0 x]])) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<le> S'\<^sup>+ * i\<^sup>T * find_set p0 x \<squnion> (i[[find_set p0 x]]) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... \<le> S' * top \<squnion> (i\<^sup>T * ?r \<sqinter> S'\<^sup>\<star> * i\<^sup>T * ?s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S'\<^sup>+ * i\<^sup>T * find_set p0 x \<squnion> (i[[find_set p0 x]]) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<le> S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
using comp_associative mult_right_isotone sup_left_isotone top.extremum
[PROOF STATE]
proof (prove)
using this:
?x * ?y * ?z = ?x * (?y * ?z)
?x \<le> ?y \<Longrightarrow> ?z * ?x \<le> ?z * ?y
?x \<le> ?y \<Longrightarrow> ?x \<squnion> ?z \<le> ?y \<squnion> ?z
?a \<le> top

goal (1 subgoal):
 1. S'\<^sup>+ * i\<^sup>T * find_set p0 x \<squnion> (i[[find_set p0 x]]) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<le> S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
S'\<^sup>+ * i\<^sup>T * find_set p0 x \<squnion> (i[[find_set p0 x]]) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<le> S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
S'\<^sup>+ * i\<^sup>T * find_set p0 x \<squnion> (i[[find_set p0 x]]) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<le> S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... = S' * top \<squnion> (i\<^sup>T * ?r \<sqinter> (S'\<^sup>+ * i\<^sup>T * ?s \<squnion> i\<^sup>T * ?s))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y = S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> (S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (i[[find_set (path_compression p0 x (find_set p0 x)) y]]))
[PROOF STEP]
by (simp add: star.circ_loop_fixpoint mult_assoc)
[PROOF STATE]
proof (state)
this:
S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y = S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> (S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (i[[find_set (path_compression p0 x (find_set p0 x)) y]]))

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> S'\<^sup>\<star> * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y = S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> (S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (i[[find_set (path_compression p0 x (find_set p0 x)) y]]))

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... \<le> S' * top \<squnion> S'\<^sup>+ * i\<^sup>T * ?s \<squnion> (i\<^sup>T * ?r \<sqinter> i\<^sup>T * ?s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> (S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (i[[find_set (path_compression p0 x (find_set p0 x)) y]])) \<le> S' * top \<squnion> S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (i[[find_set p0 x]]) \<sqinter> (i[[find_set (path_compression p0 x (find_set p0 x)) y]])
[PROOF STEP]
by (smt (z3) comp_inf.semiring.distrib_left inf.sup_right_divisibility star.circ_loop_fixpoint sup_assoc sup_commute sup_inf_distrib1)
[PROOF STATE]
proof (state)
this:
S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> (S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (i[[find_set (path_compression p0 x (find_set p0 x)) y]])) \<le> S' * top \<squnion> S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (i[[find_set p0 x]]) \<sqinter> (i[[find_set (path_compression p0 x (find_set p0 x)) y]])

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> (S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (i[[find_set (path_compression p0 x (find_set p0 x)) y]])) \<le> S' * top \<squnion> S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (i[[find_set p0 x]]) \<sqinter> (i[[find_set (path_compression p0 x (find_set p0 x)) y]])

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... \<le> S' * top \<squnion> (i\<^sup>T * ?r \<sqinter> i\<^sup>T * ?s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S' * top \<squnion> S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (i[[find_set p0 x]]) \<sqinter> (i[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<le> S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> (i[[find_set (path_compression p0 x (find_set p0 x)) y]])
[PROOF STEP]
by (metis comp_associative mult_right_isotone order.refl sup.orderE top.extremum)
[PROOF STATE]
proof (state)
this:
S' * top \<squnion> S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (i[[find_set p0 x]]) \<sqinter> (i[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<le> S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> (i[[find_set (path_compression p0 x (find_set p0 x)) y]])

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
S' * top \<squnion> S'\<^sup>+ * i\<^sup>T * find_set (path_compression p0 x (find_set p0 x)) y \<squnion> (i[[find_set p0 x]]) \<sqinter> (i[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<le> S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> (i[[find_set (path_compression p0 x (find_set p0 x)) y]])

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... = S' * top \<squnion> i\<^sup>T * (?r \<sqinter> ?s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> (i[[find_set (path_compression p0 x (find_set p0 x)) y]]) = S' * top \<squnion> (i[[find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y]])
[PROOF STEP]
using 12 conv_involutive univalent_comp_left_dist_inf
[PROOF STATE]
proof (prove)
using this:
injective i \<and> coreflexive (i[[i]]) \<and> regular i \<and> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<le> i * - (S'\<^sup>+ * rank\<^sup>T * top)
?x\<^sup>T\<^sup>T = ?x
coreflexive (?x[[?x]]) \<Longrightarrow> ?x * (?y \<sqinter> ?z) = ?x * ?y \<sqinter> ?x * ?z

goal (1 subgoal):
 1. S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> (i[[find_set (path_compression p0 x (find_set p0 x)) y]]) = S' * top \<squnion> (i[[find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y]])
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> (i[[find_set (path_compression p0 x (find_set p0 x)) y]]) = S' * top \<squnion> (i[[find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y]])

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
S' * top \<squnion> (i[[find_set p0 x]]) \<sqinter> (i[[find_set (path_compression p0 x (find_set p0 x)) y]]) = S' * top \<squnion> (i[[find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y]])

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... = S' * top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S' * top \<squnion> (i[[find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y]]) = S' * top
[PROOF STEP]
using 5 8 distinct_points
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y
\<lbrakk>point ?x; point ?y; ?x \<noteq> ?y\<rbrakk> \<Longrightarrow> ?x \<sqinter> ?y = bot

goal (1 subgoal):
 1. S' * top \<squnion> (i[[find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y]]) = S' * top
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
S' * top \<squnion> (i[[find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y]]) = S' * top

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
rank[[find_set p0 x]] \<le> S' * top
[PROOF STEP]
have "top \<le> ?rr\<^sup>T * S' * top"
[PROOF STATE]
proof (prove)
using this:
rank[[find_set p0 x]] \<le> S' * top

goal (1 subgoal):
 1. top \<le> ((rank[[find_set p0 x]])[[S']]) * top
[PROOF STEP]
using 6
[PROOF STATE]
proof (prove)
using this:
rank[[find_set p0 x]] \<le> S' * top
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])

goal (1 subgoal):
 1. top \<le> ((rank[[find_set p0 x]])[[S']]) * top
[PROOF STEP]
by (smt conv_involutive shunt_mapping bijective_conv_mapping mult_assoc)
[PROOF STATE]
proof (state)
this:
top \<le> ((rank[[find_set p0 x]])[[S']]) * top

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
hence "surjective (S'\<^sup>T * ?rs)"
[PROOF STATE]
proof (prove)
using this:
top \<le> ((rank[[find_set p0 x]])[[S']]) * top

goal (1 subgoal):
 1. surjective (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])
[PROOF STEP]
using 6 11
[PROOF STATE]
proof (prove)
using this:
top \<le> ((rank[[find_set p0 x]])[[S']]) * top
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])
rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]]

goal (1 subgoal):
 1. surjective (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])
[PROOF STEP]
by (smt conv_dist_comp conv_involutive point_conv_comp top_le)
[PROOF STATE]
proof (state)
this:
surjective (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])

goal (2 subgoals):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
 2. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
thus "total ?rank"
[PROOF STATE]
proof (prove)
using this:
surjective (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])

goal (1 subgoal):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
using 4 5 bijective_regular update_total rank_property_def
[PROOF STATE]
proof (prove)
using this:
surjective (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
bijective ?x \<Longrightarrow> regular ?x
\<lbrakk>times_top_class.total ?x; vector ?y; regular ?y; surjective ?z\<rbrakk> \<Longrightarrow> times_top_class.total (?x[?y\<longmapsto>?z])
rank_property ?p ?rank \<equiv> (coreflexive (?rank[[?rank]]) \<and> times_top_class.total ?rank) \<and> (?p - (1::'a)) * ?rank \<le> ?rank * S'\<^sup>+ \<and> card_less_eq (roots ?p) (- (S'\<^sup>+ * ?rank\<^sup>T * top))

goal (1 subgoal):
 1. times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
times_top_class.total (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
show "(?p4 - 1) * ?rank \<le> ?rank * S'\<^sup>+"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have 23: "univalent ?p2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coreflexive (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[[path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)]])
[PROOF STEP]
using 3 path_compression_postcondition_def path_compression_precondition_def
[PROOF STATE]
proof (prove)
using this:
path_compression_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y (find_set (path_compression p0 x (find_set p0 x)) y) (path_compression p0 x (find_set p0 x))
path_compression_postcondition ?p ?x ?y ?p0.0 \<equiv> path_compression_precondition ?p ?x ?y \<and> ?p \<sqinter> (1::'a) = ?p0.0 \<sqinter> (1::'a) \<and> fc ?p = fc ?p0.0 \<and> ?p0.0[?p0.0\<^sup>T\<^sup>\<star> * ?x\<longmapsto>?y] = ?p
path_compression_precondition ?p ?x ?y \<equiv> ((coreflexive (?p[[?p]]) \<and> times_top_class.total ?p) \<and> pd_kleene_allegory_class.acyclic (?p - (1::'a))) \<and> point ?x \<and> point ?y \<and> ?y = root ?p ?x

goal (1 subgoal):
 1. coreflexive (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[[path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)]])
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
coreflexive (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[[path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)]])

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have 24: "?r \<sqinter> (?p4 - 1) * ?rank \<le> ?s\<^sup>T * rank * S' * S'\<^sup>+"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+
[PROOF STEP]
have "?r \<sqinter> (?p4 - 1) * ?rank = (?r \<sqinter> ?p4 \<sqinter> -1) * ?rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = (find_set p0 x \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
using 5 vector_complement_closed vector_inf_comp inf_assoc
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
vector ?x \<Longrightarrow> vector (- ?x)
vector ?x \<Longrightarrow> (?x \<sqinter> ?y) * ?z = ?x \<sqinter> ?y * ?z
?x \<sqinter> ?y \<sqinter> ?z = ?x \<sqinter> (?y \<sqinter> ?z)

goal (1 subgoal):
 1. find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = (find_set p0 x \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = (find_set p0 x \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = (find_set p0 x \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+
[PROOF STEP]
have "... = (?r \<sqinter> -?s \<sqinter> ?p4 \<sqinter> -1) * ?rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set p0 x \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = ((find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
using 5 8
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = ((find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
by (smt (z3) order.antisym bijective_regular point_in_vector_or_complement point_in_vector_or_complement_2 inf_absorb1)
[PROOF STATE]
proof (state)
this:
(find_set p0 x \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = ((find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(find_set p0 x \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = ((find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+
[PROOF STEP]
have "... = (?r \<sqinter> -?s \<sqinter> ?p2 \<sqinter> -1) * ?rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = ((find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
by (simp add: inf.left_commute inf.sup_monoid.add_commute inf_sup_distrib1 inf_assoc)
[PROOF STATE]
proof (state)
this:
((find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = ((find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
((find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = ((find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+
[PROOF STEP]
have "... \<le> (?r \<sqinter> ?p2 \<sqinter> -1) * ?rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
using inf.sup_left_isotone inf_le1 mult_left_isotone
[PROOF STATE]
proof (prove)
using this:
?y \<le> ?x \<Longrightarrow> ?y \<sqinter> ?z \<le> ?x \<sqinter> ?z
?x \<sqinter> ?y \<le> ?x
?x \<le> ?y \<Longrightarrow> ?x * ?z \<le> ?y * ?z

goal (1 subgoal):
 1. ((find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
((find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
((find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+
[PROOF STEP]
have "... = bot"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
have "?r = root ?p1 x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set p0 x = root (path_compression p0 x (find_set p0 x)) x
[PROOF STEP]
using 2 path_compression_postcondition_def path_compression_precondition_def
[PROOF STATE]
proof (prove)
using this:
path_compression_postcondition (path_compression p0 x (find_set p0 x)) x (find_set p0 x) p0
path_compression_postcondition ?p ?x ?y ?p0.0 \<equiv> path_compression_precondition ?p ?x ?y \<and> ?p \<sqinter> (1::'a) = ?p0.0 \<sqinter> (1::'a) \<and> fc ?p = fc ?p0.0 \<and> ?p0.0[?p0.0\<^sup>T\<^sup>\<star> * ?x\<longmapsto>?y] = ?p
path_compression_precondition ?p ?x ?y \<equiv> ((coreflexive (?p[[?p]]) \<and> times_top_class.total ?p) \<and> pd_kleene_allegory_class.acyclic (?p - (1::'a))) \<and> point ?x \<and> point ?y \<and> ?y = root ?p ?x

goal (1 subgoal):
 1. find_set p0 x = root (path_compression p0 x (find_set p0 x)) x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
find_set p0 x = root (path_compression p0 x (find_set p0 x)) x

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set p0 x = root (path_compression p0 x (find_set p0 x)) x

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
have "... = root ?p2 x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. root (path_compression p0 x (find_set p0 x)) x = root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) x
[PROOF STEP]
using 3 18
[PROOF STATE]
proof (prove)
using this:
path_compression_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y (find_set (path_compression p0 x (find_set p0 x)) y) (path_compression p0 x (find_set p0 x))
find_set_precondition (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. root (path_compression p0 x (find_set p0 x)) x = root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) x
[PROOF STEP]
by (smt (z3) find_set_precondition_def path_compression_postcondition_def path_compression_precondition_def same_root)
[PROOF STATE]
proof (state)
this:
root (path_compression p0 x (find_set p0 x)) x = root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) x

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
root (path_compression p0 x (find_set p0 x)) x = root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) x

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
have "... \<le> roots ?p2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) x \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
root (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) x \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
find_set p0 x \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))
[PROOF STEP]
have "?r \<sqinter> ?p2 \<le> roots ?p2 \<sqinter> ?p2"
[PROOF STATE]
proof (prove)
using this:
find_set p0 x \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))

goal (1 subgoal):
 1. find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)
[PROOF STEP]
using inf.sup_left_isotone
[PROOF STATE]
proof (prove)
using this:
find_set p0 x \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))
?y \<le> ?x \<Longrightarrow> ?y \<sqinter> ?z \<le> ?x \<sqinter> ?z

goal (1 subgoal):
 1. find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
have "... \<le> (?p2 \<sqinter> 1) * (?p2 \<sqinter> 1)\<^sup>T * ?p2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<le> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a))\<^sup>T * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)
[PROOF STEP]
by (smt (z3) comp_associative comp_inf.star_plus dedekind_1 inf_top_right order_lesseq_imp)
[PROOF STATE]
proof (state)
this:
roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<le> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a))\<^sup>T * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<le> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a))\<^sup>T * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
have "... = (?p2 \<sqinter> 1) * (?p2 \<sqinter> 1) * ?p2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a))\<^sup>T * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) = (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)
[PROOF STEP]
using coreflexive_symmetric
[PROOF STATE]
proof (prove)
using this:
coreflexive ?x \<Longrightarrow> symmetric ?x

goal (1 subgoal):
 1. (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a))\<^sup>T * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) = (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
(path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a))\<^sup>T * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) = (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a))\<^sup>T * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) = (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
have "... \<le> (?p2 \<sqinter> 1) * ?p2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<le> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)
[PROOF STEP]
by (metis coreflexive_comp_top_inf inf.cobounded2 mult_left_isotone)
[PROOF STATE]
proof (state)
this:
(path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<le> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<le> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
have "... \<le> ?p2 \<sqinter> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<le> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)
[PROOF STEP]
by (smt 23 comp_inf.mult_semi_associative conv_dist_comp conv_dist_inf conv_order equivalence_one_closed inf.absorb1 inf.sup_monoid.add_assoc injective_codomain)
[PROOF STATE]
proof (state)
this:
(path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<le> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)) * path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<le> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a)

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
have "... \<le> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coreflexive (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
coreflexive (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (1::'a))

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
coreflexive (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))
[PROOF STEP]
have "?r \<sqinter> ?p2 \<le> 1"
[PROOF STATE]
proof (prove)
using this:
coreflexive (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))

goal (1 subgoal):
 1. coreflexive (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
coreflexive (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
coreflexive (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot
[PROOF STEP]
by (metis pseudo_complement regular_one_closed semiring.mult_not_zero)
[PROOF STATE]
proof (state)
this:
(find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(find_set p0 x \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = bot

goal (1 subgoal):
 1. find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> bot
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> bot

goal (1 subgoal):
 1. find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+
[PROOF STEP]
using bot_least le_bot
[PROOF STATE]
proof (prove)
using this:
find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> bot
bot \<le> ?a
?a \<le> bot \<Longrightarrow> ?a = bot

goal (1 subgoal):
 1. find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have 25: "-?r \<sqinter> (?p4 - 1) * ?rank \<le> rank * S'\<^sup>+"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
have "-?r \<sqinter> (?p4 - 1) * ?rank = (-?r \<sqinter> ?p4 \<sqinter> -1) * ?rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = (- find_set p0 x \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
using 5 vector_complement_closed vector_inf_comp inf_assoc
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
vector ?x \<Longrightarrow> vector (- ?x)
vector ?x \<Longrightarrow> (?x \<sqinter> ?y) * ?z = ?x \<sqinter> ?y * ?z
?x \<sqinter> ?y \<sqinter> ?z = ?x \<sqinter> (?y \<sqinter> ?z)

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = (- find_set p0 x \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
- find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = (- find_set p0 x \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = (- find_set p0 x \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... = (-?r \<sqinter> (?s \<squnion> -?s) \<sqinter> ?p4 \<sqinter> -1) * ?rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- find_set p0 x \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = (- find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y \<squnion> - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
using 5 bijective_regular inf_top_right regular_complement_top
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
bijective ?x \<Longrightarrow> regular ?x
?x \<sqinter> top = ?x
regular ?x \<Longrightarrow> ?x \<squnion> - ?x = top

goal (1 subgoal):
 1. (- find_set p0 x \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = (- find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y \<squnion> - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(- find_set p0 x \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = (- find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y \<squnion> - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(- find_set p0 x \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = (- find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y \<squnion> - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... = (-?r \<sqinter> ?s \<sqinter> ?p4 \<sqinter> -1) * ?rank \<squnion> (-?r \<sqinter> -?s \<sqinter> ?p4 \<sqinter> -1) * ?rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y \<squnion> - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = (- find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> ((- find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
by (smt (z3) inf_sup_distrib1 inf_sup_distrib2 mult_right_dist_sup)
[PROOF STATE]
proof (state)
this:
(- find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y \<squnion> - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = (- find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> ((- find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(- find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y \<squnion> - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = (- find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> ((- find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... = (-?r \<sqinter> ?s \<sqinter> ?r\<^sup>T \<sqinter> -1) * ?rank \<squnion> (-?r \<sqinter> -?s \<sqinter> ?p2 \<sqinter> -1) * ?rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> ((- find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = (- find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> ((- find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
using 5
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. (- find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> ((- find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = (- find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> ((- find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
by (smt (z3) bijective_regular comp_inf.comp_left_dist_sup inf_assoc inf_commute inf_top_right mult_right_dist_sup regular_complement_top)
[PROOF STATE]
proof (state)
this:
(- find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> ((- find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = (- find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> ((- find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(- find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> ((- find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = (- find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> ((- find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... \<le> (?s \<sqinter> ?r\<^sup>T \<sqinter> -1) * ?rank \<squnion> (-?s \<sqinter> ?p2 \<sqinter> -1) * ?rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> ((- find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
by (smt (z3) comp_inf.semiring.distrib_left inf.cobounded2 inf.sup_monoid.add_assoc mult_left_isotone mult_right_dist_sup)
[PROOF STATE]
proof (state)
this:
(- find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> ((- find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(- find_set p0 x \<sqinter> find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> ((- find_set p0 x - find_set (path_compression p0 x (find_set p0 x)) y) \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... \<le> (?s \<sqinter> ?r\<^sup>T) * ?rank \<squnion> (?p2 - 1) * ?rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
by (smt (z3) inf.cobounded1 inf.cobounded2 inf.sup_monoid.add_assoc mult_left_isotone semiring.add_mono)
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... = ?s * (?r \<sqinter> ?rank) \<squnion> (?p2 - 1) * ?rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
using 5
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
by (simp add: covector_inf_comp_3)
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... = ?s * (?r \<sqinter> (S'\<^sup>T * ?rs)\<^sup>T) \<squnion> (?p2 - 1) * ?rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])\<^sup>T) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
using inf_commute update_inf_same mult_assoc
[PROOF STATE]
proof (prove)
using this:
?x \<sqinter> ?y = ?y \<sqinter> ?x
(?x[?y\<longmapsto>?z]) \<sqinter> ?y = ?z\<^sup>T \<sqinter> ?y
?a * ?b * ?c = ?a * (?b * ?c)

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])\<^sup>T) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])\<^sup>T) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])\<^sup>T) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... = ?s * (?r \<sqinter> ?s\<^sup>T * rank * S') \<squnion> (?p2 - 1) * ?rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])\<^sup>T) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S') \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
using comp_associative conv_dist_comp conv_involutive
[PROOF STATE]
proof (prove)
using this:
?x * ?y * ?z = ?x * (?y * ?z)
(?x * ?y)\<^sup>T = ?y[[?x\<^sup>T]]
?x\<^sup>T\<^sup>T = ?x

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])\<^sup>T) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S') \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])\<^sup>T) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S') \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]])\<^sup>T) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S') \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... \<le> ?s * ?s\<^sup>T * rank * S' \<squnion> (?p2 - 1) * ?rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S') \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> find_set (path_compression p0 x (find_set p0 x)) y * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
using comp_associative inf.cobounded2 mult_right_isotone semiring.add_right_mono
[PROOF STATE]
proof (prove)
using this:
?x * ?y * ?z = ?x * (?y * ?z)
?a \<sqinter> ?b \<le> ?b
?x \<le> ?y \<Longrightarrow> ?z * ?x \<le> ?z * ?y
?a \<le> ?b \<Longrightarrow> ?a \<squnion> ?c \<le> ?b \<squnion> ?c

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S') \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> find_set (path_compression p0 x (find_set p0 x)) y * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S') \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> find_set (path_compression p0 x (find_set p0 x)) y * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * (find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S') \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> find_set (path_compression p0 x (find_set p0 x)) y * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... \<le> 1 * rank * S' \<squnion> (?p2 - 1) * ?rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (1::'a) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
using 5
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (1::'a) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
by (meson mult_left_isotone order.refl semiring.add_mono)
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (1::'a) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * find_set (path_compression p0 x (find_set p0 x)) y\<^sup>T * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (1::'a) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... = rank * S' \<squnion> (?p2 - 1) * (?r \<sqinter> (S'\<^sup>T * ?rr)\<^sup>T) \<squnion> (?p2 - 1) * (-?r \<sqinter> rank)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> (S'[[rank[[find_set p0 x]]]])\<^sup>T) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (- find_set p0 x \<sqinter> rank)
[PROOF STEP]
using 11 comp_associative mult_1_left mult_left_dist_sup sup_assoc
[PROOF STATE]
proof (prove)
using this:
rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]]
?x * ?y * ?z = ?x * (?y * ?z)
(1::'a) * ?a = ?a
?x * (?y \<squnion> ?z) = ?x * ?y \<squnion> ?x * ?z
?x \<squnion> ?y \<squnion> ?z = ?x \<squnion> (?y \<squnion> ?z)

goal (1 subgoal):
 1. (1::'a) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> (S'[[rank[[find_set p0 x]]]])\<^sup>T) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (- find_set p0 x \<sqinter> rank)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(1::'a) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> (S'[[rank[[find_set p0 x]]]])\<^sup>T) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (- find_set p0 x \<sqinter> rank)

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(1::'a) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> (S'[[rank[[find_set p0 x]]]])\<^sup>T) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (- find_set p0 x \<sqinter> rank)

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... \<le> rank * S' \<squnion> (?p2 - 1) * (?r \<sqinter> ?r\<^sup>T * rank * S') \<squnion> (?p2 - 1) * rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> (S'[[rank[[find_set p0 x]]]])\<^sup>T) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (- find_set p0 x \<sqinter> rank) \<le> rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> (find_set p0 x[[rank]]) * S') \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank
[PROOF STEP]
using comp_associative conv_dist_comp conv_involutive inf.cobounded1 inf.sup_monoid.add_commute mult_right_isotone semiring.add_left_mono
[PROOF STATE]
proof (prove)
using this:
?x * ?y * ?z = ?x * (?y * ?z)
(?x * ?y)\<^sup>T = ?y[[?x\<^sup>T]]
?x\<^sup>T\<^sup>T = ?x
?a \<sqinter> ?b \<le> ?a
?a \<sqinter> ?b = ?b \<sqinter> ?a
?x \<le> ?y \<Longrightarrow> ?z * ?x \<le> ?z * ?y
?a \<le> ?b \<Longrightarrow> ?c \<squnion> ?a \<le> ?c \<squnion> ?b

goal (1 subgoal):
 1. rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> (S'[[rank[[find_set p0 x]]]])\<^sup>T) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (- find_set p0 x \<sqinter> rank) \<le> rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> (find_set p0 x[[rank]]) * S') \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> (S'[[rank[[find_set p0 x]]]])\<^sup>T) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (- find_set p0 x \<sqinter> rank) \<le> rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> (find_set p0 x[[rank]]) * S') \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> (S'[[rank[[find_set p0 x]]]])\<^sup>T) \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (- find_set p0 x \<sqinter> rank) \<le> rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> (find_set p0 x[[rank]]) * S') \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... = rank * S' \<squnion> (?p2 - 1) * (?r \<sqinter> ?r\<^sup>T) * rank * S' \<squnion> (?p2 - 1) * rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> (find_set p0 x[[rank]]) * S') \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank = rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> find_set p0 x\<^sup>T) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank
[PROOF STEP]
using 5 comp_associative vector_inf_comp
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
?x * ?y * ?z = ?x * (?y * ?z)
vector ?x \<Longrightarrow> (?x \<sqinter> ?y) * ?z = ?x \<sqinter> ?y * ?z

goal (1 subgoal):
 1. rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> (find_set p0 x[[rank]]) * S') \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank = rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> find_set p0 x\<^sup>T) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> (find_set p0 x[[rank]]) * S') \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank = rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> find_set p0 x\<^sup>T) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> (find_set p0 x[[rank]]) * S') \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank = rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> find_set p0 x\<^sup>T) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... \<le> rank * S' \<squnion> (?p2 - 1) * rank * S' \<squnion> (?p2 - 1) * rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> find_set p0 x\<^sup>T) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank
[PROOF STEP]
using 5
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> find_set p0 x\<^sup>T) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank
[PROOF STEP]
by (metis point_antisymmetric mult_left_isotone mult_right_isotone sup_left_isotone sup_right_isotone comp_right_one)
[PROOF STATE]
proof (state)
this:
rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> find_set p0 x\<^sup>T) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * (find_set p0 x \<sqinter> find_set p0 x\<^sup>T) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... \<le> rank * S' \<squnion> rank * S'\<^sup>+ * S' \<squnion> (?p2 - 1) * rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> rank * S' \<squnion> rank * S'\<^sup>+ * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank
[PROOF STEP]
using 4
[PROOF STATE]
proof (prove)
using this:
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank

goal (1 subgoal):
 1. rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> rank * S' \<squnion> rank * S'\<^sup>+ * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank
[PROOF STEP]
by (metis rank_property_def mult_left_isotone sup_left_isotone sup_right_isotone)
[PROOF STATE]
proof (state)
this:
rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> rank * S' \<squnion> rank * S'\<^sup>+ * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> rank * S' \<squnion> rank * S'\<^sup>+ * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... \<le> rank * S' \<squnion> rank * S'\<^sup>+ * S' \<squnion> rank * S'\<^sup>+"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank * S' \<squnion> rank * S'\<^sup>+ * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> rank * S' \<squnion> rank * S'\<^sup>+ * S' \<squnion> rank * S'\<^sup>+
[PROOF STEP]
using 4
[PROOF STATE]
proof (prove)
using this:
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank

goal (1 subgoal):
 1. rank * S' \<squnion> rank * S'\<^sup>+ * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> rank * S' \<squnion> rank * S'\<^sup>+ * S' \<squnion> rank * S'\<^sup>+
[PROOF STEP]
by (metis rank_property_def sup_right_isotone)
[PROOF STATE]
proof (state)
this:
rank * S' \<squnion> rank * S'\<^sup>+ * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> rank * S' \<squnion> rank * S'\<^sup>+ * S' \<squnion> rank * S'\<^sup>+

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rank * S' \<squnion> rank * S'\<^sup>+ * S' \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> rank * S' \<squnion> rank * S'\<^sup>+ * S' \<squnion> rank * S'\<^sup>+

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... \<le> rank * S'\<^sup>+"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank * S' \<squnion> rank * S'\<^sup>+ * S' \<squnion> rank * S'\<^sup>+ \<le> rank * S'\<^sup>+
[PROOF STEP]
using comp_associative eq_refl le_sup_iff mult_right_isotone star.circ_mult_increasing star.circ_plus_same star.left_plus_below_circ
[PROOF STATE]
proof (prove)
using this:
?x * ?y * ?z = ?x * (?y * ?z)
?x = ?y \<Longrightarrow> ?x \<le> ?y
(?x \<squnion> ?y \<le> ?z) = (?x \<le> ?z \<and> ?y \<le> ?z)
?x \<le> ?y \<Longrightarrow> ?z * ?x \<le> ?z * ?y
?x \<le> ?x\<^sup>+
?x\<^sup>\<star> * ?x = ?x\<^sup>+
?x\<^sup>+ \<le> ?x\<^sup>\<star>

goal (1 subgoal):
 1. rank * S' \<squnion> rank * S'\<^sup>+ * S' \<squnion> rank * S'\<^sup>+ \<le> rank * S'\<^sup>+
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rank * S' \<squnion> rank * S'\<^sup>+ * S' \<squnion> rank * S'\<^sup>+ \<le> rank * S'\<^sup>+

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
- find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
- find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+

goal (1 subgoal):
 1. - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
- find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
- find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "(?p4 - 1) * ?rank = (?r \<sqinter> (?p4 - 1) * ?rank) \<squnion> (-?r \<sqinter> (?p4 - 1) * ?rank)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
using 5
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])
[PROOF STEP]
by (smt (verit, ccfv_threshold) bijective_regular inf_commute inf_sup_distrib2 inf_top_right regular_complement_top)
[PROOF STATE]
proof (state)
this:
((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) = find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... \<le> (?r \<sqinter> ?s\<^sup>T * rank * S' * S'\<^sup>+) \<squnion> (-?r \<sqinter> rank * S'\<^sup>+)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+ \<squnion> - find_set p0 x \<sqinter> rank * S'\<^sup>+
[PROOF STEP]
using 24 25
[PROOF STATE]
proof (prove)
using this:
find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+
- find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> rank * S'\<^sup>+

goal (1 subgoal):
 1. find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+ \<squnion> - find_set p0 x \<sqinter> rank * S'\<^sup>+
[PROOF STEP]
by (meson inf.boundedI inf.cobounded1 semiring.add_mono)
[PROOF STATE]
proof (state)
this:
find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+ \<squnion> - find_set p0 x \<sqinter> rank * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<squnion> - find_set p0 x \<sqinter> ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+ \<squnion> - find_set p0 x \<sqinter> rank * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... = (?r \<sqinter> ?s\<^sup>T * rank * S') * S'\<^sup>+ \<squnion> (-?r \<sqinter> rank) * S'\<^sup>+"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+ \<squnion> - find_set p0 x \<sqinter> rank * S'\<^sup>+ = (find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S') * S'\<^sup>+ \<squnion> (- find_set p0 x \<sqinter> rank) * S'\<^sup>+
[PROOF STEP]
using 5 vector_complement_closed vector_inf_comp
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
vector ?x \<Longrightarrow> vector (- ?x)
vector ?x \<Longrightarrow> (?x \<sqinter> ?y) * ?z = ?x \<sqinter> ?y * ?z

goal (1 subgoal):
 1. find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+ \<squnion> - find_set p0 x \<sqinter> rank * S'\<^sup>+ = (find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S') * S'\<^sup>+ \<squnion> (- find_set p0 x \<sqinter> rank) * S'\<^sup>+
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+ \<squnion> - find_set p0 x \<sqinter> rank * S'\<^sup>+ = (find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S') * S'\<^sup>+ \<squnion> (- find_set p0 x \<sqinter> rank) * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S' * S'\<^sup>+ \<squnion> - find_set p0 x \<sqinter> rank * S'\<^sup>+ = (find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S') * S'\<^sup>+ \<squnion> (- find_set p0 x \<sqinter> rank) * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
have "... = ?rank * S'\<^sup>+"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S') * S'\<^sup>+ \<squnion> (- find_set p0 x \<sqinter> rank) * S'\<^sup>+ = (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
using conv_dist_comp mult_right_dist_sup
[PROOF STATE]
proof (prove)
using this:
(?x * ?y)\<^sup>T = ?y[[?x\<^sup>T]]
(?x \<squnion> ?y) * ?z = ?x * ?z \<squnion> ?y * ?z

goal (1 subgoal):
 1. (find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S') * S'\<^sup>+ \<squnion> (- find_set p0 x \<sqinter> rank) * S'\<^sup>+ = (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(find_set p0 x \<sqinter> (find_set (path_compression p0 x (find_set p0 x)) y[[rank]]) * S') * S'\<^sup>+ \<squnion> (- find_set p0 x \<sqinter> rank) * S'\<^sup>+ = (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) \<le> (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]]) * S'\<^sup>+

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])

goal (1 subgoal):
 1. rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank
[PROOF STEP]
show "?rr \<noteq> ?rs \<longrightarrow> union_sets_postcondition ?p4 x y p0 \<and> rank_property ?p4 rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<Longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank
[PROOF STEP]
assume "?rr \<noteq> ?rs"
[PROOF STATE]
proof (state)
this:
rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]]

goal (1 subgoal):
 1. rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<Longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank
[PROOF STEP]
hence "?rs \<sqinter> ?rr = bot"
[PROOF STATE]
proof (prove)
using this:
rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]]

goal (1 subgoal):
 1. (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<sqinter> (rank[[find_set p0 x]]) = bot
[PROOF STEP]
using 6
[PROOF STATE]
proof (prove)
using this:
rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]]
point (rank[[find_set p0 x]])
point (rank[[find_set (path_compression p0 x (find_set p0 x)) y]])

goal (1 subgoal):
 1. (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<sqinter> (rank[[find_set p0 x]]) = bot
[PROOF STEP]
by (meson bijective_regular dual_order.eq_iff point_in_vector_or_complement point_in_vector_or_complement_2 pseudo_complement)
[PROOF STATE]
proof (state)
this:
(rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<sqinter> (rank[[find_set p0 x]]) = bot

goal (1 subgoal):
 1. rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<Longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank
[PROOF STEP]
hence 26: "?rs \<le> S'\<^sup>+ * ?rr"
[PROOF STATE]
proof (prove)
using this:
(rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<sqinter> (rank[[find_set p0 x]]) = bot

goal (1 subgoal):
 1. rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> S'\<^sup>+ * (rank[[find_set p0 x]])
[PROOF STEP]
using 10 le_iff_inf pseudo_complement
[PROOF STATE]
proof (prove)
using this:
(rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<sqinter> (rank[[find_set p0 x]]) = bot
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] - (rank[[find_set p0 x]]) \<le> S'\<^sup>+ * (rank[[find_set p0 x]])
(?x \<le> ?y) = (?x \<sqinter> ?y = ?x)
(?x \<sqinter> ?y = bot) = (?x \<le> - ?y)

goal (1 subgoal):
 1. rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> S'\<^sup>+ * (rank[[find_set p0 x]])
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> S'\<^sup>+ * (rank[[find_set p0 x]])

goal (1 subgoal):
 1. rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<Longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank
[PROOF STEP]
show "union_sets_postcondition ?p4 x y p0 \<and> rank_property ?p4 rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0
 2. rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank
[PROOF STEP]
show "union_sets_postcondition ?p4 x y p0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0
[PROOF STEP]
using 1 2 3
[PROOF STATE]
proof (prove)
using this:
union_sets_precondition p0 x y \<and> rank_property p0 rank
path_compression_postcondition (path_compression p0 x (find_set p0 x)) x (find_set p0 x) p0
path_compression_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y (find_set (path_compression p0 x (find_set p0 x)) y) (path_compression p0 x (find_set p0 x))

goal (1 subgoal):
 1. union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0
[PROOF STEP]
by (simp add: union_sets_1_swap)
[PROOF STATE]
proof (state)
this:
union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0

goal (1 subgoal):
 1. rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank
[PROOF STEP]
show "rank_property ?p4 rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank
[PROOF STEP]
proof (unfold rank_property_def, intro conjI)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. coreflexive (rank[[rank]])
 2. times_top_class.total rank
 3. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
 4. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
show "univalent rank" "total rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coreflexive (rank[[rank]]) &&& times_top_class.total rank
[PROOF STEP]
using 1 rank_property_def
[PROOF STATE]
proof (prove)
using this:
union_sets_precondition p0 x y \<and> rank_property p0 rank
rank_property ?p ?rank \<equiv> (coreflexive (?rank[[?rank]]) \<and> times_top_class.total ?rank) \<and> (?p - (1::'a)) * ?rank \<le> ?rank * S'\<^sup>+ \<and> card_less_eq (roots ?p) (- (S'\<^sup>+ * ?rank\<^sup>T * top))

goal (1 subgoal):
 1. coreflexive (rank[[rank]]) &&& times_top_class.total rank
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
coreflexive (rank[[rank]])
times_top_class.total rank

goal (2 subgoals):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
 2. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
have "?r \<le> -?s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set p0 x \<le> - find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
using 5 8
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. find_set p0 x \<le> - find_set (path_compression p0 x (find_set p0 x)) y
[PROOF STEP]
by (meson order.antisym bijective_regular point_in_vector_or_complement point_in_vector_or_complement_2)
[PROOF STATE]
proof (state)
this:
find_set p0 x \<le> - find_set (path_compression p0 x (find_set p0 x)) y

goal (2 subgoals):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
 2. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
hence "?s \<sqinter> ?r\<^sup>T \<sqinter> 1 = bot"
[PROOF STATE]
proof (prove)
using this:
find_set p0 x \<le> - find_set (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T \<sqinter> (1::'a) = bot
[PROOF STEP]
by (metis (full_types) bot_least inf.left_commute inf.sup_monoid.add_commute one_inf_conv pseudo_complement)
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T \<sqinter> (1::'a) = bot

goal (2 subgoals):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
 2. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
hence "?p4 \<sqinter> 1 \<le> ?p2"
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T \<sqinter> (1::'a) = bot

goal (1 subgoal):
 1. (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<sqinter> (1::'a) \<le> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)
[PROOF STEP]
by (smt half_shunting inf.cobounded2 pseudo_complement regular_one_closed semiring.add_mono sup_commute)
[PROOF STATE]
proof (state)
this:
(path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<sqinter> (1::'a) \<le> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)

goal (2 subgoals):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
 2. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
hence "roots ?p4 \<le> roots ?p2"
[PROOF STATE]
proof (prove)
using this:
(path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<sqinter> (1::'a) \<le> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))
[PROOF STEP]
by (simp add: mult_left_isotone)
[PROOF STATE]
proof (state)
this:
roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))

goal (2 subgoals):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
 2. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
thus "card_less_eq (roots ?p4) (-(S'\<^sup>+ * rank\<^sup>T * top))"
[PROOF STATE]
proof (prove)
using this:
roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))

goal (1 subgoal):
 1. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
using 4
[PROOF STATE]
proof (prove)
using this:
roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) \<le> roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y))
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank

goal (1 subgoal):
 1. card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * rank\<^sup>T * top))
[PROOF STEP]
by (meson rank_property_def card_less_eq_def order_trans)
[PROOF STATE]
proof (state)
this:
card_less_eq (roots (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x])) (- (S'\<^sup>+ * rank\<^sup>T * top))

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
have "(?p4 - 1) * rank = (?s \<sqinter> ?r\<^sup>T \<sqinter> -1) * rank \<squnion> (-?s \<sqinter> ?p2 \<sqinter> -1) * rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank
[PROOF STEP]
using comp_inf.semiring.distrib_right mult_right_dist_sup
[PROOF STATE]
proof (prove)
using this:
(?a \<squnion> ?b) \<sqinter> ?c = ?a \<sqinter> ?c \<squnion> ?b \<sqinter> ?c
(?x \<squnion> ?y) * ?z = ?x * ?z \<squnion> ?y * ?z

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank = (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... \<le> (?s \<sqinter> ?r\<^sup>T \<sqinter> -1) * rank \<squnion> (?p2 - 1) * rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank
[PROOF STEP]
using comp_inf.mult_semi_associative mult_left_isotone sup_right_isotone
[PROOF STATE]
proof (prove)
using this:
?x \<sqinter> ?y \<sqinter> ?z \<le> ?x \<sqinter> (?y \<sqinter> ?z)
?x \<le> ?y \<Longrightarrow> ?x * ?z \<le> ?y * ?z
?x \<le> ?y \<Longrightarrow> ?z \<squnion> ?x \<le> ?z \<squnion> ?y

goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> (- find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... \<le> (?s \<sqinter> ?r\<^sup>T \<sqinter> -1) * rank \<squnion> rank * S'\<^sup>+"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> rank * S'\<^sup>+
[PROOF STEP]
using 4 sup_right_isotone rank_property_def
[PROOF STATE]
proof (prove)
using this:
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank
?x \<le> ?y \<Longrightarrow> ?z \<squnion> ?x \<le> ?z \<squnion> ?y
rank_property ?p ?rank \<equiv> (coreflexive (?rank[[?rank]]) \<and> times_top_class.total ?rank) \<and> (?p - (1::'a)) * ?rank \<le> ?rank * S'\<^sup>+ \<and> card_less_eq (roots ?p) (- (S'\<^sup>+ * ?rank\<^sup>T * top))

goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> rank * S'\<^sup>+
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> rank * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y) - (1::'a)) * rank \<le> (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> rank * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... \<le> (?s \<sqinter> ?r\<^sup>T) * rank \<squnion> rank * S'\<^sup>+"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> rank * S'\<^sup>+ \<le> (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T) * rank \<squnion> rank * S'\<^sup>+
[PROOF STEP]
using inf_le1 mult_left_isotone sup_left_isotone
[PROOF STATE]
proof (prove)
using this:
?x \<sqinter> ?y \<le> ?x
?x \<le> ?y \<Longrightarrow> ?x * ?z \<le> ?y * ?z
?x \<le> ?y \<Longrightarrow> ?x \<squnion> ?z \<le> ?y \<squnion> ?z

goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> rank * S'\<^sup>+ \<le> (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T) * rank \<squnion> rank * S'\<^sup>+
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> rank * S'\<^sup>+ \<le> (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T) * rank \<squnion> rank * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T - (1::'a)) * rank \<squnion> rank * S'\<^sup>+ \<le> (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T) * rank \<squnion> rank * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... = ?s * ?r\<^sup>T * rank \<squnion> rank * S'\<^sup>+"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T) * rank \<squnion> rank * S'\<^sup>+ = find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T * rank \<squnion> rank * S'\<^sup>+
[PROOF STEP]
using 5
[PROOF STATE]
proof (prove)
using this:
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)

goal (1 subgoal):
 1. (find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T) * rank \<squnion> rank * S'\<^sup>+ = find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T * rank \<squnion> rank * S'\<^sup>+
[PROOF STEP]
by (simp add: vector_covector)
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T) * rank \<squnion> rank * S'\<^sup>+ = find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T * rank \<squnion> rank * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(find_set (path_compression p0 x (find_set p0 x)) y \<sqinter> find_set p0 x\<^sup>T) * rank \<squnion> rank * S'\<^sup>+ = find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T * rank \<squnion> rank * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
have "... = rank * S'\<^sup>+"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+
[PROOF STEP]
have "rank\<^sup>T * ?s \<le> S'\<^sup>+ * rank\<^sup>T * ?r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> S'\<^sup>+ * rank\<^sup>T * find_set p0 x
[PROOF STEP]
using 26 comp_associative
[PROOF STATE]
proof (prove)
using this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> S'\<^sup>+ * (rank[[find_set p0 x]])
?x * ?y * ?z = ?x * (?y * ?z)

goal (1 subgoal):
 1. rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> S'\<^sup>+ * rank\<^sup>T * find_set p0 x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> S'\<^sup>+ * rank\<^sup>T * find_set p0 x

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+
[PROOF STEP]
hence "?s \<le> rank * S'\<^sup>+ * rank\<^sup>T * ?r"
[PROOF STATE]
proof (prove)
using this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> S'\<^sup>+ * rank\<^sup>T * find_set p0 x

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y \<le> rank * S'\<^sup>+ * rank\<^sup>T * find_set p0 x
[PROOF STEP]
using 4 shunt_mapping comp_associative rank_property_def
[PROOF STATE]
proof (prove)
using this:
rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<le> S'\<^sup>+ * rank\<^sup>T * find_set p0 x
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank
coreflexive (?z[[?z]]) \<and> times_top_class.total ?z \<Longrightarrow> (?x \<le> ?z * ?y) = (?z[[?x]] \<le> ?y)
?x * ?y * ?z = ?x * (?y * ?z)
rank_property ?p ?rank \<equiv> (coreflexive (?rank[[?rank]]) \<and> times_top_class.total ?rank) \<and> (?p - (1::'a)) * ?rank \<le> ?rank * S'\<^sup>+ \<and> card_less_eq (roots ?p) (- (S'\<^sup>+ * ?rank\<^sup>T * top))

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y \<le> rank * S'\<^sup>+ * rank\<^sup>T * find_set p0 x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y \<le> rank * S'\<^sup>+ * rank\<^sup>T * find_set p0 x

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+
[PROOF STEP]
hence "?s * ?r\<^sup>T \<le> rank * S'\<^sup>+ * rank\<^sup>T"
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y \<le> rank * S'\<^sup>+ * rank\<^sup>T * find_set p0 x

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T \<le> rank * S'\<^sup>+ * rank\<^sup>T
[PROOF STEP]
using 5 shunt_bijective
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y \<le> rank * S'\<^sup>+ * rank\<^sup>T * find_set p0 x
point (find_set p0 x)
point (find_set (path_compression p0 x (find_set p0 x)) y)
bijective ?z \<Longrightarrow> (?x \<le> ?y * ?z) = (?x * ?z\<^sup>T \<le> ?y)

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T \<le> rank * S'\<^sup>+ * rank\<^sup>T
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T \<le> rank * S'\<^sup>+ * rank\<^sup>T

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+
[PROOF STEP]
hence "?s * ?r\<^sup>T * rank \<le> rank * S'\<^sup>+"
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T \<le> rank * S'\<^sup>+ * rank\<^sup>T

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
using 4 shunt_bijective rank_property_def mapping_conv_bijective
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T \<le> rank * S'\<^sup>+ * rank\<^sup>T
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank
bijective ?z \<Longrightarrow> (?x \<le> ?y * ?z) = (?x * ?z\<^sup>T \<le> ?y)
rank_property ?p ?rank \<equiv> (coreflexive (?rank[[?rank]]) \<and> times_top_class.total ?rank) \<and> (?p - (1::'a)) * ?rank \<le> ?rank * S'\<^sup>+ \<and> card_less_eq (roots ?p) (- (S'\<^sup>+ * ?rank\<^sup>T * top))
(coreflexive (?x[[?x]]) \<and> times_top_class.total ?x) = (coreflexive (?x[[?x\<^sup>T\<^sup>T]]) \<and> surjective (?x\<^sup>T))

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T * rank \<le> rank * S'\<^sup>+

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T * rank \<le> rank * S'\<^sup>+

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+
[PROOF STEP]
using sup_absorb2
[PROOF STATE]
proof (prove)
using this:
find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T * rank \<le> rank * S'\<^sup>+
?x \<le> ?y \<Longrightarrow> ?x \<squnion> ?y = ?y

goal (1 subgoal):
 1. find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
find_set (path_compression p0 x (find_set p0 x)) y * find_set p0 x\<^sup>T * rank \<squnion> rank * S'\<^sup>+ = rank * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
show "(?p4 - 1) * rank \<le> rank * S'\<^sup>+"
[PROOF STATE]
proof (prove)
using this:
((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+

goal (1 subgoal):
 1. ((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
((path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) - (1::'a)) * rank \<le> rank * S'\<^sup>+

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))

goal (1 subgoal):
 1. find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank
[PROOF STEP]
show "?r = ?s \<longrightarrow> union_sets_postcondition ?p5 x y p0 \<and> rank_property ?p5 rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<Longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank
[PROOF STEP]
assume 27: "?r = ?s"
[PROOF STATE]
proof (state)
this:
find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<Longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank
[PROOF STEP]
show "union_sets_postcondition ?p5 x y p0 \<and> rank_property ?p5 rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0
 2. rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank
[PROOF STEP]
show "union_sets_postcondition ?p5 x y p0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0
[PROOF STEP]
using 1 2 3 27
[PROOF STATE]
proof (prove)
using this:
union_sets_precondition p0 x y \<and> rank_property p0 rank
path_compression_postcondition (path_compression p0 x (find_set p0 x)) x (find_set p0 x) p0
path_compression_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) y (find_set (path_compression p0 x (find_set p0 x)) y) (path_compression p0 x (find_set p0 x))
find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0
[PROOF STEP]
by (simp add: union_sets_1_skip)
[PROOF STATE]
proof (state)
this:
union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0

goal (1 subgoal):
 1. rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank
[PROOF STEP]
show "rank_property ?p5 rank"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank
[PROOF STEP]
using 4 27
[PROOF STATE]
proof (prove)
using this:
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)) rank
find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y

goal (1 subgoal):
 1. rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(find_set p0 x \<noteq> find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> (rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set p0 x\<longmapsto>find_set (path_compression p0 x (find_set p0 x)) y]) rank) \<and> (\<not> rank[[find_set p0 x]] \<le> S'\<^sup>+ * (rank[[find_set (path_compression p0 x (find_set p0 x)) y]]) \<longrightarrow> (rank[[find_set p0 x]] = rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) (rank[find_set p0 x\<longmapsto>S'[[rank[[find_set (path_compression p0 x (find_set p0 x)) y]]]]])) \<and> (rank[[find_set p0 x]] \<noteq> rank[[find_set (path_compression p0 x (find_set p0 x)) y]] \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set (path_compression p0 x (find_set p0 x)) y)[find_set (path_compression p0 x (find_set p0 x)) y\<longmapsto>find_set p0 x]) rank))) \<and> (find_set p0 x = find_set (path_compression p0 x (find_set p0 x)) y \<longrightarrow> union_sets_postcondition (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) x y p0 \<and> rank_property (path_compression (path_compression p0 x (find_set p0 x)) y (find_set p0 x)) rank)

goal:
No subgoals!
[PROOF STEP]
qed