src/HOLCF/Ssum1.ML
changeset 9248 e1dee89de037
parent 9245 428385c4bc50
child 9969 4753185f1dd2
equal deleted inserted replaced
9247:ad9f986616de 9248:e1dee89de037
    30 fun UU_right s1 = 
    30 fun UU_right s1 = 
    31         (
    31         (
    32         (res_inst_tac [("t",s1)](noteq_IsinlIsinr RS conjunct2 RS ssubst)1)
    32         (res_inst_tac [("t",s1)](noteq_IsinlIsinr RS conjunct2 RS ssubst)1)
    33         THEN (rtac trans 1)
    33         THEN (rtac trans 1)
    34         THEN (atac 2)
    34         THEN (atac 2)
    35         THEN (etac sym 1))
    35         THEN (etac sym 1));
    36 
    36 
    37 val prems = goalw thy [less_ssum_def]
    37 Goalw [less_ssum_def]
    38 "[|s1=Isinl(x::'a); s2=Isinl(y::'a)|] ==> s1 << s2 = (x << y)";
    38 "[|s1=Isinl(x::'a); s2=Isinl(y::'a)|] ==> s1 << s2 = (x << y)";
    39 by (cut_facts_tac prems 1);
       
    40 by (rtac select_equality 1);
    39 by (rtac select_equality 1);
    41 by (dtac conjunct1 2);
    40 by (dtac conjunct1 2);
    42 by (dtac spec 2);
    41 by (dtac spec 2);
    43 by (dtac spec 2);
    42 by (dtac spec 2);
    44 by (etac mp 2);
    43 by (etac mp 2);
    71 by (UU_right "v");
    70 by (UU_right "v");
    72 by (Simp_tac 1);
    71 by (Simp_tac 1);
    73 qed "less_ssum1a";
    72 qed "less_ssum1a";
    74 
    73 
    75 
    74 
    76 val prems = goalw thy [less_ssum_def]
    75 Goalw [less_ssum_def]
    77 "[|s1=Isinr(x::'b); s2=Isinr(y::'b)|] ==> s1 << s2 = (x << y)";
    76 "[|s1=Isinr(x::'b); s2=Isinr(y::'b)|] ==> s1 << s2 = (x << y)";
    78 by (cut_facts_tac prems 1);
       
    79 by (rtac select_equality 1);
    77 by (rtac select_equality 1);
    80 by (dtac conjunct2 2);
    78 by (dtac conjunct2 2);
    81 by (dtac conjunct1 2);
    79 by (dtac conjunct1 2);
    82 by (dtac spec 2);
    80 by (dtac spec 2);
    83 by (dtac spec 2);
    81 by (dtac spec 2);
   111 by (etac sym 1);
   109 by (etac sym 1);
   112 by (rtac refl_less 1);
   110 by (rtac refl_less 1);
   113 qed "less_ssum1b";
   111 qed "less_ssum1b";
   114 
   112 
   115 
   113 
   116 val prems = goalw thy [less_ssum_def]
   114 Goalw [less_ssum_def]
   117 "[|s1=Isinl(x::'a); s2=Isinr(y::'b)|] ==> s1 << s2 = ((x::'a) = UU)";
   115 "[|s1=Isinl(x::'a); s2=Isinr(y::'b)|] ==> s1 << s2 = ((x::'a) = UU)";
   118 by (cut_facts_tac prems 1);
       
   119 by (rtac select_equality 1);
   116 by (rtac select_equality 1);
   120 by (rtac conjI 1);
   117 by (rtac conjI 1);
   121 by (strip_tac 1);
   118 by (strip_tac 1);
   122 by (etac conjE 1);
   119 by (etac conjE 1);
   123 by (eq_left  "x" "u");
   120 by (eq_left  "x" "u");
   151 by (etac mp 1);
   148 by (etac mp 1);
   152 by (fast_tac HOL_cs 1);
   149 by (fast_tac HOL_cs 1);
   153 qed "less_ssum1c";
   150 qed "less_ssum1c";
   154 
   151 
   155 
   152 
   156 val prems = goalw thy [less_ssum_def]
   153 Goalw [less_ssum_def]
   157 "[|s1=Isinr(x); s2=Isinl(y)|] ==> s1 << s2 = (x = UU)";
   154 "[|s1=Isinr(x); s2=Isinl(y)|] ==> s1 << s2 = (x = UU)";
   158 by (cut_facts_tac prems 1);
       
   159 by (rtac select_equality 1);
   155 by (rtac select_equality 1);
   160 by (dtac conjunct2 2);
   156 by (dtac conjunct2 2);
   161 by (dtac conjunct2 2);
   157 by (dtac conjunct2 2);
   162 by (dtac conjunct2 2);
   158 by (dtac conjunct2 2);
   163 by (dtac spec 2);
   159 by (dtac spec 2);